diff --git a/Content.Client/ADT/Blob/BlobTileComponent.cs b/Content.Client/ADT/Blob/BlobTileComponent.cs deleted file mode 100644 index 1a329d3426a..00000000000 --- a/Content.Client/ADT/Blob/BlobTileComponent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Content.Shared.Blob; - -namespace Content.Client.Blob; - -[RegisterComponent] -public sealed class BlobTileComponent : SharedBlobTileComponent -{ - -} \ No newline at end of file diff --git a/Content.Client/ADT/Blob/BlobTileSystem.cs b/Content.Client/ADT/Blob/BlobTileSystem.cs deleted file mode 100644 index 5298afccbcb..00000000000 --- a/Content.Client/ADT/Blob/BlobTileSystem.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System.Linq; -using Content.Shared.Blob; -using Robust.Client.GameObjects; -using Robust.Shared.GameStates; - -namespace Content.Client.Blob; - -public sealed class BlobTileSystem : EntitySystem -{ - public override void Initialize() - { - base.Initialize(); - SubscribeLocalEvent(OnBlobTileHandleState); - } - - private void OnBlobTileHandleState(EntityUid uid, BlobTileComponent component, ref ComponentHandleState args) - { - if (args.Current is not BlobTileComponentState state) - return; - - if (component.State == state.State) return; - - component.State = state.State; - TryComp(uid, out var sprite); - - if (sprite == null) - return; - - for (var i = 0; i < sprite.AllLayers.Count(); i++) - { - switch (state.State) - { - case BlobTileState.Dead: - sprite.LayerSetColor(i, Color.White); - break; - case BlobTileState.Blue: - sprite.LayerSetColor(i, Color.Blue); - break; - case BlobTileState.Green: - sprite.LayerSetColor(i, Color.Green); - break; - } - } - - - } -} \ No newline at end of file diff --git a/Content.Server/ADT/Blob/BlobBorderComponent.cs b/Content.Server/ADT/Blob/BlobBorderComponent.cs deleted file mode 100644 index ebb74d7bb30..00000000000 --- a/Content.Server/ADT/Blob/BlobBorderComponent.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Content.Server.Blob -{ - [RegisterComponent] - public sealed class BlobBorderComponent : Component - { - - } -} \ No newline at end of file diff --git a/Content.Server/ADT/Blob/BlobCoreComponent.cs b/Content.Server/ADT/Blob/BlobCoreComponent.cs deleted file mode 100644 index 11971081f1b..00000000000 --- a/Content.Server/ADT/Blob/BlobCoreComponent.cs +++ /dev/null @@ -1,99 +0,0 @@ -using Content.Shared.Damage; -using Content.Shared.FixedPoint; -using Robust.Shared.Audio; - -namespace Content.Server.Blob; - -[RegisterComponent] -public sealed class BlobCoreComponent : Component -{ - [ViewVariables(VVAccess.ReadWrite), DataField("attackRate")] - public float ActionRate = 0.4f; - - [DataField("attackSound")] - public SoundSpecifier AttackSound = new SoundPathSpecifier("/Audio/Animals/Blob/blobattack.ogg"); - - [ViewVariables(VVAccess.ReadOnly), DataField("damage")] - public DamageSpecifier Damage = new() - { - DamageDict = new Dictionary - { - { "Blunt", 15 }, - { "Structural", 100 }, - } - }; - - [ViewVariables(VVAccess.ReadWrite), DataField("factoryRadiusLimit")] - public float FactoryRadiusLimit = 6f; - - [ViewVariables(VVAccess.ReadWrite), DataField("resourceRadiusLimit")] - public float ResourceRadiusLimit = 3f; - - [ViewVariables(VVAccess.ReadWrite), DataField("nodeRadiusLimit")] - public float NodeRadiusLimit = 4f; - - [ViewVariables(VVAccess.ReadWrite), DataField("attackCost")] - public FixedPoint2 AttackCost = 2; - - [ViewVariables(VVAccess.ReadWrite), DataField("factoryBlobCost")] - public FixedPoint2 FactoryBlobCost = 60; - - [ViewVariables(VVAccess.ReadWrite), DataField("normalBlobCost")] - public FixedPoint2 NormalBlobCost = 4; - - [ViewVariables(VVAccess.ReadWrite), DataField("resourceBlobCost")] - public FixedPoint2 ResourceBlobCost = 40; - - [ViewVariables(VVAccess.ReadWrite), DataField("nodeBlobCost")] - public FixedPoint2 NodeBlobCost = 50; - - [ViewVariables(VVAccess.ReadWrite), DataField("blobbernautCost")] - public FixedPoint2 BlobbernautCost = 60; - - [ViewVariables(VVAccess.ReadWrite), DataField("strongBlobCost")] - public FixedPoint2 StrongBlobCost = 15; - - [ViewVariables(VVAccess.ReadWrite), DataField("reflectiveBlobCost")] - public FixedPoint2 ReflectiveBlobCost = 15; - - [ViewVariables(VVAccess.ReadWrite), DataField("splitCoreCost")] - public FixedPoint2 SplitCoreCost = 100; - - [ViewVariables(VVAccess.ReadWrite), DataField("swapCoreCost")] - public FixedPoint2 SwapCoreCost = 80; - - [ViewVariables(VVAccess.ReadWrite), DataField("swapChemCost")] - public FixedPoint2 SwapChemCost = 40; - - [ViewVariables(VVAccess.ReadWrite), DataField("reflectiveBlobTile")] - public string ReflectiveBlobTile = "ReflectiveBlobTile"; - - [ViewVariables(VVAccess.ReadWrite), DataField("strongBlobTile")] - public string StrongBlobTile = "StrongBlobTile"; - - [ViewVariables(VVAccess.ReadWrite), DataField("normalBlobTile")] - public string NormalBlobTile = "NormalBlobTile"; - - [ViewVariables(VVAccess.ReadWrite), DataField("factoryBlobTile")] - public string FactoryBlobTile = "FactoryBlobTile"; - - [ViewVariables(VVAccess.ReadWrite), DataField("resourceBlobTile")] - public string ResourceBlobTile = "ResourceBlobTile"; - - [ViewVariables(VVAccess.ReadWrite), DataField("nodeBlobTile")] - public string NodeBlobTile = "NodeBlobTile"; - - [ViewVariables(VVAccess.ReadWrite), DataField("coreBlobTile")] - public string CoreBlobTile = "CoreBlobTile"; - - [ViewVariables(VVAccess.ReadOnly)] - public EntityUid? Observer = default!; - - [ViewVariables(VVAccess.ReadOnly)] - public List BlobTiles = new(); - - public TimeSpan NextAction = TimeSpan.Zero; - - [ViewVariables(VVAccess.ReadWrite)] - public FixedPoint2 Points = 50; -} \ No newline at end of file diff --git a/Content.Server/ADT/Blob/BlobCoreSystem.cs b/Content.Server/ADT/Blob/BlobCoreSystem.cs deleted file mode 100644 index a1f17449add..00000000000 --- a/Content.Server/ADT/Blob/BlobCoreSystem.cs +++ /dev/null @@ -1,92 +0,0 @@ -using Content.Shared.Alert; -using Content.Shared.Blob; -using Content.Shared.Destructible; -using Content.Shared.FixedPoint; -using Content.Shared.Popups; -using Robust.Shared.Map; - -namespace Content.Server.Blob; - -public sealed class BlobCoreSystem : EntitySystem -{ - [Dependency] private readonly AlertsSystem _alerts = default!; - [Dependency] private readonly SharedPopupSystem _popup = default!; - - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnStartup); - SubscribeLocalEvent(OnDestruction); - } - - private void OnStartup(EntityUid uid, BlobCoreComponent observerComponent, ComponentStartup args) - { - ChangeBlobPoint(uid, 0, observerComponent); - - if (TryComp(uid, out var blobTileComponent)) - { - blobTileComponent.Core = uid; - } - } - - private void OnDestruction(EntityUid uid, BlobCoreComponent component, DestructionEventArgs args) - { - if (component.Observer != null) - { - QueueDel(component.Observer.Value); - } - - foreach (var blobTile in component.BlobTiles) - { - if (!TryComp(blobTile, out var blobTileComponent)) - continue; - blobTileComponent.Core = null; - - blobTileComponent.State = BlobTileState.Dead; - Dirty(blobTileComponent); - } - } - - public bool TransformBlobTile(EntityUid? oldTileUid, EntityUid coreTileUid, string newBlobTileProto, EntityCoordinates coordinates, BlobCoreComponent? blobCore = null) - { - if (!Resolve(coreTileUid, ref blobCore)) - return false; - if (oldTileUid != null) - { - QueueDel(oldTileUid.Value); - blobCore.BlobTiles.Remove(oldTileUid.Value); - } - var resourceBlob = EntityManager.SpawnEntity(newBlobTileProto, coordinates); - if (TryComp(resourceBlob, out var blobTileComponent)) - blobTileComponent.Core = coreTileUid; - blobCore.BlobTiles.Add(resourceBlob); - return true; - } - - public bool ChangeBlobPoint(EntityUid uid, FixedPoint2 amount, BlobCoreComponent? component = null) - { - if (!Resolve(uid, ref component)) - return false; - - component.Points += amount; - - if (component.Observer != null) - _alerts.ShowAlert(component.Observer.Value, AlertType.BlobResource, (short) Math.Clamp(Math.Round(component.Points.Float() / 10f), 0, 16)); - - return true; - } - - public bool TryUseAbility(EntityUid uid, EntityUid coreUid, BlobCoreComponent component, FixedPoint2 abilityCost) - { - if (component.Points < abilityCost) - { - _popup.PopupEntity(Loc.GetString("blob-not-enough-resources"), uid, uid); - return false; - } - - ChangeBlobPoint(coreUid, -abilityCost, component); - - return true; - } -} \ No newline at end of file diff --git a/Content.Server/ADT/Blob/BlobFactoryComponent.cs b/Content.Server/ADT/Blob/BlobFactoryComponent.cs deleted file mode 100644 index 8130ad833b7..00000000000 --- a/Content.Server/ADT/Blob/BlobFactoryComponent.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace Content.Server.Blob; - -[RegisterComponent] -public sealed class BlobFactoryComponent : Component -{ - [ViewVariables(VVAccess.ReadOnly)] - public float SpawnedCount = 0; - - [DataField("spawnLimit"), ViewVariables(VVAccess.ReadWrite)] - public float SpawnLimit = 3; - - [DataField("spawnRate"), ViewVariables(VVAccess.ReadWrite)] - public float SpawnRate = 10; - - [DataField("blobSporeId"), ViewVariables(VVAccess.ReadWrite)] - public string Pod = "MobBlobPod"; - - [DataField("blobbernautId"), ViewVariables(VVAccess.ReadWrite)] - public string BlobbernautId = "MobBlobBlobbernaut"; - - [ViewVariables(VVAccess.ReadOnly)] - public EntityUid? Blobbernaut = default!; - - public TimeSpan NextSpawn = TimeSpan.Zero; -} - -public sealed class ProduceBlobbernautEvent : EntityEventArgs -{ -} \ No newline at end of file diff --git a/Content.Server/ADT/Blob/BlobFactorySystem.cs b/Content.Server/ADT/Blob/BlobFactorySystem.cs deleted file mode 100644 index 6aac0a08f5d..00000000000 --- a/Content.Server/ADT/Blob/BlobFactorySystem.cs +++ /dev/null @@ -1,65 +0,0 @@ -using Content.Shared.Destructible; -using Robust.Shared.Timing; - -namespace Content.Server.Blob; - -public sealed class BlobFactorySystem : EntitySystem -{ - [Dependency] private readonly IGameTiming _gameTiming = default!; - - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnStartup); - SubscribeLocalEvent(OnPulsed); - SubscribeLocalEvent(OnProduceBlobbernaut); - SubscribeLocalEvent(OnDestruction); - } - - private void OnStartup(EntityUid uid, BlobFactoryComponent observerComponent, ComponentStartup args) - { - - } - - private void OnDestruction(EntityUid uid, BlobFactoryComponent component, DestructionEventArgs args) - { - if (TryComp(component.Blobbernaut, out var blobbernautComponent)) - { - blobbernautComponent.Factory = null; - } - } - - private void OnProduceBlobbernaut(EntityUid uid, BlobFactoryComponent component, ProduceBlobbernautEvent args) - { - if (component.Blobbernaut != null) - return; - - var xform = Transform(uid); - - var blobbernaut = Spawn(component.BlobbernautId, xform.Coordinates); - - component.Blobbernaut = blobbernaut; - if (TryComp(blobbernaut, out var blobbernautComponent)) - { - blobbernautComponent.Factory = uid; - } - } - - private void OnPulsed(EntityUid uid, BlobFactoryComponent component, BlobTileGetPulseEvent args) - { - if (!TryComp(uid, out var blobTileComponent) || blobTileComponent.Core == null) - return; - if (component.SpawnedCount >= component.SpawnLimit) - return; - - if (_gameTiming.CurTime < component.NextSpawn) - return; - - var xform = Transform(uid); - Spawn(component.Pod, xform.Coordinates); - component.SpawnedCount += 1; - component.NextSpawn = _gameTiming.CurTime + TimeSpan.FromSeconds(component.SpawnRate); - } - -} \ No newline at end of file diff --git a/Content.Server/ADT/Blob/BlobMobComponent.cs b/Content.Server/ADT/Blob/BlobMobComponent.cs deleted file mode 100644 index 35705b3371e..00000000000 --- a/Content.Server/ADT/Blob/BlobMobComponent.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Content.Shared.Damage; - -namespace Content.Server.Blob; - -[RegisterComponent] -public sealed class BlobMobComponent : Component -{ - [ViewVariables(VVAccess.ReadOnly), DataField("healthOfPulse")] - public DamageSpecifier HealthOfPulse = new() - { - DamageDict = new () - { - { "Blunt", -2 }, - { "Slash", -2 }, - { "Piercing", -2 }, - { "Heat", -2 }, - { "Cold", -2 }, - { "Shock", -2 }, - } - }; -} \ No newline at end of file diff --git a/Content.Server/ADT/Blob/BlobMobSystem.cs b/Content.Server/ADT/Blob/BlobMobSystem.cs deleted file mode 100644 index 893d65109b5..00000000000 --- a/Content.Server/ADT/Blob/BlobMobSystem.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Content.Shared.Damage; - -namespace Content.Server.Blob -{ - public sealed class BlobMobSystem : EntitySystem - { - [Dependency] private readonly DamageableSystem _damageableSystem = default!; - - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnPulsed); - } - - private void OnPulsed(EntityUid uid, BlobMobComponent component, BlobMobGetPulseEvent args) - { - _damageableSystem.TryChangeDamage(uid, component.HealthOfPulse); - } - } -} \ No newline at end of file diff --git a/Content.Server/ADT/Blob/BlobNodeComponent.cs b/Content.Server/ADT/Blob/BlobNodeComponent.cs deleted file mode 100644 index d24dba73f22..00000000000 --- a/Content.Server/ADT/Blob/BlobNodeComponent.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Content.Shared.FixedPoint; - -namespace Content.Server.Blob; - -[RegisterComponent] -public sealed class BlobNodeComponent : Component -{ - [ViewVariables(VVAccess.ReadWrite), DataField("pulseFrequency")] - public FixedPoint2 PulseFrequency = 5; - - [ViewVariables(VVAccess.ReadWrite), DataField("pulseRadius")] - public float PulseRadius = 2f; - - public float Accumulator = 0; -} - -public sealed class BlobTileGetPulseEvent : EntityEventArgs -{ - public bool Explain { get; set; } -} - -public sealed class BlobMobGetPulseEvent : EntityEventArgs -{ -} \ No newline at end of file diff --git a/Content.Server/ADT/Blob/BlobNodeSystem.cs b/Content.Server/ADT/Blob/BlobNodeSystem.cs deleted file mode 100644 index a2070cea8e0..00000000000 --- a/Content.Server/ADT/Blob/BlobNodeSystem.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System.Linq; -using System.Numerics; -using Robust.Shared.Map; -using Robust.Shared.Random; - -namespace Content.Server.Blob; - -public sealed class BlobNodeSystem : EntitySystem -{ - [Dependency] private readonly EntityLookupSystem _lookup = default!; - [Dependency] private readonly IMapManager _map = default!; - [Dependency] private readonly IRobustRandom _random = default!; - - - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnStartup); - } - - - private void OnStartup(EntityUid uid, BlobNodeComponent component, ComponentStartup args) - { - - } - - private void Pulse(EntityUid uid, BlobNodeComponent component) - { - var xform = Transform(uid); - - var radius = component.PulseRadius; - - var localPos = xform.Coordinates.Position; - - if (!_map.TryGetGrid(xform.GridUid, out var grid)) - { - return; - } - - var innerTiles = grid.GetLocalTilesIntersecting( - new Box2(localPos + new Vector2(-radius, -radius), localPos + new Vector2(radius, radius)), false).ToArray(); - - _random.Shuffle(innerTiles); - - var explain = true; - foreach (var tileRef in innerTiles) - { - foreach (var ent in grid.GetAnchoredEntities(tileRef.GridIndices)) - { - if (!HasComp(ent)) - continue; - - var ev = new BlobTileGetPulseEvent - { - Explain = explain - }; - RaiseLocalEvent(ent, ev); - explain = false; - } - } - - foreach (var lookupUid in _lookup.GetEntitiesInRange(xform.Coordinates, radius)) - { - if (!HasComp(lookupUid)) - continue; - var ev = new BlobMobGetPulseEvent(); - RaiseLocalEvent(lookupUid, ev); - } - } - - public override void Update(float frameTime) - { - base.Update(frameTime); - - var blobFactoryQuery = EntityQueryEnumerator(); - while (blobFactoryQuery.MoveNext(out var ent, out var comp)) - { - comp.Accumulator += frameTime; - - if (comp.Accumulator <= comp.PulseFrequency) - continue; - comp.Accumulator = 0; - - if (TryComp(ent, out var blobTileComponent) && blobTileComponent.Core != null) - { - Pulse(ent, comp); - } - } - } -} \ No newline at end of file diff --git a/Content.Server/ADT/Blob/BlobObserverSystem.cs b/Content.Server/ADT/Blob/BlobObserverSystem.cs deleted file mode 100644 index 7208f164e52..00000000000 --- a/Content.Server/ADT/Blob/BlobObserverSystem.cs +++ /dev/null @@ -1,657 +0,0 @@ -using System.Linq; -using System.Numerics; -using Content.Server.Actions; -using Content.Server.Destructible; -using Content.Shared.Actions.ActionTypes; -using Content.Shared.Blob; -using Content.Shared.Construction.EntitySystems; -using Content.Shared.Damage; -using Content.Shared.Interaction; -using Content.Shared.Popups; -using Robust.Server.GameObjects; -using Robust.Shared.Audio; -using Robust.Shared.Map; -using Robust.Shared.Map.Components; -using Robust.Shared.Prototypes; -using Robust.Shared.Random; -using Robust.Shared.Timing; - -namespace Content.Server.Blob; - -public sealed class BlobObserverSystem : EntitySystem -{ - [Dependency] private readonly IPrototypeManager _proto = default!; - [Dependency] private readonly ActionsSystem _action = default!; - [Dependency] private readonly IMapManager _map = default!; - [Dependency] private readonly DamageableSystem _damageableSystem = default!; - [Dependency] private readonly BlobCoreSystem _blobCoreSystem = default!; - [Dependency] private readonly AudioSystem _audioSystem = default!; - [Dependency] private readonly ITileDefinitionManager _tileDefinitionManager = default!; - [Dependency] private readonly SharedTransformSystem _xformSystem = default!; - [Dependency] private readonly IGameTiming _gameTiming = default!; - [Dependency] private readonly SharedPopupSystem _popup = default!; - [Dependency] private readonly IRobustRandom _random = default!; - [Dependency] private readonly AnchorableSystem _anchorableSystem = default!; - - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnStartup); - SubscribeLocalEvent(OnCreateFactory); - SubscribeLocalEvent(OnCreateResource); - SubscribeLocalEvent(OnCreateNode); - SubscribeLocalEvent(OnCreateBlobbernaut); - SubscribeLocalEvent(OnBlobToCore); - SubscribeLocalEvent(OnBlobToNode); - SubscribeLocalEvent(OnBlobHelp); - SubscribeLocalEvent(OnBlobSwapChem); - SubscribeLocalEvent(OnInteract); - SubscribeLocalEvent(OnSwapCore); - SubscribeLocalEvent(OnSplitCore); - } - - private void OnBlobHelp(EntityUid uid, BlobObserverComponent observerComponent, - BlobHelpActionEvent args) - { - _popup.PopupEntity(Loc.GetString("blob-help"), uid, uid); - args.Handled = true; - } - - private void OnBlobSwapChem(EntityUid uid, BlobObserverComponent observerComponent, - BlobSwapChemActionEvent args) - { - _popup.PopupEntity(Loc.GetString("blob-swap-chem"), uid, uid); - args.Handled = true; - } - - private void OnSplitCore(EntityUid uid, BlobObserverComponent observerComponent, - BlobSplitCoreActionEvent args) - { - if (args.Handled) - return; - - if (observerComponent.Core == null || !TryComp(observerComponent.Core.Value, out var blobCoreComponent)) - return; - - var gridUid = args.Target.GetGridUid(EntityManager); - - if (!_map.TryGetGrid(gridUid, out var grid)) - { - return; - } - - var centerTile = grid.GetLocalTilesIntersecting( - new Box2(args.Target.Position, args.Target.Position)).ToArray(); - - EntityUid? blobTile = null; - - foreach (var tileref in centerTile) - { - foreach (var ent in grid.GetAnchoredEntities(tileref.GridIndices)) - { - if (!TryComp(ent, out var blobTileComponent)) - continue; - blobTile = ent; - break; - } - } - - if (blobTile == null || !TryComp(blobTile, out var blobNodeComponent)) - { - _popup.PopupEntity(Loc.GetString("blob-target-node-blob-invalid"), uid, uid); - args.Handled = true; - return; - } - - if (!_blobCoreSystem.TryUseAbility(uid, observerComponent.Core.Value, blobCoreComponent, - blobCoreComponent.SplitCoreCost)) - { - args.Handled = true; - return; - } - - QueueDel(blobTile.Value); - EntityManager.SpawnEntity(blobCoreComponent.CoreBlobTile, args.Target); - - args.Handled = true; - } - - - private void OnSwapCore(EntityUid uid, BlobObserverComponent observerComponent, - BlobSwapCoreActionEvent args) - { - if (args.Handled) - return; - - if (observerComponent.Core == null || !TryComp(observerComponent.Core.Value, out var blobCoreComponent)) - return; - - var gridUid = args.Target.GetGridUid(EntityManager); - - if (!_map.TryGetGrid(gridUid, out var grid)) - { - return; - } - - var centerTile = grid.GetLocalTilesIntersecting( - new Box2(args.Target.Position, args.Target.Position)).ToArray(); - - EntityUid? blobTile = null; - - foreach (var tileref in centerTile) - { - foreach (var ent in grid.GetAnchoredEntities(tileref.GridIndices)) - { - if (!TryComp(ent, out var blobTileComponent)) - continue; - blobTile = ent; - break; - } - } - - if (blobTile == null || !TryComp(blobTile, out var blobNodeComponent)) - { - _popup.PopupEntity(Loc.GetString("blob-target-node-blob-invalid"), uid, uid); - args.Handled = true; - return; - } - - if (!_blobCoreSystem.TryUseAbility(uid, observerComponent.Core.Value, blobCoreComponent, - blobCoreComponent.SwapCoreCost)) - { - args.Handled = true; - return; - } - - var nodePos = Transform(blobTile.Value).Coordinates; - var corePos = Transform(observerComponent.Core.Value).Coordinates; - _xformSystem.SetCoordinates(observerComponent.Core.Value, nodePos); - _xformSystem.SetCoordinates(blobTile.Value, corePos); - _anchorableSystem.TryToggleAnchor(observerComponent.Core.Value, observerComponent.Core.Value, observerComponent.Core.Value); - _anchorableSystem.TryToggleAnchor(blobTile.Value, blobTile.Value, blobTile.Value); - args.Handled = true; - } - - private void OnBlobToNode(EntityUid uid, BlobObserverComponent observerComponent, - BlobToNodeActionEvent args) - { - if (args.Handled) - return; - - if (observerComponent.Core == null || !TryComp(observerComponent.Core.Value, out var blobCoreComponent)) - return; - - var blobNodes = new List(); - - var blobNodeQuery = EntityQueryEnumerator(); - while (blobNodeQuery.MoveNext(out var ent, out var node, out var tile)) - { - if (tile.Core == observerComponent.Core.Value && !HasComp(ent)) - blobNodes.Add(ent); - } - - if (blobNodes.Count == 0) - { - _popup.PopupEntity(Loc.GetString("blob-not-have-nodes"), uid, uid); - args.Handled = true; - return; - } - - _xformSystem.SetCoordinates(uid, Transform(_random.Pick(blobNodes)).Coordinates); - args.Handled = true; - } - - private void OnCreateBlobbernaut(EntityUid uid, BlobObserverComponent observerComponent, - BlobCreateBlobbernautActionEvent args) - { - if (args.Handled) - return; - - if (observerComponent.Core == null || - !TryComp(observerComponent.Core.Value, out var blobCoreComponent)) - return; - - var gridUid = args.Target.GetGridUid(EntityManager); - - if (!_map.TryGetGrid(gridUid, out var grid)) - { - return; - } - - var centerTile = grid.GetLocalTilesIntersecting( - new Box2(args.Target.Position, args.Target.Position)).ToArray(); - - EntityUid? blobTile = null; - - foreach (var tileRef in centerTile) - { - foreach (var ent in grid.GetAnchoredEntities(tileRef.GridIndices)) - { - if (!HasComp(ent)) - continue; - blobTile = ent; - break; - } - } - - if (blobTile == null || !TryComp(blobTile, out var blobFactoryComponent)) - { - _popup.PopupEntity(Loc.GetString("blob-target-factory-blob-invalid"), uid, uid); - return; - } - - if (blobFactoryComponent.Blobbernaut != null) - { - _popup.PopupEntity(Loc.GetString("blob-target-already-produce-blobbernaut"), uid, uid); - return; - } - - if (!_blobCoreSystem.TryUseAbility(uid, observerComponent.Core.Value, blobCoreComponent, blobCoreComponent.BlobbernautCost)) - return; - - var ev = new ProduceBlobbernautEvent(); - RaiseLocalEvent(blobTile.Value, ev); - - args.Handled = true; - } - - private void OnBlobToCore(EntityUid uid, BlobObserverComponent observerComponent, - BlobToCoreActionEvent args) - { - if (args.Handled) - return; - - if (observerComponent.Core == null || - !TryComp(observerComponent.Core.Value, out var blobCoreComponent)) - return; - - _xformSystem.SetCoordinates(uid, Transform(observerComponent.Core.Value).Coordinates); - } - - private void OnCreateNode(EntityUid uid, BlobObserverComponent observerComponent, - BlobCreateNodeActionEvent args) - { - if (args.Handled) - return; - - if (observerComponent.Core == null || - !TryComp(observerComponent.Core.Value, out var blobCoreComponent)) - return; - - var gridUid = args.Target.GetGridUid(EntityManager); - - if (!_map.TryGetGrid(gridUid, out var grid)) - { - return; - } - - var centerTile = grid.GetLocalTilesIntersecting( - new Box2(args.Target.Position, args.Target.Position)).ToArray(); - - var blobTileType = BlobTileType.None; - EntityUid? blobTile = null; - - foreach (var tileRef in centerTile) - { - foreach (var ent in grid.GetAnchoredEntities(tileRef.GridIndices)) - { - if (!TryComp(ent, out var blobTileComponent)) - continue; - blobTileType = blobTileComponent.BlobTileType; - blobTile = ent; - break; - } - } - - if (blobTileType is not BlobTileType.Normal || - blobTile == null) - { - _popup.PopupEntity(Loc.GetString("blob-target-normal-blob-invalid"), uid, uid); - return; - } - - var xform = Transform(blobTile.Value); - - var localPos = xform.Coordinates.Position; - - var radius = blobCoreComponent.NodeRadiusLimit; - - var innerTiles = grid.GetLocalTilesIntersecting( - new Box2(localPos + new Vector2(-radius, -radius), localPos + new Vector2(radius, radius)), false).ToArray(); - - foreach (var tileRef in innerTiles) - { - foreach (var ent in grid.GetAnchoredEntities(tileRef.GridIndices)) - { - if (!HasComp(ent)) - continue; - _popup.PopupEntity(Loc.GetString("blob-target-close-to-node"), uid, uid); - return; - } - } - - if (!_blobCoreSystem.TryUseAbility(uid, observerComponent.Core.Value, blobCoreComponent, blobCoreComponent.NodeBlobCost)) - return; - - if (!_blobCoreSystem.TransformBlobTile(blobTile.Value, - observerComponent.Core.Value, - blobCoreComponent.NodeBlobTile, - args.Target, - blobCoreComponent)) - return; - - args.Handled = true; - } - - private void OnCreateResource(EntityUid uid, BlobObserverComponent observerComponent, - BlobCreateResourceActionEvent args) - { - if (args.Handled) - return; - - if (observerComponent.Core == null || - !TryComp(observerComponent.Core.Value, out var blobCoreComponent)) - return; - - var gridUid = args.Target.GetGridUid(EntityManager); - - if (!_map.TryGetGrid(gridUid, out var grid)) - { - return; - } - - var centerTile = grid.GetLocalTilesIntersecting( - new Box2(args.Target.Position, args.Target.Position)).ToArray(); - - var blobTileType = BlobTileType.None; - EntityUid? blobTile = null; - - foreach (var tileref in centerTile) - { - foreach (var ent in grid.GetAnchoredEntities(tileref.GridIndices)) - { - if (!TryComp(ent, out var blobTileComponent)) - continue; - blobTileType = blobTileComponent.BlobTileType; - blobTile = ent; - break; - } - } - - if (blobTileType is not BlobTileType.Normal || - blobTile == null) - { - _popup.PopupEntity(Loc.GetString("blob-target-normal-blob-invalid"), uid, uid); - return; - } - - var xform = Transform(blobTile.Value); - - var localPos = xform.Coordinates.Position; - - var radius = blobCoreComponent.ResourceRadiusLimit; - - var innerTiles = grid.GetLocalTilesIntersecting( - new Box2(localPos + new Vector2(-radius, -radius), localPos + new Vector2(radius, radius)), false).ToArray(); - - foreach (var tileRef in innerTiles) - { - foreach (var ent in grid.GetAnchoredEntities(tileRef.GridIndices)) - { - if (!HasComp(ent) || HasComp(ent)) - continue; - _popup.PopupEntity(Loc.GetString("blob-target-close-to-resource"), uid, uid); - return; - } - } - - if (!_blobCoreSystem.TryUseAbility(uid, - observerComponent.Core.Value, - blobCoreComponent, - blobCoreComponent.ResourceBlobCost)) - return; - - if (!_blobCoreSystem.TransformBlobTile(blobTile.Value, - observerComponent.Core.Value, - blobCoreComponent.ResourceBlobTile, - args.Target, - blobCoreComponent)) - return; - - args.Handled = true; - } - - private void OnInteract(EntityUid uid, BlobObserverComponent observerComponent, InteractNoHandEvent args) - { - if (args.Target == args.User) - return; - - if (observerComponent.Core == null || - !TryComp(observerComponent.Core.Value, out var blobCoreComponent)) - return; - - if (_gameTiming.CurTime < blobCoreComponent.NextAction) - return; - - var location = args.ClickLocation; - // Initial validity check - if (!location.IsValid(EntityManager)) - return; - - var gridId = location.GetGridUid(EntityManager); - if (!HasComp(gridId)) - { - location = location.AlignWithClosestGridTile(); - gridId = location.GetGridUid(EntityManager); - // Check if fixing it failed / get final grid ID - if (!HasComp(gridId)) - return; - } - - if (!_map.TryGetGrid(gridId, out var grid)) - { - return; - } - - if (args.Target != null && - !HasComp(args.Target.Value) && - !HasComp(args.Target.Value)) - { - var target = args.Target.Value; - - // Check if the target is adjacent to a tile with BlobCellComponent horizontally or vertically - var targetCoordinates = Transform(target).Coordinates; - var mobTile = grid.GetTileRef(targetCoordinates); - - var mobAdjacentTiles = new[] - { - mobTile.GridIndices.Offset(Direction.East), - mobTile.GridIndices.Offset(Direction.West), - mobTile.GridIndices.Offset(Direction.North), - mobTile.GridIndices.Offset(Direction.South) - }; - if (mobAdjacentTiles.Any(indices => grid.GetAnchoredEntities(indices).Any(ent => HasComp(ent)))) - { - if (HasComp(target) || HasComp(target)) - { - if (_blobCoreSystem.TryUseAbility(uid, observerComponent.Core.Value, blobCoreComponent, blobCoreComponent.AttackCost)) - { - _damageableSystem.TryChangeDamage(target, blobCoreComponent.Damage); - blobCoreComponent.NextAction = - _gameTiming.CurTime + TimeSpan.FromSeconds(blobCoreComponent.ActionRate); - _audioSystem.PlayPvs(blobCoreComponent.AttackSound, uid, AudioParams.Default); - return; - } - } - } - } - var centerTile = grid.GetLocalTilesIntersecting( - new Box2(location.Position, location.Position), false).ToArray(); - - var targetTileEmplty = false; - foreach (var tileRef in centerTile) - { - if (tileRef.Tile.IsEmpty) - { - targetTileEmplty = true; - } - foreach (var ent in grid.GetAnchoredEntities(tileRef.GridIndices)) - { - if (HasComp(ent)) - return; - } - } - - var targetTile = grid.GetTileRef(location); - - var adjacentTiles = new[] - { - targetTile.GridIndices.Offset(Direction.East), - targetTile.GridIndices.Offset(Direction.West), - targetTile.GridIndices.Offset(Direction.North), - targetTile.GridIndices.Offset(Direction.South) - }; - - if (adjacentTiles.Any(indices => grid.GetAnchoredEntities(indices).Any(ent => HasComp(ent)))) - { - var cost = blobCoreComponent.NormalBlobCost; - if (targetTileEmplty) - { - cost *= 2; - } - - if (!_blobCoreSystem.TryUseAbility(uid, observerComponent.Core.Value, blobCoreComponent, cost)) - return; - - if (targetTileEmplty) - { - var plating = _tileDefinitionManager["Plating"]; - var platingTile = new Tile(plating.TileId); - grid.SetTile(location, platingTile); - } - - if (!_blobCoreSystem.TransformBlobTile(null, - observerComponent.Core.Value, - blobCoreComponent.NormalBlobTile, - location, - blobCoreComponent)) - return; - - blobCoreComponent.NextAction = - _gameTiming.CurTime + TimeSpan.FromSeconds(blobCoreComponent.ActionRate); - } - } - - private void OnStartup(EntityUid uid, BlobObserverComponent observerComponent, ComponentStartup args) - { - var helpBlob = new InstantAction( - _proto.Index("HelpBlob")); - _action.AddAction(uid, helpBlob, null); - var swapBlobChem = new InstantAction( - _proto.Index("SwapBlobChem")); - _action.AddAction(uid, swapBlobChem, null); - var teleportBlobToCore = new InstantAction( - _proto.Index("TeleportBlobToCore")); - _action.AddAction(uid, teleportBlobToCore, null); - var teleportBlobToNode = new InstantAction( - _proto.Index("TeleportBlobToNode")); - _action.AddAction(uid, teleportBlobToNode, null); - var createBlobFactory = new WorldTargetAction( - _proto.Index("CreateBlobFactory")); - _action.AddAction(uid, createBlobFactory, null); - var createBlobResource = new WorldTargetAction( - _proto.Index("CreateBlobResource")); - _action.AddAction(uid, createBlobResource, null); - var createBlobNode = new WorldTargetAction( - _proto.Index("CreateBlobNode")); - _action.AddAction(uid, createBlobNode, null); - var createBlobbernaut = new WorldTargetAction( - _proto.Index("CreateBlobbernaut")); - _action.AddAction(uid, createBlobbernaut, null); - var splitBlobCore = new WorldTargetAction( - _proto.Index("SplitBlobCore")); - _action.AddAction(uid, splitBlobCore, null); - var swapBlobCore = new WorldTargetAction( - _proto.Index("SwapBlobCore")); - _action.AddAction(uid, swapBlobCore, null); - } - - private void OnCreateFactory(EntityUid uid, BlobObserverComponent observerComponent, BlobCreateFactoryActionEvent args) - { - if (args.Handled) - return; - - if (observerComponent.Core == null || - !TryComp(observerComponent.Core.Value, out var blobCoreComponent)) - return; - - var gridUid = args.Target.GetGridUid(EntityManager); - - if (!_map.TryGetGrid(gridUid, out var grid)) - { - return; - } - - var centerTile = grid.GetLocalTilesIntersecting( - new Box2(args.Target.Position, args.Target.Position)).ToArray(); - - var blobTileType = BlobTileType.None; - EntityUid? blobTile = null; - - foreach (var tileRef in centerTile) - { - foreach (var ent in grid.GetAnchoredEntities(tileRef.GridIndices)) - { - if (!TryComp(ent, out var blobTileComponent)) - continue; - blobTileType = blobTileComponent.BlobTileType; - blobTile = ent; - break; - } - } - - if (blobTileType is not BlobTileType.Normal || - blobTile == null) - { - _popup.PopupEntity(Loc.GetString("blob-target-normal-blob-invalid"), uid, uid); - return; - } - - var xform = Transform(blobTile.Value); - - var localPos = xform.Coordinates.Position; - - var radius = blobCoreComponent.FactoryRadiusLimit; - - var innerTiles = grid.GetLocalTilesIntersecting( - new Box2(localPos + new Vector2(-radius, -radius), localPos + new Vector2(radius, radius)), false).ToArray(); - - foreach (var tileRef in innerTiles) - { - foreach (var ent in grid.GetAnchoredEntities(tileRef.GridIndices)) - { - if (!HasComp(ent)) - continue; - _popup.PopupEntity(Loc.GetString("Слишком близко к другой фабрике"), uid, uid); - return; - } - } - - if (!_blobCoreSystem.TryUseAbility(uid, observerComponent.Core.Value, blobCoreComponent, - blobCoreComponent.FactoryBlobCost)) - { - args.Handled = true; - return; - } - - if (!_blobCoreSystem.TransformBlobTile(null, - observerComponent.Core.Value, - blobCoreComponent.FactoryBlobTile, - args.Target, - blobCoreComponent)) - return; - - args.Handled = true; - } -} \ No newline at end of file diff --git a/Content.Server/ADT/Blob/BlobResourceComponent.cs b/Content.Server/ADT/Blob/BlobResourceComponent.cs deleted file mode 100644 index ea71b1b1d96..00000000000 --- a/Content.Server/ADT/Blob/BlobResourceComponent.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Content.Shared.FixedPoint; - -namespace Content.Server.Blob; - -[RegisterComponent] -public sealed class BlobResourceComponent : Component -{ - [ViewVariables(VVAccess.ReadWrite), DataField("pointsPerPulsed")] - public FixedPoint2 PointsPerPulsed = 3; -} \ No newline at end of file diff --git a/Content.Server/ADT/Blob/BlobResourceSystem.cs b/Content.Server/ADT/Blob/BlobResourceSystem.cs deleted file mode 100644 index 12a00823979..00000000000 --- a/Content.Server/ADT/Blob/BlobResourceSystem.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace Content.Server.Blob; - -public sealed class BlobResourceSystem : EntitySystem -{ - [Dependency] private readonly BlobCoreSystem _blobCoreSystem = default!; - - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnStartup); - SubscribeLocalEvent(OnPulsed); - } - - - private void OnStartup(EntityUid uid, BlobResourceComponent component, ComponentStartup args) - { - - } - - private void OnPulsed(EntityUid uid, BlobResourceComponent component, BlobTileGetPulseEvent args) - { - if (TryComp(uid, out var blobTileComponent) && blobTileComponent.Core != null) - { - _blobCoreSystem.ChangeBlobPoint(blobTileComponent.Core.Value, component.PointsPerPulsed); - } - } -} \ No newline at end of file diff --git a/Content.Server/ADT/Blob/BlobSpawnerComponent.cs b/Content.Server/ADT/Blob/BlobSpawnerComponent.cs deleted file mode 100644 index 50f29fc8aaf..00000000000 --- a/Content.Server/ADT/Blob/BlobSpawnerComponent.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Robust.Shared.Audio; -using Robust.Shared.Prototypes; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; - -namespace Content.Server.Blob -{ - [RegisterComponent] - public sealed class BlobSpawnerComponent : Component - { - [DataField("spawnSound")] - public SoundSpecifier SpawnSoundPath = new SoundPathSpecifier("/Audio/Effects/clang.ogg"); - - [ViewVariables(VVAccess.ReadWrite), - DataField("corePrototype", customTypeSerializer: typeof(PrototypeIdSerializer))] - public string CoreBlobPrototype = "CoreBlobTile"; - - [ViewVariables(VVAccess.ReadWrite), - DataField("ghostPrototype", customTypeSerializer: typeof(PrototypeIdSerializer))] - public string ObserverBlobPrototype = "MobObserverBlob"; - } -} \ No newline at end of file diff --git a/Content.Server/ADT/Blob/BlobSpawnerSystem.cs b/Content.Server/ADT/Blob/BlobSpawnerSystem.cs deleted file mode 100644 index 92f766f27a8..00000000000 --- a/Content.Server/ADT/Blob/BlobSpawnerSystem.cs +++ /dev/null @@ -1,48 +0,0 @@ -using Content.Server.Mind; -using Content.Server.Players; -using Content.Shared.Blob; -using Robust.Server.GameObjects; -using Robust.Shared.Audio; -using Robust.Shared.Map; - -namespace Content.Server.Blob -{ - public sealed class BlobSpawnerSystem : EntitySystem - { - [Dependency] private readonly AudioSystem _audioSystem = default!; - [Dependency] private readonly IMapManager _mapManager = default!; - [Dependency] private readonly MindSystem _mindSystem = default!; - - public override void Initialize() - { - base.Initialize(); - SubscribeLocalEvent(OnPlayerAttached); - } - - private void OnPlayerAttached(EntityUid uid, BlobSpawnerComponent component, PlayerAttachedEvent args) - { - var xform = Transform(uid); - if (!_mapManager.TryGetGrid(xform.GridUid, out var map)) - return; - - var core = Spawn(component.CoreBlobPrototype, xform.Coordinates); - var observer = Spawn(component.ObserverBlobPrototype, xform.Coordinates); - - if (TryComp(core, out var blobCoreComponent)) - blobCoreComponent.Observer = observer; - - if (TryComp(observer, out var blobObserverComponent)) - blobObserverComponent.Core = core; - - _audioSystem.PlayPvs(component.SpawnSoundPath, uid, AudioParams.Default.WithVolume(-6f)); - - var mind = args.Player.ContentData()?.Mind; - if (mind == null) - return; - - _mindSystem.TransferTo(mind, observer, ghostCheckOverride: true); - - QueueDel(uid); - } - } -} \ No newline at end of file diff --git a/Content.Server/ADT/Blob/BlobTileComponent.cs b/Content.Server/ADT/Blob/BlobTileComponent.cs deleted file mode 100644 index d17d3e820a9..00000000000 --- a/Content.Server/ADT/Blob/BlobTileComponent.cs +++ /dev/null @@ -1,46 +0,0 @@ -using Content.Shared.Blob; -using Content.Shared.Damage; -using Content.Shared.FixedPoint; - -namespace Content.Server.Blob; - -[RegisterComponent] -public sealed class BlobTileComponent : SharedBlobTileComponent -{ - [ViewVariables(VVAccess.ReadOnly)] - public EntityUid? Core = default!; - - [ViewVariables(VVAccess.ReadOnly), DataField("tileType")] - public BlobTileType BlobTileType = BlobTileType.Normal; - - [ViewVariables(VVAccess.ReadOnly), DataField("blobBorder")] - public string BlobBorder = "BlobBorder"; - - [ViewVariables(VVAccess.ReadOnly), DataField("healthOfPulse")] - public DamageSpecifier HealthOfPulse = new() - { - DamageDict = new Dictionary - { - { "Blunt", -2 }, - { "Slash", -2 }, - { "Piercing", -2 }, - { "Heat", -2 }, - { "Cold", -2 }, - { "Shock", -2 }, - } - }; -} - -[Serializable] -public enum BlobTileType : byte -{ - Normal, - Strong, - Reflective, - Resource, - Storage, - Node, - Factory, - Core, - None, -} \ No newline at end of file diff --git a/Content.Server/ADT/Blob/BlobTileSystem.cs b/Content.Server/ADT/Blob/BlobTileSystem.cs deleted file mode 100644 index a27dc71d2bc..00000000000 --- a/Content.Server/ADT/Blob/BlobTileSystem.cs +++ /dev/null @@ -1,382 +0,0 @@ -using System.Linq; -using System.Numerics; -using Content.Server.Construction.Components; -using Content.Server.Destructible; -using Content.Shared.Blob; -using Content.Shared.Damage; -using Content.Shared.Destructible; -using Content.Shared.Verbs; -using Robust.Server.GameObjects; -using Robust.Shared.Audio; -using Robust.Shared.GameStates; -using Robust.Shared.Map; - -namespace Content.Server.Blob -{ - public sealed class BlobTileSystem : SharedBlobTileSystem - { - [Dependency] private readonly IMapManager _map = default!; - [Dependency] private readonly DamageableSystem _damageableSystem = default!; - [Dependency] private readonly BlobCoreSystem _blobCoreSystem = default!; - [Dependency] private readonly AudioSystem _audioSystem = default!; - - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnStartup); - SubscribeLocalEvent(OnDestruction); - SubscribeLocalEvent(OnPulsed); - SubscribeLocalEvent>(AddUpgradeVerb); - SubscribeLocalEvent(OnRiftGetState); - } - - private void OnRiftGetState(EntityUid uid, BlobTileComponent component, ref ComponentGetState args) - { - args.State = new BlobTileComponentState() - { - State = component.State - }; - } - - private void OnPulsed(EntityUid uid, BlobTileComponent component, BlobTileGetPulseEvent args) - { - _damageableSystem.TryChangeDamage(uid, component.HealthOfPulse); - - if (!args.Explain) - return; - - if (!TryComp(uid, out var blobTileComponent) || blobTileComponent.Core == null || - !TryComp(blobTileComponent.Core.Value, out var blobCoreComponent)) - return; - - var xform = Transform(uid); - - if (!_map.TryGetGrid(xform.GridUid, out var grid)) - { - return; - } - - var mobTile = grid.GetTileRef(xform.Coordinates); - - var mobAdjacentTiles = new[] - { - mobTile.GridIndices.Offset(Direction.East), - mobTile.GridIndices.Offset(Direction.West), - mobTile.GridIndices.Offset(Direction.North), - mobTile.GridIndices.Offset(Direction.South) - }; - - var localPos = xform.Coordinates.Position; - - var radius = 1.0f; - - var innerTiles = grid.GetLocalTilesIntersecting( - new Box2(localPos + new Vector2(-radius, -radius), localPos + new Vector2(radius, radius))).ToArray(); - - foreach (var innerTile in innerTiles) - { - if (!mobAdjacentTiles.Contains(innerTile.GridIndices)) - { - continue; - } - - foreach (var ent in grid.GetAnchoredEntities(innerTile.GridIndices)) - { - if (!HasComp(ent) || !HasComp(ent)) - continue; - _damageableSystem.TryChangeDamage(ent, blobCoreComponent.Damage); - _audioSystem.PlayPvs(blobCoreComponent.AttackSound, uid, AudioParams.Default); - args.Explain = true; - return; - } - var spawn = true; - foreach (var ent in grid.GetAnchoredEntities(innerTile.GridIndices)) - { - if (!HasComp(ent)) - continue; - spawn = false; - break; - } - - if (!spawn) - continue; - - var location = innerTile.GridIndices.ToEntityCoordinates(xform.GridUid.Value, _map); - - if (_blobCoreSystem.TransformBlobTile(null, - blobTileComponent.Core.Value, - blobCoreComponent.NormalBlobTile, - location, - blobCoreComponent)) - return; - } - } - - private void AddUpgradeVerb(EntityUid uid, BlobTileComponent component, GetVerbsEvent args) - { - if (!TryComp(args.User, out var ghostBlobComponent)) - return; - - if (ghostBlobComponent.Core == null || - !TryComp(ghostBlobComponent.Core.Value, out var blobCoreComponent)) - return; - - if (TryComp(uid, out var transformComponent) && !transformComponent.Anchored) - return; - - AlternativeVerb verb = new() - { - Act = () => TryUpgrade(uid, args.User, ghostBlobComponent.Core.Value, component, blobCoreComponent), - Text = Loc.GetString("Upgrade") - }; - args.Verbs.Add(verb); - } - - private void TryUpgrade(EntityUid target, EntityUid user, EntityUid coreUid, BlobTileComponent tile, BlobCoreComponent core) - { - var xform = Transform(target); - if (tile.BlobTileType == BlobTileType.Normal) - { - if (!_blobCoreSystem.TryUseAbility(user, coreUid, core, core.StrongBlobCost)) - return; - - _blobCoreSystem.TransformBlobTile(target, - coreUid, - core.StrongBlobTile, - xform.Coordinates, - core); - } - else if (tile.BlobTileType == BlobTileType.Strong) - { - if (!_blobCoreSystem.TryUseAbility(user, coreUid, core, core.ReflectiveBlobCost)) - return; - - _blobCoreSystem.TransformBlobTile(target, - coreUid, - core.ReflectiveBlobTile, - xform.Coordinates, - core); - } - } - - // private void OnStartup(EntityUid uid, BlobCellComponent component, ComponentStartup args) - // { - // var xform = Transform(uid); - // var radius = 2.5f; - // var wallSpacing = 1.5f; // Расстояние между стенами и центральной областью - // - // if (!_map.TryGetGrid(xform.GridUid, out var grid)) - // { - // return; - // } - // - // var localpos = xform.Coordinates.Position; - // - // // Получаем тайлы в области с радиусом 2.5 - // var allTiles = grid.GetLocalTilesIntersecting( - // new Box2(localpos + new Vector2(-radius, -radius), localpos + new Vector2(radius, radius))).ToArray(); - // - // // Получаем тайлы в области с радиусом 1.5 - // var innerTiles = grid.GetLocalTilesIntersecting( - // new Box2(localpos + new Vector2(-wallSpacing, -wallSpacing), localpos + new Vector2(wallSpacing, wallSpacing))).ToArray(); - // - // foreach (var tileref in innerTiles) - // { - // foreach (var ent in grid.GetAnchoredEntities(tileref.GridIndices)) - // { - // if (HasComp(ent)) - // QueueDel(ent); - // if (HasComp(ent)) - // { - // var blockTiles = grid.GetLocalTilesIntersecting( - // new Box2(Transform(ent).Coordinates.Position + new Vector2(-wallSpacing, -wallSpacing), - // Transform(ent).Coordinates.Position + new Vector2(wallSpacing, wallSpacing))).ToArray(); - // allTiles = allTiles.Except(blockTiles).ToArray(); - // } - // } - // } - // - // var outerTiles = allTiles.Except(innerTiles).ToArray(); - // - // foreach (var tileRef in outerTiles) - // { - // foreach (var ent in grid.GetAnchoredEntities(tileRef.GridIndices)) - // { - // if (HasComp(ent)) - // { - // var blockTiles = grid.GetLocalTilesIntersecting( - // new Box2(Transform(ent).Coordinates.Position + new Vector2(-wallSpacing, -wallSpacing), - // Transform(ent).Coordinates.Position + new Vector2(wallSpacing, wallSpacing))).ToArray(); - // outerTiles = outerTiles.Except(blockTiles).ToArray(); - // } - // } - // } - // - // foreach (var tileRef in outerTiles) - // { - // var spawn = true; - // foreach (var ent in grid.GetAnchoredEntities(tileRef.GridIndices)) - // { - // if (HasComp(ent)) - // { - // spawn = false; - // break; - // } - // } - // if (spawn) - // EntityManager.SpawnEntity("BlobBorder", tileRef.GridIndices.ToEntityCoordinates(xform.GridUid.Value, _map)); - // } - // } - - private void OnDestruction(EntityUid uid, BlobTileComponent component, DestructionEventArgs args) - { - var xform = Transform(uid); - var radius = 1.0f; - - if (!_map.TryGetGrid(xform.GridUid, out var grid)) - { - return; - } - - var localPos = xform.Coordinates.Position; - - var innerTiles = grid.GetLocalTilesIntersecting( - new Box2(localPos + new Vector2(-radius, -radius), localPos + new Vector2(radius, radius)), false).ToArray(); - - var centerTile = grid.GetLocalTilesIntersecting( - new Box2(localPos, localPos)).ToArray(); - - innerTiles = innerTiles.Except(centerTile).ToArray(); - - foreach (var tileref in innerTiles) - { - foreach (var ent in grid.GetAnchoredEntities(tileref.GridIndices)) - { - if (!HasComp(ent)) - continue; - var blockTiles = grid.GetLocalTilesIntersecting( - new Box2(Transform(ent).Coordinates.Position + new Vector2(-radius, -radius), - Transform(ent).Coordinates.Position + new Vector2(radius, radius)), false).ToArray(); - - var tilesToRemove = new List(); - - foreach (var blockTile in blockTiles) - { - tilesToRemove.Add(blockTile); - } - - innerTiles = innerTiles.Except(tilesToRemove).ToArray(); - } - } - - foreach (var tileRef in innerTiles) - { - foreach (var ent in grid.GetAnchoredEntities(tileRef.GridIndices)) - { - if (HasComp(ent)) - { - QueueDel(ent); - } - } - } - - EntityManager.SpawnEntity(component.BlobBorder, xform.Coordinates); - } - - private void OnStartup(EntityUid uid, BlobTileComponent component, ComponentStartup args) - { - var xform = Transform(uid); - var wallSpacing = 1.0f; - - if (!_map.TryGetGrid(xform.GridUid, out var grid)) - { - return; - } - - var localPos = xform.Coordinates.Position; - - var innerTiles = grid.GetLocalTilesIntersecting( - new Box2(localPos + new Vector2(-wallSpacing, -wallSpacing), localPos + new Vector2(wallSpacing, wallSpacing)), false).ToArray(); - - var centerTile = grid.GetLocalTilesIntersecting( - new Box2(localPos, localPos)).ToArray(); - - foreach (var tileRef in centerTile) - { - foreach (var ent in grid.GetAnchoredEntities(tileRef.GridIndices)) - { - if (HasComp(ent)) - QueueDel(ent); - } - } - innerTiles = innerTiles.Except(centerTile).ToArray(); - - foreach (var tileref in innerTiles) - { - var spaceNear = false; - var hasBlobTile = false; - foreach (var ent in grid.GetAnchoredEntities(tileref.GridIndices)) - { - if (!HasComp(ent)) - continue; - var blockTiles = grid.GetLocalTilesIntersecting( - new Box2(Transform(ent).Coordinates.Position + new Vector2(-wallSpacing, -wallSpacing), - Transform(ent).Coordinates.Position + new Vector2(wallSpacing, wallSpacing)), false).ToArray(); - - var tilesToRemove = new List(); - - foreach (var blockTile in blockTiles) - { - if (blockTile.Tile.IsEmpty) - { - spaceNear = true; - } - else - { - tilesToRemove.Add(blockTile); - } - } - - innerTiles = innerTiles.Except(tilesToRemove).ToArray(); - - hasBlobTile = true; - } - - if (!hasBlobTile || spaceNear) - continue; - { - foreach (var ent in grid.GetAnchoredEntities(tileref.GridIndices)) - { - if (HasComp(ent)) - { - QueueDel(ent); - } - } - } - } - - var spaceNearCenter = false; - - foreach (var tileRef in innerTiles) - { - var spawn = true; - if (tileRef.Tile.IsEmpty) - { - spaceNearCenter = true; - spawn = false; - } - if (grid.GetAnchoredEntities(tileRef.GridIndices).Any(ent => HasComp(ent))) - { - spawn = false; - } - if (spawn) - EntityManager.SpawnEntity(component.BlobBorder, tileRef.GridIndices.ToEntityCoordinates(xform.GridUid.Value, _map)); - } - if (spaceNearCenter) - { - EntityManager.SpawnEntity(component.BlobBorder, xform.Coordinates); - } - } - } -} \ No newline at end of file diff --git a/Content.Server/ADT/Blob/BlobbernautComponent.cs b/Content.Server/ADT/Blob/BlobbernautComponent.cs deleted file mode 100644 index c55dd7dac4e..00000000000 --- a/Content.Server/ADT/Blob/BlobbernautComponent.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Content.Shared.Damage; -using Content.Shared.FixedPoint; - -namespace Content.Server.Blob; - -[RegisterComponent] -public sealed class BlobbernautComponent : Component -{ - [ViewVariables(VVAccess.ReadWrite), DataField("damageFrequency")] - public float DamageFrequency = 5; - - [ViewVariables(VVAccess.ReadOnly), DataField("damage")] - public DamageSpecifier Damage = new() - { - DamageDict = new Dictionary - { - { "Piercing", 15 }, - } - }; - - [ViewVariables(VVAccess.ReadOnly)] - public bool IsDead = false; - - [ViewVariables(VVAccess.ReadOnly)] - public EntityUid? Factory = default!; - - public float Accumulator = 0; -} \ No newline at end of file diff --git a/Content.Server/ADT/Blob/BlobbernautSystem.cs b/Content.Server/ADT/Blob/BlobbernautSystem.cs deleted file mode 100644 index 17c5b6e47cd..00000000000 --- a/Content.Server/ADT/Blob/BlobbernautSystem.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System.Linq; -using Content.Shared.Blob; -using Content.Shared.Damage; -using Content.Shared.Mobs; -using Robust.Shared.Map; - -namespace Content.Server.Blob -{ - public sealed class BlobbernautSystem : EntitySystem - { - [Dependency] private readonly IMapManager _map = default!; - [Dependency] private readonly DamageableSystem _damageableSystem = default!; - - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnMobStateChanged); - - } - - private void OnMobStateChanged(EntityUid uid, BlobbernautComponent component, MobStateChangedEvent args) - { - component.IsDead = args.NewMobState switch - { - MobState.Dead => true, - MobState.Alive => false, - _ => component.IsDead - }; - } - - public override void Update(float frameTime) - { - base.Update(frameTime); - - var blobFactoryQuery = EntityQueryEnumerator(); - while (blobFactoryQuery.MoveNext(out var ent, out var comp)) - { - if (comp.IsDead) - return; - - comp.Accumulator += frameTime; - - if (comp.Accumulator <= comp.DamageFrequency) - continue; - comp.Accumulator = 0; - - if (comp.Factory == null) - { - _damageableSystem.TryChangeDamage(ent, comp.Damage); - } - else - { - var xform = Transform(ent); - - if (!_map.TryGetGrid(xform.GridUid, out var grid)) - { - return; - } - - var localPos = xform.Coordinates.Position; - var centerTile = grid.GetLocalTilesIntersecting( - new Box2(localPos, localPos)).ToArray(); - - foreach (var tileRef in centerTile) - { - foreach (var entOnTile in grid.GetAnchoredEntities(tileRef.GridIndices)) - { - if (HasComp(entOnTile)) - return; - } - } - - _damageableSystem.TryChangeDamage(ent, comp.Damage); - } - } - } - } -} \ No newline at end of file diff --git a/Content.Server/Blob/BlobCarrierSystem.cs b/Content.Server/Blob/BlobCarrierSystem.cs index 240766a5f62..cca11668052 100644 --- a/Content.Server/Blob/BlobCarrierSystem.cs +++ b/Content.Server/Blob/BlobCarrierSystem.cs @@ -1,9 +1,9 @@ using Content.Server.Actions; +using Content.Shared.Mind.Components; +using Content.Shared.Actions.ActionTypes; using Content.Server.Body.Systems; using Content.Server.Ghost.Roles.Components; using Content.Server.Mind; -using Content.Server.Mind.Components; -using Content.Shared.Actions.ActionTypes; using Content.Shared.Blob; using Content.Shared.Mobs; using Content.Shared.Popups; @@ -56,9 +56,8 @@ private void OnTransformToBlobChanged(EntityUid uid, BlobCarrierComponent compon private void OnStartup(EntityUid uid, BlobCarrierComponent component, ComponentStartup args) { - var transformToBlob = new InstantAction( - _proto.Index("TransformToBlob")); - _action.AddAction(uid, transformToBlob, null); + var transformToBlob = "TransformToBlob"; + _action.AddAction(uid, transformToBlob); var ghostRole = EnsureComp(uid); EnsureComp(uid); ghostRole.RoleName = Loc.GetString("blob-carrier-role-name"); @@ -85,14 +84,14 @@ private void TransformToBlob(EntityUid uid, BlobCarrierComponent carrier) if (!_mapManager.TryGetGrid(xform.GridUid, out var map)) return; - if (_mind.TryGetMind(uid, out var mind) && mind.UserId != null) + if (_mind.TryGetMind(uid, out var mind, out var mind1) && mind1.Session != null) { var core = Spawn(carrier.CoreBlobPrototype, xform.Coordinates); if (!TryComp(core, out var blobCoreComponent)) return; - _blobCoreSystem.CreateBlobObserver(core, mind.UserId.Value, blobCoreComponent); + _blobCoreSystem.CreateBlobObserver(core, mind.Session, blobCoreComponent); } else { diff --git a/Content.Server/Body/Components/RespiratorComponent.cs b/Content.Server/Body/Components/RespiratorComponent.cs deleted file mode 100644 index fa1e847de39..00000000000 --- a/Content.Server/Body/Components/RespiratorComponent.cs +++ /dev/null @@ -1,76 +0,0 @@ -using Content.Server.Body.Systems; -using Content.Shared.Damage; - -namespace Content.Server.Body.Components -{ - [RegisterComponent, Access(typeof(RespiratorSystem))] - public sealed partial class RespiratorComponent : Component - { - /// - /// Saturation level. Reduced by CycleDelay each tick. - /// Can be thought of as 'how many seconds you have until you start suffocating' in this configuration. - /// - [DataField("saturation")] - public float Saturation = 5.0f; - - /// - /// At what level of saturation will you begin to suffocate? - /// - [DataField("suffocationThreshold")] - public float SuffocationThreshold; - - [DataField("maxSaturation")] - public float MaxSaturation = 5.0f; - - [DataField("minSaturation")] - public float MinSaturation = -2.0f; - - // TODO HYPEROXIA? - - [DataField("damage", required: true)] - [ViewVariables(VVAccess.ReadWrite)] - public DamageSpecifier Damage = default!; - - [DataField("damageRecovery", required: true)] - [ViewVariables(VVAccess.ReadWrite)] - public DamageSpecifier DamageRecovery = default!; - - [DataField("gaspPopupCooldown")] - public TimeSpan GaspPopupCooldown { get; private set; } = TimeSpan.FromSeconds(8); - - [ViewVariables] - public TimeSpan LastGaspPopupTime; - - /// - /// How many cycles in a row has the mob been under-saturated? - /// - [ViewVariables] - public int SuffocationCycles = 0; - - /// - /// How many cycles in a row does it take for the suffocation alert to pop up? - /// - [ViewVariables] - public int SuffocationCycleThreshold = 3; - - [ViewVariables] - public RespiratorStatus Status = RespiratorStatus.Inhaling; - - [DataField("cycleDelay")] - public float CycleDelay = 2.0f; - - public float AccumulatedFrametime; - - /// - /// Whether the entity is immuned to pressure (i.e possess the PressureImmunity component) - /// - [ViewVariables] - public bool HasImmunity = false; - } -} - -public enum RespiratorStatus -{ - Inhaling, - Exhaling -} diff --git a/Content.Server/Body/Components/RespiratorImmunityComponent.cs b/Content.Server/Body/Components/RespiratorImmunityComponent.cs deleted file mode 100644 index 1cab3ff3bab..00000000000 --- a/Content.Server/Body/Components/RespiratorImmunityComponent.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Content.Server.Body.Components; - -[RegisterComponent] -public sealed class RespiratorImmunityComponent : Component -{ -} diff --git a/Content.Server/Chemistry/Components/SmokeComponent.cs b/Content.Server/Chemistry/Components/SmokeComponent.cs index 94b80b0664c..d0873306724 100644 --- a/Content.Server/Chemistry/Components/SmokeComponent.cs +++ b/Content.Server/Chemistry/Components/SmokeComponent.cs @@ -9,7 +9,7 @@ namespace Content.Server.Chemistry.Components; /// to entities that collide with it. Similar to /// [RegisterComponent] -public sealed class SmokeComponent : SharedSmokeComponent +public partial class SmokeComponent : SharedSmokeComponent { public const string SolutionName = "solutionArea"; diff --git a/Content.Shared/ADT/Blob/BlobObserverComponent.cs b/Content.Shared/ADT/Blob/BlobObserverComponent.cs deleted file mode 100644 index 8d36a3a1dd9..00000000000 --- a/Content.Shared/ADT/Blob/BlobObserverComponent.cs +++ /dev/null @@ -1,60 +0,0 @@ -using Content.Shared.Actions; -using Robust.Shared.GameStates; - -namespace Content.Shared.Blob; - -[RegisterComponent, NetworkedComponent] -public sealed class BlobObserverComponent : Component -{ - public EntityUid? Core = default!; -} - -public sealed class BlobCreateFactoryActionEvent : WorldTargetActionEvent -{ - -} - -public sealed class BlobCreateResourceActionEvent : WorldTargetActionEvent -{ - -} - -public sealed class BlobCreateNodeActionEvent : WorldTargetActionEvent -{ - -} - -public sealed class BlobCreateBlobbernautActionEvent : WorldTargetActionEvent -{ - -} - -public sealed class BlobSplitCoreActionEvent : WorldTargetActionEvent -{ - -} - -public sealed class BlobSwapCoreActionEvent : WorldTargetActionEvent -{ - -} - -public sealed class BlobToCoreActionEvent : InstantActionEvent -{ - -} - -public sealed class BlobToNodeActionEvent : InstantActionEvent -{ - -} - -public sealed class BlobHelpActionEvent : InstantActionEvent -{ - -} - -public sealed class BlobSwapChemActionEvent : InstantActionEvent -{ - -} \ No newline at end of file diff --git a/Content.Shared/ADT/Blob/BlobTileComponentState.cs b/Content.Shared/ADT/Blob/BlobTileComponentState.cs deleted file mode 100644 index 3ce77fd1bdc..00000000000 --- a/Content.Shared/ADT/Blob/BlobTileComponentState.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Robust.Shared.Serialization; - -namespace Content.Shared.Blob; - -[Serializable, NetSerializable] -public sealed class BlobTileComponentState : ComponentState -{ - public BlobTileState State; -} \ No newline at end of file diff --git a/Content.Shared/ADT/Blob/SharedBlobTileComponent.cs b/Content.Shared/ADT/Blob/SharedBlobTileComponent.cs deleted file mode 100644 index e833c78143c..00000000000 --- a/Content.Shared/ADT/Blob/SharedBlobTileComponent.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Robust.Shared.GameStates; -using Robust.Shared.Serialization; - -namespace Content.Shared.Blob; - -[NetworkedComponent] -public abstract class SharedBlobTileComponent : Component -{ - [DataField("state")] - public BlobTileState State = BlobTileState.Green; -} - -[Serializable, NetSerializable] -public enum BlobTileState : byte -{ - Dead, - Green, - Blue, -} \ No newline at end of file diff --git a/Content.Shared/ADT/Blob/SharedBlobTileSystem.cs b/Content.Shared/ADT/Blob/SharedBlobTileSystem.cs deleted file mode 100644 index ac8bdc04a24..00000000000 --- a/Content.Shared/ADT/Blob/SharedBlobTileSystem.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Content.Shared.Blob; - -public abstract class SharedBlobTileSystem : EntitySystem -{ - -} \ No newline at end of file diff --git a/Content.Shared/Blob/BlobCarrerComponent.cs b/Content.Shared/Blob/BlobCarrerComponent.cs index fa37c65d6fb..90465d3880b 100644 --- a/Content.Shared/Blob/BlobCarrerComponent.cs +++ b/Content.Shared/Blob/BlobCarrerComponent.cs @@ -6,7 +6,9 @@ namespace Content.Shared.Blob; [RegisterComponent, NetworkedComponent] -public sealed class BlobCarrierComponent : Component +#pragma warning disable RA0003 // Class must be explicitly marked as [Virtual], abstract, static or sealed +public partial class BlobCarrierComponent : Component +#pragma warning restore RA0003 // Class must be explicitly marked as [Virtual], abstract, static or sealed { [ViewVariables(VVAccess.ReadWrite), DataField("transformationDelay")] public float TransformationDelay = 240; @@ -32,7 +34,7 @@ public sealed class BlobCarrierComponent : Component public string CoreBlobGhostRolePrototype = "CoreBlobTileGhostRole"; } -public sealed class TransformToBlobActionEvent : InstantActionEvent +public partial class TransformToBlobActionEvent : InstantActionEvent { } diff --git a/Content.Shared/Blob/BlobCoreComponent.cs b/Content.Shared/Blob/BlobCoreComponent.cs index 812fd2f5dd4..08542cc6eb7 100644 --- a/Content.Shared/Blob/BlobCoreComponent.cs +++ b/Content.Shared/Blob/BlobCoreComponent.cs @@ -9,7 +9,7 @@ namespace Content.Shared.Blob; [RegisterComponent] -public sealed class BlobCoreComponent : Component +public partial class BlobCoreComponent : Component { [DataField("antagBlobPrototypeId", customTypeSerializer: typeof(PrototypeIdSerializer))] public string AntagBlobPrototypeId = "Blob"; diff --git a/Content.Shared/Blob/BlobObserverComponent.cs b/Content.Shared/Blob/BlobObserverComponent.cs index a003305982f..6f4e05886a8 100644 --- a/Content.Shared/Blob/BlobObserverComponent.cs +++ b/Content.Shared/Blob/BlobObserverComponent.cs @@ -7,7 +7,7 @@ namespace Content.Shared.Blob; [RegisterComponent, NetworkedComponent] -public sealed class BlobObserverComponent : Component +public partial class BlobObserverComponent : Component { [ViewVariables(VVAccess.ReadOnly)] public bool IsProcessingMoveEvent; @@ -59,52 +59,52 @@ public enum BlobChemSwapUiKey : byte } -public sealed class BlobCreateFactoryActionEvent : WorldTargetActionEvent +public partial class BlobCreateFactoryActionEvent : WorldTargetActionEvent { } -public sealed class BlobCreateResourceActionEvent : WorldTargetActionEvent +public partial class BlobCreateResourceActionEvent : WorldTargetActionEvent { } -public sealed class BlobCreateNodeActionEvent : WorldTargetActionEvent +public partial class BlobCreateNodeActionEvent : WorldTargetActionEvent { } -public sealed class BlobCreateBlobbernautActionEvent : WorldTargetActionEvent +public partial class BlobCreateBlobbernautActionEvent : WorldTargetActionEvent { } -public sealed class BlobSplitCoreActionEvent : WorldTargetActionEvent +public partial class BlobSplitCoreActionEvent : WorldTargetActionEvent { } -public sealed class BlobSwapCoreActionEvent : WorldTargetActionEvent +public partial class BlobSwapCoreActionEvent : WorldTargetActionEvent { } -public sealed class BlobToCoreActionEvent : InstantActionEvent +public partial class BlobToCoreActionEvent : InstantActionEvent { } -public sealed class BlobToNodeActionEvent : InstantActionEvent +public partial class BlobToNodeActionEvent : InstantActionEvent { } -public sealed class BlobHelpActionEvent : InstantActionEvent +public partial class BlobHelpActionEvent : InstantActionEvent { } -public sealed class BlobSwapChemActionEvent : InstantActionEvent +public partial class BlobSwapChemActionEvent : InstantActionEvent { } diff --git a/Content.Shared/Blob/SharedBlobPod.cs b/Content.Shared/Blob/SharedBlobPod.cs index b816ff104f7..c262193ff51 100644 --- a/Content.Shared/Blob/SharedBlobPod.cs +++ b/Content.Shared/Blob/SharedBlobPod.cs @@ -5,6 +5,6 @@ namespace Content.Shared.Blob; [Serializable, NetSerializable] -public sealed class BlobPodZombifyDoAfterEvent : SimpleDoAfterEvent +public partial class BlobPodZombifyDoAfterEvent : SimpleDoAfterEvent { } diff --git a/Content.Shared/Blob/SharedBlobTileComponent.cs b/Content.Shared/Blob/SharedBlobTileComponent.cs index 6a45194a6a0..762817ed78b 100644 --- a/Content.Shared/Blob/SharedBlobTileComponent.cs +++ b/Content.Shared/Blob/SharedBlobTileComponent.cs @@ -3,7 +3,7 @@ namespace Content.Shared.Blob; [NetworkedComponent] -public abstract class SharedBlobTileComponent : Component +public partial class SharedBlobTileComponent : Component { [DataField("color")] public Color Color = Color.White; diff --git a/Content.Shared/Blob/SharedBlobbernautComponent.cs b/Content.Shared/Blob/SharedBlobbernautComponent.cs index 172e87e071d..e354264e0e3 100644 --- a/Content.Shared/Blob/SharedBlobbernautComponent.cs +++ b/Content.Shared/Blob/SharedBlobbernautComponent.cs @@ -4,7 +4,7 @@ namespace Content.Shared.Blob; [NetworkedComponent] -public abstract class SharedBlobbernautComponent : Component +public partial class SharedBlobbernautComponent : Component { [DataField("color")] public Color Color = Color.White; diff --git a/Content.Shared/Chemistry/Components/SharedSmokeComponent.cs b/Content.Shared/Chemistry/Components/SharedSmokeComponent.cs index d1d04faef4a..c2b976d97d9 100644 --- a/Content.Shared/Chemistry/Components/SharedSmokeComponent.cs +++ b/Content.Shared/Chemistry/Components/SharedSmokeComponent.cs @@ -3,7 +3,7 @@ namespace Content.Shared.Chemistry.Components; [NetworkedComponent] -public abstract class SharedSmokeComponent : Component +public partial class SharedSmokeComponent : Component { [DataField("color")] public Color Color = Color.White; diff --git a/Content.Shared/Physics/CollisionGroup.cs b/Content.Shared/Physics/CollisionGroup.cs index 5114b799924..c0be154a942 100644 --- a/Content.Shared/Physics/CollisionGroup.cs +++ b/Content.Shared/Physics/CollisionGroup.cs @@ -23,6 +23,7 @@ public enum CollisionGroup GhostImpassable = 1 << 6, // 32 Things impassible by ghosts/observers, ie blessed tiles or forcefields BulletImpassable = 1 << 7, // 64 Can be hit by bullets InteractImpassable = 1 << 8, // 128 Blocks interaction/InRangeUnobstructed + DoorPassable = 1 << 9, // 512 Blob Tiles MapGrid = MapGridHelpers.CollisionGroup, // Map grids, like shuttles. This is the actual grid itself, not the walls or other entities connected to the grid. diff --git a/Resources/Prototypes/ai_factions.yml b/Resources/Prototypes/ai_factions.yml index 7252d871646..8e4fab17add 100644 --- a/Resources/Prototypes/ai_factions.yml +++ b/Resources/Prototypes/ai_factions.yml @@ -93,13 +93,13 @@ - type: npcFaction id: Blob hostile: - - NanoTrasen - - Syndicate - - Passive - - SimpleHostile - - Xeno - - SimpleNeutral - - PetsNT - - Revolutionary - - Zombie - - Dragon + - NanoTrasen + - Syndicate + - Passive + - SimpleHostile + - Xeno + - SimpleNeutral + - PetsNT + - Revolutionary + - Zombie + - Dragon \ No newline at end of file