Added api feature to set pill effects permanently unidentifyable
This commit is contained in:
1 parent
cae955a307
commit
05933dbe82
4 files changed
+16
-6
No files matched your search
@@ -3,3 +3,4 @@ save2.dat
|
|||||||
save3.dat
|
save3.dat
|
||||||
/scripts/eid_savegames.lua
|
/scripts/eid_savegames.lua
|
||||||
/.vscode
|
/.vscode
|
||||||
|
.luarc.json
|
||||||
@@ -1644,3 +1644,8 @@ end
|
|||||||
function EID:AddIconToObject(eType, eVariant, eSubType, iconName)
|
function EID:AddIconToObject(eType, eVariant, eSubType, iconName)
|
||||||
EID.ObjectIcon[eType.."."..eVariant.."."..eSubType] = EID.InlineIcons[iconName]
|
EID.ObjectIcon[eType.."."..eVariant.."."..eSubType] = EID.InlineIcons[iconName]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Set a pilleffect to be permanently unidentifyable by EID
|
||||||
|
function EID:SetPillEffectUnidentifyable(pillEffectID, isUnidentifyable)
|
||||||
|
EID.UnidentifyablePillEffects[pillEffectID] = isUnidentifyable or nil
|
||||||
|
end
|
||||||
+6
-5
@@ -140,10 +140,10 @@ __eidItemDescriptions[3] = "{{Bomb}} Emote {{Key}} Test {{Test}}{{TestIcon}} {{C
|
|||||||
__eidItemDescriptions[6] = "This item as Inline Icon {{Collectible6}}#And here are others {{Collectible69}} {{Collectible16}} {{Collectible323}} {{Collectible345}} {{Collectible223}}#And some trinket sprites {{Trinket12}} {{Trinket22}} {{Trinket1}} {{Trinket55}} {{Trinket100}} {{Trinket123}}" -- 5.100.2 = Inner Eye
|
__eidItemDescriptions[6] = "This item as Inline Icon {{Collectible6}}#And here are others {{Collectible69}} {{Collectible16}} {{Collectible323}} {{Collectible345}} {{Collectible223}}#And some trinket sprites {{Trinket12}} {{Trinket22}} {{Trinket1}} {{Trinket55}} {{Trinket100}} {{Trinket123}}" -- 5.100.2 = Inner Eye
|
||||||
|
|
||||||
|
|
||||||
EID:addIgnoredEntity(5,100,10)
|
EID:addIgnoredEntity(5,100,10) -- Ignore "Halo of flies" collectible entity
|
||||||
EID:addIgnoredEntity(5,100,11)
|
EID:addIgnoredEntity(5,100,11) -- Ignore "1Up" collectible entry
|
||||||
|
|
||||||
EID:removeIgnoredEntity(5,100,10)
|
EID:removeIgnoredEntity(5,100,10) -- un-Ignore "Halo of flies" collectible entity
|
||||||
|
|
||||||
------ Test: adding custom icons ------
|
------ Test: adding custom icons ------
|
||||||
EID:addColor("ColorTwitterBlue", KColor(0, 0.671875, 0.9296875, 1), nil)
|
EID:addColor("ColorTwitterBlue", KColor(0, 0.671875, 0.9296875, 1), nil)
|
||||||
@@ -159,7 +159,8 @@ EID:addColor("ColorBlackBlink", nil, function(color)
|
|||||||
return color
|
return color
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
-- Test: Pill effect unidentifyable
|
||||||
|
EID:SetPillEffectUnidentifyable(24, true) -- set "I can see forever" to always be unidentifyable
|
||||||
|
|
||||||
local function onDebugRender(t)
|
local function onDebugRender(t)
|
||||||
EID:renderHUDLocationIndicators()
|
EID:renderHUDLocationIndicators()
|
||||||
@@ -181,7 +182,7 @@ local function onDebugRender(t)
|
|||||||
end
|
end
|
||||||
|
|
||||||
for i, v in ipairs(charsToDebug) do
|
for i, v in ipairs(charsToDebug) do
|
||||||
local pos = EID.getTextPosition() + Vector(-5, - 15 + ((i - 1) * 14))
|
local pos = EID:getTextPosition() + Vector(-5, - 15 + ((i - 1) * 14))
|
||||||
EID:renderString(v, pos, Vector(EID.Scale, EID.Scale), KColor(1, 1, 1, 1, 0, 0, 0))
|
EID:renderString(v, pos, Vector(EID.Scale, EID.Scale), KColor(1, 1, 1, 1, 0, 0, 0))
|
||||||
|
|
||||||
if not showDebugChars then
|
if not showDebugChars then
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ EID.CraneItemType = {}
|
|||||||
EID.absorbedItems = {}
|
EID.absorbedItems = {}
|
||||||
EID.CollectedItems = {}
|
EID.CollectedItems = {}
|
||||||
EID.IgnoredEntities = {}
|
EID.IgnoredEntities = {}
|
||||||
|
EID.UnidentifyablePillEffects = {} -- List of pilleffects that are always unidentifyable
|
||||||
local pathsChecked = {}
|
local pathsChecked = {}
|
||||||
local altPathItemChecked = {}
|
local altPathItemChecked = {}
|
||||||
local alwaysUseLocalMode = false -- set to true after drawing a non-local mode description this frame
|
local alwaysUseLocalMode = false -- set to true after drawing a non-local mode description this frame
|
||||||
@@ -1510,7 +1511,9 @@ local function onRender(t)
|
|||||||
local pool = game:GetItemPool()
|
local pool = game:GetItemPool()
|
||||||
local identified = pool:IsPillIdentified(pillColor)
|
local identified = pool:IsPillIdentified(pillColor)
|
||||||
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
|
||||||
if (identified or EID.Config["ShowUnidentifiedPillDescriptions"]) then
|
local pillEffectID = EID:getAdjustedSubtype(closest.Type, closest.Variant, pillColor)
|
||||||
|
|
||||||
|
if (identified 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