Пример #1
0
            public override bool Test(Sim actor, ScienceLab target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if (actor.Inventory.Find <IVoucherCloneMe>() == null)
                {
                    return(false);
                }

                /*
                 * if (!Household.ActiveHousehold.CanAddSpeciesToHousehold(actor.SimDescription.Species))
                 * {
                 *  greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(Localization.LocalizeString(actor.IsFemale, "Gameplay/Objects/RabbitHoles/ScienceLab:HouseholdTooLarge", new object[0x0]));
                 *  return false;
                 * }
                 * if (actor.OccultManager.HasAnyOccultType())
                 * {
                 *  return false;
                 * }
                 *
                 * if (actor.SimDescription.IsGhost)
                 * {
                 *  return false;
                 * }
                 */

                if (GameUtils.IsOnVacation())
                {
                    greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(Localization.LocalizeString(actor.IsFemale, "Ui/Tooltip/Vacation/GreyedoutTooltip:InteractionNotValidOnVacation", new object[0x0]));
                    return(false);
                }
                return(true);
            }
Пример #2
0
    /// <summary>
    /// should only be called once, when an experiment is accepted
    /// </summary>
    /// <param name="dad"></param>
    internal void Assign(ScienceLab dad)
    {
        Dad = dad;

        if (Data == null)
        {
            Data = new MinilabData();
        }
        Data.ScienceLabID  = dad.Data.ModuleInstanceID;
        Data.HoursRequired = dad.FlexData.CurrentBioExperiment.DurationDays * SunOrbit.MartianHoursPerDay;
    }
Пример #3
0
 public void Start()
 {
     if (Data != null)
     {
         foreach (var lab in ScienceLab.ActiveLabs)
         {
             if (lab.Data.ModuleInstanceID == Data.ScienceLabID)
             {
                 lab.Adopt(this);
                 Dad = lab;
             }
         }
         if (Dad == null)
         {
             UnityEngine.Debug.LogWarning("No science lab dad found on load!");
         }
     }
     SunOrbit.Instance.OnHourChange += Instance_OnHourChange;
 }
Пример #4
0
 public override string GetInteractionName(Sim actor, ScienceLab target, InteractionObjectPair iop)
 {
     return(base.GetInteractionName(actor, target, new InteractionObjectPair(sOldSingleton, target)));
 }
Пример #5
0
 // Use this for initialization
 protected override void Start()
 {
     base.Start();
     myLab = this.transform.root.GetComponent <ScienceLab>();
 }
Пример #6
0
            public override bool Test(Sim actor, ScienceLab target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if (actor.Inventory.Find<IVoucherCloneMe>() == null)
                {
                    return false;
                }

                /*
                if (!Household.ActiveHousehold.CanAddSpeciesToHousehold(actor.SimDescription.Species))
                {
                    greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(Localization.LocalizeString(actor.IsFemale, "Gameplay/Objects/RabbitHoles/ScienceLab:HouseholdTooLarge", new object[0x0]));
                    return false;
                }
                if (actor.OccultManager.HasAnyOccultType())
                {
                    return false;
                }

                if (actor.SimDescription.IsGhost)
                {
                    return false;
                }
                */

                if (GameUtils.IsOnVacation())
                {
                    greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(Localization.LocalizeString(actor.IsFemale, "Ui/Tooltip/Vacation/GreyedoutTooltip:InteractionNotValidOnVacation", new object[0x0]));
                    return false;
                }
                return true;
            }
Пример #7
0
 public override string GetInteractionName(Sim actor, ScienceLab target, InteractionObjectPair iop)
 {
     return base.GetInteractionName(actor, target, new InteractionObjectPair(sOldSingleton, target));
 }