3472 Commits

Author SHA1 Message Date
Moony
48dbcf7fd4 Hotpatch for map loading test fail. 2026-02-08 15:33:30 +01:00
Moony
ecfaa68ae6 Deprecate System.Random leakage 2026-02-08 14:09:48 +01:00
PJB3005
fd27f315cb Add more MapLoaderSystem TextReader/TextWriter overloads
Co-authored-by: kaylie <moony@hellomouse.net>
2026-02-08 14:04:09 +01:00
DrSmugleaf
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
PJB3005
ec0c667c33 Add System.StringComparer to sandbox
Fixes #6081
2026-02-05 21:32:59 +01:00
PJB3005
75d0c29973 Add OrderedDictionary to sandbox whitelist
Fixes #6411
2026-02-05 16:38:01 +01:00
Princess Cheeseballs
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
deltanedas
0e54fa7329 add debug info to static protoid in generic class error (#6395)
* add debug info to static protoid in generic class error

* lets see

* goida

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2026-01-31 11:59:23 +01:00
PJB3005
2722448474 Don't compile new sandbox code outside TOOLS
Fix build
2026-01-31 09:11:24 +01:00
PJB3005
8449015cf8 Locate references to bad compiler generated methods in sandbox
Should help pinpoint issues from params arrays and similar.
2026-01-30 10:19:57 +01:00
DrSmugleaf
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
B_Kirill
446cf8c003 Cleanup warnings: CS0414 (#6396) 2026-01-24 23:41:10 -05:00
PJB3005
65b8d0cce2 Add network serialization float NaN sanitization
Apparently cheat clients have figured out that none of SS14's code does validation against NaN inputs. Uh oh.

IRobustSerializer can now be configured to remove NaN values when reading. This is intended to be set on the server to completely block the issue.

Added "Unsafe" float types that can be used to bypass the new configurable behavior, in case somebody *really* needs NaNs.

An alternative option was to make a "SafeFloat" type, and only apply the sanitization to that. The problem is that would require updating hundreds if not thousands of messages in SS14, and probably significantly confuse contributors on "when use what." Blocking NaNs by default is likely to cause little issues while ensuring the entire exploit is guaranteed impossible.
2026-01-25 03:45:50 +01:00
deltanedas
397b441a17 improve contact debug asserts (#6397)
Co-authored-by: deltanedas <@deltanedas:kde.org>
2026-01-24 08:44:49 -05:00
PJB3005
89e16d5ba9 Fix Reset() not getting called if client channel disconnects unprompted.
Fixes https://github.com/space-wizards/RobustToolbox/issues/6390
Fixes https://github.com/space-wizards/RobustToolbox/issues/6388
2026-01-20 19:03:32 +01:00
PJB3005
2afef1480e Add debug code to slow down transfer connections 2026-01-20 19:01:56 +01:00
PJB3005
76189579c7 Remove dead code from transfer 2026-01-20 19:01:39 +01:00
PJB3005
114c2bee62 Fix transfer being entirely nonfunctional
Oops
2026-01-20 19:01:32 +01:00
ThereDrD
17662baaf7 Fixed looped audio playback position calculation (#6325)
* fix: looped audio position calculation

* refactor: tiny clean up

* move comment

* fix: review changes

* remove `

* rerun tests

* Remove unecessary formatting changes

---------

Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2026-01-19 21:05:44 +01:00
Pieter-Jan Briers
dc1464b462 High-bandwidth transfer system (#6373)
* WebSocket-based data transfer system

* Move resource downloads/uploads to the new transfer system

Should drastically increase the permitted practical size

* Transfer impl for Lidgren

* Async impl for receive stream

* Use unbounded channel for Lidgren

* Add metrics

* More comments

* Add serverside stream limit to avoid being a DoS vector

* Fix tests

* Oops forgot to actually implement sequence channels in NetMessage

* Doc comment for NetMessage.SequenceChannel

* Release notes
2026-01-19 20:44:44 +01:00
DrSmugleaf
48654ac424 Fix component tree system crapping out taking half the game with it (#6366)
* Fix component tree system crapping out taking half the game with it

* Fix build
2026-01-19 20:43:50 +01:00
Pieter-Jan Briers
21581df93d Revert "make SharedAudioSystem.Stop not return early when the current tick has already been predicted" (#6375)
Revert "make SharedAudioSystem.Stop not return early when the current tick ha…"

This reverts commit c41d63be27.
2026-01-19 20:40:31 +01:00
Princess Cheeseballs
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
deltanedas
52d3376c9e make "failed to set destination" debug assert not useless (#6383)
Co-authored-by: deltanedas <@deltanedas:kde.org>
2026-01-18 09:27:50 -05:00
PJB3005
a417a8fd99 Mark DebugTools.AssertNotNull as [NotNull]
This means C# nullable analysis actually recognizes it.
2026-01-18 02:42:23 +01:00
deltanedas
736e46cd82 fix MarkupNode.ToString mangling tags (#6374)
Co-authored-by: deltanedas <@deltanedas:kde.org>
2026-01-09 20:17:46 +01:00
DrSmugleaf
e5be11458e Fix EntProtoId<T>.TryGet throwing an error on invalid prototype ids (#6349) 2026-01-01 00:53:14 +01:00
āda
9464ccb500 Get hard collision API method (#6354)
commit

Co-authored-by: iaada <iaada@users.noreply.github.com>
2025-12-31 23:20:14 +01:00
slarticodefast
de2dafe507 increase Loc.GetString log level to warning (#6361)
* increase loglevel to warning

* add release notes

---------

Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2025-12-31 19:49:05 +01:00
PJB3005
dd41a7ce44 Use hard links for macOS app bundles
Avoid needing to get executable path from MainModule, which broke the game when run with the dotnet command instead of the bin's apphost. Fixes tests.
2025-12-31 18:46:46 +01:00
PJB3005
d43c3f2caf Merge remote-tracking branch 'origin/master' into 25-11-01-cef-update 2025-12-27 01:50:23 +01:00
PJB3005
5f1327808d Mark IRobustRandom.GetRandom() as obsolete
This API should've never existed.
2025-12-24 16:03:06 +01:00
PJB3005
e308b89fe6 Log string map size 2025-12-22 17:56:16 +01:00
PJB3005
76727cec5f Give timescale a default value to fix tests 2025-12-22 01:49:45 +01:00
PJB3005
bb81d88653 Add [NotContentImplementable] to shared interfaces 2025-12-20 16:49:35 +01:00
PJB3005
9b02a4e718 Add game.time_scale cvar
Primary use case (other than silly) is to be a better way to speed up/slow down replays.
2025-12-20 16:32:06 +01:00
PJB3005
9802963933 Add [NotContentImplementable] attribute 2025-12-20 14:11:36 +01:00
ArtisticRoomba
077ad1929e Expand SharedUserInterfaceSystem API (#6342)
* Expand SharedUserInterfaceSystem API

* addr reviews
2025-12-18 22:05:33 +01:00
Tayrtahn
dd86bf980d Add MeansDataDefinition support to DataDefinitionAnalyzer (#5699)
* Add MeansDataDefinition support to DataDefinitionAnalyzer

* Poke tests

* Fix violations in engine

* Fix more lacking partials

* Fix tests

---------

Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2025-12-17 19:47:30 +01:00
Tayrtahn
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
Tayrtahn
c1737a540f Analyzer & Fixer for redundant Prototype type strings (#5718)
* Add Prototype analyzer

* Add Prototype fixer

* Early return after finding prototype attribute

* Add PrototypeEndsWithPrototypeRule diagnostic

* Oops. Uncomment parallelizable.

* Rework to ignore redundancy for non-literal string values

* Allow redundancy when removal would expose class name not ending in "Prototype"

* Promote PrototypeEndsWithPrototypeRule from warning to error, since it causes a runtime error.

* No need to get the symbol to get the class identifier

* Minor cleanup

* A little more cleanup

* More specific location for redundant name

* Refactor redundant name fixer so argument order is no longer important

* Add failing test

* Use symbol analysis to fix alias handling

* Oops! We have to go back to the previous syntax-based approach.

Now it's a hybrid.

Also fixed tests to not copy the prototype definitions.

---------

Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2025-12-17 18:15:32 +01:00
PJB3005
ddfa12808c Fix some roslyn tests 2025-12-17 16:55:33 +01:00
PJB3005
7f2ec17651 Okay, the Robust API thing didn't pan out. New plan.
It apparently broke clean builds, as the dependencies aren't in the project asset list or something anymore. I tried to fix this, but it seems impossible to do without relying on .NET SDK internals, as there's no point in the NuGet graph walk process that seems cleanly extensible.

Instead let's just do the much dumber thing: a bunch of .props files for content to import. Hooray!

This also means that I have to go through and *explicitly* disable transitive dependencies everywhere in RT. This thankfully isn't too hard.
2025-12-16 22:56:31 +01:00
deltanedas
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
PJB3005
788e9386fd Split up test project
Robust.UnitTesting was both ALL tests for RT, and also API surface for content tests.

Tests are now split into separate projects as appropriate, and the API side has also been split off.
2025-12-16 01:36:53 +01:00
PJB3005
4f21c8c9b2 Move default marker filename to SLNX
Will be alright because next engine version will demand SLNX templating
2025-12-15 22:40:42 +01:00
slarticodefast
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
Pieter-Jan Briers
d161c3b3b8 Add FormattedString type (#6339)
This is basically a lightweight marker type saying "this string contains markup". Intended to avoid injection accidents if people don't realize they should escape stuff.
2025-12-15 19:36:16 +01:00
PJB3005
53e1222b6b Fix FormattedMessage not escaping text when converted to markup
Meant that ToMarkup() wasn't actually round-trip safe.
2025-12-15 04:58:23 +01:00