Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76504aab4a | ||
|
|
8678c6beab | ||
|
|
034b9e453d | ||
|
|
8d2b86bcdf | ||
|
|
e2133d935a | ||
|
|
37274dad55 | ||
|
|
e11aabe399 | ||
|
|
1c00914e02 | ||
|
|
1022b6428f | ||
|
|
c0c7b3aaf6 | ||
|
|
5bcef4af54 | ||
|
|
f0de6e17fd | ||
|
|
35945ec112 |
No files matched your search
@@ -323,7 +323,7 @@ local repCollectibles={
|
|||||||
[656] = {"656", "Damocles", "<Item not obtainable>"}, -- Damocles
|
[656] = {"656", "Damocles", "<Item not obtainable>"}, -- Damocles
|
||||||
[657] = {"657", "Vasculitis", "Enemies explode into tears upon death, which inherit the effects of Isaac's tears"}, -- Vasculitis
|
[657] = {"657", "Vasculitis", "Enemies explode into tears upon death, which inherit the effects of Isaac's tears"}, -- Vasculitis
|
||||||
[658] = {"658", "Giant Cell", "Spawn micro-Isaacs when taking damage#They chase and shoot at nearby enemies"}, -- Giant Cell
|
[658] = {"658", "Giant Cell", "Spawn micro-Isaacs when taking damage#They chase and shoot at nearby enemies"}, -- Giant Cell
|
||||||
[659] = {"659", "Tropicamide", "↑ {{Range}} +1.5 Range up#↑{{Tearsize}} Tear Size up"}, -- Tropicamide
|
[659] = {"659", "Tropicamide", "↑ {{Range}} +1.5 Range up#↑ {{Tearsize}} Tear Size up"}, -- Tropicamide
|
||||||
[660] = {"660", "Card Reading", "Spawns two portals at the start of each floor#Portals disappear when leaving the room#{{ColorRed}}Red: {{CR}}{{BossRoom}} Boss Room#{{ColorYellow}}Yellow: {{CR}}{{TreasureRoom}} Item Room#{{ColorBlue}}Blue: {{CR}}{{SecretRoom}} Secret Room"}, -- Card Reading
|
[660] = {"660", "Card Reading", "Spawns two portals at the start of each floor#Portals disappear when leaving the room#{{ColorRed}}Red: {{CR}}{{BossRoom}} Boss Room#{{ColorYellow}}Yellow: {{CR}}{{TreasureRoom}} Item Room#{{ColorBlue}}Blue: {{CR}}{{SecretRoom}} Secret Room"}, -- Card Reading
|
||||||
[661] = {"661", "Quints", "Spawns a stationary shooting familiar at the location where an enemy died#Up to 5 familiars"}, -- Quints
|
[661] = {"661", "Quints", "Spawns a stationary shooting familiar at the location where an enemy died#Up to 5 familiars"}, -- Quints
|
||||||
[662] = {"662", "Pacifist (Cut item)", "<Item does not exist>"}, -- Pacifist (Cut item)
|
[662] = {"662", "Pacifist (Cut item)", "<Item does not exist>"}, -- Pacifist (Cut item)
|
||||||
@@ -358,7 +358,7 @@ local repCollectibles={
|
|||||||
[691] = {"691", "Sacred Orb", "Prevents Quality {{Quality0}}/{{Quality1}} items from spawning#33% chance to reroll items with Quality {{Quality2}} to Quality {{Quality3}} or {{Quality4}}"}, -- Sacred Orb
|
[691] = {"691", "Sacred Orb", "Prevents Quality {{Quality0}}/{{Quality1}} items from spawning#33% chance to reroll items with Quality {{Quality2}} to Quality {{Quality3}} or {{Quality4}}"}, -- Sacred Orb
|
||||||
[692] = {"692", "Sanguine Bond", "Spawns a set of spikes in the {{DevilRoom}}Devil Room#Taking damage from the spikes can grant a reward:#35%: Nothing#33%: ↑ {{Damage}} +0.5 Damage up#15%: {{Coin}} 6 pennies#10%: {{BlackHeart}} 2 Black Hearts#5%: {{DevilRoom}} Random Devil item#2%: Leviathan transformation"}, -- Sanguine Bond //PERCENTAGES NOT CONFIRMED, updated in patch, taken from Wiki
|
[692] = {"692", "Sanguine Bond", "Spawns a set of spikes in the {{DevilRoom}}Devil Room#Taking damage from the spikes can grant a reward:#35%: Nothing#33%: ↑ {{Damage}} +0.5 Damage up#15%: {{Coin}} 6 pennies#10%: {{BlackHeart}} 2 Black Hearts#5%: {{DevilRoom}} Random Devil item#2%: Leviathan transformation"}, -- Sanguine Bond //PERCENTAGES NOT CONFIRMED, updated in patch, taken from Wiki
|
||||||
[693] = {"693", "The Swarm", "Grants 8 orbital flies which turn into Blue Flies after they block a shot#Spawns a new fly every room cleared"}, -- The Swarm
|
[693] = {"693", "The Swarm", "Grants 8 orbital flies which turn into Blue Flies after they block a shot#Spawns a new fly every room cleared"}, -- The Swarm
|
||||||
[694] = {"694", "Heartbreak", "{{BrokenHeart}}Grants 3 broken hearts#↑ {{Damage}} +0.25 Damage for every broken heart#Every fatal hit will add 2 more broken hearts#You die at 12 broken hearts"}, -- Heartbreak
|
[694] = {"694", "Heartbreak", "{{BrokenHeart}} Grants 3 broken hearts#↑ {{Damage}} +0.25 Damage for every broken heart#Every fatal hit will add 2 more broken hearts#You die at 12 broken hearts"}, -- Heartbreak
|
||||||
[695] = {"695", "Bloody Gust", "When taking damage, gain speed and tears up for the current floor#Up to +1.02 Speed and +3 Fire Rate possible"}, -- Bloody Gust
|
[695] = {"695", "Bloody Gust", "When taking damage, gain speed and tears up for the current floor#Up to +1.02 Speed and +3 Fire Rate possible"}, -- Bloody Gust
|
||||||
[696] = {"696", "Salvation", "Grants halo that spawns beams of light on enemies inside it#The halo grows larger the more damage you've taken this floor"}, -- Salvation
|
[696] = {"696", "Salvation", "Grants halo that spawns beams of light on enemies inside it#The halo grows larger the more damage you've taken this floor"}, -- Salvation
|
||||||
[697] = {"697", "Vanishing Twin", "Familiar that becomes a clone of the boss when entering the boss room#Defeating it drops an extra item#Clone is slower and has 75% of the original boss health"}, -- Vanishing Twin
|
[697] = {"697", "Vanishing Twin", "Familiar that becomes a clone of the boss when entering the boss room#Defeating it drops an extra item#Clone is slower and has 75% of the original boss health"}, -- Vanishing Twin
|
||||||
@@ -394,7 +394,7 @@ local repCollectibles={
|
|||||||
[727] = {"727", "Ghost Bombs", "{{Bomb}} +5 bombs#Bombs spawn ghosts that deal contact damage and explode after 10 seconds"}, -- Ghost Bombs
|
[727] = {"727", "Ghost Bombs", "{{Bomb}} +5 bombs#Bombs spawn ghosts that deal contact damage and explode after 10 seconds"}, -- Ghost Bombs
|
||||||
[728] = {"728", "Gello", "Spawns a demon familiar that's attached to Isaac#Mimics Isaac's tears, stats and effects"}, -- Gello
|
[728] = {"728", "Gello", "Spawns a demon familiar that's attached to Isaac#Mimics Isaac's tears, stats and effects"}, -- Gello
|
||||||
[729] = {"729", "Decap Attack", "Throws Isaac's head, dealing contact damage and shooting tears from where it lands#Reactivating the item or stepping on the head reattaches it"}, -- Decap Attack
|
[729] = {"729", "Decap Attack", "Throws Isaac's head, dealing contact damage and shooting tears from where it lands#Reactivating the item or stepping on the head reattaches it"}, -- Decap Attack
|
||||||
[730] = {"730", "Glass Eye", "↑{{Damage}} +0.75 Damage up#↑ {{Luck}} +1 Luck up"}, -- Glass Eye
|
[730] = {"730", "Glass Eye", "↑ {{Damage}} +0.75 Damage up#↑ {{Luck}} +1 Luck up"}, -- Glass Eye
|
||||||
[731] = {"731", "Stye", "!!! Applies only for the right eye#↑ {{Damage}} +28% Damage up#↑ {{Range}} +7 Range up#↓ {{Shotspeed}} -0.3 Shot Speed down"}, -- Stye
|
[731] = {"731", "Stye", "!!! Applies only for the right eye#↑ {{Damage}} +28% Damage up#↑ {{Range}} +7 Range up#↓ {{Shotspeed}} -0.3 Shot Speed down"}, -- Stye
|
||||||
[732] = {"732", "Mom's Ring", "↑ {{Damage}} +1 Damage up#{{Rune}} Spawns a random rune or soul stone on pickup"}, -- Mom's Ring
|
[732] = {"732", "Mom's Ring", "↑ {{Damage}} +1 Damage up#{{Rune}} Spawns a random rune or soul stone on pickup"}, -- Mom's Ring
|
||||||
|
|
||||||
|
|||||||
+81
-4
@@ -43,6 +43,36 @@ function EID:addTrinket(id, description, itemName, language)
|
|||||||
EID.descriptions[language].custom["5.350." .. id] = {id, itemName, description, EID._currentMod}
|
EID.descriptions[language].custom["5.350." .. id] = {id, itemName, description, EID._currentMod}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Adds information about appending text and multiplying numbers in a modded trinket's Golden/Mom's Box description. All three variables are optional, set to ""/0 or nil to not include them
|
||||||
|
-- appendText can be 1 string, or a table of 2 strings; one for doubling and one for tripling
|
||||||
|
-- numbersToMultiply can be 1 number, or a table of numbers
|
||||||
|
-- maxMultiplier is what tripling (Golden+Mom's Box) should multiply the numbers by (normally 3)
|
||||||
|
-- (If it's less than 2, it also applies to doubling)
|
||||||
|
-- Example: My modded trinket gives +0.5 range, and when tripled, adds homing instead of tripling the range boost
|
||||||
|
-- EID:addGoldenTrinketMetadata(Isaac.GetTrinketIdByName("Cool Trinket"), {"", "Homing tears"}, 0.5, 2)
|
||||||
|
function EID:addGoldenTrinketMetadata(id, appendText, numbersToMultiply, maxMultiplier, language)
|
||||||
|
maxMultiplier = maxMultiplier or 3
|
||||||
|
language = language or "en_us"
|
||||||
|
|
||||||
|
if appendText == "" then appendText = nil
|
||||||
|
elseif type(appendText) == "string" then appendText = {appendText} end
|
||||||
|
|
||||||
|
if numbersToMultiply == 0 then numbersToMultiply = nil
|
||||||
|
elseif type(numbersToMultiply) == "number" then numbersToMultiply = {numbersToMultiply} end
|
||||||
|
|
||||||
|
EID.GoldenTrinketData[id] = {t = numbersToMultiply, mult = maxMultiplier, append = appendText and true}
|
||||||
|
if appendText then
|
||||||
|
EID.descriptions[language].goldenTrinketEffects[id] = { appendText[1], appendText[1], appendText[2] or appendText[1] }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Add a fully custom data table to the table of Golden Trinket effects
|
||||||
|
-- Check the comments above EID.GoldenTrinketData in eid_data.lua for some info about what is possible
|
||||||
|
-- You may also want to add text entries into EID.descriptions[languageCode].goldenTrinketEffects
|
||||||
|
function EID:addGoldenTrinketTable(id, dataTable)
|
||||||
|
EID.GoldenTrinketData[id] = dataTable
|
||||||
|
end
|
||||||
|
|
||||||
-- Adds a description for a card/rune. Optional parameters: itemName, language
|
-- Adds a description for a card/rune. Optional parameters: itemName, language
|
||||||
function EID:addCard(id, description, itemName, language)
|
function EID:addCard(id, description, itemName, language)
|
||||||
itemName = itemName or nil
|
itemName = itemName or nil
|
||||||
@@ -320,6 +350,8 @@ function EID:getDescriptionObj(Type, Variant, SubType, entity, checkModifiers)
|
|||||||
description.Transformation = EID:getTransformation(Type, Variant, SubType)
|
description.Transformation = EID:getTransformation(Type, Variant, SubType)
|
||||||
|
|
||||||
description.ModName = tableEntry and tableEntry[4]
|
description.ModName = tableEntry and tableEntry[4]
|
||||||
|
description.Quality = EID:getObjectQuality(description)
|
||||||
|
description.Icon = EID:getObjectIcon(description)
|
||||||
|
|
||||||
if checkModifiers ~= false then
|
if checkModifiers ~= false then
|
||||||
for _,modifier in ipairs(EID.DescModifiers) do
|
for _,modifier in ipairs(EID.DescModifiers) do
|
||||||
@@ -591,12 +623,12 @@ function EID:createItemIconObject(str)
|
|||||||
local cardID,numReplace3 = string.gsub(str, "Card", "")
|
local cardID,numReplace3 = string.gsub(str, "Card", "")
|
||||||
if numReplace3 > 0 and cardID ~= "" and tonumber(cardID) ~= nil then
|
if numReplace3 > 0 and cardID ~= "" and tonumber(cardID) ~= nil then
|
||||||
if tonumber(cardID) > maxCardID then return EID.InlineIcons[str] or EID.InlineIcons["Blank"] end
|
if tonumber(cardID) > maxCardID then return EID.InlineIcons[str] or EID.InlineIcons["Blank"] end
|
||||||
return {"Cards",tonumber(cardID)-1,8,8,0,1,EID.CardPillSprite}
|
return {"Cards", tonumber(cardID)-1, 8, 8, 0, 1, EID.CardPillSprite}
|
||||||
end
|
end
|
||||||
local pillID,numReplace4 = string.gsub(str, "Pill", "")
|
local pillID,numReplace4 = string.gsub(str, "Pill", "")
|
||||||
if numReplace4 > 0 and pillID ~= "" and tonumber(pillID) ~= nil then
|
if numReplace4 > 0 and pillID ~= "" and tonumber(pillID) ~= nil then
|
||||||
if tonumber(pillID) > maxPillID then return EID.InlineIcons[str] or EID.InlineIcons["Blank"] end
|
if tonumber(pillID) > maxPillID then return EID.InlineIcons[str] or EID.InlineIcons["Blank"] end
|
||||||
return {"Pills",tonumber(pillID)-1,9,8,0,1,EID.CardPillSprite}
|
return {"Pills", tonumber(pillID)-1, 9, 8, 0, 1, EID.CardPillSprite}
|
||||||
end
|
end
|
||||||
if item == nil then
|
if item == nil then
|
||||||
return nil
|
return nil
|
||||||
@@ -608,7 +640,7 @@ function EID:createItemIconObject(str)
|
|||||||
spriteDummy:Load("gfx/eid_inline_icons.anm2", true)
|
spriteDummy:Load("gfx/eid_inline_icons.anm2", true)
|
||||||
spriteDummy:ReplaceSpritesheet(1, item.GfxFileName)
|
spriteDummy:ReplaceSpritesheet(1, item.GfxFileName)
|
||||||
spriteDummy:LoadGraphics()
|
spriteDummy:LoadGraphics()
|
||||||
local newDynamicSprite = {"ItemIcon",0,11,8,-2,-2,spriteDummy}
|
local newDynamicSprite = {"ItemIcon", 0, 11, 8, -2, -2, spriteDummy}
|
||||||
dynamicSpriteCache[str] = newDynamicSprite
|
dynamicSpriteCache[str] = newDynamicSprite
|
||||||
return newDynamicSprite
|
return newDynamicSprite
|
||||||
end
|
end
|
||||||
@@ -690,7 +722,7 @@ end
|
|||||||
-- Returns the icon used for the bulletpoint. It will look at the first word in the given string.
|
-- Returns the icon used for the bulletpoint. It will look at the first word in the given string.
|
||||||
-- Also returns the first word if it was rejected (so it can be removed from the line)
|
-- Also returns the first word if it was rejected (so it can be removed from the line)
|
||||||
function EID:handleBulletpointIcon(text)
|
function EID:handleBulletpointIcon(text)
|
||||||
local firstWord = string.match(text, "([^%s]+)")
|
local firstWord = EID:removeColorMarkup(string.match(text, "([^%s]+)"))
|
||||||
if EID:getIcon(firstWord) ~= EID.InlineIcons["ERROR"] and string.find(firstWord, "{{.-}}")~=nil then
|
if EID:getIcon(firstWord) ~= EID.InlineIcons["ERROR"] and string.find(firstWord, "{{.-}}")~=nil then
|
||||||
if not EID.Config["StatAndPickupBulletpoints"] and EID.StatPickupBulletpointBlacklist[firstWord] then
|
if not EID.Config["StatAndPickupBulletpoints"] and EID.StatPickupBulletpointBlacklist[firstWord] then
|
||||||
return "\007", firstWord
|
return "\007", firstWord
|
||||||
@@ -750,6 +782,14 @@ function EID:filterColorMarkup(text, baseKColor)
|
|||||||
return textPartsTable
|
return textPartsTable
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- A simple function to remove color markup, to preserve bulletpoint icons after start-of-line color markup
|
||||||
|
function EID:removeColorMarkup(text)
|
||||||
|
for word in string.gmatch(text, "{{Color.-}}") do
|
||||||
|
text = string.gsub(text, word, "", 1)
|
||||||
|
end
|
||||||
|
return text
|
||||||
|
end
|
||||||
|
|
||||||
-- A simple function to replace all markup {{ }} with placeholder strings, to use in fitTextToWidth
|
-- A simple function to replace all markup {{ }} with placeholder strings, to use in fitTextToWidth
|
||||||
function EID:replaceAllMarkupWithSpaces(text, checkBulletpoint)
|
function EID:replaceAllMarkupWithSpaces(text, checkBulletpoint)
|
||||||
if checkBulletpoint then
|
if checkBulletpoint then
|
||||||
@@ -1528,3 +1568,40 @@ function EID:evaluateQueuedItems()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Returns the quality of the described entity
|
||||||
|
function EID:getObjectQuality(descObj)
|
||||||
|
if REPENTANCE and descObj.ObjType == 5 and descObj.ObjVariant == 100 then
|
||||||
|
return tonumber(EID.itemConfig:GetCollectible(tonumber(descObj.ObjSubType)).Quality)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Returns the Inline Icon definition object for a given object.
|
||||||
|
EID.ObjectIcon = {}
|
||||||
|
function EID:getObjectIcon(descObj)
|
||||||
|
-- custom object icon
|
||||||
|
if EID.ObjectIcon[descObj.ObjType.."."..descObj.ObjVariant.."."..descObj.ObjSubType] then
|
||||||
|
return EID.ObjectIcon[descObj.ObjType.."."..descObj.ObjVariant.."."..descObj.ObjSubType]
|
||||||
|
end
|
||||||
|
|
||||||
|
if descObj.ObjType == 5 then
|
||||||
|
if descObj.ObjVariant == 100 then
|
||||||
|
return EID:createItemIconObject("Collectible" .. descObj.ObjSubType)
|
||||||
|
elseif descObj.ObjVariant == 350 then
|
||||||
|
return EID:createItemIconObject("Trinket" .. descObj.ObjSubType)
|
||||||
|
elseif descObj.ObjVariant == 300 then
|
||||||
|
return EID:createItemIconObject("Card" .. descObj.ObjSubType)
|
||||||
|
elseif descObj.ObjVariant == 70 then
|
||||||
|
if descObj.ObjSubType >= 2049 then
|
||||||
|
return EID:createItemIconObject("Pill" .. (descObj.ObjSubType - 2048))
|
||||||
|
end
|
||||||
|
return EID:createItemIconObject("Pill" .. descObj.ObjSubType)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Adds an EID Icon to an Object
|
||||||
|
function EID:AddIconToObject(eType, eVariant, eSubType, iconName)
|
||||||
|
EID.ObjectIcon[eType.."."..eVariant.."."..eSubType] = EID.InlineIcons[iconName]
|
||||||
|
end
|
||||||
@@ -789,6 +789,7 @@ local newResults = {}
|
|||||||
local skipRandom = false
|
local skipRandom = false
|
||||||
local isRefresh = false
|
local isRefresh = false
|
||||||
local queryString = ""
|
local queryString = ""
|
||||||
|
local displayingRecipeList = false
|
||||||
|
|
||||||
local function RecipeCrunchCoroutine()
|
local function RecipeCrunchCoroutine()
|
||||||
coTimer = Isaac.GetTime()
|
coTimer = Isaac.GetTime()
|
||||||
@@ -894,7 +895,7 @@ function EID:handleBagOfCraftingUpdating()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Check for Hold Tab key inputs
|
-- Check for Hold Tab key inputs
|
||||||
if Input.IsActionPressed(EID.Config["BagOfCraftingToggleKey"], EID.bagPlayer.ControllerIndex) then
|
if displayingRecipeList and Input.IsActionPressed(EID.Config["BagOfCraftingToggleKey"], EID.bagPlayer.ControllerIndex) then
|
||||||
EID.bagPlayer.ControlsCooldown = 2
|
EID.bagPlayer.ControlsCooldown = 2
|
||||||
if Input.IsActionTriggered(ButtonAction.ACTION_SHOOTDOWN, EID.bagPlayer.ControllerIndex) then
|
if Input.IsActionTriggered(ButtonAction.ACTION_SHOOTDOWN, EID.bagPlayer.ControllerIndex) then
|
||||||
bagOfCraftingOffset = math.min(numResults-(numResults%EID.Config["BagOfCraftingResults"]), bagOfCraftingOffset + EID.Config["BagOfCraftingResults"])
|
bagOfCraftingOffset = math.min(numResults-(numResults%EID.Config["BagOfCraftingResults"]), bagOfCraftingOffset + EID.Config["BagOfCraftingResults"])
|
||||||
@@ -940,9 +941,11 @@ end
|
|||||||
-- Called when needed based on EID.Config["RefreshRate"]
|
-- Called when needed based on EID.Config["RefreshRate"]
|
||||||
function EID:handleBagOfCraftingRendering(ignoreRefreshRate)
|
function EID:handleBagOfCraftingRendering(ignoreRefreshRate)
|
||||||
-- Determine if we should display anything at all
|
-- Determine if we should display anything at all
|
||||||
if ((EID.isHidden or craftingIsHidden) and EID.MCMCompat_isDisplayingEIDTab ~= "Crafting") or game.Challenge == Challenge.CHALLENGE_CANTRIPPED then
|
if not EID:RefreshThisFrame() and not ignoreRefreshRate then
|
||||||
return false
|
return false
|
||||||
elseif not EID:RefreshThisFrame() and not ignoreRefreshRate then
|
end
|
||||||
|
displayingRecipeList = false
|
||||||
|
if ((EID.isHidden or craftingIsHidden) and EID.MCMCompat_isDisplayingEIDTab ~= "Crafting") or game.Challenge == Challenge.CHALLENGE_CANTRIPPED then
|
||||||
return false
|
return false
|
||||||
elseif EID.Config["BagOfCraftingHideInBattle"] then
|
elseif EID.Config["BagOfCraftingHideInBattle"] then
|
||||||
if Isaac.CountBosses() > 0 or Isaac.CountEnemies() > 0 then
|
if Isaac.CountBosses() > 0 or Isaac.CountEnemies() > 0 then
|
||||||
@@ -1070,6 +1073,7 @@ function EID:handleBagOfCraftingRendering(ignoreRefreshRate)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Recipe List display
|
-- Recipe List display
|
||||||
|
displayingRecipeList = true
|
||||||
if sortNeeded then
|
if sortNeeded then
|
||||||
sortAllItems()
|
sortAllItems()
|
||||||
sortNeeded = false
|
sortNeeded = false
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ local dummySprite2 = Sprite()
|
|||||||
dummySprite2:Load("gfx/eid_inline_icons.anm2", true)
|
dummySprite2:Load("gfx/eid_inline_icons.anm2", true)
|
||||||
-- add animated icon using api function (Make sure to create new Sprite Obj when using animated icons. Reuse objects when only using static icons)
|
-- add animated icon using api function (Make sure to create new Sprite Obj when using animated icons. Reuse objects when only using static icons)
|
||||||
EID:addIcon("TestIcon", "hearts", -1, 9, 9, -1, 0, dummySprite2)
|
EID:addIcon("TestIcon", "hearts", -1, 9, 9, -1, 0, dummySprite2)
|
||||||
|
EID:AddIconToObject(5, 100, 1, "TestIcon")
|
||||||
|
|
||||||
|
|
||||||
-- add icon directly
|
-- add icon directly
|
||||||
|
|||||||
+10
-5
@@ -373,23 +373,28 @@ if REPENTANCE then
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
--replacing a phrase, such as "half a heart"
|
--replacing a phrase, such as "half a heart"
|
||||||
elseif data.findReplace then
|
if data.findReplace then
|
||||||
local textTable = EID:getDescriptionEntry("goldenTrinketEffects", trinketID)
|
local textTable = EID:getDescriptionEntry("goldenTrinketEffects", trinketID)
|
||||||
if textTable then
|
if textTable then
|
||||||
descObj.Description, count = string.gsub(descObj.Description, textTable[1], "{{ColorGold}}" .. textTable[multiplier] .. "{{ColorText}}", 1)
|
descObj.Description, count = string.gsub(descObj.Description, textTable[1], "{{ColorGold}}" .. textTable[multiplier] .. "{{ColorText}}", 1)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
--append some new text to the description
|
--append some new text to the description
|
||||||
elseif data.append then
|
if data.append then
|
||||||
local textTable = EID:getDescriptionEntry("goldenTrinketEffects", trinketID)
|
local textTable = EID:getDescriptionEntry("goldenTrinketEffects", trinketID)
|
||||||
if textTable then
|
if textTable then
|
||||||
textChoice = math.min(textChoice, #textTable) -- some items have only 1 append description
|
textChoice = math.min(textChoice, #textTable) -- some items have only 1 append description
|
||||||
descObj.Description = descObj.Description .. "#{{ColorGold}}" .. textTable[textChoice]
|
if textTable[textChoice] ~= "" then
|
||||||
count = 1
|
descObj.Description = descObj.Description .. "#{{ColorGold}}" .. textTable[textChoice]
|
||||||
|
count = 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
--the nuclear option: replacing the entire description; 1 = Gold, 2 = Mom's Box, 3 = Both
|
--the nuclear option: replacing the entire description; 1 = Gold, 2 = Mom's Box, 3 = Both
|
||||||
--only replace if the chosen language has defined it
|
--only replace if the chosen language has defined it
|
||||||
elseif data.fullReplace then
|
if data.fullReplace then
|
||||||
local textTable = EID:getDescriptionEntry("goldenTrinketEffects", trinketID, true)
|
local textTable = EID:getDescriptionEntry("goldenTrinketEffects", trinketID, true)
|
||||||
if (textTable) then
|
if (textTable) then
|
||||||
textChoice = math.min(textChoice, #textTable)
|
textChoice = math.min(textChoice, #textTable)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ local game = Game()
|
|||||||
require("eid_config")
|
require("eid_config")
|
||||||
EID.Config = EID.UserConfig
|
EID.Config = EID.UserConfig
|
||||||
EID.Config.Version = "3.2" -- note: changing this will reset everyone's settings to default!
|
EID.Config.Version = "3.2" -- note: changing this will reset everyone's settings to default!
|
||||||
EID.ModVersion = "4.26"
|
EID.ModVersion = "4.27"
|
||||||
EID.DefaultConfig.Version = EID.Config.Version
|
EID.DefaultConfig.Version = EID.Config.Version
|
||||||
EID.isHidden = false
|
EID.isHidden = false
|
||||||
EID.player = nil -- The primary Player Entity of Player 1
|
EID.player = nil -- The primary Player Entity of Player 1
|
||||||
@@ -477,7 +477,8 @@ function EID:printDescriptions(useCached)
|
|||||||
-- Do the description entities match, and the description texts match?
|
-- Do the description entities match, and the description texts match?
|
||||||
for i,newDesc in ipairs(EID.descriptionsToPrint) do
|
for i,newDesc in ipairs(EID.descriptionsToPrint) do
|
||||||
local oldDesc = EID.previousDescs[i]
|
local oldDesc = EID.previousDescs[i]
|
||||||
if newDesc.Description ~= oldDesc.Description or (newDesc.Entity and oldDesc.Entity and GetPtrHash(newDesc.Entity) ~= GetPtrHash(oldDesc.Entity)) then
|
if newDesc.Description ~= oldDesc.Description or newDesc.Name ~= oldDesc.Name or
|
||||||
|
(newDesc.Entity and oldDesc.Entity and GetPtrHash(newDesc.Entity) ~= GetPtrHash(oldDesc.Entity)) then
|
||||||
EID:printNewDescriptions()
|
EID:printNewDescriptions()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -522,7 +523,6 @@ function EID:printDescription(desc, cachedID)
|
|||||||
end
|
end
|
||||||
local renderPos = EID:getTextPosition()
|
local renderPos = EID:getTextPosition()
|
||||||
|
|
||||||
--print(cachedID)
|
|
||||||
if cachedID then
|
if cachedID then
|
||||||
local localModeDiff = renderPos - EID.CachedRenderPoses[cachedID]
|
local localModeDiff = renderPos - EID.CachedRenderPoses[cachedID]
|
||||||
-- Drawing our currently saved description
|
-- Drawing our currently saved description
|
||||||
@@ -556,33 +556,11 @@ function EID:printDescription(desc, cachedID)
|
|||||||
local textScale = Vector(EID.Scale, EID.Scale)
|
local textScale = Vector(EID.Scale, EID.Scale)
|
||||||
local offsetX = 0
|
local offsetX = 0
|
||||||
EID.lineHeight = EID.Config["LineHeight"]
|
EID.lineHeight = EID.Config["LineHeight"]
|
||||||
if EID.Config["ShowItemIcon"] then
|
if EID.Config["ShowItemIcon"] and desc.Icon then
|
||||||
local iconType = nil
|
offsetX = offsetX + 14
|
||||||
local subType = desc.ObjSubType
|
EID:renderInlineIcons({{desc.Icon,0}}, renderPos.X - 3 * EID.Scale, renderPos.Y - 4 * EID.Scale)
|
||||||
if desc.ObjType == 5 then
|
|
||||||
if desc.ObjVariant == 100 then
|
|
||||||
iconType = "Collectible"
|
|
||||||
elseif desc.ObjVariant == 350 then
|
|
||||||
iconType = "Trinket"
|
|
||||||
elseif desc.ObjVariant == 300 then
|
|
||||||
iconType = "Card"
|
|
||||||
elseif desc.ObjVariant == 70 then
|
|
||||||
iconType = "Pill"
|
|
||||||
if subType >= 2049 then
|
|
||||||
subType = subType - 2048
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if iconType ~= nil then
|
|
||||||
offsetX = offsetX + 14
|
|
||||||
EID:renderString(
|
|
||||||
"{{" .. iconType .. subType .. "}}",
|
|
||||||
renderPos + (Vector(-3, -4) * EID.Scale),
|
|
||||||
textScale,
|
|
||||||
EID:getNameColor()
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--Display ItemType / Charge
|
--Display ItemType / Charge
|
||||||
local itemType = -1
|
local itemType = -1
|
||||||
if desc.ObjSubType ~= nil and desc.ObjType == 5 and desc.ObjVariant == 100 then
|
if desc.ObjSubType ~= nil and desc.ObjType == 5 and desc.ObjVariant == 100 then
|
||||||
@@ -632,9 +610,8 @@ function EID:printDescription(desc, cachedID)
|
|||||||
curName = curName.." {{ColorGray}}"..desc.ObjType.."."..desc.ObjVariant.."."..desc.ObjSubType
|
curName = curName.." {{ColorGray}}"..desc.ObjType.."."..desc.ObjVariant.."."..desc.ObjSubType
|
||||||
end
|
end
|
||||||
-- Display Quality
|
-- Display Quality
|
||||||
if REPENTANCE and EID.Config["ShowQuality"] and desc.ObjVariant == PickupVariant.PICKUP_COLLECTIBLE then
|
if EID.Config["ShowQuality"] and desc.Quality then
|
||||||
local quality = tonumber(EID.itemConfig:GetCollectible(tonumber(desc.ObjSubType)).Quality)
|
curName = curName.." - {{Quality"..desc.Quality.."}}"
|
||||||
curName = curName.." - {{Quality"..quality.."}}"
|
|
||||||
end
|
end
|
||||||
-- Display the mod this item is from
|
-- Display the mod this item is from
|
||||||
if desc.ModName then
|
if desc.ModName then
|
||||||
@@ -1062,8 +1039,9 @@ local function attemptPathfind(entity)
|
|||||||
if pathsChecked[entity.InitSeed] == false and EID.GameUpdateCount - lastPathfindFrame < 10 then return false end
|
if pathsChecked[entity.InitSeed] == false and EID.GameUpdateCount - lastPathfindFrame < 10 then return false end
|
||||||
|
|
||||||
-- Spawn a Shopkeeper entity to attempt a pathfind to the target pickup, then remove it afterwards
|
-- Spawn a Shopkeeper entity to attempt a pathfind to the target pickup, then remove it afterwards
|
||||||
pathCheckerEntity = game:Spawn(17, 0, EID.player.Position, nullVector, EID.player, 0, 4354)
|
pathCheckerEntity = game:Spawn(17, 0, EID.player.Position, nullVector, EID.player, 6969, 4354)
|
||||||
|
pathCheckerEntity:GetData()["EID_Pathfinder"] = true
|
||||||
|
pathCheckerEntity.Visible = false
|
||||||
local success = pathCheckerEntity:ToNPC().Pathfinder:HasPathToPos(entity.Position, false)
|
local success = pathCheckerEntity:ToNPC().Pathfinder:HasPathToPos(entity.Position, false)
|
||||||
pathsChecked[entity.InitSeed] = success
|
pathsChecked[entity.InitSeed] = success
|
||||||
pathCheckerEntity:Remove()
|
pathCheckerEntity:Remove()
|
||||||
|
|||||||
+1
-1
@@ -113,7 +113,7 @@ https://moddingofisaac.com/mod/1079/external-item-descriptions
|
|||||||
- prefab for the incredible [b]Japanese[/b] language pack
|
- prefab for the incredible [b]Japanese[/b] language pack
|
||||||
- domcizzz for the cool [b]Czech[/b] language pack
|
- domcizzz for the cool [b]Czech[/b] language pack
|
||||||
- [url=https://steamcommunity.com/id/whytefang/]adc[/url] for creating an awesome new Languagepack and providing ideas for new functionalities</description>
|
- [url=https://steamcommunity.com/id/whytefang/]adc[/url] for creating an awesome new Languagepack and providing ideas for new functionalities</description>
|
||||||
<version>4.26</version>
|
<version>4.27</version>
|
||||||
<visibility>Public</visibility>
|
<visibility>Public</visibility>
|
||||||
<tag id="Lua"/>
|
<tag id="Lua"/>
|
||||||
<tag id="Items"/>
|
<tag id="Items"/>
|
||||||
|
|||||||
Reference in new issue
Block a user