Skip to content

Commit

Permalink
Merge pull request #260 from Eremel/main
Browse files Browse the repository at this point in the history
Stake and Tag fixes
  • Loading branch information
stupxd committed Sep 7, 2024
2 parents 7afefa5 + c80e083 commit 808e0f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/game_object.lua
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ Set `prefix_config.key = false` on your object instead.]]):format(obj.key), obj.
end
else
G.P_STAKES[self.key] = self
table.insert(G.P_CENTER_POOLS.Stake, self)
SMODS.insert_pool(G.P_CENTER_POOLS.Stake, self)
end
self.injected = true
-- should only need to do this once per injection routine
Expand Down Expand Up @@ -2345,7 +2345,7 @@ Set `prefix_config.key = false` on your object instead.]]):format(obj.key), obj.
local res = {}
if self.loc_vars and type(self.loc_vars) == 'function' then
-- card is a dead arg here
res = self:loc_vars(info_queue)
res = self:loc_vars(info_queue) or {}
target.vars = res.vars or target.vars
target.key = res.key or target.key
end
Expand Down
2 changes: 1 addition & 1 deletion core/overrides.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1914,7 +1914,7 @@ function get_deck_win_stake(_deck_key)
local deck_count = 0
for _, deck in pairs(G.PROFILES[G.SETTINGS.profile].deck_usage) do
local deck_won_with = false
for key, _ in pairs(deck.wins_by_key) do
for key, _ in pairs(deck.wins_by_key or {}) do
deck_won_with = true
if (G.P_STAKES[key] and G.P_STAKES[key].stake_level or 0) > (_stake and G.P_STAKES[_stake].stake_level or 0) then
_stake = key
Expand Down

0 comments on commit 808e0f1

Please sign in to comment.