Skip to content

Commit

Permalink
Safety first
Browse files Browse the repository at this point in the history
  • Loading branch information
ThanatosGit committed Sep 30, 2023
1 parent c9334c0 commit 898d965
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion open_samus_returns_rando/files/levels/s020_area2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ function s020_area2.OnEnter_SetCheckpoint_001_Alpha_004()
end
function s020_area2.OnAlpha_004_Generated(_ARG_0_, _ARG_1_)
Scenario.SetMetroidSpawngroupOnCurrentScenario(_ARG_0_, "SG_Alpha_004")
if _ARG_1_ ~= nil and _ARG_1_.AI ~= nil then
if _ARG_1_ ~= nil and _ARG_1_.AI ~= nil then
-- _ARG_1_.AI:AddBossDoorUnlockedOnDeath("Door010")
_ARG_1_.AI.bPlaceholder = false
_ARG_1_.AI:AddBossCamera("CAM_Alpha")
Expand Down
11 changes: 7 additions & 4 deletions open_samus_returns_rando/files/templates/metroid_template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ function Metroid.RemoveMetroid(_ARG_0_)

CurrentScenario.currentMetroidSpawngroup = nil

Metroid.Pickups[Scenario.CurrentScenarioID][spawnGroupName].OnPickedUp()

-- TODO: This is only for tests
-- Game.SaveGame("checkpoint", "Bla", "ST_SG_Alpha_004_Out", true)
local scenario = Scenario.CurrentScenarioID
if scenario ~= nil and Metroid.Pickups ~= nil and
Metroid.Pickups[scenario] ~= nil and
Metroid.Pickups[scenario][spawnGroupName] ~= nil and
Metroid.Pickups[scenario][spawnGroupName].OnPickedUp ~= nil then
Metroid.Pickups[scenario][spawnGroupName].OnPickedUp()
end
else
GUI.LaunchMessage("Oops 2", "Metroid.Dummy", "")
end
Expand Down

0 comments on commit 898d965

Please sign in to comment.