sm64coopdx/data
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
..
behavior_data.c Fix macOS compile errors and warnings [build] 2025-05-22 08:48:05 -04:00
behavior_table.c Basic Vertex Point Lighting Engine (#716) 2025-03-27 16:36:02 -04:00
dynos.c.h Add a safer version of Lua's require() (#847) 2025-06-14 19:49:07 +10:00
dynos.cpp.h Add a safer version of Lua's require() (#847) 2025-06-14 19:49:07 +10:00
dynos.h Gfx/Vtx improvements (#756) 2025-04-24 14:03:17 +10:00
dynos_bin_actor.cpp fixes, clean up and some new features (#259) 2024-09-12 19:09:01 +10:00
dynos_bin_ambient_t.cpp Added in-game console for DynOS and Lua errors 2023-05-19 04:20:08 -07:00
dynos_bin_animation.cpp Added in-game console for DynOS and Lua errors 2023-05-19 04:20:08 -07:00
dynos_bin_behavior.cpp Basic Vertex Point Lighting Engine (#716) 2025-03-27 16:36:02 -04:00
dynos_bin_col.cpp Boy what the hell (unbreak mods and DynOS packs) 2025-02-14 18:42:41 -05:00
dynos_bin_common.cpp Basic Vertex Point Lighting Engine (#716) 2025-03-27 16:36:02 -04:00
dynos_bin_compress.cpp Prevent the game from caching downloaded WIP mods (#69) 2024-06-23 11:54:07 -04:00
dynos_bin_geo.cpp Custom geo function and switch nodes with Lua callback (#593) 2024-12-31 10:23:13 +10:00
dynos_bin_gfx.cpp cleanup old gfx symbol management code 2025-06-14 14:58:55 +10:00
dynos_bin_legacy.cpp DynOS Bin Compression (#131) 2022-06-25 00:52:53 -07:00
dynos_bin_light0.cpp Add Lights0 support to DynOS 2023-06-12 02:08:20 -07:00
dynos_bin_light_t.cpp Added in-game console for DynOS and Lua errors 2023-05-19 04:20:08 -07:00
dynos_bin_lights.cpp Added in-game console for DynOS and Lua errors 2023-05-19 04:20:08 -07:00
dynos_bin_lvl.cpp Add some level commands to make porting HackerSM64 levels easier 2025-04-14 19:25:05 -04:00
dynos_bin_lvl_validate.cpp Shorten include paths by removing unnecessary "src/" 2024-04-17 17:28:38 -04:00
dynos_bin_macro_object.cpp Added in-game console for DynOS and Lua errors 2023-05-19 04:20:08 -07:00
dynos_bin_movtex.cpp Added in-game console for DynOS and Lua errors 2023-05-19 04:20:08 -07:00
dynos_bin_movtexqc.cpp Shorten include paths by removing unnecessary "src/" 2024-04-17 17:28:38 -04:00
dynos_bin_pointer.cpp Lvl Macros (#678) 2025-02-23 07:44:53 +10:00
dynos_bin_read.cpp Low-hanging fruit mod loading optimizations (#493) 2024-11-16 12:44:57 +10:00
dynos_bin_rooms.cpp DynOS Bin Compression (#131) 2022-06-25 00:52:53 -07:00
dynos_bin_tex.cpp Rename tmp to .tmp and hide on Windows (Will test after making this commit) 2024-05-15 18:00:16 -04:00
dynos_bin_texlist.cpp Added in-game console for DynOS and Lua errors 2023-05-19 04:20:08 -07:00
dynos_bin_trajectory.cpp Added in-game console for DynOS and Lua errors 2023-05-19 04:20:08 -07:00
dynos_bin_utils.cpp Custom geo function and switch nodes with Lua callback (#593) 2024-12-31 10:23:13 +10:00
dynos_bin_vtx.cpp Add G_PACKED_NORMALS Geo Mode from F3DEX3 (#768) 2025-04-25 15:07:31 -04:00
dynos_c.cpp Add a safer version of Lua's require() (#847) 2025-06-14 19:49:07 +10:00
dynos_cmap.cpp remove some double lookups in dynos 2025-04-08 14:32:25 +10:00
dynos_cmap.cpp.h add unordered map to cmap 2024-11-30 15:33:11 +10:00
dynos_gfx_init.cpp bring back skip_pack_generation 2025-03-04 17:13:00 +10:00
dynos_level.cpp fix dynos warps castle grounds bug 2025-01-07 09:04:37 +10:00
dynos_main.cpp Gfx set command: v2 + Gfx/Vtx dynamic alloc (#718) 2025-04-12 18:19:14 -04:00
dynos_mgr_actor.cpp Add a safer version of Lua's require() (#847) 2025-06-14 19:49:07 +10:00
dynos_mgr_anim.cpp revise my latest changes 2025-06-04 07:58:02 +10:00
dynos_mgr_bhv.cpp Add a safer version of Lua's require() (#847) 2025-06-14 19:49:07 +10:00
dynos_mgr_builtin.cpp Gfx Vtx vanilla only duplicates (#733) 2025-04-08 10:20:50 +10:00
dynos_mgr_builtin_externs.h Gfx Vtx vanilla only duplicates (#733) 2025-04-08 10:20:50 +10:00
dynos_mgr_builtin_tex.cpp get_texture_average_color 2025-06-05 22:33:24 +10:00
dynos_mgr_col.cpp Added a full new custom behavior system (#124) 2022-06-02 12:19:54 -07:00
dynos_mgr_gfx.cpp Gfx/Vtx improvements (#756) 2025-04-24 14:03:17 +10:00
dynos_mgr_lvl.cpp Fix DynOS lvl crash 2023-12-05 19:36:47 -05:00
dynos_mgr_moddata.cpp Gfx/Vtx improvements (#756) 2025-04-24 14:03:17 +10:00
dynos_mgr_moddata.hpp fix mac compile 2025-04-30 20:51:10 +10:00
dynos_mgr_models.cpp Gfx set command: v2 + Gfx/Vtx dynamic alloc (#718) 2025-04-12 18:19:14 -04:00
dynos_mgr_movtexqc.cpp Shorten include paths by removing unnecessary "src/" 2024-04-17 17:28:38 -04:00
dynos_mgr_pack.cpp Auto disable billboards for 3D models (#579) 2024-12-22 07:54:45 -05:00
dynos_mgr_tex.cpp get_texture_average_color 2025-06-05 22:33:24 +10:00
dynos_misc.cpp fix scrolling textures again 2025-04-17 11:49:04 +10:00
dynos_warps.cpp smlua event hooks refactor (#826) 2025-06-09 07:40:48 +10:00