Updated scenario reference card detection for removing

This commit is contained in:
Chr1Z93 2024-11-21 15:16:19 +01:00
parent 71cd5886f7
commit f787ed4606

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 })