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