Commit Graph

86 Commits

Author SHA1 Message Date
slarticodefast
321331e664 move all the radio components and system to Shared (#40293)
* move all the radio components and system to Shared.

* duh split impl

* address reviews

* cleanup

---------

Co-authored-by: walksanatora <walkerffo22@gmail.com>
2025-09-12 01:26:47 +02:00
Pieter-Jan Briers
0c97520276 Fix usages of TryIndex() (#39124)
* 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>
2025-09-09 18:17:56 +02:00
pathetic meowmeow
39cb27fe21 Borg hands & hand whitelisting (#38668)
* 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
2025-08-12 15:21:42 -07:00
chromiumboy
c3555af821 Sentry turrets - Part 8: AI notifications (#35277) 2025-08-08 21:56:01 +03:00
B_Kirill
01a57c9a17 Add name to AI eye (#39177)
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-07-24 13:24:18 +02:00
Princess Cheeseballs
e85bc1bb8c Stunnable New Status and Cleanup (#38618)
Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
2025-07-21 19:22:11 +02:00
Leon Friedrich
f915157b96 Fix yaml linter and misc errors (#37444)
* Fix yaml linter

* Revert "fix cluwne pda pen slot (#35611)"

This reverts commit 66e926843f.

* More fixes

* Try again with the engine requirement removed

* Decrease number of brass sheets dropped by clockwork windoors

---------

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
2025-07-10 00:25:36 -04:00
DrSmugleaf
00826aaad6 Replace usages of customTypeSerializer PrototypeIdListSerializer with something that doesn't take 20 separate words to type out (#37959)
* 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
2025-07-10 05:06:51 +02:00
Tayrtahn
c565b44965 Replace ValidatePrototypeId uses with ProtoId or EntProtoId (#38814)
* The easy ones

* For certain values of easy

* Easy test

* Hair

* Fix sandbox violations

* Sort usings
2025-07-07 21:57:05 +02:00
Pieter-Jan Briers
73df3b1593 Stop network serializing prototypes (#38602)
* Stop network serializing prototypes

Send the damn proto ID instead.

* Fix sandbox violation
2025-06-26 19:27:23 -04:00
chromiumboy
ea1ecad3ff Tweak for the visual coverage granted to station AIs by holopads (#38059)
* Initial commit

* Added option to require anchoring
2025-06-05 19:15:55 -04:00
deltanedas
b3825dce97 action refactor proper ecs edition (#27422) 2025-05-28 15:52:11 -04:00
Tayrtahn
b9337693d3 Fix prototypes and datadefs so they pass analyzer checks (again) (#37485)
Fix prototypes so they pass analyzer checks (again)
2025-05-15 20:30:50 +02:00
chromiumboy
7ac67ebf8c Station AI customizations (#34501)
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
2025-05-13 01:50:43 -07:00
B_Kirill
9ff5850667 AI context menu fix (#37224)
* AI context menu fix

* Revert "AI context menu fix"

This reverts commit 86a0476fcb0aa952c0dcadb1bc4246532abd62b7.

* Better implementation

* Retry
2025-05-07 19:48:39 -04:00
chromiumboy
65f50b55b6 Fix for ghosts being unable to follow the AI when it uses a holopad (#36355)
* Initial commit

* Added to-do
2025-04-25 12:30:39 +02:00
Milon
3a6441932e Directional BoundUserInterfaceMessageAttempt content edition (#36320) 2025-04-12 01:33:32 +10:00
ArtisticRoomba
9b86624d30 Fix blocked UI interaction on unpowered devices (#36319)
init
2025-04-05 23:05:42 +02:00
Fildrance
19f3497b35 refactor: simple radial menu for easier creation (#34639)
* 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>
2025-03-31 12:57:47 +03:00
Tayrtahn
86aa82f2b6 Cleanup: Remove redundant prototype name specifications (#35793)
* Remove redundant prototype name specifications

* These can stay
2025-03-19 19:30:31 +01:00
Tayrtahn
6f925dd610 Fix prototypes so they pass analyzer checks (#35435) 2025-02-24 15:21:59 +11:00
Pieter-Jan Briers
f5c7809890 Stable merge for hotfix backport (#35412) 2025-02-23 02:15:34 +01:00
ScarKy0
a6861b0461 [HOTFIX] Borg emag notification and sound fix (#35394)
epic stuff
2025-02-23 01:49:58 +01:00
chromiumboy
2764638763 Minor station AI code cleanup (#34476) 2025-02-18 16:26:02 +11:00
ScarKy0
253a9fbdf1 Seperate EMAG into EMAG and Authentication Disruptor (#34337) 2025-01-29 23:05:47 -05:00
godisdeadLOL
aea4e3cdbd Sentient medibot now can inject (#32110)
medibot player injection

Co-authored-by: YourUsername <you@example.com>
2025-01-29 13:34:01 +03:00
chromiumboy
7780b867ac Holopads (#32711)
* 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
2024-12-17 20:18:15 +01:00
ScarKy0
274c3ab0b9 Derelict Borg Revival (#33433)
* Derelictn'tn't Borg!

* Clean *sparkles*

* Removed "S: Awaiting Changes"
2024-12-06 00:22:38 -06:00
slarticodefast
e9eca826d8 minor AI cleanup (#33555)
* minor cleanup

* to
2024-11-26 09:39:04 +11:00
metalgearsloth
a9be561ea7 Merge branch 'master' into ion-storm-refactor 2024-11-20 18:22:08 +11:00
Pieter-Jan Briers
c4e2eb9d02 .NET 9 forward compatibility changes (#33421)
This doesn't switch the projects over to .NET 9, but it does make them work on .NET 9 when we decide to switch in the future.
2024-11-20 11:17:45 +11:00
ScarKy0
7d82a7bf5c Merge branch 'space-wizards:master' into ion-storm-refactor 2024-11-16 00:50:48 +01:00
Pieter-Jan Briers
1bebb3390c Borg type switching. (#32586)
* 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
2024-11-14 11:08:35 -06:00
ScarKy0
0f30639cf2 progress 2024-11-14 17:21:03 +01:00
ScarKy0
755f322e29 Merge branch 'master' into ion-storm-refactor 2024-11-14 14:45:55 +01:00
ScarKy0
287a9a07de Intellicards now have a doAfter. (#33198)
* init

* cleanup

* Oops! Forgot something

* addressing changes

* guh

* guh 2.0

* some cleanup

* all bless the intellicard

* Yippee

* small locale thing

* changes + small bugfix

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2024-11-09 13:29:29 -06:00
Baptr0b0t
bcfacec287 Fix AI in Intelicard can see through walls (#33177)
setdrawfov added
2024-11-05 21:28:58 -06:00
Zachary Higgs
a3f10ccfbb Add Silicon Law cues to Every method a Silicon can have their laws change (#32887)
* 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>
2024-11-04 12:23:12 +01:00
ScarKy0
9873efd514 Adding intellicard functionality. (#32347)
* 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
2024-10-22 15:49:39 +02:00
Zachary Higgs
79a23d3e0b Give AI a Sound Cue when an Antimov board is inserted (#32625)
* 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
2024-10-16 22:41:06 -05:00
ScarKy0
5be82d2a7f Cyborg module action icons (#32505)
* Init

* added jani and medical

* + sci and service modules

* + syndi modules

* fixing up

* geiger counter stuff
2024-10-14 18:05:40 +11:00
The Canned One
b0c5023fda Fix comments in StartIonStormedComponent.cs 2024-10-05 16:48:45 +02:00
The Canned One
b35d2902d4 Fixed cyborgs with the StartIonStormedComponent (which is just the Derelict Cyborg right now) not showing up as 'antag' in the admin player overlay. 2024-10-05 15:09:36 +02:00
The Canned One
d7ed5b4386 remove whitespace. 2024-10-04 08:35:16 +02:00
The Canned One
834b6ebaaa Cleaned up a bit of the Derelict Cyborg code. 2024-10-01 10:02:25 +02:00
The Canned One
bad25e3397 Split part of IonStormRule into IonStormSystem. Added StartIonStormed which also uses IonStormSystem. Added StartIonStormedComponent. Changed stuff related to the Derelict Cyborg. Derelict Cyborg now spawns with a randomized lawset. 2024-09-29 19:01:59 +02:00
Fildrance
4bcf3c3c0e Station AI ability to electricute doors (#32012)
* 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>
2024-09-27 17:22:17 +10:00
ScarKy0
6068c23f06 Station AI has their name displayed in announcements now. (#31802)
* 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
2024-09-04 00:05:02 +02:00
Fildrance
6380a9adca feat: now when research is unlocked in console, approver of reasearch is radio-ed too (#31170)
* 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>
2024-09-03 23:01:38 +10:00
metalgearsloth
5261f01f25 AI whitelist fix (#31542) 2024-08-28 12:47:12 +10:00