diff --git a/Content.Client/White/CustomGhostSpriteSystem/CustomGhostVisualizer.cs b/Content.Client/White/CustomGhostSpriteSystem/CustomGhostVisualizer.cs index 801434956b..16d3e75e0e 100644 --- a/Content.Client/White/CustomGhostSpriteSystem/CustomGhostVisualizer.cs +++ b/Content.Client/White/CustomGhostSpriteSystem/CustomGhostVisualizer.cs @@ -21,5 +21,10 @@ public sealed class CustomGhostVisualizer : VisualizerSystem { args.Sprite.Color = args.Sprite.Color.WithAlpha(alpha); } + + if (AppearanceSystem.TryGetData(uid, CustomGhostAppearance.SizeOverride, out var size, args.Component)) + { + args.Sprite.Scale = size; + } } } diff --git a/Content.Server/White/CustomGhostSpriteSystem/CustomGhostSpriteSystem.cs b/Content.Server/White/CustomGhostSpriteSystem/CustomGhostSpriteSystem.cs index d9bc90fd92..eda944c86c 100644 --- a/Content.Server/White/CustomGhostSpriteSystem/CustomGhostSpriteSystem.cs +++ b/Content.Server/White/CustomGhostSpriteSystem/CustomGhostSpriteSystem.cs @@ -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; } diff --git a/Content.Shared/White/CustomGhostSystem/CustomGhostPrototype.cs b/Content.Shared/White/CustomGhostSystem/CustomGhostPrototype.cs index 67921d5742..c21513c12a 100644 --- a/Content.Shared/White/CustomGhostSystem/CustomGhostPrototype.cs +++ b/Content.Shared/White/CustomGhostSystem/CustomGhostPrototype.cs @@ -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 } diff --git a/Resources/Prototypes/White/Ghosts/custom_ghosts.yml b/Resources/Prototypes/White/Ghosts/custom_ghosts.yml index c4259f7799..2e9d8f8a09 100644 --- a/Resources/Prototypes/White/Ghosts/custom_ghosts.yml +++ b/Resources/Prototypes/White/Ghosts/custom_ghosts.yml @@ -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 diff --git a/Resources/Textures/White/Ghosts/reider207-ghost.rsi/animated.png b/Resources/Textures/White/Ghosts/reider207-ghost.rsi/animated.png new file mode 100644 index 0000000000..9320e10a52 Binary files /dev/null and b/Resources/Textures/White/Ghosts/reider207-ghost.rsi/animated.png differ diff --git a/Resources/Textures/White/Ghosts/reider207-ghost.rsi/meta.json b/Resources/Textures/White/Ghosts/reider207-ghost.rsi/meta.json new file mode 100644 index 0000000000..f67bc341e5 --- /dev/null +++ b/Resources/Textures/White/Ghosts/reider207-ghost.rsi/meta.json @@ -0,0 +1,15 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "reider207", + "size": { + "x": 64, + "y": 64 + }, + "states": [ + { + "name": "animated", + "directions": 4 + } + ] +}