Explosives with timers now properly alert admins when detonating (#40471)

* Explosives with timers now properly alert admins when detonating

* add TODO comment

* Check if user is deleted before triggering
This commit is contained in:
beck-thompson
2025-10-04 10:51:36 -07:00
committed by GitHub
parent cad61d62e1
commit 7e3ee1d7c6
3 changed files with 4 additions and 1 deletions

View File

@@ -168,7 +168,8 @@ public sealed partial class TriggerSystem
if (timer.NextTrigger <= curTime)
{
Trigger(uid, timer.User, timer.KeyOut);
var user = TerminatingOrDeleted(timer.User) ? null : timer.User;
Trigger(uid, user, timer.KeyOut);
// Remove after triggering to prevent it from starting the timer again
RemComp<ActiveTimerTriggerComponent>(uid);
if (TryComp<AppearanceComponent>(uid, out var appearance))