diff options
Diffstat (limited to 'gamemode/core/npc')
| -rw-r--r-- | gamemode/core/npc/cl_shop.lua | 11 | ||||
| -rw-r--r-- | gamemode/core/npc/sv_npcsystem.lua | 12 |
2 files changed, 6 insertions, 17 deletions
diff --git a/gamemode/core/npc/cl_shop.lua b/gamemode/core/npc/cl_shop.lua index fa076ce..c2c71bc 100644 --- a/gamemode/core/npc/cl_shop.lua +++ b/gamemode/core/npc/cl_shop.lua @@ -52,12 +52,9 @@ local function DrawShopItemOnDPanel(dp,itemtbl,cost) net.SendToServer() end - print("Displaying shape:") - PrintTable(shape) for k = 1, twidth do for i = 1, theight do if not shape[k][i] then - print("Found false spot:",k,i) local emptyslot = vgui.Create("DPanel", dp) emptyslot:SetSize(slotsize,slotsize) emptyslot:SetPos(slotsize * (i - 1) + 2, slotsize * (k - 1) + 2) @@ -81,9 +78,7 @@ local slotsize = math.Round(w / 32) local function DrawShopOnDPanel(dp,items) --This gets pretty involved, lets try to not make it a clusterfuck. dp.Paint = function(self, wi, hi) draw.RoundedBox(4, 0,0,wi,hi,Color(100,0,0)) end - print("dp",dp) local scrollpanel = vgui.Create( "DScrollPanel",dp ) - print("scollpanel",scrollpanel) scrollpanel.Paint = function(self, wi, hi) draw.RoundedBox(4, 0,0,wi,hi,Color(0,0,100)) end scrollpanel:Dock(FILL) for k,v in pairs(items) do @@ -93,13 +88,10 @@ local function DrawShopOnDPanel(dp,items) draw.RoundedBox(4, 1,1,wi-4,hi-4,Color(50,50,50)) draw.RoundedBox(4, 2,2,wi-5,hi-5,Color(100,100,100)) end - print("invpanel",invpanel) DrawShopItemOnDPanel(invpanel,itemtbl,v[2]) scrollpanel:AddItem(invpanel) invpanel:Dock(TOP) local x,_ = invpanel:GetSize() - print("item is",v) - PrintTable(v) invpanel:SetSize(x,slotsize * (#itemtbl.Shape) + 4) invpanel:Dock(TOP) @@ -110,7 +102,6 @@ end local shopwindow,shoppanel local function createshopwindow() - print("Createing shopwindow") shopwindow = vgui.Create( "DFrame" ) shopwindow:SetPos( w - (w / 4), 0 ) shopwindow:SetSize( w / 4, h ) @@ -129,10 +120,8 @@ end createshopwindow() net.Receive("art_openshop",function() - print("shopwindows was ",shopwindow) if not shopwindow:IsValid() then createshopwindow() end assert(shopwindow,"Shopwindow was not created, even after re-createing!") - print("inv was", inv) inv.ShowInventory() shopwindow:SetVisible(true) local stock = net.ReadTable() diff --git a/gamemode/core/npc/sv_npcsystem.lua b/gamemode/core/npc/sv_npcsystem.lua index 78b041f..c53f6ae 100644 --- a/gamemode/core/npc/sv_npcsystem.lua +++ b/gamemode/core/npc/sv_npcsystem.lua @@ -12,7 +12,7 @@ end function n.CreateNPCByName(npcname, pos) assert(npcs[npcname],string.format("No npc named %q, valid names are:\n%s",npcname,table.concat(table.GetKeys(npcs),"\n"))) - print("Createing a ", npcname, " at ", pos) + --print("Createing a ", npcname, " at ", pos) local npctbl = npcs[npcname] local npc = ents.Create("npc_huntable") npc:SetPos(pos) @@ -28,13 +28,13 @@ end --Creates a shop npc with this tbl function n.CreateShop(npc) - print("Createing shop npc") + --print("Createing shop npc") local npcent = ents.Create("npc_shop") for k,v in pairs(npc) do npcent[k] = v end npcent:Spawn() - print("Called spawn") + --print("Called spawn") end --Creates a townie npc with this tbl @@ -87,11 +87,11 @@ local function loadMap() local foldername = "artery/maps/" .. mapname ExecuteOnFolder(foldername,true,function(path) - print("I want to run",path) + --print("I want to run",path) local filetxt = file.Read(path,"DATA") - print("File text is", filetxt) + --print("File text is", filetxt) CompileString(filetxt,path)() - print("I want to execute",path) + --print("I want to execute",path) end) end |
