Rip out remaining machine upgrades (#24413)
* Rip out remaining machine upgrades * eek
This commit is contained in:
@@ -5,7 +5,6 @@ using Content.Shared.Construction.Components;
|
||||
using Content.Shared.Construction.Prototypes;
|
||||
using Content.Shared.Verbs;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Server.Construction;
|
||||
@@ -144,7 +143,7 @@ public sealed partial class ConstructionSystem
|
||||
var p = EntityManager.SpawnEntity(partProto.StockPartPrototype, xform.Coordinates);
|
||||
|
||||
if (!_container.Insert(p, partContainer))
|
||||
throw new Exception($"Couldn't insert machine part of type {part} to machine with prototype {partProto.StockPartPrototype ?? "N/A"}!");
|
||||
throw new Exception($"Couldn't insert machine part of type {part} to machine with prototype {partProto.StockPartPrototype}!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,7 +183,7 @@ public sealed class RefreshPartsEvent : EntityEventArgs
|
||||
{
|
||||
public IReadOnlyList<MachinePartComponent> Parts = new List<MachinePartComponent>();
|
||||
|
||||
public Dictionary<string, float> PartRatings = new Dictionary<string, float>();
|
||||
public Dictionary<string, float> PartRatings = new();
|
||||
}
|
||||
|
||||
public sealed class UpgradeExamineEvent : EntityEventArgs
|
||||
|
||||
@@ -10,7 +10,6 @@ using Content.Shared.Storage;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Utility;
|
||||
using Content.Shared.Wires;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Collections;
|
||||
|
||||
@@ -43,7 +42,7 @@ public sealed class PartExchangerSystem : EntitySystem
|
||||
if (args.Handled || args.Args.Target == null)
|
||||
return;
|
||||
|
||||
if (!TryComp<StorageComponent>(uid, out var storage) || storage.Container == null)
|
||||
if (!TryComp<StorageComponent>(uid, out var storage))
|
||||
return; //the parts are stored in here
|
||||
|
||||
var machinePartQuery = GetEntityQuery<MachinePartComponent>();
|
||||
|
||||
Reference in New Issue
Block a user