fix: world failed to load if a script was present

Dieser Commit ist enthalten in:
Reinder Feenstra 2023-09-23 22:49:08 +02:00
Ursprung 9fa04d50b3
Commit a9aef63e4e

Datei anzeigen

@ -32,7 +32,7 @@ namespace Lua {
ScriptList::ScriptList(Object& _parent, std::string_view parentPropertyName)
: ObjectList<Script>(_parent, parentPropertyName)
, status{this, "status", nullptr, PropertyFlags::ReadOnly | PropertyFlags::NoStore | PropertyFlags::SubObject | PropertyFlags::NoScript}
, status{this, "status", nullptr, PropertyFlags::ReadOnly | PropertyFlags::NoStore | PropertyFlags::SubObject | PropertyFlags::NoScript | PropertyFlags::Internal}
, create{*this, "create",
[this]()
{
@ -59,6 +59,8 @@ ScriptList::ScriptList(Object& _parent, std::string_view parentPropertyName)
const bool editable = contains(getWorld(parent()).state.value(), WorldState::Edit);
m_interfaceItems.add(status);
Attributes::addDisplayName(create, DisplayName::List::create);
Attributes::addEnabled(create, editable);
m_interfaceItems.add(create);