stopped overriding resources

This commit is contained in:
Chr1Z93 2023-11-05 16:23:35 +01:00
parent 36d797d40c
commit 4988487c91

View File

@ -1,5 +1,5 @@
local tokenManager = require("core/token/TokenManager")
local playmatApi = require("playermat/PlaymatApi") local playmatApi = require("playermat/PlaymatApi")
local tokenManager = require("core/token/TokenManager")
local clickableResourceCounter = nil local clickableResourceCounter = nil
local foundTokens = 0 local foundTokens = 0
@ -47,7 +47,7 @@ end
function takeAll(playerColor) function takeAll(playerColor)
searchSelf() searchSelf()
local matColor = playmatApi.getMatColorByPosition(self.getPosition()) local matColor = playmatApi.getMatColorByPosition(self.getPosition())
playmatApi.updateCounter(matColor, "ResourceCounter", foundTokens) playmatApi.updateCounter(matColor, "ResourceCounter", _, foundTokens)
if clickableResourceCounter then if clickableResourceCounter then
clickableResourceCounter.call("updateVal", 0) clickableResourceCounter.call("updateVal", 0)