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)
|
function EID:IsGridEntity(entity)
|
||||||
return entity.Type == nil
|
return entity.Type == nil
|
||||||
end
|
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!!!
|
-- REPENTANCE ONLY!!!
|
||||||
-- Default = true
|
-- Default = true
|
||||||
["DisplayPillInfoOptions?"] = 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
|
-- Toggle display of description for Pills that haven't been identified yet
|
||||||
-- Default = false
|
-- Default = false
|
||||||
["ShowUnidentifiedPillDescriptions"] = false,
|
["ShowUnidentifiedPillDescriptions"] = false,
|
||||||
@@ -521,6 +525,7 @@ EID.DefaultConfig = {
|
|||||||
["DisplayPillInfoShop"] = true,
|
["DisplayPillInfoShop"] = true,
|
||||||
["DisplayPillInfoOptions?"] = true,
|
["DisplayPillInfoOptions?"] = true,
|
||||||
["DisplayObstructedPillInfo"] = false,
|
["DisplayObstructedPillInfo"] = false,
|
||||||
|
["OnlyShowPillWhenUsedAtLeastOnce"] = false,
|
||||||
["ShowUnidentifiedPillDescriptions"] = false,
|
["ShowUnidentifiedPillDescriptions"] = false,
|
||||||
["DisplayGlitchedItemInfo"] = debug and true or false,
|
["DisplayGlitchedItemInfo"] = debug and true or false,
|
||||||
["DisplaySacrificeInfo"] = true,
|
["DisplaySacrificeInfo"] = true,
|
||||||
|
|||||||
@@ -361,6 +361,7 @@ if MCMLoaded then
|
|||||||
EID:AddBooleanSetting("General", "DisableOnAltPath", "Show Hidden Alt-Path Item", {offText = "True", onText = "False",
|
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."})
|
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", "ShowUnidentifiedPillDescriptions", "Show Unidentified Pill Effects")
|
||||||
EID:AddBooleanSetting("General", "HideInBattle", "Hide in Battle", {infoText = "Hides the descriptions when in a fight"})
|
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 pillColor = closest.SubType
|
||||||
local pool = game:GetItemPool()
|
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
|
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 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)
|
local descEntry = EID:getDescriptionObj(closest.Type, closest.Variant, pillColor, closest)
|
||||||
EID:addDescriptionToPrint(descEntry)
|
EID:addDescriptionToPrint(descEntry)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user