Added lock functionality
This commit is contained in:
parent
c4e8f86d31
commit
2c0f7612b2
@ -156,7 +156,8 @@ 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.type == "Bag" then
|
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
|
else
|
||||||
spawnObjectData({ data = importData["log"] })
|
spawnObjectData({ data = importData["log"] })
|
||||||
end
|
end
|
||||||
@ -278,6 +279,7 @@ end
|
|||||||
function finishTokenSpawning(obj)
|
function finishTokenSpawning(obj)
|
||||||
local logData = campaignLog.getData()
|
local logData = campaignLog.getData()
|
||||||
local indexData = additionalIndex.getData()
|
local indexData = additionalIndex.getData()
|
||||||
|
campaignLog.setLock(false)
|
||||||
additionalIndex.setLock(false)
|
additionalIndex.setLock(false)
|
||||||
checkWarning = false
|
checkWarning = false
|
||||||
obj.putObject(additionalIndex)
|
obj.putObject(additionalIndex)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user