FreeObjectiveSystem.cs 578 B

1234567891011121314151617181920
  1. using Content.Server.Objectives.Components;
  2. using Content.Shared.Objectives.Components;
  3. namespace Content.Server.Objectives.Systems;
  4. public sealed class FreeObjectiveSystem : EntitySystem
  5. {
  6. public override void Initialize()
  7. {
  8. base.Initialize();
  9. SubscribeLocalEvent<FreeObjectiveComponent, ObjectiveGetProgressEvent>(OnGetProgress);
  10. }
  11. // You automatically greentext, there's not much else to it
  12. private void OnGetProgress(Entity<FreeObjectiveComponent> ent, ref ObjectiveGetProgressEvent args)
  13. {
  14. args.Progress = 1f;
  15. }
  16. }