Merge remote-tracking branch 'refs/remotes/upstream/master' into upstream-sync

# Conflicts:
#	Resources/Prototypes/Accents/word_replacements.yml
#	Resources/Prototypes/Entities/Clothing/Shoes/boots.yml
#	Resources/Prototypes/Loadouts/loadout_groups.yml
#	Resources/Prototypes/Roles/Jobs/Security/detective.yml
#	Resources/Prototypes/Species/human.yml
#	Resources/ServerInfo/Guidebook/Antagonist/Traitors.xml
#	Resources/Textures/Clothing/Head/Helmets/security.rsi/equipped-HELMET.png
#	Resources/Textures/Clothing/Head/Helmets/security.rsi/icon.png
#	Resources/Textures/Clothing/Head/Helmets/security.rsi/inhand-left.png
#	Resources/Textures/Clothing/Head/Helmets/security.rsi/inhand-right.png
#	Resources/Textures/Structures/Wallmounts/signs.rsi/meta.json
This commit is contained in:
Morb0
2024-08-23 09:38:36 +03:00
243 changed files with 20002 additions and 8248 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,44 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Content.Server.Database.Migrations.Postgres
{
/// <inheritdoc />
public partial class ban_notify_trigger : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql("""
create or replace function send_server_ban_notification()
returns trigger as $$
declare
x_server_id integer;
begin
select round.server_id into x_server_id from round where round.round_id = NEW.round_id;
perform pg_notify('ban_notification', json_build_object('ban_id', NEW.server_ban_id, 'server_id', x_server_id)::text);
return NEW;
end;
$$ LANGUAGE plpgsql;
""");
migrationBuilder.Sql("""
create or replace trigger notify_on_server_ban_insert
after insert on server_ban
for each row
execute function send_server_ban_notification();
""");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql("""
drop trigger notify_on_server_ban_insert on server_ban;
drop function send_server_ban_notification;
""");
}
}
}

View File

@@ -706,6 +706,11 @@ namespace Content.Server.Database
/// Intended for use with residential IP ranges that are often used maliciously.
/// </remarks>
BlacklistedRange = 1 << 2,
/// <summary>
/// Represents having all possible exemption flags.
/// </summary>
All = int.MaxValue,
// @formatter:on
}
@@ -904,7 +909,7 @@ namespace Content.Server.Database
Panic = 3,
/*
* TODO: Remove baby jail code once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future.
*
*
* If baby jail is removed, please reserve this value for as long as can reasonably be done to prevent causing ambiguity in connection denial reasons.
* Reservation by commenting out the value is likely sufficient for this purpose, but may impact projects which depend on SS14 like SS14.Admin.
*/