Commit Graph

59 Commits

Author SHA1 Message Date
Pieter-Jan Briers 7419408ec5 Ban database refactor (#42495)
* Ban DB refactor seems to work at a basic level for PostgreSQL

* New ban creation API

Supports all the new functionality (multiple players/addresses/hwids/roles/rounds per ban).

* Make the migration irreversible

* Re-implement ban notifications

The server ID check is no longer done as admins may want to place bans spanning multiple rounds irrelevant of the source server.

* Fix some split query warnings

* Implement migration on SQLite

* More comments

* Remove required from ban reason

SS14.Admin changes would like this

* More missing AsSplitQuery() calls

* Fix missing ban type filter

* Fix old CreateServerBan API with permanent time

* Fix department and role ban commands with permanent time

* Re-add banhits navigation property

Dropped this on accident, SS14.Admin needs it.

* More ban API fixes.

* Don't fetch ban exemption info for role bans

Not relevant, reduces query performance

* Regenerate migrations

* Fix adminnotes command for players that never connected

Would blow up handling null player records. Not a new bug introduced by the refactor, but I ran into it.

* Great shame... I accidentally committed submodule update...

* Update GDPR scripts

* Fix sandbox violation

* Fix bans with duplicate info causing DB exceptions

Most notably happened with role bans, as multiple departments may include the same role.
2026-06-29 12:43:39 +02:00
pathetic meowmeow c57721eca5 Visual nubody (humanoid appearance refactor) (#42476)
* initial visual nubody

* oops overlay

* im so pheeming rn

* conversion...

* tests

* comeback of the underwear

* oops eyes

* blabbl

* zeds

* yaml linted

* search and visible count constraints

* reordering

* preserve previously selected markings colors

* fix test

* some ui niceties

* ordering

* make DB changes backwards-compatible/downgrade-friendly

* fix things again

* fix migration

* vulpkanin markings limit increase

* wrapping

* code cleanup and more code cleanup and more code cleanup and more code cleanup and

* fix slop ports

* better sampling API

* make filter work + use the method i made for its intended purpose

* fix test fails real quick

* magic mirror cleanup, remove TODO

* don't 0-init the organ profile data

* remove deltastates

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>

# Conflicts:
#	Content.Server/Humanoid/Components/RandomHumanoidAppearanceComponent.cs
#	Content.Server/Humanoid/Systems/RandomHumanoidAppearanceSystem.cs

# Conflicts:
#	Resources/Prototypes/Species/diona.yml

# Conflicts:
#	Content.Server/Zombies/ZombieSystem.Transform.cs
2026-06-29 12:43:35 +02:00
BarryNorfolk d62f7cef10
Revert "Nubody Merge" (#5807)
Revert "Nubody Merge (#5670)"

This reverts commit b465cfb3fd.
2026-05-12 21:05:30 +00:00
Coryn b465cfb3fd
Nubody Merge (#5670)
* Nubody (#42419)

* Nubody

* fix test fails

* gibbing

* lung test returns

* doc comment

* hand organ test

* giblet test

* yaml formatting

* returning

* relocate

* trimming

* re-smite

* oops thusd tweak

* arachnids have slower metabolism i guess

* never mind the old behaviour is bad actually

* rider whyyy

* style changes and allat

* fix collision

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>

* C# files done

* Visual nubody (humanoid appearance refactor) (#42476)

* initial visual nubody

* oops overlay

* im so pheeming rn

* conversion...

* tests

* comeback of the underwear

* oops eyes

* blabbl

* zeds

* yaml linted

* search and visible count constraints

* reordering

* preserve previously selected markings colors

* fix test

* some ui niceties

* ordering

* make DB changes backwards-compatible/downgrade-friendly

* fix things again

* fix migration

* vulpkanin markings limit increase

* wrapping

* code cleanup and more code cleanup and more code cleanup and more code cleanup and

* fix slop ports

* better sampling API

* make filter work + use the method i made for its intended purpose

* fix test fails real quick

* magic mirror cleanup, remove TODO

* don't 0-init the organ profile data

* remove deltastates

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>

* Let vox eat trash again (#42503)

* C# complete port

* Getting closer

* Harpy Nubody Port

* Port Feroxi, Kitsune. Fix some yml typos and remove ipcs stuff

* Port Oni

* Port Rest, except Motorkind

* Port Motorkind

* Remove more surgery, restore too much deleted stuff

* Fix Typos and change some organ names. Need to split eyes next

* Harpy HAve Wings again

* Some fixes, More Surgeyr Removal, Copying of eye organs

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Use correct Body imports

* Markings Refactoring, Harpy Layering

* Motorkind doesn't crash anymore. Some layer remappings.

* Allow Organs to have Markings Displacements again. (#43604)

* first shtep

* readd markings support

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>

* Fix STalk eyes and several layerings

* Fix sexed organs (#42554)

* Fix markings for several species, fit them for sexed organs and rename some files to fit them for it

* Additional IPC-related removals

* Vulpkanin eyes are now correct again

* Fix Subtle Cultist Marks on species

* Fix Asakim Sprites (sexed) and make CD imports work

* Migration, error fixes, and Height

* Fix humanoid profile voice being broken (#42550)

Fix humanoid appearance voice being broken

* Change Kitsune SexChanged Event to with ref

* Fix asakim issue, Respirator fix

* Simplify hands UI code (#42534)

* Simplify hands UI code

* i remembered about SortedHands in the component

* minor cleanup

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>

* Set size of Analyzer back to 350, Kitsune can't gib themselves no more. Migration

* yml linter errors and an rudimentary onAdd Organ Functionality

* Fixing it trying to remove nothing

* midpoint migration

* Why do you put so many organs everywhere

* More missing prototypes

* Migration of more organs

* Forgot lungs

* Move character preview handling into a specialized control (#41252)

* Move character preview handling into a specialized control

Co-authored-by: Quantum-cross <7065792+Quantum-cross@users.noreply.github.com>

* Restore job name that I accidentally removed from character picker buttons

* Just resolve dependencies the standard way

---------

Co-authored-by: Quantum-cross <7065792+Quantum-cross@users.noreply.github.com>
Co-authored-by: Janet Blackquill <uhhadd@gmail.com>

* Drop ICharacterProfile/ICharacterAppearance interfaces (#42661)

* Ensure profile loading only returns valid species (#42842) (Stable merge) (#42865)

Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>

* Changes to make it work for us.

* No more bald Harpy

* OperatingTables instead of null

* Adding Delta V Comments, commenting out instead of deleting

* Fix broken Height Scale.

* Remove HumanoidSilicon Mention

* Did an error. Readded, uncommented.

* Clean up Marking data structure, add tests for Zombie transformation (#42756)

* Clean up Marking data structure, add tests for Zombie transformation

* empty

* AAAAAAAAAAAAAAAA

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>

* Fix markings colour setting (#42771)

* Fix: Markings Color For Downstream

* Comment out A Leg. Remove Todo

* Revert to original hidden species code

---------

Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Princess Cheeseballs <66055347+Princess-Cheeseballs@users.noreply.github.com>
Co-authored-by: Absotively <jen@jenpollock.ca>
Co-authored-by: Quantum-cross <7065792+Quantum-cross@users.noreply.github.com>
Co-authored-by: Myra <vasilis@pikachu.systems>
2026-05-12 21:55:29 +02:00
Vasilis The Pikachu 95f9d48051 Revert "Admin Log Browser Improvements (#39130)"
This reverts commit f67cebf7a4.

Per request of @Kowlin and @southbridge-fur

Check out https://github.com/space-wizards/space-station-14/issues/39960 for further information
2026-04-04 16:56:50 +02:00
Milon e0fd0cb2cd
tips / tutorial system (#5199)
* somewhat functional yes

* some cleanup

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* review

* missed one

* why not params…

* review 2

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-14 14:23:39 -06:00
Southbridge a779990dfc Admin Log Browser Improvements (#39130) 2025-11-23 15:22:30 -06:00
YotaXP 482e69e029 Persist construction menu favorites server-side (#35867)
* Persist construction menu favorites to player profile

* Use `ProtoId`s for construction favorites

* Validate construction favorites updates from the client

* Actually await the async database call
2025-05-18 18:12:44 +01:00
Lyndomen f024f46b0b
Port Height & Records Computer from Cosmatic Drift (#2236)
* Port character records from CD

* Make species' base scales respected by CD heights

* Hide the height editor in the humanoid profile editor

---------

Co-authored-by: Janet Blackquill <uhhadd@gmail.com>
2025-03-11 15:34:45 +00:00
metalgearsloth ce37839fc2 Add loadout names (#31303)
* Add loadout names

Did it for AI, breaking change for pgsql + migrations in general. Nothing atm uses it.

* the box

* Spawning cherry pick

* Fix nit

* revert

* Final cleanup

* Real

* Name UI fix

* Migrations

* a

* Review

* Re-run migrations

---------

Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2025-03-01 12:46:20 +00:00
Pieter-Jan Briers 6f6888d339 Persist deadmin to database, add admin suspension system (#34048) 2025-01-28 04:31:22 +00:00
Myra c97e784a08 Add IPIntel API support. (#33339)
Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2025-01-28 03:18:23 +00:00
Pieter-Jan Briers 26b36db09d 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-29 19:18:11 +01:00
Simon f9f2549746 Automated whitelists (#23985)
* Beginnings of making the breadmemes jobs easier

* stuff

* stuff pt. 2

* Stuff pt.3

* Stuff I forgot last time

* Basic whitelist

Only people that are added to the whitelist with the addwhitelist command will be able to join. I call this the "legacy" whitelist

* Remove always deny condition in favor of just breaking if playtime check fails

* Change default whitelist

Default whitelist is now the "legacy" whitelist.

* localization

* Admin check

* minor spelling change

* Fix build

* Whitelist message

* Fix vars not being datafield and spelling mistakes

* Minor spelling mistake

* Change config for salamander

* Reviews and stuff

* Add summaries

* Fix whitelists

* Forgot to add a datafield

* Fixing stuff I guess

* Reuse admin remarks to reduce load when connecting.

* Update log messages to be verbose instead of debug

* Reviews

* whoops

* Explain a bit more how whitelist checking works

* Apply CE's review

* Append Membership to Blacklist and Whitelist conditions

* Fix review comments

* Uncapitalize playerConnectionWhitelist, add to ignored client prototypes

* Make note count field work

* Fix cvar for thingy

---------

Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2024-08-30 05:37:15 +01:00
Pieter-Jan Briers c75fd41cd3
Ban template system (#29365)
To help out admins, so they can easily fill out datacenter bans and stuff. Supports ban exemption flags and everything.

This is for use with SS14.Admin so it's just DB models here.
2024-07-25 01:44:27 +02:00
Pieter-Jan Briers 5c5cbdee02
Add time index to connection log (#29281)
* Add time index to connection log

Queries go nyoom.

* Don't let me code shit at 5 AM
2024-07-25 00:41:18 +02:00
DrSmugleaf eed9c58386
Add job whitelist system (#28085)
* Add job whitelist system

* Address reviews

* Fix name

* Apply suggestions from code review

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>

* cancinium

---------

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2024-06-01 18:02:43 +02:00
NullWanderer 74002a1c4e
Merge remote-tracking branch 'refs/remotes/upstream/master' into 2024/04/21-loadouts
# Conflicts:
#	Content.Server/IoC/ServerContentIoC.cs
#	Resources/Prototypes/Roles/Jobs/Medical/chemist.yml
2024-04-22 19:41:29 +02:00
metalgearsloth d49eabc1a5
Partial cherry-pick: Loadouts redux (#25715)
Signed-off-by: NullWanderer <56081759+NullWanderer@users.noreply.github.com>
2024-04-22 03:28:58 +02:00
Pieter-Jan Briers 8e8a4cf1b6
Fix database round start date issues (#26838)
How can ONE DATABASE COLUMN have so many cursed issues I don't know, but it certainly pissed off the devil in its previous life.

The start_date column on round entities in the database was added by https://github.com/space-wizards/space-station-14/pull/21153. For some reason, this PR gave the column a nonsensical default value instead of making it nullable. This default value causes the code from #25280 to break. It actually trips an assert though that's not what the original issue report ran into.

This didn't get noticed on wizden servers because we at some point backfilled the start_date column based on the stored admin logs.

So I change the database model to make this column nullable, updated the C# code to match, and made the existing migration set the invalid values to be NULL instead. Cool.

Wait how's SQLite handle in this scenario anyways? Well actually turns out the column was *completely broken* in the first place!

The code for inserting into the round table was copy pasted between SQLite and PostgreSQL, with the only difference being that the SQLite key manually assigned the primary key instead of letting SQLite AUTOINCREMENT it. And then the code to give a start_date value was only added to the PostgreSQL version (which is actually in the base class already). So for SQLite that column's been filled up with the same invalid default the whole time.

Why was the code manually assigning a PK? I checked the SQLite docs for AUTOINCREMENT[1], and the behavior seems appropriate.

I removed the SQLite-specific code path and it just seems to work regardless. The migration just sets the old values to NULL too.

BUT WAIT, THERE'S MORE!

Turns out just doing the migration on SQLite is a pain in the ass! EF Core has to create a new table to apply the nullability change, because SQLite doesn't support proper ALTER COLUMN. This causes the generated SQL commands to be weird and the UPDATE for the migration goes BEFORE the nullability change... I ended up having to make TWO migrations for SQLite. Yay.

Fixes #26800

[1]: https://www.sqlite.org/autoinc.html

(cherry picked from commit d3ac3d06bb)
2024-04-21 21:57:13 +02:00
Pieter-Jan Briers 16c7c2882d
Improve admin message seen/dismiss state. (#26223)
Fixes #26211

Admin messages now have separate "seen" and "dismissed" fields. The idea is that an admin should be able to tell whether a user pressed the "dismiss for now" button. Instead of using "seen" as "show this message to players when they join", "dismissed" is now used for this.

Existing notes in the database will automatically be marked as dismissed on migration. A note cannot be dismissed without being seen (enforced via constraint in the database too, aren't I fancy).

As part of this, it has become impossible for a player to play without dismissing the message in some form. Instead of a shitty popup window, the popup is now a fullscreen overlay that blocks clicks behind it, making the game unplayable. Also, if a user somehow has multiple messages they will be combined into one popup.

Also I had enough respect for the codebase to make it look better and clean up the code somewhat. Yippee.

(cherry picked from commit d776c4b392)
2024-03-24 00:08:01 +01:00
Krunklehorn 922407e2e8
Client customization late-join spawner priority for arrivals/cryostorage (#24586)
* Initial commit, requires server restart to take effect

* Exposes callbacks directly instead, takes effect immediately

* Cleaned up control flow, swapped cvar for client customization

* Switched to int, dictionary of callbacks, migration

* Update Content.Shared/Preferences/SpawnPriorityPreference.cs

* krunkle stan

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>

(cherry picked from commit ed0f2aa221)
2024-02-08 12:16:20 +01:00
Pieter-Jan Briers fdfd718f60
Fix admin log key order. (#23052)
The keys for admin logs were set as (log_id, round_id). This made no sense because logs are usually accessed per round.

(cherry picked from commit a39999fb9c)
2024-01-26 22:26:15 +01:00
Pieter-Jan Briers f648007c8c Log server ID in connection logs table (#21911) 2023-12-16 19:27:08 +01:00
DrSmugleaf 98bde9eaa8 Drop admin log entity db table (#21216) 2023-10-24 18:03:52 +02:00
DrSmugleaf 734118a7ef Store round start date in the database (#21153) 2023-10-23 23:54:01 +02:00
Pieter-Jan Briers 7c9d7423d2
Remove autogenerated from admin log key. (#18377) 2023-07-29 16:44:28 +10:00
Pieter-Jan Briers e0c4884995
GDPR stuff update (#18300) 2023-07-26 20:05:51 +02: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
Pieter-Jan Briers c8e90e561b
Server ban exemption system (#15076) 2023-04-03 10:24:55 +10:00
Visne 4cc5fa239e
Implement traits system (#10693) 2022-09-10 08:40:06 -07:00
Pieter-Jan Briers e852ada6c8
Play time tracking: Job timers 3: more titles: when the (#9978)
Co-authored-by: Veritius <veritiusgaming@gmail.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-08-07 16:00:42 +10:00
Veritius 3b7e202044
Flavor text (#8070) 2022-05-13 15:58:45 -07:00
DrSmugleaf 0502d3dec4
Make Profile.Markings db column jsonb (#7947) 2022-05-05 11:23:48 +02:00
Flipp Syder a30cae21f6
Markings (#7072)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-05-05 10:07:42 +02:00
Pieter-Jan Briers fc119befca
Fix admin log indices. (#7920) 2022-05-04 16:18:55 +02:00
DrSmugleaf 5227d1a023
Admin notes (#7259)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2022-04-16 20:57:50 +02:00
DrSmugleaf ca0fb3c6a2
Track rule reading in database, don't show popup locally (#7278) 2022-03-26 20:16:57 +01:00
Vera Aguilera Puerto eb54f4b224
Adds Network Resource Uploading for admins. (#6904)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2022-03-26 12:46:37 +01:00
Julian Giebel 414d226ec5
Server names and admin log full-text search (#6327)
Co-authored-by: Julian Giebel <j.giebel@netrocks.info>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2022-03-13 18:36:48 +01:00
Pieter-Jan Briers 6b66c7db8a Fix database model migrations after role bans.
Role bans (#6703) seemed to have changes to the DB model from after the migrations were created. This means a bunch of constraints/indices changed names and this wasn't reflected in a migration yet.
2022-03-08 23:36:02 +01:00
ShadowCommander 4825142210
Role bans (#6703) 2022-02-21 23:11:39 +01:00
Pieter-Jan Briers 5091c6aa9d
Revert "Revert "Log ban hits in DB. ( (#6361) 2022-02-02 22:57:11 +01:00
Pieter-Jan Briers 764010fea0
Revert "Log ban hits in DB. (#6337)" (#6357)
This reverts commit b75f005bb4.
2022-01-28 19:33:09 +01:00
Pieter-Jan Briers b75f005bb4
Log ban hits in DB. (#6337) 2022-01-28 19:10:44 +01:00
Pieter-Jan Briers a3aabf59ad Unify remaining DB model classes between SQLite and Postgres.
As part of this, the ban and unban table were renamed to server_* on SQLite to move them in line with Postgres. Data is preserved.
2022-01-27 18:12:09 +01:00
Moony ca984036d6
Upstream species (#6066)
* Step 1 of porting; grabbed most of the files via patches.

* Add species field to the DB

* Appearance patches for slimes.

* Fix the db test.

* Add slime's biocompat.

* slimby

* Fixes, allow specifying if a species is playable or not.

* Update Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs

Co-authored-by: Javier Guardia Fernández <DrSmugleaf@users.noreply.github.com>

* Update Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs

Co-authored-by: Javier Guardia Fernández <DrSmugleaf@users.noreply.github.com>

* Update Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs

Co-authored-by: Javier Guardia Fernández <DrSmugleaf@users.noreply.github.com>

* Address reviews.

* Address reviews.

* make an if-case.

* Fix a goof where species wouldn't get shown in the editor correctly (it'd always default to human)

Co-authored-by: Javier Guardia Fernández <DrSmugleaf@users.noreply.github.com>
2022-01-08 19:53:14 -06:00
mirrorcult af785f873f
Optional server whitelists (#5979) 2022-01-05 00:37:06 +11:00
DrSmugleaf c3fe5909ad THE RETURN OF THE KING
This reverts commit c18d07538a.
2021-11-22 19:08:27 +01:00
DrSmugleaf c18d07538a Revert "Admin logs (#5419)"
This reverts commit 319aec109d.
2021-11-22 18:55:17 +01:00