* move all the radio components and system to Shared.
* duh split impl
* address reviews
* cleanup
---------
Co-authored-by: walksanatora <walkerffo22@gmail.com>
* 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>
* Borg hands & hand whitelisting
* yaml linted
* yaml linted (x2)
* yaml linted (x3)
* my storage tests so pass
* no need for SetCount
* ok new stuff you can get fixed too
* oops
* staque
* what if we addressed feedback
* my place so holder
* what if we addresesd feedback
* what if i did it correctly
* terminating or deleted
* Replace usages of customTypeSerializer PrototypeIdListSerializer with something that doesn't take 20 separate words to type out
* Missed one
* Missed another
* Fix data field ids
* 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>
* Initial resources commit
* Initial code commit
* Added additional resources
* Continuing to build holopad and telephone systems
* Added hologram shader
* Added hologram system and entity
* Holo calls now have a hologram of the user appear on them
* Initial implementation of holopads transmitting nearby chatter
* Added support for linking across multiple telephones/holopads/entities
* Fixed a bunch of bugs
* Tried simplifying holopad entity dependence, added support for mid-call user switching
* Replaced PVS expansion with manually networked sprite states
* Adjusted volume of ring tone
* Added machine board
* Minor features and tweaks
* Resolving merge conflict
* Recommit audio attributions
* Telephone chat adjustments
* Added support for AI interactions with holopads
* Building the holopad UI
* Holopad UI finished
* Further UI tweaks
* Station AI can hear local chatter when being projected from a holopad
* Minor bug fixes
* Added wire panels to holopads
* Basic broadcasting
* Start of emergency broadcasting code
* Fixing issues with broadcasting
* More work on emergency broadcasting
* Updated holopad visuals
* Added cooldown text to emergency broadcast and control lock out screen
* Code clean up
* Fixed issue with timing
* Broadcasting now requires command access
* Fixed some bugs
* Added multiple holopad prototypes with different ranges
* The AI no longer requires power to interact with holopads
* Fixed some additional issues
* Addressing more issues
* Added emote support for holograms
* Changed the broadcast lockout durations to their proper values
* Added AI vision wire to holopads
* Bug fixes
* AI vision and interaction wires can be added to the same wire panel
* Fixed error
* More bug fixes
* Fixed test fail
* Embellished the emergency call lock out window
* Holopads play borg sounds when speaking
* Borg and AI names are listed as the caller ID on the holopad
* Borg chassis can now be seen on holopad holograms
* Holopad returns to a machine frame when badly damaged
* Clarified some text
* Fix merge conflict
* Fixed merge conflict
* Fixing merge conflict
* Fixing merge conflict
* Fixing merge conflict
* Offset menu on open
* AI can alt click on holopads to activate the projector
* Bug fixes for intellicard interactions
* Fixed speech issue with intellicards
* The UI automatically opens for the AI when it alt-clicks on the holopad
* Simplified shader math
* Telephones will auto hang up 60 seconds after the last person on a call stops speaking
* Added better support for AI requests when multiple AI cores are on the station
* The call controls pop up for the AI when they accept a summons from a holopad
* Compatibility mode fix for the hologram shader
* Further shader fixes for compatibility mode
* File clean up
* More cleaning up
* Removed access requirements from quantum holopads so they can used by nukies
* The title of the holopad window now reflects the name of the device
* Linked telephones will lose their connection if both move out of range of each other
* Borg type switching.
This allows borgs (new spawn or constructed) to select their chassis type on creation, like in SS13. This removes the need for the many different chassis types, and means round-start borgs can actually play the game immediately instead of waiting for science to unlock everything.
New borgs have an additional action that allows them to select their type. This opens a nice window with basic information about the borgs and a select button. Once a type has been selected it is permanent for that borg chassis.
These borg types also immediately start the borg with specific modules, so they do not need to be printed. Additional modules can still be inserted for upgrades, though this is now less critical. The built-in modules cannot be removed, but are shown in the UI.
The modules that each borg type starts with:
* Generic: tools
* Engineering: advanced tools, construction, RCD, cable
* Salvage: Grappling gun, appraisal, mining
* Janitor: cleaning, light replacer
* Medical: treatment
* Service: music, service, clowning
Specialized borgs have 3 additional module slots available on top of the ones listed above, generic borgs have 5.
Borg types are specified in a new BorgTypePrototype. These prototypes specify all information about the borg type. It is assigned to the borg entity through a mix of client side, server, and shared code. Some of the involved components were made networked, others are just ensured they're set on both sides of the wire.
The most gnarly change is the inventory template prototype, which needs to change purely to modify the borg hat offset. I managed to bodge this in with an API that *probably* won't explode for specifically for this use case, but it's still not the most clean of API designs.
Parts for specific borg chassis have been removed (so much deleted YAML) and specialized borg modules that are in the base set of a type have been removed from the exosuit fab as there's no point to printing those.
The ability to "downgrade" a borg so it can select a new chassis, like in SS13, is something that would be nice, but was not high enough priority for me to block the feature on. I did keep it in mind with some of the code, so it may be possible in the future.
There is no fancy animation when selecting borg types like in SS13, because I didn't think it was high priority, and it would add a lot of complex code.
* Fix sandbox failure due to collection expression.
* Module tweak
Fix salvage borg modules still having research/lathe recipes
Engie borg has regular tool module, not advanced.
* Fix inventory system breakage
* Fix migrations
Some things were missing
* Guidebook rewordings & review
* MinWidth on confirm selection button
* Silicon Law Sound cue refactor
- Added CueEntityMind to Silicon Law system to more uniformally
send sounds to minds
- Switch all previous MindPlaySound to instead call to the new method
* Change SiliconLawEui to cue the mind
* CR: TryGetComponent and Change the Documentation
- Remove GetComponentOrNull for _entityManager.TryGetComponent
- Change SiliconLawProviderComponent.LawUploadSound to be more general
rather than just referencing lawboards
* Update Content.Server/Silicons/Laws/SiliconLawEui.cs
* Update Content.Shared/Silicons/Laws/Components/SiliconLawProviderComponent.cs
* Silicon-law-cue-refactor - CR:
- Roll the cuing into NotifyLawsChanged via an optional variable for the
cue
- Modify "SetLaws" to take in an optional soundProvider for the cue
- modify Emagged, Ion, Eui and SetLaws to instead send the sound cue via
NotifyLawsChanged
---------
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* init
* im so confused
* clean
* sprite update
* :|
* further attempts
* be blessed for it works
* Very prestigious pAI
* cleaning up
* Intellicard in RD locker
* PAIn't
* .Clear()n't
* .Clear()n't for real this time
* Cleaning up
* Whoopsie Daisy
* Subversion Board Insertion Audio Notification
Add Subversion flag and SubversionSound to SiliconLawProviderComponent
Add new Method (OnSubversionInserted)
to SiliconLawSystem to handle a Subversive
SiliconLawProviderComponent and play it's SubversionSound
Add Check for Subversive law provider to OnUpdaterInsert that
calls OnSubversionInserted if the SiliconLawProviderComponent is
Subversive
* Fix subversion Sound
- Change out Weh sound used to test that subversion sounds can be
changed by prototype for a a not yet present Antimov subversion sound
* Make it not just subversive
- Remove OnSubversionInserted and move the MindPlaySound in the
OnUpdaterInsert so long as LawUploadSound exists
- Modify SubversionSound into LawUploadSound
- Remove the Subversion flag
- Just use emagged_borg.ogg until the better one is made
* Remove errant spaces and a errant namespace
* CR Fixes - Add generic Lawboard insert cue
- Combine the If statements per /pull/32625#discussion_r1786926400
inside OnUpdaterInsert
- Remove the ViewVariables(VVAccess.ReadWrite) per
pull/32625#discussion_r1786924433
- Add Cryo_warning.ogg from TGStation, the sound utilized for Law Upload
cue, Attribution.
* CR Add a placeholder Antimov notification sound
- Add a new sound kitbashed from the cryo_sound used for uploading
and the emagged noise
* Add self referential source attribution
- also fix an errant space
* Add more bespoke Sound by ps3moira + attributions
* Boom! Emergency access!
* Emergency access sound
* locale
* Updated sounds
* bleh
* Door electrify base
* feat: popups on attempt to activate AI action when wires cut
* refactor: use SharedApcPowerReceiverComponent to check if AI can interact with door
* refactor: added icon and sound for door overcharge
* meta.json should use tabs not spaces
* refactor: extracted sounds for airlock overcharge to static field in system
* refactor: cleanup, ScarKy0 mentions for resources
* refactor: removed unused textures
* feat: now notification is displayed when AI attempting to interact with door which have wire cut
* StationAiWhitelistComponent is properly gating BUI OnMessageAttempt, SharedPowerReceiverSystem.IsPowered is now used to check if device powered
* refactor: use PlayLocal to play electrify sound only for AI player
* refactor: SetBoltsDown now uses TrySetBoltDown, checks for power.
* bolts now check for power using SharedPowerReceiverSystem
* electrify localization and louder electrify sounds
* extracted ShowDeviceNotRespondingPopup, reverted airlocks not opening/closing when ai wire was cut
* refactor: cleanup
* New sprites and fixes
* Copyright
* even more sprite changes
* refactore: cleanup, rename overcharge => electrify
---------
Co-authored-by: ScarKy0 <scarky0@onet.eu>
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Station AI has their name displayed in announcements now.
* I'm so sorry
* Corrections
* part 2
* part 3 :|
* part 4
* Whitespace
* Fixing whitespace part 1
* No more whitespace
* PLEASE NO MORE WHITESPACE
* feat: now when research is unlocked in console, approver of reasearch is radio-ed too
* refactor: now most of events that require actor name to be radio-ed or logged use TryGetIdentityShortInfoEvent which is subscibed by id-card system and borg system (to work for both carbon and synthetic life-forms)
* refactor: moved TryGetIdentityShortInfoEvent on id card system to shared, fixed cargo cent-com-originated orders
* remove unused check
* refactor: decoupled systems from IdCardSystem (those that are not dependent on it anymore)
* refactor: removed unuseed usings
* feat: emagged cargo/research consoles wont radio messages on buy/research confirm anymore
---------
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>