2020-07-04 13:51:14 +02:00
|
|
|
|
#nullable enable
|
2020-07-08 13:22:14 +02:00
|
|
|
|
using System;
|
Add the trash man (#1367)
* Add disposal.rsi
* Rename disposal resource to disposal.rsi and create basic components
* Add disposal nets
* Add pushing entities along the disposal network
* Add disposal unit
* Unregister disposable component
* Add flush and selfinsert verbs to disposal unit
* Add gradual disposals movement
* Fix being able to walk through space for a while after exiting disposals
* Multiply disposals speed by 10
And fix early returns when moving an entity
* Rename Disposable component to InDisposals
* Remove DisposalNet and add on anchor events
* Remove anchored events, moved to interfaces
* Code cleanup
* Fix adjacent tubes' connections when a tube connects
* Fix jittery movement in disposals
* Remove Logger.Debug call
* Move disposals updates to InDisposalsComponent
* Fix adjacent connection valid directions check
* Disposal tubes now throw you out where they are facing
* Add disposal unit exit cooldown
* Set different disposal pipe sprite state depending on anchored value
* Add recycler
* Add recycler animation
* Add bloody texture to the recycler when grinding a living being
* Add PowerDevice component to the disposal unit
* Made the Recycler center on the grid
* Add disposal junction
* Add picking a random direction if junction is entered from the output side
* Add disposal flush and clang sounds
Taken from VGStation
* Move disposal flush and clang sound file names to exposedata
* Add disposalsmap.yml to test with
* Add summaries to DisposalUnit fields
* Add sideDegrees yaml property to disposal junctions
* Fix outdated usings
* Add conveyor resources
* Update RobustToolbox
* More merge fixes
Add conveyor collision masks
* Add ConveyorComponent
* Fix crash when reentering a body
* Merge branch 'master' into disposals-1147
* Reduce recycler bounds, set hard to false, add summary and expose "safe" to yaml
* Move IAnchored and IUnAnchored to AnchorableComponent
* Update power components and remove old disposals map
* Remove redundant sprite layers
* Add tile pry command
* Fix tilepry command
* Fix DisposalJunctionComponent missing a component reference
* Add anchor by radius command
* Add Y-Junctions
* Add disposal bend
* Add unanchor command
* Change DisposalJunction prototypes to specify their angles
* Fix disposal units being hidden below the floor
* Removed IAnhored and IUnAnchored interfaces
* Replace CanBeNull annotation with nullable reference types
* Update showwires command
* Add recycler recycling items
* Added angle and speed properties to ConveyorComponent
* Fix conveyort textures
* Add animation to the disposal unit
* Fix anchor and unanchor commands sometimes not finding any entities
* Fix not reading flush_time from disposal unit prototype
* Fix merge conflict wrong using
* Fix disposal, recycling and conveyor texture paths
Delete diverters
* Update visualizer names
* Add DisposableComponent, change drag and drop to work with multiple components
Ignoreinsideblocker client side for drag and drops, like on the server
Add more comments
* Add conveyor belts properly moving entities on top
* Anchorr wires
* Change conveyor bounds to 0.49
* Anchor catwalks, airlocks, gravity generators, low walls, wires and windows
* Add starting/stopping conveyors
* Add reversed conveyors
* Add conveyor switches
* Move InDisposalsComponent code to DisposableComponent
* Add ExitVector method to tubes
* Fix not updating tube references when disconnecting one
* Replace IoCManager call with dependency
* Add tubes disconnecting if they move too far apart from one another
* Move disposals action blocking to shared
* Add rotating and flipping pipes
* Make conveyor intersection calculations approximate
* Fix 1% chance of the server crashing when initializing the map
Happens when emergency lockers remove themselves
* Add disposal unit interface
* Make disposal units refuse items if not powered
* Make disposal tubes hide only when anchored
* Make disposal junction arrows visible to mere mortals
* Add disposal tubes breaking
* Add tubeconnections command
* Add missing verb attribute
* Add flipped disposal junction
* Add ids and linking to conveyors and switches
* Add conveyor switch prying and placing
* Add anchoring conveyor switches and refactor placing them
* Add missing serializable attributes from DisposableComponentState
* Make conveyor speed VV ReadWrite
* Change drawdepth of conveyors to FloorObjects
* Make conveyor anchored check consistent
* Remove anchoring interaction from switches
* Add conveyor switch id syncing and move switches slightly when pried
* Make entities in containers not able to be moved by conveyors
* Add conveyor and switches loose textures
* Merge conflict fixes
* Add disposal unit test
* Add flushing test to disposal unit test
* Add disposal unit flush fail test
* Add disposals to the saltern map
* Fix saltern disposal junctions
* Add power checks to the recycler
* Fix disposal unit placement in maintenance closet
* Remove disposal junctions from saltern
* Readd junctions to saltern
* Add the chemmaster to saltern at the request of Ike
* Move the chemistry disposal unit
* Fix casing of disposal flush sound
* More merge conflict fixes
* Fix a compiler warning.
* Remove popup invocation from buckle
* Remove showPopup parameter from InteractionChecks
* Remove unnecessary physics components
Fixes the physics system dying
* Replace PhysicsComponent usages with CollidableComponent
* Update existing code for the new controller system
* Change conveyors to use a VirtualController instead of teleporting the entity
* Remove visualizer 2d suffix and update physics code
* Transition code to new controller system
* Fix shuttles not moving
* Fix throwing
* Fix guns
* Change hands to use physics.Stop() and remove item fumble method
* Add syncing conveyor switches states
* Fix the recycler wanting to be a conveyor too hard
* Fix showwires > showsubfloor rename in mapping command
* Fix wifi air conveyors
* Fix test error
* Add showsubfloorforever command
Changes drawdepth of the relevant entities
* Disable opening the disposal unit interface while inside
* Add closing the disposal unit interface when getting inside
* Add closing the interface when the disposal unit component is removed
* Add removing entities on disposal unit component removal
* Delay disposal unit flush and fix serialization
* Implement pressure in disposal units
* Fix chain engaging a disposal unit
* Implement states to the disposal unit
* Fix missing imports from merge conflict
* Update Content.Server/GameObjects/Components/Conveyor/ConveyorComponent.cs
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Address some reviews
* Fix za buildo
* Use container helper to detach disposables
* Make conveyors use the construction system
* Make conveyor groups and syncing sane
* Make flip flip
brave
* Add activate interface to conveyor switches
* Fix not removing the switch from its group when it's deleted
* Fix not registering conveyors and switches on initialize
* Stop using 0 as null
* Disconnect conveyors and switches when disposing of a group
* Make disposal units not able to be exited when flushing
* Make disposal units flush after a configurable 30 seconds
* Add handle and light layers to the disposal unit
* Merge engaging and flushing
* Update saltern.yml
* I love using 0 as null
* Make disposal unit visual layers make sense
* Remove duplicate remove method in disposal units and update light
* Replace DisposableComponent with disposal holders
* Fix disposal holders deleting their contents on deletion
* Account for disposal unit pressure in tests and make a failed flush autoengage
* Rename disposable to holder
* Fix junction connections
* Disable self insert and flush verbs when inside a disposal unit
* Fix spamming the engage button making the animation reset
* Make the recycler take materials into account properly
Fix cablestack1 not existing
* Merge conflict fixes
* Fix pipes not being saved anchored
* Change conveyors and groups to not use an id
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-07-30 23:45:28 +02:00
|
|
|
|
using System.Diagnostics.CodeAnalysis;
|
2020-07-25 15:11:16 +02:00
|
|
|
|
using Content.Server.GameObjects.Components.GUI;
|
2020-07-17 10:43:10 +02:00
|
|
|
|
using Content.Server.GameObjects.Components.Mobs;
|
2020-07-04 13:51:14 +02:00
|
|
|
|
using Content.Server.GameObjects.Components.Strap;
|
2020-06-25 15:52:24 +02:00
|
|
|
|
using Content.Server.Interfaces;
|
|
|
|
|
|
using Content.Server.Mobs;
|
|
|
|
|
|
using Content.Server.Utility;
|
2020-07-17 10:43:10 +02:00
|
|
|
|
using Content.Shared.GameObjects.Components.Buckle;
|
2020-06-25 15:52:24 +02:00
|
|
|
|
using Content.Shared.GameObjects.Components.Mobs;
|
|
|
|
|
|
using Content.Shared.GameObjects.Components.Strap;
|
|
|
|
|
|
using Content.Shared.GameObjects.EntitySystems;
|
2020-08-13 14:40:27 +02:00
|
|
|
|
using Content.Shared.GameObjects.Verbs;
|
2020-07-18 22:51:56 -07:00
|
|
|
|
using Content.Shared.Interfaces.GameObjects.Components;
|
2020-06-25 15:52:24 +02:00
|
|
|
|
using Robust.Server.GameObjects;
|
2020-07-08 14:45:25 +02:00
|
|
|
|
using Robust.Server.GameObjects.EntitySystemMessages;
|
2020-06-25 15:52:24 +02:00
|
|
|
|
using Robust.Server.GameObjects.EntitySystems;
|
2020-07-03 23:43:01 +02:00
|
|
|
|
using Robust.Shared.Containers;
|
2020-06-25 15:52:24 +02:00
|
|
|
|
using Robust.Shared.GameObjects;
|
2020-07-28 08:37:03 +02:00
|
|
|
|
using Robust.Shared.GameObjects.Components.Transform;
|
2020-07-19 21:34:35 +02:00
|
|
|
|
using Robust.Shared.GameObjects.Systems;
|
2020-06-25 15:52:24 +02:00
|
|
|
|
using Robust.Shared.Interfaces.GameObjects;
|
2020-07-28 08:37:03 +02:00
|
|
|
|
using Robust.Shared.Interfaces.Map;
|
2020-07-08 13:22:14 +02:00
|
|
|
|
using Robust.Shared.Interfaces.Timing;
|
2020-06-25 15:52:24 +02:00
|
|
|
|
using Robust.Shared.IoC;
|
|
|
|
|
|
using Robust.Shared.Localization;
|
|
|
|
|
|
using Robust.Shared.Maths;
|
|
|
|
|
|
using Robust.Shared.Serialization;
|
|
|
|
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
|
|
|
2020-07-17 10:43:10 +02:00
|
|
|
|
namespace Content.Server.GameObjects.Components.Buckle
|
2020-06-25 15:52:24 +02:00
|
|
|
|
{
|
|
|
|
|
|
[RegisterComponent]
|
2020-07-07 00:04:30 +02:00
|
|
|
|
public class BuckleComponent : SharedBuckleComponent, IInteractHand, IDragDrop
|
2020-06-25 15:52:24 +02:00
|
|
|
|
{
|
|
|
|
|
|
#pragma warning disable 649
|
2020-07-08 14:45:25 +02:00
|
|
|
|
[Dependency] private readonly IEntityManager _entityManager = default!;
|
2020-07-04 13:51:14 +02:00
|
|
|
|
[Dependency] private readonly IEntitySystemManager _entitySystem = default!;
|
2020-07-08 13:22:14 +02:00
|
|
|
|
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
2020-07-08 14:45:25 +02:00
|
|
|
|
[Dependency] private readonly IServerNotifyManager _notifyManager = default!;
|
2020-07-28 08:37:03 +02:00
|
|
|
|
[Dependency] private readonly IMapManager _mapManager = default!;
|
2020-06-25 15:52:24 +02:00
|
|
|
|
#pragma warning restore 649
|
|
|
|
|
|
|
|
|
|
|
|
private int _size;
|
2020-07-08 13:22:14 +02:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The range from which this entity can buckle to a <see cref="StrapComponent"/>.
|
|
|
|
|
|
/// </summary>
|
2020-07-17 10:43:10 +02:00
|
|
|
|
[ViewVariables]
|
2020-07-08 12:54:00 +02:00
|
|
|
|
private float _range;
|
|
|
|
|
|
|
2020-07-08 13:22:14 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The amount of time that must pass for this entity to
|
|
|
|
|
|
/// be able to unbuckle after recently buckling.
|
|
|
|
|
|
/// </summary>
|
2020-07-17 10:43:10 +02:00
|
|
|
|
[ViewVariables]
|
2020-07-08 13:22:14 +02:00
|
|
|
|
private TimeSpan _unbuckleDelay;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The time that this entity buckled at.
|
|
|
|
|
|
/// </summary>
|
2020-07-17 10:43:10 +02:00
|
|
|
|
[ViewVariables]
|
2020-07-08 13:22:14 +02:00
|
|
|
|
private TimeSpan _buckleTime;
|
|
|
|
|
|
|
2020-07-24 14:22:28 +02:00
|
|
|
|
public Vector2? BuckleOffset { get; private set; }
|
|
|
|
|
|
|
2020-07-08 12:54:00 +02:00
|
|
|
|
private StrapComponent? _buckledTo;
|
2020-06-25 15:52:24 +02:00
|
|
|
|
|
2020-07-17 10:43:10 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The strap that this component is buckled to.
|
|
|
|
|
|
/// </summary>
|
2020-07-04 13:51:14 +02:00
|
|
|
|
[ViewVariables]
|
|
|
|
|
|
public StrapComponent? BuckledTo
|
2020-07-02 23:36:06 +02:00
|
|
|
|
{
|
|
|
|
|
|
get => _buckledTo;
|
|
|
|
|
|
private set
|
|
|
|
|
|
{
|
|
|
|
|
|
_buckledTo = value;
|
2020-07-08 13:22:14 +02:00
|
|
|
|
_buckleTime = _gameTiming.CurTime;
|
2020-07-02 23:36:06 +02:00
|
|
|
|
Dirty();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[ViewVariables]
|
2020-07-17 10:43:10 +02:00
|
|
|
|
public override bool Buckled => BuckledTo != null;
|
2020-06-25 15:52:24 +02:00
|
|
|
|
|
2020-07-17 10:43:10 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// True if the entity was inserted or removed from a container
|
|
|
|
|
|
/// before updating, false otherwise.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
|
private bool ContainerChanged { get; set; }
|
2020-07-08 15:30:48 +02:00
|
|
|
|
|
2020-07-28 08:37:03 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// True if the entity was forcefully moved while buckled and should
|
|
|
|
|
|
/// unbuckle next update, false otherwise
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
|
private bool Moved { get; set; }
|
|
|
|
|
|
|
2020-07-17 10:43:10 +02:00
|
|
|
|
/// <summary>
|
2020-07-19 21:34:35 +02:00
|
|
|
|
/// The amount of space that this entity occupies in a
|
|
|
|
|
|
/// <see cref="StrapComponent"/>.
|
2020-07-17 10:43:10 +02:00
|
|
|
|
/// </summary>
|
2020-06-25 15:52:24 +02:00
|
|
|
|
[ViewVariables]
|
|
|
|
|
|
public int Size => _size;
|
|
|
|
|
|
|
2020-07-17 10:43:10 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Shows or hides the buckled status effect depending on if the
|
|
|
|
|
|
/// entity is buckled or not.
|
|
|
|
|
|
/// </summary>
|
2020-06-25 15:52:24 +02:00
|
|
|
|
private void BuckleStatus()
|
|
|
|
|
|
{
|
2020-08-20 16:48:00 +02:00
|
|
|
|
if (Owner.TryGetComponent(out ServerStatusEffectsComponent? status))
|
2020-06-25 15:52:24 +02:00
|
|
|
|
{
|
|
|
|
|
|
status.ChangeStatusEffectIcon(StatusEffect.Buckled,
|
2020-07-02 23:36:06 +02:00
|
|
|
|
Buckled
|
2020-07-04 14:14:39 +02:00
|
|
|
|
? BuckledTo!.BuckledIcon
|
2020-07-07 13:19:00 -04:00
|
|
|
|
: "/Textures/Interface/StatusEffects/Buckle/unbuckled.png");
|
2020-06-25 15:52:24 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-17 10:43:10 +02:00
|
|
|
|
/// <summary>
|
2020-07-19 21:34:35 +02:00
|
|
|
|
/// Reattaches this entity to the strap, modifying its position and rotation.
|
2020-07-17 10:43:10 +02:00
|
|
|
|
/// </summary>
|
2020-07-19 21:34:35 +02:00
|
|
|
|
/// <param name="strap">The strap to reattach to.</param>
|
2020-07-08 15:30:48 +02:00
|
|
|
|
private void ReAttach(StrapComponent strap)
|
|
|
|
|
|
{
|
|
|
|
|
|
var ownTransform = Owner.Transform;
|
|
|
|
|
|
var strapTransform = strap.Owner.Transform;
|
|
|
|
|
|
|
|
|
|
|
|
ownTransform.AttachParent(strapTransform);
|
|
|
|
|
|
|
|
|
|
|
|
switch (strap.Position)
|
|
|
|
|
|
{
|
|
|
|
|
|
case StrapPosition.None:
|
|
|
|
|
|
ownTransform.WorldRotation = strapTransform.WorldRotation;
|
|
|
|
|
|
break;
|
|
|
|
|
|
case StrapPosition.Stand:
|
|
|
|
|
|
StandingStateHelper.Standing(Owner);
|
|
|
|
|
|
ownTransform.WorldRotation = strapTransform.WorldRotation;
|
|
|
|
|
|
break;
|
|
|
|
|
|
case StrapPosition.Down:
|
2020-07-24 14:22:28 +02:00
|
|
|
|
StandingStateHelper.Down(Owner, force: true);
|
2020-07-08 15:30:48 +02:00
|
|
|
|
ownTransform.WorldRotation = Angle.South;
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
2020-07-19 21:34:35 +02:00
|
|
|
|
|
2020-07-24 14:22:28 +02:00
|
|
|
|
// Assign BuckleOffset first, before causing a MoveEvent to fire
|
2020-07-19 21:34:35 +02:00
|
|
|
|
if (strapTransform.WorldRotation.GetCardinalDir() == Direction.North)
|
|
|
|
|
|
{
|
2020-07-24 14:22:28 +02:00
|
|
|
|
BuckleOffset = (0, 0.15f);
|
|
|
|
|
|
ownTransform.WorldPosition = strapTransform.WorldPosition + BuckleOffset!.Value;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
BuckleOffset = Vector2.Zero;
|
|
|
|
|
|
ownTransform.WorldPosition = strapTransform.WorldPosition;
|
2020-07-19 21:34:35 +02:00
|
|
|
|
}
|
2020-07-08 15:30:48 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
Add the trash man (#1367)
* Add disposal.rsi
* Rename disposal resource to disposal.rsi and create basic components
* Add disposal nets
* Add pushing entities along the disposal network
* Add disposal unit
* Unregister disposable component
* Add flush and selfinsert verbs to disposal unit
* Add gradual disposals movement
* Fix being able to walk through space for a while after exiting disposals
* Multiply disposals speed by 10
And fix early returns when moving an entity
* Rename Disposable component to InDisposals
* Remove DisposalNet and add on anchor events
* Remove anchored events, moved to interfaces
* Code cleanup
* Fix adjacent tubes' connections when a tube connects
* Fix jittery movement in disposals
* Remove Logger.Debug call
* Move disposals updates to InDisposalsComponent
* Fix adjacent connection valid directions check
* Disposal tubes now throw you out where they are facing
* Add disposal unit exit cooldown
* Set different disposal pipe sprite state depending on anchored value
* Add recycler
* Add recycler animation
* Add bloody texture to the recycler when grinding a living being
* Add PowerDevice component to the disposal unit
* Made the Recycler center on the grid
* Add disposal junction
* Add picking a random direction if junction is entered from the output side
* Add disposal flush and clang sounds
Taken from VGStation
* Move disposal flush and clang sound file names to exposedata
* Add disposalsmap.yml to test with
* Add summaries to DisposalUnit fields
* Add sideDegrees yaml property to disposal junctions
* Fix outdated usings
* Add conveyor resources
* Update RobustToolbox
* More merge fixes
Add conveyor collision masks
* Add ConveyorComponent
* Fix crash when reentering a body
* Merge branch 'master' into disposals-1147
* Reduce recycler bounds, set hard to false, add summary and expose "safe" to yaml
* Move IAnchored and IUnAnchored to AnchorableComponent
* Update power components and remove old disposals map
* Remove redundant sprite layers
* Add tile pry command
* Fix tilepry command
* Fix DisposalJunctionComponent missing a component reference
* Add anchor by radius command
* Add Y-Junctions
* Add disposal bend
* Add unanchor command
* Change DisposalJunction prototypes to specify their angles
* Fix disposal units being hidden below the floor
* Removed IAnhored and IUnAnchored interfaces
* Replace CanBeNull annotation with nullable reference types
* Update showwires command
* Add recycler recycling items
* Added angle and speed properties to ConveyorComponent
* Fix conveyort textures
* Add animation to the disposal unit
* Fix anchor and unanchor commands sometimes not finding any entities
* Fix not reading flush_time from disposal unit prototype
* Fix merge conflict wrong using
* Fix disposal, recycling and conveyor texture paths
Delete diverters
* Update visualizer names
* Add DisposableComponent, change drag and drop to work with multiple components
Ignoreinsideblocker client side for drag and drops, like on the server
Add more comments
* Add conveyor belts properly moving entities on top
* Anchorr wires
* Change conveyor bounds to 0.49
* Anchor catwalks, airlocks, gravity generators, low walls, wires and windows
* Add starting/stopping conveyors
* Add reversed conveyors
* Add conveyor switches
* Move InDisposalsComponent code to DisposableComponent
* Add ExitVector method to tubes
* Fix not updating tube references when disconnecting one
* Replace IoCManager call with dependency
* Add tubes disconnecting if they move too far apart from one another
* Move disposals action blocking to shared
* Add rotating and flipping pipes
* Make conveyor intersection calculations approximate
* Fix 1% chance of the server crashing when initializing the map
Happens when emergency lockers remove themselves
* Add disposal unit interface
* Make disposal units refuse items if not powered
* Make disposal tubes hide only when anchored
* Make disposal junction arrows visible to mere mortals
* Add disposal tubes breaking
* Add tubeconnections command
* Add missing verb attribute
* Add flipped disposal junction
* Add ids and linking to conveyors and switches
* Add conveyor switch prying and placing
* Add anchoring conveyor switches and refactor placing them
* Add missing serializable attributes from DisposableComponentState
* Make conveyor speed VV ReadWrite
* Change drawdepth of conveyors to FloorObjects
* Make conveyor anchored check consistent
* Remove anchoring interaction from switches
* Add conveyor switch id syncing and move switches slightly when pried
* Make entities in containers not able to be moved by conveyors
* Add conveyor and switches loose textures
* Merge conflict fixes
* Add disposal unit test
* Add flushing test to disposal unit test
* Add disposal unit flush fail test
* Add disposals to the saltern map
* Fix saltern disposal junctions
* Add power checks to the recycler
* Fix disposal unit placement in maintenance closet
* Remove disposal junctions from saltern
* Readd junctions to saltern
* Add the chemmaster to saltern at the request of Ike
* Move the chemistry disposal unit
* Fix casing of disposal flush sound
* More merge conflict fixes
* Fix a compiler warning.
* Remove popup invocation from buckle
* Remove showPopup parameter from InteractionChecks
* Remove unnecessary physics components
Fixes the physics system dying
* Replace PhysicsComponent usages with CollidableComponent
* Update existing code for the new controller system
* Change conveyors to use a VirtualController instead of teleporting the entity
* Remove visualizer 2d suffix and update physics code
* Transition code to new controller system
* Fix shuttles not moving
* Fix throwing
* Fix guns
* Change hands to use physics.Stop() and remove item fumble method
* Add syncing conveyor switches states
* Fix the recycler wanting to be a conveyor too hard
* Fix showwires > showsubfloor rename in mapping command
* Fix wifi air conveyors
* Fix test error
* Add showsubfloorforever command
Changes drawdepth of the relevant entities
* Disable opening the disposal unit interface while inside
* Add closing the disposal unit interface when getting inside
* Add closing the interface when the disposal unit component is removed
* Add removing entities on disposal unit component removal
* Delay disposal unit flush and fix serialization
* Implement pressure in disposal units
* Fix chain engaging a disposal unit
* Implement states to the disposal unit
* Fix missing imports from merge conflict
* Update Content.Server/GameObjects/Components/Conveyor/ConveyorComponent.cs
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Address some reviews
* Fix za buildo
* Use container helper to detach disposables
* Make conveyors use the construction system
* Make conveyor groups and syncing sane
* Make flip flip
brave
* Add activate interface to conveyor switches
* Fix not removing the switch from its group when it's deleted
* Fix not registering conveyors and switches on initialize
* Stop using 0 as null
* Disconnect conveyors and switches when disposing of a group
* Make disposal units not able to be exited when flushing
* Make disposal units flush after a configurable 30 seconds
* Add handle and light layers to the disposal unit
* Merge engaging and flushing
* Update saltern.yml
* I love using 0 as null
* Make disposal unit visual layers make sense
* Remove duplicate remove method in disposal units and update light
* Replace DisposableComponent with disposal holders
* Fix disposal holders deleting their contents on deletion
* Account for disposal unit pressure in tests and make a failed flush autoengage
* Rename disposable to holder
* Fix junction connections
* Disable self insert and flush verbs when inside a disposal unit
* Fix spamming the engage button making the animation reset
* Make the recycler take materials into account properly
Fix cablestack1 not existing
* Merge conflict fixes
* Fix pipes not being saved anchored
* Change conveyors and groups to not use an id
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-07-30 23:45:28 +02:00
|
|
|
|
private bool CanBuckle(IEntity user, IEntity to, [MaybeNullWhen(false)] out StrapComponent strap)
|
2020-06-25 15:52:24 +02:00
|
|
|
|
{
|
Add the trash man (#1367)
* Add disposal.rsi
* Rename disposal resource to disposal.rsi and create basic components
* Add disposal nets
* Add pushing entities along the disposal network
* Add disposal unit
* Unregister disposable component
* Add flush and selfinsert verbs to disposal unit
* Add gradual disposals movement
* Fix being able to walk through space for a while after exiting disposals
* Multiply disposals speed by 10
And fix early returns when moving an entity
* Rename Disposable component to InDisposals
* Remove DisposalNet and add on anchor events
* Remove anchored events, moved to interfaces
* Code cleanup
* Fix adjacent tubes' connections when a tube connects
* Fix jittery movement in disposals
* Remove Logger.Debug call
* Move disposals updates to InDisposalsComponent
* Fix adjacent connection valid directions check
* Disposal tubes now throw you out where they are facing
* Add disposal unit exit cooldown
* Set different disposal pipe sprite state depending on anchored value
* Add recycler
* Add recycler animation
* Add bloody texture to the recycler when grinding a living being
* Add PowerDevice component to the disposal unit
* Made the Recycler center on the grid
* Add disposal junction
* Add picking a random direction if junction is entered from the output side
* Add disposal flush and clang sounds
Taken from VGStation
* Move disposal flush and clang sound file names to exposedata
* Add disposalsmap.yml to test with
* Add summaries to DisposalUnit fields
* Add sideDegrees yaml property to disposal junctions
* Fix outdated usings
* Add conveyor resources
* Update RobustToolbox
* More merge fixes
Add conveyor collision masks
* Add ConveyorComponent
* Fix crash when reentering a body
* Merge branch 'master' into disposals-1147
* Reduce recycler bounds, set hard to false, add summary and expose "safe" to yaml
* Move IAnchored and IUnAnchored to AnchorableComponent
* Update power components and remove old disposals map
* Remove redundant sprite layers
* Add tile pry command
* Fix tilepry command
* Fix DisposalJunctionComponent missing a component reference
* Add anchor by radius command
* Add Y-Junctions
* Add disposal bend
* Add unanchor command
* Change DisposalJunction prototypes to specify their angles
* Fix disposal units being hidden below the floor
* Removed IAnhored and IUnAnchored interfaces
* Replace CanBeNull annotation with nullable reference types
* Update showwires command
* Add recycler recycling items
* Added angle and speed properties to ConveyorComponent
* Fix conveyort textures
* Add animation to the disposal unit
* Fix anchor and unanchor commands sometimes not finding any entities
* Fix not reading flush_time from disposal unit prototype
* Fix merge conflict wrong using
* Fix disposal, recycling and conveyor texture paths
Delete diverters
* Update visualizer names
* Add DisposableComponent, change drag and drop to work with multiple components
Ignoreinsideblocker client side for drag and drops, like on the server
Add more comments
* Add conveyor belts properly moving entities on top
* Anchorr wires
* Change conveyor bounds to 0.49
* Anchor catwalks, airlocks, gravity generators, low walls, wires and windows
* Add starting/stopping conveyors
* Add reversed conveyors
* Add conveyor switches
* Move InDisposalsComponent code to DisposableComponent
* Add ExitVector method to tubes
* Fix not updating tube references when disconnecting one
* Replace IoCManager call with dependency
* Add tubes disconnecting if they move too far apart from one another
* Move disposals action blocking to shared
* Add rotating and flipping pipes
* Make conveyor intersection calculations approximate
* Fix 1% chance of the server crashing when initializing the map
Happens when emergency lockers remove themselves
* Add disposal unit interface
* Make disposal units refuse items if not powered
* Make disposal tubes hide only when anchored
* Make disposal junction arrows visible to mere mortals
* Add disposal tubes breaking
* Add tubeconnections command
* Add missing verb attribute
* Add flipped disposal junction
* Add ids and linking to conveyors and switches
* Add conveyor switch prying and placing
* Add anchoring conveyor switches and refactor placing them
* Add missing serializable attributes from DisposableComponentState
* Make conveyor speed VV ReadWrite
* Change drawdepth of conveyors to FloorObjects
* Make conveyor anchored check consistent
* Remove anchoring interaction from switches
* Add conveyor switch id syncing and move switches slightly when pried
* Make entities in containers not able to be moved by conveyors
* Add conveyor and switches loose textures
* Merge conflict fixes
* Add disposal unit test
* Add flushing test to disposal unit test
* Add disposal unit flush fail test
* Add disposals to the saltern map
* Fix saltern disposal junctions
* Add power checks to the recycler
* Fix disposal unit placement in maintenance closet
* Remove disposal junctions from saltern
* Readd junctions to saltern
* Add the chemmaster to saltern at the request of Ike
* Move the chemistry disposal unit
* Fix casing of disposal flush sound
* More merge conflict fixes
* Fix a compiler warning.
* Remove popup invocation from buckle
* Remove showPopup parameter from InteractionChecks
* Remove unnecessary physics components
Fixes the physics system dying
* Replace PhysicsComponent usages with CollidableComponent
* Update existing code for the new controller system
* Change conveyors to use a VirtualController instead of teleporting the entity
* Remove visualizer 2d suffix and update physics code
* Transition code to new controller system
* Fix shuttles not moving
* Fix throwing
* Fix guns
* Change hands to use physics.Stop() and remove item fumble method
* Add syncing conveyor switches states
* Fix the recycler wanting to be a conveyor too hard
* Fix showwires > showsubfloor rename in mapping command
* Fix wifi air conveyors
* Fix test error
* Add showsubfloorforever command
Changes drawdepth of the relevant entities
* Disable opening the disposal unit interface while inside
* Add closing the disposal unit interface when getting inside
* Add closing the interface when the disposal unit component is removed
* Add removing entities on disposal unit component removal
* Delay disposal unit flush and fix serialization
* Implement pressure in disposal units
* Fix chain engaging a disposal unit
* Implement states to the disposal unit
* Fix missing imports from merge conflict
* Update Content.Server/GameObjects/Components/Conveyor/ConveyorComponent.cs
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Address some reviews
* Fix za buildo
* Use container helper to detach disposables
* Make conveyors use the construction system
* Make conveyor groups and syncing sane
* Make flip flip
brave
* Add activate interface to conveyor switches
* Fix not removing the switch from its group when it's deleted
* Fix not registering conveyors and switches on initialize
* Stop using 0 as null
* Disconnect conveyors and switches when disposing of a group
* Make disposal units not able to be exited when flushing
* Make disposal units flush after a configurable 30 seconds
* Add handle and light layers to the disposal unit
* Merge engaging and flushing
* Update saltern.yml
* I love using 0 as null
* Make disposal unit visual layers make sense
* Remove duplicate remove method in disposal units and update light
* Replace DisposableComponent with disposal holders
* Fix disposal holders deleting their contents on deletion
* Account for disposal unit pressure in tests and make a failed flush autoengage
* Rename disposable to holder
* Fix junction connections
* Disable self insert and flush verbs when inside a disposal unit
* Fix spamming the engage button making the animation reset
* Make the recycler take materials into account properly
Fix cablestack1 not existing
* Merge conflict fixes
* Fix pipes not being saved anchored
* Change conveyors and groups to not use an id
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-07-30 23:45:28 +02:00
|
|
|
|
strap = null;
|
|
|
|
|
|
|
2020-06-25 15:52:24 +02:00
|
|
|
|
if (user == null || user == to)
|
|
|
|
|
|
{
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!ActionBlockerSystem.CanInteract(user))
|
|
|
|
|
|
{
|
|
|
|
|
|
_notifyManager.PopupMessage(user, user,
|
|
|
|
|
|
Loc.GetString("You can't do that!"));
|
Add the trash man (#1367)
* Add disposal.rsi
* Rename disposal resource to disposal.rsi and create basic components
* Add disposal nets
* Add pushing entities along the disposal network
* Add disposal unit
* Unregister disposable component
* Add flush and selfinsert verbs to disposal unit
* Add gradual disposals movement
* Fix being able to walk through space for a while after exiting disposals
* Multiply disposals speed by 10
And fix early returns when moving an entity
* Rename Disposable component to InDisposals
* Remove DisposalNet and add on anchor events
* Remove anchored events, moved to interfaces
* Code cleanup
* Fix adjacent tubes' connections when a tube connects
* Fix jittery movement in disposals
* Remove Logger.Debug call
* Move disposals updates to InDisposalsComponent
* Fix adjacent connection valid directions check
* Disposal tubes now throw you out where they are facing
* Add disposal unit exit cooldown
* Set different disposal pipe sprite state depending on anchored value
* Add recycler
* Add recycler animation
* Add bloody texture to the recycler when grinding a living being
* Add PowerDevice component to the disposal unit
* Made the Recycler center on the grid
* Add disposal junction
* Add picking a random direction if junction is entered from the output side
* Add disposal flush and clang sounds
Taken from VGStation
* Move disposal flush and clang sound file names to exposedata
* Add disposalsmap.yml to test with
* Add summaries to DisposalUnit fields
* Add sideDegrees yaml property to disposal junctions
* Fix outdated usings
* Add conveyor resources
* Update RobustToolbox
* More merge fixes
Add conveyor collision masks
* Add ConveyorComponent
* Fix crash when reentering a body
* Merge branch 'master' into disposals-1147
* Reduce recycler bounds, set hard to false, add summary and expose "safe" to yaml
* Move IAnchored and IUnAnchored to AnchorableComponent
* Update power components and remove old disposals map
* Remove redundant sprite layers
* Add tile pry command
* Fix tilepry command
* Fix DisposalJunctionComponent missing a component reference
* Add anchor by radius command
* Add Y-Junctions
* Add disposal bend
* Add unanchor command
* Change DisposalJunction prototypes to specify their angles
* Fix disposal units being hidden below the floor
* Removed IAnhored and IUnAnchored interfaces
* Replace CanBeNull annotation with nullable reference types
* Update showwires command
* Add recycler recycling items
* Added angle and speed properties to ConveyorComponent
* Fix conveyort textures
* Add animation to the disposal unit
* Fix anchor and unanchor commands sometimes not finding any entities
* Fix not reading flush_time from disposal unit prototype
* Fix merge conflict wrong using
* Fix disposal, recycling and conveyor texture paths
Delete diverters
* Update visualizer names
* Add DisposableComponent, change drag and drop to work with multiple components
Ignoreinsideblocker client side for drag and drops, like on the server
Add more comments
* Add conveyor belts properly moving entities on top
* Anchorr wires
* Change conveyor bounds to 0.49
* Anchor catwalks, airlocks, gravity generators, low walls, wires and windows
* Add starting/stopping conveyors
* Add reversed conveyors
* Add conveyor switches
* Move InDisposalsComponent code to DisposableComponent
* Add ExitVector method to tubes
* Fix not updating tube references when disconnecting one
* Replace IoCManager call with dependency
* Add tubes disconnecting if they move too far apart from one another
* Move disposals action blocking to shared
* Add rotating and flipping pipes
* Make conveyor intersection calculations approximate
* Fix 1% chance of the server crashing when initializing the map
Happens when emergency lockers remove themselves
* Add disposal unit interface
* Make disposal units refuse items if not powered
* Make disposal tubes hide only when anchored
* Make disposal junction arrows visible to mere mortals
* Add disposal tubes breaking
* Add tubeconnections command
* Add missing verb attribute
* Add flipped disposal junction
* Add ids and linking to conveyors and switches
* Add conveyor switch prying and placing
* Add anchoring conveyor switches and refactor placing them
* Add missing serializable attributes from DisposableComponentState
* Make conveyor speed VV ReadWrite
* Change drawdepth of conveyors to FloorObjects
* Make conveyor anchored check consistent
* Remove anchoring interaction from switches
* Add conveyor switch id syncing and move switches slightly when pried
* Make entities in containers not able to be moved by conveyors
* Add conveyor and switches loose textures
* Merge conflict fixes
* Add disposal unit test
* Add flushing test to disposal unit test
* Add disposal unit flush fail test
* Add disposals to the saltern map
* Fix saltern disposal junctions
* Add power checks to the recycler
* Fix disposal unit placement in maintenance closet
* Remove disposal junctions from saltern
* Readd junctions to saltern
* Add the chemmaster to saltern at the request of Ike
* Move the chemistry disposal unit
* Fix casing of disposal flush sound
* More merge conflict fixes
* Fix a compiler warning.
* Remove popup invocation from buckle
* Remove showPopup parameter from InteractionChecks
* Remove unnecessary physics components
Fixes the physics system dying
* Replace PhysicsComponent usages with CollidableComponent
* Update existing code for the new controller system
* Change conveyors to use a VirtualController instead of teleporting the entity
* Remove visualizer 2d suffix and update physics code
* Transition code to new controller system
* Fix shuttles not moving
* Fix throwing
* Fix guns
* Change hands to use physics.Stop() and remove item fumble method
* Add syncing conveyor switches states
* Fix the recycler wanting to be a conveyor too hard
* Fix showwires > showsubfloor rename in mapping command
* Fix wifi air conveyors
* Fix test error
* Add showsubfloorforever command
Changes drawdepth of the relevant entities
* Disable opening the disposal unit interface while inside
* Add closing the disposal unit interface when getting inside
* Add closing the interface when the disposal unit component is removed
* Add removing entities on disposal unit component removal
* Delay disposal unit flush and fix serialization
* Implement pressure in disposal units
* Fix chain engaging a disposal unit
* Implement states to the disposal unit
* Fix missing imports from merge conflict
* Update Content.Server/GameObjects/Components/Conveyor/ConveyorComponent.cs
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Address some reviews
* Fix za buildo
* Use container helper to detach disposables
* Make conveyors use the construction system
* Make conveyor groups and syncing sane
* Make flip flip
brave
* Add activate interface to conveyor switches
* Fix not removing the switch from its group when it's deleted
* Fix not registering conveyors and switches on initialize
* Stop using 0 as null
* Disconnect conveyors and switches when disposing of a group
* Make disposal units not able to be exited when flushing
* Make disposal units flush after a configurable 30 seconds
* Add handle and light layers to the disposal unit
* Merge engaging and flushing
* Update saltern.yml
* I love using 0 as null
* Make disposal unit visual layers make sense
* Remove duplicate remove method in disposal units and update light
* Replace DisposableComponent with disposal holders
* Fix disposal holders deleting their contents on deletion
* Account for disposal unit pressure in tests and make a failed flush autoengage
* Rename disposable to holder
* Fix junction connections
* Disable self insert and flush verbs when inside a disposal unit
* Fix spamming the engage button making the animation reset
* Make the recycler take materials into account properly
Fix cablestack1 not existing
* Merge conflict fixes
* Fix pipes not being saved anchored
* Change conveyors and groups to not use an id
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-07-30 23:45:28 +02:00
|
|
|
|
|
2020-06-25 15:52:24 +02:00
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
Add the trash man (#1367)
* Add disposal.rsi
* Rename disposal resource to disposal.rsi and create basic components
* Add disposal nets
* Add pushing entities along the disposal network
* Add disposal unit
* Unregister disposable component
* Add flush and selfinsert verbs to disposal unit
* Add gradual disposals movement
* Fix being able to walk through space for a while after exiting disposals
* Multiply disposals speed by 10
And fix early returns when moving an entity
* Rename Disposable component to InDisposals
* Remove DisposalNet and add on anchor events
* Remove anchored events, moved to interfaces
* Code cleanup
* Fix adjacent tubes' connections when a tube connects
* Fix jittery movement in disposals
* Remove Logger.Debug call
* Move disposals updates to InDisposalsComponent
* Fix adjacent connection valid directions check
* Disposal tubes now throw you out where they are facing
* Add disposal unit exit cooldown
* Set different disposal pipe sprite state depending on anchored value
* Add recycler
* Add recycler animation
* Add bloody texture to the recycler when grinding a living being
* Add PowerDevice component to the disposal unit
* Made the Recycler center on the grid
* Add disposal junction
* Add picking a random direction if junction is entered from the output side
* Add disposal flush and clang sounds
Taken from VGStation
* Move disposal flush and clang sound file names to exposedata
* Add disposalsmap.yml to test with
* Add summaries to DisposalUnit fields
* Add sideDegrees yaml property to disposal junctions
* Fix outdated usings
* Add conveyor resources
* Update RobustToolbox
* More merge fixes
Add conveyor collision masks
* Add ConveyorComponent
* Fix crash when reentering a body
* Merge branch 'master' into disposals-1147
* Reduce recycler bounds, set hard to false, add summary and expose "safe" to yaml
* Move IAnchored and IUnAnchored to AnchorableComponent
* Update power components and remove old disposals map
* Remove redundant sprite layers
* Add tile pry command
* Fix tilepry command
* Fix DisposalJunctionComponent missing a component reference
* Add anchor by radius command
* Add Y-Junctions
* Add disposal bend
* Add unanchor command
* Change DisposalJunction prototypes to specify their angles
* Fix disposal units being hidden below the floor
* Removed IAnhored and IUnAnchored interfaces
* Replace CanBeNull annotation with nullable reference types
* Update showwires command
* Add recycler recycling items
* Added angle and speed properties to ConveyorComponent
* Fix conveyort textures
* Add animation to the disposal unit
* Fix anchor and unanchor commands sometimes not finding any entities
* Fix not reading flush_time from disposal unit prototype
* Fix merge conflict wrong using
* Fix disposal, recycling and conveyor texture paths
Delete diverters
* Update visualizer names
* Add DisposableComponent, change drag and drop to work with multiple components
Ignoreinsideblocker client side for drag and drops, like on the server
Add more comments
* Add conveyor belts properly moving entities on top
* Anchorr wires
* Change conveyor bounds to 0.49
* Anchor catwalks, airlocks, gravity generators, low walls, wires and windows
* Add starting/stopping conveyors
* Add reversed conveyors
* Add conveyor switches
* Move InDisposalsComponent code to DisposableComponent
* Add ExitVector method to tubes
* Fix not updating tube references when disconnecting one
* Replace IoCManager call with dependency
* Add tubes disconnecting if they move too far apart from one another
* Move disposals action blocking to shared
* Add rotating and flipping pipes
* Make conveyor intersection calculations approximate
* Fix 1% chance of the server crashing when initializing the map
Happens when emergency lockers remove themselves
* Add disposal unit interface
* Make disposal units refuse items if not powered
* Make disposal tubes hide only when anchored
* Make disposal junction arrows visible to mere mortals
* Add disposal tubes breaking
* Add tubeconnections command
* Add missing verb attribute
* Add flipped disposal junction
* Add ids and linking to conveyors and switches
* Add conveyor switch prying and placing
* Add anchoring conveyor switches and refactor placing them
* Add missing serializable attributes from DisposableComponentState
* Make conveyor speed VV ReadWrite
* Change drawdepth of conveyors to FloorObjects
* Make conveyor anchored check consistent
* Remove anchoring interaction from switches
* Add conveyor switch id syncing and move switches slightly when pried
* Make entities in containers not able to be moved by conveyors
* Add conveyor and switches loose textures
* Merge conflict fixes
* Add disposal unit test
* Add flushing test to disposal unit test
* Add disposal unit flush fail test
* Add disposals to the saltern map
* Fix saltern disposal junctions
* Add power checks to the recycler
* Fix disposal unit placement in maintenance closet
* Remove disposal junctions from saltern
* Readd junctions to saltern
* Add the chemmaster to saltern at the request of Ike
* Move the chemistry disposal unit
* Fix casing of disposal flush sound
* More merge conflict fixes
* Fix a compiler warning.
* Remove popup invocation from buckle
* Remove showPopup parameter from InteractionChecks
* Remove unnecessary physics components
Fixes the physics system dying
* Replace PhysicsComponent usages with CollidableComponent
* Update existing code for the new controller system
* Change conveyors to use a VirtualController instead of teleporting the entity
* Remove visualizer 2d suffix and update physics code
* Transition code to new controller system
* Fix shuttles not moving
* Fix throwing
* Fix guns
* Change hands to use physics.Stop() and remove item fumble method
* Add syncing conveyor switches states
* Fix the recycler wanting to be a conveyor too hard
* Fix showwires > showsubfloor rename in mapping command
* Fix wifi air conveyors
* Fix test error
* Add showsubfloorforever command
Changes drawdepth of the relevant entities
* Disable opening the disposal unit interface while inside
* Add closing the disposal unit interface when getting inside
* Add closing the interface when the disposal unit component is removed
* Add removing entities on disposal unit component removal
* Delay disposal unit flush and fix serialization
* Implement pressure in disposal units
* Fix chain engaging a disposal unit
* Implement states to the disposal unit
* Fix missing imports from merge conflict
* Update Content.Server/GameObjects/Components/Conveyor/ConveyorComponent.cs
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Address some reviews
* Fix za buildo
* Use container helper to detach disposables
* Make conveyors use the construction system
* Make conveyor groups and syncing sane
* Make flip flip
brave
* Add activate interface to conveyor switches
* Fix not removing the switch from its group when it's deleted
* Fix not registering conveyors and switches on initialize
* Stop using 0 as null
* Disconnect conveyors and switches when disposing of a group
* Make disposal units not able to be exited when flushing
* Make disposal units flush after a configurable 30 seconds
* Add handle and light layers to the disposal unit
* Merge engaging and flushing
* Update saltern.yml
* I love using 0 as null
* Make disposal unit visual layers make sense
* Remove duplicate remove method in disposal units and update light
* Replace DisposableComponent with disposal holders
* Fix disposal holders deleting their contents on deletion
* Account for disposal unit pressure in tests and make a failed flush autoengage
* Rename disposable to holder
* Fix junction connections
* Disable self insert and flush verbs when inside a disposal unit
* Fix spamming the engage button making the animation reset
* Make the recycler take materials into account properly
Fix cablestack1 not existing
* Merge conflict fixes
* Fix pipes not being saved anchored
* Change conveyors and groups to not use an id
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-07-30 23:45:28 +02:00
|
|
|
|
if (!to.TryGetComponent(out strap))
|
2020-07-08 12:54:00 +02:00
|
|
|
|
{
|
|
|
|
|
|
_notifyManager.PopupMessage(Owner, user,
|
|
|
|
|
|
Loc.GetString(Owner == user
|
|
|
|
|
|
? "You can't buckle yourself there!"
|
|
|
|
|
|
: "You can't buckle {0:them} there!", Owner));
|
Add the trash man (#1367)
* Add disposal.rsi
* Rename disposal resource to disposal.rsi and create basic components
* Add disposal nets
* Add pushing entities along the disposal network
* Add disposal unit
* Unregister disposable component
* Add flush and selfinsert verbs to disposal unit
* Add gradual disposals movement
* Fix being able to walk through space for a while after exiting disposals
* Multiply disposals speed by 10
And fix early returns when moving an entity
* Rename Disposable component to InDisposals
* Remove DisposalNet and add on anchor events
* Remove anchored events, moved to interfaces
* Code cleanup
* Fix adjacent tubes' connections when a tube connects
* Fix jittery movement in disposals
* Remove Logger.Debug call
* Move disposals updates to InDisposalsComponent
* Fix adjacent connection valid directions check
* Disposal tubes now throw you out where they are facing
* Add disposal unit exit cooldown
* Set different disposal pipe sprite state depending on anchored value
* Add recycler
* Add recycler animation
* Add bloody texture to the recycler when grinding a living being
* Add PowerDevice component to the disposal unit
* Made the Recycler center on the grid
* Add disposal junction
* Add picking a random direction if junction is entered from the output side
* Add disposal flush and clang sounds
Taken from VGStation
* Move disposal flush and clang sound file names to exposedata
* Add disposalsmap.yml to test with
* Add summaries to DisposalUnit fields
* Add sideDegrees yaml property to disposal junctions
* Fix outdated usings
* Add conveyor resources
* Update RobustToolbox
* More merge fixes
Add conveyor collision masks
* Add ConveyorComponent
* Fix crash when reentering a body
* Merge branch 'master' into disposals-1147
* Reduce recycler bounds, set hard to false, add summary and expose "safe" to yaml
* Move IAnchored and IUnAnchored to AnchorableComponent
* Update power components and remove old disposals map
* Remove redundant sprite layers
* Add tile pry command
* Fix tilepry command
* Fix DisposalJunctionComponent missing a component reference
* Add anchor by radius command
* Add Y-Junctions
* Add disposal bend
* Add unanchor command
* Change DisposalJunction prototypes to specify their angles
* Fix disposal units being hidden below the floor
* Removed IAnhored and IUnAnchored interfaces
* Replace CanBeNull annotation with nullable reference types
* Update showwires command
* Add recycler recycling items
* Added angle and speed properties to ConveyorComponent
* Fix conveyort textures
* Add animation to the disposal unit
* Fix anchor and unanchor commands sometimes not finding any entities
* Fix not reading flush_time from disposal unit prototype
* Fix merge conflict wrong using
* Fix disposal, recycling and conveyor texture paths
Delete diverters
* Update visualizer names
* Add DisposableComponent, change drag and drop to work with multiple components
Ignoreinsideblocker client side for drag and drops, like on the server
Add more comments
* Add conveyor belts properly moving entities on top
* Anchorr wires
* Change conveyor bounds to 0.49
* Anchor catwalks, airlocks, gravity generators, low walls, wires and windows
* Add starting/stopping conveyors
* Add reversed conveyors
* Add conveyor switches
* Move InDisposalsComponent code to DisposableComponent
* Add ExitVector method to tubes
* Fix not updating tube references when disconnecting one
* Replace IoCManager call with dependency
* Add tubes disconnecting if they move too far apart from one another
* Move disposals action blocking to shared
* Add rotating and flipping pipes
* Make conveyor intersection calculations approximate
* Fix 1% chance of the server crashing when initializing the map
Happens when emergency lockers remove themselves
* Add disposal unit interface
* Make disposal units refuse items if not powered
* Make disposal tubes hide only when anchored
* Make disposal junction arrows visible to mere mortals
* Add disposal tubes breaking
* Add tubeconnections command
* Add missing verb attribute
* Add flipped disposal junction
* Add ids and linking to conveyors and switches
* Add conveyor switch prying and placing
* Add anchoring conveyor switches and refactor placing them
* Add missing serializable attributes from DisposableComponentState
* Make conveyor speed VV ReadWrite
* Change drawdepth of conveyors to FloorObjects
* Make conveyor anchored check consistent
* Remove anchoring interaction from switches
* Add conveyor switch id syncing and move switches slightly when pried
* Make entities in containers not able to be moved by conveyors
* Add conveyor and switches loose textures
* Merge conflict fixes
* Add disposal unit test
* Add flushing test to disposal unit test
* Add disposal unit flush fail test
* Add disposals to the saltern map
* Fix saltern disposal junctions
* Add power checks to the recycler
* Fix disposal unit placement in maintenance closet
* Remove disposal junctions from saltern
* Readd junctions to saltern
* Add the chemmaster to saltern at the request of Ike
* Move the chemistry disposal unit
* Fix casing of disposal flush sound
* More merge conflict fixes
* Fix a compiler warning.
* Remove popup invocation from buckle
* Remove showPopup parameter from InteractionChecks
* Remove unnecessary physics components
Fixes the physics system dying
* Replace PhysicsComponent usages with CollidableComponent
* Update existing code for the new controller system
* Change conveyors to use a VirtualController instead of teleporting the entity
* Remove visualizer 2d suffix and update physics code
* Transition code to new controller system
* Fix shuttles not moving
* Fix throwing
* Fix guns
* Change hands to use physics.Stop() and remove item fumble method
* Add syncing conveyor switches states
* Fix the recycler wanting to be a conveyor too hard
* Fix showwires > showsubfloor rename in mapping command
* Fix wifi air conveyors
* Fix test error
* Add showsubfloorforever command
Changes drawdepth of the relevant entities
* Disable opening the disposal unit interface while inside
* Add closing the disposal unit interface when getting inside
* Add closing the interface when the disposal unit component is removed
* Add removing entities on disposal unit component removal
* Delay disposal unit flush and fix serialization
* Implement pressure in disposal units
* Fix chain engaging a disposal unit
* Implement states to the disposal unit
* Fix missing imports from merge conflict
* Update Content.Server/GameObjects/Components/Conveyor/ConveyorComponent.cs
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Address some reviews
* Fix za buildo
* Use container helper to detach disposables
* Make conveyors use the construction system
* Make conveyor groups and syncing sane
* Make flip flip
brave
* Add activate interface to conveyor switches
* Fix not removing the switch from its group when it's deleted
* Fix not registering conveyors and switches on initialize
* Stop using 0 as null
* Disconnect conveyors and switches when disposing of a group
* Make disposal units not able to be exited when flushing
* Make disposal units flush after a configurable 30 seconds
* Add handle and light layers to the disposal unit
* Merge engaging and flushing
* Update saltern.yml
* I love using 0 as null
* Make disposal unit visual layers make sense
* Remove duplicate remove method in disposal units and update light
* Replace DisposableComponent with disposal holders
* Fix disposal holders deleting their contents on deletion
* Account for disposal unit pressure in tests and make a failed flush autoengage
* Rename disposable to holder
* Fix junction connections
* Disable self insert and flush verbs when inside a disposal unit
* Fix spamming the engage button making the animation reset
* Make the recycler take materials into account properly
Fix cablestack1 not existing
* Merge conflict fixes
* Fix pipes not being saved anchored
* Change conveyors and groups to not use an id
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-07-30 23:45:28 +02:00
|
|
|
|
|
2020-07-08 12:54:00 +02:00
|
|
|
|
return false;
|
|
|
|
|
|
}
|
2020-06-25 15:52:24 +02:00
|
|
|
|
|
2020-07-19 21:34:35 +02:00
|
|
|
|
var ownerPosition = Owner.Transform.MapPosition;
|
2020-07-08 12:54:00 +02:00
|
|
|
|
var strapPosition = strap.Owner.Transform.MapPosition;
|
2020-07-19 21:34:35 +02:00
|
|
|
|
var interaction = EntitySystem.Get<SharedInteractionSystem>();
|
Add the trash man (#1367)
* Add disposal.rsi
* Rename disposal resource to disposal.rsi and create basic components
* Add disposal nets
* Add pushing entities along the disposal network
* Add disposal unit
* Unregister disposable component
* Add flush and selfinsert verbs to disposal unit
* Add gradual disposals movement
* Fix being able to walk through space for a while after exiting disposals
* Multiply disposals speed by 10
And fix early returns when moving an entity
* Rename Disposable component to InDisposals
* Remove DisposalNet and add on anchor events
* Remove anchored events, moved to interfaces
* Code cleanup
* Fix adjacent tubes' connections when a tube connects
* Fix jittery movement in disposals
* Remove Logger.Debug call
* Move disposals updates to InDisposalsComponent
* Fix adjacent connection valid directions check
* Disposal tubes now throw you out where they are facing
* Add disposal unit exit cooldown
* Set different disposal pipe sprite state depending on anchored value
* Add recycler
* Add recycler animation
* Add bloody texture to the recycler when grinding a living being
* Add PowerDevice component to the disposal unit
* Made the Recycler center on the grid
* Add disposal junction
* Add picking a random direction if junction is entered from the output side
* Add disposal flush and clang sounds
Taken from VGStation
* Move disposal flush and clang sound file names to exposedata
* Add disposalsmap.yml to test with
* Add summaries to DisposalUnit fields
* Add sideDegrees yaml property to disposal junctions
* Fix outdated usings
* Add conveyor resources
* Update RobustToolbox
* More merge fixes
Add conveyor collision masks
* Add ConveyorComponent
* Fix crash when reentering a body
* Merge branch 'master' into disposals-1147
* Reduce recycler bounds, set hard to false, add summary and expose "safe" to yaml
* Move IAnchored and IUnAnchored to AnchorableComponent
* Update power components and remove old disposals map
* Remove redundant sprite layers
* Add tile pry command
* Fix tilepry command
* Fix DisposalJunctionComponent missing a component reference
* Add anchor by radius command
* Add Y-Junctions
* Add disposal bend
* Add unanchor command
* Change DisposalJunction prototypes to specify their angles
* Fix disposal units being hidden below the floor
* Removed IAnhored and IUnAnchored interfaces
* Replace CanBeNull annotation with nullable reference types
* Update showwires command
* Add recycler recycling items
* Added angle and speed properties to ConveyorComponent
* Fix conveyort textures
* Add animation to the disposal unit
* Fix anchor and unanchor commands sometimes not finding any entities
* Fix not reading flush_time from disposal unit prototype
* Fix merge conflict wrong using
* Fix disposal, recycling and conveyor texture paths
Delete diverters
* Update visualizer names
* Add DisposableComponent, change drag and drop to work with multiple components
Ignoreinsideblocker client side for drag and drops, like on the server
Add more comments
* Add conveyor belts properly moving entities on top
* Anchorr wires
* Change conveyor bounds to 0.49
* Anchor catwalks, airlocks, gravity generators, low walls, wires and windows
* Add starting/stopping conveyors
* Add reversed conveyors
* Add conveyor switches
* Move InDisposalsComponent code to DisposableComponent
* Add ExitVector method to tubes
* Fix not updating tube references when disconnecting one
* Replace IoCManager call with dependency
* Add tubes disconnecting if they move too far apart from one another
* Move disposals action blocking to shared
* Add rotating and flipping pipes
* Make conveyor intersection calculations approximate
* Fix 1% chance of the server crashing when initializing the map
Happens when emergency lockers remove themselves
* Add disposal unit interface
* Make disposal units refuse items if not powered
* Make disposal tubes hide only when anchored
* Make disposal junction arrows visible to mere mortals
* Add disposal tubes breaking
* Add tubeconnections command
* Add missing verb attribute
* Add flipped disposal junction
* Add ids and linking to conveyors and switches
* Add conveyor switch prying and placing
* Add anchoring conveyor switches and refactor placing them
* Add missing serializable attributes from DisposableComponentState
* Make conveyor speed VV ReadWrite
* Change drawdepth of conveyors to FloorObjects
* Make conveyor anchored check consistent
* Remove anchoring interaction from switches
* Add conveyor switch id syncing and move switches slightly when pried
* Make entities in containers not able to be moved by conveyors
* Add conveyor and switches loose textures
* Merge conflict fixes
* Add disposal unit test
* Add flushing test to disposal unit test
* Add disposal unit flush fail test
* Add disposals to the saltern map
* Fix saltern disposal junctions
* Add power checks to the recycler
* Fix disposal unit placement in maintenance closet
* Remove disposal junctions from saltern
* Readd junctions to saltern
* Add the chemmaster to saltern at the request of Ike
* Move the chemistry disposal unit
* Fix casing of disposal flush sound
* More merge conflict fixes
* Fix a compiler warning.
* Remove popup invocation from buckle
* Remove showPopup parameter from InteractionChecks
* Remove unnecessary physics components
Fixes the physics system dying
* Replace PhysicsComponent usages with CollidableComponent
* Update existing code for the new controller system
* Change conveyors to use a VirtualController instead of teleporting the entity
* Remove visualizer 2d suffix and update physics code
* Transition code to new controller system
* Fix shuttles not moving
* Fix throwing
* Fix guns
* Change hands to use physics.Stop() and remove item fumble method
* Add syncing conveyor switches states
* Fix the recycler wanting to be a conveyor too hard
* Fix showwires > showsubfloor rename in mapping command
* Fix wifi air conveyors
* Fix test error
* Add showsubfloorforever command
Changes drawdepth of the relevant entities
* Disable opening the disposal unit interface while inside
* Add closing the disposal unit interface when getting inside
* Add closing the interface when the disposal unit component is removed
* Add removing entities on disposal unit component removal
* Delay disposal unit flush and fix serialization
* Implement pressure in disposal units
* Fix chain engaging a disposal unit
* Implement states to the disposal unit
* Fix missing imports from merge conflict
* Update Content.Server/GameObjects/Components/Conveyor/ConveyorComponent.cs
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Address some reviews
* Fix za buildo
* Use container helper to detach disposables
* Make conveyors use the construction system
* Make conveyor groups and syncing sane
* Make flip flip
brave
* Add activate interface to conveyor switches
* Fix not removing the switch from its group when it's deleted
* Fix not registering conveyors and switches on initialize
* Stop using 0 as null
* Disconnect conveyors and switches when disposing of a group
* Make disposal units not able to be exited when flushing
* Make disposal units flush after a configurable 30 seconds
* Add handle and light layers to the disposal unit
* Merge engaging and flushing
* Update saltern.yml
* I love using 0 as null
* Make disposal unit visual layers make sense
* Remove duplicate remove method in disposal units and update light
* Replace DisposableComponent with disposal holders
* Fix disposal holders deleting their contents on deletion
* Account for disposal unit pressure in tests and make a failed flush autoengage
* Rename disposable to holder
* Fix junction connections
* Disable self insert and flush verbs when inside a disposal unit
* Fix spamming the engage button making the animation reset
* Make the recycler take materials into account properly
Fix cablestack1 not existing
* Merge conflict fixes
* Fix pipes not being saved anchored
* Change conveyors and groups to not use an id
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-07-30 23:45:28 +02:00
|
|
|
|
var component = strap;
|
|
|
|
|
|
bool Ignored(IEntity entity) => entity == Owner || entity == user || entity == component.Owner;
|
2020-07-08 12:54:00 +02:00
|
|
|
|
|
2020-07-19 21:34:35 +02:00
|
|
|
|
if (!interaction.InRangeUnobstructed(ownerPosition, strapPosition, _range, predicate: Ignored))
|
2020-06-25 15:52:24 +02:00
|
|
|
|
{
|
2020-07-19 21:34:35 +02:00
|
|
|
|
_notifyManager.PopupMessage(strap.Owner, user,
|
|
|
|
|
|
Loc.GetString("You can't reach there!"));
|
|
|
|
|
|
|
2020-06-25 15:52:24 +02:00
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-17 10:43:10 +02:00
|
|
|
|
// If in a container
|
2020-07-08 16:10:46 +02:00
|
|
|
|
if (ContainerHelpers.TryGetContainer(Owner, out var ownerContainer))
|
2020-07-08 16:00:04 +02:00
|
|
|
|
{
|
2020-07-17 10:43:10 +02:00
|
|
|
|
// And not in the same container as the strap
|
2020-07-08 16:10:46 +02:00
|
|
|
|
if (!ContainerHelpers.TryGetContainer(strap.Owner, out var strapContainer) ||
|
|
|
|
|
|
ownerContainer != strapContainer)
|
|
|
|
|
|
{
|
Add the trash man (#1367)
* Add disposal.rsi
* Rename disposal resource to disposal.rsi and create basic components
* Add disposal nets
* Add pushing entities along the disposal network
* Add disposal unit
* Unregister disposable component
* Add flush and selfinsert verbs to disposal unit
* Add gradual disposals movement
* Fix being able to walk through space for a while after exiting disposals
* Multiply disposals speed by 10
And fix early returns when moving an entity
* Rename Disposable component to InDisposals
* Remove DisposalNet and add on anchor events
* Remove anchored events, moved to interfaces
* Code cleanup
* Fix adjacent tubes' connections when a tube connects
* Fix jittery movement in disposals
* Remove Logger.Debug call
* Move disposals updates to InDisposalsComponent
* Fix adjacent connection valid directions check
* Disposal tubes now throw you out where they are facing
* Add disposal unit exit cooldown
* Set different disposal pipe sprite state depending on anchored value
* Add recycler
* Add recycler animation
* Add bloody texture to the recycler when grinding a living being
* Add PowerDevice component to the disposal unit
* Made the Recycler center on the grid
* Add disposal junction
* Add picking a random direction if junction is entered from the output side
* Add disposal flush and clang sounds
Taken from VGStation
* Move disposal flush and clang sound file names to exposedata
* Add disposalsmap.yml to test with
* Add summaries to DisposalUnit fields
* Add sideDegrees yaml property to disposal junctions
* Fix outdated usings
* Add conveyor resources
* Update RobustToolbox
* More merge fixes
Add conveyor collision masks
* Add ConveyorComponent
* Fix crash when reentering a body
* Merge branch 'master' into disposals-1147
* Reduce recycler bounds, set hard to false, add summary and expose "safe" to yaml
* Move IAnchored and IUnAnchored to AnchorableComponent
* Update power components and remove old disposals map
* Remove redundant sprite layers
* Add tile pry command
* Fix tilepry command
* Fix DisposalJunctionComponent missing a component reference
* Add anchor by radius command
* Add Y-Junctions
* Add disposal bend
* Add unanchor command
* Change DisposalJunction prototypes to specify their angles
* Fix disposal units being hidden below the floor
* Removed IAnhored and IUnAnchored interfaces
* Replace CanBeNull annotation with nullable reference types
* Update showwires command
* Add recycler recycling items
* Added angle and speed properties to ConveyorComponent
* Fix conveyort textures
* Add animation to the disposal unit
* Fix anchor and unanchor commands sometimes not finding any entities
* Fix not reading flush_time from disposal unit prototype
* Fix merge conflict wrong using
* Fix disposal, recycling and conveyor texture paths
Delete diverters
* Update visualizer names
* Add DisposableComponent, change drag and drop to work with multiple components
Ignoreinsideblocker client side for drag and drops, like on the server
Add more comments
* Add conveyor belts properly moving entities on top
* Anchorr wires
* Change conveyor bounds to 0.49
* Anchor catwalks, airlocks, gravity generators, low walls, wires and windows
* Add starting/stopping conveyors
* Add reversed conveyors
* Add conveyor switches
* Move InDisposalsComponent code to DisposableComponent
* Add ExitVector method to tubes
* Fix not updating tube references when disconnecting one
* Replace IoCManager call with dependency
* Add tubes disconnecting if they move too far apart from one another
* Move disposals action blocking to shared
* Add rotating and flipping pipes
* Make conveyor intersection calculations approximate
* Fix 1% chance of the server crashing when initializing the map
Happens when emergency lockers remove themselves
* Add disposal unit interface
* Make disposal units refuse items if not powered
* Make disposal tubes hide only when anchored
* Make disposal junction arrows visible to mere mortals
* Add disposal tubes breaking
* Add tubeconnections command
* Add missing verb attribute
* Add flipped disposal junction
* Add ids and linking to conveyors and switches
* Add conveyor switch prying and placing
* Add anchoring conveyor switches and refactor placing them
* Add missing serializable attributes from DisposableComponentState
* Make conveyor speed VV ReadWrite
* Change drawdepth of conveyors to FloorObjects
* Make conveyor anchored check consistent
* Remove anchoring interaction from switches
* Add conveyor switch id syncing and move switches slightly when pried
* Make entities in containers not able to be moved by conveyors
* Add conveyor and switches loose textures
* Merge conflict fixes
* Add disposal unit test
* Add flushing test to disposal unit test
* Add disposal unit flush fail test
* Add disposals to the saltern map
* Fix saltern disposal junctions
* Add power checks to the recycler
* Fix disposal unit placement in maintenance closet
* Remove disposal junctions from saltern
* Readd junctions to saltern
* Add the chemmaster to saltern at the request of Ike
* Move the chemistry disposal unit
* Fix casing of disposal flush sound
* More merge conflict fixes
* Fix a compiler warning.
* Remove popup invocation from buckle
* Remove showPopup parameter from InteractionChecks
* Remove unnecessary physics components
Fixes the physics system dying
* Replace PhysicsComponent usages with CollidableComponent
* Update existing code for the new controller system
* Change conveyors to use a VirtualController instead of teleporting the entity
* Remove visualizer 2d suffix and update physics code
* Transition code to new controller system
* Fix shuttles not moving
* Fix throwing
* Fix guns
* Change hands to use physics.Stop() and remove item fumble method
* Add syncing conveyor switches states
* Fix the recycler wanting to be a conveyor too hard
* Fix showwires > showsubfloor rename in mapping command
* Fix wifi air conveyors
* Fix test error
* Add showsubfloorforever command
Changes drawdepth of the relevant entities
* Disable opening the disposal unit interface while inside
* Add closing the disposal unit interface when getting inside
* Add closing the interface when the disposal unit component is removed
* Add removing entities on disposal unit component removal
* Delay disposal unit flush and fix serialization
* Implement pressure in disposal units
* Fix chain engaging a disposal unit
* Implement states to the disposal unit
* Fix missing imports from merge conflict
* Update Content.Server/GameObjects/Components/Conveyor/ConveyorComponent.cs
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Address some reviews
* Fix za buildo
* Use container helper to detach disposables
* Make conveyors use the construction system
* Make conveyor groups and syncing sane
* Make flip flip
brave
* Add activate interface to conveyor switches
* Fix not removing the switch from its group when it's deleted
* Fix not registering conveyors and switches on initialize
* Stop using 0 as null
* Disconnect conveyors and switches when disposing of a group
* Make disposal units not able to be exited when flushing
* Make disposal units flush after a configurable 30 seconds
* Add handle and light layers to the disposal unit
* Merge engaging and flushing
* Update saltern.yml
* I love using 0 as null
* Make disposal unit visual layers make sense
* Remove duplicate remove method in disposal units and update light
* Replace DisposableComponent with disposal holders
* Fix disposal holders deleting their contents on deletion
* Account for disposal unit pressure in tests and make a failed flush autoengage
* Rename disposable to holder
* Fix junction connections
* Disable self insert and flush verbs when inside a disposal unit
* Fix spamming the engage button making the animation reset
* Make the recycler take materials into account properly
Fix cablestack1 not existing
* Merge conflict fixes
* Fix pipes not being saved anchored
* Change conveyors and groups to not use an id
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-07-30 23:45:28 +02:00
|
|
|
|
_notifyManager.PopupMessage(strap.Owner, user, Loc.GetString("You can't reach there!"));
|
|
|
|
|
|
|
2020-07-08 16:10:46 +02:00
|
|
|
|
return false;
|
|
|
|
|
|
}
|
2020-07-08 16:00:04 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-04 13:51:14 +02:00
|
|
|
|
if (!user.HasComponent<HandsComponent>())
|
2020-06-25 15:52:24 +02:00
|
|
|
|
{
|
|
|
|
|
|
_notifyManager.PopupMessage(user, user,
|
|
|
|
|
|
Loc.GetString("You don't have hands!"));
|
Add the trash man (#1367)
* Add disposal.rsi
* Rename disposal resource to disposal.rsi and create basic components
* Add disposal nets
* Add pushing entities along the disposal network
* Add disposal unit
* Unregister disposable component
* Add flush and selfinsert verbs to disposal unit
* Add gradual disposals movement
* Fix being able to walk through space for a while after exiting disposals
* Multiply disposals speed by 10
And fix early returns when moving an entity
* Rename Disposable component to InDisposals
* Remove DisposalNet and add on anchor events
* Remove anchored events, moved to interfaces
* Code cleanup
* Fix adjacent tubes' connections when a tube connects
* Fix jittery movement in disposals
* Remove Logger.Debug call
* Move disposals updates to InDisposalsComponent
* Fix adjacent connection valid directions check
* Disposal tubes now throw you out where they are facing
* Add disposal unit exit cooldown
* Set different disposal pipe sprite state depending on anchored value
* Add recycler
* Add recycler animation
* Add bloody texture to the recycler when grinding a living being
* Add PowerDevice component to the disposal unit
* Made the Recycler center on the grid
* Add disposal junction
* Add picking a random direction if junction is entered from the output side
* Add disposal flush and clang sounds
Taken from VGStation
* Move disposal flush and clang sound file names to exposedata
* Add disposalsmap.yml to test with
* Add summaries to DisposalUnit fields
* Add sideDegrees yaml property to disposal junctions
* Fix outdated usings
* Add conveyor resources
* Update RobustToolbox
* More merge fixes
Add conveyor collision masks
* Add ConveyorComponent
* Fix crash when reentering a body
* Merge branch 'master' into disposals-1147
* Reduce recycler bounds, set hard to false, add summary and expose "safe" to yaml
* Move IAnchored and IUnAnchored to AnchorableComponent
* Update power components and remove old disposals map
* Remove redundant sprite layers
* Add tile pry command
* Fix tilepry command
* Fix DisposalJunctionComponent missing a component reference
* Add anchor by radius command
* Add Y-Junctions
* Add disposal bend
* Add unanchor command
* Change DisposalJunction prototypes to specify their angles
* Fix disposal units being hidden below the floor
* Removed IAnhored and IUnAnchored interfaces
* Replace CanBeNull annotation with nullable reference types
* Update showwires command
* Add recycler recycling items
* Added angle and speed properties to ConveyorComponent
* Fix conveyort textures
* Add animation to the disposal unit
* Fix anchor and unanchor commands sometimes not finding any entities
* Fix not reading flush_time from disposal unit prototype
* Fix merge conflict wrong using
* Fix disposal, recycling and conveyor texture paths
Delete diverters
* Update visualizer names
* Add DisposableComponent, change drag and drop to work with multiple components
Ignoreinsideblocker client side for drag and drops, like on the server
Add more comments
* Add conveyor belts properly moving entities on top
* Anchorr wires
* Change conveyor bounds to 0.49
* Anchor catwalks, airlocks, gravity generators, low walls, wires and windows
* Add starting/stopping conveyors
* Add reversed conveyors
* Add conveyor switches
* Move InDisposalsComponent code to DisposableComponent
* Add ExitVector method to tubes
* Fix not updating tube references when disconnecting one
* Replace IoCManager call with dependency
* Add tubes disconnecting if they move too far apart from one another
* Move disposals action blocking to shared
* Add rotating and flipping pipes
* Make conveyor intersection calculations approximate
* Fix 1% chance of the server crashing when initializing the map
Happens when emergency lockers remove themselves
* Add disposal unit interface
* Make disposal units refuse items if not powered
* Make disposal tubes hide only when anchored
* Make disposal junction arrows visible to mere mortals
* Add disposal tubes breaking
* Add tubeconnections command
* Add missing verb attribute
* Add flipped disposal junction
* Add ids and linking to conveyors and switches
* Add conveyor switch prying and placing
* Add anchoring conveyor switches and refactor placing them
* Add missing serializable attributes from DisposableComponentState
* Make conveyor speed VV ReadWrite
* Change drawdepth of conveyors to FloorObjects
* Make conveyor anchored check consistent
* Remove anchoring interaction from switches
* Add conveyor switch id syncing and move switches slightly when pried
* Make entities in containers not able to be moved by conveyors
* Add conveyor and switches loose textures
* Merge conflict fixes
* Add disposal unit test
* Add flushing test to disposal unit test
* Add disposal unit flush fail test
* Add disposals to the saltern map
* Fix saltern disposal junctions
* Add power checks to the recycler
* Fix disposal unit placement in maintenance closet
* Remove disposal junctions from saltern
* Readd junctions to saltern
* Add the chemmaster to saltern at the request of Ike
* Move the chemistry disposal unit
* Fix casing of disposal flush sound
* More merge conflict fixes
* Fix a compiler warning.
* Remove popup invocation from buckle
* Remove showPopup parameter from InteractionChecks
* Remove unnecessary physics components
Fixes the physics system dying
* Replace PhysicsComponent usages with CollidableComponent
* Update existing code for the new controller system
* Change conveyors to use a VirtualController instead of teleporting the entity
* Remove visualizer 2d suffix and update physics code
* Transition code to new controller system
* Fix shuttles not moving
* Fix throwing
* Fix guns
* Change hands to use physics.Stop() and remove item fumble method
* Add syncing conveyor switches states
* Fix the recycler wanting to be a conveyor too hard
* Fix showwires > showsubfloor rename in mapping command
* Fix wifi air conveyors
* Fix test error
* Add showsubfloorforever command
Changes drawdepth of the relevant entities
* Disable opening the disposal unit interface while inside
* Add closing the disposal unit interface when getting inside
* Add closing the interface when the disposal unit component is removed
* Add removing entities on disposal unit component removal
* Delay disposal unit flush and fix serialization
* Implement pressure in disposal units
* Fix chain engaging a disposal unit
* Implement states to the disposal unit
* Fix missing imports from merge conflict
* Update Content.Server/GameObjects/Components/Conveyor/ConveyorComponent.cs
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Address some reviews
* Fix za buildo
* Use container helper to detach disposables
* Make conveyors use the construction system
* Make conveyor groups and syncing sane
* Make flip flip
brave
* Add activate interface to conveyor switches
* Fix not removing the switch from its group when it's deleted
* Fix not registering conveyors and switches on initialize
* Stop using 0 as null
* Disconnect conveyors and switches when disposing of a group
* Make disposal units not able to be exited when flushing
* Make disposal units flush after a configurable 30 seconds
* Add handle and light layers to the disposal unit
* Merge engaging and flushing
* Update saltern.yml
* I love using 0 as null
* Make disposal unit visual layers make sense
* Remove duplicate remove method in disposal units and update light
* Replace DisposableComponent with disposal holders
* Fix disposal holders deleting their contents on deletion
* Account for disposal unit pressure in tests and make a failed flush autoengage
* Rename disposable to holder
* Fix junction connections
* Disable self insert and flush verbs when inside a disposal unit
* Fix spamming the engage button making the animation reset
* Make the recycler take materials into account properly
Fix cablestack1 not existing
* Merge conflict fixes
* Fix pipes not being saved anchored
* Change conveyors and groups to not use an id
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-07-30 23:45:28 +02:00
|
|
|
|
|
2020-06-25 15:52:24 +02:00
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-02 23:36:06 +02:00
|
|
|
|
if (Buckled)
|
2020-06-25 15:52:24 +02:00
|
|
|
|
{
|
|
|
|
|
|
_notifyManager.PopupMessage(Owner, user,
|
|
|
|
|
|
Loc.GetString(Owner == user
|
|
|
|
|
|
? "You are already buckled in!"
|
|
|
|
|
|
: "{0:They} are already buckled in!", Owner));
|
Add the trash man (#1367)
* Add disposal.rsi
* Rename disposal resource to disposal.rsi and create basic components
* Add disposal nets
* Add pushing entities along the disposal network
* Add disposal unit
* Unregister disposable component
* Add flush and selfinsert verbs to disposal unit
* Add gradual disposals movement
* Fix being able to walk through space for a while after exiting disposals
* Multiply disposals speed by 10
And fix early returns when moving an entity
* Rename Disposable component to InDisposals
* Remove DisposalNet and add on anchor events
* Remove anchored events, moved to interfaces
* Code cleanup
* Fix adjacent tubes' connections when a tube connects
* Fix jittery movement in disposals
* Remove Logger.Debug call
* Move disposals updates to InDisposalsComponent
* Fix adjacent connection valid directions check
* Disposal tubes now throw you out where they are facing
* Add disposal unit exit cooldown
* Set different disposal pipe sprite state depending on anchored value
* Add recycler
* Add recycler animation
* Add bloody texture to the recycler when grinding a living being
* Add PowerDevice component to the disposal unit
* Made the Recycler center on the grid
* Add disposal junction
* Add picking a random direction if junction is entered from the output side
* Add disposal flush and clang sounds
Taken from VGStation
* Move disposal flush and clang sound file names to exposedata
* Add disposalsmap.yml to test with
* Add summaries to DisposalUnit fields
* Add sideDegrees yaml property to disposal junctions
* Fix outdated usings
* Add conveyor resources
* Update RobustToolbox
* More merge fixes
Add conveyor collision masks
* Add ConveyorComponent
* Fix crash when reentering a body
* Merge branch 'master' into disposals-1147
* Reduce recycler bounds, set hard to false, add summary and expose "safe" to yaml
* Move IAnchored and IUnAnchored to AnchorableComponent
* Update power components and remove old disposals map
* Remove redundant sprite layers
* Add tile pry command
* Fix tilepry command
* Fix DisposalJunctionComponent missing a component reference
* Add anchor by radius command
* Add Y-Junctions
* Add disposal bend
* Add unanchor command
* Change DisposalJunction prototypes to specify their angles
* Fix disposal units being hidden below the floor
* Removed IAnhored and IUnAnchored interfaces
* Replace CanBeNull annotation with nullable reference types
* Update showwires command
* Add recycler recycling items
* Added angle and speed properties to ConveyorComponent
* Fix conveyort textures
* Add animation to the disposal unit
* Fix anchor and unanchor commands sometimes not finding any entities
* Fix not reading flush_time from disposal unit prototype
* Fix merge conflict wrong using
* Fix disposal, recycling and conveyor texture paths
Delete diverters
* Update visualizer names
* Add DisposableComponent, change drag and drop to work with multiple components
Ignoreinsideblocker client side for drag and drops, like on the server
Add more comments
* Add conveyor belts properly moving entities on top
* Anchorr wires
* Change conveyor bounds to 0.49
* Anchor catwalks, airlocks, gravity generators, low walls, wires and windows
* Add starting/stopping conveyors
* Add reversed conveyors
* Add conveyor switches
* Move InDisposalsComponent code to DisposableComponent
* Add ExitVector method to tubes
* Fix not updating tube references when disconnecting one
* Replace IoCManager call with dependency
* Add tubes disconnecting if they move too far apart from one another
* Move disposals action blocking to shared
* Add rotating and flipping pipes
* Make conveyor intersection calculations approximate
* Fix 1% chance of the server crashing when initializing the map
Happens when emergency lockers remove themselves
* Add disposal unit interface
* Make disposal units refuse items if not powered
* Make disposal tubes hide only when anchored
* Make disposal junction arrows visible to mere mortals
* Add disposal tubes breaking
* Add tubeconnections command
* Add missing verb attribute
* Add flipped disposal junction
* Add ids and linking to conveyors and switches
* Add conveyor switch prying and placing
* Add anchoring conveyor switches and refactor placing them
* Add missing serializable attributes from DisposableComponentState
* Make conveyor speed VV ReadWrite
* Change drawdepth of conveyors to FloorObjects
* Make conveyor anchored check consistent
* Remove anchoring interaction from switches
* Add conveyor switch id syncing and move switches slightly when pried
* Make entities in containers not able to be moved by conveyors
* Add conveyor and switches loose textures
* Merge conflict fixes
* Add disposal unit test
* Add flushing test to disposal unit test
* Add disposal unit flush fail test
* Add disposals to the saltern map
* Fix saltern disposal junctions
* Add power checks to the recycler
* Fix disposal unit placement in maintenance closet
* Remove disposal junctions from saltern
* Readd junctions to saltern
* Add the chemmaster to saltern at the request of Ike
* Move the chemistry disposal unit
* Fix casing of disposal flush sound
* More merge conflict fixes
* Fix a compiler warning.
* Remove popup invocation from buckle
* Remove showPopup parameter from InteractionChecks
* Remove unnecessary physics components
Fixes the physics system dying
* Replace PhysicsComponent usages with CollidableComponent
* Update existing code for the new controller system
* Change conveyors to use a VirtualController instead of teleporting the entity
* Remove visualizer 2d suffix and update physics code
* Transition code to new controller system
* Fix shuttles not moving
* Fix throwing
* Fix guns
* Change hands to use physics.Stop() and remove item fumble method
* Add syncing conveyor switches states
* Fix the recycler wanting to be a conveyor too hard
* Fix showwires > showsubfloor rename in mapping command
* Fix wifi air conveyors
* Fix test error
* Add showsubfloorforever command
Changes drawdepth of the relevant entities
* Disable opening the disposal unit interface while inside
* Add closing the disposal unit interface when getting inside
* Add closing the interface when the disposal unit component is removed
* Add removing entities on disposal unit component removal
* Delay disposal unit flush and fix serialization
* Implement pressure in disposal units
* Fix chain engaging a disposal unit
* Implement states to the disposal unit
* Fix missing imports from merge conflict
* Update Content.Server/GameObjects/Components/Conveyor/ConveyorComponent.cs
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Address some reviews
* Fix za buildo
* Use container helper to detach disposables
* Make conveyors use the construction system
* Make conveyor groups and syncing sane
* Make flip flip
brave
* Add activate interface to conveyor switches
* Fix not removing the switch from its group when it's deleted
* Fix not registering conveyors and switches on initialize
* Stop using 0 as null
* Disconnect conveyors and switches when disposing of a group
* Make disposal units not able to be exited when flushing
* Make disposal units flush after a configurable 30 seconds
* Add handle and light layers to the disposal unit
* Merge engaging and flushing
* Update saltern.yml
* I love using 0 as null
* Make disposal unit visual layers make sense
* Remove duplicate remove method in disposal units and update light
* Replace DisposableComponent with disposal holders
* Fix disposal holders deleting their contents on deletion
* Account for disposal unit pressure in tests and make a failed flush autoengage
* Rename disposable to holder
* Fix junction connections
* Disable self insert and flush verbs when inside a disposal unit
* Fix spamming the engage button making the animation reset
* Make the recycler take materials into account properly
Fix cablestack1 not existing
* Merge conflict fixes
* Fix pipes not being saved anchored
* Change conveyors and groups to not use an id
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-07-30 23:45:28 +02:00
|
|
|
|
|
2020-06-25 15:52:24 +02:00
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var parent = to.Transform.Parent;
|
|
|
|
|
|
while (parent != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (parent == user.Transform)
|
|
|
|
|
|
{
|
|
|
|
|
|
_notifyManager.PopupMessage(Owner, user,
|
|
|
|
|
|
Loc.GetString(Owner == user
|
|
|
|
|
|
? "You can't buckle yourself there!"
|
|
|
|
|
|
: "You can't buckle {0:them} there!", Owner));
|
Add the trash man (#1367)
* Add disposal.rsi
* Rename disposal resource to disposal.rsi and create basic components
* Add disposal nets
* Add pushing entities along the disposal network
* Add disposal unit
* Unregister disposable component
* Add flush and selfinsert verbs to disposal unit
* Add gradual disposals movement
* Fix being able to walk through space for a while after exiting disposals
* Multiply disposals speed by 10
And fix early returns when moving an entity
* Rename Disposable component to InDisposals
* Remove DisposalNet and add on anchor events
* Remove anchored events, moved to interfaces
* Code cleanup
* Fix adjacent tubes' connections when a tube connects
* Fix jittery movement in disposals
* Remove Logger.Debug call
* Move disposals updates to InDisposalsComponent
* Fix adjacent connection valid directions check
* Disposal tubes now throw you out where they are facing
* Add disposal unit exit cooldown
* Set different disposal pipe sprite state depending on anchored value
* Add recycler
* Add recycler animation
* Add bloody texture to the recycler when grinding a living being
* Add PowerDevice component to the disposal unit
* Made the Recycler center on the grid
* Add disposal junction
* Add picking a random direction if junction is entered from the output side
* Add disposal flush and clang sounds
Taken from VGStation
* Move disposal flush and clang sound file names to exposedata
* Add disposalsmap.yml to test with
* Add summaries to DisposalUnit fields
* Add sideDegrees yaml property to disposal junctions
* Fix outdated usings
* Add conveyor resources
* Update RobustToolbox
* More merge fixes
Add conveyor collision masks
* Add ConveyorComponent
* Fix crash when reentering a body
* Merge branch 'master' into disposals-1147
* Reduce recycler bounds, set hard to false, add summary and expose "safe" to yaml
* Move IAnchored and IUnAnchored to AnchorableComponent
* Update power components and remove old disposals map
* Remove redundant sprite layers
* Add tile pry command
* Fix tilepry command
* Fix DisposalJunctionComponent missing a component reference
* Add anchor by radius command
* Add Y-Junctions
* Add disposal bend
* Add unanchor command
* Change DisposalJunction prototypes to specify their angles
* Fix disposal units being hidden below the floor
* Removed IAnhored and IUnAnchored interfaces
* Replace CanBeNull annotation with nullable reference types
* Update showwires command
* Add recycler recycling items
* Added angle and speed properties to ConveyorComponent
* Fix conveyort textures
* Add animation to the disposal unit
* Fix anchor and unanchor commands sometimes not finding any entities
* Fix not reading flush_time from disposal unit prototype
* Fix merge conflict wrong using
* Fix disposal, recycling and conveyor texture paths
Delete diverters
* Update visualizer names
* Add DisposableComponent, change drag and drop to work with multiple components
Ignoreinsideblocker client side for drag and drops, like on the server
Add more comments
* Add conveyor belts properly moving entities on top
* Anchorr wires
* Change conveyor bounds to 0.49
* Anchor catwalks, airlocks, gravity generators, low walls, wires and windows
* Add starting/stopping conveyors
* Add reversed conveyors
* Add conveyor switches
* Move InDisposalsComponent code to DisposableComponent
* Add ExitVector method to tubes
* Fix not updating tube references when disconnecting one
* Replace IoCManager call with dependency
* Add tubes disconnecting if they move too far apart from one another
* Move disposals action blocking to shared
* Add rotating and flipping pipes
* Make conveyor intersection calculations approximate
* Fix 1% chance of the server crashing when initializing the map
Happens when emergency lockers remove themselves
* Add disposal unit interface
* Make disposal units refuse items if not powered
* Make disposal tubes hide only when anchored
* Make disposal junction arrows visible to mere mortals
* Add disposal tubes breaking
* Add tubeconnections command
* Add missing verb attribute
* Add flipped disposal junction
* Add ids and linking to conveyors and switches
* Add conveyor switch prying and placing
* Add anchoring conveyor switches and refactor placing them
* Add missing serializable attributes from DisposableComponentState
* Make conveyor speed VV ReadWrite
* Change drawdepth of conveyors to FloorObjects
* Make conveyor anchored check consistent
* Remove anchoring interaction from switches
* Add conveyor switch id syncing and move switches slightly when pried
* Make entities in containers not able to be moved by conveyors
* Add conveyor and switches loose textures
* Merge conflict fixes
* Add disposal unit test
* Add flushing test to disposal unit test
* Add disposal unit flush fail test
* Add disposals to the saltern map
* Fix saltern disposal junctions
* Add power checks to the recycler
* Fix disposal unit placement in maintenance closet
* Remove disposal junctions from saltern
* Readd junctions to saltern
* Add the chemmaster to saltern at the request of Ike
* Move the chemistry disposal unit
* Fix casing of disposal flush sound
* More merge conflict fixes
* Fix a compiler warning.
* Remove popup invocation from buckle
* Remove showPopup parameter from InteractionChecks
* Remove unnecessary physics components
Fixes the physics system dying
* Replace PhysicsComponent usages with CollidableComponent
* Update existing code for the new controller system
* Change conveyors to use a VirtualController instead of teleporting the entity
* Remove visualizer 2d suffix and update physics code
* Transition code to new controller system
* Fix shuttles not moving
* Fix throwing
* Fix guns
* Change hands to use physics.Stop() and remove item fumble method
* Add syncing conveyor switches states
* Fix the recycler wanting to be a conveyor too hard
* Fix showwires > showsubfloor rename in mapping command
* Fix wifi air conveyors
* Fix test error
* Add showsubfloorforever command
Changes drawdepth of the relevant entities
* Disable opening the disposal unit interface while inside
* Add closing the disposal unit interface when getting inside
* Add closing the interface when the disposal unit component is removed
* Add removing entities on disposal unit component removal
* Delay disposal unit flush and fix serialization
* Implement pressure in disposal units
* Fix chain engaging a disposal unit
* Implement states to the disposal unit
* Fix missing imports from merge conflict
* Update Content.Server/GameObjects/Components/Conveyor/ConveyorComponent.cs
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Address some reviews
* Fix za buildo
* Use container helper to detach disposables
* Make conveyors use the construction system
* Make conveyor groups and syncing sane
* Make flip flip
brave
* Add activate interface to conveyor switches
* Fix not removing the switch from its group when it's deleted
* Fix not registering conveyors and switches on initialize
* Stop using 0 as null
* Disconnect conveyors and switches when disposing of a group
* Make disposal units not able to be exited when flushing
* Make disposal units flush after a configurable 30 seconds
* Add handle and light layers to the disposal unit
* Merge engaging and flushing
* Update saltern.yml
* I love using 0 as null
* Make disposal unit visual layers make sense
* Remove duplicate remove method in disposal units and update light
* Replace DisposableComponent with disposal holders
* Fix disposal holders deleting their contents on deletion
* Account for disposal unit pressure in tests and make a failed flush autoengage
* Rename disposable to holder
* Fix junction connections
* Disable self insert and flush verbs when inside a disposal unit
* Fix spamming the engage button making the animation reset
* Make the recycler take materials into account properly
Fix cablestack1 not existing
* Merge conflict fixes
* Fix pipes not being saved anchored
* Change conveyors and groups to not use an id
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-07-30 23:45:28 +02:00
|
|
|
|
|
2020-06-25 15:52:24 +02:00
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
parent = parent.Parent;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!strap.HasSpace(this))
|
|
|
|
|
|
{
|
|
|
|
|
|
_notifyManager.PopupMessage(Owner, user,
|
|
|
|
|
|
Loc.GetString(Owner == user
|
|
|
|
|
|
? "You can't fit there!"
|
|
|
|
|
|
: "{0:They} can't fit there!", Owner));
|
Add the trash man (#1367)
* Add disposal.rsi
* Rename disposal resource to disposal.rsi and create basic components
* Add disposal nets
* Add pushing entities along the disposal network
* Add disposal unit
* Unregister disposable component
* Add flush and selfinsert verbs to disposal unit
* Add gradual disposals movement
* Fix being able to walk through space for a while after exiting disposals
* Multiply disposals speed by 10
And fix early returns when moving an entity
* Rename Disposable component to InDisposals
* Remove DisposalNet and add on anchor events
* Remove anchored events, moved to interfaces
* Code cleanup
* Fix adjacent tubes' connections when a tube connects
* Fix jittery movement in disposals
* Remove Logger.Debug call
* Move disposals updates to InDisposalsComponent
* Fix adjacent connection valid directions check
* Disposal tubes now throw you out where they are facing
* Add disposal unit exit cooldown
* Set different disposal pipe sprite state depending on anchored value
* Add recycler
* Add recycler animation
* Add bloody texture to the recycler when grinding a living being
* Add PowerDevice component to the disposal unit
* Made the Recycler center on the grid
* Add disposal junction
* Add picking a random direction if junction is entered from the output side
* Add disposal flush and clang sounds
Taken from VGStation
* Move disposal flush and clang sound file names to exposedata
* Add disposalsmap.yml to test with
* Add summaries to DisposalUnit fields
* Add sideDegrees yaml property to disposal junctions
* Fix outdated usings
* Add conveyor resources
* Update RobustToolbox
* More merge fixes
Add conveyor collision masks
* Add ConveyorComponent
* Fix crash when reentering a body
* Merge branch 'master' into disposals-1147
* Reduce recycler bounds, set hard to false, add summary and expose "safe" to yaml
* Move IAnchored and IUnAnchored to AnchorableComponent
* Update power components and remove old disposals map
* Remove redundant sprite layers
* Add tile pry command
* Fix tilepry command
* Fix DisposalJunctionComponent missing a component reference
* Add anchor by radius command
* Add Y-Junctions
* Add disposal bend
* Add unanchor command
* Change DisposalJunction prototypes to specify their angles
* Fix disposal units being hidden below the floor
* Removed IAnhored and IUnAnchored interfaces
* Replace CanBeNull annotation with nullable reference types
* Update showwires command
* Add recycler recycling items
* Added angle and speed properties to ConveyorComponent
* Fix conveyort textures
* Add animation to the disposal unit
* Fix anchor and unanchor commands sometimes not finding any entities
* Fix not reading flush_time from disposal unit prototype
* Fix merge conflict wrong using
* Fix disposal, recycling and conveyor texture paths
Delete diverters
* Update visualizer names
* Add DisposableComponent, change drag and drop to work with multiple components
Ignoreinsideblocker client side for drag and drops, like on the server
Add more comments
* Add conveyor belts properly moving entities on top
* Anchorr wires
* Change conveyor bounds to 0.49
* Anchor catwalks, airlocks, gravity generators, low walls, wires and windows
* Add starting/stopping conveyors
* Add reversed conveyors
* Add conveyor switches
* Move InDisposalsComponent code to DisposableComponent
* Add ExitVector method to tubes
* Fix not updating tube references when disconnecting one
* Replace IoCManager call with dependency
* Add tubes disconnecting if they move too far apart from one another
* Move disposals action blocking to shared
* Add rotating and flipping pipes
* Make conveyor intersection calculations approximate
* Fix 1% chance of the server crashing when initializing the map
Happens when emergency lockers remove themselves
* Add disposal unit interface
* Make disposal units refuse items if not powered
* Make disposal tubes hide only when anchored
* Make disposal junction arrows visible to mere mortals
* Add disposal tubes breaking
* Add tubeconnections command
* Add missing verb attribute
* Add flipped disposal junction
* Add ids and linking to conveyors and switches
* Add conveyor switch prying and placing
* Add anchoring conveyor switches and refactor placing them
* Add missing serializable attributes from DisposableComponentState
* Make conveyor speed VV ReadWrite
* Change drawdepth of conveyors to FloorObjects
* Make conveyor anchored check consistent
* Remove anchoring interaction from switches
* Add conveyor switch id syncing and move switches slightly when pried
* Make entities in containers not able to be moved by conveyors
* Add conveyor and switches loose textures
* Merge conflict fixes
* Add disposal unit test
* Add flushing test to disposal unit test
* Add disposal unit flush fail test
* Add disposals to the saltern map
* Fix saltern disposal junctions
* Add power checks to the recycler
* Fix disposal unit placement in maintenance closet
* Remove disposal junctions from saltern
* Readd junctions to saltern
* Add the chemmaster to saltern at the request of Ike
* Move the chemistry disposal unit
* Fix casing of disposal flush sound
* More merge conflict fixes
* Fix a compiler warning.
* Remove popup invocation from buckle
* Remove showPopup parameter from InteractionChecks
* Remove unnecessary physics components
Fixes the physics system dying
* Replace PhysicsComponent usages with CollidableComponent
* Update existing code for the new controller system
* Change conveyors to use a VirtualController instead of teleporting the entity
* Remove visualizer 2d suffix and update physics code
* Transition code to new controller system
* Fix shuttles not moving
* Fix throwing
* Fix guns
* Change hands to use physics.Stop() and remove item fumble method
* Add syncing conveyor switches states
* Fix the recycler wanting to be a conveyor too hard
* Fix showwires > showsubfloor rename in mapping command
* Fix wifi air conveyors
* Fix test error
* Add showsubfloorforever command
Changes drawdepth of the relevant entities
* Disable opening the disposal unit interface while inside
* Add closing the disposal unit interface when getting inside
* Add closing the interface when the disposal unit component is removed
* Add removing entities on disposal unit component removal
* Delay disposal unit flush and fix serialization
* Implement pressure in disposal units
* Fix chain engaging a disposal unit
* Implement states to the disposal unit
* Fix missing imports from merge conflict
* Update Content.Server/GameObjects/Components/Conveyor/ConveyorComponent.cs
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Address some reviews
* Fix za buildo
* Use container helper to detach disposables
* Make conveyors use the construction system
* Make conveyor groups and syncing sane
* Make flip flip
brave
* Add activate interface to conveyor switches
* Fix not removing the switch from its group when it's deleted
* Fix not registering conveyors and switches on initialize
* Stop using 0 as null
* Disconnect conveyors and switches when disposing of a group
* Make disposal units not able to be exited when flushing
* Make disposal units flush after a configurable 30 seconds
* Add handle and light layers to the disposal unit
* Merge engaging and flushing
* Update saltern.yml
* I love using 0 as null
* Make disposal unit visual layers make sense
* Remove duplicate remove method in disposal units and update light
* Replace DisposableComponent with disposal holders
* Fix disposal holders deleting their contents on deletion
* Account for disposal unit pressure in tests and make a failed flush autoengage
* Rename disposable to holder
* Fix junction connections
* Disable self insert and flush verbs when inside a disposal unit
* Fix spamming the engage button making the animation reset
* Make the recycler take materials into account properly
Fix cablestack1 not existing
* Merge conflict fixes
* Fix pipes not being saved anchored
* Change conveyors and groups to not use an id
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-07-30 23:45:28 +02:00
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Tries to make an entity buckle the owner of this component to another.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="user">
|
|
|
|
|
|
/// The entity buckling the owner of this component, can be the owner itself.
|
|
|
|
|
|
/// </param>
|
|
|
|
|
|
/// <param name="to">The entity to buckle the owner of this component to.</param>
|
|
|
|
|
|
/// <returns>
|
|
|
|
|
|
/// true if the owner was buckled, otherwise false even if the owner was
|
|
|
|
|
|
/// previously already buckled.
|
|
|
|
|
|
/// </returns>
|
|
|
|
|
|
public bool TryBuckle(IEntity user, IEntity to)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!CanBuckle(user, to, out var strap))
|
|
|
|
|
|
{
|
2020-06-25 15:52:24 +02:00
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_entitySystem.GetEntitySystem<AudioSystem>()
|
|
|
|
|
|
.PlayFromEntity(strap.BuckleSound, Owner);
|
|
|
|
|
|
|
|
|
|
|
|
if (!strap.TryAdd(this))
|
|
|
|
|
|
{
|
|
|
|
|
|
_notifyManager.PopupMessage(Owner, user,
|
|
|
|
|
|
Loc.GetString(Owner == user
|
|
|
|
|
|
? "You can't buckle yourself there!"
|
|
|
|
|
|
: "You can't buckle {0:them} there!", Owner));
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-08-20 16:48:00 +02:00
|
|
|
|
if (Owner.TryGetComponent(out AppearanceComponent? appearance))
|
2020-06-25 15:52:24 +02:00
|
|
|
|
{
|
|
|
|
|
|
appearance.SetData(BuckleVisuals.Buckled, true);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-04 13:44:32 +02:00
|
|
|
|
BuckledTo = strap;
|
2020-07-24 14:22:28 +02:00
|
|
|
|
|
|
|
|
|
|
ReAttach(strap);
|
2020-06-25 15:52:24 +02:00
|
|
|
|
BuckleStatus();
|
|
|
|
|
|
|
2020-07-26 12:12:53 +02:00
|
|
|
|
SendMessage(new BuckleMessage(Owner, to));
|
|
|
|
|
|
|
2020-07-28 08:37:03 +02:00
|
|
|
|
Owner.EntityManager.EventBus.SubscribeEvent<MoveEvent>(EventSource.Local, this, MoveEvent);
|
|
|
|
|
|
|
2020-06-25 15:52:24 +02:00
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-17 10:43:10 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Tries to unbuckle the Owner of this component from its current strap.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="user">The entity doing the unbuckling.</param>
|
|
|
|
|
|
/// <param name="force">
|
|
|
|
|
|
/// Whether to force the unbuckling or not. Does not guarantee true to
|
|
|
|
|
|
/// be returned, but guarantees the owner to be unbuckled afterwards.
|
|
|
|
|
|
/// </param>
|
|
|
|
|
|
/// <returns>
|
|
|
|
|
|
/// true if the owner was unbuckled, otherwise false even if the owner
|
|
|
|
|
|
/// was previously already unbuckled.
|
|
|
|
|
|
/// </returns>
|
2020-06-25 15:52:24 +02:00
|
|
|
|
public bool TryUnbuckle(IEntity user, bool force = false)
|
|
|
|
|
|
{
|
2020-07-28 08:34:42 +02:00
|
|
|
|
if (!Buckled)
|
2020-06-25 15:52:24 +02:00
|
|
|
|
{
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-28 08:34:42 +02:00
|
|
|
|
StrapComponent oldBuckledTo = BuckledTo!;
|
|
|
|
|
|
|
2020-06-25 15:52:24 +02:00
|
|
|
|
if (!force)
|
|
|
|
|
|
{
|
2020-07-08 13:22:14 +02:00
|
|
|
|
if (_gameTiming.CurTime < _buckleTime + _unbuckleDelay)
|
|
|
|
|
|
{
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-06-25 15:52:24 +02:00
|
|
|
|
if (!ActionBlockerSystem.CanInteract(user))
|
|
|
|
|
|
{
|
|
|
|
|
|
_notifyManager.PopupMessage(user, user,
|
|
|
|
|
|
Loc.GetString("You can't do that!"));
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var strapPosition = Owner.Transform.MapPosition;
|
|
|
|
|
|
|
2020-07-08 12:54:00 +02:00
|
|
|
|
if (!InteractionChecks.InRangeUnobstructed(user, strapPosition, _range))
|
2020-06-25 15:52:24 +02:00
|
|
|
|
{
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-28 08:34:42 +02:00
|
|
|
|
BuckledTo = null;
|
|
|
|
|
|
|
|
|
|
|
|
if (Owner.Transform.Parent == oldBuckledTo.Owner.Transform)
|
2020-07-04 14:10:37 +02:00
|
|
|
|
{
|
2020-07-25 16:43:40 -07:00
|
|
|
|
ContainerHelpers.AttachParentToContainerOrGrid(Owner.Transform);
|
2020-07-28 08:34:42 +02:00
|
|
|
|
Owner.Transform.WorldRotation = oldBuckledTo.Owner.Transform.WorldRotation;
|
2020-07-04 14:10:37 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2020-08-20 16:48:00 +02:00
|
|
|
|
if (Owner.TryGetComponent(out AppearanceComponent? appearance))
|
2020-06-25 15:52:24 +02:00
|
|
|
|
{
|
|
|
|
|
|
appearance.SetData(BuckleVisuals.Buckled, false);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-08-20 16:48:00 +02:00
|
|
|
|
if (Owner.TryGetComponent(out StunnableComponent? stunnable) && stunnable.KnockedDown)
|
2020-06-25 15:52:24 +02:00
|
|
|
|
{
|
|
|
|
|
|
StandingStateHelper.Down(Owner);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
StandingStateHelper.Standing(Owner);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-08-20 16:48:00 +02:00
|
|
|
|
if (Owner.TryGetComponent(out MobStateManagerComponent? stateManager))
|
2020-06-25 15:52:24 +02:00
|
|
|
|
{
|
Bodysystem and damagesystem rework (#1544)
* Things and stuff with grids, unfinished w/ code debug changes.
* Updated submodule and also lost some progress cause I fucked it up xd
* First unfinished draft of the BodySystem. Doesn't compile.
* More changes to make it compile, but still just a framework. Doesn't do anything at the moment.
* Many cleanup changes.
* Revert "Merge branch 'master' of https://github.com/GlassEclipse/space-station-14 into body_system"
This reverts commit ddd4aebbc76cf2a0b7b102f72b93d55a0816c88c, reversing
changes made to 12d0dd752706bdda8879393bd8191a1199a0c978.
* Commit human.yml
* Updated a lot of things to be more classy, more progress overall, etc. etc.
* Latest update with many changes
* Minor changes
* Fixed Travis build bug
* Adds first draft of Body Scanner console, apparently I also forgot to tie Mechanisms into body parts so now a heart just sits in the Torso like a good boy :)
* Commit rest of stuff
* Latest changes
* Latest changes again
* 14 naked cowboys
* Yay!
* Latest changes (probably doesnt compile)
* Surgery!!!!!!!!!~1116y
* Cleaned some stuff up
* More cleanup
* Refactoring of code. Basic surgery path now done.
* Removed readme, has been added to HackMD
* Fixes typo (and thus test errors)
* WIP changes, committing so I can pull latest master changes
* Still working on that god awful merge
* Latest changes
* Latest changes!!
* Beginning of refactor to BoundUserInterface
* Surgery!
* Latest changes - fixes pr change requests and random fixes
* oops
* Fixes bodypart recursion
* Beginning of work on revamping the damage system.
* More latest changes
* Latest changes
* Finished merge
* Commit before removing old healthcode
* Almost done with removing speciescomponent...
* It compiles!!!
* yahoo more work
* Fixes to make it work
* Merge conflict fixes
* Deleting species visualizer was a mistake
* IDE warnings are VERBOTEN
* makes the server not kill itself on startup, some cleanup (#1)
* Namespaces, comments and exception fixes
* Fix conveyor and conveyor switch serialization
SS14 in reactive when
* Move damage, acts and body to shared
Damage cleanup
Comment cleanup
* Rename SpeciesComponent to RotationComponent and cleanup
Damage cleanup
Comment cleanup
* Fix nullable warnings
* Address old reviews
Fix off welder suicide damage type, deathmatch and suspicion
* Fix new test fail with units being able to accept items when unpowered
* Remove RotationComponent, change references to IBodyManagerComponent
* Add a bloodstream to humans
* More cleanups
* Add body conduits, connections, connectors substances and valves
* Revert "Add body conduits, connections, connectors substances and valves"
This reverts commit 9ab0b50e6b15fe98852d7b0836c0cdbf4bd76d20.
* Implement the heart mechanism behavior with the circulatory network
* Added network property to mechanism behaviors
* Changed human organ sprites and added missing ones
* Fix tests
* Add individual body part sprite rendering
* Fix error where dropped mechanisms are not initialized
* Implement client/server body damage
* Make DamageContainer take care of raising events
* Reimplement medical scanner with the new body system
* Improve the medical scanner ui
* Merge conflict fixes
* Fix crash when colliding with something
* Fix microwave suicides and eyes sprite rendering
* Fix nullable reference error
* Fix up surgery client side
* Fix missing using from merge conflict
* Add breathing
*inhale
* Merge conflict fixes
* Fix accumulatedframetime being reset to 0 instead of decreased by the threshold
https://github.com/space-wizards/space-station-14/pull/1617
* Use and add to the new AtmosHelpers
* Fix feet
* Add proper coloring to dropped body parts
* Fix Urist's lungs being too strong
* Merge conflict fixes
* Merge conflict fixes
* Merge conflict fixes
Co-authored-by: GlassEclipse <tsymall5@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com>
2020-08-17 01:42:42 +02:00
|
|
|
|
stateManager.CurrentMobState.EnterState(Owner);
|
2020-06-25 15:52:24 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BuckleStatus();
|
|
|
|
|
|
|
2020-08-20 16:48:00 +02:00
|
|
|
|
if (oldBuckledTo.Owner.TryGetComponent(out StrapComponent? strap))
|
2020-07-26 12:12:53 +02:00
|
|
|
|
{
|
|
|
|
|
|
strap.Remove(this);
|
|
|
|
|
|
_entitySystem.GetEntitySystem<AudioSystem>()
|
|
|
|
|
|
.PlayFromEntity(strap.UnbuckleSound, Owner);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SendMessage(new UnbuckleMessage(Owner, oldBuckledTo.Owner));
|
|
|
|
|
|
|
2020-07-28 08:37:03 +02:00
|
|
|
|
Owner.EntityManager.EventBus.UnsubscribeEvent<MoveEvent>(EventSource.Local, this);
|
|
|
|
|
|
|
2020-06-25 15:52:24 +02:00
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-17 10:43:10 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Makes an entity toggle the buckling status of the owner to a
|
|
|
|
|
|
/// specific entity.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="user">The entity doing the buckling/unbuckling.</param>
|
|
|
|
|
|
/// <param name="to">
|
|
|
|
|
|
/// The entity to toggle the buckle status of the owner to.
|
|
|
|
|
|
/// </param>
|
|
|
|
|
|
/// <param name="force">
|
|
|
|
|
|
/// Whether to force the unbuckling or not, if it happens. Does not
|
|
|
|
|
|
/// guarantee true to be returned, but guarantees the owner to be
|
|
|
|
|
|
/// unbuckled afterwards.
|
|
|
|
|
|
/// </param>
|
|
|
|
|
|
/// <returns>true if the buckling status was changed, false otherwise.</returns>
|
|
|
|
|
|
public bool ToggleBuckle(IEntity user, IEntity to, bool force = false)
|
2020-06-25 15:52:24 +02:00
|
|
|
|
{
|
2020-07-08 13:01:08 +02:00
|
|
|
|
if (BuckledTo?.Owner == to)
|
2020-06-25 15:52:24 +02:00
|
|
|
|
{
|
2020-07-17 10:43:10 +02:00
|
|
|
|
return TryUnbuckle(user, force);
|
2020-06-25 15:52:24 +02:00
|
|
|
|
}
|
2020-07-08 13:01:08 +02:00
|
|
|
|
|
|
|
|
|
|
return TryBuckle(user, to);
|
2020-06-25 15:52:24 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-28 08:37:03 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Checks if a buckled entity should be unbuckled from moving
|
|
|
|
|
|
/// too far from its strap.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="moveEvent">The move event of a buckled entity.</param>
|
|
|
|
|
|
private void MoveEvent(MoveEvent moveEvent)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (moveEvent.Sender != Owner)
|
|
|
|
|
|
{
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (BuckledTo == null || !BuckleOffset.HasValue)
|
|
|
|
|
|
{
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var bucklePosition = BuckledTo.Owner.Transform.GridPosition.Offset(BuckleOffset.Value);
|
|
|
|
|
|
|
|
|
|
|
|
if (moveEvent.NewPosition.InRange(_mapManager, bucklePosition, 0.2f))
|
|
|
|
|
|
{
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Moved = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-17 10:43:10 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Called when the owner is inserted or removed from a container,
|
|
|
|
|
|
/// to synchronize the state of buckling.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="message">The message received</param>
|
2020-07-08 15:30:48 +02:00
|
|
|
|
private void InsertIntoContainer(ContainerModifiedMessage message)
|
2020-07-08 14:45:25 +02:00
|
|
|
|
{
|
|
|
|
|
|
if (message.Entity != Owner)
|
|
|
|
|
|
{
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-08 15:30:48 +02:00
|
|
|
|
ContainerChanged = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-17 10:43:10 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Synchronizes the state of buckling depending on whether the entity
|
|
|
|
|
|
/// was inserted or removed from a container, and whether or not
|
|
|
|
|
|
/// its current strap (if there is one) has also been put into or removed
|
|
|
|
|
|
/// from the same container as well.
|
|
|
|
|
|
/// </summary>
|
2020-07-08 15:30:48 +02:00
|
|
|
|
public void Update()
|
|
|
|
|
|
{
|
2020-07-28 08:37:03 +02:00
|
|
|
|
if (BuckledTo == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (Moved)
|
|
|
|
|
|
{
|
|
|
|
|
|
TryUnbuckle(Owner, true);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!ContainerChanged)
|
2020-07-08 15:30:48 +02:00
|
|
|
|
{
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var contained = ContainerHelpers.TryGetContainer(Owner, out var ownContainer);
|
|
|
|
|
|
var strapContained = ContainerHelpers.TryGetContainer(BuckledTo.Owner, out var strapContainer);
|
|
|
|
|
|
|
|
|
|
|
|
if (contained != strapContained || ownContainer != strapContainer)
|
|
|
|
|
|
{
|
|
|
|
|
|
TryUnbuckle(Owner, true);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!contained && !strapContained)
|
|
|
|
|
|
{
|
|
|
|
|
|
ReAttach(BuckledTo);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ContainerChanged = false;
|
2020-07-08 14:45:25 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2020-06-25 15:52:24 +02:00
|
|
|
|
public override void ExposeData(ObjectSerializer serializer)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.ExposeData(serializer);
|
|
|
|
|
|
|
|
|
|
|
|
serializer.DataField(ref _size, "size", 100);
|
2020-07-19 21:34:35 +02:00
|
|
|
|
serializer.DataField(ref _range, "range", SharedInteractionSystem.InteractionRange / 1.4f);
|
2020-07-08 13:22:14 +02:00
|
|
|
|
|
|
|
|
|
|
var seconds = 0.25f;
|
|
|
|
|
|
serializer.DataField(ref seconds, "cooldown", 0.25f);
|
|
|
|
|
|
|
|
|
|
|
|
_unbuckleDelay = TimeSpan.FromSeconds(seconds);
|
2020-06-25 15:52:24 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-08 14:45:25 +02:00
|
|
|
|
public override void Initialize()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Initialize();
|
|
|
|
|
|
|
|
|
|
|
|
_entityManager.EventBus.SubscribeEvent<EntInsertedIntoContainerMessage>(EventSource.Local, this, InsertIntoContainer);
|
2020-07-08 15:30:48 +02:00
|
|
|
|
_entityManager.EventBus.SubscribeEvent<EntRemovedFromContainerMessage>(EventSource.Local, this, InsertIntoContainer);
|
2020-07-08 14:45:25 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2020-06-25 15:52:24 +02:00
|
|
|
|
protected override void Startup()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Startup();
|
|
|
|
|
|
BuckleStatus();
|
|
|
|
|
|
}
|
2020-07-08 13:22:14 +02:00
|
|
|
|
|
2020-06-25 15:52:24 +02:00
|
|
|
|
public override void OnRemove()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.OnRemove();
|
|
|
|
|
|
|
2020-07-08 14:45:25 +02:00
|
|
|
|
_entityManager.EventBus.UnsubscribeEvents(this);
|
|
|
|
|
|
|
2020-07-04 14:10:37 +02:00
|
|
|
|
if (BuckledTo != null &&
|
2020-08-20 16:48:00 +02:00
|
|
|
|
BuckledTo.Owner.TryGetComponent(out StrapComponent? strap))
|
2020-06-25 15:52:24 +02:00
|
|
|
|
{
|
|
|
|
|
|
strap.Remove(this);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-08 15:30:48 +02:00
|
|
|
|
TryUnbuckle(Owner, true);
|
|
|
|
|
|
|
2020-07-08 13:22:14 +02:00
|
|
|
|
_buckleTime = default;
|
2020-06-25 15:52:24 +02:00
|
|
|
|
BuckleStatus();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-02 23:36:06 +02:00
|
|
|
|
public override ComponentState GetComponentState()
|
2020-06-25 15:52:24 +02:00
|
|
|
|
{
|
2020-07-04 01:28:06 +02:00
|
|
|
|
int? drawDepth = null;
|
|
|
|
|
|
|
|
|
|
|
|
if (BuckledTo != null &&
|
|
|
|
|
|
Owner.Transform.WorldRotation.GetCardinalDir() == Direction.North &&
|
2020-08-20 16:48:00 +02:00
|
|
|
|
BuckledTo.Owner.TryGetComponent(out SpriteComponent? strapSprite))
|
2020-07-04 01:28:06 +02:00
|
|
|
|
{
|
|
|
|
|
|
drawDepth = strapSprite.DrawDepth - 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return new BuckleComponentState(Buckled, drawDepth);
|
2020-06-25 15:52:24 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-02 23:36:06 +02:00
|
|
|
|
bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs)
|
2020-06-25 15:52:24 +02:00
|
|
|
|
{
|
2020-07-02 23:36:06 +02:00
|
|
|
|
return TryUnbuckle(eventArgs.User);
|
2020-06-25 15:52:24 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
Add the trash man (#1367)
* Add disposal.rsi
* Rename disposal resource to disposal.rsi and create basic components
* Add disposal nets
* Add pushing entities along the disposal network
* Add disposal unit
* Unregister disposable component
* Add flush and selfinsert verbs to disposal unit
* Add gradual disposals movement
* Fix being able to walk through space for a while after exiting disposals
* Multiply disposals speed by 10
And fix early returns when moving an entity
* Rename Disposable component to InDisposals
* Remove DisposalNet and add on anchor events
* Remove anchored events, moved to interfaces
* Code cleanup
* Fix adjacent tubes' connections when a tube connects
* Fix jittery movement in disposals
* Remove Logger.Debug call
* Move disposals updates to InDisposalsComponent
* Fix adjacent connection valid directions check
* Disposal tubes now throw you out where they are facing
* Add disposal unit exit cooldown
* Set different disposal pipe sprite state depending on anchored value
* Add recycler
* Add recycler animation
* Add bloody texture to the recycler when grinding a living being
* Add PowerDevice component to the disposal unit
* Made the Recycler center on the grid
* Add disposal junction
* Add picking a random direction if junction is entered from the output side
* Add disposal flush and clang sounds
Taken from VGStation
* Move disposal flush and clang sound file names to exposedata
* Add disposalsmap.yml to test with
* Add summaries to DisposalUnit fields
* Add sideDegrees yaml property to disposal junctions
* Fix outdated usings
* Add conveyor resources
* Update RobustToolbox
* More merge fixes
Add conveyor collision masks
* Add ConveyorComponent
* Fix crash when reentering a body
* Merge branch 'master' into disposals-1147
* Reduce recycler bounds, set hard to false, add summary and expose "safe" to yaml
* Move IAnchored and IUnAnchored to AnchorableComponent
* Update power components and remove old disposals map
* Remove redundant sprite layers
* Add tile pry command
* Fix tilepry command
* Fix DisposalJunctionComponent missing a component reference
* Add anchor by radius command
* Add Y-Junctions
* Add disposal bend
* Add unanchor command
* Change DisposalJunction prototypes to specify their angles
* Fix disposal units being hidden below the floor
* Removed IAnhored and IUnAnchored interfaces
* Replace CanBeNull annotation with nullable reference types
* Update showwires command
* Add recycler recycling items
* Added angle and speed properties to ConveyorComponent
* Fix conveyort textures
* Add animation to the disposal unit
* Fix anchor and unanchor commands sometimes not finding any entities
* Fix not reading flush_time from disposal unit prototype
* Fix merge conflict wrong using
* Fix disposal, recycling and conveyor texture paths
Delete diverters
* Update visualizer names
* Add DisposableComponent, change drag and drop to work with multiple components
Ignoreinsideblocker client side for drag and drops, like on the server
Add more comments
* Add conveyor belts properly moving entities on top
* Anchorr wires
* Change conveyor bounds to 0.49
* Anchor catwalks, airlocks, gravity generators, low walls, wires and windows
* Add starting/stopping conveyors
* Add reversed conveyors
* Add conveyor switches
* Move InDisposalsComponent code to DisposableComponent
* Add ExitVector method to tubes
* Fix not updating tube references when disconnecting one
* Replace IoCManager call with dependency
* Add tubes disconnecting if they move too far apart from one another
* Move disposals action blocking to shared
* Add rotating and flipping pipes
* Make conveyor intersection calculations approximate
* Fix 1% chance of the server crashing when initializing the map
Happens when emergency lockers remove themselves
* Add disposal unit interface
* Make disposal units refuse items if not powered
* Make disposal tubes hide only when anchored
* Make disposal junction arrows visible to mere mortals
* Add disposal tubes breaking
* Add tubeconnections command
* Add missing verb attribute
* Add flipped disposal junction
* Add ids and linking to conveyors and switches
* Add conveyor switch prying and placing
* Add anchoring conveyor switches and refactor placing them
* Add missing serializable attributes from DisposableComponentState
* Make conveyor speed VV ReadWrite
* Change drawdepth of conveyors to FloorObjects
* Make conveyor anchored check consistent
* Remove anchoring interaction from switches
* Add conveyor switch id syncing and move switches slightly when pried
* Make entities in containers not able to be moved by conveyors
* Add conveyor and switches loose textures
* Merge conflict fixes
* Add disposal unit test
* Add flushing test to disposal unit test
* Add disposal unit flush fail test
* Add disposals to the saltern map
* Fix saltern disposal junctions
* Add power checks to the recycler
* Fix disposal unit placement in maintenance closet
* Remove disposal junctions from saltern
* Readd junctions to saltern
* Add the chemmaster to saltern at the request of Ike
* Move the chemistry disposal unit
* Fix casing of disposal flush sound
* More merge conflict fixes
* Fix a compiler warning.
* Remove popup invocation from buckle
* Remove showPopup parameter from InteractionChecks
* Remove unnecessary physics components
Fixes the physics system dying
* Replace PhysicsComponent usages with CollidableComponent
* Update existing code for the new controller system
* Change conveyors to use a VirtualController instead of teleporting the entity
* Remove visualizer 2d suffix and update physics code
* Transition code to new controller system
* Fix shuttles not moving
* Fix throwing
* Fix guns
* Change hands to use physics.Stop() and remove item fumble method
* Add syncing conveyor switches states
* Fix the recycler wanting to be a conveyor too hard
* Fix showwires > showsubfloor rename in mapping command
* Fix wifi air conveyors
* Fix test error
* Add showsubfloorforever command
Changes drawdepth of the relevant entities
* Disable opening the disposal unit interface while inside
* Add closing the disposal unit interface when getting inside
* Add closing the interface when the disposal unit component is removed
* Add removing entities on disposal unit component removal
* Delay disposal unit flush and fix serialization
* Implement pressure in disposal units
* Fix chain engaging a disposal unit
* Implement states to the disposal unit
* Fix missing imports from merge conflict
* Update Content.Server/GameObjects/Components/Conveyor/ConveyorComponent.cs
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Address some reviews
* Fix za buildo
* Use container helper to detach disposables
* Make conveyors use the construction system
* Make conveyor groups and syncing sane
* Make flip flip
brave
* Add activate interface to conveyor switches
* Fix not removing the switch from its group when it's deleted
* Fix not registering conveyors and switches on initialize
* Stop using 0 as null
* Disconnect conveyors and switches when disposing of a group
* Make disposal units not able to be exited when flushing
* Make disposal units flush after a configurable 30 seconds
* Add handle and light layers to the disposal unit
* Merge engaging and flushing
* Update saltern.yml
* I love using 0 as null
* Make disposal unit visual layers make sense
* Remove duplicate remove method in disposal units and update light
* Replace DisposableComponent with disposal holders
* Fix disposal holders deleting their contents on deletion
* Account for disposal unit pressure in tests and make a failed flush autoengage
* Rename disposable to holder
* Fix junction connections
* Disable self insert and flush verbs when inside a disposal unit
* Fix spamming the engage button making the animation reset
* Make the recycler take materials into account properly
Fix cablestack1 not existing
* Merge conflict fixes
* Fix pipes not being saved anchored
* Change conveyors and groups to not use an id
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-07-30 23:45:28 +02:00
|
|
|
|
bool IDragDrop.CanDragDrop(DragDropEventArgs eventArgs)
|
|
|
|
|
|
{
|
|
|
|
|
|
return eventArgs.Target.HasComponent<StrapComponent>();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-07 00:04:30 +02:00
|
|
|
|
bool IDragDrop.DragDrop(DragDropEventArgs eventArgs)
|
|
|
|
|
|
{
|
|
|
|
|
|
return TryBuckle(eventArgs.User, eventArgs.Target);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-17 10:43:10 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Allows the unbuckling of the owning entity through a verb if
|
|
|
|
|
|
/// anyone right clicks them.
|
|
|
|
|
|
/// </summary>
|
2020-06-25 15:52:24 +02:00
|
|
|
|
[Verb]
|
|
|
|
|
|
private sealed class BuckleVerb : Verb<BuckleComponent>
|
|
|
|
|
|
{
|
|
|
|
|
|
protected override void GetData(IEntity user, BuckleComponent component, VerbData data)
|
|
|
|
|
|
{
|
2020-07-02 23:36:06 +02:00
|
|
|
|
if (!ActionBlockerSystem.CanInteract(user) || !component.Buckled)
|
2020-06-25 15:52:24 +02:00
|
|
|
|
{
|
|
|
|
|
|
data.Visibility = VerbVisibility.Invisible;
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
data.Text = Loc.GetString("Unbuckle");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected override void Activate(IEntity user, BuckleComponent component)
|
|
|
|
|
|
{
|
|
|
|
|
|
component.TryUnbuckle(user);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|