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

summaryrefslogtreecommitdiff
path: root/source/game/StarStatusController.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-25 18:12:54 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-25 18:12:54 +1000
commit7d205330dbf1c2fd44d9d58393ab46434ac8bb5e (patch)
treee73db06236120e2399f0b4863257477eec528295 /source/game/StarStatusController.cpp
parente2424b7dcf60d18b277b092eb7f2a947fff27415 (diff)
More directives optimization
Diffstat (limited to 'source/game/StarStatusController.cpp')
-rw-r--r--source/game/StarStatusController.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/game/StarStatusController.cpp b/source/game/StarStatusController.cpp
index 3b794f0..8e26cdc 100644
--- a/source/game/StarStatusController.cpp
+++ b/source/game/StarStatusController.cpp
@@ -337,11 +337,11 @@ bool StatusController::uniqueStatusEffectActive(String const& effectName) const
return false;
}
-String StatusController::primaryDirectives() const {
+const Directives& StatusController::primaryDirectives() const {
return m_primaryDirectives;
}
-void StatusController::setPrimaryDirectives(String const& directives) {
+void StatusController::setPrimaryDirectives(Directives const& directives) {
m_primaryDirectives = directives;
}
@@ -509,11 +509,11 @@ void StatusController::tickMaster() {
removeUniqueEffect(key);
}
- String parentDirectives = m_primaryDirectives;
- for (auto const& pair : m_uniqueEffects) {
- parentDirectives.append("?");
+ DirectivesGroup parentDirectives;
+ parentDirectives.append(m_primaryDirectives);
+ for (auto const& pair : m_uniqueEffects)
parentDirectives.append(pair.second.parentDirectives);
- }
+
m_parentDirectives.set(move(parentDirectives));
updateAnimators();
@@ -524,7 +524,7 @@ void StatusController::tickSlave() {
updateAnimators();
}
-String StatusController::parentDirectives() const {
+const DirectivesGroup& StatusController::parentDirectives() const {
return m_parentDirectives.get();
}