Added prost notification in health panel
This commit is contained in:
@@ -251,10 +251,11 @@ function DataController:getCicatrizationTime(limbName)
|
||||
end
|
||||
|
||||
---Get isProstEquipped
|
||||
---@param group string
|
||||
---@param limbName string
|
||||
---@return boolean
|
||||
function DataController:getIsProstEquipped(group)
|
||||
return self.tocData.prostheses[group].isProstEquipped
|
||||
function DataController:getIsProstEquipped(limbName)
|
||||
local prostGroup = StaticData.LIMBS_TO_PROST_GROUP_MATCH_IND_STR[limbName]
|
||||
return self.tocData.prostheses[prostGroup].isProstEquipped
|
||||
end
|
||||
|
||||
---Get prostFactor
|
||||
|
||||
@@ -16,7 +16,7 @@ local StaticData = require("TOC/StaticData")
|
||||
|
||||
local function CheckHandFeasibility(limbName)
|
||||
local dcInst = DataController.GetInstance()
|
||||
return not dcInst:getIsCut(limbName) or dcInst:getIsProstEquipped(StaticData.LIMBS_TO_PROST_GROUP_MATCH_IND_STR[limbName])
|
||||
return not dcInst:getIsCut(limbName) or dcInst:getIsProstEquipped(limbName)
|
||||
end
|
||||
|
||||
|
||||
@@ -71,8 +71,7 @@ function ISBaseTimedAction:perform()
|
||||
if dcInst:getIsCut(limbName) and dcInst:getIsVisible(limbName) then
|
||||
local side = CommonMethods.GetSide(limbName)
|
||||
LocalPlayerController.playerObj:getXp():AddXP(Perks["Side_" .. side], 1) -- TODO Make it dynamic
|
||||
local prostGroup = StaticData.LIMBS_TO_PROST_GROUP_MATCH_IND_STR[limbName]
|
||||
if not dcInst:getIsCicatrized(limbName) and dcInst:getIsProstEquipped(prostGroup) then
|
||||
if not dcInst:getIsCicatrized(limbName) and dcInst:getIsProstEquipped(limbName) then
|
||||
TOC_DEBUG.print("Trying for bleed, player met the criteria")
|
||||
LocalPlayerController.TryRandomBleed(self.character, limbName)
|
||||
end
|
||||
|
||||
@@ -185,6 +185,8 @@ function ISHealthBodyPartListBox:doDrawItem(y, item, alt)
|
||||
else
|
||||
self:drawText("- " .. getText("IGUI_HealthPanel_Cicatrized"), x, y, 0.28, 0.89, 0.28, 1, UIFont.Small)
|
||||
end
|
||||
|
||||
y = y + fontHgt
|
||||
else
|
||||
local cicaTime = dcInst:getCicatrizationTime(limbName)
|
||||
|
||||
@@ -196,11 +198,18 @@ function ISHealthBodyPartListBox:doDrawItem(y, item, alt)
|
||||
|
||||
local scaledDirtyness = math.floor(dcInst:getWoundDirtyness(limbName) * 100)
|
||||
self:drawText("- " .. getText("IGUI_HealthPanel_WoundDirtyness") .. string.format(" %d", scaledDirtyness) .. "%", x, y, 0.89, 0.28, 0.28, 1, UIFont.Small)
|
||||
end
|
||||
y = y + fontHgt
|
||||
|
||||
end
|
||||
|
||||
if dcInst:getIsProstEquipped(limbName) then
|
||||
self:drawText("- " .. getText("IGUI_HealthPanel_ProstEquipped"), x, y, 0.28, 0.89, 0.28, 1, UIFont.Small)
|
||||
y = y + fontHgt
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
y = y + 5
|
||||
|
||||
@@ -13,5 +13,6 @@ IG_UI_EN = {
|
||||
IGUI_HealthPanel_Cicatrized = "Cicatrized",
|
||||
IGUI_HealthPanel_Cauterized = "Cauterized",
|
||||
IGUI_HealthPanel_WoundDirtyness = "Wound Dirtyness",
|
||||
IGUI_HealthPanel_ProstEquipped = "Prosthesis Equipped",
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user