Added debug print func

This commit is contained in:
ZioPao
2023-11-12 05:58:45 +01:00
parent 3d963a2ad6
commit 52a4798377
7 changed files with 16 additions and 8 deletions

View File

@@ -40,7 +40,7 @@ end
---Starts bleeding from the point where the saw is being used
function AmputationHandler:damageDuringAmputation()
print("TOC: Damage patient")
TOC_DEBUG.print("damage patient")
local bodyDamage = self.patient:getBodyDamage()
local bodyDamagePart = bodyDamage:getBodyPart(self.bodyPartType)

View File

@@ -47,7 +47,7 @@ function ItemsHandler.RemoveClothingItem(playerObj, clothingItem)
playerObj:removeWornItem(clothingItem)
playerObj:getInventory():Remove(clothingItem) -- Can be a InventoryItem too.. I guess? todo check it
print("TOC: found and deleted " .. tostring(clothingItem))
TOC_DEBUG.print("found and deleted" .. tostring(clothingItem))
return true
end
return false
@@ -87,7 +87,7 @@ end
---Spawns and equips the correct amputation item to the player.
function ItemsHandler.SpawnAmputationItem(playerObj, limbName)
print("Clothing name " .. StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName)
TOC_DEBUG.print("clothing name " .. StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName)
local clothingItem = playerObj:getInventory():AddItem(StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName)
local texId = ItemsHandler.GetAmputationTexturesIndex(playerObj, false)
@@ -108,7 +108,7 @@ function ISInventoryPane:refreshContainer()
for i=1, #self.itemslist do
local cItem = self.itemslist[i]
if cItem and cItem.cat == "Amputation" then
--print("TOC: current item is an amputation, removing it from the list")
TOC_DEBUG.print("current item is an amputation, removing it from the list")
table.remove(self.itemslist, i)
end
end

View File

@@ -88,7 +88,7 @@ end
---Cache the currently amputated limbs
---@param limbName string
function PlayerHandler.AddLocalAmputatedLimb(limbName)
print("TOC: added " .. limbName .. " to known amputated limbs")
TOC_DEBUG.print("added " .. limbName .. " to known amputated limbs")
table.insert(PlayerHandler.amputatedLimbs, limbName) -- TODO This should be player specific, not generic
end

View File

@@ -16,7 +16,7 @@ end
---@param bodyLocation string
---@return boolean
function ProsthesisHandler.CheckIfEquippable(bodyLocation)
print("Current item is a prosthesis")
TOC_DEBUG.print("current item is a prosthesis")
local side = CommonMethods.GetSide(bodyLocation)
for i=1, #PlayerHandler.amputatedLimbs do