Exemple #1
0
        public static bool ProtectedAddHousehold(Household house, SimDescription sim)
        {
            if ((house == null) || (sim == null))
            {
                return(false);
            }

            SimDescription altered = null;

            if (house.AllSimDescriptions.Count > 0)
            {
                altered = house.AllSimDescriptions[0];
            }
            else
            {
                altered = sim;
            }

            using (HomeworldReversion reversion = new HomeworldReversion(altered))
            {
                if (sim.GetMiniSimForProtection() == null)
                {
                    MiniSims.EnsureProperHomeworld(sim.SimDescriptionId);
                }

                house.Add(sim);
            }

            return(true);
        }
Exemple #2
0
 protected static bool IsAllowedToWork(Career ths)
 {
     using (HomeworldReversion reversion = new HomeworldReversion(ths.OwnerDescription))
     {
         return(ths.IsAllowedToWork());
     }
 }
 protected static bool IsAllowedToWork(Career ths)
 {
     using (HomeworldReversion reversion = new HomeworldReversion(ths.OwnerDescription))
     {
         return ths.IsAllowedToWork();
     }
 }
Exemple #4
0
        public static bool ProtectedAddHousehold(Household house, SimDescription sim)
        {
            if ((house == null) || (sim == null)) return false;

            SimDescription altered = null;
            if (house.AllSimDescriptions.Count > 0)
            {
                altered = house.AllSimDescriptions[0];
            }
            else
            {
                altered = sim;
            }

            using (HomeworldReversion reversion = new HomeworldReversion(altered))
            {
                if (sim.GetMiniSimForProtection() == null)
                {
                    MiniSims.EnsureProperHomeworld(sim.SimDescriptionId);
                }

                house.Add(sim);
            }

            return true;
        }