1
0

ActivateArtifact.cs 729 B

123456789101112131415161718
  1. using Content.Server.Xenoarchaeology.XenoArtifacts;
  2. using Content.Shared.Chemistry.Reagent;
  3. using Robust.Shared.Prototypes;
  4. using Content.Shared.EntityEffects;
  5. namespace Content.Server.EntityEffects.Effects;
  6. public sealed partial class ActivateArtifact : EntityEffect
  7. {
  8. public override void Effect(EntityEffectBaseArgs args)
  9. {
  10. var artifact = args.EntityManager.EntitySysManager.GetEntitySystem<ArtifactSystem>();
  11. artifact.TryActivateArtifact(args.TargetEntity, logMissing: false);
  12. }
  13. protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) =>
  14. Loc.GetString("reagent-effect-guidebook-activate-artifact", ("chance", Probability));
  15. }