Add Content.Shared.Database (#5588)

This commit is contained in:
Pieter-Jan Briers
2021-11-28 14:56:53 +01:00
committed by GitHub
parent f3ae907e7c
commit 64861ff034
71 changed files with 87 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Robust.Client.UserInterface.Controls;
namespace Content.Client.Administration.UI.CustomControls;

View File

@@ -1,4 +1,5 @@
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Robust.Client.UserInterface.Controls;
namespace Content.Client.Administration.UI.CustomControls;

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using Content.Client.Administration.UI.CustomControls;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;

View File

@@ -7,6 +7,7 @@ using Content.Server.Database;
using Content.Server.GameTicking;
using Content.Shared.Administration.Logs;
using Content.Shared.CCVar;
using Content.Shared.Database;
using NUnit.Framework;
using Robust.Server.Player;
using Robust.Shared.GameObjects;

View File

@@ -4,6 +4,7 @@ using Content.Server.Administration.Logs;
using Content.Server.GameTicking;
using Content.Shared.Administration.Logs;
using Content.Shared.CCVar;
using Content.Shared.Database;
using NUnit.Framework;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;

View File

@@ -6,6 +6,7 @@ using Content.Server.Administration.Logs;
using Content.Server.GameTicking;
using Content.Shared.Administration.Logs;
using Content.Shared.CCVar;
using Content.Shared.Database;
using NUnit.Framework;
using Robust.Server.Player;
using Robust.Shared.GameObjects;

View File

@@ -22,7 +22,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Content.Shared\Content.Shared.csproj" />
<ProjectReference Include="..\Content.Shared.Database\Content.Shared.Database.csproj" />
</ItemGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.Analyzers.targets" />

View File

@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Net;
using System.Text.Json;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Microsoft.EntityFrameworkCore;
namespace Content.Server.Database

View File

@@ -25,6 +25,7 @@ using System.Linq;
using Content.Server.Administration.Logs;
using Content.Server.Popups;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Content.Shared.Popups;
namespace Content.Server.Actions.Actions

View File

@@ -17,6 +17,7 @@ using Content.Server.Players;
using Content.Shared.Administration;
using Content.Shared.Administration.Logs;
using Content.Shared.Body.Components;
using Content.Shared.Database;
using Content.Shared.GameTicking;
using Content.Shared.Interaction.Helpers;
using Content.Shared.Popups;

View File

@@ -2,6 +2,7 @@
using Content.Server.Administration.Logs;
using Content.Shared.Administration;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Robust.Shared.Console;
using Robust.Shared.GameObjects;
using Robust.Shared.Timing;

View File

@@ -8,6 +8,7 @@ using Content.Server.GameTicking;
using Content.Server.GameTicking.Events;
using Content.Shared.Administration.Logs;
using Content.Shared.CCVar;
using Content.Shared.Database;
using Prometheus;
using Robust.Shared;
using Robust.Shared.Configuration;

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Threading;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
namespace Content.Server.Administration.Logs;

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using Content.Server.Database;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
namespace Content.Server.Administration.Logs;

View File

@@ -4,6 +4,7 @@ using Content.Server.Atmos.Components;
using Content.Server.Doors.Components;
using Content.Shared.Administration.Logs;
using Content.Shared.Atmos;
using Content.Shared.Database;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Map;

View File

@@ -7,6 +7,7 @@ using Content.Shared.Administration.Logs;
using Content.Shared.Alert;
using Content.Shared.Atmos;
using Content.Shared.Damage;
using Content.Shared.Database;
using Content.Shared.FixedPoint;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;

View File

@@ -10,6 +10,7 @@ using Content.Shared.Administration.Logs;
using Content.Shared.Alert;
using Content.Shared.Atmos;
using Content.Shared.Damage;
using Content.Shared.Database;
using Content.Shared.Interaction;
using Content.Shared.Popups;
using Content.Shared.Temperature;

View File

@@ -14,6 +14,7 @@ using Content.Shared.ActionBlocker;
using Content.Shared.Administration.Logs;
using Content.Shared.Atmos;
using Content.Shared.Atmos.Piping.Binary.Components;
using Content.Shared.Database;
using Content.Shared.Interaction;
using Content.Shared.Interaction.Helpers;
using JetBrains.Annotations;

View File

@@ -14,6 +14,7 @@ using Content.Shared.Alert;
using Content.Shared.Atmos;
using Content.Shared.Body.Components;
using Content.Shared.Damage;
using Content.Shared.Database;
using Content.Shared.MobState.Components;
using Content.Shared.Popups;
using Robust.Shared.GameObjects;

View File

@@ -5,6 +5,7 @@ using Content.Server.Chemistry.EntitySystems;
using Content.Shared.Administration.Logs;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Database;
using Content.Shared.FixedPoint;
using Content.Shared.MobState.Components;
using JetBrains.Annotations;

View File

@@ -11,6 +11,7 @@ using Content.Server.Popups;
using Content.Shared.Administration.Logs;
using Content.Shared.Damage;
using Content.Shared.Damage.Prototypes;
using Content.Shared.Database;
using Content.Shared.Popups;
using Robust.Server.Player;
using Robust.Shared.Console;

View File

@@ -2,6 +2,7 @@ using Content.Shared.Administration.Logs;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reaction;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Database;
using Content.Shared.FixedPoint;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;

View File

@@ -7,6 +7,7 @@ using Content.Shared.Audio;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reaction;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Database;
using Content.Shared.Sound;
using JetBrains.Annotations;
using Robust.Shared.Audio;

View File

@@ -3,6 +3,7 @@ using Content.Server.Chemistry.Components.SolutionManager;
using Content.Server.Explosion.EntitySystems;
using Content.Shared.Administration.Logs;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Database;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;

View File

@@ -4,6 +4,7 @@ using Content.Server.Atmos.EntitySystems;
using Content.Shared.Administration.Logs;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Database;
using Content.Shared.FixedPoint;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;

View File

@@ -5,6 +5,7 @@ using Content.Server.UserInterface;
using Content.Shared.Administration.Logs;
using Content.Shared.Audio;
using Content.Shared.Crayon;
using Content.Shared.Database;
using Content.Shared.Interaction;
using Content.Shared.Interaction.Helpers;
using Content.Shared.Popups;

View File

@@ -6,6 +6,7 @@ using Content.Server.Stunnable.Components;
using Content.Shared.Administration.Logs;
using Content.Shared.Audio;
using Content.Shared.Damage;
using Content.Shared.Database;
using Content.Shared.Stunnable;
using JetBrains.Annotations;
using Robust.Shared.Audio;

View File

@@ -2,6 +2,7 @@ using Content.Server.Administration.Logs;
using Content.Server.Damage.Components;
using Content.Shared.Administration.Logs;
using Content.Shared.Damage;
using Content.Shared.Database;
using Content.Shared.Throwing;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
@@ -25,7 +26,7 @@ namespace Content.Server.Damage.Systems
if (dmg == null)
return;
_logSystem.Add(LogType.Landed, $"{component.Owner} received {dmg.Total} damage from landing");
_logSystem.Add(LogType.Landed, $"{component.Owner} received {dmg.Total} damage from landing");
}
}
}

View File

@@ -3,6 +3,7 @@ using Content.Server.Damage.Components;
using Content.Server.Tools.Components;
using Content.Shared.Administration.Logs;
using Content.Shared.Damage;
using Content.Shared.Database;
using Content.Shared.Interaction;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;

View File

@@ -2,6 +2,7 @@ using Content.Server.Administration.Logs;
using Content.Server.Damage.Components;
using Content.Shared.Administration.Logs;
using Content.Shared.Damage;
using Content.Shared.Database;
using Content.Shared.Throwing;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;

View File

@@ -13,6 +13,7 @@ using Content.Shared.Administration.Logs;
using Content.Shared.Alert;
using Content.Shared.Damage;
using Content.Shared.Damage.Prototypes;
using Content.Shared.Database;
using Content.Shared.Electrocution;
using Content.Shared.Interaction;
using Content.Shared.Jittering;

View File

@@ -6,6 +6,7 @@ using Content.Server.Camera;
using Content.Server.Explosion.Components;
using Content.Shared.Acts;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Content.Shared.Interaction.Helpers;
using Content.Shared.Maps;
using Content.Shared.Physics;

View File

@@ -8,6 +8,7 @@ using Content.Server.Fluids.Components;
using Content.Shared.Administration.Logs;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Database;
using Content.Shared.Directions;
using Content.Shared.Examine;
using Content.Shared.FixedPoint;

View File

@@ -17,6 +17,7 @@ using Content.Server.Speech.Components;
using Content.Server.Station;
using Content.Shared.Administration.Logs;
using Content.Shared.CharacterAppearance.Systems;
using Content.Shared.Database;
using Content.Shared.GameTicking;
using Content.Shared.Ghost;
using Content.Shared.Inventory;

View File

@@ -9,6 +9,7 @@ using Content.Server.Items;
using Content.Server.Pulling;
using Content.Shared.ActionBlocker;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Content.Shared.DragDrop;
using Content.Shared.Input;
using Content.Shared.Interaction;

View File

@@ -24,6 +24,7 @@ using Robust.Shared.Maths;
using Content.Shared.Audio;
using Content.Server.Administration.Logs;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
namespace Content.Server.Light.EntitySystems
{

View File

@@ -5,6 +5,7 @@ using Content.Shared.ActionBlocker;
using Content.Shared.Administration.Logs;
using Content.Shared.Damage;
using Content.Shared.Damage.Prototypes;
using Content.Shared.Database;
using Content.Shared.Interaction;
using Content.Shared.Interaction.Helpers;
using Content.Shared.Stacks;

View File

@@ -1,5 +1,6 @@
using Content.Server.Morgue.Components;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Content.Shared.Verbs;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;

View File

@@ -5,6 +5,7 @@ using Content.Server.Alert;
using Content.Shared.Administration.Logs;
using Content.Shared.Alert;
using Content.Shared.Damage;
using Content.Shared.Database;
using Content.Shared.MobState.Components;
using Content.Shared.Movement.Components;
using Content.Shared.Movement.EntitySystems;

View File

@@ -5,6 +5,7 @@ using Content.Server.Alert;
using Content.Shared.Administration.Logs;
using Content.Shared.Alert;
using Content.Shared.Damage;
using Content.Shared.Database;
using Content.Shared.MobState.Components;
using Content.Shared.Movement.Components;
using Content.Shared.Movement.EntitySystems;

View File

@@ -4,6 +4,7 @@ using Content.Server.Projectiles.Components;
using Content.Shared.Administration.Logs;
using Content.Shared.Body.Components;
using Content.Shared.Damage;
using Content.Shared.Database;
using JetBrains.Annotations;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;

View File

@@ -3,6 +3,7 @@ using Content.Server.Tools;
using Content.Server.Tools.Components;
using Content.Shared.Administration.Logs;
using Content.Shared.Damage;
using Content.Shared.Database;
using Content.Shared.Interaction;
using Content.Shared.Popups;
using Content.Shared.Tools.Components;

View File

@@ -4,6 +4,7 @@ using Content.Server.Administration.Logs;
using Content.Server.Chat.Managers;
using Content.Server.GameTicking;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Content.Shared.GameTicking;
using Robust.Server.Player;
using Robust.Shared.Audio;

View File

@@ -1,6 +1,7 @@
using Content.Server.Administration.Logs;
using Content.Server.Chat.Managers;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;

View File

@@ -8,6 +8,7 @@ using Content.Server.StationEvents.Events;
using Content.Shared;
using Content.Shared.Administration.Logs;
using Content.Shared.CCVar;
using Content.Shared.Database;
using Content.Shared.GameTicking;
using Content.Shared.StationEvents;
using JetBrains.Annotations;

View File

@@ -4,6 +4,7 @@ using Content.Server.Administration.Logs;
using Content.Server.Popups;
using Content.Shared.Administration.Logs;
using Content.Shared.Audio;
using Content.Shared.Database;
using Content.Shared.Popups;
using Content.Shared.StatusEffect;
using Content.Shared.Stunnable;

View File

@@ -9,6 +9,7 @@ using Content.Server.Temperature.Components;
using Content.Shared.Administration.Logs;
using Content.Shared.Alert;
using Content.Shared.Damage;
using Content.Shared.Database;
using Content.Shared.FixedPoint;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;

View File

@@ -9,6 +9,7 @@ using Content.Server.Cooldown;
using Content.Server.Weapon.Melee.Components;
using Content.Shared.Administration.Logs;
using Content.Shared.Damage;
using Content.Shared.Database;
using Content.Shared.Hands;
using Content.Shared.Interaction;
using Content.Shared.Physics;

View File

@@ -9,6 +9,7 @@ using Content.Server.Weapon.Ranged.Ammunition.Components;
using Content.Shared.Administration.Logs;
using Content.Shared.Audio;
using Content.Shared.Damage;
using Content.Shared.Database;
using Content.Shared.Examine;
using Content.Shared.Interaction;
using Content.Shared.Sound;

View File

@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@@ -1,10 +1,7 @@
using System;
using Robust.Shared.Serialization;
namespace Content.Shared.Administration.Logs;
namespace Content.Shared.Database;
// DO NOT CHANGE THE NUMERIC VALUES OF THESE
[Serializable, NetSerializable]
[Serializable]
public enum LogImpact : sbyte
{
Low = -1,

View File

@@ -1,4 +1,4 @@
namespace Content.Shared.Administration.Logs;
namespace Content.Shared.Database;
// DO NOT CHANGE THE NUMERIC VALUES OF THESE
public enum LogType

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Content.Shared.Eui;
using Robust.Shared.Serialization;

View File

@@ -1,4 +1,5 @@
using System;
using Content.Shared.Database;
using Robust.Shared.Serialization;
namespace Content.Shared.Administration.Logs;

View File

@@ -1,4 +1,5 @@
using System.Globalization;
using Content.Shared.Database;
using Robust.Shared.GameObjects;
namespace Content.Shared.Administration.Logs;

View File

@@ -1,6 +1,7 @@
using System.Collections.Generic;
using Content.Shared.Administration.Logs;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Database;
using Content.Shared.FixedPoint;
using Content.Shared.Sound;
using Robust.Shared.Prototypes;

View File

@@ -2,6 +2,7 @@ using System.Collections.Generic;
using Content.Shared.Administration.Logs;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Database;
using Content.Shared.FixedPoint;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;

View File

@@ -2,6 +2,7 @@ using Content.Shared.Administration.Logs;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reaction;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Database;
using Content.Shared.FixedPoint;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;

View File

@@ -2,6 +2,7 @@
using Content.Shared.Administration.Logs;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Database;
using Content.Shared.FixedPoint;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;

View File

@@ -5,6 +5,7 @@ using Content.Shared.Body.Prototypes;
using Content.Shared.Botany;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reaction;
using Content.Shared.Database;
using Content.Shared.FixedPoint;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;

View File

@@ -16,6 +16,7 @@
<PackageReference Include="JetBrains.Annotations" Version="2020.3.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Content.Shared.Database\Content.Shared.Database.csproj" />
<ProjectReference Include="..\RobustToolbox\Lidgren.Network\Lidgren.Network.csproj">
<Private>false</Private>
</ProjectReference>

View File

@@ -14,6 +14,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
using Robust.Shared.ViewVariables;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
namespace Content.Shared.Damage
{

View File

@@ -1,6 +1,7 @@
using System.Linq;
using Content.Shared.Administration.Logs;
using Content.Shared.Damage.Prototypes;
using Content.Shared.Database;
using Content.Shared.FixedPoint;
using Robust.Shared.GameObjects;
using Robust.Shared.GameStates;

View File

@@ -4,6 +4,7 @@ using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Content.Shared.ActionBlocker;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Content.Shared.Interaction;
using Content.Shared.Item;
using Robust.Shared.Containers;

View File

@@ -3,6 +3,7 @@ using System.Linq;
using System.Threading.Tasks;
using Content.Shared.ActionBlocker;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Content.Shared.Hands;
using Content.Shared.Hands.Components;
using Content.Shared.Inventory;

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Content.Shared.StatusEffect;
using Content.Shared.Stunnable;
using JetBrains.Annotations;

View File

@@ -1,4 +1,6 @@
using Content.Shared.Administration.Logs;
using Content.Shared.CCVar;
using Content.Shared.Database;
using Content.Shared.Hands.Components;
using Content.Shared.Physics;
using Content.Shared.Physics.Pull;

View File

@@ -1,5 +1,6 @@
using System.Collections.Generic;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Content.Shared.Hands.Components;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;

View File

@@ -3,6 +3,7 @@ using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
using System;
using Content.Shared.Database;
namespace Content.Shared.Verbs
{

View File

@@ -1,6 +1,7 @@
using System;
using System.Linq;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using NUnit.Framework;
namespace Content.Tests.Shared.Administration.Logs;

View File

@@ -108,6 +108,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PluralRules.Generator", "Ro
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pow3r", "Pow3r\Pow3r.csproj", "{1C048C9F-00A9-4796-BE4D-BB36B7769720}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Content.Shared.Database", "Content.Shared.Database\Content.Shared.Database.csproj", "{8842381D-3426-4BA8-93DA-599AB14D88E9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -253,6 +255,10 @@ Global
{1C048C9F-00A9-4796-BE4D-BB36B7769720}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1C048C9F-00A9-4796-BE4D-BB36B7769720}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1C048C9F-00A9-4796-BE4D-BB36B7769720}.Release|Any CPU.Build.0 = Release|Any CPU
{8842381D-3426-4BA8-93DA-599AB14D88E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8842381D-3426-4BA8-93DA-599AB14D88E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8842381D-3426-4BA8-93DA-599AB14D88E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8842381D-3426-4BA8-93DA-599AB14D88E9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE