sm64coopdx/autogen
djoslin0 24b92ecc2a
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows-opengl (push) Waiting to run
Build coop / build-windows-directx (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
Add a safer version of Lua's require() (#847)
I didn't add standard Lua require() because I've always been
afraid of it. I'm not sure we can guarantee which files it
will read (or not read).

Instead, here is a custom implementation. It should work more
or less the same and allow for more modular code.

For backwards compatibility reasons, all of the lua files in
the base mod folder will be loaded as in the past. Aka one at
a time and alphabetically.

However, now coop will look for Lua files in subdirectories
and will load them in when another Lua file calls require().

The file search order is more reasonable than normal Lua
require(). It will first look for files relative to the
currently running script. If there is no matching relative
file, it will pick from any Lua file that is in any of the
mod's subdirectories.

---------

Co-authored-by: MysterD <myster@d>
2025-06-14 19:49:07 +10:00
..
lua_constants Add type conversion functions (#839) 2025-06-09 18:35:57 +02:00
lua_definitions more copy paste errors 2025-06-13 22:18:51 +10:00
autogen.sh smlua event hooks refactor (#826) 2025-06-09 07:40:48 +10:00
common.py More math improvements (#820) 2025-05-29 02:52:31 +02:00
convert_constants.py smlua event hooks refactor (#826) 2025-06-09 07:40:48 +10:00
convert_functions.py smlua event hooks refactor (#826) 2025-06-09 07:40:48 +10:00
convert_structs.py Fix hand/foot pos and get any Mario part position (#816) 2025-05-21 23:52:04 +02:00
extract_constants.py allow Lua to manipulate displaylists and vertices (#675) 2025-02-27 14:27:55 +10:00
extract_display_lists.py make extract_display_lists.py consistent across platforms 2025-05-10 13:30:06 +10:00
extract_functions.py More Optimizations (#792) 2025-05-16 20:27:49 -04:00
extract_object_fields.py allow Lua to manipulate displaylists and vertices (#675) 2025-02-27 14:27:55 +10:00
extract_structs.py autogen implement structs with name after definition 2025-02-12 18:24:01 +10:00
gen_hooks.py Add a safer version of Lua's require() (#847) 2025-06-14 19:49:07 +10:00
gen_math.py Fix vec3f bugs (#837) 2025-06-05 19:44:09 +10:00
gen_sound.py Fixed Wario sounds pitch/speed 2022-02-15 00:51:19 -08:00
vec_types.py More math improvements (#820) 2025-05-29 02:52:31 +02:00