No handed mobs now cant insert other mobs on disposal (#9993)
* fix mouse now cant insert other mobs on disposal, but still can jump inside * Apply suggestions from code review Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> * using popupSystem depedency and better fluent use * change where the message You don't have hands are * Caution popup Co-authored-by: zero <ribeirolucasdev@gmail.com> Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
This commit is contained in:
@@ -5,6 +5,7 @@ using Content.Server.Disposal.Tube.Components;
|
|||||||
using Content.Server.Disposal.Unit.Components;
|
using Content.Server.Disposal.Unit.Components;
|
||||||
using Content.Server.DoAfter;
|
using Content.Server.DoAfter;
|
||||||
using Content.Server.Hands.Components;
|
using Content.Server.Hands.Components;
|
||||||
|
using Content.Server.Popups;
|
||||||
using Content.Server.Power.Components;
|
using Content.Server.Power.Components;
|
||||||
using Content.Server.UserInterface;
|
using Content.Server.UserInterface;
|
||||||
using Content.Server.Storage.Components;
|
using Content.Server.Storage.Components;
|
||||||
@@ -16,11 +17,13 @@ using Content.Shared.Destructible;
|
|||||||
using Content.Shared.Disposal;
|
using Content.Shared.Disposal;
|
||||||
using Content.Shared.Disposal.Components;
|
using Content.Shared.Disposal.Components;
|
||||||
using Content.Shared.DragDrop;
|
using Content.Shared.DragDrop;
|
||||||
|
using Content.Shared.Hands.Components;
|
||||||
using Content.Shared.Hands.EntitySystems;
|
using Content.Shared.Hands.EntitySystems;
|
||||||
using Content.Shared.Interaction;
|
using Content.Shared.Interaction;
|
||||||
using Content.Shared.Item;
|
using Content.Shared.Item;
|
||||||
using Content.Shared.Movement;
|
using Content.Shared.Movement;
|
||||||
using Content.Shared.Movement.Events;
|
using Content.Shared.Movement.Events;
|
||||||
|
using Content.Shared.Popups;
|
||||||
using Content.Shared.Throwing;
|
using Content.Shared.Throwing;
|
||||||
using Content.Shared.Verbs;
|
using Content.Shared.Verbs;
|
||||||
using Content.Shared.Storage.Components;
|
using Content.Shared.Storage.Components;
|
||||||
@@ -40,6 +43,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
|||||||
[Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!;
|
[Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!;
|
||||||
[Dependency] private readonly AtmosphereSystem _atmosSystem = default!;
|
[Dependency] private readonly AtmosphereSystem _atmosSystem = default!;
|
||||||
[Dependency] private readonly DoAfterSystem _doAfterSystem = default!;
|
[Dependency] private readonly DoAfterSystem _doAfterSystem = default!;
|
||||||
|
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||||
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
|
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
|
||||||
[Dependency] private readonly DumpableSystem _dumpableSystem = default!;
|
[Dependency] private readonly DumpableSystem _dumpableSystem = default!;
|
||||||
[Dependency] private readonly TransformSystem _transformSystem = default!;
|
[Dependency] private readonly TransformSystem _transformSystem = default!;
|
||||||
@@ -471,6 +475,12 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
|||||||
if (!Resolve(unitId, ref unit))
|
if (!Resolve(unitId, ref unit))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (!HasComp<SharedHandsComponent>(userId) && toInsertId != userId) // Mobs like mouse can Jump inside even with no hands
|
||||||
|
{
|
||||||
|
_popupSystem.PopupEntity(Loc.GetString("disposal-unit-no-hands"), userId, Filter.Entities(userId), PopupType.SmallCaution);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!CanInsert(unit, toInsertId))
|
if (!CanInsert(unit, toInsertId))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,13 @@
|
|||||||
ui-disposal-unit-title = Disposal Unit
|
ui-disposal-unit-title = Disposal Unit
|
||||||
|
|
||||||
ui-disposal-unit-label-state = State:
|
ui-disposal-unit-label-state = State:
|
||||||
ui-disposal-unit-label-pressure = Pressure:
|
ui-disposal-unit-label-pressure = Pressure:
|
||||||
ui-disposal-unit-label-status = Ready
|
ui-disposal-unit-label-status = Ready
|
||||||
|
|
||||||
ui-disposal-unit-button-flush = Flush
|
ui-disposal-unit-button-flush = Flush
|
||||||
ui-disposal-unit-button-eject = Eject Contents
|
ui-disposal-unit-button-eject = Eject Contents
|
||||||
ui-disposal-unit-button-power = Power
|
ui-disposal-unit-button-power = Power
|
||||||
|
|
||||||
|
## No hands
|
||||||
|
|
||||||
|
disposal-unit-no-hands = You don't have hands!
|
||||||
|
|||||||
@@ -42,4 +42,4 @@ comp-window-knock = *knock knock*
|
|||||||
|
|
||||||
hugging-success-generic = You hug {THE($target)}.
|
hugging-success-generic = You hug {THE($target)}.
|
||||||
hugging-success-generic-others = { CAPITALIZE(THE($user)) } hugs {THE($target)}.
|
hugging-success-generic-others = { CAPITALIZE(THE($user)) } hugs {THE($target)}.
|
||||||
hugging-success-generic-target = { CAPITALIZE(THE($user)) } hugs you.
|
hugging-success-generic-target = { CAPITALIZE(THE($user)) } hugs you.
|
||||||
|
|||||||
Reference in New Issue
Block a user