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
Nemanja
729e67af7f
Machine-code cleanup (#28489) 2024-06-05 16:23:23 -04:00
Łukasz Mędrek
8442a9142c
fix: deconstruct verb on undeconstructables (#27387)
Some of prototypes don't specify their deconstructTarget node, which
made them show the deconstruct verb as deconstructTarget is set to
"start" node by default. This patch makes attempt to check if is it even
possible from current construction node to reach specified
deconstructTarget.

Fixes #27330
2024-04-27 16:30:29 +10:00
LordCarve
05a2e6b3a2
Obsolete refactor - ConnectedClient to Channel (#24409) 2024-01-23 09:14:13 +11:00
Kara
0ae3858b69
Examine prediction (#23565)
* Initial prediction

* new group handling

* groups for all examines that use multiple rn

* compile

* why was it doing this??

* handle newlines with sorting properly
2024-01-06 17:53:13 +11:00
tgrkzus
b968dea478
improve deconstruction text (#22404) 2023-12-12 17:07:04 -07:00
metalgearsloth
ae01618874
Revert "Revert "Replace ResourcePath with ResPath (#15308)" (#155… (#15566) 2023-04-20 20:16:01 +10:00
metalgearsloth
acf79a8209
Revert "Replace ResourcePath with ResPath (#15308)" (#15551) 2023-04-20 11:43:54 +10:00
Ygg01
71f358a027
Replace ResourcePath with ResPath (#15308) 2023-04-19 23:39:17 +10:00
metalgearsloth
44fb8a9e2d
Fix rsi sprite access for verbs (#14284) 2023-02-26 18:48:57 +11:00
Leon Friedrich
881a2b2ece
PopupSystem public methods rejig (#12830) 2022-12-19 08:41:47 +11:00
Nemanja
b6135d3be5
Construction warning cleanup (#12256) 2022-10-30 17:48:53 +11:00
KIBORG04
a75a921955
Removal interaction without hands (#8843) 2022-06-15 11:39:43 +10:00
wrexbe
bc68ac96dd
Cleanup the namespaces (#8132) 2022-05-13 17:59:03 +10:00
Vera Aguilera Puerto
380bb89f83
Documents more ConstructionSystem methods. (#7246) 2022-03-24 21:00:39 -07:00
mirrorcult
ec4d4688c7
Seal/abstract/virtual everything (#6739) 2022-02-16 18:23:23 +11:00
Leon Friedrich
1c9ffdc78c
Replace VerbTypes with verb classes (#6525) 2022-02-10 13:30:59 +11:00
Sam Weaver
e42d99ddda
Fixes #6041. Multi-steps in construction graph visible in examine menu. (#6043) 2022-01-14 01:33:39 +11:00
Leon Friedrich
fd83fc8d8e
Hide deconstruct verb if user cannot interact. (#6122) 2022-01-10 20:42:39 -07:00
Vera Aguilera Puerto
5a5006e4cf
ConstructionGL2 Part 2: Better guided steps and recipes. (#5103) 2021-11-02 11:24:32 +01:00