Skip to content

Commit

Permalink
Health Down / horsepill support
Browse files Browse the repository at this point in the history
  • Loading branch information
Buurazu authored Aug 22, 2024
1 parent fcfa675 commit 568b96f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion features/eid_modifiers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ end
-- Handle changing health up text for non-red HP players
local function HealthUpCallback(descObj)
local adjustedSubtype = EID:getAdjustedSubtype(descObj.ObjType, descObj.ObjVariant, descObj.ObjSubType)
if descObj.ObjVariant == 70 and descObj.ObjSubType > 2048 then adjustedSubtype = adjustedSubtype + 2048 end -- horsepill exception
local typeVarSub = descObj.ObjType.."."..descObj.ObjVariant.."."..adjustedSubtype

local closestPlayer = EID:ClosestPlayerTo(descObj.Entity)
Expand All @@ -322,7 +323,7 @@ local function HealthUpCallback(descObj)
-- find/replace Health Up lines
local numHearts = EID.HealthUpData[typeVarSub] or 1
local text = EID:getDescriptionEntry("RedToX", "Red to " .. heartType)
local plural = ""; if numHearts ~= 1 then plural = EID:getDescriptionEntry("Pluralize") end
local plural = ""; if numHearts ~= 1 and numHearts ~= -1 then plural = EID:getDescriptionEntry("Pluralize") end

local pos = 1
while pos <= #text do
Expand Down

0 comments on commit 568b96f

Please sign in to comment.