Skip to content

Commit 7eaa32e

Browse files
committed
next tag api changes
1 parent 8d4885a commit 7eaa32e

File tree

5 files changed

+29
-12
lines changed

5 files changed

+29
-12
lines changed

items/code.lua

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4163,8 +4163,9 @@ local alttab = {
41634163
ret = "???"
41644164
end
41654165
end
4166-
if next(SMODS.find_card("j_cry_kittyprinter")) then
4167-
ret = localize({ type = "name_text", key = "tag_cry_cat", set = "Tag" })
4166+
local tag = Cryptid.get_next_tag()
4167+
if tag then
4168+
ret = localize({ type = "name_text", key = tag, set = "Tag" })
41684169
end
41694170
return { vars = { ret } }
41704171
end,
@@ -4181,8 +4182,9 @@ local alttab = {
41814182
play_sound("tarot1")
41824183
local tag = nil
41834184
local type = G.GAME.blind:get_type()
4184-
if next(SMODS.find_card("j_cry_kittyprinter")) then
4185-
tag = Tag("tag_cry_cat")
4185+
local tag_key = Cryptid.get_next_tag()
4186+
if tag_Key then
4187+
tag = Tag(tag_key)
41864188
elseif type == "Boss" then
41874189
tag = Tag(get_next_tag_key())
41884190
else
@@ -4206,8 +4208,9 @@ local alttab = {
42064208
play_sound("tarot1")
42074209
local tag = nil
42084210
local type = G.GAME.blind:get_type()
4209-
if next(SMODS.find_card("j_cry_kittyprinter")) then
4210-
tag = Tag("tag_cry_cat")
4211+
local tag_key = Cryptid.get_next_tag()
4212+
if tag_Key then
4213+
tag = Tag(tag_key)
42114214
elseif type == "Boss" then
42124215
tag = Tag(get_next_tag_key())
42134216
else

items/misc_joker.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9311,6 +9311,10 @@ local pity_prize = {
93119311
tag_key = get_next_tag_key("cry_pity_prize")
93129312
until tag_key ~= "tag_boss" --I saw pickle not generating boss tags because it apparently causes issues, so I did the same here
93139313
-- this is my first time seeing repeat... wtf
9314+
local tag = Cryptid.get_next_tag()
9315+
if tag then
9316+
tag_key = tag
9317+
end
93149318
local tag = Tag(tag_key)
93159319
tag.ability.shiny = Cryptid.is_shiny()
93169320
if tag.name == "Orbital Tag" then

lib/cross-mod.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,11 @@ if (SMODS.Mods["AntePreview"] or {}).can_load then
115115
big = get_new_boss()
116116
end
117117
local predictions = predict_hook()
118-
if next(SMODS.find_card("j_cry_kittyprinter")) then
119-
predictions.Small.tag = "tag_cry_cat"
120-
predictions.Big.tag = "tag_cry_cat"
118+
local s = Cryptid.get_next_tag("Small")
119+
local b = Cryptid.get_next_tag("Big")
120+
if s or b then
121+
predictions.Small.tag = s or predictions.Small.tag
122+
predictions.Big.tag = b or predictions.Big.tag
121123
end
122124
if G.GAME.modifiers.cry_no_tags then
123125
for _, pred in pairs(predictions) do

lib/misc.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,3 +1591,9 @@ function Cryptid.upgrade_rarity(card, seed)
15911591
card:juice_up()
15921592
end
15931593
end
1594+
1595+
function Cryptid.get_next_tag(override)
1596+
if next(SMODS.find_card("j_cry_kittyprinter")) then
1597+
return "tag_cry_cat"
1598+
end
1599+
end

lovely/misc.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ target = "functions/button_callbacks.lua"
257257
pattern = '''add_tag(_tag.config.ref_table)'''
258258
position = "at"
259259
payload = '''
260-
add_tag( next(SMODS.find_card('j_cry_kittyprinter')) and Tag('tag_cry_cat') or _tag.config.ref_table, true)
260+
local tag = Cryptid.get_next_tag()
261+
add_tag(tag or _tag.config.ref_table, true)
261262
'''
262263
match_indent = true
263264

@@ -436,8 +437,9 @@ target = "functions/UI_definitions.lua"
436437
pattern = "local _tag = Tag(G.GAME.round_resets.blind_tags[blind_choice], nil, blind_choice)"
437438
position = "after"
438439
payload = '''
439-
if next(SMODS.find_card('j_cry_kittyprinter')) then
440-
_tag = Tag('tag_cry_cat', nil, blind_choice)
440+
local tag = Cryptid.get_next_tag()
441+
if tag then
442+
_tag = Tag(tag, nil, blind_choice)
441443
end
442444
'''
443445
match_indent = true

0 commit comments

Comments
 (0)