Commit Graph

54 Commits

Author SHA1 Message Date
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
ShadowCommander
7422d9148a Refactored input system 2019-08-04 16:03:51 -07:00
Acruid
232e4951b0 Fixes InteractionSystem so that a player can pick up an item from a grid that isn't at the world origin. 2019-07-24 10:59:19 -07:00
Pieter-Jan Briers
1a92d08399 Improves examine code
Examining now has larger range. Ghosts have no range limit.
Fixed some messy code and some bad netcode.
2019-07-19 10:45:55 +02:00
Víctor Aguilera Puerto
d9077bde74 Adds IThrown, ILand interfaces. Adds dice. (#273)
* Dice, IThrown, ILand

* Adds sounds to the dice using a sound collection.

* Seed random instance better.

* Missed a ")", should compile now
2019-07-18 23:33:02 +02:00
Pieter-Jan Briers
c4523a956d Stupidly shoddy combat mode system.
Doesn't even work for guns, oh well.
2019-06-30 00:01:41 +02:00
Pieter-Jan Briers
c197278c6f Interaction rework.
IActivate is now more used. IAttackHand falls back to IActivate.
2019-05-16 15:51:32 +02:00
DamianX
b16768fd0b Moved dropping items over PlaceableSurfaces from AfterAttack to AttackBy (#209)
Added ClickLocation variable to AttackByEventArgs
2019-04-25 23:22:51 +02:00
Acruid
d3daa83b82 Map System Code Refactor (#204)
* Removes static `IoCManager` service locator calls from `Robust.Shared.Map` namespace.
* Misc code cleanup and filling out doc comments for Map classes.
* Added Union and Intersect methods to Box2.
* Any touched component was converted from static IoC calls to field injection.

Sibling PR to https://github.com/space-wizards/RobustToolbox/pull/796.
2019-04-21 01:20:18 +02:00
Acruid
50f42d71a2 Interaction System Messages (#202)
* Adds entity messages to the InteractionSystem.

* Changed Handled check formatting to match the rest of the codebase.
2019-04-21 01:18:16 +02:00
Silver
a18692bc46 Rename toolbox references from ss14 to robust 2019-04-15 21:11:38 -06:00
PrPleGoo
66344c3ac7 Activate with an EventArg object for a parameter 2019-04-05 19:44:32 +02:00
PrPleGoo
c90d54664b UseEntity with an EventArg object for a parameter 2019-04-05 19:42:49 +02:00
PrPleGoo
7d85141c9b AfterAttack with an EventArg object for a parameter 2019-04-05 19:40:46 +02:00
PrPleGoo
9b2be2ba50 RangedAttackBy with an EventArg object for a parameter 2019-04-05 19:32:18 +02:00
PrPleGoo
ddde077d16 AttackByEventArgs inherits from EventArgs again 2019-04-05 19:29:16 +02:00
PrPleGoo
495315565a AttackHand with an EventArg object for a parameter 2019-04-05 19:27:39 +02:00
PrPleGoo
ee7a29326d AttackBy with an EventArg object for a parameter 2019-04-05 19:22:38 +02:00
Pieter-Jan Briers
415b7e96fd Transform refactor. (#139)
space-wizards/space-station-14#725
2019-01-18 11:40:30 +01:00
clusterfack
37df61113e Species Component (#130)
* Fix this
fug
oksure
Creates the initial species component, damage states, and threshold templates and hooks them into the damageable component

* More rebase fixes

* test

* Pre future rebase

* Please

* Lol

* Lol2

* SHADERS

* Update Engine

* yml file

* Fix an initialization issue, injects dependencies

* Fix error in loading shaders

* Makes a master character ui controller component added upon client attachment to entity and remove upon client detachment from entity

* Fixes just about everytrhing

* Address PJB's comments

* geeze

* Make overlays work in worldspace instead of screen space and not cover user interfaces

* update submodule
2018-12-13 14:47:18 +01:00
Acruid
8038ebe37d Fix Hands Crash (#122)
* Fixed sprite issues with construction system (Thanks PJB!).

* Storage and Hands Systems now subscribe to Transform Parent changes, and will keep their containers in sync.

* Add check in Interaction System to prevent processing client-side entities on the server.
2018-11-11 20:32:05 +01:00
Acruid
d186f18c20 Thrown Item Physics (#120)
* Thrown object speed is now based on force.
Fixed BoundingBox namespace.

* 100% more throwing.
CollisionGroup enum.

* Update Engine.
2018-10-30 09:13:10 +01:00
Acruid
6cc88115b5 Rename ICollisionManager to IPhysicsManager (#113)
* Renamed ICollisionManager to IPhysicsManager.

* Added sanitization and logging for clients sending invalid coordinates to the interaction system.

* Update Engine.
2018-10-25 17:29:33 -07:00
Acruid
ed39649721 Interaction Features (#101)
Various minor interaction features.

There is no concept of gravity in the game yet, so items drift through space or the hallways of a station until they are stopped. Thrown items do not collide with walls because making them collidable makes them collide with EVERYTHING, including the player. We need collision groups in the physics system.

Because of the previous problems the velocity things are throw at is set quite low, it can be tweaked after the other mentioned issues are resolved.
2018-08-22 10:19:47 +02:00
Acruid
ce5760d46c Click Migration (#94)
* Migrated Interaction system to the new Input system.

* Contexts are now set up in content.
2018-08-16 15:57:11 -07:00
Pieter-Jan Briers
d7074bf74f Construction System. (#87)
* Construction WiP

* Construction kinda works!

* Lots more construction work.

* It mostly works!
2018-08-02 08:29:55 +02:00