Skip to content
Merged
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
17 changes: 17 additions & 0 deletions lovely/ui.toml
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,23 @@ if not v.no_ui then
end
'''

# Pool badges
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = '''
if AUT.info then
'''
position = "before"
payload = '''
for k, v in pairs(SMODS.ObjectTypes) do
if card.config.center.pools and card.config.center.pools[v.key] and type(v.set_badges) == "function" then
v:set_badges(card, badges)
end
end
'''
match_indent = true

# Allow tilt_shadow in define_draw_steps
[[patches]]
[patches.pattern]
Expand Down
3 changes: 2 additions & 1 deletion lsp_def/classes/object_type.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
---@field take_ownership? fun(self: SMODS.ObjectType|table, key: string, obj: SMODS.ObjectType|table, silent?: boolean): nil|table|SMODS.ObjectType Takes control of vanilla objects. Child class must have get_obj for this to function
---@field get_obj? fun(self: SMODS.ObjectType|table, key: string): SMODS.ObjectType|table? Returns an object if one matches the `key`.
---@field inject_card? fun(self: SMODS.ObjectType|table, center: table) Injects the center into the ObjectType pools.
---@field remove_card? fun(self: SMODS.ObjectType|table, center: table) Removes the center from ObjectType pools.
---@field remove_card? fun(self: SMODS.ObjectType|table, center: table) Removes the center from ObjectType pools.
---@field set_badges? fun(self: SMODS.ObjectType|table, card: Card|table, badges: table) Append `badges` for additional badges on the UI display of the cards in the pool.
---@overload fun(self: SMODS.ObjectType): SMODS.ObjectType
SMODS.ObjectType = setmetatable({}, {
__call = function(self)
Expand Down