Compare commits

...
11 Commits
Author SHA1 Message Date
Wofsauge 6e15cc3414 chore: release 4.100
Check Localization / Check Localization process (push) Canceled after 0s
2025-06-11 23:40:22 +02:00
Wofsauge c20341d795 cleanup some comments 2025-06-11 23:24:46 +02:00
Wofsauge 0e5606d0e6 Fixed GoldenTrinket replacements not being detected correctly
related to #874
2025-06-11 23:15:33 +02:00
Wofsauge 8957ec63f0 Reintroduced EID.LanguageMap for backwards compatibility and bettergame language handling
closes #878
2025-06-11 22:52:11 +02:00
HanaNyaZZZ e20d2fe52d zh_cn:Update BookOfVirtues (#880) 2025-06-11 21:20:57 +02:00
kittenchilly 3c26ff782c Use cached Game more for performance improvement (#879) 2025-06-11 19:38:02 +02:00
KnuckleBuckle 8a9c4358b7 it: updated ab+ and rep+ luas (#877)
* Update it.lua

* it: updated rep+
2025-06-11 19:37:35 +02:00
리셰 beb75022ec fix missing local value (#875) 2025-06-11 15:56:59 +02:00
Wofsauge 5f6bb5a981 Added more comments to some functions 2025-06-11 00:23:18 +02:00
Wofsauge cf2a02b051 Added first version of document generator script (for the github wiki) 2025-06-11 00:14:12 +02:00
Wofsauge 834abba1a5 chore: release 4.99 2025-06-10 22:49:54 +02:00
14 changed files with 402 additions and 210 deletions

No files matched your search

+89
View File
@@ -0,0 +1,89 @@
import os
import re
PROJECT_ROOT = r'd:\\Programme\\Steam\\steamapps\\common\\The Binding of Isaac Rebirth\\mods\\External-Item-Descriptions'
OUTPUT_MD = 'EID_Function_Documentation.md'
eid_func_pattern = re.compile(r'^\s*function\s+EID:([a-zA-Z0-9_]+)\s*\(')
comment_pattern = re.compile(r'^\s*--[-]*\s?(.*)')
def find_lua_files(root):
for dirpath, _, filenames in os.walk(root):
for fname in filenames:
if fname.endswith('.lua'):
yield os.path.join(dirpath, fname)
def format_docstring(doc):
"""Format the docstring to be Markdown compatible."""
doc = doc.strip()
if '@' in doc:
words = doc.split()
if len(words) >= 2:
words[0] = f'*{words[0]}*\t'
words[1] = f'__{words[1]}__\t'
doc = ' '.join(words)
return doc
def extract_functions_with_docs(lua_path):
with open(lua_path, encoding='utf-8') as f:
lines = f.readlines()
docs = []
undocumented = []
i = 0
while i < len(lines):
match = eid_func_pattern.match(lines[i])
if match:
func_name = lines[i].split("function")[1].split("--")[0].strip()
# Look for comment block above
doc_lines = []
j = i - 1
while j >= 0:
comment_match = comment_pattern.match(lines[j])
if lines[j].strip() == '':
break
elif comment_match and "@diagnostic" not in comment_match.group(1):
doc_lines.insert(0, format_docstring(comment_match.group(1)))
j -= 1
else:
break
doc = '\n'.join(doc_lines).strip()
if doc:
docs.append({
'name': func_name,
'doc': doc,
'file': lua_path
})
else:
undocumented.append({
'name': func_name,
'file': lua_path
})
i += 1
return docs, undocumented
def main():
all_docs = []
all_undocumented = []
for lua_file in find_lua_files(PROJECT_ROOT):
docs, undocumented = extract_functions_with_docs(lua_file)
all_docs.extend(docs)
all_undocumented.extend(undocumented)
with open(OUTPUT_MD, 'w', encoding='utf-8') as md:
md.write('# EID Function Documentation\n\n')
md.write('## Documented Functions\n\n')
all_docs.sort(key=lambda x: x['name'])
for entry in all_docs:
md.write(f'### `{entry["name"]}`\n')
md.write(f'*Defined in*: `{os.path.relpath(entry["file"], PROJECT_ROOT)}`\n\n')
md.write(f'{entry["doc"]}\n\n---\n\n')
md.write(f'\n## Undocumented Functions ({len(all_undocumented)})\n\n')
all_undocumented.sort(key=lambda x: x['name'])
for entry in all_undocumented:
md.write(f'- `{entry["name"]}` (in `{os.path.relpath(entry["file"], PROJECT_ROOT)}`)\n')
if __name__ == '__main__':
main()
+1 -1
View File
@@ -279,7 +279,7 @@ EID.descriptions[languageCode].collectibles={
{"255", "Vite", "↑ {{Tears}} +0.5 Lacrime#↑ {{Shotspeed}} +0.2 Velocità Colpi"},
{"256", "Bombe Incendiarie", "{{Bomb}} +5 Bombe#{{Burning}} Le bombe di Isaac lasciano una fiamma quando esplodono"},
{"257", "Mente in Fiamme", "{{Burning}} Le lacrime di Isaac appiccano fuoco ai nemici#10% di chance che le lacrime esplodano all'impatto con il nemico#{{Luck}} 100% di chance con 13 di Fortuna#{{Warning}} Le esplosioni possono ferire Isaac"},
{"258", "Missing No.", "Risorteggia tutti gli oggetti e statistiche di Isaac quando viene raccolto e ad ogni nuovo piano"},
{"258", "Missing No.", "Quando viene raccolto e ad ogni nuovo piano risorteggia tutti gli oggetti e le statistiche di Isaac"},
{"259", "Materia Oscura", "↑ {{Damage}} +1 Danni#{{Fear}} 33% di chance di sparare lacrime spaventoso#{{Luck}} 100% di chance con 20 di Fortuna"},
{"260", "Candela Nera", "{{CurseBlind}} Immunità alle maledizioni#{{BlackHeart}} +1 Cuori Neri#{{AngelDevilChance}} +15% di chance di una Stanza del Diavolo/dell'Angelo"},
{"261", "Proptosi", "↑ {{Damage}} x2 Moltiplicatore Danni#↓ I danni inflitti dalle lacrime diminuiscono con la distanza percorsa"},
+12
View File
@@ -72,6 +72,18 @@ local trinkets = {
}
EID:updateDescriptionsViaTable(trinkets, EID.descriptions[languageCode].trinkets)
------- Golden Trinkets -------
local goldenTrinketEffects = {
-- Tick (replace): added ", {{Trinket135}} A Lighter"
[53] = {
"{{HealingRed}} All'ingresso in una {{BossRoom}} Stanza del Boss cura di {{ColorGold}}2{{CR}} cuori#-{{ColorGold}}30{{CR}}% di salute del boss#{{ColorGold}}Rimuovibile!",
"{{HealingRed}} All'ingresso in una {{BossRoom}} Stanza del Boss cura di {{ColorGold}}2{{CR}} cuori#-{{ColorGold}}30{{CR}}% di salute del boss#{{Warning}} Una volta raccolto, non può più venire rimosso#Rimovibile solo con {{Trinket41}} \"Fiammifero\", {{Trinket135}} \"Un Accendino\", o ingoiandolo",
"{{HealingRed}} All'ingresso in una {{BossRoom}} Stanza del Boss cura di {{ColorGold}}3{{CR}} cuori#-{{ColorGold}}30{{CR}}% di salute del boss#{{ColorGold}}Rimuovibile!",
},
}
EID:updateDescriptionsViaTable(goldenTrinketEffects, EID.descriptions[languageCode].goldenTrinketEffects)
---------- Cards ----------
local cards = {
+131 -148
View File
@@ -478,174 +478,157 @@ EID.descriptions[languageCode].bookOfBelialBuffs = {
[729] = "当头分离时:#↑ {{Tears}} 泪速修正x3#↑ {{Damage}} 伤害+2", -- Decap Attack
}
-- Book of Virtues wisp types
EID.descriptions[languageCode].BookOfVirtuesWispTexts = {
-- values inside {} brackets will be replaced with text parts below
-- Wisp texts are affected by the PluralizeFunction (ab+ file)
-- The placeholder therefore can be used in all parts that make up the wisp descriptions
StatDescription = "{{Heart}} {health} {{Damage}} {damage}", -- {health} will be replaced with the health text, {damage} with the damage text or the "CantShoot" text
Health = "{1}血量", -- {1} will be replaced with the health
Damage = "{1}dps", -- {1} will be replaced with the calculated damage
CantShoot = "无法发射泪弹!",
Shotspeed = "{1}%弹速", -- {1} will be replaced with the shot speed changes in %
Chance = " ({1}%几率)", -- {1} will be replaced with the chance
SingleRoom = "单房间魂火",
NoWisps = "无魂火",
Ring = {
[-1] = "{amount}个固定位置魂火",
[0] = "{amount}个内环魂火{{InnerWisp}}",
[1] = "{amount}个中环魂火{{MiddleWisp}}",
[2] = "{amount}个外环魂火{{OuterWisp}}",
},
}
-- Book of Virtues wisp types
EID.descriptions[languageCode].bookOfVirtuesWisps = {
[33] = "内环魂火{{InnerWisp}}#追踪泪弹", -- The Bible
[34] = "中环魂火{{MiddleWisp}}#双倍伤害泪弹", -- The Book of Belial
[35] = "内环魂火{{InnerWisp}}#3.5%几率发射恐惧泪弹#{{Collectible35}} 被摧毁时触发死灵之书的效果", -- The Necronomicon
[36] = "外环魂火{{OuterWisp}}#2.5%几率发射{{Collectible236}}大肠杆菌效果的泪弹", -- The Poop
[37] = "中环魂火{{MiddleWisp}}#被摧毁时生成分裂追踪炸弹", -- Mr. Boom
[38] = "外环魂火{{OuterWisp}}#快速但不精准泪弹", -- Tammy's Head
[39] = "中环魂火{{MiddleWisp}}#5%几率发射石化泪弹", -- Mom's Bra
[40] = "中环魂火{{MiddleWisp}}#爆炸泪弹#被摧毁时爆炸", -- Kamikaze!
[41] = "中环魂火{{MiddleWisp}}#7.5%几率发射{{Fear}}恐惧泪弹", -- Mom's Pad
[42] = "中环魂火{{MiddleWisp}}#7.5%几率发射{{Collectible149}}吐根泪弹", -- Bob's Rotten Head
[44] = "中环魂火{{MiddleWisp}}#10%几率发射传送敌人的泪弹#魂火每5秒闪匿一次", -- Teleport!
[45] = "中环魂火{{MiddleWisp}}#20%几率击杀敌人时掉落1{{Heart}}红心", -- Yum Heart
[47] = "中环魂火{{MiddleWisp}}#向准星发射3颗爆炸泪弹", -- Doctor's Remote
[49] = "外环魂火{{OuterWisp}}#不能发射泪弹#使用时发射激光", -- Shoop da Whoop!
[56] = "中环魂火{{MiddleWisp}}#快速但低射程的泪弹#魂火会滴落黄色水迹", -- Lemon Mishap
[58] = "中环魂火{{MiddleWisp}}#血量低但免疫弹幕#{{Collectible58}}的效果期间免疫伤害", -- Book of Shadows
[65] = "中环魂火{{MiddleWisp}}#被摧毁时掉落1个即爆炸弹", -- Anarchist Cookbook
[66] = "中环魂火{{MiddleWisp}}#{{Slow}} 被摧毁时使敌人减速3秒", -- The Hourglass
[77] = "中环魂火{{MiddleWisp}}#额外接触伤害", -- My Little Unicorn
[78] = "内环魂火{{InnerWisp}}#不能发射泪弹#被摧毁时在当前房间中生成1只蝗虫", -- Book of Revelations
[83] = "内环魂火{{InnerWisp}}#双倍伤害的击退泪弹", -- The Nail
[84] = "中环魂火{{MiddleWisp}}#无特殊效果", -- We Need to Go Deeper!
[85] = "内环魂火{{InnerWisp}}#被摧毁时掉落1{{Card}}卡牌", -- Deck of Cards
[86] = "中环魂火{{MiddleWisp}}#牙齿泪弹", -- Monstro's Tooth
[93] = "内环魂火{{InnerWisp}}#反重力泪弹#几率为{{Fear}}恐惧泪弹", -- The Gamekid
[35] = "{{Collectible35}} 被摧毁时触发死灵之书的效果", -- The Necronomicon
[37] = "被摧毁时生成分裂追踪炸弹", -- Mr. Boom
[38] = "不精准泪弹", -- Tammy's Head
[40] = "被摧毁时爆炸", -- Kamikaze!
[47] = "向准星发射3颗爆炸泪弹", -- Doctor's Remote
[49] = "使用时发射激光", -- Shoop da Whoop!
[56] = "魂火会滴落黄色水迹", -- Lemon Mishap
[58] = "免疫弹幕#{{Collectible58}}的效果期间免疫伤害", -- Book of Shadows
[65] = "被摧毁时掉落1个即爆炸弹", -- Anarchist Cookbook
[66] = "{{Slow}}被摧毁时使敌人减速3秒", -- The Hourglass
[77] = "额外接触伤害", -- My Little Unicorn
[78] = "被摧毁时在当前房间中生成1只蝗虫", -- Book of Revelations
[85] = "被摧毁时掉落1{{Card}}卡牌", -- Deck of Cards
[97] = "8选1生成魂火:#{{Collectible65}}{{Collectible42}}{{Collectible85}}{{Collectible102}}{{Collectible37}}{{Collectible177}}{{Collectible49}}{{Collectible45}}#{{Warning}} 很有可能为爆炸效果", -- The Book of Sin
[102] = "内环魂火{{InnerWisp}}#6选1生成魂火:#普通泪弹且被摧毁时生成1只红蜘蛛/中毒泪弹/石化泪弹/迷惑泪弹/烧伤泪弹/即爆炸弹泪弹#无论哪种, 被摧毁时生成1胶囊", -- Mom's Bottle of Pills
[105] = "中环魂火{{MiddleWisp}}#每重置1个道具额外生成1魂火", -- The D6
[107] = "内环魂火{{InnerWisp}}#穿刺泪弹", -- The Pinking Shears
[111] = "外环魂火{{OuterWisp}}#{{Poison}} 被摧毁时产生毒气", -- The Bean
[123] = "内环魂火{{InnerWisp}}#随机泪弹", -- Monster Manual
[102] = "6选1生成魂火:#普通泪弹且被摧毁时生成1只红蜘蛛/中毒泪弹/石化泪弹/迷惑泪弹/烧伤泪弹/即爆炸弹泪弹#无论哪种, 被摧毁时生成1胶囊", -- Mom's Bottle of Pills
[105] = "每重置1个道具额外生成1魂火", -- The D6
[111] = "{{Poison}}被摧毁时产生毒气", -- The Bean
[123] = "随机泪弹", -- Monster Manual
[124] = "生成触发道具对应的魂火", -- Dead Sea Scrolls
[126] = "中环魂火{{MiddleWisp}}#高血量魂火", -- Razor Blade
[127] = "中环魂火{{MiddleWisp}}#仅存在于道具所创新层的无限血量魂火", -- Forget Me Now
[130] = "中环魂火{{MiddleWisp}}#不能发射泪弹#魂火会向角色发射方向冲刺", -- A Pony
[133] = "中环魂火{{MiddleWisp}}#生成3高血量魂火", -- Guppy's Paw
[135] = "外环魂火{{OuterWisp}}#低血量魂火", -- IV Bag
[136] = "中环魂火{{MiddleWisp}}#7.5%几率发射{{Bait}}标记泪弹#被标记的敌人会被其他敌人攻击", -- Best Friend
[137] = "内环魂火{{InnerWisp}}#每个引爆的炸弹生成1魂火#魂火的泪弹也可以被远程引爆", -- Remote Detonator
[145] = "外环魂火{{OuterWisp}}#生成魂火而不是苍蝇#被摧毁时生成1只蓝苍蝇", -- Guppy's Head
[146] = "内环魂火{{InnerWisp}}#追踪泪弹", -- Prayer Card
[127] = "仅存在于道具所创新层的无限血量魂火", -- Forget Me Now
[130] = "魂火会向角色发射方向冲刺", -- A Pony
[133] = "生成3高血量魂火", -- Guppy's Paw
[137] = "每个引爆的炸弹生成1魂火#魂火的泪弹也可以被远程引爆", -- Remote Detonator
[145] = "生成魂火而不是苍蝇#被摧毁时生成1只蓝苍蝇", -- Guppy's Head
[147] = "几率从大便生成粪滴魂火, 从石头5选1生成魂火:#{{Collectible132}}煤炭/{{Collectible201}}铁/{{Collectible202}}金/{{Collectible68}}红石/{{Collectible415}}钻石", -- Notched Axe
[158] = "中环魂火{{MiddleWisp}}#高血量魂火, 向附近敌人发射", -- Crystal Ball
[160] = "中环魂火{{MiddleWisp}}#接触时召唤光束", -- Crack the Sky
[164] = "中环魂火{{MiddleWisp}}#单房间魂火", -- The Candle
[166] = "中环魂火{{MiddleWisp}}#摧毁房间中所有掉落物, 每个都有几率生成1魂火", -- D20
[171] = "中环魂火{{MiddleWisp}}#7.5%几率发射减速泪弹", -- Spider Butt
[175] = "中环魂火{{MiddleWisp}}#魂火会解锁碰到的箱子/门, 包括超级撒但, 回溯, 尸宫的门#该魂火可以捐给{{KeyBeggar}}钥匙大师", -- Dad's Key
[160] = "接触时召唤光束", -- Crack the Sky
[166] = "摧毁房间中所有掉落物, 每个都有几率生成1魂火", -- D20
[175] = "魂火会解锁碰到的箱子/门, 包括超级撒但, 回溯, 尸宫的门#该魂火可以捐给{{KeyBeggar}}钥匙大师", -- Dad's Key
[177] = "根据获得的奖励生成魂火", -- Portable Slot
[181] = "中环魂火{{MiddleWisp}}#10%几率发射{{Collectible374}}圣光泪弹", -- White Pony
[186] = "中环魂火{{MiddleWisp}}#高血量魂火", -- Blood Rights
[192] = "中环魂火{{MiddleWisp}}#追踪泪弹", -- Telepathy for Dummies
[263] = "中环魂火{{MiddleWisp}}#15%几率击杀敌人时掉落1{{Rune}}符文#被摧毁时掉落1{{Rune}}符文", -- Clear Rune
[282] = "在当前房间中生成不动的魂火, 最多6个", -- How to Jump
[181] = "10%几率发射{{Collectible374}}圣光泪弹", -- White Pony
[186] = "高血量魂火", -- Blood Rights
[192] = "追踪泪弹", -- Telepathy for Dummies
[263] = "被摧毁时掉落1{{Rune}}符文", -- Clear Rune
[283] = "重置所有魂火并生成1随机魂火#不重置美德之书", -- D100
[284] = "移除所有魂火, 每持有2个道具生成1随机魂火#不重置美德之书", -- D4
[285] = "中环魂火{{MiddleWisp}}#10%几率发射十面骰效果的泪弹", -- D10
[286] = "中环魂火{{MiddleWisp}}#15%几率击杀敌人时掉落1{{Card}}卡牌#被摧毁时掉落1{{Card}}卡牌", -- Blank Card
[287] = "中环魂火{{MiddleWisp}}#{{Collectible675}} 被摧毁时产生碎裂的宝珠的效果", -- Book of Secrets
[288] = "外环魂火{{OuterWisp}}#生成魂火而不是蜘蛛#被摧毁时生成1蓝蜘蛛", -- Box of Spiders
[289] = "中环魂火{{MiddleWisp}}#单房间魂火#红火泪弹", -- Red Candle
[290] = "中环魂火{{MiddleWisp}}#生成魂火而不是掉落红心#被摧毁时几率生成1{{HalfHeart}}半红心", -- The Jar
[291] = "中环魂火{{MiddleWisp}}#每有1个被冲走的敌人额外生成1魂火", -- Flush!
[292] = "中环魂火{{MiddleWisp}}#每有1撒但圣经魂火, {{AngelDevilChance}}恶魔房/天使房几率+10%", -- Satanic Bible
[293] = "中环魂火{{MiddleWisp}}#被摧毁时发射4向{{Collectible118}}硫磺火激光", -- Head of Krampus
[294] = "内环魂火{{InnerWisp}}#低血量单房间魂火#不能发射泪弹#被摧毁时产生棉豆的效果", -- Butter Bean
[295] = "内环魂火{{InnerWisp}}#被摧毁时几率掉落1{{Coin}}硬币", -- Magic Fingers
[296] = "中环魂火{{MiddleWisp}}#较高血量魂火, 可以用{{Heart}}红心治疗", -- Converter
[297] = "中环魂火{{MiddleWisp}}#根据当前层生成0-8魂火", -- Pandora's Box
[298] = "中环魂火{{MiddleWisp}}#不能发射泪弹#免疫接触伤害#只有激活独角兽的残角或类似效果时才会造成接触伤害", -- Unicorn Stump
[323] = "中环魂火{{MiddleWisp}}#生成6魂火#只能维持3秒", -- Isaac's Tears
[324] = "中环魂火{{MiddleWisp}}#{{Collectible570}} 黏土饼干泪弹", -- Undefined
[325] = "中环魂火{{MiddleWisp}}#电弧束泪弹", -- Scissors
[326] = "内环魂火{{InnerWisp}}#完美阻挡时生成4魂火", -- Breath of Life
[338] = "中环魂火{{MiddleWisp}}#单房间魂火#回旋泪弹", -- The Boomerang
[347] = "中环魂火{{MiddleWisp}}#高血量魂火, 发射{{Collectible245}}完美视力泪弹#复制所有其他魂火", -- Diplopia
[348] = "中环魂火{{MiddleWisp}}#被摧毁时生成1{{Pill}}胶囊", -- Placebo
[349] = "中环魂火{{MiddleWisp}}#被摧毁时50%几率掉落1{{Coin}}硬币", -- Wooden Nickel
[351] = "中环魂火{{MiddleWisp}}#使用时产生岩石波#被摧毁时石化敌人并产生{{Poison}}毒气", -- Mega Bean
[352] = "中环魂火{{MiddleWisp}}#低血量魂火, 切换房间时保留#被摧毁时, 摧毁所有玻璃大炮魂火", -- Glass Cannon
[357] = "中环魂火{{MiddleWisp}}#无特殊效果#复制房间中所有魂火", -- Box of Friends
[382] = "中环魂火{{MiddleWisp}}#友好敌人死亡时, 根据其攻击方式, 生成发射普通/追踪/爆炸/硫磺火泪弹的1魂火", -- Friendly Ball
[383] = "中环魂火{{MiddleWisp}}#魂火的泪弹可以被引爆, 变为6颗角色的泪弹#切换房间时持续存在#被摧毁时爆出角色的泪弹", -- Tear Detonator
[386] = "中环魂火{{MiddleWisp}}#5%几率发射将石头/罐子/头骨/蘑鼓重置的泪弹", -- D12
[396] = "不能发射泪弹#每个传送门有1魂火", -- Ventricle Razor
[406] = "中环魂火{{MiddleWisp}}#随机伤害和射速", -- D8
[419] = "中环魂火{{MiddleWisp}}#20%几率发射传送敌人的泪弹#魂火每5秒闪匿一次", -- Teleport 2.0
[421] = "中环魂火{{MiddleWisp}}#{{Charm}} 魅惑泪弹#{{Charm}} 被摧毁时产生魅惑屁", -- Kidney Bean
[422] = "中环魂火{{MiddleWisp}}#30%几率发射石化泪弹#使上个房间被摧毁的所有魂火重生", -- Glowing Hour Glass
[427] = "在房间中弹动, 被角色击中时爆炸#不能发射泪弹, 不造成接触伤害", -- Mine Crafter
[434] = "中环魂火{{MiddleWisp}}#生成魂火而不是苍蝇#最多5只苍蝇产生血量和伤害增强的1魂火", -- Jar of Flies
[437] = "中环魂火{{MiddleWisp}}#首次击中时产生七面骰效果", -- D7
[439] = "中环魂火{{MiddleWisp}}#无特殊效果", -- Mom's Box
[441] = "中环魂火{{MiddleWisp}}#{{Chargeable}} 蓄力硫磺火泪弹#在超级喷射期间会持续发射", -- Mega Blast
[475] = "中环魂火{{MiddleWisp}}#生成8高伤害魂火, 死亡后保持存在", -- Plan C
[476] = "中环魂火{{MiddleWisp}}#若没复制掉落物, 则生成第二个魂火", -- D1
[285] = "10%几率发射十面骰效果的泪弹", -- D10
[286] = "被摧毁时掉落1{{Card}}卡牌", -- Blank Card
[287] = "{{Collectible675}}被摧毁时产生碎裂的宝珠的效果", -- Book of Secrets
[288] = "生成魂火而不是蜘蛛#被摧毁时生成1蓝蜘蛛", -- Box of Spiders
[289] = "红火泪弹", -- Red Candle
[290] = "生成魂火而不是掉落红心#被摧毁时几率生成1{{HalfHeart}}半红心", -- The Jar
[291] = "每有1个被冲走的敌人额外生成1魂火", -- Flush!
[292] = "每有1撒但圣经魂火,{{AngelDevilChance}}恶魔房/天使房几率+10%", -- Satanic Bible
[293] = "被摧毁时发射4向{{Collectible118}}硫磺火激光", -- Head of Krampus
[294] = "被摧毁时产生棉豆的效果", -- Butter Bean
[295] = "被摧毁时几率掉落1{{Coin}}硬币", -- Magic Fingers
[296] = "较高血量魂火, 可以用{{Heart}}红心治疗", -- Converter
[297] = "根据当前层生成0-8魂火", -- Pandora's Box
[298] = "免疫接触伤害#只有激活独角兽的残角或类似效果时才会造成接触伤害", -- Unicorn Stump
[323] = "只能维持3秒", -- Isaac's Tears
[324] = "{{Collectible570}}黏土饼干泪弹", -- Undefined
[325] = "抛射泪弹", -- Scissors
[326] = "完美阻挡时生成4魂火", -- Breath of Life
[347] = "{{Collectible245}}完美视力泪弹#复制所有其他魂火", -- Diplopia
[348] = "被摧毁时生成1{{Pill}}胶囊", -- Placebo
[349] = "被摧毁时50%几率掉落1{{Coin}}硬币", -- Wooden Nickel
[351] = "使用时产生岩石波#被摧毁时石化敌人并产生{{Poison}}毒气", -- Mega Bean
[352] = "被摧毁时, 摧毁所有玻璃大炮魂火", -- Glass Cannon
[357] = "复制房间中所有魂火", -- Box of Friends
[382] = "友好敌人死亡时, 根据其攻击方式, 生成发射普通/追踪/爆炸/硫磺火泪弹的1魂火", -- Friendly Ball
[383] = "魂火的泪弹可以被引爆, 变为6颗角色的泪弹#被摧毁时爆出角色的泪弹", -- Tear Detonator
[386] = "5%几率发射将石头/罐子/头骨/蘑鼓重置的泪弹", -- D12
[396] = "每个传送门有1魂火", -- Ventricle Razor
[406] = "随机伤害和射速", -- D8
[419] = "20%几率发射传送敌人的泪弹#魂火每5秒闪匿一次", -- Teleport 2.0
[421] = "{{Charm}}被摧毁时产生魅惑屁", -- Kidney Bean
[422] = "使上个房间被摧毁的所有魂火重生", -- Glowing Hour Glass
[427] = "在房间中弹动, 被角色击中时爆炸#不造成接触伤害", -- Mine Crafter
[434] = "生成魂火而不是苍蝇#最多5只苍蝇产生血量和伤害增强的1魂火", -- Jar of Flies
[437] = "首次击中时产生七面骰效果", -- D7
[441] = "{{Chargeable}} 蓄力硫磺火泪弹#在超级喷射期间会持续发射", -- Mega Blast
[475] = "死亡后保持存在", -- Plan C
[476] = "若没复制掉落物, 则生成第二个魂火", -- D1
[477] = "生成所有吸收的主动道具的魂火#本身不生成魂火", -- Void
[478] = "中环魂火{{MiddleWisp}}#被摧毁时暂停所有敌人和弹幕3秒", -- Pause
[479] = "中环魂火{{MiddleWisp}}#被摧毁时几率生成1{{Trinket}}饰品", -- Smelter
[480] = "中环魂火{{MiddleWisp}}#转换的掉落物越多, 生成的魂火血量越高#至少转换1掉落物才会生成魂火", -- Compost
[481] = "中环魂火{{MiddleWisp}}#5%几率发射将敌人变成随机魂火的泪弹", -- Dataminer
[478] = "被摧毁时暂停所有敌人和弹幕3秒", -- Pause
[479] = "被摧毁时几率生成1{{Trinket}}饰品", -- Smelter
[480] = "转换的掉落物越多, 生成的魂火血量越高#至少转换1掉落物才会生成魂火", -- Compost
[481] = "5%几率发射将敌人变成随机魂火的泪弹", -- Dataminer
[482] = "生成1随机魂火", -- Clicker
[483] = "中环魂火{{MiddleWisp}}#生成被摧毁时掉落金即爆炸弹的8魂火", -- Mama Mega!
[484] = "中环魂火{{MiddleWisp}}#单房间魂火#不能发射泪弹#被摧毁时产生等等, 啥? 的效果", -- Wait What?
[485] = "中环魂火{{MiddleWisp}}#受损时, 所有被掰弯的硬币魂火被摧毁或复制", -- Crooked Penny
[486] = "中环魂火{{MiddleWisp}}#不能发射泪弹#几率抵消角色受到的伤害, 然后被摧毁", -- Dull Razor
[483] = "生成被摧毁时掉落金即爆炸弹的8魂火", -- Mama Mega!
[484] = "被摧毁时产生等等, 啥? 的效果", -- Wait What?
[485] = "受损时, 所有被掰弯的硬币魂火被摧毁或复制", -- Crooked Penny
[486] = "几率抵消角色受到的伤害, 然后被摧毁", -- Dull Razor
[487] = "不可摧毁的永久魂火#追击敌人并向其发射#不阻挡弹幕, 不造成接触伤害", -- Potato Peeler
[488] = "生成所模仿道具的魂火(若非主动道具则改为随机魂火)", -- Metronome
[489] = "中环魂火{{MiddleWisp}}#生成1普通魂火#带有所模仿骰子的效果", -- D Infinity
[489] = "带有所模仿骰子的效果", -- D Infinity
[490] = "生成1随机魂火#若被摧毁, 则清理房间后重生", -- Eden's Soul
[504] = "中环魂火{{MiddleWisp}}#单房间魂火#快速低伤害泪弹, 自动瞄准", -- Brown Nugget
[507] = "外环魂火{{OuterWisp}}#击杀时几率生成1魂火", -- Sharp Straw
[510] = "中环魂火{{MiddleWisp}}#{{Collectible229}}萌死戳的肺/{{Collectible268}}腐烂宝宝/{{Collectible87}}洛基的角/{{Collectible118}}硫磺火泪弹", -- Delirious
[512] = "中环魂火{{MiddleWisp}}#磁性泪弹", -- Black Hole
[504] = "快速低伤害泪弹, 自动瞄准", -- Brown Nugget
[507] = "击杀时几率生成1魂火", -- Sharp Straw
[510] = "{{Collectible229}}萌死戳的肺/{{Collectible268}}腐烂宝宝/{{Collectible87}}洛基的角/{{Collectible118}}硫磺火泪弹", -- Delirious
[515] = "生成1随机魂火#若被摧毁, 则清理房间后重生", -- Mystery Gift
[516] = "中环魂火{{MiddleWisp}}#快速泪弹#泪弹像洒水器一样的8向发射", -- Sprinkler
[521] = "中环魂火{{MiddleWisp}}#三重泪弹#购买东西会摧毁所有代金券魂火", -- Coupon
[522] = "外环魂火{{OuterWisp}}#捕获的弹幕变为魂火", -- Telekinesis
[523] = "中环魂火{{MiddleWisp}}#魂火只在掉落物品时生成#被摧毁时生成1随机掉落物", -- Moving Box
[527] = "中环魂火{{MiddleWisp}}#不能发射泪弹#清理房间后, 魂火会打开箱子/门", -- Mr. ME!
[536] = "中环魂火{{MiddleWisp}}#将所有魂火变为{{HalfHeart}}半红心#献祭时生成高血量, 高伤害的1魂火", -- Sacrificial Altar
[545] = "内环魂火{{InnerWisp}}#被摧毁时生成1友好的骷髅仔", -- Book of the Dead
[550] = "中环魂火{{MiddleWisp}}#10%几率对敌人触发妈腿践踏的泪弹", -- Broken Shovel
[552] = "中环魂火{{MiddleWisp}}#10%几率对敌人触发妈腿践踏的泪弹#再生成1高血量魂火, 不能发射泪弹", -- Mom's Shovel
[555] = "中环魂火{{MiddleWisp}}#15%几率发射{{Collectible202}}弥达斯之触泪弹", -- Golden Razor
[556] = "中环魂火{{MiddleWisp}}#短程{{Collectible118}}硫磺火泪弹", -- Sulfur
[557] = "中环魂火{{MiddleWisp}}#↑ {{Luck}} 每有1幸运饼干魂火, 幸运+0.2", -- Fortune Cookie
[577] = "中环魂火{{MiddleWisp}}#无特殊效果", -- Damocles
[578] = "中环魂火{{MiddleWisp}}#魂火会滴落黄色水迹", -- Free Lemonade
[580] = "中环魂火{{MiddleWisp}}#进入新房间时几率产生红门", -- Red Key
[582] = "中环魂火{{MiddleWisp}}#低伤害魂火#最多1个", -- Wavy Cap
[516] = "泪弹像洒水器一样的8向发射", -- Sprinkler
[521] = "三重泪弹#购买东西会摧毁所有代金券魂火", -- Coupon
[522] = "捕获的弹幕变为魂火", -- Telekinesis
[523] = "魂火只在掉落物品时生成#被摧毁时生成1随机掉落物", -- Moving Box
[527] = "清理房间后, 魂火会打开箱子/门", -- Mr. ME!
[536] = "将所有魂火变为{{HalfHeart}}半红心", -- Sacrificial Altar
[545] = "被摧毁时生成1友好的骷髅仔", -- Book of the Dead
[550] = "10%几率对敌人触发妈腿践踏的泪弹", -- Broken Shovel
[552] = "10%几率对敌人触发妈腿践踏的泪弹 ", -- Mom's Shovel
[556] = "短程{{Collectible118}}硫磺火泪弹", -- Sulfur
[557] = "↑ {{Luck}} 每有1幸运饼干魂火, 幸运+0.2", -- Fortune Cookie
[578] = "魂火会滴落黄色水迹", -- Free Lemonade
[580] = "进入新房间时几率产生红门", -- Red Key
[582] = "最多1个", -- Wavy Cap
[584] = "多个重复品无额外效果", -- Book of Virtues
[585] = "中环魂火{{MiddleWisp}}#生成8普通魂火", -- Alabaster Box
[604] = "单房间魂火#东西落地时生成1-3魂火(最多8个)#10%几率发射{{Confusion}}混乱泪弹", -- Mom's Bracelet
[605] = "中环魂火{{MiddleWisp}}#无特殊效果", -- The Scooper
[609] = "中环魂火{{MiddleWisp}}#50%几率生成1无敌魂火#50%几率摧毁所有永恒六面骰魂火", -- Eternal D6
[611] = "中环魂火{{MiddleWisp}}#根据充能量提升血量和伤害", -- Larynx
[622] = "中环魂火{{MiddleWisp}}#所有魂火由3普通魂火取代", -- Genesis
[623] = "中环魂火{{MiddleWisp}}#无特殊效果", -- Sharp Key
[631] = "中环魂火{{MiddleWisp}}#使所有魂火分裂(伤害减半)#第三次分裂时魂火会被摧毁", -- Meat Cleaver
[635] = "单房间魂火#在角色传送前的位置生成1不动魂火(最多6个)", -- Stitches
[636] = "无魂火", -- R Key
[638] = "中环魂火{{MiddleWisp}}#免疫弹幕#接触时消除非头目敌人", -- Eraser
[639] = "中环魂火{{MiddleWisp}}#生成蓝苍蝇而不是发射泪弹", -- Yuck Heart
[640] = "中环魂火{{MiddleWisp}}#几率发射蓝火泪弹", -- Urn of Souls
[642] = "中环魂火{{MiddleWisp}}#有毒泪弹", -- Magic Skin
[650] = "中环魂火{{MiddleWisp}}#当甜蝇宝宝对角弹跳时, 所有糖梅溜溜笛魂火无敌并同样弹跳", -- Plum Flute
[653] = "无魂火#红幽灵能发射泪弹", -- Vade Retro
[655] = "中环魂火{{MiddleWisp}}#使用期间产生临时魂火#快速泪弹", -- Spin to Win
[604] = "东西落地时生成1-3魂火(最多8个)", -- Mom's Bracelet
[609] = "50%几率生成1无敌魂火#50%几率摧毁所有永恒六面骰魂火", -- Eternal D6
[611] = "根据充能量提升血量和伤害", -- Larynx
[622] = "所有魂火由3普通魂火取代", -- Genesis
[631] = "使所有魂火分裂(伤害减半)#第三次分裂时魂火会被摧毁", -- Meat Cleaver
[638] = "免疫弹幕#接触时消除非头目敌人", -- Eraser
[639] = "生成蓝苍蝇而不是发射泪弹", -- Yuck Heart
[640] = "几率发射蓝火泪弹", -- Urn of Souls
[650] = "当甜蝇宝宝对角弹跳时, 所有糖梅溜溜笛魂火无敌并同样弹跳", -- Plum Flute
[653] = "红幽灵能发射泪弹", -- Vade Retro
[655] = "使用期间产生临时魂火#快速泪弹", -- Spin to Win
[685] = "生成的魂火翻三倍", -- Jar of Wisps
[687] = "生成1随机魂火", -- Friend Finder
[703] = "中环魂火{{MiddleWisp}}#无特殊效果", -- Esau Jr.
[704] = "中环魂火{{MiddleWisp}}#高血量魂火#不能发射泪弹", -- Berserk
[705] = "中环魂火{{MiddleWisp}}#击杀敌人时产生1单房间魂火", -- Dark Arts
[706] = "中环魂火{{MiddleWisp}}#高血量魂火#不能发射泪弹", -- Abyss
[709] = "单房间魂火#角色落地时生成3魂火", -- Suplex
[705] = "击杀敌人时产生1单房间魂火", -- Dark Arts
[709] = "角色落地时生成3魂火", -- Suplex
[710] = "合成时生成1随机魂火", -- Bag of Crafting
[711] = "中环魂火{{MiddleWisp}}#高血量魂火", -- Flip
[712] = "道具魂火, 发射追踪泪弹", -- Lemegeton
[713] = "无魂火", -- Sumptorium
[719] = "中环魂火{{MiddleWisp}}#20%几率击杀敌人时掉落1{{Coin}}硬币", -- Keeper's Box
[712] = "道具魂火发射追踪泪弹", -- Lemegeton
[719] = "20%几率击杀敌人时掉落1{{Coin}}硬币", -- Keeper's Box
[720] = "生成1随机魂火", -- Everything Jar
[722] = "环绕被禁锢的敌人并向其发射#敌人死亡时魂火消失", -- Anima Sola
[723] = "中环魂火{{MiddleWisp}}#生成1随机魂火, 将所有魂火重置为该类型", -- Spindown Dice
[728] = "中环魂火{{MiddleWisp}}#激活时所有魂火围绕格罗", -- Gello
[729] = "单房间不动魂火", -- Decap Attack
[723] = "生成1随机魂火, 将所有魂火重置为该类型", -- Spindown Dice
[728] = "激活时所有魂火围绕格罗", -- Gello
}
---------- Abyss Locust description parts ----------
+9 -8
View File
@@ -173,6 +173,7 @@ end
---@param appendText? string | string[] @Text to be appended onto the description. Can be one string, or a table of two strings; one for doubling and one for tripling
---@param numbersToMultiply? number | number[] @The number inside the text that should be multiplied. can be one number, or a table of numbers
---@param maxMultiplier? number @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
---@param language? EID_LanguageCode @Default: "en"
-- Example: My modded trinket gives +0.5 range and when tripled, adds homing instead of tripling the range boost:
--- ```lua
--- EID:addGoldenTrinketMetadata(Isaac.GetTrinketIdByName("Cool Trinket"), {"", "Homing tears"}, 0.5, 2)
@@ -194,14 +195,15 @@ function EID:addGoldenTrinketMetadata(id, appendText, numbersToMultiply, maxMult
end
end
---Adds information about appending text and adding to 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
---@param id TrinketType
---@param appendText? string | string[] @Text to be appended onto the description. Can be one string, or a table of two strings; one for doubling and one for tripling
---@param numbersToChange? number | number[] @The number inside the text that gets added towards. can be one number, or a table of numbers
---@param additiveValues? number @Table of values that should be added to the number, if its doubled, tripled, or quadrupled
---@param language? EID_LanguageCode @Default: "en"
-- Example: My modded trinket gives +5 range and when tripled, adds homing instead of tripling the range boost:
--- ```lua
--- EID:addGoldenTrinketMetadataAdditive(Isaac.GetTrinketIdByName("Cool Trinket"), {"", "Homing tears"}, 5, {1,2,3})
--- ```
function EID:addGoldenTrinketMetadataAdditive(id, appendText, numbersToChange, additiveValues, language)
language = language or "en"
@@ -223,7 +225,6 @@ end
---Add a fully custom data table to the table of Golden Trinket effects.
---Check GoldenTrinketCallback in [eid_modifiers.lua](eid_modifiers.lua) to see the specifics of how it works.
---You may also want to add text entries into `EID.descriptions[languageCode].goldenTrinketEffects`
---<br><hr><br>
---@param id TrinketType
---@param dataTable EID_GoldenTrinketData
function EID:addGoldenTrinketTable(id, dataTable)
@@ -247,6 +248,8 @@ function EID:addCard(id, description, itemName, language)
end
-- DEPRECATED! Does nothing! Don't use!
---@deprecated
---@diagnostic disable-next-line: unused-local
function EID:addCardMetadata(id, mimicCharge, isRune)
end
@@ -292,6 +295,7 @@ end
---@param id PillEffect
---@param mimicCharge integer @DEPRECATED, does nothing
---@param class? EID_PillClass @Default: "0". With False PHD, "3-" gives +0.6 Damage, "2-" and "1-" spawn a Black Heart
---@diagnostic disable-next-line: unused-local
function EID:addPillMetadata(id, mimicCharge, class)
EID.pillMetadata[id] = {
class = class or "0",
@@ -332,7 +336,6 @@ end
--- ```lua
--- EID:assignTransformation("collectible", 1, "My Transformation")
--- ```
--- <hr>
---@param targetType EID_TypeVariantAlias @Alias for a `Type.Variant` of entity
---@param targetIdentifier integer | string @If valid `targetType` is specified, `SubType` of the entity. Otherwise, the full entity identifier
---@param transformationString string @Transformation name
@@ -383,7 +386,6 @@ end
---```lua
---EID:removeTransformation("collectible", 1, "My Transformation")
---```
---<hr>
---@param targetType EID_TypeVariantAlias @Alias for a `Type.Variant` of entity
---@param targetIdentifier integer | string @If valid `targetType` is specified, `SubType` of the entity. Otherwise, the full entity identifier
---@param transformationString string @Transformation name
@@ -494,7 +496,6 @@ function EID:addColor(shortcut, kColor, callback)
end
---Overrides all potentially displayed texts and permanently displays the given texts
---<br><hr>
---@see EID.hidePermanentText @Hides permanently displayed text object.
---@param descriptionObject EID_DescObj @Description object to display
---@param permName1 string
@@ -1005,8 +1006,9 @@ function EID:getXMLDescription(Type, Variant, SubType)
end
---Check if an entity is part of the describable entities
---@param entity Entity
---@param entity Entity | GridEntity
---@return boolean
---@diagnostic disable: param-type-mismatch
---@diagnostic disable-next-line: duplicate-set-field
function EID:hasDescription(entity)
if not EID:EntitySanityCheck(entity) then return false end
@@ -1604,7 +1606,6 @@ function EID:addDescriptionModifier(modifierName, condition, callback, position)
end
---Removes a Description object modifier
---<br><hr><br>
---@see EID.addDescriptionModifier
---@param modifierName string
function EID:removeDescriptionModifier(modifierName)
@@ -1681,7 +1682,7 @@ end
---Checks if the given player has the given item ID (or is the given player ID)
---@param player EntityPlayer
---@param Type EntityType
---@param Type EntityType | string
---@param Var integer?
---@param Sub integer?
---@return boolean
+1 -1
View File
@@ -333,7 +333,7 @@ function EID:IsGreedMode()
end
function EID:IsGreedModePlusTarot()
return game:IsGreedMode() and EID:ConditionalItemCheck(451, true)
return EID:IsGreedMode() and EID:ConditionalItemCheck(451, true)
end
function EID:PlayersHaveRestock()
+5 -3
View File
@@ -1,3 +1,5 @@
local game = Game()
EID.ButtonToIconMap = {
[ButtonAction.ACTION_SHOOTUP] = "{{ButtonY}}",
[ButtonAction.ACTION_SHOOTDOWN] = "{{ButtonA}}",
@@ -675,7 +677,7 @@ EID.InlineIcons["Tearsize"] = EID.isRepentance and EID.InlineIcons["TearsizeREP"
-- Function for handling colors that fade between multiple different colors (rainbow, gold, tarot cloth purple)
local function SwagColors(colors, maxAnimTime)
maxAnimTime = maxAnimTime or 80
local animTime = Game():GetFrameCount() % maxAnimTime
local animTime = game:GetFrameCount() % maxAnimTime
local colorFractions = (maxAnimTime - 1) / #colors
local subAnm = math.floor(animTime / (colorFractions + 1)) + 1
local primaryColorIndex = subAnm % (#colors + 1)
@@ -785,7 +787,7 @@ EID.InlineColors = {
-- Text will blink frequently
["ColorBlink"] = function(color)
local maxAnimTime = 40
local animTime = Game():GetFrameCount() % maxAnimTime
local animTime = game:GetFrameCount() % maxAnimTime
color = EID:copyKColor(color) or EID:getTextColor()
if animTime < maxAnimTime / 2 then
color.Alpha = 1 * color.Alpha
@@ -797,7 +799,7 @@ EID.InlineColors = {
-- Text will fade in and out
["ColorFade"] = function(color)
local maxAnimTime = 30
local animTime = Game():GetFrameCount() % (maxAnimTime + 10)
local animTime = game:GetFrameCount() % (maxAnimTime + 10)
color = EID:copyKColor(color) or EID:getTextColor()
if animTime < maxAnimTime / 2 then
color.Alpha = animTime / (maxAnimTime / 2) * color.Alpha
+2 -1
View File
@@ -1,3 +1,4 @@
local game = Game()
local showDebugChars = false
@@ -198,7 +199,7 @@ EID:removeIgnoredEntity(5,100,10) -- un-Ignore "Halo of flies" collectible entit
EID:addColor("ColorTwitterBlue", KColor(0, 0.671875, 0.9296875, 1), nil)
EID:addColor("ColorBlackBlink", nil, function(color)
local maxAnimTime = 30
local animTime = Game():GetFrameCount() % maxAnimTime
local animTime = game:GetFrameCount() % maxAnimTime
color = EID:copyKColor(color) or EID:getTextColor()
if animTime < maxAnimTime / 2 then
color = KColor(0, 0, 0, 1 * color.Alpha)
+3 -1
View File
@@ -1,3 +1,5 @@
local game = Game()
--------------- Grid entity description modifiers ---------------
-- Table containing grid entity description handlers
@@ -90,7 +92,7 @@ end
-- Handle Sacrifice room payout
----------------------------------------------------
local function SacrificeRoomCondition(_)
return Game():GetRoom():GetType() == RoomType.ROOM_SACRIFICE and EID.Config["DisplaySacrificeInfo"]
return game:GetRoom():GetType() == RoomType.ROOM_SACRIFICE and EID.Config["DisplaySacrificeInfo"]
end
local function SacrificeRoomCallback(descObj)
+38 -17
View File
@@ -173,14 +173,14 @@ EID.ItemReminderDescriptionModifier = {
local inAscent = EID.isRepentance and (level:IsAscent() or level:IsPreAscent())
local final = not level:IsNextStageAvailable()
if EID:IsGreedMode() then
if game:IsGreedMode() then
skip = 1
if stageNum == 5 then skip = 0 -- Depths 2 -> Womb 1
elseif stageNum == 7 or stageNum == 10 then skip = 2
elseif stageNum == 0 then count = 1 end -- Womb 1 -> Sheol, Sheol -> Chest
else
if final or stageNum == 12 then count = 1 -- Dark Room/Chest/The Void/Home/Corpse 2 doesn't display any more
elseif EID:IsGreedMode() then count = 2 -- prevent Greed Mode Sheol from behaving weird
elseif game:IsGreedMode() then count = 2 -- prevent Greed Mode Sheol from behaving weird
elseif stageNum == 8 then count = 3; skip = 1 -- Womb 2 displays Sheol and Cathe
elseif stageNum == 9 then count = 3 -- ??? displays Sheol and Cathe
elseif stageNum == 10 then skip = 1 end -- Sheol/Cathe skip one to display Dark Room/Chest
@@ -506,7 +506,8 @@ function EID:ItemReminderAddSpecialDescriptions(player)
end
end
-- Information about the player character's traits
-- Item Reminder function: Information about the player character's traits
---@param player EntityPlayer
function EID:ItemReminderHandleCharacterInfo(player)
local playerType = player:GetPlayerType()
local playerDesc = EID:getDescriptionEntry("CharacterInfo")[playerType]
@@ -515,7 +516,8 @@ function EID:ItemReminderHandleCharacterInfo(player)
end
end
-- Passive Item Descriptions
-- Item Reminder function: Passive Item Descriptions
---@param player EntityPlayer
function EID:ItemReminderHandleSelectedPassiveItem(player)
local playerNum = EID:getPlayerID(player, true)
if EID.RecentlyTouchedItems[playerNum] and #EID.RecentlyTouchedItems[playerNum] > 0 then
@@ -523,7 +525,8 @@ function EID:ItemReminderHandleSelectedPassiveItem(player)
end
end
-- Active Item Descriptions
-- Item Reminder function: Active Item Descriptions
---@param player EntityPlayer
function EID:ItemReminderHandleActiveItems(player)
-- limit number of active item descriptions to 2, since Slot 3 and 4 are handled seperately
for i = 0, 1 do
@@ -536,7 +539,8 @@ function EID:ItemReminderHandleActiveItems(player)
end
end
-- pocket active
-- Item Reminder function: pocket actives
---@param player EntityPlayer
function EID:ItemReminderHandlePocketActive(player)
if not EID.isRepentance or not EID:ItemReminderCanAddMoreToView() then return end
local pocketActive = player:GetActiveItem(2) or 0
@@ -545,7 +549,8 @@ function EID:ItemReminderHandlePocketActive(player)
end
end
-- dice bag
-- Item Reminder function: dice bag
---@param player EntityPlayer
function EID:ItemReminderHandleDiceBag(player)
if not EID.isRepentance or not EID:ItemReminderCanAddMoreToView() then return end
@@ -555,7 +560,8 @@ function EID:ItemReminderHandleDiceBag(player)
end
end
-- Pocket Item Descriptions
-- Item Reminder function: Pocket Item Descriptions
---@param player EntityPlayer
function EID:ItemReminderHandlePocketItems(player)
for i = 0, 2 do
if not EID:ItemReminderCanAddMoreToView() then return end
@@ -576,7 +582,9 @@ function EID:ItemReminderHandlePocketItems(player)
end
end
-- Held trinkets are added at the end of the table; use this table in descending order
-- Item Reminder function: Held trinkets are added at the end of the table; use this table in descending order
---@param player EntityPlayer
---@diagnostic disable-next-line: duplicate-set-field
function EID:ItemReminderHeldPlusGulped(player)
local playerNum = EID:getPlayerID(player, true)
local newTable = {}
@@ -587,12 +595,14 @@ function EID:ItemReminderHeldPlusGulped(player)
end
return newTable
end
-- Trinket Descriptions
-- Item Reminder function: Trinket Descriptions
---@param player EntityPlayer
function EID:ItemReminderHandleTrinkets(player)
EID:ItemReminderHandleItemPrinting(player, EID:ItemReminderHeldPlusGulped(player), 350, true)
end
-- Tainted ??? Poop Descriptions
-- Item Reminder function: Tainted ??? Poop Descriptions
---@param player EntityPlayer
function EID:ItemReminderHandlePoopSpells(player)
if EID.isRepentance and player:GetPlayerType() == 25 and EID:ItemReminderCanAddMoreToView() then
local poopInfo = EID:getDescriptionEntry("poopSpells")
@@ -646,13 +656,14 @@ function EID:ItemReminderHandlePoopSpells(player)
end
end
-- Lemegeton wisp descriptions
-- Item Reminder function: Lemegeton wisp descriptions
---@param player EntityPlayer
function EID:ItemReminderHandleLemegetonWisps(player)
local playerNum = EID:getPlayerID(player, true)
EID:ItemReminderHandleItemPrinting(player, EID.WispsPerPlayer[playerNum], 100, false)
end
-- Handle scroll inputs
-- Item Reminder function: Handle scroll inputs
function EID:ItemReminderHandleInputs()
if EID.Config["ItemReminderEnabled"] and EID.Config["ItemReminderDisplayMode"] ~= "Classic" and EID.holdTabCounter >= 30 and EID.TabDescThisFrame == false and EID.holdTabPlayer ~= nil then
if EID.Config["ItemReminderDisableInputs"] then EID.holdTabPlayer.ControlsCooldown = 2 end
@@ -695,10 +706,10 @@ function EID:ItemReminderHandleInputs()
end
end
-- special list of all players, ignoring tainted forgotten ghost and coop babies
-- Item Reminder function: special list of all players, ignoring tainted forgotten ghost and coop babies
function EID:ItemReminderGetAllPlayers()
local filteredPlayerList = {}
for i, player in ipairs(EID.coopAllPlayers) do
for _, player in ipairs(EID.coopAllPlayers) do
if not (EID.isRepentance and player:GetPlayerType() == PlayerType.PLAYER_THESOUL_B) and player:GetBabySkin() == -1 then
table.insert(filteredPlayerList, player)
end
@@ -706,14 +717,20 @@ function EID:ItemReminderGetAllPlayers()
return filteredPlayerList
end
-- Item Reminder function: check if the currently selected category is scrollable
---@return boolean
function EID:IsScrollableCategorySelected()
return EID.ItemReminderCategories[EID.ItemReminderSelectedCategory + 1].isScrollable
end
-- Item Reminder function: check if the given category is currently selected
---@param categoryID integer
---@return boolean
function EID:IsCategorySelected(categoryID)
return EID.ItemReminderCategories[EID.ItemReminderSelectedCategory + 1].id == categoryID
end
-- Item Reminder function: Resets data when initializing holding TAB
function EID:ItemReminderHandleInitHoldTab()
local oldDisplayPlayer = EID.ItemReminderSelectedPlayer
@@ -734,6 +751,8 @@ function EID:ItemReminderHandleInitHoldTab()
end
end
--- Returns the title of the currently selected Item Reminder category.
---@return string
function EID:ItemReminderGetTitle()
local category = EID.ItemReminderCategories[EID.ItemReminderSelectedCategory + 1]
@@ -836,19 +855,21 @@ function EID:ItemReminderHandleItemPrinting(player, entryTable, itemVariant, des
if descending then
local startIndex = (#entryTable - EID.ItemReminderSelectedItems[EID.ItemReminderSelectedCategory] - 1) % #entryTable
for i = 1, descsToDisplay do
for _ = 1, descsToDisplay do
EID:ItemReminderAddDescription(player, 5, itemVariant, entryTable[startIndex+1] % GLITCH_ITEM_FLAG)
startIndex = (startIndex - 1) % #entryTable
end
else
local startIndex = EID.ItemReminderSelectedItems[EID.ItemReminderSelectedCategory] % #entryTable
for i = 1, descsToDisplay do
for _ = 1, descsToDisplay do
EID:ItemReminderAddDescription(player, 5, itemVariant, entryTable[startIndex+1] % GLITCH_ITEM_FLAG)
startIndex = (startIndex + 1) % #entryTable
end
end
end
--- Generates the description for the Item Reminder, based on the currently selected category and player.
---@return string
function EID:ItemReminderGetDescription()
EID.InsideItemReminder = true
EID.ItemReminderTempDescriptions = {}
+12 -1
View File
@@ -51,6 +51,17 @@ EID.BreakUtf8CharsLanguage = {
---| "zh_cn" @Simplified Chinese
--#endregion
-- Map the game's built-in language option strings to EID's
EID.LanguageMap = {
["jp"] = "ja",
["es"] = "es",
["de"] = "de",
["fr"] = "fr",
["ru"] = "ru",
["kr"] = "ko",
["zh"] = "zh_cn",
}
---Get the current Language. Defaults to english if none is set.
---@return EID_LanguageCode
function EID:getLanguage()
@@ -61,7 +72,7 @@ function EID:getLanguage()
lang = "auto"
end
if lang == "auto" then
local langToReturn = Options and Options.Language or "en" -- Use game language, if available.
local langToReturn = Options and EID.LanguageMap[Options.Language] or "en" -- Use game language, if available.
-- don't do any updating if on a Repentance version before v1.7.9b
if Isaac.RunCallback ~= nil then
for _, callbackData in pairs(Isaac.GetCallbacks("EID_EVALUATE_AUTO_LANG")) do
+13 -2
View File
@@ -8,8 +8,15 @@ EID.TabDescThisFrame = false
-- Some modifiers (e.g. Glitched Crown) want to know if Tab was pressed/released, rather than held
EID.TabHeldThisFrame = false
EID.TabHeldLastFrame = false
function EID:TabPressed() return EID.TabHeldThisFrame and not EID.TabHeldLastFrame end
function EID:TabReleased() return EID.TabHeldLastFrame and not EID.TabHeldThisFrame end
-- Returns true if Tab was pressed this frame, false otherwise
function EID:TabPressed()
return EID.TabHeldThisFrame and not EID.TabHeldLastFrame
end
-- Returns true if Tab was released this frame, false otherwise
function EID:TabReleased()
return EID.TabHeldLastFrame and not EID.TabHeldThisFrame
end
-- List of collectible IDs for us to check if a player owns them; feel free to add to this in mods that add description modifiers!
EID.collectiblesToCheck[CollectibleType.COLLECTIBLE_VOID] = true
@@ -32,6 +39,7 @@ EID.collectiblesOwned = {}
EID.collectiblesAbsorbed = {}
EID.LastCollectibleCheck = 0
-- Check if any players own a collectible, returns true if at least one player has it
function EID:CheckPlayersCollectibles()
-- recheck the players' owned collectibles periodically, not every frame
-- (has to be checked regularly due to mechanics like D4 / Tainted Eden)
@@ -575,12 +583,14 @@ if EID.isRepentance then
--replacing numeric text based on our multiplier
if (data.t) then
local numReplacements = 0
--"%d*%.?%d+" will grab every number group (1, 10, 0.5), this will allow us to not replace the "1" in "10" erroneously
descObj.Description = string.gsub(descObj.Description, "%d*%.?%d+", function(s)
count = 0
for _, v in ipairs(data.t) do
if (s == tostring(v) and count == 0) then
count = count + 1
numReplacements = numReplacements + 1
if v == 17 then
if multiplier == 2 then v = 16.5
elseif multiplier == 3 then v = (1/6)*100 end -- convert 17% to 33% or 50%
@@ -589,6 +599,7 @@ if EID.isRepentance then
end
end
end)
count = count + numReplacements
end
--replacing a phrase, such as "half a heart"
if data.findReplace then
+85 -26
View File
@@ -11,8 +11,8 @@ EID.isRepentance = REPENTANCE or EID.isRepentancePlus -- REPENTANCE variable can
require("eid_config")
EID.Config = EID.UserConfig
EID.Config.Version = "3.2" -- note: changing this will reset everyone's settings to default!
EID.ModVersion = 4.98
EID.ModVersionCommit = "9b736b6"
EID.ModVersion = 4.100
EID.ModVersionCommit = "c20341d"
EID.DefaultConfig.Version = EID.Config.Version
EID.isHidden = false
EID.player = nil -- The primary Player Entity of Player 1
@@ -86,6 +86,12 @@ local hudBBSprite = Sprite()
hudBBSprite:Load("gfx/eid_transform_icons.anm2", true)
hudBBSprite:Play("boundingBox")
local questionMarkSprite = Sprite()
questionMarkSprite:Load("gfx/005.100_collectible.anm2",true)
questionMarkSprite:ReplaceSpritesheet(1,"gfx/items/collectibles/questionmark.png")
questionMarkSprite:LoadGraphics()
EID.ModIndicator = { }
-- Overwriting "RegisterMod" to track which mods are loading
@@ -133,6 +139,8 @@ local nullVector = Vector(0,0)
------------------------------- Load Font ---------------------------------
local modfolder ='external item descriptions_836319872' --release mod folder name
--- Function to get the current mod path
--- @return string The absolute path to the current mod
function EID:GetCurrentModPath()
if debug then
return string.sub(debug.getinfo(EID.GetCurrentModPath).source,2) .. "/../"
@@ -173,8 +181,7 @@ if not success then
end
end
---------------------------------------------------------------------------
-------------Handle Resetting Floor Trackers--------------
--- Function to reset all floor trackers when a new floor is entered
function EID:onNewFloor()
pathsChecked = {}
if EID.isRepentance then
@@ -187,14 +194,7 @@ function EID:onNewFloor()
end
EID:AddCallback(ModCallbacks.MC_POST_NEW_LEVEL, EID.onNewFloor)
---------------------------------------------------------------------------
------------------------Handle ALT FLOOR CHOICE----------------------------
local questionMarkSprite = Sprite()
questionMarkSprite:Load("gfx/005.100_collectible.anm2",true)
questionMarkSprite:ReplaceSpritesheet(1,"gfx/items/collectibles/questionmark.png")
questionMarkSprite:LoadGraphics()
--- Function to check if a collectible pedestal is an alt path choice
function EID:IsAltChoice(pickup)
-- do not run this while Curse of the Blind is active, since this function is really just a "is collectible pedestal a red question mark" check
if not EID.isRepentance or EID:hasCurseBlind() then
@@ -250,6 +250,9 @@ if EID.isRepentance then
local lastGetItemResult = {nil, nil, nil, nil} -- itemID, Frame, gridIndex, InitSeed
local lastFrameGridChecked = 0
--- Handle Flip Item positions and Crane Game item positions. Repentance Only function!
---@param selectedCollectible number
---@param itemPoolType number
function EID:postGetCollectible(selectedCollectible, itemPoolType)
-- Handle Crane Game
if itemPoolType == ItemPoolType.POOL_CRANE_GAME then
@@ -284,7 +287,11 @@ if EID.isRepentance then
end
EID:AddCallback(ModCallbacks.MC_POST_GET_COLLECTIBLE, EID.postGetCollectible)
-- Handle Flip Item spawn
--- Pre Room Entity Spawn callback to handle Flip item and pedestal spawning. Repentance Only function!
---@param entityType any
---@param variant any
---@param subtype any
---@param gridIndex any
function EID:preRoomEntitySpawn(entityType, variant, subtype, gridIndex)
flipItemNext = false
if entityType == 6 and variant == 14 then
@@ -299,6 +306,8 @@ if EID.isRepentance then
end
EID:AddCallback(ModCallbacks.MC_PRE_ROOM_ENTITY_SPAWN, EID.preRoomEntitySpawn)
--- Post Pickup Init callback to handle Flip item initialization. Repentance Only function!
---@param entity any
function EID:postPickupInitFlip(entity)
initialItemNext = false
flipItemNext = true
@@ -327,6 +336,8 @@ if EID.isRepentance then
end
EID:AddCallback(ModCallbacks.MC_POST_PICKUP_INIT, EID.postPickupInitFlip, PickupVariant.PICKUP_COLLECTIBLE)
--- Check if a pedestal's index is valid for Flip items. Repentance Only function!
---@param entity any
function EID:CheckPedestalIndex(entity)
-- Only pedestals with indexes that were present at room load can be flip pedestals
-- Fixes shop restock machines and Diplopia... mostly. At least while you're in the room.
@@ -342,6 +353,7 @@ if EID.isRepentance then
EID:AddCallback(ModCallbacks.MC_POST_PICKUP_UPDATE, EID.CheckPedestalIndex, PickupVariant.PICKUP_COLLECTIBLE)
-- Before using Flip, swap all flippable pedestal's current item with the flip one (also, fix grid index if needed)
-- Repentance only function!
function EID:CheckFlipGridIndexes(collectibleType)
-- also, reload our descriptions due to transformation progress changing upon Flip
EID.ForceRefreshCache = true
@@ -366,7 +378,7 @@ if EID.isRepentance then
EID:AddCallback(ModCallbacks.MC_PRE_USE_ITEM, EID.CheckFlipGridIndexes, CollectibleType.COLLECTIBLE_FLIP)
end
-- Watch for a Void absorbing active items
-- MC_PRE_USE_ITEM callback to watch for Void absorbing active items
function EID:CheckVoidAbsorbs(_, _, player)
player = player or EID.player
local playerID = EID:getPlayerID(player, true)
@@ -453,6 +465,7 @@ EID.CachedRenderPoses = {}
EID.descriptionsToPrint = {}
EID.entitiesToPrint = {}
--- Reset the description cache, used when options change or when printing descriptions
function EID:ResetDescCache()
EID.CachedIcons = {}
EID.CachedStrings = {}
@@ -461,7 +474,9 @@ function EID:ResetDescCache()
EID.previousDescs = {}
end
--- Add a description to the print queue
---@param desc EID_DescObj | table -- The description object to add
---@param insertLoc integer | nil
function EID:addDescriptionToPrint(desc, insertLoc)
if desc.Entity and EID.entitiesToPrint[GetPtrHash(desc.Entity)] then return end
if #EID.descriptionsToPrint == EID.Config["MaxDescriptionsToDisplay"] and not insertLoc then return end
@@ -472,12 +487,17 @@ function EID:addDescriptionToPrint(desc, insertLoc)
if desc.Entity then EID.entitiesToPrint[GetPtrHash(desc.Entity)] = true end
end
--- Add a question mark description to the print queue
---@param entity Entity
---@param description string | nil
function EID:addQuestionMarkDescription(entity, description)
EID:addDescriptionToPrint({ Icon = EID.InlineIcons["QuestionMark"], Description = description or "", Entity = entity})
end
local prevPrintFrame = 0
--- Print all descriptions that are currently in the description table
--- @param useCached boolean | nil - If true, will use the cached descriptions instead of printing new ones
function EID:printDescriptions(useCached)
prevPrintFrame = EID.GameRenderCount
@@ -513,6 +533,7 @@ function EID:printDescriptions(useCached)
end
end
--- Print all descriptions that are currently in the description table
function EID:printNewDescriptions()
EID.CachingDescription = true
EID:ResetDescCache()
@@ -533,11 +554,14 @@ function EID:printNewDescriptions()
end
end
--- Prints a description to the screen
---@param desc EID_DescObj
---@param cachedID integer | nil -- If this is a cached description, pass the index of the cached description
function EID:printDescription(desc, cachedID)
EID:PositionLocalMode(desc.Entity)
-- Do not print this description if it has to be drawn in the top-left and we've already drawn a top-left desc this frame
if EID.CurrentScaleType == "Size" then
if alwaysUseLocalMode then return false
if alwaysUseLocalMode then return
else alwaysUseLocalMode = true end
end
EID.isDisplaying = true
@@ -716,6 +740,10 @@ function EID:printDescription(desc, cachedID)
end
end
--- Prints bullet points from a description string
---@param description string - The description string to print
---@param renderPos Vector - The position to render the bullet points at
---@param ignoreBPConfig boolean - If true, will ignore the bullet point icon configuration
function EID:printBulletPoints(description, renderPos, ignoreBPConfig)
local textboxWidth = tonumber(EID.Config["TextboxWidth"])
local textScale = Vector(EID.Scale, EID.Scale)
@@ -752,6 +780,7 @@ end
EID.isMirrorRoom = false
EID.isDeathCertRoom = false
if EID.isRepentance then
--- Handle Flip Item in New Room. Repentance only function!
function EID:AssignFlipItems()
EID.flipMaxIndex = -1
local curRoomIndex = game:GetLevel():GetCurrentRoomIndex()
@@ -766,6 +795,7 @@ if EID.isRepentance then
end
end
end
--- Handle MC_POST_NEW_ROOM for Repentance features
function EID:onNewRoomRep()
local level = game:GetLevel()
EID.isMirrorRoom = level:GetCurrentRoom():IsMirrorWorld()
@@ -779,7 +809,7 @@ if EID.isRepentance then
end
EID:AddCallback(ModCallbacks.MC_POST_NEW_ROOM, EID.onNewRoomRep)
end
--- MC_POST_NEW_ROOM callback to handle new rooms, mostly Glowing Hour Glass rewinding and Grid Entities
function EID:onNewRoom()
EID:CheckCurrentRoomGridEntities()
-- Store values here to be rewound after using Glowing Hour Glass
@@ -797,11 +827,15 @@ end
EID:AddCallback(ModCallbacks.MC_POST_NEW_ROOM, EID.onNewRoom)
---------------------------------------------------------------------------
---------------------------Handle Rendering--------------------------------
-- RGB colors for each player's highlights (Red, Blue, Yellow, Green)
local playerRGB = { {1,0.6,0.6}, {0.5,0.75,1}, {0.9, 0.9, 0.5}, {0.5,1,0.75} }
--- Render an unidentified pill description
---@param entity Entity
function EID:renderUnidentifiedPill(entity)
EID:PositionLocalMode(entity)
if EID.CurrentScaleType == "Size" then
if alwaysUseLocalMode then return false
if alwaysUseLocalMode then return
else alwaysUseLocalMode = true end
end
EID.isDisplaying = true
@@ -841,10 +875,9 @@ function EID:renderUnidentifiedPill(entity)
end
end
-- RGB colors for each player's highlights (Red, Blue, Yellow, Green)
local playerRGB = { {1,0.6,0.6}, {0.5,0.75,1}, {0.9, 0.9, 0.5}, {0.5,1,0.75} }
--- Render an indicator for an entity, such as a highlight or arrow
---@param entity Entity
---@param playerNum integer - The player number to render the indicator for. Controls the arrow color
function EID:renderIndicator(entity, playerNum)
if EID.Config["Indicator"] == "none" then
return
@@ -912,6 +945,7 @@ function EID:renderIndicator(entity, playerNum)
end
end
--- Position the description box in Local Mode, next to the item or entity
---@param entity Entity
---@diagnostic disable-next-line: duplicate-set-field
function EID:PositionLocalMode(entity)
@@ -944,6 +978,7 @@ function EID:PositionLocalMode(entity)
end
end
--- Render HUD location indicators for debugging purposes
function EID:renderHUDLocationIndicators()
local mousePos = Isaac.WorldToRenderPosition(Input.GetMousePosition(true)) * 2
Isaac.RenderScaledText("Mouse pos X:"..mousePos.X.." Y:"..mousePos.Y, 100, 10, 0.5, 0.5, 1 ,1 ,1 ,1 )
@@ -960,6 +995,8 @@ end
local lastMousePos = Vector(0,0)
local lastMouseMove = 0
--- Handle the HUD hover functionality, checking if the mouse is over any HUD elements
--- @return EID_DescObj | nil - Returns the description object if the mouse is over a HUD element, otherwise nil
function EID:handleHoverHUD()
local mousePos = Isaac.WorldToScreen(Input.GetMousePosition(true)) * 2
if mousePos:Distance(lastMousePos) > 2 then
@@ -982,6 +1019,7 @@ function EID:handleHoverHUD()
return nil
end
--- Set the player and coop player data for EID
function EID:setPlayer()
local numPlayers = game:GetNumPlayers()
-- Old simple setPlayer, to reduce runtime in single player
@@ -1034,12 +1072,13 @@ end
---------------------------------------------------------------------------
---------------------------On Update Function------------------------------
-- Runs 30 times a second; doesn't update while paused
local collSpawned = false
EID.RecheckVoid = false
EID.ShouldCheckWisp = false
--- MC_POST_UPDATE callback that runs 30 times a second; doesn't update while paused
--- Handles updating the game state and checking for new items
function EID:onGameUpdate()
EID.GameUpdateCount = EID.GameUpdateCount + 1
EID:checkPlayersForMissingItems()
@@ -1128,6 +1167,7 @@ local function attemptPathfind(entity)
end
local hasShownStartWarning = false
--- Check for start of run warnings, such as old game version or modded items
function EID:CheckStartOfRunWarnings()
if EID.isRepentance and not EID.Config["DisableStartOfRunWarnings"] and game:GetFrameCount() < 10*30 then
-- Old Repentance version check; update this to check for the existence of the newest mod API function EID uses
@@ -1228,6 +1268,7 @@ EID.lastDist = 0
EID.OptionChanged = false
EID.bagPlayer = nil
--- Render function that runs every frame and handles the main EID rendering logic.
function EID:OnRender()
-- Increases by 60 per second, ignores pauses
EID.GameRenderCount = EID.GameRenderCount + 1
@@ -1614,6 +1655,9 @@ end
EID:AddCallback(ModCallbacks.MC_POST_RENDER, EID.OnRender)
--- Add active item progress to the player's transformation progress.
---@param player EntityPlayer
---@param isD4 boolean
local function AddActiveItemProgress(player, isD4)
EID.ForceRefreshCache = true
local playerID = EID:getPlayerID(player, true)
@@ -1635,10 +1679,12 @@ end
-- Check the active items of every player for transformation progress (used at game start and after Genesis)
local function CheckAllActiveItemProgress()
for i = 0, game:GetNumPlayers() - 1 do
AddActiveItemProgress(Isaac.GetPlayer(i))
AddActiveItemProgress(Isaac.GetPlayer(i), false)
end
end
--- OnGameStartGeneral is called when the game starts, either from a save or a new run.
--- It initializes various EID tables and resets item interactions.
local function OnGameStartGeneral(_,isSave)
EID:GetAllPassiveItems()
EID:GetTransformationsOfModdedItems()
@@ -1671,7 +1717,7 @@ local function OnUseD4(_, _, _, player)
end
EID:AddCallback(ModCallbacks.MC_USE_ITEM, OnUseD4, CollectibleType.COLLECTIBLE_D4)
-- Watch for smelting trinkets; includes Gulp and Marbles
-- MC_PRE_USE_ITEM callback to watch for smelting trinkets; includes Gulp and Marbles
function EID:OnUseSmelter(_, _, _, player)
player = player or EID.player
local playerNum = EID:getPlayerID(player, true)
@@ -1684,7 +1730,7 @@ function EID:OnUseSmelter(_, _, _, player)
end
EID:AddCallback(ModCallbacks.MC_PRE_USE_ITEM, EID.OnUseSmelter, CollectibleType.COLLECTIBLE_SMELTER)
-- Watch for Glowing Hourglass to revert certain variables
-- MC_PRE_USE_ITEM callback to watch for Glowing Hourglass to revert certain variables
local function OnUseGlowingHourglass(_, _, _, _)
EID.absorbedItems = EID:CopyTable(preHourglassStatus.absorbedItems)
EID.PlayerItemInteractions = EID:CopyTable(preHourglassStatus.PlayerItemInteractions)
@@ -1721,6 +1767,10 @@ if EID.isRepentance then
EID:AddCallback(ModCallbacks.MC_PRE_USE_ITEM, OnUseGeneral)
end
--- OnUsePill is called when a pill is used, and handles pill history tracking and Wild Card effects.
---@param pillEffectID number The ID of the pill effect being used.
---@param player EntityPlayer The player using the pill.
---@param useFlags number Flags indicating how the pill was used (e.g., whether it was used with no animation).
function EID:OnUsePill(pillEffectID, player, useFlags)
player = player or EID.player --AB+ doesn't receive player in callback arguments!
-- get the pill color by checking the player's pocket
@@ -1743,6 +1793,10 @@ function EID:OnUsePill(pillEffectID, player, useFlags)
end
EID:AddCallback(ModCallbacks.MC_USE_PILL, EID.OnUsePill)
--- OnUseCard is called when a card is used, and handles card history tracking and Wild Card effects.
---@param cardID number The ID of the card being used.
---@param player EntityPlayer The player using the card.
---@param useFlags number Flags indicating how the card was used (e.g., whether it was used with no animation).
function EID:OnUseCard(cardID, player, useFlags)
player = player or EID.player --AB+ doesn't receive player in callback arguments!
EID:AddPickupToHistory("card", cardID, player, useFlags)
@@ -1771,6 +1825,11 @@ local configIgnoreList = {
--------------------------------
--------Handle Savedata---------
--------------------------------
--- OnGameStart is called when the game starts, either from a save or a new run.
--- It initializes the config data if available.
---@param isSave boolean Indicates whether the game is starting from a save or a new run.
function EID:OnGameStart(isSave)
--Loading Moddata--
if EID:HasData() then
@@ -1881,7 +1940,7 @@ function EID:OnGameStart(isSave)
end
EID:AddCallback(ModCallbacks.MC_POST_GAME_STARTED, EID.OnGameStart)
--Saving Moddata--
--- OnGameExit saves the current EID configuration.
function EID:OnGameExit()
if EID.isRepentance then
EID.Config["BagContent"] = EID.BoC.BagItems or {}
+1 -1
View File
@@ -56,7 +56,7 @@ There are multiple Versions of the mod, depending on which DLCs you have install
[img]https://i.imgur.com/jrdGbna.png[/img]
[url=https://github.com/wofsauge/External-Item-Descriptions/blob/master/CREDITS.md]Check out the credits here[/url]
</description>
<version>4.98</version>
<version>4.100</version>
<visibility>Public</visibility>
<tag id="Lua"/>
<tag id="Items"/>