protected override void OnStopWork(Worker worker)
 {
     operational.SetActive(false, false);
     if (worker != null)
     {
         if (jetSuitTank != null && !jetSuitTank.IsEmpty())
         {
             worker.RemoveTag(GameTags.JetSuitOutOfFuel);
         }
         if (leadSuitTank != null)
         {
             if (!leadSuitTank.IsEmpty())
             {
                 worker.RemoveTag(GameTags.SuitBatteryOut);
             }
             if (!leadSuitTank.NeedsRecharging())
             {
                 worker.RemoveTag(GameTags.SuitBatteryLow);
             }
         }
     }
     suitTank     = null;
     jetSuitTank  = null;
     leadSuitTank = null;
 }
    public void DoPostConfigure(GameObject go)
    {
        SuitTank suitTank = go.AddComponent <SuitTank>();

        suitTank.underwaterSupport = true;
        suitTank.element           = "Oxygen";
        suitTank.amount            = 11f;
        go.GetComponent <KPrefabID>().AddTag(GameTags.Clothes,false);
    }
        protected override void OnStartWork(Worker worker)
        {
            SetWorkTime(float.PositiveInfinity);
            var suit = worker.GetComponent <MinionIdentity>().GetEquipment().GetAssignable(Db.Get().AssignableSlots.Suit);

            if (suit != null)
            {
                suitTank     = suit.GetComponent <SuitTank>();
                jetSuitTank  = suit.GetComponent <JetSuitTank>();
                leadSuitTank = suit.GetComponent <LeadSuitTank>();
            }
            operational.SetActive(true, false);
            elapsedTime = 0;
        }
    public bool IsOxygenTankAboveMinimumLevel()
    {
        KPrefabID storedOutfit = GetStoredOutfit();

        if ((UnityEngine.Object)storedOutfit != (UnityEngine.Object)null)
        {
            SuitTank component = storedOutfit.GetComponent <SuitTank>();
            if ((UnityEngine.Object)component == (UnityEngine.Object)null)
            {
                return(true);
            }
            return(component.PercentFull() >= TUNING.EQUIPMENT.SUITS.MINIMUM_USABLE_SUIT_CHARGE);
        }
        return(false);
    }
Esempio n. 5
0
    public void DoPostConfigure(GameObject go)
    {
        SuitTank suitTank = go.AddComponent <SuitTank>();

        suitTank.element  = "Oxygen";
        suitTank.capacity = 75f;
        go.AddComponent <HelmetController>();
        KPrefabID component = go.GetComponent <KPrefabID>();

        component.AddTag(GameTags.Clothes, false);
        component.AddTag(GameTags.PedestalDisplayable, false);
        component.AddTag(GameTags.AirtightSuit, false);
        Storage storage = go.AddOrGet <Storage>();

        storage.SetDefaultStoredItemModifiers(Storage.StandardInsulatedStorage);
        storage.showInUI = true;
        go.AddOrGet <AtmoSuit>();
        go.AddComponent <SuitDiseaseHandler>();
    }
Esempio n. 6
0
            public static bool Prefix(SuitLocker __instance)
            {
                if (OxygenNotNeededConfigChecker.ForceLoad || CustomGameSettings.Instance.GetCurrentQualitySetting(OxygenNotNeededPatches.WorldRequiresOxygen).id == "Enabled")
                {
                    KPrefabID storedOutfit = __instance.GetStoredOutfit();
                    if ((UnityEngine.Object)storedOutfit == (UnityEngine.Object)null)
                    {
                        return(false);
                    }

                    SuitTank component = storedOutfit.GetComponent <SuitTank>();
                    component.amount = component.capacity;
                    return(false);
                }
                else
                {
                    return(true);
                }
            }