Commit Graph

246 Commits (f611755f25aede3873cfd2476143f27a4fe7e111)

Author SHA1 Message Date
MysterD 103e184270 Make gMarioStates->controller immutable in Lua 2023-04-01 17:16:18 -07:00
MysterD ce46d38417 Added smlua_text_utils_get_language() 2023-04-01 00:04:45 -07:00
MysterD 2fa5d68260 Fix crash when removing a sync objects and iterating at the same time 2023-03-27 20:25:35 -07:00
MysterD c1322b7aa1 Figure out a ping between every player, adjust resend rate based on it 2023-03-27 11:50:32 -07:00
Isaac0-dev ac6f2b2ad0 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 fe61e50af4 Show players on star select toggle (#321)
* Show players on star select toggle

* Make only toggleable by mods

* Allow player list to also be disabled
2023-03-23 21:12:26 -04:00
Agent X 3d80dc7f16 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 2d10c50ccd Make fixed collision rounded corners toggleable (#315) 2023-03-22 21:02:43 -04:00
Agent X 05687b838e 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 5911cc4d18 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 33585f00ea Move everything over (#280) 2023-03-20 22:36:25 -04:00
Agent X ad7a632115 get_ttc_speed_setting and set_ttc_speed_setting (#307) 2023-03-20 20:20:11 -04:00
Agent X 89724f42c7 Merge pull request #304 from Agent-11/server-settings
Add gServerSettings to Lua manual tables
2023-03-20 20:00:21 -04:00
Agent X 7525c58e9f Merge pull request #310 from Agent-11/time
get_time()
2023-03-20 19:59:31 -04:00
Agent X deb6ab7804 Expose sound_banks_enable/disable to Lua (#311) 2023-03-18 17:12:33 -04:00
Agent X f0b7751b4d get_time() 2023-03-14 20:53:23 -04:00
Agent X 92141488ea Add gServerSettings to Lua manual tables 2023-03-07 17:46:09 -05:00
Isaac0-dev 5b1b20a0ae bring back the ability to lose your cap (#229)
* bring back the ability to lose your cap

* run autogen and add "cap" to the mario states guide

* fix some indentation
2023-03-03 01:46:46 -05:00
PeachyPeach 666009f610 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 71a4196caf 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 05dd235cd0e3633bf1da48bc2f9f0b8a3db087ee.
2023-02-22 20:28:23 -05:00
Isaac0-dev 1c5cadcce2 rerun autogen (#291) 2023-02-22 00:56:30 -05:00
Agent X fb54adfd90 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 083dc1a037 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 d32e4c7997 ACTIVE_FLAG_DORMANT (#281) 2023-02-18 23:45:13 -05:00
Isaac0-dev 4e104aeb64 expose course_is_main_course() to Lua (#282) 2023-02-18 16:23:51 -05:00
Isaac0-dev 654bc4472a allow mods to hide and move shadows for small objects (#257) 2023-02-18 16:06:03 -05:00
Agent X 17c9b1d5d5 Expose Paintings to Lua (#279)
* Expose paintings to Lua

* Make some "dangerous" fields immutable

I just thought being able to edit paintings IDs from Lua was a little bit too much.
2023-02-16 18:54:38 -05:00
Agent X 2e4f1aa3d6 Add ' and " to gTextures (#273) 2023-02-15 19:45:11 -05:00
Isaac0-dev 04e7c3b99b add a way to create/modify whirlpools (#267) 2023-02-08 16:40:41 -05:00
Agent X 659552fc7b Improvements and optional tweaks (#263)
- Added visibleToEnemies to invisible fields
- Added cur_obj_set_billboard_if_vanilla_cam() which makes trees only billboard if free camera is off
- Added RespawnShellBoxes to gBehaviorValues
- Added pauseExitAnywhere to gLevelValues
- Disabled the power meter chime playing on the main menu whenever disconnecting from a server with low health
2023-02-08 10:51:07 -05:00
Agent X 0f8a53487d Expose version constants to lua (#264) 2023-02-08 10:42:16 -05:00
Isaac0-dev fe02152649 Give Lua mods access to a form of level script preprocessing (#258)
* Give Lua mods access to a form of level script preprocessing

* Disable acts setting
2023-01-31 07:24:56 -05:00
Prince Frizzy 3f78bf00ff Add support for custom cap sequences. (#250) 2023-01-31 05:55:18 -05:00
PeachyPeach 15d1ca06cb added new mods to default; removed visibleToEnemies from lua (#245) 2022-12-17 19:32:55 +01:00
Agent X e743e32787 Add E_MODEL_SSL_TOX_BOX (#247) 2022-12-17 19:29:24 +01:00
SMS Alfredo 3a7034c4ed 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 b2e57d4ad3 make fixCollisionBugs an integer again (2) (#241) 2022-11-30 00:44:49 -08:00
Isaac0-dev 2b22b3520f 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
Prince Frizzy d16468b37e A bunch of LUA autogen additions. (#235)
* A bunch of LUA autogen additions.
- Add support for Vec4f, Vec4s and Mat4 in the autogen.
- Improve error messages for improper argument counts
- Added support for more pointer types in the autogen.

* Fix offsets in sMat4Fields.

* autogen: Rework this at the request of DJ.
2022-11-30 00:37:12 -08:00
wRadion 2b81b45272 Fixed Vanish floors/ceilings (non-wall surfaces) (#225)
In the vanilla game, vanish does only work with walls specifically, and not floors and ceilings. This is because the check for vanish surfaces was only implemented with the walls. So I simply pasted the same code but with the floors and the ceilings.
2022-11-18 18:39:17 -08:00
Isaac0-dev e8f4b41ac3 Make fixCollisionBugs an integer again (#232)
This is for mod compatibility.
2022-11-14 18:16:17 -05:00
Prince Frizzy 12b9fea632 Add some new LUA helper functions and fix some bugs. (#230)
- Add new functions for objects, Feel free to flesh some out if need be.
- Fix long-standing issue with our LUA garbage collection, It will now run after all our hooks do to prevent buildup which causes lag.
2022-11-12 05:01:50 -08:00
MysterD 4e35b9c4d4 Add ability for mods to signal that a player will not be seen by enemies 2022-11-11 19:02:11 -08:00
SMS Alfredo b4ea13f57d Sample Stop Functions (#224)
Adds in bassh_stop_sample for source and audio_sample_stop for Lua. These functions immediately stop whatever audio the specified sample is playing.

If used in tandem with #223, this allows you to create custom character voice clips without them ever overlapping with each other.
2022-11-02 19:51:34 -07:00
PeachyPeach 340aedd660 djui_hud_render_texture_tile[_interpolated]; increased GFX pool and main memory pool (#211)
djui_hud_render_texture_tile: allows user to draw a part of a texture instead of the whole texture (tilesets)
    increased GFX pool size from 512kB to 4MB
    increased main memory pool size from ~11MB to 32MB
2022-11-02 19:45:20 -07:00
Isaac0-dev 32e68a81e2 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 86eb22b6de 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 2e41525ea3 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 80cda3546e Why weren't star door models exposed to Lua? (#217) 2022-10-25 13:28:02 -07:00
Isaac0-dev e89349318d just a few more improvements (#207)
Add get_dialog_box_state
    Prevent some attacks from registering as pvp attacks.
    Clean up all cases of camera.lua
    Put gLastCollectedStarOrKey in a better spot.
    Clean up my moderator code a bit, changing gIsModerator to boolean.
    Brang back kicked, banned and full party messages.
    Fixed a warning on older compilers like raspberry pi's and use configAmountofPlayers instead of MAX_PLAYERS
    Fixed compiling with the flag DISCORD_SDK off.
    Added "Fixed Collisions" to the debug menu.
    Added HMC, CCM, RR, BITDW, PSS and TTC to the main menu options.
    Fix my own oversight; Prevent the port from being duplicated in the join menu. (temporary fix)
    Hopefully bring back the crash handler on windows by not checking for termination signals on windows
2022-10-18 15:34:46 -07:00