Generalizes solution overflow & slightly increases space lube yield (#21094)

* generalize SolutionSpikeOverflowEvent

* let reactions overflow

* spacelube: 3 -> 5

* restore TryMixAndOverflow threshold cap
This commit is contained in:
TemporalOroboros
2023-10-28 09:46:59 -07:00
committed by GitHub
parent 17f3fc1287
commit b223e7d6ed
5 changed files with 109 additions and 80 deletions

View File

@@ -34,7 +34,7 @@ public sealed partial class PuddleSystem
SubscribeLocalEvent<SpillableComponent, MeleeHitEvent>(SplashOnMeleeHit, after: new[] { typeof(OpenableSystem) });
SubscribeLocalEvent<SpillableComponent, GetVerbsEvent<Verb>>(AddSpillVerb);
SubscribeLocalEvent<SpillableComponent, GotEquippedEvent>(OnGotEquipped);
SubscribeLocalEvent<SpillableComponent, SolutionSpikeOverflowEvent>(OnSpikeOverflow);
SubscribeLocalEvent<SpillableComponent, SolutionOverflowEvent>(OnOverflow);
SubscribeLocalEvent<SpillableComponent, SpillDoAfterEvent>(OnDoAfter);
}
@@ -46,13 +46,12 @@ public sealed partial class PuddleSystem
args.PushMarkup(Loc.GetString("spill-examine-spillable-weapon"));
}
private void OnSpikeOverflow(EntityUid uid, SpillableComponent component, SolutionSpikeOverflowEvent args)
private void OnOverflow(EntityUid uid, SpillableComponent component, ref SolutionOverflowEvent args)
{
if (!args.Handled)
{
TrySpillAt(Transform(uid).Coordinates, args.Overflow, out _);
}
if (args.Handled)
return;
TrySpillAt(Transform(uid).Coordinates, args.Overflow, out _);
args.Handled = true;
}