Don't enqueue construction events without validation (#39869)

This commit is contained in:
pathetic meowmeow
2025-09-03 17:29:50 -04:00
committed by GitHub
parent deb08579a4
commit 24f4b40881
2 changed files with 53 additions and 0 deletions

View File

@@ -570,6 +570,10 @@ namespace Content.Server.Construction
handled.Handled = true;
}
// Make sure the event passes validation before enqueuing it
if (HandleEvent(uid, args, true, construction) != HandleResult.Validated)
return;
// Enqueue this event so it'll be handled in the next tick.
// This prevents some issues that could occur from entity deletion, component deletion, etc in a handler.
construction.InteractionQueue.Enqueue(args);