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

summaryrefslogtreecommitdiff
path: root/source/game/StarTechController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/game/StarTechController.cpp')
-rw-r--r--source/game/StarTechController.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/game/StarTechController.cpp b/source/game/StarTechController.cpp
index 1734c61..7ceb54e 100644
--- a/source/game/StarTechController.cpp
+++ b/source/game/StarTechController.cpp
@@ -251,7 +251,7 @@ Maybe<TechController::ParentState> TechController::parentState() const {
return m_parentState.get();
}
-String TechController::parentDirectives() const {
+DirectivesGroup const& TechController::parentDirectives() const {
return m_parentDirectives.get();
}
@@ -501,10 +501,11 @@ LuaCallbacks TechController::makeTechCallbacks(TechModule& techModule) {
callbacks.registerCallback("setParentDirectives", [this, &techModule](Maybe<String> const& directives) {
techModule.parentDirectives = directives.value();
- String newParentDirectives;
+
+ DirectivesGroup newParentDirectives;
for (auto& module : m_techModules)
- newParentDirectives += module.parentDirectives;
- m_parentDirectives.set(newParentDirectives);
+ newParentDirectives.append(module.parentDirectives);
+ m_parentDirectives.set(move(newParentDirectives));
});
callbacks.registerCallback("setParentHidden", [this](bool hidden) {