Skip to content

Commit 375fec0

Browse files
committed
Fix card_limit of areas breaking when modified whilst cards with extra_slots are held
1 parent bfce6d5 commit 375fec0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lovely/card_limit.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ self.config = setmetatable({card_limits = {card_limit}}, {
3737
if key == 'card_limit' then
3838
if not t.card_limits.base then rawset(t.card_limits, 'base', value) end
3939
if not t.card_limits.total_slots then rawset(t.card_limits, 'total_slots', value) end
40-
rawset(t.card_limits, 'mod', value - t.card_limits.base - (t.card_limits.extra_slots or 0))
40+
rawset(t.card_limits, 'mod', value - t.card_limits.base - (t.card_limits.extra_slots or 0) + (t.card_limits.extra_slots_used or 0))
4141
else
4242
rawset(t, key, value)
4343
end
@@ -66,7 +66,7 @@ self.config = setmetatable(cardAreaTable.config, {
6666
__newindex = function(t, key, value)
6767
if key == 'card_limit' then
6868
if not t.card_limits.base then rawset(t.card_limits, 'base', value) end
69-
rawset(t.card_limits, 'mod', value - t.card_limits.base - (t.card_limits.extra_slots or 0))
69+
rawset(t.card_limits, 'mod', value - t.card_limits.base - (t.card_limits.extra_slots or 0) + (t.card_limits.extra_slots_used or 0))
7070
else
7171
rawset(t, key, value)
7272
end

version.lua

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

0 commit comments

Comments
 (0)