using Content.Shared.Cargo; using Content.Shared.Xenoarchaeology.Artifact; using Content.Shared.Xenoarchaeology.Artifact.Components; namespace Content.Server.Xenoarchaeology.Artifact; /// public sealed partial class XenoArtifactSystem : SharedXenoArtifactSystem { /// public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnArtifactMapInit); SubscribeLocalEvent(OnCalculatePrice); } private void OnArtifactMapInit(Entity ent, ref MapInitEvent args) { if (ent.Comp.IsGenerationRequired) GenerateArtifactStructure(ent); } private void OnCalculatePrice(Entity ent, ref PriceCalculationEvent args) { foreach (var node in GetAllNodes(ent)) { if (node.Comp.Locked) continue; args.Price += node.Comp.ResearchValue * ent.Comp.PriceMultiplier; } } }