Implemented seperate Birthright descriptions and fixed some bugs in the API
This commit is contained in:
1 parent
2d391cdb1b
commit
d89696eae3
6 files changed
+66
-65
No files matched your search
+41
-43
@@ -282,47 +282,49 @@ local repCollectibles={
|
|||||||
}
|
}
|
||||||
EID:updateDescriptionsViaTable(repCollectibles, EID.descriptions["en_us"].collectibles, true)
|
EID:updateDescriptionsViaTable(repCollectibles, EID.descriptions["en_us"].collectibles, true)
|
||||||
|
|
||||||
--[[ Needs to be implemented and needs an API feature to add stuff to!
|
|
||||||
EID.descriptions["en_us"].birthright ={
|
EID.descriptions["en_us"].birthright ={
|
||||||
{"Isaac", "", "All items cycle through two options"}, -- Isaac
|
{"Isaac", "", "All items cycle through two options"},
|
||||||
{"Magdalene", "", ""}, -- Magdalene
|
{"Magdalene", "", "<No effect yet>"},
|
||||||
{"Cain", "", ""}, -- Cain
|
{"Cain", "", "<No effect yet>"},
|
||||||
{"Judas", "", ""}, -- Judas
|
{"Judas", "", "<No effect yet>"},
|
||||||
{"Black Judas", "", ""}, -- Black Judas
|
{"???", "", "Soul hearts gained from health upgrades are doubled"},
|
||||||
{"???", "", "Soul hearts gained from health upgrades are doubled"}, -- ???
|
{"Eve", "", "Whore of Babylon is active regardless of health#Dead Bird is active without taking damage"},
|
||||||
{"Eve", "", " Whore of Babylon is active regardless of health and Dead Bird is active without taking damage"}, -- Eve
|
{"Samson", "", "Bloody Lust can gain 4 more damage boosts at the same +0.2 intervals, for a new maximum total of +14.0"},
|
||||||
{"Samson", "", " Bloody Lust can gain 4 more damage boosts at the same +0.2 intervals, for a new maximum total of +14.0"}, -- Samson
|
{"Azazel", "", "Azazel's Brimstone beam becomes much wider, like Mega Blast#No effect on damage"},
|
||||||
{"Azazel", "", "Azazel's Brimstone beam becomes much wider, like Mega Blast. No effect on damage"}, -- Azazel
|
{"Lazarus", "", "When dead, revive as Lazarus Risen#Lazarus Risen gains a slowly fading +21.6 damage bonus"},
|
||||||
{"Lazarus", "", "No direct effect, the item is triggered if Lazarus dies and becomes Lazarus Risen"}, -- Lazarus
|
{"Eden", "", "Spawns 3 random items from random item pools#Only one can be taken"},
|
||||||
{"Lazarus Risen", "", "Grants a slowly fading +21.6 damage bonus"}, -- Lazarus Risen
|
{"The Lost", "", "Prevents items not beneficial to The Lost from spawning#Examples: ones that only give health, flight, and/or spectral tears or activate upon taking damage"},
|
||||||
{"Eden", "", "Spawns 3 random items from random item pools. Only one can be taken"}, -- Eden
|
{"Lazarus Risen", "", "Grants a slowly fading +21.6 damage bonus"},
|
||||||
{"The Lost", "", "Prevents items with the internal tag "nolostbr" from spawning. In practice, this automatically rerolls most items that aren't beneficial to The Lost, namely ones that only give health, flight, and/or spectral tears or activate upon taking damage"}, -- The Lost
|
{"Black Judas", "", "<No effect yet>"},
|
||||||
{"Lilith", "", ""}, -- Lilith
|
{"Lilith", "", "<No effect yet>"},
|
||||||
{"Keeper", "", ""}, -- Keeper
|
{"Keeper", "", "<No effect yet>"},
|
||||||
{"Apollyon", "", ""}, -- Apollyon
|
{"Apollyon", "", "<No effect yet>"},
|
||||||
{"The Forgotten", "", "The Soul is unchained and free to move"}, -- The Forgotten
|
{"The Forgotten", "", "The Soul is unchained and free to move"},
|
||||||
{"Bethany", "", "Activating an item using soul charges is sometimes free"}, -- Bethany
|
{"The Forgotten Soul", "", "The Soul is unchained and free to move"},
|
||||||
{"Jacob and Esau", "", "The character who picks up the item gains copies of three of the other character's passive items"}, -- Jacob and Esau
|
{"Bethany", "", "Activating an item using soul charges is sometimes free"},
|
||||||
{"Tainted Isaac", "", "Adds 4 more slots for passive items"}, -- Tainted Isaac
|
{"Jacob", "", "The character who picks up the item gains copies of three of the other character's passive items"},
|
||||||
{"Tainted Magdalene", "", "Adds 1 more red heart that doesn't drain"}, -- Tainted Magdalene
|
{"Esau", "", "The character who picks up the item gains copies of three of the other character's passive items"},
|
||||||
{"Tainted Cain", "", "The amount of pickups spawned from collecting an item is doubled"}, -- Tainted Cain
|
{"Tainted Isaac", "", "Adds 4 more slots for passive items"},
|
||||||
{"Tainted Judas", "", ""}, -- Tainted Judas
|
{"Tainted Magdalene", "", "Adds 1 more red heart that doesn't drain"},
|
||||||
{"Tainted ???", "", "Increases the maximum number of carried poops to 29"}, -- Tainted ???
|
{"Tainted Cain", "", "The amount of pickups spawned from collecting an item is doubled"},
|
||||||
{"Tainted Eve", "", ""}, -- Tainted Eve
|
{"Tainted Judas", "", "<No effect yet>"},
|
||||||
{"Tainted Samson", "", "The berserk timer gains 3 seconds instead of 1 when Tainted Samson kills an enemy"}, -- Tainted Samson
|
{"Tainted ???", "", "Increases the maximum number of carried poops to 29"},
|
||||||
{"Tainted Azazel", "", "Doubles the size of Tainted Azazel's Hemoptysis sneeze attack"}, -- Tainted Azazel
|
{"Tainted Eve", "", "<No effect yet>"},
|
||||||
{"Tainted Lazarus", "", ""}, -- Tainted Lazarus
|
{"Tainted Samson", "", "The berserk timer gains 3 seconds instead of 1 when Tainted Samson kills an enemy"},
|
||||||
{"Dead Tainted Lazarus", "", ""}, -- Dead Tainted Lazarus
|
{"Tainted Azazel", "", "Doubles the size of Tainted Azazel's Hemoptysis {{Collectible726}} sneeze attack"},
|
||||||
{"Tainted Eden", "", "Passive items gained before birthright will not be rerolled upon taking damage"}, -- Tainted Eden
|
{"Tainted Lazarus", "", "<No effect yet>"},
|
||||||
{"Tainted Lost", "", "Grants an extra life that revives Tainted Lost in the same room and deals 200 damage to nearby enemies. It can hit the same enemy multiple times"}, -- Tainted Lost
|
{"Tainted Eden", "", "Passive items gained before Birthright will not be rerolled upon taking damage"},
|
||||||
{"Tainted Lilith", "", ""}, -- Tainted Lilith
|
{"Tainted Lost", "", "+1 extra life that revives Tainted Lost in the same room and deals 200 damage to nearby enemies#Can hit the same enemy multiple times"},
|
||||||
{"Tainted Keeper", "", "Strongly attracts the coins dropped by defeating enemies from a short distance. No effect on other coins"}, -- Tainted Keeper
|
{"Tainted Lilith", "", ""},
|
||||||
{"Tainted Apollyon", "", ""}, -- Tainted Apollyon
|
{"Tainted Keeper", "", "Strongly attracts the coins dropped by defeating enemies from a short distance#No effect on other coins"},
|
||||||
{"Tainted Forgotten", "", "Tainted Soul gains the Recall ability, to retrieve the Tainted Forgotten automatically from a distance"}, -- Tainted Forgotten
|
{"Tainted Apollyon", "", "<No effect yet>"},
|
||||||
{"Tainted Bethany", "", ""}, -- Tainted Bethany
|
{"Tainted Forgotten", "", "Tainted Soul gains the Recall ability {{Collectible714}}, to automatically retrieve the Tainted Forgotten from a distance"},
|
||||||
{"Tainted Jacob", "", ""}, -- Tainted Jacob
|
{"Tainted Bethany", "", "<No effect yet>"},
|
||||||
|
{"Tainted Jacob", "", "<No effect yet>"},
|
||||||
|
{"Dead Tainted Lazarus", "", "<No effect yet>"},
|
||||||
|
{"Tainted Jacob 2", "", "<No effect yet>"},
|
||||||
|
{"Tainted Forgotten Soul", "", "Tainted Soul gains the Recall ability {{Collectible714}}, to automatically retrieve the Tainted Forgotten from a distance"},
|
||||||
}
|
}
|
||||||
]]--
|
|
||||||
|
|
||||||
---------- Trinkets ----------
|
---------- Trinkets ----------
|
||||||
local repTrinkets={
|
local repTrinkets={
|
||||||
@@ -525,8 +527,4 @@ EID.descriptions["en_us"].horsepills={
|
|||||||
{"49", "", "↑ Increases 1 random stat two times#↓ Decreases 1 random other stat two times#Will not decrease with PHD"},
|
{"49", "", "↑ Increases 1 random stat two times#↓ Decreases 1 random other stat two times#Will not decrease with PHD"},
|
||||||
}
|
}
|
||||||
|
|
||||||
---------- Transformations ----------
|
|
||||||
|
|
||||||
local repTransformations={}
|
|
||||||
EID:updateDescriptionsViaTable(repTransformations, EID.descriptions["en_us"].transformations,false)
|
|
||||||
|
|
||||||
@@ -1101,8 +1101,3 @@ local repPills={
|
|||||||
}
|
}
|
||||||
|
|
||||||
EID:updateDescriptionsViaTable(repPills, EID.descriptions["en_us_detailed"].pills, true)
|
EID:updateDescriptionsViaTable(repPills, EID.descriptions["en_us_detailed"].pills, true)
|
||||||
|
|
||||||
---------- Transformations ----------
|
|
||||||
|
|
||||||
local repTransformations={}
|
|
||||||
EID:updateDescriptionsViaTable(repTransformations, EID.descriptions["en_us"].transformations,false)
|
|
||||||
@@ -413,7 +413,7 @@ local repCards={
|
|||||||
[96] = {"96", "", "Gera 6 Book of Virtues {{Collectible584}} orbital com propriedades aleatórias"},
|
[96] = {"96", "", "Gera 6 Book of Virtues {{Collectible584}} orbital com propriedades aleatórias"},
|
||||||
[97] = {"97", "", "Gera Esau como um personagem secundário temporário para a sala atual"},
|
[97] = {"97", "", "Gera Esau como um personagem secundário temporário para a sala atual"},
|
||||||
}
|
}
|
||||||
-- EID:updateDescriptionsViaTable(repCards, EID.descriptions["pt_br"].cards, true)
|
EID:updateDescriptionsViaTable(repCards, EID.descriptions["pt_br"].cards, true)
|
||||||
|
|
||||||
---------- Pills ----------
|
---------- Pills ----------
|
||||||
|
|
||||||
@@ -481,9 +481,3 @@ EID.descriptions["pt_br"].horsepills={
|
|||||||
{"48", "", "↑ +0.3 Velocidade de disparo"},
|
{"48", "", "↑ +0.3 Velocidade de disparo"},
|
||||||
{"49", "", "↑ Aumenta 1 status aleatório duas vezes#↓ Diminue 1 status aleatório duas vezes#Não vai diminuir com PHD"},
|
{"49", "", "↑ Aumenta 1 status aleatório duas vezes#↓ Diminue 1 status aleatório duas vezes#Não vai diminuir com PHD"},
|
||||||
}
|
}
|
||||||
|
|
||||||
---------- Transformations ----------
|
|
||||||
|
|
||||||
local repTransformations={}
|
|
||||||
EID:updateDescriptionsViaTable(repTransformations, EID.descriptions["pt_br"].transformations,false)
|
|
||||||
|
|
||||||
@@ -79,4 +79,4 @@ local repTransformations = {
|
|||||||
-- Trinkets
|
-- Trinkets
|
||||||
["5.350.169"] = "1",
|
["5.350.169"] = "1",
|
||||||
}
|
}
|
||||||
EID:updateDescriptionsViaTable(repTransformations, EID.EntityTransformations, true)
|
EID:updateDescriptionsViaTable(repTransformations, EID.EntityTransformations, false)
|
||||||
+17
-8
@@ -197,10 +197,10 @@ end
|
|||||||
|
|
||||||
-- function to turn entity type names into actual ingame ID.Variant pairs
|
-- function to turn entity type names into actual ingame ID.Variant pairs
|
||||||
function EID:getIDVariantString(typeName)
|
function EID:getIDVariantString(typeName)
|
||||||
if typeName == "collectible" or typeName == "collectibles" then return "5.100"
|
if typeName == "collectible" or typeName == "collectibles" or typeName == "birthright" then return "5.100"
|
||||||
elseif typeName == "trinket" or typeName == "trinkets" then return "5.350"
|
elseif typeName == "trinket" or typeName == "trinkets" then return "5.350"
|
||||||
elseif typeName == "card" or typeName == "cards" then return "5.300"
|
elseif typeName == "card" or typeName == "cards" then return "5.300"
|
||||||
elseif typeName == "pill" or typeName == "pills" then return "5.70"
|
elseif typeName == "pill" or typeName == "pills" or typeName == "horsepills" or typeName == "horsepill" then return "5.70"
|
||||||
elseif typeName == "sacrifice" then return "-999.-1"
|
elseif typeName == "sacrifice" then return "-999.-1"
|
||||||
elseif typeName == "dice" then return "1000.76"
|
elseif typeName == "dice" then return "1000.76"
|
||||||
end
|
end
|
||||||
@@ -210,7 +210,12 @@ end
|
|||||||
-- function to turn entity typ and variants into their EID table-name
|
-- function to turn entity typ and variants into their EID table-name
|
||||||
function EID:getTableName(Type, Variant, SubType)
|
function EID:getTableName(Type, Variant, SubType)
|
||||||
local idString = Type.."."..Variant
|
local idString = Type.."."..Variant
|
||||||
if idString == "5.100" then return "collectibles"
|
if idString == "5.100" then
|
||||||
|
if SubType == 619 then
|
||||||
|
return "birthright"
|
||||||
|
else
|
||||||
|
return "collectibles"
|
||||||
|
end
|
||||||
elseif idString == "5.350" then return "trinkets"
|
elseif idString == "5.350" then return "trinkets"
|
||||||
elseif idString == "5.300" then return "cards"
|
elseif idString == "5.300" then return "cards"
|
||||||
elseif idString == "5.70" then
|
elseif idString == "5.70" then
|
||||||
@@ -286,9 +291,10 @@ function EID:getDescriptionObj(Type, Variant, SubType)
|
|||||||
description.ItemVariant = Variant
|
description.ItemVariant = Variant
|
||||||
description.RealID = SubType
|
description.RealID = SubType
|
||||||
description.ID = SubType
|
description.ID = SubType
|
||||||
if EID:getTableName(Type, Variant, SubType) == "pills" or EID:getTableName(Type, Variant, SubType) == "horsepills" then
|
local tableName = EID:getTableName(Type, Variant, SubType)
|
||||||
|
if tableName == "pills" or tableName == "horsepills" then
|
||||||
local pool = Game():GetItemPool()
|
local pool = Game():GetItemPool()
|
||||||
description.ID = pool:GetPillEffect(SubType)+1
|
description.ID = pool:GetPillEffect(SubType) + 1
|
||||||
end
|
end
|
||||||
description.fullItemString = Type.."."..Variant.."."..description.ID
|
description.fullItemString = Type.."."..Variant.."."..description.ID
|
||||||
description.Name = EID:getObjectName(Type, Variant, description.ID)
|
description.Name = EID:getObjectName(Type, Variant, description.ID)
|
||||||
@@ -332,6 +338,9 @@ function EID:getDescriptionData(Type, Variant, SubType)
|
|||||||
local moddedDesc = EID.descriptions[EID.Config["Language"]].custom[fullString.."."..SubType] or
|
local moddedDesc = EID.descriptions[EID.Config["Language"]].custom[fullString.."."..SubType] or
|
||||||
EID.descriptions["en_us"].custom[fullString.."."..SubType] or nil
|
EID.descriptions["en_us"].custom[fullString.."."..SubType] or nil
|
||||||
local tableName = EID:getTableName(Type, Variant, SubType)
|
local tableName = EID:getTableName(Type, Variant, SubType)
|
||||||
|
if tableName == "birthright" then
|
||||||
|
SubType = Isaac.GetPlayer(0).SubType + 1
|
||||||
|
end
|
||||||
local legacyModdedDescription = EID:getLegacyModDescription(Type, Variant, SubType)
|
local legacyModdedDescription = EID:getLegacyModDescription(Type, Variant, SubType)
|
||||||
local defaultDesc = EID.descriptions[EID.Config["Language"]][tableName][SubType] or EID.descriptions["en_us"][tableName][SubType] or nil
|
local defaultDesc = EID.descriptions[EID.Config["Language"]][tableName][SubType] or EID.descriptions["en_us"][tableName][SubType] or nil
|
||||||
|
|
||||||
@@ -393,13 +402,13 @@ function EID:getObjectName(Type, Variant, SubType)
|
|||||||
name = tableEntry[2]
|
name = tableEntry[2]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if tableName == "collectibles" then
|
if tableName == "collectibles" or tableName == "birthright" then
|
||||||
return name or EID.itemConfig:GetCollectible(SubType).Name
|
return name or EID.itemConfig:GetCollectible(SubType).Name
|
||||||
elseif tableName == "trinkets" then
|
elseif tableName == "trinkets" then
|
||||||
return name or EID.itemConfig:GetTrinket(SubType).Name
|
return name or EID.itemConfig:GetTrinket(SubType).Name
|
||||||
elseif tableName == "cards" then
|
elseif tableName == "cards" then
|
||||||
return name or EID.itemConfig:GetCard(SubType).Name
|
return name or EID.itemConfig:GetCard(SubType).Name
|
||||||
elseif tableName == "pills" then
|
elseif tableName == "pills" or tableName == "horsepills" then
|
||||||
name = name or EID.itemConfig:GetPillEffect(SubType-1).Name
|
name = name or EID.itemConfig:GetPillEffect(SubType-1).Name
|
||||||
return string.gsub(name,"I'm Excited!!!","I'm Excited!!") -- prevent markup trigger
|
return string.gsub(name,"I'm Excited!!!","I'm Excited!!") -- prevent markup trigger
|
||||||
elseif tableName == "sacrifice" then
|
elseif tableName == "sacrifice" then
|
||||||
@@ -416,7 +425,7 @@ end
|
|||||||
function EID:getXMLDescription(Type, Variant, SubType)
|
function EID:getXMLDescription(Type, Variant, SubType)
|
||||||
local tableName = EID:getTableName(Type, Variant, SubType)
|
local tableName = EID:getTableName(Type, Variant, SubType)
|
||||||
local desc= nil
|
local desc= nil
|
||||||
if tableName == "collectibles" then
|
if tableName == "collectibles" or tableName == "birthright" then
|
||||||
desc = EID.itemConfig:GetCollectible(SubType).Description
|
desc = EID.itemConfig:GetCollectible(SubType).Description
|
||||||
elseif tableName == "trinkets" then
|
elseif tableName == "trinkets" then
|
||||||
desc = EID.itemConfig:GetTrinket(SubType).Description
|
desc = EID.itemConfig:GetTrinket(SubType).Description
|
||||||
|
|||||||
@@ -382,7 +382,12 @@ local function onRender(t)
|
|||||||
EID:renderQuestionMark()
|
EID:renderQuestionMark()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
EID:printDescription(EID:getDescriptionObj(closest.Type, closest.Variant, closest.SubType))
|
local descriptionObj = EID:getDescriptionObj(closest.Type, closest.Variant, closest.SubType)
|
||||||
|
-- Handle Birthright Character name display
|
||||||
|
if closest.SubType == 619 then
|
||||||
|
descriptionObj.Description = "{{CustomTransformation}} {{ColorGray}}"..player:GetName().."{{CR}}#"..descriptionObj.Description
|
||||||
|
end
|
||||||
|
EID:printDescription(descriptionObj)
|
||||||
elseif closest.Variant == PickupVariant.PICKUP_TAROTCARD then
|
elseif closest.Variant == PickupVariant.PICKUP_TAROTCARD then
|
||||||
--Handle Cards & Runes
|
--Handle Cards & Runes
|
||||||
if closest:ToPickup():IsShopItem() and not EID.Config["DisplayCardInfoShop"] then
|
if closest:ToPickup():IsShopItem() and not EID.Config["DisplayCardInfoShop"] then
|
||||||
|
|||||||
Reference in new issue
Block a user