Merge branch 'space-wizards:master' into master

This commit is contained in:
Morbo 2022-01-05 04:24:58 +03:00 • committed by GitHub
commit 33b0ebd504
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
85 changed files with 29867 additions and 288 deletions

View file

@ -100,11 +100,29 @@ namespace Content.Client.Administration
return EnsurePlain(channelId);
}
public void EnsurePanelForLocalPlayer()
public void Open(NetUserId? channelId = null)
{
var localPlayer = _playerManager.LocalPlayer;
if (localPlayer != null)
EnsurePanel(localPlayer.UserId);
if (channelId == null)
{
var localPlayer = _playerManager.LocalPlayer;
if (localPlayer != null)
Open(localPlayer.UserId);
return;
}
if (_adminManager.HasFlag(AdminFlags.Adminhelp))
{
SelectChannel(channelId.Value);
return;
}
EnsurePlain(channelId.Value);
}
private void SelectChannel(NetUserId uid)
{
_adminWindow ??= new BwoinkWindow(this);
_adminWindow.SelectChannel(uid);
}
public void Send(NetUserId channelId, string text)

View file

@ -108,15 +108,20 @@ namespace Content.Client.Administration.UI
if (!open)
{
var pi = ChannelSelector
.PlayerItemList
.FirstOrDefault(i => ((PlayerInfo) i.Metadata!).SessionId == channel);
if (pi is not null)
pi.Selected = true;
SelectChannel(channel);
}
}
public void SelectChannel(NetUserId channel)
{
var pi = ChannelSelector
.PlayerItemList
.FirstOrDefault(i => ((PlayerInfo) i.Metadata!).SessionId == channel);
if (pi is not null)
pi.Selected = true;
}
private void FixButtons()
{
Ban.Visible = _adminManager.HasFlag(AdminFlags.Ban);
@ -157,11 +162,12 @@ namespace Content.Client.Administration.UI
return sb.ToString();
}
public void SwitchToChannel(NetUserId ch)
private void SwitchToChannel(NetUserId ch)
{
foreach (var bw in BwoinkArea.Children)
bw.Visible = false;
_bwoinkSystem.EnsurePanel(ch).Visible = true;
var panel = _bwoinkSystem.EnsurePanel(ch);
panel.Visible = true;
}
}
}

View file

@ -25,16 +25,13 @@ namespace Content.Client.Administration.UI.CustomControls
_adminSystem = EntitySystem.Get<AdminSystem>();
IoCManager.InjectDependencies(this);
RobustXamlLoader.Load(this);
}
protected override void EnteredTree()
{
// Fill the Option data
PopulateList();
PlayerItemList.OnItemSelected += PlayerItemListOnOnItemSelected;
PlayerItemList.OnItemDeselected += PlayerItemListOnOnItemDeselected;
FilterLineEdit.OnTextChanged += FilterLineEditOnOnTextEntered;
_adminSystem.PlayerListChanged += PopulateList;
}
private void FilterLineEditOnOnTextEntered(LineEdit.LineEditEventArgs obj)

View file

@ -23,13 +23,13 @@ namespace Content.Client.Commands
}
if (args.Length == 0)
{
EntitySystem.Get<BwoinkSystem>().EnsurePanelForLocalPlayer();
EntitySystem.Get<BwoinkSystem>().Open();
}
else
{
if (Guid.TryParse(args[0], out var guid))
{
EntitySystem.Get<BwoinkSystem>().EnsurePanel(new NetUserId(guid));
EntitySystem.Get<BwoinkSystem>().Open(new NetUserId(guid));
}
else
{

View file

@ -0,0 +1,865 @@
// <auto-generated />
using System;
using System.Net;
using System.Text.Json;
using Content.Server.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace Content.Server.Database.Migrations.Postgres
{
[DbContext(typeof(PostgresServerDbContext))]
[Migration("20220103235647_whitelist")]
partial class whitelist
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Content.Server.Database.Admin", b =>
{
b.Property<Guid>("UserId")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("user_id");
b.Property<int?>("AdminRankId")
.HasColumnType("integer")
.HasColumnName("admin_rank_id");
b.Property<string>("Title")
.HasColumnType("text")
.HasColumnName("title");
b.HasKey("UserId")
.HasName("PK_admin");
b.HasIndex("AdminRankId")
.HasDatabaseName("IX_admin_admin_rank_id");
b.ToTable("admin", (string)null);
});
modelBuilder.Entity("Content.Server.Database.AdminFlag", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("admin_flag_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<Guid>("AdminId")
.HasColumnType("uuid")
.HasColumnName("admin_id");
b.Property<string>("Flag")
.IsRequired()
.HasColumnType("text")
.HasColumnName("flag");
b.Property<bool>("Negative")
.HasColumnType("boolean")
.HasColumnName("negative");
b.HasKey("Id")
.HasName("PK_admin_flag");
b.HasIndex("AdminId")
.HasDatabaseName("IX_admin_flag_admin_id");
b.HasIndex("Flag", "AdminId")
.IsUnique();
b.ToTable("admin_flag", (string)null);
});
modelBuilder.Entity("Content.Server.Database.AdminLog", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("admin_log_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("RoundId")
.HasColumnType("integer")
.HasColumnName("round_id");
b.Property<DateTime>("Date")
.HasColumnType("timestamp with time zone")
.HasColumnName("date");
b.Property<short>("Impact")
.HasColumnType("smallint")
.HasColumnName("impact");
b.Property<JsonDocument>("Json")
.IsRequired()
.HasColumnType("jsonb")
.HasColumnName("json");
b.Property<string>("Message")
.IsRequired()
.HasColumnType("text")
.HasColumnName("message");
b.Property<int>("Type")
.HasColumnType("integer")
.HasColumnName("type");
b.HasKey("Id", "RoundId")
.HasName("PK_admin_log");
b.HasIndex("RoundId")
.HasDatabaseName("IX_admin_log_round_id");
b.HasIndex("Type")
.HasDatabaseName("IX_admin_log_type");
b.ToTable("admin_log", (string)null);
});
modelBuilder.Entity("Content.Server.Database.AdminLogEntity", b =>
{
b.Property<int>("Uid")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("uid");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Uid"));
b.Property<int?>("AdminLogId")
.HasColumnType("integer")
.HasColumnName("admin_log_id");
b.Property<int?>("AdminLogRoundId")
.HasColumnType("integer")
.HasColumnName("admin_log_round_id");
b.Property<string>("Name")
.HasColumnType("text")
.HasColumnName("name");
b.HasKey("Uid")
.HasName("PK_admin_log_entity");
b.HasIndex("AdminLogId", "AdminLogRoundId")
.HasDatabaseName("IX_admin_log_entity_admin_log_id_admin_log_round_id");
b.ToTable("admin_log_entity", (string)null);
});
modelBuilder.Entity("Content.Server.Database.AdminLogPlayer", b =>
{
b.Property<Guid>("PlayerUserId")
.HasColumnType("uuid")
.HasColumnName("player_user_id");
b.Property<int>("LogId")
.HasColumnType("integer")
.HasColumnName("log_id");
b.Property<int>("RoundId")
.HasColumnType("integer")
.HasColumnName("round_id");
b.HasKey("PlayerUserId", "LogId", "RoundId")
.HasName("PK_admin_log_player");
b.HasIndex("LogId", "RoundId");
b.ToTable("admin_log_player", (string)null);
});
modelBuilder.Entity("Content.Server.Database.AdminRank", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("admin_rank_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text")
.HasColumnName("name");
b.HasKey("Id")
.HasName("PK_admin_rank");
b.ToTable("admin_rank", (string)null);
});
modelBuilder.Entity("Content.Server.Database.AdminRankFlag", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("admin_rank_flag_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("AdminRankId")
.HasColumnType("integer")
.HasColumnName("admin_rank_id");
b.Property<string>("Flag")
.IsRequired()
.HasColumnType("text")
.HasColumnName("flag");
b.HasKey("Id")
.HasName("PK_admin_rank_flag");
b.HasIndex("AdminRankId")
.HasDatabaseName("IX_admin_rank_flag_admin_rank_id");
b.HasIndex("Flag", "AdminRankId")
.IsUnique();
b.ToTable("admin_rank_flag", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Antag", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("antag_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("AntagName")
.IsRequired()
.HasColumnType("text")
.HasColumnName("antag_name");
b.Property<int>("ProfileId")
.HasColumnType("integer")
.HasColumnName("profile_id");
b.HasKey("Id")
.HasName("PK_antag");
b.HasIndex("ProfileId", "AntagName")
.IsUnique();
b.ToTable("antag", (string)null);
});
modelBuilder.Entity("Content.Server.Database.AssignedUserId", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("assigned_user_id_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<Guid>("UserId")
.HasColumnType("uuid")
.HasColumnName("user_id");
b.Property<string>("UserName")
.IsRequired()
.HasColumnType("text")
.HasColumnName("user_name");
b.HasKey("Id")
.HasName("PK_assigned_user_id");
b.HasIndex("UserId")
.IsUnique();
b.HasIndex("UserName")
.IsUnique();
b.ToTable("assigned_user_id", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Job", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("job_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("JobName")
.IsRequired()
.HasColumnType("text")
.HasColumnName("job_name");
b.Property<int>("Priority")
.HasColumnType("integer")
.HasColumnName("priority");
b.Property<int>("ProfileId")
.HasColumnType("integer")
.HasColumnName("profile_id");
b.HasKey("Id")
.HasName("PK_job");
b.HasIndex("ProfileId")
.HasDatabaseName("IX_job_profile_id");
b.HasIndex("ProfileId", "JobName")
.IsUnique();
b.HasIndex(new[] { "ProfileId" }, "IX_job_one_high_priority")
.IsUnique()
.HasFilter("priority = 3");
b.ToTable("job", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Player", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("player_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime>("FirstSeenTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("first_seen_time");
b.Property<IPAddress>("LastSeenAddress")
.IsRequired()
.HasColumnType("inet")
.HasColumnName("last_seen_address");
b.Property<byte[]>("LastSeenHWId")
.HasColumnType("bytea")
.HasColumnName("last_seen_hwid");
b.Property<DateTime>("LastSeenTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("last_seen_time");
b.Property<string>("LastSeenUserName")
.IsRequired()
.HasColumnType("text")
.HasColumnName("last_seen_user_name");
b.Property<Guid>("UserId")
.HasColumnType("uuid")
.HasColumnName("user_id");
b.HasKey("Id")
.HasName("PK_player");
b.HasAlternateKey("UserId")
.HasName("ak_player_user_id");
b.HasIndex("LastSeenUserName");
b.HasIndex("UserId")
.IsUnique();
b.ToTable("player", (string)null);
b.HasCheckConstraint("LastSeenAddressNotIPv6MappedIPv4", "NOT inet '::ffff:0.0.0.0/96' >>= last_seen_address");
});
modelBuilder.Entity("Content.Server.Database.PostgresConnectionLog", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("connection_log_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<IPAddress>("Address")
.IsRequired()
.HasColumnType("inet")
.HasColumnName("address");
b.Property<byte[]>("HWId")
.HasColumnType("bytea")
.HasColumnName("hwid");
b.Property<DateTime>("Time")
.HasColumnType("timestamp with time zone")
.HasColumnName("time");
b.Property<Guid>("UserId")
.HasColumnType("uuid")
.HasColumnName("user_id");
b.Property<string>("UserName")
.IsRequired()
.HasColumnType("text")
.HasColumnName("user_name");
b.HasKey("Id")
.HasName("PK_connection_log");
b.HasIndex("UserId");
b.ToTable("connection_log", (string)null);
b.HasCheckConstraint("AddressNotIPv6MappedIPv4", "NOT inet '::ffff:0.0.0.0/96' >>= address");
});
modelBuilder.Entity("Content.Server.Database.PostgresServerBan", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("server_ban_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<ValueTuple<IPAddress, int>?>("Address")
.HasColumnType("inet")
.HasColumnName("address");
b.Property<DateTime>("BanTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("ban_time");
b.Property<Guid?>("BanningAdmin")
.HasColumnType("uuid")
.HasColumnName("banning_admin");
b.Property<DateTime?>("ExpirationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("expiration_time");
b.Property<byte[]>("HWId")
.HasColumnType("bytea")
.HasColumnName("hwid");
b.Property<string>("Reason")
.IsRequired()
.HasColumnType("text")
.HasColumnName("reason");
b.Property<Guid?>("UserId")
.HasColumnType("uuid")
.HasColumnName("user_id");
b.HasKey("Id")
.HasName("PK_server_ban");
b.HasIndex("Address");
b.HasIndex("UserId");
b.ToTable("server_ban", (string)null);
b.HasCheckConstraint("AddressNotIPv6MappedIPv4", "NOT inet '::ffff:0.0.0.0/96' >>= address");
b.HasCheckConstraint("HaveEitherAddressOrUserIdOrHWId", "address IS NOT NULL OR user_id IS NOT NULL OR hwid IS NOT NULL");
});
modelBuilder.Entity("Content.Server.Database.PostgresServerUnban", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("unban_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("BanId")
.HasColumnType("integer")
.HasColumnName("ban_id");
b.Property<DateTime>("UnbanTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("unban_time");
b.Property<Guid?>("UnbanningAdmin")
.HasColumnType("uuid")
.HasColumnName("unbanning_admin");
b.HasKey("Id")
.HasName("PK_server_unban");
b.HasIndex("BanId")
.IsUnique();
b.ToTable("server_unban", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Preference", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("preference_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("AdminOOCColor")
.IsRequired()
.HasColumnType("text")
.HasColumnName("admin_ooc_color");
b.Property<int>("SelectedCharacterSlot")
.HasColumnType("integer")
.HasColumnName("selected_character_slot");
b.Property<Guid>("UserId")
.HasColumnType("uuid")
.HasColumnName("user_id");
b.HasKey("Id")
.HasName("PK_preference");
b.HasIndex("UserId")
.IsUnique();
b.ToTable("preference", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Profile", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("profile_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("Age")
.HasColumnType("integer")
.HasColumnName("age");
b.Property<string>("Backpack")
.IsRequired()
.HasColumnType("text")
.HasColumnName("backpack");
b.Property<string>("CharacterName")
.IsRequired()
.HasColumnType("text")
.HasColumnName("char_name");
b.Property<string>("Clothing")
.IsRequired()
.HasColumnType("text")
.HasColumnName("clothing");
b.Property<string>("EyeColor")
.IsRequired()
.HasColumnType("text")
.HasColumnName("eye_color");
b.Property<string>("FacialHairColor")
.IsRequired()
.HasColumnType("text")
.HasColumnName("facial_hair_color");
b.Property<string>("FacialHairName")
.IsRequired()
.HasColumnType("text")
.HasColumnName("facial_hair_name");
b.Property<string>("Gender")
.IsRequired()
.HasColumnType("text")
.HasColumnName("gender");
b.Property<string>("HairColor")
.IsRequired()
.HasColumnType("text")
.HasColumnName("hair_color");
b.Property<string>("HairName")
.IsRequired()
.HasColumnType("text")
.HasColumnName("hair_name");
b.Property<int>("PreferenceId")
.HasColumnType("integer")
.HasColumnName("preference_id");
b.Property<int>("PreferenceUnavailable")
.HasColumnType("integer")
.HasColumnName("pref_unavailable");
b.Property<string>("Sex")
.IsRequired()
.HasColumnType("text")
.HasColumnName("sex");
b.Property<string>("SkinColor")
.IsRequired()
.HasColumnType("text")
.HasColumnName("skin_color");
b.Property<int>("Slot")
.HasColumnType("integer")
.HasColumnName("slot");
b.HasKey("Id")
.HasName("PK_profile");
b.HasIndex("PreferenceId")
.HasDatabaseName("IX_profile_preference_id");
b.HasIndex("Slot", "PreferenceId")
.IsUnique();
b.ToTable("profile", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Round", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("round_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.HasKey("Id")
.HasName("PK_round");
b.ToTable("round", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Whitelist", b =>
{
b.Property<Guid>("UserId")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("user_id");
b.HasKey("UserId")
.HasName("PK_whitelist");
b.ToTable("whitelist", (string)null);
});
modelBuilder.Entity("PlayerRound", b =>
{
b.Property<int>("PlayersId")
.HasColumnType("integer")
.HasColumnName("players_id");
b.Property<int>("RoundsId")
.HasColumnType("integer")
.HasColumnName("rounds_id");
b.HasKey("PlayersId", "RoundsId")
.HasName("PK_player_round");
b.HasIndex("RoundsId")
.HasDatabaseName("IX_player_round_rounds_id");
b.ToTable("player_round", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Admin", b =>
{
b.HasOne("Content.Server.Database.AdminRank", "AdminRank")
.WithMany("Admins")
.HasForeignKey("AdminRankId")
.OnDelete(DeleteBehavior.SetNull)
.HasConstraintName("FK_admin_admin_rank_admin_rank_id");
b.Navigation("AdminRank");
});
modelBuilder.Entity("Content.Server.Database.AdminFlag", b =>
{
b.HasOne("Content.Server.Database.Admin", "Admin")
.WithMany("Flags")
.HasForeignKey("AdminId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_admin_flag_admin_admin_id");
b.Navigation("Admin");
});
modelBuilder.Entity("Content.Server.Database.AdminLog", b =>
{
b.HasOne("Content.Server.Database.Round", "Round")
.WithMany("AdminLogs")
.HasForeignKey("RoundId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_admin_log_round_round_id");
b.Navigation("Round");
});
modelBuilder.Entity("Content.Server.Database.AdminLogEntity", b =>
{
b.HasOne("Content.Server.Database.AdminLog", null)
.WithMany("Entities")
.HasForeignKey("AdminLogId", "AdminLogRoundId")
.HasConstraintName("FK_admin_log_entity_admin_log_admin_log_id_admin_log_round_id");
});
modelBuilder.Entity("Content.Server.Database.AdminLogPlayer", b =>
{
b.HasOne("Content.Server.Database.Player", "Player")
.WithMany("AdminLogs")
.HasForeignKey("PlayerUserId")
.HasPrincipalKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_admin_log_player_player_player_user_id");
b.HasOne("Content.Server.Database.AdminLog", "Log")
.WithMany("Players")
.HasForeignKey("LogId", "RoundId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_admin_log_player_admin_log_log_id_round_id");
b.Navigation("Log");
b.Navigation("Player");
});
modelBuilder.Entity("Content.Server.Database.AdminRankFlag", b =>
{
b.HasOne("Content.Server.Database.AdminRank", "Rank")
.WithMany("Flags")
.HasForeignKey("AdminRankId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_admin_rank_flag_admin_rank_admin_rank_id");
b.Navigation("Rank");
});
modelBuilder.Entity("Content.Server.Database.Antag", b =>
{
b.HasOne("Content.Server.Database.Profile", "Profile")
.WithMany("Antags")
.HasForeignKey("ProfileId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_antag_profile_profile_id");
b.Navigation("Profile");
});
modelBuilder.Entity("Content.Server.Database.Job", b =>
{
b.HasOne("Content.Server.Database.Profile", "Profile")
.WithMany("Jobs")
.HasForeignKey("ProfileId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_job_profile_profile_id");
b.Navigation("Profile");
});
modelBuilder.Entity("Content.Server.Database.PostgresServerUnban", b =>
{
b.HasOne("Content.Server.Database.PostgresServerBan", "Ban")
.WithOne("Unban")
.HasForeignKey("Content.Server.Database.PostgresServerUnban", "BanId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_server_unban_server_ban_ban_id");
b.Navigation("Ban");
});
modelBuilder.Entity("Content.Server.Database.Profile", b =>
{
b.HasOne("Content.Server.Database.Preference", "Preference")
.WithMany("Profiles")
.HasForeignKey("PreferenceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_profile_preference_preference_id");
b.Navigation("Preference");
});
modelBuilder.Entity("PlayerRound", b =>
{
b.HasOne("Content.Server.Database.Player", null)
.WithMany()
.HasForeignKey("PlayersId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_player_round_player_players_id");
b.HasOne("Content.Server.Database.Round", null)
.WithMany()
.HasForeignKey("RoundsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_player_round_round_rounds_id");
});
modelBuilder.Entity("Content.Server.Database.Admin", b =>
{
b.Navigation("Flags");
});
modelBuilder.Entity("Content.Server.Database.AdminLog", b =>
{
b.Navigation("Entities");
b.Navigation("Players");
});
modelBuilder.Entity("Content.Server.Database.AdminRank", b =>
{
b.Navigation("Admins");
b.Navigation("Flags");
});
modelBuilder.Entity("Content.Server.Database.Player", b =>
{
b.Navigation("AdminLogs");
});
modelBuilder.Entity("Content.Server.Database.PostgresServerBan", b =>
{
b.Navigation("Unban");
});
modelBuilder.Entity("Content.Server.Database.Preference", b =>
{
b.Navigation("Profiles");
});
modelBuilder.Entity("Content.Server.Database.Profile", b =>
{
b.Navigation("Antags");
b.Navigation("Jobs");
});
modelBuilder.Entity("Content.Server.Database.Round", b =>
{
b.Navigation("AdminLogs");
});
#pragma warning restore 612, 618
}
}
}

View file

@ -0,0 +1,30 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Content.Server.Database.Migrations.Postgres
{
public partial class whitelist : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "whitelist",
columns: table => new
{
user_id = table.Column<Guid>(type: "uuid", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_whitelist", x => x.user_id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "whitelist");
}
}
}

View file

@ -638,6 +638,19 @@ namespace Content.Server.Database.Migrations.Postgres
b.ToTable("round", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Whitelist", b =>
{
b.Property<Guid>("UserId")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("user_id");
b.HasKey("UserId")
.HasName("PK_whitelist");
b.ToTable("whitelist", (string)null);
});
modelBuilder.Entity("PlayerRound", b =>
{
b.Property<int>("PlayersId")

View file

@ -0,0 +1,811 @@
// <auto-generated />
using System;
using Content.Server.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Content.Server.Database.Migrations.Sqlite
{
[DbContext(typeof(SqliteServerDbContext))]
[Migration("20220103235637_whitelist")]
partial class whitelist
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "6.0.0");
modelBuilder.Entity("Content.Server.Database.Admin", b =>
{
b.Property<Guid>("UserId")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasColumnName("user_id");
b.Property<int?>("AdminRankId")
.HasColumnType("INTEGER")
.HasColumnName("admin_rank_id");
b.Property<string>("Title")
.HasColumnType("TEXT")
.HasColumnName("title");
b.HasKey("UserId")
.HasName("PK_admin");
b.HasIndex("AdminRankId")
.HasDatabaseName("IX_admin_admin_rank_id");
b.ToTable("admin", (string)null);
});
modelBuilder.Entity("Content.Server.Database.AdminFlag", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasColumnName("admin_flag_id");
b.Property<Guid>("AdminId")
.HasColumnType("TEXT")
.HasColumnName("admin_id");
b.Property<string>("Flag")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("flag");
b.Property<bool>("Negative")
.HasColumnType("INTEGER")
.HasColumnName("negative");
b.HasKey("Id")
.HasName("PK_admin_flag");
b.HasIndex("AdminId")
.HasDatabaseName("IX_admin_flag_admin_id");
b.HasIndex("Flag", "AdminId")
.IsUnique();
b.ToTable("admin_flag", (string)null);
});
modelBuilder.Entity("Content.Server.Database.AdminLog", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasColumnName("admin_log_id");
b.Property<int>("RoundId")
.HasColumnType("INTEGER")
.HasColumnName("round_id");
b.Property<DateTime>("Date")
.HasColumnType("TEXT")
.HasColumnName("date");
b.Property<sbyte>("Impact")
.HasColumnType("INTEGER")
.HasColumnName("impact");
b.Property<string>("Json")
.IsRequired()
.HasColumnType("jsonb")
.HasColumnName("json");
b.Property<string>("Message")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("message");
b.Property<int>("Type")
.HasColumnType("INTEGER")
.HasColumnName("type");
b.HasKey("Id", "RoundId")
.HasName("PK_admin_log");
b.HasIndex("RoundId")
.HasDatabaseName("IX_admin_log_round_id");
b.HasIndex("Type")
.HasDatabaseName("IX_admin_log_type");
b.ToTable("admin_log", (string)null);
});
modelBuilder.Entity("Content.Server.Database.AdminLogEntity", b =>
{
b.Property<int>("Uid")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasColumnName("uid");
b.Property<int?>("AdminLogId")
.HasColumnType("INTEGER")
.HasColumnName("admin_log_id");
b.Property<int?>("AdminLogRoundId")
.HasColumnType("INTEGER")
.HasColumnName("admin_log_round_id");
b.Property<string>("Name")
.HasColumnType("TEXT")
.HasColumnName("name");
b.HasKey("Uid")
.HasName("PK_admin_log_entity");
b.HasIndex("AdminLogId", "AdminLogRoundId")
.HasDatabaseName("IX_admin_log_entity_admin_log_id_admin_log_round_id");
b.ToTable("admin_log_entity", (string)null);
});
modelBuilder.Entity("Content.Server.Database.AdminLogPlayer", b =>
{
b.Property<Guid>("PlayerUserId")
.HasColumnType("TEXT")
.HasColumnName("player_user_id");
b.Property<int>("LogId")
.HasColumnType("INTEGER")
.HasColumnName("log_id");
b.Property<int>("RoundId")
.HasColumnType("INTEGER")
.HasColumnName("round_id");
b.HasKey("PlayerUserId", "LogId", "RoundId")
.HasName("PK_admin_log_player");
b.HasIndex("LogId", "RoundId");
b.ToTable("admin_log_player", (string)null);
});
modelBuilder.Entity("Content.Server.Database.AdminRank", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasColumnName("admin_rank_id");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("name");
b.HasKey("Id")
.HasName("PK_admin_rank");
b.ToTable("admin_rank", (string)null);
});
modelBuilder.Entity("Content.Server.Database.AdminRankFlag", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasColumnName("admin_rank_flag_id");
b.Property<int>("AdminRankId")
.HasColumnType("INTEGER")
.HasColumnName("admin_rank_id");
b.Property<string>("Flag")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("flag");
b.HasKey("Id")
.HasName("PK_admin_rank_flag");
b.HasIndex("AdminRankId")
.HasDatabaseName("IX_admin_rank_flag_admin_rank_id");
b.HasIndex("Flag", "AdminRankId")
.IsUnique();
b.ToTable("admin_rank_flag", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Antag", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasColumnName("antag_id");
b.Property<string>("AntagName")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("antag_name");
b.Property<int>("ProfileId")
.HasColumnType("INTEGER")
.HasColumnName("profile_id");
b.HasKey("Id")
.HasName("PK_antag");
b.HasIndex("ProfileId", "AntagName")
.IsUnique();
b.ToTable("antag", (string)null);
});
modelBuilder.Entity("Content.Server.Database.AssignedUserId", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasColumnName("assigned_user_id_id");
b.Property<Guid>("UserId")
.HasColumnType("TEXT")
.HasColumnName("user_id");
b.Property<string>("UserName")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("user_name");
b.HasKey("Id")
.HasName("PK_assigned_user_id");
b.HasIndex("UserId")
.IsUnique();
b.HasIndex("UserName")
.IsUnique();
b.ToTable("assigned_user_id", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Job", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasColumnName("job_id");
b.Property<string>("JobName")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("job_name");
b.Property<int>("Priority")
.HasColumnType("INTEGER")
.HasColumnName("priority");
b.Property<int>("ProfileId")
.HasColumnType("INTEGER")
.HasColumnName("profile_id");
b.HasKey("Id")
.HasName("PK_job");
b.HasIndex("ProfileId")
.HasDatabaseName("IX_job_profile_id");
b.HasIndex("ProfileId", "JobName")
.IsUnique();
b.HasIndex(new[] { "ProfileId" }, "IX_job_one_high_priority")
.IsUnique()
.HasFilter("priority = 3");
b.ToTable("job", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Player", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasColumnName("player_id");
b.Property<DateTime>("FirstSeenTime")
.HasColumnType("TEXT")
.HasColumnName("first_seen_time");
b.Property<string>("LastSeenAddress")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("last_seen_address");
b.Property<byte[]>("LastSeenHWId")
.HasColumnType("BLOB")
.HasColumnName("last_seen_hwid");
b.Property<DateTime>("LastSeenTime")
.HasColumnType("TEXT")
.HasColumnName("last_seen_time");
b.Property<string>("LastSeenUserName")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("last_seen_user_name");
b.Property<Guid>("UserId")
.HasColumnType("TEXT")
.HasColumnName("user_id");
b.HasKey("Id")
.HasName("PK_player");
b.HasAlternateKey("UserId")
.HasName("ak_player_user_id");
b.HasIndex("LastSeenUserName");
b.ToTable("player", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Preference", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasColumnName("preference_id");
b.Property<string>("AdminOOCColor")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("admin_ooc_color");
b.Property<int>("SelectedCharacterSlot")
.HasColumnType("INTEGER")
.HasColumnName("selected_character_slot");
b.Property<Guid>("UserId")
.HasColumnType("TEXT")
.HasColumnName("user_id");
b.HasKey("Id")
.HasName("PK_preference");
b.HasIndex("UserId")
.IsUnique();
b.ToTable("preference", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Profile", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasColumnName("profile_id");
b.Property<int>("Age")
.HasColumnType("INTEGER")
.HasColumnName("age");
b.Property<string>("Backpack")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("backpack");
b.Property<string>("CharacterName")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("char_name");
b.Property<string>("Clothing")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("clothing");
b.Property<string>("EyeColor")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("eye_color");
b.Property<string>("FacialHairColor")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("facial_hair_color");
b.Property<string>("FacialHairName")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("facial_hair_name");
b.Property<string>("Gender")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("gender");
b.Property<string>("HairColor")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("hair_color");
b.Property<string>("HairName")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("hair_name");
b.Property<int>("PreferenceId")
.HasColumnType("INTEGER")
.HasColumnName("preference_id");
b.Property<int>("PreferenceUnavailable")
.HasColumnType("INTEGER")
.HasColumnName("pref_unavailable");
b.Property<string>("Sex")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("sex");
b.Property<string>("SkinColor")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("skin_color");
b.Property<int>("Slot")
.HasColumnType("INTEGER")
.HasColumnName("slot");
b.HasKey("Id")
.HasName("PK_profile");
b.HasIndex("PreferenceId")
.HasDatabaseName("IX_profile_preference_id");
b.HasIndex("Slot", "PreferenceId")
.IsUnique();
b.ToTable("profile", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Round", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasColumnName("round_id");
b.HasKey("Id")
.HasName("PK_round");
b.ToTable("round", (string)null);
});
modelBuilder.Entity("Content.Server.Database.SqliteConnectionLog", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasColumnName("connection_log_id");
b.Property<string>("Address")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("address");
b.Property<byte[]>("HWId")
.HasColumnType("BLOB")
.HasColumnName("hwid");
b.Property<DateTime>("Time")
.HasColumnType("TEXT")
.HasColumnName("time");
b.Property<Guid>("UserId")
.HasColumnType("TEXT")
.HasColumnName("user_id");
b.Property<string>("UserName")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("user_name");
b.HasKey("Id")
.HasName("PK_connection_log");
b.ToTable("connection_log", (string)null);
});
modelBuilder.Entity("Content.Server.Database.SqliteServerBan", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasColumnName("ban_id");
b.Property<string>("Address")
.HasColumnType("TEXT")
.HasColumnName("address");
b.Property<DateTime>("BanTime")
.HasColumnType("TEXT")
.HasColumnName("ban_time");
b.Property<Guid?>("BanningAdmin")
.HasColumnType("TEXT")
.HasColumnName("banning_admin");
b.Property<DateTime?>("ExpirationTime")
.HasColumnType("TEXT")
.HasColumnName("expiration_time");
b.Property<byte[]>("HWId")
.HasColumnType("BLOB")
.HasColumnName("hwid");
b.Property<string>("Reason")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("reason");
b.Property<Guid?>("UserId")
.HasColumnType("TEXT")
.HasColumnName("user_id");
b.HasKey("Id")
.HasName("PK_ban");
b.ToTable("ban", (string)null);
});
modelBuilder.Entity("Content.Server.Database.SqliteServerUnban", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasColumnName("unban_id");
b.Property<int>("BanId")
.HasColumnType("INTEGER")
.HasColumnName("ban_id");
b.Property<DateTime>("UnbanTime")
.HasColumnType("TEXT")
.HasColumnName("unban_time");
b.Property<Guid?>("UnbanningAdmin")
.HasColumnType("TEXT")
.HasColumnName("unbanning_admin");
b.HasKey("Id")
.HasName("PK_unban");
b.HasIndex("BanId")
.IsUnique();
b.ToTable("unban", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Whitelist", b =>
{
b.Property<Guid>("UserId")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasColumnName("user_id");
b.HasKey("UserId")
.HasName("PK_whitelist");
b.ToTable("whitelist", (string)null);
});
modelBuilder.Entity("PlayerRound", b =>
{
b.Property<int>("PlayersId")
.HasColumnType("INTEGER")
.HasColumnName("players_id");
b.Property<int>("RoundsId")
.HasColumnType("INTEGER")
.HasColumnName("rounds_id");
b.HasKey("PlayersId", "RoundsId")
.HasName("PK_player_round");
b.HasIndex("RoundsId")
.HasDatabaseName("IX_player_round_rounds_id");
b.ToTable("player_round", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Admin", b =>
{
b.HasOne("Content.Server.Database.AdminRank", "AdminRank")
.WithMany("Admins")
.HasForeignKey("AdminRankId")
.OnDelete(DeleteBehavior.SetNull)
.HasConstraintName("FK_admin_admin_rank_admin_rank_id");
b.Navigation("AdminRank");
});
modelBuilder.Entity("Content.Server.Database.AdminFlag", b =>
{
b.HasOne("Content.Server.Database.Admin", "Admin")
.WithMany("Flags")
.HasForeignKey("AdminId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_admin_flag_admin_admin_id");
b.Navigation("Admin");
});
modelBuilder.Entity("Content.Server.Database.AdminLog", b =>
{
b.HasOne("Content.Server.Database.Round", "Round")
.WithMany("AdminLogs")
.HasForeignKey("RoundId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_admin_log_round_round_id");
b.Navigation("Round");
});
modelBuilder.Entity("Content.Server.Database.AdminLogEntity", b =>
{
b.HasOne("Content.Server.Database.AdminLog", null)
.WithMany("Entities")
.HasForeignKey("AdminLogId", "AdminLogRoundId")
.HasConstraintName("FK_admin_log_entity_admin_log_admin_log_id_admin_log_round_id");
});
modelBuilder.Entity("Content.Server.Database.AdminLogPlayer", b =>
{
b.HasOne("Content.Server.Database.Player", "Player")
.WithMany("AdminLogs")
.HasForeignKey("PlayerUserId")
.HasPrincipalKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_admin_log_player_player_player_user_id");
b.HasOne("Content.Server.Database.AdminLog", "Log")
.WithMany("Players")
.HasForeignKey("LogId", "RoundId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_admin_log_player_admin_log_log_id_round_id");
b.Navigation("Log");
b.Navigation("Player");
});
modelBuilder.Entity("Content.Server.Database.AdminRankFlag", b =>
{
b.HasOne("Content.Server.Database.AdminRank", "Rank")
.WithMany("Flags")
.HasForeignKey("AdminRankId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_admin_rank_flag_admin_rank_admin_rank_id");
b.Navigation("Rank");
});
modelBuilder.Entity("Content.Server.Database.Antag", b =>
{
b.HasOne("Content.Server.Database.Profile", "Profile")
.WithMany("Antags")
.HasForeignKey("ProfileId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_antag_profile_profile_id");
b.Navigation("Profile");
});
modelBuilder.Entity("Content.Server.Database.Job", b =>
{
b.HasOne("Content.Server.Database.Profile", "Profile")
.WithMany("Jobs")
.HasForeignKey("ProfileId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_job_profile_profile_id");
b.Navigation("Profile");
});
modelBuilder.Entity("Content.Server.Database.Profile", b =>
{
b.HasOne("Content.Server.Database.Preference", "Preference")
.WithMany("Profiles")
.HasForeignKey("PreferenceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_profile_preference_preference_id");
b.Navigation("Preference");
});
modelBuilder.Entity("Content.Server.Database.SqliteServerUnban", b =>
{
b.HasOne("Content.Server.Database.SqliteServerBan", "Ban")
.WithOne("Unban")
.HasForeignKey("Content.Server.Database.SqliteServerUnban", "BanId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_unban_ban_ban_id");
b.Navigation("Ban");
});
modelBuilder.Entity("PlayerRound", b =>
{
b.HasOne("Content.Server.Database.Player", null)
.WithMany()
.HasForeignKey("PlayersId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_player_round_player_players_id");
b.HasOne("Content.Server.Database.Round", null)
.WithMany()
.HasForeignKey("RoundsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_player_round_round_rounds_id");
});
modelBuilder.Entity("Content.Server.Database.Admin", b =>
{
b.Navigation("Flags");
});
modelBuilder.Entity("Content.Server.Database.AdminLog", b =>
{
b.Navigation("Entities");
b.Navigation("Players");
});
modelBuilder.Entity("Content.Server.Database.AdminRank", b =>
{
b.Navigation("Admins");
b.Navigation("Flags");
});
modelBuilder.Entity("Content.Server.Database.Player", b =>
{
b.Navigation("AdminLogs");
});
modelBuilder.Entity("Content.Server.Database.Preference", b =>
{
b.Navigation("Profiles");
});
modelBuilder.Entity("Content.Server.Database.Profile", b =>
{
b.Navigation("Antags");
b.Navigation("Jobs");
});
modelBuilder.Entity("Content.Server.Database.Round", b =>
{
b.Navigation("AdminLogs");
});
modelBuilder.Entity("Content.Server.Database.SqliteServerBan", b =>
{
b.Navigation("Unban");
});
#pragma warning restore 612, 618
}
}
}

View file

@ -0,0 +1,30 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Content.Server.Database.Migrations.Sqlite
{
public partial class whitelist : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "whitelist",
columns: table => new
{
user_id = table.Column<Guid>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_whitelist", x => x.user_id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "whitelist");
}
}
}

View file

@ -584,6 +584,19 @@ namespace Content.Server.Database.Migrations.Sqlite
b.ToTable("unban", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Whitelist", b =>
{
b.Property<Guid>("UserId")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasColumnName("user_id");
b.HasKey("UserId")
.HasName("PK_whitelist");
b.ToTable("whitelist", (string)null);
});
modelBuilder.Entity("PlayerRound", b =>
{
b.Property<int>("PlayersId")

View file

@ -36,6 +36,7 @@ namespace Content.Server.Database
public DbSet<Round> Round { get; set; } = null!;
public DbSet<AdminLog> AdminLog { get; set; } = null!;
public DbSet<AdminLogPlayer> AdminLogPlayer { get; set; } = null!;
public DbSet<Whitelist> Whitelist { get; set; } = null!;
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
@ -205,6 +206,12 @@ namespace Content.Server.Database
public List<AdminLogPlayer> AdminLogs { get; set; } = null!;
}
[Table("whitelist")]
public class Whitelist
{
[Required, Key] public Guid UserId { get; set; }
}
public class Admin
{
[Key] public Guid UserId { get; set; }

View file

@ -1,9 +1,11 @@
using System;
using Content.Server.Animals.Systems;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.ViewVariables;
namespace Content.Server.Animals.Components
@ -17,7 +19,7 @@ namespace Content.Server.Animals.Components
/// The reagent to produce.
/// </summary>
[ViewVariables(VVAccess.ReadOnly)]
[DataField("reagentId")]
[DataField("reagentId", customTypeSerializer:typeof(PrototypeIdSerializer<ReagentPrototype>))]
public string ReagentId = "Milk";
/// <summary>

View file

@ -18,7 +18,9 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Atmos.Components
{
[RegisterComponent]
public class GasAnalyzerComponent : SharedGasAnalyzerComponent, IAfterInteract, IDropped, IUse
[ComponentReference(typeof(IActivate))]
[ComponentReference(typeof(SharedGasAnalyzerComponent))]
public class GasAnalyzerComponent : SharedGasAnalyzerComponent, IAfterInteract, IDropped, IActivate
{
[Dependency] private readonly IEntityManager _entities = default!;
@ -271,14 +273,14 @@ namespace Content.Server.Atmos.Components
}
}
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
void IActivate.Activate(ActivateEventArgs eventArgs)
{
if (_entities.TryGetComponent(eventArgs.User, out ActorComponent? actor))
{
ToggleInterface(actor.PlayerSession);
return true;
return;
}
return false;
return;
}
}
}

View file

@ -31,7 +31,7 @@ namespace Content.Server.Atmos.Components
[RegisterComponent]
[ComponentReference(typeof(IActivate))]
#pragma warning disable 618
public class GasTankComponent : Component, IExamine, IGasMixtureHolder, IUse, IDropped, IActivate
public class GasTankComponent : Component, IExamine, IGasMixtureHolder, IDropped, IActivate
#pragma warning restore 618
{
[Dependency] private readonly IEntityManager _entMan = default!;
@ -155,13 +155,6 @@ namespace Content.Server.Atmos.Components
return air;
}
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
{
if (!_entMan.TryGetComponent(eventArgs.User, out ActorComponent? actor)) return false;
OpenInterface(actor.PlayerSession);
return true;
}
void IActivate.Activate(ActivateEventArgs eventArgs)
{
if (!_entMan.TryGetComponent(eventArgs.User, out ActorComponent? actor)) return;

View file

@ -61,6 +61,7 @@ public class ChatSanitizationManager : IChatSanitizationManager
{ ":\\", "chatsan-uncertain" },
{ "lmao", "chatsan-laughs" },
{ "lol", "chatsan-laughs" },
{ "o7", "chatsan-salutes" }
};
private bool doSanitize = false;

View file

@ -1,9 +1,6 @@
using Content.Server.Alert;
using Content.Server.Atmos.Components;
using Content.Shared.Actions;
using Content.Shared.Actions.Behaviors.Item;
using Content.Shared.Actions.Components;
using Content.Shared.Alert;
using Content.Shared.Clothing;
using Content.Shared.Interaction;
using Content.Shared.Inventory;
@ -20,14 +17,12 @@ namespace Content.Server.Clothing.Components
{
[RegisterComponent]
[ComponentReference(typeof(IActivate))]
public sealed class MagbootsComponent : SharedMagbootsComponent, IUse, IActivate
public sealed class MagbootsComponent : SharedMagbootsComponent, IActivate
{
[ComponentDependency] private SharedItemComponent? _item = null;
[ComponentDependency] private ItemActionsComponent? _itemActions = null;
[ComponentDependency] private SpriteComponent? _sprite = null;
[Dependency] private readonly IEntityManager _entMan = default!;
private bool _on;
[ViewVariables]
@ -58,12 +53,6 @@ namespace Content.Server.Clothing.Components
On = !On;
}
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
{
Toggle(eventArgs.User);
return true;
}
void IActivate.Activate(ActivateEventArgs eventArgs)
{
Toggle(eventArgs.User);

View file

@ -9,6 +9,7 @@ using Content.Shared.CCVar;
using Robust.Server.Player;
using Robust.Shared.Configuration;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Network;
@ -74,7 +75,8 @@ The ban reason is: ""{ban.Reason}""
hwId = null;
}
if (_plyMgr.PlayerCount >= _cfg.GetCVar(CCVars.SoftMaxPlayers) && await _dbManager.GetAdminDataForAsync(e.UserId) is null)
var adminData = await _dbManager.GetAdminDataForAsync(e.UserId);
if (_plyMgr.PlayerCount >= _cfg.GetCVar(CCVars.SoftMaxPlayers) && adminData is null)
{
e.Deny("The server is full!");
return;
@ -87,6 +89,14 @@ The ban reason is: ""{ban.Reason}""
return;
}
if (_cfg.GetCVar(CCVars.WhitelistEnabled)
&& await _db.GetWhitelistStatusAsync(userId) == false
&& adminData is null)
{
e.Deny(Loc.GetString("whitelist-not-whitelisted"));
return;
}
if (!ServerPreferencesManager.ShouldStorePrefs(e.AuthType))
{
return;

View file

@ -100,7 +100,7 @@ namespace Content.Server.Construction.Commands
var tile = grid.GetTileRef(childTransform.Coordinates);
var tileDef = (ContentTileDefinition) tileDefinitionManager[tile.Tile.TypeId];
if (tileDef.Name == "underplating")
if (tileDef.ID == "underplating")
{
continue;
}

View file

@ -379,6 +379,7 @@ namespace Content.Server.Database
.Include(p => p.Flags)
.Include(p => p.AdminRank)
.ThenInclude(p => p!.Flags)
.AsSplitQuery() // tests fail because of a random warning if you dont have this!
.SingleOrDefaultAsync(p => p.UserId == userId.UserId, cancel);
}
@ -671,6 +672,33 @@ namespace Content.Server.Database
#endregion
#region Whitelist
public async Task<bool> GetWhitelistStatusAsync(NetUserId player)
{
await using var db = await GetDb();
return await db.DbContext.Whitelist.AnyAsync(w => w.UserId == player);
}
public async Task AddToWhitelistAsync(NetUserId player)
{
await using var db = await GetDb();
db.DbContext.Whitelist.Add(new Whitelist { UserId = player });
await db.DbContext.SaveChangesAsync();
}
public async Task RemoveFromWhitelistAsync(NetUserId player)
{
await using var db = await GetDb();
var entry = await db.DbContext.Whitelist.SingleAsync(w => w.UserId == player);
db.DbContext.Whitelist.Remove(entry);
await db.DbContext.SaveChangesAsync();
}
#endregion
protected abstract Task<DbGuard> GetDb();
protected abstract class DbGuard : IAsyncDisposable

View file

@ -139,6 +139,16 @@ namespace Content.Server.Database
IAsyncEnumerable<JsonDocument> GetAdminLogsJson(LogFilter? filter = null);
#endregion
#region Whitelist
Task<bool> GetWhitelistStatusAsync(NetUserId player);
Task AddToWhitelistAsync(NetUserId player);
Task RemoveFromWhitelistAsync(NetUserId player);
#endregion
}
public sealed class ServerDbManager : IServerDbManager
@ -356,6 +366,21 @@ namespace Content.Server.Database
return _db.GetAdminLogsJson(filter);
}
public Task<bool> GetWhitelistStatusAsync(NetUserId player)
{
return _db.GetWhitelistStatusAsync(player);
}
public Task AddToWhitelistAsync(NetUserId player)
{
return _db.AddToWhitelistAsync(player);
}
public Task RemoveFromWhitelistAsync(NetUserId player)
{
return _db.RemoveFromWhitelistAsync(player);
}
private DbContextOptions<ServerDbContext> CreatePostgresOptions()
{
var host = _cfg.GetCVar(CCVars.DatabasePgHost);

View file

@ -26,7 +26,6 @@ namespace Content.Server.Dice
SubscribeLocalEvent<DiceComponent, ComponentInit>(OnComponentInit);
SubscribeLocalEvent<DiceComponent, ActivateInWorldEvent>(OnActivate);
SubscribeLocalEvent<DiceComponent, UseInHandEvent>(OnUse);
SubscribeLocalEvent<DiceComponent, LandEvent>(OnLand);
SubscribeLocalEvent<DiceComponent, ExaminedEvent>(OnExamined);
}
@ -42,11 +41,6 @@ namespace Content.Server.Dice
Roll(uid, component);
}
private void OnUse(EntityUid uid, DiceComponent component, UseInHandEvent args)
{
Roll(uid, component);
}
private void OnLand(EntityUid uid, DiceComponent component, LandEvent args)
{
Roll(uid, component);

View file

@ -18,7 +18,9 @@ using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Extinguisher
{
[RegisterComponent]
public class FireExtinguisherComponent : SharedFireExtinguisherComponent, IAfterInteract, IUse, IActivate, IDropped
[ComponentReference(typeof(IActivate))]
[ComponentReference(typeof(SharedFireExtinguisherComponent))]
public class FireExtinguisherComponent : SharedFireExtinguisherComponent, IAfterInteract, IActivate, IDropped
{
[Dependency] private readonly IEntityManager _entMan = default!;
@ -81,11 +83,6 @@ namespace Content.Server.Extinguisher
return true;
}
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
{
ToggleSafety(eventArgs.User);
return true;
}
void IActivate.Activate(ActivateEventArgs eventArgs)
{

View file

@ -27,7 +27,7 @@ namespace Content.Server.Labels
base.Initialize();
SubscribeLocalEvent<HandLabelerComponent, AfterInteractEvent>(AfterInteractOn);
SubscribeLocalEvent<HandLabelerComponent, UseInHandEvent>(OnUseInHand);
SubscribeLocalEvent<HandLabelerComponent, ActivateInWorldEvent>(OnActivate);
// Bound UI subscriptions
SubscribeLocalEvent<HandLabelerComponent, HandLabelerLabelChangedMessage>(OnHandLabelerLabelChanged);
}
@ -70,7 +70,7 @@ namespace Content.Server.Labels
result = Loc.GetString("hand-labeler-successfully-applied");
}
private void OnUseInHand(EntityUid uid, HandLabelerComponent handLabeler, UseInHandEvent args)
private void OnActivate(EntityUid uid, HandLabelerComponent handLabeler, ActivateInWorldEvent args)
{
if (!EntityManager.TryGetComponent(args.User, out ActorComponent? actor))
return;

View file

@ -45,7 +45,7 @@ namespace Content.Server.Light.EntitySystems
SubscribeLocalEvent<HandheldLightComponent, ExaminedEvent>(OnExamine);
SubscribeLocalEvent<HandheldLightComponent, GetActivationVerbsEvent>(AddToggleLightVerb);
SubscribeLocalEvent<HandheldLightComponent, InteractUsingEvent>(OnInteractUsing);
SubscribeLocalEvent<HandheldLightComponent, UseInHandEvent>(OnUse);
SubscribeLocalEvent<HandheldLightComponent, ActivateInWorldEvent>(OnActivate);
}
private void OnGetState(EntityUid uid, HandheldLightComponent component, ref ComponentGetState args)
@ -93,7 +93,7 @@ namespace Content.Server.Light.EntitySystems
args.Handled = true;
}
private void OnUse(EntityUid uid, HandheldLightComponent component, UseInHandEvent args)
private void OnActivate(EntityUid uid, HandheldLightComponent component, ActivateInWorldEvent args)
{
if (args.Handled) return;

View file

@ -24,7 +24,6 @@ namespace Content.Server.PDA
base.Initialize();
SubscribeLocalEvent<PDAComponent, ActivateInWorldEvent>(OnActivateInWorld);
SubscribeLocalEvent<PDAComponent, UseInHandEvent>(OnUse);
SubscribeLocalEvent<PDAComponent, LightToggleEvent>(OnLightToggle);
}
@ -37,15 +36,6 @@ namespace Content.Server.PDA
ui.OnReceiveMessage += (msg) => OnUIMessage(pda, msg);
}
private void OnUse(EntityUid uid, PDAComponent pda, UseInHandEvent args)
{
if (args.Handled)
return;
args.Handled = OpenUI(pda, args.User);
}
private void OnActivateInWorld(EntityUid uid, PDAComponent pda, ActivateInWorldEvent args)
{
if (args.Handled)

View file

@ -16,7 +16,9 @@ namespace Content.Server.Paper
{
[RegisterComponent]
#pragma warning disable 618
public class PaperComponent : SharedPaperComponent, IExamine, IInteractUsing, IUse
[ComponentReference(typeof(SharedPaperComponent))]
[ComponentReference(typeof(IActivate))]
public sealed class PaperComponent : SharedPaperComponent, IExamine, IInteractUsing, IActivate
#pragma warning restore 618
{
[Dependency] private readonly IEntityManager _entMan = default!;
@ -74,15 +76,15 @@ namespace Content.Server.Paper
);
}
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
void IActivate.Activate(ActivateEventArgs eventArgs)
{
if (!_entMan.TryGetComponent(eventArgs.User, out ActorComponent? actor))
return false;
return;
_mode = PaperAction.Read;
UpdateUserInterface();
UserInterface?.Toggle(actor.PlayerSession);
return true;
return;
}
private void OnUiReceiveMessage(ServerBoundUserInterfaceMessage obj)

View file

@ -16,10 +16,10 @@ namespace Content.Server.Pinpointer
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<PinpointerComponent, UseInHandEvent>(OnUseInHand);
SubscribeLocalEvent<PinpointerComponent, ActivateInWorldEvent>(OnActivate);
}
private void OnUseInHand(EntityUid uid, PinpointerComponent component, UseInHandEvent args)
private void OnActivate(EntityUid uid, PinpointerComponent component, ActivateInWorldEvent args)
{
TogglePinpointer(uid, component);

View file

@ -178,9 +178,9 @@ namespace Content.Server.Pointing.EntitySystems
var tileDef = _tileDefinitionManager[tileRef?.Tile.TypeId ?? 0];
selfMessage = Loc.GetString("pointing-system-point-at-tile", ("tileName", tileDef.DisplayName));
selfMessage = Loc.GetString("pointing-system-point-at-tile", ("tileName", tileDef.Name));
viewerMessage = Loc.GetString("pointing-system-other-point-at-tile", ("otherName", playerName), ("tileName", tileDef.DisplayName));
viewerMessage = Loc.GetString("pointing-system-other-point-at-tile", ("otherName", playerName), ("tileName", tileDef.Name));
}
_pointers[session] = _gameTiming.CurTime;

View file

@ -17,8 +17,9 @@ namespace Content.Server.Radio.Components
[RegisterComponent]
[ComponentReference(typeof(IRadio))]
[ComponentReference(typeof(IListen))]
[ComponentReference(typeof(IActivate))]
#pragma warning disable 618
public class HandheldRadioComponent : Component, IUse, IListen, IRadio, IActivate, IExamine
public class HandheldRadioComponent : Component, IListen, IRadio, IActivate, IExamine
#pragma warning restore 618
{
[Dependency] private readonly IChatManager _chatManager = default!;
@ -74,11 +75,6 @@ namespace Content.Server.Radio.Components
return true;
}
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
{
return Use(eventArgs.User);
}
public bool CanListen(string message, EntityUid source)
{
return RadioOn &&

View file

@ -41,7 +41,8 @@ namespace Content.Server.Storage.Components
[RegisterComponent]
[ComponentReference(typeof(IActivate))]
[ComponentReference(typeof(IStorageComponent))]
public class ServerStorageComponent : SharedStorageComponent, IInteractUsing, IUse, IActivate, IStorageComponent, IDestroyAct, IExAct, IAfterInteract
[ComponentReference(typeof(SharedStorageComponent))]
public class ServerStorageComponent : SharedStorageComponent, IInteractUsing, IActivate, IStorageComponent, IDestroyAct, IExAct, IAfterInteract
{
[Dependency] private readonly IEntityManager _entityManager = default!;
@ -539,18 +540,10 @@ namespace Content.Server.Storage.Components
/// </summary>
/// <param name="eventArgs"></param>
/// <returns></returns>
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
void IActivate.Activate(ActivateEventArgs eventArgs)
{
EnsureInitialCalculated();
OpenStorageUI(eventArgs.User);
return false;
}
void IActivate.Activate(ActivateEventArgs eventArgs)
{
#pragma warning disable 618
((IUse) this).UseEntity(new UseEntityEventArgs(eventArgs.User));
#pragma warning restore 618
}
/// <summary>

View file

@ -82,7 +82,7 @@ namespace Content.Server.Tiles
var tile = mapGrid.GetTileRef(location);
var baseTurf = (ContentTileDefinition) _tileDefinitionManager[tile.Tile.TypeId];
if (HasBaseTurf(currentTileDefinition, baseTurf.Name))
if (HasBaseTurf(currentTileDefinition, baseTurf.ID))
{
if (!EntitySystem.Get<StackSystem>().Use(Owner, 1, stack))
continue;

View file

@ -20,7 +20,6 @@ namespace Content.Server.Tools
private void InitializeMultipleTools()
{
SubscribeLocalEvent<MultipleToolComponent, ComponentStartup>(OnMultipleToolStartup);
SubscribeLocalEvent<MultipleToolComponent, UseInHandEvent>(OnMultipleToolUsedInHand);
SubscribeLocalEvent<MultipleToolComponent, ActivateInWorldEvent>(OnMultipleToolActivated);
SubscribeLocalEvent<MultipleToolComponent, ComponentGetState>(OnMultipleToolGetState);
}
@ -32,14 +31,6 @@ namespace Content.Server.Tools
SetMultipleTool(uid, multiple, tool);
}
private void OnMultipleToolUsedInHand(EntityUid uid, MultipleToolComponent multiple, UseInHandEvent args)
{
if (args.Handled)
return;
args.Handled = CycleMultipleTool(uid, multiple);
}
private void OnMultipleToolActivated(EntityUid uid, MultipleToolComponent multiple, ActivateInWorldEvent args)
{
if (args.Handled)

View file

@ -35,7 +35,6 @@ namespace Content.Server.Tools
SubscribeLocalEvent<WelderComponent, IsHotEvent>(OnWelderIsHotEvent);
SubscribeLocalEvent<WelderComponent, ExaminedEvent>(OnWelderExamine);
SubscribeLocalEvent<WelderComponent, SolutionChangedEvent>(OnWelderSolutionChange);
SubscribeLocalEvent<WelderComponent, UseInHandEvent>(OnWelderUseInHand);
SubscribeLocalEvent<WelderComponent, ActivateInWorldEvent>(OnWelderActivate);
SubscribeLocalEvent<WelderComponent, AfterInteractEvent>(OnWelderAfterInteract);
SubscribeLocalEvent<WelderComponent, ToolUseAttemptEvent>(OnWelderToolUseAttempt);
@ -238,11 +237,6 @@ namespace Content.Server.Tools
args.Handled = true;
}
private void OnWelderUseInHand(EntityUid uid, WelderComponent welder, UseInHandEvent args)
{
args.Handled = TryToggleWelder(uid, args.User, welder);
}
private void OnWelderToolUseAttempt(EntityUid uid, WelderComponent welder, ToolUseAttemptEvent args)
{
if (args.Cancelled)

View file

@ -35,7 +35,7 @@ namespace Content.Server.Traitor.Uplink
SubscribeLocalEvent<UplinkComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<UplinkComponent, ComponentRemove>(OnRemove);
SubscribeLocalEvent<UplinkComponent, UseInHandEvent>(OnUseHand);
SubscribeLocalEvent<UplinkComponent, ActivateInWorldEvent>(OnActivate);
// UI events
SubscribeLocalEvent<UplinkComponent, UplinkBuyListingMessage>(OnBuy);
@ -75,7 +75,7 @@ namespace Content.Server.Traitor.Uplink
RaiseLocalEvent(uid, new UplinkRemovedEvent());
}
private void OnUseHand(EntityUid uid, UplinkComponent component, UseInHandEvent args)
private void OnActivate(EntityUid uid, UplinkComponent component, ActivateInWorldEvent args)
{
if (args.Handled)
return;

View file

@ -0,0 +1,105 @@
using Content.Server.Administration;
using Content.Server.Database;
using Content.Shared.Administration;
using Content.Shared.CCVar;
using Robust.Server.Player;
using Robust.Shared.Configuration;
using Robust.Shared.Console;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Network;
using Robust.Shared.Player;
namespace Content.Server.Whitelist;
[AdminCommand(AdminFlags.Ban)]
public class AddWhitelistCommand : IConsoleCommand
{
public string Command => "whitelistadd";
public string Description => Loc.GetString("command-whitelistadd-description");
public string Help => Loc.GetString("command-whitelistadd-help");
public async void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 1)
return;
var db = IoCManager.Resolve<IServerDbManager>();
var loc = IoCManager.Resolve<IPlayerLocator>();
var name = args[0];
var data = await loc.LookupIdByNameAsync(name);
if (data != null)
{
var guid = data.UserId;
var isWhitelisted = await db.GetWhitelistStatusAsync(guid);
if (isWhitelisted)
return;
await db.AddToWhitelistAsync(guid);
}
}
}
[AdminCommand(AdminFlags.Ban)]
public class RemoveWhitelistCommand : IConsoleCommand
{
public string Command => "whitelistremove";
public string Description => Loc.GetString("command-whitelistremove-description");
public string Help => Loc.GetString("command-whitelistremove-help");
public async void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 1)
return;
var db = IoCManager.Resolve<IServerDbManager>();
var loc = IoCManager.Resolve<IPlayerLocator>();
var name = args[0];
var data = await loc.LookupIdByNameAsync(name);
if (data != null)
{
var guid = data.UserId;
var isWhitelisted = await db.GetWhitelistStatusAsync(guid);
if (!isWhitelisted)
return;
await db.RemoveFromWhitelistAsync(guid);
}
}
}
[AdminCommand(AdminFlags.Ban)]
public class KickNonWhitelistedCommand : IConsoleCommand
{
public string Command => "kicknonwhitelisted";
public string Description => Loc.GetString("command-kicknonwhitelisted-description");
public string Help => Loc.GetString("command-kicknonwhitelisted-help");
public async void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 0)
return;
var cfg = IoCManager.Resolve<IConfigurationManager>();
if (!cfg.GetCVar(CCVars.WhitelistEnabled))
return;
var player = IoCManager.Resolve<IPlayerManager>();
var db = IoCManager.Resolve<IServerDbManager>();
var net = IoCManager.Resolve<IServerNetManager>();
foreach (var session in player.NetworkedSessions)
{
if (await db.GetAdminDataForAsync(session.UserId) is not null)
continue;
if (!await db.GetWhitelistStatusAsync(session.UserId))
{
net.DisconnectChannel(session.ConnectedClient, Loc.GetString("whitelist-not-whitelisted"));
}
}
}
}

View file

@ -490,6 +490,16 @@ namespace Content.Shared.CCVar
*/
public static readonly CVarDef<int> EntityMenuGroupingType = CVarDef.Create("entity_menu", 0, CVar.CLIENTONLY);
/*
* Whitelist
*/
/// <summary>
/// Controls whether the server will deny any players that are not whitelisted in the DB.
/// </summary>
public static readonly CVarDef<bool> WhitelistEnabled =
CVarDef.Create("whitelist.enabled", false, CVar.SERVERONLY);
/*
* VOTE
*/

View file

@ -34,7 +34,7 @@ namespace Content.Shared.Construction.Conditions
var tile = tileFound.Value.Tile.GetContentTileDefinition();
foreach (var targetTile in TargetTiles)
{
if (tile.Name == targetTile) {
if (tile.ID == targetTile) {
return true;
}
}

View file

@ -76,7 +76,7 @@ namespace Content.Shared.Entry
var prototypeList = new List<ContentTileDefinition>();
foreach (var tileDef in _prototypeManager.EnumeratePrototypes<ContentTileDefinition>())
{
if (tileDef.Name == "space")
if (tileDef.ID == "space")
{
continue;
}
@ -86,7 +86,7 @@ namespace Content.Shared.Entry
// Sort ordinal to ensure it's consistent client and server.
// So that tile IDs match up.
prototypeList.Sort((a, b) => string.Compare(a.Name, b.Name, StringComparison.Ordinal));
prototypeList.Sort((a, b) => string.Compare(a.ID, b.ID, StringComparison.Ordinal));
foreach (var tileDef in prototypeList)
{

View file

@ -710,8 +710,11 @@ namespace Content.Shared.Hands.Components
if (!TryGetActiveHeldEntity(out var heldEntity))
return;
EntitySystem.Get<SharedInteractionSystem>()
.TryUseInteraction(Owner, heldEntity.Value, altInteract);
var sys = EntitySystem.Get<SharedInteractionSystem>();
if (altInteract)
sys.AltInteract(Owner, heldEntity.Value);
else
sys.TryUseInteraction(Owner, heldEntity.Value);
}
public void ActivateHeldEntity(string handName)

View file

@ -642,32 +642,29 @@ namespace Content.Shared.Interaction
#region Hands
#region Use
/// <summary>
/// Activates the IUse behaviors of an entity
/// Verifies that the user is capable of doing the use interaction first
/// Attempt to perform a use-interaction on an entity. If no interaction occurs, it will instead attempt to
/// activate the entity.
/// </summary>
/// <param name="user"></param>
/// <param name="used"></param>
public void TryUseInteraction(EntityUid user, EntityUid used, bool altInteract = false)
public void TryUseInteraction(EntityUid user, EntityUid used)
{
if (_actionBlockerSystem.CanUse(user))
{
if (altInteract)
AltInteract(user, used);
else
UseInteraction(user, used);
}
if (_actionBlockerSystem.CanUse(user) && UseInteraction(user, used))
return;
// no use-interaction occurred. Attempt to activate the item instead.
InteractionActivate(user, used);
}
/// <summary>
/// Activates the IUse behaviors of an entity without first checking
/// if the user is capable of doing the use interaction.
/// </summary>
public void UseInteraction(EntityUid user, EntityUid used)
/// <returns>True if the interaction was handled. False otherwise</returns>
public bool UseInteraction(EntityUid user, EntityUid used)
{
if (TryComp(used, out UseDelayComponent? delayComponent))
{
if (delayComponent.ActiveDelay)
return;
return true; // if the item is on cooldown, we consider this handled.
delayComponent.BeginDelay();
}
@ -675,7 +672,7 @@ namespace Content.Shared.Interaction
var useMsg = new UseInHandEvent(user, used);
RaiseLocalEvent(used, useMsg);
if (useMsg.Handled)
return;
return true;
var uses = AllComps<IUse>(used).ToList();
@ -684,8 +681,10 @@ namespace Content.Shared.Interaction
{
// If a Use returns a status completion we finish our interaction
if (use.UseEntity(new UseEntityEventArgs(user)))
return;
return true;
}
return false;
}
/// <summary>
@ -694,12 +693,17 @@ namespace Content.Shared.Interaction
/// <remarks>
/// Uses the context menu verb list, and acts out the highest priority alternative interaction verb.
/// </remarks>
public void AltInteract(EntityUid user, EntityUid target)
/// <returns>True if the interaction was handled, false otherwise.</returns>
public bool AltInteract(EntityUid user, EntityUid target)
{
// Get list of alt-interact verbs
var verbs = _verbSystem.GetLocalVerbs(target, user, VerbType.Alternative)[VerbType.Alternative];
if (verbs.Any())
_verbSystem.ExecuteVerb(verbs.First(), user, target);
if (!verbs.Any())
return false;
_verbSystem.ExecuteVerb(verbs.First(), user, target);
return true;
}
#endregion

View file

@ -4,7 +4,6 @@ using Robust.Shared.Map;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.ViewVariables;
using System.Collections.Generic;
using Content.Shared.Atmos;
@ -14,9 +13,6 @@ namespace Content.Shared.Maps
[Prototype("tile")]
public sealed class ContentTileDefinition : IPrototype, IInheritingPrototype, ITileDefinition
{
[ViewVariables]
string IPrototype.ID => Name;
[DataField("parent", customTypeSerializer:typeof(PrototypeIdSerializer<ContentTileDefinition>))]
public string? Parent { get; private set; }
@ -26,11 +22,11 @@ namespace Content.Shared.Maps
public string Path => "/Textures/Tiles/";
[DataField("name", required: true)] public string Name { get; } = string.Empty;
[DataField("id", required: true)] public string ID { get; } = string.Empty;
public ushort TileId { get; private set; }
[DataField("display_name")] public string DisplayName { get; } = string.Empty;
[DataField("name")] public string Name { get; } = string.Empty;
[DataField("texture")] public string SpriteName { get; } = string.Empty;

View file

@ -16,15 +16,9 @@ public abstract class SharedTrayScannerSystem : EntitySystem
SubscribeLocalEvent<TrayScannerComponent, ComponentGetState>(OnTrayScannerGetState);
SubscribeLocalEvent<TrayScannerComponent, ComponentHandleState>(OnTrayScannerHandleState);
SubscribeLocalEvent<TrayScannerComponent, UseInHandEvent>(OnTrayScannerUsed);
SubscribeLocalEvent<TrayScannerComponent, ActivateInWorldEvent>(OnTrayScannerActivate);
}
private void OnTrayScannerUsed(EntityUid uid, TrayScannerComponent scanner, UseInHandEvent args)
{
ActivateTray(uid, scanner);
}
private void OnTrayScannerActivate(EntityUid uid, TrayScannerComponent scanner, ActivateInWorldEvent args)
{
ActivateTray(uid, scanner);

Binary file not shown.

View file

@ -1,26 +1,4 @@
Entries:
- author: Swept
changes:
- {message: You can equip the scythe on your back now, type: Tweak}
- {message: Updated spade/scythe/hoe sprites, type: Tweak}
- {message: Plant clippers for hydroponics, type: Add}
id: 320
time: '2021-08-18T02:42:35.0000000+00:00'
- author: SweptWasTaken
changes:
- {message: 'Can equip bat, fireaxe, spear and claymore on your back now', type: Tweak}
id: 321
time: '2021-08-18T02:42:50.0000000+00:00'
- author: SweptWasTaken
changes:
- {message: Adds seclite and duck related content, type: Add}
id: 322
time: '2021-08-19T23:23:49.0000000+00:00'
- author: Swept
changes:
- {message: Missing vending machine descriptions found, type: Fix}
id: 323
time: '2021-08-20T05:23:02.0000000+00:00'
- author: Swept
changes:
- {message: Adds a ton of inhands for various items, type: Add}
@ -2907,3 +2885,29 @@ Entries:
than others., type: Tweak}
id: 821
time: '2022-01-04T12:05:06.0000000+00:00'
- author: router
changes:
- {message: Added paying respects, type: Add}
id: 822
time: '2022-01-04T13:05:21.0000000+00:00'
- author: Schiene
changes:
- {message: 'Added a spawnable Boarding Shuttle map called Dart, comes with a small
force equipped for Vacuum with heavy weaponry.', type: Add}
id: 823
time: '2022-01-04T13:23:13.0000000+00:00'
- author: Schiene
changes:
- {message: 'Added Shuttle SS Reach, atmospherics not included yet.', type: Add}
id: 824
time: '2022-01-04T13:36:37.0000000+00:00'
- author: MeltedPixel
changes:
- {message: Added Hydroponics plant - Chilis!, type: Add}
- {message: Added Hot Chili Soup Recipe + Meal, type: Add}
- {message: Added Clown Chili Soup Recipe + Meal, type: Add}
- {message: Added Enchiladas Recipe + Meal, type: Add}
- {message: Added Queso Recipe + Meal, type: Add}
- {message: Added new reagent Capsaicin Oil from Chilis, type: Add}
id: 825
time: '2022-01-04T13:51:23.0000000+00:00'

View file

@ -17,3 +17,4 @@ chatsan-surprised = looks surpised
chatsan-confused = looks confused
chatsan-unimpressed = seems unimpressed
chatsan-waves = waves
chatsan-salutes = salutes

View file

@ -0,0 +1,4 @@
### Messages that pop up when metabolizing Capsaicin Oil.
capsaicin-effect-light-burn = You feel a slight tingle in your throat...
capsaicin-effect-heavy-burn = You feel like hell threw up in your mouth!

View file

@ -0,0 +1,10 @@
whitelist-not-whitelisted = You are not whitelisted.
command-whitelistadd-description = Adds the player with the given username to the server whitelist.
command-whitelistadd-help = whitelistadd <username>
command-whitelistremove-description = Removes the player with the given username from the server whitelist.
command-whitelistremove-help = whitelistremove <username>
command-kicknonwhitelisted-description = Kicks all non-whitelisted players from the server.
command-kicknonwhitelisted-help = kicknonwhitelisted

5911
Resources/Maps/dart.yml Normal file

File diff suppressed because it is too large Load diff

21518
Resources/Maps/ssreach.yml Normal file

File diff suppressed because it is too large Load diff

View file

@ -54,12 +54,12 @@
id: CrateHydroponicsSeeds
name: seeds crate
parent: CrateHydroponics
description: "Big things have small beginnings. Contains nine different seeds."
description: "Big things have small beginnings. Contains ten different seeds."
components:
- type: StorageFill
contents:
# - id: ChiliSeeds
# amount: 1
- id: ChiliSeeds
amount: 1
# - id: CottonSeeds
# amount: 1
# - id: BerrySeeds

View file

@ -35,7 +35,7 @@
amount: 2
- id: ClothingOuterSuitFire
amount: 2
- id: RedOxygenTank
- id: RedOxygenTankFilled
amount: 2
- type: entity

View file

@ -3,6 +3,7 @@
inventory:
- Aluminium
- Carbon
- CapsaicinOil
- Chlorine
- Copper
- Ethanol

View file

@ -8,6 +8,7 @@
BananaSeeds: 10
CarrotSeeds: 10
ChanterelleSeeds: 10
ChiliSeeds: 10
CornSeeds: 10
EggplantSeeds: 10
LemonSeeds: 10

View file

@ -32,7 +32,7 @@
- PosterContrabandFreeTonto
- PosterContrabandAtmosiaDeclarationIndependence
- PosterContrabandFunPolice
- PosterContrabandLustyXenomorph
- PosterContrabandLustyExomorph
- PosterContrabandSyndicateRecruitment
- PosterContrabandClown
- PosterContrabandSmoke
@ -63,7 +63,7 @@
- PosterContrabandPunchShit
- PosterContrabandTheGriffin
- PosterContrabandFreeDrone
- PosterContrabandBustyBackdoorXenoBabes6
- PosterContrabandBustyBackdoorExoBabes6
- PosterContrabandRobustSoftdrinks
- PosterContrabandShamblersJuice
- PosterContrabandPwrGame

View file

@ -240,3 +240,23 @@
- type: Sprite
state: saltysweet
# Tastes awesome.
- type: entity
name: queso
parent: FoodMealBase
id: FoodMealQueso
description: A classic dipping sauce that you can't go wrong with.
components:
- type: Sprite
state: queso
# Its queso! Everyone loves queso... Right?.
- type: entity
name: enchiladas
parent: FoodMealBase
id: FoodMealEnchiladas
description: Viva La Mexico!
components:
- type: Sprite
state: enchiladas
# What do Europeans eat instead of enchiladas? 25.4 millimeter-iladas.

View file

@ -26,6 +26,7 @@
state: produce
- type: Produce
- type: Extractable
grindableSolutionName: food
# Subclasses
@ -547,3 +548,22 @@
components:
- type: Sprite
sprite: Objects/Specific/Hydroponics/onion_red.rsi
- type: entity
name: chili
parent: FoodProduceBase
id: FoodChili
description: Spicy, best not touch your eyes.
components:
- type: SolutionContainerManager
solutions:
food:
reagents:
- ReagentId: Nutriment
Quantity: 5
- ReagentId: CapsaicinOil
Quantity: 1
- type: Sprite
sprite: Objects/Specific/Hydroponics/chili.rsi
- type: Produce
seed: chili

View file

@ -334,7 +334,7 @@
# Tastes like chaos.
- type: entity
name: hot chili
name: bowl of hot chili
parent: FoodBowlBase
id: FoodSoupChiliHot
description: A Texan five-alarm chili!
@ -343,6 +343,14 @@
layers:
- state: bowl
- state: chili-hot
- type: SolutionContainerManager
solutions:
food:
reagents:
- ReagentId: Nutriment
Quantity: 30
- ReagentId: CapsaicinOil
Quantity: 5
# Tastes like hot peppers.
- type: entity
@ -367,6 +375,14 @@
layers:
- state: bowl
- state: chili-clown
- type: SolutionContainerManager
solutions:
food:
reagents:
- ReagentId: Nutriment
Quantity: 30
- ReagentId: CapsaicinOil
Quantity: 5
# Tastes like tomato, hot peppers, clown feet, kind of funny, someone's parents.
- type: entity

View file

@ -192,3 +192,14 @@
seed: nettle
- type: Sprite
sprite: Objects/Specific/Hydroponics/nettle.rsi
- type: entity
parent: SeedBase
name: packet of chili seeds
description: "Spicy."
id: ChiliSeeds
components:
- type: Seed
seed: chili
- type: Sprite
sprite: Objects/Specific/Hydroponics/chili.rsi

View file

@ -7,7 +7,7 @@
- type: Transform
noRot: true
- type: Item
size: 5
size: 25
- type: Sprite
sprite: Structures/Furniture/rollerbeds.rsi
netsync: false

View file

@ -76,8 +76,8 @@
- type: entity
parent: PosterBase
id: PosterContrabandLustyXenomorph
name: "Lusty Xenomorph"
id: PosterContrabandLustyExomorph
name: "Lusty Exomorph"
description: "A heretical poster depicting the titular star of an equally heretical book."
components:
- type: Sprite
@ -355,9 +355,9 @@
- type: entity
parent: PosterBase
id: PosterContrabandBustyBackdoorXenoBabes6
name: "Busty Backdoor Xeno Babes 6"
description: "Get a load, or give, of these all natural Xenos!"
id: PosterContrabandBustyBackdoorExoBabes6
name: "Busty Backdoor Exo Babes 6"
description: "Get a load, or give, of these all natural Exos!"
components:
- type: Sprite
state: poster36_contraband

View file

@ -424,7 +424,7 @@
Min: 1
Max: 10
PotencyDivisor: 10
- type: seed
id: nettle
name: nettle
@ -447,3 +447,25 @@
Min: 1
Max: 25
PotencyDivisor: 4
- type: seed
id: chili
name: chili
seedName: chili
displayName: chilis
plantRsi: Objects/Specific/Hydroponics/chili.rsi
productPrototypes:
- FoodChili
harvestRepeat: Repeat
lifespan: 25
maturation: 6
production: 6
yield: 3
potency: 20
idealLight: 9
idealHeat: 298
chemicals:
CapsaicinOil:
Min: 1
Max: 10
PotencyDivisor: 10

View file

@ -90,3 +90,47 @@
MedicalDoctor: [ 1, 1 ]
ResearchDirector: [ 1, 1 ]
Botanist: [ 1, 1 ]
- type: gameMap
id: ssreach
mapName: 'Reach'
mapNameTemplate: '{0} Reach {1}'
nameGenerator:
!type:NanotrasenNameGenerator
prefixCreator: '14'
mapPath: Maps/ssreach.yml
minPlayers: 0
maxPlayers: 15
overflowJobs: []
availableJobs:
CargoTechnician: [ 1, 1 ]
Bartender: [ 1, 1 ]
Botanist: [ 1, 1 ]
Chef: [ 1, 1 ]
Captain: [ 1, 1 ]
ChiefEngineer: [ 1, 1 ]
StationEngineer: [ 1, 2 ]
ChiefMedicalOfficer: [ 1, 1 ]
MedicalDoctor: [ 1, 1 ]
Chemist: [ 1, 1 ]
HeadOfSecurity: [ 1, 1 ]
SecurityOfficer: [ 1, 2 ]
Janitor: [ 1, 1 ]
- type: gameMap
id: dart
mapName: 'Dart'
mapNameTemplate: '{0} Dart {1}'
nameGenerator:
!type:NanotrasenNameGenerator
prefixCreator: '14'
mapPath: Maps/dart.yml
minPlayers: 0
votable: false
overflowJobs: []
availableJobs:
Captain: [ 1, 1 ]
ChiefEngineer: [ 1, 1 ]
ChiefMedicalOfficer: [ 1, 1 ]
HeadOfSecurity: [ 1, 1 ]
SecurityOfficer: [ 2, 4 ]

View file

@ -111,3 +111,30 @@
meltingPoint: -16.0
tileReactions:
- !type:FlammableTileReaction {}
- type: reagent
id: CapsaicinOil
name: Capsaicin Oil
desc: Capsaicin Oil is the ingredient found in different types of hot peppers.
physicalDesc: oily
color: "#FF0000"
meltingPoint: 146
boilingPoint: 410 # Really high boiling point compared to its melting
metabolisms:
Poison:
effects:
- !type:HealthChange
damage:
groups:
Caustic: 0.5
- !type:HealthChange
conditions:
- !type:ReagentThreshold
min: 5
damage:
groups:
Caustic: 1
- !type:PopupMessage
type: Local
messages: [ "capsaicin-effect-light-burn" ]
probability: 0.2

View file

@ -433,6 +433,51 @@
solids:
FoodDonkpocketGondola: 1
- type: microwaveMealRecipe
id: RecipeHotChili
name: hot chili recipe
result: FoodSoupChiliHot
time: 20
solids:
FoodChili: 1
FoodMeatCutlet: 1
FoodOnionSlice: 1
FoodTomato: 1
- type: microwaveMealRecipe
id: RecipeChiliClown
name: chili con carnival recipe
result: FoodSoupChiliClown
time: 30
solids:
FoodChili: 1
FoodMeatCutlet: 1
FoodOnionSlice: 1
FoodTomato: 1
ClothingShoesClown: 1
- type: microwaveMealRecipe
id: RecipeQueso
name: queso recipe
result: FoodMealQueso
time: 15
#todo Add blackpepper
#reagents:
#blackpepper: 5
solids:
FoodChili: 1
FoodCheeseSlice: 2
- type: microwaveMealRecipe
id: RecipeEnchiladas
name: enchiladas recipe
result: FoodMealEnchiladas
time: 20
solids:
FoodChili: 2
FoodMeatCutlet: 1
FoodCorn: 1
# NOT ACTUAL FOOD
- type: microwaveMealRecipe

View file

@ -1,6 +1,6 @@
- type: tile
name: floor_steel
display_name: steel floor
id: floor_steel
name: steel floor
texture: "steel"
base_turfs:
- plating
@ -14,8 +14,8 @@
heatCapacity: 10000
- type: tile
name: floor_wood
display_name: wood
id: floor_wood
name: wood
texture: "wood"
base_turfs:
- space
@ -30,8 +30,8 @@
heatCapacity: 10000
- type: tile
name: floor_white
display_name: white floor
id: floor_white
name: white floor
texture: "white"
base_turfs:
- plating
@ -45,8 +45,8 @@
heatCapacity: 10000
- type: tile
name: floor_dark
display_name: dark floor
id: floor_dark
name: dark floor
texture: "dark"
base_turfs:
- plating
@ -60,8 +60,8 @@
heatCapacity: 10000
- type: tile
name: floor_techmaint
display_name: techmaint floor
id: floor_techmaint
name: techmaint floor
texture: "tech_maint"
base_turfs:
- plating
@ -75,8 +75,8 @@
heatCapacity: 10000
- type: tile
name: floor_reinforced
display_name: reinforced floor
id: floor_reinforced
name: reinforced floor
texture: "reinforced"
base_turfs:
- plating
@ -90,8 +90,8 @@
heatCapacity: 10000
- type: tile
name: floor_mono
display_name: mono floor
id: floor_mono
name: mono floor
texture: "mono"
base_turfs:
- plating
@ -105,8 +105,8 @@
heatCapacity: 10000
- type: tile
name: floor_lino
display_name: linoleum floor
id: floor_lino
name: linoleum floor
texture: "lino"
base_turfs:
- plating
@ -120,8 +120,8 @@
heatCapacity: 10000
- type: tile
name: floor_steel_dirty
display_name: dirty steel floor
id: floor_steel_dirty
name: dirty steel floor
texture: "steel_dirty"
base_turfs:
- plating
@ -135,8 +135,8 @@
heatCapacity: 10000
- type: tile
name: floor_elevator_shaft
display_name: elevator shaft
id: floor_elevator_shaft
name: elevator shaft
texture: "elevator_shaft"
base_turfs:
- plating
@ -150,8 +150,8 @@
heatCapacity: 10000
- type: tile
name: floor_rock_vault
display_name: rock floor
id: floor_rock_vault
name: rock floor
texture: "rock_vault"
base_turfs:
- plating
@ -165,8 +165,8 @@
heatCapacity: 10000
- type: tile
name: floor_blue
display_name: blue tile
id: floor_blue
name: blue tile
texture: blue
base_turfs:
- plating
@ -180,8 +180,8 @@
# Departamental
- type: tile
name: floor_freezer
display_name: freezer
id: floor_freezer
name: freezer
texture: "freezer"
base_turfs:
- plating
@ -195,8 +195,8 @@
heatCapacity: 10000
- type: tile
name: floor_showroom
display_name: showroom floor
id: floor_showroom
name: showroom floor
texture: "showroom"
base_turfs:
- plating
@ -210,8 +210,8 @@
heatCapacity: 10000
- type: tile
name: floor_hydro
display_name: hydro floor
id: floor_hydro
name: hydro floor
texture: "hydro"
base_turfs:
- plating
@ -225,8 +225,8 @@
heatCapacity: 10000
- type: tile
name: floor_bar
display_name: bar floor
id: floor_bar
name: bar floor
texture: "bar"
base_turfs:
- plating
@ -240,8 +240,8 @@
heatCapacity: 10000
- type: tile
name: floor_clown
display_name: clown floor
id: floor_clown
name: clown floor
texture: "clown"
base_turfs:
- plating
@ -255,8 +255,8 @@
heatCapacity: 10000
- type: tile
name: floor_mime
display_name: mime floor
id: floor_mime
name: mime floor
texture: "mime"
base_turfs:
- plating
@ -270,8 +270,8 @@
heatCapacity: 10000
- type: tile
name: floor_kitchen
display_name: kitchen floor
id: floor_kitchen
name: kitchen floor
texture: "kitchen"
base_turfs:
- plating
@ -285,8 +285,8 @@
heatCapacity: 10000
- type: tile
name: floor_laundry
display_name: laundry floor
id: floor_laundry
name: laundry floor
texture: "laundry"
base_turfs:
- plating
@ -301,8 +301,8 @@
# Materials
- type: tile
name: floor_gold
display_name: gold tile
id: floor_gold
name: gold tile
texture: gold
base_turfs:
- plating
@ -316,8 +316,8 @@
heatCapacity: 10000
- type: tile
name: floor_silver
display_name: silver tile
id: floor_silver
name: silver tile
texture: silver
base_turfs:
- plating
@ -331,8 +331,8 @@
heatCapacity: 10000
- type: tile
name: floor_glass
display_name: glass floor
id: floor_glass
name: glass floor
texture: glass
base_turfs:
- plating
@ -346,8 +346,8 @@
heatCapacity: 10000
- type: tile
name: floor_rglass
display_name: reinforced glass floor
id: floor_rglass
name: reinforced glass floor
texture: rglass
base_turfs:
- plating
@ -362,8 +362,8 @@
# Circuits
- type: tile
name: floor_green_circuit
display_name: green circuit floor
id: floor_green_circuit
name: green circuit floor
texture: "green_circuit"
base_turfs:
- plating
@ -377,8 +377,8 @@
heatCapacity: 10000
- type: tile
name: floor_blue_circuit
display_name: blue circuit floor
id: floor_blue_circuit
name: blue circuit floor
texture: "blue_circuit"
base_turfs:
- plating
@ -393,8 +393,8 @@
# Terrain
- type: tile
name: floor_snow
display_name: snow
id: floor_snow
name: snow
texture: snow
base_turfs:
- plating
@ -408,8 +408,8 @@
heatCapacity: 10000
- type: tile
name: floor_grass
display_name: grass floor
id: floor_grass
name: grass floor
texture: "grass"
base_turfs:
- plating
@ -424,8 +424,8 @@
# Asteroid
- type: tile
name: floor_asteroid_sand
display_name: asteroid floor
id: floor_asteroid_sand
name: asteroid floor
texture: Asteroid/asteroid_sand
base_turfs:
- space
@ -438,8 +438,8 @@
heatCapacity: 10000
- type: tile
name: floor_asteroid_tile
display_name: asteroid tile
id: floor_asteroid_tile
name: asteroid tile
texture: Asteroid/asteroid_tile
base_turfs:
- plating
@ -452,8 +452,8 @@
heatCapacity: 10000
- type: tile
name: floor_asteroid_coarse_sand0
display_name: asteroid coarse sand 0
id: floor_asteroid_coarse_sand0
name: asteroid coarse sand 0
texture: Asteroid/asteroid_coarse_sand0
base_turfs:
- space
@ -466,8 +466,8 @@
heatCapacity: 10000
- type: tile
name: floor_asteroid_coarse_sand1
display_name: asteroid coarse sand 1
id: floor_asteroid_coarse_sand1
name: asteroid coarse sand 1
texture: Asteroid/asteroid_coarse_sand1
base_turfs:
- space
@ -480,8 +480,8 @@
heatCapacity: 10000
- type: tile
name: floor_asteroid_coarse_sand2
display_name: asteroid coarse sand 2
id: floor_asteroid_coarse_sand2
name: asteroid coarse sand 2
texture: Asteroid/asteroid_coarse_sand2
base_turfs:
- space
@ -494,8 +494,8 @@
heatCapacity: 10000
- type: tile
name: floor_asteroid_coarse_sand_dug
display_name: asteroid dug coarse sand
id: floor_asteroid_coarse_sand_dug
name: asteroid dug coarse sand
texture: Asteroid/asteroid_coarse_sand_dug
base_turfs:
- space

View file

@ -1,6 +1,6 @@
- type: tile
id: plating
name: plating
display_name: plating
texture: plating
base_turfs:
- lattice
@ -12,8 +12,8 @@
heatCapacity: 10000
- type: tile
id: lattice
name: lattice
display_name: lattice
texture: lattice
base_turfs:
- space
@ -27,8 +27,8 @@
# TODO kill underplating and all its usages since it is deprecated
- type: tile
id: underplating
name: underplating
display_name: underplating
texture: underplating
base_turfs:
- lattice

View file

@ -1,6 +1,6 @@
- type: tile
id: space
name: space
display_name: space
texture: ""
friction: 0
is_subfloor: true

View file

@ -34,12 +34,6 @@
icon: "thecoderbus"
description: "A very controversial bar known for its wide variety of constantly-changing drinks."
- type: barSign
id: TheWretchedHive
name: "The Wretched Hive"
icon: "thewretchedhive"
description: "Legally obligated to instruct you to check your drinks for acid before consumption."
- type: barSign
id: RobustaCafe
name: "The Robusta Cafe"

View file

@ -111,6 +111,9 @@
{
"name": "poutine"
},
{
"name": "queso"
},
{
"name": "sashimi"
},

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

View file

@ -0,0 +1,41 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from https://github.com/vgstation-coders/vgstation13",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "dead"
},
{
"name": "harvest"
},
{
"name": "produce"
},
{
"name": "seed"
},
{
"name": "stage-1"
},
{
"name": "stage-2"
},
{
"name": "stage-3"
},
{
"name": "stage-4"
},
{
"name": "stage-5"
},
{
"name": "stage-6"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -4,7 +4,7 @@
"x": 64,
"y": 32
},
"license": "CC-BY-SA 3",
"license": "CC-BY-SA-3.0",
"copyright": "https://github.com/vgstation-coders/vgstation13/commit/1fbb5e417d0200fe60c6b628656a371093d2d715",
"copyright": "https://github.com/tgstation/tgstation/commit/68aade356cf53032f206cb5a887581ac7d166cae",
"states": [
@ -460,29 +460,6 @@
]
]
},
{
"name": "thewretchedhive",
"delays": [
[
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.1,
0.1,
0.1,
0.4
]
]
},
{
"name": "enginechange",
"delays": [

Binary file not shown.

Before

Width:  |  Height:  |  Size: 692 B

@ -1 +1 @@
Subproject commit f49a29cfb3db2cb8474b514507f7cc6b1fc66370
Subproject commit 6cbb2135b8522b17637116518e2aeacae6b7d762