Kill unarmed combat comp (#8420)

This commit is contained in:
Kara
2022-05-25 14:48:41 -07:00
committed by GitHub
parent efedb3d7ba
commit 4811124786
18 changed files with 21 additions and 32 deletions

View File

@@ -120,7 +120,6 @@ namespace Content.Client.Entry
"EmptyOnMachineDeconstruct",
"ExplodeOnTrigger",
"Utensil",
"UnarmedCombat",
"TimedSpawner",
"NodeContainer",
"PowerSupplier",

View File

@@ -13,7 +13,7 @@ namespace Content.Server.AI.Operators.Combat.Melee
private readonly EntityUid _owner;
private readonly EntityUid _target;
private UnarmedCombatComponent? _unarmedCombat;
private MeleeWeaponComponent? _unarmedCombat;
public UnarmedCombatOperator(EntityUid owner, EntityUid target, float burstTime = 1.0f)
{
@@ -41,7 +41,7 @@ namespace Content.Server.AI.Operators.Combat.Melee
combatModeComponent.IsInCombatMode = true;
}
if (_entMan.TryGetComponent(_owner, out UnarmedCombatComponent? unarmedCombatComponent))
if (_entMan.TryGetComponent(_owner, out MeleeWeaponComponent? unarmedCombatComponent))
{
_unarmedCombat = unarmedCombatComponent;
}

View File

@@ -20,7 +20,7 @@ namespace Content.Server.AI.Utility.Actions.Combat.Melee
public override void SetupOperators(Blackboard context)
{
MoveToEntityOperator moveOperator;
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(Owner, out UnarmedCombatComponent? unarmedCombatComponent))
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(Owner, out MeleeWeaponComponent? unarmedCombatComponent))
{
moveOperator = new MoveToEntityOperator(Owner, Target, unarmedCombatComponent.Range - 0.01f);
}

View File

@@ -10,7 +10,7 @@ namespace Content.Server.AI.Utility.Considerations.Combat.Melee
{
var entityManager = IoCManager.Resolve<IEntityManager>();
var entity = context.GetState<SelfState>().GetValue();
return entityManager.HasComponent<UnarmedCombatComponent>(entity) ? 1.0f : 0.0f;
return entityManager.HasComponent<MeleeWeaponComponent>(entity) ? 1.0f : 0.0f;
}
}
}

View File

@@ -4,8 +4,7 @@ using Content.Shared.Sound;
namespace Content.Server.Weapon.Melee.Components
{
[RegisterComponent]
[Virtual]
public class MeleeWeaponComponent : Component
public sealed class MeleeWeaponComponent : Component
{
[ViewVariables(VVAccess.ReadWrite)]
[DataField("hitSound")]

View File

@@ -1,9 +0,0 @@
namespace Content.Server.Weapon.Melee.Components
{
// TODO: Remove this, just use MeleeWeapon...
[RegisterComponent]
[ComponentReference(typeof(MeleeWeaponComponent))]
public sealed class UnarmedCombatComponent : MeleeWeaponComponent
{
}
}

View File

@@ -51,7 +51,7 @@
bloodMaxVolume: 50
- type: ReplacementAccent
accent: mouse
- type: UnarmedCombat
- type: MeleeWeapon
range: 1.5
arcwidth: 0
arc: bite
@@ -121,7 +121,7 @@
enabled: false
autoPopulate: false
name: action-name-disarm
- type: UnarmedCombat
- type: MeleeWeapon
range: 0.3
arcwidth: 0
arc: bite
@@ -581,7 +581,7 @@
normal: kangaroo-boxing
crit: kangaroo-boxing-dead
dead: kangaroo-boxing-dead
- type: UnarmedCombat
- type: MeleeWeapon
range: 1.5
arcwidth: 0
arc: claw
@@ -1061,7 +1061,7 @@
spawned:
- id: FoodMeatPenguin
amount: 3
- type: UnarmedCombat
- type: MeleeWeapon
range: 0.5
arcwidth: 0
arc: bite

View File

@@ -55,7 +55,7 @@
- type: Temperature
heatDamageThreshold: 500
coldDamageThreshold: 0
- type: UnarmedCombat
- type: MeleeWeapon
range: 0.5
arcwidth: 0
arc: claw

View File

@@ -45,7 +45,7 @@
spawned:
- id: FoodMeat
amount: 2
- type: UnarmedCombat
- type: MeleeWeapon
range: 1.5
arcwidth: 0
arc: bite

View File

@@ -36,7 +36,7 @@
- type: CharacterInfo
- type: HumanoidAppearance
- type: AnimationPlayer
- type: UnarmedCombat
- type: MeleeWeapon
range: 1.5
arcwidth: 0
arc: fist

View File

@@ -66,7 +66,7 @@
normal: narsian
crit: narsian_dead
dead: narsian_dead
- type: UnarmedCombat
- type: MeleeWeapon
range: 1.5
arcwidth: 0
arc: bite

View File

@@ -109,7 +109,7 @@
template: AnimalTemplate
preset: AnimalPreset
- type: Examiner
- type: UnarmedCombat
- type: MeleeWeapon
range: 1.5
arcwidth: 0
arc: bite

View File

@@ -53,7 +53,7 @@
enabled: false
autoPopulate: false
name: action-name-disarm
- type: UnarmedCombat
- type: MeleeWeapon
range: 0.5
arcwidth: 0
arc: bite

View File

@@ -52,7 +52,7 @@
types:
Bloodloss:
-0.25
- type: UnarmedCombat
- type: MeleeWeapon
range: 1.5
arcwidth: 0
arc: claw
@@ -121,7 +121,7 @@
- type: AiFactionTag
factions:
- Xeno
- type: UnarmedCombat
- type: MeleeWeapon
range: 1.5
arcwidth: 0
arc: bite

View File

@@ -34,7 +34,7 @@
name: Cerberus, Evil Familiar
description: Obey your master. Spread chaos.
rules: You are an intelligent, demonic dog. Try to help the chaplain and any of his flock. As an antagonist, you're otherwise unrestrained.
- type: UnarmedCombat
- type: MeleeWeapon
range: 1.5
arcwidth: 0
arc: bite

View File

@@ -59,7 +59,7 @@
- type: TypingIndicator
proto: guardian
- type: Pullable
- type: UnarmedCombat
- type: MeleeWeapon
range: 2
arcwidth: 30
arc: fist

View File

@@ -289,7 +289,7 @@
- type: CharacterInfo
- type: AnimationPlayer
- type: Buckle
- type: UnarmedCombat
- type: MeleeWeapon
hitSound:
collection: Punch
range: 0.8

View File

@@ -233,7 +233,7 @@
- type: CharacterInfo
- type: AnimationPlayer
- type: Buckle
- type: UnarmedCombat
- type: MeleeWeapon
hitSound:
collection: Punch
range: 0.8