83ad6042a7 & b267cd6fb4
Does not include test code to avoid risking merge conflicts.
(cherry picked from commit 415585a30d74fcae61f581808220a7aaeca3eaf5)
(cherry picked from commit e36628a6d436ea08d6d31441c101a88a5504c515)
* Replace PhysicsMapComponent
- Dumb idea
- Lots of book-keeping and perf overhead.
- Much saner this way.
* stuff
* More work
* Purge
* Fixes
* Eh?
* Fixes
* Also this
* weh
* Fixes
* ice-cream
* Fix
* Fix stacking / gravity
* Gravity query
* MoveBuffer optimisations
* Fixes for test
* World gravity
* Fix build
* Avoid some transform resolves for contactless ents
* Less getcomps
* Fix contact caching
* Possibly less copies
* reh
* bulldoze
* Test "fix"
* seikrets
* a
* I saw this but now I decideded against it
* true
File dialog requests can now specify the share and access mode they want out of the opened file. This means read-only access is now possible.
While doing this I noticed that the SDL3 backend had a memory leak *and* didn't match the behavior of the other backends. Cleaned up the code to avoid that.
In-engine commands that *can* specify read-only access on file open now do.
* Stopped recursive updates for controls that are not visible, as it violates framerate in large menus.
* Update Robust.Client/UserInterface/Control.cs
---------
Co-authored-by: Cam <Nop>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Combine TileChangedEvents in SetTiles
* Raise event after regenerating collision
* continue, not return
* No need for GetComponent
* Swap TileRef for Tile + Vector2i
* Estimate size of tileChanges
* Modify markup tag interfaces
* Why are nullable structs like this.
* AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
* Avoid breaking changes
* Replace IMarkupTag with IMarkupTagHandler in engine
* Its a breaking change now I guess
* cleanup
* Makes ItemList not run deselection callback on all list items
even when they weren't selected
* I cannot be expected to do things intelligently at 2a
* Optimize local usage.
* I'm pretty sure the test failure isn't from ItemList
* switch to avoiding doing anything in the `Selected` setter if the value-to-set-to is the same as the current value.
* Initial commit
* Add tile rotation/mirror perms
* Nicer UI for the rotation
* Review fixes (also seemed to have missed applying the serialization reading oops)
* One less byte, one less struct size!
* Pretty sure it goes here too
* Fix error
* Check audio file signatures instead of extensions
Fixes#5789
Test audio files based on their magic bytes.
* Test for a seekable stream
* Remove Take and Skip linq
This is a far cry from a proper resource tracking system, but it's something to avoid a ton of otherwise-unused parallax textures being loaded at game start and consuming VRAM.
Necessary so the client can calculate an initial state, which is necessary for prediction and replay seeking to work properly.
Fixes the nuke in SS14 not having its light turn off when going back in a replay.
* sloth is so going to kill me
* the voices in my head told me to do this
* Register ILocalizationManagerInternal on client
* Avoid breaking change
* Cleanup
* Release notes
* Fix SharedJointSystem.CreateDistanceJoint taking in an int for minimumDistance instead of a float
* Fix SharedPhysicsSystem.CollideContacts looping contacts that are in nullspace
This allows us to make it obsolete to *inherit* from a class, and only that.
Intended so people stop inheriting UI controls for no good reason.
Fixes#5856
* 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
* Fix warnings in SharedJointSystem
* Fix reference to EC TransformComponent method
Replaces call to TransformComponent.GetMapUid with SharedTransformSystem.GetMap
* Fix obsolete calls in SharedPhysicsSystem.Contacts.cs
Fixes a couple calls to obsolete varients of SetAwake and an obsolete call to RegenerateContacts by converting them to their Entity<T> varients
* Fix obsolete call in SharedPhysicsSystem.Components.cs
Adds one set of parenthesis to convert a 'uid, comp, comp, comp' call to an 'Entity<T, T, T> call.
* Removes unused local var
Removes an unused list of broadphases that was being allocated in TryCollideRect
* One-line fixes in SharedPhysicsSystem.Islands.cs
Fixes all of the easy warnings regarding physics island processing, the rest require more complicated changes than a simple argument rearrangement
* Fix obsolete method call in SharedMapSystem
* Fix a few obsolete ToMap calls in EntityLookup.Queries
* Fix calls to obsolete EntityCoordinate methods in SharedMapSystem.Grids
* Fix calls to obsolete EntityCoordinate methods in SharedLookupSystem.ComponentQueries
* Fix a few obsolete method calls in entity spawning
* Fix obsolete method calls in MapLoaderSystem
* Fix obsolete method call in GridFixtureSystem
* Fix obsolete IsMapInitialized call in SaveMap command
* Fix obsolete MapPosition reference in Client.EyeSystem
* Fix obsolete EntitySystem.Get<TSystem> references in DebugLightTreeSystem
* Fix obsolete EntitySystem.Get<TSystem> reference in DebugEntityLookup command
* Fix obsolete method calls in SpriteBoundsOverlay
Slightly more complicated than the rest, but it's really just changing an unused dependency over to use SharedTransformSystem
* Remove unused IClyde references from controls
LineEdit and TextEdit never use their IClyde dependencies and it generates a warning so yeet
* Remove use of EntitySystem.Get from lightbb command
* Fix DebugDrawingSystem
Removes a bunch of unused private IEntityManager vars
Also removes an obsolete use of TransformComponent.GetWorldPositionRotation
* Removes duplicate position set when splitting grids
There's nothing saying why this is this way and the blame looks like it was an oversight when replacing a bit where they set position and then rotation
Please, oh Chesterton's Fence, spare me your wrath
* Fix obsolete method use in PlacementMode
* Fix obsolete method use in Placement Modes
* Removes unused local var in gamestate management
* Fix unreachable code warnings in gamestate management
Use #else sections to make sure they don't complain about being on the wrong side of a throw
* Fix obsolete ToMap use in EyeManager
* Make InputManager use a sawmill to log
* Fix obsolete ContainerManagerComponent method calls in ContainerSystem
* Make ClientPrototypeManager use a sawmill for logging
* poke tests
* Use LocalizedEntityCommands for SpriteBoundsOverlay toggle
* Use LocalizedEntityCommands for system toggles
---------
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
* Better location reporting for readonly DataField errors
* Better location reporting for readonly DataField property errors
* Use SyntaxKind instead of string for TryGetModifierLocation
* Add button to jump to live chat when scrolled up
* Expose scroll button class name as a public constant
* Add localisation string to engine
* Make enabling the OutputPanel scroll button opt-in
* Enable scroll button for the debug console
* De-duplicate visibility logic
* Update scroll button visibility when the enabling property is changed
* fix(maploader): Fix DirectoryNotFoundException
Someone forgor to create directory before saving map or grid, this caused
an exception on trying to save smth anywhere else than /
* update release notes
These functions use the wrong color primaries (Rec 601 instead of 709) to calculate the luminance, so I'm just gonna throw them out.
Also, I don't actually trust anybody to know to do sRGB conversion before using them.
Discovered this as a result of reviewing #5360
We aren't going to fix these until #5610 is figured out, and these aren't even an indicator of an issue itself.
They indicate that we have code fixes in the same assembly as analyzers, meaning the analyzers COULD fail if we relied on some code fix libs - something we don't do.
* Add UpdateVisibilityMask method
We tipped over to the point of systems stepping on each other's toes. Now we do the normal thing and just use the eventbus and it makes content a whole lot cleaner.
* Update resolve
* Update name in line with normal.
* Unserialize this
* weh
* FastPoly
* Inline polygon vertices
No more pooling, pooling bad. No more arrays in engine, only span.
I made a slim version that's only the 4 verts so no padding on it compared to Polygon. Slightly more clamplicated code but entitylookup + mapmanager are both hotpaths and it's easy to do. Memory usage will likely go up for now but heap allocations should drop significantly due to removing the pooling.
* Unhide these
* Fixes
* More fixes
* More fixes
* Avoid potential bomb
* Reduce EntityManager.IsDefault allocations
We don't actually need the MappingDataNode so we can avoid allocating the entire class per entity.
* Adjust this order
* Fix ResPath CanonPath
Apparently this is supposed to standardise to / but this isn't always the case. Alternatively we could just assert for performance reasons I'm good with either. The comment as written says this should happen.
* Fixes
* change
* assert
* Fix bad respath input
* Buffer
* Merge conflicts
* review
* Fix
* Fix ResPath CanonPath
Apparently this is supposed to standardise to / but this isn't always the case. Alternatively we could just assert for performance reasons I'm good with either. The comment as written says this should happen.
* assert
* Fix bad respath input
* review
* Actually check if map save succeeded before displaying success message
It would be great to offer more clarity to the mapper about *why* the
save didn't succeed, but at least they won't be deceived into thinking
their work has been saved when it hasn't.
Portuguese localization text is via DuckDuckGo Translate, so I hope it's
reasonable.
* Actually check save success for saving grids
These messages need localization, too, but that seems out of scope for
my PR.
* Improve map save error message
Now it tells the mapper to go look at the server log.
Still translated via DuckDuckGo Translate.
* Normalize indentation and style
This is important groundwork for future features such as captioning,
as a caption and other data can be associated with the collection
prototype instead of passing extra data everywhere with the sound.
* feat: shaders now can accept array of Color as parameter
* fix: Clyde.SetUniformDirect for Color[] doesn't mutate original array, removed invalid 'in' keyword on SetUniform
---------
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
* Include argument name in completion suggestions
* Support optional args
* It (not so shrimply) works
* Add tests
* Add TestGenericPipeInference
* Fix tests
* Release notes
* Overzealous YAMLLinter
* Improve help signatures, fix map command
* Improve NoImplementationError
* Better type argument help signatures
* better pipe syntax
* fix NRE
* Add test
* a
* Fix silent toolshed failure
* Fix GetConcreteMethodInternal
* Improve vars command
* EntProtoId IAsType
* More GetConcreteMethodInternal fixes
* I hate this so much
* update tp command description
The command arguments call the the "other" entity the "target"
* Support localized argument hints/signatures
Apparently it can clip and the buffer is really just there so we despawn 'at some point' and rather than hunching over my debugger for potentially an hour this is easier and almost no impact.
I've also considered flagging some audio as "play the full thing" if someone misses the start of it but need to thonk on that one a bit in future.
IDK why the lifestage one in particular ballooned my dotmemory one up in particular but it did; I would've thought if it's boxing the other ones would've shown up. Doesn't matter for release just QOL to drop allocs by more than half.
This hides the generated types from intellisense if you have the relevant option in Rider enabled.
Good because honestly these just bloat IntelliSense, and if you want to show them there's an IDE setting for it.
Data definitions created individual read/write methods for every single field that can be serialized. This was extremely inefficient and likely caused lots of overhead.
These methods are necessary because, in some cases, we can't directly use expression trees to write fields. But... we can still do it most of the time! So now for most data fields we can avoid a DynamicMethod entirely.
Fixes#5592
This allows net.tickrate to be set to a max of 65535 instead of 255.
I didn't raise it fully to a uint because there are many places it's cast to an int, so uint would cause various compiler errors and compat issues I don't wanna deal with.
Somewhere between 1.3.0 and 1.4.0 (I tested all versions) exists a bug that for some reason messes with the audio on some devices.
A proper fix would require us trying to make contact with the developer of VorbisPizza, find the buggy commit and waiting them to update their repo. This repo has been inactive for 8 months. I doubt we can get support unless we fork it and find the bug ourselves.
Closes & fixes#5605
Slightly less bad use of incremental generators.
Remove format of generated code, it was taking most of the CPU time.
This seems to significantly cut compile time cost of this generator. Nice. I'm seeing 20 -> 5 seconds on my system.
* Bump cefglue
* another bump
* Update build-test.yml
* Update to latest CEF natives and fix code to be compatible.
* Switch CEF CreateBrowserWindow to Alloy style
you will NOT open Chrome
* Update cefglue, again
---------
Co-authored-by: ike709 <ike709@github.com>
Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
This has always been in the code but commented out for debugging. Now it's actually logging to Verbose level. Also the log level is "net.packet" now instead of just "net". Also it logs received size too.
This makes use of the new IsLogLevelEnabled to avoid the perf overhead when not being used.
* Start converting SDL2 backend to SDL3.
Game starts, but a lot of stuff is broken. Oh well.
* Fix text input
SDL3 changed the API somewhat, for the better. Changes all over UI/Clyde/SDL3 layer.
* Fix mouse buttons being broken
* Remove records from SDL3 WSI
The fact that this shaved 2-3% off Robust.Client.dll is mindboggling. Records are so bad.
* Set Windows/X11 native window properties
* Fix window resize events getting wrong size
oops
* Remove "using static" from SDL3 WSI
Seriously seems to hurt IDE performance, oh well.
* Apparently I never called CheckThreadApartment().
* Add STAThreadAttribute to sandbox
Necessary for content start
* Set window title on creation properly.
* Load window icons
* Fix GLFW NoTitleBar style handling
Yeah this PR is supposed to be about SDL3, so what?
* Implement more window creation settings in SDL3
Mostly the ones that need a lot of platform-specific stuff to work.
* Make fullscreen work properly in SDL3.
* File dialogs with SDL3
Removes need for swnfd.
* Fix some TODOs
* Fix WebView build
* Toolshed Rejig
* shorten hint string
* Try fix conflicts. Ill make with work later
* bodge
* Fix ProtoIdTypeParser assert
* comment
* AllEntities
* Remove more linq from WhereCommand
* better help strings
* Add ContainsCommand
* loc strings
* Add contains command description
* Add $self variable
* Errors for writing to readonly variables
* A
* Replace obsolete MapGridComponent methods
Some other obsolete methods were also replaced in edited files
* Whitespace and better readability
* Value instead of cast
* Fix ISawmill not initialized and incorrect log
* Add shapecasts + raycasts
Actual raycasts. Need this for AI LIDAR experiment.
* cassette
* more cudin
* Mostly ported
* more work
* More ports
* the big house
* rays
* builds
* Janky not working raycasts
* Fix GJK
* Test fixes
* Shapecast + fixes
* free
* tests
* More fixes
* Minor changes
* Not these
* Release notes
* TryFindComponentsOnEntityContainerOrParent no fail please
* remove my comments because Im dumb
* out makes sense to me!
* Revert "out makes sense to me!" because PJB no want breaky
This reverts commit 54f4a6d50c.
* Add InterfaceData constructor
Add InterfaceData constructor to allow for dynamic UI assignment via
SharedUiSystem::setUi
* empty commit because of heisentest
* BUI helpers
- Some virtual methods for BUI to make it slightly easier. Haven't though of a good way to do it via sourcegen yet.
- TryGetUiState which is occasionally useful.
* Also this one
This allows huge textures (e.g. Ratvar) to be removed from the meta-atlas. This saves a significant chunk of VRAM from the meta atlas in SS14 (~126 MB) which might help a bit with low-VRAM systems.
* Fix warning for using non-generic variant of TryComp for MetaDataComponent RA0030 (Use non-generic variant)
* Use non-generic variant of TryComp for TransformComponent
* OSWindow rework
OSWindow now created ClydeWindow and WindowRoot immediately, but non-visible in the background
Also added the ability to programatically resize an open window
* Implement window resizing on SDL2
* Revert OSWindow changes
* Split `Show()` into `Create()` and `Show()`
* Formatting
* Add Erase button for TileSpawnWindow
Small QoL for mappers. Basically, it just selects space tile on "Erase" button toggled.
* Remove copy paste. Conevrt this into method
Had a plan to use this, but realized for what I'm doing immediately I don't quite need it yet.
/update server endpoint can now receive a Reason code and Message field. These are available with IWatchdogApi.RestartRequested.
Cleaned up IWatchdogApi: Added comments, moved symbols that should only be called by the engine to an internal interface. Also cleaned up some code in WatchdogApi to remove some IDE warnings.
Shows up in replay loading from zip files, as the stream may be compressed. The statistics code in RobustSerializer assumes the stream is always seekable (by accessing .Position).
Now we don't run the statistics logic when reading/writing non-seekable-streams.
This usage really doesn't make sense, and it makes the usage invalid if the size is zero. Now realistically I don't think this happens except in edge-case replay files, but it's still silly.
Removed if for no other reason than spite for making me look at this code and reason about it.
So on content we have an issue where the animation is played in doorsystem but sprite visibility is controlled by airlocksystem. The issue then is that we get a single frame where the incorrect sprite is shown before it corrects itself. The easiest way to reproduce this is to walk into a door that denies you and observe it shows the incorrect sprite then flickers to the denied one.
There might be more systems with these issues which is why I did this here instead.
* Expose GameTitle to public
Requirement for upstream ss14 pr
* Missing method implemented
* Add windowiconset and splashlogo (I think this is what pjb meant?)
I don't think its worth it to add the other stuff (modules, assemblyprefix, autocnnect, clientassemblies)
* Docs
* New HWID system prep
* Allow HWID to be disabled.
Both client and server can now request HWID to be disabled.
On the server via CVar, if disabled the client won't send it.
On the client via env var, if disabled it won't be sent to the client.
This involved moving legacy HWID to be sent in MsgEncryptionResponse instead of MsgLoginStart. This means the legacy HWID won't be available anymore if the connection isn't authenticated.
* Fix tests
* Fix another test
* Review
* Thanks Rider
* Duplicate dependency field analyzer
Detects cases of duplicate [Dependency] fields in a type. We apparently have 27 of these across RT + SS14.
* Fix duplicate dependencies in Robust
Just because an entity sleeps doesn't mean it's not touching necessarily. This causes client to mispredict against server and continuously fire collision events if we try to move into an entity.
Easiest way to reproduced is to walk into a locked airlock and watch it flicker constantly.
* Controls in RichText fixes
* useless
* Get FormattedMessage from RichTextLabel
* dont go through nodes
* Comments and minor changes
---------
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
* feat: added audio system predicted method for only one receiver
* renamed to PlayLocal
* tweak
---------
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This should significantly improve loading performance of large replays.
System can be controlled by replay.server_gc_size_threshold, which defaults to 50 MiB.
This is the engine-side of https://github.com/space-wizards/SS14.Launcher/issues/177
Remaining warnings are cases where AnchorEntity, SetWorldPosition and SetLocalPosition subtly different from their component counterparts, and this triggers a test failure. Some help would be appreciated here.
Implement GetHashCode()
Fix Equals doing reference equality on the attributes.
Small code cleanup.
Actually mark it as IEquatable<MarkupNode> because we already implement Equals() so there's no reason not to.
* Don't rely on client for grid fixture rebuilds
Server is already networking fixture data and this has a chance to go bad.
Easier to just stop this entirely and remove the fixture references to just network the relevant ones for each chunk. Performance impact should pretty much be non-existent and it should be less buggy.
* a
* weh notes
* fix aabb update
* Fix AABB gen
* weh
* More networking
* Relative lookup fix
Some of the transforms weren't being transformed, added another test.
* test
* better test
* Reduce any-entities-intersecting tests
* Fix mouse hover not updating for new controls
It only ever updated on movement previously. The issue is for example if a new window shows up where the mouse is (or any control) it doesn't handle it. Just checking it every frame AFAIK shouldn't be that expensive. Worst case we just have some flag to check it that gets set on <mouse movement OR controls changed>.
* review
* Add thread check assert to core entity mutation commands.
Creation of entities and components is now checked to happen from the main thread.
This is already catching multiple buggy integration tests, these will be addressed in separate commits.
* Fix broken tests directly mutating entities from wrong thread.
* V1 commit
* V2 Commit, ObjectSerializer
* Make sure write for objects have the !type:<T> set
* Added AppearanceDataInit
* Change to AppearanceDataInit setting to AppearanceData the moment it itself gets set; ComponentInit is too late. Forgive me sloth.
* RELEASE-NOTES.md
* Fix release notes
* Fix release-notes for realsies
Added a new RecordingStopped2 event that receives a IReplayFileWriter object that can be used to write arbitrary files into the replay zip file.
Fixes#5261
* Minor allocs reductions
Added a poly struct with the intention of replacing the existing one whenever I finish box2c port.
* fix merges
* Revert some stuff
* Poly tests
* Heavily optimise entitylookup
Previously I made it so MOST of entitylookup goes through the same 4 or 5 codepaths and uses shapes. The downside was some codepaths were made much slower in the process.
This fixes most of the going up and down lookups that some codepaths did. It should also be faster than the pre-shapes version because GetLocalPhysicsTransform is being used for the non-approx queries and most entities are parented directly to their broadphase.
* Tests and confidence
* code
* dang
* Move RobustXaml to a shared package
In a near-future change, I'll make it possible to optionally link to
this from Robust.Client, which will allow JIT compiling XAML.
Also upgrade it to a version of .NET that supports nullability
annotations.
* Re-namespace packages
* Add a JIT compiler, plus hooks that call into it
In Debug, after this change, all XAML will be hot reloaded once every
time an assembly is reloaded.
The new code is compiled with SRE and is _not_ sandboxed -- this is not
suitable to run against prod.
In Release, the hot reload path is totally skipped, using the same trick
as SmugLeaf used in an earlier attempt to implement this functionality.
* Hot reload: watcher
This is a bit of a horror, but there's not in-engine support for
identifying the source tree or the XAML files in it.
* Put everything dangerous behind conditional comp
* Code cleanup, docs
* Fix a bad comment
* Deal a little better with crashes in the watcher
* Make reload failures Info, since they're expected
They were previously causing the integration tests to flag, even though
"a few types fail hot reloading because they're internal" is expected
behavior.
* Fix an unnecessary null check
I removed the ability for CompileCore to return null.
* injectors: null! strings, default primitives
* Tidy documentation (thanks, PJB!)
* Reinstate netstandard2.0, abolish Pidgin
* Internal-ize all of Robust.Xaml
* Add a cautionary note to Sandbox.yml
* Shuffle around where conditional compilation occurs
* Privatize fields in XamlImplementationStorage
* Internalize XamlJitDelegate
* Inline some remarks. No cond. comp in Robust.Xaml
* Use file-scoped namespaces
They aren't allowed at Language Level 8.0. (which I arbitrarily picked
for Robust.Xaml because it's the oldest one that would work)
* Bump language level for R.Xaml, file namespaces
* Force hot reloading off for integration tests
* Fix bizarre comment/behavior in XamlImplementationStorage
* Consistently use interfaces, even in generated code
* Update Robust.Client/ClientIoC.cs
---------
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Add CompRegistry methods to EntManager / CompFac
CompRegistries are nice to use and this just makes it a bit easier to extend functionality.
* fix bad pull
* Add FixturesChangeComponent
Adds / removes fixtures. Useful when used in conjunction with EntProtoId to dynamically add / remove fixtures.
* Move to system
* Fix allcomps test
We just do what content does and defer it until update. Saves performance + we don't have some BUIs that do special logic on open re-running it constantly (e.g. open on mouse position).
In profiles of RMC-14, encrypting network messages accounted for ~8% of main thread time. That's a lot.
Each NetChannel has an "encryption channel" which gets processed on the thread pool.
It is our suggestion for a long while to keep the TPS at 30 for servers. However the default was always 60.
I believe its better to have it as a default.
* Fix chunkenumerator allocs
This was number 2 to pathfinding sitting afk on a server. I thought the property would cache it but apparently not. Ref struct is just nicety and it's internal and not exposed to content anyway so.
* also dis
Pulling entity systems into direct fields in Clyde to make it now painful. This required adding an event to ClientEntityManager when these become available, as they are only available when the client is in a server/single player.
* Add window helper for BUIs
Automatically does OnClose and just makes content slightly nicer.
* more
* Add prototype reload helper
* Add Box2i Center
* weh
* Make PhysicsHull a ref struct
First time I've used it but seemed like a good candidate considering it's temporary.
* weh
---------
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
* Clamp audio tickrate
I am reasonably sure I saw a recommended 30TPS figure somewhere but I cannot find it again. At any rate I can't notice this but imagine it provides significant benefits for people on 144hz+ monitors.
* rn
---------
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
RaisePredictiveEvent was made to not check whether prediction is enabled in #3534. This doesn't make much sense to me and is causing various SS14 game logic to erroneously run when prediction is disabled.
Here's the fix PR. Also fixes the assert to actually work (checking Connected is wrong, it should've been InGame) and makes the new check also account for SinglePlayerGame.
* Add MapSystem.GetMapOrInvalid
This is effectively the same exact behavior as IMapManager.GetMapEntityId. Adding this so I don't have to consider whether warning fixes using MapSystem.GetMap() instead would change behavior.
* Warning fixes around IMapManager.GetMapEntityId
* Fix tests
* Strongly order network prototypes and resources.
When a new client connects, both the uploaded prototypes and resources get sent at once. There was no ordering here, which means that prototypes could easily load before resources. This would then obviously give load errors at runtime. In practice though this seemed fine because the RSI or something would just load fine after when spawned or something.
This was then broken by ae1051e813, which made ResourceCache start caching "that RSI doesn't exist" so it never really tried again.
I originally tried to fix this by adding an API to IResourceManager that allows content to invalidate the aforementioned cache (commit 316a7e4ac10100593202ff7f53dc2992611bbd1e, for however GitHub will track that) but then realized resource uploading isn't part of content like I first thought. Lol whoops. That API might still be useful for other dynamic content use cases, but I'm not committing it for now. That fix still caused errors to be spammed if the prototype was loaded before the resources were ready.
The new fix is to just load resources before prototypes. This is done by making them both ordered relative to each other, and running resources first.
Fixes#5291
* Release notes
* Warning fixes in Robust.Shared
* Robust.Client warning fixes
* Fix test failure
Test failures were due to broken system registrations for the client RobustUnitTest. It was accidentally registering some server systems, which means DebugPhysicsSystem wasn't gettings its dependencies properly.
Fixing this meant pulling half a dozen extra dependencies that client ContainerSystem and TransformSystem are supposed to have, but didn't.
* Adds MassDataChangedEvent to physics
This event is raised in response to changes to an entities innate mass/angular inertia/center of mass
* Use properties to fetch data from component
* Comp1
* Vector2
* I sure love an analyzer that doesn't work half the time
* Entity console commands system.
This adds a new base type, LocalizedEntityCommands, which is able to import entity systems as dependencies. This is done by only registering these while the entity system is active.
Handling registration separately like this required a bit of changes around ConsoleHost to make it more suitable for this purpose:
You can now directly register command instances, and also have a system to suppress `UpdateAvailableCommands` on the client so there's no bad O(N*M) behavior.
* Convert TeleportCommands.cs to new entity commands.
Removes some obsoletion warnings without pain from having to manually import transform system.
* Fix RobustServerSimulation dependency issue.
---------
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* New "must call base" analyzer.
This enforces that you actually call base when overriding stuff. This is intended for base methods like entity system's, where server/client systems overriding shared ones SHOULD call Initialize() and such.
* Add MustCallBase to entity system methods
* Make PvsSystem consider offset and zoom from EyeComponent
* Just use PvsScale float
* float.IsFinite
---------
Co-authored-by: geraeumig <alfenos@proton.me>
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
Content has multiple cases where AnimationCompletedEvent is used to loop an animation. #5238 broke some of these by making this event raised even when manually removed.
Luckily most cases in content tie the animation looping to the presence of a component, so the component getting removed means there's nothing to refresh the loop. LightBehavior is not as fortunate however, causing bugs like https://github.com/space-wizards/space-station-14/issues/29144
This boolean allows looping code to properly distinguish the event, so it won't try to restart an animation after removing it directly.
* Add style box override properties to ContainerButton and TabContainer
* Add background panel to TabContainer, and add text color overrides
* Undo background panel
You can achieve the same by instead putting the TabContainer in a PanelContainer
* Add BackgroundColor property to StyleBoxTexture
* Remove BackgroundColor from StyleBoxTexture
* Add VisibilityChanged virtual to Control
* Defer updating invisible OutputPanels on UIScale change
DebugConsole falls under this when not hidden, and it significantly improves perf of e.g. resizing the window when there's a lot of stuff in there.
* Avoid redundant UI Scale updates on window resize.
Window resizing can change the UI scale, due to the auto-scaling system. This system had multiple perf issues:
UI scale was set and propagated even if it didn't change (system disabled, not effective, etc). This was just wasted processing.
UI scale was updated for every window resize event. When the game is lagging (due to the aforementioned UI scale updates being expensive...) this means multiple window resize events in a single frame ALL cause a UI scale update, which is useless.
UI scale updates from resizing now avoid doing *nothing* and are deferred until later in the frame for natural batching.
* Reduce allocations/memory usage of various rich-text related things
Just allocate a buncha dictionaries what could possibly go wrong.
I kept to non-breaking-changes which means this couldn't as effective as it should be.
There's some truly repulsive stuff here. Ugh.
* Cap debug console content size.
It's a CVar.
OutputPanel has been switched to use a new RingBufferList datastructure to make removal of the oldest entry efficient.
---------
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
For some reason we call ThreadPool.SetMinThreads on startup of the game server. Calling this function this early seems to put us at high risk of triggering the following deadlock bug in the .NET runtime: https://github.com/dotnet/runtime/issues/93175
Given I have zero trust in whether this manual ThreadPool fuckery is even helpful, I'm just gonna nuke it and call it a day.
Many patterns (both in engine and content) make use of regular TryGetResource returning null. The problem is that if the resource doesn't exist, it won't be cached and the code attempts to load it from disk *every single time*.
For example, opening an inventory in SS14 would hang the client for ages on some UI themes due to the UITheme texture fallback system constantly trying to load a texture that doesn't exist.
It's a message FROM the hub
Currently, if you get "You are banned from the hub, if you believe this is an error contact us" it may confuse someone that they have to visit the hub URL where they will be met with a 404 because it's not an actual website. Seems it looks like "contact us to website"
Similarly, with "Failed to contact status address" makes it look like it's an error message coming from robust failing to connect to the hub server. When it's actually coming from the hub, telling you probably don't have your ports open.
I believe changing it to "from" will get the message acros that this is a message from the HUB and not robust.
It was using an old Npgsql version, which broke compilation. Updating it breaks some of the custom JSON mapping code.
Comment out the entire thing, it's not being used anymore anyways.
WHY WAS THIS A BYTE.
This prevented having more than 255 people on a server, beyond that the game might get stuck as people's player states wouldn't necessarily get sent.
* Remove CompIdx locks
So GetComponentState in PVS calls RaiseComponentEvent which in turn calls this. When you start getting a significant number of players it seems to run into lock contention considering every single compstate get will lock this.
Instead we'll just update the dictionary whenever RegisterClass is called instead.
* Fix thread-safety issues
The hub has been adding this parameter for a while, instructing the game server that it doesn't need to run ACZ. This fixes the (relatively common) issue where the first publish fails because ACZ takes longer than the hub status timeout.
I apparently already committed some code for this once on accident. Whoops.
Eye is not a well-designed API, but we've got it so here we go. It was originally designed to have some form of support for non-entity eyes through the FixedEye type, by overriding the Position property in a child type. #1016 broke this however.
This PR just makes the property writable so this is possible again.
Co-authored-by: moonheart08 <moony@hellomouse.net>
* Perf: Avoid a copy of ComponentChanges every tick within Checkpoints
- Also remove temporary Dictionary created every tick * every change
- Reduces GC load, 6GB less temporary allocations on typical replays.
* perf: Checkpoints: Apply state changes in-place when possible
- Avoids >1GB of gas tile allocations.
* Revert "perf: Checkpoints: Apply state changes in-place when possible"
This reverts commit 1a478944a6.
* Fix delta state merge issues
---------
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
* Perf: Improve replay playback responsiveness
- new CVAR ReplayMaxScrubTime
- There is a time budget when applying replay ticks updates of only 10 ms
- Ensure we don't apply checkpoints that move us backwards in time by accident
- Prevent double-lookup of checkpoints.
* Fix merge error
* Fix it again, but for real this time
---------
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
* Update Linguini to v0.8.1
* Add tests and verify desired behavior has been reached.
* Remove duplicate messages.
* Minor fix to message output. Add Wrapper for Fluent errors.
* Restart the test pipeline.
* Restart the test pipeline.
* Make so test don't do an early bailout.
* Ensure all errors get written rather than bailing on first.
* Fix text breakage.
* Remove obsolete // TODO LINGUINI
* line wrapping conventions
---------
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
I'm not entirely sure what happens, I couldn't repro it locally even when I tried to force it to use threadpool threads. The only info I have is it happens and no other info has been provided so.
* Fix grid-based audio
- Fixes parenting issues.
- Add SetGridAudio as an easy way to set it up and apply the override too.
* No more global
* Rejig it all
* mergew
* review
* Minor optimisation
* Revert "Minor optimisation"
This reverts commit d0cdac7690.
* Remove full "delta" states
* Update MapGridComponentState
* abstract ComponentState
* Release notes
* Fix tests
* Fix nullable errors
* A
* typo
* Turns out testing my own PRs is a good idea
* too many warnings
* Add `IConfigurationManager.OnCvarValueChanged` event
* Prevent CVars from changing type
* Allow double registrations?
* Turn debug asserts into exceptions
* We should really just start using generics if we can
* Re-use CVarChangeInfo
* Explicit old value
* Rename `OnCvarValueChanged` to `OnCVarValueChanged`
* internal constructor
* perf: Replays use less memory for checkpoints (#28052)
- Simple change of the CVars and some stats
- Based on a Lizard replay, checkpoints move from on average every 70 ticks to every 350.
* Set a minimum number of ticks that must pass between checkpoints
* Fix stat collection, split _checkpointMinInterval, more CheckpointState
* update release notes
* Add physics delta states
Significantly cuts down on data being sent + should make client state handling faster.
* Update Robust.Shared/Physics/Components/PhysicsComponentState.cs
.NET SDK 8.0.300 changed ManagePackageVersionsCentrally to be implicitly set if Directory.Packages.props exists. We do not want this, as we intentionally have some projects that have it disabled.
We now explicitly unset the value in the Directory.Packages.props file to get the old behavior back.
See https://github.com/dotnet/core/issues/9309
These still take almost half-ms in server tick time on live as it has to do a raycast for everyone that has storage or their PDA open or whatever. Haven't benchmarked with a lot of clients but easiest way to tell is just check grafanaTM and I'm not sure how to check this locally.
* Add truncate for filesaving
If I expose it to content I pretty much always want truncate to be honest.
* Update Robust.Client/UserInterface/FileDialogManager.cs
---------
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Partially fix UI assert
* Avoid breaking change in BoundKeyEventArgs
This is a public constructor, as much as it maybe shouldn't be. Adding this parameter is a breaking change.
* Replace .Disposed checks with ! .VisibleInTree
Control disposal should not be used anymore.
* Release notes
---------
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
* Add load parameter support to RSIs.
Currently only supports turning sRGB off. RSIs with custom load parameters are not thrown into the meta-atlas.
As part of this, TextureLoadParameters and TextureSampleParameters has been made to support equality.
* Add UV2 channel to vertices.
This is a bad hack to make displacement maps work in Robust. The UV2 channel goes from 0 -> 1 across the draw and can therefore be used by displacement maps to map a separate displacement map layer on top of the regular meta-atlas RSI texture.
This creates float inaccuracy issues but they weren't bad enough to completely void the feature. I'm thinking I learn from this experience and completely re-do how UVs work with the renderer rewrite, so that hopefully won't happen anymore.
This required dumping the optimized PadVerticesV2 because the changed struct size made it impractical. RIP.
I don't like this approach at all but the renderer is slated for a rewrite anyways, and all shaders will need to be rewritten regardless.
* Add CopyToShaderParameters for sprite layers.
This effectively allows copying the parameters of a sprite layer into another layer's shader parameters. The use case is to copy texture coordinates for displacement maps, as the exact map used changes depending on orientation. It also enables animations to be used though I didn't use that personally.
* 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
It would bail out of the entire update logic if you aren't hovering over a map position, which isn't great when the control displays far more than in-simulation mouse position info.
* Network audio states
Lets server pause or stop audio or whatever.
* Better API and state fix
* Bunch of fixes
- TimedDespawn proccing too early.
- PlaybackPosition setting
- SetState setting.
* Clamps and despawn fixes
* fix
* Reapply "Allow control layout properties to be set via style sheet." (#5035)
This reverts commit af36d24892.
* Fix tests
MaxSize properties had wrong default. Oops.
* Enable roslyn extension tests in CI
* I'll be real I kinda just hoped that last one would work. dotnet test's --help documentation is useless garbage so I couldn't tell if that was supported or not. Guess not.
* Actually fix the Roslyn tests.
As far as I can tell, Roslyn tests haven't worked since #2976.
The tests used a pretty awful technique of linking the test code against the analyzer, so that the analyzer's copy of the relevant attributes got included into the test. This then broke when the namespace got changed by the linked PR.
Now the tests get an EmbeddedResource for the necessary test files compiled instead.
Also applied this to DependencyAssignAnalyzerTest because why not.
This works by setting the stylesheet values into the regular control property fields when updated. This means 0 performance overhead except when updating styles, and even then it's probably negligible. A bitfield is used to track which properties are set and how.
This code is all done manual for now. I wanted to make a source gen for this but couldn't be arsed at the moment. The code manually written here is basically what a future source gen would generate optimally.
ROBUST_CVARS had multiple issues:
* Not composable, i.e. two independent systems can't easily layer CVars to set as they all have to go into one var
* Not sanitary, there's no way to store things that have a ";" in them because it'd always get used as separator.
This adds a new ROBUST_CVAR_* system. For example I can set ROBUST_CVAR_game__hostname=foobar to set a CVar via a single env var. A double underscore ("__") is replaced with a period to make the CVar names safe for environment variables.
Also made Robust.Shared.Configuration.EnvironmentVariables internal because wtf that should not be public no.
* Make various ValueList enumerators use spans
* Remove reference to EntityEventBus.OrderedRegistration
---------
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
* 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>
The first measure would include scroll bar size even if the available size fit all the contents. This would make the returned size larger than it should be.
* 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
Before, sawmill log levels were very clunky to use. We set the root sawmill to something like debug or info, but then it becomes impossible to specify specific sawmills to be verbose. This is because sawmills checked the log level at every part of the hierarchy when navigating "up" to find log handlers to write into.
This changes the behavior so that the filter log level is the FIRST set log level encountered on the hierarchy. This means the log level is compared only once, and a sawmill down the hierarchy that has a level like Verbose set can cause verbose messages to come up even if the root is still set to Debug. This matches the logging behavior in libraries such as ASP.NET Core.
Reports of problems, double checked with Grafana. Great.
I am going to do manual test runs of this system against Miros again if I end up looking to improve the situation.
Wow this API is bad. Well the API is just terrible for perf for multiple reasons but not fixing that...
1. Was using DSA GetTextureImage() instead of GetnTexImage() so only worked if DSA was available.
2. Was using stackalloc with a potentially huge amount of memory (original bug).
3. Had an off-by-one for the vertical coordinate.
All fixed now.
Fixes#5001
* made possible to destroy entity on EndCollideEvent
* figured queue delete issue
* review
---------
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
Some players continue to have "stuck at connected" issues connecting to
most servers, but apparently this issue has become more prominent in the
last two weeks or so?
It is almost certainly an MTU problem because there are at least two
servers on the hub that run a lower default MTU, and these players had
no problem connecting to them. For one of these reporters, I actually
increased the MTU to 1000 and they could no longer connect, and could
connect again once it was lowered to 900.
It's not clear what recent changes, either to the codebase or to the
public Internet that have been exercising this MTU issue more. For those
experiencing MTU issues, it seems that connecting to a less full server
results in higher probability of success.
Nevertheless, bringing down the default MTU and then possibly enabling
MTU expansion in the future would make this game playable for a small
but not insignificant bit of players.
This was broken for more reason than one.
So the obvious reason they weren't counting right is because I forgot to add a call to update the metric in Shrink(). Whoops.
The second issue is that .NET's new metric types are unintuitive as shit and Microsoft would've done better to just link to the OpenTelemetry specification instead of whatever garbage they documented instead.
It turns out UpDownCounter just wasn't the correct choice at all! Because it only ever gets DELTA VALUES sent to collection tools, it can never be used for absolute measurements (such as memory usage) **despite Microsoft literally using examples of absolute values in their docs** ("queue size"). The OpenTelemetry spec is clear on this.
This means writing more code, because the API is shit. Great.
This callback enables code to update its metrics only when required. Needed this for SS14 since online admin count stats are not something I want to update on an "arbitrary" basis.
Tons of consideration and commenting for how this plays in with stuff like dotnet-counters. Added the metrics.update_interval CVar to act as a fallback for this event when dotnet-counters and such is in use.
Things like .NET bumps and engine minor version updates break the hashes. Just allow mismatching hashes, printing a warning to the log at least.
If the hash mismatches it'll explode with some weird error like invalidcast/index so whatever.
It'd be better if there was a "hey this might not work, you sure you want to load this?" screen, but I don't feel like rewriting the entire replay loading system right now.
Fixes https://github.com/space-wizards/SS14.Launcher/issues/142
* Debug window collection popup
* Try fixing?
* DevUI shows children and string collections
* XAMLify the popup
* Rename popup
* Deduplicate code
* Simplify popup creation
* MouseFilter.Ignore is default so it can be removed
Useful in some rare cases, mainly for grid-related activities.
Specifically:
- Audio entity where we never want it detached.
- FTL previs effects to show impending squish.
* Fix tooltips underflowing left side of screen
If the tooltip is so large it would clip the right side then it would underflow completely off-screen. This just clamps it instead.
* Better
* rubb
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.
They tend to get cut off (or well did on wizden before pjb changed it to this exact value bigger along with another patch). Before you got around 2ish hours in a replay before it stopped. I doupt most servers will reach 6ish hours before this takes effect. But those servers can increase this value of needed.
- If scroll is not visible we don't handle it. This means nested containers don't interfere with their parents anymore.
- Fallback to Y-scrolling for H-scroll only containers.
Easiest way to repro is set a non-1.0 UIScale and open the main menu up, the logo will be fonky.
I checked the control dimensions and this aligned with my expectations.
* Add grid tile to Vector2 methods
Avoids me having to do it on content.
* Release note
* Engine
* Collapsible
* Add entitylookup methods for parent / map
Content's done it a bunch so make it reusable.
* Add MaxDimension property to Box2
Sometimes I want to pretend it's a circle radius.
* Add GetLocalPosition to controls
In my case I want the mouse's position inside of the control to show something under it unless there's a better way.
* Add global rectangles for controls
Like my other PR used to check if mouse is inbounds on the control without doing some skrunkly caching with mousemove.
* Add dotted line drawing to screen handle
Probably needs anti-aliasing but idk an easy way to do it.
* weh
* weh
* a
* weh
* weh
* Optimise ChunkEnumerator
It never unioned the AABB passed in with the grid's AABB so it might inadvertantly iterate a lot more dummy chunks than it needs to.
This helps speedup FindGridsIntersecting.
* weh
* Add DrawPrimitives overload for List<Vector2>
Storing ValueList in a field seems sussy so this is the next best thing.
* weh
* Bump pool size
* oop wrong method
* Add drawing methods for lists
Content may be using it over a valuelist for whatever reason.
* Add more ValueList conveniences
* Add more CollectionExtension methods
Maybe array.resize is bad for sandbox coin, in which case I'd also settle for changing it to a list instead.
* Add ToMapCoordinates method for NetCoordinates
* fr
* mraow
* Release notes
* 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
Fixes#4828
Asynchronous console command completions were just not being run on the server, the wrong function was being called. Hooray.
This caused sudo to break because it actually uses an async command completion (as other command completions it invokes might in turn be async).
* Optimise ChunkEnumerator
It never unioned the AABB passed in with the grid's AABB so it might inadvertantly iterate a lot more dummy chunks than it needs to.
This helps speedup FindGridsIntersecting.
* weh
* oop wrong method
* Update RELEASE-NOTES.md
* Source gen reorganizations + component unpause generator.
This commit (and subsequent commits) aims to clean up our Roslyn plugin (source gens + analyzers) stack to more sanely re-use common code
I also built a new source-gen that automatically generates unpausing implementations for components, incrementing attributed TimeSpan field when unpaused.
* Fix warnings in all Roslyn projects
This brings default ButtonGroup behavior back to before #4841.
The original comments in the code *did* clearly intend for the other behavior to be the default, but the code was blatantly bugged (whoops) so this didn't happen. Content relied on this A LOT and it's quite sane behavior regardless so just change the default back call it a day.
Breaks SS14 stylesheets due to not responding to style properties anymore.
At least one of those seems to be unfixable (ModulateSelf usage) which makes me think we should just deprecate ModulateSelf instead. However I'm not fixing that here.
* Add GetEncoding to sandbox (#4892)
Need this struct allowlisted to for nice unicode sanitization.
* Add UnicodeRanges too
* Changelog
---------
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
If the parent is somewhere below the transform hierarchy should still be okay, this just fixes where something getting pulled gets picked up as pulling doesn't seem to be handling this anymore.
* 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>
* Add entitylookup methods for parent / map
Content's done it a bunch so make it reusable.
* weh
---------
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
* Reapply "Fix replay int overflow issues." (#4802)
This reverts commit 32049e34f2.
* IConfigurationManager.LoadDefaultsFromTomlStream now does required type conversions.
This fixes scenarios like loading of `long` CVars.
This is the "total length" of the MIDI file, but it's not cached by FluidSynth and expensive to calculate.
This property was used in the render code (for local files only) and the instrument menu. Caching it drastically improves performance.
It makes no sense for our use case, and it caused FluidSynth to allocate a different thread pool *per* mixer. And every one of those threads have *high* priority. That's like *really* bad.
Furthermore, it was based on ParallelProcessCount which is currently bugged, and because of that we were always allocating 256 (!!!) real OS threads for a MIDI synthesizer. CHRIST. (fix for ParallelProcessCount is separate)
I assume this is responsible for a ton of people's MIDI lag, it just murdering their PC's CPU scheduler.
The ability to multithread FluidSynth still exists as a CVar but it'll default to 1 and I don't think it makes sense to ever change it.
Also there was code to dynamically change the parameter, as far as I could test this just always crashed the process so out it goes.
* Add MaxDimension property to Box2
Sometimes I want to pretend it's a circle radius.
* a
---------
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
* Add GetLocalPosition to controls
In my case I want the mouse's position inside of the control to show something under it unless there's a better way.
* weh
---------
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
* Add global rectangles for controls
Like my other PR used to check if mouse is inbounds on the control without doing some skrunkly caching with mousemove.
* weh
---------
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
* Entitylookup approx / shape changes
- Make the shape queries respect the approx flag.
- Make everything use shape queries.
- Hopefully reduce some of the internal cruft.
- Add some new methods I need for trade station.
* Bunch of deduplication
* Remove some more duplication abuse
* Remove intersection duplication
* Bunch more cleanup
* MapManager rejig
* Fix some stuff
* More fixes
* Release notes
* Fix TryFindGrid
* Sensor check
* Fix query
* Fix map queries
* More cleanup
* Fix whatever this is.
* also dis
* Fix entity query
* Smol optimisations
* Also this
* Clear entities seen by a session when the full update is requested
* Disable PVS budged for the full update
It helps preventing weird intermediate states when a client observes
themselves in a void with all the alert notifications going wild.
However it introduces a spike on CPU and networking.
* Add changelog line
* Move the changelog line to the proper place
* Update RELEASE-NOTES.md
* Revert "Disable PVS budged for the full update"
This reverts commit 6976ca04b8.
* Update RELEASE-NOTES.md
---------
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.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
2024-01-16 21:04:39 +01:00
1256 changed files with 76637 additions and 33171 deletions
The behaviour of this command can be inverted using the "not" prefix.
command-description-tpto =
Teleport the given entities to some target entity.
command-description-player-list =
Returns a list of all player sessions.
@@ -19,7 +23,7 @@ command-description-buildinfo =
command-description-cmd-list =
Returns a list of all commands, for this side.
command-description-explain =
Explains the given expression, providing command descriptions and signatures.
Explains the given expression, providing command descriptions and signatures. This only works for valid expressions, it can't explain commands that it fails to parse.
command-description-search =
Searches through the input for the provided value.
command-description-stopwatch =
@@ -38,8 +42,7 @@ command-description-as =
command-description-count =
Counts the amount of entries in it's input, returning an integer.
command-description-map =
Maps the input over the given block, with the provided expected return type.
This command may be modified to not need an explicit return type in the future.
Maps the input over the given block.
command-description-select =
Selects N objects or N% of objects from the input.
One can additionally invert this command with not to make it select everything except N objects instead.
@@ -53,10 +56,8 @@ command-description-entities =
Returns all entities on the server.
command-description-paused =
Filters the input entities by whether or not they are paused.
This command can be inverted with not.
command-description-with =
Filters the input entities by whether or not they have the given component.
This command can be inverted with not.
command-description-fuck =
Throws an exception.
command-description-ecscomp-listty =
@@ -70,9 +71,9 @@ command-description-ls-in =
command-description-methods-get =
Returns all methods associated with the input type.
command-description-methods-overrides =
Returns all methods overriden on the input type.
Returns all methods overridden on the input type.
command-description-methods-overridesfrom =
Returns all methods overriden from the given type on the input type.
Returns all methods overridden from the given type on the input type.
command-description-cmd-moo =
Asks the important questions.
command-description-cmd-descloc =
@@ -95,6 +96,8 @@ command-description-vars =
Provides a list of all variables set in this session.
command-description-any =
Returns true if there's any values in the input, otherwise false.
command-description-contains =
Returns whether the input enumerable contains the specified value.
command-description-ArrowCommand =
Assigns the input to a variable.
command-description-isempty =
@@ -119,6 +122,8 @@ command-description-splat =
"Splats" a block, value, or variable, creating N copies of it in a list.
command-description-val =
Casts the given value, block, or variable to the given type. This is mostly a workaround for current limitations of variables.
command-description-var =
Returns the contents of the given variable. This will attempt to automatically infer a variables type. Compound commands that modify a variable may need to use the 'val' command instead.
command-description-actor-controlled =
Filters entities by whether or not they're actively controlled.
// /0/Test0.cs(7,9): warning RA0026: Usage of a static Regex function that takes in a pattern string. This can cause constant re-parsing of the pattern.
OpenALSawmill.Error("[{0}:{1}] AL error: {2}, {3}. Stacktrace is {4}",callerMember,callerLineNumber,error,message,Environment.StackTrace);
OpenALSawmill.Error("[{0}:{1}] AL error: {2}, {3}. Stacktrace is {4}",callerMember,callerLineNumber,message.Error,message.ToStringAndClear(),Environment.StackTrace);
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.