Skip to content

Commit 331bc7a

Browse files
committed
Added SMODS.current_mod.custom_card_areas(game) helper function to allow for adding new card areas in the game start process
1 parent e522f8c commit 331bc7a

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

lovely/cardareas.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[manifest]
2+
version = "1.0.0"
3+
dump_lua = true
4+
priority = -10
5+
6+
# Create custom card areas at appropriate timing via helper function
7+
[[patches]]
8+
[patches.pattern]
9+
target = 'game.lua'
10+
match_indent = true
11+
position = 'after'
12+
pattern = '''
13+
G.playing_cards = {}
14+
15+
set_screen_positions()
16+
'''
17+
payload = '''
18+
for _, mod in ipairs(SMODS.mod_list) do
19+
if mod.can_load and mod.custom_card_areas and type(mod.custom_card_areas) == "function" then
20+
mod.custom_card_areas(self)
21+
end
22+
end
23+
'''

version.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
return "1.0.0~BETA-1117a-STEAMODDED"
1+
return "1.0.0~BETA-1117b-STEAMODDED"

0 commit comments

Comments
 (0)