diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-05-05 22:06:09 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-05-05 22:06:09 -0400 |
| commit | 7fbe965805c7e54468c299d157e1d28c911e2579 (patch) | |
| tree | 08082ca247dfc2b795b259457e654d36e12a5c51 | |
| parent | bbb44629599fe350af802332e66d005c0c09eca0 (diff) | |
| download | gmstranded-7fbe965805c7e54468c299d157e1d28c911e2579.tar.gz gmstranded-7fbe965805c7e54468c299d157e1d28c911e2579.tar.bz2 gmstranded-7fbe965805c7e54468c299d157e1d28c911e2579.zip | |
Added some more documentation to the example item
| -rw-r--r-- | gamemode/itemsystem/items/aaaItemExample.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gamemode/itemsystem/items/aaaItemExample.lua b/gamemode/itemsystem/items/aaaItemExample.lua index 872e93e..eb06b3b 100644 --- a/gamemode/itemsystem/items/aaaItemExample.lua +++ b/gamemode/itemsystem/items/aaaItemExample.lua @@ -17,6 +17,7 @@ ITEM.UniqueData = false --A table of strings to functions that show up when the player clicks the item in their inventory. --The you may also use strings to tables of strings to functions (and so on) to make drop-down menus. +--Keep in mind these are called on the CLIENT, so if you want something to happen on the server, you have to send it net! --Example: --[[ ITEM.Actions = { @@ -33,5 +34,15 @@ ITEM.Actions = { ]] ITEM.Actions = {} +--Additional function you might want to use: +--[[ +makeGenericDroppable(ITEM) + Allows the resource to be dropped in multiples of 1, half, all, or X + Located in common_droppable.lua +makeGenericPlantable(ITEM) + Make sure you have a ITEM.GrowTime set to a number, and a ITEM.OnGrow = function(self, aor, owner) + Located in common_plantable.lua +]] + --Be sure to register when everything is said and done! GMS.RegisterResource(ITEM) |
