Commit Graph
42 Commits
Author SHA1 Message Date
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
TayrtahnandGitHub 196e59b7e4 Clean up all missing EntitySystem proxy method uses (#6027)
* Clean up all missing EntitySystem proxy method uses

* Restore comment

* Fix bad change that caused closure allocation

* tuple

* Revert "tuple"

This reverts commit 14581a40aa.

* Revert "Fix bad change that caused closure allocation"

This reverts commit 215b2559ed.

* Revert "Restore comment"

This reverts commit 4a47a36557.

* Revert "Clean up all missing EntitySystem proxy method uses"

This reverts commit 3b1fe4ce7f.

* Redo with improved code fixer.
Let's see how it fares this time
2025-06-21 00:05:09 +02:00
MervillandGitHub 4e73d72753 Remove unused IoC dependencies (#5419) 2024-09-01 23:23:02 +02:00
Pieter-Jan BriersandGitHub 7fbcfeaa8f Warning fixes (#5275)
* Warning fixes in Robust.Shared

* Robust.Client warning fixes

* Fix test failure

Test failures were due to broken system registrations for the client RobustUnitTest. It was accidentally registering some server systems, which means DebugPhysicsSystem wasn't gettings its dependencies properly.

Fixing this meant pulling half a dozen extra dependencies that client ContainerSystem and TransformSystem are supposed to have, but didn't.
2024-07-10 01:38:32 +02:00
Tornado TechandGitHub 3e3cd0e257 Fixed incmd command (#5192)
* Fixed incmd command

* Change `HandleInputCommand` argument type

* Localize console errors

* Why is input code even like this
2024-06-05 16:32:56 +10:00
TayrtahnandGitHub 1f2b38a6d1 Code cleanup: Purge calls to obsolete EntityCoordinates methods (#4983) 2024-03-23 13:07:33 +11:00
Pieter-Jan Briers a3047b1687 More warning fixes 2024-02-11 15:51:07 +01:00
Leon FriedrichandGitHub 5a6c4220fc IPlayerManager refactor (#4518) 2023-10-24 20:18:58 +11:00
metalgearslothandGitHub 3fd731d917 Network entity ids (#4252) 2023-09-11 09:42:55 +10:00
Pieter-Jan Briers 409fe1a125 Some warning fixes 2023-08-27 15:35:15 +02:00
metalgearslothandGitHub 7d1ad527d9 Replace Robust Vector2 with System.Numerics (#4092) 2023-07-08 14:08:26 +10:00
Pieter-Jan Briers 1da229549d Remove some Logger usages from client.
About all I could muster before I got bored.
2023-06-10 00:19:09 +02:00
AcruidandGitHub 13da0a7925 Adds command buffer to client, and input command injection (#2538)
Adds the command buffer to the console.
adds wait <ticks> command to console.
Adds the `incmd` command to inject input commands directly into the simulation, bypassing the frontend.
Removes client side permission check for debug builds.
2022-02-18 19:27:38 -08: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
Pieter-Jan Briers 069ebbc8d0 Make disabled prediction work again.
Simulation input and Update() does not happen when prediction is disabled. Both of these can be re-opted in on a per-handler/system basis with a bool flag. Stuff like physics opts out of this now.
2021-12-30 03:03:39 +01:00
Wrexbe 90596c8979 Fixed It 2021-12-05 18:12:56 -08:00
DrSmugleaf 36f582a712 Fix errors 2021-12-05 21:02:03 +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
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 e93ae73e50 Inline TryGetComponent completely, for real 2021-12-03 14:17:01 +01:00
Vera Aguilera Puerto bbf5e92f32 Inline IsValid 2021-12-03 11:32:53 +01:00
Vera Aguilera Puerto 69158de99b Inline Prototype 2021-12-03 11:13:58 +01:00
DrSmugleafandGitHub 5a3000febb Add directed events for player attach/detach (#1815) 2021-06-12 01:45:43 +02:00
Vera Aguilera PuertoandGitHub 02af42da30 Refactors EntityManager to not do any networking. (#1695)
* Refactors EntityManager to not do any networking.
ServerEntityManager and ClientEntityManager now do the networking instead.

* Rename property for "backwards compat."

* Remove comented out code in robust server simulation
2021-04-14 11:39:21 -07:00
AcruidandGitHub f7e8178736 Added new ComponentEvents system in IEventBus. (#1601)
* Added new ComponentEventBus, combined it with IEventBus.

* Removed all traces of IEntity from ComponentDependencies.
Removed IEntityManager dependency from ComponentManager.

* Added entity create/delete events to IEntityManager.

* ComponentEvents now use EntitySystemMessages instead of their custom ComponentEvent class.

* Component events are now just overloads of entity events.

* Removed obsolete EntitySystemMessage, now everything uses the base EntityEventArgs.

* Add a bool argument for if the message should be broadcast as well as directed.
Fix ordering and init issues of events in EntityManager.

* Changed names from Component/Entity events to Directed/Broadcast.

* Fix bugs and unit tests.
2021-03-09 11:02:24 -08:00
DrSmugleafandGitHub 17182dd0e8 Engine PR for enabling nullability in Content.Client (#1565) 2021-02-16 20:05:06 +01: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
Vera Aguilera PuertoandGitHub 76b15dda70 Client-side addcompc/rmcompc (#1497) 2021-01-10 20:09:14 +01:00
Pieter-Jan Briers d4fc0517c4 Fix IEntity.TryGetComponent nullability signatures.
This means all invocations of TryGetComponent now need a nullable parameter because, well, the result can be null. that's the point.
2020-08-20 15:31:18 +02:00
ShadowCommanderandGitHub 8b931fc56e Fix input handling and stop input when a cmd returns true (#1222) 2020-08-15 00:31:09 +02:00
437bf58e7b Input Handling + other cleanups to support click drag functionality (#1132)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-07-06 21:21:13 +02:00
Pieter-Jan BriersandGitHub 31fb65bcb9 Movement prediction work. (#1144)
* Fix client-side input system not sending sequence numbers for input messages.

This caused message ordering issues and keys getting stuck down.

* Make sure EyeUpdateSystem runs after physics.

* IGameTiming.TickFraction helper.

* Subtick data for input commands.

* Literally a unit test to verify that I wasn't going insane while debugging input message ordering issues.

* More prediction logs behind net.predict.

* Move physics to shared and run it on the client.

* Synchronize grid gravity.

* Fix ResetPredictedEntities crash when entities get deleted server-side.

* Fix CollidableComponent setters not calling Dirty()

* Fix going into space while predicting.

* Watch window uses history line edit.

* Fix unpredicted objects stuck-jittering.

* VV tags for interp vars on transform.

* Fix 0 mass objects on client.

* Fix friction calculations being TPS dependent.

* Reset predict flag on handelComponentState
2020-06-24 20:47:20 +02:00
Pieter-Jan BriersandGitHub 6674be3adc Client NRTs (#1121) 2020-06-12 12:57:39 +02:00
chairbenderandGitHub d148bde02b Command Binding System supporting multiple bindings (#1089) 2020-05-31 20:44:16 +02:00
Pieter-Jan BriersandGitHub 0c8f869cb4 Prediction (#1027) 2020-04-18 17:35:54 +02:00
AcruidandGitHub 728f58465d EntitySystem Event Refactor (#989)
* Removed the EntitySystem event implementation, it now uses the more advanced EventBus.
Removed EntitySystem.RegisterMessageTypes() function.
Removed EntitySystem.SubscribeEvents() function.
Added EntitySystemMessage.NetChannel field. This holds the remote net channel the event originated from.

* Removed the Sender object from events. If you needed this field, add it to the event class.

* Removed unused event proxy methods from Entity.
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-22 17:59:43 +01:00
Pieter-Jan Briers 64a8708762 Fix crashes from deleting oneself. 2020-02-08 17:10:37 +01:00
Pieter-Jan Briers d3997b51e8 Add assert that function in InputSystem.HandleInputCommand is correct. 2020-01-26 03:32:12 +01:00
Pieter-Jan BriersandGitHub bb4a1eda8e Project file refactor (#819)
* Project file refactor

Move all the .csproj files to the new .NET Core style.
This doesn't make any difference for compiling for Framework,
but it does reduce a ton of useless boilerplate.

As an extension of this, killed a bunch of uncompiled & unmaintained .cs files.

Compiling for release (to profile) works now.
Removed AnyCPU targets from the solution file.

* Fix compiler warnings.
2019-05-28 00:16:01 +02:00
SilverandGitHub 25926a17b7 Renames SS14.* to Robust.* (#793)
RobustToolbox projects should be named Robust.* 

This PR changes the RobustToolbox projects from SS14.* to Robust.*

Updates SS14.* prefixes/namespaces to Robust.*
Updates SpaceStation14.sln to RobustToolbox.sln
Updates MSBUILD/SS14.* to MSBUILD/Robust.*
Updates CSProject and MSBuild references for the above
Updates git_helper.py
Removes Runserver and Runclient as they are unusable
2019-04-15 20:24:59 -06:00