From d906bcda03330860c138e86d64f6f1186f179178 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Fri, 26 Jul 2019 13:53:06 +0200 Subject: [PATCH] Eris low walls & windows. Still needs work blocked by better entity parenting, but oh well. --- Content.Client/EntryPoint.cs | 4 + .../IconSmoothing/IconSmoothComponent.cs | 157 ++++++++++++- .../Components/LowWallComponent.cs | 206 ++++++++++++++++++ .../GameObjects/Components/WindowComponent.cs | 91 ++++++++ .../EntitySystems/IconSmoothSystem.cs | 151 +------------ .../GameObjects/EntitySystems/WindowSystem.cs | 51 +++++ Resources/Prototypes/Entities/walls.yml | 6 +- .../Entities/walls/structures/low_wall.yml | 32 +++ .../Entities/walls/structures/windows.yml | 30 +++ .../Textures/Buildings/low_wall.rsi/meta.json | 1 + .../Textures/Buildings/low_wall.rsi/metal.png | Bin 0 -> 326 bytes .../Buildings/low_wall.rsi/metal_0.png | Bin 0 -> 561 bytes .../Buildings/low_wall.rsi/metal_1.png | Bin 0 -> 432 bytes .../Buildings/low_wall.rsi/metal_2.png | Bin 0 -> 561 bytes .../Buildings/low_wall.rsi/metal_3.png | Bin 0 -> 432 bytes .../Buildings/low_wall.rsi/metal_4.png | Bin 0 -> 435 bytes .../Buildings/low_wall.rsi/metal_5.png | Bin 0 -> 440 bytes .../Buildings/low_wall.rsi/metal_6.png | Bin 0 -> 435 bytes .../Buildings/low_wall.rsi/metal_7.png | Bin 0 -> 243 bytes .../Buildings/low_wall.rsi/metal_over_0.png | Bin 0 -> 96 bytes .../Buildings/low_wall.rsi/metal_over_1.png | Bin 0 -> 400 bytes .../Buildings/low_wall.rsi/metal_over_2.png | Bin 0 -> 96 bytes .../Buildings/low_wall.rsi/metal_over_3.png | Bin 0 -> 235 bytes .../Buildings/low_wall.rsi/metal_over_4.png | Bin 0 -> 396 bytes .../Buildings/low_wall.rsi/metal_over_5.png | Bin 0 -> 521 bytes .../Buildings/low_wall.rsi/metal_over_6.png | Bin 0 -> 232 bytes .../Buildings/low_wall.rsi/metal_over_7.png | Bin 0 -> 288 bytes .../Textures/Buildings/rwindow.rsi/meta.json | 1 + .../Buildings/rwindow.rsi/rwindow0.png | Bin 0 -> 814 bytes .../Buildings/rwindow.rsi/rwindow1.png | Bin 0 -> 460 bytes .../Buildings/rwindow.rsi/rwindow2.png | Bin 0 -> 814 bytes .../Buildings/rwindow.rsi/rwindow3.png | Bin 0 -> 460 bytes .../Buildings/rwindow.rsi/rwindow4.png | Bin 0 -> 489 bytes .../Buildings/rwindow.rsi/rwindow5.png | Bin 0 -> 916 bytes .../Buildings/rwindow.rsi/rwindow6.png | Bin 0 -> 489 bytes .../Buildings/rwindow.rsi/rwindow7.png | Bin 0 -> 324 bytes .../Textures/Buildings/wall.rsi/full.png | Bin 321 -> 269 bytes .../Textures/Buildings/wall.rsi/solid0.png | Bin 264 -> 324 bytes .../Textures/Buildings/wall.rsi/solid1.png | Bin 256 -> 231 bytes .../Textures/Buildings/wall.rsi/solid2.png | Bin 264 -> 324 bytes .../Textures/Buildings/wall.rsi/solid3.png | Bin 256 -> 231 bytes .../Textures/Buildings/wall.rsi/solid4.png | Bin 258 -> 237 bytes .../Textures/Buildings/wall.rsi/solid5.png | Bin 254 -> 283 bytes .../Textures/Buildings/wall.rsi/solid6.png | Bin 258 -> 237 bytes .../Textures/Buildings/wall.rsi/solid7.png | Bin 191 -> 144 bytes .../Textures/Buildings/window.rsi/meta.json | 1 + .../Textures/Buildings/window.rsi/window0.png | Bin 0 -> 524 bytes .../Textures/Buildings/window.rsi/window1.png | Bin 0 -> 348 bytes .../Textures/Buildings/window.rsi/window2.png | Bin 0 -> 524 bytes .../Textures/Buildings/window.rsi/window3.png | Bin 0 -> 348 bytes .../Textures/Buildings/window.rsi/window4.png | Bin 0 -> 352 bytes .../Textures/Buildings/window.rsi/window5.png | Bin 0 -> 516 bytes .../Textures/Buildings/window.rsi/window6.png | Bin 0 -> 352 bytes .../Textures/Buildings/window.rsi/window7.png | Bin 0 -> 246 bytes 54 files changed, 575 insertions(+), 156 deletions(-) create mode 100644 Content.Client/GameObjects/Components/LowWallComponent.cs create mode 100644 Content.Client/GameObjects/Components/WindowComponent.cs create mode 100644 Content.Client/GameObjects/EntitySystems/WindowSystem.cs create mode 100644 Resources/Prototypes/Entities/walls/structures/low_wall.yml create mode 100644 Resources/Prototypes/Entities/walls/structures/windows.yml create mode 100644 Resources/Textures/Buildings/low_wall.rsi/meta.json create mode 100644 Resources/Textures/Buildings/low_wall.rsi/metal.png create mode 100644 Resources/Textures/Buildings/low_wall.rsi/metal_0.png create mode 100644 Resources/Textures/Buildings/low_wall.rsi/metal_1.png create mode 100644 Resources/Textures/Buildings/low_wall.rsi/metal_2.png create mode 100644 Resources/Textures/Buildings/low_wall.rsi/metal_3.png create mode 100644 Resources/Textures/Buildings/low_wall.rsi/metal_4.png create mode 100644 Resources/Textures/Buildings/low_wall.rsi/metal_5.png create mode 100644 Resources/Textures/Buildings/low_wall.rsi/metal_6.png create mode 100644 Resources/Textures/Buildings/low_wall.rsi/metal_7.png create mode 100644 Resources/Textures/Buildings/low_wall.rsi/metal_over_0.png create mode 100644 Resources/Textures/Buildings/low_wall.rsi/metal_over_1.png create mode 100644 Resources/Textures/Buildings/low_wall.rsi/metal_over_2.png create mode 100644 Resources/Textures/Buildings/low_wall.rsi/metal_over_3.png create mode 100644 Resources/Textures/Buildings/low_wall.rsi/metal_over_4.png create mode 100644 Resources/Textures/Buildings/low_wall.rsi/metal_over_5.png create mode 100644 Resources/Textures/Buildings/low_wall.rsi/metal_over_6.png create mode 100644 Resources/Textures/Buildings/low_wall.rsi/metal_over_7.png create mode 100644 Resources/Textures/Buildings/rwindow.rsi/meta.json create mode 100644 Resources/Textures/Buildings/rwindow.rsi/rwindow0.png create mode 100644 Resources/Textures/Buildings/rwindow.rsi/rwindow1.png create mode 100644 Resources/Textures/Buildings/rwindow.rsi/rwindow2.png create mode 100644 Resources/Textures/Buildings/rwindow.rsi/rwindow3.png create mode 100644 Resources/Textures/Buildings/rwindow.rsi/rwindow4.png create mode 100644 Resources/Textures/Buildings/rwindow.rsi/rwindow5.png create mode 100644 Resources/Textures/Buildings/rwindow.rsi/rwindow6.png create mode 100644 Resources/Textures/Buildings/rwindow.rsi/rwindow7.png create mode 100644 Resources/Textures/Buildings/window.rsi/meta.json create mode 100644 Resources/Textures/Buildings/window.rsi/window0.png create mode 100644 Resources/Textures/Buildings/window.rsi/window1.png create mode 100644 Resources/Textures/Buildings/window.rsi/window2.png create mode 100644 Resources/Textures/Buildings/window.rsi/window3.png create mode 100644 Resources/Textures/Buildings/window.rsi/window4.png create mode 100644 Resources/Textures/Buildings/window.rsi/window5.png create mode 100644 Resources/Textures/Buildings/window.rsi/window6.png create mode 100644 Resources/Textures/Buildings/window.rsi/window7.png diff --git a/Content.Client/EntryPoint.cs b/Content.Client/EntryPoint.cs index 0a04e76ce2..a9a4663f29 100644 --- a/Content.Client/EntryPoint.cs +++ b/Content.Client/EntryPoint.cs @@ -109,6 +109,8 @@ namespace Content.Client factory.Register(); factory.Register(); factory.Register(); + factory.Register(); + factory.RegisterReference(); factory.Register(); factory.Register(); factory.Register(); @@ -159,6 +161,8 @@ namespace Content.Client factory.Register(); factory.Register(); + factory.Register(); + IoCManager.Register(); IoCManager.Register(); IoCManager.Register(); diff --git a/Content.Client/GameObjects/Components/IconSmoothing/IconSmoothComponent.cs b/Content.Client/GameObjects/Components/IconSmoothing/IconSmoothComponent.cs index 6b510ff8bd..74352642b8 100644 --- a/Content.Client/GameObjects/Components/IconSmoothing/IconSmoothComponent.cs +++ b/Content.Client/GameObjects/Components/IconSmoothing/IconSmoothComponent.cs @@ -1,10 +1,14 @@ -using System.Diagnostics.CodeAnalysis; +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using Content.Client.GameObjects.EntitySystems; using JetBrains.Annotations; using Robust.Client.Interfaces.GameObjects.Components; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.Components.Transform; +using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Map; +using Robust.Shared.Maths; using Robust.Shared.Serialization; using static Robust.Client.GameObjects.SpriteComponent; @@ -21,7 +25,7 @@ namespace Content.Client.GameObjects.Components.IconSmoothing /// To use, set base equal to the prefix of the corner states in the sprite base RSI. /// Any objects with the same key will connect. /// - public sealed class IconSmoothComponent : Component + public class IconSmoothComponent : Component { private string _smoothKey; private string _stateBase; @@ -76,9 +80,9 @@ namespace Content.Client.GameObjects.Components.IconSmoothing SnapGrid.OnPositionChanged += SnapGridOnPositionChanged; Owner.EntityManager.RaiseEvent(Owner, new IconSmoothDirtyEvent(null, SnapGrid.Offset, Mode)); - var state0 = $"{StateBase}0"; if (Mode == IconSmoothingMode.Corners) { + var state0 = $"{StateBase}0"; Sprite.LayerMapSet(CornerLayers.SE, Sprite.AddLayerState(state0)); Sprite.LayerSetDirOffset(CornerLayers.SE, DirectionOffset.None); Sprite.LayerMapSet(CornerLayers.NE, Sprite.AddLayerState(state0)); @@ -90,6 +94,107 @@ namespace Content.Client.GameObjects.Components.IconSmoothing } } + internal virtual void CalculateNewSprite() + { + switch (Mode) + { + case IconSmoothingMode.Corners: + CalculateNewSpriteCorers(); + break; + + case IconSmoothingMode.CardinalFlags: + CalculateNewSpriteCardinal(); + break; + + default: + throw new ArgumentOutOfRangeException(); + } + } + + private void CalculateNewSpriteCardinal() + { + var dirs = CardinalConnectDirs.None; + + if (MatchingEntity(SnapGrid.GetInDir(Direction.North))) + dirs |= CardinalConnectDirs.North; + if (MatchingEntity(SnapGrid.GetInDir(Direction.South))) + dirs |= CardinalConnectDirs.South; + if (MatchingEntity(SnapGrid.GetInDir(Direction.East))) + dirs |= CardinalConnectDirs.East; + if (MatchingEntity(SnapGrid.GetInDir(Direction.West))) + dirs |= CardinalConnectDirs.West; + + Sprite.LayerSetState(0, $"{StateBase}{(int) dirs}"); + } + + private void CalculateNewSpriteCorers() + { + var n = MatchingEntity(SnapGrid.GetInDir(Direction.North)); + var ne = MatchingEntity(SnapGrid.GetInDir(Direction.NorthEast)); + var e = MatchingEntity(SnapGrid.GetInDir(Direction.East)); + var se = MatchingEntity(SnapGrid.GetInDir(Direction.SouthEast)); + var s = MatchingEntity(SnapGrid.GetInDir(Direction.South)); + var sw = MatchingEntity(SnapGrid.GetInDir(Direction.SouthWest)); + var w = MatchingEntity(SnapGrid.GetInDir(Direction.West)); + var nw = MatchingEntity(SnapGrid.GetInDir(Direction.NorthWest)); + + // ReSharper disable InconsistentNaming + var cornerNE = CornerFill.None; + var cornerSE = CornerFill.None; + var cornerSW = CornerFill.None; + var cornerNW = CornerFill.None; + // ReSharper restore InconsistentNaming + + if (n) + { + cornerNE |= CornerFill.CounterClockwise; + cornerNW |= CornerFill.Clockwise; + } + + if (ne) + { + cornerNE |= CornerFill.Diagonal; + } + + if (e) + { + cornerNE |= CornerFill.Clockwise; + cornerSE |= CornerFill.CounterClockwise; + } + + if (se) + { + cornerSE |= CornerFill.Diagonal; + } + + if (s) + { + cornerSE |= CornerFill.Clockwise; + cornerSW |= CornerFill.CounterClockwise; + } + + if (sw) + { + cornerSW |= CornerFill.Diagonal; + } + + if (w) + { + cornerSW |= CornerFill.Clockwise; + cornerNW |= CornerFill.CounterClockwise; + } + + if (nw) + { + cornerNW |= CornerFill.Diagonal; + } + + Sprite.LayerSetState(CornerLayers.NE, $"{StateBase}{(int) cornerNE}"); + Sprite.LayerSetState(CornerLayers.SE, $"{StateBase}{(int) cornerSE}"); + Sprite.LayerSetState(CornerLayers.SW, $"{StateBase}{(int) cornerSW}"); + Sprite.LayerSetState(CornerLayers.NW, $"{StateBase}{(int) cornerNW}"); + } + public override void Shutdown() { SnapGrid.OnPositionChanged -= SnapGridOnPositionChanged; @@ -104,6 +209,52 @@ namespace Content.Client.GameObjects.Components.IconSmoothing _lastPosition = (Owner.Transform.GridID, SnapGrid.Position); } + [System.Diagnostics.Contracts.Pure] + protected bool MatchingEntity(IEnumerable candidates) + { + foreach (var entity in candidates) + { + if (!entity.TryGetComponent(out IconSmoothComponent other)) + { + continue; + } + + if (other.SmoothKey == SmoothKey) + { + return true; + } + } + + return false; + } + + [Flags] + private enum CardinalConnectDirs : byte + { + None = 0, + North = 1, + South = 2, + East = 4, + West = 8 + } + + [Flags] + public enum CornerFill : byte + { + // These values are pulled from Baystation12. + // I'm too lazy to convert the state names. + None = 0, + + // The cardinal tile counter-clockwise of this corner is filled. + CounterClockwise = 1, + + // The diagonal tile in the direction of this corner. + Diagonal = 2, + + // The cardinal tile clockwise of this corner is filled. + Clockwise = 4, + } + [SuppressMessage("ReSharper", "InconsistentNaming")] public enum CornerLayers { diff --git a/Content.Client/GameObjects/Components/LowWallComponent.cs b/Content.Client/GameObjects/Components/LowWallComponent.cs new file mode 100644 index 0000000000..2f1b6e3868 --- /dev/null +++ b/Content.Client/GameObjects/Components/LowWallComponent.cs @@ -0,0 +1,206 @@ +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using Content.Client.GameObjects.Components.IconSmoothing; +using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Maths; +using static Robust.Client.GameObjects.SpriteComponent; + +namespace Content.Client.GameObjects.Components +{ + // TODO: Over layers should be placed ABOVE the window itself too. + // This is gonna require a client entity & parenting, + // so IsMapTransform being naive is gonna be a problem. + + /// + /// Override of icon smoothing to handle the specific complexities of low walls. + /// + public class LowWallComponent : IconSmoothComponent + { + public override string Name => "LowWall"; + + public CornerFill LastCornerNE { get; private set; } + public CornerFill LastCornerSE { get; private set; } + public CornerFill LastCornerSW { get; private set; } + public CornerFill LastCornerNW { get; private set; } + + public override void Startup() + { + base.Startup(); + + var overState0 = $"{StateBase}over_0"; + Sprite.LayerMapSet(OverCornerLayers.SE, Sprite.AddLayerState(overState0)); + Sprite.LayerSetDirOffset(OverCornerLayers.SE, DirectionOffset.None); + Sprite.LayerMapSet(OverCornerLayers.NE, Sprite.AddLayerState(overState0)); + Sprite.LayerSetDirOffset(OverCornerLayers.NE, DirectionOffset.CounterClockwise); + Sprite.LayerMapSet(OverCornerLayers.NW, Sprite.AddLayerState(overState0)); + Sprite.LayerSetDirOffset(OverCornerLayers.NW, DirectionOffset.Flip); + Sprite.LayerMapSet(OverCornerLayers.SW, Sprite.AddLayerState(overState0)); + Sprite.LayerSetDirOffset(OverCornerLayers.SW, DirectionOffset.Clockwise); + } + + internal override void CalculateNewSprite() + { + base.CalculateNewSprite(); + + var (n, nl) = MatchingWall(SnapGrid.GetInDir(Direction.North)); + var (ne, nel) = MatchingWall(SnapGrid.GetInDir(Direction.NorthEast)); + var (e, el) = MatchingWall(SnapGrid.GetInDir(Direction.East)); + var (se, sel) = MatchingWall(SnapGrid.GetInDir(Direction.SouthEast)); + var (s, sl) = MatchingWall(SnapGrid.GetInDir(Direction.South)); + var (sw, swl) = MatchingWall(SnapGrid.GetInDir(Direction.SouthWest)); + var (w, wl) = MatchingWall(SnapGrid.GetInDir(Direction.West)); + var (nw, nwl) = MatchingWall(SnapGrid.GetInDir(Direction.NorthWest)); + + // ReSharper disable InconsistentNaming + var cornerNE = CornerFill.None; + var cornerSE = CornerFill.None; + var cornerSW = CornerFill.None; + var cornerNW = CornerFill.None; + + var lowCornerNE = CornerFill.None; + var lowCornerSE = CornerFill.None; + var lowCornerSW = CornerFill.None; + var lowCornerNW = CornerFill.None; + // ReSharper restore InconsistentNaming + + if (n) + { + cornerNE |= CornerFill.CounterClockwise; + cornerNW |= CornerFill.Clockwise; + + if (!nl) + { + lowCornerNE |= CornerFill.CounterClockwise; + lowCornerNW |= CornerFill.Clockwise; + } + } + + if (ne) + { + cornerNE |= CornerFill.Diagonal; + + if (!nel && (nl || el || n && e)) + { + lowCornerNE |= CornerFill.Diagonal; + } + } + + if (e) + { + cornerNE |= CornerFill.Clockwise; + cornerSE |= CornerFill.CounterClockwise; + + if (!el) + { + lowCornerNE |= CornerFill.Clockwise; + lowCornerSE |= CornerFill.CounterClockwise; + } + } + + if (se) + { + cornerSE |= CornerFill.Diagonal; + + if (!sel && (sl || el || s && e)) + { + lowCornerSE |= CornerFill.Diagonal; + } + } + + if (s) + { + cornerSE |= CornerFill.Clockwise; + cornerSW |= CornerFill.CounterClockwise; + + if (!sl) + { + lowCornerSE |= CornerFill.Clockwise; + lowCornerSW |= CornerFill.CounterClockwise; + } + } + + if (sw) + { + cornerSW |= CornerFill.Diagonal; + + if (!swl && (sl || wl || s && w)) + { + lowCornerSW |= CornerFill.Diagonal; + } + } + + if (w) + { + cornerSW |= CornerFill.Clockwise; + cornerNW |= CornerFill.CounterClockwise; + + if (!wl) + { + lowCornerSW |= CornerFill.Clockwise; + lowCornerNW |= CornerFill.CounterClockwise; + } + } + + if (nw) + { + cornerNW |= CornerFill.Diagonal; + + if (!nwl && (nl || wl || n && w)) + { + lowCornerNW |= CornerFill.Diagonal; + } + } + + Sprite.LayerSetState(CornerLayers.NE, $"{StateBase}{(int) cornerNE}"); + Sprite.LayerSetState(CornerLayers.SE, $"{StateBase}{(int) cornerSE}"); + Sprite.LayerSetState(CornerLayers.SW, $"{StateBase}{(int) cornerSW}"); + Sprite.LayerSetState(CornerLayers.NW, $"{StateBase}{(int) cornerNW}"); + + Sprite.LayerSetState(OverCornerLayers.NE, $"{StateBase}over_{(int) lowCornerNE}"); + Sprite.LayerSetState(OverCornerLayers.SE, $"{StateBase}over_{(int) lowCornerSE}"); + Sprite.LayerSetState(OverCornerLayers.SW, $"{StateBase}over_{(int) lowCornerSW}"); + Sprite.LayerSetState(OverCornerLayers.NW, $"{StateBase}over_{(int) lowCornerNW}"); + + LastCornerNE = cornerNE; + LastCornerSE = cornerSE; + LastCornerSW = cornerSW; + LastCornerNW = cornerNW; + + foreach (var entity in SnapGrid.GetLocal()) + { + if (entity.TryGetComponent(out WindowComponent window)) + { + window.UpdateSprite(); + } + } + } + + [System.Diagnostics.Contracts.Pure] + private (bool connected, bool lowWall) MatchingWall(IEnumerable candidates) + { + foreach (var entity in candidates) + { + if (!entity.TryGetComponent(out IconSmoothComponent other)) + { + continue; + } + + if (other.SmoothKey == SmoothKey) + { + return (true, other is LowWallComponent); + } + } + + return (false, false); + } + + [SuppressMessage("ReSharper", "InconsistentNaming")] + private enum OverCornerLayers + { + SE, + NE, + NW, + SW, + } + } +} diff --git a/Content.Client/GameObjects/Components/WindowComponent.cs b/Content.Client/GameObjects/Components/WindowComponent.cs new file mode 100644 index 0000000000..f92c7b4f20 --- /dev/null +++ b/Content.Client/GameObjects/Components/WindowComponent.cs @@ -0,0 +1,91 @@ +using Content.Client.GameObjects.EntitySystems; +using Robust.Client.GameObjects; +using Robust.Client.Interfaces.GameObjects.Components; +using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects.Components.Transform; +using Robust.Shared.Serialization; +using static Content.Client.GameObjects.Components.IconSmoothing.IconSmoothComponent; + +namespace Content.Client.GameObjects.Components +{ + public sealed class WindowComponent : Component + { + public override string Name => "Window"; + + private string _stateBase; + private ISpriteComponent _sprite; + private SnapGridComponent _snapGrid; + + public override void Initialize() + { + base.Initialize(); + + _sprite = Owner.GetComponent(); + _snapGrid = Owner.GetComponent(); + } + + public override void Startup() + { + base.Startup(); + + _snapGrid.OnPositionChanged += SnapGridOnPositionChanged; + Owner.EntityManager.RaiseEvent(Owner, new WindowSmoothDirtyEvent()); + + var state0 = $"{_stateBase}0"; + _sprite.LayerMapSet(CornerLayers.SE, _sprite.AddLayerState(state0)); + _sprite.LayerSetDirOffset(CornerLayers.SE, SpriteComponent.DirectionOffset.None); + _sprite.LayerMapSet(CornerLayers.NE, _sprite.AddLayerState(state0)); + _sprite.LayerSetDirOffset(CornerLayers.NE, SpriteComponent.DirectionOffset.CounterClockwise); + _sprite.LayerMapSet(CornerLayers.NW, _sprite.AddLayerState(state0)); + _sprite.LayerSetDirOffset(CornerLayers.NW, SpriteComponent.DirectionOffset.Flip); + _sprite.LayerMapSet(CornerLayers.SW, _sprite.AddLayerState(state0)); + _sprite.LayerSetDirOffset(CornerLayers.SW, SpriteComponent.DirectionOffset.Clockwise); + } + + public override void Shutdown() + { + _snapGrid.OnPositionChanged -= SnapGridOnPositionChanged; + + base.Shutdown(); + } + + private void SnapGridOnPositionChanged() + { + Owner.EntityManager.RaiseEvent(Owner, new WindowSmoothDirtyEvent()); + } + + public void UpdateSprite() + { + var lowWall = FindLowWall(); + if (lowWall == null) + { + return; + } + + _sprite.LayerSetState(CornerLayers.NE, $"{_stateBase}{(int) lowWall.LastCornerNE}"); + _sprite.LayerSetState(CornerLayers.SE, $"{_stateBase}{(int) lowWall.LastCornerSE}"); + _sprite.LayerSetState(CornerLayers.SW, $"{_stateBase}{(int) lowWall.LastCornerSW}"); + _sprite.LayerSetState(CornerLayers.NW, $"{_stateBase}{(int) lowWall.LastCornerNW}"); + } + + private LowWallComponent FindLowWall() + { + foreach (var entity in _snapGrid.GetLocal()) + { + if (entity.TryGetComponent(out LowWallComponent lowWall)) + { + return lowWall; + } + } + + return null; + } + + public override void ExposeData(ObjectSerializer serializer) + { + base.ExposeData(serializer); + + serializer.DataField(ref _stateBase, "base", null); + } + } +} diff --git a/Content.Client/GameObjects/EntitySystems/IconSmoothSystem.cs b/Content.Client/GameObjects/EntitySystems/IconSmoothSystem.cs index b210804f00..9b7851360a 100644 --- a/Content.Client/GameObjects/EntitySystems/IconSmoothSystem.cs +++ b/Content.Client/GameObjects/EntitySystems/IconSmoothSystem.cs @@ -1,9 +1,7 @@ -using System; using System.Collections.Generic; using System.Linq; using Content.Client.GameObjects.Components.IconSmoothing; using JetBrains.Annotations; -using Robust.Client.Interfaces.GameObjects.Components; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.Components.Transform; using Robust.Shared.GameObjects.Systems; @@ -132,157 +130,10 @@ namespace Content.Client.GameObjects.EntitySystems return; } - var sprite = smoothing.Sprite; - var snapGrid = smoothing.SnapGrid; - - switch (smoothing.Mode) - { - case IconSmoothingMode.Corners: - _calculateNewSpriteCorers(smoothing, snapGrid, sprite); - break; - - case IconSmoothingMode.CardinalFlags: - _calculateNewSpriteCardinal(smoothing, snapGrid, sprite); - break; - - default: - throw new ArgumentOutOfRangeException(); - } + smoothing.CalculateNewSprite(); smoothing.UpdateGeneration = _generation; } - - private static void _calculateNewSpriteCardinal(IconSmoothComponent smoothing, SnapGridComponent snapGrid, - ISpriteComponent sprite) - { - var dirs = CardinalConnectDirs.None; - - if (MatchingEntity(smoothing, snapGrid.GetInDir(Direction.North))) - dirs |= CardinalConnectDirs.North; - if (MatchingEntity(smoothing, snapGrid.GetInDir(Direction.South))) - dirs |= CardinalConnectDirs.South; - if (MatchingEntity(smoothing, snapGrid.GetInDir(Direction.East))) - dirs |= CardinalConnectDirs.East; - if (MatchingEntity(smoothing, snapGrid.GetInDir(Direction.West))) - dirs |= CardinalConnectDirs.West; - - sprite.LayerSetState(0, $"{smoothing.StateBase}{(int) dirs}"); - } - - private static void _calculateNewSpriteCorers(IconSmoothComponent smoothing, SnapGridComponent snapGrid, - ISpriteComponent sprite) - { - var n = MatchingEntity(smoothing, snapGrid.GetInDir(Direction.North)); - var ne = MatchingEntity(smoothing, snapGrid.GetInDir(Direction.NorthEast)); - var e = MatchingEntity(smoothing, snapGrid.GetInDir(Direction.East)); - var se = MatchingEntity(smoothing, snapGrid.GetInDir(Direction.SouthEast)); - var s = MatchingEntity(smoothing, snapGrid.GetInDir(Direction.South)); - var sw = MatchingEntity(smoothing, snapGrid.GetInDir(Direction.SouthWest)); - var w = MatchingEntity(smoothing, snapGrid.GetInDir(Direction.West)); - var nw = MatchingEntity(smoothing, snapGrid.GetInDir(Direction.NorthWest)); - - // ReSharper disable InconsistentNaming - var cornerNE = CornerFill.None; - var cornerSE = CornerFill.None; - var cornerSW = CornerFill.None; - var cornerNW = CornerFill.None; - // ReSharper restore InconsistentNaming - - if (n) - { - cornerNE |= CornerFill.CounterClockwise; - cornerNW |= CornerFill.Clockwise; - } - - if (ne) - { - cornerNE |= CornerFill.Diagonal; - } - - if (e) - { - cornerNE |= CornerFill.Clockwise; - cornerSE |= CornerFill.CounterClockwise; - } - - if (se) - { - cornerSE |= CornerFill.Diagonal; - } - - if (s) - { - cornerSE |= CornerFill.Clockwise; - cornerSW |= CornerFill.CounterClockwise; - } - - if (sw) - { - cornerSW |= CornerFill.Diagonal; - } - - if (w) - { - cornerSW |= CornerFill.Clockwise; - cornerNW |= CornerFill.CounterClockwise; - } - - if (nw) - { - cornerNW |= CornerFill.Diagonal; - } - - sprite.LayerSetState(IconSmoothComponent.CornerLayers.NE, $"{smoothing.StateBase}{(int) cornerNE}"); - sprite.LayerSetState(IconSmoothComponent.CornerLayers.SE, $"{smoothing.StateBase}{(int) cornerSE}"); - sprite.LayerSetState(IconSmoothComponent.CornerLayers.SW, $"{smoothing.StateBase}{(int) cornerSW}"); - sprite.LayerSetState(IconSmoothComponent.CornerLayers.NW, $"{smoothing.StateBase}{(int) cornerNW}"); - } - - [System.Diagnostics.Contracts.Pure] - private static bool MatchingEntity(IconSmoothComponent source, IEnumerable candidates) - { - foreach (var entity in candidates) - { - if (!entity.TryGetComponent(out IconSmoothComponent other)) - { - return false; - } - - if (other.SmoothKey == source.SmoothKey) - { - return true; - } - } - - return false; - } - - [Flags] - private enum CardinalConnectDirs : byte - { - None = 0, - North = 1, - South = 2, - East = 4, - West = 8 - } - - [Flags] - private enum CornerFill : byte - { - // These values are pulled from Baystation12. - // I'm too lazy to convert the state names. - None = 0, - - // The cardinal tile counter-clockwise of this corner is filled. - CounterClockwise = 1, - - // The diagonal tile in the direction of this corner. - Diagonal = 2, - - // The cardinal tile clockwise of this corner is filled. - Clockwise = 4, - } } /// diff --git a/Content.Client/GameObjects/EntitySystems/WindowSystem.cs b/Content.Client/GameObjects/EntitySystems/WindowSystem.cs new file mode 100644 index 0000000000..73b33afb10 --- /dev/null +++ b/Content.Client/GameObjects/EntitySystems/WindowSystem.cs @@ -0,0 +1,51 @@ +using System.Collections.Generic; +using Content.Client.GameObjects.Components; +using Content.Client.GameObjects.Components.IconSmoothing; +using JetBrains.Annotations; +using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects.Components.Transform; +using Robust.Shared.GameObjects.Systems; +using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Map; + +namespace Content.Client.GameObjects.EntitySystems +{ + [UsedImplicitly] + public sealed class WindowSystem : EntitySystem + { + private readonly Queue _dirtyEntities = new Queue(); + + public override void Initialize() + { + base.Initialize(); + + SubscribeEvent(HandleDirtyEvent); + } + + private void HandleDirtyEvent(object sender, WindowSmoothDirtyEvent ev) + { + if (sender is IEntity senderEnt && senderEnt.HasComponent()) + { + _dirtyEntities.Enqueue(senderEnt); + } + } + + public override void FrameUpdate(float frameTime) + { + base.FrameUpdate(frameTime); + + // Performance: This could be spread over multiple updates, or made parallel. + while (_dirtyEntities.Count > 0) + { + _dirtyEntities.Dequeue().GetComponent().UpdateSprite(); + } + } + } + + /// + /// Event raised by a when it needs to be recalculated. + /// + public sealed class WindowSmoothDirtyEvent : EntitySystemMessage + { + } +} diff --git a/Resources/Prototypes/Entities/walls.yml b/Resources/Prototypes/Entities/walls.yml index 3f571b595c..1d76d42830 100644 --- a/Resources/Prototypes/Entities/walls.yml +++ b/Resources/Prototypes/Entities/walls.yml @@ -5,7 +5,7 @@ - type: Clickable - type: Sprite netsync: false - color: "#636769" + color: "#71797a" drawdepth: Walls sprite: Buildings/wall.rsi @@ -23,10 +23,10 @@ sizeX: 32 sizeY: 32 - type: SnapGrid - offset: Edge + offset: Center - type: IconSmooth - key: walls. Seriously, just a wall. Nothing extraordinary here. + key: walls base: solid placement: diff --git a/Resources/Prototypes/Entities/walls/structures/low_wall.yml b/Resources/Prototypes/Entities/walls/structures/low_wall.yml new file mode 100644 index 0000000000..7394d08de8 --- /dev/null +++ b/Resources/Prototypes/Entities/walls/structures/low_wall.yml @@ -0,0 +1,32 @@ +- type: entity + id: low_wall + name: Low Wall + description: Goes up to about your waist. + components: + - type: Clickable + - type: Sprite + netsync: false + color: "#71797a" + drawdepth: Walls + sprite: Buildings/low_wall.rsi + + - type: Icon + sprite: Buildings/low_wall.rsi + state: metal + + - type: BoundingBox + - type: Collidable + - type: Damageable + - type: Destructible + thresholdvalue: 100 + + - type: SnapGrid + offset: Center + + - type: LowWall + key: walls + base: metal_ + + placement: + snap: + - Wall diff --git a/Resources/Prototypes/Entities/walls/structures/windows.yml b/Resources/Prototypes/Entities/walls/structures/windows.yml new file mode 100644 index 0000000000..550b606c84 --- /dev/null +++ b/Resources/Prototypes/Entities/walls/structures/windows.yml @@ -0,0 +1,30 @@ +- type: entity + id: window + name: Window + description: Don't smudge up the glass down there. + components: + - type: Clickable + - type: Sprite + netsync: false + drawdepth: WallTops + sprite: Buildings/window.rsi + + - type: Icon + sprite: Buildings/window.rsi + state: window0 + + - type: BoundingBox + - type: Collidable + - type: Damageable + - type: Destructible + thresholdvalue: 100 + + - type: SnapGrid + offset: Center + + - type: Window + base: window + + placement: + snap: + - Wall diff --git a/Resources/Textures/Buildings/low_wall.rsi/meta.json b/Resources/Textures/Buildings/low_wall.rsi/meta.json new file mode 100644 index 0000000000..13c05547ff --- /dev/null +++ b/Resources/Textures/Buildings/low_wall.rsi/meta.json @@ -0,0 +1 @@ +{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/b503939d31b23c025ddb936b75e0a265d85154c5/icons/obj/structures/low_wall.dmi", "states": [{"name": "metal", "directions": 1, "delays": [[1.0]]}, {"name": "metal_0", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "metal_1", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "metal_2", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "metal_3", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "metal_4", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "metal_5", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "metal_6", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "metal_7", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "metal_over_0", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "metal_over_1", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "metal_over_2", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "metal_over_3", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "metal_over_4", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "metal_over_5", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "metal_over_6", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "metal_over_7", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}]} \ No newline at end of file diff --git a/Resources/Textures/Buildings/low_wall.rsi/metal.png b/Resources/Textures/Buildings/low_wall.rsi/metal.png new file mode 100644 index 0000000000000000000000000000000000000000..21a1e3e05911b41088404cdc48654fb59c30199a GIT binary patch literal 326 zcmV-M0lEH(P)e;T1&4WAVN*(vQOJyE=cvw3jUMT z0JL2L)A%HV!C2GygtlwK0DEP^093LK@W&Z2SAT}E3Z^uG?~t4!GnWQPU45v3Na-!? zD(v0^G5HSWk>;j6`r)_2oCS8rHDl2Cm*|JFZA$rVhvA`b*}`nkQ*OUaDet_{J9{4L Y4a}{43&cCLYXATM07*qoM6N<$f&_Vr>Hq)$ literal 0 HcmV?d00001 diff --git a/Resources/Textures/Buildings/low_wall.rsi/metal_0.png b/Resources/Textures/Buildings/low_wall.rsi/metal_0.png new file mode 100644 index 0000000000000000000000000000000000000000..e1498c75363ac3b63f106c31dd6445aea8f4e793 GIT binary patch literal 561 zcmV-10?z%3P)s~f#U)*(d55u8IfM+hh(>s%t)sC%Jd4wEdTCxaNRp?ms&V!w@` zHdFPx?5?hA2O#sZD8EC-zphtYN?(5wEWmR4 zeDU+I&wcYcn~(pW0Nz0>%mU~+l5T@O3Y4Ja0ZI#EQ~@lZtri8rYe3r>rQfy{S}Lp} zR@7afz29G=sy5~fvTuR~XwPKroM~oNoCkV13n)2fAxSFSJ`J9>!Pz9aATcZo)Xp_d z`#eBF1j;V3-5q3-pm*B(MyE`ofx z`3T4Yunl071z;P%CJVqefQ_60e*aHZERp%kOq?@aHwe%RDb zKhYTY*W7{0Yu}sKe}X@iPJZx@&Bo4_Xa94J1-~>O#5MWJKVO|%5F=>LI^(yIh2C$y z=Qn+u7X?4qziz|npIP@eM6P#wqrB=r8;Z>n8LSw5zcO9u?YMbA^yb|<>o(%fEmJ5s-Dh+%N%8VrpvtF@2sGn(QTwPsz{1~5N!uI=o`%;FMof3=WB z0A_5m+3TxMlG`HKPTDDiunL5~JH)ZzophUk!8?}a&%|GLJ8ooNyXPb@CKxs~f#U)*(d55u8IfM+hh(>s%t)sC%Jd4wEdTCxaNRp?ms&V!w@` zHdFPx?5?hA2O#sZD8EC-zphtYN?(5wEWmR4 zeDU+I&wcYcn~(pW0Nz0>%mU~+l5T@O3Y4Ja0ZI#EQ~@lZtri8rYe3r>rQfy{S}Lp} zR@7afz29G=sy5~fvTuR~XwPKroM~oNoCkV13n)2fAxSFSJ`J9>!Pz9aATcZo)Xp_d z`#eBF1j;V3-5q3-pm*B(MyE`ofx z`3T4Yunl071z;P%CJVqefQ_60e*aHZERp%kOq?@aHwe%RDb zKhYTY*W7{0Yu}sKe}X@iPJZx@&Bo4_Xa94J1-~>O#5MWJKVO|%5F=>LI^(yIh2C$y z=Qn+u7X?4qziz|npIP@eM6P#wqrB=r8;Z>n8LSw5zcO9u?YMbA^yb|<>o(%fEmJ5s-Dh+%N%8VrpvtF@2sGn(QTwPsz{1~5N!uI=o`%;FMof3=WB z0A_5m+3TxMlG`HKPTDDiunL5~JH)ZzophUk!8?}a&%|GLJ8ooNyXPb@CKx$i!CoR&|o^q`d|Y60KHqCV9-5nfGe;jjy@Kj`n=5xfT-s zpXH#<+SNN^bie#7oT4&!mfNHf^O+@8`&M03RQ>0B>hSdjX$S5Fh0Ga@CV33H4aayF zuwD?!cLUC! zuy|AF4#q7EQgEkqnIEW$e;`zqd%+m!I{j6TiW?=8FU2UdO!y-Gfv2MSughcccxIr3 z9pa1RHyz48ARs6Aesk^h{ihr5JdiYaa{r8F(F3*|GyT2q>`i^IJ$uQWxy1R%<=64cfMqDX;`jzfK5?9wt@4*CDs=jH8b`mh60OnM0kH`KR? zJ$NPS@J4)>z=nu(8*81!nN;$&ONcwz)t+o*=(N>t;9hW^;{nsQ*|Jr6AGpLV0;(5u SRXha72!p4qpUXO@geCxq*0!(! literal 0 HcmV?d00001 diff --git a/Resources/Textures/Buildings/low_wall.rsi/metal_6.png b/Resources/Textures/Buildings/low_wall.rsi/metal_6.png new file mode 100644 index 0000000000000000000000000000000000000000..bb544bf0cbf1c6e58addc89f30ecc1f8abf02ac1 GIT binary patch literal 435 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEV65_VaSW-L^LCbR7L%huYkYf* zs=|)`yh+|W#2inEJ`;E>$i!CoR&|o^q`d|Y60KHqCV9-5nfGe;jjy@Kj`n=5xfT-s zpXH#<+SNN^bie#7oT4&!mfNHf^O+@8`&M03RQ>0B>hSdjX$S5Fh0Ga@CV33H4aayF zuwD?!cLUC! zuy|AF4#q7EQgEkqnIEW$e;`zqd%+m!I{j6TiW?=8FU2UdO!y-Gfv2MSughcccxIr3 z9pa1RHyz48ARs6Aesk^h{ihr5JdiYaa{r8F(F3*|GyT2q>`i^IJ$uQWxy1R%*b2*^%dfL%f%- zVE7TyiD8qK{z#ngs&5vklPFt%(B}N}-81*U|Gsr*eQw+TMy3o#U&bvB%NU{@f*Eud zSlS(U)idYg@;B2Sn=gQhX*P&m5OLtn;99_H!g_&e7Md0;(!8~^=YRaq-FLr%u-da9 a8S6|B@zfP=@VE)|1%s!npUXO@geCxhMO1+R literal 0 HcmV?d00001 diff --git a/Resources/Textures/Buildings/low_wall.rsi/metal_over_0.png b/Resources/Textures/Buildings/low_wall.rsi/metal_over_0.png new file mode 100644 index 0000000000000000000000000000000000000000..0858c19f0521b74f4a058fbddc280ea48a5751bb GIT binary patch literal 96 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=>Ygr+Ar*7p9%SSN@(wNd?w`wN fz5vKX1`XxR4h{^A{hv+-f`mO?{an^LB{Ts5qcarg literal 0 HcmV?d00001 diff --git a/Resources/Textures/Buildings/low_wall.rsi/metal_over_1.png b/Resources/Textures/Buildings/low_wall.rsi/metal_over_1.png new file mode 100644 index 0000000000000000000000000000000000000000..6390841edd4bbbd3722ee80744bbcd2deaf3bb32 GIT binary patch literal 400 zcmV;B0dM|^P)=#J-cX``8&*T063ji)O@-CHWI*Iz@WLly`#PW0d;@`Pz8LX zPi8y-b$|p&05g0)>@nj3=q0E}KmyncU?TzS1+b9-_5#>Q05kk+wPMEenLR$yCqhC9 zA%qw%quc`X=f&E`%I+<*|sHTqXCJElqX2`1W{lm>@ znUYoc&QJ$f7B8U-)B)B3-n(G%9nc$19bHa;)B!>WA%qY^#odhVKbktWmsjU&$Nn10 zZAYgr+Ar*7p9%SSN@(wNd?w`wN fz5vKX1`XxR4h{^A{hv+-f`mO?{an^LB{Ts5qcarg literal 0 HcmV?d00001 diff --git a/Resources/Textures/Buildings/low_wall.rsi/metal_over_3.png b/Resources/Textures/Buildings/low_wall.rsi/metal_over_3.png new file mode 100644 index 0000000000000000000000000000000000000000..b487006f41453d651ca1753a3fcfc9feafc8ad6b GIT binary patch literal 235 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=n><|{Ln`LHz3Is3V8Fn7G3?IC zzRjyer?1lX*q1V^U1%1x*XzSFO3 z#VohryBzC^t#0Wv{%ziYrqd(lZRdKy|8o9+3pnIBpFd?Sm$@EXZuZ5|T6rrArw6@8 zTVv3e2ws5Z>Wf4mK%1ZiXs^CV-~xOQtNtg#JKhlg-vDOgv7&4S2WThYKP$;!~1r+ z;5|Ox3^U9F$fQZ8**Q=tJ`Pj?kIdjMAOhG4Od9t12c!Z-09C-};fom_fK-485CP2K zQ5Z181CU8jhJXlQC%{GouoGZ2c>zzR7x=xU-EH^S?s}zg>8@--5A# zF482^eN~`Tt^wd!*EYi6gcSjOD3$9d41OwSldG{)Xkl#rZ30Jz@-=mJch{t*2I^p)UlyT@|1xVj34ZmReO`COvmFNEBa00000 LNkvXXu0mjfMgr** literal 0 HcmV?d00001 diff --git a/Resources/Textures/Buildings/low_wall.rsi/metal_over_6.png b/Resources/Textures/Buildings/low_wall.rsi/metal_over_6.png new file mode 100644 index 0000000000000000000000000000000000000000..ff8e3ed9fffb95b7ae3b4e484ab8b84d70be2102 GIT binary patch literal 232 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=>pfi@Ln`LHy>XDU!9ajDF#OHQ z+1K)HGJ`jE#7a0nyL zc~x1#(&?+(D}3$F{7&chQPW)*@a({xTh7Vz%&aR{>J#@zuB+(igFI`^)u{Qff_Q9aLA31 ik#(p4HE>nsALO@tqowz1OK}d+%M6~belF{r5}E+mJ86&r literal 0 HcmV?d00001 diff --git a/Resources/Textures/Buildings/rwindow.rsi/meta.json b/Resources/Textures/Buildings/rwindow.rsi/meta.json new file mode 100644 index 0000000000..e45955bc22 --- /dev/null +++ b/Resources/Textures/Buildings/rwindow.rsi/meta.json @@ -0,0 +1 @@ +{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/c0293684320e7b70cbcac932b8dddeee35f3a51f/icons/obj/structures/windows.dmi", "states": [{"name": "rwindow0", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "rwindow1", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "rwindow2", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "rwindow3", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "rwindow4", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "rwindow5", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "rwindow6", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "rwindow7", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}]} \ No newline at end of file diff --git a/Resources/Textures/Buildings/rwindow.rsi/rwindow0.png b/Resources/Textures/Buildings/rwindow.rsi/rwindow0.png new file mode 100644 index 0000000000000000000000000000000000000000..e0c71ee3941da9126d1425710b522f7faf814d93 GIT binary patch literal 814 zcmV+}1JV46P)|6u@YHhZj*Wr zc=Ne$lF!kg4~6%K_;%<*VAYLYV>J8SdFwlBM|2Yw512(jH0VRI(q?6DVNg$kWHy%3 zd4Pcc#Y!99W(@$JG0Ge2Az&Q0pc!6hh8NvtO*#>%Bf!*$mitoY0{-+EFla3=25JE+ zjlShRaJ!CtGJ%8LAGD?y0<{2-9^A5RH}xUV5HiuUKpz3Ekxg3}`D6m`K2>SWbBAjt z=ueM%nr8wx0rpGNC=ea)YXQ-tfLZ{}@H$>)hyrQ>OnnH=@Y-GpB1Zw&2#_HPxX%GZ z5D}Nc0EblAj_s^2r1J`eLZMJ76pH^D>J;_f^MVNg=O3q=qjvTDYW1bCsWA16?VXq= z0Mt7J936k1)dc~}YJ;BNC-|`YOh^%^SA+G=0QJrQ(V!36)CS@)kEJLI0B6f#WHxt9 z2NTx{v*j=m!D)5qRP(=XnC}P3RvHs>T&`sc=2GbH?4F!8h~*~OdYZGG5P5OmPvwJD zCq#g0HJX&#fl(=5Dgjm^Yv?v>vyE26Xi?jgMgV_$ zj8f+UcW||h*sCIq0QqDB`=v4}KTnz3l|lg0%{&H@%dXex;rrl?_igSEnTQqw!zH#t@Fk63_Ccltxj#1ut{KCYx4bs zBePgQOq!f!#sMa$rOziev*{?jEwL@S(7>9r?!4pI?HLRLHEb#JKm{)UWfU0SFytgK zdImQ20jY(THZRfOtxZ`hd4TVL+AsG+#TEf44nge?o31>(S^Q%CJD@$;OLxwlza_UU z^HiL*{ruDWHo5QKf8g4u|I9y9J9ch)>-Z(VSqP{*?a8c3GjD!!Gxj;7&v))OZ)x`W zL~Cu+>WWI~80Y``9d&FT4Au=N9$3>Zrcp00i_>zopr0Dn!vVE_OC literal 0 HcmV?d00001 diff --git a/Resources/Textures/Buildings/rwindow.rsi/rwindow2.png b/Resources/Textures/Buildings/rwindow.rsi/rwindow2.png new file mode 100644 index 0000000000000000000000000000000000000000..e0c71ee3941da9126d1425710b522f7faf814d93 GIT binary patch literal 814 zcmV+}1JV46P)|6u@YHhZj*Wr zc=Ne$lF!kg4~6%K_;%<*VAYLYV>J8SdFwlBM|2Yw512(jH0VRI(q?6DVNg$kWHy%3 zd4Pcc#Y!99W(@$JG0Ge2Az&Q0pc!6hh8NvtO*#>%Bf!*$mitoY0{-+EFla3=25JE+ zjlShRaJ!CtGJ%8LAGD?y0<{2-9^A5RH}xUV5HiuUKpz3Ekxg3}`D6m`K2>SWbBAjt z=ueM%nr8wx0rpGNC=ea)YXQ-tfLZ{}@H$>)hyrQ>OnnH=@Y-GpB1Zw&2#_HPxX%GZ z5D}Nc0EblAj_s^2r1J`eLZMJ76pH^D>J;_f^MVNg=O3q=qjvTDYW1bCsWA16?VXq= z0Mt7J936k1)dc~}YJ;BNC-|`YOh^%^SA+G=0QJrQ(V!36)CS@)kEJLI0B6f#WHxt9 z2NTx{v*j=m!D)5qRP(=XnC}P3RvHs>T&`sc=2GbH?4F!8h~*~OdYZGG5P5OmPvwJD zCq#g0HJX&#fl(=5Dgjm^Yv?v>vyE26Xi?jgMgV_$ zj8f+UcW||h*sCIq0QqDB`=v4}KTnz3l|lg0%{&H@%dXex;rrl?_igSEnTQqw!zH#t@Fk63_Ccltxj#1ut{KCYx4bs zBePgQOq!f!#sMa$rOziev*{?jEwL@S(7>9r?!4pI?HLRLHEb#JKm{)UWfU0SFytgK zdImQ20jY(THZRfOtxZ`hd4TVL+AsG+#TEf44nge?o31>(S^Q%CJD@$;OLxwlza_UU z^HiL*{ruDWHo5QKf8g4u|I9y9J9ch)>-Z(VSqP{*?a8c3GjD!!Gxj;7&v))OZ)x`W zL~Cu+>WWI~80Y``9d&FT4Au=N9$3>Zrcp00i_>zopr0Dn!vVE_OC literal 0 HcmV?d00001 diff --git a/Resources/Textures/Buildings/rwindow.rsi/rwindow4.png b/Resources/Textures/Buildings/rwindow.rsi/rwindow4.png new file mode 100644 index 0000000000000000000000000000000000000000..5545fa5d9ea741186914f80084ed37d019cb1f39 GIT binary patch literal 489 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEVBFy8;uumf=k2V$Ud)ant>?Q0 zc%^((3S)&`rX);s%gxPkso@gT)|Nkd%1h;Zf}&DK?^=yXPGZd+AN9LEMW%SPY`j&X z^n`C-%ij3SksQT*^0RMp8uRU%uyg4m&mWiH{yyU)wDptvH1kgp+7&x0GZ`3~HgwLt z%IQAos(O}}+Izl^<1aE9%>o$TFy*)ib1=M_cis0(Wm%0#`_l9|@7UjVYCn4YQS5s9 z>qj=XkNo2Vs|#V+%^)p$K<|JX>jv%(fgr8;g*@0f4lV1IGx?RvBjhRJbxY!HyRO}$L|$)xFmCNG{`y1tRXH#U89ZJ6T-G@y GGywp2CeT0t literal 0 HcmV?d00001 diff --git a/Resources/Textures/Buildings/rwindow.rsi/rwindow5.png b/Resources/Textures/Buildings/rwindow.rsi/rwindow5.png new file mode 100644 index 0000000000000000000000000000000000000000..155e2d2a9464cbd6168cfcb4126c4215fa928ed9 GIT binary patch literal 916 zcmV;F18e+=P)+$V=|PD}B33dYUwROU=&8RTsHdKK_qoTQ7kf&H{)0jy!l0Li zh?R`NU@0Q4H640wRwydBhjHz?U8i!-x#u_C2gb(s+wc5--+OlM`Tc%p8icv}@TFP# zUR$)yv2D-Ie%$HNF}t`50LT{C@$B{m&5eCmU#8$y#x(WjgSWRPZ}I4Q$kiPDZoW*x zmxTf@hfj;yKOtt>Mz**vW?KmXByk-Bo_{u~g4khj`x|!4vG)MBAlMZNa&=7#ivV4b zAl{}699@$`E`T-pbaEOIUzECga!3WRPd?b)hsDec+Vv(%6Xfv3fP4t(F279A87wBK zU<-n)nHk&~x`9G&wr0B&*8mO(n*iIJIshP@|I1~91eQFYSlR{vOiZOPnCRs&K?Z9g zWK4>$wf2QQ6I9&`*afhAfmUpBe3rzMwSeUXX1D~c*s|+c8czhMj0H!^1G2^Sokw8} z$QfIX?Np5guEVr_J4*LaHa0tGEDfW^#yy_8*45 zK9CY|0aiaO;8aJTW}C(BJb-={5yS;R)PNb@-1Fn5!fyn-`;bmfgF^&y0ha!3VyQ+A zLHpU0J?)bA;20u@@C4;sTf*%T+Z4UR`}a0RbvK zz{0EgBJtZ`CI7E}_0V$077A;$8!6%fm>tV7!@G+r_PYA9kRN(8NdICZE z2Twkk<6}txLC@@q#{fH{!vk6*;KN3K-ZPs@2>>|P5IEHuP@$XvUQ-tWaMl{sg#es1 q1dtwpG<7WiMMfx|2ptycRQMnBD+w^A+9=Eb0000?Q0 zc%^((3S)&`rX);s%gxPkso@gT)|Nkd%1h;Zf}&DK?^=yXPGZd+AN9LEMW%SPY`j&X z^n`C-%ij3SksQT*^0RMp8uRU%uyg4m&mWiH{yyU)wDptvH1kgp+7&x0GZ`3~HgwLt z%IQAos(O}}+Izl^<1aE9%>o$TFy*)ib1=M_cis0(Wm%0#`_l9|@7UjVYCn4YQS5s9 z>qj=XkNo2Vs|#V+%^)p$K<|JX>jv%(fgr8;g*@0f4lV1IGx?RvBjhRJbxY!HyRO}$L|$)xFmCNG{`y1tRXH#U89ZJ6T-G@y GGywp2CeT0t literal 0 HcmV?d00001 diff --git a/Resources/Textures/Buildings/rwindow.rsi/rwindow7.png b/Resources/Textures/Buildings/rwindow.rsi/rwindow7.png new file mode 100644 index 0000000000000000000000000000000000000000..ce4a98b3b561868c0da72731ec40e782d6f312b6 GIT binary patch literal 324 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEVC436aSW-L^LExk!9xxL4Ej7w z-3}KRcrUPQU7*40s+-xwc8NiWNm^XTs@!#>%|_h`E|a=QdVrO>@m%G z+l!~)te+m~v)Sa1{cOH~gIY{Hk6YgE?P5?_$*rRF=0(yF=a+csI1|Ui?$I;oLLjB70BQC;#;`{;^;;1-CU0ZCw|mPFC1(TPpuyd}X4r V+qhNtD=>5zJYD@<);T3K0Ra0=bMycJ literal 0 HcmV?d00001 diff --git a/Resources/Textures/Buildings/wall.rsi/full.png b/Resources/Textures/Buildings/wall.rsi/full.png index 21a102bb3a9ddc4ca5e1e090ee56a44f4c0de0fc..ff0bdc22d76b59ebc39e05f2874a0096b919b50d 100644 GIT binary patch delta 233 zcmVg z&jC>8&wcrF*B*22vYxGc*M+gEjsXZjFm(inGeSA-8lf^0{`exy-j{2_`1Vr?i;q>$ zBcaV-3t@HIU5Elrl!@L%g;5N!7b8@$fTL(o#0oA_fHvIRgNIaL%)r#y2e%vK0GwU* jzTNh|FJ)tTDt`X~3mGbgjq8f~00000NkvXXu0mjfp4?=h delta 286 zcmV+(0pb3Q0>J{17zqdl0001UdV2JcAsB!2NkllE4B!3T3OjJbx003oTc8ZFg!okV^|NjBW!CL?T00DGTPE!Ct=GbNc z0084jL_t(Y$DP%|ZA2jq1km3CY#R7u8d#4T2zLK9<&fP=Bs@ucLwblo$mY6!)Ogi( zs$l?bt0R~WV8$6d0NAX5fU4U8JdZmo6`%m*Qvp}N(1K4y4}ZL(Kf=f@uE`W384|bv z+zO-uA%P3Ptw1Ue61V`|3SXHnhWI0oXaD z?rsJCIAP?Bq5u!F2PObqfy76DM3%K+k=}x!xMs2sX$mX~5DKIKrof^Ap+E{?3VcUs vKq!zTX$q|7Ya&))tg5Oe!w{=bQFZ(Q2>r(dANr1r#@E7w~6=?mt37?WGW(R6G>=j`A53 z&5J@jL`{Oz*~9|5i3QXKjlE4B!3T3OjJbx003oTc8ZFg!okV^|NjBW!CL?T00DGTPE!Ct=GbNc z0084jL_t(Y$DP%|ZA2jq1km3CY#R7u8d#4T2zLK9<&fP=Bs@ucLwblo$mY6!)Ogi( zs$l?bt0R~WV8$6d0NAX5fU4U8JdZmo6`%m*Qvp}N(1K4y4}ZL(Kf=f@uE`W384|bv z+zO-uA%P3Ptw1Ue61V`|3SXHnhWI0oXaD z?rsJCIAP?Bq5u!F2PObqfy76DM3%K+k=}x!xMs2sX$mX~5DKIKrof^Ap+E{?3VcUs vKq!zTX$q|7Ya&))tg5Oe!w{=bQFZ(Q2>r(dANr1r#@E7w~6=?mt37?WGW(R6G>=j`A53 z&5J@jL`{Oz*~9|5i3QXKjsrMaBi1CMC^5R zr7WOPeFCV)G|%_=l6>nGp&Om3n zU^@e5P-@>EFnE2NOaXw%FM_s*BKn)mvI0;(4zA28>nF@NfB+x~e7qc3|LfU7Bml+% gbQD$)miT@Q>`!-qk>W;(O8@`>07*qoM6N<$f^^Vb4*&oF diff --git a/Resources/Textures/Buildings/wall.rsi/solid5.png b/Resources/Textures/Buildings/wall.rsi/solid5.png index 5c69be5b4175df96870a75a5e4a6f9e25406b942..bb0d903bab91dd8670f73108a59bb4d9c7b0948d 100644 GIT binary patch delta 255 zcmV8b delta 226 zcmV<803H9E0{#JzB!3l9OjJbx003lUWO{mfiHV7zprEO#slvj-MFkIQ00001bW%=J z06^y0W&i*Hmq|oHR7l6&mf;P+5Ds3pkf0SDAx_T{|XKLCpk}=km&mN8$;LL}LCv}>XqXPmEe`zSmFs@YVH`||Bp8b@SYb57 caIe1y52#3mH|(9w0000007*qoM6N<$f)kirkN^Mx diff --git a/Resources/Textures/Buildings/wall.rsi/solid6.png b/Resources/Textures/Buildings/wall.rsi/solid6.png index 940e57145661bd0722888e88ad9c70cb20a2f342..6fc90a41545cf476416d35924a3e8f0d2f87f636 100644 GIT binary patch delta 209 zcmV;?051Q60__2iB!3T3OjJbx003oTc8ZFg!okV^|NjBW!CL?T00DGTPE!Ct=GbNc z004|hL_t(Y$L-SF4S*mF1yEK%T!7XEq;6pMpGjjSCMI|jiLb=_M>srMaBi1CMC^5R zr7WOPeFCV)G|%_=l6>nGp&Om3n zU^@e5P-@>EFnE2NOaXw%FM_s*BKn)mvI0;(4zA28>nF@NfB+x~e7qc3|LfU7Bml+% gbQD$)miT@Q>`!-qk>W;(O8@`>07*qoM6N<$f^^Vb4*&oF diff --git a/Resources/Textures/Buildings/wall.rsi/solid7.png b/Resources/Textures/Buildings/wall.rsi/solid7.png index 5ee21983bcb56f8c050271d4a5baa12656d1de03..5ad40cae4c9edfaf5cb6640cdeb622c416cdd44a 100644 GIT binary patch delta 115 zcmdnbIDv73N)Bg$Plzi61H++%C;$Kd&u~_t3&>$C3GxeOaCmkj4ahO|ba4!^IGvo( z(6lCWb(o<7^C70d3f8cNr~9~g{1|&Gcv+dWZfp|T&oHwyFC?LXB`nETnZfGwe6#i5 SC!K)?FnGH9xvX<)|Ns9VMPO@aX(*}yx{B@SW>7<5KP?Q!F92lULy@JGz(3mC z0*s?L6oJs#&^UAz817hwUjRc3HbdivOAulR&?gnrFY#|Bm>ktH3IkY@006J{w1ZO= Ry9fXP002ovPDHLkV1j>>KWzX2 diff --git a/Resources/Textures/Buildings/window.rsi/meta.json b/Resources/Textures/Buildings/window.rsi/meta.json new file mode 100644 index 0000000000..bb6a983f12 --- /dev/null +++ b/Resources/Textures/Buildings/window.rsi/meta.json @@ -0,0 +1 @@ +{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/c0293684320e7b70cbcac932b8dddeee35f3a51f/icons/obj/structures/windows.dmi", "states": [{"name": "window0", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "window1", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "window2", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "window3", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "window4", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "window5", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "window6", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "window7", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}]} \ No newline at end of file diff --git a/Resources/Textures/Buildings/window.rsi/window0.png b/Resources/Textures/Buildings/window.rsi/window0.png new file mode 100644 index 0000000000000000000000000000000000000000..bc0a3c27313769e7db8a52db9d5c04d25bedf29d GIT binary patch literal 524 zcmV+n0`vWeP)nI zzkkTN;P!mNZ`lO7roTG94;vHt9Q+HlpD`SLDs!0m@L!$)hNuQN#tcR&)&;B?A`M~- z0)Ya@Y8ez;1e`b?PF*qo*sn;bPmBKiT=l1HSNqwbp8CH3NB(YZV7kC$@{ak>-2g7d zmX}H4TdU5le;m2|x7-%}HUGtT+-Kx+;J%>2pzE-hVGBbqNHJl7cg!}70W&n#maN&m Q0T^lwp00i_>zopr0A1daApigX literal 0 HcmV?d00001 diff --git a/Resources/Textures/Buildings/window.rsi/window2.png b/Resources/Textures/Buildings/window.rsi/window2.png new file mode 100644 index 0000000000000000000000000000000000000000..bc0a3c27313769e7db8a52db9d5c04d25bedf29d GIT binary patch literal 524 zcmV+n0`vWeP)nI zzkkTN;P!mNZ`lO7roTG94;vHt9Q+HlpD`SLDs!0m@L!$)hNuQN#tcR&)&;B?A`M~- z0)Ya@Y8ez;1e`b?PF*qo*sn;bPmBKiT=l1HSNqwbp8CH3NB(YZV7kC$@{ak>-2g7d zmX}H4TdU5le;m2|x7-%}HUGtT+-Kx+;J%>2pzE-hVGBbqNHJl7cg!}70W&n#maN&m Q0T^lwp00i_>zopr0A1daApigX literal 0 HcmV?d00001 diff --git a/Resources/Textures/Buildings/window.rsi/window4.png b/Resources/Textures/Buildings/window.rsi/window4.png new file mode 100644 index 0000000000000000000000000000000000000000..f7bdfb316fb7f2ad0474947318c8f9db839f21c6 GIT binary patch literal 352 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEU{v>XaSW-L^LExku0sJ5Ztst% zB}L40WLX`#;Rn;chPx?SXXb=WzAOHLRj28uR>#5A=8no`Clk6J=*xYrQ}5ka$>07_ z`W^2b@k{c$le`ws*)4zd)jG-6JYo6#?`&(c5+YY8RQ{9?V2Els_M2fD literal 0 HcmV?d00001 diff --git a/Resources/Textures/Buildings/window.rsi/window5.png b/Resources/Textures/Buildings/window.rsi/window5.png new file mode 100644 index 0000000000000000000000000000000000000000..cb440e5fc2f8bd0d825a03d16b858869b598e51c GIT binary patch literal 516 zcmV+f0{i`mP)YU6vn?;Hwg}%uR{p9b`t~<+@&wz?&Rv`)XmkYyD#7iI68MNgbW6gyguBiejAXV4fZ_|x(R2h0LUFMmJ^|aqOSqb15p1t(e5vZ-T~@OQeEE~ zT*Xx#K-a{$dJfb9^ywqufG~<05V9OqSzuLd$Xjnl0f1BH0UTDJOXdM^%QOJ))d!3N zkdRpb5~~jw1|TJq0HjtQFbY6Y<^V{pK41`lwA6ow+PlJ!FCTkAw#nL*1D1<br;1hnMXaSW-L^LExku0sJ5Ztst% zB}L40WLX`#;Rn;chPx?SXXb=WzAOHLRj28uR>#5A=8no`Clk6J=*xYrQ}5ka$>07_ z`W^2b@k{c$le`ws*)4zd)jG-6JYo6#?`&(c5+YY8RQ{9?V2Els_M2fD literal 0 HcmV?d00001 diff --git a/Resources/Textures/Buildings/window.rsi/window7.png b/Resources/Textures/Buildings/window.rsi/window7.png new file mode 100644 index 0000000000000000000000000000000000000000..58a2d6a215bb231072067db3bdb64d49356c088b GIT binary patch literal 246 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=dp%toLn`LHz2(U3*9Q)nI?PR#5Gs$wZDJ%&*#GZW}mm8{a_!!pu51*?!c>tGe4BK zJ^jI}(I9p~#DP15YXPeX>jkD+Oc{*6j9VI(F+@281C?sxmUh1XEd9^_rpM+B2&+Xl ds*nEz^Ic)I$ztaD0e0syYDQ+EIW literal 0 HcmV?d00001