Make raiselocalevent not broadcast by default (#8998)

This commit is contained in:
metalgearsloth
2022-06-22 09:53:41 +10:00
committed by GitHub
parent 360a6b8b00
commit 8905996cfc
76 changed files with 165 additions and 165 deletions

View File

@@ -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);
}
}

View File

@@ -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;

View File

@@ -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)

View File

@@ -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);
}
/// <summary>

View File

@@ -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)
{

View File

@@ -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);
}