From 4cd4f12f95f61a27d493c783e367008452745e8c Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Mon, 15 Apr 2024 21:43:04 +0200 Subject: [PATCH] Add missing log message and origin sanitization --- addons/besseretests/src/runtimescene.gd | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/besseretests/src/runtimescene.gd b/addons/besseretests/src/runtimescene.gd index 06ebb82..6610858 100644 --- a/addons/besseretests/src/runtimescene.gd +++ b/addons/besseretests/src/runtimescene.gd @@ -200,12 +200,12 @@ func lcrash(message: String, origin: String = "Bessere Tests") -> void: await terminate(69) # Self explanitory -func lresu(message: String, origin: String = "Bessere Tests") -> void: _log(message, origin, 505, false, "RESU", "[color=white]", "[/color]") -func ldiag(message: String, origin: String = "Bessere Tests") -> void: _log(message, origin, 0) -func lverb(message: String, origin: String = "Bessere Tests") -> void: _log(message, origin, 1) -func linfo(message: String, origin: String = "Bessere Tests") -> void: _log(message, origin, 2) -func lwarn(message: String, origin: String = "Bessere Tests") -> void: _log(message, origin, 3) -func lerror(message: String, origin: String = "Bessere Tests") -> void: _log(message, origin, 4) +func lresu(message: String, origin: String = "Bessere Tests") -> void: _log(message, lsanitize(origin), 505, false, "RESU", "[color=white]", "[/color]") +func ldiag(message: String, origin: String = "Bessere Tests") -> void: _log(lsanitize(message), lsanitize(origin), 0) +func lverb(message: String, origin: String = "Bessere Tests") -> void: _log(lsanitize(message), lsanitize(origin), 1) +func linfo(message: String, origin: String = "Bessere Tests") -> void: _log(lsanitize(message), lsanitize(origin), 2) +func lwarn(message: String, origin: String = "Bessere Tests") -> void: _log(lsanitize(message), lsanitize(origin), 3) +func lerror(message: String, origin: String = "Bessere Tests") -> void: _log(lsanitize(message), lsanitize(origin), 4) # Message sanitization func lsanitize(message: String) -> String: return message.replace("[", "[lb]").replace("]", "[rb]").replace("[lb[rb]", "[lb]").replace("\n", "\\n")