Fixes singularity collision and consume range (#13424)

Co-authored-by: keronshb <keronshb@live.com>
This commit is contained in:
TemporalOroboros
2023-07-19 01:01:27 -07:00
committed by GitHub
parent afef518fc5
commit 6313164368
13 changed files with 290 additions and 277 deletions

View File

@@ -390,11 +390,11 @@ public sealed class ContainmentFieldGeneratorSystem : EntitySystem
/// <param name="uid">The entity the singularity is trying to eat.</param>
/// <param name="comp">The containment field generator the singularity is trying to eat.</param>
/// <param name="args">The event arguments.</param>
private void PreventBreach(EntityUid uid, ContainmentFieldGeneratorComponent comp, EventHorizonAttemptConsumeEntityEvent args)
private void PreventBreach(EntityUid uid, ContainmentFieldGeneratorComponent comp, ref EventHorizonAttemptConsumeEntityEvent args)
{
if (args.Cancelled)
return;
if (comp.IsConnected && !args.EventHorizon.CanBreachContainment)
args.Cancel();
args.Cancelled = true;
}
}