aboutsummaryrefslogtreecommitdiff
path: root/gamemode/npcsystem/loadnpcs.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-10-21 22:41:39 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-10-21 22:41:39 -0400
commitb0169e7ca20fd9fa4ae889af8fff16d2bf638a18 (patch)
tree0dd37f6c7619c120d8abbed564228431a7facb73 /gamemode/npcsystem/loadnpcs.lua
parent6c27ba2e42f3e144b7ed776d136186740eb123c9 (diff)
downloadwintersurvival2-b0169e7ca20fd9fa4ae889af8fff16d2bf638a18.tar.gz
wintersurvival2-b0169e7ca20fd9fa4ae889af8fff16d2bf638a18.tar.bz2
wintersurvival2-b0169e7ca20fd9fa4ae889af8fff16d2bf638a18.zip
fixed NPC spawning
Diffstat (limited to 'gamemode/npcsystem/loadnpcs.lua')
-rw-r--r--gamemode/npcsystem/loadnpcs.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/gamemode/npcsystem/loadnpcs.lua b/gamemode/npcsystem/loadnpcs.lua
index 9bf839b..85b3cd6 100644
--- a/gamemode/npcsystem/loadnpcs.lua
+++ b/gamemode/npcsystem/loadnpcs.lua
@@ -2,30 +2,34 @@ local Folder = GM.Folder:gsub("gamemodes/","").."/gamemode/npcsystem/npcs"
local insert = table.insert
function GM:LoadNPCS()
- print("NPC's loaded")
+ 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()