aboutsummaryrefslogtreecommitdiff
path: root/gamemode/npcsystem/loadnpcs.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-10-21 22:51:41 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-10-21 22:51:41 -0400
commit50537786ae45d0e12a1dc4265e0d40d2fd4fbc4b (patch)
treea75d44f275eeee4464570b0b3d238244830fcaf1 /gamemode/npcsystem/loadnpcs.lua
parent82bcf2c8e3c64fb06bd0094ab5d889bd15a4948a (diff)
parentb0169e7ca20fd9fa4ae889af8fff16d2bf638a18 (diff)
downloadwintersurvival2-50537786ae45d0e12a1dc4265e0d40d2fd4fbc4b.tar.gz
wintersurvival2-50537786ae45d0e12a1dc4265e0d40d2fd4fbc4b.tar.bz2
wintersurvival2-50537786ae45d0e12a1dc4265e0d40d2fd4fbc4b.zip
Various bugfixes and updates, gamemode should be playable again
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()