Make forcing others into disposals take longer and more apparent (#20687)

This commit is contained in:
I.K
2023-10-02 14:35:58 -05:00
committed by GitHub
parent 2d20ca0545
commit dc95582679
3 changed files with 11 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ using Content.Shared.DragDrop;
using Content.Shared.Emag.Systems; using Content.Shared.Emag.Systems;
using Content.Shared.Hands.Components; using Content.Shared.Hands.Components;
using Content.Shared.Hands.EntitySystems; using Content.Shared.Hands.EntitySystems;
using Content.Shared.IdentityManagement;
using Content.Shared.Interaction; using Content.Shared.Interaction;
using Content.Shared.Item; using Content.Shared.Item;
using Content.Shared.Movement.Events; using Content.Shared.Movement.Events;
@@ -489,7 +490,12 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem
if (!CanInsert(unitId, unit, toInsertId)) if (!CanInsert(unitId, unit, toInsertId))
return false; return false;
var delay = userId == toInsertId ? unit.EntryDelay : unit.DraggedEntryDelay; bool insertingSelf = userId == toInsertId;
var delay = insertingSelf ? unit.EntryDelay : unit.DraggedEntryDelay;
if (userId != null && !insertingSelf)
_popupSystem.PopupEntity(Loc.GetString("disposal-unit-being-inserted", ("user", Identity.Entity((EntityUid) userId, EntityManager))), toInsertId, toInsertId, PopupType.Large);
if (delay <= 0 || userId == null) if (delay <= 0 || userId == null)
{ {

View File

@@ -81,7 +81,7 @@ public abstract partial class SharedDisposalUnitComponent : Component
/// Delay from trying to shove someone else into disposals. /// Delay from trying to shove someone else into disposals.
/// </summary> /// </summary>
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
public float DraggedEntryDelay = 0.5f; public float DraggedEntryDelay = 2.0f;
/// <summary> /// <summary>
/// Container of entities inside this disposal unit. /// Container of entities inside this disposal unit.

View File

@@ -26,3 +26,6 @@ disposal-unit-state-Ready = Ready
# Yes I want it to always say Pressurizing # Yes I want it to always say Pressurizing
disposal-unit-state-Flushed = Pressurizing disposal-unit-state-Flushed = Pressurizing
disposal-unit-state-Pressurizing = Pressurizing disposal-unit-state-Pressurizing = Pressurizing
# putting people in
disposal-unit-being-inserted = {CAPITALIZE($user)} is trying to force you into a disposal chute!