STWeightSystem.Modifier.cs 571 B

1234567891011121314151617
  1. using Content.Shared._Stalker.Modifier;
  2. using Content.Shared._Stalker.Weight;
  3. namespace Content.Server._Stalker.Weight;
  4. public sealed partial class STWeightSystem
  5. {
  6. private void InitializeModifier()
  7. {
  8. SubscribeLocalEvent<STWeightComponent, UpdatedFloatModifierEvent<Modifier.STWeightMaximumModifierComponent>>(OnUpdatedMaximum);
  9. }
  10. private void OnUpdatedMaximum(Entity<STWeightComponent> weight, ref UpdatedFloatModifierEvent<Modifier.STWeightMaximumModifierComponent> args)
  11. {
  12. weight.Comp.MaximumModifier = args.Modifier;
  13. }
  14. }