diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2018-03-23 20:20:40 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2018-03-23 20:20:40 -0400 |
| commit | e2428796b9afe019ae6ca45e07fbe1aaa6963917 (patch) | |
| tree | b6514bbf349a99ebd3e999a3811ab6f0fa52851b /gamemode/questsystem/component_gather.lua | |
| parent | c132bf1fa77a0b01b18a848db91879383a8210a8 (diff) | |
| download | artery-e2428796b9afe019ae6ca45e07fbe1aaa6963917.tar.gz artery-e2428796b9afe019ae6ca45e07fbe1aaa6963917.tar.bz2 artery-e2428796b9afe019ae6ca45e07fbe1aaa6963917.zip | |
Started working on quest inventory
Diffstat (limited to 'gamemode/questsystem/component_gather.lua')
| -rw-r--r-- | gamemode/questsystem/component_gather.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gamemode/questsystem/component_gather.lua b/gamemode/questsystem/component_gather.lua new file mode 100644 index 0000000..fccb32a --- /dev/null +++ b/gamemode/questsystem/component_gather.lua @@ -0,0 +1,25 @@ +local comp = {} + +comp.Name = "Quest Component Gather" + + +function comp:Init(itemname,itemnumber) + self.itemname = itemname + self.itemnumber = itemnumber +end + +function comp:GetText() + return string.format("Gather %s %s",self.itemnumber,self.itiemname) +end + +function comp:Serialize() + return util.TableToJSON({itemname,itemnumber}) +end + +function comp:DeSerialize(data) + local tbl = util.JSONToTable(data) + self.itemname = tbl[1] + self.itemnumber = tbl[2] +end + +nrequire("core/quests/quest.lua").RegisterArc(comp) |
