aboutsummaryrefslogtreecommitdiff
path: root/gamemode/server/sv_mapconfig.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2017-08-24 20:32:34 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2017-08-24 20:32:34 -0400
commit233e478e40d72a091f70f18dc6846066a4f52016 (patch)
treecf34be714088889731736c81bd44e198c792625a /gamemode/server/sv_mapconfig.lua
parent61bc16dae5a1b61bcd237d9f0be36125829d95b1 (diff)
downloadartery-233e478e40d72a091f70f18dc6846066a4f52016.tar.gz
artery-233e478e40d72a091f70f18dc6846066a4f52016.tar.bz2
artery-233e478e40d72a091f70f18dc6846066a4f52016.zip
Fix all linter warnings
Diffstat (limited to 'gamemode/server/sv_mapconfig.lua')
-rw-r--r--gamemode/server/sv_mapconfig.lua136
1 files changed, 68 insertions, 68 deletions
diff --git a/gamemode/server/sv_mapconfig.lua b/gamemode/server/sv_mapconfig.lua
index 23999bb..d697ea9 100644
--- a/gamemode/server/sv_mapconfig.lua
+++ b/gamemode/server/sv_mapconfig.lua
@@ -1,68 +1,68 @@
---Loads map config form a file
-do return end
-function ART.CreateTownie(tbl)
- local npcent = ents.Create("npc_townie")
- for k,v in pairs(tbl) do
- npcent[k] = v
- end
- npcent:Spawn()
-end
-
-function ART.CreateNavNode(tbl)
- local nodeent = ents.Create("info_townienode")
- assert(tbl ~= nil, "Tried to create a nil navnode")
- for k,v in pairs(tbl) do
- nodeent[k] = v
- end
- nodeent:Spawn()
-end
-
-local removeents = {
- "npc_townie",
--- "art_chest",
- "info_townienode",
- "npc_shop",
-}
-
-for k,v in pairs(removeents) do
- local eot = ents.FindByClass(v)
- for i,j in pairs(eot) do
- j:Remove()
- end
-end
-
-local mapfields = {
- "navnodes",
- "npcs",
--- "chests",
-}
-
-local function loadMap()
- for k,v in ipairs(mapfields) do
- local mapname = game.GetMap()
- local fpath = string.format("artery/maps/%s/%s/*", mapname, v)
- local files,dirs = file.Find(fpath,"DATA")
- for i,j in pairs(files) do
- if string.GetExtensionFromFilename(j) ~= "lua" then continue end
- local itempath = string.format("artery/maps/%s/%s/%s", mapname, v, j)
- local itemtxt = file.Read(itempath, "DATA")
- assert(itemtxt ~= nil, "Found a file, but it looks like it can't be compiled:" .. itempath)
- CompileString(itemtxt,itempath)()
- end
- end
-end
-
-hook.Add( "InitPostEntity", "artery_spawnmapnpcs", function()
- loadMap()
-end )
-
-concommand.Add("artery_reloadmap", function(ply,cmd,args)
- if not ply:IsAdmin() then return end
- for k,v in pairs(removeents) do
- local eot = ents.FindByClass(v)
- for i,j in pairs(eot) do
- j:Remove()
- end
- end
- loadMap()
-end)
+-- --Loads map config form a file
+-- do return end
+-- function ART.CreateTownie(tbl)
+-- local npcent = ents.Create("npc_townie")
+-- for k,v in pairs(tbl) do
+-- npcent[k] = v
+-- end
+-- npcent:Spawn()
+-- end
+--
+-- function ART.CreateNavNode(tbl)
+-- local nodeent = ents.Create("info_townienode")
+-- assert(tbl ~= nil, "Tried to create a nil navnode")
+-- for k,v in pairs(tbl) do
+-- nodeent[k] = v
+-- end
+-- nodeent:Spawn()
+-- end
+--
+-- local removeents = {
+-- "npc_townie",
+-- -- "art_chest",
+-- "info_townienode",
+-- "npc_shop",
+-- }
+--
+-- for k,v in pairs(removeents) do
+-- local eot = ents.FindByClass(v)
+-- for i,j in pairs(eot) do
+-- j:Remove()
+-- end
+-- end
+--
+-- local mapfields = {
+-- "navnodes",
+-- "npcs",
+-- -- "chests",
+-- }
+--
+-- local function loadMap()
+-- for k,v in ipairs(mapfields) do
+-- local mapname = game.GetMap()
+-- local fpath = string.format("artery/maps/%s/%s/*", mapname, v)
+-- local files,dirs = file.Find(fpath,"DATA")
+-- for i,j in pairs(files) do
+-- if string.GetExtensionFromFilename(j) ~= "lua" then continue end
+-- local itempath = string.format("artery/maps/%s/%s/%s", mapname, v, j)
+-- local itemtxt = file.Read(itempath, "DATA")
+-- assert(itemtxt ~= nil, "Found a file, but it looks like it can't be compiled:" .. itempath)
+-- CompileString(itemtxt,itempath)()
+-- end
+-- end
+-- end
+--
+-- hook.Add( "InitPostEntity", "artery_spawnmapnpcs", function()
+-- loadMap()
+-- end )
+--
+-- concommand.Add("artery_reloadmap", function(ply,cmd,args)
+-- if not ply:IsAdmin() then return end
+-- for k,v in pairs(removeents) do
+-- local eot = ents.FindByClass(v)
+-- for i,j in pairs(eot) do
+-- j:Remove()
+-- end
+-- end
+-- loadMap()
+-- end)