Commit Graph
93 Commits
Author SHA1 Message Date
CentroniasandGitHub 19a821e1df Adds two new Component lookup functions to EntitySystem: WithCompOrNull (#6139) 2026-08-08 16:35:30 +10:00
metalgearslothandGitHub ac13da4328 Add chunk entities (#6705) 2026-07-24 19:02:55 +10:00
RoudenandGitHub c2d0490a9e Add EntitySystem.TryComp(EntityUid, Type, out IComponent?) proxy method (#6746) 2026-07-08 22:26:21 +10:00
deltanedas e1ebbd0acb ! 2026-06-18 15:17:41 +01:00
deltanedas a008dda4fa add pure 2026-06-18 15:15: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
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
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
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
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
de188cc773 Defer PredictedQueueDel detachment on the client (#6154)
* Defer PredictedQueueDel detachment on the client

* release notes

* fixes

* I love ambiguous implicit casts

* avoid deferral issues

---------

Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
2025-09-26 19:13:14 +12:00
Pieter-Jan BriersandGitHub dcbe0505dc Revert "Add WeakEntityReference (#5577)" (#6112)
This reverts commit c3489d4ded.
2025-07-29 18:22:17 +02:00
c3489d4ded Add WeakEntityReference (#5577)
* Add WeakEntityReference

* Use NetEntity

* release notes

* A

* Fix merge conflicts

* comments

* A

* Add network serialization test

* Add ToPrettyString support for WeakEntityReference?

* inheritdoc

* Add GetWeakReference methods

* Not-nullable too

* Make EntitySystem proxy method signatures match EntityManager

* Add TryGetEntity

* interface

* fix test

* De-ref GetWeakReference methods

---------

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
2025-07-29 11:12:49 -04:00
TayrtahnandGitHub a74812ce5b Make AddComp where clause consistent with AddComponent (#6028) 2025-06-19 10:21:13 +10:00
metalgearslothandGitHub e5d6f194be Add nullable PredictedDel overloads (#5859)
Forgor when I updated it to Entity<T>
2025-04-19 17:47:25 +10:00
metalgearslothandGitHub 65d2f2dd2f Entity spawn prediction v1 (#5841)
* Entity spawn prediction v1

Client can't properly interact with this but that requires additional work on top so we can cleanly split this.

* This

* delete fix

* cats
2025-04-19 16:50:41 +10:00
MilonandGitHub 1029047e2f fix (#5752) 2025-03-20 22:30:59 +11:00
8a04a4f3a5 Add a method for copying components (#5654)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2025-02-21 09:46:13 +11:00
metalgearslothandGitHub d95aca3d9e Fix DirtyFields proxy method (#5684) 2025-02-20 00:15:05 +11:00
Leon FriedrichandGitHub 3f37846731 Avoid unnecessary DirtyField() calls (#5620) 2025-01-27 21:21:53 +11:00
9837c33de7 Add sourcegenned field deltas (#5155)
* Remove full "delta" states

* Update MapGridComponentState

* abstract ComponentState

* Release notes

* Fix tests

* Fix nullable errors

* A

* Sourcegen component deltas

* Audio deltas + methids

* Also eye

* Optimise out the dictionary

* Minor fixes

* Physics deltas

* Also this

* Fix field deltas

* remove old release notes

* Make IComponentDelta implement IComponent

* add sourcegen launch settings

* make silent error loud

* Review

* UI deltas

* Slimmer

* Sourcegen bandaid

---------

Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
2024-12-21 15:48:33 +11:00
KaraandGitHub 48d70a09c6 Remove most fully-obsoleted code (#5433) 2024-09-11 19:38:26 +10:00
c3d8080a8e Add PreferNonGenericVariantFor attribute and analyzer (#5190)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2024-07-10 12:33:56 +02:00
metalgearslothandGitHub 7ad2925f2c Add TryQueueDeleteEntity (#5281)
Having to check deleted by hand up front is annoying.
2024-07-09 23:32:17 +02:00
DrSmugleafandGitHub 5aa9378de0 Add an overload of TerminatingOrDeleted with a nullable EntityUid (#5214) 2024-06-08 20:51:05 +10:00
Leon FriedrichandGitHub 68e5b6924d Add ComponentRegistry overrides to more entity spawn methods (#5051) 2024-04-19 13:16:17 +10:00
keronshbandGitHub c5aa735506 Adds rotation to Map Position spawns (#5047)
* add angle to rotation

* fixes inheritance

* proxy

* Fixes maprot

* changes angle to default and uses set coords overload
2024-04-18 14:25:07 +10:00
Leon FriedrichandGitHub d5c4981648 Partial MapManager refactor (#5042)
* MapManager rejig

* Update Tests

* A
2024-04-18 14:05:02 +10:00
DrSmugleafandGitHub 179c6790b6 Add support for automatically networking component dictionary fields with entity keys and values (#4932)
* Add support for automatically networking component dictionary fields with entity keys and values

* Fix using

* Fix order

* Add support for both key and value being entity uid
2024-03-03 11:51:23 +11:00
Leon FriedrichandGitHub cfb88b2e8e Arch related engine changes (#4806) 2024-01-04 12:18:03 +11:00
Leon FriedrichandGitHub eba58cb893 Remove RobustTree & PVSCollection (#4759)
* Cut down RobustTree

* Better LoD

* Add PvsPriority flag

* Undo cvar name change

* reorganize grafana metrics

* Fix tests

* Fix replays

* Don't try process empty chunks

* Fix move benchmark

* Fix benchmark

* Remove obsolete audio methods

* Moar benchmarks

* Rename EntityData

* A

* B
2023-12-28 09:10:13 +11:00
Leon FriedrichandGitHub 5232e61d38 Add multi-component Dirty() methods (#4770) 2023-12-28 08:20:06 +11:00
438fed2f0e Make TryGetEntity protected (#4713)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2023-12-15 19:40:43 +01:00
metalgearslothandGitHub 24b0165ec9 Revert Arch (#4613) 2023-11-27 21:41:01 +11:00
7dce51e2cf Arch PR two electric boogaloo (#4388)
Co-authored-by: DrSmugleaf <drsmugleaf@gmail.com>
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
2023-11-23 14:29:37 +11:00
Leon FriedrichandGitHub 202182e3d4 Add new EnsureEntity variants (#4586) 2023-11-20 17:44:36 +11:00
Leon FriedrichandGitHub ceb205ad52 Allow per-eye lighting toggling. (#4569) 2023-11-13 05:30:00 +11:00
Leon FriedrichandGitHub 773b87672b Fix terminating entity reparenting bug (#4549) 2023-11-08 15:39:08 +11:00
Leon FriedrichandGitHub b2d389f184 Remove TryLifestage() helpers (#4519) 2023-10-24 18:46:46 +11:00
Leon FriedrichandGitHub ad0cb05dd6 Add EnsureComponent(ref Entity<T?>) (#4516) 2023-10-24 17:19:38 +11:00
DrSmugleafandGitHub f754ddb96d Remove all usages of obsolete Dirty method, remove some obsoleted methods (#4500) 2023-10-21 14:19:07 -07:00
DrSmugleafandGitHub b737ecf9b3 Add generic EntityUid, remove some usages of .Owner (#4498) 2023-10-19 12:23:48 -07:00
DrSmugleafandGitHub 6b6ec844e8 Replace all T : Component constraints with T : IComponent (#4494) 2023-10-17 19:37:46 -07:00
Leon FriedrichandGitHub 684cabf3e6 Use metadata query in ToPrettyString() (#4478) 2023-10-09 19:07:31 +11:00
Leon FriedrichandGitHub 942db3120c Make entity system proxy methods use Metadata & Transform queries (#4434) 2023-09-19 15:11:21 +10:00
Leon FriedrichandGitHub c0a5fab19e Add missing EntitySystem - EntityManager proxy method (#4427) 2023-09-18 12:17:46 +10:00