13 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
lzk
ffbc813179 make name identifier prefix LocId (#39035) 2025-07-18 21:59:49 +03:00
Hannah Giovanna Dawson
f5fd2dcb76 Scurret naming fixes (#38776)
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-07-07 00:30:44 +02:00
Tayrtahn
31cf0505c9 Convert NameIdentifier to use NameModifierSystem (#36736)
Convert NameIdentifier to use NameModifierSystem
2025-04-20 14:16:59 +10:00
SpaceManiac
4122310735 Fix 38 non-obsolete warnings (#33794) 2025-02-11 20:59:50 +11:00
nikthechampiongr
e7b7e2270d Fix bounties(and potentially other things) running out of ids (#32700)
* Make NameIdentifier Ids get refreshed after round restarts

Before this commit the existing values would just get shuffled.
This means that eventually the server would run out of ids to give to
new entities for different groups. As a result everything would get id 0

* Comply with what seemingly is the convention for sawmills

* Make it impossible to insert a bounty with a duplicate id

* Reduce duplication

* Remove unused sawmill

* Fix rustbrain and skill issue

* Aaaa

* Apply suggestions from code review

---------

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2024-10-10 16:35:35 +02: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
Nemanja
4662d463b8 Chill bounties + fixes (#23411)
* Chill bounties + fixes

* localize

* fix arbitage
2024-01-03 17:34:47 -07:00
Leon Friedrich
b6bd82caa6 Use ECS prototype-reload events (#22613)
* Use ECS prototype-reload events

* better constructors

* Maybe this fixes tests?
2023-12-23 01:13:45 +11:00
Nemanja
98fa00a21f Borgs (#18136)
* Laws

* positronic brain and PAI rewrite

* MMI

* MMI pt. 2

* borg brain transfer

* Roleban support, Borg job (WIP), the end of mind shenaniganry

* battery drain, item slot cleanup, alerts

* visuals

* fix this pt1

* fix this pt2

* Modules, Lingering Stacks, Better borg flashlight

* Start on UI, fix battery alerts, expand activation/deactivation, low movement speed on no power.

* sprotes

* no zombie borgs

* oh fuck yeah i love a good relay

* charger

* fix the tiniest of sprite issues

* adjustable names

* a functional UI????

* foobar

* more modules

* this shit for some reason

* upstream

* genericize selectable borg modules

* upstream again

* holy fucking shit

* i love christ

* proper construction

* da job

* AA borgs

* and boom more shit

* admin logs

* laws redux

* ok just do this rq

* oh boy that looks like modules

* oh shit research

* testos passo

* so much shit holy fuck

* fuckit we SHIP

* last minute snags

* should've gotten me on a better day
2023-08-12 16:39:58 -05:00
metalgearsloth
ac5afa794e Fix server crash for name identifiers (#15584) 2023-05-01 12:56:44 -04:00
wrexbe
bc68ac96dd Cleanup the namespaces (#8132) 2022-05-13 17:59:03 +10:00
mirrorcult
6bb32ce725 Unique name identifiers (#6697) 2022-02-15 13:41:08 +11:00