Implement some field-level deltas (#28242)

* Update GasTileOverlayState

* Update DecalGridState

* Update NavMapState

* poke

* poke2

* poke3

* Implement field deltas for guns

* Content done

* Update

---------

Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
This commit is contained in:
metalgearsloth
2024-12-21 15:54:11 +11:00
committed by GitHub
parent 1f859167fd
commit 9f4aa1ebe0
12 changed files with 97 additions and 46 deletions

View File

@@ -15,6 +15,7 @@ public sealed partial class GunSystem
{
var existing = component.Entities[^1];
component.Entities.RemoveAt(component.Entities.Count - 1);
DirtyField(uid, component, nameof(BallisticAmmoProviderComponent.Entities));
Containers.Remove(existing, component.Container);
EnsureShootable(existing);
@@ -22,6 +23,7 @@ public sealed partial class GunSystem
else if (component.UnspawnedCount > 0)
{
component.UnspawnedCount--;
DirtyField(uid, component, nameof(BallisticAmmoProviderComponent.UnspawnedCount));
ent = Spawn(component.Proto, coordinates);
EnsureShootable(ent.Value);
}