diff --git a/Content.Server/Access/Systems/AccessOverriderSystem.cs b/Content.Server/Access/Systems/AccessOverriderSystem.cs index 10d7fd0f7a7..684312c7c11 100644 --- a/Content.Server/Access/Systems/AccessOverriderSystem.cs +++ b/Content.Server/Access/Systems/AccessOverriderSystem.cs @@ -55,8 +55,7 @@ private void AfterInteractOn(EntityUid uid, AccessOverriderComponent component, var doAfterEventArgs = new DoAfterArgs(EntityManager, args.User, component.DoAfter, new AccessOverriderDoAfterEvent(), uid, target: args.Target, used: uid) { - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, BreakOnDamage = true, NeedHand = true, }; diff --git a/Content.Server/Animals/Systems/UdderSystem.cs b/Content.Server/Animals/Systems/UdderSystem.cs index ef43c2c89d0..b7856e90423 100644 --- a/Content.Server/Animals/Systems/UdderSystem.cs +++ b/Content.Server/Animals/Systems/UdderSystem.cs @@ -15,7 +15,7 @@ namespace Content.Server.Animals.Systems; /// -/// Gives ability to produce milkable reagents, produces endless if the +/// Gives ability to produce milkable reagents, produces endless if the /// owner has no HungerComponent /// internal sealed class UdderSystem : EntitySystem @@ -76,9 +76,8 @@ private void AttemptMilk(Entity udder, EntityUid userUid, Entit var doargs = new DoAfterArgs(EntityManager, userUid, 5, new MilkingDoAfterEvent(), udder, udder, used: containerUid) { - BreakOnUserMove = true, + BreakOnMove = true, BreakOnDamage = true, - BreakOnTargetMove = true, MovementThreshold = 1.0f, }; diff --git a/Content.Server/Body/Systems/InternalsSystem.cs b/Content.Server/Body/Systems/InternalsSystem.cs index 007cbdf0848..004dae99b97 100644 --- a/Content.Server/Body/Systems/InternalsSystem.cs +++ b/Content.Server/Body/Systems/InternalsSystem.cs @@ -109,9 +109,8 @@ private void StartToggleInternalsDoAfter(EntityUid user, EntityUid target, Inter _doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, user, delay, new InternalsDoAfterEvent(), target, target: target) { - BreakOnUserMove = true, BreakOnDamage = true, - BreakOnTargetMove = true, + BreakOnMove = true, MovementThreshold = 0.1f, }); } diff --git a/Content.Server/Botany/Systems/BotanySwabSystem.cs b/Content.Server/Botany/Systems/BotanySwabSystem.cs index 8f300c94486..f6190bae4ea 100644 --- a/Content.Server/Botany/Systems/BotanySwabSystem.cs +++ b/Content.Server/Botany/Systems/BotanySwabSystem.cs @@ -47,8 +47,7 @@ private void OnAfterInteract(EntityUid uid, BotanySwabComponent swab, AfterInter _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, args.User, swab.SwabDelay, new BotanySwabDoAfterEvent(), uid, target: args.Target, used: uid) { Broadcast = true, - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, NeedHand = true }); } diff --git a/Content.Server/Chemistry/EntitySystems/InjectorSystem.cs b/Content.Server/Chemistry/EntitySystems/InjectorSystem.cs index 0846d354777..47cfd4821d1 100644 --- a/Content.Server/Chemistry/EntitySystems/InjectorSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/InjectorSystem.cs @@ -193,9 +193,11 @@ private void InjectDoAfter(Entity injector, EntityUid target, DoAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, user, actualDelay, new InjectorDoAfterEvent(), injector.Owner, target: target, used: injector.Owner) { - BreakOnUserMove = true, + BreakOnMove = true, + BreakOnWeightlessMove = false, BreakOnDamage = true, - BreakOnTargetMove = true, + NeedHand = true, + BreakOnHandChange = true, MovementThreshold = 0.1f, }); } diff --git a/Content.Server/Communications/CommsHackerSystem.cs b/Content.Server/Communications/CommsHackerSystem.cs index 1248d214003..44b3aa28bdf 100644 --- a/Content.Server/Communications/CommsHackerSystem.cs +++ b/Content.Server/Communications/CommsHackerSystem.cs @@ -45,7 +45,7 @@ private void OnBeforeInteractHand(EntityUid uid, CommsHackerComponent comp, Befo var doAfterArgs = new DoAfterArgs(EntityManager, uid, comp.Delay, new TerrorDoAfterEvent(), target: target, used: uid, eventTarget: uid) { BreakOnDamage = true, - BreakOnUserMove = true, + BreakOnMove = true, MovementThreshold = 0.5f, CancelDuplicate = false }; diff --git a/Content.Server/Construction/ConstructionSystem.Initial.cs b/Content.Server/Construction/ConstructionSystem.Initial.cs index e0bdf096296..29803665001 100644 --- a/Content.Server/Construction/ConstructionSystem.Initial.cs +++ b/Content.Server/Construction/ConstructionSystem.Initial.cs @@ -250,8 +250,7 @@ void ShutdownContainers() var doAfterArgs = new DoAfterArgs(EntityManager, user, doAfterTime, new AwaitedDoAfterEvent(), null) { BreakOnDamage = true, - BreakOnTargetMove = false, - BreakOnUserMove = true, + BreakOnMove = true, NeedHand = false, // allow simultaneously starting several construction jobs using the same stack of materials. CancelDuplicate = false, diff --git a/Content.Server/Construction/ConstructionSystem.Interactions.cs b/Content.Server/Construction/ConstructionSystem.Interactions.cs index 946aaa0d3ee..59a5fd6af51 100644 --- a/Content.Server/Construction/ConstructionSystem.Interactions.cs +++ b/Content.Server/Construction/ConstructionSystem.Interactions.cs @@ -288,8 +288,7 @@ private HandleResult HandleInteraction(EntityUid uid, object ev, ConstructionGra var doAfterEventArgs = new DoAfterArgs(EntityManager, interactUsing.User, step.DoAfter, doAfterEv, uid, uid, interactUsing.Used) { BreakOnDamage = false, - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, NeedHand = true }; diff --git a/Content.Server/Construction/PartExchangerSystem.cs b/Content.Server/Construction/PartExchangerSystem.cs index ee5edcbd0a0..174dd1d2faa 100644 --- a/Content.Server/Construction/PartExchangerSystem.cs +++ b/Content.Server/Construction/PartExchangerSystem.cs @@ -174,7 +174,7 @@ private void OnAfterInteract(EntityUid uid, PartExchangerComponent component, Af _doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, args.User, component.ExchangeDuration, new ExchangerDoAfterEvent(), uid, target: args.Target, used: uid) { BreakOnDamage = true, - BreakOnUserMove = true + BreakOnMove = true }); } } diff --git a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs index 6938792315c..df375de6951 100644 --- a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs +++ b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs @@ -512,8 +512,7 @@ public bool TryInsert(EntityUid unitId, EntityUid toInsertId, EntityUid? userId, var doAfterArgs = new DoAfterArgs(EntityManager, userId.Value, delay, new DisposalDoAfterEvent(), unitId, target: toInsertId, used: unitId) { BreakOnDamage = true, - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, NeedHand = false }; diff --git a/Content.Server/Engineering/EntitySystems/DisassembleOnAltVerbSystem.cs b/Content.Server/Engineering/EntitySystems/DisassembleOnAltVerbSystem.cs index 08bf68c4d29..61b6f3d93d2 100644 --- a/Content.Server/Engineering/EntitySystems/DisassembleOnAltVerbSystem.cs +++ b/Content.Server/Engineering/EntitySystems/DisassembleOnAltVerbSystem.cs @@ -45,7 +45,7 @@ public async void AttemptDisassemble(EntityUid uid, EntityUid user, EntityUid ta { var doAfterArgs = new DoAfterArgs(EntityManager, user, component.DoAfterTime, new AwaitedDoAfterEvent(), null) { - BreakOnUserMove = true, + BreakOnMove = true, }; var result = await doAfterSystem.WaitDoAfter(doAfterArgs); diff --git a/Content.Server/Engineering/EntitySystems/SpawnAfterInteractSystem.cs b/Content.Server/Engineering/EntitySystems/SpawnAfterInteractSystem.cs index 61c4937a271..57999ae48ce 100644 --- a/Content.Server/Engineering/EntitySystems/SpawnAfterInteractSystem.cs +++ b/Content.Server/Engineering/EntitySystems/SpawnAfterInteractSystem.cs @@ -47,7 +47,7 @@ bool IsTileClear() { var doAfterArgs = new DoAfterArgs(EntityManager, args.User, component.DoAfterTime, new AwaitedDoAfterEvent(), null) { - BreakOnUserMove = true, + BreakOnMove = true, }; var result = await _doAfterSystem.WaitDoAfter(doAfterArgs); diff --git a/Content.Server/Ensnaring/EnsnareableSystem.Ensnaring.cs b/Content.Server/Ensnaring/EnsnareableSystem.Ensnaring.cs index 169daca07ac..12c701866c6 100644 --- a/Content.Server/Ensnaring/EnsnareableSystem.Ensnaring.cs +++ b/Content.Server/Ensnaring/EnsnareableSystem.Ensnaring.cs @@ -118,8 +118,7 @@ public void TryFree(EntityUid target, EntityUid user, EntityUid ensnare, Ensnar var doAfterEventArgs = new DoAfterArgs(EntityManager, user, freeTime, new EnsnareableDoAfterEvent(), target, target: target, used: ensnare) { - BreakOnUserMove = breakOnMove, - BreakOnTargetMove = breakOnMove, + BreakOnMove = breakOnMove, BreakOnDamage = false, NeedHand = true, BlockDuplicate = true, diff --git a/Content.Server/Fluids/EntitySystems/DrainSystem.cs b/Content.Server/Fluids/EntitySystems/DrainSystem.cs index 19cb650db7c..b8fa04b872e 100644 --- a/Content.Server/Fluids/EntitySystems/DrainSystem.cs +++ b/Content.Server/Fluids/EntitySystems/DrainSystem.cs @@ -239,9 +239,8 @@ private void OnInteract(Entity entity, ref AfterInteractUsingEve var doAfterArgs = new DoAfterArgs(EntityManager, args.User, entity.Comp.UnclogDuration, new DrainDoAfterEvent(), entity, args.Target, args.Used) { - BreakOnTargetMove = true, - BreakOnUserMove = true, BreakOnDamage = true, + BreakOnMove = true, BreakOnHandChange = true }; diff --git a/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs b/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs index 3cd6d06aebd..efaca271d3b 100644 --- a/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs +++ b/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs @@ -203,9 +203,8 @@ private void AddSpillVerb(Entity entity, ref GetVerbsEvent(args.Used, out var tool) && tool.Qualities.Contains("Prying") && component.BatterySlot.ContainedEntity != null) { - var doAfterEventArgs = new DoAfterArgs(EntityManager, args.User, component.BatteryRemovalDelay, new RemoveBatteryEvent(), uid, target: uid, used: args.Target) + var doAfterEventArgs = new DoAfterArgs(EntityManager, args.User, component.BatteryRemovalDelay, + new RemoveBatteryEvent(), uid, target: uid, used: args.Target) { - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true }; _doAfter.TryStartDoAfter(doAfterEventArgs); @@ -186,7 +186,7 @@ private void OnAlternativeVerb(EntityUid uid, MechComponent component, GetVerbsE { var doAfterEventArgs = new DoAfterArgs(EntityManager, args.User, component.EntryDelay, new MechEntryEvent(), uid, target: uid) { - BreakOnUserMove = true, + BreakOnMove = true, }; _doAfter.TryStartDoAfter(doAfterEventArgs); @@ -214,11 +214,8 @@ private void OnAlternativeVerb(EntityUid uid, MechComponent component, GetVerbsE return; } - var doAfterEventArgs = new DoAfterArgs(EntityManager, args.User, component.ExitDelay, new MechExitEvent(), uid, target: uid) - { - BreakOnUserMove = true, - BreakOnTargetMove = true, - }; + var doAfterEventArgs = new DoAfterArgs(EntityManager, args.User, component.ExitDelay, + new MechExitEvent(), uid, target: uid); _doAfter.TryStartDoAfter(doAfterEventArgs); } diff --git a/Content.Server/Medical/BiomassReclaimer/BiomassReclaimerSystem.cs b/Content.Server/Medical/BiomassReclaimer/BiomassReclaimerSystem.cs index b126c74a10a..08addd9a4c5 100644 --- a/Content.Server/Medical/BiomassReclaimer/BiomassReclaimerSystem.cs +++ b/Content.Server/Medical/BiomassReclaimer/BiomassReclaimerSystem.cs @@ -153,9 +153,8 @@ private void OnAfterInteractUsing(Entity reclaimer, r _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, args.User, 7f, new ReclaimerDoAfterEvent(), reclaimer, target: args.Target, used: args.Used) { - BreakOnTargetMove = true, - BreakOnUserMove = true, - NeedHand = true + NeedHand = true, + BreakOnMove = true }); } diff --git a/Content.Server/Medical/CryoPodSystem.cs b/Content.Server/Medical/CryoPodSystem.cs index 4ab94c72b9f..a7d12d9f0fd 100644 --- a/Content.Server/Medical/CryoPodSystem.cs +++ b/Content.Server/Medical/CryoPodSystem.cs @@ -142,8 +142,7 @@ private void HandleDragDropOn(Entity entity, ref DragDropTarge var doAfterArgs = new DoAfterArgs(EntityManager, args.User, entity.Comp.EntryDelay, new CryoPodDragFinished(), entity, target: args.Dragged, used: entity) { BreakOnDamage = true, - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, NeedHand = false, }; _doAfterSystem.TryStartDoAfter(doAfterArgs); diff --git a/Content.Server/Medical/DefibrillatorSystem.cs b/Content.Server/Medical/DefibrillatorSystem.cs index bf2f8805326..c8410c7c3c5 100644 --- a/Content.Server/Medical/DefibrillatorSystem.cs +++ b/Content.Server/Medical/DefibrillatorSystem.cs @@ -177,8 +177,6 @@ public bool TryStartZap(EntityUid uid, EntityUid target, EntityUid user, Defibri uid, target, uid) { BlockDuplicate = true, - BreakOnUserMove = true, - BreakOnTargetMove = true, BreakOnHandChange = true, NeedHand = true }); diff --git a/Content.Server/Medical/HealingSystem.cs b/Content.Server/Medical/HealingSystem.cs index e7362d481ed..24cf7d2c089 100644 --- a/Content.Server/Medical/HealingSystem.cs +++ b/Content.Server/Medical/HealingSystem.cs @@ -196,12 +196,11 @@ targetDamage.DamageContainerID is not null && var doAfterEventArgs = new DoAfterArgs(EntityManager, user, delay, new HealingDoAfterEvent(), target, target: target, used: uid) { - //Raise the event on the target if it's not self, otherwise raise it on self. - BreakOnUserMove = true, - BreakOnTargetMove = true, // Didn't break on damage as they may be trying to prevent it and // not being able to heal your own ticking damage would be frustrating. NeedHand = true, + BreakOnMove = true, + BreakOnWeightlessMove = false, }; _doAfter.TryStartDoAfter(doAfterEventArgs); diff --git a/Content.Server/Medical/HealthAnalyzerSystem.cs b/Content.Server/Medical/HealthAnalyzerSystem.cs index 0e893c41145..01d0d5c791e 100644 --- a/Content.Server/Medical/HealthAnalyzerSystem.cs +++ b/Content.Server/Medical/HealthAnalyzerSystem.cs @@ -76,9 +76,8 @@ private void OnAfterInteract(Entity uid, ref AfterInter _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, args.User, uid.Comp.ScanDelay, new HealthAnalyzerDoAfterEvent(), uid, target: args.Target, used: uid) { - BreakOnTargetMove = true, - BreakOnUserMove = true, - NeedHand = true + NeedHand = true, + BreakOnMove = true }); } diff --git a/Content.Server/Medical/Stethoscope/StethoscopeSystem.cs b/Content.Server/Medical/Stethoscope/StethoscopeSystem.cs index 9521c14f2e3..f1864bb3a1c 100644 --- a/Content.Server/Medical/Stethoscope/StethoscopeSystem.cs +++ b/Content.Server/Medical/Stethoscope/StethoscopeSystem.cs @@ -107,9 +107,8 @@ private void StartListening(EntityUid scope, EntityUid user, EntityUid target, S { _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, user, comp.Delay, new StethoscopeDoAfterEvent(), scope, target: target, used: scope) { - BreakOnTargetMove = true, - BreakOnUserMove = true, - NeedHand = true + NeedHand = true, + BreakOnMove = true, }); } diff --git a/Content.Server/Ninja/Systems/BatteryDrainerSystem.cs b/Content.Server/Ninja/Systems/BatteryDrainerSystem.cs index 552ee0397fb..59dec556fa0 100644 --- a/Content.Server/Ninja/Systems/BatteryDrainerSystem.cs +++ b/Content.Server/Ninja/Systems/BatteryDrainerSystem.cs @@ -50,9 +50,8 @@ private void OnBeforeInteractHand(EntityUid uid, BatteryDrainerComponent comp, B var doAfterArgs = new DoAfterArgs(EntityManager, uid, comp.DrainTime, new DrainDoAfterEvent(), target: target, eventTarget: uid) { - BreakOnUserMove = true, - BreakOnWeightlessMove = true, // prevent a ninja on a pod remotely draining it MovementThreshold = 0.5f, + BreakOnMove = true, CancelDuplicate = false, AttemptFrequency = AttemptFrequency.StartAndEnd }; diff --git a/Content.Server/Nuke/NukeSystem.cs b/Content.Server/Nuke/NukeSystem.cs index 652852ece28..575ce402d77 100644 --- a/Content.Server/Nuke/NukeSystem.cs +++ b/Content.Server/Nuke/NukeSystem.cs @@ -586,8 +586,7 @@ private void DisarmBombDoafter(EntityUid uid, EntityUid user, NukeComponent nuke var doAfter = new DoAfterArgs(EntityManager, user, nuke.DisarmDoafterLength, new NukeDisarmDoAfterEvent(), uid, target: uid) { BreakOnDamage = true, - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, NeedHand = true }; diff --git a/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs b/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs index 925e50b949d..5b2f09fc41f 100644 --- a/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs @@ -283,9 +283,8 @@ private bool TryDrink(EntityUid user, EntityUid target, DrinkComponent drink, En target: target, used: item) { - BreakOnUserMove = forceDrink, + BreakOnMove = forceDrink, BreakOnDamage = true, - BreakOnTargetMove = forceDrink, MovementThreshold = 0.01f, DistanceThreshold = 1.0f, // Mice and the like can eat without hands. diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index 2b627151339..d87b0bd0b02 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -180,9 +180,8 @@ private void OnFeedFood(Entity entity, ref AfterInteractEvent arg target: target, used: food) { - BreakOnUserMove = forceFeed, + BreakOnMove = forceFeed, BreakOnDamage = true, - BreakOnTargetMove = forceFeed, MovementThreshold = 0.01f, DistanceThreshold = MaxFeedDistance, // Mice and the like can eat without hands. diff --git a/Content.Server/Nutrition/EntitySystems/SmokingSystem.Vape.cs b/Content.Server/Nutrition/EntitySystems/SmokingSystem.Vape.cs index fe0d1d0c168..fb56dffac96 100644 --- a/Content.Server/Nutrition/EntitySystems/SmokingSystem.Vape.cs +++ b/Content.Server/Nutrition/EntitySystems/SmokingSystem.Vape.cs @@ -113,8 +113,7 @@ private void OnVapeInteraction(Entity entity, ref AfterInteractEv var vapeDoAfterEvent = new VapeDoAfterEvent(solution, forced); _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, args.User, delay, vapeDoAfterEvent, entity.Owner, target: args.Target, used: entity.Owner) { - BreakOnTargetMove = true, - BreakOnUserMove = false, + BreakOnMove = false, BreakOnDamage = true }); } diff --git a/Content.Server/Power/Generator/PortableGeneratorSystem.cs b/Content.Server/Power/Generator/PortableGeneratorSystem.cs index e8e9c5b45e3..3cd18d7d569 100644 --- a/Content.Server/Power/Generator/PortableGeneratorSystem.cs +++ b/Content.Server/Power/Generator/PortableGeneratorSystem.cs @@ -84,7 +84,7 @@ private void StartGenerator(EntityUid uid, PortableGeneratorComponent component, _doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, user, component.StartTime, new GeneratorStartedEvent(), uid, uid) { - BreakOnDamage = true, BreakOnTargetMove = true, BreakOnUserMove = true, RequireCanInteract = true, + BreakOnDamage = true, BreakOnMove = true, RequireCanInteract = true, NeedHand = true }); } diff --git a/Content.Server/Resist/EscapeInventorySystem.cs b/Content.Server/Resist/EscapeInventorySystem.cs index 127db7d2b34..94b73ae81fb 100644 --- a/Content.Server/Resist/EscapeInventorySystem.cs +++ b/Content.Server/Resist/EscapeInventorySystem.cs @@ -73,8 +73,7 @@ private void OnRelayMovement(EntityUid uid, CanEscapeInventoryComponent componen var doAfterEventArgs = new DoAfterArgs(EntityManager, user, component.BaseResistTime * multiplier, new EscapeInventoryEvent(), user, target: container) { - BreakOnTargetMove = false, - BreakOnUserMove = true, + BreakOnMove = true, BreakOnDamage = true, NeedHand = false }; diff --git a/Content.Server/Resist/ResistLockerSystem.cs b/Content.Server/Resist/ResistLockerSystem.cs index 7a17a2eba19..2ab277d0f1a 100644 --- a/Content.Server/Resist/ResistLockerSystem.cs +++ b/Content.Server/Resist/ResistLockerSystem.cs @@ -47,8 +47,7 @@ private void AttemptResist(EntityUid user, EntityUid target, EntityStorageCompon var doAfterEventArgs = new DoAfterArgs(EntityManager, user, resistLockerComponent.ResistTime, new ResistLockerDoAfterEvent(), target, target: target) { - BreakOnTargetMove = false, - BreakOnUserMove = true, + BreakOnMove = true, BreakOnDamage = true, NeedHand = false //No hands 'cause we be kickin' }; diff --git a/Content.Server/Revenant/EntitySystems/RevenantSystem.Abilities.cs b/Content.Server/Revenant/EntitySystems/RevenantSystem.Abilities.cs index eb6eb5a426f..0ac6ccd613c 100644 --- a/Content.Server/Revenant/EntitySystems/RevenantSystem.Abilities.cs +++ b/Content.Server/Revenant/EntitySystems/RevenantSystem.Abilities.cs @@ -85,7 +85,7 @@ private void BeginSoulSearchDoAfter(EntityUid uid, EntityUid target, RevenantCom { var searchDoAfter = new DoAfterArgs(EntityManager, uid, revenant.SoulSearchDuration, new SoulEvent(), uid, target: target) { - BreakOnUserMove = true, + BreakOnMove = true, BreakOnDamage = true, DistanceThreshold = 2 }; @@ -140,7 +140,7 @@ private void BeginHarvestDoAfter(EntityUid uid, EntityUid target, RevenantCompon var doAfter = new DoAfterArgs(EntityManager, uid, revenant.HarvestDebuffs.X, new HarvestEvent(), uid, target: target) { DistanceThreshold = 2, - BreakOnUserMove = true, + BreakOnMove = true, BreakOnDamage = true, RequireCanInteract = false, // stuns itself }; diff --git a/Content.Server/SprayPainter/SprayPainterSystem.cs b/Content.Server/SprayPainter/SprayPainterSystem.cs index e49c49c1da0..a8024e2d77b 100644 --- a/Content.Server/SprayPainter/SprayPainterSystem.cs +++ b/Content.Server/SprayPainter/SprayPainterSystem.cs @@ -55,8 +55,7 @@ private void OnPipeInteract(Entity ent, ref InteractUsi var doAfterEventArgs = new DoAfterArgs(EntityManager, args.User, painter.PipeSprayTime, new SprayPainterPipeDoAfterEvent(color), args.Used, target: ent, used: args.Used) { - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, BreakOnDamage = true, CancelDuplicate = true, // multiple pipes can be sprayed at once just not the same one diff --git a/Content.Server/Sticky/Systems/StickySystem.cs b/Content.Server/Sticky/Systems/StickySystem.cs index 2d1104e2ceb..effe1b72f71 100644 --- a/Content.Server/Sticky/Systems/StickySystem.cs +++ b/Content.Server/Sticky/Systems/StickySystem.cs @@ -93,8 +93,7 @@ private bool StartSticking(EntityUid uid, EntityUid user, EntityUid target, Stic // start sticking object to target _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, user, delay, new StickyDoAfterEvent(), uid, target: target, used: uid) { - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, NeedHand = true }); } @@ -148,8 +147,7 @@ private void StartUnsticking(EntityUid uid, EntityUid user, StickyComponent? com // start unsticking object _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, user, delay, new StickyDoAfterEvent(), uid, target: uid) { - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, NeedHand = true }); } diff --git a/Content.Server/Strip/StrippableSystem.cs b/Content.Server/Strip/StrippableSystem.cs index 50a9cb9b691..7222ef6e0a3 100644 --- a/Content.Server/Strip/StrippableSystem.cs +++ b/Content.Server/Strip/StrippableSystem.cs @@ -225,8 +225,7 @@ bool Check() Hidden = ev.Stealth, AttemptFrequency = AttemptFrequency.EveryTick, BreakOnDamage = true, - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, NeedHand = true, DuplicateCondition = DuplicateConditions.SameTool // Block any other DoAfters featuring this same entity. }; @@ -300,8 +299,7 @@ bool Check() Hidden = ev.Stealth, AttemptFrequency = AttemptFrequency.EveryTick, BreakOnDamage = true, - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, NeedHand = true, DuplicateCondition = DuplicateConditions.SameTool }; @@ -362,8 +360,7 @@ bool Check() Hidden = ev.Stealth, AttemptFrequency = AttemptFrequency.EveryTick, BreakOnDamage = true, - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, NeedHand = true, BreakOnHandChange = false, // allow simultaneously removing multiple items. DuplicateCondition = DuplicateConditions.SameTool @@ -440,8 +437,7 @@ bool Check() Hidden = ev.Stealth, AttemptFrequency = AttemptFrequency.EveryTick, BreakOnDamage = true, - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, NeedHand = true, BreakOnHandChange = false, // allow simultaneously removing multiple items. DuplicateCondition = DuplicateConditions.SameTool diff --git a/Content.Server/Teleportation/HandTeleporterSystem.cs b/Content.Server/Teleportation/HandTeleporterSystem.cs index 29cde5d741d..3d988b09161 100644 --- a/Content.Server/Teleportation/HandTeleporterSystem.cs +++ b/Content.Server/Teleportation/HandTeleporterSystem.cs @@ -58,7 +58,7 @@ private void OnUseInHand(EntityUid uid, HandTeleporterComponent component, UseIn var doafterArgs = new DoAfterArgs(EntityManager, args.User, component.PortalCreationDelay, new TeleporterDoAfterEvent(), uid, used: uid) { BreakOnDamage = true, - BreakOnUserMove = true, + BreakOnMove = true, MovementThreshold = 0.5f, }; diff --git a/Content.Server/Wires/WiresSystem.cs b/Content.Server/Wires/WiresSystem.cs index 0f9ee8b0f75..a2deb11fe78 100644 --- a/Content.Server/Wires/WiresSystem.cs +++ b/Content.Server/Wires/WiresSystem.cs @@ -701,7 +701,7 @@ private void TryDoWireAction(EntityUid target, EntityUid user, EntityUid toolEnt { NeedHand = true, BreakOnDamage = true, - BreakOnUserMove = true + BreakOnMove = true }; _doAfter.TryStartDoAfter(args); diff --git a/Content.Shared/Burial/BurialSystem.cs b/Content.Shared/Burial/BurialSystem.cs index 937784ca2ab..e19ac2e9c67 100644 --- a/Content.Shared/Burial/BurialSystem.cs +++ b/Content.Shared/Burial/BurialSystem.cs @@ -45,8 +45,7 @@ private void OnInteractUsing(EntityUid uid, GraveComponent component, InteractUs { var doAfterEventArgs = new DoAfterArgs(EntityManager, args.User, component.DigDelay / shovel.SpeedModifier, new GraveDiggingDoAfterEvent(), uid, target: args.Target, used: uid) { - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, BreakOnDamage = true, NeedHand = true, BreakOnHandChange = true @@ -159,8 +158,7 @@ private void OnRelayMovement(EntityUid uid, GraveComponent component, ref Contai var doAfterEventArgs = new DoAfterArgs(EntityManager, args.Entity, component.DigDelay / component.DigOutByHandModifier, new GraveDiggingDoAfterEvent(), uid, target: uid) { NeedHand = false, - BreakOnUserMove = true, - BreakOnTargetMove = false, + BreakOnMove = true, BreakOnHandChange = false, BreakOnDamage = false }; diff --git a/Content.Shared/Climbing/Systems/BonkSystem.cs b/Content.Shared/Climbing/Systems/BonkSystem.cs index e91d1eadbec..149abee8b02 100644 --- a/Content.Shared/Climbing/Systems/BonkSystem.cs +++ b/Content.Shared/Climbing/Systems/BonkSystem.cs @@ -82,8 +82,7 @@ private void OnDragDrop(EntityUid uid, Components.BonkableComponent component, r var doAfterArgs = new DoAfterArgs(EntityManager, args.Dragged, component.BonkDelay, new BonkDoAfterEvent(), uid, target: uid) { - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, BreakOnDamage = true }; diff --git a/Content.Shared/Climbing/Systems/ClimbSystem.cs b/Content.Shared/Climbing/Systems/ClimbSystem.cs index 7c760f2c5de..fcf473f9f1b 100644 --- a/Content.Shared/Climbing/Systems/ClimbSystem.cs +++ b/Content.Shared/Climbing/Systems/ClimbSystem.cs @@ -211,8 +211,7 @@ public bool TryClimb( target: climbable, used: entityToMove) { - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, BreakOnDamage = true }; diff --git a/Content.Shared/Clothing/EntitySystems/ToggleableClothingSystem.cs b/Content.Shared/Clothing/EntitySystems/ToggleableClothingSystem.cs index 0138de7a98f..5530a5982bb 100644 --- a/Content.Shared/Clothing/EntitySystems/ToggleableClothingSystem.cs +++ b/Content.Shared/Clothing/EntitySystems/ToggleableClothingSystem.cs @@ -100,7 +100,7 @@ private void StartDoAfter(EntityUid user, EntityUid item, EntityUid wearer, Togg var args = new DoAfterArgs(EntityManager, user, time, new ToggleClothingDoAfterEvent(), item, wearer, item) { BreakOnDamage = true, - BreakOnTargetMove = true, + BreakOnMove = true, // This should just re-use the BUI range checks & cancel the do after if the BUI closes. But that is all // server-side at the moment. // TODO BUI REFACTOR. diff --git a/Content.Shared/Cuffs/SharedCuffableSystem.cs b/Content.Shared/Cuffs/SharedCuffableSystem.cs index fc005fd30fa..4df1514b56e 100644 --- a/Content.Shared/Cuffs/SharedCuffableSystem.cs +++ b/Content.Shared/Cuffs/SharedCuffableSystem.cs @@ -479,10 +479,11 @@ public bool TryCuffing(EntityUid user, EntityUid target, EntityUid handcuff, Han var doAfterEventArgs = new DoAfterArgs(EntityManager, user, cuffTime, new AddCuffDoAfterEvent(), handcuff, target, handcuff) { - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, + BreakOnWeightlessMove = false, BreakOnDamage = true, - NeedHand = true + NeedHand = true, + DistanceThreshold = 0.3f }; if (!_doAfter.TryStartDoAfter(doAfterEventArgs)) @@ -574,11 +575,12 @@ public void TryUncuff(EntityUid target, EntityUid user, EntityUid? cuffsToRemove var doAfterEventArgs = new DoAfterArgs(EntityManager, user, uncuffTime, new UnCuffDoAfterEvent(), target, target, cuffsToRemove) { - BreakOnUserMove = true, - BreakOnTargetMove = true, + BreakOnMove = true, + BreakOnWeightlessMove = false, BreakOnDamage = true, NeedHand = true, RequireCanInteract = false, // Trust in UncuffAttemptEvent + DistanceThreshold = 0.3f }; if (!_doAfter.TryStartDoAfter(doAfterEventArgs)) diff --git a/Content.Shared/Devour/SharedDevourSystem.cs b/Content.Shared/Devour/SharedDevourSystem.cs index a2b788f3f38..3d73b14dd35 100644 --- a/Content.Shared/Devour/SharedDevourSystem.cs +++ b/Content.Shared/Devour/SharedDevourSystem.cs @@ -57,8 +57,7 @@ protected void OnDevourAction(EntityUid uid, DevourerComponent component, Devour _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, uid, component.DevourTime, new DevourDoAfterEvent(), uid, target: target, used: uid) { - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, }); break; default: @@ -76,8 +75,7 @@ protected void OnDevourAction(EntityUid uid, DevourerComponent component, Devour _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, uid, component.StructureDevourTime, new DevourDoAfterEvent(), uid, target: target, used: uid) { - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, }); } } diff --git a/Content.Shared/DoAfter/DoAfter.cs b/Content.Shared/DoAfter/DoAfter.cs index d999b370b3f..f77a6dc272e 100644 --- a/Content.Shared/DoAfter/DoAfter.cs +++ b/Content.Shared/DoAfter/DoAfter.cs @@ -82,12 +82,6 @@ public DoAfter(ushort index, DoAfterArgs args, TimeSpan startTime) { Index = index; - if (args.Target == null) - { - DebugTools.Assert(!args.BreakOnTargetMove); - args.BreakOnTargetMove = false; - } - Args = args; StartTime = startTime; } diff --git a/Content.Shared/DoAfter/DoAfterArgs.cs b/Content.Shared/DoAfter/DoAfterArgs.cs index d2729ad3c64..d96ea84e172 100644 --- a/Content.Shared/DoAfter/DoAfterArgs.cs +++ b/Content.Shared/DoAfter/DoAfterArgs.cs @@ -92,29 +92,23 @@ public sealed partial class DoAfterArgs public bool BreakOnHandChange = true; /// - /// If do_after stops when the user moves + /// If do_after stops when the user or target moves /// - [DataField("breakOnUserMove")] - public bool BreakOnUserMove; - - /// - /// If this is true then any movement, even when weightless, will break the doafter. - /// When there is no gravity, BreakOnUserMove is ignored. If it is false to begin with nothing will change. - /// - [DataField("breakOnWeightlessMove")] - public bool BreakOnWeightlessMove; + [DataField] + public bool BreakOnMove; /// - /// If do_after stops when the target moves (if there is a target) + /// Whether to break on movement when the user is weightless. + /// This does nothing if is false. /// - [DataField("breakOnTargetMove")] - public bool BreakOnTargetMove; + [DataField] + public bool BreakOnWeightlessMove = true; /// /// Threshold for user and target movement /// [DataField("movementThreshold")] - public float MovementThreshold = 0.1f; + public float MovementThreshold = 0.3f; /// /// Threshold for distance user from the used OR target entities. @@ -250,9 +244,8 @@ public DoAfterArgs(DoAfterArgs other) Broadcast = other.Broadcast; NeedHand = other.NeedHand; BreakOnHandChange = other.BreakOnHandChange; - BreakOnUserMove = other.BreakOnUserMove; + BreakOnMove = other.BreakOnMove; BreakOnWeightlessMove = other.BreakOnWeightlessMove; - BreakOnTargetMove = other.BreakOnTargetMove; MovementThreshold = other.MovementThreshold; DistanceThreshold = other.DistanceThreshold; BreakOnDamage = other.BreakOnDamage; diff --git a/Content.Shared/DoAfter/SharedDoAfterSystem.Update.cs b/Content.Shared/DoAfter/SharedDoAfterSystem.Update.cs index abd8888f583..455491f5242 100644 --- a/Content.Shared/DoAfter/SharedDoAfterSystem.Update.cs +++ b/Content.Shared/DoAfter/SharedDoAfterSystem.Update.cs @@ -1,5 +1,7 @@ using Content.Shared.Gravity; using Content.Shared.Hands.Components; +using Content.Shared.Interaction; +using Content.Shared.Physics; using Robust.Shared.Utility; namespace Content.Shared.DoAfter; @@ -8,6 +10,7 @@ public abstract partial class SharedDoAfterSystem : EntitySystem { [Dependency] private readonly IDynamicTypeFactory _factory = default!; [Dependency] private readonly SharedGravitySystem _gravity = default!; + [Dependency] private readonly SharedInteractionSystem _interaction = default!; private DoAfter[] _doAfters = Array.Empty(); @@ -163,24 +166,53 @@ private bool ShouldCancel(DoAfter doAfter, return true; // TODO: Re-use existing xform query for these calculations. - // when there is no gravity you will be drifting 99% of the time making many doafters impossible - // so this just ignores your movement if you are weightless (unless the doafter sets BreakOnWeightlessMove then moving will still break it) - if (args.BreakOnUserMove - && !userXform.Coordinates.InRange(EntityManager, _transform, doAfter.UserPosition, args.MovementThreshold) - && (args.BreakOnWeightlessMove || !_gravity.IsWeightless(args.User, xform: userXform))) - return true; - - if (args.BreakOnTargetMove) + if (args.BreakOnMove && !(!args.BreakOnWeightlessMove && _gravity.IsWeightless(args.User, xform: userXform))) { - DebugTools.Assert(targetXform != null, "Break on move is true, but no target specified?"); - if (targetXform != null && targetXform.Coordinates.TryDistance(EntityManager, userXform.Coordinates, out var distance)) + // Whether the user has moved too much from their original position. + if (!userXform.Coordinates.InRange(EntityManager, _transform, doAfter.UserPosition, args.MovementThreshold)) + return true; + + // Whether the distance between the user and target(if any) has changed too much. + if (targetXform != null && + targetXform.Coordinates.TryDistance(EntityManager, userXform.Coordinates, out var distance)) { - // once the target moves too far from you the do after breaks if (Math.Abs(distance - doAfter.TargetDistance) > args.MovementThreshold) return true; } } + // Whether the user and the target are too far apart. + if (args.Target != null) + { + if (args.DistanceThreshold != null) + { + if (!_interaction.InRangeUnobstructed(args.User, args.Target.Value, args.DistanceThreshold.Value)) + return true; + } + else + { + if (!_interaction.InRangeUnobstructed(args.User, args.Target.Value)) + return true; + } + } + + // Whether the distance between the tool and the user has grown too much. + if (args.Used != null) + { + if (args.DistanceThreshold != null) + { + if (!_interaction.InRangeUnobstructed(args.User, + args.Used.Value, + args.DistanceThreshold.Value)) + return true; + } + else + { + if (!_interaction.InRangeUnobstructed(args.User,args.Used.Value)) + return true; + } + } + if (args.AttemptFrequency == AttemptFrequency.EveryTick && !TryAttemptEvent(doAfter)) return true; @@ -199,23 +231,6 @@ private bool ShouldCancel(DoAfter doAfter, if (args.RequireCanInteract && !_actionBlocker.CanInteract(args.User, args.Target)) return true; - if (args.DistanceThreshold != null) - { - if (targetXform != null - && !args.User.Equals(args.Target) - && !userXform.Coordinates.InRange(EntityManager, _transform, targetXform.Coordinates, - args.DistanceThreshold.Value)) - { - return true; - } - - if (usedXform != null - && !userXform.Coordinates.InRange(EntityManager, _transform, usedXform.Coordinates, - args.DistanceThreshold.Value)) - { - return true; - } - } return false; } diff --git a/Content.Shared/DoAfter/SharedDoAfterSystem.cs b/Content.Shared/DoAfter/SharedDoAfterSystem.cs index 382ecb5a9a5..1e2e9392479 100644 --- a/Content.Shared/DoAfter/SharedDoAfterSystem.cs +++ b/Content.Shared/DoAfter/SharedDoAfterSystem.cs @@ -214,12 +214,11 @@ public bool TryStartDoAfter(DoAfterArgs args, [NotNullWhen(true)] out DoAfterId? args.NetUser = GetNetEntity(args.User); args.NetEventTarget = GetNetEntity(args.EventTarget); - if (args.BreakOnUserMove || args.BreakOnTargetMove) + if (args.BreakOnMove) doAfter.UserPosition = Transform(args.User).Coordinates; - if (args.Target != null && args.BreakOnTargetMove) + if (args.Target != null && args.BreakOnMove) { - // Target should never be null if the bool is set. var targetPosition = Transform(args.Target.Value).Coordinates; doAfter.UserPosition.TryDistance(EntityManager, targetPosition, out doAfter.TargetDistance); } diff --git a/Content.Shared/Inventory/InventorySystem.Equip.cs b/Content.Shared/Inventory/InventorySystem.Equip.cs index 24006b0c9f9..7c9279df20d 100644 --- a/Content.Shared/Inventory/InventorySystem.Equip.cs +++ b/Content.Shared/Inventory/InventorySystem.Equip.cs @@ -168,8 +168,7 @@ public bool TryEquip(EntityUid actor, EntityUid target, EntityUid itemUid, strin { BlockDuplicate = true, BreakOnHandChange = true, - BreakOnUserMove = true, - BreakOnTargetMove = true, + BreakOnMove = true, CancelDuplicate = true, RequireCanInteract = true, NeedHand = true @@ -414,8 +413,7 @@ public bool TryUnequip( { BlockDuplicate = true, BreakOnHandChange = true, - BreakOnUserMove = true, - BreakOnTargetMove = true, + BreakOnMove = true, CancelDuplicate = true, RequireCanInteract = true, NeedHand = true diff --git a/Content.Shared/Lock/LockSystem.cs b/Content.Shared/Lock/LockSystem.cs index 53c199e4108..74cf5496d9a 100644 --- a/Content.Shared/Lock/LockSystem.cs +++ b/Content.Shared/Lock/LockSystem.cs @@ -111,7 +111,7 @@ public bool TryLock(EntityUid uid, EntityUid user, LockComponent? lockComp = nul return _doAfter.TryStartDoAfter( new DoAfterArgs(EntityManager, user, lockComp.LockTime, new LockDoAfter(), uid, uid) { - BreakOnDamage = true, BreakOnTargetMove = true, BreakOnUserMove = true, RequireCanInteract = true, + BreakOnDamage = true, BreakOnMove = true, RequireCanInteract = true, NeedHand = true }); } @@ -187,7 +187,7 @@ public bool TryUnlock(EntityUid uid, EntityUid user, LockComponent? lockComp = n return _doAfter.TryStartDoAfter( new DoAfterArgs(EntityManager, user, lockComp.LockTime, new UnlockDoAfter(), uid, uid) { - BreakOnDamage = true, BreakOnTargetMove = true, BreakOnUserMove = true, RequireCanInteract = true, + BreakOnDamage = true, BreakOnMove = true, RequireCanInteract = true, NeedHand = true }); } diff --git a/Content.Shared/Mech/EntitySystems/SharedMechSystem.cs b/Content.Shared/Mech/EntitySystems/SharedMechSystem.cs index 7e44dea5078..df0d7b78f0b 100644 --- a/Content.Shared/Mech/EntitySystems/SharedMechSystem.cs +++ b/Content.Shared/Mech/EntitySystems/SharedMechSystem.cs @@ -434,7 +434,7 @@ private void OnDragDrop(EntityUid uid, MechComponent component, ref DragDropTarg var doAfterEventArgs = new DoAfterArgs(EntityManager, args.Dragged, component.EntryDelay, new MechEntryEvent(), uid, target: uid) { - BreakOnUserMove = true, + BreakOnMove = true, }; _doAfter.TryStartDoAfter(doAfterEventArgs); diff --git a/Content.Shared/Projectiles/SharedProjectileSystem.cs b/Content.Shared/Projectiles/SharedProjectileSystem.cs index f40a7a0363b..372dc8a75d1 100644 --- a/Content.Shared/Projectiles/SharedProjectileSystem.cs +++ b/Content.Shared/Projectiles/SharedProjectileSystem.cs @@ -53,10 +53,7 @@ private void OnEmbedActivate(EntityUid uid, EmbeddableProjectileComponent compon args.Handled = true; _doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, args.User, component.RemovalTime.Value, - new RemoveEmbeddedProjectileEvent(), eventTarget: uid, target: uid) - { - DistanceThreshold = SharedInteractionSystem.InteractionRange, - }); + new RemoveEmbeddedProjectileEvent(), eventTarget: uid, target: uid)); } private void OnEmbedRemove(EntityUid uid, EmbeddableProjectileComponent component, RemoveEmbeddedProjectileEvent args) diff --git a/Content.Shared/Prying/Systems/PryingSystem.cs b/Content.Shared/Prying/Systems/PryingSystem.cs index fa7a135e6c5..69a63f72b54 100644 --- a/Content.Shared/Prying/Systems/PryingSystem.cs +++ b/Content.Shared/Prying/Systems/PryingSystem.cs @@ -136,8 +136,7 @@ private bool StartPry(EntityUid target, EntityUid user, EntityUid? tool, float t var doAfterArgs = new DoAfterArgs(EntityManager, user, TimeSpan.FromSeconds(modEv.BaseTime * modEv.PryTimeModifier / toolModifier), new DoorPryDoAfterEvent(), target, target, tool) { BreakOnDamage = true, - BreakOnUserMove = true, - BreakOnWeightlessMove = true, + BreakOnMove = true, }; if (tool != null) diff --git a/Content.Shared/RCD/Systems/RCDSystem.cs b/Content.Shared/RCD/Systems/RCDSystem.cs index 187c8d8a9d8..f767d0b99c0 100644 --- a/Content.Shared/RCD/Systems/RCDSystem.cs +++ b/Content.Shared/RCD/Systems/RCDSystem.cs @@ -104,8 +104,7 @@ private void OnAfterInteract(EntityUid uid, RCDComponent comp, AfterInteractEven BreakOnDamage = true, NeedHand = true, BreakOnHandChange = true, - BreakOnUserMove = true, - BreakOnTargetMove = args.Target != null, + BreakOnMove = true, AttemptFrequency = AttemptFrequency.EveryTick }; diff --git a/Content.Shared/RatKing/SharedRatKingSystem.cs b/Content.Shared/RatKing/SharedRatKingSystem.cs index d7a8ee5460d..ea489e332db 100644 --- a/Content.Shared/RatKing/SharedRatKingSystem.cs +++ b/Content.Shared/RatKing/SharedRatKingSystem.cs @@ -119,7 +119,7 @@ private void OnGetVerb(EntityUid uid, RatKingRummageableComponent component, Get { BlockDuplicate = true, BreakOnDamage = true, - BreakOnUserMove = true, + BreakOnMove = true, DistanceThreshold = 2f }); } diff --git a/Content.Shared/Research/Systems/SharedResearchStealerSystem.cs b/Content.Shared/Research/Systems/SharedResearchStealerSystem.cs index 1fffa8c0257..070ff40b70d 100644 --- a/Content.Shared/Research/Systems/SharedResearchStealerSystem.cs +++ b/Content.Shared/Research/Systems/SharedResearchStealerSystem.cs @@ -46,8 +46,8 @@ private void OnBeforeInteractHand(EntityUid uid, ResearchStealerComponent comp, var doAfterArgs = new DoAfterArgs(EntityManager, uid, comp.Delay, new ResearchStealDoAfterEvent(), target: target, used: uid, eventTarget: uid) { BreakOnDamage = true, - BreakOnUserMove = true, - MovementThreshold = 0.5f + BreakOnMove = true, + MovementThreshold = 0.5f, }; _doAfter.TryStartDoAfter(doAfterArgs); diff --git a/Content.Shared/Salvage/Fulton/SharedFultonSystem.cs b/Content.Shared/Salvage/Fulton/SharedFultonSystem.cs index 0599482bbef..b355ae58730 100644 --- a/Content.Shared/Salvage/Fulton/SharedFultonSystem.cs +++ b/Content.Shared/Salvage/Fulton/SharedFultonSystem.cs @@ -153,8 +153,7 @@ private void OnFultonInteract(EntityUid uid, FultonComponent component, AfterInt { CancelDuplicate = true, MovementThreshold = 0.5f, - BreakOnUserMove = true, - BreakOnTargetMove = true, + BreakOnMove = true, Broadcast = true, NeedHand = true, }); diff --git a/Content.Shared/Sericulture/SericultureSystem.cs b/Content.Shared/Sericulture/SericultureSystem.cs index 514ec79f68e..f7586cc1ec3 100644 --- a/Content.Shared/Sericulture/SericultureSystem.cs +++ b/Content.Shared/Sericulture/SericultureSystem.cs @@ -61,7 +61,7 @@ private void OnSericultureStart(EntityUid uid, SericultureComponent comp, Sericu var doAfter = new DoAfterArgs(EntityManager, uid, comp.ProductionLength, new SericultureDoAfterEvent(), uid) { // I'm not sure if more things should be put here, but imo ideally it should probably be set in the component/YAML. Not sure if this is currently possible. - BreakOnUserMove = true, + BreakOnMove = true, BlockDuplicate = true, BreakOnDamage = true, CancelDuplicate = true, diff --git a/Content.Shared/Species/Systems/ReformSystem.cs b/Content.Shared/Species/Systems/ReformSystem.cs index dc2ce3fb900..d2ceecf28e8 100644 --- a/Content.Shared/Species/Systems/ReformSystem.cs +++ b/Content.Shared/Species/Systems/ReformSystem.cs @@ -69,7 +69,7 @@ private void OnReform(EntityUid uid, ReformComponent comp, ReformEvent args) // Create a doafter & start it var doAfter = new DoAfterArgs(EntityManager, uid, comp.ReformTime, new ReformDoAfterEvent(), uid) { - BreakOnUserMove = true, + BreakOnMove = true, BlockDuplicate = true, BreakOnDamage = true, CancelDuplicate = true, @@ -89,7 +89,7 @@ private void OnDoAfter(EntityUid uid, ReformComponent comp, ReformDoAfterEvent a return; // Spawn a new entity - // This is, to an extent, taken from polymorph. I don't use polymorph for various reasons- most notably that this is permanent. + // This is, to an extent, taken from polymorph. I don't use polymorph for various reasons- most notably that this is permanent. var child = Spawn(comp.ReformPrototype, Transform(uid).Coordinates); // This transfers the mind to the new entity @@ -105,7 +105,7 @@ private void OnZombified(EntityUid uid, ReformComponent comp, ref EntityZombifie _actionsSystem.RemoveAction(uid, comp.ActionEntity); // Zombies can't reform } - public sealed partial class ReformEvent : InstantActionEvent { } + public sealed partial class ReformEvent : InstantActionEvent { } [Serializable, NetSerializable] public sealed partial class ReformDoAfterEvent : SimpleDoAfterEvent { } diff --git a/Content.Shared/SprayPainter/SharedSprayPainterSystem.cs b/Content.Shared/SprayPainter/SharedSprayPainterSystem.cs index 529e321f8da..b238c6fc722 100644 --- a/Content.Shared/SprayPainter/SharedSprayPainterSystem.cs +++ b/Content.Shared/SprayPainter/SharedSprayPainterSystem.cs @@ -131,8 +131,7 @@ private void OnAirlockInteract(Entity ent, ref Intera var doAfterEventArgs = new DoAfterArgs(EntityManager, args.User, painter.AirlockSprayTime, new SprayPainterDoorDoAfterEvent(sprite, style.Department), args.Used, target: ent, used: args.Used) { - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, BreakOnDamage = true, NeedHand = true }; diff --git a/Content.Shared/Storage/EntitySystems/DumpableSystem.cs b/Content.Shared/Storage/EntitySystems/DumpableSystem.cs index 04f7231416f..2b804cf7324 100644 --- a/Content.Shared/Storage/EntitySystems/DumpableSystem.cs +++ b/Content.Shared/Storage/EntitySystems/DumpableSystem.cs @@ -133,8 +133,7 @@ private void StartDoAfter(EntityUid storageUid, EntityUid? targetUid, EntityUid _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, userUid, delay, new DumpableDoAfterEvent(), storageUid, target: targetUid, used: storageUid) { - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, NeedHand = true }); } diff --git a/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs b/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs index 11075b4a4c7..4cc21c1912c 100644 --- a/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs +++ b/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs @@ -285,7 +285,7 @@ private void AfterInteract(EntityUid uid, StorageComponent storageComp, AfterInt var doAfterArgs = new DoAfterArgs(EntityManager, args.User, delay, new AreaPickupDoAfterEvent(GetNetEntityList(validStorables)), uid, target: uid) { BreakOnDamage = true, - BreakOnUserMove = true, + BreakOnMove = true, NeedHand = true }; diff --git a/Content.Shared/Tools/Systems/SharedToolSystem.cs b/Content.Shared/Tools/Systems/SharedToolSystem.cs index ee15b1e025a..4204d7547e0 100644 --- a/Content.Shared/Tools/Systems/SharedToolSystem.cs +++ b/Content.Shared/Tools/Systems/SharedToolSystem.cs @@ -124,8 +124,8 @@ public bool UseTool( var doAfterArgs = new DoAfterArgs(EntityManager, user, delay / toolComponent.SpeedModifier, toolEvent, tool, target: target, used: tool) { BreakOnDamage = true, - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, + BreakOnWeightlessMove = false, NeedHand = tool != user, AttemptFrequency = IsWelder(tool) ? AttemptFrequency.EveryTick : AttemptFrequency.Never }; diff --git a/Content.Shared/VendingMachines/SharedVendingMachineSystem.Restock.cs b/Content.Shared/VendingMachines/SharedVendingMachineSystem.Restock.cs index 87e2f0890a2..6aef4d0949a 100644 --- a/Content.Shared/VendingMachines/SharedVendingMachineSystem.Restock.cs +++ b/Content.Shared/VendingMachines/SharedVendingMachineSystem.Restock.cs @@ -70,8 +70,7 @@ private void OnAfterInteract(EntityUid uid, VendingMachineRestockComponent compo var doAfterArgs = new DoAfterArgs(EntityManager, args.User, (float) component.RestockDelay.TotalSeconds, new RestockDoAfterEvent(), target, target: target, used: uid) { - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, BreakOnDamage = true, NeedHand = true }; diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs index a8f7ee23956..261243fea35 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs @@ -74,8 +74,7 @@ private void OnBallisticAfterInteract(EntityUid uid, BallisticAmmoProviderCompon _doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, args.User, component.FillDelay, new AmmoFillDoAfterEvent(), used: uid, target: args.Target, eventTarget: uid) { - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, BreakOnDamage = false, NeedHand = true });