diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-11-25 23:03:46 +1100 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-11-25 23:03:46 +1100 |
commit | f3c7bd1d5e5b4d890ea11f4ee1bff3a978a40103 (patch) | |
tree | f471a0e6a1a1bff7c1b72288b7f448387865a1d2 /source/game/StarParallax.cpp | |
parent | 9c7d35ee26ea5f18dc50febaf3456fb711fe36d9 (diff) |
Directives fixes
Diffstat (limited to 'source/game/StarParallax.cpp')
-rw-r--r-- | source/game/StarParallax.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/game/StarParallax.cpp b/source/game/StarParallax.cpp index fe20f95..8ebb391 100644 --- a/source/game/StarParallax.cpp +++ b/source/game/StarParallax.cpp @@ -60,14 +60,16 @@ Json ParallaxLayer::store() const { void ParallaxLayer::addImageDirectives(Directives const& newDirectives) { if (newDirectives) { // TODO: Move to Directives += if (directives) { - String newString; + String dirString = directives.string(); - for (auto const& entry : newDirectives.shared->entries) { - newString += "+"; - newString += entry.string(*newDirectives.shared); + auto& newString = newDirectives.shared->string; + if (!newString.empty()) { + if (newString.utf8().front() != '?') + dirString += "?"; + dirString += newString; } - directives = move(newString); + directives = move(dirString); } else directives = newDirectives; |