Added feature to hide pilleffects till they are used at least once
This commit is contained in:
1 parent
71b19d9f75
commit
e8ad909891
4 files changed
+19
-2
No files matched your search
+10
@@ -1780,3 +1780,13 @@ end
|
||||
function EID:IsGridEntity(entity)
|
||||
return entity.Type == nil
|
||||
end
|
||||
|
||||
-- returns true if the given pilleffect id was used at least once by the current player
|
||||
function EID:WasPillUsed(pillEffectID)
|
||||
local playerID = EID:getPlayerID(EID.player)
|
||||
local pillsTable = EID.PlayerItemInteractions[playerID].pills
|
||||
if EID.player:GetPlayerType() == 38 then
|
||||
pillsTable = EID.PlayerItemInteractions[playerID].altPills or pillsTable
|
||||
end
|
||||
return pillsTable[tostring(pillEffectID)] ~= nil
|
||||
end
|
||||
@@ -245,6 +245,10 @@ EID.UserConfig = {
|
||||
-- REPENTANCE ONLY!!!
|
||||
-- Default = true
|
||||
["DisplayPillInfoOptions?"] = true,
|
||||
-- Keeps pilleffect descriptions unidentified, until the player has used the pill at least once in the run.
|
||||
-- This ignores effects caused by PHD and False PHD
|
||||
-- Default = false
|
||||
["OnlyShowPillWhenUsedAtLeastOnce"] = false,
|
||||
-- Toggle display of description for Pills that haven't been identified yet
|
||||
-- Default = false
|
||||
["ShowUnidentifiedPillDescriptions"] = false,
|
||||
@@ -521,6 +525,7 @@ EID.DefaultConfig = {
|
||||
["DisplayPillInfoShop"] = true,
|
||||
["DisplayPillInfoOptions?"] = true,
|
||||
["DisplayObstructedPillInfo"] = false,
|
||||
["OnlyShowPillWhenUsedAtLeastOnce"] = false,
|
||||
["ShowUnidentifiedPillDescriptions"] = false,
|
||||
["DisplayGlitchedItemInfo"] = debug and true or false,
|
||||
["DisplaySacrificeInfo"] = true,
|
||||
|
||||
@@ -361,6 +361,7 @@ if MCMLoaded then
|
||||
EID:AddBooleanSetting("General", "DisableOnAltPath", "Show Hidden Alt-Path Item", {offText = "True", onText = "False",
|
||||
repOnly = true, infoText = "Show the description for the blind item in Downpour/Mines/etc."})
|
||||
|
||||
EID:AddBooleanSetting("General", "OnlyShowPillWhenUsedAtLeastOnce", "Show pill effect after one use", {infoText = "Keeps pilleffect descriptions unidentified, until the player has used the pill at least once in the run. This ignores effects caused by PHD and False PHD"})
|
||||
EID:AddBooleanSetting("General", "ShowUnidentifiedPillDescriptions", "Show Unidentified Pill Effects")
|
||||
EID:AddBooleanSetting("General", "HideInBattle", "Hide in Battle", {infoText = "Hides the descriptions when in a fight"})
|
||||
|
||||
|
||||
@@ -1465,11 +1465,12 @@ local function onRender(t)
|
||||
|
||||
local pillColor = closest.SubType
|
||||
local pool = game:GetItemPool()
|
||||
local identified = pool:IsPillIdentified(pillColor)
|
||||
local identified = pool:IsPillIdentified(pillColor) and not EID.Config["OnlyShowPillWhenUsedAtLeastOnce"]
|
||||
if REPENTANCE and pillColor % PillColor.PILL_GIANT_FLAG == PillColor.PILL_GOLD then identified = true end
|
||||
local pillEffectID = EID:getAdjustedSubtype(closest.Type, closest.Variant, pillColor)
|
||||
local wasUsed = EID:WasPillUsed(pillEffectID)
|
||||
|
||||
if (identified or EID.Config["ShowUnidentifiedPillDescriptions"]) and not EID.UnidentifyablePillEffects[pillEffectID] then
|
||||
if (identified or wasUsed or EID.Config["ShowUnidentifiedPillDescriptions"]) and not EID.UnidentifyablePillEffects[pillEffectID] then
|
||||
local descEntry = EID:getDescriptionObj(closest.Type, closest.Variant, pillColor, closest)
|
||||
EID:addDescriptionToPrint(descEntry)
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user