Skip to content

Commit 60d47a0

Browse files
committed
Added all and describe methods.
Added hp to obj def. Added refresh tooltip. Added get lang. Added claim_script to define quest.
1 parent 8f72147 commit 60d47a0

File tree

6 files changed

+70
-3
lines changed

6 files changed

+70
-3
lines changed

all_methods.lua

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
---@since 1.3.1
3+
---@param oid string filter results to a specific oid (ideally you should always provide a filter)
4+
---@return number[]
5+
function api_all_flowers(oid) end
6+
7+
---
8+
---@since 1.3.1
9+
---@return number[]
10+
function api_all_trees() end
11+
12+
---
13+
---@since 1.3.1
14+
---@param oid string filter results to a specific oid (ideally you should always provide a filter)
15+
---@return number[]
16+
function api_all_menu_objects(oid) end
17+
18+
---
19+
---@since 1.3.1
20+
---@param oid string filter results to a specific oid (ideally you should always provide a filter)
21+
---@return number[]
22+
function api_all_objects(oid) end

datatypes/object_definition.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
---@field place_water boolean @[Optional] this specifies if the object can only be placed on shallow water
1313
---@field place_deep boolean @[Optional] this specifies if the object can only be placed on deep water
1414
---@field durability boolean @[Optional] if specified, object created with this definition will have a durability, like tools
15+
---@field hp boolean @[Optional] if specified, object created will have health, likes trees (this is NOT the same as durability)
1516
---@field singular boolean @[Optional] if specified, objects created with this definition will not be able to stack, like frames
1617
---@field honeycore boolean @[Optional] if true, this objects will be bought + sold for honeycore instead of rubees
1718
---@field invisible boolean @[Optional] if true, this object will not be drawn - it's bounding box will still be interactive though!

define_methods.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,9 @@ function api_dp(inst_id, prop_name, prop_value) end
137137
---@param quest_def quest_definition the quest definition table you want to use
138138
---@param page1 quest_line[] the lines for the left-hand side quest page
139139
---@param page2 quest_definition[] the lines for the right-hand side quest page
140+
---@param claim_script string? @[Optional] call a script when the quest is completed
140141
---@return string|nil If this method worked it will return Success, otherwise if it fails it will return nil and will log an error in the Modding Console.
141-
function api_define_quest(quest_def, page1, page2) end
142+
function api_define_quest(quest_def, page1, page2, claim_script) end
142143

143144
---
144145
---@param tab string | "'crafting'" | "'tools'" | "'beekeeping'" | "'decoration'" | "'painting'"

describe_methods.lua

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
---@since 1.3.1
3+
---@param mods boolean if true will return results for mods instead of the base game
4+
---@return table
5+
function api_describe_bees(mods) end
6+
7+
---
8+
---@since 1.3.1
9+
---@param mods boolean if true will return results for mods instead of the base game
10+
---@return string[]
11+
function api_describe_commands(mods) end
12+
13+
---
14+
---@since 1.3.1
15+
---@param mods boolean if true will return results for mods instead of the base game
16+
---@return table
17+
function api_describe_dictionary(mods) end
18+
19+
---
20+
---@since 1.3.1
21+
---@param oid string filter results to a specific oid (ideally you should always provide a filter)
22+
---@return string[]
23+
function api_describe_mods(oid) end
24+
25+
---
26+
---@since 1.3.1
27+
---@param mods boolean if true will return results for mods instead of the base game
28+
---@return string[]
29+
function api_describe_oids(mods) end
30+
31+
---
32+
---@since 1.3.1
33+
---@param mods boolean if true will return results for mods instead of the base game
34+
---@return table
35+
function api_describe_recipes(mods) end

get_methods.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,9 @@ function api_get_trees(radius) end
173173

174174
---
175175
---@return weather
176-
function api_get_weather() end
176+
function api_get_weather() end
177+
178+
---
179+
---@since 1.3.1
180+
---@return string returns a 2 letter language code, current options: [en, fr, it, de, es, br, jp]
181+
function api_get_language() end

misc_methods.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,7 @@ function api_is_game_paused() end
7878
---@param headers table a map of headers to apply to your request
7979
---@param body string a body to send with the request (can just be an empty string)
8080
---@return string|nil If this method worked it will return Success, otherwise if it fails it will return nil and will log an error in the Modding Console.
81-
function api_http_request(url, method_type, headers, body) end
81+
function api_http_request(url, method_type, headers, body) end
82+
83+
---@since 1.3.1
84+
function api_refresh_tooltip() end

0 commit comments

Comments
 (0)