* Check for flavor text equality in profile.
* Fix some characters being deleted from flavor text
Sometimes the last few characters of the flavor text would get deleted.
This fixes this issue.
(cherry picked from commit 9f1d95e3353493f28d579b562de348a322312885)
# Description
This PR fixes some database issues present in The Wizmerge.
# Changelog
No changelog, this isn't player facing.
---------
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: Evgencheg <7064926@gmail.com>
Co-authored-by: beck-thompson <107373427+beck-thompson@users.noreply.github.com>
Co-authored-by: dffdff2423 <dffdff2423@gmail.com>
<!--
This is a semi-strict format, you can add/remove sections as needed but
the order/format should be kept the same
Remove these comments before submitting
-->
# Description
<!--
Explain this PR in as much detail as applicable
Some example prompts to consider:
How might this affect the game? The codebase?
What might be some alternatives to this?
How/Who does this benefit/hurt [the game/codebase]?
-->
This is an emercency fix regarding Custom Name, apprently this is
fucked... wow...
Regarding DB issues please @DEATHB4DEFEAT review or check if you can
assist or anyone.
Thank you.
---
# Changelog
<!--
You can add an author after the `🆑` to change the name that appears
in the changelog (ex: `🆑 Death`)
Leaving it blank will default to your GitHub display name
This includes all available types for the changelog
-->
🆑
- fix: Custom Specie Name!
---------
Signed-off-by: FoxxoTrystan <45297731+FoxxoTrystan@users.noreply.github.com>
Co-authored-by: VMSolidus <evilexecutive@gmail.com>
Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com>
<!--
This is a semi-strict format, you can add/remove sections as needed but
the order/format should be kept the same
Remove these comments before submitting
-->
# Description
<!--
Explain this PR in as much detail as applicable
Some example prompts to consider:
How might this affect the game? The codebase?
What might be some alternatives to this?
How/Who does this benefit/hurt [the game/codebase]?
-->
Add a Custom Specie Name for servers that wishes to allow players to
have custom names.
This simply add some variables to the Profile/Humanoid, meaning copying
the profile will keep the custom names.
By default its is disabled, for servers owners wishing to enable those
please edit the Specie Prototype and add:
```
customName: true
```
Enabling it will make it able for players to edit the specie name of the
selected specie, and will have the window enabled.
This is my first time fucking with Profile and Database, i fucking hate
it.
---
<!--
This is default collapsed, readers click to expand it and see all your
media
The PR media section can get very large at times, so this is a good way
to keep it clean
The title is written using HTML tags
The title must be within the <summary> tags or you won't see it
-->
<details><summary><h1>Media</h1></summary>
<p>


</p>
</details>
---
# Changelog
<!--
You can add an author after the `🆑` to change the name that appears
in the changelog (ex: `🆑 Death`)
Leaving it blank will default to your GitHub display name
This includes all available types for the changelog
-->
🆑
- add: Custom Species Names.
---------
Signed-off-by: FoxxoTrystan <45297731+FoxxoTrystan@users.noreply.github.com>
Signed-off-by: VMSolidus <evilexecutive@gmail.com>
Co-authored-by: Mnemotechnican <69920617+Mnemotechnician@users.noreply.github.com>
Co-authored-by: VMSolidus <evilexecutive@gmail.com>
# Description
https://github.com/Simple-Station/Einstein-Engines/pull/794 apparently
silently deprecated the Backpack Preferences button. Selecting a
backpack preference no longer actually does anything, and instead your
backpack comes from your Loadout. This would have been fine if we were
warned about this, but because nobody merged upstream for 2 weeks after
the release of PR794, this issue went unreported.
Well now the solution is going to require adding every backpack in the
entire game to a new Backpacks tab. I've started this PR, but because
it's really late and I have Calculus classes in the morning, I won't be
able to finish it tonight. So I'm enlisting the help of a few other
people I know to PR to this PR to help get the backpacks in.
After we have backpacks in the loadout tab, and after Wizmerge, I'll
probably do a separate PR to actually remove the now useless Backpack
selection button.
This is probably for the better long term. Since this technically means
Backpack slots are no longer hardcoded to "Backpack/Duffelbag/Satchel",
and now the back slot is freeeeee to be used for anything.
<details><summary><h1>Media</h1></summary>
<p>

</p>
</details>
# Changelog
🆑
- add: Backpacks, Duffelbags, and Satchels have been added to loadouts.
- remove: The button for "Backpack Preference" has been removed.
Backpacks selection is now done via Loadouts.
- remove: The button for "Suit/Skirt Preference" has also been removed.
Suit selection is done via Loadouts.
This was removed in #25280 as the relevant DB entities didn't go outside the DB layer anymore. SS14.Admin however still uses them directly (as it only supports Postgres), so the interface is still useful there.
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
Description copied from my Wizard's Den PR
Resolves https://github.com/Simple-Station/Einstein-Engines/issues/32
# TODO
- [x] CVars
- [x] Server side loadout point validation
- Make tabContainer less bad
- [x] Move head clothes to loadouts from lockers
- [x] Move job starting equipment to loadouts
- [x] Loadout item preview
- [x] Fix loadouts duplicating on server restart
- [x] Make sure everything is localized -- Components and Tags are an
odd thing to display to the player in the whitelist and are very
unrealistic to make localizations for, so.. not doing that, what do I
do?
- [x] Fix all items going into the bag no matter their size
- [x] Add min/cur/max points to the bar
- [x] Use buttons instead of checkboxes
- [x] "Show Unusable" button to hide things your character currently
doesn't match the whitelists for
- [x] Time whitelist option
- [x] Species whitelist option
- [x] Trait whitelist option instead of EntityWhitelist for the sake of
localization
- [ ] More loadouts (filler things while waiting for review)
- [ ] - Golden or themed items for Command roles with an undecided
amount of playtime on their respective jobs
- [x] - Goliath cloak for playing a lot of Salvage
- [x] - Senior items for playing a lot of its respective role
- [ ] - Varying materials of pocket watches for people with varying
overall playtime
- [x] Fix loadout selectors not updating to match current preferences
<details><summary><h1>Media (Click Me!)</h1></summary>
<p>
I need to rerecord these
https://github.com/space-wizards/space-station-14/assets/77995199/59713874-b043-4813-848e-56b2951b6935https://github.com/space-wizards/space-station-14/assets/77995199/40180aee-bfe3-4f30-9df8-0f628e7e4514
</p>
</details>
# Changelog
🆑
- add: Added a new character customization tab for selecting items to
start your shift with, loadouts!
- remove: Removed some default job equipment in favor of loadouts
- remove: Removed several clothing items from Command lockers in favor
of loadouts
---------
Co-authored-by: VMSolidus <evilexecutive@gmail.com>
## Mirror of PR #26223: [Improve admin message seen/dismiss
state.](https://github.com/space-wizards/space-station-14/pull/26223)
from <img src="https://avatars.githubusercontent.com/u/10567778?v=4"
alt="space-wizards" width="22"/>
[space-wizards](https://github.com/space-wizards)/[space-station-14](https://github.com/space-wizards/space-station-14)
###### `d776c4b392a082dba7539d77cfa20fc904ed4091`
PR opened by <img
src="https://avatars.githubusercontent.com/u/8107459?v=4" width="16"/><a
href="https://github.com/PJB3005"> PJB3005</a> at 2024-03-18 04:02:20
UTC
---
PR changed 21 files with 3748 additions and 108 deletions.
The PR had the following labels:
- Changes: UI
- Status: Needs Review
---
<details open="true"><summary><h1>Original Body</h1></summary>
> 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.
>
> ## About the PR
> 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.
>
> ## Why / Balance
> Fixes#26211
>
> ## Technical details
> 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).
>
> ## Media
> - [X] I have added screenshots/videos to this PR showcasing its
changes ingame, **or** this PR does not require an ingame showcase
>
>

>
>

>
> **Changelog**
> <!--
> Make players aware of new features and changes that could affect how
they play the game by adding a Changelog entry. Please read the
Changelog guidelines located at:
https://docs.spacestation14.io/en/getting-started/pr-guideline#changelog
> -->
>
> 🆑
> ADMIN:
> - tweak: Admin messages are now shown as "seen" even if the player
dismisses them only temporarily. Also, it is impossible for players to
play without dismissing the message (temporary or permanent).
</details>
Co-authored-by: SimpleStation14 <Unknown>
God bloody christ. There's like three layers of shit here.
So firstly, apparently we were still using Npgsql.EnableLegacyTimestampBehavior. This means that time values (which are stored UTC in the database) were converted to local time when read out. This meant they were passed around as kind Local to clients (instead of UTC in the case of SQLite). That's easy enough to fix just turn off the flag and fix the couple spots we're passing a local DateTime ez.
Oh but it turns out there's a DIFFERENT problem with SQLite: See SQLite we definitely store the DateTimes as UTC, but when Microsoft.Data.Sqlite reads them it reads them as Kind Unspecified instead of Utc.
Why are these so bad? Because the admin notes system passes DateTime instances from EF Core straight to the rest of the game code. And that means it's a PAIN IN THE ASS to run the necessary conversions to fix the DateTime instances. GOD DAMNIT now I have to make a whole new set of "Record" entities so we avoid leaking the EF Core model entities. WAAAAAAA.
Fixes#19897
(cherry picked from commit 2e6eaa45c57c7f5ba561d1fb1ef6712d2432a8fa)
* Give .props files 2-space indents.
* Move to Central Package Management.
Allows us to store NuGet package versions all in one place. Yay!
* Update NuGet packages and fix code for changes.
Notable:
Changes to ILVerify.
Npgsql doesn't need hacks for inet anymore, now we need hacks to make the old code work with this new reality.
NUnit's analyzers are already complaining and I didn't even update it to 4.x yet.
TerraFX changed to GetLastSystemError so error handling had to be changed.
Buncha APIs have more NRT annotations.
* Remove dotnet-eng NuGet package source.
I genuinely don't know what this was for, and Central Package Management starts throwing warnings about it, so YEET.
* Remove Robust.Physics project.
Never used.
* Remove erroneous NVorbis reference.
Should be VorbisPizza and otherwise wasn't used.
* Sandbox fixes
* Remove unused unit test package references.
Castle.Core and NUnit.ConsoleRunner.
* Update NUnit to 4.0.1
This requires replacing all the old assertion methods because they removed them 🥲
* Oh so that's what dotnet-eng was used for. Yeah ok that makes sense.
* Add Robust.Analyzers.Test
* Update submodule
* commit to re-run CI
(cherry picked from commit a6c9c36b688a1ba78ff4c12502e81661cf607b6c)
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 a39999fb9c9f00fc3da17a63d9a0a26706f3720e)
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.
This means Content.Server.Database doesn't have a direct hard dependency on an SQLite implementation. The implementation is already provided by Robust anyways, so this means a publish of SS14.Admin doesn't need a libe_sqlite.so