Merge branch 'master' into ed-27-05-2025-upstream-sync
This commit is contained in:
@@ -16,6 +16,7 @@ using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Utility;
|
||||
using System.Linq;
|
||||
using Content.Server._CP14.Trading;
|
||||
using Content.Shared.Research.Prototypes;
|
||||
|
||||
namespace Content.Server.Cargo.Systems;
|
||||
@@ -260,7 +261,9 @@ public sealed class PricingSystem : EntitySystem
|
||||
{
|
||||
double price = 0;
|
||||
|
||||
if (HasComp<MaterialComponent>(uid) &&
|
||||
//CP14 We take materials into account when calculating the price in any case.
|
||||
var proto = MetaData(uid).EntityPrototype?.ID ?? "";
|
||||
if ((HasComp<MaterialComponent>(uid) || proto.StartsWith("CP14")) &&
|
||||
TryComp<PhysicalCompositionComponent>(uid, out var composition))
|
||||
{
|
||||
var matPrice = GetMaterialPrice(composition);
|
||||
@@ -277,7 +280,8 @@ public sealed class PricingSystem : EntitySystem
|
||||
{
|
||||
double price = 0;
|
||||
|
||||
if (prototype.Components.ContainsKey(Factory.GetComponentName<MaterialComponent>()) &&
|
||||
//CP14 We take materials into account when calculating the price in any case.
|
||||
if ((prototype.Components.ContainsKey(Factory.GetComponentName<MaterialComponent>()) || prototype.ID.StartsWith("CP14")) &&
|
||||
prototype.Components.TryGetValue(Factory.GetComponentName<PhysicalCompositionComponent>(), out var composition))
|
||||
{
|
||||
var compositionComp = (PhysicalCompositionComponent) composition.Component;
|
||||
|
||||
Reference in New Issue
Block a user