Added feature to display preview results when having the Spindown Dice equipped
This commit is contained in:
1 parent
82a01fcda7
commit
51b22b38b4
6 files changed
+57
-1
No files matched your search
@@ -326,6 +326,8 @@ EID.descriptions["en_us"].birthright ={
|
||||
{"Tainted Forgotten Soul", "", "Tainted Soul gains the Recall ability {{Collectible714}}, to automatically retrieve the Tainted Forgotten from a distance"},
|
||||
}
|
||||
|
||||
EID.descriptions["en_us"].spindownError = "Item disappears"
|
||||
|
||||
---------- Trinkets ----------
|
||||
local repTrinkets={
|
||||
[10] = {"10", "", "Tears move in waves#↑ +0.4 Tears up#Grants spectral tears"}, -- Wiggle Worm
|
||||
|
||||
@@ -326,6 +326,8 @@ EID.descriptions["ru"].birthright ={
|
||||
{"Иная Душа Забытого", "", "Получает возможность Родня хранителя {{Collectible714}} "}, --Tainted Forgotten Soul
|
||||
}
|
||||
|
||||
EID.descriptions["ru"].spindownError = "Предмет исчезает"
|
||||
|
||||
---------- Trinkets ----------
|
||||
local repTrinkets={
|
||||
[10] = {"10", "Извивающийся червь", "Слезы двигаются волнами#↑ +0.4 Скорострельность#Дает спектральные слезы"}, -- Wiggle Worm
|
||||
|
||||
@@ -699,6 +699,15 @@ function EID:updateDescriptionsViaTable(changeTable, tableToUpdate)
|
||||
end
|
||||
end
|
||||
|
||||
-- Converts a given CollectibleID into the respective Spindown dice result
|
||||
function EID:getSpindownResult(collectibleID)
|
||||
local newID = collectibleID
|
||||
repeat
|
||||
newID = newID - 1
|
||||
until( EID.SpindownDiceSkipIDs[newID] == nil)
|
||||
return newID
|
||||
end
|
||||
|
||||
-- Creates a copy of a KColor object. This prevents overwriting existing
|
||||
function EID:copyKColor(colorObj)
|
||||
return KColor(colorObj.Red, colorObj.Green, colorObj.Blue, colorObj.Alpha)
|
||||
|
||||
@@ -1,3 +1,26 @@
|
||||
-- Item IDs that are skipped when using the Spindown dice
|
||||
EID.SpindownDiceSkipIDs = {
|
||||
[43]=true,
|
||||
[59]=true,
|
||||
[61]=true,
|
||||
[235]=true,
|
||||
[587]=true,
|
||||
[613]=true,
|
||||
[620]=true,
|
||||
[630]=true,
|
||||
[648]=true,
|
||||
[655]=true,
|
||||
[648]=true,
|
||||
[662]=true,
|
||||
[666]=true,
|
||||
[710]=true,
|
||||
[711]=true,
|
||||
[713]=true,
|
||||
[714]=true,
|
||||
[715]=true,
|
||||
[718]=true
|
||||
}
|
||||
|
||||
-- Specific strings that will be replaced with something else. This is used to convert Shortcuts into internal markup.
|
||||
EID.TextReplacementPairs = {
|
||||
{"!!!", "{{Warning}}"}, -- Turn 3 Exclamations into Warning
|
||||
|
||||
@@ -403,6 +403,26 @@ local function onRender(t)
|
||||
descriptionObj.Description = "{{CustomTransformation}} {{ColorGray}}"..playerName.."{{CR}}#"..birthrightDesc[3]
|
||||
end
|
||||
end
|
||||
-- Handle Spindown Dice description addition
|
||||
if player:GetActiveItem() == 723 then
|
||||
descriptionObj.Description = descriptionObj.Description.."#{{Collectible723}} :"
|
||||
local results = {}
|
||||
local refID = closest.SubType
|
||||
for i = 1,3 do
|
||||
local spinnedID = EID:getSpindownResult(refID)
|
||||
refID = spinnedID
|
||||
if spinnedID > 0 then
|
||||
descriptionObj.Description = descriptionObj.Description.."{{Collectible"..spinnedID.."}}"
|
||||
if i ~=3 then
|
||||
descriptionObj.Description = descriptionObj.Description.." ->"
|
||||
end
|
||||
else
|
||||
local errorMsg = EID.descriptions[EID.Config["Language"]]["spindownError"] or EID.descriptions["en_us"]["spindownError"] or nil
|
||||
descriptionObj.Description = descriptionObj.Description..errorMsg
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
EID:printDescription(descriptionObj)
|
||||
elseif closest.Variant == PickupVariant.PICKUP_TAROTCARD then
|
||||
--Handle Cards & Runes
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ https://moddingofisaac.com/mod/1079/external-item-descriptions
|
||||
- Mert Dutal for creating the [b]Turkish[/b] language pack
|
||||
- [url=https://steamcommunity.com/id/whytefang/]adc[/url] for creating an awesome new Languagepack and providing ideas for new functionalities
|
||||
</description>
|
||||
<version>3.32</version>
|
||||
<version>3.33</version>
|
||||
<visibility>Public</visibility>
|
||||
<tag id="Lua"/>
|
||||
<tag id="Items"/>
|
||||
|
||||
Reference in new issue
Block a user