Predict wielding (#16275)

This commit is contained in:
metalgearsloth
2023-05-10 10:01:23 +10:00
committed by GitHub
parent bf5d706e70
commit 9946cbd7fe
12 changed files with 326 additions and 326 deletions

View File

@@ -0,0 +1,10 @@
using Content.Shared.Damage;
namespace Content.Shared.Wieldable.Components;
[RegisterComponent, Access(typeof(WieldableSystem))]
public sealed class IncreaseDamageOnWieldComponent : Component
{
[DataField("damage", required: true)]
public DamageSpecifier BonusDamage = default!;
}

View File

@@ -0,0 +1,35 @@
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
namespace Content.Shared.Wieldable.Components;
/// <summary>
/// Used for objects that can be wielded in two or more hands,
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(WieldableSystem)), AutoGenerateComponentState]
public sealed partial class WieldableComponent : Component
{
[DataField("wieldSound")]
public SoundSpecifier? WieldSound = new SoundPathSpecifier("/Audio/Effects/thudswoosh.ogg");
[DataField("unwieldSound")]
public SoundSpecifier? UnwieldSound;
/// <summary>
/// Number of free hands required (excluding the item itself) required
/// to wield it
/// </summary>
[DataField("freeHandsRequired")]
public int FreeHandsRequired = 1;
[AutoNetworkedField, DataField("wielded")]
public bool Wielded = false;
[DataField("wieldedInhandPrefix")]
public string WieldedInhandPrefix = "wielded";
public string? OldInhandPrefix = null;
[DataField("wieldTime")]
public float WieldTime = 1.5f;
}