You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pattern = '''local tag_sprite = Sprite(0,0,_size*1,_size*1,G.ASSET_ATLAS[(not self.hide_ability) and G.P_TAGS[self.key].atlas or "tags"], (self.hide_ability) and G.tag_undiscovered.pos or self.pos)'''
193
+
position = "at"
194
+
payload = '''
195
+
local tagatlas = G.ASSET_ATLAS[(not self.hide_ability) and G.P_TAGS[self.key].atlas or "tags"]
196
+
if self.ability.shiny and not self.hide_ability then
197
+
if not G.P_TAGS[self.key].atlas then
198
+
tagatlas = G.ASSET_ATLAS['cry_shinyv']
199
+
elseif G.P_TAGS[self.key].atlas == 'cry_tag_cry' then
200
+
tagatlas = G.ASSET_ATLAS['cry_shinyc']
201
+
end
202
+
end
203
+
204
+
local tag_sprite = Sprite(0,0,_size*1,_size*1,tagatlas, (self.hide_ability) and G.tag_undiscovered.pos or self.pos)
205
+
'''
206
+
match_indent = true
207
+
208
+
# define function
209
+
[[patches]]
210
+
[patches.pattern]
211
+
target = "functions/misc_functions.lua"
212
+
pattern = "function save_run()"
213
+
position = "before"
214
+
payload = '''
215
+
function cry_rollshiny()
216
+
local prob = 1
217
+
if next(SMODS.find_card('j_lucky_cat')) then prob = 3 end
218
+
if pseudorandom("cry_shiny") < prob / 4096 then
219
+
print("true")
220
+
return 'shiny'
221
+
end
222
+
return 'normal'
223
+
end
224
+
225
+
function cry_rollshinybool()
226
+
if cry_rollshiny() == 'shiny' then
227
+
return true
228
+
end
229
+
return false
230
+
end
231
+
'''
232
+
match_indent = true
233
+
234
+
# collection
235
+
# nice pattern match?
236
+
[[patches]]
237
+
[patches.pattern]
238
+
target = '''=[SMODS _ "src/overrides.lua"]'''
239
+
pattern = '''
240
+
opt_callback = 'your_collection_tags_page',
241
+
focus_args = { snap_to = true, nav = 'wide' },
242
+
current_option = page,
243
+
colour = G.C.RED,
244
+
no_pips = true
245
+
})
246
+
}
247
+
}'''
248
+
position = "after"
249
+
payload = '''
250
+
,
251
+
cry_shinytag_tally() > 0 and create_toggle{ -- tally function runs way too often but whatever
252
+
label = localize('k_cry_shiny'),
253
+
w = 0,
254
+
ref_table = G,
255
+
ref_value = "showshinytags"
256
+
} or nil,
257
+
'''
258
+
match_indent = true
259
+
260
+
[[patches]]
261
+
[patches.pattern]
262
+
target = '''=[SMODS _ "src/overrides.lua"]'''
263
+
pattern = '''
264
+
if not v.discovered then temp_tag.hide_ability = true end
265
+
'''
266
+
position = "before"
267
+
payload = '''
268
+
if G.showshinytags then
269
+
temp_tag.ability.shiny = true
270
+
if not Cryptid.shinytagdata[temp_tag.key] then
271
+
temp_tag.hide_ability = true
272
+
end
273
+
end
274
+
'''
275
+
match_indent = true
276
+
277
+
# i can't seem to get the tag page easily
278
+
# i'm also surprised this doesn't multipatch
279
+
[[patches]]
280
+
[patches.pattern]
281
+
target = '''=[SMODS _ "src/overrides.lua"]'''
282
+
pattern = '''
283
+
local page = args.cycle_config.current_option or 1
284
+
'''
285
+
position = "at"
286
+
payload = '''
287
+
if args then G.cry_current_tagpage = args.cycle_config.current_option end
288
+
local page = args and args.cycle_config.current_option or G.cry_current_tagpage or 1
289
+
'''
290
+
match_indent = true
291
+
292
+
# update collection
293
+
# scuffed
294
+
[[patches]]
295
+
[patches.pattern]
296
+
target = '''game.lua'''
297
+
pattern = '''
298
+
self.E_MANAGER:update(self.real_dt)
299
+
'''
300
+
position = "before"
301
+
payload = '''
302
+
if not G.showshinytags then G.showshinytags = false end
303
+
if not G.showshinytags_b then G.showshinytags_b = false end
304
+
305
+
if G.showshinytags ~= G.showshinytags_b then
306
+
G.showshinytags_b = G.showshinytags
307
+
G.FUNCS.your_collection_tags_page()
308
+
end
309
+
'''
310
+
match_indent = true
311
+
312
+
# save+loading time
313
+
314
+
# cryptidsave stuff
315
+
[[patches]]
316
+
[patches.pattern]
317
+
target = '''game.lua'''
318
+
pattern = '''
319
+
if not love.filesystem.getInfo(G.SETTINGS.profile..'/'..'meta.jkr') then love.filesystem.append( G.SETTINGS.profile..'/'..'meta.jkr', 'return {}') end
320
+
'''
321
+
position = "after"
322
+
payload = '''
323
+
if not love.filesystem.getInfo(G.SETTINGS.profile..'/'..'cryptidsave.jkr') then love.filesystem.append( G.SETTINGS.profile..'/'..'cryptidsave.jkr', 'return {}') end
324
+
'''
325
+
match_indent = true
326
+
327
+
[[patches]]
328
+
[patches.pattern]
329
+
target = '''game.lua'''
330
+
pattern = '''
331
+
local meta = STR_UNPACK(get_compressed(G.SETTINGS.profile..'/'..'meta.jkr') or 'return {}')
332
+
'''
333
+
position = "after"
334
+
payload = '''
335
+
local cryptidsave = STR_UNPACK(get_compressed(G.SETTINGS.profile..'/'..'cryptidsave.jkr') or 'return {}')
pattern = '''local tag_sprite = Sprite(0,0,_size*1,_size*1,G.ASSET_ATLAS[(not self.hide_ability) and G.P_TAGS[self.key].atlas or "tags"], (self.hide_ability) and G.tag_undiscovered.pos or self.pos)'''
432
-
position = "at"
433
-
payload = '''
434
-
local tagatlas = G.ASSET_ATLAS[(not self.hide_ability) and G.P_TAGS[self.key].atlas or "tags"]
435
-
if self.ability.shiny and not self.hide_ability then
436
-
if not G.P_TAGS[self.key].atlas then
437
-
tagatlas = G.ASSET_ATLAS['cry_shinyv']
438
-
elseif G.P_TAGS[self.key].atlas == 'cry_tag_cry' then
439
-
tagatlas = G.ASSET_ATLAS['cry_shinyc']
440
-
end
441
-
end
442
-
443
-
local tag_sprite = Sprite(0,0,_size*1,_size*1,tagatlas, (self.hide_ability) and G.tag_undiscovered.pos or self.pos)
444
-
'''
445
-
match_indent = true
446
-
447
-
# define function
448
-
[[patches]]
449
-
[patches.pattern]
450
-
target = "functions/misc_functions.lua"
451
-
pattern = "function save_run()"
452
-
position = "before"
453
-
payload = '''
454
-
function cry_rollshiny()
455
-
local prob = 1
456
-
if next(SMODS.find_card('j_lucky_cat')) then prob = 3 end
0 commit comments