diff options
Diffstat (limited to 'gamemode/shared/loadnpcs.lua')
| -rw-r--r-- | gamemode/shared/loadnpcs.lua | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/gamemode/shared/loadnpcs.lua b/gamemode/shared/loadnpcs.lua index 2906597..de411df 100644 --- a/gamemode/shared/loadnpcs.lua +++ b/gamemode/shared/loadnpcs.lua @@ -1,39 +1,39 @@ -do return end -local f = include("concommands.lua") - -ART = ART or {} - -local npcs = {} -local autocompletef - -function ART.RegisterNPC(npc) - assert(npc ~= nil, "Attempted to register a nil npc") - assert(npc.Name ~= nil, "Attempted to register an npc without a name") - npcs[npc.Name] = npc - autocompletef = f.AutocompleteFunction(npcs) -end - -function ART.CreateNPCByName(npcname, pos) - print("Createing a " ,npcname ," at ", pos) - local npctbl = npcs[npcname] - local npc = ents.Create("npc_huntable") - npc:SetPos(pos) - for k,v in pairs(npctbl) do - npc[k] = v - end - npc:Spawn() - return npc -end - - -if SERVER then - autocompletef = nil -else - autocompletef = f.AutocompleteFunction(npcs) -end -concommand.Add("artery_makenpc",function(ply,cmd,args) - if not ply:IsAdmin() then return end - local n = args[1] - ART.CreateNPCByName(n,ply:GetEyeTrace().HitPos) -end, -autocompletef) +-- do return end +-- local f = include("concommands.lua") +-- +-- ART = ART or {} +-- +-- local npcs = {} +-- local autocompletef +-- +-- function ART.RegisterNPC(npc) +-- assert(npc ~= nil, "Attempted to register a nil npc") +-- assert(npc.Name ~= nil, "Attempted to register an npc without a name") +-- npcs[npc.Name] = npc +-- autocompletef = f.AutocompleteFunction(npcs) +-- end +-- +-- function ART.CreateNPCByName(npcname, pos) +-- print("Createing a " ,npcname ," at ", pos) +-- local npctbl = npcs[npcname] +-- local npc = ents.Create("npc_huntable") +-- npc:SetPos(pos) +-- for k,v in pairs(npctbl) do +-- npc[k] = v +-- end +-- npc:Spawn() +-- return npc +-- end +-- +-- +-- if SERVER then +-- autocompletef = nil +-- else +-- autocompletef = f.AutocompleteFunction(npcs) +-- end +-- concommand.Add("artery_makenpc",function(ply,cmd,args) +-- if not ply:IsAdmin() then return end +-- local n = args[1] +-- ART.CreateNPCByName(n,ply:GetEyeTrace().HitPos) +-- end, +-- autocompletef) |
