Remove BoxerComponent (#13935)
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
using Content.Shared.Damage;
|
||||
|
||||
namespace Content.Server.Abilities.Boxer
|
||||
{
|
||||
/// <summary>
|
||||
/// Added to the boxer on spawn.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class BoxerComponent : Component
|
||||
{
|
||||
[DataField("modifiers", required: true)]
|
||||
public DamageModifierSet UnarmedModifiers = default!;
|
||||
|
||||
[DataField("rangeBonus")]
|
||||
public float RangeBonus = 1.5f;
|
||||
|
||||
/// <summary>
|
||||
/// Damage modifier with boxing glove stam damage.
|
||||
/// </summary>
|
||||
[DataField("boxingGlovesModifier")]
|
||||
public float BoxingGlovesModifier = 1.75f;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
using Content.Shared.Damage;
|
||||
|
||||
namespace Content.Server.Abilities.Boxer
|
||||
{
|
||||
/// <summary>
|
||||
/// Boxer gets a bonus for these, and their fists, but not other unarmed weapons.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class BoxingGlovesComponent : Component
|
||||
{}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
using Content.Shared.Damage.Events;
|
||||
using Content.Shared.Weapons.Melee;
|
||||
using Content.Shared.Weapons.Melee.Events;
|
||||
using Robust.Shared.Containers;
|
||||
|
||||
namespace Content.Server.Abilities.Boxer
|
||||
{
|
||||
public sealed class BoxingSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<BoxerComponent, ComponentInit>(OnInit);
|
||||
SubscribeLocalEvent<BoxerComponent, MeleeHitEvent>(OnMeleeHit);
|
||||
SubscribeLocalEvent<BoxingGlovesComponent, StaminaMeleeHitEvent>(OnStamHit);
|
||||
}
|
||||
|
||||
private void OnInit(EntityUid uid, BoxerComponent component, ComponentInit args)
|
||||
{
|
||||
if (TryComp<MeleeWeaponComponent>(uid, out var meleeComp))
|
||||
meleeComp.Range *= component.RangeBonus;
|
||||
}
|
||||
private void OnMeleeHit(EntityUid uid, BoxerComponent component, MeleeHitEvent args)
|
||||
{
|
||||
args.ModifiersList.Add(component.UnarmedModifiers);
|
||||
}
|
||||
|
||||
private void OnStamHit(EntityUid uid, BoxingGlovesComponent component, StaminaMeleeHitEvent args)
|
||||
{
|
||||
if (!_containerSystem.TryGetContainingContainer(uid, out var equipee))
|
||||
return;
|
||||
|
||||
if (TryComp<BoxerComponent>(equipee.Owner, out var boxer))
|
||||
args.Multiplier *= boxer.BoxingGlovesModifier;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,6 @@
|
||||
sprite: Clothing/Hands/Gloves/Boxing/boxingred.rsi
|
||||
- type: Clothing
|
||||
sprite: Clothing/Hands/Gloves/Boxing/boxingred.rsi
|
||||
- type: BoxingGloves
|
||||
- type: StaminaDamageOnHit
|
||||
damage: 8 #Stam damage values seem a bit higher than regular damage because of the decay, etc
|
||||
# This needs to be moved to boxinggloves
|
||||
|
||||
@@ -9,16 +9,6 @@
|
||||
supervisors: job-supervisors-hop
|
||||
access:
|
||||
- Service
|
||||
special:
|
||||
- !type:AddComponentSpecial
|
||||
components:
|
||||
- type: Boxer
|
||||
modifiers:
|
||||
coefficients: #Remember these only apply to unarmed
|
||||
Blunt: 1.5
|
||||
Slash: 1.5
|
||||
Piercing: 1.5
|
||||
|
||||
- type: startingGear
|
||||
id: BoxerGear
|
||||
equipment:
|
||||
|
||||
Reference in New Issue
Block a user