83ad6042a7 & b267cd6fb4
Does not include test code to avoid risking merge conflicts.
(cherry picked from commit 415585a30d74fcae61f581808220a7aaeca3eaf5)
(cherry picked from commit e36628a6d436ea08d6d31441c101a88a5504c515)
* 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
* Entitylookup tweaks
- Removed a dupe internal method.
- Removed some dupe internal code.
- Renamed some methods in line with local vs non-local.
* Update release
* Also this
* Add support for forcing prototypes in a file or directory to be parsed as abstract
* Simplify mapping add abstract true call
* Fix docs
* Address reviews
* 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
* Extension helper function for registering BUI events filtered to UI key.
Usages of events like BoundUIClosedEvent frequently did not check the UI key or do it improperly. This has, and will continue to cause, bugs.
The new helper (accessible as Subs.BuiEvents() from an entity system) makes it easy to subscribe to BUI events while also filtering to the correct UI key.
Also added missing SubscribeLocalEvent overloads with new handler types to EntitySystem.Subscriptions.
* Sprinkle [ViewVariables] around BUI
* Avoid buggy behavior if a Bound UI is closed inside the `BoundUIOpenedEvent` that's opening it.
* Add random pick / take methods for sets
I want it don't at me.
* cleanup (mraow)
* Revert "cleanup (mraow)"
This reverts commit e279957f21.
* flatpak
* notes
Happens if you just type "tp:to<space>" into the console.
Toolshed can fail to provide completion results, in which case a null propagates and possibly crashes the server.
IPostInjectInit does not run through IoCManager.InjectDependencies(). This meant the logger was not initialized, and loading failures in the console history would crash the client startup due to an NRE while trying to log a warning.
See https://github.com/space-wizards/space-station-14/issues/23624
* 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
* Remove physics sleep cancelling
Was a bad idea, in the future I'm going to add even more asserts around this but for now I can fix content.
* Fix this
* 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 GetEntitiesIntersecting for maps
Still valid to call it in this way. Also added the collections versions because muh allocs.
* Add local ones too
This causes tons of problems with OpenDream's small popup windows, and even for SS14 it doesn't make much sense.
The behavior can be re-enabled per window by setting WindowRoot.DisableAutoScaling to false.
This is Hybrid ACZ (Content.Client.zip in server package) but with the ability to add extra files on top (OpenDream rsc)
Also added IStatusHost.InvalidateAcz().
* 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>
Replays now use a dedicated thread (rather than thread pool) for write operations.
Moved batch operations to this thread as well. They were previously happening during PVS. Looking at some trace files these compression ops can easily take 5+ ms in some cases, so moving them somewhere else is appreciated.
Added EventSource instrumentation for PVS and replay recording.
* Save work.
* three billion tweaks
* Rune-aware parser.
* a
* all shedded out for the night
* a
* oogh
* Publicizes a lot of common generic commands, so custom toolshed envs can include them.
* Implement parsing for all number types.
* i think i might implode
* a
* Tests.
* a
* Enum parser test.
* do u like parsers
* oopls
* ug fixes
* Toolshed is approaching a non-insignificant part of the engine's size.
* Pool toolshed's tests, also type tests.
* bwa
* tests pass :yay:
* Update Robust.Shared/CVars.cs
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
* how did this not fail tests
* awa
* many levels of silly
---------
Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
* Saving work
* Move shit to engine
* lord
* merg
* awa
* bql is kill
* forgot the fucking bike rack
* bql is kill for real
* pjb will kill me
* aughfhbdj
* yo ho here we go on my way to the MINES
* a
* adgddf
* gdsgvfvxshngfgh
* b
* hfsjhghj
* hbfdjjh
* tf you mean i have to document it
* follow C# standards
* Assorted cleanup and documentation pass, minor bugfix in ValueRefParser.
* Start porting old commands, remove that pesky prefix in favor of integrating with the shell.
* Fix valueref up a bit, improve autocomplete for it.
* e
* Toolshed type system adventure.
* a log
* a
* a e i o u
* awa
* fix tests
* Arithmetic commands.
* a
* parse improvements
---------
Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
All HttpClient usages in the engine now use Happy Eyeballs, same implementation as the launcher.
Makes a IHttpClientHolder type so content can profit from this technology too. Didn't make use of this in all HttpClient usages in the engine itself, due to varying circumstances making it annoying to refactor.
This can happen if we're out of audio streams. Before, we just kinda pretended like everything was OK, which easily caused crash bugs in e.g. MIDI.
Ideally the audio engine would be less terrible and this could be handled better than "throw new Exception()", but I'm fixing a stack overflow here alright?
* Add ISawmill.Verbose log helpers
* Verbose logs for server-side networking handshake.
* Replays: final boss
It does zippies now. It fucking works. Amazingly, in fact.
* Add ZipArchive to sandbox
`ResPath.RelativeTo()` now considers non-rooted paths relative to `.`
This fixes some things like `MemoryContentRoot`'s `FindFiles()` implementation.
Fix `IContentRoot.GetEntries()` default implementation (used by all content roots except `DirLoader`) not working at all.
Made `ResourceManager.ContentGetDirectoryEntries()` report content root mount paths as directories.
Added tests for all of the above.
* Debug connection screen
* [ContentAccessAllowed] so I can use IStateManager on engine types.
* Implement a default engine stylesheet.
* awa
* Fix an issue that can cause hangs when resolving a color.
---------
Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Robust.Client.WebView includes Robust.Client.dll and such now, so sandboxing was loading the Robust.Client.dll from there instead of from the running engine itself.
* dog what am i doing
* finish gen source part from class symbol
* we are dangerously close to things happening
* generation fixes
* oh? on god?
* stop autogenerating the attribute for no reason + diagnostics
* testing diagnostics
* proper type name handling + clonedata bool
* thank you material storage for making me realize this
* forgot to commit
* p
* fixes for afterautohandlestate
* make it work with access
This might be a maint thing but look, I just want seeded RNG and IRobustRandom doesn't have it so not sure what is easier considering IRobustRandom is also registered as a depdency but constructing it manually is weird aaaa
Re-organize initialization so that User-Agent CVar actually works.
Add web.headless CVar to not load CEF even on graphical client.
Clean up init logic to not rely on static IoC, and clean up loggers used too.
Previously there was no easy way of passing matrices onto shaders, with the current setup.
Now, matrices can be defined for the shader in the same way that vectors can, as a series of numbers parsed as floats.
The previous logic used SDL_GetDisplayDPI. This is a broken API however that doesn't return consistent results between platforms. On Windows it returns the configured scale DPI value, on other platforms it returns the actual raw monitor DPI.
The new code is what you should do, namely dividing window size with size in pixels.
Implement MarkupTagManager for getting markup tags
Implement IMarkupTag interface
Implement markup node classes
Prepare switching out FormattedMessage with new implementations
We now check the list of CVars to see if there's any unregistered CVars specified (i.e. in config, but not actually registered by the code). This would probably indicate a typo.
Only doing this on the server for now. The client may share config files from multiple codebases and end up with unknown CVars from there. This is probably fine, since those would be applied more automatically and not prone to config file typos as much.
I circled back around to this and discovered that the fix is (probably?) easy.
Closes#3079
I tested this locally but I'm pushing the change via the web editor so I don't have to go to the trouble of setting up a Robust fork of my own.
Engine and content locales get merged into the same folder. This is causing two files named the same thing to be in the same place, presumably causing extracting the build to fail? Hopefully?
* UIControllerManager
Implemented UI Controller Manager
* added fetch function
* added note
* Hiding some internal stuff
* Implemented event on gamestate switch for ui
* Fix serialization field assigner emit
* fixing issues with ILEmitter stuff
* AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
Blame Smug
* fixing nullref
* Add checking for no backing field / property for ui system dependencies
* fixes Gamestate detection
* Implemented event on UIControllers on system load
* Updated systemload/unload listeners
* Had this backwards lol
* Fix nulling systems before calling OnSystemUnloaded, broke InventoryUIController.Hands.cs
* Created UI Window management system
- A manager that allows for easy creation and access of popup or gamestate windows
* Changing to use basewindow instead of default window
* Implemented UI Theming that isn't ass
* Updated default theme loading and validation
* Added path validation for themes
* Implemented UI Themes
* Implemented UI Theme prototypes
* Implementing theming for texture buttons and Texturerects
* fixing server error
* Remove IUILink
* Implemented default theme overriding and theme colors
* Fixing sandbox lul
* Added error for not finding UITheme
* fixing setting default theme in content
* Move entity and tile spawn window logic to controllers
* Add 2 TODOs
* Merge fixes
* Add IOnStateChanged for UI controllers
* Fix inventory window being slow to open
Caches resources when the UI theme is changed
* Remove caching on theme change
The real fix was fixing the path for resources
* Remove test method
* Fix crash when controllers implement non generic interfaces
* Add controllers frame update
* Split UserInterfaceManager into partials
- Created UI screen
* Converted more UI managers into partials
* Setup UIScreen manager system
* Added some widget utility funcs
updated adding widgets
* Started removing HUDManager
* Moved UiController Manager to Partials
Finished moving all UIController code to UIManager
* Fixed screen loading
* Fixed Screen scaling
* Fixed Screen scaling
cleanup
* wat
* IwantToDie
* Fixed resolving ResourceCache instead of IResourceCache
* Split IOnStateChanged into IOnStateEntered and IOnStateExited
* Implemented helpers for adjusting UIAutoscale for screens
* Fixed autoscale, removed archiving from autoscale
* Implemented popups and adjusted some stuff
* Fixing some popup related shinanegans
* Fixing some draw order issues
* fixing dumb shit
* Fix indentation in UserInterfaceManager.Input.cs
* Moved screen setup to post init (run after content)
* Fix updating theme
* Merge fixes
* Fix resolving sprite system on control creation
* Fix min size of tile spawn window
* Add UIController.Initialize method
* https://tenor.com/view/minor-spelling-mistake-gif-21179057
* Add doc comment to UIController
* Split UIController.cs and UISystemDependency.cs into their own files
* Add more documentation to ui controllers
* Add AttributeUsage to UISystemDependencyAttribute
* Fix method naming
* Add documentation for assigners
* Return casted widgets where relevant
* Fix entity spawner scroll (#1)
* Add CloseOnClick and CloseOnEscape for popups
* Remove named windows and popups
* Cleanup controller code
* Add IOnStateChanged, IOnSystemChanged, IOnSystemLoaded, IOnSystemUnloaded
* Add more docs to state and system change interfaces
* Fixing Window issues
* Fixing some window fuckery
* Added OnOpen event to windows, updated sandbox window
Sandbox windows now persist values and positions
* Recurse through controls to register widgets (#2)
* Allow path to be folder
* Fix local player shutdown
* Fixing escape menu
* Fix backing field in DataDefinition.Emitters
* Ent+Tile spawn no crash
* Skip no-spawn in entity spawn menu
Co-authored-by: Jezithyr <jmaster9999@gmail.com>
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
Co-authored-by: Jezithyr <Jezithyr@gmail.com>
Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com>
Co-authored-by: Flipp Syder <76629141+vulppine@users.noreply.github.com>
Co-authored-by: wrexbe <wrexbe@protonmail.com>
* adds includedatafields to serv3
* fixes some stuff and adds tests
* checks for circular include
* fix writing
* this one should fix it frfrf
* ok now this one is gonna be it i swear
* we can save a few operations here
* goofy string
Co-authored-by: Paul <ritter.paul1@gmail.com>
MsgMapStrServerHandshake was being sent as unordered, meaning that it could actually arrive on the client before the handshake-finished messages. Whoops.
* Dirty PVS chunk when visibility mask changes
* fix tests?
* aaaaaa
* maybe sorta finally fix tests
* directly return vis mask,
Also defaults to 1 only if visibility component does not exist.
* make sure everything has first bit set
* Don't disable access check outside FULL_RELEASE.
* Content allows all commands on +HOST now
* Client-side completions are filtered for perms and sorted.
This was an existing bug, but due to me moving more cleanup logic to game thread shutdown the window of opportunity for it to trigger just got much greater.
* Trying to get res:// and usr:// cookies to wrok
* Update CefGlue
* Bump CEF
* Seal types in WebView
Fixes warnings
* Move most of client cleanup to game thread.
This used to run in the windowing thread which broke CEF shutdown, most notably cookie saving.
* "flushcookies" command for CEF.
* Remove unecessary res:// code.
* Fix tests
* More request handler fixes.
* Good thing I don't have to care about commit quality in PRs like this.
* Cleave the ACZ code into two parts
* SSAZip - faster-performing than ZipArchive, very small codebase
* OnDemandFile to reduce RAM usage of SSAZip
* Modify OnDemandFile to be more amiable for replacing parts of ACManifest
* Make the ACZ Manifest code a lot less reliant on an "internal zip file" for memory usage reasons
* Finally allow disabling legacy client zip creation entirely
* ZIP is now only an ingestion format for ACZ, not actually served anymore
* We do a little renaming
* We do a little namespace adjustment
* We do a little ABOMINATION OF FILE MERGING
* Significantly optimise prediction resetting
Turns out just tracking dirty entities and not iterating 30k is much faster.
* cleaner
* Slightly better again
* review
* Fix
* boop
* rebiew
* A
This was like 1/3 of the frame spikes from PVS pop-in. The main benefit is just checking if the entity is anchored for grid traversal and the secondary was earlying-out handling component state if it's sent to nullspace.
* benchmark script
* more changes
* oopsie
* adjust workflow
* Put a concurrency limit on the benchmarks action
* Update run_benchmarks.py
Co-authored-by: Paul <ritter.paul1+git@googlemail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* RobustToolbox side of Redial API.
Please be aware that as far as I know testing this code is nigh-impossible until it ships.
* a smidge of paranoia
* paranoia on the paranoia please
* DetachParentToNull tweaks
The other parent change message already has the mapid and gridid updated when issuing the event.
We'll also guard the event by checking if they're already in nullspace.
* woops
It now includes the invalid hexcode argument.
Something in content kept getting these exceptions on prod and knowing the invalid argument would be very helpful when debugging these in the future.
* Deleting a map is now routed through MapComponent deletion.
* Remove map and grid deletions from map networking, just delete the entity if you want to remove the map.
* Moved the chunkSize property of created grids from the networked MapData to the MapGridComponent state.
* Remove unused IMapManager.DefaultMap property.
* Removed MapCreationTick field from MapManager.MapCollection.
* Removed _maps hashset field from MapManager.
* Removed CreatedMaps array from network MapData.
* MapGrid.ParentMapId is now derived from the bound TransformComponent, and isn't required in the MapGrid ctor.
Removed MapGrid.CreatedTick, it can be found on MapGridComponent.CreationTick.
* Remove a bunch of ApplyGameStatePre code duplication.
* Completely refactored CreateGrid.
* Adds AddComponentUninitialized to the ECS system. This allows you to access a component before it is initialized in a using block.
* Use AddComponentUninitialized to allocate a grid after the component is allocated.
* MapLoader now creates the grids after creating the map entities.
* Chunksize and TileSize properties are now actually read out of the map yaml.
TileSize has a public Setter.
* Minor cleanup.
* Moved grid allocation onto the MapGridComponent.
* Final Cleanup.
* Merge Fail.
* Fixed test, grid was getting deleted because it was empty.
* Remove DeletedChunkDatum from grid networking.
* ApplyMapGridState moved from map manager to the MapGridComponent.
- Implemented autoUI scaling, scaling supports down to 520 by 520 pixel screens(Idk why you'd even have this)
- UI scaling can be adjusted by overriding the window root class
* Obsoleted C# grid events from MapManager.GridCollection. Use the ECS EventBus events instead.
* Obsoleted C# events from MapManager.MapCollection. Use the ECS EventBus events instead.
If a shutdown was requested before the main loop had been started, it would only work if the reason was non-null. This is because `string? _shutdownReason` essentially acts as a shutdown request flag with its nullability.
* All IPhysShapes now expose a property to get the local AABB.
* Removed IMapChunk. It's internal, we only have 1 implementation in the engine, no need for abstraction, and removing it helps perf.
* Cleaned up issues in MapChunk file.
* Encapsulate _tiles access inside MapChunk.
* Remove IEnumerable<TileRef> from MapChunk.
* Remove CollidesWithChunk
* Move CalcWorldAABB and RegenerateCollision from MapChunk to MapGrid.
Remove MapChunk.GridId.
* Removed MapChunk.GetAllTiles
* Removed the terrible mocked unit tests.
* Moved the GetTileRef functions from MapChunk to MapGrid.
* Add an event raised on MapChunk when a tile is modified.
Completely remove the IMapGrid dependency from MapChunk.
* Fix bug where you cannot change the tile damage of a tile.
* Encapsulated existing _pausedMaps access in MapManager.Pause.
Added more unit tests.
* Moved the MapPaused flag from MapManager.Pause to MapComponent.
* Moved the MapPreInit flag from MapManager.Pause to MapComponent.
* Changed visibility so content can't access the flags directly.
* It's not the code that is wrong, it's the tests that are wrong!
* Removed completely obsolete bookkeeping event.
Adds the command buffer to the console.
adds wait <ticks> command to console.
Adds the `incmd` command to inject input commands directly into the simulation, bypassing the frontend.
Removes client side permission check for debug builds.
* Engine changes for more server-pushed lighting variables, but apparently this is a deprecated way of doing things anyway
* Removed two unecessary uses of virtual
* Clean up TeleportTo
* Change TeleportTo to allow teleporting to EntitiyUid
* Rename TeleportToPlayerCommand to TeleportToCommand
* Move duplicate parsing code to TryGetTransformFromUidOrUsername
Simulation input and Update() does not happen when prediction is disabled. Both of these can be re-opted in on a per-handler/system basis with a bool flag. Stuff like physics opts out of this now.
- Fix bug where MIDI renderers in other maps than the current map in IEyeManager would be silenced forever.
- Tracking an entity now sets the TrackingCoordinates to the entity's coordinates.
- MIDI renderers not in your same IEyeManager.CurrentMap or that have invalid coordinates will have their occlusion set to the max value, essentially becoming silenced. I feel like this is a much better solution than changing the volume, as things should be able to call Source.SetVolume without it being changed by positional audio shenanigans.
Added an option to defer field DI for RegisteredInstances until BuildGraph is called. This lets you register instances that contain dependency fields that are not instantiated yet.
* Console/SystemConsoleManager: Short-circuit console input handling when not interactive
* Console/SystemConsoleManager: Use a `Task` for reading input
Now with 100% less blocking (on the main thread, at least)
* Console/SystemConsoleManager: move command execution off the worker thread
* Shared/Utility: Define new FormattedMessage core types
* Shared/Utility: Move MarkupParser to a new namespace, update to new FormattedText
* Shared/Serialization: Temporary fix for FormattedMessageSerializer
* Scripting/ScriptInstanceShared: Move to new FormattedMessage.Builder
* Shared/Utility: Add a FormattedMessage loader to the .Builder
* Server/Scripting: Port SciptHost to FormattedMessage.Builder
* UserInterface/RichTextEntry: NOP out almost everything
not gonna bother fixing it until more groundwork is laid
* Shared/Utility: Expand Utility.Extensions a bit
strictly for pesonal reasons
* Client/UserInterface: Add the base TextLayout engine
* Client/Graphics: Add a Font Library manager
* Graphics/TextLayout: Finish up implementing the TextLayout engine
* Utility/FormattedMessage: Add yet another hack to keep the serializer in service
* Commands/Debug: Use FormattedMessage.Builder
* Console/Completions: Use FormattedMessage.Builder
* Utility/FormattedMessage: Add `AddMessage` methods
* Console/ScriptConsole: Use FormattedMessage.Builder
* Client/Log: Use FormattedMessage.Builder
* CustomControls/DebugConsole: Use FormattedMessage.Builder
* Controls/OutputPanel: Use FormattedMessage.Builder, NOP `Draw` pending rewrite
* Controls/RichTextLabel: Use FormattedMessage.Builder, NOP `Draw` pending rewrite
* UnitTesting: Update FormattedMessage/Markup Tests
They will NOT pass yet, but I don't care; it compiles.
* Utility/FormattedMessage: Fix some off-by-one Builder bugs
* Utility/FormattedMessage: Continue cleanup, test compliance
* Utility/FormattedMessage: Work around https://github.com/dotnet/roslyn/issues/57870
* Utility/FormattedMessage: Move ISectionable from TextLayout, implement it for FormattedMessage
* UserInterface/TextLayout: Add a `postcreate` function to set up new `TIn`s
Apparently Roslyn isn't big-brained enough to understand that a
closure of type `Func<T>` means that `var n = new(); return n;` requires
`new()` to return a `T`.
Ironically, it's significantly less cbt to add this than to convert
that big tuple in `Layout` in to a class or struct of some sort
(to initialize the `List<>`s).
* UserInterface/TextLayout: Throw if `Meta` isn't recognized
TODO warning go brrr
* Graphics/FontLibrary: Add a `DummyVariant`
* UserInterface/UITheme: Move to FontLibraries
* UserInterface/TextLayout: Move to an un-nested `ImmutableArray`
* UserInterface/RichTextEntry: Go ahead. Draw.
* Markup/Basic: Add extension & helpers for FormattedMessage.Builder
* Markup/Basic: Add `EscapeText` back in
A forgotten casualty of the great Markup separation of 2021
* Graphics/FontLibrary: Clean up bit magic, ensure that at least one font is picked
* Graphics/FontLibrary: Add diagnostics to the "no fonts" exception
* UserInterface/TextLayout: Scrap `Word`, return to `Offset`
* UserInterface/TextLayout: A whole bunch of hard-fought bugfixes
* Utility/FormattedMessage: Add a static, empty FormattedMessage
* Utility/FormattedMessage: Fix. Bugs.
* UserInterface/RichTextEntry: Bug fixin'
* UserInterface: CSS teim
* Markup/Basic: Add an optional "default" style to use
* Utility/FormattedMessage: I'm surprised I only made this mistake once.
* Log/DebugConsoleLogHandler: work around lack of a default style
* make adding entities in range optional
* Revert "make adding entities in range optional"
This reverts commit bd707b9f4e.
* remove AudioSystem filter modifications
* Add method to get worldpos and worldrot at the same time
Somewhat of a gain because it halves the number of GetComponent<TransformComponent> + _parent.IsValid() calls
* Remove redundant methods
* Also inverse
* Test
* Import
* Add benchmark
* Delete benchmark
SetLoop sets the amount of times to loop a song. If you set it to 1, it'll loop once, if you set it to -1, it'll loop infinitely. This should have been 0 from the start, so it doesn't loop when disabled.
* Optimise GetBroadphases
Only used in public APIs. Should be significantly faster as it doesn't iterate every fixture on a grid.
* Fix the staged stuff
A bad return statement meant that the associated grid was not being properly deleted.
This fix means the game won't effectively crash PVS if a grid entity is directly deleted.
* Add test pooling and global test setup
* WIP test pooling changes
* Make asynchronous tests the default again
* Finish fixing tests, make test threads background threads
* Un-pool tests with custom cvars
* Fix not changing FailureLogLevel cvar on instance return
* Fix error when overriding already overriden cvar
* Don't pool some physics integration tests
* Unpool engine tests, the technology just isn't there yet
* Remove explicit Pool = false from physics tests
* Change default pooling setting to false
* Didn't need this anyway
* Remove ConfigurationManager.ResetOverrides
* Bring back enum cvar override parsing
* Make integrationInstances name clearer > notPooledInstaces
Make clients ready and servers ready internal
* Add logging test instances
* Give more info on ran tests
* Show total clients and servers in test output
* Wipe LayerMap on SpriteComponent.AfterDeserialize
* Fix server not properly kicking clients
* Rider shut
* Make all test metrics report totals
* Format tests ran better
* Replace Console.WriteLine with TestContext.Out.WriteLine
* Fix two server test pooling info prints using total clients instead of total servers
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
Robust.Client.CEF Renamed to Robust.Client.WebView since CEF should really be an implementation detail.
Content is no longer responsible for initializing and managing the module, this is done automatically by the engine.
WebView is initialized by declaring it in a manifest.yml file in the game resources. In the future the launcher will read this same file to manage WebView module versions.
CefManager has been made private and the content-visible API is now IWebViewManager.
* Fix resizing moving the window beyond its minimum size and causing it to move visually
* Do a NaN-check the SetSize when resizing
* Use float instead to avoid conversion
As per PJB3005's suggestion
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
* Make autogenerated XAML fields public instead of protected
* Make field always public, remove stray commented out code
* Remove encapsulation for previously protected XAML UI fields
* Make access level settable
* Set access to public for DebugConsole LineEdit
* Address reviews and add documentation
* Remove documentation
* Address reviews
* Reduce FindGridsIntersecting allocations
I love struct enumerators
* Do slightly smarter pooling in EntityViewCulling
Even more alloc reductions
* Forgot to re-add this pooling
* Fix missing chunks
- Exception tolerance added
- UID is now passed in the arguments
- Is able to remove protected components if needed.
- Actually calls `ComponentDependencyManager` to let it know the component has been removed.
* Don't generate physics contacts for non-predicted bodies
These are all just handled on the server anyway so it's a significant waste of performance on the client for busy scenes.
* Significantly optimise broadphase updates
Cache all of the broadphase data properly now and also save the cache for physics step to boot.
* Fix cross-map broadphases
* Remove unnecessary clear
* fix
* Fixes
* Numerous ray fixes
In short, if you specify a shared type as a friend, any inheriting types will also count as friends, automatically. This could be abused but... That's why "sealed" exists, r-r-right?
Shadows now seem to remain pretty stable up to the point where nothing is stable.
Sounds good to me.
Now, I know what you're going to say. "But, but, Kraken *fren*!"
*sighs* No. Kraken BAD. Kraken harm spesspeople.
This won't help too much because serialization is extremely alloc-heavy and it causes tons of GC pressure, so GC will drastically reduce the effectiveness of parallelization. Still helps a bit though.
When you tried to spawn an anchored entity, it wouldn't spawn it in the position you specified, as the entity is anchored...
Now, we forcibly disable anchoring just for moving the entity, and restore the old anchor state when we're done.
Yes, this is a bad solution. No, I don't regret it: We need to get our shit together and have a way to forcibly teleport/move entities that are anchored for things like this.
* Fright night
* Shitty bounds working
* No more fixture leak
* Optimise TryFindGridAt
Should be O(1) now instead of the previous O(n) for number of fixtures
* ambush
* Merge stuffies
* Merge to master
* Fixes I guess
* Fix client sync
* Fix grid deserialization
* Jank test
* Fix deferral shitfuckery
* Optimise and remove
* Fixes
* Just werk dam u
* Optimisations
* Bunch of fixes
* FINALLY IT'S DONE
* Fixes
* Fix
* Comment
* Change serialization reading to only do type checks once per type
* Optimize for sealed types in arrays
* Oops the context
* Fix ISelfSerialize node type and null values
* Add int read test
* Remove nullability from constructor and property of DeserializedValue
* Add clearing readers to serialization shutdown
* Fix struct populate default values
Remove some notnull constraints
* Replace robust gen with normal il generator
* The real lookup flags
* Don't get anchored entities for PVS query
* Finish that implementation
* Immediate anchoring changes
* Woops some anchoring slippy
* Fix stupidity
* More gradual
* Remove thread-unsafe stuff
In case anyone notices I'm stupid
* Some day I'll stash instead lol
* Fix thread issue
* Werk
* Cvar for range too
* Explanation
* More comments
* Fix merge
* Avoid unnecessary TransformComponent cast in PVS
Haven't profiled if it's faster but it supports EntityUid better so whenever we deprecate IEntity we would've had to do this anyway.
* Avoid unnecessary MapPosition call
LocalToChunkIndices already checks for this and saves the additional conversion from EC -> map -> EC again
* Doc fixes
Rather than having the methods on the shapes themselves (whenever we eventually get them as structs) I just put them on a shapemanager instead as it seemed cleaner?
* The real lookup flags
* Don't get anchored entities for PVS query
* Finish that implementation
* Immediate anchoring changes
* Woops some anchoring slippy
* Address review
Now we only use the dictionary for storing entities, similar to components.
This means creating/deleting entities while enumerating them will throw, but that's probably fine since GetEntities() is barely used nowadays, and we have QueueDelete().
* Add support for grid chunk removals
Also allows grids to be removed when they have no more chunks remaining.
* No more crashing pog
* Slightly better
* Minor optimisations and fix bounds
* Avoid creating new chunks for anchoring
* chucky
* comment
* Tests
* Remove some logs
* Remove another log
* Review
* Fix client-side physics bodies getting stuck awake
Wasn't a huge perf hit but it could leak a bit. Also there's a bunch of E/C stuff in here and I'll deal with it later.
* Fix broadphase leak
* Fix robust server sim
* PVS is now aware of entity anchoring.
Misc PVS perf improvements.
* Fix master merge
* Optimise chunks intersecting
* Ensure anchored entity chunks are always sent
* Remove silly pool by me
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
* Add short-circuit for TryDistance
90% of the uses probably have the same parent hence we can avoid the more expensive ToMap calls for these.
* InRange too
Don't need to check every chunk's bounds when you can just do dictionary lookups. Should be an okay bonus for PVS and grid rendering on larger grids. Didn't make tests yet because all of the existing ones are mocked and painful to change.
* Fix grid collisions
* Fix this silliness
* Add test for grid collisions
* Fix FlagSerializer not working with 1 << 31
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
* MapManager now uses accurate bounds for grids
Instead of using the old WorldBounds (which was dirty for multiple reasons) it goes through physics instead using the actual fixtures attached to the grid.
* Fix nuke
* Test time
* AABB tests
* feex
* how is this failing aaa
* feex tests
* slightly better
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
* Add Friend classes to C# with the help of Analyzers and Attributes.
* Revert to netstandard2.0
* Use LINQ instead of ^1 for array
* Address review.
Oops, forgot to push.
* Fix containers that hold entities not on client
* Delete from ExpectedEntities when entity removed
* Fix ContainerSystem not registering on the server
* Move container state to entity system
Move client code to client
* Fix removal and clean up code
* Add test
* Add more checks to test
* Remove unneeded deletion event handler
When the child is deleted, if the entity does not exist on the client,
then HandleComponentState runs. If the entity does exist, then
HandleEntityInitialized would have run. Either way HandleEntityDeleted
is not needed.
* Renamed unexpected to removedExpected
The default value would be set to 0 as a placeholder from when the config var is first tracked as unregistered, which means that when we try to override it tries to parse it as an int always.
The issue is that currently moving around means any non-anchored entities have their positions updated to / from NaN. As you can imagine this is a performance nightmare for anything subscribing to it, especially considering it leads to the broadphase getting desynced for physics.
Realistically we need one of the alternatives Acruid has laid out because flooding the eventbus with NaNs will kill performance.
* Cache physics transforms internally
3 main points to cache them for:
1. Contact updates
2. Physics Islands solving
3. GetWorldManifold (though this is primarily for ss14).
Whenever multi-threading is done it will need adjustments to make sure no race conditions on accessing the transforms dictionary
* Also cache position and angle for GetWorldAABB
* Fix boogs
* woops
@@ -10,7 +10,7 @@ Use the [content repo](https://github.com/space-wizards/space-station-14) for ac
## Documentation/Wiki
The [HackMD Wiki](https://hackmd.io/@ss14/docs/wiki) has documentation on SS14s content, engine, game design and more. We also have lots of resources for new contributors to the project.
The [wiki](https://docs.spacestation14.io/) has documentation on SS14s content, engine, game design and more. We also have lots of resources for new contributors to the project.
## Contributing
@@ -18,7 +18,7 @@ We are happy to accept contributions from anybody. Get in Discord or IRC if you
## Building
This repository is the **engine** part of SS14. It's the base engine all SS14 servers will be built on. As such, it does not start on its own: it needs the [content repo](https://github.com/space-wizards/space-station-14). Think of Robust Toolbox as BYOND in the context of Spacestation 13.
This repository is the **engine** part of SS14. It's the base engine all SS14 servers will be built on. As such, it does not start on its own: it needs the [content repo](https://github.com/space-wizards/space-station-14). Think of Robust Toolbox as BYOND in the context of Space Station 13.
# Loc strings for various entity state & client-side PVS related commands
cmd-reset-ent-help = Usage: resetent <Entity UID>
cmd-reset-ent-desc = Reset an entity to the most recently received server state. This will also reset entities that have been detached to null-space.
cmd-reset-all-ents-help = Usage: resetallents
cmd-reset-all-ents-desc = Resets all entities to the most recently received server state. This only impacts entities that have not been detached to null-space.
cmd-local-delete-desc = Deletes an entity. Unlike the normal delete command, this is CLIENT-SIDE. Unless the entity is a client-side entity, this will likely cause errors.
cmd-full-state-reset-help = Usage: fullstatereset
cmd-full-state-reset-desc = Discards any entity state information and requests a full-state from the server.
cmd-invalid-arg-number-error = Invalid number of arguments.
cmd-parse-failure-integer = {$arg} is not a valid integer.
cmd-parse-failure-float = {$arg} is not a valid float.
cmd-parse-failure-bool = {$arg} is not a valid bool.
cmd-parse-failure-uid = {$arg} is not a valid entity UID.
cmd-parse-failure-mapid = {$arg} is not a valid MapId.
cmd-parse-failure-enum = {$arg} is not a {$enum} Enum.
cmd-parse-failure-grid = {$arg} is not a valid grid.
cmd-parse-failure-entity-exist = UID {$arg} does not correspond to an existing entity.
cmd-parse-failure-session = There is no session with username: {$username}
cmd-error-file-not-found = Could not find file: {$file}.
cmd-error-dir-not-found = Could not find directory: {$dir}.
cmd-failure-no-attached-entity = There is no entity attached to this shell.
## 'help' command
cmd-help-desc = Display general help or help text for a specific command
cmd-help-help = Usage: help [command name]
When no command name is provided, displays general-purpose help text. If a command name is provided, displays help text for that command.
cmd-help-no-args = To display help for a specific command, write 'help <command>'. To list all available commands, write 'list'. To search for commands, use 'list <filter>'.
cmd-help-unknown = Unknown command: { $command }
cmd-help-top = { $command } - { $description }
cmd-help-invalid-args = Invalid amount of arguments.
cmd-help-arg-cmdname = [command name]
## 'cvar' command
cmd-cvar-desc = Gets or sets a CVar.
cmd-cvar-help = Usage: cvar <name | ?> [value]
If a value is passed, the value is parsed and stored as the new value of the CVar.
If not, the current value of the CVar is displayed.
Use 'cvar ?' to get a list of all registered CVars.
cmd-cvar-invalid-args = Must provide exactly one or two arguments.
cmd-cvar-not-registered = CVar '{ $cvar }' is not registered. Use 'cvar ?' to get a list of all registered CVars.
cmd-cvar-parse-error = Input value is in incorrect format for type { $type }
cmd-cvar-compl-list = List available CVars
cmd-cvar-arg-name = <name | ?>
cmd-cvar-value-hidden = <value hidden>
## 'cvar_subs' command
cmd-cvar_subs-desc = Lists the OnValueChanged subscriptions for a CVar.
cmd-cvar_subs-help = Usage: cvar_subs <name>
cmd-cvar_subs-invalid-args = Must provide exactly one argument.
cmd-cvar_subs-arg-name = <name>
## 'list' command
cmd-list-desc = Lists available commands, with optional search filter
cmd-list-help = Usage: list [filter]
Lists all available commands. If an argument is provided, it will be used to filter commands by name.
cmd-list-heading = SIDE NAME DESC{"\u000A"}-------------------------{"\u000A"}
Executes a command on the server. This is necessary if a command with the same name exists on the client, as simply running the command would run the client command first.
## 'gc' command
cmd-gc-desc = Run the GC (Garbage Collector)
cmd-gc-help = Usage: gc [generation]
Uses GC.Collect() to execute the Garbage Collector.
If an argument is provided, it is parsed as a GC generation number and GC.Collect(int) is used.
Use the 'gfc' command to do an LOH-compacting full GC.
cmd-gc-failed-parse = Failed to parse argument.
cmd-gc-arg-generation = [generation]
## 'gcf' command
cmd-gcf-desc = Run the GC, fully, compacting LOH and everything.
cmd-gcf-help = Usage: gcf
Does a full GC.Collect(2, GCCollectionMode.Forced, true, true) while also compacting LOH.
This will probably lock up for hundreds of milliseconds, be warned.
## 'gc_mode' command
cmd-gc_mode-desc = Change/Read the GC Latency mode
cmd-gc_mode-help = Usage: gc_mode [type]
If no argument is provided, returns the current GC latency mode.
If an argument is passed, it is parsed as GCLatencyMode and set as the GC latency mode.
cmd-gc_mode-current = current gc latency mode: { $prevMode }
Teleport the given entities to some target entity.
command-description-player-list =
Returns a list of all player sessions.
command-description-player-self =
Returns the current player session.
command-description-player-imm =
Returns the session associated with the player given as argument.
command-description-player-entity =
Returns the entities of the input sessions.
command-description-self =
Returns the current attached entity.
command-description-physics-velocity =
Returns the velocity of the input entities.
command-description-physics-angular-velocity =
Returns the angular velocity of the input entities.
command-description-buildinfo =
Provides information about the build of the game.
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.
command-description-search =
Searches through the input for the provided value.
command-description-stopwatch =
Measures the execution time of the given expression.
command-description-types-consumers =
Provides all commands that can consume the given type.
command-description-types-tree =
Debug tool to return all types the command interpreter can downcast the input to.
command-description-types-gettype =
Returns the type of the input.
command-description-types-fullname =
Returns the full name of the input type according to CoreCLR.
command-description-as =
Casts the input to the given type.
Effectively a type hint if you know the type but the interpreter does not.
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.
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.
command-description-comp =
Returns the given component from the input entities, discarding entities without that component.
command-description-delete =
Deletes the input entities.
command-description-ent =
Returns the provided entity ID.
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 =
Lists every type of component registered.
command-description-cd =
Changes the session's current directory to the given relative or absolute path.
command-description-ls-here =
Lists the contents of the current directory.
command-description-ls-in =
Lists the contents of the given relative or absolute path.
command-description-methods-get =
Returns all methods associated with the input type.
command-description-methods-overrides =
Returns all methods overridden on the input type.
command-description-methods-overridesfrom =
Returns all methods overridden from the given type on the input type.
command-description-cmd-moo =
Asks the important questions.
command-description-cmd-descloc =
Returns the localization string for a command's description.
command-description-cmd-getshim =
Returns a command's execution shim.
command-description-help =
Provides a quick rundown of how to use toolshed.
command-description-ioc-registered =
Returns all the types registered with IoCManager on the current thread (usually the game thread)
command-description-ioc-get =
Gets an instance of an IoC registration.
command-description-loc-tryloc =
Tries to get a localization string, returning null if unable.
command-description-loc-loc =
Gets a localization string, returning the unlocalized string if unable.
command-description-physics-angular_velocity =
Returns the angular velocity of the given entities.
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-ArrowCommand =
Assigns the input to a variable.
command-description-isempty =
Returns true if the input is empty, otherwise false.
command-description-isnull =
Returns true if the input is null, otherwise false.
command-description-unique =
Filters the input sequence for uniqueness, removing duplicate values.
command-description-where =
Given some input sequence IEnumerable<T>, takes a block of signature T -> bool that decides if each input value should be included in the output sequence.
command-description-do =
Backwards compatibility with BQL, applies the given old commands over the input sequence.
command-description-named =
Filters the input entities by their name, with the regex ^selector$.
command-description-prototyped =
Filters the input entities by their prototype.
command-description-nearby =
Creates a new list of all entities nearby the inputs within the given range.
command-description-first =
Returns the first entry of the given enumerable.
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-actor-controlled =
Filters entities by whether or not they're actively controlled.
command-description-actor-session =
Returns the sessions associated with the input entities.
command-description-physics-parent =
Returns the parent(s) of the input entities.
command-description-emplace =
Runs the given block over it's inputs, with the input value placed into the variable $value within the block.
Additionally breaks out $wx, $wy, $proto, $desc, $name, and $paused for entities.
Can also have breakout values for other types, consult the documentation for that type for further info.
command-description-AddCommand =
Performs numeric addition.
command-description-SubtractCommand =
Performs numeric subtraction.
command-description-MultiplyCommand =
Performs numeric multiplication.
command-description-DivideCommand =
Performs numeric division.
command-description-min =
Returns the minimum of two values.
command-description-max =
Returns the maximum of two values.
command-description-BitAndCommand =
Performs bitwise AND.
command-description-BitOrCommand =
Performs bitwise OR.
command-description-BitXorCommand =
Performs bitwise XOR.
command-description-neg =
Negates the input.
command-description-GreaterThanCommand =
Performs a greater-than comparison, x > y.
command-description-LessThanCommand =
Performs a less-than comparison, x < y.
command-description-GreaterThanOrEqualCommand =
Performs a greater-than-or-equal comparison, x >= y.
command-description-LessThanOrEqualCommand =
Performs a less-than-or-equal comparison, x <= y.
command-description-EqualCommand =
Performs an equality comparison, returning true if the inputs are equal.
command-description-NotEqualCommand =
Performs an equality comparison, returning true if the inputs are not equal.
command-description-append =
Appends a value to the input enumerable.
command-description-DefaultIfNullCommand =
Replaces the input with the type's default value if it is null, albeit only for value types (not objects).
command-description-OrValueCommand =
If the input is null, uses the provided alternate value.
command-description-DebugPrintCommand =
Prints the given value transparently, for debug prints in a command run.
command-description-i =
Integer constant.
command-description-f =
Float constant.
command-description-s =
String constant.
command-description-b =
Bool constant.
command-description-join =
Joins two sequences together into one sequence.
command-description-reduce =
Given a block to use as a reducer, turns a sequence into a single value.
The left hand side of the block is implied, and the right hand is stored in $value.
command-description-rep =
Repeats the input value N times to form a sequence.
command-description-take =
Takes N values from the input sequence
command-description-spawn-at =
Spawns an entity at the given coordinates.
command-description-spawn-on =
Spawns an entity on the given entity, at it's coordinates.
command-description-spawn-attached =
Spawns an entity attached to the given entity, at (0 0) relative to it.
command-description-mappos =
Returns an entity's coordinates relative to it's current map.
command-description-pos =
Returns an entity's coordinates.
command-description-tp-coords =
Teleports the target to the given coordinates.
command-description-tp-to =
Teleports the target to the given other entity.
command-description-tp-into =
Teleports the target "into" the given other entity, attaching it at (0 0) relative to it.
command-description-comp-get =
Gets the given component from the given entity.
command-description-comp-add =
Adds the given component to the given entity.
command-description-comp-ensure =
Ensures the given entity has the given component.
command-description-comp-has =
Check if the given entity has the given component.
command-description-AddVecCommand =
Adds a scalar (single value) to every element in the input.
command-description-SubVecCommand =
Subtracts a scalar (single value) from every element in the input.
command-description-MulVecCommand =
Multiplies a scalar (single value) by every element in the input.
command-description-DivVecCommand =
Divides every element in the input by a scalar (single value).
command-description-rng-to =
Returns a number between the input (inclusive) and the argument (exclusive).
command-description-rng-from =
Returns a number between the argument (inclusive) and the input (exclusive))
command-description-rng-prob =
Returns a boolean based on the input probability/chance (from 0 to 1)
command-description-sum =
Computes the sum of the input.
command-description-bin =
"Bins" the input, counting up how many times each unique element occurs.
command-description-extremes =
Returns the two extreme ends of a list, interwoven.
command-description-sortby =
Sorts the input least to greatest by the computed key.
command-description-sortmapby =
Sorts the input least to greatest by the computed key, replacing the value with it's computed key afterward.
command-description-sort =
Sorts the input least to greatest.
command-description-sortdownby =
Sorts the input greatest to least by the computed key.
command-description-sortmapdownby =
Sorts the input greatest to least by the computed key, replacing the value with it's computed key afterward.
command-description-sortdown =
Sorts the input greatest to least.
command-description-iota =
Returns a list of numbers 1 to N.
command-description-to =
Returns a list of numbers N to M.
command-description-curtick =
The current game tick.
command-description-curtime =
The current game time (a TimeSpan)
command-description-realtime =
The current realtime since startup (a TimeSpan)
command-description-servertime =
The current server game time, or zero if we are the server (a TimeSpan)
command-description-replace =
Replaces the input entities with the given prototype, preserving position and rotation (but nothing else)
# Strings Loc para vários comandos relacionados ao estado da entidade e ao PVS do lado do cliente
cmd-reset-ent-help = Uso: resetent <Entity UID>
cmd-reset-ent-desc = Redefina uma entidade para o estado do servidor recebido mais recentemente. Isso também redefinirá as entidades que foram desanexadas para espaço nulo.
cmd-reset-all-ents-help = Uso: resetallents
cmd-reset-all-ents-desc = Redefine todas as entidades para o estado do servidor recebido mais recentemente. Isso afeta apenas as entidades que não foram desanexadas ao espaço nulo.
cmd-detach-ent-help = Uso: detachent <Entity UID>
cmd-detach-ent-desc = Desanexar uma entidade para espaço nulo, como se tivesse saído do intervalo PVS.
cmd-local-delete-desc = Exclui uma entidade. Ao contrário do comando delete normal, este é CLIENT-SIDE. A menos que a entidade seja uma entidade do lado do cliente, isso provavelmente causará erros.
cmd-full-state-reset-help = Uso: fullstatereset
cmd-full-state-reset-desc = Descarta qualquer informação de estado da entidade e solicita um estado completo do servidor.
cmd-invalid-arg-number-error = Número inválido de argumentos.
cmd-parse-failure-integer = {$arg} não é um inteiro válido.
cmd-parse-failure-float = {$arg} não é um float válido.
cmd-parse-failure-bool = {$arg} não é um booleano válido.
cmd-parse-failure-uid = {$arg} não é um UID de entidade válido.
cmd-parse-failure-entity-exist = UID {$arg} não corresponde a uma entidade existente.
## 'help' command
cmd-help-desc = Exibir ajuda geral ou texto de ajuda para um comando específico
cmd-help-help = Uso: help [command name]
Quando nenhum nome de comando é fornecido, exibe o texto de ajuda geral. Se um nome de comando for fornecido, exibe o texto de ajuda para esse comando.
cmd-help-no-args = Para exibir a ajuda de um comando específico, escreva 'help <command>'. Para listar todos os comandos disponíveis, escreva 'list'. Para procurar comandos, use 'list <filter>'.
Executa um comando no servidor. Isso é necessário se um comando com o mesmo nome existir no cliente, pois a simples execução do comando executaria o comando do cliente primeiro.
## 'gc' command
cmd-gc-desc = Execute o GC (coletor de lixo)
cmd-gc-help = Uso: gc [generation]
Usa GC.Collect() para executar o Garbage Collector.
Se um argumento for fornecido, ele será analisado como um número de geração do GC e GC.Collect(int) será usado.
Use o comando 'gfc' para fazer um GC completo compactando LOH.
cmd-gc-failed-parse = Falha ao analisar o argumento.
cmd-gc-arg-generation = [generation]
## 'gcf' command
cmd-gcf-desc = Execute o GC, totalmente, compactando LOH e tudo.
cmd-gcf-help = Uso: gcf
Faz um GC.Collect(2, GCCollectionMode.Forced, true, true) completo enquanto também compacta LOH.
Isso provavelmente será bloqueado por centenas de milissegundos, esteja avisado.
## 'gc_mode' command
cmd-gc_mode-desc = Alterar/ler o modo de latência do GC
cmd-gc_mode-help = Uso: gc_mode [type]
Se nenhum argumento for fornecido, retornará o modo de latência do GC atual.
Se um argumento for passado, ele será analisado como GCLatencyMode e definido como o modo de latência do GC.
cmd-gc_mode-current = modo de latência atual do gc: { $prevMode }
cmd-gc_mode-possible = modos possíveis:
cmd-gc_mode-option = - { $mode }
cmd-gc_mode-unknown = modo de latência gc desconhecido: { $arg }
cmd-gc_mode-attempt = tentando alterar o modo de latência do gc: { $prevMode } -> { $mode }
cmd-gc_mode-result = modo de latência gc resultante: { $mode }
cmd-gc_mode-arg-type = [type]
## 'mem' command
cmd-mem-desc = Imprime informações de memória gerenciada
cmd-mem-help = Uso: mem
cmd-mem-report = Tamanho da pilha: { TOSTRING($heapSize, "N0") }
Total alocado: { TOSTRING($totalAllocated, "N0") }
## 'physics' command
cmd-physics-overlay = {$overlay} não é uma sobreposição reconhecida
## 'lsasm' command
cmd-lsasm-desc = Lista assemblies carregados por contexto de carregamento
cmd-lsasm-help = Uso: lsasm
## 'exec' command
cmd-exec-desc = Executa um arquivo de script dos dados de usuário graváveis do jogo
cmd-exec-help = Uso: exec <fileName>
Cada linha no arquivo é executada como um único comando, a menos que comece com um #
cmd-exec-arg-filename = <fileName>
## 'dump_net_comps' command
cmd-dump_net_comps-desc = Imprime a tabela de componentes em rede.
cmd-dump_net_comps-help = Uso: dump_net-comps
cmd-dump_net_comps-error-writeable = Registro ainda gravável, IDs de rede não foram gerados.
cmd-dump_net_comps-header = Registros de componentes em rede:
## 'dump_event_tables' command
cmd-dump_event_tables-desc = Imprime tabelas de eventos direcionados para uma entidade.
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
public void TestTypeNobodyCanRead(TypeNobodyCanRead obj)
{
// None of these accesses should be allowed.
var copy = Data;
var copy2 = this.Data;
var copy3 = obj.Data;
copy = Data;
copy = this.Data;
copy = obj.Data;
var copy4 = Data.MyField;
var copy5 = this.Data.MyField;
var copy6 = obj.Data.MyField;
if (Data == copy) {}
if (this.Data == copy) {}
if (obj.Data == copy) {}
if(Data.MyField == 0) {}
if(this.Data.MyField == 0) {}
if(obj.Data.MyField == 0) {}
// All of these accesses should be fine.
var copy7 = Data2;
var copy8 = this.Data2;
var copy9 = obj.Data2;
copy = Data2;
copy = this.Data2;
copy = obj.Data2;
var copy10 = Data2.MyField;
var copy11 = this.Data2.MyField;
var copy12 = obj.Data2.MyField;
if (Data2 == copy) {}
if (this.Data2 == copy) {}
if (obj.Data2 == copy) {}
if(Data2.MyField == 0) {}
if(this.Data2.MyField == 0) {}
if(obj.Data2.MyField == 0) {}
}
}
[Access(typeof(FriendlyClass),
Self = AccessPermissions.Read,
Friend = AccessPermissions.Read,
Other = AccessPermissions.Read)]
public sealed class MemberNobodyCanRead
{
[Access(typeof(FriendlyClass),
Self = AccessPermissions.None,
Friend = AccessPermissions.None,
Other = AccessPermissions.None)]
public MyData Data = default;
public MyData Data2 = default;
public void TestMemberNobodyCanRead(TypeNobodyCanRead obj)
{
// None of these accesses should be allowed.
var copy = Data;
var copy2 = this.Data;
var copy3 = obj.Data;
copy = Data;
copy = this.Data;
copy = obj.Data;
var copy4 = Data.MyField;
var copy5 = this.Data.MyField;
var copy6 = obj.Data.MyField;
if (Data == copy) {}
if (this.Data == copy) {}
if (obj.Data == copy) {}
if(Data.MyField == 0) {}
if(this.Data.MyField == 0) {}
if(obj.Data.MyField == 0) {}
// All of these accesses should be fine.
var copy7 = Data2;
var copy8 = this.Data2;
var copy9 = obj.Data2;
copy = Data2;
copy = this.Data2;
copy = obj.Data2;
var copy10 = Data2.MyField;
var copy11 = this.Data2.MyField;
var copy12 = obj.Data2.MyField;
if (Data2 == copy) {}
if (this.Data2 == copy) {}
if (obj.Data2 == copy) {}
if(Data2.MyField == 0) {}
if(this.Data2.MyField == 0) {}
if(obj.Data2.MyField == 0) {}
}
}
public sealed class FriendlyClass
{
public void TestTypeNobodyCanRead(TypeNobodyCanRead obj)
{
// We shouldn't be able to access any of these, even if we're a friend..
var copy = obj.Data;
copy = obj.Data;
var copy2 = obj.Data.MyField;
copy2 = obj.Data.MyField;
if (obj.Data == copy) {}
if(obj.Data.MyField == 0) {}
// We should be allowed to access all of these, we're friends!
var copy3 = obj.Data2;
copy = obj.Data2;
var copy4 = obj.Data2.MyField;
copy4 = obj.Data2.MyField;
if(obj.Data2 == copy) {}
if(obj.Data2.MyField == 0) {}
}
public void TestMemberNobodyCanRead(MemberNobodyCanRead obj)
{
// We shouldn't be able to access any of these, even if we're a friend..
var copy = obj.Data;
copy = obj.Data;
var copy2 = obj.Data.MyField;
copy2 = obj.Data.MyField;
if (obj.Data == copy) {}
if(obj.Data.MyField == 0) {}
// We should be allowed to access all of these, we're friends!
var copy3 = obj.Data2;
copy = obj.Data2;
var copy4 = obj.Data2.MyField;
copy4 = obj.Data2.MyField;
if(obj.Data2 == copy) {}
if(obj.Data2.MyField == 0) {}
}
}
public sealed class OtherClass
{
public void TestTypeNobodyCanRead(TypeNobodyCanRead obj)
{
// We shouldn't be able to access any of these, as 'other types' can't..
var copy = obj.Data;
copy = obj.Data;
var copy2 = obj.Data.MyField;
copy2 = obj.Data.MyField;
if (obj.Data == copy) {}
if(obj.Data.MyField == 0) {}
// We should be allowed to access all of these, they let others read it!
var copy3 = obj.Data2;
copy = obj.Data2;
var copy4 = obj.Data2.MyField;
copy4 = obj.Data2.MyField;
if(obj.Data2 == copy) {}
if(obj.Data2.MyField == 0) {}
}
public void TestMemberNobodyCanRead(MemberNobodyCanRead obj)
{
// We shouldn't be able to access any of these, as 'other types' can't..
var copy = obj.Data;
copy = obj.Data;
var copy2 = obj.Data.MyField;
copy2 = obj.Data.MyField;
if (obj.Data == copy) {}
if(obj.Data.MyField == 0) {}
// We should be allowed to access all of these, they let others read it!
var copy3 = obj.Data2;
copy = obj.Data2;
var copy4 = obj.Data2.MyField;
copy4 = obj.Data2.MyField;
if(obj.Data2 == copy) {}
if(obj.Data2.MyField == 0) {}
}
}";
awaitVerifier(code,
// AUTO-GENERATED DIAGNOSTICS BELOW //
// /0/Test0.cs(35,20): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(36,21): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(37,21): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(39,16): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(40,16): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(41,16): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(43,21): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(44,21): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(45,21): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(47,13): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(48,13): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(49,13): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(51,12): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(52,12): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(53,12): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(95,20): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(96,21): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(97,21): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(99,16): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(100,16): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(101,16): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(103,21): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(104,21): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(105,21): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(107,13): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(108,13): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(109,13): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(111,12): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(112,12): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(113,12): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(143,20): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(144,16): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(146,21): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(147,17): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(149,13): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(150,12): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(166,20): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(167,16): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(169,21): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(170,17): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(172,13): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(173,12): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(192,20): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(193,16): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(195,21): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(196,17): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(198,13): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(199,12): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
// /0/Test0.cs(215,20): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(216,16): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(218,21): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(219,17): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(221,13): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
// /0/Test0.cs(222,12): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
public void TestTypeNobodyCanWrite(TypeNobodyCanWrite obj)
{
// None of these accesses should be allowed.
Data = default;
this.Data = default;
obj.Data = default;
Data.MyField = 0;
this.Data.MyField = 0;
obj.Data.MyField = 0;
// All of these accesses should be fine.
Data2 = default;
this.Data2 = default;
obj.Data2 = default;
Data2.MyField = 0;
this.Data2.MyField = 0;
obj.Data2.MyField = 0;
}
}
[Access(typeof(FriendlyClass),
Self = AccessPermissions.Write,
Friend = AccessPermissions.Write,
Other = AccessPermissions.Write)]
public sealed class MemberNobodyCanWrite
{
[Access(typeof(FriendlyClass),
Self = AccessPermissions.None,
Friend = AccessPermissions.None,
Other = AccessPermissions.None)]
public MyData Data = default;
public MyData Data2 = default;
public void TestMemberNobodyCanWrite(TypeNobodyCanWrite obj)
{
// None of these accesses should be allowed.
Data = default;
this.Data = default;
obj.Data = default;
Data.MyField = 0;
this.Data.MyField = 0;
obj.Data.MyField = 0;
// All of these accesses should be fine.
Data2 = default;
this.Data2 = default;
obj.Data2 = default;
Data2.MyField = 0;
this.Data2.MyField = 0;
obj.Data2.MyField = 0;
}
}
public sealed class FriendlyClass
{
public void TestTypeNobodyCanWrite(TypeNobodyCanWrite obj)
{
// We shouldn't be able to access any of these, even if we're a friend..
obj.Data = default;
obj.Data.MyField = 0;
// We should be allowed to access all of these, we're friends!
obj.Data2 = default;
obj.Data2.MyField = 0;
}
public void TestMemberNobodyCanWrite(MemberNobodyCanWrite obj)
{
// We shouldn't be able to access any of these, even if we're a friend..
obj.Data = default;
obj.Data.MyField = 0;
// We should be allowed to access all of these, we're friends!
obj.Data2 = default;
obj.Data2.MyField = 0;
}
}
public sealed class OtherClass
{
public void TestTypeNobodyCanWrite(TypeNobodyCanWrite obj)
{
// We shouldn't be able to access any of these, as 'other types' can't..
obj.Data = default;
obj.Data.MyField = 0;
// We should be allowed to access all of these, they let others write!
obj.Data2 = default;
obj.Data2.MyField = 0;
}
public void TestMemberNobodyCanWrite(MemberNobodyCanWrite obj)
{
// We shouldn't be able to access any of these, as 'other types' can't..
obj.Data = default;
obj.Data.MyField = 0;
// We should be allowed to access all of these, they let others write!
obj.Data2 = default;
obj.Data2.MyField = 0;
}
}";
awaitVerifier(code,
// AUTO-GENERATED DIAGNOSTICS BELOW //
// /0/Test0.cs(34,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
// /0/Test0.cs(35,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
// /0/Test0.cs(36,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
// /0/Test0.cs(38,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
// /0/Test0.cs(39,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
// /0/Test0.cs(40,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
// /0/Test0.cs(70,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'MemberNobodyCanWrite', despite having no access. Member Permissions: ---------
// /0/Test0.cs(71,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'MemberNobodyCanWrite', despite having no access. Member Permissions: ---------
// /0/Test0.cs(72,9): error RA0002: Tried to perform a 'Write' other-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
// /0/Test0.cs(74,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'MemberNobodyCanWrite', despite having no access. Member Permissions: ---------
// /0/Test0.cs(75,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'MemberNobodyCanWrite', despite having no access. Member Permissions: ---------
// /0/Test0.cs(76,9): error RA0002: Tried to perform a 'Write' other-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
// /0/Test0.cs(94,9): error RA0002: Tried to perform a 'Write' friend-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
// /0/Test0.cs(95,9): error RA0002: Tried to perform a 'Write' friend-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
// /0/Test0.cs(105,9): error RA0002: Tried to perform a 'Write' friend-type access to member 'Data' in type 'MemberNobodyCanWrite', despite having no access. Member Permissions: ---------
// /0/Test0.cs(106,9): error RA0002: Tried to perform a 'Write' friend-type access to member 'Data' in type 'MemberNobodyCanWrite', despite having no access. Member Permissions: ---------
// /0/Test0.cs(119,9): error RA0002: Tried to perform a 'Write' other-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
// /0/Test0.cs(120,9): error RA0002: Tried to perform a 'Write' other-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
// /0/Test0.cs(130,9): error RA0002: Tried to perform a 'Write' other-type access to member 'Data' in type 'MemberNobodyCanWrite', despite having no access. Member Permissions: ---------
// /0/Test0.cs(131,9): error RA0002: Tried to perform a 'Write' other-type access to member 'Data' in type 'MemberNobodyCanWrite', despite having no access. Member Permissions: ---------
public void TestTypeNobodyCanExecute(TypeNobodyCanExecute obj)
{
// None of these accesses should be allowed.
MyMethod();
this.MyMethod();
obj.MyMethod();
Data.MyMethod();
this.Data.MyMethod();
obj.Data.MyMethod();
Data.MyField.ToString();
this.Data.MyField.ToString();
obj.Data.MyField.ToString();
// All of these accesses should be fine.
MyMethod2();
this.MyMethod2();
obj.MyMethod2();
Data2.MyMethod();
this.Data2.MyMethod();
obj.Data2.MyMethod();
Data2.MyField.ToString();
this.Data2.ToString();
obj.Data2.ToString();
}
}
[Access(typeof(FriendlyClass),
Self = AccessPermissions.Execute,
Friend = AccessPermissions.Execute,
Other = AccessPermissions.Execute)]
public sealed class MemberNobodyCanExecute
{
[Access(typeof(FriendlyClass),
Self = AccessPermissions.None,
Friend = AccessPermissions.None,
Other = AccessPermissions.None)]
public MyData Data = default;
public MyData Data2 = default;
[Access(typeof(FriendlyClass),
Self = AccessPermissions.None,
Friend = AccessPermissions.None,
Other = AccessPermissions.None)]
public void MyMethod() {}
public void MyMethod2() {}
public void TestMemberNobodyCanExecute(TypeNobodyCanExecute obj)
{
// None of these accesses should be allowed.
MyMethod();
this.MyMethod();
obj.MyMethod();
Data.MyMethod();
this.Data.MyMethod();
obj.Data.MyMethod();
Data.MyField.ToString();
this.Data.MyField.ToString();
obj.Data.MyField.ToString();
// All of these accesses should be fine.
MyMethod2();
this.MyMethod2();
obj.MyMethod2();
Data2.MyMethod();
this.Data2.MyMethod();
obj.Data2.MyMethod();
Data2.MyField.ToString();
this.Data2.ToString();
obj.Data2.ToString();
}
}
public sealed class FriendlyClass
{
public void TestTypeNobodyCanExecute(TypeNobodyCanExecute obj)
{
// We shouldn't be able to access any of these, even if we're a friend..
obj.MyMethod();
obj.Data.MyMethod();
obj.Data.MyField.ToString();
// We should be allowed to access all of these, we're friends!
obj.MyMethod2();
obj.Data2.MyMethod();
obj.Data2.MyField.ToString();
}
public void TestMemberNobodyCanExecute(MemberNobodyCanExecute obj)
{
// We shouldn't be able to access any of these, even if we're a friend..
obj.MyMethod();
obj.Data.MyMethod();
obj.Data.MyField.ToString();
// We should be allowed to access all of these, we're friends!
obj.MyMethod2();
obj.Data2.MyMethod();
obj.Data2.MyField.ToString();
}
}
public sealed class OtherClass
{
public void TestTypeNobodyCanExecute(TypeNobodyCanExecute obj)
{
// We shouldn't be able to access any of these, as 'other types' can't..
obj.MyMethod();
obj.Data.MyMethod();
obj.Data.MyField.ToString();
// We should be allowed to access all of these, they let others Execute!
obj.MyMethod2();
obj.Data2.MyMethod();
obj.Data2.MyField.ToString();
}
public void TestMemberNobodyCanExecute(MemberNobodyCanExecute obj)
{
// We shouldn't be able to access any of these, as 'other types' can't..
obj.MyMethod();
obj.Data.MyMethod();
obj.Data.MyField.ToString();
// We should be allowed to access all of these, they let others Execute!
obj.MyMethod2();
obj.Data2.MyMethod();
obj.Data2.MyField.ToString();
}
}";
awaitVerifier(code,
// AUTO-GENERATED DIAGNOSTICS BELOW //
// /0/Test0.cs(44,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'MyMethod' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
// /0/Test0.cs(45,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'MyMethod' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
// /0/Test0.cs(46,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'MyMethod' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
// /0/Test0.cs(48,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
// /0/Test0.cs(49,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
// /0/Test0.cs(50,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
// /0/Test0.cs(52,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
// /0/Test0.cs(53,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
// /0/Test0.cs(54,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
// /0/Test0.cs(96,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'MyMethod' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
// /0/Test0.cs(97,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'MyMethod' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
// /0/Test0.cs(98,9): error RA0002: Tried to perform an 'Execute' other-type access to member 'MyMethod' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
// /0/Test0.cs(100,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
// /0/Test0.cs(101,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
// /0/Test0.cs(102,9): error RA0002: Tried to perform an 'Execute' other-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
// /0/Test0.cs(104,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
// /0/Test0.cs(105,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
// /0/Test0.cs(106,9): error RA0002: Tried to perform an 'Execute' other-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
// /0/Test0.cs(128,9): error RA0002: Tried to perform an 'Execute' friend-type access to member 'MyMethod' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
// /0/Test0.cs(129,9): error RA0002: Tried to perform an 'Execute' friend-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
// /0/Test0.cs(130,9): error RA0002: Tried to perform an 'Execute' friend-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
// /0/Test0.cs(141,9): error RA0002: Tried to perform an 'Execute' friend-type access to member 'MyMethod' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
// /0/Test0.cs(142,9): error RA0002: Tried to perform an 'Execute' friend-type access to member 'Data' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
// /0/Test0.cs(143,9): error RA0002: Tried to perform an 'Execute' friend-type access to member 'Data' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
// /0/Test0.cs(157,9): error RA0002: Tried to perform an 'Execute' other-type access to member 'MyMethod' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
// /0/Test0.cs(158,9): error RA0002: Tried to perform an 'Execute' other-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
// /0/Test0.cs(159,9): error RA0002: Tried to perform an 'Execute' other-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
// /0/Test0.cs(170,9): error RA0002: Tried to perform an 'Execute' other-type access to member 'MyMethod' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
// /0/Test0.cs(171,9): error RA0002: Tried to perform an 'Execute' other-type access to member 'Data' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
// /0/Test0.cs(172,9): error RA0002: Tried to perform an 'Execute' other-type access to member 'Data' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
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.