Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ThanatosGit committed Dec 27, 2023
1 parent f7274d8 commit e4cfdee
Show file tree
Hide file tree
Showing 25 changed files with 529 additions and 452 deletions.
3 changes: 3 additions & 0 deletions src/open_samus_returns_rando/files/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
levels/*.lc
custom/*.lc
pickups/*.lc
8 changes: 0 additions & 8 deletions src/open_samus_returns_rando/files/templates/custom_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ Init.iNumRandoTextBoxes = TEMPLATE("textbox_count")
Init.sThisRandoIdentifier = TEMPLATE("configuration_identifier")
Init.tBoxesSeen = 0

Game.LogWarn(0, "Inventory:")
for k, v in pairs(Init.tNewGameInventory) do
Game.LogWarn(0, tostring(k) .. " = " .. tostring(v))
end

function Init.InitGameBlackboard()
Blackboard.ResetWithExceptionList({
"GAME_PROGRESS"
Expand Down Expand Up @@ -69,7 +64,6 @@ end

function Init.InitNewGame(arg1, arg2, arg3, arg4, arg4)
Init.tBoxesSeen = 0
Game.LogWarn(0, string.format("Will start Game - %s / %s / %s / %s", tostring(arg1), tostring(arg2), tostring(arg3), tostring(arg4)))
Game.LoadScenario("c10_samus", Init.sStartingScenario, Init.sStartingActor, "samus", 1)
if Init.bRevealMap then
Game.AddGUISF(0.0, Game.ScanVisitDiscoverEverything, "", "")
Expand All @@ -78,8 +72,6 @@ function Init.InitNewGame(arg1, arg2, arg3, arg4, arg4)

Game.SetForceSkipCutscenes(true)

Game.LogWarn(0, "Finished modded system/init.lc")

ALL_SCENARIOS = {
"s000_surface",
"s010_area1",
Expand Down
19 changes: 17 additions & 2 deletions src/open_samus_returns_rando/files/templates/metroid_template.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Game.ImportLibrary("actors/items/randomizer_powerup/scripts/randomizer_powerup.lua", false)

Game.ImportLibrary("actors/items/randomizerpowerup/scripts/randomizerpowerup.lua", false)
Metroid = Metroid or {}
function Metroid.Dummy()
end
Expand Down Expand Up @@ -66,6 +65,22 @@ function Metroid.RemoveMetroid(_ARG_0_)
Metroid.Pickups[scenario][spawnGroupName].OnPickedUp ~= nil then
Metroid.Pickups[scenario][spawnGroupName].OnPickedUp()
end

if scenario == nil then
GUI.LaunchMessage("Oops 1", "Metroid.Dummy", "")
end
if Metroid.Pickups == nil then
GUI.LaunchMessage("Oops 2", "Metroid.Dummy", "")
end
if Metroid.Pickups[scenario] == nil then
GUI.LaunchMessage("Oops 3", "Metroid.Dummy", "")
end
if Metroid.Pickups[scenario][spawnGroupName] == nil then
GUI.LaunchMessage("Oops 4", "Metroid.Dummy", "")
end
if Metroid.Pickups[scenario][spawnGroupName].OnPickedUp == nil then
GUI.LaunchMessage("Oops 5", "Metroid.Dummy", "")
end
Game.SetInGameMusicState("RELAX")
if not CurrentScenario.isMultiGamma then
Game.SaveGame("checkpoint", "AfterNewAbilityAcquired", "", true)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
T__name__T = {}
setmetatable(T__name__T, {__index = TEMPLATE("parent")})
Game.ImportLibrary(TEMPLATE("parent_lua"), false)
function T__name__T.main()
end
function T__name__T.OnPickedUp()
Expand Down
Loading

0 comments on commit e4cfdee

Please sign in to comment.