2021-01-06 18:48:08 -07:00
|
|
|
using System;
|
2020-09-13 14:23:52 +02:00
|
|
|
using Content.Shared.Damage;
|
2019-07-31 15:02:36 +02:00
|
|
|
using Robust.Shared.GameObjects;
|
2021-03-05 01:08:38 +01:00
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
2019-09-26 22:32:32 +02:00
|
|
|
using Robust.Shared.ViewVariables;
|
2018-04-05 17:32:51 -05:00
|
|
|
|
|
|
|
|
namespace Content.Server.GameObjects.Components.Weapon.Melee
|
|
|
|
|
{
|
2019-07-31 15:02:36 +02:00
|
|
|
[RegisterComponent]
|
2021-06-05 00:20:52 -07:00
|
|
|
public class MeleeWeaponComponent : Component
|
2018-04-05 17:32:51 -05:00
|
|
|
{
|
2019-09-26 22:32:32 +02:00
|
|
|
public override string Name => "MeleeWeapon";
|
|
|
|
|
|
2021-06-05 00:20:52 -07:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("hitSound")]
|
2021-06-05 00:20:52 -07:00
|
|
|
public string HitSound { get; set; } = "/Audio/Weapons/genhit1.ogg";
|
2021-03-05 01:08:38 +01:00
|
|
|
|
2021-06-05 00:20:52 -07:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("missSound")]
|
2021-06-05 00:20:52 -07:00
|
|
|
public string MissSound { get; set; } = "/Audio/Weapons/punchmiss.ogg";
|
2021-03-05 01:08:38 +01:00
|
|
|
|
2021-06-05 00:20:52 -07:00
|
|
|
[ViewVariables]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("arcCooldownTime")]
|
2021-06-05 00:20:52 -07:00
|
|
|
public float ArcCooldownTime { get; } = 1f;
|
2019-09-26 22:32:32 +02:00
|
|
|
|
2021-06-05 00:20:52 -07:00
|
|
|
[ViewVariables]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("cooldownTime")]
|
2021-06-05 00:20:52 -07:00
|
|
|
public float CooldownTime { get; } = 1f;
|
2020-08-31 19:32:06 +02:00
|
|
|
|
2019-09-26 22:32:32 +02:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("clickArc")]
|
|
|
|
|
public string ClickArc { get; set; } = "punch";
|
2018-04-05 17:32:51 -05:00
|
|
|
|
2019-09-26 22:32:32 +02:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("arc")]
|
|
|
|
|
public string Arc { get; set; } = "default";
|
2019-09-26 22:32:32 +02:00
|
|
|
|
2021-06-05 00:20:52 -07:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
[DataField("arcwidth")]
|
|
|
|
|
public float ArcWidth { get; set; } = 90;
|
2019-09-26 22:32:32 +02:00
|
|
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("range")]
|
|
|
|
|
public float Range { get; set; } = 1;
|
2020-08-31 18:55:42 +02:00
|
|
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("damage")]
|
|
|
|
|
public int Damage { get; set; } = 5;
|
2018-04-05 17:32:51 -05:00
|
|
|
|
2020-08-31 20:54:33 +02:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("damageType")]
|
|
|
|
|
public DamageType DamageType { get; set; } = DamageType.Blunt;
|
2020-08-31 20:54:33 +02:00
|
|
|
|
2021-06-05 00:20:52 -07:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
[DataField("clickAttackEffect")]
|
|
|
|
|
public bool ClickAttackEffect { get; set; } = true;
|
2020-12-08 05:57:47 -06:00
|
|
|
|
2021-06-05 00:20:52 -07:00
|
|
|
public TimeSpan LastAttackTime;
|
|
|
|
|
public TimeSpan CooldownEnd;
|
2020-12-08 05:57:47 -06:00
|
|
|
}
|
2018-04-05 17:32:51 -05:00
|
|
|
}
|