diff --git a/Content.Client/_White/Misc/ChristmasLights/ChristmasLightsVisualiserSystem.cs b/Content.Client/_White/Misc/ChristmasLights/ChristmasLightsVisualiserSystem.cs new file mode 100644 index 0000000000..445385663b --- /dev/null +++ b/Content.Client/_White/Misc/ChristmasLights/ChristmasLightsVisualiserSystem.cs @@ -0,0 +1,267 @@ +using Content.Shared._White.Misc.ChristmasLights; +using JetBrains.Annotations; +using Microsoft.CodeAnalysis.FlowAnalysis.DataFlow; +using Robust.Client.GameObjects; +using Robust.Shared.Random; +using Robust.Shared.Reflection; +using Robust.Shared.Timing; +using Robust.Shared.Toolshed.Commands.GameTiming; +using Robust.Shared.Utility; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Configuration; + +//using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Content.Client._White.Misc.ChristmasLights; + +public sealed class ChristmasLightsVisualiserSystem : VisualizerSystem +{ + [Dependency] private readonly IGameTiming _timing = default!; + [Dependency] private readonly IRobustRandom _rng = default!; + + //[Dependency] private readonly IReflectionManager _reflection = default!; // we have reflection at home + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnInit); + //SubscribeLocalEvent(OnAppearanceChange); + + InitModes(); + } + + //protected virtual void OnAppearanceChange(EntityUid uid, T component, ref AppearanceChangeEvent args) { } + + private void OnInit(EntityUid uid, ChristmasLightsComponent comp, ComponentInit args) + { + if (!TryComp(uid, out var sprite)) + return; // anti-dumbass protection + + SetLamp1Color(sprite, comp.Color1); + SetLamp2Color(sprite, comp.Color2); + sprite.LayerSetAutoAnimated(ChristmasLightsLayers.Glow1, false); // evil grinch smile + sprite.LayerSetAutoAnimated(ChristmasLightsLayers.Glow2, false); + + //ApplyMode("always_on", comp, sprite); + + } + + + // paranoidal profiling, not for live +#if DEBUG + class circlebuf + { + public readonly int size; + public circlebuf(int size) + { + this.size = size; + buf = new double[size]; + } + public double[] buf; + int i = -1; + public double Add(double x) + { + int ind = (++i) % size; // this takes me back to the indecencies i've used to do in cpp + double val = buf[ind]; + buf[ind] = x; + return val; + } + } + // schizo rambling + circlebuf _cbuf = new(256); + [ViewVariables] + double _cumul = 0; + [ViewVariables, UsedImplicitly] // just for vv + double _averageStopwatch = 0; + [ViewVariables] + double _lastStopwatch = 0; + Stopwatch stopwatch = new(); +#endif + + + /// + /// https://www.desmos.com/calculator/ckyz8ikijz + /// Don't ask me why. I won't be able to answer. + /// + /// + /// + + private void SetLamp1Color(SpriteComponent sprite, Color c) + { + sprite.LayerSetColor(ChristmasLightsLayers.Lights1, c.WithAlpha(255)); + sprite.LayerSetColor(ChristmasLightsLayers.Glow1, c); + } + + private void SetLamp2Color(SpriteComponent sprite, Color c) + { + sprite.LayerSetColor(ChristmasLightsLayers.Lights2, c.WithAlpha(255)); + sprite.LayerSetColor(ChristmasLightsLayers.Glow2, c); + } + + private static float shitsin(float x) => (float) ((8 * MathF.Sin(x) + MathF.Sin(3 * x)) / 14 + 0.5); + //private static float shitsin(double x) => shitsin((float) x); + private static float step(float x, int stepsNum) => MathF.Round(x * stepsNum) / stepsNum; + private static int round(float x) => (int) MathF.Round(x); + private float curtime => (float) _timing.CurTime.TotalSeconds; + Color getRainbowColor(float secondsPerCycle, float hueOffset, int steps) => Color.FromHsv(new Vector4(step((curtime + hueOffset) % secondsPerCycle / secondsPerCycle, steps), 1f, 1f, 1f)); + private bool cycle(float seconds) => curtime % (seconds * 2) <= seconds; + + public override void FrameUpdate(float frameTime) { + base.FrameUpdate(frameTime); + + //float time1 = shitsin(curtime); + //float time2 = shitsin(curtime + Math.PI); + + var query = AllEntityQuery(); +#if DEBUG + stopwatch.Restart(); +#endif + while (query.MoveNext(out var comp, out var sprite)) + { + ApplyMode(comp.mode, /*time1, time2,*/ comp, sprite); + } +#if DEBUG + _lastStopwatch = stopwatch.Elapsed.TotalMilliseconds; + double shit = _cbuf.Add(_lastStopwatch); + _cumul += _lastStopwatch; + _cumul -= shit; + _averageStopwatch = _cumul / _cbuf.size; +#endif + } + + private void ApplyMode(string mode, /*float time1, float time2,*/ ChristmasLightsComponent comp, SpriteComponent sprite) + { + if (sprite.TryGetLayer(sprite.LayerMapGet(ChristmasLightsLayers.Glow1), out var layer1) && + sprite.TryGetLayer(sprite.LayerMapGet(ChristmasLightsLayers.Glow2), out var layer2)) + { + layer1.Color = comp.Color1; // in case some mode doesn't change the colors, reset them so they don't get stuck at 0 alpha or something + layer2.Color = comp.Color2; + + + if (modes.TryGetValue(mode, out var deleg)) + { + deleg(/*time1, time2,*/ layer1, layer2, comp, sprite); + //continue; + } + + } + } + + + // shit like this should be put in a shader methinks... + delegate void ModeFunc(SpriteComponent.Layer layer1, SpriteComponent.Layer layer2, ChristmasLightsComponent comp, SpriteComponent sprite); + + Dictionary modes = new(); + + private void InitModes() + { + modes["test1"] = modeTest1; + modes["test2"] = modeTest2; + modes["always_on"] = modeAlwaysOn; + modes["fade"] = modeFade; + modes["sinwave_full"] = modeSinWaveFull; + modes["sinwave_partial"] = modeSinWavePartial; + modes["sinwave_partial_rainbow"] = modeSinWavePartialRainbow; + modes["squarewave"] = modeSquareWave; + modes["squarewave_rainbow"] = modeSquareWaveRainbow; + modes["strobe_double"] = modeStrobeDouble; + modes["strobe"] = modeStrobe; + modes["strobe_slow"] = modeStrobeSlow; + modes["rainbow"] = modeRainbow; + } + + void modeTest1(SpriteComponent.Layer layer1, SpriteComponent.Layer layer2, ChristmasLightsComponent comp, SpriteComponent sprite) + { + + } + + void modeTest2(SpriteComponent.Layer layer1, SpriteComponent.Layer layer2, ChristmasLightsComponent comp, SpriteComponent sprite) + { + + } + + void modeAlwaysOn(SpriteComponent.Layer layer1, SpriteComponent.Layer layer2, ChristmasLightsComponent comp, SpriteComponent sprite) + { + layer1.AnimationFrame = 3; + layer2.AnimationFrame = 3; + } + void modeFade(SpriteComponent.Layer layer1, SpriteComponent.Layer layer2, ChristmasLightsComponent comp, SpriteComponent sprite) + { + if (cycle(2*MathF.PI)) + { + layer1.AnimationFrame = round(3 * shitsin(curtime - MathF.PI/2)); // it's important for shitsin to be equal to zero + layer2.AnimationFrame = 0; // at the beginning of sim for correct color switching. + } + else + { + layer1.AnimationFrame = 0; + layer2.AnimationFrame = round(3 * shitsin(curtime - MathF.PI/2)); + } + } + + void modeSinWaveFull(SpriteComponent.Layer layer1, SpriteComponent.Layer layer2, ChristmasLightsComponent comp, SpriteComponent sprite) + { + layer1.AnimationFrame = round(3 * shitsin(curtime)); + layer2.AnimationFrame = round(3 * shitsin(curtime + MathF.PI)); + } + + void modeSinWavePartial(SpriteComponent.Layer layer1, SpriteComponent.Layer layer2, ChristmasLightsComponent comp, SpriteComponent sprite) + { + layer1.AnimationFrame = 1 + round(2 * shitsin(1.33f * curtime)); + layer2.AnimationFrame = 1 + round(2 * shitsin(1.33f * curtime + MathF.PI)); + } + + void modeSinWavePartialRainbow(SpriteComponent.Layer layer1, SpriteComponent.Layer layer2, ChristmasLightsComponent comp, SpriteComponent sprite) + { + modeSinWavePartial(layer1, layer2, comp, sprite); + SetLamp1Color(sprite, getRainbowColor(2f, 0f, 10)); + SetLamp2Color(sprite, getRainbowColor(2f, 0.5f, 10)); + } + void modeSquareWave(SpriteComponent.Layer layer1, SpriteComponent.Layer layer2, ChristmasLightsComponent comp, SpriteComponent sprite) + { + layer1.AnimationFrame = 3 * round(shitsin(curtime)); + layer2.AnimationFrame = 3 * round(shitsin(curtime + MathF.PI)); + } + + void modeSquareWaveRainbow(SpriteComponent.Layer layer1, SpriteComponent.Layer layer2, ChristmasLightsComponent comp, SpriteComponent sprite) + { + modeSquareWave(layer1, layer2, comp, sprite); + SetLamp1Color(sprite, getRainbowColor(2f, 0f, 10)); + SetLamp2Color(sprite, getRainbowColor(2f, 0.5f, 10)); + } + + void modeStrobeDouble(SpriteComponent.Layer layer1, SpriteComponent.Layer layer2, ChristmasLightsComponent comp, SpriteComponent sprite) + { + float second = curtime % 1; + int frame = (second % 0.25) < 0.125 ? 3 : 0; + layer1.AnimationFrame = second < 0.5 ? frame : 0; + layer2.AnimationFrame = second >= 0.5 ? frame : 0; + } + + void modeStrobe(SpriteComponent.Layer layer1, SpriteComponent.Layer layer2, ChristmasLightsComponent comp, SpriteComponent sprite) + { + int frame = (curtime % 0.25) < 0.125 ? 3 : 0; + layer1.AnimationFrame = frame; + layer2.AnimationFrame = 3 - frame; + } + + void modeStrobeSlow(SpriteComponent.Layer layer1, SpriteComponent.Layer layer2, ChristmasLightsComponent comp, SpriteComponent sprite) + { + float second = curtime % 1; + layer1.AnimationFrame = second < 0.5 ? 3 : 0; + layer2.AnimationFrame = second >= 0.5 ? 3 : 0; + } + void modeRainbow(SpriteComponent.Layer layer1, SpriteComponent.Layer layer2, ChristmasLightsComponent comp, SpriteComponent sprite) + { + layer1.AnimationFrame = 3; + layer2.AnimationFrame = 3; + SetLamp1Color(sprite, getRainbowColor(2f, 0f, 10)); + SetLamp2Color(sprite, getRainbowColor(2f, 0.5f, 10)); + } +} diff --git a/Content.Server/NodeContainer/NodeGroups/BaseNodeGroup.cs b/Content.Server/NodeContainer/NodeGroups/BaseNodeGroup.cs index 1481d7b1c2..f2083a0be8 100644 --- a/Content.Server/NodeContainer/NodeGroups/BaseNodeGroup.cs +++ b/Content.Server/NodeContainer/NodeGroups/BaseNodeGroup.cs @@ -35,7 +35,7 @@ public interface INodeGroup string? GetDebugData(); } - [NodeGroup(NodeGroupID.Default, NodeGroupID.WireNet)] + [NodeGroup(NodeGroupID.Default, NodeGroupID.WireNet, NodeGroupID.ChristmasLights)] // WD EDIT [Virtual] public class BaseNodeGroup : INodeGroup { diff --git a/Content.Server/NodeContainer/NodeGroups/NodeGroupFactory.cs b/Content.Server/NodeContainer/NodeGroups/NodeGroupFactory.cs index abebfd1a90..3df5f517d3 100644 --- a/Content.Server/NodeContainer/NodeGroups/NodeGroupFactory.cs +++ b/Content.Server/NodeContainer/NodeGroups/NodeGroupFactory.cs @@ -61,7 +61,9 @@ public enum NodeGroupID : byte AMEngine, Pipe, WireNet, - + // WD EDIT START // ALSO FUCK THIS ID SHIT + ChristmasLights, + // WD EDIT END /// /// Group used by the TEG. /// diff --git a/Content.Server/_White/Misc/ChristmasLightsSystem.cs b/Content.Server/_White/Misc/ChristmasLightsSystem.cs new file mode 100644 index 0000000000..9559c9d0b8 --- /dev/null +++ b/Content.Server/_White/Misc/ChristmasLightsSystem.cs @@ -0,0 +1,96 @@ +using Content.Server.NodeContainer; +using Content.Server.NodeContainer.EntitySystems; +using Content.Server.NodeContainer.NodeGroups; +using Content.Server.NodeContainer.Nodes; +using Content.Shared._White.Misc.ChristmasLights; +using Content.Shared.Interaction; +using Robust.Shared.Map.Components; +using Robust.Shared.Utility; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Content.Server._White.Misc; + + +public sealed class ChristmasLightsSystem : EntitySystem +{ + [Dependency] private readonly NodeGroupSystem _node = default!; + + public override void Initialize() + { + SubscribeLocalEvent(OnChristmasLightsActivate); + SubscribeLocalEvent(OnChristmasLightsInit); + + } + + private void OnChristmasLightsInit(EntityUid uid, ChristmasLightsComponent comp, ComponentInit args) + { + if(TryComp(uid, out var cont)) + { + if(cont.Nodes.TryGetValue("christmaslight", out var node)) + _node.QueueReflood(node); + } + } + + + private void OnChristmasLightsActivate(EntityUid uid, ChristmasLightsComponent comp, ActivateInWorldEvent args) + { + if(TryComp(uid, out var cont) && cont.Nodes.TryGetValue("christmaslight", out var node) && node.NodeGroup is not null){ + var thisProt = MetaData(uid).EntityPrototype; + foreach(var n in node.NodeGroup.Nodes) + { + if(TryComp(n.Owner, out var jolly)) + { + if (MetaData(n.Owner).EntityPrototype != thisProt) + continue; + int i = jolly.modes.IndexOf(jolly.mode); + jolly.mode = jolly.modes[(i + 1) % jolly.modes.Count]; + Dirty(jolly.Owner, jolly); + } + } + } + } +} + + +public sealed partial class SamePrototypeAdjacentNode : Node +{ + [ViewVariables] + public string OwnerPrototypeID = default!; + + public override void Initialize(EntityUid owner, IEntityManager entMan) + { + base.Initialize(owner, entMan); + + + if (String.IsNullOrEmpty(OwnerPrototypeID)) + { + var prot = entMan.GetComponent(owner).EntityPrototype; + DebugTools.Assert(prot is not null, "SamePrototypeAdjacentNode used on an entity with no EntityPrototype specified in metadata. Please reconsider your life choices that have lead you to this point."); + OwnerPrototypeID = prot.ID; + + } + } + public override IEnumerable GetReachableNodes(TransformComponent xform, + EntityQuery nodeQuery, + EntityQuery xformQuery, + MapGridComponent? grid, + IEntityManager entMan) + { + if (!xform.Anchored || grid == null) + yield break; + + var gridIndex = grid.TileIndicesFor(xform.Coordinates); + + foreach (var (_, node) in NodeHelpers.GetCardinalNeighborNodes(nodeQuery, grid, gridIndex)) + { + if (node is SamePrototypeAdjacentNode spaNode && + spaNode != this && + spaNode.OwnerPrototypeID == this.OwnerPrototypeID) + yield return node; + } + } +} diff --git a/Content.Shared/_White/Misc/ChristmasLights/ChristmasLightsComponent.cs b/Content.Shared/_White/Misc/ChristmasLights/ChristmasLightsComponent.cs new file mode 100644 index 0000000000..21ab43b66c --- /dev/null +++ b/Content.Shared/_White/Misc/ChristmasLights/ChristmasLightsComponent.cs @@ -0,0 +1,48 @@ +using Robust.Shared.GameStates; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Content.Shared._White.Misc.ChristmasLights; + +[RegisterComponent, AutoGenerateComponentState, NetworkedComponent] +public sealed partial class ChristmasLightsComponent : Component +{ + [DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField] + public Color Color1 = new Color(255, 0, 0); + [DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField] + public Color Color2 = new Color(0, 0, 255); + + /// + /// Consult for available modes. + /// + [DataField, AutoNetworkedField] + public string mode = "always_on"; + + [DataField, AutoNetworkedField] + public List modes = new List + { + "always_on", + //"sinwave_full", + //"sinwave_partial", + //"sinwave_partial_rainbow", + //"rainbow", + //"strobe_double", + //"strobe", + //"strobe_slow", + }; + +} + + + +public enum ChristmasLightsLayers +{ + Base, + Lights1, + Lights2, + Glow1, + Glow2 +} diff --git a/Resources/Prototypes/_White/Entities/Structures/Wallmounts/christmaslights.yml b/Resources/Prototypes/_White/Entities/Structures/Wallmounts/christmaslights.yml new file mode 100644 index 0000000000..862f2b19e3 --- /dev/null +++ b/Resources/Prototypes/_White/Entities/Structures/Wallmounts/christmaslights.yml @@ -0,0 +1,120 @@ +- type: entity + parent: BaseSign + id: BaseChristmasLights + name: christmas lights + description: Merry Christmas! These lights are powered by the crew jollyness and christmas spirit! Also has a miniature backup fusion reactor, just in case. + abstract: true + components: + - type: Transform + anchored: true # basesign is static instead of being anchored, for some reason. + - type: WallMount + arc: 360 + - type: Construction + graph: RainbowChristmasDisassembly + node: start + - type: Sprite + noRot: false + drawdepth: WallTops + sprite: _White/Objects/Decoration/Christmas/fairylights.rsi + layers: + - state: base + map: ["enum.ChristmasLightsLayers.Base"] + - state: greyscale_first + map: ["enum.ChristmasLightsLayers.Lights1"] + - state: greyscale_second + map: ["enum.ChristmasLightsLayers.Lights2"] + - state: greyscale_first_glow + map: ["enum.ChristmasLightsLayers.Glow1"] + shader: unshaded + - state: greyscale_second_glow + map: ["enum.ChristmasLightsLayers.Glow2"] + shader: unshaded + - type: ChristmasLights + color1: "#FFFFFF" + color2: "#FFFFFF" + mode: always_on + modes: + - always_on + #- sinwave_full + #- sinwave_partial + #- sinwave_partial_rainbow + #- strobe_double + #- strobe + #- strobe_slow + #- rainbow + - type: NodeContainer + nodes: + christmaslight: + !type:SamePrototypeAdjacentNode + nodeGroupID: ChristmasLights + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 15 + behaviors: + - !type:PlaySoundBehavior + sound: + path: /Audio/Effects/poster_broken.ogg + - !type:DoActsBehavior + acts: [ "Destruction" ] + - !type:SpawnEntitiesBehavior + spawn: + PosterBroken: + min: 1 + max: 1 + offset: 0 + + +- type: entity + parent: BaseChristmasLights + id: SimpleChristmasLights + abstract: true + components: + - type: ChristmasLights + mode: always_on + modes: + - always_on + - fade + - sinwave_full + - sinwave_partial + - squarewave + - strobe_double + - strobe + - strobe_slow + +- type: entity + parent: SimpleChristmasLights + id: RedBlueChristmasLights + components: + - type: ChristmasLights + color1: "#FF0000" + color2: "#0000FF" + +- type: entity + parent: SimpleChristmasLights + id: YellowCyanChristmasLights + components: + - type: ChristmasLights + color1: "#FFFF00" + color2: "#00FFFF" + +- type: entity + parent: SimpleChristmasLights + id: PurpleGreenChristmasLights + components: + - type: ChristmasLights + color1: "#FF00FF" + color2: "#00FF00" + + +- type: entity + parent: BaseChristmasLights + id: RainbowChristmasLights + components: + - type: ChristmasLights + mode: rainbow + modes: + - rainbow + - sinwave_partial_rainbow + - squarewave_rainbow diff --git a/Resources/Prototypes/_White/Recipes/Construction/Graphs/structures/christmaslights.yml b/Resources/Prototypes/_White/Recipes/Construction/Graphs/structures/christmaslights.yml new file mode 100644 index 0000000000..1d81b1f633 --- /dev/null +++ b/Resources/Prototypes/_White/Recipes/Construction/Graphs/structures/christmaslights.yml @@ -0,0 +1,107 @@ +- type: constructionGraph + id: RedBlueChristmasLights + start: start + graph: + - node: start + edges: + - to: ChristmasLightsFull + steps: + - material: Cable + amount: 1 + doAfter: 0.5 + - node: ChristmasLightsFull + entity: RedBlueChristmasLights + edges: + - to: start + completed: + - !type:SpawnPrototype + prototype: Cable + amount: 1 #returns 1 less as one breaks + - !type:DeleteEntity {} + steps: + - tool: Cutting + +- type: constructionGraph + id: YellowCyanChristmasLights + start: start + graph: + - node: start + edges: + - to: ChristmasLightsFull + steps: + - material: Cable + amount: 1 + doAfter: 0.5 + - node: ChristmasLightsFull + entity: YellowCyanChristmasLights + edges: + - to: start + completed: + - !type:SpawnPrototype + prototype: Cable + amount: 1 #returns 1 less as one breaks + - !type:DeleteEntity {} + steps: + - tool: Cutting + +- type: constructionGraph + id: PurpleGreenChristmasLights + start: start + graph: + - node: start + edges: + - to: ChristmasLightsFull + steps: + - material: Cable + amount: 1 + doAfter: 0.5 + - node: ChristmasLightsFull + entity: PurpleGreenChristmasLights + edges: + - to: start + completed: + - !type:SpawnPrototype + prototype: Cable + amount: 1 #returns 1 less as one breaks + - !type:DeleteEntity {} + steps: + - tool: Cutting + +- type: constructionGraph + id: RainbowChristmasLights + start: start + graph: + - node: start + edges: + - to: ChristmasLightsFull + steps: + - material: Cable + amount: 1 + doAfter: 0.5 + - node: ChristmasLightsFull + entity: RainbowChristmasLights + edges: + - to: start + completed: + - !type:SpawnPrototype + prototype: Cable + amount: 1 + - !type:DeleteEntity {} + steps: + - tool: Cutting + +- type: constructionGraph # specified in BaseChristmasLights since it's the same for all children christmas lights. I wish generic graphs were a thing. + id: RainbowChristmasDisassembly + start: start + graph: + - node: start + edges: + - to: ass + steps: + - tool: Cutting + completed: + - !type:SpawnPrototype + prototype: CableApcStack1 + amount: 1 + - !type:DeleteEntity {} + - node: ass # doesn't matter \ No newline at end of file diff --git a/Resources/Prototypes/_White/Recipes/Construction/christmaslights.yml b/Resources/Prototypes/_White/Recipes/Construction/christmaslights.yml new file mode 100644 index 0000000000..566c33d09b --- /dev/null +++ b/Resources/Prototypes/_White/Recipes/Construction/christmaslights.yml @@ -0,0 +1,56 @@ + +- type: construction + name: Red-blue christmas lights + id: RedBlueChristmasLights + graph: RedBlueChristmasLights + startNode: start + targetNode: ChristmasLightsFull + category: construction-category-structures + description: An improvised barricade made out of wooden planks. + icon: + sprite: _White/Objects/Decoration/Christmas/fairylights.rsi + state: base + objectType: Structure + placementMode: SnapgridCenter + +- type: construction + name: Yellow-cyan christmas lights + id: YellowCyanChristmasLights + graph: YellowCyanChristmasLights + startNode: start + targetNode: ChristmasLightsFull + category: construction-category-structures + description: An improvised barricade made out of wooden planks. + icon: + sprite: _White/Objects/Decoration/Christmas/fairylights.rsi + state: base + objectType: Structure + placementMode: SnapgridCenter + +- type: construction + name: Purple-green christmas lights + id: PurpleGreenChristmasLights + graph: PurpleGreenChristmasLights + startNode: start + targetNode: ChristmasLightsFull + category: construction-category-structures + description: An improvised barricade made out of wooden planks. + icon: + sprite: _White/Objects/Decoration/Christmas/fairylights.rsi + state: base + objectType: Structure + placementMode: SnapgridCenter + +- type: construction + name: Rainbow christmas lights + id: RainbowChristmasLights + graph: RainbowChristmasLights + startNode: start + targetNode: ChristmasLightsFull + category: construction-category-structures + description: An improvised barricade made out of wooden planks. + icon: + sprite: _White/Objects/Decoration/Christmas/fairylights.rsi + state: base + objectType: Structure + placementMode: SnapgridCenter diff --git a/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/_greyscale_first_glow.png b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/_greyscale_first_glow.png new file mode 100644 index 0000000000..319941a81e Binary files /dev/null and b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/_greyscale_first_glow.png differ diff --git a/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/_greyscale_second_glow.png b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/_greyscale_second_glow.png new file mode 100644 index 0000000000..a285022021 Binary files /dev/null and b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/_greyscale_second_glow.png differ diff --git a/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/base.png b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/base.png new file mode 100644 index 0000000000..2b285ca35c Binary files /dev/null and b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/base.png differ diff --git a/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/blue_red.png b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/blue_red.png new file mode 100644 index 0000000000..aba846bb67 Binary files /dev/null and b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/blue_red.png differ diff --git a/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/blue_red_glow.png b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/blue_red_glow.png new file mode 100644 index 0000000000..a3831a9a38 Binary files /dev/null and b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/blue_red_glow.png differ diff --git a/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/greyscale_first.png b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/greyscale_first.png new file mode 100644 index 0000000000..0de0413c6d Binary files /dev/null and b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/greyscale_first.png differ diff --git a/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/greyscale_first_glow.png b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/greyscale_first_glow.png new file mode 100644 index 0000000000..b40d84f480 Binary files /dev/null and b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/greyscale_first_glow.png differ diff --git a/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/greyscale_second.png b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/greyscale_second.png new file mode 100644 index 0000000000..fcf6553e5f Binary files /dev/null and b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/greyscale_second.png differ diff --git a/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/greyscale_second_glow.png b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/greyscale_second_glow.png new file mode 100644 index 0000000000..87e28791d1 Binary files /dev/null and b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/greyscale_second_glow.png differ diff --git a/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/meta.json b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/meta.json new file mode 100644 index 0000000000..81a394ff23 --- /dev/null +++ b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/meta.json @@ -0,0 +1,128 @@ +{ + "version": 1, + "license": "CC-BY-SA-4.0", + "copyright": "Made by rybbinka and edited by Gersoon", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "base" + }, + { + "name": "blue_red" + }, + { + "name": "yellow_green" + }, + { + "name": "greyscale_first" + }, + { + "name": "greyscale_second" + }, + { + "name": "blue_red_glow", + "delays": [ + [ + 0.25, + 0.15, + 0.15, + 0.25, + 0.15, + 0.15, + 0.25, + 0.15, + 0.15, + 0.25, + 0.15, + 0.15 + ] + ] + }, + { + "name": "yellow_green_glow", + "delays": [ + [ + 0.25, + 0.15, + 0.15, + 0.25, + 0.15, + 0.15, + 0.25, + 0.15, + 0.15, + 0.25, + 0.15, + 0.15 + ] + ] + }, + { + "name": "_greyscale_first_glow", + "delays": [ + [ + 0.25, + 0.15, + 0.15, + 0.25, + 0.15, + 0.15, + 0.25, + 0.15, + 0.15, + 0.25, + 0.15, + 0.15 + ] + ] + }, + { + "name": "_greyscale_second_glow", + "delays": [ + [ + 0.25, + 0.15, + 0.15, + 0.25, + 0.15, + 0.15, + 0.25, + 0.15, + 0.15, + 0.25, + 0.15, + 0.15 + ] + ] + }, + { + "name": "greyscale_first_glow", + "delays": [ + [ + 0.25, + 0.15, + 0.15, + 0.25, + 0.15, + 0.15 + ] + ] + }, + { + "name": "greyscale_second_glow", + "delays": [ + [ + 0.25, + 0.15, + 0.15, + 0.25, + 0.15, + 0.15 + ] + ] + } + ] +} diff --git a/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/yellow_green.png b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/yellow_green.png new file mode 100644 index 0000000000..bf47a97a93 Binary files /dev/null and b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/yellow_green.png differ diff --git a/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/yellow_green_glow.png b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/yellow_green_glow.png new file mode 100644 index 0000000000..c4bbb810c8 Binary files /dev/null and b/Resources/Textures/_White/Objects/Decoration/Christmas/fairylights.rsi/yellow_green_glow.png differ