|
6 | 6 | #include "config/Config.h"
|
7 | 7 | #include "Context.h"
|
8 | 8 |
|
9 |
| -namespace LUS { |
| 9 | +namespace Ship { |
10 | 10 |
|
11 | 11 | ConsoleVariable::ConsoleVariable() {
|
12 | 12 | Load();
|
@@ -165,13 +165,13 @@ void ConsoleVariable::RegisterColor24(const char* name, Color_RGB8 defaultValue)
|
165 | 165 | }
|
166 | 166 |
|
167 | 167 | void ConsoleVariable::ClearVariable(const char* name) {
|
168 |
| - std::shared_ptr<Config> conf = LUS::Context::GetInstance()->GetConfig(); |
| 168 | + std::shared_ptr<Config> conf = Ship::Context::GetInstance()->GetConfig(); |
169 | 169 | mVariables.erase(name);
|
170 | 170 | conf->Erase(StringHelper::Sprintf("CVars.%s", name));
|
171 | 171 | }
|
172 | 172 |
|
173 | 173 | void ConsoleVariable::Save() {
|
174 |
| - std::shared_ptr<Config> conf = LUS::Context::GetInstance()->GetConfig(); |
| 174 | + std::shared_ptr<Config> conf = Ship::Context::GetInstance()->GetConfig(); |
175 | 175 |
|
176 | 176 | for (const auto& variable : mVariables) {
|
177 | 177 | const std::string key = StringHelper::Sprintf("CVars.%s", variable.first.c_str());
|
@@ -208,7 +208,7 @@ void ConsoleVariable::Save() {
|
208 | 208 | }
|
209 | 209 |
|
210 | 210 | void ConsoleVariable::Load() {
|
211 |
| - std::shared_ptr<Config> conf = LUS::Context::GetInstance()->GetConfig(); |
| 211 | + std::shared_ptr<Config> conf = Ship::Context::GetInstance()->GetConfig(); |
212 | 212 | conf->Reload();
|
213 | 213 |
|
214 | 214 | LoadFromPath("", conf->GetNestedJson()["CVars"].items());
|
@@ -265,7 +265,7 @@ void ConsoleVariable::LoadFromPath(
|
265 | 265 | }
|
266 | 266 | }
|
267 | 267 | void ConsoleVariable::LoadLegacy() {
|
268 |
| - auto conf = LUS::Context::GetPathRelativeToAppDirectory("cvars.cfg"); |
| 268 | + auto conf = Ship::Context::GetPathRelativeToAppDirectory("cvars.cfg"); |
269 | 269 | if (DiskFile::Exists(conf)) {
|
270 | 270 | const auto lines = DiskFile::ReadAllLines(conf);
|
271 | 271 |
|
@@ -312,4 +312,4 @@ void ConsoleVariable::LoadLegacy() {
|
312 | 312 | fs::remove(conf);
|
313 | 313 | }
|
314 | 314 | }
|
315 |
| -} // namespace LUS |
| 315 | +} // namespace Ship |
0 commit comments