Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions lovely/better_calc.toml → lovely/better_calc/better_calc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2037,3 +2037,33 @@ if saveTable then
end
'''



### From old better_calc_fixes.toml
## Delayed references to context.blueprint_card should be saved in a variable
## because context is modified in better calc
## (this patch just changes all references)
# Card:calculate_joker(context)
[[patches]]
[patches.pattern]
target = 'card.lua'
position = 'after'
pattern = '''function Card:calculate_joker(context)
if self.debuff then return nil end
'''
payload = ' local context_blueprint_card = context.blueprint_card'
match_indent = true
[[patches]]
[patches.regex]
target = 'card.lua'
position = 'at'
pattern = 'card_eval_status_text\(context\.blueprint_card or self'
payload = 'card_eval_status_text(context_blueprint_card or self'
[[patches]]
[patches.pattern]
target = 'card.lua'
position = 'at'
pattern = 'if context.blueprint_card then context.blueprint_card:juice_up() else self:juice_up() end'
payload = 'if context_blueprint_card then context_blueprint_card:juice_up() else self:juice_up() end'
match_indent = true

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
31 changes: 0 additions & 31 deletions lovely/better_calc_fixes.toml

This file was deleted.

30 changes: 0 additions & 30 deletions lovely/cardarea.toml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,33 @@ version = "1.0.0"
dump_lua = true
priority = -10

# Change CardArea's background colour
# CardArea.draw
[[patches]]
[patches.pattern]
target = "cardarea.lua"
pattern = "{n=G.UIT.R, config={minw = self.T.w,minh = self.T.h,align = \"cm\", padding = 0.1, mid = true, r = 0.1, colour = self ~= G.shop_vouchers and {0,0,0,0.1} or nil, ref_table = self}, nodes={"
position = 'at'
match_indent = true
payload = '''
{n=G.UIT.R, config={minw = self.T.w,minh = self.T.h,align = "cm", padding = 0.1, mid = true, r = 0.1, colour = self.config.bg_colour or self ~= G.shop_vouchers and {0,0,0,0.1} or nil, ref_table = self}, nodes={
'''

# Remove CardArea count
# CardArea.draw
[[patches]]
[patches.pattern]
target = "cardarea.lua"
pattern = '''
local card_count = self ~= G.shop_vouchers and {n=G.UIT.R, config={align = self == G.jokers and 'cl' or self == G.hand and 'cm' or 'cr', padding = 0.03, no_fill = true}, nodes={
'''
position = 'at'
match_indent = true
payload = '''
local card_count = not self.config.no_card_count and self ~= G.shop_vouchers and {n=G.UIT.R, config={align = self == G.jokers and 'cl' or self == G.hand and 'cm' or 'cr', padding = 0.03, no_fill = true}, nodes={
'''

## cardareas.toml
# Create custom card areas at appropriate timing via helper function
[[patches]]
[patches.pattern]
Expand Down Expand Up @@ -48,4 +75,5 @@ pattern = '''
'''
payload = '''
self.area.config.align_buttons and {x=x_off - 0.4,y=0} or
'''
'''
## end cardareas.toml
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ if vals.StatusText then
end
attention_text(StatusText)
end
'''
'''
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.