Commit Graph

20 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
āda
de24413bd5 HumanoidCharacterProfile and IdCardConsoleComponent constants moved to cvar. Sync id card length with character name length (#35407)
* commit

* mark TODOs

* compiles

* cleanup

* cleanup

* oops

* changed my mind

* requested changes

* genpop fix
2025-05-17 15:27:39 +10: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
beck-thompson
5bb0c4d6a2 Fixed bug where ID card computer defaulted to the atmos as the job icon. (#28462)
Fixed ID atmos bug!
2024-06-01 13:29:46 -04:00
c4llv07e
64bb8dbdd5 Add door electronics access configuration menu (#17778)
* Add door electronics configuration menu

* Use file-scoped namespaces

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Open door electronics configuration menu only with network configurator

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Doors will now try to move their AccessReaderComponent to their door electronics when the map is initialized

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Make the access list in the id card computer a separate control

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Fix merge conflict

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Remove DoorElectronics tag

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Integrate doors with #17927

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Move door electornics ui stuff to the right place

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Some review fixes

Signed-off-by: c4llv07e <kseandi@gmail.com>

* More fixes

Signed-off-by: c4llv07e <kseandi@gmail.com>

* review fix

Signed-off-by: c4llv07e <kseandi@gmail.com>

* move all accesses from airlock prototypes to door electronics

Signed-off-by: c4llv07e <kseandi@gmail.com>

* rework door electronics config access list

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Remove Linq from the door electronics user interface

* [WIP] Add EntityWhitelist to the activatable ui component

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Better interaction system

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Refactor

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Fix some door electronics not working without AccessReaderComponent

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Move AccessReaderComponent update code to the AccessReaderSystem

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Remove unnecesary newlines in the door access prototypes

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Remove unused variables in access level control

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Remove unnecessary method from the door electronics configuration menu

Signed-off-by: c4llv07e <kseandi@gmail.com>

* [WIP] change access type from string to ProtoId<AccessLevelPrototype>

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Remove unused methods

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Newline fix

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Restored to a functional state

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Fix access configurator not working with door electronics AccessReaderComponent

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Replace all string access fields with ProtoId

Signed-off-by: c4llv07e <kseandi@gmail.com>

* move access level control initialization into Populate method

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Review

---------

Signed-off-by: c4llv07e <kseandi@gmail.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2024-04-01 17:06:13 +11:00
SlamBamActionman
1862f8aa17 Visitor job (#23972)
* Adds Visitor role and ShowInIdCardConsole property

* Add visitor to Agent ID card

* Fixes yaml test

* Fixes based on feedback

* Fixes based on feedback
2024-02-01 21:13:44 +11:00
DrSmugleaf
a44fa86b68 Update trivial components to use auto comp states (#20539) 2023-09-28 16:20:29 -07:00
TemporalOroboros
df1dcb74ac Dewarns access (#16666)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-07-23 14:19:51 +10:00
Moony
5cb1d70a3b ID Console can no longer grant access the privileged ID doesn't have. (read: AA nerf) (#14699)
Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-05-05 23:56:54 +10:00
DrSmugleaf
b4164e62b1 Remove id card console component reference (#15205) 2023-04-08 13:15:52 -07:00
metalgearsloth
52e30b381c Sort ID card console jobs (#14588) 2023-03-12 16:40:17 -07:00
Pieter-Jan Briers
a323671984 Changes for prototype load parallelization (#13066)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2022-12-20 14:25:34 -08:00
Flipp Syder
1b50928d50 Station records patches (#10636) 2022-08-17 14:03:23 +10:00
Flipp Syder
3d36a6e1f6 Station records (#8720)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-08-09 15:10:01 +10:00
metalgearsloth
f066ac2551 Store what access levels are available on the IDCard console (#8259)
Might be better as an accessgroup instead? LMK
2022-05-21 14:19:02 +10:00
Leon Friedrich
80699543d9 Make grinder use item slots (& misc eject-button changes) (#7197) 2022-03-27 21:03:03 -07:00
mirrorcult
ec4d4688c7 Seal/abstract/virtual everything (#6739) 2022-02-16 18:23:23 +11:00
wrexbe
cea1b21832 Fixing some warnings (#6250)
Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>
2022-01-21 10:38:35 +01:00
Leon Friedrich
7e49b22a74 Verb predict (#5638) 2021-12-16 21:42:02 +11:00
Visne
273eaa493f XAMLify ID card computer, Alerts and AME window (#4322)
* Refactor ID card computer to XAML UI

* Alerts

* XAMLify AME window

* Use Control.SetButtonDisabledRecursive() instead
2021-07-27 20:09:12 +02:00