diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2017-09-02 17:33:23 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2017-09-02 17:33:23 -0400 |
| commit | 9cafd07d43443a662bd279d4a303586e29d92a4e (patch) | |
| tree | 91f10000f6ec6ef0e004c146909945ffed885772 /lua/autorun/zone_town.lua | |
| parent | 147c4b979de268fdf45c01beb0bb877d32e3e32c (diff) | |
| download | artery_editor-9cafd07d43443a662bd279d4a303586e29d92a4e.tar.gz artery_editor-9cafd07d43443a662bd279d4a303586e29d92a4e.tar.bz2 artery_editor-9cafd07d43443a662bd279d4a303586e29d92a4e.zip | |
Various updates
Diffstat (limited to 'lua/autorun/zone_town.lua')
| -rw-r--r-- | lua/autorun/zone_town.lua | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lua/autorun/zone_town.lua b/lua/autorun/zone_town.lua index abfc65b..c2cf653 100644 --- a/lua/autorun/zone_town.lua +++ b/lua/autorun/zone_town.lua @@ -6,7 +6,7 @@ zones.RegisterClass("artery_town",Color(0,255,0)) --Use this to set default properties. Only called on server. hook.Add("OnZoneCreated","artery_town",function(zone,class,zoneID) if class == "artery_town" then - zone.npctbl = {} + zone.datatbl = {} end end) @@ -23,12 +23,12 @@ hook.Add("ShowZoneOptions","artery_town",function(zone,class,DPanel,zoneID,DFram function synctbl() net.Start("artery_town_settbl") net.WriteFloat(zoneID) - net.WriteTable(zone.npctbl) + net.WriteTable(zone.datatbl) net.SendToServer() end print("Displaying table, my table is") - PrintTable(zone.npctbl) + PrintTable(zone.datatbl) local monsterlb = vgui.Create("DLabel",DPanel) monsterlb:Dock(TOP) @@ -36,10 +36,10 @@ hook.Add("ShowZoneOptions","artery_town",function(zone,class,DPanel,zoneID,DFram monsterlb:SetDark(true) monsterlb:SizeToContents() local groundsname = vgui.Create("DTextEntry",DPanel) - groundsname:SetText(zone.npctbl.Name or "") + groundsname:SetText(zone.datatbl.Name or "") groundsname:Dock(TOP) groundsname.OnEnter = function() - zone.npctbl.Name = groundsname:GetValue() + zone.datatbl.Name = groundsname:GetValue() synctbl() end @@ -56,7 +56,8 @@ if SERVER then print("New table is:") PrintTable(new) if not ply:IsAdmin() then return end - zones.List[id].npctbl = new + local zone = zones.List[id] + zone.datatbl = new if new.Name then zone.Name = new.Name end |
