diff --git a/src/accessories/CampaignImporterExporter.ttslua b/src/accessories/CampaignImporterExporter.ttslua index 5f6b2485..d385446c 100644 --- a/src/accessories/CampaignImporterExporter.ttslua +++ b/src/accessories/CampaignImporterExporter.ttslua @@ -25,6 +25,9 @@ local campaignTokenData = { g = 1.0, b = 1.0 }, + Tags = { + "ImporterToken" + }, LayoutGroupSortIndex = 0, Value = 0, Locked = false, @@ -106,7 +109,7 @@ end function findCampaignFromToken(_, _, _) local coin = nil for _, obj in ipairs(tokenZone.getObjects()) do - if obj.getDescription() == "SCED Importer Token" then + if obj.hasTag("ImporterToken") then coin = obj end end @@ -183,10 +186,12 @@ function createCampaignToken(_, _, _) end campaignData = {campaignBoxGUID, campaignLog.getData(), chaosBag.getData()} campaignTokenData.GMNotes = JSON.encode(campaignData) + campaignTokenData.Nickname = getObjectFromGUID(campaignBoxGUID).getName() .. os.date(" Save: %b %d") spawnObjectData({ data = campaignTokenData, position = {-21.25, 1.68, 55.59} }) + broadcastToAll("Campaign successfully exported! Save coin object to import on a fresh save", Color.Green) end