Commit Graph
53 Commits
Author SHA1 Message Date
DrSmugleafandGitHub 22d01166ff Rewrite ReflectionManager, make SerializationManager use it (#6877) 2026-08-07 16:49:41 +10:00
5d053dfabb Clean up Client ContainerSystem (#6563)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2026-08-01 15:28:35 +10:00
83c2a1be11 [Dependency] source generator part 2 (#6550)
* [Dependency] source generator

No more reflection, no more codegen at runtime

Also various changes to Roslyn helpers to make this easier to write.

Requires all types with dependencies to be partial and not have readonly dependency fields. An analyzer enforces this at warning level, the previous injection strategies have remained in the code *for now* as a fallback.

No fallback is available for [field: Dependency] properties, due to a Roslyn bug.

Code Fixes exist. We love Roslyn

* Apply dependencies generator changes to all code

* Release notes

* Preprocessor got hands

* Handle nullable dependencies

These are bad but gotta deal with it.

* Apply suggestions from code review

Co-authored-by: Moony <moony@hellomouse.net>

* Fine, let's not use collection expressions

---------

Co-authored-by: Moony <moony@hellomouse.net>
2026-05-08 12:38:33 +02:00
DrSmugleafandGitHub 2b1d755d9f Fix Container state handling not forcing inserts (#5916) 2025-05-11 22:45:31 +10:00
bd489e9218 A compilation of simple one-line fixes (#5661)
* Fix warnings in SharedJointSystem

* Fix reference to EC TransformComponent method
Replaces call to TransformComponent.GetMapUid with SharedTransformSystem.GetMap

* Fix obsolete calls in SharedPhysicsSystem.Contacts.cs
Fixes a couple calls to obsolete varients of SetAwake and an obsolete call to RegenerateContacts by converting them to their Entity<T> varients

* Fix obsolete call in SharedPhysicsSystem.Components.cs
Adds one set of parenthesis to convert a 'uid, comp, comp, comp' call to an 'Entity<T, T, T> call.

* Removes unused local var
Removes an unused list of broadphases that was being allocated in TryCollideRect

* One-line fixes in SharedPhysicsSystem.Islands.cs
Fixes all of the easy warnings regarding physics island processing, the rest require more complicated changes than a simple argument rearrangement

* Fix obsolete method call in SharedMapSystem

* Fix a few obsolete ToMap calls in EntityLookup.Queries

* Fix calls to obsolete EntityCoordinate methods in SharedMapSystem.Grids

* Fix calls to obsolete EntityCoordinate methods in SharedLookupSystem.ComponentQueries

* Fix a few obsolete method calls in entity spawning

* Fix obsolete method calls in MapLoaderSystem

* Fix obsolete method call in GridFixtureSystem

* Fix obsolete IsMapInitialized call in SaveMap command

* Fix obsolete MapPosition reference in Client.EyeSystem

* Fix obsolete EntitySystem.Get<TSystem> references in DebugLightTreeSystem

* Fix obsolete EntitySystem.Get<TSystem> reference in DebugEntityLookup command

* Fix obsolete method calls in SpriteBoundsOverlay
Slightly more complicated than the rest, but it's really just changing an unused dependency over to use SharedTransformSystem

* Remove unused IClyde references from controls
LineEdit and TextEdit never use their IClyde dependencies and it generates a warning so yeet

* Remove use of EntitySystem.Get from lightbb command

* Fix DebugDrawingSystem
Removes a bunch of unused private IEntityManager vars
Also removes an obsolete use of TransformComponent.GetWorldPositionRotation

* Removes duplicate position set when splitting grids
There's nothing saying why this is this way and the blame looks like it was an oversight when replacing a bit where they set position and then rotation
Please, oh Chesterton's Fence, spare me your wrath

* Fix obsolete method use in PlacementMode

* Fix obsolete method use in Placement Modes

* Removes unused local var in gamestate management

* Fix unreachable code warnings in gamestate management
Use #else sections to make sure they don't complain about being on the wrong side of a throw

* Fix obsolete ToMap use in EyeManager

* Make InputManager use a sawmill to log

* Fix obsolete ContainerManagerComponent method calls in ContainerSystem

* Make ClientPrototypeManager use a sawmill for logging

* poke tests

* Use LocalizedEntityCommands for SpriteBoundsOverlay toggle

* Use LocalizedEntityCommands for system toggles

---------

Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
2025-04-17 11:57:03 +10:00
SpaceManiacandGitHub 0c7ace16d1 Fix most non-obsolete warnings (#5555) 2024-12-13 01:25:00 +01:00
Nikolai KorolevandGitHub 9bb7af364e Fix warning for using non-generic variant of TryComp for MetaDataComponent and TransformComponent RA0030 (#5531)
* Fix warning for using non-generic variant of TryComp for MetaDataComponent RA0030 (Use non-generic variant)

* Use non-generic variant of TryComp for TransformComponent
2024-11-22 01:30:55 +01:00
MervillandGitHub 4e73d72753 Remove unused IoC dependencies (#5419) 2024-09-01 23:23:02 +02:00
Leon FriedrichandGitHub 1f7a9bdf0a Remove container IoC resolves (#5172) 2024-05-26 13:19:52 +10:00
2b55d39e51 Make various ValueList enumerators use spans (#5019)
* Make various ValueList enumerators use spans

* Remove reference to EntityEventBus.OrderedRegistration

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2024-03-31 17:01:03 +11:00
Leon FriedrichandGitHub 9e6d0aa44a Fix state handling bugs (#4810)
* Fix container state bug

* Fix _pendingReapplyNetStates bug
2024-01-05 15:11:00 +11:00
Leon FriedrichandGitHub 0b8febf6a6 FlushEntity() and EntityManager event changes (#4791) 2024-01-01 11:04:11 +11:00
bc84590a33 Make ChildEnumerator out value non-nullable (#4707)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-12-17 03:10:20 +11:00
TemporalOroborosandGitHub 56899b4e64 Some ContainerManagerComponent ECSing (#4622) 2023-12-12 13:24:18 +11:00
metalgearslothandGitHub 3fd731d917 Network entity ids (#4252) 2023-09-11 09:42:55 +10:00
metalgearslothandGitHub 039b70f502 Revert "Remove IContainer and move some functions to the system (#4351)" (#4361) 2023-09-10 21:46:17 +10:00
Leon FriedrichandGitHub 5e21dbdd7f Remove IContainer and move some functions to the system (#4351) 2023-09-10 12:17:00 +10:00
metalgearslothandGitHub 24be915ef1 Container minor stuff (#4089) 2023-05-28 21:41:51 +10:00
Leon FriedrichandGitHub 9b0139032b Fix container networking bugs (#3901) 2023-04-03 03:16:09 +10:00
Leon FriedrichandGitHub 302af71764 EmptyContainer tweaks (#3819) 2023-03-15 11:12:04 +11:00
metalgearslothandGitHub fb0907a1a4 Remove EntityInitializedMessage (#3657) 2023-01-05 20:00:47 +11:00
Leon FriedrichandGitHub 054a908efd Generalize component trees (#3598) 2022-12-27 13:33:46 +11:00
Leon FriedrichandGitHub 2b594f6356 Cache broadphases and container rejig (#3407) 2022-10-31 10:06:08 +11:00
Leon FriedrichandGitHub 5e6e5cb5ea Fix container debug assert (#3244) 2022-09-13 07:44:26 +10:00
Leon FriedrichandGitHub da01040b52 Hopefully fix container issues? (#3174) 2022-08-23 16:35:02 +10:00
Leon FriedrichandGitHub 2c6f4cd80c Fix PVS/container bug (#3155) 2022-08-21 16:06:44 +10:00
Leon FriedrichandGitHub fa2b0233c3 ECS detach to null (#2997)
* ECS detach to null

* fix crash
2022-06-29 13:17:58 +10:00
df4ebd6c8c No more spoopy invisible ghosts (#2910)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
2022-06-06 16:50:57 +10:00
Pieter-Jan Briers b4a7c5d47a Miniscule perf improvements to some component state handling.
Basically won't matter but it's a 0.3%.
2022-06-05 16:06:13 +02:00
metalgearslothandGitHub 3acbc8235d Funny struct enumerator for xform kids Part 2 (#2492) 2022-02-17 17:19:08 +11:00
Leon FriedrichandGitHub bcaa7001ad Hopefully fix container occlusion bug? (#2464) 2022-02-10 09:29:26 +01:00
de4d255841 Analyzer to enforce classes to be either [Virtual], abstract, or sealed. (#2469)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-02-05 19:31:58 +01:00
Leon FriedrichandGitHub 8f24a7b4fc Reduce ContainerHelper IoCManager resolves (#2498) 2022-02-04 12:51:29 +11:00
Vera Aguilera Puerto f8bf877b61 Fix weird lifestage autorefactors. 2021-12-09 12:39:42 +01:00
Paul 76b2909116 removes resolves 2021-12-08 00:09:41 +01:00
DrSmugleaf 163deff564 Fix 3000 errors 2021-12-05 18:13:33 +01:00
Wrexbe 5356523305 Client builds 2021-12-03 12:58:37 -08:00
20kdc 7b6d9bd719 Susser Todd: Robust.Client/Robust.Server: Error Pass 1 2021-12-03 19:57:19 +00:00
Vera Aguilera Puerto c39f6d09eb Lots of manual fixing. More to come. 2021-12-03 17:01:46 +01:00
Vera Aguilera Puerto 7a06db60cf Inline UID 2021-12-03 15:53:10 +01:00
Vera Aguilera Puerto 94e6886a85 Inline Transform 2021-12-03 14:20:35 +01:00
Vera Aguilera Puerto e93ae73e50 Inline TryGetComponent completely, for real 2021-12-03 14:17:01 +01:00
Vera Aguilera Puerto 7769252109 Inline Deleted 2021-12-03 11:30:03 +01:00
Javier Guardia FernándezandGitHub bfabc8e51a Fix deleting empty containers on the client deleting their previous contents (#2036) 2021-09-20 10:58:14 +02:00
Vera Aguilera PuertoandGitHub 84b7742656 Adds by-ref and struct event support to ComponentEvents (#1987) 2021-08-29 16:52:38 +02:00
ShadowCommanderandGitHub e16e0f4bd0 Fix containers with entities that do not exist yet (#1892)
* Fix containers that hold entities not on client

* Delete from ExpectedEntities when entity removed

* Fix ContainerSystem not registering on the server

* Move container state to entity system
Move client code to client

* Fix removal and clean up code

* Add test

* Add more checks to test

* Remove unneeded deletion event handler

When the child is deleted, if the entity does not exist on the client,
then HandleComponentState runs. If the entity does exist, then
HandleEntityInitialized would have run. Either way HandleEntityDeleted
is not needed.

* Renamed unexpected to removedExpected
2021-08-04 19:00:14 -07:00
AcruidandGitHub 24707b7385 Shared Containers (#1579)
* Added a basic server simulation framework for help with tests.

* Moved as much as possible to Robust.Shared/Containers.
Moved ContainerSlot from content to engine.

* Moved ClientContainer to shared.

* Merged client/server ContainerManagerComponents into a single shared version.

* ContainerManagerComponent is now implicitly registered with the attributes.

* Migrated to 2021 serialization technology.

* Existing Unit Tests work.

* More tests coverage.
Fixed bug with transferring items between containers.

* Container Type info is now sent over the network.

* Merge client/server container systems.

* Code cleanup.

* Attempted to fix dictionary serialization.
Logs warning when trying to check if an unknown GridId is paused.

* Remove OldCode.
2021-03-01 15:19:59 -08:00
AcruidandGitHub 2183cd7ca1 Massive Namespace Cleanup (#1544)
* Removed the Interfaces folder.
* All objects inside the GameObjects subfolders are now in the GameObjects namespace.
* Added a Resharper DotSettings file to mark the GameObjects subfolders as not providing namespaces.
* Simplified Robust.client.Graphics namespace.
* Automated remove redundant using statements.
2021-02-10 23:27:19 -08:00
b8e5b47e7a Use 'new' expression in places where the type is evident for the engine (#1415)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-11-26 00:16:55 +01:00
DTanxxxGitHubDavid Tan <>
791fcfd65e Updated ContainerHelpers to use new extensions (#1396)
Co-authored-by: David Tan <>
2020-11-09 09:22:31 +01:00