Puddles & spreader refactor (#15191)
This commit is contained in:
@@ -21,7 +21,7 @@ namespace Content.Server.Nutrition.EntitySystems
|
||||
public sealed class CreamPieSystem : SharedCreamPieSystem
|
||||
{
|
||||
[Dependency] private readonly SolutionContainerSystem _solutions = default!;
|
||||
[Dependency] private readonly SpillableSystem _spillable = default!;
|
||||
[Dependency] private readonly PuddleSystem _puddle = default!;
|
||||
[Dependency] private readonly ItemSlotsSystem _itemSlots = default!;
|
||||
[Dependency] private readonly TriggerSystem _trigger = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
@@ -43,7 +43,7 @@ namespace Content.Server.Nutrition.EntitySystems
|
||||
{
|
||||
if (_solutions.TryGetSolution(uid, foodComp.SolutionName, out var solution))
|
||||
{
|
||||
_spillable.SpillAt(uid, solution, "PuddleSmear", false);
|
||||
_puddle.TrySpillAt(uid, solution, out _, false);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(foodComp.TrashPrototype))
|
||||
{
|
||||
@@ -62,9 +62,9 @@ namespace Content.Server.Nutrition.EntitySystems
|
||||
|
||||
private void ActivatePayload(EntityUid uid)
|
||||
{
|
||||
if (_itemSlots.TryGetSlot(uid, CreamPieComponent.PayloadSlotName, out var itemSlot))
|
||||
if (_itemSlots.TryGetSlot(uid, CreamPieComponent.PayloadSlotName, out var itemSlot))
|
||||
{
|
||||
if (_itemSlots.TryEject(uid, itemSlot, user: null, out var item))
|
||||
if (_itemSlots.TryEject(uid, itemSlot, user: null, out var item))
|
||||
{
|
||||
if (TryComp<OnUseTimerTriggerComponent>(item.Value, out var timerTrigger))
|
||||
{
|
||||
@@ -85,7 +85,7 @@ namespace Content.Server.Nutrition.EntitySystems
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("cream-pied-component-on-hit-by-message",("thrower", args.Thrown)), uid, args.Target);
|
||||
var otherPlayers = Filter.Empty().AddPlayersByPvs(uid);
|
||||
if (TryComp<ActorComponent>(args.Target, out var actor))
|
||||
if (TryComp<ActorComponent>(args.Target, out var actor))
|
||||
{
|
||||
otherPlayers.RemovePlayer(actor.PlayerSession);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user