Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Auto committed Jul 11, 2024
1 parent cf2a729 commit fd2d7b9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/game_data/spel2.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/generate_emmylua.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
" = nullopt": "",
"void": "",
"constexpr": "",
"inline": "",
"inline ": "",
"[[nodiscard]]": "",
"[[maybe_unused]]": "",
"self_return<&": "",
Expand Down
2 changes: 1 addition & 1 deletion docs/parse_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"static": "",
"[[nodiscard]]": "",
"[[maybe_unused]]": "",
"inline": "",
"inline ": "",
"self_return<&": "",
">()": "",
"unsigned": "",
Expand Down
4 changes: 2 additions & 2 deletions docs/src/includes/_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ float | [hitboxx](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=hitbo
float | [hitboxy](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=hitboxy) |
int | [draw_depth](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=draw_depth) |
int | [collision2_mask](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=collision2_mask) | [MASK](#MASK), will only call collision2 when colliding with entities that match this mask.
int | [collision_mask](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=collision_mask) | [MASK](#MASK) used for collision with floors.
int | [collision_mask](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=collision_mask) | [MASK](#MASK) used for collision with floors, walls etc.
float | [friction](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=friction) |
float | [elasticity](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=elasticity) |
float | [weight](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=weight) |
Expand Down Expand Up @@ -1378,7 +1378,7 @@ array&lt;[ThemeInfo](#ThemeInfo), 18&gt; | [themes](https://github.com/spelunky-
int | [flags](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=flags) |
int | [flags2](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=flags2) |
int | [flags3](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=flags3) |
array&lt;int&gt; | [level_config](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=level_config) |
array&lt;int, 17&gt; | [level_config](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=level_config) |

## Lighting types

Expand Down
8 changes: 4 additions & 4 deletions src/game_api/script/usertypes/level_lua.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1368,8 +1368,8 @@ void register_usertypes(sol::state& lua)
/// kept for backward compatibility, don't use, check LevelGenSystem.exit_doors
lua.new_usertype<DoorCoords>("DoorCoords", sol::no_constructor, "door1_x", &DoorCoords::door1_x, "door1_y", &DoorCoords::door1_y, "door2_x", &DoorCoords::door2_x, "door2_y", &DoorCoords::door2_y);

auto level_config = [](LevelGenSystem& level_gen)
{ return ZeroIndexArray<uint32_t>(level_gen.data->level_config); };
// auto level_config = [](LevelGenSystem& level_gen)
//{ return ZeroIndexArray<uint32_t>(level_gen.data->level_config); };

/// Data relating to level generation, changing anything in here from ON.LEVEL or later will likely have no effect, used in StateMemory
lua.new_usertype<LevelGenSystem>(
Expand Down Expand Up @@ -1404,8 +1404,8 @@ void register_usertypes(sol::state& lua)
"flags3",
&LevelGenSystem::flags3,
"level_config",
sol::property([&level_config](LevelGenSystem& lg) // -> array<int>
{ return level_config(lg) /**/; }));
sol::property([](LevelGenSystem& lg) // -> array<int, 17>
{ return ZeroIndexArray<uint32_t>(lg.data->level_config) /**/; }));

/// Context received in ON.POST_ROOM_GENERATION.
/// Used to change the room templates in the level and other shenanigans that affect level gen.
Expand Down

0 comments on commit fd2d7b9

Please sign in to comment.