Skip to content

Commit

Permalink
Remove Mach's ring attraction
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiskster committed Aug 22, 2024
1 parent 94d97cb commit ab179eb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
20 changes: 20 additions & 0 deletions src/Lua/Compatibility/C_Mach.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-- Mach, get a better modding environment.

local oldMT = userdataMetatable("mobj_t")
local oldIndex = oldMT.__index

oldMT.__index = function(mobj, field)
if field ~= "mach_ringAttract"
or not (skins["mach"] or GT_PTSPICER) then
return oldIndex(mobj, field)
else
if (mobj.type == MT_FLINGRING
or mobj.type == MT_FLINGCOIN)
and not mobj.fuse then
mobj.fuse = 12
end

mobj.target = nil
return false
end
end
3 changes: 2 additions & 1 deletion src/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,5 @@ dofile "Exit Signs/exitsign_init.lua"
dofile "Exit Signs/exitsign_thinkers.lua"

dofile "Compatibility/C_Surge.lua"
dofile "Compatibility/C_Skip.lua"
dofile "Compatibility/C_Skip.lua"
dofile "Compatibility/C_Mach.lua"

0 comments on commit ab179eb

Please sign in to comment.