Commit Graph

79 Commits

Author SHA1 Message Date
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
L.E.D
8f04ce894f Use Delay Component (#540)
* use delay timer

* remove accidental using

* and remove accidental newline because i don't proofread my code

* compatibility with HUD cooldown
suggested changes

* get out of here

* suggested changes

* change to seconds from milliseconds

* remove redundancy
2020-01-22 23:08:14 +01:00
ShadowCommander
e0aaab56e3 Implement StorageButton on HandsGUI and click empty hand to swap… (#517)
Also moved duplicate sprite view code to ItemSlotManager
2020-01-18 03:41:47 +01:00
Acruid
32103979ed CollidableComponent and ICollideableComponent namespace was changed in the engine.
Minor code cleanup.
2020-01-11 14:12:20 -08:00
Acruid
d549c44f95 Shared IMap/Map class removal (#467)
* Fully removed the Map and IMap class.

* Submodule update to sibling engine commit.
2019-11-26 23:16:36 +01:00
Víctor Aguilera Puerto
fedc0ad71c Adds playable instruments, IDropped, IHandSelected and IHandDese… (#368)
* Instrument test.

* Midi stuff

* Some more work

* This actually works now!

* update

* Midi Audio works!

* Lots of stuff, and cool interfaces for items

* Update

* Fix a few things

* It just works

* Move textures to another folder, remove placeholder description from instruments

* Fix warning

* Use renderer enum

* Instruments now use DisposeRenderer method, and send MidiEvents as they receive them. Deletes InstrumentSystem whoo.

* Fix incorrect sprite paths

* Instruments take midi file size check into account when enabling/disabling midi playback buttons

* Fix crash when pressing drop on empty hand.

* Use new renderer return values for midi/input

* Xylophones are no longer handheld instruments, fix their sprites.

* Use new API

* Remove nfluidsynth from solution

* Timing information

* Use IGameTiming.CurTime for timestamps instead
2019-11-25 00:11:47 +01:00
ZelteHonor
b2e2aef78d Rider static analysis (#433)
* Non-accessed local variable

* Merge cast and type checks.

* StringComparison.Ordinal added for better culture support

* Supposed code improvement in launcher. Remove unused code.

* Update ExplosionHelper.cs

Unintentional change.

* Optimized Import

* Add Robust.Shared.Utility import where it was deleted

* Other random suggestion

* Improve my comment
2019-11-13 23:37:46 +01:00
Acruid
fc5d7835c0 Updates various systems to the new InputCommandHandler delegate signature, implementing the new handled return value.
Modifies the construction system to use the newer InputHandler system, instead of the older ClickComponent system.
Updates the engine submodule.
2019-09-17 16:10:59 -07:00
Acruid
6ca9e16670 Changes the interaction system so that if a client sends a UseItemInHand input command while not having a valid attached entity, the handler method will block the command. Previously, the handler method would throw a NullRefException if this occurred. 2019-09-06 10:13:48 -07:00
Acruid
9353a060f2 Physics Shapes (#306)
* Removed BoundingBoxComponent.

* Updated prototypes to use refactored CollidableComponent.

* Renamed ICollidable to IPhysBody.
Moved ICollidable to the Shared/Physics namespace.

* Migrated more yaml files to use PhysShapes.

* Updated YAML to use the new list-of-bodies system.

* Updated the new prototypes.

* Update submodule

* Update submodule again, whoops
2019-09-03 22:14:04 +02:00