Commit Graph

88 Commits

Author SHA1 Message Date
Víctor Aguilera Puerto
d9ae942759 Make InteractUsing async, make tools use DoAfter. (#1772)
* Make IInteractUsing async, make tools use DoAfter.

* Disable warning 1998 in Content.Server

* Update Content.Server/GameObjects/Components/AnchorableComponent.cs
2020-08-18 14:39:08 +02:00
Pieter-Jan Briers
39f13c1849 Merge pull request #1660 from juliangiebel/bug/anchoring-reagent-dispenser 2020-08-17 17:54:21 +02:00
DrSmugleaf
dbeb89a5e5 Fix pulling not stopping when going into a container (#1712) 2020-08-16 18:51:21 +02:00
juliangiebel
ba058ccbdd Add priority sorting to InteractUsing 2020-08-12 23:01:30 +02:00
DrSmugleaf
bda5ce655f 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
DrSmugleaf
e41a6e2589 Fix crash when pulling a potted plant (#1530)
* Fix crash when pulling a potted plant

* Fix being able to pull anchored entities
2020-07-29 14:11:24 +02:00
DrSmugleaf
0a82aba88e Add pulling (#1409)
* Initial framework for pulling.

* Make it possible to pull items via (temporary) keybind Ctrl+Click, make items follow the player correctly.

* Make other objects pullable, implement functionality for moving an object being pulled, make only one object able to be pulled at a time.

* Make sure that MoveTo won't allow collisions with the player

* Update everything to work with the new physics engine

* Update Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs

Co-authored-by: ComicIronic <comicironic@gmail.com>

* Physics update and convert to direct type casts

* Add notnull checks

* Add pull keybinds to the tutorial window

* Move PullController to shared

* Fix pulled items getting left behind

* Fix moving pulled objects into walls

* Remove flooring of coordinates when moving pulled objects

* Add missing null check in PutInHand

* Change pulling keybind to control and throwing to alt

* Change PhysicsComponent references to IPhysicsComponent

* Add trying to pull a pulled entity disabling the pull

* Add pulled status effect

* Fix merge conflicts

* Merge fixes

* Make players pullable

* Fix being able to pull yourself

* Change pull moving to use a velocity

* Update pulled and pulling icons to not be buckle

A tragedy

* Make pulled and pulling icons more consistent

* Remove empty not pulled and not pulling images

* Pulled icon update

* Pulled icon update

* Add clicking pulling status effect to stop the pull

* Fix spacewalking when pulling

* Merge conflict fixes

* Add a pull verb

* Fix nullable error

* Add pulling through the entity drop down menu

Co-authored-by: Jackson Lewis <inquisitivepenguin@protonmail.com>
Co-authored-by: ComicIronic <comicironic@gmail.com>
2020-07-27 00:54:32 +02:00
DrSmugleaf
4b4e83d2bf Add changing the amount of hands on the GUI depending on your body parts (#1406)
* Multiple hands in gui first pass

* Remove IHandsComponent interface

* Create hand class and more hand textures

* Refactor ServerHandsComponent to use a single list of hands

* Seal SharedHand

* Fix picked up items not showing on top of the hand buttons

* Remove HandsGui buttons and panels dictionaries

* Fix items in hands rendering

* Fix wrong hand container comparison

* Fix not updating the location of duplicate hands

* Change ClientHandsComponent to use a SortedList instead of a dictionary

* More merge conflict fixes

* Change SortedList to List

* Fix hand button order

* Add item tooltip for more than 2 hands and updating when removing hands

* Add add hand and remove hand command

* Merge conflict fixes

* Remove nullable reference type from ContainerSlot

* Fix texture errors

* Fix error when reaching 0 hands

* Fix error when swapping hands with no hands

* Merged remove hand methods

* Fix item panel texture errors

* Merge conflict fixes

* Fix addhand and removehand command descriptions

* Add properly displaying tooltips for 2 hands

* Make hand indexes and locations consistent across the client and server

* Add dropping held entity if a hand is removed

* Change hand location to be calculated by index

* Made different hand gui updates more consistent

* Remove human body yml testing changes

* Sanitize addhand and removehand commands

* Merge conflict fixes

* Remove testing changes

* Revert body system changes

* Add missing imports

* Remove obsolete hands parameter in yml files

* Fix broken import

* Fix startup error and adding and removing hands on the same tick

* Make hand container id use an uint

In case someone gets more than 2 billion hands

* Rename hand component files

* Make hands state use an array
2020-07-25 15:11:16 +02:00
Acruid
ea94f4a182 Moved interaction interfaces from Server to Shared. 2020-07-18 22:51:56 -07:00
Acruid
b6b31b7294 Construction Bugfixes (#1329)
* Added: CanReach property to AfterAttack events which signals if the attack was within reach.
Fixed: You cannot construct/deconstruct things out of reach.
Fixed: Construction entities now preserve transform rotation.
Fixed: No more exceptions about missing grids when constructing world entities.
Fixed: Used the proper intermediate sprite for intermediate entities.
Fixed: Issue with missing sprite layers on ghost.

* The alligator is greedy, he always eats the bigger number...

* Adds a check so that you cannot use tools on entities that are obstructed from view.
2020-07-10 16:52:07 -07:00
DrSmugleaf
fb51aecfbf Clean up if check 2020-07-08 15:37:18 +02:00
DrSmugleaf
e0f888344e Add more interaction checks 2020-07-07 01:40:08 +02:00
DrSmugleaf
2fd93091c7 Allow interaction if targeting the containing entity 2020-07-07 01:10:21 +02:00
DrSmugleaf
5901e6e45f Replace InEntityStorageComponent with in container check 2020-07-07 01:00:29 +02:00
chairbender
b35333d366 Click Drag Functionality + Refactor Interaction Interfaces (#1125)
Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
Co-authored-by: ComicIronic <comicironic@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-07-06 23:27:03 +02:00
ShadowCommander
9bf53a4218 Implement unarmed combat 2020-06-21 18:31:56 -07:00
metalgearsloth
5391d3c72a Add utility AI (#806)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-06-18 14:52:44 +02:00
Pieter-Jan Briers
c5f64248c1 Remove interaction system bounding box check. 2020-06-16 16:10:38 +02:00
Víctor Aguilera Puerto
64dd3b0860 Moves SharedInteractionSystem to Content.Shared namespace 2020-06-13 16:10:26 +02:00
chairbender
12f3b6bb7b Use new command binding system supporting multiple bindings (#1043)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-05-31 23:32:05 +02:00
Pieter-Jan Briers
94917a63a6 Fix compiler warnings 2020-05-28 17:44:51 +02:00
zumorica
934e69d6e3 Merge branch 'master' into 2020-04-28-tool-component
# Conflicts:
#	Content.Server/GameObjects/Components/AnchorableComponent.cs
#	Content.Server/GameObjects/Components/Construction/ConstructionComponent.cs
#	Content.Server/GameObjects/Components/Doors/AirlockComponent.cs
#	Content.Server/GameObjects/Components/Gravity/GravityGeneratorComponent.cs
#	Content.Server/GameObjects/Components/Interactable/Tools/CrowbarComponent.cs
#	Content.Server/GameObjects/Components/Power/PowerTransferComponent.cs
#	Content.Server/GameObjects/Components/WiresComponent.cs
2020-05-23 18:00:28 +02:00
Clyybber
1ad9a10050 Fix #274 (#927) 2020-05-23 17:23:25 +02:00
Pieter-Jan Briers
0e8bb178f7 Fixes click-facing giving you NaN rotation if you interact with something at the exact same position as you. 2020-05-23 15:33:01 +02:00
zumorica
3029e31e4a Merge branch 'master' into 2020-04-28-tool-component
# Conflicts:
#	Content.Server/GameObjects/Components/AnchorableComponent.cs
#	Content.Server/GameObjects/Components/Gravity/GravityGeneratorComponent.cs
#	Content.Server/GameObjects/Components/Interactable/Tools/CrowbarComponent.cs
#	Content.Server/GameObjects/Components/Power/PowerTransferComponent.cs
#	Content.Server/GameObjects/Components/WiresComponent.cs
#	Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs
#	Resources/Prototypes/Entities/Items/tools.yml
2020-05-23 12:02:34 +02:00
chairbender
6a4d78cfac Add interaction checks to all interactions (#923) 2020-05-23 11:27:31 +02:00
zumorica
d2d6c2cecd Merge branch 'master' into 2020-04-28-tool-component
# Conflicts:
#	SpaceStation14.sln.DotSettings
2020-05-22 11:31:18 +02:00
zumorica
06d2cc74ed Refactor a bunch of stuff. 2020-05-19 14:17:48 +02:00
zumorica
06c7030514 Some work 2020-05-17 12:58:54 +02:00
zumorica
a524eca44b Action blocker for changing direction 2020-05-13 19:26:39 +02:00
zumorica
b1db8d1e7a Add WelderComponent back 2020-05-11 15:26:07 +02:00
zumorica
6ae5e36a18 Merge branch 'master' into 2020-04-28-tool-component 2020-05-11 12:24:43 +02:00
Pieter-Jan Briers
e2677bab51 Wide attacks on space, remove UseOrAttack. 2020-05-03 16:03:52 +02:00
zumorica
995ed64789 Don't raise ToolAct, remove unused IToolAct 2020-04-29 15:28:03 +02:00
zumorica
dd72f9d1a9 Actually raise ToolAct 2020-04-29 14:45:38 +02:00
zumorica
89e7ad4144 Correct comment 2020-04-29 14:27:06 +02:00
zumorica
ff5549a0d1 Finish refactoring tools. Add multitools. (as in multiple tools in one) 2020-04-29 13:48:32 +02:00
Sam
1ba222142a Created SharedInteractionSystem + Partial Fix #782 (#833) 2020-04-21 16:58:31 +02:00
Víctor Aguilera Puerto
3fc4725df7 Add IEquipped and IUnequipped interfaces (#837) 2020-04-21 14:38:35 +02:00
Víctor Aguilera Puerto
d1ff84e95d Add CanAttack to IActionBlocker, prevent using guns when dead (#769) 2020-03-03 15:10:09 +01:00
Víctor Aguilera Puerto
60d6b4af7d You can now pickup items inside obstructions (#759) 2020-02-28 17:52:18 +01:00
Víctor Aguilera Puerto
2df0f884ba Fix bug where InRangeUnobstructed wouldn't check for hard collid… (#748)
* Check for hard collidables too.

* ...and that's why you don't code at 7 AM!

* fugg
2020-02-28 16:29:45 +01:00
Acruid
3011c06460 You can now pick up items that are not on a grid.
API changes for IMapManager.TryGetGridAt().
2020-02-27 02:12:57 -08:00
Acruid
ee6eec9c40 SubscribeEvent() has been split into SubscribeNetworkEvent() and SubscribeLocalEvent() methods on EntitySystem.
Most methods on EntityEventBus now require callers to specify the source (Local or Network) of the events.
2020-02-19 17:08:59 -08:00
Víctor Aguilera Puerto
70c41f63b0 Adds InRangeUnobstructed method to InteractionSystem (#698)
* You cannot pickup items across walls, or pickup items when dead/in crit.

* Adds InRangeUnobstructed method to InteractionSystem.
Changes HandsSystem and ItemComponent to use it.
2020-02-16 23:04:06 +01:00
Tad Hardesty
89a4265dda Change player's facing when they click on something (#598) 2020-02-07 17:54:56 +01:00
Pieter-Jan Briers
2ec493e2af Combat mode improvements.
You now need to hold the mouse for 0.15 seconds in combat mode to actually do an attack.

Otherwise it's regular item interaction (for now).
2020-01-26 03:38:51 +01:00
Acruid
a692899f5b GridCoordinates API changes. 2020-01-25 01:39:14 -08:00
moneyl
1996893a26 Fix UseDelayComponent (#546)
Currently if this component is present the delay timer is started but it doesn't actually prevent use interactions.

To test this bug, do the following:
1. Set the delay for [bike_horn](https://github.com/space-wizards/space-station-14/blob/master/Resources/Prototypes/Entities/items/bike_horn.yml#L25) to something large like 5.0 that'll make the effect obvious
2. Use the bike horn with the z key. The delay anim will play properly but you'll still be able to spam the honk.
2020-01-23 01:37:07 +01:00
Víctor Aguilera Puerto
83b2e59910 Fix bug where placing items in PlaceableSurfaces didn't cause a… (#544)
* Change variable name in some interactions

I definitely didn't copy-paste some stuff back then, absolutely not.

* Fix bug where dropping items in tables didn't cause the drop interaction
2020-01-22 23:09:36 +01:00