Cleaned up obsolete properties from MobStateComponent (#13097)

Co-authored-by: Jezithyr <Jezithyr@gmail.com>
This commit is contained in:
Jezithyr
2022-12-19 19:25:35 -08:00
committed by GitHub
parent 7259acfb18
commit 5f9b4adf47
22 changed files with 91 additions and 78 deletions

View File

@@ -3,6 +3,7 @@ using Content.Server.Administration;
using Content.Server.Body.Systems;
using Content.Server.Cargo.Components;
using Content.Server.Chemistry.Components.SolutionManager;
using Content.Server.MobState;
using Content.Server.Stack;
using Content.Shared.Administration;
using Content.Shared.Body.Components;
@@ -24,6 +25,7 @@ public sealed class PricingSystem : EntitySystem
{
[Dependency] private readonly IConsoleHost _consoleHost = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly MobStateSystem _mobStateSystem = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly BodySystem _bodySystem = default!;
@@ -98,7 +100,7 @@ public sealed class PricingSystem : EntitySystem
var partRatio = totalPartsPresent / (double) totalParts;
var partPenalty = component.Price * (1 - partRatio) * component.MissingBodyPartPenalty;
args.Price += (component.Price - partPenalty) * (state.IsAlive() ? 1.0 : component.DeathPenalty);
args.Price += (component.Price - partPenalty) * (_mobStateSystem.IsAlive(uid, state) ? 1.0 : component.DeathPenalty);
}
private void CalculateStackPrice(EntityUid uid, StackPriceComponent component, ref PriceCalculationEvent args)