Skip to content

Commit c893baf

Browse files
committed
Added v1.4.2 methods.
1 parent f8726e8 commit c893baf

File tree

4 files changed

+36
-2
lines changed

4 files changed

+36
-2
lines changed

create_methods.lua

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,14 @@ function api_create_obj(oid, x, y) end
5151
---@param arg1 any? @[Optional] an argument to pass into the callback
5252
---@param arg2 any? @[Optional] an argument to pass into the callback
5353
---@param arg3 any? @[Optional] an argument to pass into the callback
54-
function api_create_timer(method, seconds, arg1, arg2, arg3) end
54+
function api_create_timer(method, seconds, arg1, arg2, arg3) end
55+
56+
---
57+
---@since 1.4.2
58+
---@param type string the layer the lightweight should be drawn on, options are tile (above tiles but below objects), obj (above objects), or gui (above menus). This cannot be changed later
59+
---@param sprite_ref number the sprite index to use for drawing, needs to be the actual index not a string
60+
---@param frame number the frame of the sprite to draw (see Instance Properties for how to update this later)
61+
---@param x number the x position to create the lightweight at
62+
---@param y number the y position to create the lightweight at
63+
---@return number returns instance id of lightweight
64+
function api_create_lightweight(type, sprite_ref, frame, x, y) end

datatypes/measure_return.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---@class measure
2+
---@field width number the width of the text will take up when drawn
3+
---@field height number the height of the text will take up when drawn

misc_methods.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,10 @@ function api_is_game_paused() end
8181
function api_http_request(url, method_type, headers, body) end
8282

8383
---@since 1.3.1
84-
function api_refresh_tooltip() end
84+
function api_refresh_tooltip() end
85+
86+
---@since 1.4.2
87+
---@param text string the text to draw
88+
---@param tw number? @[Optional] a width to apply to the text, causing extra text to wrap onto the next line
89+
---@return measure
90+
function api_measure_text(text, tw) end

multiplayer_methods.lua

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---@since 1.4.2
2+
---@return boolean will be true if the game is in a hosted game or is hosting a game.
3+
function api_multiplayer_is_mp() end
4+
5+
---@since 1.4.2
6+
---@return boolean will be true if the game is in a hosted game that is hosted by another player.
7+
function api_multiplayer_is_joined() end
8+
9+
---@since 1.4.2
10+
---@return boolean will be true if the game is hosting a game.
11+
function api_multiplayer_is_hosting() end
12+
13+
---@since 1.4.2
14+
---@return string returns host uuid.
15+
function api_multiplayer_get_host_uuid() end

0 commit comments

Comments
 (0)