Skip to content

Commit

Permalink
last fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Auto committed Jul 7, 2024
1 parent b739ee4 commit 8318422
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 20 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.

10 changes: 5 additions & 5 deletions docs/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,20 +365,20 @@ def print_lf(lf):

print("int | vector:find(any value) | Searches for the value in vector, returns index of the item in vector or nil if not found, only available for simple values that are comparable")
print("int | span:find(any value) | Searches for the value in span, returns index of the item in span or nil if not found, only available for simple values that are comparable")
print("any | set:find(any value) | Searches for the value in set, returns the value itself or nil if not found, only available for simple values that are comparable")
print("any | set:find(any key) | Searches for the value in set, returns the value itself or nil if not found, only available for simple values that are comparable")
print("any | map:find(any key) | Searches for the key in map, returns the value itself or nil if not found, only available for simple keys that are comparable")

print("nil | vector:erase(int index) | Removes element at given index, the rest of elements shift down so that the vector stays contiguous")
print("nil | set:erase(any value) | Removes element from set")
print("nil | map:erase(any key) | Removes element from map by key")
print("nil | set:erase(any key) | Removes element from set")
print("nil | map:erase(any key) | Removes element from map")

print("nil | vector:clear() | Removes all elements from vector")
print("nil | set:clear() | Removes all elements from set")
print("nil | map:clear() | Removes all elements from map")

print("nil | vector:insert(int index, any element) | Inserts element at given index, the rest of elements shift up in index")
print("nil | set:insert(int order, any element) | The order param doesn't acutally matter and can be set to nil")
print("nil | map:insert(any key, any value) | unsure, probably easier to just use `map[key] = value`")
print("nil | set:insert(int order, any key) | The order param doesn't acutally matter and can be set to nil")
print("nil | map:insert(any key, any value)? | unsure, probably easier to just use `map[key] = value`")


print("# Functions")
Expand Down
4 changes: 0 additions & 4 deletions docs/generate_emmylua.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,6 @@ def main():
else ""
)
if "function" in var and var["function"]:
# if var["name"] == "clear_behaviors":
# gu.breakpoint()
signature = var["signature"]
m = re.search(r"\s*(.*)\s+([^\(]*)\((.*)\)", signature)
if m:
Expand Down Expand Up @@ -442,12 +440,10 @@ def main():
print(
"""local MAX_PLAYERS = 4
---@alias in_port_t number
---@class Logic
---@alias OnlinePlayerShort any
---@alias UdpServer any
---@alias Texture any
---@alias SpearDanglerAnimFrames any
---@alias OnlineLobbyScreenPlayer any
---@alias SoundCallbackFunction function"""
Expand Down
2 changes: 1 addition & 1 deletion docs/parse_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ def run_parse():
}
)
elif cpp.startswith("[]("):
param_match = re.match(r"\[\]\(([\w &*:,]+)?\) -> ([\w.*&<>\[\]:]+)?(?: )?{", cpp)
param_match = re.match(r"\[\]\(([\w &*:,]+)?\) -> ([\w.*&<>\?\[\]:]+)?(?: )?{", cpp)
if param_match:
ret = param_match.group(2)
if ret is None:
Expand Down
2 changes: 1 addition & 1 deletion docs/src/includes/_enums.md
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ Name | Data | Description
[DEATH](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ON.DEATH) | ON::DEATH | Runs when entering the death screen.<br/>
[SPACESHIP](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ON.SPACESHIP) | ON::SPACESHIP | Runs when entering the olmecship cutscene after [Tiamat](#Tiamat).<br/>
[WIN](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ON.WIN) | ON::WIN | Runs when entering any winning cutscene, including the constellation.<br/>
[CREDITS](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ON.CREDITS) | ON::CREDITS | Runs when entering the credits.<br/>
[CREDITS](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ON.CREDITS) | ON::CREDITS | Runs when entering the credits screen.<br/>
[SCORES](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ON.SCORES) | ON::SCORES | Runs when entering the final score celebration screen of a normal or hard ending.<br/>
[CONSTELLATION](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ON.CONSTELLATION) | ON::CONSTELLATION | Runs when entering the turning into constellation cutscene after cosmic ocean.<br/>
[RECAP](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ON.RECAP) | ON::RECAP | Runs when entering the Dear Journal screen after final scores.<br/>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/includes/_events.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Runs when entering any winning cutscene, including the constellation.<br/>

> Search script examples for [ON.CREDITS](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ON.CREDITS)
Runs when entering the credits.<br/>
Runs when entering the credits screen.<br/>

## ON.SCORES

Expand Down
10 changes: 5 additions & 5 deletions docs/src/includes/_globals.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,17 @@ any | set:at(int order) | Returns elements in order, it's not an index as sets d
any | map:at(int order) | Returns elements in order, it's not an index as maps don't have one
int | vector:find(any value) | Searches for the value in vector, returns index of the item in vector or nil if not found, only available for simple values that are comparable
int | span:find(any value) | Searches for the value in span, returns index of the item in span or nil if not found, only available for simple values that are comparable
any | set:find(any value) | Searches for the value in set, returns the value itself or nil if not found, only available for simple values that are comparable
any | set:find(any key) | Searches for the value in set, returns the value itself or nil if not found, only available for simple values that are comparable
any | map:find(any key) | Searches for the key in map, returns the value itself or nil if not found, only available for simple keys that are comparable
nil | vector:erase(int index) | Removes element at given index, the rest of elements shift down so that the vector stays contiguous
nil | set:erase(any value) | Removes element from set
nil | map:erase(any key) | Removes element from map by key
nil | set:erase(any key) | Removes element from set
nil | map:erase(any key) | Removes element from map
nil | vector:clear() | Removes all elements from vector
nil | set:clear() | Removes all elements from set
nil | map:clear() | Removes all elements from map
nil | vector:insert(int index, any element) | Inserts element at given index, the rest of elements shift up in index
nil | set:insert(int order, any element) | The order param doesn't acutally matter and can be set to nil
nil | map:insert(any key, any value) | unsure, probably easier to just use `map[key] = value`
nil | set:insert(int order, any key) | The order param doesn't acutally matter and can be set to nil
nil | map:insert(any key, any value)? | unsure, probably easier to just use `map[key] = value`
# Functions
The game functions like `spawn` use [level coordinates](#get_position). Draw functions use normalized [screen coordinates](#screen_position) from `-1.0 .. 1.0` where `0.0, 0.0` is the center of the screen.

Expand Down
2 changes: 1 addition & 1 deletion src/game_api/script/lua_vm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2492,7 +2492,7 @@ end
// WIN
// Runs when entering any winning cutscene, including the constellation.
// CREDITS
// Runs when entering the credits.
// Runs when entering the credits screen.
// SCORES
// Runs when entering the final score celebration screen of a normal or hard ending.
// CONSTELLATION
Expand Down

0 comments on commit 8318422

Please sign in to comment.