Kill unarmed combat comp (#8420)
This commit is contained in:
@@ -120,7 +120,6 @@ namespace Content.Client.Entry
|
||||
"EmptyOnMachineDeconstruct",
|
||||
"ExplodeOnTrigger",
|
||||
"Utensil",
|
||||
"UnarmedCombat",
|
||||
"TimedSpawner",
|
||||
"NodeContainer",
|
||||
"PowerSupplier",
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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")]
|
||||
|
||||
@@ -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
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
- type: Temperature
|
||||
heatDamageThreshold: 500
|
||||
coldDamageThreshold: 0
|
||||
- type: UnarmedCombat
|
||||
- type: MeleeWeapon
|
||||
range: 0.5
|
||||
arcwidth: 0
|
||||
arc: claw
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
spawned:
|
||||
- id: FoodMeat
|
||||
amount: 2
|
||||
- type: UnarmedCombat
|
||||
- type: MeleeWeapon
|
||||
range: 1.5
|
||||
arcwidth: 0
|
||||
arc: bite
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
- type: CharacterInfo
|
||||
- type: HumanoidAppearance
|
||||
- type: AnimationPlayer
|
||||
- type: UnarmedCombat
|
||||
- type: MeleeWeapon
|
||||
range: 1.5
|
||||
arcwidth: 0
|
||||
arc: fist
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
normal: narsian
|
||||
crit: narsian_dead
|
||||
dead: narsian_dead
|
||||
- type: UnarmedCombat
|
||||
- type: MeleeWeapon
|
||||
range: 1.5
|
||||
arcwidth: 0
|
||||
arc: bite
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
template: AnimalTemplate
|
||||
preset: AnimalPreset
|
||||
- type: Examiner
|
||||
- type: UnarmedCombat
|
||||
- type: MeleeWeapon
|
||||
range: 1.5
|
||||
arcwidth: 0
|
||||
arc: bite
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
enabled: false
|
||||
autoPopulate: false
|
||||
name: action-name-disarm
|
||||
- type: UnarmedCombat
|
||||
- type: MeleeWeapon
|
||||
range: 0.5
|
||||
arcwidth: 0
|
||||
arc: bite
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
- type: TypingIndicator
|
||||
proto: guardian
|
||||
- type: Pullable
|
||||
- type: UnarmedCombat
|
||||
- type: MeleeWeapon
|
||||
range: 2
|
||||
arcwidth: 30
|
||||
arc: fist
|
||||
|
||||
@@ -289,7 +289,7 @@
|
||||
- type: CharacterInfo
|
||||
- type: AnimationPlayer
|
||||
- type: Buckle
|
||||
- type: UnarmedCombat
|
||||
- type: MeleeWeapon
|
||||
hitSound:
|
||||
collection: Punch
|
||||
range: 0.8
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
- type: CharacterInfo
|
||||
- type: AnimationPlayer
|
||||
- type: Buckle
|
||||
- type: UnarmedCombat
|
||||
- type: MeleeWeapon
|
||||
hitSound:
|
||||
collection: Punch
|
||||
range: 0.8
|
||||
|
||||
Reference in New Issue
Block a user