Remove BoxerComponent (#13935)

This commit is contained in:
MWKane
2023-03-24 11:50:28 +10:00
committed by GitHub
parent e236a1facc
commit 517b2b4fcf
5 changed files with 0 additions and 84 deletions

View File

@@ -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;
}
}

View File

@@ -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
{}
}

View File

@@ -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;
}
}
}

View File

@@ -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

View File

@@ -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: