Bug fixes (#151)

* fix: TL random spawners name

* fix: ExplosionSystem admin-chatalert

* fix: some TL

* tweak: RCD can place floor on platings

* typo
This commit is contained in:
Nair Sark
2024-03-01 07:05:26 +05:00
committed by GitHub
parent 9b4af878b5
commit d7dcdb3dba
8 changed files with 44 additions and 23 deletions

View File

@@ -265,20 +265,23 @@ public sealed partial class ExplosionSystem
if (!addLog)
return;
var entPos = (posFound ? $"{gridPos:coordinates}" : "[Grid or Map not found]"); // WD EDIT
if (user == null)
{
_adminLogger.Add(LogType.Explosion, LogImpact.High,
$"{ToPrettyString(uid):entity} exploded ({typeId}) at Pos:{(posFound ? $"{gridPos:coordinates}" : "[Grid or Map not found]")} with intensity {totalIntensity} slope {slope}");
$"{ToPrettyString(uid):entity} exploded ({typeId}) at Pos:{entPos} with intensity {totalIntensity} slope {slope}");
_chatManager.SendAdminAnnouncement(Loc.GetString("admin-chatalert-explosion-no-player",
("entity", ToPrettyString(uid)), ("coordinates", pos), ("intensity", totalIntensity), ("slope", slope)));
("entity", ToPrettyString(uid)), ("coordinates", entPos), ("intensity", totalIntensity), ("slope", slope)));
}
else
{
_adminLogger.Add(LogType.Explosion, LogImpact.High,
$"{ToPrettyString(user.Value):user} caused {ToPrettyString(uid):entity} to explode ({typeId}) at Pos:{(posFound ? $"{gridPos:coordinates}" : "[Grid or Map not found]")} with intensity {totalIntensity} slope {slope}");
$"{ToPrettyString(user.Value):user} caused {ToPrettyString(uid):entity} to explode ({typeId}) at Pos:{entPos} with intensity {totalIntensity} slope {slope}");
var alertMinExplosionIntensity = _cfg.GetCVar(CCVars.AdminAlertExplosionMinIntensity);
if (alertMinExplosionIntensity > -1 && totalIntensity >= alertMinExplosionIntensity)
_chat.SendAdminAlert(user.Value, $"caused {ToPrettyString(uid)} to explode ({typeId}:{totalIntensity}) at Pos:{(posFound ? $"{gridPos:coordinates}" : "[Grid or Map not found]")}");
_chatManager.SendAdminAnnouncement(Loc.GetString("admin-chatalert-explosion-player",
("player", $"{ToPrettyString(user.Value):user}"),("entity", ToPrettyString(uid)), ("coordinates", entPos), ("intensity", totalIntensity), ("slope", slope)));
}
}