Refactors throw events, makes cream pies ECS (#4500)
This commit is contained in:
committed by
GitHub
parent
140682f92b
commit
ea4ce1c6fc
@@ -52,7 +52,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
SubscribeLocalEvent<DisposalUnitComponent, ComponentInit>(HandleDisposalInit);
|
||||
SubscribeLocalEvent<DisposalUnitComponent, ComponentShutdown>(HandleDisposalShutdown);
|
||||
|
||||
SubscribeLocalEvent<DisposalUnitComponent, ThrowCollideEvent>(HandleThrowCollide);
|
||||
SubscribeLocalEvent<DisposalUnitComponent, ThrowHitByEvent>(HandleThrowCollide);
|
||||
|
||||
// Interactions
|
||||
SubscribeLocalEvent<DisposalUnitComponent, ActivateInWorldEvent>(HandleActivate);
|
||||
@@ -144,7 +144,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
/// <summary>
|
||||
/// Thrown items have a chance of bouncing off the unit and not going in.
|
||||
/// </summary>
|
||||
private void HandleThrowCollide(EntityUid uid, DisposalUnitComponent component, ThrowCollideEvent args)
|
||||
private void HandleThrowCollide(EntityUid uid, DisposalUnitComponent component, ThrowHitByEvent args)
|
||||
{
|
||||
if (!CanInsert(component, args.Thrown) ||
|
||||
_robustRandom.NextDouble() > 0.75 ||
|
||||
|
||||
Reference in New Issue
Block a user