Commit Graph

7 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
beck-thompson
a15387bcfd Make role ban pannel pretty (#37952)
* Make role ban pannel pretty

* Removed unused depencency

* refactor: wider panel (no jumping due to scroll in english lang) minor readability improvements

---------

Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
2025-06-21 10:54:11 -07:00
Pieter-Jan Briers
4f3db43696 Integrate Modern HWID into content
This should be the primary changes for the future-proof "Modern HWID" system implemented into Robust and the auth server.

HWIDs in the database have been given an additional column representing their version, legacy or modern. This is implemented via an EF Core owned entity. By manually setting the column name of the main value column, we can keep DB compatibility and the migration is just adding some type columns.

This new HWID type has to be plumbed through everywhere, resulting in some breaking changes for the DB layer and such.

New bans and player records are placed with the new modern HWID. Old bans are still checked against legacy HWIDs.

Modern HWIDs are presented with a "V2-" prefix to admins, to allow distinguishing them. This is also integrated into the parsing logic for placing new bans.

There's also some code cleanup to reduce copy pasting around the place from my changes.

Requires latest engine to support ImmutableArray<byte> in NetSerializer.
2024-11-12 01:51:54 +01:00
Tornado Tech
07dfefc4a2 Hiding and clearing department prototype code (#28114) 2024-06-01 19:49:34 -04:00
nikthechampiongr
f96f92f54f Make banpanel defaults use cvars (#27168)
* Make banpanel respect CCVars. Add CCVars for default ip/hwid/use last
details checkboxes.

* Move severity handling for server/role ban to another function

* Save sawmill

* Line goofyness

---------

Co-authored-by: Vasilis <vasilis@pikachu.systems>
2024-04-20 18:18:26 +02:00
DrSmugleaf
5be0df32ad Add admin Erase verb, add checkbox to erase from the ban panel (#20985) 2023-10-14 02:02:56 -07:00
Riggle
579913b617 Better notes and bans (#14228)
Co-authored-by: Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
2023-07-21 13:38:52 +02:00