You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: define_methods.lua
+28-1Lines changed: 28 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -187,4 +187,31 @@ function api_define_validation_icon(validation, icon_sprite) end
187
187
---@paramwallwall_definition definition for your new wall
188
188
---@paramwall_spritestring the spritesheet for the new wall, needs to contain both the item sprites and wall variants, see the example in the Sample Mod
189
189
---@returnstring|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.
190
-
functionapi_define_wall(wall, wall_sprite) end
190
+
functionapi_define_wall(wall, wall_sprite) end
191
+
192
+
---
193
+
---@since 1.4.0
194
+
---@paramlabelstring label to show for your mod in the Mod Workbench
195
+
---@paramtabsworkbench_tabs a table with 5 keys, "t1", "t2", "t3", "t4", "t5". each key should have a string value that will be displayed when that tab is hovered.
196
+
---@returnstring|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.
197
+
functionapi_define_workbench(label, tabs) end
198
+
199
+
---
200
+
---@since 1.4.0
201
+
---@paramoidstring the oid of the item to define default stats for
202
+
---@paramstatstable the stats to give to an item when created if it has the given oid
203
+
functionapi_define_item_stats(oid, stats) end
204
+
205
+
---
206
+
---@since 1.4.0
207
+
---@paramwindowwindow_definition definition for your new window
208
+
---@paramwindow_spritestring the spritesheet for the new window, should be 5 frames (16x16), the first 4 like a normal item/obj sprite, the 5th frame is what will be drawn onto the wall when placed down
209
+
functionapi_define_window(window, window_sprite) end
210
+
211
+
---
212
+
---@since 1.4.0
213
+
---@paramnamestring the name of the liquid to use, this will be shown in tooltips and be set as the liquid "type" in stats
214
+
---@paramcolorstring a color name to use for the liquid, this can be a default one or your own that you defined with api_define_color()
215
+
---@paramtexture_spritestring the path to a single 37x34px image used as the liquid "texture". This will be drawn at 50% alpha on top of any tanks with your liquid in it, to help identify your liquid without color
216
+
---@parampreview_spritestring the path to a single 12x12px image used as the liquid preview when hovering over machines with a tank containing your liquid - this should be a solid filled in image (i.e. your color + your texture combined)
217
+
functionapi_define_liquid(name, color, texture_sprite, preview_sprite) end
0 commit comments