bugfixing

This commit is contained in:
Chr1Z93 2024-07-15 01:23:16 +02:00
parent 8bc7ea9f94
commit f56c643bdf

View File

@ -219,9 +219,6 @@ do
end
for i = 1, tokenCount do
offsets[i] = card.positionToWorld(PLAYER_CARD_TOKEN_OFFSETS[tokenCount][i])
-- Fix the y-position for the spawn, since positionToWorld considers rotation which can
-- have bad results for face up/down differences
offsets[i].y = card.getPosition().y + 0.15
end
end
@ -250,7 +247,6 @@ do
elseif tokenType == "universalActionAbility" then
local matColor = playermatApi.getMatColorByPosition(card.getPosition())
local class = playermatApi.returnInvestigatorClass(matColor)
callback = function(spawned) spawned.call("updateClassAndSymbol", { class = class, symbol = subType or class }) end
end
@ -500,7 +496,12 @@ do
obj.destruct()
end
else
-- search for the token instead if there's no special resource state for it
local searchType = string.lower(useInfo.type)
if stateTable[searchType] == nil then
searchType = useInfo.token
end
for _, obj in ipairs(searchLib.onObject(card, "isTileOrToken")) do
local memo = obj.getMemo()
if searchType == memo then