Change wide swing sprites to be that of the weapon used (#21050)

Co-authored-by: notquitehadouken <1isthisameme>
This commit is contained in:
I.K
2023-10-17 20:12:00 -05:00
committed by GitHub
parent b33b57509e
commit df81532469
53 changed files with 160 additions and 103 deletions

View File

@@ -1,5 +1,6 @@
using System.Numerics;
using Content.Client.Weapons.Melee.Components;
using Content.Shared.Weapons.Melee;
using Robust.Client.Animations;
using Robust.Client.GameObjects;
using Robust.Shared.Animations;
@@ -16,7 +17,7 @@ public sealed partial class MeleeWeaponSystem
/// <summary>
/// Does all of the melee effects for a player that are predicted, i.e. character lunge and weapon animation.
/// </summary>
public override void DoLunge(EntityUid user, Angle angle, Vector2 localPos, string? animation, bool predicted = true)
public override void DoLunge(EntityUid user, EntityUid weapon, Angle angle, Vector2 localPos, string? animation, bool predicted = true)
{
if (!Timing.IsFirstTimePredicted)
return;
@@ -41,6 +42,19 @@ public sealed partial class MeleeWeaponSystem
return;
}
var spriteRotation = Angle.Zero;
if (arcComponent.Animation != WeaponArcAnimation.None
&& TryComp(weapon, out MeleeWeaponComponent? meleeWeaponComponent))
{
if (user == weapon
&& TryComp(weapon, out SpriteComponent? weaponSpriteComponent))
sprite.CopyFrom(weaponSpriteComponent);
spriteRotation = meleeWeaponComponent.WideAnimationRotation;
if (meleeWeaponComponent.SwingLeft)
angle *= -1;
}
sprite.NoRotation = true;
sprite.Rotation = localPos.ToWorldAngle();
var distance = Math.Clamp(localPos.Length() / 2f, 0.2f, 1f);
@@ -50,13 +64,13 @@ public sealed partial class MeleeWeaponSystem
switch (arcComponent.Animation)
{
case WeaponArcAnimation.Slash:
_animation.Play(animationUid, GetSlashAnimation(sprite, angle), SlashAnimationKey);
_animation.Play(animationUid, GetSlashAnimation(sprite, angle, spriteRotation), SlashAnimationKey);
TransformSystem.SetParent(animationUid, xform, user, userXform);
if (arcComponent.Fadeout)
_animation.Play(animationUid, GetFadeAnimation(sprite, 0.065f, 0.065f + 0.05f), FadeAnimationKey);
break;
case WeaponArcAnimation.Thrust:
_animation.Play(animationUid, GetThrustAnimation(sprite, distance), ThrustAnimationKey);
_animation.Play(animationUid, GetThrustAnimation(sprite, distance, spriteRotation), ThrustAnimationKey);
TransformSystem.SetParent(animationUid, xform, user, userXform);
if (arcComponent.Fadeout)
_animation.Play(animationUid, GetFadeAnimation(sprite, 0.05f, 0.15f), FadeAnimationKey);
@@ -73,13 +87,17 @@ public sealed partial class MeleeWeaponSystem
}
}
private Animation GetSlashAnimation(SpriteComponent sprite, Angle arc)
private Animation GetSlashAnimation(SpriteComponent sprite, Angle arc, Angle spriteRotation)
{
const float slashStart = 0.03f;
const float slashEnd = 0.065f;
const float length = slashEnd + 0.05f;
var startRotation = sprite.Rotation - arc / 2;
var endRotation = sprite.Rotation + arc / 2;
var startRotation = sprite.Rotation + arc / 2;
var endRotation = sprite.Rotation - arc / 2;
var startRotationOffset = startRotation.RotateVec(new Vector2(0f, -1f));
var endRotationOffset = endRotation.RotateVec(new Vector2(0f, -1f));
startRotation += spriteRotation;
endRotation += spriteRotation;
sprite.NoRotation = true;
return new Animation()
@@ -104,19 +122,21 @@ public sealed partial class MeleeWeaponSystem
Property = nameof(SpriteComponent.Offset),
KeyFrames =
{
new AnimationTrackProperty.KeyFrame(startRotation.RotateVec(new Vector2(0f, -1f)), 0f),
new AnimationTrackProperty.KeyFrame(startRotation.RotateVec(new Vector2(0f, -1f)), slashStart),
new AnimationTrackProperty.KeyFrame(endRotation.RotateVec(new Vector2(0f, -1f)), slashEnd)
new AnimationTrackProperty.KeyFrame(startRotationOffset, 0f),
new AnimationTrackProperty.KeyFrame(startRotationOffset, slashStart),
new AnimationTrackProperty.KeyFrame(endRotationOffset, slashEnd)
}
},
}
};
}
private Animation GetThrustAnimation(SpriteComponent sprite, float distance)
private Animation GetThrustAnimation(SpriteComponent sprite, float distance, Angle spriteRotation)
{
const float thrustEnd = 0.05f;
const float length = 0.15f;
var startOffset = sprite.Rotation.RotateVec(new Vector2(0f, -distance / 5f));
var endOffset = sprite.Rotation.RotateVec(new Vector2(0f, -distance));
return new Animation()
{
@@ -129,9 +149,9 @@ public sealed partial class MeleeWeaponSystem
Property = nameof(SpriteComponent.Offset),
KeyFrames =
{
new AnimationTrackProperty.KeyFrame(sprite.Rotation.RotateVec(new Vector2(0f, -distance / 5f)), 0f),
new AnimationTrackProperty.KeyFrame(sprite.Rotation.RotateVec(new Vector2(0f, -distance)), thrustEnd),
new AnimationTrackProperty.KeyFrame(sprite.Rotation.RotateVec(new Vector2(0f, -distance)), length),
new AnimationTrackProperty.KeyFrame(startOffset, 0f),
new AnimationTrackProperty.KeyFrame(endOffset, thrustEnd),
new AnimationTrackProperty.KeyFrame(endOffset, length),
}
},
}

View File

@@ -17,8 +17,6 @@ using Robust.Shared.Input;
using Robust.Shared.Map;
using Robust.Shared.Player;
using Robust.Shared.Players;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
namespace Content.Client.Weapons.Melee;
@@ -235,9 +233,10 @@ public sealed partial class MeleeWeaponSystem : SharedMeleeWeaponSystem
private void OnMeleeLunge(MeleeLungeEvent ev)
{
var ent = GetEntity(ev.Entity);
var entWeapon = GetEntity(ev.Weapon);
// Entity might not have been sent by PVS.
if (Exists(ent))
DoLunge(ent, ev.Angle, ev.LocalPos, ev.Animation);
if (Exists(ent) && Exists(entWeapon))
DoLunge(ent, entWeapon, ev.Angle, ev.LocalPos, ev.Animation);
}
}

View File

@@ -207,9 +207,6 @@ public sealed class AbsorbentSystem : SharedAbsorbentSystem
_audio.PlayPvs(component.TransferSound, target);
_useDelay.BeginDelay(used);
return true;
_audio.PlayPvs(component.TransferSound, target);
_useDelay.BeginDelay(used);
return true;
}
/// <summary>
@@ -259,7 +256,7 @@ public sealed class AbsorbentSystem : SharedAbsorbentSystem
var localPos = _transform.GetInvWorldMatrix(userXform).Transform(targetPos);
localPos = userXform.LocalRotation.RotateVec(localPos);
_melee.DoLunge(user, Angle.Zero, localPos, null, false);
_melee.DoLunge(user, used, Angle.Zero, localPos, null, false);
return true;
}

View File

@@ -214,7 +214,7 @@ public sealed class MeleeWeaponSystem : SharedMeleeWeaponSystem
return Math.Clamp(chance, 0f, 1f);
}
public override void DoLunge(EntityUid user, Angle angle, Vector2 localPos, string? animation, bool predicted = true)
public override void DoLunge(EntityUid user, EntityUid weapon, Angle angle, Vector2 localPos, string? animation, bool predicted = true)
{
Filter filter;
@@ -227,7 +227,7 @@ public sealed class MeleeWeaponSystem : SharedMeleeWeaponSystem
filter = Filter.Pvs(user, entityManager: EntityManager);
}
RaiseNetworkEvent(new MeleeLungeEvent(GetNetEntity(user), angle, localPos, animation), filter);
RaiseNetworkEvent(new MeleeLungeEvent(GetNetEntity(user), GetNetEntity(weapon), angle, localPos, animation), filter);
}
private void OnSpeechHit(EntityUid owner, MeleeSpeechComponent comp, MeleeHitEvent args)

View File

@@ -11,6 +11,11 @@ public sealed class MeleeLungeEvent : EntityEventArgs
{
public NetEntity Entity;
/// <summary>
/// The weapon used.
/// </summary>
public NetEntity Weapon;
/// <summary>
/// Width of the attack angle.
/// </summary>
@@ -26,9 +31,10 @@ public sealed class MeleeLungeEvent : EntityEventArgs
/// </summary>
public string? Animation;
public MeleeLungeEvent(NetEntity entity, Angle angle, Vector2 localPos, string? animation)
public MeleeLungeEvent(NetEntity entity, NetEntity weapon, Angle angle, Vector2 localPos, string? animation)
{
Entity = entity;
Weapon = weapon;
Angle = angle;
LocalPos = localPos;
Animation = animation;

View File

@@ -96,6 +96,17 @@ public sealed partial class MeleeWeaponComponent : Component
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
public EntProtoId WideAnimation = "WeaponArcSlash";
/// <summary>
/// Rotation of the animation.
/// 0 degrees means the top faces the attacker.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField]
public Angle WideAnimationRotation = Angle.Zero;
[ViewVariables(VVAccess.ReadWrite), DataField]
public bool SwingLeft;
// Sounds
/// <summary>

View File

@@ -423,7 +423,7 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
throw new NotImplementedException();
}
DoLungeAnimation(user, weapon.Angle, GetCoordinates(attack.Coordinates).ToMap(EntityManager, TransformSystem), weapon.Range, animation);
DoLungeAnimation(user, weaponUid, weapon.Angle, GetCoordinates(attack.Coordinates).ToMap(EntityManager, TransformSystem), weapon.Range, animation);
}
var attackEv = new MeleeAttackEvent(weaponUid);
@@ -823,7 +823,7 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
return true;
}
private void DoLungeAnimation(EntityUid user, Angle angle, MapCoordinates coordinates, float length, string? animation)
private void DoLungeAnimation(EntityUid user, EntityUid weapon, Angle angle, MapCoordinates coordinates, float length, string? animation)
{
// TODO: Assert that offset eyes are still okay.
if (!TryComp<TransformComponent>(user, out var userXform))
@@ -844,8 +844,8 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
if (localPos.Length() > visualLength)
localPos = localPos.Normalized() * visualLength;
DoLunge(user, angle, localPos, animation);
DoLunge(user, weapon, angle, localPos, animation);
}
public abstract void DoLunge(EntityUid user, Angle angle, Vector2 localPos, string? animation, bool predicted = true);
public abstract void DoLunge(EntityUid user, EntityUid weapon, Angle angle, Vector2 localPos, string? animation, bool predicted = true);
}

View File

@@ -1,6 +1,6 @@
- type: entity
name: bat
parent: [ SimpleMobBase, FlyingMobBase ]
parent: [ SimpleMobBase, FlyingMobBase, MobCombat ]
id: MobBat
description: Some cultures find them terrifying, others crunchy on the teeth.
components:
@@ -51,7 +51,6 @@
- type: ReplacementAccent
accent: mouse
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Effects/bite.ogg
angle: 0
@@ -126,13 +125,12 @@
- type: entity
name: bee
suffix: Angry
parent: MobBee
parent: [ MobBee, MobCombat ]
id: MobAngryBee
description: How nice a bee. Oh no, it looks angry and wants my pizza.
components:
- type: CombatMode
- type: MeleeWeapon
hidden: true
angle: 0
animation: WeaponArcBite
damage:
@@ -668,7 +666,7 @@
- type: entity
name: gorilla
parent: SimpleMobBase
parent: [ SimpleMobBase, MobCombat ]
id: MobGorilla
description: Smashes, roars, looks cool. Don't stand near one.
components:
@@ -722,7 +720,7 @@
- type: entity
name: kangaroo
parent: SimpleMobBase
parent: [ SimpleMobBase, MobCombat ]
id: MobKangaroo
description: A large marsupial herbivore. It has powerful hind legs, with nails that resemble long claws.
components:
@@ -1376,7 +1374,7 @@
- type: entity
name: grenade penguin
parent: SimpleMobBase
parent: [ SimpleMobBase, MobCombat ]
id: MobGrenadePenguin
description: A small penguin with a grenade strapped around its neck. Harvested by the Syndicate from icy shit-hole planets.
components:
@@ -1420,7 +1418,6 @@
- id: FoodMeatPenguin
amount: 3
- type: MeleeWeapon
hidden: true
angle: 0
animation: WeaponArcBite
damage:
@@ -1603,7 +1600,7 @@
# random sprite state when you spawn it.
- type: entity
name: tarantula
parent: SimpleMobBase
parent: [ SimpleMobBase, MobCombat ]
id: MobGiantSpider
description: Widely recognized to be the literal worst thing in existence.
components:
@@ -1641,7 +1638,6 @@
0: Alive
90: Dead
- type: MeleeWeapon
hidden: true
angle: 0
animation: WeaponArcBite
soundHit:
@@ -1731,7 +1727,6 @@
- DoorBumpOpener
- FootstepSound
- type: MeleeWeapon
hidden: true
angle: 0
animation: WeaponArcBite
soundHit:
@@ -1984,7 +1979,7 @@
- type: entity
name: corrupted corgi
parent: MobCorgi
parent: [ MobCorgi, MobCombat ]
id: MobCorgiNarsi
description: Ian! No!
components:
@@ -2001,7 +1996,6 @@
Dead:
Base: narsian_dead
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Effects/bite.ogg
angle: 0
@@ -2314,7 +2308,7 @@
- type: entity
name: hamster
parent: SimpleMobBase
parent: [ SimpleMobBase, MobCombat ]
id: MobHamster
description: A cute, fluffy, robust hamster.
components:
@@ -2421,7 +2415,6 @@
Blunt: 0.1
- type: CombatMode
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Effects/bite.ogg
angle: 0

View File

@@ -1,6 +1,6 @@
- type: entity
save: false
parent: BaseSimpleMob
parent: [ BaseSimpleMob, MobCombat ]
id: BaseMobArgocyte
suffix: AI
description: A dangerous alien found on the wrong side of planets, known for their propensity for munching on ruins.
@@ -31,7 +31,6 @@
- type: Insulated
- type: CombatMode
- type: MeleeWeapon
hidden: true
angle: 0
animation: WeaponArcBite
damage:

View File

@@ -1,6 +1,6 @@
- type: entity
name: behonker
parent: [ SimpleSpaceMobBase, FlyingMobBase ]
parent: [ SimpleSpaceMobBase, FlyingMobBase, MobCombat ]
id: BaseMobBehonker
abstract: true
description: A floating demon aspect of the honkmother.
@@ -96,7 +96,6 @@
- id: WeaponBehonkerLaser
amount: 1
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Weapons/Xeno/alien_claw_flesh3.ogg
damage:

View File

@@ -1,7 +1,7 @@
- type: entity
name: space carp
id: BaseMobCarp
parent: [ SimpleSpaceMobBase, FlyingMobBase ]
parent: [ SimpleSpaceMobBase, FlyingMobBase, MobCombat ]
description: It's a space carp.
abstract: true
components:
@@ -56,7 +56,6 @@
amount: 2
- type: MeleeWeapon
altDisarm: false
hidden: true
angle: 0
animation: WeaponArcBite
soundHit:

View File

@@ -76,7 +76,7 @@
- type: ZombieImmune
- type: entity
parent: MobElementalBase
parent: [ MobElementalBase, MobCombat ]
id: MobQuartzCrab
name: quartz crab
description: An ore crab made from quartz.
@@ -88,7 +88,6 @@
rootTask:
task: SimpleHostileCompound
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Weapons/Xeno/alien_claw_flesh3.ogg
damage:
@@ -116,7 +115,7 @@
acts: [ "Destruction" ]
- type: entity
parent: MobElementalBase
parent: [ MobElementalBase, MobCombat ]
id: MobIronCrab
name: ore crab
description: An ore crab made from iron.
@@ -128,7 +127,6 @@
rootTask:
task: SimpleHostileCompound
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Weapons/Xeno/alien_claw_flesh3.ogg
damage:
@@ -159,7 +157,7 @@
acts: [ "Destruction" ]
- type: entity
parent: MobElementalBase
parent: [ MobElementalBase, MobCombat ]
id: MobUraniumCrab
name: ore crab
description: An ore crab made from uranium.
@@ -171,7 +169,6 @@
rootTask:
task: IdleCompound
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Weapons/Xeno/alien_claw_flesh3.ogg
damage:
@@ -212,7 +209,7 @@
name: Reagent slime
id: ReagentSlime
suffix: Water
parent: MobAdultSlimes
parent: [ MobAdultSlimes, MobCombat ]
description: It consists of a liquid, and it wants to dissolve you in itself.
components:
- type: NpcFactionMember

View File

@@ -1,5 +1,5 @@
- type: entity
parent: SimpleMobBase
parent: [ SimpleMobBase, MobCombat ]
id: BaseMobFlesh
name: aberrant flesh
description: A shambling mass of flesh, animated through anomalous energy.
@@ -45,7 +45,6 @@
bloodMaxVolume: 100
- type: CombatMode
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Weapons/Xeno/alien_claw_flesh3.ogg
angle: 0
@@ -73,7 +72,6 @@
Dead:
Base: dead
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Weapons/Xeno/alien_claw_flesh3.ogg
angle: 0
@@ -103,7 +101,6 @@
0: Alive
50: Dead
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Weapons/Xeno/alien_claw_flesh3.ogg
angle: 0
@@ -190,7 +187,6 @@
baseWalkSpeed: 1.5
baseSprintSpeed: 2.5
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Weapons/Xeno/alien_claw_flesh3.ogg
angle: 0

View File

@@ -1,7 +1,7 @@
- type: entity
name: Mimic
id: MobMimic
parent: SimpleMobBase
parent: [ SimpleMobBase, MobCombat ]
description: Surprise. # When this gets a proper write this should use the object's actual description >:)
components:
- type: Tag
@@ -33,7 +33,6 @@
- MachineLayer
- type: AnimationPlayer
- type: MeleeWeapon
hidden: true
angle: 0
animation: WeaponArcFist
damage:

View File

@@ -570,7 +570,6 @@
0: Alive
150: Dead
- type: MeleeWeapon
hidden: true
angle: 0
animation: WeaponArcBite
soundHit:

View File

@@ -1,7 +1,7 @@
- type: entity
name: Rat King
id: MobRatKing
parent: SimpleMobBase
parent: [ SimpleMobBase, MobCombat ]
description: He's da rat. He make da roolz.
components:
- type: CombatMode
@@ -45,7 +45,6 @@
0: Alive
200: Dead
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Weapons/Xeno/alien_claw_flesh1.ogg
angle: 0
@@ -133,7 +132,6 @@
0: Alive
350: Dead
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Weapons/Xeno/alien_claw_flesh2.ogg
angle: 0
@@ -153,7 +151,7 @@
- type: entity
name: Rat Servant
id: MobRatServant
parent: SimpleMobBase
parent: [ SimpleMobBase, MobCombat ]
description: He's da mini rat. He don't make da roolz.
noSpawn: true #Must be configured to a King or the AI breaks.
components:
@@ -208,7 +206,6 @@
- type: Stamina
critThreshold: 60
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Weapons/bladeslice.ogg
angle: 0

View File

@@ -1,7 +1,7 @@
- type: entity
name: basic slime
id: MobAdultSlimes
parent: SimpleMobBase
parent: [ SimpleMobBase, MobCombat ]
abstract: true
description: It looks so much like jelly. I wonder what it tastes like?
components:
@@ -97,9 +97,7 @@
- type: Body
prototype: Slimes
requiredLegs: 1
- type: CombatMode
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Weapons/punch3.ogg
angle: 0

View File

@@ -46,7 +46,6 @@
heatDamageThreshold: 500
coldDamageThreshold: 0
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Weapons/Xeno/alien_claw_flesh3.ogg
angle: 0
@@ -143,7 +142,6 @@
state: glow
shader: unshaded
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Weapons/Xeno/alien_claw_flesh3.ogg
angle: 0
@@ -249,7 +247,6 @@
layer:
- MobLayer
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Effects/bite.ogg
angle: 0

View File

@@ -59,7 +59,6 @@
bloodMaxVolume: 50
- type: CombatMode
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Effects/bite.ogg
angle: 0

View File

@@ -74,7 +74,6 @@
bloodReagent: FluorosulfuricAcid
- type: MeleeWeapon
altDisarm: false
hidden: true
angle: 0
soundHit:
collection: AlienClaw
@@ -213,7 +212,6 @@
150: 0.7
- type: MovementSpeedModifier
- type: MeleeWeapon
hidden: true
damage:
groups:
Brute: 12
@@ -251,7 +249,6 @@
- type: MovementSpeedModifier
baseSprintSpeed: 4
- type: MeleeWeapon
hidden: true
damage:
groups:
Brute: 10
@@ -285,7 +282,6 @@
- type: MovementSpeedModifier
baseSprintSpeed: 6.0
- type: MeleeWeapon
hidden: true
damage:
groups:
Brute: 5
@@ -396,7 +392,6 @@
factions:
- Xeno
- type: MeleeWeapon
hidden: true
angle: 0
animation: WeaponArcBite
damage:

View File

@@ -103,7 +103,6 @@
soundPerceivedByOthers: false # A 75% chance for a loud roar would get old fast.
- type: MeleeWeapon
altDisarm: false
hidden: true
soundHit:
path: /Audio/Weapons/Xeno/alien_claw_flesh3.ogg
damage:

View File

@@ -46,7 +46,6 @@
rules: ghost-role-information-cerberus-rules
- type: GhostTakeoverAvailable
- type: MeleeWeapon
hidden: true
angle: 0
animation: WeaponArcBite
damage:

View File

@@ -225,7 +225,6 @@
Burn: 3
- type: InventorySlots
- type: MeleeWeapon
hidden: true
angle: 30
animation: WeaponArcFist
attackRate: 1.8

View File

@@ -161,7 +161,6 @@
- type: CombatMode
canDisarm: true
- type: MeleeWeapon
hidden: true
soundHit:
collection: Punch
angle: 30

View File

@@ -40,7 +40,6 @@
damageContainer: Biological
damageModifierSet: Scale
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Weapons/pierce.ogg
angle: 30

View File

@@ -83,6 +83,7 @@
tags:
- StringInstrument
- type: MeleeWeapon
wideAnimationRotation: 45
damage:
types:
Blunt: 6
@@ -144,6 +145,7 @@
types:
Blunt: 20
- type: MeleeWeapon
wideAnimationRotation: 45
damage:
types:
Blunt: 5

View File

@@ -32,6 +32,7 @@
- Payload # yes, you can make re-usable prank grenades
- BikeHorn
- type: MeleeWeapon
wideAnimationRotation: 135
soundHit:
collection: BikeHorn
params:
@@ -77,6 +78,7 @@
params:
variation: 0.246
- type: MeleeWeapon
wideAnimationRotation: 135
soundHit:
collection: CluwneHorn
params:

View File

@@ -1,5 +1,5 @@
- type: entity
parent: BaseItem
parent: [ BaseItem, MobCombat ]
id: MrChips
name: mr chips
suffix: Dummy
@@ -23,7 +23,6 @@
allowedStates:
- Alive
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Weapons/boxingpunch1.ogg
angle: 30

View File

@@ -122,6 +122,7 @@
sound:
path: /Audio/Items/Toys/mousesqueek.ogg
- type: MeleeWeapon
wideAnimationRotation: 180
soundHit:
path: /Audio/Items/Toys/mousesqueek.ogg
@@ -185,6 +186,7 @@
sound:
path: /Audio/Items/Toys/weh.ogg
- type: MeleeWeapon
wideAnimationRotation: 180
soundHit:
path: /Audio/Items/Toys/weh.ogg
@@ -206,6 +208,7 @@
sound:
path: /Audio/Items/Toys/muffled_weh.ogg
- type: MeleeWeapon
wideAnimationRotation: 180
soundHit:
path: /Audio/Items/Toys/muffled_weh.ogg
@@ -231,6 +234,7 @@
sound:
path: /Audio/Items/Toys/toy_rustle.ogg
- type: MeleeWeapon
wideAnimationRotation: 180
soundHit:
path: /Audio/Items/Toys/toy_rustle.ogg
- type: SolutionContainerManager
@@ -353,6 +357,7 @@
sound:
path: /Audio/Effects/bite.ogg
- type: MeleeWeapon
wideAnimationRotation: -90
soundHit:
path: /Audio/Effects/bite.ogg
angle: 0
@@ -379,6 +384,7 @@
sound:
path: /Audio/Items/Toys/rattle.ogg
- type: MeleeWeapon
wideAnimationRotation: 180
soundHit:
path: /Audio/Items/Toys/rattle.ogg
@@ -394,6 +400,7 @@
sound:
path: /Audio/Items/Toys/mousesqueek.ogg
- type: MeleeWeapon
wideAnimationRotation: -90
soundHit:
path: /Audio/Items/Toys/mousesqueek.ogg
- type: Clothing
@@ -436,6 +443,7 @@
sound:
path: /Audio/Voice/Vox/shriek1.ogg
- type: MeleeWeapon
wideAnimationRotation: 180
soundHit:
path: /Audio/Voice/Vox/shriek1.ogg
@@ -466,6 +474,7 @@
sound:
path: /Audio/Weapons/Xeno/alien_spitacid.ogg
- type: MeleeWeapon
wideAnimationRotation: 180
soundHit:
path: /Audio/Weapons/Xeno/alien_spitacid.ogg

View File

@@ -166,6 +166,7 @@
tags:
- Book
- type: MeleeWeapon
wideAnimationRotation: 180
damage:
types:
Blunt: 6

View File

@@ -36,6 +36,7 @@
- type: UseDelay
delay: 0.5
- type: MeleeWeapon
wideAnimationRotation: 180
soundHit:
collection: DeskBell
params:

View File

@@ -37,6 +37,7 @@
- type: FireExtinguisher
hasSafety: true
- type: MeleeWeapon
wideAnimationRotation: 180
damage:
types:
Blunt: 10

View File

@@ -265,6 +265,7 @@
state: overpriced_pen
- type: ItemCooldown
- type: MeleeWeapon
wideAnimationRotation: -45
damage:
types:
Piercing: 15
@@ -488,6 +489,7 @@
tags:
- Write
- type: MeleeWeapon
wideAnimationRotation: 180
damage:
types:
Blunt: 6

View File

@@ -42,6 +42,7 @@
types:
- Fork
- type: MeleeWeapon
wideAnimationRotation: 180
attackRate: 1.5
damage:
types:
@@ -73,6 +74,7 @@
types:
- Spoon
- type: MeleeWeapon
wideAnimationRotation: 180
attackRate: 1.5
damage:
types:

View File

@@ -19,6 +19,7 @@
- state: cutters-cutty-thingy
- type: ItemCooldown
- type: MeleeWeapon
wideAnimationRotation: -90
damage:
types:
Piercing: 2
@@ -65,6 +66,7 @@
sprite: Objects/Tools/screwdriver.rsi
- type: ItemCooldown
- type: MeleeWeapon
wideAnimationRotation: -90
attackRate: 1
damage:
types:
@@ -105,6 +107,7 @@
sprite: Objects/Tools/wrench.rsi
- type: ItemCooldown
- type: MeleeWeapon
wideAnimationRotation: 135
attackRate: 1.5
damage:
types:
@@ -140,6 +143,7 @@
size: 10
- type: ItemCooldown
- type: MeleeWeapon
wideAnimationRotation: -135
damage:
types:
Blunt: 8
@@ -318,6 +322,7 @@
- type: StaticPrice
price: 100
- type: MeleeWeapon
wideAnimationRotation: -90
attackRate: 1.5
damage:
types:
@@ -487,6 +492,7 @@
state: icon
- type: ItemCooldown
- type: MeleeWeapon
wideAnimationRotation: -135
damage:
types:
Blunt: 14
@@ -519,6 +525,7 @@
- Belt
- type: ItemCooldown
- type: MeleeWeapon
wideAnimationRotation: -135
damage:
types:
Blunt: 7

View File

@@ -30,6 +30,7 @@
shader: unshaded
- type: ItemCooldown
- type: MeleeWeapon
wideAnimationRotation: -90
damage:
types:
Blunt: 5 #i mean... i GUESS you could use it like that

View File

@@ -9,6 +9,7 @@
sprite: Objects/Weapons/Melee/armblade.rsi
state: icon
- type: MeleeWeapon
wideAnimationRotation: 90
attackRate: 0.75
damage:
types:

View File

@@ -8,6 +8,7 @@
sprite: Objects/Weapons/Melee/baseball_bat.rsi
state: icon
- type: MeleeWeapon
wideAnimationRotation: -135
damage:
types:
Blunt: 10

View File

@@ -15,6 +15,7 @@
sprite: Objects/Weapons/Melee/chainsaw.rsi
state: icon
- type: MeleeWeapon
wideAnimationRotation: -135
damage:
types:
Slash: 5

View File

@@ -9,6 +9,7 @@
sprite: Objects/Weapons/Melee/cult_dagger.rsi
state: icon
- type: MeleeWeapon
wideAnimationRotation: -135
attackRate: 1.5
damage:
types:
@@ -32,6 +33,7 @@
sprite: Objects/Weapons/Melee/cult_blade.rsi
state: icon
- type: MeleeWeapon
wideAnimationRotation: -135
attackRate: 0.75
damage:
types:
@@ -58,6 +60,7 @@
sprite: Objects/Weapons/Melee/cult_halberd.rsi
state: icon
- type: MeleeWeapon
wideAnimationRotation: -135
attackRate: 0.75
damage:
types:

View File

@@ -22,6 +22,7 @@
shader: unshaded
map: [ "blade" ]
- type: MeleeWeapon
wideAnimationRotation: -135
attackRate: 1
soundHit:
path: /Audio/Weapons/eblade1.ogg
@@ -87,6 +88,7 @@
shader: unshaded
map: [ "blade" ]
- type: MeleeWeapon
wideAnimationRotation: -135
attackRate: 1
hidden: true
damage:
@@ -179,6 +181,7 @@
Blunt: -4.5
litDisarmMalus: 0.7
- type: MeleeWeapon
wideAnimationRotation: -135
attackRate: 1.5
angle: 100
soundHit:

View File

@@ -12,6 +12,8 @@
sprite: Objects/Weapons/Melee/fireaxe.rsi
state: icon
- type: MeleeWeapon
wideAnimationRotation: -90
swingLeft: true
attackRate: 0.75
damage:
types:

View File

@@ -8,6 +8,7 @@
sprite: Objects/Weapons/Melee/gohei.rsi
state: gohei
- type: MeleeWeapon
wideAnimationRotation: -150
damage:
types:
Blunt: 3 #You'd be better off punching people

View File

@@ -12,6 +12,7 @@
- Knife
- type: ItemCooldown
- type: MeleeWeapon
wideAnimationRotation: -135
damage:
types:
Slash: 12
@@ -59,6 +60,7 @@
size: 4
state: butch
- type: MeleeWeapon
wideAnimationRotation: -135
attackRate: 1.5
damage:
types:
@@ -85,6 +87,7 @@
size: 2
state: icon
- type: MeleeWeapon
wideAnimationRotation: -135
attackRate: 1.5
damage:
types:

View File

@@ -44,6 +44,7 @@
capacity: 1
count: 1
- type: MeleeWeapon
wideAnimationRotation: -135
damage:
types:
Blunt: 8
@@ -73,6 +74,7 @@
sprite: Objects/Weapons/Melee/crusher_dagger.rsi
state: icon
- type: MeleeWeapon
wideAnimationRotation: -135
attackRate: 1.5
damage:
types:
@@ -107,6 +109,7 @@
- type: Sprite
sprite: Objects/Weapons/Melee/crusher_glaive.rsi
- type: MeleeWeapon
wideAnimationRotation: -135
attackRate: 1.25
- type: Item
size: 150

View File

@@ -8,6 +8,7 @@
sprite: Objects/Weapons/Melee/needle.rsi
state: icon
- type: MeleeWeapon
wideAnimationRotation: -135
damage:
types:
Piercing: 1

View File

@@ -12,6 +12,7 @@
state: pickaxe
- type: ItemCooldown
- type: MeleeWeapon
wideAnimationRotation: -135
damage:
groups:
Brute: 5

View File

@@ -34,6 +34,7 @@
map: ["enum.SolutionContainerLayers.Fill"]
visible: false
- type: MeleeWeapon
wideAnimationRotation: -135
damage:
types:
Piercing: 12
@@ -117,6 +118,7 @@
- type: Sprite
sprite: Objects/Weapons/Melee/reinforced_spear.rsi
- type: MeleeWeapon
wideAnimationRotation: -135
damage:
types:
Piercing: 15
@@ -136,6 +138,7 @@
- type: Sprite
sprite: Objects/Weapons/Melee/plasma_spear.rsi
- type: MeleeWeapon
wideAnimationRotation: -135
damage:
types:
Piercing: 18
@@ -155,6 +158,7 @@
- type: Sprite
sprite: Objects/Weapons/Melee/uranium_spear.rsi
- type: MeleeWeapon
wideAnimationRotation: -135
damage:
types:
Piercing: 10

View File

@@ -12,6 +12,7 @@
- type: Stunbaton
energyPerUse: 70
- type: MeleeWeapon
wideAnimationRotation: -135
damage:
types:
Blunt: 9

View File

@@ -9,6 +9,7 @@
sprite: Objects/Weapons/Melee/captain_sabre.rsi
state: icon
- type: MeleeWeapon
wideAnimationRotation: -135
attackRate: 1.5
damage:
types:
@@ -41,6 +42,7 @@
sprite: Objects/Weapons/Melee/katana.rsi
state: icon
- type: MeleeWeapon
wideAnimationRotation: -135
damage:
types:
Slash: 25
@@ -61,6 +63,7 @@
sprite: Objects/Weapons/Melee/energykatana.rsi
state: icon
- type: MeleeWeapon
wideAnimationRotation: -60
damage:
types:
Slash: 30
@@ -95,6 +98,7 @@
sprite: Objects/Weapons/Melee/machete.rsi
state: icon
- type: MeleeWeapon
wideAnimationRotation: -135
damage:
types:
Slash: 20
@@ -116,6 +120,7 @@
sprite: Objects/Weapons/Melee/claymore.rsi
state: icon
- type: MeleeWeapon
wideAnimationRotation: -135
attackRate: 0.75
damage:
types:
@@ -144,6 +149,7 @@
sprite: Objects/Weapons/Melee/cutlass.rsi
state: icon
- type: MeleeWeapon
wideAnimationRotation: -135
damage:
types:
Slash: 16

View File

@@ -12,6 +12,7 @@
size: 150
sprite: Objects/Tools/Toolboxes/toolbox_red.rsi
- type: MeleeWeapon
wideAnimationRotation: -135
attackRate: 1.5
damage:
types:

View File

@@ -11,6 +11,7 @@
size: 15
sprite: Objects/Weapons/Melee/white_cane.rsi
- type: MeleeWeapon
wideAnimationRotation: 45
damage:
types:
Blunt: 5
@@ -21,4 +22,3 @@
damage:
types:
Blunt: 3

View File

@@ -12,6 +12,7 @@
- type: Stunbaton
energyPerUse: 50
- type: MeleeWeapon
wideAnimationRotation: -135
damage:
types:
Blunt: 7
@@ -74,6 +75,7 @@
sprite: Objects/Weapons/Melee/truncheon.rsi
state: icon
- type: MeleeWeapon
wideAnimationRotation: -135
damage:
types:
Blunt: 20
@@ -114,6 +116,7 @@
maxCharges: 5
charges: 5
- type: MeleeWeapon
wideAnimationRotation: 180
damage:
types:
Blunt: 0 # melee weapon to allow flashing individual targets