Commit Graph
26 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
PJB3005 e308b89fe6 Log string map size 2025-12-22 17:56:16 +01:00
Leon FriedrichandGitHub 66577acd1f Expose more net serializer stuff to content (#3476) 2022-12-31 04:07:33 +11:00
Pieter-Jan BriersandGitHub 84733a335c Prototype load parallelization (#3502) 2022-12-20 22:46:30 +01:00
Pieter-Jan Briers bcf825d112 Mapped strings don't need IoC context anymore. 2022-12-18 17:40:17 +01:00
Pieter-Jan Briers b77b49c667 Mapped string serializer hit/miss stats.
Fixes #3190
2022-08-26 01:58:17 +02:00
Pieter-Jan Briers 45d906ba7e Deprecate CreateNetMessage<T>. 2022-04-15 18:47:42 +02:00
Pieter-Jan Briers 146b673203 Move string serializer to ZStd and BLAKE2b.
Faster and smaller
2022-04-15 01:16:35 +02:00
Pieter-Jan Briers fb54d0df1c Remove usages of Newtonsoft.Json outside StatusHost 2022-01-09 11:53:06 +01:00
Pieter-Jan Briers cef92efd0f NetManager now enforces that only specific messages can be sent before serializer handshake completes. 2021-07-17 14:37:40 +02:00
mirrorcultandGitHub d992e47f30 Remove NetMessage deprecated boilerplate entirely (#1830)
* Remove NetMessage boilerplate in favor of virtual properties

* forgot some stuff
2021-07-12 10:28:46 +02:00
Pieter-Jan Briers 5a1a1d0420 Add component names to string serializer. 2021-05-30 22:55:33 +02:00
eada37378a Add YAML hot reloading (#1571)
* Implement hot reloading for entity prototypes

* Implement automatic prototype hot-reloading

* Merge fixes

* Add yaml hot reloading and a message to notify the client

* Add reloading only changed files, remove cooldown, add retries and remove IPrototype

* Remove reload command

* Make the client listen for reloads instead and only when focused

* Fix errors

* Only queue a reload when the queue has items in it

* Make fails after 10 retries log instead of throw if reloading

Co-authored-by: Jackson Lewis <inquisitivepenguin@protonmail.com>
2021-02-20 00:02:04 +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
Pieter-Jan Briers 40bff81017 Fix nullable warning. 2020-12-17 00:58:26 +01:00
Pieter-Jan Briers f7c28992f8 Disable string map caching to hopefully fix connect. 2020-12-17 00:48:15 +01: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
Pieter-Jan BriersandGitHub aa64528a03 Auth (#1289)
* Some stuff for auth

* Holy crap auth works

* Enable encryption even if no auth token is provided.

It's still possible that the public key was retrieved over HTTPS via the status API, in which case it will be secure.

* Fix integration test compile.

* Secure CVar API.

* Literally rewrite the auth protocol to be minecraft's.

* Better exception tolerance in server handshake.

* Auth works from launcher.

* Fix some usages of UserID instead of UserName

* Fix auth.server CVar

* Kick existing connection if same account connects twice.

* Username assignment, guest session distinguishing.

* Necessary work to make bans work.

* Expose LoginType to OnConnecting.

* Fixing tests and warnings.
2020-09-29 14:18:12 +02:00
Pieter-Jan Briers 3f43e86530 NetMessageAccept, NetMessage dispatch cleanup.
Net message functions are now cached when the message is registered or the string table updates (client side). This removes the cache call from DispatchNetMessage.

Receiving net messages that we don't have reception callbacks for, or that are blocked with the new NetMessageAccept enum, will instantly cause the net manager to drop the offending connection to avoid malicious use.

This means trying to send string tables to the server will just result in an instant kick without even hitting ReadFromBuffer().

This allows us to move some if() checks to asserts.
2020-09-01 01:03:06 +02:00
Pieter-Jan Briers 36f29d54ed Mapped string serializer cleanup and fixes. 2020-08-31 22:58:42 +02:00
Pieter-Jan BriersandGitHub 6b92db35f0 Deterministic RobustMappedStringSerializer (#1265) 2020-08-29 07:53:29 +02:00
Pieter-Jan Briers e828a9d8c8 Remove bad usage of Lazy<> from RobustMappedStringSerializer. 2020-08-16 02:40:22 +02:00
Pieter-Jan Briers 3cc092f9ee Make RobustMappedStringSerializer use NetSerializer's string serialization code again.
It's much more efficient, especially after more optimizations I just made to it.
2020-07-30 15:06:45 +02:00
Pieter-Jan Briers 1087e4ce69 Remove some unnecessary interface calls. 2020-06-29 20:44:44 +02:00
Pieter-Jan Briers 564e219504 Silence string serializer. 2020-06-25 02:28:12 +02:00
Tyler YoungandGitHub 9662d52f90 Shared String Dictionary ctd. (#1126) 2020-06-13 04:09:48 +02:00