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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-27 20:55:10 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-27 20:55:10 +1000
commitbaf3a1cf7671e3be0c614a55803b56d1e8aa4b0d (patch)
treef39cd6bcb07c2b51bc5630bd913a660ea52e921b
parent332983c97b7a729c4dc5f19aa9ee4a22c420f7d8 (diff)
Fix crash warping to planets and leftover formatting errors
-rw-r--r--assets/opensb/help.config.patch5
-rw-r--r--assets/opensb/interface.config.patch4
-rw-r--r--source/core/StarException_windows.cpp4
-rw-r--r--source/game/StarWarping.cpp4
4 files changed, 12 insertions, 5 deletions
diff --git a/assets/opensb/help.config.patch b/assets/opensb/help.config.patch
new file mode 100644
index 0000000..deddd21
--- /dev/null
+++ b/assets/opensb/help.config.patch
@@ -0,0 +1,5 @@
+{
+ "basicHelpText" : "Basic commands are: {}",
+ "adminHelpText" : "Admin commands are: {}",
+ "debugHelpText" : "Debug commands are: {}"
+} \ No newline at end of file
diff --git a/assets/opensb/interface.config.patch b/assets/opensb/interface.config.patch
index c76c812..2904d22 100644
--- a/assets/opensb/interface.config.patch
+++ b/assets/opensb/interface.config.patch
@@ -13,5 +13,7 @@
"cursorTooltip" : {
"font" : ""
},
- "debugFont" : ""
+ "debugFont" : "",
+
+ "planetNameFormatString" : "- {} -"
} \ No newline at end of file
diff --git a/source/core/StarException_windows.cpp b/source/core/StarException_windows.cpp
index 54254d4..87d9ed6 100644
--- a/source/core/StarException_windows.cpp
+++ b/source/core/StarException_windows.cpp
@@ -233,7 +233,7 @@ void fatalError(char const* message, bool showStackTrace) {
if (showStackTrace)
ss << outputStack(captureStack());
- Logger::error(ss.str().c_str());
+ Logger::log(LogLevel::Error, ss.str().c_str());
MessageBoxW(NULL, stringToUtf16(ss.str()).get(), stringToUtf16("Error").get(), MB_OK | MB_ICONERROR | MB_SYSTEMMODAL);
std::abort();
@@ -245,7 +245,7 @@ void fatalException(std::exception const& e, bool showStackTrace) {
if (showStackTrace)
ss << "Caught at:" << std::endl << outputStack(captureStack());
- Logger::error(ss.str().c_str());
+ Logger::log(LogLevel::Error, ss.str().c_str());
MessageBoxW(NULL, stringToUtf16(ss.str()).get(), stringToUtf16("Error").get(), MB_OK | MB_ICONERROR | MB_SYSTEMMODAL);
std::abort();
diff --git a/source/game/StarWarping.cpp b/source/game/StarWarping.cpp
index 442d18e..8268b16 100644
--- a/source/game/StarWarping.cpp
+++ b/source/game/StarWarping.cpp
@@ -103,13 +103,13 @@ WorldId parseWorldId(String const& printedId) {
}
std::ostream& operator<<(std::ostream& os, CelestialWorldId const& worldId) {
- os << printWorldId(worldId);
+ os << (CelestialCoordinate)worldId;
return os;
}
std::ostream& operator<<(std::ostream& os, ClientShipWorldId const& worldId) {
- os << printWorldId(worldId);
+ os << ((Uuid)worldId).hex();
return os;
}