Skip to content

Commit

Permalink
Merge branch 'main' into surface_connection
Browse files Browse the repository at this point in the history
  • Loading branch information
dyceron committed Sep 29, 2023
2 parents 9581172 + e2faf92 commit 585115d
Show file tree
Hide file tree
Showing 25 changed files with 656 additions and 489 deletions.
57 changes: 0 additions & 57 deletions open_samus_returns_rando/bmsld_add.py

This file was deleted.

5 changes: 0 additions & 5 deletions open_samus_returns_rando/files/custom_player.lua

This file was deleted.

14 changes: 14 additions & 0 deletions open_samus_returns_rando/files/custom_savestation.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Game.ImportLibrary("actors/props/savestation/scripts/savestation_original.lc")
function SaveStation.ShowDialogChoice(_ARG_0_, _ARG_1_)
Usable._oUsableObject = _ARG_0_
GUI.LaunchMessage(_ARG_1_, "Usable.OnDialogAccepted", "SaveStation.OnDialogDeclined")
end
function SaveStation.Dummy()
end
function SaveStation.WarpToStart()
Game.LoadScenario("c10_samus", Init.sStartingScenario, Init.sStartingActor, "samus", 1)
end
function SaveStation.OnDialogDeclined()
Usable._oUsableObject.USABLE:OnDialogDeclined()
GUI.LaunchMessage("Warp to Start?", "SaveStation.WarpToStart", " SaveStation.Dummy()")
end
14 changes: 14 additions & 0 deletions open_samus_returns_rando/files/custom_ship.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Game.ImportLibrary("actors/props/samusship/scripts/samusship_original.lc")
function SamusShip.ShowDialogChoice(_ARG_0_, _ARG_1_)
Usable._oUsableObject = _ARG_0_
GUI.LaunchMessage(_ARG_1_, "Usable.OnDialogAccepted", "SamusShip.OnDialogDeclined")
end
function SamusShip.Dummy()
end
function SamusShip.WarpToStart()
Game.LoadScenario("c10_samus", Init.sStartingScenario, Init.sStartingActor, "samus", 1)
end
function SamusShip.OnDialogDeclined()
Usable._oUsableObject.USABLE:OnDialogDeclined()
GUI.LaunchMessage("Warp to Start?", "SamusShip.WarpToStart", " SamusShip.Dummy()")
end
21 changes: 21 additions & 0 deletions open_samus_returns_rando/files/doors.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Doors = {}

function Doors.Dummy()
end
function Doors.RemoveDoors(_ARG_0_)
local actor_name = _ARG_0_.sName
-- GUI.LaunchMessage(actor_name, "Doors.Dummy", "")
local ending = string.sub(actor_name, -2)
if ending == "_o" then
actor_name = string.sub(actor_name, 0, -3)
end

if Game.GetEntity(actor_name) ~= nil then
Game.DeleteEntity(actor_name)
Scenario.WriteToBlackboard("entity_" .. actor_name .. "_dead", "b", true)
end
if Game.GetEntity(actor_name .. "_o") ~= nil then
Game.DeleteEntity(actor_name .. "_o")
Scenario.WriteToBlackboard("entity_" .. actor_name .. "_o_dead", "b", true)
end
end
30 changes: 15 additions & 15 deletions open_samus_returns_rando/files/levels/s030_area3.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,21 +147,21 @@ function s030_area3.OnGamma_005_C_Generated(_ARG_0_, _ARG_1_)
_ARG_1_.AI:AddElectricMinesLogicPath(2, "PATH_Gamma005_C_mines_002")
_ARG_1_.AI:AddElectricMinesLogicPath(2, "PATH_Gamma005_C_mines_003")
_ARG_1_.AI:AddIdleLogicPath("PATH_Gamma005_C_Idle")
Gamma.SetArenaLife(_ARG_0_, _ARG_1_)
if Gamma.GetNumValveUsed(_ARG_0_) == 0 then
_ARG_1_.AI:AddValve("LE_Valve_Gamma_005_C_001")
_ARG_1_.AI:AddValve("LE_Valve_Gamma_005_C_002")
_ARG_1_.AI:AddBlackboardParam("fGotoValveLifePct", 0.6)
_ARG_1_.AI:AddBlackboardParam("fGotoValveTime", 60)
_ARG_1_.AI:AddBlackboardParam("fGotoValveSamusLife", 99)
end
if Gamma.GetNumValveUsed(_ARG_0_) == 1 then
_ARG_1_.AI:AddValve("LE_Valve_Gamma_005_C_001")
_ARG_1_.AI:AddValve("LE_Valve_Gamma_005_C_002")
_ARG_1_.AI:AddBlackboardParam("fGotoValveLifePct", 0.3)
_ARG_1_.AI:AddBlackboardParam("fGotoValveTime", 90)
_ARG_1_.AI:AddBlackboardParam("fGotoValveSamusLife", 99)
end
-- Gamma.SetArenaLife(_ARG_0_, _ARG_1_)
-- if Gamma.GetNumValveUsed(_ARG_0_) == 0 then
-- _ARG_1_.AI:AddValve("LE_Valve_Gamma_005_C_001")
-- _ARG_1_.AI:AddValve("LE_Valve_Gamma_005_C_002")
-- _ARG_1_.AI:AddBlackboardParam("fGotoValveLifePct", 0.6)
-- _ARG_1_.AI:AddBlackboardParam("fGotoValveTime", 60)
-- _ARG_1_.AI:AddBlackboardParam("fGotoValveSamusLife", 99)
-- end
-- if Gamma.GetNumValveUsed(_ARG_0_) == 1 then
-- _ARG_1_.AI:AddValve("LE_Valve_Gamma_005_C_001")
-- _ARG_1_.AI:AddValve("LE_Valve_Gamma_005_C_002")
-- _ARG_1_.AI:AddBlackboardParam("fGotoValveLifePct", 0.3)
-- _ARG_1_.AI:AddBlackboardParam("fGotoValveTime", 90)
-- _ARG_1_.AI:AddBlackboardParam("fGotoValveSamusLife", 99)
-- end
end
end
function s030_area3.OnEnter_Gamma_005_Dead()
Expand Down
38 changes: 20 additions & 18 deletions open_samus_returns_rando/files/levels/s050_area5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,7 @@ function s050_area5.SetupDebugGameBlackboard()
Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_SPECIAL_ENERGY_PHASE_DISPLACEMENT", "f", 0)
end
function s050_area5.InitFromBlackboard()
Game.SetSubAreaCurrentSetup("collision_camera_AfterChase", "AfterChase", true, false)
Game.SetSubAreaCurrentSetup("collision_camera_AfterChase_001", "AfterChase", true, false)
Game.SetSubAreaCurrentSetup("collision_camera_AfterChase_002", "AfterChase", true, false)
Game.SetSubAreaCurrentSetup("collision_camera_AfterChase_003", "AfterChase", true, false)
Game.SetSubAreaCurrentSetup("collision_camera_BeforeChase1", "AfterChase", true, false)
Game.SetSubAreaCurrentSetup("collision_camera_BeforeChase2", "AfterChase", true, false)
Game.SetSubAreaCurrentSetup("collision_camera_BeforeChase3", "AfterChase", true, false)
for _FORV_4_, _FORV_5_ in pairs({
"SpawnGroup025",
"SpawnGroup039",
"SpawnGroup040"
}) do
print(_FORV_5_)
if Game.GetEntity(_FORV_5_) ~= nil then
Game.GetEntity(_FORV_5_).SPAWNGROUP:EnableSpawnGroup()
end
end
s050_area5.SetAfterChaseSubAreaSetup()
s050_area5.SetLocationTanksAfterChase()
if Game.GetEntity("LE_Event_0501") ~= nil and Scenario.ReadFromBlackboard("SpecialEvent0501Launched") then
Game.GetEntity("LE_Event_0501"):Disable()
Expand Down Expand Up @@ -637,11 +621,29 @@ function s050_area5.OnManicMinerBotChaseCutsceneStart()
end
function s050_area5.OnManicMinerBotChaseCutsceneEnd()
Game.SetPlayerInputEnabled(true, false)
Game.LoadScenario("c10_samus", Init.sStartingScenario, "SPG_ManicMinerBotHidden", "samus", 1)
end
function s050_area5.SetAfterChaseSubAreaSetup()
Game.SetSubAreaCurrentSetup("collision_camera_AfterChase", "AfterChase", true, false)
Game.SetSubAreaCurrentSetup("collision_camera_AfterChase_001", "AfterChase", true, false)
Game.SetSubAreaCurrentSetup("collision_camera_AfterChase_002", "AfterChase", true, false)
Game.SetSubAreaCurrentSetup("collision_camera_AfterChase_003", "AfterChase", true, false)
Game.SetSubAreaCurrentSetup("collision_camera_BeforeChase1", "AfterChase", true, false)
Game.SetSubAreaCurrentSetup("collision_camera_BeforeChase2", "AfterChase", true, false)
Game.SetSubAreaCurrentSetup("collision_camera_BeforeChase3", "AfterChase", true, false)
for _FORV_4_, _FORV_5_ in pairs({
"SpawnGroup025",
"SpawnGroup039",
"SpawnGroup040"
}) do
print(_FORV_5_)
if Game.GetEntity(_FORV_5_) ~= nil then
Game.GetEntity(_FORV_5_).SPAWNGROUP:EnableSpawnGroup()
end
end
end
function s050_area5.SetLocationTanksAfterChase()
if Scenario.ReadFromBlackboard("ChaseFinished", false) then
if Scenario.ReadFromBlackboard("ChaseFinished", true) then
Game.GetEntity("LE_Item_003").vPos = Game.GetLandmarkPosition("LM_TankPosition_AfterChase")
Game.GetEntity("LE_Item_010").vPos = Game.GetLandmarkPosition("LM_TankPosition_AfterChase001")
end
Expand Down
Loading

0 comments on commit 585115d

Please sign in to comment.