ECS and cleanup body system, merge body templates and presets into body prototypes (#11991)
Co-authored-by: Jezithyr <Jezithyr@gmail.com>
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
using System.Linq;
|
||||
using Content.Server.Administration;
|
||||
using Content.Server.Body.Components;
|
||||
using Content.Server.Body.Systems;
|
||||
using Content.Server.Cargo.Components;
|
||||
using Content.Shared.Materials;
|
||||
using Content.Server.Stack;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.Body.Components;
|
||||
using Content.Shared.Materials;
|
||||
using Content.Shared.MobState.Components;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.Containers;
|
||||
@@ -22,6 +23,8 @@ public sealed class PricingSystem : EntitySystem
|
||||
[Dependency] private readonly IConsoleHost _consoleHost = default!;
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
|
||||
[Dependency] private readonly BodySystem _bodySystem = default!;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -84,8 +87,8 @@ public sealed class PricingSystem : EntitySystem
|
||||
return;
|
||||
}
|
||||
|
||||
var partList = body.Slots.ToList();
|
||||
var totalPartsPresent = partList.Sum(x => x.Part != null ? 1 : 0);
|
||||
var partList = _bodySystem.GetBodyAllSlots(uid, body).ToList();
|
||||
var totalPartsPresent = partList.Sum(x => x.Child != null ? 1 : 0);
|
||||
var totalParts = partList.Count;
|
||||
|
||||
var partRatio = totalPartsPresent / (double) totalParts;
|
||||
|
||||
Reference in New Issue
Block a user