Commit Graph

9 Commits

Author SHA1 Message Date
Vera Aguilera Puerto
69b270017b Inline TryGetComponent completely, for real 2021-12-03 14:17:01 +01:00
collinlunn
f2816e8081 Moves Hands to shared, some prediction (#3829)
* HandsGuiState

* Gui state setting methods

* code cleanup

* Removes TryGetHands

* ClientHand

* Gui Hands

* Refactor WIP 1

* Hand index

* refactors 2

* wip 3

* wip 4

* wiip 4

* wip 5

* wip 6

* wip 7

* wip 8

* wip 9

* wip 11

* Hand ui mostly looks fine

* hands gui cleanup 1

* cleanup 2

* wip 13

* hand enabled

* stuff

* Hands gui gap fix

* onpressed test

* hand gui buttons events work

* bag activation works

* fix item use

* todo comment

* hands activate fix

* Moves Client Hands back to using strings to identify active hand

* fixes action hand highlighting

* diff fix

* serverhand

* SharedHand

* SharedHand, IReadOnlyHand

* Client Hands only stores SharedHand

* cleanup server hands

* server hand container shutdown

* misc renames, refactors of serverhand

* stuff 1

* stuff 3

* server hand refactor 1

* Undo API changes to remove massive diff

* More API name fixes

* server hands cleanup 2

* cleanup 3

* dropping cleanup

* Cleanup 4

* MoveItemFromHand

* Stuff

* region sorting

* Hand Putter methods cleanup

* stuff 2

* Merges all of serverhand and clienthand into sharedhand

* Other hands systems, hack to make inhands update (gui state set every frame, visualzier updated every frame)

* GetFinalDropCoordinates cleanup

* SwapHands cleanup

* Moves server hands code to shared hands

* Fixed hand selected and deselected

* Naming fixes

* Server hands system cleanup

* Hands privacy fixes

* Client hand updates when containers are modified

* HeldItemVisualizer

* Fixes hand gui item status panel

* method name fix

* Swap hands prediction

* Dropping prediction

* Fixes pickup entity animation

* Fixes HeldItemsVisualizer

* moves item pickup to shared

* PR cleanup

* fixes hand enabling/disabling

* build fix

* Conflict fixes

* Fixes pickup animation

* Uses component directed message subscriptions

* event unsubscriptions in hand system

* unsubscribe fix

* CanInsertEntityIntoHand checks if hand is enabled

* Moving items from one hand to another checks if the hands can pick up and drop

* Fixes stop pulling not re-enabling hand

* Fixes pickup animation for entities containers on the floor

* Fixes using held items

* Fixes multiple hands guis appearing

* test fix

* removes obsolete system sunsubscribes

* Checks IsFirstTimePredicted before playing drop animation

* fixes hand item deleted crash

* Uses Get to get other system

* Replaces AppearanceComponent with SharedAppearanceComponent

* Replaces EnsureComponent with TryGetComponent

* Improves event class names

* Moves property up to top of class

* Moves code for determining the hand visualizer rsi state into the visualizer instead of being determined on hand component

* Eventbus todo comment

* Yaml fix for changed visualizer name

* Makes HandsVisuals a byte

* Removes state from HandsVisualizer

* Fixes hand using interaction method name

* Namespace changes fixes

* Fix for changed hand interaction method

* missing }

* conflict build fix

* Moves cleint HandsSystem to correct folder

* Moved namespace fix for interaction test

* Moves Handsvisualizer ot correct folder

* Moves SharedHandsSystem to correct folder

* Fixes errors from moving namespace of hand systems

* Fixes PDA component changes

* Fixes ActionsComponent diff

* Fixes inventory component diff

* fixes null ref

* Replaces obsolete Loc.GetString usage with fluent translations

* Fluent for hands disarming

* SwapHands and Drop user input specify to the server which hand

* Pickup animation WorldPosiiton todo

* Cleans up hands gui subscription handling

* Fixes change in ActionBlockerSystem access

* Namespace references fixes

* HandsComponent PlayerAttached/Detached messages are handled through eventbus

* Fixes GasCanisterSystem drop method usage

* Fix gameticker equipping method at new location

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2021-06-21 19:21:20 +10:00
DrSmugleaf
ff1a2d97ea Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
DrSmugleaf
a5ade526b7 Enable nullability in Content.Server (#3685) 2021-03-16 15:50:20 +01:00
Acruid
ca4fd649fe Massive Namespace Cleanup (#3120)
* Engine namespace changes.

* Automated remove redundant using statements.

* Simplified Graphics namespace.

* Apparently the container system stores full type names in the map file.😞 This updates those names.

* API Changes to LocalizationManager.LoadCulture.

* Update submodule to v0.3.2
2021-02-11 01:13:03 -08: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
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
Víctor Aguilera Puerto
63acae7937 Prevent AI from dropping something that's not in their hands 2020-06-18 15:38:40 +02: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