From 5d77d8475af7aff27eb026a4b56065387c024165 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 4 Nov 2017 22:42:24 -0400 Subject: Massive changes * New error messages for missing dependencies * Removed useless art_serverchanger entity * Added a sweet ascii logo * Added Skills * Minor fixes to cl_inventory tracker * Changed a few prints to use logging module --- gamemode/core/npc/cl_npcmap.lua | 19 +++---------------- gamemode/core/npc/cl_shop.lua | 1 - gamemode/core/npc/sv_huntingspawner.lua | 3 ++- 3 files changed, 5 insertions(+), 18 deletions(-) (limited to 'gamemode/core/npc') 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,"!") -- cgit v1.2.3-70-g09d2