aboutsummaryrefslogtreecommitdiff
path: root/gamemode/shared/itemsystem/quest/rougebadge.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-10-24 12:12:19 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-10-24 12:12:19 -0400
commit74c7a160da34897ebdf18aaff02b8c9b65809949 (patch)
treedb2a084d02f4acc3d7c99ec20e573101e448aef6 /gamemode/shared/itemsystem/quest/rougebadge.lua
parentd7f44fc24da959658b597e64d842661aa41f6515 (diff)
downloadartery-74c7a160da34897ebdf18aaff02b8c9b65809949.tar.gz
artery-74c7a160da34897ebdf18aaff02b8c9b65809949.tar.bz2
artery-74c7a160da34897ebdf18aaff02b8c9b65809949.zip
Various other updates and bugfixes
Diffstat (limited to 'gamemode/shared/itemsystem/quest/rougebadge.lua')
-rw-r--r--gamemode/shared/itemsystem/quest/rougebadge.lua38
1 files changed, 38 insertions, 0 deletions
diff --git a/gamemode/shared/itemsystem/quest/rougebadge.lua b/gamemode/shared/itemsystem/quest/rougebadge.lua
new file mode 100644
index 0000000..dad0f71
--- /dev/null
+++ b/gamemode/shared/itemsystem/quest/rougebadge.lua
@@ -0,0 +1,38 @@
+--[[
+ An example item
+]]
+local item = {}
+
+--Required, a name, all item names must be unique
+item.Name = "Rouge Newbie Badge"
+
+--Optional, a tooltip to display when hovered over
+item.Tooltip = "A tiny peice of metal, kinda looks like a dagger."
+
+--Required Returns the data needed to rebuild this item, should only contain the minimum data nessessary since this gets sent over the network
+item.Serialize = function(self)
+ print("Trying to serailize!")
+ return ""
+end
+
+--Required, Rebuilds the item from data created in Serialize, if the item is different from the "main" copy of the item, it should retun a tabl.Copy(self), with the appropriate fields set.
+item.DeSerialize = function(self,string)
+ print("Trying to deserialize!")
+ return self
+end
+
+--Optional, when the player clicks this item, a menu will show up, if the menu item is clicked, the function is ran. This is all run client side, so if you want it to do something server side, you'll need to use the net library. Remember that items are in the shared domain, so you can define what it does in the same file!
+function item.GetOptions(self)
+ local options = {}
+ options["test"] = function() print("You pressed test!") end
+ options["toste"] = function() print("You pressed toste!") end
+ return options
+end
+
+--Required, the shape of this item in a backpack.
+item.Shape = {
+ {true}
+}
+
+
+ART.RegisterItem(item)