Code cleanup: Dirty(Comp) (#26238)
* Replaced uses of Dirty(Component) with Dirty(Uid, Component) Modified some systems (notably pulling-related) to use uids. * Missed a few * Revert changes to pulling * No
This commit is contained in:
@@ -124,9 +124,9 @@ public sealed class WeatherSystem : SharedWeatherSystem
|
|||||||
comp.Occlusion = occlusion;
|
comp.Occlusion = occlusion;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool SetState(WeatherState state, WeatherComponent comp, WeatherData weather, WeatherPrototype weatherProto)
|
protected override bool SetState(EntityUid uid, WeatherState state, WeatherComponent comp, WeatherData weather, WeatherPrototype weatherProto)
|
||||||
{
|
{
|
||||||
if (!base.SetState(state, comp, weather, weatherProto))
|
if (!base.SetState(uid, state, comp, weather, weatherProto))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!Timing.IsFirstTimePredicted)
|
if (!Timing.IsFirstTimePredicted)
|
||||||
@@ -164,7 +164,7 @@ public sealed class WeatherSystem : SharedWeatherSystem
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// New weather
|
// New weather
|
||||||
StartWeather(component, ProtoMan.Index<WeatherPrototype>(proto), weather.EndTime);
|
StartWeather(uid, component, ProtoMan.Index<WeatherPrototype>(proto), weather.EndTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,9 +130,9 @@ namespace Content.IntegrationTests.Tests.Tag
|
|||||||
Assert.Multiple(() =>
|
Assert.Multiple(() =>
|
||||||
{
|
{
|
||||||
// Cannot add the starting tag again
|
// Cannot add the starting tag again
|
||||||
Assert.That(tagSystem.AddTag(sTagComponent, StartingTag), Is.False);
|
Assert.That(tagSystem.AddTag(sTagDummy, sTagComponent, StartingTag), Is.False);
|
||||||
Assert.That(tagSystem.AddTags(sTagComponent, StartingTag, StartingTag), Is.False);
|
Assert.That(tagSystem.AddTags(sTagDummy, sTagComponent, StartingTag, StartingTag), Is.False);
|
||||||
Assert.That(tagSystem.AddTags(sTagComponent, new List<string> { StartingTag, StartingTag }), Is.False);
|
Assert.That(tagSystem.AddTags(sTagDummy, sTagComponent, new List<string> { StartingTag, StartingTag }), Is.False);
|
||||||
|
|
||||||
// Has the starting tag
|
// Has the starting tag
|
||||||
Assert.That(tagSystem.HasTag(sTagComponent, StartingTag), Is.True);
|
Assert.That(tagSystem.HasTag(sTagComponent, StartingTag), Is.True);
|
||||||
@@ -157,22 +157,22 @@ namespace Content.IntegrationTests.Tests.Tag
|
|||||||
Assert.That(tagSystem.HasAllTags(sTagComponent, new List<string> { StartingTag, AddedTag }), Is.False);
|
Assert.That(tagSystem.HasAllTags(sTagComponent, new List<string> { StartingTag, AddedTag }), Is.False);
|
||||||
|
|
||||||
// Cannot remove a tag that does not exist
|
// Cannot remove a tag that does not exist
|
||||||
Assert.That(tagSystem.RemoveTag(sTagComponent, AddedTag), Is.False);
|
Assert.That(tagSystem.RemoveTag(sTagDummy, sTagComponent, AddedTag), Is.False);
|
||||||
Assert.That(tagSystem.RemoveTags(sTagComponent, AddedTag, AddedTag), Is.False);
|
Assert.That(tagSystem.RemoveTags(sTagDummy, sTagComponent, AddedTag, AddedTag), Is.False);
|
||||||
Assert.That(tagSystem.RemoveTags(sTagComponent, new List<string> { AddedTag, AddedTag }), Is.False);
|
Assert.That(tagSystem.RemoveTags(sTagDummy, sTagComponent, new List<string> { AddedTag, AddedTag }), Is.False);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Can add the new tag
|
// Can add the new tag
|
||||||
Assert.That(tagSystem.AddTag(sTagComponent, AddedTag), Is.True);
|
Assert.That(tagSystem.AddTag(sTagDummy, sTagComponent, AddedTag), Is.True);
|
||||||
|
|
||||||
Assert.Multiple(() =>
|
Assert.Multiple(() =>
|
||||||
{
|
{
|
||||||
// Cannot add it twice
|
// Cannot add it twice
|
||||||
Assert.That(tagSystem.AddTag(sTagComponent, AddedTag), Is.False);
|
Assert.That(tagSystem.AddTag(sTagDummy, sTagComponent, AddedTag), Is.False);
|
||||||
|
|
||||||
// Cannot add existing tags
|
// Cannot add existing tags
|
||||||
Assert.That(tagSystem.AddTags(sTagComponent, StartingTag, AddedTag), Is.False);
|
Assert.That(tagSystem.AddTags(sTagDummy, sTagComponent, StartingTag, AddedTag), Is.False);
|
||||||
Assert.That(tagSystem.AddTags(sTagComponent, new List<string> { StartingTag, AddedTag }), Is.False);
|
Assert.That(tagSystem.AddTags(sTagDummy, sTagComponent, new List<string> { StartingTag, AddedTag }), Is.False);
|
||||||
|
|
||||||
// Now has two tags
|
// Now has two tags
|
||||||
Assert.That(sTagComponent.Tags, Has.Count.EqualTo(2));
|
Assert.That(sTagComponent.Tags, Has.Count.EqualTo(2));
|
||||||
@@ -191,16 +191,16 @@ namespace Content.IntegrationTests.Tests.Tag
|
|||||||
Assert.Multiple(() =>
|
Assert.Multiple(() =>
|
||||||
{
|
{
|
||||||
// Remove the existing starting tag
|
// Remove the existing starting tag
|
||||||
Assert.That(tagSystem.RemoveTag(sTagComponent, StartingTag), Is.True);
|
Assert.That(tagSystem.RemoveTag(sTagDummy, sTagComponent, StartingTag), Is.True);
|
||||||
|
|
||||||
// Remove the existing added tag
|
// Remove the existing added tag
|
||||||
Assert.That(tagSystem.RemoveTags(sTagComponent, AddedTag, AddedTag), Is.True);
|
Assert.That(tagSystem.RemoveTags(sTagDummy, sTagComponent, AddedTag, AddedTag), Is.True);
|
||||||
});
|
});
|
||||||
|
|
||||||
Assert.Multiple(() =>
|
Assert.Multiple(() =>
|
||||||
{
|
{
|
||||||
// No tags left to remove
|
// No tags left to remove
|
||||||
Assert.That(tagSystem.RemoveTags(sTagComponent, new List<string> { StartingTag, AddedTag }), Is.False);
|
Assert.That(tagSystem.RemoveTags(sTagDummy, sTagComponent, new List<string> { StartingTag, AddedTag }), Is.False);
|
||||||
|
|
||||||
// No tags left in the component
|
// No tags left in the component
|
||||||
Assert.That(sTagComponent.Tags, Is.Empty);
|
Assert.That(sTagComponent.Tags, Is.Empty);
|
||||||
|
|||||||
@@ -644,7 +644,7 @@ public sealed partial class AdminVerbSystem
|
|||||||
var grav = EnsureComp<MovementIgnoreGravityComponent>(args.Target);
|
var grav = EnsureComp<MovementIgnoreGravityComponent>(args.Target);
|
||||||
grav.Weightless = true;
|
grav.Weightless = true;
|
||||||
|
|
||||||
Dirty(grav);
|
Dirty(args.Target, grav);
|
||||||
},
|
},
|
||||||
Impact = LogImpact.Extreme,
|
Impact = LogImpact.Extreme,
|
||||||
Message = Loc.GetString("admin-smite-remove-gravity-description"),
|
Message = Loc.GetString("admin-smite-remove-gravity-description"),
|
||||||
@@ -741,7 +741,7 @@ public sealed partial class AdminVerbSystem
|
|||||||
var movementSpeed = EnsureComp<MovementSpeedModifierComponent>(args.Target);
|
var movementSpeed = EnsureComp<MovementSpeedModifierComponent>(args.Target);
|
||||||
(movementSpeed.BaseSprintSpeed, movementSpeed.BaseWalkSpeed) = (movementSpeed.BaseWalkSpeed, movementSpeed.BaseSprintSpeed);
|
(movementSpeed.BaseSprintSpeed, movementSpeed.BaseWalkSpeed) = (movementSpeed.BaseWalkSpeed, movementSpeed.BaseSprintSpeed);
|
||||||
|
|
||||||
Dirty(movementSpeed);
|
Dirty(args.Target, movementSpeed);
|
||||||
|
|
||||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-run-walk-swap-prompt"), args.Target,
|
_popupSystem.PopupEntity(Loc.GetString("admin-smite-run-walk-swap-prompt"), args.Target,
|
||||||
args.Target, PopupType.LargeCaution);
|
args.Target, PopupType.LargeCaution);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public partial class AtmosphereSystem
|
|||||||
|
|
||||||
component.Space = space;
|
component.Space = space;
|
||||||
component.Mixture = mixture;
|
component.Mixture = mixture;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetMapGasMixture(EntityUid uid, GasMixture? mixture, MapAtmosphereComponent? component = null)
|
public void SetMapGasMixture(EntityUid uid, GasMixture? mixture, MapAtmosphereComponent? component = null)
|
||||||
@@ -67,7 +67,7 @@ public partial class AtmosphereSystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
component.Mixture = mixture;
|
component.Mixture = mixture;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetMapSpace(EntityUid uid, bool space, MapAtmosphereComponent? component = null)
|
public void SetMapSpace(EntityUid uid, bool space, MapAtmosphereComponent? component = null)
|
||||||
@@ -76,6 +76,6 @@ public partial class AtmosphereSystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
component.Space = space;
|
component.Space = space;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
else
|
else
|
||||||
component.LastPosition = null;
|
component.LastPosition = null;
|
||||||
component.Enabled = true;
|
component.Enabled = true;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
UpdateAppearance(uid, component);
|
UpdateAppearance(uid, component);
|
||||||
if (!HasComp<ActiveGasAnalyzerComponent>(uid))
|
if (!HasComp<ActiveGasAnalyzerComponent>(uid))
|
||||||
AddComp<ActiveGasAnalyzerComponent>(uid);
|
AddComp<ActiveGasAnalyzerComponent>(uid);
|
||||||
@@ -122,7 +122,7 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
_userInterface.TryClose(uid, GasAnalyzerUiKey.Key, actor.PlayerSession);
|
_userInterface.TryClose(uid, GasAnalyzerUiKey.Key, actor.PlayerSession);
|
||||||
|
|
||||||
component.Enabled = false;
|
component.Enabled = false;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
UpdateAppearance(uid, component);
|
UpdateAppearance(uid, component);
|
||||||
RemCompDeferred<ActiveGasAnalyzerComponent>(uid);
|
RemCompDeferred<ActiveGasAnalyzerComponent>(uid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,10 +118,11 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PVS was turned off, ensure data gets sent to all clients.
|
// PVS was turned off, ensure data gets sent to all clients.
|
||||||
foreach (var (grid, meta) in EntityQuery<GasTileOverlayComponent, MetaDataComponent>(true))
|
var query = EntityQueryEnumerator<GasTileOverlayComponent, MetaDataComponent>();
|
||||||
|
while (query.MoveNext(out var uid, out var grid, out var meta))
|
||||||
{
|
{
|
||||||
grid.ForceTick = _gameTiming.CurTick;
|
grid.ForceTick = _gameTiming.CurTick;
|
||||||
Dirty(grid, meta);
|
Dirty(uid, grid, meta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,9 +265,10 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
private void UpdateOverlayData(GameTick curTick)
|
private void UpdateOverlayData(GameTick curTick)
|
||||||
{
|
{
|
||||||
// TODO parallelize?
|
// TODO parallelize?
|
||||||
foreach (var (overlay, gam, meta) in EntityQuery<GasTileOverlayComponent, GridAtmosphereComponent, MetaDataComponent>(true))
|
var query = EntityQueryEnumerator<GasTileOverlayComponent, GridAtmosphereComponent, MetaDataComponent>();
|
||||||
|
while (query.MoveNext(out var uid, out var overlay, out var gam, out var meta))
|
||||||
{
|
{
|
||||||
bool changed = false;
|
var changed = false;
|
||||||
foreach (var index in overlay.InvalidTiles)
|
foreach (var index in overlay.InvalidTiles)
|
||||||
{
|
{
|
||||||
var chunkIndex = GetGasChunkIndices(index);
|
var chunkIndex = GetGasChunkIndices(index);
|
||||||
@@ -278,7 +280,7 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (changed)
|
if (changed)
|
||||||
Dirty(overlay, meta);
|
Dirty(uid, overlay, meta);
|
||||||
|
|
||||||
overlay.InvalidTiles.Clear();
|
overlay.InvalidTiles.Clear();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace Content.Server.BarSign.Systems
|
|||||||
_metaData.SetEntityDescription(uid, Loc.GetString(newPrototype.Description), meta);
|
_metaData.SetEntityDescription(uid, Loc.GetString(newPrototype.Description), meta);
|
||||||
|
|
||||||
component.Current = newPrototype.ID;
|
component.Current = newPrototype.ID;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ public sealed class ChameleonClothingSystem : SharedChameleonClothingSystem
|
|||||||
UpdateIdentityBlocker(uid, component, proto);
|
UpdateIdentityBlocker(uid, component, proto);
|
||||||
UpdateVisuals(uid, component);
|
UpdateVisuals(uid, component);
|
||||||
UpdateUi(uid, component);
|
UpdateUi(uid, component);
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateIdentityBlocker(EntityUid uid, ChameleonClothingComponent component, EntityPrototype proto)
|
private void UpdateIdentityBlocker(EntityUid uid, ChameleonClothingComponent component, EntityPrototype proto)
|
||||||
|
|||||||
@@ -89,10 +89,11 @@ namespace Content.Server.Decals
|
|||||||
playerData.Clear();
|
playerData.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var (grid, meta) in EntityQuery<DecalGridComponent, MetaDataComponent>(true))
|
var query = EntityQueryEnumerator<DecalGridComponent, MetaDataComponent>();
|
||||||
|
while (query.MoveNext(out var uid, out var grid, out var meta))
|
||||||
{
|
{
|
||||||
grid.ForceTick = _timing.CurTick;
|
grid.ForceTick = _timing.CurTick;
|
||||||
Dirty(grid, meta);
|
Dirty(uid, grid, meta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void UpdateModeAppearance(EntityUid userUid, EntityUid configuratorUid, NetworkConfiguratorComponent configurator)
|
private void UpdateModeAppearance(EntityUid userUid, EntityUid configuratorUid, NetworkConfiguratorComponent configurator)
|
||||||
{
|
{
|
||||||
Dirty(configurator);
|
Dirty(configuratorUid, configurator);
|
||||||
_appearanceSystem.SetData(configuratorUid, NetworkConfiguratorVisuals.Mode, configurator.LinkModeActive);
|
_appearanceSystem.SetData(configuratorUid, NetworkConfiguratorVisuals.Mode, configurator.LinkModeActive);
|
||||||
|
|
||||||
var pitch = configurator.LinkModeActive ? 1 : 0.8f;
|
var pitch = configurator.LinkModeActive ? 1 : 0.8f;
|
||||||
|
|||||||
@@ -340,7 +340,7 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem
|
|||||||
if (!args.Powered)
|
if (!args.Powered)
|
||||||
{
|
{
|
||||||
component.NextFlush = null;
|
component.NextFlush = null;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -396,7 +396,7 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem
|
|||||||
component.State = state;
|
component.State = state;
|
||||||
UpdateVisualState(uid, component);
|
UpdateVisualState(uid, component);
|
||||||
UpdateInterface(uid, component, component.Powered);
|
UpdateInterface(uid, component, component.Powered);
|
||||||
Dirty(component, metadata);
|
Dirty(uid, component, metadata);
|
||||||
|
|
||||||
if (state == DisposalsPressureState.Ready)
|
if (state == DisposalsPressureState.Ready)
|
||||||
{
|
{
|
||||||
@@ -477,7 +477,7 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (count != component.RecentlyEjected.Count)
|
if (count != component.RecentlyEjected.Count)
|
||||||
Dirty(component, metadata);
|
Dirty(uid, component, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TryInsert(EntityUid unitId, EntityUid toInsertId, EntityUid? userId, DisposalUnitComponent? unit = null)
|
public bool TryInsert(EntityUid unitId, EntityUid toInsertId, EntityUid? userId, DisposalUnitComponent? unit = null)
|
||||||
@@ -783,7 +783,7 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem
|
|||||||
var flushTime = TimeSpan.FromSeconds(Math.Min((component.NextFlush ?? TimeSpan.MaxValue).TotalSeconds, automaticTime.TotalSeconds));
|
var flushTime = TimeSpan.FromSeconds(Math.Min((component.NextFlush ?? TimeSpan.MaxValue).TotalSeconds, automaticTime.TotalSeconds));
|
||||||
|
|
||||||
component.NextFlush = flushTime;
|
component.NextFlush = flushTime;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AfterInsert(EntityUid uid, SharedDisposalUnitComponent component, EntityUid inserted, EntityUid? user = null, bool doInsert = false)
|
public void AfterInsert(EntityUid uid, SharedDisposalUnitComponent component, EntityUid inserted, EntityUid? user = null, bool doInsert = false)
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public sealed class DragonRiftSystem : EntitySystem
|
|||||||
if (comp.State < DragonRiftState.AlmostFinished && comp.Accumulator > comp.MaxAccumulator / 2f)
|
if (comp.State < DragonRiftState.AlmostFinished && comp.Accumulator > comp.MaxAccumulator / 2f)
|
||||||
{
|
{
|
||||||
comp.State = DragonRiftState.AlmostFinished;
|
comp.State = DragonRiftState.AlmostFinished;
|
||||||
Dirty(comp);
|
Dirty(uid, comp);
|
||||||
|
|
||||||
var location = xform.LocalPosition;
|
var location = xform.LocalPosition;
|
||||||
_chat.DispatchGlobalAnnouncement(Loc.GetString("carp-rift-warning", ("location", location)), playSound: false, colorOverride: Color.Red);
|
_chat.DispatchGlobalAnnouncement(Loc.GetString("carp-rift-warning", ("location", location)), playSound: false, colorOverride: Color.Red);
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ public sealed partial class EnsnareableSystem
|
|||||||
component.Ensnared = target;
|
component.Ensnared = target;
|
||||||
_container.Insert(ensnare, ensnareable.Container);
|
_container.Insert(ensnare, ensnareable.Container);
|
||||||
ensnareable.IsEnsnared = true;
|
ensnareable.IsEnsnared = true;
|
||||||
Dirty(ensnareable);
|
Dirty(target, ensnareable);
|
||||||
|
|
||||||
UpdateAlert(target, ensnareable);
|
UpdateAlert(target, ensnareable);
|
||||||
var ev = new EnsnareEvent(component.WalkSpeed, component.SprintSpeed);
|
var ev = new EnsnareEvent(component.WalkSpeed, component.SprintSpeed);
|
||||||
@@ -148,7 +148,7 @@ public sealed partial class EnsnareableSystem
|
|||||||
|
|
||||||
_container.Remove(ensnare, ensnareable.Container, force: true);
|
_container.Remove(ensnare, ensnareable.Container, force: true);
|
||||||
ensnareable.IsEnsnared = ensnareable.Container.ContainedEntities.Count > 0;
|
ensnareable.IsEnsnared = ensnareable.Container.ContainedEntities.Count > 0;
|
||||||
Dirty(ensnareable);
|
Dirty(component.Ensnared.Value, ensnareable);
|
||||||
component.Ensnared = null;
|
component.Ensnared = null;
|
||||||
|
|
||||||
UpdateAlert(target, ensnareable);
|
UpdateAlert(target, ensnareable);
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public sealed partial class EnsnareableSystem : SharedEnsnareableSystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
component.IsEnsnared = component.Container.ContainedEntities.Count > 0;
|
component.IsEnsnared = component.Container.ContainedEntities.Count > 0;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
ensnaring.Ensnared = null;
|
ensnaring.Ensnared = null;
|
||||||
|
|
||||||
_hands.PickupOrDrop(args.Args.User, args.Args.Used.Value);
|
_hands.PickupOrDrop(args.Args.User, args.Args.Used.Value);
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ namespace Content.Server.Gravity
|
|||||||
gravity.Enabled = enabled;
|
gravity.Enabled = enabled;
|
||||||
var ev = new GravityChangedEvent(uid, enabled);
|
var ev = new GravityChangedEvent(uid, enabled);
|
||||||
RaiseLocalEvent(uid, ref ev, true);
|
RaiseLocalEvent(uid, ref ev, true);
|
||||||
Dirty(gravity);
|
Dirty(uid, gravity);
|
||||||
|
|
||||||
if (HasComp<MapGridComponent>(uid))
|
if (HasComp<MapGridComponent>(uid))
|
||||||
{
|
{
|
||||||
@@ -71,7 +71,7 @@ namespace Content.Server.Gravity
|
|||||||
gravity.Enabled = true;
|
gravity.Enabled = true;
|
||||||
var ev = new GravityChangedEvent(uid, true);
|
var ev = new GravityChangedEvent(uid, true);
|
||||||
RaiseLocalEvent(uid, ref ev, true);
|
RaiseLocalEvent(uid, ref ev, true);
|
||||||
Dirty(gravity);
|
Dirty(uid, gravity);
|
||||||
|
|
||||||
if (HasComp<MapGridComponent>(uid))
|
if (HasComp<MapGridComponent>(uid))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public sealed class HotPotatoSystem : SharedHotPotatoSystem
|
|||||||
comp.CanTransfer = false;
|
comp.CanTransfer = false;
|
||||||
_ambientSound.SetAmbience(uid, true);
|
_ambientSound.SetAmbience(uid, true);
|
||||||
_damageOnHolding.SetEnabled(uid, true);
|
_damageOnHolding.SetEnabled(uid, true);
|
||||||
Dirty(comp);
|
Dirty(uid, comp);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnMeleeHit(EntityUid uid, HotPotatoComponent comp, MeleeHitEvent args)
|
private void OnMeleeHit(EntityUid uid, HotPotatoComponent comp, MeleeHitEvent args)
|
||||||
@@ -56,6 +56,6 @@ public sealed class HotPotatoSystem : SharedHotPotatoSystem
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
comp.CanTransfer = false;
|
comp.CanTransfer = false;
|
||||||
Dirty(comp);
|
Dirty(uid, comp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public sealed partial class HumanoidAppearanceSystem
|
|||||||
component.CustomBaseLayers[message.Layer] = message.Info.Value;
|
component.CustomBaseLayers[message.Layer] = message.Info.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
|
|
||||||
if (message.ResendState)
|
if (message.ResendState)
|
||||||
{
|
{
|
||||||
@@ -88,7 +88,7 @@ public sealed partial class HumanoidAppearanceSystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
component.MarkingSet = message.MarkingSet;
|
component.MarkingSet = message.MarkingSet;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
|
|
||||||
if (message.ResendState)
|
if (message.ResendState)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public sealed partial class HumanoidAppearanceSystem : SharedHumanoidAppearanceS
|
|||||||
grammar.Gender = sourceHumanoid.Gender;
|
grammar.Gender = sourceHumanoid.Gender;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dirty(targetHumanoid);
|
Dirty(target, targetHumanoid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -85,7 +85,7 @@ public sealed partial class HumanoidAppearanceSystem : SharedHumanoidAppearanceS
|
|||||||
humanoid.MarkingSet.Remove(prototype.MarkingCategory, marking);
|
humanoid.MarkingSet.Remove(prototype.MarkingCategory, marking);
|
||||||
|
|
||||||
if (sync)
|
if (sync)
|
||||||
Dirty(humanoid);
|
Dirty(uid, humanoid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -106,7 +106,7 @@ public sealed partial class HumanoidAppearanceSystem : SharedHumanoidAppearanceS
|
|||||||
}
|
}
|
||||||
|
|
||||||
humanoid.MarkingSet.Remove(category, index);
|
humanoid.MarkingSet.Remove(category, index);
|
||||||
Dirty(humanoid);
|
Dirty(uid, humanoid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -135,7 +135,7 @@ public sealed partial class HumanoidAppearanceSystem : SharedHumanoidAppearanceS
|
|||||||
}
|
}
|
||||||
|
|
||||||
humanoid.MarkingSet.Replace(category, index, marking);
|
humanoid.MarkingSet.Replace(category, index, marking);
|
||||||
Dirty(humanoid);
|
Dirty(uid, humanoid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -162,7 +162,7 @@ public sealed partial class HumanoidAppearanceSystem : SharedHumanoidAppearanceS
|
|||||||
markings[index].SetColor(i, colors[i]);
|
markings[index].SetColor(i, colors[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Dirty(humanoid);
|
Dirty(uid, humanoid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public sealed class SwappableInstrumentSystem : EntitySystem
|
|||||||
Priority = priority,
|
Priority = priority,
|
||||||
Act = () =>
|
Act = () =>
|
||||||
{
|
{
|
||||||
_sharedInstrument.SetInstrumentProgram(instrument, entry.Value.Item1, entry.Value.Item2);
|
_sharedInstrument.SetInstrumentProgram(uid, instrument, entry.Value.Item1, entry.Value.Item2);
|
||||||
_popup.PopupEntity(Loc.GetString("swappable-instrument-component-style-set", ("style", entry.Key)),
|
_popup.PopupEntity(Loc.GetString("swappable-instrument-component-style-set", ("style", entry.Key)),
|
||||||
args.User, args.User);
|
args.User, args.User);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,6 @@ public sealed class RotatingLightSystem : SharedRotatingLightSystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
comp.Enabled = args.Enabled;
|
comp.Enabled = args.Enabled;
|
||||||
Dirty(comp);
|
Dirty(uid, comp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ public sealed class MaterialReclaimerSystem : SharedMaterialReclaimerSystem
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
Container.Remove(item, active.ReclaimingContainer);
|
Container.Remove(item, active.ReclaimingContainer);
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
|
|
||||||
// scales the output if the process was interrupted.
|
// scales the output if the process was interrupted.
|
||||||
var completion = 1f - Math.Clamp((float) Math.Round((active.EndTime - Timing.CurTime) / active.Duration),
|
var completion = 1f - Math.Clamp((float) Math.Round((active.EndTime - Timing.CurTime) / active.Duration),
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ public sealed partial class MechSystem : SharedMechSystem
|
|||||||
component.Energy = battery.CurrentCharge;
|
component.Energy = battery.CurrentCharge;
|
||||||
component.MaxEnergy = battery.MaxCharge;
|
component.MaxEnergy = battery.MaxCharge;
|
||||||
|
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
_actionBlocker.UpdateCanMove(uid);
|
_actionBlocker.UpdateCanMove(uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ public sealed partial class MechSystem : SharedMechSystem
|
|||||||
component.Energy = component.MaxEnergy;
|
component.Energy = component.MaxEnergy;
|
||||||
|
|
||||||
_actionBlocker.UpdateCanMove(uid);
|
_actionBlocker.UpdateCanMove(uid);
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnRemoveEquipmentMessage(EntityUid uid, MechComponent component, MechEquipmentRemoveMessage args)
|
private void OnRemoveEquipmentMessage(EntityUid uid, MechComponent component, MechEquipmentRemoveMessage args)
|
||||||
@@ -338,7 +338,7 @@ public sealed partial class MechSystem : SharedMechSystem
|
|||||||
{
|
{
|
||||||
Log.Debug($"Battery charge was not equal to mech charge. Battery {batteryComp.CurrentCharge}. Mech {component.Energy}");
|
Log.Debug($"Battery charge was not equal to mech charge. Battery {batteryComp.CurrentCharge}. Mech {component.Energy}");
|
||||||
component.Energy = batteryComp.CurrentCharge;
|
component.Energy = batteryComp.CurrentCharge;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
_actionBlocker.UpdateCanMove(uid);
|
_actionBlocker.UpdateCanMove(uid);
|
||||||
return true;
|
return true;
|
||||||
@@ -358,7 +358,7 @@ public sealed partial class MechSystem : SharedMechSystem
|
|||||||
|
|
||||||
_actionBlocker.UpdateCanMove(uid);
|
_actionBlocker.UpdateCanMove(uid);
|
||||||
|
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
UpdateUserInterface(uid, component);
|
UpdateUserInterface(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -373,7 +373,7 @@ public sealed partial class MechSystem : SharedMechSystem
|
|||||||
|
|
||||||
_actionBlocker.UpdateCanMove(uid);
|
_actionBlocker.UpdateCanMove(uid);
|
||||||
|
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
UpdateUserInterface(uid, component);
|
UpdateUserInterface(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ public sealed class NameIdentifierSystem : EntitySystem
|
|||||||
_metaData.SetEntityName(uid, group.FullName
|
_metaData.SetEntityName(uid, group.FullName
|
||||||
? uniqueName
|
? uniqueName
|
||||||
: $"{meta.EntityName} ({uniqueName})", meta);
|
: $"{meta.EntityName} ({uniqueName})", meta);
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitialSetupPrototypes()
|
private void InitialSetupPrototypes()
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public sealed class ConveyorController : SharedConveyorController
|
|||||||
{
|
{
|
||||||
component.Powered = args.Powered;
|
component.Powered = args.Powered;
|
||||||
UpdateAppearance(uid, component);
|
UpdateAppearance(uid, component);
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateAppearance(EntityUid uid, ConveyorComponent component)
|
private void UpdateAppearance(EntityUid uid, ConveyorComponent component)
|
||||||
@@ -106,7 +106,7 @@ public sealed class ConveyorController : SharedConveyorController
|
|||||||
_materialReclaimer.SetReclaimerEnabled(uid, component.State != ConveyorState.Off);
|
_materialReclaimer.SetReclaimerEnabled(uid, component.State != ConveyorState.Off);
|
||||||
|
|
||||||
UpdateAppearance(uid, component);
|
UpdateAppearance(uid, component);
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public sealed class NavMapSystem : SharedNavMapSystem
|
|||||||
private void OnStationInit(StationGridAddedEvent ev)
|
private void OnStationInit(StationGridAddedEvent ev)
|
||||||
{
|
{
|
||||||
var comp = EnsureComp<NavMapComponent>(ev.GridId);
|
var comp = EnsureComp<NavMapComponent>(ev.GridId);
|
||||||
RefreshGrid(comp, Comp<MapGridComponent>(ev.GridId));
|
RefreshGrid(ev.GridId, comp, Comp<MapGridComponent>(ev.GridId));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnNavMapBeaconStartup(EntityUid uid, NavMapBeaconComponent component, ComponentStartup args)
|
private void OnNavMapBeaconStartup(EntityUid uid, NavMapBeaconComponent component, ComponentStartup args)
|
||||||
@@ -164,7 +164,7 @@ public sealed class NavMapSystem : SharedNavMapSystem
|
|||||||
if (!TryComp<MapGridComponent>(uid, out var grid))
|
if (!TryComp<MapGridComponent>(uid, out var grid))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
RefreshGrid(component, grid);
|
RefreshGrid(uid, component, grid);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnNavMapSplit(ref GridSplitEvent args)
|
private void OnNavMapSplit(ref GridSplitEvent args)
|
||||||
@@ -177,13 +177,13 @@ public sealed class NavMapSystem : SharedNavMapSystem
|
|||||||
foreach (var grid in args.NewGrids)
|
foreach (var grid in args.NewGrids)
|
||||||
{
|
{
|
||||||
var newComp = EnsureComp<NavMapComponent>(grid);
|
var newComp = EnsureComp<NavMapComponent>(grid);
|
||||||
RefreshGrid(newComp, gridQuery.GetComponent(grid));
|
RefreshGrid(grid, newComp, gridQuery.GetComponent(grid));
|
||||||
}
|
}
|
||||||
|
|
||||||
RefreshGrid(comp, gridQuery.GetComponent(args.Grid));
|
RefreshGrid(args.Grid, comp, gridQuery.GetComponent(args.Grid));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RefreshGrid(NavMapComponent component, MapGridComponent grid)
|
private void RefreshGrid(EntityUid uid, NavMapComponent component, MapGridComponent grid)
|
||||||
{
|
{
|
||||||
component.Chunks.Clear();
|
component.Chunks.Clear();
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ public sealed class NavMapSystem : SharedNavMapSystem
|
|||||||
component.Chunks[chunkOrigin] = chunk;
|
component.Chunks[chunkOrigin] = chunk;
|
||||||
}
|
}
|
||||||
|
|
||||||
RefreshTile(grid, component, chunk, tile.Value.GridIndices);
|
RefreshTile(uid, grid, component, chunk, tile.Value.GridIndices);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -291,7 +291,7 @@ public sealed class NavMapSystem : SharedNavMapSystem
|
|||||||
|
|
||||||
if (navMap.Chunks.TryGetValue(chunkOrigin, out var chunk))
|
if (navMap.Chunks.TryGetValue(chunkOrigin, out var chunk))
|
||||||
{
|
{
|
||||||
RefreshTile(oldGrid, navMap, chunk, ev.TilePos);
|
RefreshTile(ev.OldGrid, oldGrid, navMap, chunk, ev.TilePos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -318,10 +318,10 @@ public sealed class NavMapSystem : SharedNavMapSystem
|
|||||||
navMap.Chunks[chunkOrigin] = chunk;
|
navMap.Chunks[chunkOrigin] = chunk;
|
||||||
}
|
}
|
||||||
|
|
||||||
RefreshTile(grid, navMap, chunk, tile);
|
RefreshTile(xform.GridUid.Value, grid, navMap, chunk, tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RefreshTile(MapGridComponent grid, NavMapComponent component, NavMapChunk chunk, Vector2i tile)
|
private void RefreshTile(EntityUid uid, MapGridComponent grid, NavMapComponent component, NavMapChunk chunk, Vector2i tile)
|
||||||
{
|
{
|
||||||
var relative = SharedMapSystem.GetChunkRelative(tile, ChunkSize);
|
var relative = SharedMapSystem.GetChunkRelative(tile, ChunkSize);
|
||||||
var existing = chunk.TileData;
|
var existing = chunk.TileData;
|
||||||
@@ -356,7 +356,7 @@ public sealed class NavMapSystem : SharedNavMapSystem
|
|||||||
if (existing == chunk.TileData)
|
if (existing == chunk.TileData)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public sealed partial class PowerCellSystem
|
|||||||
{
|
{
|
||||||
component.CanDraw = canDraw;
|
component.CanDraw = canDraw;
|
||||||
component.CanUse = canUse;
|
component.CanUse = canUse;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ public sealed partial class PowerCellSystem
|
|||||||
{
|
{
|
||||||
component.CanDraw = canDraw;
|
component.CanDraw = canDraw;
|
||||||
component.CanUse = canUse;
|
component.CanUse = canUse;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public sealed partial class ResearchSystem
|
|||||||
var unusedId = EntityQuery<ResearchServerComponent>(true)
|
var unusedId = EntityQuery<ResearchServerComponent>(true)
|
||||||
.Max(s => s.Id) + 1;
|
.Max(s => s.Id) + 1;
|
||||||
component.Id = unusedId;
|
component.Id = unusedId;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnServerShutdown(EntityUid uid, ResearchServerComponent component, ComponentShutdown args)
|
private void OnServerShutdown(EntityUid uid, ResearchServerComponent component, ComponentShutdown args)
|
||||||
@@ -74,7 +74,7 @@ public sealed partial class ResearchSystem
|
|||||||
SyncClientWithServer(client, clientComponent: clientComponent);
|
SyncClientWithServer(client, clientComponent: clientComponent);
|
||||||
|
|
||||||
if (dirtyServer)
|
if (dirtyServer)
|
||||||
Dirty(serverComponent);
|
Dirty(server, serverComponent);
|
||||||
|
|
||||||
var ev = new ResearchRegistrationChangedEvent(server);
|
var ev = new ResearchRegistrationChangedEvent(server);
|
||||||
RaiseLocalEvent(client, ref ev);
|
RaiseLocalEvent(client, ref ev);
|
||||||
@@ -117,7 +117,7 @@ public sealed partial class ResearchSystem
|
|||||||
|
|
||||||
if (dirtyServer)
|
if (dirtyServer)
|
||||||
{
|
{
|
||||||
Dirty(serverComponent);
|
Dirty(server, serverComponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
var ev = new ResearchRegistrationChangedEvent(null);
|
var ev = new ResearchRegistrationChangedEvent(null);
|
||||||
@@ -167,6 +167,6 @@ public sealed partial class ResearchSystem
|
|||||||
{
|
{
|
||||||
RaiseLocalEvent(client, ref ev);
|
RaiseLocalEvent(client, ref ev);
|
||||||
}
|
}
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public sealed partial class ResearchSystem
|
|||||||
primaryDb.UnlockedTechnologies = otherDb.UnlockedTechnologies;
|
primaryDb.UnlockedTechnologies = otherDb.UnlockedTechnologies;
|
||||||
primaryDb.UnlockedRecipes = otherDb.UnlockedRecipes;
|
primaryDb.UnlockedRecipes = otherDb.UnlockedRecipes;
|
||||||
|
|
||||||
Dirty(primaryDb);
|
Dirty(primaryUid, primaryDb);
|
||||||
|
|
||||||
var ev = new TechnologyDatabaseModifiedEvent();
|
var ev = new TechnologyDatabaseModifiedEvent();
|
||||||
RaiseLocalEvent(primaryUid, ref ev);
|
RaiseLocalEvent(primaryUid, ref ev);
|
||||||
@@ -125,7 +125,7 @@ public sealed partial class ResearchSystem
|
|||||||
continue;
|
continue;
|
||||||
component.UnlockedRecipes.Add(unlock);
|
component.UnlockedRecipes.Add(unlock);
|
||||||
}
|
}
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
|
|
||||||
var ev = new TechnologyDatabaseModifiedEvent();
|
var ev = new TechnologyDatabaseModifiedEvent();
|
||||||
RaiseLocalEvent(uid, ref ev);
|
RaiseLocalEvent(uid, ref ev);
|
||||||
@@ -144,7 +144,7 @@ public sealed partial class ResearchSystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
component.UnlockedRecipes.Add(recipe);
|
component.UnlockedRecipes.Add(recipe);
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
|
|
||||||
var ev = new TechnologyDatabaseModifiedEvent();
|
var ev = new TechnologyDatabaseModifiedEvent();
|
||||||
RaiseLocalEvent(uid, ref ev);
|
RaiseLocalEvent(uid, ref ev);
|
||||||
@@ -185,6 +185,6 @@ public sealed partial class ResearchSystem
|
|||||||
component.SupportedDisciplines = new List<string>();
|
component.SupportedDisciplines = new List<string>();
|
||||||
component.UnlockedTechnologies = new List<string>();
|
component.UnlockedTechnologies = new List<string>();
|
||||||
component.UnlockedRecipes = new List<string>();
|
component.UnlockedRecipes = new List<string>();
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ public sealed partial class ShuttleConsoleSystem : SharedShuttleConsoleSystem
|
|||||||
pilotComponent.Console = uid;
|
pilotComponent.Console = uid;
|
||||||
ActionBlockerSystem.UpdateCanMove(entity);
|
ActionBlockerSystem.UpdateCanMove(entity);
|
||||||
pilotComponent.Position = EntityManager.GetComponent<TransformComponent>(entity).Coordinates;
|
pilotComponent.Position = EntityManager.GetComponent<TransformComponent>(entity).Coordinates;
|
||||||
Dirty(pilotComponent);
|
Dirty(entity, pilotComponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemovePilot(EntityUid pilotUid, PilotComponent pilotComponent)
|
public void RemovePilot(EntityUid pilotUid, PilotComponent pilotComponent)
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ public sealed partial class BorgSystem : SharedBorgSystem
|
|||||||
|
|
||||||
component.Activated = true;
|
component.Activated = true;
|
||||||
InstallAllModules(uid, component);
|
InstallAllModules(uid, component);
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
_movementSpeedModifier.RefreshMovementSpeedModifiers(uid);
|
_movementSpeedModifier.RefreshMovementSpeedModifiers(uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -295,7 +295,7 @@ public sealed partial class BorgSystem : SharedBorgSystem
|
|||||||
|
|
||||||
component.Activated = false;
|
component.Activated = false;
|
||||||
DisableAllModules(uid, component);
|
DisableAllModules(uid, component);
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
_movementSpeedModifier.RefreshMovementSpeedModifiers(uid);
|
_movementSpeedModifier.RefreshMovementSpeedModifiers(uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public sealed class RandomSpriteSystem: SharedRandomSpriteSystem
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnGetState(EntityUid uid, RandomSpriteComponent component, ref ComponentGetState args)
|
private void OnGetState(EntityUid uid, RandomSpriteComponent component, ref ComponentGetState args)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public sealed class ParacusiaSystem : SharedParacusiaSystem
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
component.Sounds = sounds;
|
component.Sounds = sounds;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetTime(EntityUid uid, float minTime, float maxTime, ParacusiaComponent? component = null)
|
public void SetTime(EntityUid uid, float minTime, float maxTime, ParacusiaComponent? component = null)
|
||||||
@@ -23,7 +23,7 @@ public sealed class ParacusiaSystem : SharedParacusiaSystem
|
|||||||
}
|
}
|
||||||
component.MinTimeBetweenIncidents = minTime;
|
component.MinTimeBetweenIncidents = minTime;
|
||||||
component.MaxTimeBetweenIncidents = maxTime;
|
component.MaxTimeBetweenIncidents = maxTime;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetDistance(EntityUid uid, float maxSoundDistance, ParacusiaComponent? component = null)
|
public void SetDistance(EntityUid uid, float maxSoundDistance, ParacusiaComponent? component = null)
|
||||||
@@ -33,6 +33,6 @@ public sealed class ParacusiaSystem : SharedParacusiaSystem
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
component.MaxSoundDistance = maxSoundDistance;
|
component.MaxSoundDistance = maxSoundDistance;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ public sealed partial class GunSystem
|
|||||||
|
|
||||||
if (component.Shots != shots || component.Capacity != maxShots)
|
if (component.Shots != shots || component.Capacity != maxShots)
|
||||||
{
|
{
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
component.Shots = shots;
|
component.Shots = shots;
|
||||||
|
|||||||
@@ -13,6 +13,6 @@ public sealed partial class GunSystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
component.CurrentIndex = index;
|
component.CurrentIndex = index;
|
||||||
Dirty(component);
|
Dirty(revolverUid, component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,6 @@ public sealed class RandomInstrumentArtifactSystem : EntitySystem
|
|||||||
private void OnStartup(EntityUid uid, RandomInstrumentArtifactComponent component, ComponentStartup args)
|
private void OnStartup(EntityUid uid, RandomInstrumentArtifactComponent component, ComponentStartup args)
|
||||||
{
|
{
|
||||||
var instrument = EnsureComp<InstrumentComponent>(uid);
|
var instrument = EnsureComp<InstrumentComponent>(uid);
|
||||||
_instrument.SetInstrumentProgram(instrument, (byte) _random.Next(0, 127), 0);
|
_instrument.SetInstrumentProgram(uid, instrument, (byte) _random.Next(0, 127), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ namespace Content.Server.Zombies
|
|||||||
Dirty(target, pryComp);
|
Dirty(target, pryComp);
|
||||||
}
|
}
|
||||||
|
|
||||||
Dirty(melee);
|
Dirty(target, melee);
|
||||||
|
|
||||||
//The zombie gets the assigned damage weaknesses and strengths
|
//The zombie gets the assigned damage weaknesses and strengths
|
||||||
_damageable.SetDamageModifierSetId(target, "Zombie");
|
_damageable.SetDamageModifierSetId(target, "Zombie");
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ public abstract partial class SharedBuckleSystem
|
|||||||
|
|
||||||
ActionBlocker.UpdateCanMove(buckleUid);
|
ActionBlocker.UpdateCanMove(buckleUid);
|
||||||
UpdateBuckleStatus(buckleUid, buckleComp, strapComp);
|
UpdateBuckleStatus(buckleUid, buckleComp, strapComp);
|
||||||
Dirty(buckleComp);
|
Dirty(buckleUid, buckleComp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -468,8 +468,7 @@ public abstract partial class SharedBuckleSystem
|
|||||||
if (strapComp.BuckledEntities.Remove(buckleUid))
|
if (strapComp.BuckledEntities.Remove(buckleUid))
|
||||||
{
|
{
|
||||||
strapComp.OccupiedSize -= buckleComp.Size;
|
strapComp.OccupiedSize -= buckleComp.Size;
|
||||||
//Dirty(strapUid);
|
Dirty(strapUid, strapComp);
|
||||||
Dirty(strapComp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_joints.RefreshRelay(buckleUid);
|
_joints.RefreshRelay(buckleUid);
|
||||||
|
|||||||
@@ -20,22 +20,22 @@ public abstract partial class SharedBuckleSystem
|
|||||||
{
|
{
|
||||||
SubscribeLocalEvent<StrapComponent, ComponentStartup>(OnStrapStartup);
|
SubscribeLocalEvent<StrapComponent, ComponentStartup>(OnStrapStartup);
|
||||||
SubscribeLocalEvent<StrapComponent, ComponentShutdown>(OnStrapShutdown);
|
SubscribeLocalEvent<StrapComponent, ComponentShutdown>(OnStrapShutdown);
|
||||||
SubscribeLocalEvent<StrapComponent, ComponentRemove>((_, c, _) => StrapRemoveAll(c));
|
SubscribeLocalEvent<StrapComponent, ComponentRemove>((e, c, _) => StrapRemoveAll(e, c));
|
||||||
|
|
||||||
SubscribeLocalEvent<StrapComponent, EntInsertedIntoContainerMessage>(OnStrapEntModifiedFromContainer);
|
SubscribeLocalEvent<StrapComponent, EntInsertedIntoContainerMessage>(OnStrapEntModifiedFromContainer);
|
||||||
SubscribeLocalEvent<StrapComponent, EntRemovedFromContainerMessage>(OnStrapEntModifiedFromContainer);
|
SubscribeLocalEvent<StrapComponent, EntRemovedFromContainerMessage>(OnStrapEntModifiedFromContainer);
|
||||||
SubscribeLocalEvent<StrapComponent, GetVerbsEvent<InteractionVerb>>(AddStrapVerbs);
|
SubscribeLocalEvent<StrapComponent, GetVerbsEvent<InteractionVerb>>(AddStrapVerbs);
|
||||||
SubscribeLocalEvent<StrapComponent, ContainerGettingInsertedAttemptEvent>(OnStrapContainerGettingInsertedAttempt);
|
SubscribeLocalEvent<StrapComponent, ContainerGettingInsertedAttemptEvent>(OnStrapContainerGettingInsertedAttempt);
|
||||||
SubscribeLocalEvent<StrapComponent, InteractHandEvent>(OnStrapInteractHand);
|
SubscribeLocalEvent<StrapComponent, InteractHandEvent>(OnStrapInteractHand);
|
||||||
SubscribeLocalEvent<StrapComponent, DestructionEventArgs>((_,c,_) => StrapRemoveAll(c));
|
SubscribeLocalEvent<StrapComponent, DestructionEventArgs>((e, c, _) => StrapRemoveAll(e, c));
|
||||||
SubscribeLocalEvent<StrapComponent, BreakageEventArgs>((_, c, _) => StrapRemoveAll(c));
|
SubscribeLocalEvent<StrapComponent, BreakageEventArgs>((e, c, _) => StrapRemoveAll(e, c));
|
||||||
|
|
||||||
SubscribeLocalEvent<StrapComponent, DragDropTargetEvent>(OnStrapDragDropTarget);
|
SubscribeLocalEvent<StrapComponent, DragDropTargetEvent>(OnStrapDragDropTarget);
|
||||||
SubscribeLocalEvent<StrapComponent, CanDropTargetEvent>(OnCanDropTarget);
|
SubscribeLocalEvent<StrapComponent, CanDropTargetEvent>(OnCanDropTarget);
|
||||||
SubscribeLocalEvent<StrapComponent, FoldAttemptEvent>(OnAttemptFold);
|
SubscribeLocalEvent<StrapComponent, FoldAttemptEvent>(OnAttemptFold);
|
||||||
|
|
||||||
SubscribeLocalEvent<StrapComponent, MoveEvent>(OnStrapMoveEvent);
|
SubscribeLocalEvent<StrapComponent, MoveEvent>(OnStrapMoveEvent);
|
||||||
SubscribeLocalEvent<StrapComponent, MachineDeconstructedEvent>((_, c, _) => StrapRemoveAll(c));
|
SubscribeLocalEvent<StrapComponent, MachineDeconstructedEvent>((e, c, _) => StrapRemoveAll(e, c));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnStrapStartup(EntityUid uid, StrapComponent component, ComponentStartup args)
|
private void OnStrapStartup(EntityUid uid, StrapComponent component, ComponentStartup args)
|
||||||
@@ -48,7 +48,7 @@ public abstract partial class SharedBuckleSystem
|
|||||||
if (LifeStage(uid) > EntityLifeStage.MapInitialized)
|
if (LifeStage(uid) > EntityLifeStage.MapInitialized)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
StrapRemoveAll(component);
|
StrapRemoveAll(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnStrapEntModifiedFromContainer(EntityUid uid, StrapComponent component, ContainerModifiedMessage message)
|
private void OnStrapEntModifiedFromContainer(EntityUid uid, StrapComponent component, ContainerModifiedMessage message)
|
||||||
@@ -232,7 +232,7 @@ public abstract partial class SharedBuckleSystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReAttach(buckledEntity, uid, buckled, component);
|
ReAttach(buckledEntity, uid, buckled, component);
|
||||||
Dirty(buckled);
|
Dirty(buckledEntity, buckled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,7 +258,7 @@ public abstract partial class SharedBuckleSystem
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Remove everything attached to the strap
|
/// Remove everything attached to the strap
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void StrapRemoveAll(StrapComponent strapComp)
|
private void StrapRemoveAll(EntityUid uid, StrapComponent strapComp)
|
||||||
{
|
{
|
||||||
foreach (var entity in strapComp.BuckledEntities.ToArray())
|
foreach (var entity in strapComp.BuckledEntities.ToArray())
|
||||||
{
|
{
|
||||||
@@ -267,7 +267,7 @@ public abstract partial class SharedBuckleSystem
|
|||||||
|
|
||||||
strapComp.BuckledEntities.Clear();
|
strapComp.BuckledEntities.Clear();
|
||||||
strapComp.OccupiedSize = 0;
|
strapComp.OccupiedSize = 0;
|
||||||
Dirty(strapComp);
|
Dirty(uid, strapComp);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool StrapHasSpace(EntityUid strapUid, BuckleComponent buckleComp, StrapComponent? strapComp = null)
|
private bool StrapHasSpace(EntityUid strapUid, BuckleComponent buckleComp, StrapComponent? strapComp = null)
|
||||||
@@ -313,6 +313,6 @@ public abstract partial class SharedBuckleSystem
|
|||||||
strapComp.Enabled = enabled;
|
strapComp.Enabled = enabled;
|
||||||
|
|
||||||
if (!enabled)
|
if (!enabled)
|
||||||
StrapRemoveAll(strapComp);
|
StrapRemoveAll(strapUid, strapComp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void AddItemSlot(EntityUid uid, string id, ItemSlot slot, ItemSlotsComponent? itemSlots = null)
|
public void AddItemSlot(EntityUid uid, string id, ItemSlot slot, ItemSlotsComponent? itemSlots = null)
|
||||||
{
|
{
|
||||||
itemSlots ??= EntityManager.EnsureComponent<ItemSlotsComponent>(uid);
|
itemSlots ??= EnsureComp<ItemSlotsComponent>(uid);
|
||||||
DebugTools.AssertOwner(uid, itemSlots);
|
DebugTools.AssertOwner(uid, itemSlots);
|
||||||
|
|
||||||
if (itemSlots.Slots.TryGetValue(id, out var existing))
|
if (itemSlots.Slots.TryGetValue(id, out var existing))
|
||||||
@@ -103,7 +103,7 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
|
|
||||||
slot.ContainerSlot = _containers.EnsureContainer<ContainerSlot>(uid, id);
|
slot.ContainerSlot = _containers.EnsureContainer<ContainerSlot>(uid, id);
|
||||||
itemSlots.Slots[id] = slot;
|
itemSlots.Slots[id] = slot;
|
||||||
Dirty(itemSlots);
|
Dirty(uid, itemSlots);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -127,7 +127,7 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
if (itemSlots.Slots.Count == 0)
|
if (itemSlots.Slots.Count == 0)
|
||||||
EntityManager.RemoveComponent(uid, itemSlots);
|
EntityManager.RemoveComponent(uid, itemSlots);
|
||||||
else
|
else
|
||||||
Dirty(itemSlots);
|
Dirty(uid, itemSlots);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TryGetSlot(EntityUid uid, string slotId, [NotNullWhen(true)] out ItemSlot? itemSlot, ItemSlotsComponent? component = null)
|
public bool TryGetSlot(EntityUid uid, string slotId, [NotNullWhen(true)] out ItemSlot? itemSlot, ItemSlotsComponent? component = null)
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ public sealed partial class StaminaSystem : EntitySystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
EnsureComp<ActiveStaminaComponent>(uid);
|
EnsureComp<ActiveStaminaComponent>(uid);
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
|
|
||||||
if (value <= 0)
|
if (value <= 0)
|
||||||
return;
|
return;
|
||||||
@@ -345,7 +345,7 @@ public sealed partial class StaminaSystem : EntitySystem
|
|||||||
|
|
||||||
comp.NextUpdate += TimeSpan.FromSeconds(1f);
|
comp.NextUpdate += TimeSpan.FromSeconds(1f);
|
||||||
TakeStaminaDamage(uid, -comp.Decay, comp);
|
TakeStaminaDamage(uid, -comp.Decay, comp);
|
||||||
Dirty(comp);
|
Dirty(uid, comp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -368,7 +368,7 @@ public sealed partial class StaminaSystem : EntitySystem
|
|||||||
// Give them buffer before being able to be re-stunned
|
// Give them buffer before being able to be re-stunned
|
||||||
component.NextUpdate = _timing.CurTime + component.StunTime + StamCritBufferTime;
|
component.NextUpdate = _timing.CurTime + component.StunTime + StamCritBufferTime;
|
||||||
EnsureComp<ActiveStaminaComponent>(uid);
|
EnsureComp<ActiveStaminaComponent>(uid);
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
_adminLogger.Add(LogType.Stamina, LogImpact.Medium, $"{ToPrettyString(uid):user} entered stamina crit");
|
_adminLogger.Add(LogType.Stamina, LogImpact.Medium, $"{ToPrettyString(uid):user} entered stamina crit");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -385,7 +385,7 @@ public sealed partial class StaminaSystem : EntitySystem
|
|||||||
component.NextUpdate = _timing.CurTime;
|
component.NextUpdate = _timing.CurTime;
|
||||||
SetStaminaAlert(uid, component);
|
SetStaminaAlert(uid, component);
|
||||||
RemComp<ActiveStaminaComponent>(uid);
|
RemComp<ActiveStaminaComponent>(uid);
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
_adminLogger.Add(LogType.Stamina, LogImpact.Low, $"{ToPrettyString(uid):user} recovered from stamina crit");
|
_adminLogger.Add(LogType.Stamina, LogImpact.Low, $"{ToPrettyString(uid):user} recovered from stamina crit");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ namespace Content.Shared.Decals
|
|||||||
|
|
||||||
// This **shouldn't** be required, but just in case we ever get entity prototypes that have decal grids, we
|
// This **shouldn't** be required, but just in case we ever get entity prototypes that have decal grids, we
|
||||||
// need to ensure that we send an initial full state to players.
|
// need to ensure that we send an initial full state to players.
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Dictionary<Vector2i, DecalChunk>? ChunkCollection(EntityUid gridEuid, DecalGridComponent? comp = null)
|
protected Dictionary<Vector2i, DecalChunk>? ChunkCollection(EntityUid gridEuid, DecalGridComponent? comp = null)
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public abstract class SharedDiceSystem : EntitySystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
die.CurrentValue = (side - die.Offset) * die.Multiplier;
|
die.CurrentValue = (side - die.Offset) * die.Multiplier;
|
||||||
Dirty(die);
|
Dirty(uid, die);
|
||||||
UpdateVisuals(uid, die);
|
UpdateVisuals(uid, die);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace Content.Shared.Electrocution
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
insulated.Coefficient = siemensCoefficient;
|
insulated.Coefficient = siemensCoefficient;
|
||||||
Dirty(insulated);
|
Dirty(uid, insulated);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <param name="uid">Entity being electrocuted.</param>
|
/// <param name="uid">Entity being electrocuted.</param>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public sealed class EmoteSystem : EntitySystem
|
|||||||
if (component.Enabled == value)
|
if (component.Enabled == value)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnEmoteAttempt(EmoteAttemptEvent args)
|
private void OnEmoteAttempt(EmoteAttemptEvent args)
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ namespace Content.Shared.Friction
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
friction.Modifier = value;
|
friction.Modifier = value;
|
||||||
Dirty(friction);
|
Dirty(entityUid, friction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public abstract class SharedFloatingVisualizerSystem : EntitySystem
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
component.CanFloat = GravitySystem.IsWeightless(uid, xform: transform);
|
component.CanFloat = GravitySystem.IsWeightless(uid, xform: transform);
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
return component.CanFloat;
|
return component.CanFloat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public abstract partial class SharedGravitySystem
|
|||||||
ShakeGrid(uid, gravity);
|
ShakeGrid(uid, gravity);
|
||||||
comp.ShakeTimes--;
|
comp.ShakeTimes--;
|
||||||
comp.NextShake += TimeSpan.FromSeconds(ShakeCooldown);
|
comp.NextShake += TimeSpan.FromSeconds(ShakeCooldown);
|
||||||
Dirty(comp);
|
Dirty(uid, comp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -44,7 +44,7 @@ public abstract partial class SharedGravitySystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
shake.ShakeTimes = 10;
|
shake.ShakeTimes = 10;
|
||||||
Dirty(shake);
|
Dirty(uid, shake);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void ShakeGrid(EntityUid uid, GravityComponent? comp = null) {}
|
protected virtual void ShakeGrid(EntityUid uid, GravityComponent? comp = null) {}
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dirty)
|
if (dirty)
|
||||||
Dirty(humanoid);
|
Dirty(uid, humanoid);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void SetLayerVisibility(
|
protected virtual void SetLayerVisibility(
|
||||||
@@ -147,7 +147,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
|
|||||||
humanoid.MarkingSet = new(oldMarkings, prototype.MarkingPoints, _markingManager, _prototypeManager);
|
humanoid.MarkingSet = new(oldMarkings, prototype.MarkingPoints, _markingManager, _prototypeManager);
|
||||||
|
|
||||||
if (sync)
|
if (sync)
|
||||||
Dirty(humanoid);
|
Dirty(uid, humanoid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -177,7 +177,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
|
|||||||
humanoid.SkinColor = skinColor;
|
humanoid.SkinColor = skinColor;
|
||||||
|
|
||||||
if (sync)
|
if (sync)
|
||||||
Dirty(humanoid);
|
Dirty(uid, humanoid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -201,7 +201,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
|
|||||||
humanoid.CustomBaseLayers[layer] = new(id);
|
humanoid.CustomBaseLayers[layer] = new(id);
|
||||||
|
|
||||||
if (sync)
|
if (sync)
|
||||||
Dirty(humanoid);
|
Dirty(uid, humanoid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -222,7 +222,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
|
|||||||
humanoid.CustomBaseLayers[layer] = new(null, color);
|
humanoid.CustomBaseLayers[layer] = new(null, color);
|
||||||
|
|
||||||
if (sync)
|
if (sync)
|
||||||
Dirty(humanoid);
|
Dirty(uid, humanoid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -244,7 +244,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
|
|||||||
|
|
||||||
if (sync)
|
if (sync)
|
||||||
{
|
{
|
||||||
Dirty(humanoid);
|
Dirty(uid, humanoid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -329,7 +329,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
|
|||||||
|
|
||||||
humanoid.Age = profile.Age;
|
humanoid.Age = profile.Age;
|
||||||
|
|
||||||
Dirty(humanoid);
|
Dirty(uid, humanoid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -362,7 +362,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
|
|||||||
humanoid.MarkingSet.AddBack(prototype.MarkingCategory, markingObject);
|
humanoid.MarkingSet.AddBack(prototype.MarkingCategory, markingObject);
|
||||||
|
|
||||||
if (sync)
|
if (sync)
|
||||||
Dirty(humanoid);
|
Dirty(uid, humanoid);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EnsureDefaultMarkings(EntityUid uid, HumanoidAppearanceComponent? humanoid)
|
private void EnsureDefaultMarkings(EntityUid uid, HumanoidAppearanceComponent? humanoid)
|
||||||
@@ -396,6 +396,6 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
|
|||||||
humanoid.MarkingSet.AddBack(prototype.MarkingCategory, markingObject);
|
humanoid.MarkingSet.AddBack(prototype.MarkingCategory, markingObject);
|
||||||
|
|
||||||
if (sync)
|
if (sync)
|
||||||
Dirty(humanoid);
|
Dirty(uid, humanoid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ public abstract class SharedImplanterSystem : EntitySystem
|
|||||||
var ev = new TransferDnaEvent { Donor = target, Recipient = implanter };
|
var ev = new TransferDnaEvent { Donor = target, Recipient = implanter };
|
||||||
RaiseLocalEvent(target, ref ev);
|
RaiseLocalEvent(target, ref ev);
|
||||||
|
|
||||||
Dirty(component);
|
Dirty(implanter, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CanImplant(
|
public bool CanImplant(
|
||||||
@@ -156,7 +156,7 @@ public abstract class SharedImplanterSystem : EntitySystem
|
|||||||
if (component.CurrentMode == ImplanterToggleMode.Draw && !component.ImplantOnly && !permanentFound)
|
if (component.CurrentMode == ImplanterToggleMode.Draw && !component.ImplantOnly && !permanentFound)
|
||||||
ImplantMode(implanter, component);
|
ImplantMode(implanter, component);
|
||||||
|
|
||||||
Dirty(component);
|
Dirty(implanter, component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ public abstract class SharedInstrumentSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetInstrumentProgram(SharedInstrumentComponent component, byte program, byte bank)
|
public void SetInstrumentProgram(EntityUid uid, SharedInstrumentComponent component, byte program, byte bank)
|
||||||
{
|
{
|
||||||
component.InstrumentBank = bank;
|
component.InstrumentBank = bank;
|
||||||
component.InstrumentProgram = program;
|
component.InstrumentProgram = program;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public abstract class SharedHandheldLightSystem : EntitySystem
|
|||||||
UpdateVisuals(uid, component);
|
UpdateVisuals(uid, component);
|
||||||
|
|
||||||
// Want to make sure client has latest data on level so battery displays properly.
|
// Want to make sure client has latest data on level so battery displays properly.
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnHandleState(EntityUid uid, HandheldLightComponent component, ref ComponentHandleState args)
|
private void OnHandleState(EntityUid uid, HandheldLightComponent component, ref ComponentHandleState args)
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public abstract class SharedRgbLightControllerSystem : EntitySystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
rgb.Layers = layers;
|
rgb.Layers = layers;
|
||||||
Dirty(rgb);
|
Dirty(uid, rgb);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetCycleRate(EntityUid uid, float rate, RgbLightControllerComponent? rgb = null)
|
public void SetCycleRate(EntityUid uid, float rate, RgbLightControllerComponent? rgb = null)
|
||||||
@@ -32,6 +32,6 @@ public abstract class SharedRgbLightControllerSystem : EntitySystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
rgb.CycleRate = Math.Clamp(0.01f, rate, 1); // lets not give people seizures
|
rgb.CycleRate = Math.Clamp(0.01f, rate, 1); // lets not give people seizures
|
||||||
Dirty(rgb);
|
Dirty(uid, rgb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ public abstract class SharedMechSystem : EntitySystem
|
|||||||
if (_net.IsServer)
|
if (_net.IsServer)
|
||||||
_popup.PopupEntity(popupString, uid);
|
_popup.PopupEntity(popupString, uid);
|
||||||
|
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -278,7 +278,7 @@ public abstract class SharedMechSystem : EntitySystem
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
component.Energy = FixedPoint2.Clamp(component.Energy + delta, 0, component.MaxEnergy);
|
component.Energy = FixedPoint2.Clamp(component.Energy + delta, 0, component.MaxEnergy);
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
UpdateUserInterface(uid, component);
|
UpdateUserInterface(uid, component);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -306,7 +306,7 @@ public abstract class SharedMechSystem : EntitySystem
|
|||||||
UpdateAppearance(uid, component);
|
UpdateAppearance(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
UpdateUserInterface(uid, component);
|
UpdateUserInterface(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public sealed class SpeedModifierContactsSystem : EntitySystem
|
|||||||
}
|
}
|
||||||
component.WalkSpeedModifier = walkSpeed;
|
component.WalkSpeedModifier = walkSpeed;
|
||||||
component.SprintSpeedModifier = sprintSpeed;
|
component.SprintSpeedModifier = sprintSpeed;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
_toUpdate.UnionWith(_physics.GetContactingEntities(uid));
|
_toUpdate.UnionWith(_physics.GetContactingEntities(uid));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ public sealed class HungerSystem : EntitySystem
|
|||||||
component.Thresholds[HungerThreshold.Dead],
|
component.Thresholds[HungerThreshold.Dead],
|
||||||
component.Thresholds[HungerThreshold.Overfed]);
|
component.Thresholds[HungerThreshold.Overfed]);
|
||||||
UpdateCurrentThreshold(uid, component);
|
UpdateCurrentThreshold(uid, component);
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateCurrentThreshold(EntityUid uid, HungerComponent? component = null)
|
private void UpdateCurrentThreshold(EntityUid uid, HungerComponent? component = null)
|
||||||
@@ -98,7 +98,7 @@ public sealed class HungerSystem : EntitySystem
|
|||||||
return;
|
return;
|
||||||
component.CurrentThreshold = calculatedHungerThreshold;
|
component.CurrentThreshold = calculatedHungerThreshold;
|
||||||
DoHungerThresholdEffects(uid, component);
|
DoHungerThresholdEffects(uid, component);
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DoHungerThresholdEffects(EntityUid uid, HungerComponent? component = null, bool force = false)
|
private void DoHungerThresholdEffects(EntityUid uid, HungerComponent? component = null, bool force = false)
|
||||||
|
|||||||
@@ -100,10 +100,10 @@ public abstract class SharedConveyorController : VirtualController
|
|||||||
transform.LocalPosition = localPos;
|
transform.LocalPosition = localPos;
|
||||||
|
|
||||||
// Force it awake for collisionwake reasons.
|
// Force it awake for collisionwake reasons.
|
||||||
Physics.SetAwake(entity, body, true);
|
Physics.SetAwake((entity, body), true);
|
||||||
Physics.SetSleepTime(body, 0f);
|
Physics.SetSleepTime(body, 0f);
|
||||||
}
|
}
|
||||||
Dirty(comp);
|
Dirty(uid, comp);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Vector2 Convey(Vector2 direction, float speed, float frameTime, Vector2 itemRelative)
|
private static Vector2 Convey(Vector2 direction, float speed, float frameTime, Vector2 itemRelative)
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public sealed class RCDAmmoSystem : EntitySystem
|
|||||||
_popup.PopupClient(Loc.GetString("rcd-ammo-component-after-interact-refilled"), target, user);
|
_popup.PopupClient(Loc.GetString("rcd-ammo-component-after-interact-refilled"), target, user);
|
||||||
_charges.AddCharges(target, count, charges);
|
_charges.AddCharges(target, count, charges);
|
||||||
comp.Charges -= count;
|
comp.Charges -= count;
|
||||||
Dirty(comp);
|
Dirty(uid, comp);
|
||||||
|
|
||||||
// prevent having useless ammo with 0 charges
|
// prevent having useless ammo with 0 charges
|
||||||
if (comp.Charges <= 0)
|
if (comp.Charges <= 0)
|
||||||
|
|||||||
@@ -312,7 +312,7 @@ public sealed class RCDSystem : EntitySystem
|
|||||||
var mode = (int) comp.Mode;
|
var mode = (int) comp.Mode;
|
||||||
mode = ++mode % RcdModeCount;
|
mode = ++mode % RcdModeCount;
|
||||||
comp.Mode = (RcdMode) mode;
|
comp.Mode = (RcdMode) mode;
|
||||||
Dirty(comp);
|
Dirty(uid, comp);
|
||||||
|
|
||||||
var msg = Loc.GetString("rcd-component-change-mode", ("mode", comp.Mode.ToString()));
|
var msg = Loc.GetString("rcd-component-change-mode", ("mode", comp.Mode.ToString()));
|
||||||
_popup.PopupClient(msg, uid, user);
|
_popup.PopupClient(msg, uid, user);
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public abstract class SharedEventHorizonSystem : EntitySystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
eventHorizon.Radius = value;
|
eventHorizon.Radius = value;
|
||||||
Dirty(eventHorizon);
|
Dirty(uid, eventHorizon);
|
||||||
if (updateFixture)
|
if (updateFixture)
|
||||||
UpdateEventHorizonFixture(uid, eventHorizon: eventHorizon);
|
UpdateEventHorizonFixture(uid, eventHorizon: eventHorizon);
|
||||||
}
|
}
|
||||||
@@ -89,7 +89,7 @@ public abstract class SharedEventHorizonSystem : EntitySystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
eventHorizon.CanBreachContainment = value;
|
eventHorizon.CanBreachContainment = value;
|
||||||
Dirty(eventHorizon);
|
Dirty(uid, eventHorizon);
|
||||||
if (updateFixture)
|
if (updateFixture)
|
||||||
UpdateEventHorizonFixture(uid, eventHorizon: eventHorizon);
|
UpdateEventHorizonFixture(uid, eventHorizon: eventHorizon);
|
||||||
}
|
}
|
||||||
@@ -112,7 +112,7 @@ public abstract class SharedEventHorizonSystem : EntitySystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
eventHorizon.ColliderFixtureId = value;
|
eventHorizon.ColliderFixtureId = value;
|
||||||
Dirty(eventHorizon);
|
Dirty(uid, eventHorizon);
|
||||||
if (updateFixture)
|
if (updateFixture)
|
||||||
UpdateEventHorizonFixture(uid, eventHorizon: eventHorizon);
|
UpdateEventHorizonFixture(uid, eventHorizon: eventHorizon);
|
||||||
}
|
}
|
||||||
@@ -135,7 +135,7 @@ public abstract class SharedEventHorizonSystem : EntitySystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
eventHorizon.ConsumerFixtureId = value;
|
eventHorizon.ConsumerFixtureId = value;
|
||||||
Dirty(eventHorizon);
|
Dirty(uid, eventHorizon);
|
||||||
if (updateFixture)
|
if (updateFixture)
|
||||||
UpdateEventHorizonFixture(uid, eventHorizon: eventHorizon);
|
UpdateEventHorizonFixture(uid, eventHorizon: eventHorizon);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ namespace Content.Shared.Stacks
|
|||||||
|
|
||||||
// Server-side override deletes the entity if count == 0
|
// Server-side override deletes the entity if count == 0
|
||||||
component.Count = amount;
|
component.Count = amount;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
|
|
||||||
Appearance.SetData(uid, StackVisuals.Actual, component.Count);
|
Appearance.SetData(uid, StackVisuals.Actual, component.Count);
|
||||||
RaiseLocalEvent(uid, new StackCountChangedEvent(old, component.Count));
|
RaiseLocalEvent(uid, new StackCountChangedEvent(old, component.Count));
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ namespace Content.Shared.Standing
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
standingState.Standing = false;
|
standingState.Standing = false;
|
||||||
Dirty(standingState);
|
Dirty(uid, standingState);
|
||||||
RaiseLocalEvent(uid, new DownedEvent(), false);
|
RaiseLocalEvent(uid, new DownedEvent(), false);
|
||||||
|
|
||||||
// Seemed like the best place to put it
|
// Seemed like the best place to put it
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public sealed class StationRecordKeyStorageSystem : EntitySystem
|
|||||||
|
|
||||||
var key = keyStorage.Key;
|
var key = keyStorage.Key;
|
||||||
keyStorage.Key = null;
|
keyStorage.Key = null;
|
||||||
Dirty(keyStorage);
|
Dirty(uid, keyStorage);
|
||||||
|
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ namespace Content.Shared.StatusEffect
|
|||||||
_alertsSystem.ShowAlert(uid, proto.Alert.Value, null, cooldown1);
|
_alertsSystem.ShowAlert(uid, proto.Alert.Value, null, cooldown1);
|
||||||
}
|
}
|
||||||
|
|
||||||
Dirty(status);
|
Dirty(uid, status);
|
||||||
RaiseLocalEvent(uid, new StatusEffectAddedEvent(uid, key));
|
RaiseLocalEvent(uid, new StatusEffectAddedEvent(uid, key));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -283,7 +283,7 @@ namespace Content.Shared.StatusEffect
|
|||||||
RemComp<ActiveStatusEffectsComponent>(uid);
|
RemComp<ActiveStatusEffectsComponent>(uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
Dirty(status);
|
Dirty(uid, status);
|
||||||
RaiseLocalEvent(uid, new StatusEffectEndedEvent(uid, key));
|
RaiseLocalEvent(uid, new StatusEffectEndedEvent(uid, key));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -307,7 +307,7 @@ namespace Content.Shared.StatusEffect
|
|||||||
failed = true;
|
failed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dirty(status);
|
Dirty(uid, status);
|
||||||
return failed;
|
return failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -381,7 +381,7 @@ namespace Content.Shared.StatusEffect
|
|||||||
_alertsSystem.ShowAlert(uid, proto.Alert.Value, null, cooldown);
|
_alertsSystem.ShowAlert(uid, proto.Alert.Value, null, cooldown);
|
||||||
}
|
}
|
||||||
|
|
||||||
Dirty(status);
|
Dirty(uid, status);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -417,7 +417,7 @@ namespace Content.Shared.StatusEffect
|
|||||||
_alertsSystem.ShowAlert(uid, proto.Alert.Value, null, cooldown);
|
_alertsSystem.ShowAlert(uid, proto.Alert.Value, null, cooldown);
|
||||||
}
|
}
|
||||||
|
|
||||||
Dirty(status);
|
Dirty(uid, status);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -438,7 +438,7 @@ namespace Content.Shared.StatusEffect
|
|||||||
|
|
||||||
status.ActiveEffects[key].Cooldown = (_gameTiming.CurTime, _gameTiming.CurTime + time);
|
status.ActiveEffects[key].Cooldown = (_gameTiming.CurTime, _gameTiming.CurTime + time);
|
||||||
|
|
||||||
Dirty(status);
|
Dirty(uid, status);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ public sealed class BinSystem : EntitySystem
|
|||||||
|
|
||||||
_container.Insert(toInsert, component.ItemContainer);
|
_container.Insert(toInsert, component.ItemContainer);
|
||||||
component.Items.Add(toInsert);
|
component.Items.Add(toInsert);
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ public sealed class BinSystem : EntitySystem
|
|||||||
if (!Resolve(uid, ref component))
|
if (!Resolve(uid, ref component))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!component.Items.Any())
|
if (component.Items.Count == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (toRemove == null || toRemove != component.Items.LastOrDefault())
|
if (toRemove == null || toRemove != component.Items.LastOrDefault())
|
||||||
@@ -161,7 +161,7 @@ public sealed class BinSystem : EntitySystem
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
component.Items.Remove(toRemove.Value);
|
component.Items.Remove(toRemove.Value);
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
using Content.Shared.ActionBlocker;
|
using Content.Shared.ActionBlocker;
|
||||||
using Content.Shared.Administration.Logs;
|
using Content.Shared.Administration.Logs;
|
||||||
using Content.Shared.Audio;
|
|
||||||
using Content.Shared.DragDrop;
|
|
||||||
using Content.Shared.Interaction;
|
using Content.Shared.Interaction;
|
||||||
using Content.Shared.Interaction.Events;
|
using Content.Shared.Interaction.Events;
|
||||||
using Content.Shared.Inventory.Events;
|
using Content.Shared.Inventory.Events;
|
||||||
@@ -11,16 +9,12 @@ using Content.Shared.Database;
|
|||||||
using Content.Shared.Hands;
|
using Content.Shared.Hands;
|
||||||
using Content.Shared.Mobs;
|
using Content.Shared.Mobs;
|
||||||
using Content.Shared.Mobs.Components;
|
using Content.Shared.Mobs.Components;
|
||||||
using Content.Shared.Mobs.Systems;
|
|
||||||
using Content.Shared.Movement.Events;
|
using Content.Shared.Movement.Events;
|
||||||
using Content.Shared.Movement.Systems;
|
using Content.Shared.Movement.Systems;
|
||||||
using Content.Shared.Standing;
|
using Content.Shared.Standing;
|
||||||
using Content.Shared.StatusEffect;
|
using Content.Shared.StatusEffect;
|
||||||
using Content.Shared.Throwing;
|
using Content.Shared.Throwing;
|
||||||
using Robust.Shared.Audio;
|
|
||||||
using Robust.Shared.Audio.Systems;
|
using Robust.Shared.Audio.Systems;
|
||||||
using Robust.Shared.GameStates;
|
|
||||||
using Robust.Shared.Player;
|
|
||||||
|
|
||||||
namespace Content.Shared.Stunnable;
|
namespace Content.Shared.Stunnable;
|
||||||
|
|
||||||
@@ -242,7 +236,7 @@ public abstract class SharedStunSystem : EntitySystem
|
|||||||
|
|
||||||
_statusEffect.TryRemoveTime(uid, "KnockedDown", TimeSpan.FromSeconds(knocked.HelpInterval));
|
_statusEffect.TryRemoveTime(uid, "KnockedDown", TimeSpan.FromSeconds(knocked.HelpInterval));
|
||||||
_audio.PlayPredicted(knocked.StunAttemptSound, uid, args.User);
|
_audio.PlayPredicted(knocked.StunAttemptSound, uid, args.User);
|
||||||
Dirty(knocked);
|
Dirty(uid, knocked);
|
||||||
|
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public abstract class SharedTrayScannerSystem : EntitySystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
scanner.Enabled = enabled;
|
scanner.Enabled = enabled;
|
||||||
Dirty(scanner);
|
Dirty(uid, scanner);
|
||||||
|
|
||||||
// We don't remove from _activeScanners on disabled, because the update function will handle that, as well as
|
// We don't remove from _activeScanners on disabled, because the update function will handle that, as well as
|
||||||
// managing the revealed subfloor entities
|
// managing the revealed subfloor entities
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ public sealed class TagSystem : EntitySystem
|
|||||||
/// </exception>
|
/// </exception>
|
||||||
public bool AddTag(EntityUid entity, string id)
|
public bool AddTag(EntityUid entity, string id)
|
||||||
{
|
{
|
||||||
return AddTag(EnsureComp<TagComponent>(entity), id);
|
return AddTag(entity, EnsureComp<TagComponent>(entity), id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -91,7 +91,7 @@ public sealed class TagSystem : EntitySystem
|
|||||||
/// </exception>
|
/// </exception>
|
||||||
public bool AddTags(EntityUid entity, params string[] ids)
|
public bool AddTags(EntityUid entity, params string[] ids)
|
||||||
{
|
{
|
||||||
return AddTags(EnsureComp<TagComponent>(entity), ids);
|
return AddTags(entity, EnsureComp<TagComponent>(entity), ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -107,7 +107,7 @@ public sealed class TagSystem : EntitySystem
|
|||||||
/// </exception>
|
/// </exception>
|
||||||
public bool AddTags(EntityUid entity, IEnumerable<string> ids)
|
public bool AddTags(EntityUid entity, IEnumerable<string> ids)
|
||||||
{
|
{
|
||||||
return AddTags(EnsureComp<TagComponent>(entity), ids);
|
return AddTags(entity, EnsureComp<TagComponent>(entity), ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -125,7 +125,7 @@ public sealed class TagSystem : EntitySystem
|
|||||||
public bool TryAddTag(EntityUid entity, string id)
|
public bool TryAddTag(EntityUid entity, string id)
|
||||||
{
|
{
|
||||||
return TryComp<TagComponent>(entity, out var component) &&
|
return TryComp<TagComponent>(entity, out var component) &&
|
||||||
AddTag(component, id);
|
AddTag(entity, component, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -143,7 +143,7 @@ public sealed class TagSystem : EntitySystem
|
|||||||
public bool TryAddTags(EntityUid entity, params string[] ids)
|
public bool TryAddTags(EntityUid entity, params string[] ids)
|
||||||
{
|
{
|
||||||
return TryComp<TagComponent>(entity, out var component) &&
|
return TryComp<TagComponent>(entity, out var component) &&
|
||||||
AddTags(component, ids);
|
AddTags(entity, component, ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -161,7 +161,7 @@ public sealed class TagSystem : EntitySystem
|
|||||||
public bool TryAddTags(EntityUid entity, IEnumerable<string> ids)
|
public bool TryAddTags(EntityUid entity, IEnumerable<string> ids)
|
||||||
{
|
{
|
||||||
return TryComp<TagComponent>(entity, out var component) &&
|
return TryComp<TagComponent>(entity, out var component) &&
|
||||||
AddTags(component, ids);
|
AddTags(entity, component, ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -299,7 +299,7 @@ public sealed class TagSystem : EntitySystem
|
|||||||
public bool RemoveTag(EntityUid entity, string id)
|
public bool RemoveTag(EntityUid entity, string id)
|
||||||
{
|
{
|
||||||
return TryComp<TagComponent>(entity, out var component) &&
|
return TryComp<TagComponent>(entity, out var component) &&
|
||||||
RemoveTag(component, id);
|
RemoveTag(entity, component, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -316,7 +316,7 @@ public sealed class TagSystem : EntitySystem
|
|||||||
public bool RemoveTags(EntityUid entity, params string[] ids)
|
public bool RemoveTags(EntityUid entity, params string[] ids)
|
||||||
{
|
{
|
||||||
return TryComp<TagComponent>(entity, out var component) &&
|
return TryComp<TagComponent>(entity, out var component) &&
|
||||||
RemoveTags(component, ids);
|
RemoveTags(entity, component, ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -333,7 +333,7 @@ public sealed class TagSystem : EntitySystem
|
|||||||
public bool RemoveTags(EntityUid entity, IEnumerable<string> ids)
|
public bool RemoveTags(EntityUid entity, IEnumerable<string> ids)
|
||||||
{
|
{
|
||||||
return TryComp<TagComponent>(entity, out var component) &&
|
return TryComp<TagComponent>(entity, out var component) &&
|
||||||
RemoveTags(component, ids);
|
RemoveTags(entity, component, ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -344,14 +344,14 @@ public sealed class TagSystem : EntitySystem
|
|||||||
/// <exception cref="UnknownPrototypeException">
|
/// <exception cref="UnknownPrototypeException">
|
||||||
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
|
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public bool AddTag(TagComponent component, string id)
|
public bool AddTag(EntityUid uid, TagComponent component, string id)
|
||||||
{
|
{
|
||||||
AssertValidTag(id);
|
AssertValidTag(id);
|
||||||
var added = component.Tags.Add(id);
|
var added = component.Tags.Add(id);
|
||||||
|
|
||||||
if (added)
|
if (added)
|
||||||
{
|
{
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -366,9 +366,9 @@ public sealed class TagSystem : EntitySystem
|
|||||||
/// <exception cref="UnknownPrototypeException">
|
/// <exception cref="UnknownPrototypeException">
|
||||||
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public bool AddTags(TagComponent component, params string[] ids)
|
public bool AddTags(EntityUid uid, TagComponent component, params string[] ids)
|
||||||
{
|
{
|
||||||
return AddTags(component, ids.AsEnumerable());
|
return AddTags(uid, component, ids.AsEnumerable());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -379,7 +379,7 @@ public sealed class TagSystem : EntitySystem
|
|||||||
/// <exception cref="UnknownPrototypeException">
|
/// <exception cref="UnknownPrototypeException">
|
||||||
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public bool AddTags(TagComponent component, IEnumerable<string> ids)
|
public bool AddTags(EntityUid uid, TagComponent component, IEnumerable<string> ids)
|
||||||
{
|
{
|
||||||
var count = component.Tags.Count;
|
var count = component.Tags.Count;
|
||||||
|
|
||||||
@@ -391,7 +391,7 @@ public sealed class TagSystem : EntitySystem
|
|||||||
|
|
||||||
if (component.Tags.Count > count)
|
if (component.Tags.Count > count)
|
||||||
{
|
{
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -557,13 +557,13 @@ public sealed class TagSystem : EntitySystem
|
|||||||
/// <exception cref="UnknownPrototypeException">
|
/// <exception cref="UnknownPrototypeException">
|
||||||
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
|
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public bool RemoveTag(TagComponent component, string id)
|
public bool RemoveTag(EntityUid uid, TagComponent component, string id)
|
||||||
{
|
{
|
||||||
AssertValidTag(id);
|
AssertValidTag(id);
|
||||||
|
|
||||||
if (component.Tags.Remove(id))
|
if (component.Tags.Remove(id))
|
||||||
{
|
{
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -580,9 +580,9 @@ public sealed class TagSystem : EntitySystem
|
|||||||
/// <exception cref="UnknownPrototypeException">
|
/// <exception cref="UnknownPrototypeException">
|
||||||
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public bool RemoveTags(TagComponent component, params string[] ids)
|
public bool RemoveTags(EntityUid uid, TagComponent component, params string[] ids)
|
||||||
{
|
{
|
||||||
return RemoveTags(component, ids.AsEnumerable());
|
return RemoveTags(uid, component, ids.AsEnumerable());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -593,7 +593,7 @@ public sealed class TagSystem : EntitySystem
|
|||||||
/// <exception cref="UnknownPrototypeException">
|
/// <exception cref="UnknownPrototypeException">
|
||||||
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public bool RemoveTags(TagComponent component, IEnumerable<string> ids)
|
public bool RemoveTags(EntityUid uid, TagComponent component, IEnumerable<string> ids)
|
||||||
{
|
{
|
||||||
var count = component.Tags.Count;
|
var count = component.Tags.Count;
|
||||||
|
|
||||||
@@ -605,7 +605,7 @@ public sealed class TagSystem : EntitySystem
|
|||||||
|
|
||||||
if (component.Tags.Count < count)
|
if (component.Tags.Count < count)
|
||||||
{
|
{
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -101,8 +101,8 @@ public sealed class LinkedEntitySystem : EntitySystem
|
|||||||
_appearance.SetData(first, LinkedEntityVisuals.HasAnyLinks, firstLink.LinkedEntities.Any());
|
_appearance.SetData(first, LinkedEntityVisuals.HasAnyLinks, firstLink.LinkedEntities.Any());
|
||||||
_appearance.SetData(second, LinkedEntityVisuals.HasAnyLinks, secondLink.LinkedEntities.Any());
|
_appearance.SetData(second, LinkedEntityVisuals.HasAnyLinks, secondLink.LinkedEntities.Any());
|
||||||
|
|
||||||
Dirty(firstLink);
|
Dirty(first, firstLink);
|
||||||
Dirty(secondLink);
|
Dirty(second, secondLink);
|
||||||
|
|
||||||
if (firstLink.LinkedEntities.Count == 0 && firstLink.DeleteOnEmptyLinks)
|
if (firstLink.LinkedEntities.Count == 0 && firstLink.DeleteOnEmptyLinks)
|
||||||
QueueDel(first);
|
QueueDel(first);
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ public abstract class SharedDamageMarkerSystem : EntitySystem
|
|||||||
marker.Marker = projectile.Weapon.Value;
|
marker.Marker = projectile.Weapon.Value;
|
||||||
marker.EndTime = _timing.CurTime + component.Duration;
|
marker.EndTime = _timing.CurTime + component.Duration;
|
||||||
component.Amount--;
|
component.Amount--;
|
||||||
Dirty(marker);
|
Dirty(args.OtherEntity, marker);
|
||||||
|
|
||||||
if (_netManager.IsServer)
|
if (_netManager.IsServer)
|
||||||
{
|
{
|
||||||
@@ -81,7 +81,7 @@ public abstract class SharedDamageMarkerSystem : EntitySystem
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ public abstract partial class SharedTetherGunSystem : EntitySystem
|
|||||||
RemComp<TetheredComponent>(component.Tethered.Value);
|
RemComp<TetheredComponent>(component.Tethered.Value);
|
||||||
_blocker.UpdateCanMove(component.Tethered.Value);
|
_blocker.UpdateCanMove(component.Tethered.Value);
|
||||||
component.Tethered = null;
|
component.Tethered = null;
|
||||||
Dirty(component);
|
Dirty(gunUid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
|||||||
@@ -49,19 +49,19 @@ public sealed class RechargeBasicEntityAmmoSystem : EntitySystem
|
|||||||
if (ammo.Count == ammo.Capacity)
|
if (ammo.Count == ammo.Capacity)
|
||||||
{
|
{
|
||||||
recharge.NextCharge = null;
|
recharge.NextCharge = null;
|
||||||
Dirty(recharge);
|
Dirty(uid, recharge);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
recharge.NextCharge = recharge.NextCharge.Value + TimeSpan.FromSeconds(recharge.RechargeCooldown);
|
recharge.NextCharge = recharge.NextCharge.Value + TimeSpan.FromSeconds(recharge.RechargeCooldown);
|
||||||
Dirty(recharge);
|
Dirty(uid, recharge);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnInit(EntityUid uid, RechargeBasicEntityAmmoComponent component, MapInitEvent args)
|
private void OnInit(EntityUid uid, RechargeBasicEntityAmmoComponent component, MapInitEvent args)
|
||||||
{
|
{
|
||||||
component.NextCharge = _timing.CurTime;
|
component.NextCharge = _timing.CurTime;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnExamined(EntityUid uid, RechargeBasicEntityAmmoComponent component, ExaminedEvent args)
|
private void OnExamined(EntityUid uid, RechargeBasicEntityAmmoComponent component, ExaminedEvent args)
|
||||||
@@ -86,7 +86,7 @@ public sealed class RechargeBasicEntityAmmoSystem : EntitySystem
|
|||||||
if (recharge.NextCharge == null || recharge.NextCharge < _timing.CurTime)
|
if (recharge.NextCharge == null || recharge.NextCharge < _timing.CurTime)
|
||||||
{
|
{
|
||||||
recharge.NextCharge = _timing.CurTime + TimeSpan.FromSeconds(recharge.RechargeCooldown);
|
recharge.NextCharge = _timing.CurTime + TimeSpan.FromSeconds(recharge.RechargeCooldown);
|
||||||
Dirty(recharge);
|
Dirty(uid, recharge);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public sealed class RechargeCycleAmmoSystem : EntitySystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
_gun.UpdateBasicEntityAmmoCount(uid, basic.Count.Value + 1, basic);
|
_gun.UpdateBasicEntityAmmoCount(uid, basic.Count.Value + 1, basic);
|
||||||
Dirty(basic);
|
Dirty(uid, basic);
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ public abstract partial class SharedGunSystem : EntitySystem
|
|||||||
if (melee.NextAttack > component.NextFire)
|
if (melee.NextAttack > component.NextFire)
|
||||||
{
|
{
|
||||||
component.NextFire = melee.NextAttack;
|
component.NextFire = melee.NextAttack;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ public abstract class SharedWeatherSystem : EntitySystem
|
|||||||
// Shutting down
|
// Shutting down
|
||||||
if (endTime != null && remainingTime < WeatherComponent.ShutdownTime)
|
if (endTime != null && remainingTime < WeatherComponent.ShutdownTime)
|
||||||
{
|
{
|
||||||
SetState(WeatherState.Ending, comp, weather, weatherProto);
|
SetState(uid, WeatherState.Ending, comp, weather, weatherProto);
|
||||||
}
|
}
|
||||||
// Starting up
|
// Starting up
|
||||||
else
|
else
|
||||||
@@ -139,7 +139,7 @@ public abstract class SharedWeatherSystem : EntitySystem
|
|||||||
|
|
||||||
if (elapsed < WeatherComponent.StartupTime)
|
if (elapsed < WeatherComponent.StartupTime)
|
||||||
{
|
{
|
||||||
SetState(WeatherState.Starting, comp, weather, weatherProto);
|
SetState(uid, WeatherState.Starting, comp, weather, weatherProto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ public abstract class SharedWeatherSystem : EntitySystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (proto != null)
|
if (proto != null)
|
||||||
StartWeather(weatherComp, proto, endTime);
|
StartWeather(mapUid, weatherComp, proto, endTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -190,7 +190,7 @@ public abstract class SharedWeatherSystem : EntitySystem
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual void Run(EntityUid uid, WeatherData weather, WeatherPrototype weatherProto, float frameTime) { }
|
protected virtual void Run(EntityUid uid, WeatherData weather, WeatherPrototype weatherProto, float frameTime) { }
|
||||||
|
|
||||||
protected void StartWeather(WeatherComponent component, WeatherPrototype weather, TimeSpan? endTime)
|
protected void StartWeather(EntityUid uid, WeatherComponent component, WeatherPrototype weather, TimeSpan? endTime)
|
||||||
{
|
{
|
||||||
if (component.Weather.ContainsKey(weather.ID))
|
if (component.Weather.ContainsKey(weather.ID))
|
||||||
return;
|
return;
|
||||||
@@ -202,7 +202,7 @@ public abstract class SharedWeatherSystem : EntitySystem
|
|||||||
};
|
};
|
||||||
|
|
||||||
component.Weather.Add(weather.ID, data);
|
component.Weather.Add(weather.ID, data);
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void EndWeather(EntityUid uid, WeatherComponent component, string proto)
|
protected virtual void EndWeather(EntityUid uid, WeatherComponent component, string proto)
|
||||||
@@ -216,13 +216,13 @@ public abstract class SharedWeatherSystem : EntitySystem
|
|||||||
Dirty(uid, component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual bool SetState(WeatherState state, WeatherComponent component, WeatherData weather, WeatherPrototype weatherProto)
|
protected virtual bool SetState(EntityUid uid, WeatherState state, WeatherComponent component, WeatherData weather, WeatherPrototype weatherProto)
|
||||||
{
|
{
|
||||||
if (weather.State.Equals(state))
|
if (weather.State.Equals(state))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
weather.State = state;
|
weather.State = state;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user