From b095f6d382c943e81ba6ea603e8ac4a4b74a00c1 Mon Sep 17 00:00:00 2001 From: dyceron <38679103+dyceron@users.noreply.github.com> Date: Wed, 10 Jul 2024 01:29:55 -0400 Subject: [PATCH] Disable low poly Samus if reloading from checkpoint during boss fight (#406) * Disable low poly Samus if reloading from checkpoint after starting boss * Disable low poly when exiting the boss scenarios For reloading save or warp to start in another scenario * Fix names --- src/open_samus_returns_rando/files/levels/s070_area7.lua | 2 ++ src/open_samus_returns_rando/files/levels/s100_area10.lua | 2 ++ src/open_samus_returns_rando/files/levels/s110_surfaceb.lua | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/open_samus_returns_rando/files/levels/s070_area7.lua b/src/open_samus_returns_rando/files/levels/s070_area7.lua index d276783..c84c77b 100644 --- a/src/open_samus_returns_rando/files/levels/s070_area7.lua +++ b/src/open_samus_returns_rando/files/levels/s070_area7.lua @@ -93,6 +93,7 @@ s070_area7.tDNAScanLandmarks = { function s070_area7.InitFromBlackboard() Game.SetSubAreaCurrentSetup("collision_camera_037", "Omega_Enabled", true) Scenario.WriteToBlackboard("OmegaDiscovered", "b", true) + s070_area7.SetLowModelsVisibility(false) if Blackboard.GetProp("s070_area7", "entity_LE_HazarousPool_001_enabled") == nil then Game.GetEntity("LE_HazarousPool_001").HAZAROUSPOOL:Activate(true) Game.GetEntity("LE_HazarousPool_002").HAZAROUSPOOL:Activate(false) @@ -107,6 +108,7 @@ end function s070_area7.OnReloaded() end function s070_area7.OnExit() + s070_area7.SetLowModelsVisibility(false) end function s070_area7.OnEnter_ActivationDNA_001() -- Game.OnDNAMechApproached("LE_ChozoUnlockAreaDNA_001", 1) diff --git a/src/open_samus_returns_rando/files/levels/s100_area10.lua b/src/open_samus_returns_rando/files/levels/s100_area10.lua index bd150b8..2811742 100644 --- a/src/open_samus_returns_rando/files/levels/s100_area10.lua +++ b/src/open_samus_returns_rando/files/levels/s100_area10.lua @@ -77,6 +77,7 @@ function s100_area10.InitFromBlackboard() Game.DisableEntity("LE_Baby_Hatchling") Game.DisableTrigger("TG_MetroidRadar") Game.GetEntity("LE_RandoDNA").USABLE:Activate(false) + s100_area10.SetLowModelsVisibility(false) if Game.GetEntity("LE_ValveQueen") ~= nil then if Blackboard.GetProp("DEFEATED_ENEMIES", "Metroid") ~= nil and s100_area10.iNumMetroids == Blackboard.GetProp("DEFEATED_ENEMIES", "Metroid") then Game.GetEntity("LE_ValveQueen").MODELUPDATER:SetMeshVisible("Valve", false) @@ -100,6 +101,7 @@ end function s100_area10.OnReloaded() end function s100_area10.OnExit() + s100_area10.SetLowModelsVisibility(false) end function s100_area10.OnEnter_ActivationTeleport_10_01() Game.OnTeleportApproached("LE_Teleporter_10_01") diff --git a/src/open_samus_returns_rando/files/levels/s110_surfaceb.lua b/src/open_samus_returns_rando/files/levels/s110_surfaceb.lua index 4f0fc72..585d13a 100644 --- a/src/open_samus_returns_rando/files/levels/s110_surfaceb.lua +++ b/src/open_samus_returns_rando/files/levels/s110_surfaceb.lua @@ -60,6 +60,7 @@ function s110_surfaceb.ElevatorSetTarget(_ARG_0_) GUI.ElevatorSetTarget("s000_surface_elevator", false) end function s110_surfaceb.InitFromBlackboard() + s110_surfaceb.SetLowModelsVisibility(false) end function s110_surfaceb.OnReloaded() end @@ -85,6 +86,7 @@ function s110_surfaceb.InitializeRidleyStorms() end end function s110_surfaceb.OnExit() + s110_surfaceb.SetLowModelsVisibility(false) end function s110_surfaceb.RecoverEnergy() if Game.GetPlayer() ~= nil then