aboutsummaryrefslogtreecommitdiff
path: root/gamemode/questsystem/component_gather.lua
blob: fccb32abf3f7df7674e827edca8c355016ba69ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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)