Expose a bunch of functions to Lua
Exposes P_CheckSkyHit
, P_IsLocalPlayer
, P_GivePlayerSpheres
, P_DoFiring
, P_DoSpinDashDust
, P_DoSpinAbility
, P_PlayerShieldThink
, P_DoJumpStuff
, P_DoTailsOverlay
, P_DoMetalJetFume
, and P_TouchSpecialThing
to Lua while adding in P_DoFollowMobj
as well.
P_CheckSkyHit
has been modified slightly to work in Lua. P_TouchSpecialThing
also gets a quick fix for the blue sphere collection effect not being applied to flung spheres.
This merge request has been tested to make sure every function works. You can test using this wad and this exe if you want. The Lua in the wad makes spindash dust appear when above run speed on the ground (P_DoSpinDashDust
), allows you to do the homing thok and spin as any character with Custom 1 (P_DoJumpStuff
/P_DoSpinAbility
), and lets you throw fireballs whenever that can collect most of SRB2's collectables using Custom 2 (P_DoFiring
/P_TouchSpecialThing
). Sonic also gets his thok overwritten by any shield abilities, just like how shields work in S3K and Mania (P_PlayerShieldThink
). Amy is given a fake followmobj in the form of Tails' tails that's colored emerald (P_DoFollowMobj
/P_DoTailsOverlay
). Every character is also given a form of Metal's jet fume that tracks your movement direction (P_DoFollowMobj
/P_DoMetalJetFume
). The Lua also prints whenever an objects touches a sky line (P_CheckSkyHit
). If the object is a player or a local player, the print message will change and you will be given a blue sphere (P_IsLocalPlayer
/P_GivePlayerSpheres
).