diff --git a/src/open_samus_returns_rando/files/custom/arachnus.lua b/src/open_samus_returns_rando/files/custom/arachnus.lua new file mode 100644 index 0000000..710174b --- /dev/null +++ b/src/open_samus_returns_rando/files/custom/arachnus.lua @@ -0,0 +1,14 @@ +Game.ImportLibrary("actors/characters/arachnus/scripts/arachnus_original.lc") +function Arachnus.main() + Game.AddSF(0.0, "Arachnus.RotatePickup", "") +end +function Arachnus.RotatePickup() + local springball = Game.GetEntity("LE_PowerUp_Springball") + if springball ~= nil then + if springball.vAng ~= V3D(0, 0 ,0) then + springball.vAng = V3D(0, 0, 0) + else + Game.AddSF(0.0, "Arachnus.RotatePickup", "") + end + end +end diff --git a/src/open_samus_returns_rando/files/romfs/actors/characters/arachnus/scripts/arachnus.lc b/src/open_samus_returns_rando/files/romfs/actors/characters/arachnus/scripts/arachnus.lc deleted file mode 100644 index b72a265..0000000 --- a/src/open_samus_returns_rando/files/romfs/actors/characters/arachnus/scripts/arachnus.lc +++ /dev/null @@ -1,29 +0,0 @@ -function Arachnus.main() - Game.AddSF(0.0, "Arachnus.RotatePickup", "") -end -function Arachnus.RotatePickup() - local springball = Game.GetEntity("LE_PowerUp_Springball") - if springball ~= nil then - if springball.vAng ~= V3D(0, 0 ,0) then - springball.vAng = V3D(0, 0, 0) - else - Game.AddSF(0.0, "Arachnus.RotatePickup", "") - end - end -end -function Arachnus.LaunchDamageSound(_ARG_0_) - if _ARG_0_ ~= nil then - Game.PlayEntitySound("actors/arachnus/arachnus_firevoice_0" .. math.random(2) .. ".wav", _ARG_0_.sName, 0.4, 500, 3000, 1.4) - end -end -function Arachnus.OnProjectileEntityCollision(_ARG_0_, _ARG_1_, _ARG_2_, _ARG_3_) - Game.PlayPosSound("actors/arachnus/arachnus_fireboom_01.wav", _ARG_1_, _ARG_2_, _ARG_3_, 1.2, 500, 1750, 1) -end -function Arachnus.OnProjectileScenarioCollision(_ARG_0_, _ARG_1_, _ARG_2_, _ARG_3_) - Game.PlayPosSound("actors/arachnus/arachnus_fireboom_01.wav", _ARG_1_, _ARG_2_, _ARG_3_, 1.1, 500, 1750, 1) -end -function Arachnus.OnDeath(_ARG_0_) - if Game.GetPlayer() ~= nil then - Game.GetPlayer().LIFE:SetInvulnerableWithReaction(false) - end -end diff --git a/src/open_samus_returns_rando/lua_editor.py b/src/open_samus_returns_rando/lua_editor.py index 9964bc4..d423729 100644 --- a/src/open_samus_returns_rando/lua_editor.py +++ b/src/open_samus_returns_rando/lua_editor.py @@ -293,6 +293,7 @@ def _add_replacement_files(self, editor: PatcherEditor, configuration: dict) -> scenario_lua_content += "\n" + self._progressive_models lua_util.replace_script_with_content(editor, "system/scripts/scenario", scenario_lua_content) + lua_util.replace_script(editor, "actors/characters/arachnus/scripts/arachnus", "custom/arachnus.lua") lua_util.replace_script(editor, "actors/props/samusship/scripts/samusship", "custom/ship.lua") lua_util.replace_script(editor, "actors/props/savestation/scripts/savestation", "custom/savestation.lua") lua_util.replace_script(editor, "actors/props/heatzone/scripts/heatzone", "custom/heatzone.lua")