aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core/npc
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/core/npc')
-rw-r--r--gamemode/core/npc/cl_npcmap.lua19
-rw-r--r--gamemode/core/npc/cl_shop.lua1
-rw-r--r--gamemode/core/npc/sv_huntingspawner.lua3
3 files changed, 5 insertions, 18 deletions
diff --git a/gamemode/core/npc/cl_npcmap.lua b/gamemode/core/npc/cl_npcmap.lua
index ddbd3cd..8e4477d 100644
--- a/gamemode/core/npc/cl_npcmap.lua
+++ b/gamemode/core/npc/cl_npcmap.lua
@@ -1,14 +1,12 @@
--local tblf = include("/../gamemodes/artery/gamemode/utility/mapfuncs.lua")
-print("Hello from cl_ncpmap in core")
+local log = nrequire("log.lua")
local drawmap = false
hook.Add( "ScoreboardShow", "ShowNPCMap", function()
- print("Showing npc map")
drawmap = true
return true
end )
hook.Add( "ScoreboardHide", "ShowNPCMap", function()
- print("Hiding npc map")
drawmap = false
end )
local white = Color( 255, 255, 255, 255 )
@@ -26,16 +24,11 @@ local mapicons = --[[mapicons or]] {
hook.Add( "HUDPaint", "paintsprites", function()
local function drawsubarea(node)
- print("drawing")
- PrintTable(node)
if node.isleaf then
render.SetMaterial( node.material )
render.DrawSprite( node.pos, 64, 64, white )
- print("Actually drawing")
- PrintTable(node)
else
if not node.icons then
- print("found area without any icons!")
for k,v in pairs(node) do print(k,":",v) end
end
for k,v in pairs(node.icons or {}) do
@@ -44,11 +37,9 @@ hook.Add( "HUDPaint", "paintsprites", function()
end
end
if drawmap then
- print("starting this draw")
cam.Start3D()
drawsubarea(mapicons["global"])
cam.End3D()
- print("done with this draw")
end
end )
@@ -91,8 +82,7 @@ end)
--Add an icon to the map
local function addmapicon(material, subarea, position)
- print("adding map icon, material:",material,"subarea:",subarea,"bordertbl:",bordertbl)
- print("mat",material,"subarea",subarea,"position",position)
+ log.debug("adding map icon, material:",material,"subarea:",subarea,"bordertbl:",bordertbl)
local parts = string.Explode(":",subarea)
-- print("parts:",parts)
-- PrintTable(parts)
@@ -156,17 +146,14 @@ addmaparea("","global",{
]]
net.Receive("addmapicon",function()
- print("got recieve for map icon")
local matstr = net.ReadString()
local subarea = net.ReadString()
local matpos = net.ReadVector()
addmapicon(matstr,subarea,matpos)
- print("MapIcons is now")
- PrintTable(mapicons)
end)
net.Receive("addmaparea",function()
- print("got receive for map area")
+ --print("got receive for map area")
-- local matstr = net.ReadString()
-- local subarea = net.ReadString()
-- local boarders = net.ReadTable()
diff --git a/gamemode/core/npc/cl_shop.lua b/gamemode/core/npc/cl_shop.lua
index 873a37c..9c5ffb2 100644
--- a/gamemode/core/npc/cl_shop.lua
+++ b/gamemode/core/npc/cl_shop.lua
@@ -1,6 +1,5 @@
local inv = nrequire("client/cl_inventory.lua")
local itm = nrequire("core/inventory/item.lua")
-print("in cl_shop inv is", inv)
local w,h = ScrW(),ScrH()
local function DrawShopItemOnDPanel(dp,itemtbl,cost)
--An item is a string, and int cost
diff --git a/gamemode/core/npc/sv_huntingspawner.lua b/gamemode/core/npc/sv_huntingspawner.lua
index 279d834..153b961 100644
--- a/gamemode/core/npc/sv_huntingspawner.lua
+++ b/gamemode/core/npc/sv_huntingspawner.lua
@@ -1,6 +1,7 @@
--[[
This file spawns the huntable npc's in their zones.
]]
+if not nrequire("sh_zones.lua") then return end
local track = nrequire("core/inventory/sv_invtracker.lua")
local itm = nrequire("core/inventory/item.lua")
local o = {}
@@ -34,7 +35,7 @@ local function SpawnMonsterFor(ply,zone)
end
if npctype == nil then
- print(ply,"got lucky this time...")
+ --print(ply,"got lucky this time...")
return
end
--print("I will spawn a ",npctype,"to attack ",ply,"!")