* Fix usages of TryIndex()
Most usages of TryIndex() were using it incorrectly. Checking whether prototype IDs specified in prototypes actually existed before using them. This is not appropriate as it's just hiding bugs that should be getting caught by the YAML linter and other tools. (#39115)
This then resulted in TryIndex() getting modified to log errors (94f98073b0), which is incorrect as it causes false-positive errors in proper uses of the API: external data validation. (#39098)
This commit goes through and checks every call site of TryIndex() to see whether they were correct. Most call sites were replaced with the new Resolve(), which is suitable for these "defensive programming" use cases.
Fixes#39115
Breaking change: while doing this I noticed IdCardComponent and related systems were erroneously using ProtoId<AccessLevelPrototype> for job prototypes. This has been corrected.
* fix tests
---------
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* checkpoint
* pt 2
* pt... i forgot
* pt 4
* patch
* More test fixes
* optimization!!!
* the REAL hand system
* fix RetractableItemActionSystem.cs oversight
* the review
* test
* remove test usage of body prototype
* Update Content.IntegrationTests/Tests/Interaction/InteractionTest.cs
Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
* hellcode
* hellcode 2
* Minor cleanup
* test
* Chasing the last of the bugs
* changes
---------
Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
feat: now RCD can have recepies that are placed on the top level of radial menu - 'Main' category name is reserved for this
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
* fixed prediction (hopefully), removed caching of prototype, sealed the class, removed any and count
* erroneus using statement
* removed unused timing, removed obsolete method of getting gridUid
* nuked mapgriddata
* code cleanup
* cleanup
* this has to be a string without me rewriting more code than i want to in this moment
* kill
---------
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
* it works! kinda
* so it works now
* minor cleanup
* central button now is useful too
* more cleanup
* minor cleanup
* more cleanup
* refactor: migrated code from toolbox (as it was rejected as too specific)
* feat: moved border drawing for radial menu into RadialMenuTextureButton. Radial menu position setting into was moved to OverrideArrange to not being called on every frame
* refactor: major reworks!
* renamed DrawBagleSector to DrawAnnulusSector
* Remove strange indexing
* Regularize math
* refactor: re-orienting segment elements to be Y-mirrored
* refactor: extracted radial menu radius multiplier property, changed color pallet for radial menu button
* refactor: removed icon backgrounds on textures used in current radial menu buttons with sectors, RadialContainer Radius renamed and now actually changed control radius.
* refactor: in RadialMenuTextureButtonWithSector all sector colors are converted to and from sRGB in property getter-setters
* refactor: renamed srgb to include Srgb suffix so devs gonna see that its srgb clearly
* fix: enabled any functional keys pressed when pushing radial menu buttons
* fix: radial menu sector now scales with UIScale
* fix: accept only one event when clicking on radial menu ContextualButton
* fix: now radial menu buttons accepts only click/alt-click, now clicks outside menu closes menu always
* feat: simple radial menu prototype for easier creation
* refactor: cleanup, restored emote filtering, button models now have class hierarchy
* refactor: remove usage of closure from 'outside code'
* refactor: remove non existing type from UiControlTest
* refactor: remove unused using
* refactor: revert ability to declare radial menu layers in xaml, scale 32px sprites using scale in radial menu
* refactor: whitespaces
* refactor: subscribe for dispose on existing radial menus
* feat: now simple radial menu button models can have custom color for each sector background (and hover background color). Also added OpenOverMouseScreenPosition inside SimpleRadialMenu
* fix: AI door menu now can be closed by verb if it gets unpowered
* refactor: simplify hiding border, extended xml-doc for simple radial menu settings
* refactor: remove linq
* fix: fix AI radial action serialization using invalid type
* refactor: fix duplicate ShowDeviceNotRespondingPopup for AI by properly checking if it can interact
* refactor: whitespaces, changed list to array in simple radial button preparing methods
---------
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
Co-authored-by: Eoin Mcloughlin <helloworld@eoinrul.es>
* it works! kinda
* so it works now
* minor cleanup
* central button now is useful too
* more cleanup
* minor cleanup
* more cleanup
* refactor: migrated code from toolbox (as it was rejected as too specific)
* feat: moved border drawing for radial menu into RadialMenuTextureButton. Radial menu position setting into was moved to OverrideArrange to not being called on every frame
* refactor: major reworks!
* renamed DrawBagleSector to DrawAnnulusSector
* Remove strange indexing
* Regularize math
* refactor: re-orienting segment elements to be Y-mirrored
* refactor: extracted radial menu radius multiplier property, changed color pallet for radial menu button
* refactor: removed icon backgrounds on textures used in current radial menu buttons with sectors, RadialContainer Radius renamed and now actually changed control radius.
* refactor: in RadialMenuTextureButtonWithSector all sector colors are converted to and from sRGB in property getter-setters
* refactor: renamed srgb to include Srgb suffix so devs gonna see that its srgb clearly
* fix: enabled any functional keys pressed when pushing radial menu buttons
* fix: radial menu sector now scales with UIScale
* fix: accept only one event when clicking on radial menu ContextualButton
* fix: now radial menu buttons accepts only click/alt-click, now clicks outside menu closes menu always
---------
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
Co-authored-by: Eoin Mcloughlin <helloworld@eoinrul.es>
* Remove some BUI boilerplate
- The disposals overrides got removed due to the helper method handling it.
- Replace window creation with CreateWindow helper.
- Fixed some stinky code which would cause exceptions.
* More
* moar
* weh
* done
* More BUIs
* More updates
* weh
* moar
* look who it is
* weh
* merge
* weh
* fixes
* Replace EntityCoordiates.InRange() with TransformSystem.InRange()
* nullspace
* I figured it out
* man I have no clue how client side sutff works
* please have mercy
* remove RadiationPulseOverlay changes
* nullspace
---------
Co-authored-by: plykiya <plykiya@protonmail.com>
Roslyn now compiles char + string with string.Concat(ROS<char>). This means doing ref char -> ROS<char> which is not sandbox safe. Actually fixing this in the sandboxer is difficult so I'm gonna just pass on that for now.
* Initial radial menu prototyping for the RCD
* Radial UI buttons can send messages to the server
* Beginning to update RCDSystem
* RCD building system in progress
* Further updates
* Added extra effects, RCDSystem now reads RCD prototype data
* Replacing tiles is instant, multiple constructions are allowed, deconstruction is broken
* Added extra functionality to RadialContainers plus documentation
* Fixed localization of RCD UI strings
* Menu opens near cursor, added basic RCD
* Avoiding merge conflict
* Implemented atomized construction / deconstruction rules
* Increased RCD ammo base charges
* Moved input context definition to content
* Removed obsoleted code
* Updates to system
* Switch machine and computer frames for electrical cabling
* Added construction ghosts
* Fixed issue with keybind detection code
* Fixed RCD construction ghost mispredications
* Code clean up
* Updated deconstruction effects
* RCDs effects don't rotate
* Code clean up
* Balancing for ammo counts
* Code clean up
* Added missing localized strings
* More clean up
* Made directional window handling more robust
* Added documentation to radial menus and made them no longer dependent on Content
* Made radial containers more robust
* Further robustness to the radial menu
* The RCD submenu buttons are only shown when the destination layer has at least one children
* Expanded upon deconstructing plus construction balance
* Fixed line endings
* Updated list of RCD deconstructable entities. Now needs a component to deconstruct instead of a tag
* Bug fixes
* Revert unnecessary change
* Updated RCD strings
* Fixed bug
* More fixes
* Deconstructed tiles/subflooring convert to lattice instead
* Fixed failed tests (Linux doesn't like invalid spritespecifer paths)
* Fixing merge conflict
* Updated airlock assembly
* Fixing merge conflict
* Fixing merge conflict
* More fixing...
* Removed erroneous project file change
* Fixed string handling issue
* Trying to fix merge conflict
* Still fixing merge conflicts
* Balancing
* Hidden RCD construction ghosts when in 'build' mode
* Fixing merge conflict
* Implemented requested changes (Part 1)
* Added more requested changes
* Fix for failed test. Removed sussy null suppression
* Made requested changes - custom construction ghost system was replaced
* Fixing merge conflict
* Fixed merge conflict
* Fixed bug in RCD construction ghost validation
* Fixing merge conflict
* Merge conflict fixed
* Made required update
* Removed lingering RCD deconstruct tag
* Fixing merge conflict
* Merge conflict fixed
* Made requested changes
* Bug fixes and balancing
* Made string names more consistent
* Can no longer stack catwalks