Commit Graph

15 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
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
metalgearsloth
9b7af5dfcf Fix hunger + thirst mispredicts (#36549)
* Fix hunger + thirst mispredicts

* Review
2025-04-17 21:43:16 +10:00
metalgearsloth
9f4aa1ebe0 Implement some field-level deltas (#28242)
* Update GasTileOverlayState

* Update DecalGridState

* Update NavMapState

* poke

* poke2

* poke3

* Implement field deltas for guns

* Content done

* Update

---------

Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
2024-12-21 15:54:11 +11:00
Centronias
6b99493e80 Reduce network burden of the hunger system (#32986)
* reduce network burden of the hunger system

* explicit start + last updated

* remove auto reformat changes to otherwise untouched code

add clamp helper

* imagine making breaking changes, documenting them, and then not thinking to check the yaml

* comments

* Remove unused net manager in hunger system
Remove lastAuthoritativeHungerValue from prototypes
2024-12-18 14:06:02 +01:00
Kirus59
cb59826dcb Hunger and thirst huds fix (#32832)
* Hunger and thirst huds fix

* delete poor caching
2024-11-05 17:58:23 +01: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
Nemanja
8a95cb186c Remove AlertType and AlertCategory (#27933) 2024-05-23 22:43:04 -04:00
Krunklehorn
460b588de5 Refactor status icons take 2, cyborgs don't see criminal status (#26207)
* Initial commit.

* review

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2024-04-18 13:20:44 +10:00
Tayrtahn
4a83c36585 Code cleanup: Dirty(Comp) (#26238)
* Replaced uses of Dirty(Component) with Dirty(Uid, Component)
Modified some systems (notably pulling-related) to use uids.

* Missed a few

* Revert changes to pulling

* No
2024-03-19 23:27:02 -04:00
Pieter-Jan Briers
e00f74505c Use new ComponentPauseGenerator (#25183)
Also includes some (non critical) changes to the solution file to re-organize the Roslyn components.
2024-02-26 14:36:19 +11:00
PixelTK
dfda2dbd05 Sericulture fixes (#19193)
* redone

* I FUCKING HATE SPAWNING STUFF IN SHARED

* inheritdoc

* owo

* fly broken wings

* From a server event to just an event.

* more info

* a comment and a different comment

* Partial

* Emo's requested changes.

* wuh

* head ache

* they call me mean names (laugh track)
2023-10-01 16:46:09 -04:00
PrPleGoo
1a13884961 Task/food hud (#19312)
* security HUD now shows a job icon on entities with a body

* thirst goggles

* set starting hud gear

* fix build

* remove from starting gear

* remove

* replace

* fix thirst and hunger icons

* update icons

* space

* space

* ]

* ]

* fix build

* fix comments

* fix

* spacing

* field

* move more namespaces

* use AutoGenerateComponentState

* comments

* fix build

* not all fields

* comments

* unpaused

* fix Dirty warning

---------

Co-authored-by: Slava0135 <super.novalskiy_0135@inbox.ru>
2023-09-23 16:14:06 +03:00
Nemanja
acffe731c2 Fix hunger damage not being applied properly (#17981) 2023-07-11 22:29:33 -06:00
Nemanja
0f0b534239 Hunger ECS (#14939) 2023-04-03 12:42:30 +10:00