Commit Graph

27 Commits

Author SHA1 Message Date
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
Alfred Baumann
5e74afc72c Fix IDs without station records not being able to have nonstandard contents (#34921)
* fix ID console resetting to passenger

* review

* whoopsie! whitespace

---------

Co-authored-by: Milon <milonpl.git@proton.me>
2025-04-14 17:02:27 +02:00
John
796f599172 Job contraband rework (#33385)
* contraband system rework to allow restriction by job, not just department

* Fixing detective trenchcoat inheritance

* removing unnecessary using declarations

* trying to fix testing error by re-adding diagnostics using declaration

* removing unecessary dependency, making allowedJobs nullable

* Adding all of slarti's requested changes except for the hacky job icon method fix

* removing accidental whitespace

* choosing to use the non-localized version because we're comparing the string against the AllowedJobs field, and the contraband classes that fill that field are written in english

* removing unneeded using dec, fixing nesting logic problem

* didn't remove the old nesting, doing that now

* using localized job title and localizing the allowed jobs string, removing usages of JobTitle field. Also networked the _jobTitle field instead.

* rewrite some stuff

* fixes

* fix energy pen

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-01-21 10:51:27 +01:00
chavonadelal
6d99597349 Job title localization (#32338)
* Job title localization

* Correcting fields
2024-10-09 17:05:36 +02:00
Kara
485caa4553 Contraband marking & examining (#28688)
* System & loc strings

* pass over syndie contraband

* fixes

* grand theft pass

* contrabandexamine -> contraband

* examine text generation update

* all composition parents necessary

* bring back minor contra so it has a less confusing message

* minor

* weapon pass

* jumpsuit pass

* feet pass

* AUUUUUUUUUGHHHHHHHHHHHHHHHHHH

* head

* AUUUUGH

* ear

* belt

* back

* fix

* bro

* rename for more clarity

* do da review

* add cvar for contraband examine

---------

Co-authored-by: EmoGarbage404 <retron404@gmail.com>
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
2024-08-11 23:57:49 -04:00
slarticodefast
e0d30aff4e Add tooltips to the agent ID job icons and improve status icon prototypes (#28575)
* add tooltips to agentid job icons

* forgot to stage this

* make StatusIconPrototype abstract

* minor visual improvements

* cleanup

* use currentculture to sort job names

* review
2024-08-09 16:14:07 +10:00
DrSmugleaf
de7e1b33dd Add data field for id card microwave behaviour (#28087) 2024-05-17 10:48:22 +02:00
DrSmugleaf
0e3a2b3ba1 Move id and health examinable to shared (#27867)
* Move id and health examinable to shared

* Make GetInfo public
2024-05-10 11:26:39 +10:00
Chief-Engineer
476ea14e8a Add access logs (IC ones) (#17810) 2023-12-26 18:24:53 -04:00
chromiumboy
b70c0845d0 Crew monitor revisit (#22240) 2023-12-10 16:38:50 +11:00
LordEclipse
f3df6b85af Make more fields VV-writeable (#21754) 2023-11-19 12:17:53 -08:00
PrPleGoo
7c088ac1de Job icons are stored on ID cards (#18233) 2023-07-29 18:25:27 +10:00
TemporalOroboros
df1dcb74ac Dewarns access (#16666)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-07-23 14:19:51 +10:00
0x6273
247c7a1d4d Fix PDA capitalization to be PascalCase (#17335) 2023-06-15 11:44:28 +10:00
metalgearsloth
70be6996b1 ID access change (#15239) 2023-04-10 23:27:35 -07:00
metalgearsloth
317a4013eb Puddles & spreader refactor (#15191) 2023-04-10 15:37:03 +10:00
Kara
9688544e78 Content PR for auto-componentstate sourcegen (#14845)
* Content PR for auto-componentstate sourcegen

# Conflicts:
#	Content.Shared/Chat/TypingIndicator/TypingIndicatorComponent.cs
#	Content.Shared/Content.Shared.csproj
#	SpaceStation14.sln

* shared file too

* afterautohandlestate example

* oops

* anudda

* access fixed

* smart
2023-04-06 12:33:40 -05:00
Nemanja
5f5f795ae2 empty id card name fix (#10860) 2022-08-29 21:38:00 -05:00
Leon Friedrich
93584f21db Add entity prototype save test (#10274) 2022-08-17 10:47:58 +10:00
Kara
2d5ec7f85c Id[entity] 2.0 (real) (#9612)
* starter API

* network ID cards

* Port more stuff from old identity

* Re-implement identity representation + name updating

* move

* proper name returning for `IdentityName`

* move everything important to server, give in to  temptation

* shared / server / client split sadly. move ensure to shared and spawn to server

* identity update queueing + identityblocker

* fixes

* and just like that it's usable for admins

* huge identity pass

* pass dos

* jesus christ

* figs :D

* fuck u

* fix bad merge.

Co-authored-by: Moony <moonheart08@users.noreply.github.com>
2022-07-10 20:36:53 -05:00
Pieter-Jan Briers
a323ba8223 Revert "Revert "Fix some friend access violations by allowing others access. (#8594) (#8703)" (working this time) (#8704) 2022-06-07 15:26:28 +02:00
Pieter-Jan Briers
cecf87997b Revert "Fix some friend access violations by allowing others access. (#8594) (#8703) 2022-06-07 13:44:31 +02:00
Vera Aguilera Puerto
c5f7c61041 Fix some friend access violations by allowing others access. (#8594)
Rename Friend attribute to Access attribute.
Updates submodule to v0.21.0.0 as well.
2022-06-07 11:30:27 +02:00
Rane
e85628b709 Agent ID Cards (#7041) 2022-04-15 14:15:25 -07:00
mirrorcult
ec4d4688c7 Seal/abstract/virtual everything (#6739) 2022-02-16 18:23:23 +11:00
wrexbe
17db0775c8 Auto comp (#6416) 2022-02-02 14:35:40 +11:00
Leon Friedrich
7e49b22a74 Verb predict (#5638) 2021-12-16 21:42:02 +11:00