forked from space-wizards/space-station-14
-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58e91ad
commit dc900be
Showing
10 changed files
with
155 additions
and
31 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
Content.Client/SS220/CultYogg/Cultists/AcsendingVisualizerSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using Content.Shared.SS220.CultYogg.Cultists; | ||
using Robust.Client.GameObjects; | ||
|
||
namespace Content.Client.SS220.CultYogg.Cultists; | ||
|
||
/// <summary> | ||
/// </summary> | ||
public sealed class AcsendingVisualizerSystem : VisualizerSystem<AcsendingComponent> | ||
{ | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<AcsendingComponent, ComponentInit>(OnComponentInit); | ||
SubscribeLocalEvent<AcsendingComponent, ComponentShutdown>(OnShutdown); | ||
} | ||
|
||
private void OnShutdown(Entity<AcsendingComponent> uid, ref ComponentShutdown args) | ||
{ | ||
// Need LayerMapTryGet because Init fails if there's no existing sprite / appearancecomp | ||
// which means in some setups (most frequently no AppearanceComp) the layer never exists. | ||
if (TryComp<SpriteComponent>(uid, out var sprite) && | ||
sprite.LayerMapTryGet(AcsendingVisualLayers.Particles, out var layer)) | ||
{ | ||
sprite.RemoveLayer(layer); | ||
} | ||
} | ||
|
||
private void OnComponentInit(Entity<AcsendingComponent> uid, ref ComponentInit args) | ||
{ | ||
if (!TryComp<SpriteComponent>(uid, out var sprite) || !TryComp(uid, out AppearanceComponent? appearance)) | ||
return; | ||
|
||
sprite.LayerMapReserveBlank(AcsendingVisualLayers.Particles); | ||
sprite.LayerSetVisible(AcsendingVisualLayers.Particles, true); | ||
sprite.LayerSetShader(AcsendingVisualLayers.Particles, "unshaded"); | ||
|
||
if (uid.Comp.Sprite != null) | ||
{ | ||
sprite.LayerSetRSI(AcsendingVisualLayers.Particles, uid.Comp.Sprite.RsiPath); | ||
sprite.LayerSetState(AcsendingVisualLayers.Particles, uid.Comp.Sprite.RsiState); | ||
} | ||
} | ||
} | ||
|
||
public enum AcsendingVisualLayers : byte | ||
{ | ||
Particles | ||
} |
49 changes: 49 additions & 0 deletions
49
Content.Client/SS220/CultYogg/Cultists/CleansingVisualizerSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using Content.Shared.SS220.CultYogg.Cultists; | ||
using Robust.Client.GameObjects; | ||
|
||
namespace Content.Client.SS220.CultYogg.Cultists; | ||
|
||
/// <summary> | ||
/// </summary> | ||
public sealed class CleansingVisualizerSystem : VisualizerSystem<CultYoggCleansedComponent> | ||
{ | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<CultYoggCleansedComponent, ComponentInit>(OnComponentInit); | ||
SubscribeLocalEvent<CultYoggCleansedComponent, ComponentShutdown>(OnShutdown); | ||
} | ||
|
||
private void OnShutdown(Entity<CultYoggCleansedComponent> uid, ref ComponentShutdown args) | ||
{ | ||
// Need LayerMapTryGet because Init fails if there's no existing sprite / appearancecomp | ||
// which means in some setups (most frequently no AppearanceComp) the layer never exists. | ||
if (TryComp<SpriteComponent>(uid, out var sprite) && | ||
sprite.LayerMapTryGet(CleansingVisualLayers.Particles, out var layer)) | ||
{ | ||
sprite.RemoveLayer(layer); | ||
} | ||
} | ||
|
||
private void OnComponentInit(Entity<CultYoggCleansedComponent> uid, ref ComponentInit args) | ||
{ | ||
if (!TryComp<SpriteComponent>(uid, out var sprite) || !TryComp(uid, out AppearanceComponent? appearance)) | ||
return; | ||
|
||
sprite.LayerMapReserveBlank(CleansingVisualLayers.Particles); | ||
sprite.LayerSetVisible(CleansingVisualLayers.Particles, true); | ||
sprite.LayerSetShader(CleansingVisualLayers.Particles, "unshaded"); | ||
|
||
if (uid.Comp.Sprite != null) | ||
{ | ||
sprite.LayerSetRSI(CleansingVisualLayers.Particles, uid.Comp.Sprite.RsiPath); | ||
sprite.LayerSetState(CleansingVisualLayers.Particles, uid.Comp.Sprite.RsiState); | ||
} | ||
} | ||
} | ||
|
||
public enum CleansingVisualLayers : byte | ||
{ | ||
Particles | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
Resources/Prototypes/SS220/Entities/Objects/Specific/cult_yogg_cleansing.yml
This file was deleted.
Oops, something went wrong.
Binary file added
BIN
+2 KB
Resources/Textures/SS220/Effects/cult_yogg_acsending.rsi/acsendingEffect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions
48
Resources/Textures/SS220/Effects/cult_yogg_acsending.rsi/meta.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"version": 1, | ||
"license": "EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt", | ||
"copyright": "Made by AftrLite for SS220", | ||
"size": { | ||
"x": 32, | ||
"y": 32 | ||
}, | ||
"states": [ | ||
{ | ||
"name": "acsendingEffect", | ||
"delays": [ | ||
[ | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15, | ||
0.15 | ||
] | ||
] | ||
} | ||
] | ||
} |
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
}, | ||
"states": [ | ||
{ | ||
"name": "cleansing_effect", | ||
"name": "cleansingEffect", | ||
"delays": [ | ||
[ | ||
0.15, | ||
|