diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-11-17 17:11:15 -0500 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-11-17 17:11:15 -0500 |
| commit | 52fb13ef163bcea7f1409e17fd62509703de9f69 (patch) | |
| tree | 12df9ec09392b561d4a2604544f200635130c8b8 /gamemode/npcsystem/loadnpcs.lua | |
| parent | 50537786ae45d0e12a1dc4265e0d40d2fd4fbc4b (diff) | |
| download | wintersurvival2-52fb13ef163bcea7f1409e17fd62509703de9f69.tar.gz wintersurvival2-52fb13ef163bcea7f1409e17fd62509703de9f69.tar.bz2 wintersurvival2-52fb13ef163bcea7f1409e17fd62509703de9f69.zip | |
Added persistance
Diffstat (limited to 'gamemode/npcsystem/loadnpcs.lua')
| -rw-r--r-- | gamemode/npcsystem/loadnpcs.lua | 6 |
1 files changed, 0 insertions, 6 deletions
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()
|
