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); }
/// <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; }
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; }
public override string GetInteractionName(Sim actor, ScienceLab target, InteractionObjectPair iop) { return(base.GetInteractionName(actor, target, new InteractionObjectPair(sOldSingleton, target))); }
// Use this for initialization protected override void Start() { base.Start(); myLab = this.transform.root.GetComponent <ScienceLab>(); }
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; }
public override string GetInteractionName(Sim actor, ScienceLab target, InteractionObjectPair iop) { return base.GetInteractionName(actor, target, new InteractionObjectPair(sOldSingleton, target)); }