Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/StarObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/game/StarObject.cpp')
-rw-r--r--source/game/StarObject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/game/StarObject.cpp b/source/game/StarObject.cpp
index 3172c97..847f7c5 100644
--- a/source/game/StarObject.cpp
+++ b/source/game/StarObject.cpp
@@ -188,7 +188,7 @@ void Object::init(World* world, EntityId entityId, EntityMode mode) {
setKeepAlive(configValue("keepAlive", false).toBool());
- auto scripts = jsonToStringList(configValue("scripts", JsonArray()).toArray());
+ StringList scripts = configValue("scripts", JsonArray()).optArray().apply(jsonToStringList).value(m_config->scripts);
m_scriptComponent.setScripts(scripts.transformed(bind(AssetPath::relativeTo, m_config->path, _1)));
m_scriptComponent.setUpdateDelta(configValue("scriptDelta", 5).toInt());