Commit graph

85 commits

Author SHA1 Message Date
MysterD
def1122159 Allow toggling the false ledge grab fix 2023-06-11 13:00:11 -07:00
Isaac0-dev
05f4c42f81
add cancels to HOOK_BEFORE_PHYS_STEP allowing for custom step systems (#400)
* add cancels to HOOK_BEFORE_PHYS_STEP allowing for custom step systems

* give lua mods access to stepArg and nextPos from hanging and air step; fix a crash when m.floor is null
2023-05-31 21:10:06 -07:00
MysterD
18bf5847a2 Prevent rending of corrupted graphnodes, only run lua GC once per frame 2023-05-16 21:49:13 -07:00
MysterD
fa88a5aee0 Make certain GraphNodeObject fields mutable again 2023-05-16 00:05:26 -07:00
MysterD
2083242b66 Fixed several crashes and errors found in static analysis 2023-05-15 01:15:20 -07:00
PeachyPeach
3ab4c944ac
better kick/punch/trip, gp and flying detection (#388) 2023-05-09 15:38:29 -04:00
MysterD
1ee3fd1d13 Fixed ~240 possible crashes 2023-05-05 23:59:58 -07:00
MysterD
0a4dfd17a4 Re-ran autogen 2023-05-03 01:01:36 -07:00
Isaac0-dev
08d31b8255
give mods more control over animations (#369)
* give mods more control over animations

- added HOOK_ON_OBJECT_ANIM_UPDATE
- make some animation values mutable

* add to docs
2023-04-29 01:56:18 +02:00
MysterD
f2a8df7728 Made nametags mod interpolate names and health 2023-04-24 16:45:25 -07:00
PeachyPeach
df248e5139
Adding hazardType to HOOK_ALLOW_HAZARD_SURFACE; more loading info (#355) 2023-04-23 12:11:56 -04:00
MysterD
c71d3c564f Re-ran autogen 2023-04-20 01:28:42 -07:00
Isaac0-dev
bc7909c392
allow interact type to be 0 in hook_mario_action (#350)
* allow interact type to be 0 in hook_mario_action
2023-04-20 01:28:23 -07:00
MysterD
491a69549c Restore old version code 2023-04-20 00:51:34 -07:00
MysterD
42276e0efd Add lobby descriptions 2023-04-17 16:34:56 -07:00
MysterD
4566b7ee14 Ripped out discord network system, started re-adding invites 2023-04-15 19:53:34 -07:00
MysterD
0e1cda1b91 Ran autogen 2023-04-13 22:39:42 -07:00
MysterD
192d47aea0 Added FONT_TINY 2023-04-02 23:02:14 -07:00
MysterD
6fc711e440 Added smlua_text_utils_get_language() 2023-04-01 00:04:45 -07:00
MysterD
7df87d583e Fix crash when removing a sync objects and iterating at the same time 2023-03-27 20:25:35 -07:00
MysterD
b596cb2af2 Figure out a ping between every player, adjust resend rate based on it 2023-03-27 11:50:32 -07:00
Isaac0-dev
6cb1b2faec
Beta 32.0.1 (#325)
* patch for beta 32

* require the development flag for Lua profiler

* autogen
2023-03-26 01:15:28 -04:00
Agent X
1a86d46d95
Override envfx from Lua (#316)
* Override envfx from Lua

set_override_envfx(-1) to reset override

* Fix type mismatch
2023-03-23 14:46:15 -04:00
Agent X
53b8a2f8e6
Fix compilation warnings and stop demos when hosting (#313)
* [WIP] fix warnings

Committing now as is for Isaac to take a look at this.
Having issues with VERSION_TEXT

* Fix VERSION_TEXT crash and stop demos on host
2023-03-21 22:41:43 -04:00
Isaac0-dev
7e46ce4a21
fixes and other improvements (#309)
* HOOK_JOINED_GAME

* expose VERSION_TEXT, and two more adjusments

* show if a constant type is a string with autogen

* fix another blunder by that guy

* should use an or operator here

* fix frame limiter stuff
2023-03-21 19:43:29 -04:00
Agent X
751dfe61c7
Move everything over (#280) 2023-03-20 22:36:25 -04:00
Agent X
22952dda05
Expose sound_banks_enable/disable to Lua (#311) 2023-03-18 17:12:33 -04:00
PeachyPeach
1e175b5ce7
Make most used and useful features built-ins (#242)
* made all bools u8 for consistency with fixCollisionBugs
* preview blue coins + visible secrets
* preserve indexing
* star number
* hud cap timer
* red coins radar + secrets radar
* extended pause display
* autogen
* only sDynosBuiltinFuncs is sensitive to indexing
* rebased
2023-02-26 03:15:54 +01:00
Sunk
9ec75abc60
Add HOOK_BEFORE_SET_MARIO_ACTION (#253)
* Small quality of life changes

Disabled fixed collision in sm74 by default.
Popping should now completely set the popped player's speed to 0.

* Add HOOK_BEFORE_SET_MARIO_ACTION

Param: incoming action
Return: changes incoming action
If the return value is 1, prevent the action from happening entirely.
0 can't be used here since it'll break the title screen.

* Update hooks.md

* Revert "Small quality of life changes"

This reverts commit 05dd235cd0.
2023-02-22 20:28:23 -05:00
Isaac0-dev
baedae5412
rerun autogen (#291) 2023-02-22 00:56:30 -05:00
Agent X
ea7f0a11c2
Small improvements to HUD and new functions (#268)
* Small improvements to HUD and new functions

- Split HUD_DISPLAY_FLAG_CAMERA_AND_POWER into HUD_DISPLAY_FLAG_CAMERA and HUD_DISPLAY_FLAG_POWER
- Added hud_is_hidden()
- Added camera_is_frozen()
- Added extra sanity check to hud.c

* Re-add old flags

* Fixes and improvements

* Mod compatibility
2023-02-21 00:23:15 -05:00
Agent X
4aada40a62
area_create_warp_node and area_get_warp_node* (#270)
* area_get_warp_node*

- Added area_get_warp_node to Lua
- Added area_get_warp_node_from_params to Lua

* area_create_warp_node and warp constants

Here you go Isaac!

* Add object param

* Commits work again, pushing everything else
2023-02-20 21:47:32 -05:00
Isaac0-dev
3bc0b13e20
ACTIVE_FLAG_DORMANT (#281) 2023-02-18 23:45:13 -05:00
Agent X
3dcbd5908f
Expose version constants to lua (#264) 2023-02-08 10:42:16 -05:00
Agent X
acd65c7355
Add E_MODEL_SSL_TOX_BOX (#247) 2022-12-17 19:29:24 +01:00
SMS Alfredo
35bdaef094
Character Sound Hook (#223)
* Character Sound Hook

* The rest of autogen to be safe

* Indentation Fix

* Fix more indentation

* Get rid of unneeded auto gen junk

* Run autogen again

* Add HOOK_CHARACTER_SOUND to guide
2022-12-17 19:25:30 +01:00
Isaac0-dev
07ad5a55c5
add HOOK_OBJECT_SET_MODEL (#236)
* add HOOK_OBJECT_SET_MODEL
runs whenever a behaviour sets a model.
2022-11-30 00:37:43 -08:00
MysterD
b6b5b4f4e3 Add ability for mods to signal that a player will not be seen by enemies 2022-11-11 19:02:11 -08:00
Isaac0-dev
d806c2d8c2
add HOOK_ON_CHAT_MESSAGE (#220)
includes the message string and the mario state of the player
return false to prevent the message from showing (might be possible to make a chat flter with this?)
2022-10-30 17:34:50 -07:00
PeachyPeach
a8e397047a
CAP color; near/far warning fix (#214)
Added CAP color part; Player's cap no longer uses the SHIRT color
    Added METAL color as an alias of CAP color; Metal characters now uses the CAP color to tint the metal texture (was SHIRT color)
    Fixed the cap inside color (was HAIR color)
    Fixed the near/far warning
2022-10-30 17:30:40 -07:00
Sunk
97090abf28
Added HOOK_ALLOW_HAZARD_SURFACE and various fixes (#209)
* Fixed naming from ceil to cell

* Added HOOK_ON_QUICKSAND

* Modified hook and removed weird newlines

* Renamed hook and increased usage

HOOK_ALLOW_QUICKSAND -> HOOK_ALLOW_HAZARD_SURFACE
Now also works on lavaboost.
Suggestion by Agent X. May add this hook to the death barrier check.

* Autogen

* Fixed downwarping to quicksand upon popping

As a side effect though, Mario will no longer snap to the floor upon being popped.
2022-10-30 17:25:56 -07:00
Agent X
90dd2e47c5
Why weren't star door models exposed to Lua? (#217) 2022-10-25 13:28:02 -07:00
Agent X
1241c56ed9
Expose level_trigger_warp and related constants (#197) 2022-09-19 19:51:27 -07:00
Agent X
f726fb5d74
HOOK_ON_SCREEN_TRANSITION (#192) 2022-09-18 17:30:29 -07:00
Isaac0-dev
c7bdeef8d5
multiple improvements (#176) 2022-09-12 20:00:51 -07:00
Agent X
a1953afd1c
SURFACE_RAYCAST (#177)
* SURFACE_RAYCAST

* Exclude from camera collision
2022-09-12 19:56:24 -07:00
wRadion
44bbd23f83
Handle RM_Scroll_Texture and editor_Scroll_Texture behaviors from RM2C hacks (#173) 2022-08-25 17:46:33 -07:00
MysterD
b3923f0b5f Re-ran autogen 2022-08-07 15:26:32 -07:00
TheGag96
dc3ca7c76d
Arbitrary shirt, pants, glove colors + settings menu (#145)
* Support for more granular player colors

You can now configure RGB values for shirt, pants, gloves, and shoes.
Due to some limitations, configuring shoes does nothing at the moment.

* Remove paletteIndex and friends

Restructured and filled in some remaining code to account for that.

* Add Edit Palette panel to Player panel

* Change PlayerPalette contents to an enum-indexed array, remove shoes

This gets rid of all the hokey code doing switch cases on the
different parts.

* Fix goof with player model selection box

Should actually have affect now even if a custom palette is being used.

* Fix gap in player color display list commands

The extra space was leftover from when I was trying to get shoes
working. Forgot to clean it up.

* Standardize PlayerParts enum, including for lua constants autogen

* djui_panel_player.c: Properly hook sending palette changes on unpause

Editing the palette and then unpausing should send out the packet to
everyone with the new palette changes (and update the palette preset
selection box), but since we weren't hooking that situation before, it
would stay changed only for you. You would have had to press the Back
button for it to work right.

* Allow Lua mods to continue using `paletteIndex`, `overridePaletteIndex`

This lets mod code like this still work unchanged:

if s.team == 2 then
    np.overridePaletteIndex = 7
elseif s.team == 1 then
    np.overridePaletteIndex = 15
else
    np.overridePaletteIndex = np.paletteIndex
end

It's essentially faked, and would work strangely if the value of either
variable was inspected more closely directly. This should at least
handle the typical use case, though.

Every frame, `overridePaletteIndex` is checked to see if it was modified
from its previous value. If so, `overridePalette` is set to the preset
corresponding to the index. `paletteIndex` contains a special value that
when used to assign to `overridePaletteIndex`, it copies `palette` into
`overridePalette` to restore the real colors, which of course may not
follow the presets at all.

* characters.h: Pack `PlayerPalette` to eliminate size differences between computers

* mario_misc.c: Remove remaining "TODO GAG"
2022-08-07 15:13:19 -07:00
MysterD
618f468e06 Add HOOK_USE_ACT_SELECT ; increase MAX_AUDIO_OVERRIDE to 128 2022-08-04 01:12:16 -07:00