Commit Graph

9 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
mhamster
caf18f4bc6 Chameleon clothes + EMP behaviour (#30924)
* resolving conflicts??

* Controlled clothes changing

+ time stuff
+ EmpChangeIntensity

* Single clothes change

+ EmpContinious
+ moved random pick logic into GetRandomValidPrototype

* Changes from reviews

Co-Authored-By: Nemanja <98561806+emogarbage404@users.noreply.github.com>

* Update ChameleonClothingComponent.cs

* repairing irreparable damage

i failed, did i?

* damaging repaired irreparable

uh???

* 2025 FUN ALLOWED!!!!

* Minor changes from reviews

Co-Authored-By: beck-thompson <107373427+beck-thompson@users.noreply.github.com>

* Fix merge conflicts

* Fix that last bug

* cleanup

* Remove VV attr.

* AutoPausedField on emp time change

---------

Co-authored-by: Nemanja <98561806+emogarbage404@users.noreply.github.com>
Co-authored-by: beck-thompson <107373427+beck-thompson@users.noreply.github.com>
Co-authored-by: beck-thompson <beck314159@hotmail.com>
Co-authored-by: EmoGarbage404 <retron404@gmail.com>
2025-05-29 20:06:03 -04:00
metalgearsloth
0d4f9640b5 CompFactory updates (#37559) 2025-05-20 01:08:55 -04:00
SlamBamActionman
21351df03a Add Chameleon PDA (#30514)
* V1 commit

* Remove PDA name and unnecessary pda state

* Adds PDA to Chameleon backpack & thief toolbox

* Change to use AppearanceDataInit

* Add basic PDA state to ensure there's always a sprite before AppearanceData can be applied

* Revert PDA name (this will be changed to another way later)

* Update PDA name updating to new system

* Fix yaml, and fix Agent ID chameleon

* Updated based on review
2025-01-02 19:23:28 +01:00
metalgearsloth
edb05e36bb Reapply "Remove some BUI boilerplate" (#30214) (#30219)
* Reapply "Remove some BUI boilerplate" (#30214)

This reverts commit cb0ba66be3.

* Fix gas tank

* Fix PA

* Fix microwave

* Comms console underwrap

* Fix rcd

* log wehs
2024-07-21 14:48:13 +10:00
Nemanja
cb0ba66be3 Revert "Remove some BUI boilerplate" (#30214)
Revert "Remove some BUI boilerplate (#28399)"

This reverts commit cbf329a82d.
2024-07-20 20:42:27 -04:00
metalgearsloth
cbf329a82d Remove some BUI boilerplate (#28399)
* 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
2024-07-20 15:40:16 +10:00
TemporalOroboros
3ac4cf85db Cleaner BoundUserInterfaces (#17736) 2023-07-09 02:02:17 +10:00
Alex Evgrashin
9ce3a18e3f Chameleon clothing (#8444)
Co-authored-by: Moony <moonheart08@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2022-09-14 18:42:14 +10:00