Commit Graph

61 Commits

Author SHA1 Message Date
Pieter-Jan Briers
cb4d5f3e59 More nullable component fixes (#8659) 2022-06-04 20:22:26 -07:00
wrexbe
9cd323e519 Remove IgnoreComponents on the client (#8308) 2022-05-28 10:38:59 -07:00
Jacob Tong
cecd1b9ef6 Fix climbing out of CloningPod and MedicalScanner (#8191)
* Fix climbing out of CloningPod and MedicalScanner

* Fix mask

* Fix test
2022-05-15 19:57:13 +10:00
Jacob Tong
0e945b42b2 Rework climbing (#7706) 2022-05-10 01:08:52 -07:00
Leon Friedrich
bfd95c493b hands ECS (#7081) 2022-03-17 18:13:31 +11:00
Leon Friedrich
ff7d4ed9f6 Patched Actions Rework (#6899)
* Rejig Actions

* fix merge errors

* lambda-b-gon

* fix PAI, add innate actions

* Revert "fix PAI, add innate actions"

This reverts commit 4b501ac083e979e31ebd98d7b98077e0dbdd344b.

* Just fix by making nullable.

if only require: true actually did something somehow.

* Make AddActions() ensure an actions component

and misc comments

* misc cleanup

* Limit range even when not checking for obstructions

* remove old guardian code

* rename function and make EntityUid nullable

* fix magboot bug

* fix action search menu

* make targeting toggle all equivalent actions

* fix combat popups (enabling <-> disabling)

* fix networking

* Allow action locking

* prevent telepathy
2022-02-25 23:24:08 -06:00
Leon Friedrich
49ae383f06 Revert "Actions Rework" (#6888) 2022-02-25 16:55:18 +11:00
Leon Friedrich
5ac5dd6a64 Actions Rework (#6791)
* Rejig Actions

* fix merge errors

* lambda-b-gon

* fix PAI, add innate actions

* Revert "fix PAI, add innate actions"

This reverts commit 4b501ac083e979e31ebd98d7b98077e0dbdd344b.

* Just fix by making nullable.

if only require: true actually did something somehow.

* Make AddActions() ensure an actions component

and misc comments

* misc cleanup

* Limit range even when not checking for obstructions

* remove old guardian code

* rename function and make EntityUid nullable

* fix magboot bug

* fix action search menu

* make targeting toggle all equivalent actions

* fix combat popups (enabling <-> disabling)
2022-02-24 22:12:29 -06:00
mirrorcult
ec4d4688c7 Seal/abstract/virtual everything (#6739) 2022-02-16 18:23:23 +11:00
wrexbe
b2229a951d Test ignored component names (#6308) 2022-01-26 16:41:28 +11:00
Acruid
5b1cd2dd96 ECSatize AlertsSystem (#5559) 2022-01-05 19:19:23 +11:00
Paul Ritter
512d6a38c3 get that crap outta here (completely rewrites inventorysystem) (#5807)
* some work

* equip: done
unequip: todo

* unequipping done & refactored events

* workin

* movin

* reee namespaces

* stun

* mobstate

* fixes

* some work on events

* removes serverside itemcomp & misc fixes

* work

* smol merge fix

* ports template to prototype & finishes ui

* moves relay & adds containerenumerator

* actions & cuffs

* my god what is actioncode

* more fixes

* im loosing my grasp on reality

* more fixes

* more work

* explosions

* yes

* more work

* more fixes

* merge master & misc fixed because i forgot to commit before merging master

* more fixes

* fixes

* moar

* more work

* moar fixes

* suffixmap

* more work on client

* motivation low

* no. no containers

* mirroring client to server

* fixes

* move serverinvcomp

* serverinventorycomponent is dead

* gaming

* only strippable & ai left...

* only ai and richtext left

* fixes ai

* fixes

* fixes sprite layers

* more fixes

* resolves optional

* yes

* stable™️

* fixes

* moar fixes

* moar

* fix some tests

* lmao

* no comment

* good to merge™️

* fixes build but for real

* adresses some reviews

* adresses some more reviews

* nullables, yo

* fixes lobbyscreen

* timid refactor to differentiate actor & target

* adresses more reviews

* more

* my god what a mess

* removed the rest of duplicates

* removed duplicate slotflags and renamed shoes to feet

* removes another unused one

* yes

* fixes lobby & makes tryunequip return unequipped item

* fixes

* some funny renames

* fixes

* misc improvements to attemptevents

* fixes

* merge fixes

Co-authored-by: Paul Ritter <ritter.paul1@gmail.com>
2021-12-30 22:56:10 +01:00
Vera Aguilera Puerto
2699540526 Remove useless resolves from a buncha tests. 2021-12-08 12:46:30 +01:00
Vera Aguilera Puerto
8d4799e611 Fixes some integration tests 2021-12-06 16:40:04 +01:00
Vera Aguilera Puerto
c57b07a4d0 Goes in-game now 2021-12-06 15:34:46 +01:00
DrSmugleaf
af4eb3c7cd Fix more errors, client and server now build 2021-12-06 14:00:39 +01:00
metalgearsloth
525297c5fe A bunch of AttachedEntity bullshit 2021-12-06 15:39:46 +11:00
DrSmugleaf
2a3b7d809d Fix 3000 errors 2021-12-05 18:09:01 +01:00
Vera Aguilera Puerto
5cd42c9ad6 Inline UID 2021-12-03 15:53:09 +01:00
Vera Aguilera Puerto
a5b57c8e10 Inline Transform 2021-12-03 14:20:34 +01:00
Vera Aguilera Puerto
69b270017b Inline TryGetComponent completely, for real 2021-12-03 14:17:01 +01:00
Vera Aguilera Puerto
b835bea086 Inline GetComponent 2021-12-03 11:55:25 +01:00
Acruid
6e54e740c7 Removed Old PlayerSession Functions (#5404)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2021-11-23 18:11:48 +11:00
Paul
186edba6fd fixes tests 2021-11-20 16:12:58 +01:00
Javier Guardia Fernández
af579b15cc Update to .NET 6 and C# 10 (#5233)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2021-11-09 15:05:07 +01:00
Javier Guardia Fernández
ec9e65951c Remove IHandsComponent and ISharedHandsComponent (#5218)
* Remove IHandsComponent and ISharedHandsComponent

* Copy the documentation from the interfaces

* Revert "Copy the documentation from the interfaces"

This reverts commit 7638a2d4817743d487c7b255ba3e56add77dca86.

* Perform a minute amount of cleanup
2021-11-08 15:08:24 +01:00
Javier Guardia Fernández
1508efff54 Add test pooling (#4961)
* Add test pooling

* WIP test pooling changes

* Fix Destructible tests

* Don't pool unpooled or dummy ticker instances

* Change ServerPathfindingDebugSystem to replace existing entries

* Fix SaveLoadSaveTest comment

* Don't pool StartTest

* Comment out global setup

* Fix puddle tests

* Move SolarPanelComponent initialize to PowerSolarSystem OnMapInit

* Update RobustToolbox

* Finish fixing tests, make test threads background threads

* Bring back pooling

* Fix nullable

* Update RobustToolbox

* Set cvars on server return

* Un-pool tests with custom cvars

* Update RobustToolbox

* Update RobustToolbox

* Change where the main tile coordinates are

* Remove DisposalUnitTest grid check

* Fix test pooling being a fickle bitch

* Fix EntitySystemExtensionsTest

* Update RobustToolbox

* Update RobustToolbox

* Make nullable pool settings true

* Update RobustToolbox

* Wait other way around

* We are unitystation now

* Update RobustToolbox

* Create global setup

* Pool some more tests

* Fix not properly disconnecting clients before restarting the round

* Give more info on ran tests

* Standardize default test cvars

* Update RobustToolbox

* Update RobustToolbox

* Pool clients

* Fix test order issue

* Fix cvars in character creation test not being set properly

* Update RobustToolbox

* Update RobustToolbox

* Rider shut

* Update RobustToolbox

* Format tests ran better

* Update RobustToolbox

* Reset RobustToolbox

* Reset RobustToolbox harder

* Fix one instance of test order causing destructible tests to fail
2021-11-06 11:49:59 +01:00
Visne
ac78145b94 Remove encapsulation for previously protected XAML UI fields (#4975) 2021-10-28 14:23:17 +02:00
Vera Aguilera Puerto
13a214e4a0 Fix tests.
Flashlight RSI state names had been changed, and some places weren't updated properly
2021-08-17 09:07:52 +02:00
Vera Aguilera Puerto
dc18997bf8 Removes LoopingSoundComponent. (#4396)
I'm sorry.
2021-07-31 12:41:59 +02: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
69969bbdc6 Remove IBody, IBodyPart, IMechanism and IMechanismBehavior (#4187)
* Remove IBody, IBodyPart, IMechanism and IMechanismBehavior interfaces

* Summary cleanup
2021-06-17 00:44:38 +10:00
DrSmugleaf
f878f353e4 Move some files out of Content.Shared root because I forgot (#4182) 2021-06-13 22:52:40 +10:00
DrSmugleaf
ff1a2d97ea Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
Vera Aguilera Puerto
c17426dfa7 AtmosphereSystem no longer creates a component manually. (#3839)
- Maps get SpaceGridAtmosphereComponent added automatically
2021-04-13 13:17:10 +02:00
DrSmugleaf
677706b117 Refactor body component to use slots instead of an army of dictionaries (#3749)
* Refactor body component to use slots instead of an army of dictionaries

* Update vox

* Replace static method call with extension

* Add setpart method, replace dispose with shutdown

* Fix tests, fix not listening to slot events when setting a part
2021-04-05 14:54:51 +02:00
ShadowCommander
7a842f7c22 Fix tests (#3707)
* First pass

* Fix access and rename banananium to bananium

* Fix captialization of CookTimeInfoLabel

* Fix InteractUsing calls

* Remove unused [Dependency]

* Replace obsolete references to Anchored with BodyType

* Assign default value to shoving someone in disposals

* Fix naming

* Replace Initialize TryGetComponents with EnsureComponent

* Rework AnchorableComponent

* Fix singularity component

* Replace obsolete usages of Angle.South

* Fix efcore warning

* Fix container tests

* Fix DebugPressurePump invalid PressurePump yaml

* Fix getting pathfinding region of grid 0

* Fix atmos plaque missing layer and add info message when it happens

* Fix AiSteeringSystem steering in an invalid grid in entity test

* Make content able to choose which log level leads to test failures

* Revert container test fix for Acruid

* Fix sprite, pipe and saving errors
Make EntityTest print all errors instead of stopping on the first

* Reorder singularity visualizer

* Disable pvs for container occlusion adn simple predict reconcile, they use entities other than map ones

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2021-03-31 21:41:23 +02:00
Swept
29d02a3740 Attempts to fix all physics bugs at once (#3610)
* Fixed Rack/Shelf

* Fixes bookshelf, bed

* Placeable for beds for bedsheets

* Bunch of Physics changes, ask metalgearsloth about em'

* More modifications

* More

* Other stuff

* Organizes entities yaml a little bit

* Something new

* Fixed, happy with the state of this rn

* A

* A

* Ye

* E

* Done for now...

* Applied Reviws

* Changes

* Fix the robust commit

* Fixes tests?

* E

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2021-03-26 12:51:26 +11:00
metalgearsloth
4d064abcd7 Physics (#3485)
* Content side new physics structure

* BroadPhase outline done

* But we need to fix WorldAABB

* Fix static pvs AABB

* Fix import

* Rando fixes

* B is for balloon

* Change human mob hitbox to circle

* Decent movement

* Start adding friction to player controller

I think it's the best way to go about it to keep other objects somewhat consistent for physics.

* This baby can fit so many physics bugs in it.

* Slight mob mover optimisations.

* Player mover kinda works okay.

* Beginnings of testbed

* More testbed

* Circlestack bed

* Namespaces

* BB fixes

* Pull WorldAABB

* Joint pulling

* Semi-decent movement I guess.

* Pulling better

* Bullet controller + old movement

* im too dumb for this shit

* Use kinematic mob controller again

It's probably for the best TBH

* Stashed shitcode

* Remove SlipController

* In which movement code is entirely refactored

* Singularity fix

* Fix ApplyLinearImpulse

* MoveRelay fix

* Fix door collisions

* Disable subfloor collisions

Saves on broadphase a fair bit

* Re-implement ClimbController

* Zumzum's pressure

* Laggy item throwing

* Minor atmos change

* Some caching

* Optimise controllers

* Optimise CollideWith to hell and back

* Re-do throwing and tile friction

* Landing too

* Optimise controllers

* Move CCVars and other stuff swept is beautiful

* Cleanup a bunch of controllers

* Fix shooting and high pressure movement controller

* Flashing improvements

* Stuff and things

* Combat collisions

* Combat mode collisions

* Pulling distance joint again

* Cleanup physics interfaces

* More like scuffedularity

* Shit's fucked

* Haha tests go green

* Bigmoneycrab

* Fix dupe pulling

* Zumzum's based fix

* Don't run tile friction for non-predicted bodies

* Experimental pulling improvement

* Everything's a poly now

* Optimise AI region debugging a bit

Could still be better but should improve default performance a LOT

* Mover no updater

* Crazy kinematic body idea

* Good collisions

* KinematicController

* Fix aghost

* Throwing refactor

* Pushing cleanup

* Fix throwing and footstep sounds

* Frametime in ICollideBehavior

* Fix stuff

* Actually fix weightlessness

* Optimise collision behaviors a lot

* Make open lockers still collide with walls

* powwweeerrrrr

* Merge master proper

* AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

* AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

* AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

* Ch ch ch changesss

* SHIP IT

* Fix #if DEBUG

* Fix vaulting and item locker collision

* Fix throwing

* Editing yaml by hand what can go wrong

* on

* Last yaml fixes

* Okay now it's fixed

* Linter

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
Co-authored-by: Vera Aguilera Puerto <zddm@outlook.es>
2021-03-08 04:09:59 +11:00
Pieter-Jan Briers
1eb0fbd8d0 Revert "Physics (#3452)"
This reverts commit 3e64fd56a1.
2021-02-28 18:49:48 +01:00
metalgearsloth
3e64fd56a1 Physics (#3452)
* Content side new physics structure

* BroadPhase outline done

* But we need to fix WorldAABB

* Fix static pvs AABB

* Fix import

* Rando fixes

* B is for balloon

* Change human mob hitbox to circle

* Decent movement

* Start adding friction to player controller

I think it's the best way to go about it to keep other objects somewhat consistent for physics.

* This baby can fit so many physics bugs in it.

* Slight mob mover optimisations.

* Player mover kinda works okay.

* Beginnings of testbed

* More testbed

* Circlestack bed

* Namespaces

* BB fixes

* Pull WorldAABB

* Joint pulling

* Semi-decent movement I guess.

* Pulling better

* Bullet controller + old movement

* im too dumb for this shit

* Use kinematic mob controller again

It's probably for the best TBH

* Stashed shitcode

* Remove SlipController

* In which movement code is entirely refactored

* Singularity fix

* Fix ApplyLinearImpulse

* MoveRelay fix

* Fix door collisions

* Disable subfloor collisions

Saves on broadphase a fair bit

* Re-implement ClimbController

* Zumzum's pressure

* Laggy item throwing

* Minor atmos change

* Some caching

* Optimise controllers

* Optimise CollideWith to hell and back

* Re-do throwing and tile friction

* Landing too

* Optimise controllers

* Move CCVars and other stuff swept is beautiful

* Cleanup a bunch of controllers

* Fix shooting and high pressure movement controller

* Flashing improvements

* Stuff and things

* Combat collisions

* Combat mode collisions

* Pulling distance joint again

* Cleanup physics interfaces

* More like scuffedularity

* Shit's fucked

* Haha tests go green

* Bigmoneycrab

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2021-03-01 03:11:29 +11:00
DrSmugleaf
41e72e8fc5 Make EntityPrototypeComponentsTest show the path of a badly formatted file 2021-02-22 14:58:16 +01:00
DrSmugleaf
4637bdf60e Add integration test for unknown components in prototypes (#3342) 2021-02-21 13:40:47 +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
294b7c4d7f Cleanup integration tests prototype usage, naming and unused variables (#3114)
* Fix naming of prototypes variable in tests

* Remove unused variables in tests

* Remove unused variables in tests

* Replace content entities with test entities

* Fix airlock and lung test
2021-02-09 22:04:47 +01:00
DrSmugleaf
4272716289 Make integration tests use an empty map instead of saltern by default (#3094) 2021-02-07 00:32:48 +11:00
metalgearsloth
7ed07c0cac Cuff enhancements (#3087)
* Cuff enhancements

* Cuffs now have an OnClick for the alert to remove them
* nullables
* Use default interaction range so highlights are accurate
* Cuffing fails more gracely
* Make shared abstract and add component references to client / server
* Don't cache AudioSystem and HandsComponent given cuffs are rarely used

* Fix test

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2021-02-05 17:11:21 +01:00
Acruid
8b5d66050a Console Unify API Changes (#3059)
* Remove unused IChatCommand.

* Lots of refactoring into a shared context.

* Removed ICommonSession from server concmd Execute.

* Added argStr parameter to concmd execute.

* The execute function of client concmds now returns void, use the new shell.RemoteExecuteCommand function to forward commands.

* Finally move shells and commands into shared.

* Console commands can now be registered directly without a class in a shared context.

* Engine API Changes.

* Repair rebase damage.

* Update Submodule.
2021-02-01 16:49:43 -08:00
chairbender
9a3dee2042 Hotbar Improvements + Item Action Integration Test (#2749)
* my IDE keeps wanting to change this so....

* Add item actions integration test, fix bug where empty item action
dict was left in SharedActionsComponent state

* bigger hotbar arrows

* nice wide hotbar pagination hitboxes

* add ability to switch hotbar loadout
via keybinds

* always highlight on drag over
of actions hotbar

* dont rely on content entity for integration test
2020-12-22 15:41:56 +01:00
chairbender
7a3c281f60 Actions System + UI (#2710)
Co-authored-by: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
2020-12-13 23:28:20 +01:00