Esempio n. 1
0
    public bool CanShow()
    {
        if (GreenHellGame.Instance.m_GameMode != GameMode.Story)
        {
            return(false);
        }
        if (ScenarioManager.Get().IsBoolVariableTrue("PlayerMechGameEnding"))
        {
            return(false);
        }
        if (ConsciousnessController.Get().IsActive())
        {
            return(false);
        }
        if (SleepController.Get().IsActive())
        {
            return(false);
        }
        if (InsectsController.Get().IsActive())
        {
            return(false);
        }
        if (InsectsController.Get().IsActive())
        {
            return(false);
        }
        if (SwimController.Get().IsActive())
        {
            return(false);
        }
        if (Player.Get().m_IsInAir)
        {
            return(false);
        }
        if (ChallengesManager.Get() && ChallengesManager.Get().IsChallengeActive())
        {
            return(false);
        }
        if (HUDReadableItem.Get().enabled)
        {
            return(false);
        }
        if (Player.Get().m_Animator.GetBool(Player.Get().m_CleanUpHash))
        {
            return(false);
        }
        if (Time.time - SwimController.Get().m_LastDisableTime < 0.5f)
        {
            return(false);
        }
        if (Player.Get().m_IsInAir)
        {
            return(false);
        }
        if (DeathController.Get().IsActive())
        {
            return(false);
        }
        if (ScenarioManager.Get().IsDreamOrPreDream())
        {
            return(false);
        }
        if (Inventory3DManager.Get().IsActive())
        {
            return(false);
        }
        if (CutscenesManager.Get().IsCutscenePlaying())
        {
            return(false);
        }
        if (SwimController.Get().IsActive())
        {
            return(false);
        }
        if (BodyInspectionController.Get().IsActive())
        {
            return(false);
        }
        if (HarvestingAnimalController.Get().IsActive())
        {
            return(false);
        }
        if (HarvestingSmallAnimalController.Get().IsActive())
        {
            return(false);
        }
        if (VomitingController.Get().IsActive())
        {
            return(false);
        }
        if (MapController.Get().IsActive())
        {
            return(false);
        }
        if (NotepadController.Get().IsActive())
        {
            return(false);
        }
        if (MudMixerController.Get().IsActive())
        {
            return(false);
        }
        if (MakeFireController.Get().IsActive())
        {
            return(false);
        }
        if (HUDWheel.Get().enabled)
        {
            return(false);
        }
        if (FPPController.Get().m_Dodge)
        {
            return(false);
        }
        if (GreenHellGame.IsPadControllerActive() && HUDItem.Get().m_Active)
        {
            return(false);
        }
        int shortNameHash = Player.Get().m_Animator.GetCurrentAnimatorStateInfo(1).shortNameHash;

        return(shortNameHash != this.m_MapWatchHideHash && shortNameHash != this.m_MapWatchIdleHash && shortNameHash != this.m_MapWatchShowHash && shortNameHash != this.m_MapZoomHash && shortNameHash != this.m_MapHideHash && shortNameHash != this.m_MapIdleHash && shortNameHash != this.m_ShowMapHash);
    }
Esempio n. 2
0
    protected override void Update()
    {
        base.Update();
        if (!this.m_IsInside)
        {
            return;
        }
        if (!DifficultySettings.ActivePreset.m_Insects)
        {
            return;
        }
        if (InsectsController.Get().IsActive())
        {
            return;
        }
        if (MakeFireController.Get().IsActive())
        {
            return;
        }
        if (HitReactionController.Get().IsActive())
        {
            return;
        }
        if (HarvestingAnimalController.Get().IsActive())
        {
            return;
        }
        if (MudMixerController.Get().IsActive())
        {
            return;
        }
        if (HarvestingSmallAnimalController.Get().IsActive())
        {
            return;
        }
        if (ConsciousnessController.Get().IsActive())
        {
            return;
        }
        if (DeathController.Get().IsActive())
        {
            return;
        }
        if (SleepController.Get().IsActive())
        {
            return;
        }
        if (Player.Get().m_Animator.GetBool(Player.Get().m_CleanUpHash))
        {
            return;
        }
        Item currentItem = Player.Get().GetCurrentItem(Hand.Right);

        if (currentItem && currentItem.m_Info.IsTorch() && ((Torch)currentItem).m_Burning)
        {
            return;
        }
        if (Player.Get().IsDead())
        {
            return;
        }
        if (InsectsSensor.m_LastTime == 0f || Time.time - InsectsSensor.m_LastTime > this.m_Cooldown)
        {
            if (CraftingManager.Get().IsActive())
            {
                CraftingManager.Get().Deactivate();
            }
            InsectsController.Get().m_Sensor = this;
            Player.Get().StartController(PlayerControllerType.Insects);
            InsectsSensor.m_LastTime = Time.time;
        }
    }
Esempio n. 3
0
    private void OnEnterState()
    {
        switch (this.m_State)
        {
        case MudMixer.State.WaitingForClay0:
            this.m_AshSlot.gameObject.SetActive(false);
            this.m_WaterSlot.gameObject.SetActive(false);
            this.m_Mud0.Reset();
            this.m_Mud0.gameObject.SetActive(true);
            this.m_Mud0.enabled = true;
            this.m_Mud1.gameObject.SetActive(false);
            this.m_Mud1.enabled = false;
            this.m_Ash.gameObject.SetActive(false);
            this.m_Ash.enabled = false;
            return;

        case MudMixer.State.WaitingForClay1:
            this.m_AshSlot.gameObject.SetActive(false);
            this.m_WaterSlot.gameObject.SetActive(false);
            this.m_Mud0.gameObject.SetActive(true);
            this.m_Mud0.enabled = false;
            this.m_Mud1.Reset();
            this.m_Mud1.gameObject.SetActive(true);
            this.m_Mud1.enabled = true;
            this.m_Ash.gameObject.SetActive(false);
            this.m_Ash.enabled = false;
            return;

        case MudMixer.State.WaitingForAsh:
            this.m_AshSlot.gameObject.SetActive(false);
            this.m_WaterSlot.gameObject.SetActive(false);
            this.m_Mud0.gameObject.SetActive(true);
            this.m_Mud0.enabled = false;
            this.m_Mud1.gameObject.SetActive(true);
            this.m_Mud1.enabled = false;
            this.m_Ash.Reset();
            this.m_Ash.gameObject.SetActive(true);
            this.m_Ash.enabled = true;
            return;

        case MudMixer.State.WaitingForWater:
            this.m_WaterAmount = 0f;
            HUDProcess.Get().RegisterProcess(this, "HUD_pourOut_water", this, true);
            this.m_AshSlot.gameObject.SetActive(false);
            this.m_WaterSlot.gameObject.SetActive(true);
            this.m_Mud0.gameObject.SetActive(true);
            this.m_Mud0.enabled = false;
            this.m_Mud1.gameObject.SetActive(true);
            this.m_Mud1.enabled = false;
            this.m_Ash.gameObject.SetActive(true);
            this.m_Ash.enabled = false;
            return;

        case MudMixer.State.Full:
            this.m_AshSlot.gameObject.SetActive(false);
            this.m_WaterSlot.gameObject.SetActive(false);
            this.m_Mud0.gameObject.SetActive(true);
            this.m_Mud0.enabled = false;
            this.m_Mud1.gameObject.SetActive(true);
            this.m_Mud1.enabled = false;
            this.m_Ash.gameObject.SetActive(true);
            this.m_Ash.enabled = false;
            HUDProcess.Get().UnregisterProcess(this);
            this.m_WaterAmount = 0f;
            return;

        case MudMixer.State.Mix:
            MudMixerController.Get().SetMixer(this);
            Player.Get().HideWeapon();
            Player.Get().StartController(PlayerControllerType.MudMixer);
            this.m_Sound.clip = this.m_MixingSound;
            this.m_Sound.Play();
            return;

        case MudMixer.State.Ready:
            this.m_Sound.Stop();
            this.m_AshSlot.gameObject.SetActive(false);
            this.m_WaterSlot.gameObject.SetActive(false);
            this.m_Mud0.gameObject.SetActive(false);
            this.m_Mud0.enabled = false;
            this.m_Mud1.gameObject.SetActive(false);
            this.m_Mud1.enabled = false;
            this.m_Ash.gameObject.SetActive(false);
            this.m_Ash.enabled = false;
            return;

        default:
            return;
        }
    }