diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-06-22 14:02:02 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-06-22 14:02:02 +1000 |
commit | 4c90472977f011352681ac774ca0b036f8cf0052 (patch) | |
tree | a09934a3823f3eb8b4b964e1211b4181e7bb4393 /source/game/StarObject.cpp | |
parent | 83686a816c8b1cb039e60ddb960ae9ab58a29ef9 (diff) |
Read object script paths from params again taking relative paths into account
also made build artifact names a bit more consistent
Diffstat (limited to 'source/game/StarObject.cpp')
-rw-r--r-- | source/game/StarObject.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/game/StarObject.cpp b/source/game/StarObject.cpp index e613efe..3172c97 100644 --- a/source/game/StarObject.cpp +++ b/source/game/StarObject.cpp @@ -188,7 +188,8 @@ void Object::init(World* world, EntityId entityId, EntityMode mode) { setKeepAlive(configValue("keepAlive", false).toBool()); - m_scriptComponent.setScripts(m_config->scripts); + auto scripts = jsonToStringList(configValue("scripts", JsonArray()).toArray()); + m_scriptComponent.setScripts(scripts.transformed(bind(AssetPath::relativeTo, m_config->path, _1))); m_scriptComponent.setUpdateDelta(configValue("scriptDelta", 5).toInt()); m_scriptComponent.addCallbacks("object", makeObjectCallbacks()); |