Update submodule, fix a bunch of warnings.
This commit is contained in:
@@ -43,7 +43,7 @@ namespace Content.Server.GameObjects.Components.BarSign
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_prototypeManager.TryIndex(_currentSign, out BarSignPrototype prototype))
|
||||
if (!_prototypeManager.TryIndex(_currentSign, out BarSignPrototype? prototype))
|
||||
{
|
||||
Logger.ErrorS("barSign", $"Invalid bar sign prototype: \"{_currentSign}\"");
|
||||
return;
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace Content.Server.GameObjects.Components.Cargo
|
||||
break;
|
||||
}
|
||||
|
||||
PrototypeManager.TryIndex(order.ProductId, out CargoProductPrototype product);
|
||||
PrototypeManager.TryIndex(order.ProductId, out CargoProductPrototype? product);
|
||||
if (product == null!)
|
||||
break;
|
||||
var capacity = _cargoConsoleSystem.GetCapacity(orders.Database.Id);
|
||||
@@ -184,7 +184,7 @@ namespace Content.Server.GameObjects.Components.Cargo
|
||||
orders.Database.ClearOrderCapacity();
|
||||
foreach (var order in approvedOrders)
|
||||
{
|
||||
if (!PrototypeManager.TryIndex(order.ProductId, out CargoProductPrototype product))
|
||||
if (!PrototypeManager.TryIndex(order.ProductId, out CargoProductPrototype? product))
|
||||
continue;
|
||||
for (var i = 0; i < order.Amount; i++)
|
||||
{
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
||||
{
|
||||
if (string.IsNullOrEmpty(_packPrototypeId)) return;
|
||||
|
||||
if (!_prototypeManager.TryIndex(_packPrototypeId, out ReagentDispenserInventoryPrototype packPrototype))
|
||||
if (!_prototypeManager.TryIndex(_packPrototypeId, out ReagentDispenserInventoryPrototype? packPrototype))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
||||
|
||||
//Only reagents with spritePath property can change appearance of transformable containers!
|
||||
if (!string.IsNullOrWhiteSpace(reagentId) &&
|
||||
_prototypeManager.TryIndex(reagentId, out ReagentPrototype proto) &&
|
||||
_prototypeManager.TryIndex(reagentId, out ReagentPrototype? proto) &&
|
||||
!string.IsNullOrWhiteSpace(proto.SpriteReplacementPath))
|
||||
{
|
||||
var spriteSpec = new SpriteSpecifier.Rsi(new ResourcePath("Objects/Consumable/Drinks/" + proto.SpriteReplacementPath),"icon");
|
||||
|
||||
@@ -480,7 +480,7 @@ namespace Content.Server.GameObjects.Components.Construction
|
||||
return;
|
||||
}
|
||||
|
||||
if (_prototypeManager.TryIndex(_graphIdentifier, out ConstructionGraphPrototype graph))
|
||||
if (_prototypeManager.TryIndex(_graphIdentifier, out ConstructionGraphPrototype? graph))
|
||||
{
|
||||
GraphPrototype = graph;
|
||||
|
||||
|
||||
@@ -337,7 +337,7 @@ namespace Content.Server.GameObjects.Components.Metabolism
|
||||
// Using ToList here lets us edit reagents while iterating
|
||||
foreach (var reagent in bloodstream.Solution.ReagentList.ToList())
|
||||
{
|
||||
if (!_prototypeManager.TryIndex(reagent.ReagentId, out ReagentPrototype prototype))
|
||||
if (!_prototypeManager.TryIndex(reagent.ReagentId, out ReagentPrototype? prototype))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace Content.Server.GameObjects.Components.Research
|
||||
switch (message.Message)
|
||||
{
|
||||
case LatheQueueRecipeMessage msg:
|
||||
PrototypeManager.TryIndex(msg.ID, out LatheRecipePrototype recipe);
|
||||
PrototypeManager.TryIndex(msg.ID, out LatheRecipePrototype? recipe);
|
||||
if (recipe != null!)
|
||||
for (var i = 0; i < msg.Quantity; i++)
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Content.Server.GameObjects.Components.Research
|
||||
switch (message.Message)
|
||||
{
|
||||
case ConsoleUnlockTechnologyMessage msg:
|
||||
if (!_prototypeManager.TryIndex(msg.Id, out TechnologyPrototype tech)) break;
|
||||
if (!_prototypeManager.TryIndex(msg.Id, out TechnologyPrototype? tech)) break;
|
||||
if (client.Server == null) break;
|
||||
if (!client.Server.CanUnlockTechnology(tech)) break;
|
||||
if (client.Server.UnlockTechnology(tech))
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace Content.Server.GameObjects.Components.VendingMachines
|
||||
private void InitializeFromPrototype()
|
||||
{
|
||||
if (string.IsNullOrEmpty(_packPrototypeId)) { return; }
|
||||
if (!_prototypeManager.TryIndex(_packPrototypeId, out VendingMachineInventoryPrototype packPrototype))
|
||||
if (!_prototypeManager.TryIndex(_packPrototypeId, out VendingMachineInventoryPrototype? packPrototype))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user