diff --git a/Content.Client/Clothing/ClothingSystem.cs b/Content.Client/Clothing/ClothingSystem.cs index 702fd4e6b4..f640ef028f 100644 --- a/Content.Client/Clothing/ClothingSystem.cs +++ b/Content.Client/Clothing/ClothingSystem.cs @@ -251,7 +251,7 @@ public sealed class ClothingSystem : EntitySystem if (ev.Layers.Count == 0) { - RaiseLocalEvent(equipment, new EquipmentVisualsUpdatedEvent(equipee, slot, revealedLayers)); + RaiseLocalEvent(equipment, new EquipmentVisualsUpdatedEvent(equipee, slot, revealedLayers), true); return; } @@ -294,6 +294,6 @@ public sealed class ClothingSystem : EntitySystem layer.Offset += slotDef.Offset; } - RaiseLocalEvent(equipment, new EquipmentVisualsUpdatedEvent(equipee, slot, revealedLayers)); + RaiseLocalEvent(equipment, new EquipmentVisualsUpdatedEvent(equipee, slot, revealedLayers), true); } } diff --git a/Content.Client/DragDrop/DragDropSystem.cs b/Content.Client/DragDrop/DragDropSystem.cs index 0d3ef4c143..e1dfcf8586 100644 --- a/Content.Client/DragDrop/DragDropSystem.cs +++ b/Content.Client/DragDrop/DragDropSystem.cs @@ -429,7 +429,7 @@ namespace Content.Client.DragDrop // CanInteract() doesn't support checking a second "target" entity. // Doing so manually: var ev = new GettingInteractedWithAttemptEvent(eventArgs.User, eventArgs.Dragged); - RaiseLocalEvent(eventArgs.Dragged, ev); + RaiseLocalEvent(eventArgs.Dragged, ev, true); if (ev.Cancelled) return false; diff --git a/Content.Client/Hands/Systems/HandsSystem.cs b/Content.Client/Hands/Systems/HandsSystem.cs index 1880f838bb..cf12b6527e 100644 --- a/Content.Client/Hands/Systems/HandsSystem.cs +++ b/Content.Client/Hands/Systems/HandsSystem.cs @@ -208,7 +208,7 @@ namespace Content.Client.Hands if (hand.HeldEntity == null) { // the held item was removed. - RaiseLocalEvent(held, new HeldVisualsUpdatedEvent(uid, revealedLayers)); + RaiseLocalEvent(held, new HeldVisualsUpdatedEvent(uid, revealedLayers), true); return; } @@ -217,7 +217,7 @@ namespace Content.Client.Hands if (ev.Layers.Count == 0) { - RaiseLocalEvent(held, new HeldVisualsUpdatedEvent(uid, revealedLayers)); + RaiseLocalEvent(held, new HeldVisualsUpdatedEvent(uid, revealedLayers), true); return; } @@ -244,7 +244,7 @@ namespace Content.Client.Hands sprite.LayerSetData(index, layerData); } - RaiseLocalEvent(held, new HeldVisualsUpdatedEvent(uid, revealedLayers)); + RaiseLocalEvent(held, new HeldVisualsUpdatedEvent(uid, revealedLayers), true); } private void OnVisualsChanged(EntityUid uid, HandsComponent component, VisualsChangedEvent args) diff --git a/Content.Client/Items/Systems/ItemSystem.cs b/Content.Client/Items/Systems/ItemSystem.cs index 96c6c4ba0f..333be889db 100644 --- a/Content.Client/Items/Systems/ItemSystem.cs +++ b/Content.Client/Items/Systems/ItemSystem.cs @@ -33,7 +33,7 @@ public sealed class ItemSystem : SharedItemSystem // if the item is in a container, it might be equipped to hands or inventory slots --> update visuals. if (_containerSystem.TryGetContainingContainer(uid, out var container)) - RaiseLocalEvent(container.Owner, new VisualsChangedEvent(uid, container.ID)); + RaiseLocalEvent(container.Owner, new VisualsChangedEvent(uid, container.ID), true); } /// diff --git a/Content.Client/Items/UI/ItemStatusPanel.cs b/Content.Client/Items/UI/ItemStatusPanel.cs index 048fca7c81..90b1ff8770 100644 --- a/Content.Client/Items/UI/ItemStatusPanel.cs +++ b/Content.Client/Items/UI/ItemStatusPanel.cs @@ -194,7 +194,7 @@ namespace Content.Client.Items.UI } var collectMsg = new ItemStatusCollectMessage(); - _entityManager.EventBus.RaiseLocalEvent(_entity!.Value, collectMsg); + _entityManager.EventBus.RaiseLocalEvent(_entity!.Value, collectMsg, true); foreach (var control in collectMsg.Controls) { diff --git a/Content.Client/Verbs/VerbSystem.cs b/Content.Client/Verbs/VerbSystem.cs index 5a3385a604..41690a12a7 100644 --- a/Content.Client/Verbs/VerbSystem.cs +++ b/Content.Client/Verbs/VerbSystem.cs @@ -238,7 +238,7 @@ namespace Content.Client.Verbs if (verb.ExecutionEventArgs != null) { if (verb.EventTarget.IsValid()) - RaiseLocalEvent(verb.EventTarget, verb.ExecutionEventArgs); + RaiseLocalEvent(verb.EventTarget, verb.ExecutionEventArgs, true); else RaiseLocalEvent(verb.ExecutionEventArgs); } diff --git a/Content.Server/Atmos/EntitySystems/AirtightSystem.cs b/Content.Server/Atmos/EntitySystems/AirtightSystem.cs index f2190d2305..ce91b47c29 100644 --- a/Content.Server/Atmos/EntitySystems/AirtightSystem.cs +++ b/Content.Server/Atmos/EntitySystems/AirtightSystem.cs @@ -86,7 +86,7 @@ namespace Content.Server.Atmos.EntitySystems airtight.CurrentAirBlockedDirection = (int) Rotate((AtmosDirection)airtight.InitialAirBlockedDirection, ev.NewRotation); UpdatePosition(airtight); - RaiseLocalEvent(uid, new AirtightChanged(airtight)); + RaiseLocalEvent(uid, new AirtightChanged(airtight), true); } public void SetAirblocked(AirtightComponent airtight, bool airblocked, TransformComponent? xform = null) @@ -95,7 +95,7 @@ namespace Content.Server.Atmos.EntitySystems airtight.AirBlocked = airblocked; UpdatePosition(airtight, xform); - RaiseLocalEvent(airtight.Owner, new AirtightChanged(airtight)); + RaiseLocalEvent(airtight.Owner, new AirtightChanged(airtight), true); } public void UpdatePosition(AirtightComponent airtight, TransformComponent? xform = null) diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.cs index a775ca049b..6c8ee5aee2 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.cs @@ -84,7 +84,7 @@ namespace Content.Server.Atmos.EntitySystems continue; var updateEvent = new AtmosExposedUpdateEvent(transform.Coordinates, airEvent.Gas); - RaiseLocalEvent(exposed.Owner, ref updateEvent); + RaiseLocalEvent(exposed.Owner, ref updateEvent, true); } _exposedTimer -= ExposedUpdateDelay; diff --git a/Content.Server/Atmos/Monitor/Systems/AtmosAlarmableSystem.cs b/Content.Server/Atmos/Monitor/Systems/AtmosAlarmableSystem.cs index cd149c754a..221b1dba7e 100644 --- a/Content.Server/Atmos/Monitor/Systems/AtmosAlarmableSystem.cs +++ b/Content.Server/Atmos/Monitor/Systems/AtmosAlarmableSystem.cs @@ -34,7 +34,7 @@ namespace Content.Server.Atmos.Monitor.Systems { component.LastAlarmState = state; component.HighestNetworkState = netMax; - RaiseLocalEvent(component.Owner, new AtmosMonitorAlarmEvent(state, netMax)); + RaiseLocalEvent(component.Owner, new AtmosMonitorAlarmEvent(state, netMax), true); } } } diff --git a/Content.Server/Atmos/Monitor/Systems/AtmosMonitoringSystem.cs b/Content.Server/Atmos/Monitor/Systems/AtmosMonitoringSystem.cs index 16306673ea..f0249d704b 100644 --- a/Content.Server/Atmos/Monitor/Systems/AtmosMonitoringSystem.cs +++ b/Content.Server/Atmos/Monitor/Systems/AtmosMonitoringSystem.cs @@ -344,7 +344,7 @@ namespace Content.Server.Atmos.Monitor.Systems if (EntityManager.TryGetComponent(monitor.Owner, out AtmosAlarmableComponent? alarmable) && !alarmable.IgnoreAlarms) - RaiseLocalEvent(monitor.Owner, new AtmosMonitorAlarmEvent(monitor.LastAlarmState, monitor.HighestAlarmInNetwork)); + RaiseLocalEvent(monitor.Owner, new AtmosMonitorAlarmEvent(monitor.LastAlarmState, monitor.HighestAlarmInNetwork), true); // TODO: Central system that grabs *all* alarms from wired network } diff --git a/Content.Server/Body/Components/BodyComponent.cs b/Content.Server/Body/Components/BodyComponent.cs index 640786de58..dabc189917 100644 --- a/Content.Server/Body/Components/BodyComponent.cs +++ b/Content.Server/Body/Components/BodyComponent.cs @@ -89,7 +89,7 @@ namespace Content.Server.Body.Components // These have already been forcefully removed from containers so run it here. foreach (var part in gibs) { - _entMan.EventBus.RaiseLocalEvent(part, new PartGibbedEvent(Owner, gibs)); + _entMan.EventBus.RaiseLocalEvent(part, new PartGibbedEvent(Owner, gibs), true); } SoundSystem.Play(_gibSound.GetSound(), Filter.Pvs(Owner, entityManager: _entMan), coordinates, AudioHelpers.WithVariation(0.025f)); diff --git a/Content.Server/Cargo/Systems/PricingSystem.cs b/Content.Server/Cargo/Systems/PricingSystem.cs index 8562437c01..42c9fbb972 100644 --- a/Content.Server/Cargo/Systems/PricingSystem.cs +++ b/Content.Server/Cargo/Systems/PricingSystem.cs @@ -123,7 +123,7 @@ public sealed class PricingSystem : EntitySystem public double GetPrice(EntityUid uid) { var ev = new PriceCalculationEvent(); - RaiseLocalEvent(uid, ref ev); + RaiseLocalEvent(uid, ref ev, true); //TODO: Add an OpaqueToAppraisal component or similar for blocking the recursive descent into containers, or preventing material pricing. diff --git a/Content.Server/Chemistry/EntitySystems/SolutionContainerSystem.cs b/Content.Server/Chemistry/EntitySystems/SolutionContainerSystem.cs index 5c9fcd4a45..3cc86919f4 100644 --- a/Content.Server/Chemistry/EntitySystems/SolutionContainerSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/SolutionContainerSystem.cs @@ -124,7 +124,7 @@ public sealed partial class SolutionContainerSystem : EntitySystem } UpdateAppearance(uid, solutionHolder); - RaiseLocalEvent(uid, new SolutionChangedEvent()); + RaiseLocalEvent(uid, new SolutionChangedEvent(), true); } public void RemoveAllSolution(EntityUid uid, Solution solutionHolder) diff --git a/Content.Server/Chemistry/EntitySystems/SolutionTransferSystem.cs b/Content.Server/Chemistry/EntitySystems/SolutionTransferSystem.cs index 3e7565bb30..b594b7fa3a 100644 --- a/Content.Server/Chemistry/EntitySystems/SolutionTransferSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/SolutionTransferSystem.cs @@ -77,7 +77,7 @@ namespace Content.Server.Chemistry.EntitySystems var transferAttempt = new SolutionTransferAttemptEvent(sourceEntity, targetEntity); // Check if the source is cancelling the transfer - RaiseLocalEvent(sourceEntity, transferAttempt); + RaiseLocalEvent(sourceEntity, transferAttempt, true); if (transferAttempt.Cancelled) { sourceEntity.PopupMessage(user, transferAttempt.CancelReason!); @@ -92,7 +92,7 @@ namespace Content.Server.Chemistry.EntitySystems } // Check if the target is cancelling the transfer - RaiseLocalEvent(targetEntity, transferAttempt); + RaiseLocalEvent(targetEntity, transferAttempt, true); if (transferAttempt.Cancelled) { sourceEntity.PopupMessage(user, transferAttempt.CancelReason!); diff --git a/Content.Server/CombatMode/CombatModeSystem.cs b/Content.Server/CombatMode/CombatModeSystem.cs index 23533ea431..1179f22717 100644 --- a/Content.Server/CombatMode/CombatModeSystem.cs +++ b/Content.Server/CombatMode/CombatModeSystem.cs @@ -63,9 +63,9 @@ namespace Content.Server.CombatMode if (inTargetHand != null) { - RaiseLocalEvent(inTargetHand.Value, attemptEvent); + RaiseLocalEvent(inTargetHand.Value, attemptEvent, true); } - RaiseLocalEvent(args.Target, attemptEvent); + RaiseLocalEvent(args.Target, attemptEvent, true); if (attemptEvent.Cancelled) return; @@ -102,7 +102,7 @@ namespace Content.Server.CombatMode _adminLogger.Add(LogType.DisarmedAction, $"{ToPrettyString(args.Performer):user} used disarm on {ToPrettyString(args.Target):target}"); var eventArgs = new DisarmedEvent() { Target = args.Target, Source = args.Performer, PushProbability = chance }; - RaiseLocalEvent(args.Target, eventArgs); + RaiseLocalEvent(args.Target, eventArgs, true); } diff --git a/Content.Server/Construction/ConstructionSystem.Machine.cs b/Content.Server/Construction/ConstructionSystem.Machine.cs index 5feb864ff8..9bb935018a 100644 --- a/Content.Server/Construction/ConstructionSystem.Machine.cs +++ b/Content.Server/Construction/ConstructionSystem.Machine.cs @@ -41,7 +41,7 @@ public sealed partial class ConstructionSystem EntityManager.EventBus.RaiseLocalEvent(component.Owner, new RefreshPartsEvent() { Parts = GetAllParts(component), - }); + }, true); } public void CreateBoardAndStockParts(MachineComponent component) diff --git a/Content.Server/Cuffs/Components/CuffableComponent.cs b/Content.Server/Cuffs/Components/CuffableComponent.cs index 6b3aacbf2c..1b387c3b2f 100644 --- a/Content.Server/Cuffs/Components/CuffableComponent.cs +++ b/Content.Server/Cuffs/Components/CuffableComponent.cs @@ -108,7 +108,7 @@ namespace Content.Server.Cuffs.Components _sysMan.GetEntitySystem().UpdateCanMove(Owner); var ev = new CuffedStateChangeEvent(); - _entMan.EventBus.RaiseLocalEvent(Owner, ref ev); + _entMan.EventBus.RaiseLocalEvent(Owner, ref ev, true); UpdateAlert(); UpdateHeldItems(); Dirty(_entMan); @@ -119,7 +119,7 @@ namespace Content.Server.Cuffs.Components { UpdateAlert(); var ev = new CuffedStateChangeEvent(); - _entMan.EventBus.RaiseLocalEvent(Owner, ref ev); + _entMan.EventBus.RaiseLocalEvent(Owner, ref ev, true); } /// @@ -199,7 +199,7 @@ namespace Content.Server.Cuffs.Components } var attempt = new UncuffAttemptEvent(user, Owner); - _entMan.EventBus.RaiseLocalEvent(user, attempt); + _entMan.EventBus.RaiseLocalEvent(user, attempt, true); if (attempt.Cancelled) { @@ -264,7 +264,7 @@ namespace Content.Server.Cuffs.Components CanStillInteract = _entMan.TryGetComponent(Owner, out HandsComponent? handsComponent) && handsComponent.SortedHands.Count() > CuffedHandCount; _sysMan.GetEntitySystem().UpdateCanMove(Owner); var ev = new CuffedStateChangeEvent(); - _entMan.EventBus.RaiseLocalEvent(Owner, ref ev); + _entMan.EventBus.RaiseLocalEvent(Owner, ref ev, true); UpdateAlert(); Dirty(_entMan); diff --git a/Content.Server/Damage/Systems/DamageOnTriggerSystem.cs b/Content.Server/Damage/Systems/DamageOnTriggerSystem.cs index e17baf6432..2c3a5d4753 100644 --- a/Content.Server/Damage/Systems/DamageOnTriggerSystem.cs +++ b/Content.Server/Damage/Systems/DamageOnTriggerSystem.cs @@ -30,7 +30,7 @@ public sealed class DamageOnTriggerSystem : EntitySystem var damage = new DamageSpecifier(component.Damage); var ev = new BeforeDamageOnTriggerEvent(damage, target); - RaiseLocalEvent(source, ev); + RaiseLocalEvent(source, ev, true); _damageableSystem.TryChangeDamage(target, ev.Damage, component.IgnoreResistances); } diff --git a/Content.Server/Destructible/DestructibleSystem.cs b/Content.Server/Destructible/DestructibleSystem.cs index 768bdee6d3..39578f9d95 100644 --- a/Content.Server/Destructible/DestructibleSystem.cs +++ b/Content.Server/Destructible/DestructibleSystem.cs @@ -43,7 +43,7 @@ namespace Content.Server.Destructible { if (threshold.Reached(args.Damageable, this)) { - RaiseLocalEvent(uid, new DamageThresholdReached(component, threshold)); + RaiseLocalEvent(uid, new DamageThresholdReached(component, threshold), true); threshold.Execute(uid, this, EntityManager); } diff --git a/Content.Server/DeviceNetwork/Systems/DeviceNetworkSystem.cs b/Content.Server/DeviceNetwork/Systems/DeviceNetworkSystem.cs index aa3f191b0e..5a2ef52974 100644 --- a/Content.Server/DeviceNetwork/Systems/DeviceNetworkSystem.cs +++ b/Content.Server/DeviceNetwork/Systems/DeviceNetworkSystem.cs @@ -247,7 +247,7 @@ namespace Content.Server.DeviceNetwork.Systems return true; var beforeBroadcastAttemptEvent = new BeforeBroadcastAttemptEvent(recipients); - RaiseLocalEvent(packet.Sender, beforeBroadcastAttemptEvent); + RaiseLocalEvent(packet.Sender, beforeBroadcastAttemptEvent, true); if (beforeBroadcastAttemptEvent.Cancelled || beforeBroadcastAttemptEvent.ModifiedRecipients == null) return false; diff --git a/Content.Server/Electrocution/ElectrocutionSystem.cs b/Content.Server/Electrocution/ElectrocutionSystem.cs index 56e047233d..9be441de48 100644 --- a/Content.Server/Electrocution/ElectrocutionSystem.cs +++ b/Content.Server/Electrocution/ElectrocutionSystem.cs @@ -261,7 +261,7 @@ namespace Content.Server.Electrocution || !DoCommonElectrocution(uid, sourceUid, shockDamage, time, refresh, siemensCoefficient, statusEffects)) return false; - RaiseLocalEvent(uid, new ElectrocutedEvent(uid, sourceUid, siemensCoefficient)); + RaiseLocalEvent(uid, new ElectrocutedEvent(uid, sourceUid, siemensCoefficient), true); return true; } @@ -306,7 +306,7 @@ namespace Content.Server.Electrocution electrocutionComponent.TimeLeft = 1f; electrocutionComponent.Electrocuting = uid; - RaiseLocalEvent(uid, new ElectrocutedEvent(uid, sourceUid, siemensCoefficient)); + RaiseLocalEvent(uid, new ElectrocutedEvent(uid, sourceUid, siemensCoefficient), true); return true; } @@ -314,7 +314,7 @@ namespace Content.Server.Electrocution private bool DoCommonElectrocutionAttempt(EntityUid uid, EntityUid? sourceUid, ref float siemensCoefficient) { var attemptEvent = new ElectrocutionAttemptEvent(uid, sourceUid, siemensCoefficient); - RaiseLocalEvent(uid, attemptEvent); + RaiseLocalEvent(uid, attemptEvent, true); // Cancel the electrocution early, so we don't recursively electrocute anything. if (attemptEvent.Cancelled) diff --git a/Content.Server/Explosion/EntitySystems/TriggerSystem.TimedCollide.cs b/Content.Server/Explosion/EntitySystems/TriggerSystem.TimedCollide.cs index efa39946ee..54b13f76d1 100644 --- a/Content.Server/Explosion/EntitySystems/TriggerSystem.TimedCollide.cs +++ b/Content.Server/Explosion/EntitySystems/TriggerSystem.TimedCollide.cs @@ -46,7 +46,7 @@ public sealed partial class TriggerSystem triggerOnTimedCollide.Colliding[collidingEntity] += frameTime; if (collidingTimer > triggerOnTimedCollide.Threshold) { - RaiseLocalEvent(activeTrigger.Owner, new TriggerEvent(activeTrigger.Owner, collidingEntity)); + RaiseLocalEvent(activeTrigger.Owner, new TriggerEvent(activeTrigger.Owner, collidingEntity), true); triggerOnTimedCollide.Colliding[collidingEntity] -= triggerOnTimedCollide.Threshold; } } diff --git a/Content.Server/Explosion/EntitySystems/TriggerSystem.cs b/Content.Server/Explosion/EntitySystems/TriggerSystem.cs index b6ce1e5b0f..fc913a958e 100644 --- a/Content.Server/Explosion/EntitySystems/TriggerSystem.cs +++ b/Content.Server/Explosion/EntitySystems/TriggerSystem.cs @@ -94,7 +94,7 @@ namespace Content.Server.Explosion.EntitySystems public bool Trigger(EntityUid trigger, EntityUid? user = null) { var triggerEvent = new TriggerEvent(trigger, user); - EntityManager.EventBus.RaiseLocalEvent(trigger, triggerEvent); + EntityManager.EventBus.RaiseLocalEvent(trigger, triggerEvent, true); return triggerEvent.Handled; } diff --git a/Content.Server/Flash/FlashSystem.cs b/Content.Server/Flash/FlashSystem.cs index a8ababd66b..0e053b02b5 100644 --- a/Content.Server/Flash/FlashSystem.cs +++ b/Content.Server/Flash/FlashSystem.cs @@ -124,7 +124,7 @@ namespace Content.Server.Flash public void Flash(EntityUid target, EntityUid? user, EntityUid? used, float flashDuration, float slowTo, bool displayPopup = true) { var attempt = new FlashAttemptEvent(target, user, used); - RaiseLocalEvent(target, attempt); + RaiseLocalEvent(target, attempt, true); if (attempt.Cancelled) return; @@ -200,7 +200,7 @@ namespace Content.Server.Flash if (args.Cancelled) break; if (_inventorySystem.TryGetSlotEntity(uid, slot, out var item, component)) - RaiseLocalEvent(item.Value, args); + RaiseLocalEvent(item.Value, args, true); } } diff --git a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs index 6ea0722ae1..b71cdcad34 100644 --- a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs +++ b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs @@ -157,7 +157,7 @@ namespace Content.Server.Fluids.EntitySystems return false; } - RaiseLocalEvent(puddleComponent.Owner, new SolutionChangedEvent()); + RaiseLocalEvent(puddleComponent.Owner, new SolutionChangedEvent(), true); if (!sound) { diff --git a/Content.Server/Fluids/EntitySystems/SpraySystem.cs b/Content.Server/Fluids/EntitySystems/SpraySystem.cs index cd2024a8de..3177921cad 100644 --- a/Content.Server/Fluids/EntitySystems/SpraySystem.cs +++ b/Content.Server/Fluids/EntitySystems/SpraySystem.cs @@ -116,7 +116,7 @@ public sealed class SpraySystem : EntitySystem SoundSystem.Play(component.SpraySound.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.125f)); RaiseLocalEvent(uid, - new RefreshItemCooldownEvent(curTime, curTime + TimeSpan.FromSeconds(component.CooldownTime))); + new RefreshItemCooldownEvent(curTime, curTime + TimeSpan.FromSeconds(component.CooldownTime)), true); } } diff --git a/Content.Server/GameTicking/GameTicker.Spawning.cs b/Content.Server/GameTicking/GameTicker.Spawning.cs index 46c105790a..4ca295f2ce 100644 --- a/Content.Server/GameTicking/GameTicker.Spawning.cs +++ b/Content.Server/GameTicking/GameTicker.Spawning.cs @@ -194,7 +194,7 @@ namespace Content.Server.GameTicking // We raise this event directed to the mob, but also broadcast it so game rules can do something now. var aev = new PlayerSpawnCompleteEvent(mob, player, jobId, lateJoin, station, character); - RaiseLocalEvent(mob, aev); + RaiseLocalEvent(mob, aev, true); } public void Respawn(IPlayerSession player) diff --git a/Content.Server/Ghost/GhostSystem.cs b/Content.Server/Ghost/GhostSystem.cs index f26a3a32d0..92b62f384d 100644 --- a/Content.Server/Ghost/GhostSystem.cs +++ b/Content.Server/Ghost/GhostSystem.cs @@ -63,7 +63,7 @@ namespace Content.Server.Ghost foreach (var ent in ents) { var ghostBoo = new GhostBooEvent(); - RaiseLocalEvent(ent, ghostBoo); + RaiseLocalEvent(ent, ghostBoo, true); if (ghostBoo.Handled) booCounter++; diff --git a/Content.Server/HealthExaminable/HealthExaminableSystem.cs b/Content.Server/HealthExaminable/HealthExaminableSystem.cs index f0a5f1dfcb..55b0dae1f4 100644 --- a/Content.Server/HealthExaminable/HealthExaminableSystem.cs +++ b/Content.Server/HealthExaminable/HealthExaminableSystem.cs @@ -93,7 +93,7 @@ public sealed class HealthExaminableSystem : EntitySystem } // Anything else want to add on to this? - RaiseLocalEvent(uid, new HealthBeingExaminedEvent(msg)); + RaiseLocalEvent(uid, new HealthBeingExaminedEvent(msg), true); return msg; } diff --git a/Content.Server/Interaction/InteractionSystem.cs b/Content.Server/Interaction/InteractionSystem.cs index 591ef3b1a9..8a7fffaa61 100644 --- a/Content.Server/Interaction/InteractionSystem.cs +++ b/Content.Server/Interaction/InteractionSystem.cs @@ -96,7 +96,7 @@ namespace Content.Server.Interaction return; // trigger dragdrops on the dropped entity - RaiseLocalEvent(msg.Dropped, interactionArgs); + RaiseLocalEvent(msg.Dropped, interactionArgs, true); if (interactionArgs.Handled) return; @@ -212,7 +212,7 @@ namespace Content.Server.Interaction if (!Deleted(item)) { var meleeVee = new MeleeAttackAttemptEvent(); - RaiseLocalEvent(item.Value, ref meleeVee); + RaiseLocalEvent(item.Value, ref meleeVee, true); if (meleeVee.Cancelled) return; diff --git a/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs b/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs index 48acc9907f..c7c5877e99 100644 --- a/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs +++ b/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs @@ -279,7 +279,7 @@ namespace Content.Server.Kitchen.EntitySystems var juiceEvent = new ExtractableScalingEvent(); // default of scalar is always 1.0 if (EntityManager.HasComponent(item)) { - RaiseLocalEvent(item, juiceEvent); + RaiseLocalEvent(item, juiceEvent, true); } if (component.BeakerSolution.CurrentVolume + juiceMe.JuiceSolution.TotalVolume * juiceEvent.Scalar > component.BeakerSolution.MaxVolume) diff --git a/Content.Server/Light/EntitySystems/EmergencyLightSystem.cs b/Content.Server/Light/EntitySystems/EmergencyLightSystem.cs index 54f414a67a..99e05a1bbe 100644 --- a/Content.Server/Light/EntitySystems/EmergencyLightSystem.cs +++ b/Content.Server/Light/EntitySystems/EmergencyLightSystem.cs @@ -71,7 +71,7 @@ namespace Content.Server.Light.EntitySystems if (component.State == state) return; component.State = state; - RaiseLocalEvent(component.Owner, new EmergencyLightEvent(component, state)); + RaiseLocalEvent(component.Owner, new EmergencyLightEvent(component, state), true); } public override void Update(float frameTime) diff --git a/Content.Server/Light/EntitySystems/UnpoweredFlashlightSystem.cs b/Content.Server/Light/EntitySystems/UnpoweredFlashlightSystem.cs index f67b4870dc..34295ab6b7 100644 --- a/Content.Server/Light/EntitySystems/UnpoweredFlashlightSystem.cs +++ b/Content.Server/Light/EntitySystems/UnpoweredFlashlightSystem.cs @@ -65,7 +65,7 @@ namespace Content.Server.Light.EntitySystems SoundSystem.Play(flashlight.ToggleSound.GetSound(), Filter.Pvs(light.Owner), flashlight.Owner); - RaiseLocalEvent(flashlight.Owner, new LightToggleEvent(flashlight.LightOn)); + RaiseLocalEvent(flashlight.Owner, new LightToggleEvent(flashlight.LightOn), true); _actionsSystem.SetToggled(flashlight.ToggleAction, flashlight.LightOn); } } diff --git a/Content.Server/Lock/LockSystem.cs b/Content.Server/Lock/LockSystem.cs index 4d3d8464bc..172e4def21 100644 --- a/Content.Server/Lock/LockSystem.cs +++ b/Content.Server/Lock/LockSystem.cs @@ -90,7 +90,7 @@ namespace Content.Server.Lock appearanceComp.SetData(StorageVisuals.Locked, true); } - RaiseLocalEvent(lockComp.Owner, new LockToggledEvent(true)); + RaiseLocalEvent(lockComp.Owner, new LockToggledEvent(true), true); return true; } @@ -113,7 +113,7 @@ namespace Content.Server.Lock appearanceComp.SetData(StorageVisuals.Locked, false); } - RaiseLocalEvent(lockComp.Owner, new LockToggledEvent(false)); + RaiseLocalEvent(lockComp.Owner, new LockToggledEvent(false), true); } public bool TryUnlock(EntityUid uid, EntityUid user, LockComponent? lockComp = null) diff --git a/Content.Server/MachineLinking/System/SignalLinkerSystem.cs b/Content.Server/MachineLinking/System/SignalLinkerSystem.cs index 8e9ff6abee..d7c479c20e 100644 --- a/Content.Server/MachineLinking/System/SignalLinkerSystem.cs +++ b/Content.Server/MachineLinking/System/SignalLinkerSystem.cs @@ -301,7 +301,7 @@ namespace Content.Server.MachineLinking.System // allow other systems to refuse the connection var linkAttempt = new LinkAttemptEvent(user, transmitter.Owner, args.TransmitterPort, receiver.Owner, args.ReceiverPort); - RaiseLocalEvent(transmitter.Owner, linkAttempt); + RaiseLocalEvent(transmitter.Owner, linkAttempt, true); if (linkAttempt.Cancelled) { if (!quiet) @@ -309,7 +309,7 @@ namespace Content.Server.MachineLinking.System Filter.Entities(user)); return false; } - RaiseLocalEvent(receiver.Owner, linkAttempt); + RaiseLocalEvent(receiver.Owner, linkAttempt, true); if (linkAttempt.Cancelled) { if (!quiet) @@ -346,8 +346,8 @@ namespace Content.Server.MachineLinking.System if (receivers.Remove(new(receiver.Owner, args.ReceiverPort)) && transmitters.Remove(new(transmitter.Owner, args.TransmitterPort))) { - RaiseLocalEvent(receiver.Owner, new PortDisconnectedEvent(args.ReceiverPort)); - RaiseLocalEvent(transmitter.Owner, new PortDisconnectedEvent(args.TransmitterPort)); + RaiseLocalEvent(receiver.Owner, new PortDisconnectedEvent(args.ReceiverPort), true); + RaiseLocalEvent(transmitter.Owner, new PortDisconnectedEvent(args.TransmitterPort), true); _popupSystem.PopupCursor(Loc.GetString("signal-linker-component-unlinked-port", ("machine1", transmitter.Owner), ("port1", PortName(args.TransmitterPort)), ("machine2", receiver.Owner), ("port2", PortName(args.ReceiverPort))), @@ -387,11 +387,11 @@ namespace Content.Server.MachineLinking.System foreach (var (port, receivers) in transmitter.Outputs) if (receivers.RemoveAll(id => id.Uid == receiver.Owner) > 0) - RaiseLocalEvent(transmitter.Owner, new PortDisconnectedEvent(port)); + RaiseLocalEvent(transmitter.Owner, new PortDisconnectedEvent(port), true); foreach (var (port, transmitters) in receiver.Inputs) if (transmitters.RemoveAll(id => id.Uid == transmitter.Owner) > 0) - RaiseLocalEvent(receiver.Owner, new PortDisconnectedEvent(port)); + RaiseLocalEvent(receiver.Owner, new PortDisconnectedEvent(port), true); TryUpdateUI(linker, transmitter, receiver); } @@ -427,11 +427,11 @@ namespace Content.Server.MachineLinking.System // First, disconnect existing links. foreach (var (port, receivers) in transmitter.Outputs) if (receivers.RemoveAll(id => id.Uid == receiver.Owner) > 0) - RaiseLocalEvent(transmitter.Owner, new PortDisconnectedEvent(port)); + RaiseLocalEvent(transmitter.Owner, new PortDisconnectedEvent(port), true); foreach (var (port, transmitters) in receiver.Inputs) if (transmitters.RemoveAll(id => id.Uid == transmitter.Owner) > 0) - RaiseLocalEvent(receiver.Owner, new PortDisconnectedEvent(port)); + RaiseLocalEvent(receiver.Owner, new PortDisconnectedEvent(port), true); // Then make any valid default connections. foreach (var outPort in transmitter.Outputs.Keys) diff --git a/Content.Server/Mind/Mind.cs b/Content.Server/Mind/Mind.cs index 9f51860411..17baf12cf2 100644 --- a/Content.Server/Mind/Mind.cs +++ b/Content.Server/Mind/Mind.cs @@ -181,7 +181,7 @@ namespace Content.Server.Mind var message = new RoleAddedEvent(role); if (OwnedEntity != null) { - IoCManager.Resolve().EventBus.RaiseLocalEvent(OwnedEntity.Value, message); + IoCManager.Resolve().EventBus.RaiseLocalEvent(OwnedEntity.Value, message, true); } return role; @@ -207,7 +207,7 @@ namespace Content.Server.Mind if (OwnedEntity != null) { - IoCManager.Resolve().EventBus.RaiseLocalEvent(OwnedEntity.Value, message); + IoCManager.Resolve().EventBus.RaiseLocalEvent(OwnedEntity.Value, message, true); } } @@ -411,7 +411,7 @@ namespace Content.Server.Mind var entities = IoCManager.Resolve(); entities.RemoveComponent(oldVisitingEnt); - entities.EventBus.RaiseLocalEvent(oldVisitingEnt, new MindUnvisitedMessage()); + entities.EventBus.RaiseLocalEvent(oldVisitingEnt, new MindUnvisitedMessage(), true); } public bool TryGetSession([NotNullWhen(true)] out IPlayerSession? session) diff --git a/Content.Server/Mind/MindSystem.cs b/Content.Server/Mind/MindSystem.cs index 400aaf14c3..423b5d0167 100644 --- a/Content.Server/Mind/MindSystem.cs +++ b/Content.Server/Mind/MindSystem.cs @@ -42,7 +42,7 @@ public sealed class MindSystem : EntitySystem return; mind.Mind = value; - RaiseLocalEvent(uid, new MindAddedMessage()); + RaiseLocalEvent(uid, new MindAddedMessage(), true); } /// @@ -56,7 +56,7 @@ public sealed class MindSystem : EntitySystem return; if (!Deleted(uid)) - RaiseLocalEvent(uid, new MindRemovedMessage()); + RaiseLocalEvent(uid, new MindRemovedMessage(), true); mind.Mind = null; } diff --git a/Content.Server/Nutrition/EntitySystems/SmokingSystem.Cigar.cs b/Content.Server/Nutrition/EntitySystems/SmokingSystem.Cigar.cs index 66ceb818cb..0789b2aafb 100644 --- a/Content.Server/Nutrition/EntitySystems/SmokingSystem.Cigar.cs +++ b/Content.Server/Nutrition/EntitySystems/SmokingSystem.Cigar.cs @@ -61,7 +61,7 @@ namespace Content.Server.Nutrition.EntitySystems return; var isHotEvent = new IsHotEvent(); - RaiseLocalEvent(targetEntity.Value, isHotEvent); + RaiseLocalEvent(targetEntity.Value, isHotEvent, true); if (!isHotEvent.IsHot) return; diff --git a/Content.Server/Nutrition/EntitySystems/SmokingSystem.cs b/Content.Server/Nutrition/EntitySystems/SmokingSystem.cs index 8e6c821c0a..391a24b390 100644 --- a/Content.Server/Nutrition/EntitySystems/SmokingSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/SmokingSystem.cs @@ -101,7 +101,7 @@ namespace Content.Server.Nutrition.EntitySystems if (solution.TotalVolume == FixedPoint2.Zero) { - RaiseLocalEvent(uid, new SmokableSolutionEmptyEvent()); + RaiseLocalEvent(uid, new SmokableSolutionEmptyEvent(), true); } if (inhaledSolution.TotalVolume == FixedPoint2.Zero) diff --git a/Content.Server/Polymorph/Systems/PolymorphableSystem.cs b/Content.Server/Polymorph/Systems/PolymorphableSystem.cs index 90641a4baf..e45c03ee34 100644 --- a/Content.Server/Polymorph/Systems/PolymorphableSystem.cs +++ b/Content.Server/Polymorph/Systems/PolymorphableSystem.cs @@ -97,7 +97,7 @@ namespace Content.Server.Polymorph.Systems var comp = EnsureComp(child); comp.Parent = target; comp.Prototype = proto; - RaiseLocalEvent(child, new PolymorphComponentSetupEvent()); + RaiseLocalEvent(child, new PolymorphComponentSetupEvent(), true); var childXform = Transform(child); childXform.LocalRotation = targetTransformComp.LocalRotation; diff --git a/Content.Server/Power/EntitySystems/PowerNetSystem.cs b/Content.Server/Power/EntitySystems/PowerNetSystem.cs index 85ba3f5f56..09c21fc9e4 100644 --- a/Content.Server/Power/EntitySystems/PowerNetSystem.cs +++ b/Content.Server/Power/EntitySystems/PowerNetSystem.cs @@ -248,7 +248,7 @@ namespace Content.Server.Power.EntitySystems apcReceiver.PoweredLastUpdate = powered; - RaiseLocalEvent(apcReceiver.Owner, new PowerChangedEvent(apcReceiver.Powered, apcReceiver.NetworkLoad.ReceivingPower)); + RaiseLocalEvent(apcReceiver.Owner, new PowerChangedEvent(apcReceiver.Powered, apcReceiver.NetworkLoad.ReceivingPower), true); if (appearanceQuery.TryGetComponent(apcReceiver.Owner, out var appearance)) appearance.SetData(PowerDeviceVisuals.Powered, powered); @@ -262,7 +262,7 @@ namespace Content.Server.Power.EntitySystems { lastRecv = newRecv; var msg = new PowerConsumerReceivedChanged(newRecv, consumer.DrawRate); - RaiseLocalEvent(consumer.Owner, msg); + RaiseLocalEvent(consumer.Owner, msg, true); } } @@ -273,11 +273,11 @@ namespace Content.Server.Power.EntitySystems if (lastSupply == 0f && currentSupply != 0f) { - RaiseLocalEvent(powerNetBattery.Owner, new PowerNetBatterySupplyEvent {Supply = true}); + RaiseLocalEvent(powerNetBattery.Owner, new PowerNetBatterySupplyEvent {Supply = true}, true); } else if (lastSupply > 0f && currentSupply == 0f) { - RaiseLocalEvent(powerNetBattery.Owner, new PowerNetBatterySupplyEvent {Supply = false}); + RaiseLocalEvent(powerNetBattery.Owner, new PowerNetBatterySupplyEvent {Supply = false}, true); } powerNetBattery.LastSupply = currentSupply; diff --git a/Content.Server/Power/EntitySystems/PowerReceiverSystem.cs b/Content.Server/Power/EntitySystems/PowerReceiverSystem.cs index 9f407b9ce4..a0acd1ac38 100644 --- a/Content.Server/Power/EntitySystems/PowerReceiverSystem.cs +++ b/Content.Server/Power/EntitySystems/PowerReceiverSystem.cs @@ -78,7 +78,7 @@ namespace Content.Server.Power.EntitySystems { receiver.NetworkLoad.LinkedNetwork = default; - RaiseLocalEvent(receiver.Owner, new PowerChangedEvent(receiver.Powered, receiver.NetworkLoad.ReceivingPower)); + RaiseLocalEvent(receiver.Owner, new PowerChangedEvent(receiver.Powered, receiver.NetworkLoad.ReceivingPower), true); if (TryComp(receiver.Owner, out AppearanceComponent? appearance)) appearance.SetData(PowerDeviceVisuals.Powered, receiver.Powered); diff --git a/Content.Server/Radiation/Systems/RadiationSystem.cs b/Content.Server/Radiation/Systems/RadiationSystem.cs index 20432f9f5c..db0cb6e1b1 100644 --- a/Content.Server/Radiation/Systems/RadiationSystem.cs +++ b/Content.Server/Radiation/Systems/RadiationSystem.cs @@ -22,6 +22,6 @@ public sealed class RadiationSystem : EntitySystem public void IrradiateEntity(EntityUid uid, float radsPerSecond, float time) { var msg = new OnIrradiatedEvent(time, radsPerSecond); - RaiseLocalEvent(uid, msg); + RaiseLocalEvent(uid, msg, true); } } diff --git a/Content.Server/Speech/AccentSystem.cs b/Content.Server/Speech/AccentSystem.cs index f5f3cb97db..c12871169a 100644 --- a/Content.Server/Speech/AccentSystem.cs +++ b/Content.Server/Speech/AccentSystem.cs @@ -16,7 +16,7 @@ namespace Content.Server.Speech { var accentEvent = new AccentGetEvent(args.Sender, args.Message); - RaiseLocalEvent(args.Sender, accentEvent); + RaiseLocalEvent(args.Sender, accentEvent, true); args.Message = accentEvent.Message; } } diff --git a/Content.Server/Station/Systems/StationSystem.cs b/Content.Server/Station/Systems/StationSystem.cs index af4b5cd2c7..aa061379ee 100644 --- a/Content.Server/Station/Systems/StationSystem.cs +++ b/Content.Server/Station/Systems/StationSystem.cs @@ -224,7 +224,7 @@ public sealed class StationSystem : EntitySystem stationMember.Station = station; stationData.Grids.Add(gridComponent.Owner); - RaiseLocalEvent(station, new StationGridAddedEvent(gridComponent.Owner, false)); + RaiseLocalEvent(station, new StationGridAddedEvent(gridComponent.Owner, false), true); _sawmill.Info($"Adding grid {mapGrid}:{gridComponent.Owner} to station {Name(station)} ({station})"); } @@ -247,7 +247,7 @@ public sealed class StationSystem : EntitySystem RemComp(mapGrid); stationData.Grids.Remove(gridComponent.Owner); - RaiseLocalEvent(station, new StationGridRemovedEvent(gridComponent.Owner)); + RaiseLocalEvent(station, new StationGridRemovedEvent(gridComponent.Owner), true); _sawmill.Info($"Removing grid {mapGrid}:{gridComponent.Owner} from station {Name(station)} ({station})"); } @@ -273,7 +273,7 @@ public sealed class StationSystem : EntitySystem _chatSystem.DispatchStationAnnouncement(station, $"The station {oldName} has been renamed to {name}."); } - RaiseLocalEvent(station, new StationRenamedEvent(oldName, name)); + RaiseLocalEvent(station, new StationRenamedEvent(oldName, name), true); } /// diff --git a/Content.Server/Sticky/Systems/StickySystem.cs b/Content.Server/Sticky/Systems/StickySystem.cs index e2c9016100..4905c797b3 100644 --- a/Content.Server/Sticky/Systems/StickySystem.cs +++ b/Content.Server/Sticky/Systems/StickySystem.cs @@ -175,7 +175,7 @@ public sealed class StickySystem : EntitySystem } component.StuckTo = target; - RaiseLocalEvent(uid, new EntityStuckEvent(target, user)); + RaiseLocalEvent(uid, new EntityStuckEvent(target, user), true); } public void UnstickFromEntity(EntityUid uid, EntityUid user, StickyComponent? component = null) @@ -210,7 +210,7 @@ public sealed class StickySystem : EntitySystem } component.StuckTo = null; - RaiseLocalEvent(uid, new EntityUnstuckEvent(target, user)); + RaiseLocalEvent(uid, new EntityUnstuckEvent(target, user), true); } private sealed class StickSuccessfulEvent : EntityEventArgs diff --git a/Content.Server/Storage/Components/EntityStorageComponent.cs b/Content.Server/Storage/Components/EntityStorageComponent.cs index 8f0f2d13ee..175bc7f4e2 100644 --- a/Content.Server/Storage/Components/EntityStorageComponent.cs +++ b/Content.Server/Storage/Components/EntityStorageComponent.cs @@ -149,7 +149,7 @@ namespace Content.Server.Storage.Components } var @event = new StorageOpenAttemptEvent(); - IoCManager.Resolve().EventBus.RaiseLocalEvent(Owner, @event); + IoCManager.Resolve().EventBus.RaiseLocalEvent(Owner, @event, true); return !@event.Cancelled; } @@ -157,7 +157,7 @@ namespace Content.Server.Storage.Components public virtual bool CanClose(EntityUid user, bool silent = false) { var @event = new StorageCloseAttemptEvent(); - IoCManager.Resolve().EventBus.RaiseLocalEvent(Owner, @event); + IoCManager.Resolve().EventBus.RaiseLocalEvent(Owner, @event, true); return !@event.Cancelled; } diff --git a/Content.Server/Strip/StrippableSystem.cs b/Content.Server/Strip/StrippableSystem.cs index 485c2a0b7f..5c51f9ba44 100644 --- a/Content.Server/Strip/StrippableSystem.cs +++ b/Content.Server/Strip/StrippableSystem.cs @@ -411,7 +411,7 @@ namespace Content.Server.Strip if (_inventorySystem.TryGetSlotEntity(component.Owner, slot, out var item) && _inventorySystem.TryUnequip(user, component.Owner, slot)) { // Raise a dropped event, so that things like gas tank internals properly deactivate when stripping - RaiseLocalEvent(item.Value, new DroppedEvent(user)); + RaiseLocalEvent(item.Value, new DroppedEvent(user), true); _handsSystem.PickupOrDrop(user, item.Value); } diff --git a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSystem.cs b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSystem.cs index 09d38ff9f1..9ebb74dc0d 100644 --- a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSystem.cs +++ b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSystem.cs @@ -252,7 +252,7 @@ public sealed class SurveillanceCameraSystem : EntitySystem // Send a targetted event to all monitors. foreach (var monitor in component.ActiveMonitors) { - RaiseLocalEvent(monitor, ev); + RaiseLocalEvent(monitor, ev, true); } component.ActiveMonitors.Clear(); diff --git a/Content.Server/Temperature/Systems/TemperatureSystem.cs b/Content.Server/Temperature/Systems/TemperatureSystem.cs index 62344e31f2..954f1bfdba 100644 --- a/Content.Server/Temperature/Systems/TemperatureSystem.cs +++ b/Content.Server/Temperature/Systems/TemperatureSystem.cs @@ -69,7 +69,7 @@ namespace Content.Server.Temperature.Systems float lastTemp = temperature.CurrentTemperature; float delta = temperature.CurrentTemperature - temp; temperature.CurrentTemperature = temp; - RaiseLocalEvent(uid, new OnTemperatureChangeEvent(temperature.CurrentTemperature, lastTemp, delta)); + RaiseLocalEvent(uid, new OnTemperatureChangeEvent(temperature.CurrentTemperature, lastTemp, delta), true); } } @@ -88,7 +88,7 @@ namespace Content.Server.Temperature.Systems temperature.CurrentTemperature += heatAmount / temperature.HeatCapacity; float delta = temperature.CurrentTemperature - lastTemp; - RaiseLocalEvent(uid, new OnTemperatureChangeEvent(temperature.CurrentTemperature, lastTemp, delta)); + RaiseLocalEvent(uid, new OnTemperatureChangeEvent(temperature.CurrentTemperature, lastTemp, delta), true); } } diff --git a/Content.Server/Tools/Systems/WeldableSystem.cs b/Content.Server/Tools/Systems/WeldableSystem.cs index c9205c294b..319030b89c 100644 --- a/Content.Server/Tools/Systems/WeldableSystem.cs +++ b/Content.Server/Tools/Systems/WeldableSystem.cs @@ -45,7 +45,7 @@ public sealed class WeldableSystem : EntitySystem // Other component systems var attempt = new WeldableAttemptEvent(user, tool); - RaiseLocalEvent(uid, attempt); + RaiseLocalEvent(uid, attempt, true); if (attempt.Cancelled) return false; @@ -77,7 +77,7 @@ public sealed class WeldableSystem : EntitySystem return; component.IsWelded = !component.IsWelded; - RaiseLocalEvent(uid, new WeldableChangedEvent(component.IsWelded)); + RaiseLocalEvent(uid, new WeldableChangedEvent(component.IsWelded), true); UpdateAppearance(uid, component); } diff --git a/Content.Server/Traitor/Uplink/UplinkSystem.cs b/Content.Server/Traitor/Uplink/UplinkSystem.cs index d863eb8d2e..2ca661a775 100644 --- a/Content.Server/Traitor/Uplink/UplinkSystem.cs +++ b/Content.Server/Traitor/Uplink/UplinkSystem.cs @@ -53,7 +53,7 @@ namespace Content.Server.Traitor.Uplink private void OnInit(EntityUid uid, UplinkComponent component, ComponentInit args) { - RaiseLocalEvent(uid, new UplinkInitEvent(component)); + RaiseLocalEvent(uid, new UplinkInitEvent(component), true); // if component has a preset info (probably spawn by admin) // create a new account and register it for this uplink @@ -67,7 +67,7 @@ namespace Content.Server.Traitor.Uplink private void OnRemove(EntityUid uid, UplinkComponent component, ComponentRemove args) { - RaiseLocalEvent(uid, new UplinkRemovedEvent()); + RaiseLocalEvent(uid, new UplinkRemovedEvent(), true); } private void OnActivate(EntityUid uid, UplinkComponent component, ActivateInWorldEvent args) diff --git a/Content.Server/Verbs/VerbSystem.cs b/Content.Server/Verbs/VerbSystem.cs index ea67640f07..fbc8b5e4f9 100644 --- a/Content.Server/Verbs/VerbSystem.cs +++ b/Content.Server/Verbs/VerbSystem.cs @@ -91,7 +91,7 @@ namespace Content.Server.Verbs if (verb.ExecutionEventArgs != null) { if (verb.EventTarget.IsValid()) - RaiseLocalEvent(verb.EventTarget, verb.ExecutionEventArgs); + RaiseLocalEvent(verb.EventTarget, verb.ExecutionEventArgs, true); else RaiseLocalEvent(verb.ExecutionEventArgs); } diff --git a/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs b/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs index 5b47fc89b4..cfb10ba3f0 100644 --- a/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs +++ b/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs @@ -92,7 +92,7 @@ namespace Content.Server.Weapon.Melee var targets = new[] { target }; SendAnimation(comp.ClickArc, angle, args.User, owner, targets, comp.ClickAttackEffect, false); - RaiseLocalEvent(target, new AttackedEvent(args.Used, args.User, args.ClickLocation)); + RaiseLocalEvent(target, new AttackedEvent(args.Used, args.User, args.ClickLocation), true); var modifiedDamage = DamageSpecifier.ApplyModifierSets(comp.Damage + hitEvent.BonusDamage, hitEvent.ModifiersList); var damageResult = _damageableSystem.TryChangeDamage(target, modifiedDamage); @@ -176,7 +176,7 @@ namespace Content.Server.Weapon.Melee foreach (var entity in hitEntities) { - RaiseLocalEvent(entity, new AttackedEvent(args.Used, args.User, args.ClickLocation)); + RaiseLocalEvent(entity, new AttackedEvent(args.Used, args.User, args.ClickLocation), true); var damageResult = _damageableSystem.TryChangeDamage(entity, modifiedDamage); diff --git a/Content.Server/Wieldable/WieldableSystem.cs b/Content.Server/Wieldable/WieldableSystem.cs index f2d6ea5aa7..2a8e86e86a 100644 --- a/Content.Server/Wieldable/WieldableSystem.cs +++ b/Content.Server/Wieldable/WieldableSystem.cs @@ -221,7 +221,7 @@ namespace Content.Server.Wieldable { if (!component.Wielded || component.Owner != args.Unequipped) return; - RaiseLocalEvent(uid, new ItemUnwieldedEvent(args.User, force: true)); + RaiseLocalEvent(uid, new ItemUnwieldedEvent(args.User, force: true), true); } private void OnVirtualItemDeleted(EntityUid uid, WieldableComponent component, VirtualItemDeletedEvent args) diff --git a/Content.Server/Wires/WiresSystem.cs b/Content.Server/Wires/WiresSystem.cs index 0759a54ec4..89b5a123c0 100644 --- a/Content.Server/Wires/WiresSystem.cs +++ b/Content.Server/Wires/WiresSystem.cs @@ -314,7 +314,7 @@ public sealed class WiresSystem : EntitySystem { if (wire.CancelToken.IsCancellationRequested) { - RaiseLocalEvent(owner, wire.OnFinish); + RaiseLocalEvent(owner, wire.OnFinish, true); _finishedWires.Add((owner, wire)); } else @@ -322,7 +322,7 @@ public sealed class WiresSystem : EntitySystem wire.TimeLeft -= frameTime; if (wire.TimeLeft <= 0) { - RaiseLocalEvent(owner, wire.OnFinish); + RaiseLocalEvent(owner, wire.OnFinish, true); _finishedWires.Add((owner, wire)); } } diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs index 365e13d81f..dee74ac09c 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs @@ -40,7 +40,7 @@ public sealed class ArtifactSystem : EntitySystem } EntityManager.AddComponent(uid, trigger); - RaiseLocalEvent(uid, new RandomizeTriggerEvent()); + RaiseLocalEvent(uid, new RandomizeTriggerEvent(), true); } public bool TryActivateArtifact(EntityUid uid, EntityUid? user = null, @@ -74,6 +74,6 @@ public sealed class ArtifactSystem : EntitySystem { Activator = user }; - RaiseLocalEvent(uid, ev); + RaiseLocalEvent(uid, ev, true); } } diff --git a/Content.Shared/ActionBlocker/ActionBlockerSystem.cs b/Content.Shared/ActionBlocker/ActionBlockerSystem.cs index 2e9389a3f6..dc4d21dc08 100644 --- a/Content.Shared/ActionBlocker/ActionBlockerSystem.cs +++ b/Content.Shared/ActionBlocker/ActionBlockerSystem.cs @@ -40,7 +40,7 @@ namespace Content.Shared.ActionBlocker return false; var ev = new UpdateCanMoveEvent(uid); - RaiseLocalEvent(uid, ev); + RaiseLocalEvent(uid, ev, true); if (component.CanMove == ev.Cancelled && component is Component comp) Dirty(comp); @@ -63,7 +63,7 @@ namespace Content.Shared.ActionBlocker public bool CanInteract(EntityUid user, EntityUid? target) { var ev = new InteractionAttemptEvent(user, target); - RaiseLocalEvent(user, ev); + RaiseLocalEvent(user, ev, true); if (ev.Cancelled) return false; @@ -72,7 +72,7 @@ namespace Content.Shared.ActionBlocker return true; var targetEv = new GettingInteractedWithAttemptEvent(user, target); - RaiseLocalEvent(target.Value, targetEv); + RaiseLocalEvent(target.Value, targetEv, true); return !targetEv.Cancelled; } @@ -88,7 +88,7 @@ namespace Content.Shared.ActionBlocker public bool CanUseHeldEntity(EntityUid user) { var ev = new UseAttemptEvent(user); - RaiseLocalEvent(user, ev); + RaiseLocalEvent(user, ev, true); return !ev.Cancelled; } @@ -96,7 +96,7 @@ namespace Content.Shared.ActionBlocker public bool CanThrow(EntityUid user) { var ev = new ThrowAttemptEvent(user); - RaiseLocalEvent(user, ev); + RaiseLocalEvent(user, ev, true); return !ev.Cancelled; } @@ -104,7 +104,7 @@ namespace Content.Shared.ActionBlocker public bool CanSpeak(EntityUid uid) { var ev = new SpeakAttemptEvent(uid); - RaiseLocalEvent(uid, ev); + RaiseLocalEvent(uid, ev, true); return !ev.Cancelled; } @@ -112,7 +112,7 @@ namespace Content.Shared.ActionBlocker public bool CanDrop(EntityUid uid) { var ev = new DropAttemptEvent(uid); - RaiseLocalEvent(uid, ev); + RaiseLocalEvent(uid, ev, true); return !ev.Cancelled; } @@ -134,7 +134,7 @@ namespace Content.Shared.ActionBlocker public bool CanEmote(EntityUid uid) { var ev = new EmoteAttemptEvent(uid); - RaiseLocalEvent(uid, ev); + RaiseLocalEvent(uid, ev, true); return !ev.Cancelled; } @@ -142,7 +142,7 @@ namespace Content.Shared.ActionBlocker public bool CanAttack(EntityUid uid, EntityUid? target = null) { var ev = new AttackAttemptEvent(uid, target); - RaiseLocalEvent(uid, ev); + RaiseLocalEvent(uid, ev, true); return !ev.Cancelled; } @@ -150,7 +150,7 @@ namespace Content.Shared.ActionBlocker public bool CanChangeDirection(EntityUid uid) { var ev = new ChangeDirectionAttemptEvent(uid); - RaiseLocalEvent(uid, ev); + RaiseLocalEvent(uid, ev, true); return !ev.Cancelled; } @@ -158,7 +158,7 @@ namespace Content.Shared.ActionBlocker public bool CanShiver(EntityUid uid) { var ev = new ShiverAttemptEvent(uid); - RaiseLocalEvent(uid, ev); + RaiseLocalEvent(uid, ev, true); return !ev.Cancelled; } @@ -166,7 +166,7 @@ namespace Content.Shared.ActionBlocker public bool CanSweat(EntityUid uid) { var ev = new SweatAttemptEvent(uid); - RaiseLocalEvent(uid, ev); + RaiseLocalEvent(uid, ev, true); return !ev.Cancelled; } diff --git a/Content.Shared/Alert/AlertsSystem.cs b/Content.Shared/Alert/AlertsSystem.cs index a045eae0ae..b0cfdfd11b 100644 --- a/Content.Shared/Alert/AlertsSystem.cs +++ b/Content.Shared/Alert/AlertsSystem.cs @@ -182,13 +182,13 @@ public abstract class AlertsSystem : EntitySystem protected virtual void HandleComponentShutdown(EntityUid uid, AlertsComponent component, ComponentShutdown args) { - RaiseLocalEvent(uid, new AlertSyncEvent(uid)); + RaiseLocalEvent(uid, new AlertSyncEvent(uid), true); _metaSystem.RemoveFlag(uid, MetaDataFlags.EntitySpecific); } private void HandleComponentStartup(EntityUid uid, AlertsComponent component, ComponentStartup args) { - RaiseLocalEvent(uid, new AlertSyncEvent(uid)); + RaiseLocalEvent(uid, new AlertSyncEvent(uid), true); _metaSystem.AddFlag(uid, MetaDataFlags.EntitySpecific); } diff --git a/Content.Shared/Body/Components/MechanismComponent.cs b/Content.Shared/Body/Components/MechanismComponent.cs index 23a3f65515..90d66d136f 100644 --- a/Content.Shared/Body/Components/MechanismComponent.cs +++ b/Content.Shared/Body/Components/MechanismComponent.cs @@ -29,11 +29,11 @@ namespace Content.Shared.Body.Components { if (old.Body == null) { - _entMan.EventBus.RaiseLocalEvent(Owner, new RemovedFromPartEvent(old)); + _entMan.EventBus.RaiseLocalEvent(Owner, new RemovedFromPartEvent(old), true); } else { - _entMan.EventBus.RaiseLocalEvent(Owner, new RemovedFromPartInBodyEvent(old.Body, old)); + _entMan.EventBus.RaiseLocalEvent(Owner, new RemovedFromPartInBodyEvent(old.Body, old), true); } } @@ -41,11 +41,11 @@ namespace Content.Shared.Body.Components { if (value.Body == null) { - _entMan.EventBus.RaiseLocalEvent(Owner, new AddedToPartEvent(value)); + _entMan.EventBus.RaiseLocalEvent(Owner, new AddedToPartEvent(value), true); } else { - _entMan.EventBus.RaiseLocalEvent(Owner, new AddedToPartInBodyEvent(value.Body, value)); + _entMan.EventBus.RaiseLocalEvent(Owner, new AddedToPartInBodyEvent(value.Body, value), true); } } } diff --git a/Content.Shared/Body/Components/SharedBodyPartComponent.cs b/Content.Shared/Body/Components/SharedBodyPartComponent.cs index 97285f37a0..0c0b9bd8f6 100644 --- a/Content.Shared/Body/Components/SharedBodyPartComponent.cs +++ b/Content.Shared/Body/Components/SharedBodyPartComponent.cs @@ -261,7 +261,7 @@ namespace Content.Shared.Body.Components foreach (var mechanism in _mechanisms) { - _entMan.EventBus.RaiseLocalEvent(mechanism.Owner, new AddedToBodyEvent(body)); + _entMan.EventBus.RaiseLocalEvent(mechanism.Owner, new AddedToBodyEvent(body), true); } } @@ -276,7 +276,7 @@ namespace Content.Shared.Body.Components foreach (var mechanism in _mechanisms) { - _entMan.EventBus.RaiseLocalEvent(mechanism.Owner, new RemovedFromBodyEvent(old)); + _entMan.EventBus.RaiseLocalEvent(mechanism.Owner, new RemovedFromBodyEvent(old), true); } } diff --git a/Content.Shared/CharacterAppearance/Systems/SharedHumanoidAppearanceSystem.cs b/Content.Shared/CharacterAppearance/Systems/SharedHumanoidAppearanceSystem.cs index 0c65e335cd..3d0f6a03a9 100644 --- a/Content.Shared/CharacterAppearance/Systems/SharedHumanoidAppearanceSystem.cs +++ b/Content.Shared/CharacterAppearance/Systems/SharedHumanoidAppearanceSystem.cs @@ -43,7 +43,7 @@ namespace Content.Shared.CharacterAppearance.Systems component.Dirty(); - RaiseLocalEvent(uid, new ChangedHumanoidAppearanceEvent(appearance, sex, gender, species)); + RaiseLocalEvent(uid, new ChangedHumanoidAppearanceEvent(appearance, sex, gender, species), true); } public void UpdateAppearance(EntityUid uid, HumanoidCharacterAppearance appearance, HumanoidAppearanceComponent? component = null) @@ -54,7 +54,7 @@ namespace Content.Shared.CharacterAppearance.Systems component.Dirty(); - RaiseLocalEvent(uid, new ChangedHumanoidAppearanceEvent(appearance, component.Sex, component.Gender, component.Species)); + RaiseLocalEvent(uid, new ChangedHumanoidAppearanceEvent(appearance, component.Sex, component.Gender, component.Species), true); } private void OnAppearanceGetState(EntityUid uid, HumanoidAppearanceComponent component, ref ComponentGetState args) diff --git a/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs b/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs index 49ef5d2658..49ce16f4aa 100644 --- a/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs +++ b/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs @@ -205,7 +205,7 @@ namespace Content.Shared.Containers.ItemSlots PlaySound(uid, slot.InsertSound, slot.SoundOptions, excludeUserAudio ? user : null); var ev = new ItemSlotChangedEvent(); - RaiseLocalEvent(uid, ref ev); + RaiseLocalEvent(uid, ref ev, true); } /// @@ -330,7 +330,7 @@ namespace Content.Shared.Containers.ItemSlots PlaySound(uid, slot.EjectSound, slot.SoundOptions, excludeUserAudio ? user : null); var ev = new ItemSlotChangedEvent(); - RaiseLocalEvent(uid, ref ev); + RaiseLocalEvent(uid, ref ev, true); } /// diff --git a/Content.Shared/Examine/ExamineSystemShared.cs b/Content.Shared/Examine/ExamineSystemShared.cs index 757f5e7c24..693c5feb0e 100644 --- a/Content.Shared/Examine/ExamineSystemShared.cs +++ b/Content.Shared/Examine/ExamineSystemShared.cs @@ -257,7 +257,7 @@ namespace Content.Shared.Examine // Raise the event and let things that subscribe to it change the message... var isInDetailsRange = IsInDetailsRange(examiner.Value, entity); var examinedEvent = new ExaminedEvent(message, entity, examiner.Value, isInDetailsRange, doNewline); - RaiseLocalEvent(entity, examinedEvent); + RaiseLocalEvent(entity, examinedEvent, true); message.Pop(); diff --git a/Content.Shared/Follower/FollowerSystem.cs b/Content.Shared/Follower/FollowerSystem.cs index 0340bdf714..42537d6e47 100644 --- a/Content.Shared/Follower/FollowerSystem.cs +++ b/Content.Shared/Follower/FollowerSystem.cs @@ -79,7 +79,7 @@ public sealed class FollowerSystem : EntitySystem var followerEv = new StartedFollowingEntityEvent(entity, follower); var entityEv = new EntityStartedFollowingEvent(entity, follower); - RaiseLocalEvent(follower, followerEv); + RaiseLocalEvent(follower, followerEv, true); RaiseLocalEvent(entity, entityEv, false); } @@ -107,7 +107,7 @@ public sealed class FollowerSystem : EntitySystem var uidEv = new StoppedFollowingEntityEvent(target, uid); var targetEv = new EntityStoppedFollowingEvent(target, uid); - RaiseLocalEvent(uid, uidEv); + RaiseLocalEvent(uid, uidEv, true); RaiseLocalEvent(target, targetEv, false); } diff --git a/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Drop.cs b/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Drop.cs index 7ef1c74672..64ca889128 100644 --- a/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Drop.cs +++ b/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Drop.cs @@ -158,7 +158,7 @@ public abstract partial class SharedHandsSystem : EntitySystem RaiseLocalEvent(entity, gotUnequipped, false); var didUnequip = new DidUnequipHandEvent(uid, entity, hand); - RaiseLocalEvent(uid, didUnequip); + RaiseLocalEvent(uid, didUnequip, true); if (hand == handsComp.ActiveHand) RaiseLocalEvent(entity, new HandDeselectedEvent(uid), false); diff --git a/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Pickup.cs b/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Pickup.cs index 2afe6a3f61..7e6e990527 100644 --- a/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Pickup.cs +++ b/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Pickup.cs @@ -145,7 +145,7 @@ public abstract partial class SharedHandsSystem : EntitySystem RaiseLocalEvent(uid, didEquip, false); var gotEquipped = new GotEquippedHandEvent(uid, entity, hand); - RaiseLocalEvent(entity, gotEquipped); + RaiseLocalEvent(entity, gotEquipped, true); // TODO this should REALLY be a cancellable thing, not a handled event. // If one of the interactions resulted in the item being dropped, return early. diff --git a/Content.Shared/Interaction/SharedInteractionSystem.cs b/Content.Shared/Interaction/SharedInteractionSystem.cs index c7847a6c6e..1d98bf8a7d 100644 --- a/Content.Shared/Interaction/SharedInteractionSystem.cs +++ b/Content.Shared/Interaction/SharedInteractionSystem.cs @@ -280,7 +280,7 @@ namespace Content.Shared.Interaction { // all interactions should only happen when in range / unobstructed, so no range check is needed var message = new InteractHandEvent(user, target); - RaiseLocalEvent(target, message); + RaiseLocalEvent(target, message, true); _adminLogger.Add(LogType.InteractHand, LogImpact.Low, $"{ToPrettyString(user):user} interacted with {ToPrettyString(target):target}"); if (message.Handled) return; @@ -307,7 +307,7 @@ namespace Content.Shared.Interaction if (target != null) { var rangedMsg = new RangedInteractEvent(user, used, target.Value, clickLocation); - RaiseLocalEvent(target.Value, rangedMsg); + RaiseLocalEvent(target.Value, rangedMsg, true); if (rangedMsg.Handled) return; @@ -619,7 +619,7 @@ namespace Content.Shared.Interaction // all interactions should only happen when in range / unobstructed, so no range check is needed var interactUsingEvent = new InteractUsingEvent(user, used, target, clickLocation); - RaiseLocalEvent(target, interactUsingEvent); + RaiseLocalEvent(target, interactUsingEvent, true); if (interactUsingEvent.Handled) return; @@ -717,7 +717,7 @@ namespace Content.Shared.Interaction return false; var activateMsg = new ActivateInWorldEvent(user, used); - RaiseLocalEvent(used, activateMsg); + RaiseLocalEvent(used, activateMsg, true); if (activateMsg.Handled) { _useDelay.BeginDelay(used, delayComponent); @@ -766,7 +766,7 @@ namespace Content.Shared.Interaction return false; var useMsg = new UseInHandEvent(user); - RaiseLocalEvent(used, useMsg); + RaiseLocalEvent(used, useMsg, true); if (useMsg.Handled) { _useDelay.BeginDelay(used, delayComponent); @@ -805,7 +805,7 @@ namespace Content.Shared.Interaction public void ThrownInteraction(EntityUid user, EntityUid thrown) { var throwMsg = new ThrownEvent(user, thrown); - RaiseLocalEvent(thrown, throwMsg); + RaiseLocalEvent(thrown, throwMsg, true); if (throwMsg.Handled) { _adminLogger.Add(LogType.Throw, LogImpact.Low,$"{ToPrettyString(user):user} threw {ToPrettyString(thrown):entity}"); @@ -819,7 +819,7 @@ namespace Content.Shared.Interaction public void DroppedInteraction(EntityUid user, EntityUid item) { var dropMsg = new DroppedEvent(user); - RaiseLocalEvent(item, dropMsg); + RaiseLocalEvent(item, dropMsg, true); if (dropMsg.Handled) _adminLogger.Add(LogType.Drop, LogImpact.Low, $"{ToPrettyString(user):user} dropped {ToPrettyString(item):entity}"); Transform(item).LocalRotation = Angle.Zero; diff --git a/Content.Shared/Inventory/InventorySystem.Equip.cs b/Content.Shared/Inventory/InventorySystem.Equip.cs index 721d14956e..c3169fc5aa 100644 --- a/Content.Shared/Inventory/InventorySystem.Equip.cs +++ b/Content.Shared/Inventory/InventorySystem.Equip.cs @@ -82,10 +82,10 @@ public abstract partial class InventorySystem return; var unequippedEvent = new DidUnequipEvent(uid, args.Entity, slotDef); - RaiseLocalEvent(uid, unequippedEvent); + RaiseLocalEvent(uid, unequippedEvent, true); var gotUnequippedEvent = new GotUnequippedEvent(uid, args.Entity, slotDef); - RaiseLocalEvent(args.Entity, gotUnequippedEvent); + RaiseLocalEvent(args.Entity, gotUnequippedEvent, true); } private void OnEntInserted(EntityUid uid, InventoryComponent component, EntInsertedIntoContainerMessage args) @@ -94,10 +94,10 @@ public abstract partial class InventorySystem return; var equippedEvent = new DidEquipEvent(uid, args.Entity, slotDef); - RaiseLocalEvent(uid, equippedEvent); + RaiseLocalEvent(uid, equippedEvent, true); var gotEquippedEvent = new GotEquippedEvent(uid, args.Entity, slotDef); - RaiseLocalEvent(args.Entity, gotEquippedEvent); + RaiseLocalEvent(args.Entity, gotEquippedEvent, true); } /// @@ -151,7 +151,7 @@ public abstract partial class InventorySystem var gotUnequipped = new GotUnequippedHandEvent(actor, held.Value, hands.ActiveHand!); var didUnequip = new DidUnequipHandEvent(actor, held.Value, hands.ActiveHand!); RaiseLocalEvent(held.Value, gotUnequipped, false); - RaiseLocalEvent(actor, didUnequip); + RaiseLocalEvent(actor, didUnequip, true); RaiseLocalEvent(held.Value, new HandDeselectedEvent(actor), false); TryEquip(actor, actor, held.Value, ev.Slot, predicted: true, inventory: inventory, force: true); @@ -274,7 +274,7 @@ public abstract partial class InventorySystem } var attemptEvent = new IsEquippingAttemptEvent(actor, target, itemUid, slotDefinition); - RaiseLocalEvent(target, attemptEvent); + RaiseLocalEvent(target, attemptEvent, true); if (attemptEvent.Cancelled) { reason = attemptEvent.Reason ?? reason; @@ -285,7 +285,7 @@ public abstract partial class InventorySystem { //reuse the event. this is gucci, right? attemptEvent.Reason = null; - RaiseLocalEvent(actor, attemptEvent); + RaiseLocalEvent(actor, attemptEvent, true); if (attemptEvent.Cancelled) { reason = attemptEvent.Reason ?? reason; @@ -294,7 +294,7 @@ public abstract partial class InventorySystem } var itemAttemptEvent = new BeingEquippedAttemptEvent(actor, target, itemUid, slotDefinition); - RaiseLocalEvent(itemUid, itemAttemptEvent); + RaiseLocalEvent(itemUid, itemAttemptEvent, true); if (itemAttemptEvent.Cancelled) { reason = itemAttemptEvent.Reason ?? reason; @@ -426,7 +426,7 @@ public abstract partial class InventorySystem } var attemptEvent = new IsUnequippingAttemptEvent(actor, target, itemUid, slotDefinition); - RaiseLocalEvent(target, attemptEvent); + RaiseLocalEvent(target, attemptEvent, true); if (attemptEvent.Cancelled) { reason = attemptEvent.Reason ?? reason; @@ -437,7 +437,7 @@ public abstract partial class InventorySystem { //reuse the event. this is gucci, right? attemptEvent.Reason = null; - RaiseLocalEvent(actor, attemptEvent); + RaiseLocalEvent(actor, attemptEvent, true); if (attemptEvent.Cancelled) { reason = attemptEvent.Reason ?? reason; @@ -446,7 +446,7 @@ public abstract partial class InventorySystem } var itemAttemptEvent = new BeingUnequippedAttemptEvent(actor, target, itemUid, slotDefinition); - RaiseLocalEvent(itemUid, itemAttemptEvent); + RaiseLocalEvent(itemUid, itemAttemptEvent, true); if (itemAttemptEvent.Cancelled) { reason = attemptEvent.Reason ?? reason; diff --git a/Content.Shared/MobState/Components/MobStateComponent.cs b/Content.Shared/MobState/Components/MobStateComponent.cs index 7576417bdc..8a6814ec02 100644 --- a/Content.Shared/MobState/Components/MobStateComponent.cs +++ b/Content.Shared/MobState/Components/MobStateComponent.cs @@ -305,7 +305,7 @@ namespace Content.Shared.MobState.Components state.UpdateState(Owner, threshold, entMan); var message = new MobStateChangedEvent(this, old, state); - entMan.EventBus.RaiseLocalEvent(Owner, message); + entMan.EventBus.RaiseLocalEvent(Owner, message, true); Dirty(); } } diff --git a/Content.Shared/Movement/EntitySystems/SharedMoverSystem.cs b/Content.Shared/Movement/EntitySystems/SharedMoverSystem.cs index 99fa7e987d..88926bab17 100644 --- a/Content.Shared/Movement/EntitySystems/SharedMoverSystem.cs +++ b/Content.Shared/Movement/EntitySystems/SharedMoverSystem.cs @@ -48,7 +48,7 @@ namespace Content.Shared.Movement.EntitySystems if (owner != null && session != null) { - EntityManager.EventBus.RaiseLocalEvent(owner.Value, new RelayMoveInputEvent(session)); + EntityManager.EventBus.RaiseLocalEvent(owner.Value, new RelayMoveInputEvent(session), true); // For stuff like "Moving out of locker" or the likes if (owner.Value.IsInContainer() && @@ -56,7 +56,7 @@ namespace Content.Shared.Movement.EntitySystems mobState.IsAlive())) { var relayMoveEvent = new RelayMovementEntityEvent(owner.Value); - EntityManager.EventBus.RaiseLocalEvent(EntityManager.GetComponent(owner.Value).ParentUid, relayMoveEvent); + EntityManager.EventBus.RaiseLocalEvent(EntityManager.GetComponent(owner.Value).ParentUid, relayMoveEvent, true); } // Pass the rider's inputs to the vehicle (the rider itself is on the ignored list in C.S/MoverController.cs) if (TryComp(owner.Value, out var rider) && rider.Vehicle != null && rider.Vehicle.HasKey) diff --git a/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs b/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs index fd28c293d5..5d1d19aa35 100644 --- a/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs +++ b/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs @@ -61,7 +61,7 @@ namespace Content.Shared.Pulling RaiseLocalEvent(puller.Owner, message, broadcast: false); if (Initialized(pullable.Owner)) - RaiseLocalEvent(pullable.Owner, message); + RaiseLocalEvent(pullable.Owner, message, true); // Networking puller.Dirty(); @@ -117,7 +117,7 @@ namespace Content.Shared.Pulling var message = new PullStartedMessage(pullerPhysics, pullablePhysics); RaiseLocalEvent(puller.Owner, message, broadcast: false); - RaiseLocalEvent(pullable.Owner, message); + RaiseLocalEvent(pullable.Owner, message, true); // Networking Dirty(puller); @@ -157,11 +157,11 @@ namespace Content.Shared.Pulling if (movingTo == null) { - RaiseLocalEvent(pullable.Owner, new PullableStopMovingMessage()); + RaiseLocalEvent(pullable.Owner, new PullableStopMovingMessage(), true); } else { - RaiseLocalEvent(pullable.Owner, new PullableMoveMessage()); + RaiseLocalEvent(pullable.Owner, new PullableMoveMessage(), true); } } } diff --git a/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs b/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs index c0c9f07f4c..b1b6f3e431 100644 --- a/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs +++ b/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs @@ -63,9 +63,9 @@ namespace Content.Shared.Pulling } var getPulled = new BeingPulledAttemptEvent(puller, pulled); - RaiseLocalEvent(pulled, getPulled); + RaiseLocalEvent(pulled, getPulled, true); var startPull = new StartPullAttemptEvent(puller, pulled); - RaiseLocalEvent(puller, startPull); + RaiseLocalEvent(puller, startPull, true); return (!startPull.Cancelled && !getPulled.Cancelled); } @@ -88,7 +88,7 @@ namespace Content.Shared.Pulling } var msg = new StopPullingEvent(user); - RaiseLocalEvent(pullable.Owner, msg); + RaiseLocalEvent(pullable.Owner, msg, true); if (msg.Cancelled) return false; @@ -183,7 +183,7 @@ namespace Content.Shared.Pulling return false; } - RaiseLocalEvent(pullable.Owner, pullAttempt); + RaiseLocalEvent(pullable.Owner, pullAttempt, true); if (pullAttempt.Cancelled) return false; diff --git a/Content.Shared/StepTrigger/StepTriggerSystem.cs b/Content.Shared/StepTrigger/StepTriggerSystem.cs index 209dd7a1e8..ad57889ff5 100644 --- a/Content.Shared/StepTrigger/StepTriggerSystem.cs +++ b/Content.Shared/StepTrigger/StepTriggerSystem.cs @@ -77,7 +77,7 @@ public sealed class StepTriggerSystem : EntitySystem return false; var ev = new StepTriggeredEvent { Source = component.Owner, Tripper = otherUid }; - RaiseLocalEvent(component.Owner, ref ev); + RaiseLocalEvent(component.Owner, ref ev, true); component.CurrentlySteppedOn.Add(otherUid); Dirty(component); @@ -91,7 +91,7 @@ public sealed class StepTriggerSystem : EntitySystem var msg = new StepTriggerAttemptEvent { Source = uid, Tripper = otherUid }; - RaiseLocalEvent(uid, ref msg); + RaiseLocalEvent(uid, ref msg, true); return msg.Continue; } diff --git a/Content.Shared/Throwing/ThrownItemSystem.cs b/Content.Shared/Throwing/ThrownItemSystem.cs index ae72e81e4f..6428f55ea8 100644 --- a/Content.Shared/Throwing/ThrownItemSystem.cs +++ b/Content.Shared/Throwing/ThrownItemSystem.cs @@ -111,7 +111,7 @@ namespace Content.Shared.Throwing } } - EntityManager.EventBus.RaiseLocalEvent(uid, new StopThrowEvent {User = thrownItemComponent.Thrower}); + EntityManager.EventBus.RaiseLocalEvent(uid, new StopThrowEvent {User = thrownItemComponent.Thrower}, true); EntityManager.RemoveComponent(uid); } @@ -146,8 +146,8 @@ namespace Content.Shared.Throwing _adminLogger.Add(LogType.ThrowHit, LogImpact.Low, $"{ToPrettyString(thrown.Owner):thrown} thrown by {ToPrettyString(user.Value):thrower} hit {ToPrettyString(target.Owner):target}."); // TODO: Just pass in the bodies directly - RaiseLocalEvent(target.Owner, new ThrowHitByEvent(user, thrown.Owner, target.Owner)); - RaiseLocalEvent(thrown.Owner, new ThrowDoHitEvent(user, thrown.Owner, target.Owner)); + RaiseLocalEvent(target.Owner, new ThrowHitByEvent(user, thrown.Owner, target.Owner), true); + RaiseLocalEvent(thrown.Owner, new ThrowDoHitEvent(user, thrown.Owner, target.Owner), true); } } } diff --git a/Content.Shared/Verbs/SharedVerbSystem.cs b/Content.Shared/Verbs/SharedVerbSystem.cs index 217bc66c48..8b47fb72be 100644 --- a/Content.Shared/Verbs/SharedVerbSystem.cs +++ b/Content.Shared/Verbs/SharedVerbSystem.cs @@ -89,7 +89,7 @@ namespace Content.Shared.Verbs if (types.Contains(typeof(InteractionVerb))) { var verbEvent = new GetVerbsEvent(user, target, @using, hands, canInteract, canAccess); - RaiseLocalEvent(target, verbEvent); + RaiseLocalEvent(target, verbEvent, true); verbs.UnionWith(verbEvent.Verbs); } @@ -98,35 +98,35 @@ namespace Content.Shared.Verbs && @using != target) { var verbEvent = new GetVerbsEvent(user, target, @using, hands, canInteract, canAccess); - RaiseLocalEvent(@using.Value, verbEvent); // directed at used, not at target + RaiseLocalEvent(@using.Value, verbEvent, true); // directed at used, not at target verbs.UnionWith(verbEvent.Verbs); } if (types.Contains(typeof(InnateVerb))) { var verbEvent = new GetVerbsEvent(user, target, @using, hands, canInteract, canAccess); - RaiseLocalEvent(user, verbEvent); + RaiseLocalEvent(user, verbEvent, true); verbs.UnionWith(verbEvent.Verbs); } if (types.Contains(typeof(AlternativeVerb))) { var verbEvent = new GetVerbsEvent(user, target, @using, hands, canInteract, canAccess); - RaiseLocalEvent(target, verbEvent); + RaiseLocalEvent(target, verbEvent, true); verbs.UnionWith(verbEvent.Verbs); } if (types.Contains(typeof(ActivationVerb))) { var verbEvent = new GetVerbsEvent(user, target, @using, hands, canInteract, canAccess); - RaiseLocalEvent(target, verbEvent); + RaiseLocalEvent(target, verbEvent, true); verbs.UnionWith(verbEvent.Verbs); } if (types.Contains(typeof(ExamineVerb))) { var verbEvent = new GetVerbsEvent(user, target, @using, hands, canInteract, canAccess); - RaiseLocalEvent(target, verbEvent); + RaiseLocalEvent(target, verbEvent, true); verbs.UnionWith(verbEvent.Verbs); } @@ -134,7 +134,7 @@ namespace Content.Shared.Verbs if (types.Contains(typeof(Verb))) { var verbEvent = new GetVerbsEvent(user, target, @using, hands, canInteract, canAccess); - RaiseLocalEvent(target, verbEvent); + RaiseLocalEvent(target, verbEvent, true); verbs.UnionWith(verbEvent.Verbs); }