Skip to content

Commit

Permalink
vanilla dynamic ante display
Browse files Browse the repository at this point in the history
  • Loading branch information
stupxd committed Sep 19, 2024
1 parent bde4408 commit fbc3830
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
49 changes: 49 additions & 0 deletions lovely/dynamic-ante-display.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0

# Patch dynamic ante display into
# function create_UIBox_your_collection_blinds(exit)
# this will only work for vanilla, as steamodded overrides this

[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = "local ante_amounts = {}"
position = "before"
payload = '''
local min_ante = 1
local max_ante = 16
local spacing = 1 - 15*0.06
if G.GAME and G.GAME.round_resets and G.GAME.round_resets.ante then
local current_ante = G.GAME.round_resets.ante
if current_ante > 8 then
min_ante = current_ante - 8 + 1
max_ante = current_ante + 8
end
end
'''
match_indent = true

[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = "for i = 1, math.min(16, math.max(16, G.PROFILES[G.SETTINGS.profile].high_scores.furthest_ante.amt)) do"
position = "at"
payload = '''
for i = min_ante, max_ante do
'''
match_indent = true

[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = "local spacing = 1 - math.min(20, math.max(15, G.PROFILES[G.SETTINGS.profile].high_scores.furthest_ante.amt))*0.06"
position = "at"
payload = '''
-- :3
'''
match_indent = true

2 changes: 1 addition & 1 deletion mod.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
--- BADGE_COLOR: FFD700
--- DISPLAY_NAME: Cartomancer
--//--//--- DEPENDENCIES: [Steamodded>=1.0.0~ALPHA-0917b]
--- VERSION: 4.4
--- VERSION: 4.5

----------------------------------------------
------------MOD CODE -------------------------
Expand Down

0 comments on commit fbc3830

Please sign in to comment.