Update to .NET 6 and C# 10 (#5233)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
committed by
GitHub
parent
29f3d2d1ca
commit
af579b15cc
@@ -2,7 +2,6 @@
|
||||
using Content.Server.Chemistry.EntitySystems;
|
||||
using Content.Server.Inventory.Components;
|
||||
using Content.Server.Items;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Foam;
|
||||
using Content.Shared.Inventory;
|
||||
@@ -51,7 +50,7 @@ namespace Content.Server.Chemistry.Components
|
||||
slot == EquipmentSlotDefines.Slots.IDCARD)
|
||||
continue;
|
||||
|
||||
if (inventory.TryGetSlotItem(slot, out ItemComponent _))
|
||||
if (inventory.TryGetSlotItem(slot, out ItemComponent? _))
|
||||
protection += 0.025f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<!-- Work around https://github.com/dotnet/project-system/issues/4314 -->
|
||||
<TargetFramework>$(TargetFramework)</TargetFramework>
|
||||
<LangVersion>9</LangVersion>
|
||||
<LangVersion>10</LangVersion>
|
||||
<IsPackable>false</IsPackable>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<OutputPath>..\bin\Content.Server\</OutputPath>
|
||||
|
||||
@@ -93,6 +93,11 @@ namespace Content.Server.Database
|
||||
.Where(p => p.Preference.UserId == userId.UserId && p.Slot == slot)
|
||||
.SingleOrDefaultAsync();
|
||||
|
||||
if (profile == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
db.Profile.Remove(profile);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ using System.IO;
|
||||
using System.Net;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Content.Shared;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.Preferences;
|
||||
using Microsoft.Data.Sqlite;
|
||||
@@ -382,8 +381,8 @@ namespace Content.Server.Database
|
||||
_sawmill = sawmill;
|
||||
}
|
||||
|
||||
public void Log<TState>(MSLogLevel logLevel, EventId eventId, TState state, Exception exception,
|
||||
Func<TState, Exception, string> formatter)
|
||||
public void Log<TState>(MSLogLevel logLevel, EventId eventId, TState state, Exception? exception,
|
||||
Func<TState, Exception?, string> formatter)
|
||||
{
|
||||
var lvl = logLevel switch
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Content.Server.Inventory
|
||||
return false;
|
||||
|
||||
// If we don't have that slot or there's already an item there, we do nothing.
|
||||
if (!inventory.HasSlot(slot) || inventory.TryGetSlotItem(slot, out ItemComponent _))
|
||||
if (!inventory.HasSlot(slot) || inventory.TryGetSlotItem(slot, out ItemComponent? _))
|
||||
return false;
|
||||
|
||||
// If the prototype in question doesn't exist, we do nothing.
|
||||
|
||||
@@ -178,7 +178,7 @@ namespace Content.Server.Strip
|
||||
if (!inventory.HasSlot(slot))
|
||||
return false;
|
||||
|
||||
if (inventory.TryGetSlotItem(slot, out ItemComponent _))
|
||||
if (inventory.TryGetSlotItem(slot, out ItemComponent? _))
|
||||
{
|
||||
user.PopupMessageCursor(Loc.GetString("strippable-component-item-slot-occupied",("owner", Owner)));
|
||||
return false;
|
||||
@@ -403,7 +403,7 @@ namespace Content.Server.Strip
|
||||
|
||||
if (Owner.TryGetComponent<InventoryComponent>(out var inventory))
|
||||
{
|
||||
if (inventory.TryGetSlotItem(inventoryMessage.Slot, out ItemComponent _))
|
||||
if (inventory.TryGetSlotItem(inventoryMessage.Slot, out ItemComponent? _))
|
||||
placingItem = false;
|
||||
|
||||
if (placingItem)
|
||||
|
||||
Reference in New Issue
Block a user