Added Option to display item descriptions for Alt path items
This commit is contained in:
1 parent
4df62c7e66
commit
13072bcee0
2 files changed
+26
-3
No files matched your search
+1
-1
@@ -62,7 +62,7 @@ EID.DefaultConfig = {
|
|||||||
["DisableOnCurse"] = true,
|
["DisableOnCurse"] = true,
|
||||||
-- Disable Item informations for the second Treasure room item on alt paths
|
-- Disable Item informations for the second Treasure room item on alt paths
|
||||||
-- Default = true
|
-- Default = true
|
||||||
["DisableOnAltPath"] = true, -- CURRENTLY NOT WORKING!
|
["DisableOnAltPath"] = true,
|
||||||
----------ITEM NAMES-----------
|
----------ITEM NAMES-----------
|
||||||
|
|
||||||
-- Toggle Display of Collectible / Card and Pill names
|
-- Toggle Display of Collectible / Card and Pill names
|
||||||
|
|||||||
@@ -126,6 +126,29 @@ if EID.Config["DisplaySacrificeInfo"] then
|
|||||||
EID:AddCallback(ModCallbacks.MC_ENTITY_TAKE_DMG, EID.onSacrificeDamage, EntityType.ENTITY_PLAYER)
|
EID:AddCallback(ModCallbacks.MC_ENTITY_TAKE_DMG, EID.onSacrificeDamage, EntityType.ENTITY_PLAYER)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
------------------------Handle ALT FLOOR CHOICE----------------------------
|
||||||
|
if REPENTANCE then
|
||||||
|
local altPathItemCounter = 0
|
||||||
|
|
||||||
|
function EID:onCollectibleInit(pickup)
|
||||||
|
if pickup.FrameCount > 0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
pickup:GetData()["EID_IsAltChoise"] = false
|
||||||
|
if Game():GetRoom():GetType() == RoomType.ROOM_TREASURE and Game():GetLevel():GetStageType() > 3 and pickup.OptionsPickupIndex == 1 then
|
||||||
|
pickup:GetData()["EID_IsAltChoise"] = altPathItemCounter == 1
|
||||||
|
altPathItemCounter = altPathItemCounter + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
EID:AddCallback(ModCallbacks.MC_POST_PICKUP_UPDATE, EID.onCollectibleInit, PickupVariant.PICKUP_COLLECTIBLE)
|
||||||
|
|
||||||
|
function EID:resetAltPathCounter()
|
||||||
|
altPathItemCounter = 0
|
||||||
|
end
|
||||||
|
EID:AddCallback(ModCallbacks.MC_POST_NEW_ROOM, EID.resetAltPathCounter)
|
||||||
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
---------------------------Printing Functions------------------------------
|
---------------------------Printing Functions------------------------------
|
||||||
|
|
||||||
@@ -490,13 +513,13 @@ local function onRender(t)
|
|||||||
EID:printDescription(descriptionObj)
|
EID:printDescription(descriptionObj)
|
||||||
elseif closest.Variant == PickupVariant.PICKUP_COLLECTIBLE then
|
elseif closest.Variant == PickupVariant.PICKUP_COLLECTIBLE then
|
||||||
--Handle Collectibles
|
--Handle Collectibles
|
||||||
if EID:hasCurseBlind() and EID.Config["DisableOnCurse"] then
|
if (EID:hasCurseBlind() and EID.Config["DisableOnCurse"]) or (closest:GetData()["EID_IsAltChoise"] and EID.Config["DisableOnAltPath"]) then
|
||||||
EID:renderQuestionMark()
|
EID:renderQuestionMark()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local descriptionObj = EID:getDescriptionObj(closest.Type, closest.Variant, closest.SubType)
|
local descriptionObj = EID:getDescriptionObj(closest.Type, closest.Variant, closest.SubType)
|
||||||
|
|
||||||
if EID.GameVersion == "rep" then
|
if REPENTANCE then
|
||||||
-- Handle Birthright
|
-- Handle Birthright
|
||||||
if closest.SubType == 619 then
|
if closest.SubType == 619 then
|
||||||
local playerID = player.SubType + 1
|
local playerID = player.SubType + 1
|
||||||
|
|||||||
Reference in new issue
Block a user