[manifest]
version = "1.0.0"
dump_lua = true
priority = -10

# Game:update
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "self.C.EDITION[2] = 0.7+0.2*(1+math.sin(self.TIMERS.REAL*1.5 + 6))"
position = "after"
payload = '''
for _,v in pairs(SMODS.Gradients) do
   v:update(dt)
end'''
match_indent = true

# Fix for effect messages
# attention_text
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = "args.colour = copy_table(args.colour or G.C.WHITE)"
position = "at"
payload = '''
args.colour = SMODS.shallow_copy(args.colour or G.C.WHITE)
'''
match_indent = true

# attention_text
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = '''
args.cover_colour = copy_table(args.cover_colour or G.C.RED)
args.cover_colour_l = copy_table(lighten(args.cover_colour, 0.2))
args.cover_colour_d = copy_table(darken(args.cover_colour, 0.2))
'''
position = "at"
payload = '''
args.cover_colour = SMODS.shallow_copy(args.cover_colour or G.C.RED)
args.cover_colour_l = SMODS.shallow_copy(lighten(args.cover_colour, 0.2))
args.cover_colour_d = SMODS.shallow_copy(darken(args.cover_colour, 0.2))
'''
match_indent = true

# attention_text
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = "args.backdrop_colour = copy_table(args.backdrop_colour)"
position = "at"
payload = '''
args.backdrop_colour = SMODS.shallow_copy(args.backdrop_colour)
'''
match_indent = true
