Пример #1
0
 internal bool AllowEnjoyableOutsideNow(out GameConditionDef reason)
 {
     for (int i = 0; i < this.activeConditions.Count; i++)
     {
         GameCondition gameCondition = this.activeConditions[i];
         if (!gameCondition.AllowEnjoyableOutsideNow())
         {
             reason = gameCondition.def;
             return(false);
         }
     }
     reason = null;
     return(this.Parent == null || this.Parent.AllowEnjoyableOutsideNow(out reason));
 }
 internal bool AllowEnjoyableOutsideNow(Map map, out GameConditionDef reason)
 {
     for (int i = 0; i < activeConditions.Count; i++)
     {
         GameCondition gameCondition = activeConditions[i];
         if (!gameCondition.AllowEnjoyableOutsideNow(map))
         {
             reason = gameCondition.def;
             return(false);
         }
     }
     reason = null;
     if (Parent != null)
     {
         return(Parent.AllowEnjoyableOutsideNow(map, out reason));
     }
     return(true);
 }