If statement fix

This commit is contained in:
Entrox-Licher 2024-01-11 11:44:20 -05:00
parent eafb62ba30
commit 8c722fc8dc

View File

@ -146,7 +146,7 @@ function createCampaignFromToken(importData, coin)
checkWarning = false
if importData["additionalIndex"] then
findUniqueObjectWithTag("AllCardsHotfix").destruct()
if coin.getObjects() then
if coin.type == "Bag" then
local newBag = coin.takeObject({index = 0, position = importData["additionalIndex"]})
Wait.time(function() newBag.setLock(true) end, 1)
else
@ -156,7 +156,7 @@ function createCampaignFromToken(importData, coin)
-- destroy existing campaign log and load saved campaign log
findUniqueObjectWithTag("CampaignLog").destruct()
if coin.getObjects() then
if coin.type == "Bag" then
coin.takeObject({index = 0, position = importData["log"]})
else
spawnObjectData({ data = importData["log"] })