Commit Graph
120 Commits
Author SHA1 Message Date
metalgearslothandGitHub 651e9034dd Cache grafana histograms (#6767) 2026-07-16 19:14:32 +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
PJB3005 7536c4ec68 Log late MsgEntity again
Yay :)
2025-04-07 15:50:40 +02:00
fbc706f37b Refactor map loading & saving (#5572)
* Refactor map loading & saving

* test fixes

* ISerializationManager tweaks

* Fix component composition

* Try fix entity deserialization component composition

* comments

* CL

* error preinit

* a

* cleanup

* error if version is too new

* Add AlwaysPushSerializationTest

* Add auto-inclusion test

* Better categorization

* Combine test components

* Save -> TrySave

Also better handling for saving multiple entities individually

* Create new partial class for map loading

* Add OrphanSerializationTest

* Include MapIds in BeforeSerializationEvent

* Addd LifetimeSerializationTest

* Add TestMixedLifetimeSerialization

* Add CategorizationTest

* explicitly serialize list of nullspace entities

* Add backwards compatibility test

* Version comments

also fixes wrong v4 format

* add MapMergeTest

* Add NetEntity support

* Optimize EntityDeserializer

Avoid unnecessary component deserialization

* fix assert & other bugs

* fucking containers strike again

* Fix deletion of pre-init entities

* fix release note merge conflict

* Update Robust.Shared/Map/MapManager.GridCollection.cs

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

* VV

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2025-02-16 21:25:07 +11:00
Leon FriedrichandGitHub 73ef69aa94 Try and ensure that parents are always initialized before children (#5343)
* Try and ensure that parents are always initialized before children

* release notes
2024-08-31 11:05:56 +10:00
Leon FriedrichandGitHub 0ba4a66787 Always process networked events via the priority queue (#5205) 2024-06-28 17:02:14 +10:00
2a102f048f Fix client-side replay exception (#5068)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2024-04-27 12:30:00 +10:00
a2d0504368 Replace PVS dictionaries with memory magic (#4795)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2024-03-17 06:57:13 +11:00
metalgearslothandGitHub 4bed20e070 Add RaiseSharedEvent (#4950)
Used in some rare cases on content (popups + pickup prediction). I was too lazy to make system proxy methods because it's very infrequent.
2024-03-10 19:33:45 +01:00
Leon FriedrichandGitHub 64b5d6e323 Pvs cleanup & expose methods for benchmarking (#4779)
* Pvs cleanup & expose methods for benchmarking

* Fix tests

* Minimalist PvsData
2023-12-30 13:23:29 +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
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 5a6c4220fc IPlayerManager refactor (#4518) 2023-10-24 20:18:58 +11:00
Leon FriedrichandGitHub 684cabf3e6 Use metadata query in ToPrettyString() (#4478) 2023-10-09 19:07:31 +11:00
metalgearslothandGitHub c4c528478e Use gamestate fields to avoid heap allocs (#4452) 2023-09-29 15:03:50 +10:00
1ea7071ffb Backport some arch comp net changes (#4408)
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
2023-09-17 11:03:11 +10:00
Leon FriedrichandGitHub 4a4a135089 Make ToPrettyString() take in nullable EntityUids (#4396) 2023-09-15 01:43:39 -07:00
metalgearslothandGitHub 3fd731d917 Network entity ids (#4252) 2023-09-11 09:42:55 +10:00
Leon FriedrichandGitHub e37c131fb4 Prevent invalid prototypes from being spawned (#4279) 2023-08-21 12:29:02 +10:00
metalgearslothandGitHub 69589195e0 MapLoader perf stuff (#4179) 2023-07-10 17:53:46 +10:00
e71f1cc8a5 Warning fixes (#4160)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-07-01 22:02:12 +10:00
Leon FriedrichandGitHub 9d4105abc7 Add support for client-side replays (#4122) 2023-06-19 03:23:46 +10:00
06f5c78152 Allow specifiying overrides for components when spawning an entity. (#4068)
* Oh goddamnit this is a refactor now.

* aaaaaaaaaaa

---------

Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
2023-05-19 15:38:45 -05:00
Leon FriedrichandGitHub 7b59fbd3ef Audio and other misc replay related changes (#3471) 2022-11-22 11:49:59 +11:00
Leon FriedrichandGitHub 7b0c4dd7fb Fix component removal / PVS bugs (#3275) 2022-10-08 13:22:32 +11:00
Leon FriedrichandGitHub 4c341f0289 Replace Logger.Error with IRuntimeLog (#3267) 2022-09-28 11:07:45 +10:00
metalgearslothandGitHub db3f3e5b32 Allow maps to be saved (#3055)
* Allow maps to be saved

* I hate myself

* fix?

* Fix maybe?
2022-07-25 15:30:20 +10:00
Pieter-Jan BriersandGitHub bf1cc8fd7c Minor performance improvements (#2860) 2022-05-28 15:28:08 +02:00
Pieter-Jan Briers 6fc1daf978 Some compiler warning fixes. 2022-05-28 13:36:35 +02:00
b0a4593f44 Speed up map init, and unpause map on init (#2781)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-05-05 19:21:03 +10:00
Pieter-Jan Briers 45d906ba7e Deprecate CreateNetMessage<T>. 2022-04-15 18:47:42 +02:00
mirrorcultandGitHub 7e56f46f35 Remove network component messages (#2659) 2022-03-31 10:24:27 +11:00
wrexbeandGitHub d1e0f2cd94 Automatic Component Names (Alternate ending) (#2389) 2022-01-25 14:10:08 +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
DrSmugleaf 163deff564 Fix 3000 errors 2021-12-05 18:13:33 +01:00
Vera Aguilera Puerto 4f92301d25 More manual fixes. 2021-12-03 17:35:20 +01:00
Vera Aguilera Puerto 7a06db60cf Inline UID 2021-12-03 15:53:10 +01:00
196e2bb427 The End of Entity (Komm, Süsser Todd: Part 1.0) (#2295)
Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>
2021-12-03 11:01:59 +01:00
Vera Aguilera PuertoandGitHub 6515b08b41 Better ToPrettyString with EntityStringRepresentation (#2301) 2021-12-03 10:09:49 +01:00
Kara D 0972601a43 Revert "entity creation crash fixes"
This reverts commit 603c252c48.
2021-11-10 12:09:31 -07:00
Paul 603c252c48 entity creation crash fixes 2021-11-10 18:57:47 +01:00
Paul d5b1c044b7 fixes the crash for realsies 2021-11-10 18:34:21 +01:00
Vera Aguilera PuertoandGitHub 5b1e9eec27 Fixes component deletion/removal not being synced with clients. (#2128) 2021-10-15 23:52:09 +02:00
Vera Aguilera PuertoandGitHub fbcdd63988 Gets rid of most ComponentManager usages. (#2076)
- Obsoletes more `ComponentManager` fields/properties.
2021-09-28 13:36:18 +02:00
Pieter-Jan Briers 6a0cb6a5af Rework entity storage to remove CullDeletedEntities.
Now we only use the dictionary for storing entities, similar to components.

This means creating/deleting entities while enumerating them will throw, but that's probably fine since GetEntities() is barely used nowadays, and we have QueueDelete().
2021-08-25 22:47:33 +02:00
Pieter-Jan Briers 7feeeb2f6f OOps 2021-07-25 14:50:14 +02:00
Pieter-Jan Briers 78f9d92c07 Add exception tolerance to DispatchEntityNetworkMessage. 2021-07-22 23:27:39 +02:00
AcruidandGitHub dadd7b4cc3 Remove Static Component NetIds (#1842)
* ComponentNames are not sent over the network when components are created.

* Removed ComponentStates array from EntityState, now the state is stored directly inside the CompChange struct.

* Remove the unnecessary NetID property from ComponentState.

* Remove Component.NetworkSynchronizeExistence.

* Change GetNetComponents to return both the component and the component NetId.

* Remove public usages of the Component.NetID property.

* Adds the NetIDAttribute that can be applied to components.

* Removed Component.NetID.

* Revert changes to GetComponentState and how prediction works.

* Adds component netID automatic generation.

* Modifies ClientConsoleHost so that commands can be called before Initialize().

* Completely remove static NetIds.

* Renamed NetIDAttribute to NetworkedComponentAttribute.

* Fixing unit tests.
2021-07-12 10:23:13 +02:00
Vera Aguilera PuertoandGitHub e54e33edb0 Client Networked event subscriptions can now take in EntitySessionEventArgs (#1817) 2021-06-09 01:22:20 +02:00