diff --git a/Content.Client/GameObjects/EntitySystems/MeleeWeaponSystem.cs b/Content.Client/GameObjects/EntitySystems/MeleeWeaponSystem.cs index 17dcde3023..8b95cb6405 100644 --- a/Content.Client/GameObjects/EntitySystems/MeleeWeaponSystem.cs +++ b/Content.Client/GameObjects/EntitySystems/MeleeWeaponSystem.cs @@ -50,7 +50,7 @@ namespace Content.Client.GameObjects.EntitySystems var lunge = attacker.EnsureComponent(); lunge.SetData(msg.Angle); - var entity = EntityManager.SpawnEntity("WeaponArc", attacker.Transform.GridPosition); + var entity = EntityManager.SpawnEntity(weaponArc.Prototype, attacker.Transform.GridPosition); entity.Transform.LocalRotation = msg.Angle; var weaponArcAnimation = entity.GetComponent(); diff --git a/Content.Shared/GameObjects/Components/Weapons/Melee/MeleeWeaponAnimationPrototype.cs b/Content.Shared/GameObjects/Components/Weapons/Melee/MeleeWeaponAnimationPrototype.cs index 765cb0882b..6150e3c173 100644 --- a/Content.Shared/GameObjects/Components/Weapons/Melee/MeleeWeaponAnimationPrototype.cs +++ b/Content.Shared/GameObjects/Components/Weapons/Melee/MeleeWeaponAnimationPrototype.cs @@ -10,6 +10,7 @@ namespace Content.Shared.GameObjects.Components.Weapons.Melee [Prototype("MeleeWeaponAnimation")] public sealed class MeleeWeaponAnimationPrototype : IPrototype, IIndexedPrototype { + private string _prototype; private string _state; private string _id; private Vector4 _colorDelta; @@ -18,9 +19,10 @@ namespace Content.Shared.GameObjects.Components.Weapons.Melee private float _speed; private float _width; private WeaponArcType _arcType; - + [ViewVariables] public string ID => _id; [ViewVariables] public string State => _state; + [ViewVariables] public string Prototype => _prototype; [ViewVariables] public TimeSpan Length => _length; [ViewVariables] public float Speed => _speed; [ViewVariables] public Vector4 Color => _color; @@ -32,6 +34,7 @@ namespace Content.Shared.GameObjects.Components.Weapons.Melee { var serializer = YamlObjectSerializer.NewReader(mapping); + serializer.DataField(ref _prototype, "prototype", "WeaponArc"); serializer.DataField(ref _state, "state", null); serializer.DataField(ref _id, "id", null); serializer.DataField(ref _colorDelta, "colorDelta", Vector4.Zero); diff --git a/Resources/Prototypes/Entities/Effects/weapon_arc.yml b/Resources/Prototypes/Entities/Effects/weapon_arc.yml index 28ea77f4b0..2653321b72 100644 --- a/Resources/Prototypes/Entities/Effects/weapon_arc.yml +++ b/Resources/Prototypes/Entities/Effects/weapon_arc.yml @@ -9,3 +9,10 @@ offset: 0.85, 0 drawdepth: Overlays - type: MeleeWeaponArcAnimation + +- type: entity + id: WeaponTGArc + parent: WeaponArc + components: + - type: Sprite + sprite: Effects/weapons/tg_arcs.rsi diff --git a/Resources/Prototypes/MeleeWeaponAnimations/animations.yml b/Resources/Prototypes/MeleeWeaponAnimations/animations.yml new file mode 100644 index 0000000000..168d08c3a2 --- /dev/null +++ b/Resources/Prototypes/MeleeWeaponAnimations/animations.yml @@ -0,0 +1,68 @@ +- type: MeleeWeaponAnimation + id: default + state: slash + arcType: Slash + length: 0.1 + color: 255,255,255,1020 + colorDelta: 0,0,0,-5100 + +- type: MeleeWeaponAnimation + id: bite + prototype: WeaponTGArc + state: bite + arcType: Poke + length: 0.4 + color: 255,255,255,1020 + colorDelta: 0,0,0,-5100 + +- type: MeleeWeaponAnimation + id: claw + prototype: WeaponTGArc + state: claw + arcType: Slash + length: 0.4 + color: 255,255,255,1020 + colorDelta: 0,0,0,-5100 + +- type: MeleeWeaponAnimation + id: disarm + prototype: WeaponTGArc + state: disarm + arcType: Poke + length: 0.3 + color: 255,255,255,1020 + colorDelta: 0,0,0,-5100 + +- type: MeleeWeaponAnimation + id: fist + state: fist + arcType: Poke + length: 0.15 + speed: 1 + +- type: MeleeWeaponAnimation + id: kick + prototype: WeaponTGArc + state: kick + arcType: Poke + length: 0.3 + color: 255,255,255,1020 + colorDelta: 0,0,0,-5100 + +- type: MeleeWeaponAnimation + id: punch + prototype: WeaponTGArc + state: punch + arcType: Poke + length: 0.5 + color: 255,255,255,1020 + colorDelta: 0,0,0,-5100 + +- type: MeleeWeaponAnimation + id: smash + prototype: WeaponTGArc + state: smash + arcType: Poke + length: 0.3 + color: 255,255,255,1020 + colorDelta: 0,0,0,-5100 diff --git a/Resources/Prototypes/MeleeWeaponAnimations/default.yml b/Resources/Prototypes/MeleeWeaponAnimations/default.yml deleted file mode 100644 index 0259f33948..0000000000 --- a/Resources/Prototypes/MeleeWeaponAnimations/default.yml +++ /dev/null @@ -1,14 +0,0 @@ -- type: MeleeWeaponAnimation - id: default - state: slash - arcType: Slash - length: 0.1 - color: 255,255,255,1020 - colorDelta: 0,0,0,-5100 - -- type: MeleeWeaponAnimation - id: fist - state: fist - arcType: Poke - length: 0.15 - speed: 1 diff --git a/Resources/Textures/Effects/weapons/arcs.rsi/meta.json b/Resources/Textures/Effects/weapons/arcs.rsi/meta.json index 6b8951dec8..86a1ea6013 100644 --- a/Resources/Textures/Effects/weapons/arcs.rsi/meta.json +++ b/Resources/Textures/Effects/weapons/arcs.rsi/meta.json @@ -4,7 +4,6 @@ "x": 32, "y": 32 }, - "states": [ { "name": "spear", diff --git a/Resources/Textures/Effects/weapons/tg_arcs.rsi/bite.png b/Resources/Textures/Effects/weapons/tg_arcs.rsi/bite.png new file mode 100644 index 0000000000..1826701a47 Binary files /dev/null and b/Resources/Textures/Effects/weapons/tg_arcs.rsi/bite.png differ diff --git a/Resources/Textures/Effects/weapons/tg_arcs.rsi/claw.png b/Resources/Textures/Effects/weapons/tg_arcs.rsi/claw.png new file mode 100644 index 0000000000..62e1234404 Binary files /dev/null and b/Resources/Textures/Effects/weapons/tg_arcs.rsi/claw.png differ diff --git a/Resources/Textures/Effects/weapons/tg_arcs.rsi/disarm.png b/Resources/Textures/Effects/weapons/tg_arcs.rsi/disarm.png new file mode 100644 index 0000000000..f963782898 Binary files /dev/null and b/Resources/Textures/Effects/weapons/tg_arcs.rsi/disarm.png differ diff --git a/Resources/Textures/Effects/weapons/tg_arcs.rsi/kick.png b/Resources/Textures/Effects/weapons/tg_arcs.rsi/kick.png new file mode 100644 index 0000000000..9645f8b1dd Binary files /dev/null and b/Resources/Textures/Effects/weapons/tg_arcs.rsi/kick.png differ diff --git a/Resources/Textures/Effects/weapons/tg_arcs.rsi/meta.json b/Resources/Textures/Effects/weapons/tg_arcs.rsi/meta.json new file mode 100644 index 0000000000..116f323760 --- /dev/null +++ b/Resources/Textures/Effects/weapons/tg_arcs.rsi/meta.json @@ -0,0 +1,81 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "https://github.com/tgstation/tgstation/raw/c545428822f1ee0d402b812221518632dbe198cb/icons/effects/effects.dmi", + "states": [ + { + "name": "bite", + "directions": 1, + "delays": [ + [ + 0.1, + 0.1, + 0.1, + 0.1 + ] + ] + }, + { + "name": "claw", + "directions": 1, + "delays": [ + [ + 0.1, + 0.1, + 0.1, + 0.1 + ] + ] + }, + { + "name": "disarm", + "directions": 1, + "delays": [ + [ + 0.1, + 0.1, + 0.1 + ] + ] + }, + { + "name": "kick", + "directions": 1, + "delays": [ + [ + 0.1, + 0.1, + 0.1 + ] + ] + }, + { + "name": "punch", + "directions": 1, + "delays": [ + [ + 0.1, + 0.1, + 0.1, + 0.1, + 0.1 + ] + ] + }, + { + "name": "smash", + "directions": 1, + "delays": [ + [ + 0.1, + 0.1, + 0.1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Effects/weapons/tg_arcs.rsi/punch.png b/Resources/Textures/Effects/weapons/tg_arcs.rsi/punch.png new file mode 100644 index 0000000000..a7b116ed6a Binary files /dev/null and b/Resources/Textures/Effects/weapons/tg_arcs.rsi/punch.png differ diff --git a/Resources/Textures/Effects/weapons/tg_arcs.rsi/smash.png b/Resources/Textures/Effects/weapons/tg_arcs.rsi/smash.png new file mode 100644 index 0000000000..94e259a154 Binary files /dev/null and b/Resources/Textures/Effects/weapons/tg_arcs.rsi/smash.png differ