Commit Graph
1571 Commits
Author SHA1 Message Date
f2625bf5c5 Removes IMapManager (#6584)
* Move MapManager queries to SharedMapSystem
Moves all variants of FindGridsIntersecting/TryFindGridAt to SharedMapSystem
Hollows out the MapManager methods and converts them into relays to SharedMapSystem

* Move CreateGrid to SharedMapSystem
Moves the functionality for CreateGrid and its variants to SharedMapSystem
Hollows out the MapManager methods and converts them into relays for the SharedMapSystem methods
Obsoletes them too
Also moves over the GetAllMapGrids and GetAllGrids methods

* Move RaiseOnTileChanged to SharedMapSystem
Also moves the SuppressOnTileChanged flag member to SharedMapSystem
Hollows out and obsoletes the MapManager versions

* Move default value constants to SharedMapSystem

* Converts map pausing events into LocalizedEntityCommands

* Move MapManager related delegates/structs to SharedMapSystem
Moves the GridCreationOptions struct to the same namespace as SharedMapSystem and converts it into a record struct
Move the GridCallback delegates to the same namespace as SharedMapSystem

* Move CullDeletionHistory to SharedMapSystem
Well, that was less painful than I thought it would be

* Actually obsolete the NetworkedMapManager method

* Rename file

* Doc comments for new SharedMapSystem methods

* Doc comment

* Doc comments

* Fix access

* Purge all references to IMapManagerInternal

* Cull easy IMapManager references

* The rest

* Purge IMapManager

* Private internal FindGridsIntersecting method

* please die

* 41

* notes

---------

Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
2026-07-01 19:32:17 -07:00
1322177e62 IEntitySystem Event Subscription Code Generation (#6227)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2026-07-01 13:30:23 +10:00
WhatstoneandGitHub dfe1d4ef8a Cleanup: ProtoMan Part 3 - remove redundant EntitySystem IPrototypeManager, IComponentFactory instances (#6693) 2026-06-30 17:12:55 +10:00
c3f80b99bd Change SpawnAtPoisition EntityCoordinates overload to use the rotation of the attached entity, and to allow a rotation override. (#6527)
* minor API addition

* better

* I forgor

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2026-06-28 20:56:10 +10:00
TemporalOroborosandGitHub 5dbf86fb93 IMapManager to hospice care (#6579)
* Move MapManager queries to SharedMapSystem
Moves all variants of FindGridsIntersecting/TryFindGridAt to SharedMapSystem
Hollows out the MapManager methods and converts them into relays to SharedMapSystem

* Move CreateGrid to SharedMapSystem
Moves the functionality for CreateGrid and its variants to SharedMapSystem
Hollows out the MapManager methods and converts them into relays for the SharedMapSystem methods
Obsoletes them too
Also moves over the GetAllMapGrids and GetAllGrids methods

* Move RaiseOnTileChanged to SharedMapSystem
Also moves the SuppressOnTileChanged flag member to SharedMapSystem
Hollows out and obsoletes the MapManager versions

* Move default value constants to SharedMapSystem

* Converts map pausing events into LocalizedEntityCommands

* Move MapManager related delegates/structs to SharedMapSystem
Moves the GridCreationOptions struct to the same namespace as SharedMapSystem and converts it into a record struct
Move the GridCallback delegates to the same namespace as SharedMapSystem

* Move CullDeletionHistory to SharedMapSystem
Well, that was less painful than I thought it would be

* Actually obsolete the NetworkedMapManager method

* Rename file

* Doc comments for new SharedMapSystem methods

* Doc comment

* Doc comments

* Fix access
2026-06-27 18:33:48 +10:00
DrSmugleafandGitHub c51009d4f0 Allow foreach with EntityQueryEnumerator and AllEntityQueryEnumerator (#6660) 2026-06-27 17:58:16 +10:00
metalgearslothandGitHub d07c1af29b Early-out PVS updates on rotation (#133) 2026-06-24 22:39:36 +10:00
metalgearslothandGitHub e568c7ba78 LocalRotation normalize + obsolete setter (#125) 2026-06-21 16:08:30 +10:00
metalgearsloth 751952a85f Merge remote-tracking branch 'upstream/master' into 2026-06-18-bui-message 2026-06-19 20:32:18 +10:00
deltanedas e1ebbd0acb ! 2026-06-18 15:17:41 +01:00
deltanedas a008dda4fa add pure 2026-06-18 15:15:42 +01:00
metalgearsloth cb768d2aa5 Raise a BUI message on any input
The bound wrapper is internal only and I don't want these filtered out by UI validation.
2026-06-18 17:21:47 +10:00
deltanedasanddeltanedas 9160f48608 fix remark on no ignored components 2026-06-17 19:54:42 +01:00
deltanedasanddeltanedas dc2cbd952f CompName gaming 2026-06-17 19:54:42 +01:00
6522ff42ec Apply suggestions from code review
Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
2026-06-17 19:54:42 +01:00
a86e33ccb6 a
Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
2026-06-17 19:54:42 +01:00
deltanedasanddeltanedas c12e4e7acc add HasComp proxy methods for EntProtoId and EntityPrototype 2026-06-17 19:54:42 +01:00
deltanedasanddeltanedas c9d5f31fbf add Proto field to EntitySystem for proxy and all systems to use 2026-06-17 19:54:41 +01:00
metalgearslothandGitHub 338825c8e7 Add Pure attr to EntityLookup bounds methods (#6622) 2026-06-09 16:54:31 +02:00
611023acbc Add SharedMapSystem.GetFilledTileCount (#6562)
* Add SharedMapSystem.GetFilledTileCount

* Update Robust.Shared/GameObjects/Systems/SharedMapSystem.Grid.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2026-05-22 16:57:11 -04:00
f68abaab68 EntityManager Singleton methods (#6445)
* Implement the singleton methods.

* Fix API + Tests.

* Move remark.

* Typo fix + Proxies.

* Pause remarks.

* No, really, we don't obey paused!

* Release notes.

* testdocs.

* Poke

* The API design axe.

* Update Robust.Shared.IntegrationTests/GameObjects/EntityManagerSingletonTests.cs

Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>

* Remove unused doc comment blerb

---------

Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2026-05-08 12:49:54 +02: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
TayrtahnandGitHub 60d6114906 Fix SetCoordinates causing unexpected reparenting (#6533)
* Don't check for grid traversal when we already know the new parent

* Actually, we shouldn't ever need to check for grid traversal in SetCoordinates
2026-04-25 01:04:00 -04:00
DrSmugleafandGitHub 437a65ffd1 Fix TryGetEntitySystem and GetEntitySystemOrNull throwing with uninitialized EntitySystemManager (#6512) 2026-04-07 12:51:57 -04:00
TayrtahnandGitHub 1666a3a704 Fix BUI EntitySystem injection (#6515)
* Disable injection when creating BUI instances (the constructor will take care of it)

* Comment

* Release note
2026-04-07 12:51:03 -04:00
slarticodefastandGitHub a516aa2414 Fully Obsolete TimerComponent (#6475)
remove timer comp
2026-03-25 00:31:14 -04:00
TayrtahnandGitHub d2792926e5 Remove [Virtual] attributes from abstract/sealed classes (#6482)
Removed [Virtual] attributes that shouldn't be there
2026-03-24 23:41:58 -04:00
TayrtahnandGitHub fcc2c01d01 Revert "Revert "Add analyzer & fixer to detect when proxy methods are not used (ProxyForAttribute)"" (#6439)
Revert "Revert "Add analyzer & fixer to detect when proxy methods are not use…"

This reverts commit 1af32c3129.
2026-03-07 11:32:01 -05:00
e428a341e1 Debug assertions + a throw in RemoveComponentImmediate. (#6437)
* Debug assertions + a throw in RemoveComponentImmediate.

* nit

* Update Robust.Shared/GameObjects/EntityManager.Components.cs

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>

---------

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
2026-03-04 11:26:39 -05:00
TayrtahnandGitHub 1af32c3129 Revert "Add analyzer & fixer to detect when proxy methods are not used (ProxyForAttribute)" (#6430)
Revert "Add analyzer & fixer to detect when proxy methods are not used (`Prox…"

This reverts commit db1d3054ac.
2026-02-27 08:46:58 -05:00
TayrtahnandGitHub db1d3054ac Add analyzer & fixer to detect when proxy methods are not used (ProxyForAttribute) (#6026)
* Attribute, analyzer, and tests

* Add attribute to EntitySystem methods

* Code fixer for redundant method name

* Code fixer for proxy substitution

* Comments

* Improve error message when target method is not found

* Modify AddComp signature to match AddComponent (Component -> IComponent)

* Revert "Modify AddComp signature to match AddComponent (Component -> IComponent)"

This reverts commit 1939d11765.

* Check that proxy and target have matching type constraints

* Reapply "Modify AddComp signature to match AddComponent (Component -> IComponent)"

This reverts commit a65ea71b9b.

Might as well include this, since the file needs to be changed anyway.

* Boost efficiency by only searching for proxy methods once.
Previously we searched with each method invocation.
This also lets us skip analysis on classes with no proxy methods available.

* Revert unrelated change

* Fine, I'll do it properly

* Misleading method name

* Preserve trivia when when replacing method

* Prevent flagging method calls on non-member variables

* Prevent flagging method calls on other classes

* Switch to new HasAttribute helper

* comment fix

* Switch ProxyMethod from struct to class

* Kill TryGetAttributeSyntax

* Move member owner check to helper

* Use helper for proxy method search

* meh

* A little bit of documentation never hurt anybody

* Test attributes

* Convert AnalyzeDeclaration from SyntaxNodeAction to OperationAction

* You can keep the comment though
2026-02-27 08:22:41 -05:00
pathetic meowmeowandGitHub ea5394f06b Make UserInterfaceComponent#Interfaces AlwaysPushInheritance (#6426) 2026-02-27 08:16:28 -05:00
AftrLiteandGitHub 07da4c9eac Add [Animatable] to SharedPointlightComponent's Offset (#6429)
make Pointlights' offset animatable
2026-02-27 08:16:12 -05:00
DrSmugleafandGitHub fe1648d290 Make EntitySystemManager.DependencyCollection inject EntityQuery, make BUIs inject systems and entity queries (#6394)
* Make EntitySystemManager.DependencyCollection inject EntityQuery

* Make BUIs inject systems and entity queries

* Fix import

* We parallelize those

* RIDER I BEG YOU

* Mocked unit tests are my passion

* Perhaps we do not care about fractional milliseconds

* Forgor to make it debug only

* Use Parallel.For instead of ForEach

* Rider I am going to become the joker

* Fix EntMan resolve

* Now with lazy resolve technology

* Use GetOrAdd
2026-02-05 21:35:52 +01:00
5e160e26ee Prevent a potential EnsureComp exception. (#6405)
Fix potential EnsureComponent collision

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2026-01-31 09:59:39 -05:00
DrSmugleafandGitHub 4c87e6185f Add ProfManager.Value guard, write first command argument as a ProfManager value in ExecuteInShell (#6400)
* Add ProfManager.Value guard, write first command argument as a ProfManager value in ExecuteInShell

* Make EntitySystemManager use the new Value method
2026-01-28 21:26:01 +01:00
PJB3005 3bec89aaa5 Fix MapCoordinate spawns using grid-relative rotation
This was an undocumented breaking change introduced by https://github.com/space-wizards/RobustToolbox/pull/5915. The behavior does not make much sense: you're specifying coordinates relative to the map, so the rotation should be relative to the map too.
2026-01-26 19:20:12 +01:00
df98bca4bc Fix Erronius entity deletion on grid deletion from SetTiles() (#6367)
Don't delete the grid *before* we raise the event???

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2026-01-19 20:39:49 +01:00
PJB3005 bb81d88653 Add [NotContentImplementable] to shared interfaces 2025-12-20 16:49:35 +01:00
ArtisticRoombaandGitHub 077ad1929e Expand SharedUserInterfaceSystem API (#6342)
* Expand SharedUserInterfaceSystem API

* addr reviews
2025-12-18 22:05:33 +01:00
d7abbad717 Add validation for DirtyField strings (#5713)
* Add ValidateMemberAttribute, analyzer and test

* Use attribute on DirtyFields methods

* Defer member lookup

* Additional test case

* Add support for collection types

* Poke tests

* Revert "Add support for collection types"

This reverts commit 2b8f5534bd.

* break, not continue

* Cheaper attribute check with AttributeHelper

* Clean up unused helper method

---------

Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2025-12-17 19:32:34 +01:00
deltanedasGitHubdeltanedas <@deltanedas:kde.org>
d548bce347 make EntityQuery.Resolve error not useless (#6320)
* make EntityQuery.Resolve error not useless

* it actually wasnt that bad

* goida

* make EntityQuery constructor internal

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2025-12-16 14:23:47 +01:00
4747e5a05a Add and update a lot of documentation (#6337)
* Serialization docs

Co-authored-by: Moony <moonheart08@users.noreply.github.com>

* ECS docs

Co-authored-by: Moony <moonheart08@users.noreply.github.com>

* scattered docs

Co-authored-by: Moony <moonheart08@users.noreply.github.com>

* Fixes

---------

Co-authored-by: Moony <moonheart08@users.noreply.github.com>
Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2025-12-15 20:26:17 +01:00
PJB3005 0414cde339 Remove recursion from TilesEnumerator
We love stack overflowing, Rider refactor go brr

Fixes #6330
2025-12-08 00:54:13 +01:00
PJB3005 9d45357ca9 Enable C# 14, fix a nullability error 2025-12-04 17:49:46 +01:00
B_KirillandGitHub 3175a6cb2b Cleanup warnings: CS0162, CS0618, CS0649 (#6309)
* Cleanup

* Revert TagHandler for now

* Probably deleting it would be better
2025-12-01 15:02:25 +01:00
b15d960c69 Try improve RaiseEvent performance (#5925)
* IEventBus -> EventBus

* Fix CompIdx.RefArray

* IEntityManager -> EntityManager

* Remove double delegate

* Add GetNetCompEventHandlers()

* release notes & cleanup

* Make PVS use GetNetCompEventHandlers

* I love event bus tests

* also fix pvs pause test

* dont trimm

---------

Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2025-11-13 21:32:40 +11:00
3f19d25018 Box Simd (#6193)
* Box Simd

* Add 256 bit version of GetAABB

* Add AABB bechmarks

* No real diff between 128 & 256, so removing 256

| Method     | Mean      | Error     | StdDev    | Ratio |
|----------- |----------:|----------:|----------:|------:|
| GetAABB    | 5.8107 ns | 0.0154 ns | 0.0137 ns |  1.00 |
| GetAABB128 | 0.4927 ns | 0.0003 ns | 0.0002 ns |  0.08 |
| GetAABB256 | 0.4332 ns | 0.0006 ns | 0.0006 ns |  0.07 |

* Add Box2Rotated.Transform Benchmark

* Results

20% faster and much smaller code. Also I don't think it inlined RotateVec

* Add Matrix3x2Helper.TransformBox() benchmark

new:

| Method    | Mean     | Error     | StdDev    | Code Size |
|---------- |---------:|----------:|----------:|----------:|
| Transform | 2.463 ns | 0.0766 ns | 0.0679 ns |     216 B |

old:
| Method    | Mean     | Error     | StdDev    | Median   | Code Size |
|---------- |---------:|----------:|----------:|---------:|----------:|
| Transform | 9.469 ns | 0.2140 ns | 0.5408 ns | 9.206 ns |     621 B |

* Fix polygon constructor

* SlimPolygonBenchmark

* use new SimdHelper for other methods

* Fix bugs

* Use new methods

* Simd SlimPolygon.ComputeAABB

* Move simd transform to physics

* Cleanup

* Remove uneccesary Unsafe.SkipInit

* These tests all work on master

* Add Transform.MulSimd test

* Add SlimPolygon constructor tests

* Add ComputeAABB test

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2025-11-10 18:30:08 +11:00
bb4c4ed302 Fix PredictedQueueDeleteEntity mispredicts (#6260)
* Fix PredictedQueueDeleteEntity

* typo

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2025-10-27 23:04:12 +11:00
metalgearslothandGitHub 8478e62a3e Add pure to some transform methods (#6262)
Useful IDE stuff
2025-10-22 18:47:02 +02:00