Vurp info for all players!
This commit is contained in:
1 parent
635df219cd
commit
96f3dec561
1 file changed
+24
-22
+24
-22
@@ -466,30 +466,32 @@ if REPENTANCE then
|
|||||||
local function VurpCallback(descObj)
|
local function VurpCallback(descObj)
|
||||||
local adjustedID = EID:getAdjustedSubtype(descObj.ObjType, descObj.ObjVariant, descObj.ObjSubType)
|
local adjustedID = EID:getAdjustedSubtype(descObj.ObjType, descObj.ObjVariant, descObj.ObjSubType)
|
||||||
if adjustedID - 1 ~= PillEffect.PILLEFFECT_VURP then return descObj end
|
if adjustedID - 1 ~= PillEffect.PILLEFFECT_VURP then return descObj end
|
||||||
|
|
||||||
local playerID = EID:getPlayerID(EID.player)
|
for i = 1,#EID.coopAllPlayers do
|
||||||
local pickupHistory = EID.PlayerItemInteractions[playerID].pickupHistory
|
local player = EID.coopAllPlayers[i]
|
||||||
-- Dead Tainted Lazarus exception
|
local playerID = EID:getPlayerID(player)
|
||||||
if EID.player:GetPlayerType() == 38 then
|
local playerType = player:GetPlayerType()
|
||||||
pickupHistory = EID.PlayerItemInteractions[playerID].altPickupHistory or pickupHistory
|
local pickupHistory = EID.PlayerItemInteractions[playerID].pickupHistory
|
||||||
end
|
-- Dead Tainted Lazarus exception
|
||||||
if pickupHistory then
|
if playerType == 38 then
|
||||||
|
pickupHistory = EID.PlayerItemInteractions[playerID].altPickupHistory or pickupHistory
|
||||||
local lastUsedPill = nil
|
|
||||||
local i = 1
|
|
||||||
while (i <= #pickupHistory) do
|
|
||||||
local entry = pickupHistory[i]
|
|
||||||
if entry[1] == "pill" then
|
|
||||||
lastUsedPill = entry[3]
|
|
||||||
break
|
|
||||||
end
|
|
||||||
i = i + 1
|
|
||||||
end
|
end
|
||||||
|
if pickupHistory then
|
||||||
if lastUsedPill then
|
local lastUsedPill = PillEffect.PILLEFFECT_VURP + 1
|
||||||
|
local i = 1
|
||||||
|
while (i <= #pickupHistory) do
|
||||||
|
local entry = pickupHistory[i]
|
||||||
|
if entry[1] == "pill" then
|
||||||
|
lastUsedPill = entry[3]
|
||||||
|
break
|
||||||
|
end
|
||||||
|
i = i + 1
|
||||||
|
end
|
||||||
local tableName = EID:getTableName(descObj.ObjType, descObj.ObjVariant, descObj.ObjSubType)
|
local tableName = EID:getTableName(descObj.ObjType, descObj.ObjVariant, descObj.ObjSubType)
|
||||||
local name = EID:getPillName(lastUsedPill, tableName == "horsepills")
|
local name = EID:getPillName(lastUsedPill, tableName == "horsepills")
|
||||||
EID:appendToDescription(descObj, "#{{Pill}} {{ColorSilver}}" .. name)
|
if #EID.coopAllPlayers == 1 then EID:appendToDescription(descObj, "#{{Pill}}")
|
||||||
|
else EID:appendToDescription(descObj, "#" .. (EID:getIcon("Player"..playerType) ~= EID.InlineIcons["ERROR"] and "{{Player"..playerType.."}}" or ("P" .. i .. ":"))) end
|
||||||
|
EID:appendToDescription(descObj, " {{ColorSilver}}" .. name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return descObj
|
return descObj
|
||||||
@@ -534,7 +536,7 @@ if REPENTANCE then
|
|||||||
if not printedDescs[pillObj.Name] then
|
if not printedDescs[pillObj.Name] then
|
||||||
-- new pill effect to print
|
-- new pill effect to print
|
||||||
printedDescs[pillObj.Name] = true
|
printedDescs[pillObj.Name] = true
|
||||||
EID:appendToDescription(descObj, "#" .. (EID:getIcon("Player"..playerID) ~= EID.InlineIcons["ERROR"] and "{{Player"..playerID.."}}" or "{{CustomTransformation}}").." {{ColorObjName}}"..pillObj.Name .."{{CR}}#"..pillObj.Description)
|
EID:appendToDescription(descObj, "#" .. (EID:getIcon("Player"..playerID) ~= EID.InlineIcons["ERROR"] and "{{Player"..playerID.."}}" or ("P" .. i .. ":")).." {{ColorObjName}}"..pillObj.Name .."{{CR}}#"..pillObj.Description)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
EID.pillPlayer = nil
|
EID.pillPlayer = nil
|
||||||
|
|||||||
Reference in new issue
Block a user