Add last used pill effect info for VURP;
Added Echo Chamber itemreminder feature
This commit is contained in:
1 parent
3b8e2b770e
commit
f8de2683ab
4 files changed
+90
-11
No files matched your search
@@ -462,6 +462,38 @@ if REPENTANCE then
|
||||
return descObj
|
||||
end
|
||||
|
||||
-- Handle VURP description addition
|
||||
local function VurpCallback(descObj)
|
||||
local adjustedID = EID:getAdjustedSubtype(descObj.ObjType, descObj.ObjVariant, descObj.ObjSubType)
|
||||
if adjustedID - 1 ~= PillEffect.PILLEFFECT_VURP then return descObj end
|
||||
|
||||
local playerID = EID.player:GetPlayerType()
|
||||
if EID.PlayerItemInteractions[playerID].history then
|
||||
local pillHistoryTable = EID.PlayerItemInteractions[playerID].history.pills
|
||||
-- Dead Tainted Lazarus
|
||||
if playerID == 38 then
|
||||
pillHistoryTable = EID.PlayerItemInteractions[playerID].history.altPills or pillHistoryTable
|
||||
end
|
||||
|
||||
local lastUsedPill = nil
|
||||
local i = 1
|
||||
while(i <= #pillHistoryTable) do
|
||||
if tonumber(pillHistoryTable[i][1]) ~= PillEffect.PILLEFFECT_VURP + 1 then
|
||||
lastUsedPill = tonumber(pillHistoryTable[i][1])
|
||||
break
|
||||
end
|
||||
i = i +1
|
||||
end
|
||||
|
||||
if lastUsedPill then
|
||||
local tableName = EID:getTableName(descObj.ObjType, descObj.ObjVariant, descObj.ObjSubType)
|
||||
local name = EID:getPillName(lastUsedPill, tableName == "horsepills")
|
||||
EID:appendToDescription(descObj, "#{{Pill}} {{ColorSilver}}"..name)
|
||||
end
|
||||
end
|
||||
return descObj
|
||||
end
|
||||
|
||||
-- Handle False PHD description addition
|
||||
local function FalsePHDCallback(descObj)
|
||||
local adjustedID = EID:getAdjustedSubtype(descObj.ObjType, descObj.ObjVariant, descObj.ObjSubType)
|
||||
@@ -578,6 +610,7 @@ if REPENTANCE then
|
||||
elseif descObj.ObjVariant == PickupVariant.PICKUP_PILL then
|
||||
if EID.collectiblesOwned[654] then table.insert(callbacks, FalsePHDCallback) end
|
||||
if EID.collectiblesOwned[348] then table.insert(callbacks, PlaceboCallback) end
|
||||
table.insert(callbacks, VurpCallback)
|
||||
|
||||
if EID.pillPlayer == nil and #EID.coopAllPlayers > 1 then
|
||||
table.insert(callbacks, CoopPillCallback)
|
||||
|
||||
Reference in new issue
Block a user