Merge pull request #1022 from argonui/no-metadata-handling

Updated scenario reference card detection for removing
This commit is contained in:
dscarpac 2024-11-21 08:29:41 -06:00 committed by GitHub
commit 76e46d710f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,7 +73,7 @@ function copyScenarioReferenceCard()
local obj = searchResult[1]
local md = JSON.decode(obj.getGMNotes()) or {}
if md.type == "ScenarioReference" then
if obj.getName() == "Scenario" or md.type == "ScenarioReference" then
local trash = guidReferenceApi.getObjectByOwnerAndType(color, "Trash")
trash.putObject(obj)
scenarioCard.clone({ position = cardPosition, snap_to_grid = true })