Added lock functionality

This commit is contained in:
Entrox-Licher 2024-01-11 12:47:50 -05:00
parent c4e8f86d31
commit 2c0f7612b2

View File

@ -156,7 +156,8 @@ function createCampaignFromToken(importData, coin)
-- destroy existing campaign log and load saved campaign log
findUniqueObjectWithTag("CampaignLog").destruct()
if coin.type == "Bag" then
coin.takeObject({index = 0, position = importData["log"]})
local newLog = coin.takeObject({index = 0, position = importData["log"]})
Wait.time(function() newLog.setLock(true) end, 1)
else
spawnObjectData({ data = importData["log"] })
end
@ -278,6 +279,7 @@ end
function finishTokenSpawning(obj)
local logData = campaignLog.getData()
local indexData = additionalIndex.getData()
campaignLog.setLock(false)
additionalIndex.setLock(false)
checkWarning = false
obj.putObject(additionalIndex)