[SHEKELS]reider207 ghost
This commit is contained in:
@@ -21,5 +21,10 @@ public sealed class CustomGhostVisualizer : VisualizerSystem<GhostComponent>
|
||||
{
|
||||
args.Sprite.Color = args.Sprite.Color.WithAlpha(alpha);
|
||||
}
|
||||
|
||||
if (AppearanceSystem.TryGetData<Vector2>(uid, CustomGhostAppearance.SizeOverride, out var size, args.Component))
|
||||
{
|
||||
args.Sprite.Scale = size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ public sealed class CustomGhostSpriteSystem : EntitySystem
|
||||
if (string.Equals(customGhostPrototype.Ckey, ckey, StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
_appearanceSystem.SetData(ghostUid, CustomGhostAppearance.Sprite, customGhostPrototype.CustomSpritePath.ToString());
|
||||
_appearanceSystem.SetData(ghostUid, CustomGhostAppearance.SizeOverride, customGhostPrototype.SizeOverride);
|
||||
|
||||
if(customGhostPrototype.AlphaOverride > 0)
|
||||
{
|
||||
@@ -56,6 +57,9 @@ public sealed class CustomGhostSpriteSystem : EntitySystem
|
||||
_metaData.SetEntityDescription(ghostUid, customGhostPrototype.GhostDescription);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,11 +28,15 @@ public sealed class CustomGhostPrototype : IPrototype
|
||||
|
||||
[DataField("ghostDescription")]
|
||||
public string GhostDescription = string.Empty;
|
||||
|
||||
[DataField("size")]
|
||||
public Vector2 SizeOverride = Vector2.One;
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum CustomGhostAppearance
|
||||
{
|
||||
Sprite,
|
||||
AlphaOverride
|
||||
AlphaOverride,
|
||||
SizeOverride
|
||||
}
|
||||
|
||||
@@ -54,3 +54,13 @@
|
||||
alpha: 0.8
|
||||
ghostName: Фырчало
|
||||
ghostDescription: Инженерный борг
|
||||
|
||||
#reider207
|
||||
- type: customGhost
|
||||
id: reider207-ghost
|
||||
ckey: reider207
|
||||
sprite: White/Ghosts/reider207-ghost.rsi
|
||||
alpha: 0.8
|
||||
ghostName: Гань Юй
|
||||
ghostDescription: Священная Крио Лань
|
||||
size: 0.8, 0.8
|
||||
|
||||
BIN
Resources/Textures/White/Ghosts/reider207-ghost.rsi/animated.png
Normal file
BIN
Resources/Textures/White/Ghosts/reider207-ghost.rsi/animated.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"version": 1,
|
||||
"license": "CC-BY-SA-3.0",
|
||||
"copyright": "reider207",
|
||||
"size": {
|
||||
"x": 64,
|
||||
"y": 64
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "animated",
|
||||
"directions": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user