fixed a local, made code even smaller
This commit is contained in:
parent
52e5ec01f4
commit
77f320e188
@ -38,13 +38,9 @@ function triggerUpkeep(playerColor)
|
||||
sentMessage = true
|
||||
end
|
||||
if #Player.getPlayers() == 1 then
|
||||
local colors = Player.getAvailableColors()
|
||||
for _, handColor in ipairs(colors) do
|
||||
local matColor = playermatApi.getMatColor(handColor)
|
||||
local data = playermatApi.getActiveInvestigatorData(matColor)
|
||||
if data.id ~= "00000" then
|
||||
playermatApi.doUpkeepFromHotkey(matColor, playerColor)
|
||||
end
|
||||
local usedMats = playermatApi.getUsedMatColors()
|
||||
for _, matColor in ipairs(usedMats) do
|
||||
playermatApi.doUpkeepFromHotkey(matColor, playerColor)
|
||||
end
|
||||
playAreaApi.readyCards()
|
||||
return
|
||||
|
@ -514,8 +514,9 @@ end
|
||||
|
||||
-- Readies all cards in the main playarea (both player cards, treacheries and enemies)
|
||||
function readyCards(player, clickType)
|
||||
local playerColor
|
||||
if player ~= nil then
|
||||
local playerColor = player.color
|
||||
playerColor = player.color
|
||||
else
|
||||
local existingPlayer = Player.getPlayers()[1]
|
||||
playerColor = existingPlayer.color
|
||||
|
Loading…
Reference in New Issue
Block a user