Skip to content

Commit

Permalink
Ensure Gamma spawns regardless starting cc
Browse files Browse the repository at this point in the history
  • Loading branch information
dyceron committed Oct 9, 2023
1 parent 258208c commit ea45de3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion open_samus_returns_rando/files/levels/s025_area2b.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function s025_area2b.OnSubAreaChange(_ARG_0_, _ARG_1_, _ARG_2_, _ARG_3_, _ARG_4_
if _ARG_3_ ~= "PostVariaSuit" then
Game.SetSubAreaEnvironmentLocked(false, false, false)
end
if (_ARG_0_ == "collision_camera012" or _ARG_0_ == "collision_camera011") and _ARG_2_ == "collision_camera037" and not Scenario.ReadFromBlackboard("GammaIntroCutscenePlayed", false) then
if _ARG_2_ == "collision_camera037" and not Scenario.ReadFromBlackboard("GammaIntroCutscenePlayed", false) then
s025_area2b.LaunchFirstTimeGammaPresentation()
end
Scenario.OnSubAreaChange(_ARG_0_, _ARG_1_, _ARG_2_, _ARG_3_, _ARG_4_)
Expand Down
12 changes: 6 additions & 6 deletions open_samus_returns_rando/files/templates/metroid_template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ function Metroid.RemoveMetroid(_ARG_0_)
if spawnGroupName ~= nil then
-- GUI.LaunchMessage(spawnGroupName, "Metroid.Dummy", "")

local spawnGroup = Game.GetEntity(spawnGroupName)
local spawnGroup = Game.GetEntity(spawnGroupName)
if spawnGroup ~= nil and spawnGroup.SPAWNGROUP ~= nil then
spawnGroup.SPAWNGROUP:DisableSpawnGroup()
else
else
GUI.LaunchMessage("Oops 1" .. spawnGroupName, "Metroid.Dummy", "")
return
end

Scenario.WriteToBlackboard("entity_" .. spawnGroupName .. "_dead", "b", true)
Scenario.WriteToBlackboard("entity_" .. spawnGroupName .. "_deaths", "i", 1)
Scenario.WriteToBlackboard("entity_" .. spawnGroupName .. "_enabled", "b", false)

local count = Game.GetItemAmount(Game.GetPlayerName(), "ITEM_METROID_COUNT") + 1
Game.SetItemAmount(Game.GetPlayerName(), "ITEM_METROID_COUNT", count)
Game.IncrementMetroidTotalCount(0)
Expand All @@ -27,14 +27,14 @@ function Metroid.RemoveMetroid(_ARG_0_)

local scenario = Scenario.CurrentScenarioID
if scenario ~= nil and Metroid.Pickups ~= nil and
Metroid.Pickups[scenario] ~= 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()
Metroid.Pickups[scenario][spawnGroupName].OnPickedUp()
end
else
GUI.LaunchMessage("Oops 2", "Metroid.Dummy", "")
end
end

Metroid.Pickups = TEMPLATE("mapping")
Metroid.Pickups = TEMPLATE("mapping")

0 comments on commit ea45de3

Please sign in to comment.