Added api feature to set pill effects permanently unidentifyable
This commit is contained in:
1 parent
cae955a307
commit
05933dbe82
4 files changed
+18
-8
No files matched your search
+2
-1
@@ -2,4 +2,5 @@ save1.dat
|
||||
save2.dat
|
||||
save3.dat
|
||||
/scripts/eid_savegames.lua
|
||||
/.vscode
|
||||
/.vscode
|
||||
.luarc.json
|
||||
@@ -1643,4 +1643,9 @@ end
|
||||
-- Adds an EID Icon to an Object
|
||||
function EID:AddIconToObject(eType, eVariant, eSubType, iconName)
|
||||
EID.ObjectIcon[eType.."."..eVariant.."."..eSubType] = EID.InlineIcons[iconName]
|
||||
end
|
||||
|
||||
-- Set a pilleffect to be permanently unidentifyable by EID
|
||||
function EID:SetPillEffectUnidentifyable(pillEffectID, isUnidentifyable)
|
||||
EID.UnidentifyablePillEffects[pillEffectID] = isUnidentifyable or nil
|
||||
end
|
||||
+7
-6
@@ -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
|
||||
|
||||
|
||||
EID:addIgnoredEntity(5,100,10)
|
||||
EID:addIgnoredEntity(5,100,11)
|
||||
EID:addIgnoredEntity(5,100,10) -- Ignore "Halo of flies" collectible entity
|
||||
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 ------
|
||||
EID:addColor("ColorTwitterBlue", KColor(0, 0.671875, 0.9296875, 1), nil)
|
||||
@@ -159,7 +159,8 @@ EID:addColor("ColorBlackBlink", nil, function(color)
|
||||
return color
|
||||
end
|
||||
)
|
||||
|
||||
-- Test: Pill effect unidentifyable
|
||||
EID:SetPillEffectUnidentifyable(24, true) -- set "I can see forever" to always be unidentifyable
|
||||
|
||||
local function onDebugRender(t)
|
||||
EID:renderHUDLocationIndicators()
|
||||
@@ -175,13 +176,13 @@ local function onDebugRender(t)
|
||||
["Name"] = "Some Item with seed ".. v.InitSeed ,
|
||||
["Description"] = "Test specific description#Init seed: ".. v.InitSeed,
|
||||
["Transformation"] = "1,2"
|
||||
}
|
||||
}
|
||||
v:GetData()["EID_Description"] = descTable
|
||||
end
|
||||
end
|
||||
|
||||
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))
|
||||
|
||||
if not showDebugChars then
|
||||
|
||||
@@ -37,6 +37,7 @@ EID.CraneItemType = {}
|
||||
EID.absorbedItems = {}
|
||||
EID.CollectedItems = {}
|
||||
EID.IgnoredEntities = {}
|
||||
EID.UnidentifyablePillEffects = {} -- List of pilleffects that are always unidentifyable
|
||||
local pathsChecked = {}
|
||||
local altPathItemChecked = {}
|
||||
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 identified = pool:IsPillIdentified(pillColor)
|
||||
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)
|
||||
EID:addDescriptionToPrint(descEntry)
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user