* Add TryGetOpenBUI
Avoids having to get the component and openinterfaces separately.
* Couple more helpers
* entityquery
* reviews
* Shared BUIs
* zawehdo
* More boilerplate
* Bunch more work
* Building
* Stuff
* More state handling
* API cleanup
* Slight tweak
* Tweaks
* gabriel
* Disposies
* Active UI support
* Lots of fixes
- Fix states not applying properly, fix predicted messages, remove redundant message type, add RaiseUiMessage for an easy way to do it from shared, add the old BUI state change events back.
* Fix test failures
* weh
* Remove unncessary closes.
* release note
* refactor: RobustRandom and RandomExtensions namespace change to file-scoped
* refactor: IRobustRandom xml-doc methods rearranged to be more structured.
* feat: GetItems methods added to RandomExtensions, tests for new methods added.
* fix: GetItems will not request count-1 from next random, as System.Random.Next have upper bound excluded.
* fix: enforced standard deviation on picking next items in RandomExtensions.GetItems + fixed hashet initial capacity +removed mandatory hashset allocation
* refactor: specified border values interaction in IRobustRandom xml-doc
* refactor: updated relese-notes
* refactor: changed release-notes PROPERLY
* fix: order by which unique random items are picked in RandomExtensions.GetItems were fixed to ACTUALLY follow normal distribution
* refractor: added comment for devious RandomExtensions.GetItems only-unique logic
* reduce code duplication
* Cleanup code a bit
Rename variables, and make it a bit more compact.
Also, IMO the description is unnecessary
* Remove obsolete extension
* Remove incorrect O(n) comments.
---------
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
* Remove ents from containers for worldpos updates
Avoids bugs from content not checking for this every time. Physics and anything else important manually uses localposition updates so shouldn't adversely impact performance that much.
* Fixes
* Fix grid pos
* Also fix the joint setter
* Add both
* Update Robust.Shared/GameObjects/Systems/SharedTransformSystem.Component.cs
Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
---------
Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
* Un-hardcode behavior to make a component not saved to map file.
MapSaveId is a special component that can't be saved to map files due to a hardcoded type check. This behavior can now be applied to any component with [UnsavedComponent].
Moved "component registration" attributes into a single file because they don't deserve their own (poorly organized) .cs files.
* Add ITileDefinitionManager.TryGetDefinition
Try-pattern version of the existing indexers.
* Preserve tile maps when saving maps
This changes the map saver and loader code so that the "tilemap" can be preserved between map modifications as much as possible.
The tile map from the loaded map gets stored onto MapSaveTileMapComponent components on all loaded grids. This tile map is then used when saving, meaning that changes to the engine's internal tile IDs do not cause diffs.
Fixes#5000
* Changelog
* Fix tests
Fixed being able to position the cursor vertically if placeholder text was visible and multi-line. This is because the code was using line break info for the place holder. On top of not being correct behavior, this caused further exceptions since the cursor would get outside the editable text rope.
Fixed index exception if you try to move left in an empty text edit.
Has regression tests.
Fixes#4957, fixes#4953
* Add ability to add structured deny data to NetConnectingArgs.
Builds on the (horrifying) NetStructuredDisconnectMessages so that content can do more stuff.
To be used by SS14 to throttle people when they try to connect to a full server.
* Completely rewrite NetStructuredDisconnectMessages
So this class was a mess, and it was so bad it wasn't usable from content! System.Text.Json isn't sandbox safe (and I don't want to look into that right now), so the previous API surface of "pass the JsonNode around everywhere" just didn't work at all for content.
I decided the easiest solution would be to completely rewrite the entire thing to be a layer over a Dictionary<string, object> instead. This warranted a complete rewrite of the API, which should be fine as I doubt anybody was using it anyways.
Also, fully tested.
* Added a test that checks that RobustIntegrationTest Client and Server do not end up with same sub-ComponentState reference objects.
* Un-ignore and adjust the test.
* review
---------
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
* Isolate net messages in integration tests.
Integration tests don't use Lidgren to connect client and send, instead they just use some in-process channels to communicate. Because of this, the original implementation of net messages *directly* passed the net message instances between client and server instances. This caused issues whenever content would mutate data in a NetMessage after it "passed through".
Now we run the messages through WriteToBuffer() and ReadFromBuffer() so they pass through binary serialization. This means there's no more implicit sharing of the objects.
Note that this requires some trickery: Lidgren's message types have internal constructors. Really ideally we'd change the engine to make this more testable... but that's a content breaking change. Instead I just added InternalsVisibleTo to Lidgren so we can mess with it. We maintain the library ourselves anyways I can do what I want.
Fixes#4836
* Register Robust.UnitTesting as assembly for reflection.
This is necessary so that serialized types in the assembly can be picked up by NetSerializer.
Have to disable automatic reflection on all entity systems/components that tests register manually right now, because otherwise tests break.
* Stop shallow cloning specific net messages in integration tests.
This isn't necessary anymore now that we have a thorough fix.
* Wow I really forgot to copy-paste that line to the other side huh.
* Add test that serializer hash matches.
* Another test one I missed earlier.
* Changelog
* Move to Central Package Management.
Allows us to store NuGet package versions all in one place. Yay!
* Update NuGet packages and fix code for changes.
Notable:
Changes to ILVerify.
Npgsql doesn't need hacks for inet anymore, now we need hacks to make the old code work with this new reality.
NUnit's analyzers are already complaining and I didn't even update it to 4.x yet.
TerraFX changed to GetLastSystemError so error handling had to be changed.
Buncha APIs have more NRT annotations.
* Remove dotnet-eng NuGet package source.
I genuinely don't know what this was for, and Central Package Management starts throwing warnings about it, so YEET.
* Fix double loading of assemblies due to ALC shenanigans.
Due to how the "sideloading" code for the ModLoader was set up, it would first try to load Microsoft.Extensions.Primitives from next to the content dll. But we already have that library in Robust!
Chaos ensues.
We now try to forcibly prioritize loading from the default ALC first to avoid this.
* Remove Robust.Physics project.
Never used.
* Remove erroneous NVorbis reference.
Should be VorbisPizza and otherwise wasn't used.
* Sandbox fixes
* Remove unused unit test package references.
Castle.Core and NUnit.ConsoleRunner.
* Update NUnit to 4.0.1
This requires replacing all the old assertion methods because they removed them 🥲
* Mute CA1416 (platform check) errors
TerraFX started annotating APIs with this and I can't be arsed to entertain this analyzer so out it goes.
* Fine ya cranky, no more CPM for Robust.Client.Injectors
* Changelog
* Oh so that's what dotnet-eng was used for. Yeah ok that makes sense.
* Central package management for remaining 2 robust projects
* Ok that was a bad idea let's just use NUnit 3 on the analyzer test project
* Oh right forgot to remove this one
* Update to a newer version of RemoteExecutor
* Disable RemoteExecutor test
https://github.com/dotnet/arcade/issues/8483 Yeah this package is not well maintained and clearly we can't rely on it.
* Fix immutable list serialization
* Make component factory use frozen collections
* Fix integration tests
* Also freeze _entTraitDict
* A
* I love integration test setup logic
* Re-add public method
* Freeze event bus
* Remove per-component dictionary lookup on EntAddComponent
* release notes + fix test jank
* Fix merge
* fix tests
* Shutdown
* Make component factory use frozen collections
* Fix integration tests
* Also freeze _entTraitDict
* A
* I love integration test setup logic
* Re-add public method
* changes
* Better notes
* And the new method
* Fix notes
* Fix SetAwake()
* Remove bad debug assert
* EntityQuery & misc optimizations
* Remove bad(?) code, and add new test
* I love engine tests
* Add debug assert
* Don't defer grid traversals
Transform is in a slightly better state so we can remove this hacky thing.
It got to the point it was doing a bunch of unnecessary checks (no need to check container if you're just checking map / grid parent assuming no map / grid has containers).
The main concern now is: Does not deferring cause any issues, which it doesn't seem to (previously this mostly happened with transform state handling). On server-side the main worry is broadphasesystem seeing as this is being run manually to check for entities entering grids.
* Comment cleanup
* Obsolete MoveEvent .FromStateHandling
* Faster map position calculation
* Check Xform.GridUid instead of checking for `MapGridComponent`
---------
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>