Skip to content

Commit 931119f

Browse files
committed
Fixed optional params and fields not having correct comment format.
Removed void returns to cause less confusion.
1 parent 8de287a commit 931119f

20 files changed

+81
-110
lines changed

create_methods.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function api_create_effect(px, py, ptype, amount, color) end
2626
---@param count number the number of the item to create
2727
---@param x number the x position to create the item at
2828
---@param y number the y position to create the item at
29-
---@param stats table [Optional] a stats obj to use, can be one you got from api_Create_bee_stats() or a custom one
29+
---@param stats table @[Optional] a stats obj to use, can be one you got from api_Create_bee_stats() or a custom one
3030
function api_create_item(item, count, x, y, stats) end
3131

3232
---
@@ -48,7 +48,7 @@ function api_create_obj(oid, x, y) end
4848
---
4949
---@param method string the function you want to call when the timer ends
5050
---@param seconds number the amount of time you want to wait
51-
---@param arg1 any? [Optional] an argument to pass into the callback
52-
---@param arg2 any? [Optional] an argument to pass into the callback
53-
---@param arg3 any? [Optional] an argument to pass into the callback
51+
---@param arg1 any? @[Optional] an argument to pass into the callback
52+
---@param arg2 any? @[Optional] an argument to pass into the callback
53+
---@param arg3 any? @[Optional] an argument to pass into the callback
5454
function api_create_timer(method, seconds, arg1, arg2, arg3) end

datatypes/bee_definition.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
---@field chance number the chance this bee can be formed when it's the mutation for a hybrid
1818
---@field requirement string the requirement for how this bee can be formed when it's the mutation for a hybrid, shown in the Predictor
1919
---@field bid string a unique 2 character identifier for this species to use for the beebox / beebank storage. The identifier cannot be a number, i.e. 01 as these are reserved by the base game. This must be unique across all mods, so ask your fellow modders first!
20-
---@field calming string[] [Optional] if this species is grumpy, you can provide a list of flower oids that calm it
21-
---@field tier number [Optional] the tier this bee should belond to, if there is room. Should be a number between 1-5, if no room is in the given tier it'll try the next tier up until it defaults to 5
20+
---@field calming string[] @[Optional] if this species is grumpy, you can provide a list of flower oids that calm it
21+
---@field tier number @[Optional] the tier this bee should belond to, if there is room. Should be a number between 1-5, if no room is in the given tier it'll try the next tier up until it defaults to 5

datatypes/blueprint.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
---@field x number the y position in the world to put this blueprint
55
---@field y number the y position in the world to put this blueprint
66
---@field type string the type of biome to set for this blueprint | "'forest'" | "'swamp'" | "'snow'" | "'hallow'"
7-
---@field dye number [Optional] set a dye to apply to the land and nature items, valid number between 1-16
7+
---@field dye number @[Optional] set a dye to apply to the land and nature items, valid number between 1-16

datatypes/flower_definition.lua

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
---@field hint string the hint to show in the book when this species hasn't been discovered yet
77
---@field desc string the description to show in the book when this species has been discovered
88
---@field aquatic boolean whether this flower can be planted / grow on shallow water
9-
---@field deep boolean [Optional] whether this flower can be planted / grow on deep water
10-
---@field shop_buy number [Optional] the amount this flower can be bought for if sold by an NPC
11-
---@field shop_sell number [Optional] the amount this flower can be sold for at an NPC
12-
---@field machines string[] [Optional] a list of object oids that this flower can be used in
13-
---@field tools string[] [Optional] a list of tools that can be used on this flower,
14-
---@field variants number [Optional] specifies the number of variants in your sprite image, defaults to 1
15-
---@field chance number [Optional] the chance this species will be formed as a mutation, defaults to 100
16-
---@field smoker string[] [Optional] a list of bee species that this flower can be used to calm in a smoker
9+
---@field deep boolean @[Optional] whether this flower can be planted / grow on deep water
10+
---@field shop_buy number @[Optional] the amount this flower can be bought for if sold by an NPC
11+
---@field shop_sell number @[Optional] the amount this flower can be sold for at an NPC
12+
---@field machines string[] @[Optional] a list of object oids that this flower can be used in
13+
---@field tools string[] @[Optional] a list of tools that can be used on this flower,
14+
---@field variants number @[Optional] specifies the number of variants in your sprite image, defaults to 1
15+
---@field chance number @[Optional] the chance this species will be formed as a mutation, defaults to 100
16+
---@field smoker string[] @[Optional] a list of bee species that this flower can be used to calm in a smoker

datatypes/item_definition.lua

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
---@field shop_key boolean whether this is a "key" item and so cannot be sold
77
---@field shop_buy number the amount this item can be bought for if sold by an NPC
88
---@field shop_sell number the amount this item can be sold for at an NPC
9-
---@field machines string[] [Optional] a list of object oids that this item this can be used in
10-
---@field placeable boolean [Optional] whether this item can be placed down on the ground, will use the object oid specified in "obj" if true
11-
---@field place_grass boolean [Optional] if placeable, this specifies if the item can only be placed on grass
12-
---@field place_water boolean [Optional] if placeable, this specifies if the item can only be placed on shallow water
13-
---@field place_deep boolean [Optional] if placeable, this specifies if the item can only be placed on deep water
14-
---@field singular boolean [Optional] if specified, items created with this definition will not be able to stack, like frames - you MUST give it a durability if you set this
15-
---@field durability boolean [Optional] if specified, items created with this definition will have a durability, like tools
16-
---@field obj string [Optional] if placeable, this specifies the object oid that will be created when the item is used
17-
---@field honeycore boolean [Optional] if true, this item will be bought + sold for honeycore instead of rubees
9+
---@field machines string[] @[Optional] a list of object oids that this item this can be used in
10+
---@field placeable boolean @[Optional] whether this item can be placed down on the ground, will use the object oid specified in "obj" if true
11+
---@field place_grass boolean @[Optional] if placeable, this specifies if the item can only be placed on grass
12+
---@field place_water boolean @[Optional] if placeable, this specifies if the item can only be placed on shallow water
13+
---@field place_deep boolean @[Optional] if placeable, this specifies if the item can only be placed on deep water
14+
---@field singular boolean @[Optional] if specified, items created with this definition will not be able to stack, like frames - you MUST give it a durability if you set this
15+
---@field durability boolean @[Optional] if specified, items created with this definition will have a durability, like tools
16+
---@field obj string @[Optional] if placeable, this specifies the object oid that will be created when the item is used
17+
---@field honeycore boolean @[Optional] if true, this item will be bought + sold for honeycore instead of rubees

datatypes/layout.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---@class layout
22
---@field 1 number the x position for the slot, relative to the menu's top left coordinate
33
---@field 2 number the y position for the slot, relative to the menu's top left coordinate
4-
---@field 3 string [Optional] the type of slot this is | "'Input'" | "'Liquid Input'" | "'Output'" | "'Liquid Output'" | "'Shop'"
5-
---@field 4 string[] [Optional] if the type of slot is Input or Liquid Input, this let's you define the items that are allowed in them
4+
---@field 3 string @[Optional] the type of slot this is | "'Input'" | "'Liquid Input'" | "'Output'" | "'Liquid Output'" | "'Shop'"
5+
---@field 4 string[] @[Optional] if the type of slot is Input or Liquid Input, this let's you define the items that are allowed in them

datatypes/menu_definition.lua

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
---@field layout layout[] a list of layouts to set the slots for this objects menu
1010
---@field info info[] a list of information to show when the menu help button is pressed
1111
---@field buttons string[] a list of buttons for this objects menu to have | "'Help'" | "'Target'" | "'Sort'" | "'Move'" | "'Close'"
12-
---@field machines string[] [Optional] a list of object oids that this object this can be used in
13-
---@field tools string[] [Optional] a list of tools that can be used on this object
14-
---@field nature boolean [Optional] this specifies if the object can only be placed on grass
15-
---@field aquatic boolean [Optional] this specifies if the object can only be placed on shallow water
16-
---@field deep boolean [Optional] this specifies if the object can only be placed on deep water
17-
---@field singular boolean [Optional] this specifies if the object can stack or can only be singular, like frames or bees
18-
---@field invisible boolean [Optional] if true, this object will not be drawn - it's bounding box will still be interactive though!
19-
---@field center boolean [Optional] if true, when this object's menu opens it will automatically be put in the center of the screen
20-
---@field item_sprite string [Optional] if you have an object that's overworld sprite is bigger than 16x16, you can use this to specify an alternate sprite to use as the item + slot sprite
12+
---@field machines string[] @[Optional] a list of object oids that this object this can be used in
13+
---@field tools string[] @[Optional] a list of tools that can be used on this object
14+
---@field nature boolean @[Optional] this specifies if the object can only be placed on grass
15+
---@field aquatic boolean @[Optional] this specifies if the object can only be placed on shallow water
16+
---@field deep boolean @[Optional] this specifies if the object can only be placed on deep water
17+
---@field singular boolean @[Optional] this specifies if the object can stack or can only be singular, like frames or bees
18+
---@field invisible boolean @[Optional] if true, this object will not be drawn - it's bounding box will still be interactive though!
19+
---@field center boolean @[Optional] if true, when this object's menu opens it will automatically be put in the center of the screen
20+
---@field item_sprite string @[Optional] if you have an object that's overworld sprite is bigger than 16x16, you can use this to specify an alternate sprite to use as the item + slot sprite

datatypes/npc_definition.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
---@field stock string[] a list of up to 10 item oids that this NPC will have as it's shop stock
88
---@field greeting string the default greeting message shown in the dialogue menu when it opens
99
---@field dialogue string[] a list of dialogue to show one after the other when a player clicks the "talk" button
10-
---@field walking boolean [Optional] whether this NPC will walk around or stay still
11-
---@field shop boolean [Optional] whether this NPC will have a shop or just be dialogue only
10+
---@field walking boolean @[Optional] whether this NPC will walk around or stay still
11+
---@field shop boolean @[Optional] whether this NPC will have a shop or just be dialogue only

datatypes/object_definition.lua

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
---@field shop_key boolean whether this is a "key" object and so cannot be sold
77
---@field shop_buy number the amount this object can be bought for if sold by an NPC
88
---@field shop_sell number the amount this object can be sold for at an NPC
9-
---@field machines string[] [Optional] a list of object oids that this object this can be used in
10-
---@field tools string[] [Optional] a list of tools that can be used on this object
11-
---@field place_grass boolean [Optional] this specifies if the object can only be placed on grass
12-
---@field place_water boolean [Optional] this specifies if the object can only be placed on shallow water
13-
---@field place_deep boolean [Optional] this specifies if the object can only be placed on deep water
14-
---@field durability boolean [Optional] if specified, object created with this definition will have a durability, like tools
15-
---@field singular boolean [Optional] if specified, objects created with this definition will not be able to stack, like frames
16-
---@field honeycore boolean [Optional] if true, this objects will be bought + sold for honeycore instead of rubees
17-
---@field invisible boolean [Optional] if true, this object will not be drawn - it's bounding box will still be interactive though!
18-
---@field has_shadow boolean [Optional] if true, a shadow will be automatically drawn under this object
19-
---@field pickable boolean [Optional] if true, you'll be able to pick up this item with the mouse
20-
---@field variants number [Optional] for nature objects, like trees, this specifies the amount of variants within the sprite for the object
21-
---@field growth string [Optional] if set, after the object is created a timer will start, after which a new object will be created instead, for example saplings in the game use {{{i}}} to make a tree randomly after 360-560 seconds
22-
---@field item_sprite string [Optional] if you have an object that's overworld sprite is bigger than 16x16, you can use this to specify an alternate sprite to use as the item + slot sprite
9+
---@field machines string[] @[Optional] a list of object oids that this object this can be used in
10+
---@field tools string[] @[Optional] a list of tools that can be used on this object
11+
---@field place_grass boolean @[Optional] this specifies if the object can only be placed on grass
12+
---@field place_water boolean @[Optional] this specifies if the object can only be placed on shallow water
13+
---@field place_deep boolean @[Optional] this specifies if the object can only be placed on deep water
14+
---@field durability boolean @[Optional] if specified, object created with this definition will have a durability, like tools
15+
---@field singular boolean @[Optional] if specified, objects created with this definition will not be able to stack, like frames
16+
---@field honeycore boolean @[Optional] if true, this objects will be bought + sold for honeycore instead of rubees
17+
---@field invisible boolean @[Optional] if true, this object will not be drawn - it's bounding box will still be interactive though!
18+
---@field has_shadow boolean @[Optional] if true, a shadow will be automatically drawn under this object
19+
---@field pickable boolean @[Optional] if true, you'll be able to pick up this item with the mouse
20+
---@field variants number @[Optional] for nature objects, like trees, this specifies the amount of variants within the sprite for the object
21+
---@field growth string @[Optional] if set, after the object is created a timer will start, after which a new object will be created instead, for example saplings in the game use {{{i}}} to make a tree randomly after 360-560 seconds
22+
---@field item_sprite string @[Optional] if you have an object that's overworld sprite is bigger than 16x16, you can use this to specify an alternate sprite to use as the item + slot sprite

datatypes/quest_line.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---@class quest_line
22
---@field text string the text for this line
3-
---@field color string [Optional] the color key for the text, defaults to "FONT_BOOK"
4-
---@field gif string [Optional] instead of text you can show a sprite by specifying the oid of the sprite. The sprite should have a width of 148 pixels and a height of either 46, 66, or 86 pixels.
5-
---@field width number [Optional] if a gif is specified this sets the height of the gif, should be 46, 66, or 86
3+
---@field color string @[Optional] the color key for the text, defaults to "FONT_BOOK"
4+
---@field gif string @[Optional] instead of text you can show a sprite by specifying the oid of the sprite. The sprite should have a width of 148 pixels and a height of either 46, 66, or 86 pixels.
5+
---@field width number @[Optional] if a gif is specified this sets the height of the gif, should be 46, 66, or 86

0 commit comments

Comments
 (0)