master
This commit is contained in:
7
Content.Client/_White/Cult/HellComponent.cs
Normal file
7
Content.Client/_White/Cult/HellComponent.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
using Content.Shared._White.Cult.Pentagram;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Client._White.Cult;
|
||||
|
||||
[NetworkedComponent, RegisterComponent]
|
||||
public sealed partial class HellComponent : SharedHellComponent;
|
||||
50
Content.Client/_White/Cult/HellSystem.cs
Normal file
50
Content.Client/_White/Cult/HellSystem.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System.Numerics;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Client._White.Cult;
|
||||
|
||||
public sealed class HellSystem : EntitySystem
|
||||
{
|
||||
private const string Rsi = "White/Cult/hell.rsi";
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<HellComponent, ComponentStartup>(PentagramAdded);
|
||||
SubscribeLocalEvent<HellComponent, ComponentShutdown>(PentagramRemoved);
|
||||
}
|
||||
|
||||
private void PentagramAdded(EntityUid uid, HellComponent component, ComponentStartup args)
|
||||
{
|
||||
if (!TryComp<SpriteComponent>(uid, out var sprite))
|
||||
return;
|
||||
|
||||
if (sprite.LayerMapTryGet(HellKey.Key, out _))
|
||||
return;
|
||||
|
||||
var adj = sprite.Bounds.Height / 2 + 1.0f/32 * 6.0f;
|
||||
|
||||
var layer = sprite.AddLayer(new SpriteSpecifier.Rsi(new ResPath(Rsi), "animated"));
|
||||
|
||||
sprite.LayerMapSet(HellKey.Key, layer);
|
||||
sprite.LayerSetOffset(layer, new Vector2(0.0f, adj));
|
||||
sprite.LayerSetShader(layer, "unshaded");
|
||||
}
|
||||
|
||||
private void PentagramRemoved(EntityUid uid, HellComponent component, ComponentShutdown args)
|
||||
{
|
||||
if (!TryComp<SpriteComponent>(uid, out var sprite))
|
||||
return;
|
||||
|
||||
if (!sprite.LayerMapTryGet(HellKey.Key, out var layer))
|
||||
return;
|
||||
|
||||
sprite.RemoveLayer(layer);
|
||||
}
|
||||
|
||||
private enum HellKey
|
||||
{
|
||||
Key
|
||||
}
|
||||
}
|
||||
7
Content.Server/_White/Cult/HellComponent.cs
Normal file
7
Content.Server/_White/Cult/HellComponent.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
using Content.Shared._White.Cult.Pentagram;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Server._White.Cult;
|
||||
|
||||
[NetworkedComponent, RegisterComponent]
|
||||
public sealed partial class HellComponent : SharedHellComponent;
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace Content.Shared._White.Cult.Pentagram;
|
||||
|
||||
public abstract partial class SharedHellComponent : Component;
|
||||
@@ -23,3 +23,10 @@
|
||||
description: trait-southern-desc
|
||||
components:
|
||||
- type: SouthernAccent
|
||||
|
||||
- type: trait
|
||||
id: Hell
|
||||
name: Hell
|
||||
description: Hell
|
||||
components:
|
||||
- type: Hell
|
||||
|
||||
@@ -284,3 +284,9 @@
|
||||
entity: ClothingOuterParamedicSuitFluff
|
||||
sponsorOnly: true
|
||||
whitelistJobs: [Paramedic]
|
||||
|
||||
- type: loadout
|
||||
id: CargoLoadoutSerbwoSA
|
||||
entity: HandTeleporter
|
||||
sponsorOnly: true
|
||||
whitelistJobs: [Quartermaster, SalvageSpecialist, CargoTechnician]
|
||||
|
||||
BIN
Resources/Textures/White/Cult/hell.rsi/animated.png
Normal file
BIN
Resources/Textures/White/Cult/hell.rsi/animated.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 831 B |
25
Resources/Textures/White/Cult/hell.rsi/meta.json
Normal file
25
Resources/Textures/White/Cult/hell.rsi/meta.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"license": "CC-BY-SA-3.0",
|
||||
"copyright": "https://github.com/frosty-dev/white",
|
||||
"version": 1,
|
||||
"size": {
|
||||
"x": 32,
|
||||
"y": 64
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "animated",
|
||||
"delays": [
|
||||
[
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user