diff --git a/docs/game_data/spel2.lua b/docs/game_data/spel2.lua index 55546995d..a4fd6beea 100644 --- a/docs/game_data/spel2.lua +++ b/docs/game_data/spel2.lua @@ -2284,7 +2284,9 @@ do ---@field lobby OnlineLobby ---@class OnlinePlayer - ---@field ready_state integer + ---@field game_mode GAME_MODE + ---@field platform PLATFORM + ---@field ready_state READY_STATE ---@field character integer ---@field player_name string diff --git a/docs/index.html b/docs/index.html index e17e18d51..f61c7daa8 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1837,6 +1837,9 @@
Used in SaveRelated
+ +Type | +Name | +Description | +
---|---|---|
int | +page_nr | ++ |
int | +sprite_id | ++ |
STRINGID | +name | ++ |
STRINGID | +description | ++ |
float | +scale | ++ |
float | +offset_x | ++ |
float | +offset_y | ++ |
float | +offset_x | ++ | |
float | +offset_y | ++ | |
WORLD_SHADER | shader | @@ -10398,11 +10478,26 @@ | |
float | +angle | ++ | |
int | +animation_frame | ++ | |
bool | render_inactive | ||
float | +brightness | ++ | |
int | texture_num | @@ -10469,13 +10564,23 @@ | |
CallbackId | +set_pre_draw(function fun) | +Hooks before the virtual function. The callback signature is bool draw(RenderInfo self) Virtual function docs: Called when the entity enters the camera view, using its hitbox with an extra threshold. Handles low-level graphics tasks related to the GPU |
+|
CallbackId | +set_post_draw(function fun) | +Hooks after the virtual function. The callback signature is nil draw(RenderInfo self) Virtual function docs: Called when the entity enters the camera view, using its hitbox with an extra threshold. Handles low-level graphics tasks related to the GPU |
+|
CallbackId | set_pre_render(function fun) | -Hooks before the virtual function. The callback signature is bool render(RenderInfo self, float float, VanillaRenderContext vanilla_render_context) |
+Hooks before the virtual function. The callback signature is bool render(RenderInfo self, Vec2 offset, VanillaRenderContext vanilla_render_context) Virtual function docs: Offset used in CO to draw the fake image of the entity on the other side of a level |
CallbackId | set_post_render(function fun) | -Hooks after the virtual function. The callback signature is nil render(RenderInfo self, float float, VanillaRenderContext vanilla_render_context) |
+Hooks after the virtual function. The callback signature is nil render(RenderInfo self, Vec2 offset, VanillaRenderContext vanilla_render_context) Virtual function docs: Offset used in CO to draw the fake image of the entity on the other side of a level |
Used in SaveRelated
+ +Type | +Name | +Description | +
---|---|---|
int | +sprite_id | ++ |
TEXTURE | +texture | ++ |
State of controller buttons per controller. Zero-based indexing, i.e. use GameProps.input_index directly to index this. |
Used in SaveRelated +Derived from JournalPageData
+ +Type | +Name | +Description | +
---|---|---|
TEXTURE | +texture | ++ |
int | +background_sprite_id | ++ |
bool | +killed_by_NA | ++ |
bool | +defeated_NA | ++ |
Used in set_callback with ON.RENDER_POST_JOURNAL_PAGE
Used in SaveRelated +Derived from JournalPageData
+ +Type | +Name | +Description | +
---|---|---|
TEXTURE | +texture | ++ |
int | +background_sprite_id | ++ |
bool | +killed_by_NA | ++ |
bool | +defeated_NA | ++ |
TEXTURE | +portrait_texture | ++ |
Used in SaveRelated +Derived from JournalPageData
+ +Type | +Name | +Description | +
---|---|---|
TEXTURE | +texture | ++ |
int | +background_sprite_id | ++ |
Deprecated kept for backward compatibility, don't use, check LevelGenSystem.exit_doors
@@ -12750,7 +12967,17 @@Used in SaveRelated
+Type | @@ -13795,6 +14024,8 @@
---|
Used in GameManager
+Type | @@ -13807,6 +14038,56 @@journal_popup_ui | |
---|---|---|
map<int, JournalPageData> | +places_data | +Scale and offset not used in those pages. Can't add more | +
map<ENT_TYPE, JournalBestiaryData> | +bestiary_data | ++ |
map<ENT_TYPE, ENT_TYPE> | +monster_part_to_main | +used to map stuff like Osiris_Hand -> Osiris_Head, Hundun limbs -> Hundun etc. | +
map<ENT_TYPE, JournalPeopleData> | +people_info | ++ |
map<ENT_TYPE, ENT_TYPE> | +people_part_to_main | +used to map shopkeeper clone to shopkeeper only | +
map<ENT_TYPE, JournalPageData> | +item_info | ++ |
map<ENT_TYPE, JournalPageData> | +trap_info | ++ |
map<ENT_TYPE, ENT_TYPE> | +trap_part_to_main | +used for stuff like upsidedown_spikes -> spikes, skulldrop skulls -> skulldrop trap etc. | +
map<ENT_TYPE, StickersData> | +stickers_data | ++ |
SaveData | +get_savegame() | +Gets local version of the SaveData | +
bool | +screen_loading | ++ | |
bool | +seeded_run | ++ | |
bool | +daily_challenge | ++ | |
bool | +arena | +Short for screen->next_screen_to_load == SCREEN.TEAM_SELECT and not screen->seeded_run and not screen->daily_challenge |
+|
int | next_screen_to_load | @@ -31157,6 +31458,31 @@ |
++ +Search script examples for GAME_MODE
+
Can be accessed via global online
Used in Online
Name | +Data | +Description | +
---|---|---|
COOP | +GAME_MODE::COOP | ++ |
ARENA | +GAME_MODE::ARENA | ++ |
Search script examples for GAME_SETTING
@@ -33280,6 +33606,49 @@PAUSE_TYPE
+ PLATFORM
+++ +Search script examples for PLATFORM
++
+ + +Name +Data +Description ++ +NONE +PLATFORM::NONE ++ + +DISCORD +PLATFORM::DISCORD ++ + +STEAM +PLATFORM::STEAM ++ + +XBOX +PLATFORM::XBOX ++ + +SWITCH +PLATFORM::SWITCH ++ + +PLAYSTATION +PLATFORM::PLAYSTATION ++ POS_TYPE
Search script examples for POS_TYPE
@@ -33816,6 +34185,34 @@RAW_KEY
+ READY_STATE
+++ +Search script examples for READY_STATE
++
+ + +Name +Data +Description ++ +NOT_READY +READY_STATE::NOT_READY ++ + +READY +READY_STATE::READY ++ + +SEARCHING +READY_STATE::SEARCHING ++ RECURSIVE_MODE
Search script examples for RECURSIVE_MODE
@@ -33862,6 +34259,11 @@RENDER_INFO_OVERRIDE
+ +DRAW +1 ++ + RENDER 3 diff --git a/docs/light.html b/docs/light.html index d2d98967c..ab6d5798b 100644 --- a/docs/light.html +++ b/docs/light.html @@ -1837,6 +1837,9 @@ ItemOwnerDetails ++ JournalPageData + KeyboardKey @@ -1885,6 +1888,9 @@SpritePosition ++ StickersData + Triangle @@ -1922,6 +1928,9 @@Journal types +
- + JournalBestiaryData +
- JournalPage
@@ -1964,6 +1973,12 @@- JournalPageTraps
+- + JournalPeopleData +
+- + JournalTrapData +
@@ -3744,6 +3759,9 @@ GAMEPAD_FLAG ++ GAME_MODE + GAME_SETTING @@ -3825,6 +3843,9 @@PAUSE_TYPE ++ PLATFORM + POS_TYPE @@ -3849,6 +3870,9 @@RAW_KEY ++ READY_STATE + RECURSIVE_MODE @@ -9839,6 +9863,52 @@ItemOwnerDetails
JournalPageData
+Used in SaveRelated
+ ++
+ + +Type +Name +Description ++ +int +page_nr ++ + +int +sprite_id ++ + +STRINGID +name ++ + +STRINGID +description ++ + +float +scale ++ + +float +offset_x ++ + +float +offset_y ++ KeyboardKey
@@ -10368,6 +10438,16 @@ RenderInfo
+ +float +offset_x ++ + +float +offset_y ++ WORLD_SHADER shader @@ -10398,11 +10478,26 @@ RenderInfo
+ +float +angle ++ + +int +animation_frame ++ bool render_inactive + +float +brightness ++ int texture_num @@ -10469,13 +10564,23 @@ RenderInfo
+ CallbackId +set_pre_draw(function fun) +Hooks before the virtual function. +
The callback signature isbool draw(RenderInfo self)
Virtual function docs:
Called when the entity enters the camera view, using its hitbox with an extra threshold. Handles low-level graphics tasks related to the GPU+ +CallbackId +set_post_draw(function fun) +Hooks after the virtual function. +
The callback signature isnil draw(RenderInfo self)
Virtual function docs:
Called when the entity enters the camera view, using its hitbox with an extra threshold. Handles low-level graphics tasks related to the GPU+ CallbackId set_pre_render(function fun) -Hooks before the virtual function. +
The callback signature isbool render(RenderInfo self, float float, VanillaRenderContext vanilla_render_context)
Hooks before the virtual function.
The callback signature isbool render(RenderInfo self, Vec2 offset, VanillaRenderContext vanilla_render_context)
Virtual function docs:
Offset used in CO to draw the fake image of the entity on the other side of a levelCallbackId set_post_render(function fun) -Hooks after the virtual function. +
The callback signature isnil render(RenderInfo self, float float, VanillaRenderContext vanilla_render_context)
Hooks after the virtual function.
The callback signature isnil render(RenderInfo self, Vec2 offset, VanillaRenderContext vanilla_render_context)
Virtual function docs:
Offset used in CO to draw the fake image of the entity on the other side of a levelRoomOwnerDetails
@@ -10652,6 +10757,27 @@SpritePosition
+ StickersData
+Used in SaveRelated
+ ++
+ + +Type +Name +Description ++ +int +sprite_id ++ + +TEXTURE +texture ++ Triangle
-
@@ -11176,7 +11302,39 @@ RawInput
State of controller buttons per controller. Zero-based indexing, i.e. use GameProps.input_index directly to index this. Journal types
JournalPage
+Journal types
JournalBestiaryData
+Used in SaveRelated +Derived from JournalPageData
+ ++
++ + +Type +Name +Description ++ +TEXTURE +texture ++ + +int +background_sprite_id ++ + +bool +killed_by_NA ++ + +bool +defeated_NA ++ JournalPage
Used in set_callback with ON.RENDER_POST_JOURNAL_PAGE
@@ -11675,6 +11833,65 @@
+JournalPageTraps
JournalPeopleData
+Used in SaveRelated +Derived from JournalPageData
+ ++
++ + +Type +Name +Description ++ +TEXTURE +texture ++ + +int +background_sprite_id ++ + +bool +killed_by_NA ++ + +bool +defeated_NA ++ + +TEXTURE +portrait_texture ++ JournalTrapData
+Used in SaveRelated +Derived from JournalPageData
+ ++
+ + +Type +Name +Description ++ +TEXTURE +texture ++ + +int +background_sprite_id ++ Levelgen types
DoorCoords
Deprecated kept for backward compatibility, don't use, check LevelGenSystem.exit_doors
@@ -12750,7 +12967,17 @@OnlinePlayer
- +int +GAME_MODE +game_mode ++ + +PLATFORM +platform ++ + @@ -13470,6 +13697,8 @@READY_STATE ready_state Screen types
FlyingThing
JournalPopupUI
+Used in SaveRelated
+
Type @@ -13795,6 +14024,8 @@PauseUI
SaveRelated
+Used in GameManager
+
+ Type @@ -13807,6 +14038,56 @@SaveRelated
journal_popup_ui + +map<int, JournalPageData> +places_data +Scale and offset not used in those pages. Can't add more ++ +map<ENT_TYPE, JournalBestiaryData> +bestiary_data ++ + +map<ENT_TYPE, ENT_TYPE> +monster_part_to_main +used to map stuff like Osiris_Hand -> Osiris_Head, Hundun limbs -> Hundun etc. ++ +map<ENT_TYPE, JournalPeopleData> +people_info ++ + +map<ENT_TYPE, ENT_TYPE> +people_part_to_main +used to map shopkeeper clone to shopkeeper only ++ +map<ENT_TYPE, JournalPageData> +item_info ++ + +map<ENT_TYPE, JournalPageData> +trap_info ++ + +map<ENT_TYPE, ENT_TYPE> +trap_part_to_main +used for stuff like upsidedown_spikes -> spikes, skulldrop skulls -> skulldrop trap etc. ++ +map<ENT_TYPE, StickersData> +stickers_data ++ + SaveData +get_savegame() +Gets local version of the SaveData +Screen
@@ -14784,6 +15065,26 @@
+ScreenCharacterSelect
+ +bool +screen_loading ++ + +bool +seeded_run ++ + +bool +daily_challenge ++ + +bool +arena +Short for +screen->next_screen_to_load == SCREEN.TEAM_SELECT and not screen->seeded_run and not screen->daily_challenge
int next_screen_to_load @@ -31157,6 +31458,31 @@ GAMEPAD_FLAG
GAME_MODE
+++ +Search script examples for GAME_MODE
+Can be accessed via global online
+ +
Used in Online+
+ + +Name +Data +Description ++ +COOP +GAME_MODE::COOP ++ + +ARENA +GAME_MODE::ARENA ++ GAME_SETTING
Search script examples for GAME_SETTING
@@ -33280,6 +33606,49 @@PAUSE_TYPE
+ PLATFORM
+++ +Search script examples for PLATFORM
++
+ + +Name +Data +Description ++ +NONE +PLATFORM::NONE ++ + +DISCORD +PLATFORM::DISCORD ++ + +STEAM +PLATFORM::STEAM ++ + +XBOX +PLATFORM::XBOX ++ + +SWITCH +PLATFORM::SWITCH ++ + +PLAYSTATION +PLATFORM::PLAYSTATION ++ POS_TYPE
Search script examples for POS_TYPE
@@ -33816,6 +34185,34 @@RAW_KEY
+ READY_STATE
+++ +Search script examples for READY_STATE
++
+ + +Name +Data +Description ++ +NOT_READY +READY_STATE::NOT_READY ++ + +READY +READY_STATE::READY ++ + +SEARCHING +READY_STATE::SEARCHING ++ RECURSIVE_MODE
Search script examples for RECURSIVE_MODE
@@ -33862,6 +34259,11 @@RENDER_INFO_OVERRIDE
+ +DRAW +1 ++ RENDER 3 diff --git a/docs/src/includes/_enums.md b/docs/src/includes/_enums.md index 052054fec..0377b327b 100644 --- a/docs/src/includes/_enums.md +++ b/docs/src/includes/_enums.md @@ -428,6 +428,18 @@ Name | Data | Description [X](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=GAMEPAD_FLAG.X) | 15 | [Y](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=GAMEPAD_FLAG.Y) | 16 | +## GAME_MODE + + +> Search script examples for [GAME_MODE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=GAME_MODE) + +Can be accessed via global [online](#online)
Used in [Online](#Online) + +Name | Data | Description +---- | ---- | ----------- +[COOP](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=GAME_MODE.COOP) | GAME_MODE::COOP | +[ARENA](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=GAME_MODE.ARENA) | GAME_MODE::ARENA | + ## GAME_SETTING @@ -1047,6 +1059,22 @@ Name | Data | Description [PRE_PROCESS_INPUT](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=PAUSE_TYPE.PRE_PROCESS_INPUT) | PAUSE_TYPE::PRE_PROCESS_INPUT | [FORCE_STATE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=PAUSE_TYPE.FORCE_STATE) | PAUSE_TYPE::FORCE_STATE | +## PLATFORM + + +> Search script examples for [PLATFORM](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=PLATFORM) + + + +Name | Data | Description +---- | ---- | ----------- +[NONE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=PLATFORM.NONE) | PLATFORM::NONE | +[DISCORD](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=PLATFORM.DISCORD) | PLATFORM::DISCORD | +[STEAM](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=PLATFORM.STEAM) | PLATFORM::STEAM | +[XBOX](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=PLATFORM.XBOX) | PLATFORM::XBOX | +[SWITCH](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=PLATFORM.SWITCH) | PLATFORM::SWITCH | +[PLAYSTATION](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=PLATFORM.PLAYSTATION) | PLATFORM::PLAYSTATION | + ## POS_TYPE @@ -1211,6 +1239,19 @@ Name | Data | Description [UP](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=RAW_KEY.UP) | 1 | ...check [lua_enums.txt](game_data/lua_enums.txt)... | | +## READY_STATE + + +> Search script examples for [READY_STATE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=READY_STATE) + + + +Name | Data | Description +---- | ---- | ----------- +[NOT_READY](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=READY_STATE.NOT_READY) | READY_STATE::NOT_READY | +[READY](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=READY_STATE.READY) | READY_STATE::READY | +[SEARCHING](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=READY_STATE.SEARCHING) | READY_STATE::SEARCHING | + ## RECURSIVE_MODE diff --git a/docs/src/includes/_types.md b/docs/src/includes/_types.md index 78007ad73..703b01fcf 100644 --- a/docs/src/includes/_types.md +++ b/docs/src/includes/_types.md @@ -1842,7 +1842,9 @@ Used in [Online](#Online) Type | Name | Description ---- | ---- | ----------- -int | [ready_state](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ready_state) | +[GAME_MODE](#GAME_MODE) | [game_mode](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=game_mode) | +[PLATFORM](#PLATFORM) | [platform](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=platform) | +[READY_STATE](#READY_STATE) | [ready_state](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ready_state) | int | [character](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=character) | string | [player_name](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=player_name) |