Commit Graph

67 Commits

Author SHA1 Message Date
Remie Richards
d45835e863 Janitor trashbag upgrade + FANCY ANIMATIONS (#3058)
* Janitor trashbag upgrade + FANCY ANIMATIONS

* Review, Bug fixes and Sounds
- Fixed hand-pickup animation playing if the entity originated from inside a container (e.g. bag on the ground) or from inside ourselves (e.g. something in our own inventory)

* Fix/Change. Just log if AnimateEntityPickup is called with an entity that has no SpriteComponent.

* More explicit log message. Error log.

* Merge. Fix.
2021-02-03 23:07:13 +01:00
metalgearsloth
6a41194bc9 Fix buckle drops. (#3023)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2021-01-20 00:16:41 +11:00
ColdAutumnRain
f5dc62b533 Removed EntityManager member variable from Components and EntitySystems (#2502)
* Removed EntityManager member variable from Components and EntitySystems

* Removed EntityManager with minor corecctions

* Update PathfindingSystem.cs

* Update InteractionSystem.cs

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

Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>

* Update Content.Client/GameObjects/Components/Suspicion/SuspicionRoleComponent.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update Content.Client/GameObjects/Components/Suspicion/TraitorOverlay.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update Content.Server/GameObjects/Components/Buckle/BuckleComponent.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update Content.Server/GameObjects/Components/Buckle/BuckleComponent.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update Content.Server/GameObjects/Components/PDA/PDAComponent.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update Content.Server/GameObjects/Components/Singularity/SingularityComponent.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update Content.Server/GameObjects/Components/Singularity/SingularityComponent.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update Content.Server/GameObjects/EntitySystems/AI/Pathfinding/PathfindingSystem.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

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

Co-authored-by: Clyybber <darkmine956@gmail.com>

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

Co-authored-by: Clyybber <darkmine956@gmail.com>

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

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update Content.Server/GameObjects/Components/Stack/StackComponent.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
Co-authored-by: Clyybber <darkmine956@gmail.com>
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
2020-11-18 15:45:53 +01:00
DrSmugleaf
b1fe4bad01 Add client pulling prediction (#2041)
* WIP changes

* Merge conflict fixes

* Bring pull controlelr to current year

* Sync and predict PullController on the client

* Clean imports

* Slow down pullers and make pulling tighter

* Stop pulls on pullable or puller component removals

* Make pulling not occur when moving towards the pulled entity
2020-10-16 20:35:09 +02:00
DrSmugleaf
e9d9618c8f Change ThrowHelper methods to be extensions (#2254) 2020-10-14 22:41:44 +02:00
Swept
0ea8792501 Cleanup (#2111) 2020-09-20 17:29:11 +02:00
derek
158f765895 Keybind to stop pulling. (#2094)
* keybind to stop pulling.

* smug
2020-09-16 23:58:50 +02:00
DrSmugleaf
74943a2770 Typo, redundant string interpolation, namespaces and imports cleanup (#2068)
* Readonly, typos and redundant string interpolations

* Namespaces

* Optimize imports

* Address reviews

* but actually

* Localize missing strings

* Remove redundant vars
2020-09-13 14:23:52 +02:00
DrSmugleaf
48b61f6bcc Replace every usage of GridCoordinates with EntityCoordinates (#2021)
* Update RobustToolbox

* Transition direct type usages

* More updates

* Fix invalid use of to map

* Update RobustToolbox

* Fix dropping items

* Rename name usages of "GridCoordinates" to "EntityCoordinates"

* Revert "Update RobustToolbox"

This reverts commit 9f334a17c5908ded0043a63158bb671e4aa3f346.

* Revert "Update RobustToolbox"

This reverts commit 3a9c8cfa3606fa501aa84407796d2ad920853a09.

# Conflicts:
#	RobustToolbox

* Fix cursed IMapGrid method usage.

* GridTileLookupTest now uses EntityCoordinates

Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
Co-authored-by: Víctor Aguilera Puerto <zddm@outlook.es>
2020-09-06 16:11:53 +02:00
DrSmugleaf
8f9ed2f562 Replace usages of ISharedNotifyManager and IServerNotifyManager with extension methods (#1965)
* Replace usages of ISharedNotifyManager and IServerNotifyManager with extension methods

* Remove redundant code
2020-09-01 12:34:53 +02:00
DrSmugleaf
9d6c394f6b Refactor InRangeUnobstructed and add extension methods (#1925)
* Sort out InRangeUnobstructed and add extension methods

* Rename client RangeChecks to RangeExtensions

* Add container extension methods and test

* Add missing component methods

Component to container
Grid coordinates to container
Map coordinates to container
Local player to container

* Actually use the field

* Merge fixes

* Add popup argument to local player extension methods

* Reduce code repetition for client range extensions
2020-08-30 11:37:06 +02:00
DrSmugleaf
8a27a5322a Replace pragma warning 649 disable/restore with default! 2020-08-24 14:10:28 +02:00
DrSmugleaf
4a8ed41e3a Fix namespaces and optimize imports (#1651)
* Fix namespaces and optimize imports

* Cleanup fixes

* Merge conflict fixes

* Merge conflict fixes

* Merge conflict fixes
2020-08-13 14:40:27 +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
DrSmugleaf
245dbdaa3a Add pointing (#1435)
* Add pointing keybind and simple message

* Add turning the player when pointing

* Add pointing arrow

* Make the popup message appear on the pointing entity

* Add pointing to tiles and space and proper grammar

* Move pointing bind from HandsSystem to PointingSystem

* Add more messages for pointing depending on the viewer perspective

* Fix non nullable reference type

* Serialize pointing arrow duration

* Serialize pointing arrow step and add summaries

* Make arrow speed serializable and make it depend on frame time

* Add 0.2 second delay between pointings

* Add pointing arrow yaml examples

* Add the ability for pointing arrows to be rogue

* Remove rogue package reference

* Add point to verb

https://cdn.discordapp.com/attachments/313107470031650816/735268651636228197/unknown.png

* Add shift middle clicking an entity in the verb menu to point at it

* Add VV to PointingArrowComponent

* Increase pointing delay from 0.2 to 0.5 seconds

* Address reviews

* Fix nullability errors

* Separate pointing and rogue pointing code

* Fix rogue pointing arrow visuals

* Made rogue pointing arrow rotation adjustment readable for mortals

* Make rogue pointing arrows less destructive

* Cleanup more of the rogue pointing arrow code
2020-07-24 14:51:18 +02:00
DrSmugleaf
53a2392edc Fix restartround crash and cleanup ServerStorageComponent (#1340) 2020-07-17 11:03:07 +02:00
DrSmugleaf
793f843ae8 Fixing these namespaces was a mistake 2020-07-07 00:33:57 +02:00
DrSmugleaf
b850ac2437 Merge branch 'master' into buckle-locker-fix-1262 2020-07-07 00:20:07 +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
DrSmugleaf
81647d696e Disable interactions for entities in storage 2020-07-03 23:57:19 +02:00
DrSmugleaf
602dac393e Add Buckling (#1155)
* Create BuckleableComponent.cs

* Add strap component and keybind to buckle targeted entity

* Remove buckle keybind, turn it into a verb

* Add moving and attaching the buckled entity to the strap

* Fix reality collapsing when clicking on a buckled entity

* Add strap position to buckle a mob in the standing or down position

* Add new default strap position that makes no change to the mob's standing state

* Add Strap component to office chairs and stools

* Add Strap component to the pilot chair

* Add buckled status effect icon

* Add status effect click behaviour

* Add buckling and unbuckling sounds

* Change Buckle verb to only appear when an entity can be currently buckled

* Rotate buckled entity in the direction of the seat

* Disable entity rotation when buckled

* Fix buckle rotation on beds

* Buckling now finds the closest strap to the buckleable entity

* Fix rotation when unbuckling an entity

* Move buckle verb to StrapComponent

* Added buckled entity unbuckle verb, range and interaction checks

* Add checks for currently occupied straps

* Add unbuckling entity if its respective strap component is removed

* Add Clickable, InteractionOutline and Collidable components to bed

* Add rotation property to strap component

* Rename Buckleable to Buckle

* Add Buckle and Strap sizes to buckle multiple entities in the same strap

* Remove out of range popup message from strap verb GetData

* Move BuckledTo setter logic to its methods

* Fix Strap BuckledEntities being public

* Fix not updating status when Buckle component is removed

* Change BuckleComponent.BuckledTo to be of type StrapComponent

* Fix NRE when unbuckling

* Add buckle perspective messages

* Fix not equals comparison in strap verb

* Add added check to Strap TryAdd

* Change buckle.ogg and unbuckle.ogg from stereo to mono

* Remove -2f volume on buckle and unbuckle sounds

* Add summary to Strap TryAdd and Remove methods

* Make buckled entities unable to fall

* Fix default strap position not rotating the buckled entity

* Add downing after unbuckling an entity if it is knocked down

* Prevent an entity from buckling onto itself

Fixes stack overflow error

* Disable recursive buckling

* Add buckling onto straps by clicking them with an empty hand

* Add recursive buckle check to the trybuckle method as well

* Fix being able to click on a different strap to unbuckle from the current one

* Merge TryUnbuckle and ForceUnbuckle with a force argument

* Remove explicit unimplemented status effect clicking cases

* Add documentation to EffectBlockerSystem and ActionBlockerSystem
2020-06-25 15:52:24 +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
Tomeno
1fc20a4e14 Uses raytrace to clamp drop distance (#1017)
Co-authored-by: Tomeno <tomeno@lulzsec.co.uk>
2020-05-28 13:23:50 +02:00
Víctor Aguilera Puerto
8a81f54a45 Makes InRangeUnobstructed use MapCoordinates. Fixes #1003
(Also updates Submoduke)
2020-05-26 14:23:25 +02:00
Pieter-Jan Briers
29f21dfe58 Throwing improvements (#969) 2020-05-25 14:04:58 +02:00
chairbender
6a4d78cfac Add interaction checks to all interactions (#923) 2020-05-23 11:27:31 +02:00
Hugal31
fbaafa8366 Add smart equip shortcuts (#873) 2020-05-05 00:39:15 +02:00
Víctor Aguilera Puerto
f5657569e4 Fix drop range (#871) 2020-05-01 17:44:22 +02: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
Injazz
15fa417a4f Explosion now throws affected entities, fixes probability/severi… (#732)
* throwforce and probability fixes for explosions

Applies force to all affected by explosion entities with ItemComponent
Fixes probability issues with explosion related callbacks

* dependency fix, throw helper

* delete TODO

Co-authored-by: gituhabu <48828502+gituhabu@users.noreply.github.com>
2020-02-24 03:52:15 +01: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
Acruid
e719745b10 Removed the Sender object from events. If you needed this field, add it to the event class. 2020-02-19 14:39:00 -08:00
Acruid
c51533686b Updates the Content EntitySystems with the changes to the event API.
Visual Studio wants to update the version of the solution, and change some GUIDs around.
2020-02-18 19:43:54 -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
Profane McBane
9e368b336f Let stacks specify if they get thrown as one item, or individual… (#679) 2020-02-13 23:43:02 +01:00
Qustinnus
de094ddacc Fixes the direction humans turn to when throwing something (#686)
* Fixes the direction humans turn to when throwing something

* shorter
2020-02-13 16:21:29 +01:00
Víctor Aguilera Puerto
f8a64bcd5c Prevent items from being dropped across impassable entities (#670) 2020-02-12 00:01:44 +01:00
Markus W. Halvorsen
595ffb3237 Clamp out of range item drops (#631) 2020-02-08 15:32:21 +01:00
Acruid
a692899f5b GridCoordinates API changes. 2020-01-25 01:39:14 -08:00
Acruid
a86363a6d2 API changes, renamed SpawnEntityAt to SpawnEntity. 2020-01-24 16:10:48 -08:00
Pieter-Jan Briers
11d47cc67a Remove an unused field. 2020-01-24 00:57:08 +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
Acruid
32103979ed CollidableComponent and ICollideableComponent namespace was changed in the engine.
Minor code cleanup.
2020-01-11 14:12:20 -08:00
L.E.D
fac91af34d new layers (#483) 2019-12-01 15:20:50 +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
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
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