From 52fb13ef163bcea7f1409e17fd62509703de9f69 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Thu, 17 Nov 2016 17:11:15 -0500 Subject: Added persistance --- gamemode/npcsystem/loadnpcs.lua | 6 ------ 1 file changed, 6 deletions(-) (limited to 'gamemode/npcsystem/loadnpcs.lua') diff --git a/gamemode/npcsystem/loadnpcs.lua b/gamemode/npcsystem/loadnpcs.lua index 85b3cd6..78e6748 100644 --- a/gamemode/npcsystem/loadnpcs.lua +++ b/gamemode/npcsystem/loadnpcs.lua @@ -2,34 +2,28 @@ local Folder = GM.Folder:gsub("gamemodes/","").."/gamemode/npcsystem/npcs" local insert = table.insert function GM:LoadNPCS() - print("NPC's loaded!!!") local Items = file.Find(Folder.."/*.lua","LUA") local BaseItem = {} GAMEMODE.Npcs = {} NPC = {} - print("Printing something else!") AddCSLuaFile(Folder.."/base.lua") include(Folder.."/base.lua") BaseItem = table.Copy(NPC) - print("Items table was",Items) for k,v in pairs(Items) do - print("Found an npc's file") if (v != "base.lua") then AddCSLuaFile(Folder.."/"..v) include(Folder.."/"..v) insert(GAMEMODE.Npcs,NPC) - print("Inserting ",NPC.Name) NPC = table.Copy(BaseItem) end end - print("Finished loading npc's") end hook.Add("Initialize","Loadnpcs",function() -- cgit v1.2.3-70-g09d2