Address comments
Split out TG arcs into its own thing.
@@ -50,7 +50,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
|||||||
var lunge = attacker.EnsureComponent<MeleeLungeComponent>();
|
var lunge = attacker.EnsureComponent<MeleeLungeComponent>();
|
||||||
lunge.SetData(msg.Angle);
|
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;
|
entity.Transform.LocalRotation = msg.Angle;
|
||||||
|
|
||||||
var weaponArcAnimation = entity.GetComponent<MeleeWeaponArcAnimationComponent>();
|
var weaponArcAnimation = entity.GetComponent<MeleeWeaponArcAnimationComponent>();
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ namespace Content.Shared.GameObjects.Components.Weapons.Melee
|
|||||||
[Prototype("MeleeWeaponAnimation")]
|
[Prototype("MeleeWeaponAnimation")]
|
||||||
public sealed class MeleeWeaponAnimationPrototype : IPrototype, IIndexedPrototype
|
public sealed class MeleeWeaponAnimationPrototype : IPrototype, IIndexedPrototype
|
||||||
{
|
{
|
||||||
|
private string _prototype;
|
||||||
private string _state;
|
private string _state;
|
||||||
private string _id;
|
private string _id;
|
||||||
private Vector4 _colorDelta;
|
private Vector4 _colorDelta;
|
||||||
@@ -18,9 +19,10 @@ namespace Content.Shared.GameObjects.Components.Weapons.Melee
|
|||||||
private float _speed;
|
private float _speed;
|
||||||
private float _width;
|
private float _width;
|
||||||
private WeaponArcType _arcType;
|
private WeaponArcType _arcType;
|
||||||
|
|
||||||
[ViewVariables] public string ID => _id;
|
[ViewVariables] public string ID => _id;
|
||||||
[ViewVariables] public string State => _state;
|
[ViewVariables] public string State => _state;
|
||||||
|
[ViewVariables] public string Prototype => _prototype;
|
||||||
[ViewVariables] public TimeSpan Length => _length;
|
[ViewVariables] public TimeSpan Length => _length;
|
||||||
[ViewVariables] public float Speed => _speed;
|
[ViewVariables] public float Speed => _speed;
|
||||||
[ViewVariables] public Vector4 Color => _color;
|
[ViewVariables] public Vector4 Color => _color;
|
||||||
@@ -32,6 +34,7 @@ namespace Content.Shared.GameObjects.Components.Weapons.Melee
|
|||||||
{
|
{
|
||||||
var serializer = YamlObjectSerializer.NewReader(mapping);
|
var serializer = YamlObjectSerializer.NewReader(mapping);
|
||||||
|
|
||||||
|
serializer.DataField(ref _prototype, "prototype", "WeaponArc");
|
||||||
serializer.DataField(ref _state, "state", null);
|
serializer.DataField(ref _state, "state", null);
|
||||||
serializer.DataField(ref _id, "id", null);
|
serializer.DataField(ref _id, "id", null);
|
||||||
serializer.DataField(ref _colorDelta, "colorDelta", Vector4.Zero);
|
serializer.DataField(ref _colorDelta, "colorDelta", Vector4.Zero);
|
||||||
|
|||||||
@@ -9,3 +9,15 @@
|
|||||||
offset: 0.85, 0
|
offset: 0.85, 0
|
||||||
drawdepth: Overlays
|
drawdepth: Overlays
|
||||||
- type: MeleeWeaponArcAnimation
|
- type: MeleeWeaponArcAnimation
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: WeaponTGArc
|
||||||
|
save: false
|
||||||
|
abstract: true
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Effects/weapons/tg_arcs.rsi
|
||||||
|
directional: false
|
||||||
|
offset: 0.85, 0
|
||||||
|
drawdepth: Overlays
|
||||||
|
- type: MeleeWeaponArcAnimation
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
colorDelta: 0,0,0,-5100
|
colorDelta: 0,0,0,-5100
|
||||||
|
|
||||||
- type: MeleeWeaponAnimation
|
- type: MeleeWeaponAnimation
|
||||||
id: Bite
|
id: bite
|
||||||
|
prototype: WeaponTGArc
|
||||||
state: bite
|
state: bite
|
||||||
arcType: Poke
|
arcType: Poke
|
||||||
length: 0.4
|
length: 0.4
|
||||||
@@ -15,7 +16,8 @@
|
|||||||
colorDelta: 0,0,0,-5100
|
colorDelta: 0,0,0,-5100
|
||||||
|
|
||||||
- type: MeleeWeaponAnimation
|
- type: MeleeWeaponAnimation
|
||||||
id: Claw
|
id: claw
|
||||||
|
prototype: WeaponTGArc
|
||||||
state: claw
|
state: claw
|
||||||
arcType: Slash
|
arcType: Slash
|
||||||
length: 0.4
|
length: 0.4
|
||||||
@@ -23,7 +25,8 @@
|
|||||||
colorDelta: 0,0,0,-5100
|
colorDelta: 0,0,0,-5100
|
||||||
|
|
||||||
- type: MeleeWeaponAnimation
|
- type: MeleeWeaponAnimation
|
||||||
id: Disarm
|
id: disarm
|
||||||
|
prototype: WeaponTGArc
|
||||||
state: disarm
|
state: disarm
|
||||||
arcType: Poke
|
arcType: Poke
|
||||||
length: 0.3
|
length: 0.3
|
||||||
@@ -31,7 +34,15 @@
|
|||||||
colorDelta: 0,0,0,-5100
|
colorDelta: 0,0,0,-5100
|
||||||
|
|
||||||
- type: MeleeWeaponAnimation
|
- type: MeleeWeaponAnimation
|
||||||
id: Kick
|
id: fist
|
||||||
|
state: fist
|
||||||
|
arcType: Poke
|
||||||
|
length: 0.15
|
||||||
|
speed: 1
|
||||||
|
|
||||||
|
- type: MeleeWeaponAnimation
|
||||||
|
id: kick
|
||||||
|
prototype: WeaponTGArc
|
||||||
state: kick
|
state: kick
|
||||||
arcType: Poke
|
arcType: Poke
|
||||||
length: 0.3
|
length: 0.3
|
||||||
@@ -39,7 +50,8 @@
|
|||||||
colorDelta: 0,0,0,-5100
|
colorDelta: 0,0,0,-5100
|
||||||
|
|
||||||
- type: MeleeWeaponAnimation
|
- type: MeleeWeaponAnimation
|
||||||
id: Punch
|
id: punch
|
||||||
|
prototype: WeaponTGArc
|
||||||
state: punch
|
state: punch
|
||||||
arcType: Poke
|
arcType: Poke
|
||||||
length: 0.5
|
length: 0.5
|
||||||
@@ -47,7 +59,8 @@
|
|||||||
colorDelta: 0,0,0,-5100
|
colorDelta: 0,0,0,-5100
|
||||||
|
|
||||||
- type: MeleeWeaponAnimation
|
- type: MeleeWeaponAnimation
|
||||||
id: Smash
|
id: smash
|
||||||
|
prototype: WeaponTGArc
|
||||||
state: smash
|
state: smash
|
||||||
arcType: Poke
|
arcType: Poke
|
||||||
length: 0.3
|
length: 0.3
|
||||||
|
|||||||
@@ -4,8 +4,6 @@
|
|||||||
"x": 32,
|
"x": 32,
|
||||||
"y": 32
|
"y": 32
|
||||||
},
|
},
|
||||||
"license": "CC-BY-SA-3.0 for bite->smash",
|
|
||||||
"copyright": "https://github.com/tgstation/tgstation/raw/c545428822f1ee0d402b812221518632dbe198cb/icons/effects/effects.dmi",
|
|
||||||
"states": [
|
"states": [
|
||||||
{
|
{
|
||||||
"name": "spear",
|
"name": "spear",
|
||||||
@@ -16,74 +14,8 @@
|
|||||||
"directions": 1
|
"directions": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "bite",
|
"name": "fist",
|
||||||
"directions": 1,
|
"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
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 464 B After Width: | Height: | Size: 464 B |
|
Before Width: | Height: | Size: 530 B After Width: | Height: | Size: 530 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
81
Resources/Textures/Effects/weapons/tg_arcs.rsi/meta.json
Normal file
@@ -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
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 843 B After Width: | Height: | Size: 843 B |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |