Kill unarmed combat comp (#8420)
This commit is contained in:
@@ -120,7 +120,6 @@ namespace Content.Client.Entry
|
|||||||
"EmptyOnMachineDeconstruct",
|
"EmptyOnMachineDeconstruct",
|
||||||
"ExplodeOnTrigger",
|
"ExplodeOnTrigger",
|
||||||
"Utensil",
|
"Utensil",
|
||||||
"UnarmedCombat",
|
|
||||||
"TimedSpawner",
|
"TimedSpawner",
|
||||||
"NodeContainer",
|
"NodeContainer",
|
||||||
"PowerSupplier",
|
"PowerSupplier",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace Content.Server.AI.Operators.Combat.Melee
|
|||||||
|
|
||||||
private readonly EntityUid _owner;
|
private readonly EntityUid _owner;
|
||||||
private readonly EntityUid _target;
|
private readonly EntityUid _target;
|
||||||
private UnarmedCombatComponent? _unarmedCombat;
|
private MeleeWeaponComponent? _unarmedCombat;
|
||||||
|
|
||||||
public UnarmedCombatOperator(EntityUid owner, EntityUid target, float burstTime = 1.0f)
|
public UnarmedCombatOperator(EntityUid owner, EntityUid target, float burstTime = 1.0f)
|
||||||
{
|
{
|
||||||
@@ -41,7 +41,7 @@ namespace Content.Server.AI.Operators.Combat.Melee
|
|||||||
combatModeComponent.IsInCombatMode = true;
|
combatModeComponent.IsInCombatMode = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_entMan.TryGetComponent(_owner, out UnarmedCombatComponent? unarmedCombatComponent))
|
if (_entMan.TryGetComponent(_owner, out MeleeWeaponComponent? unarmedCombatComponent))
|
||||||
{
|
{
|
||||||
_unarmedCombat = unarmedCombatComponent;
|
_unarmedCombat = unarmedCombatComponent;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace Content.Server.AI.Utility.Actions.Combat.Melee
|
|||||||
public override void SetupOperators(Blackboard context)
|
public override void SetupOperators(Blackboard context)
|
||||||
{
|
{
|
||||||
MoveToEntityOperator moveOperator;
|
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);
|
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 entityManager = IoCManager.Resolve<IEntityManager>();
|
||||||
var entity = context.GetState<SelfState>().GetValue();
|
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
|
namespace Content.Server.Weapon.Melee.Components
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
[Virtual]
|
public sealed class MeleeWeaponComponent : Component
|
||||||
public class MeleeWeaponComponent : Component
|
|
||||||
{
|
{
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
[DataField("hitSound")]
|
[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
|
bloodMaxVolume: 50
|
||||||
- type: ReplacementAccent
|
- type: ReplacementAccent
|
||||||
accent: mouse
|
accent: mouse
|
||||||
- type: UnarmedCombat
|
- type: MeleeWeapon
|
||||||
range: 1.5
|
range: 1.5
|
||||||
arcwidth: 0
|
arcwidth: 0
|
||||||
arc: bite
|
arc: bite
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
enabled: false
|
enabled: false
|
||||||
autoPopulate: false
|
autoPopulate: false
|
||||||
name: action-name-disarm
|
name: action-name-disarm
|
||||||
- type: UnarmedCombat
|
- type: MeleeWeapon
|
||||||
range: 0.3
|
range: 0.3
|
||||||
arcwidth: 0
|
arcwidth: 0
|
||||||
arc: bite
|
arc: bite
|
||||||
@@ -581,7 +581,7 @@
|
|||||||
normal: kangaroo-boxing
|
normal: kangaroo-boxing
|
||||||
crit: kangaroo-boxing-dead
|
crit: kangaroo-boxing-dead
|
||||||
dead: kangaroo-boxing-dead
|
dead: kangaroo-boxing-dead
|
||||||
- type: UnarmedCombat
|
- type: MeleeWeapon
|
||||||
range: 1.5
|
range: 1.5
|
||||||
arcwidth: 0
|
arcwidth: 0
|
||||||
arc: claw
|
arc: claw
|
||||||
@@ -1061,7 +1061,7 @@
|
|||||||
spawned:
|
spawned:
|
||||||
- id: FoodMeatPenguin
|
- id: FoodMeatPenguin
|
||||||
amount: 3
|
amount: 3
|
||||||
- type: UnarmedCombat
|
- type: MeleeWeapon
|
||||||
range: 0.5
|
range: 0.5
|
||||||
arcwidth: 0
|
arcwidth: 0
|
||||||
arc: bite
|
arc: bite
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
- type: Temperature
|
- type: Temperature
|
||||||
heatDamageThreshold: 500
|
heatDamageThreshold: 500
|
||||||
coldDamageThreshold: 0
|
coldDamageThreshold: 0
|
||||||
- type: UnarmedCombat
|
- type: MeleeWeapon
|
||||||
range: 0.5
|
range: 0.5
|
||||||
arcwidth: 0
|
arcwidth: 0
|
||||||
arc: claw
|
arc: claw
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
spawned:
|
spawned:
|
||||||
- id: FoodMeat
|
- id: FoodMeat
|
||||||
amount: 2
|
amount: 2
|
||||||
- type: UnarmedCombat
|
- type: MeleeWeapon
|
||||||
range: 1.5
|
range: 1.5
|
||||||
arcwidth: 0
|
arcwidth: 0
|
||||||
arc: bite
|
arc: bite
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
- type: CharacterInfo
|
- type: CharacterInfo
|
||||||
- type: HumanoidAppearance
|
- type: HumanoidAppearance
|
||||||
- type: AnimationPlayer
|
- type: AnimationPlayer
|
||||||
- type: UnarmedCombat
|
- type: MeleeWeapon
|
||||||
range: 1.5
|
range: 1.5
|
||||||
arcwidth: 0
|
arcwidth: 0
|
||||||
arc: fist
|
arc: fist
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
normal: narsian
|
normal: narsian
|
||||||
crit: narsian_dead
|
crit: narsian_dead
|
||||||
dead: narsian_dead
|
dead: narsian_dead
|
||||||
- type: UnarmedCombat
|
- type: MeleeWeapon
|
||||||
range: 1.5
|
range: 1.5
|
||||||
arcwidth: 0
|
arcwidth: 0
|
||||||
arc: bite
|
arc: bite
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
template: AnimalTemplate
|
template: AnimalTemplate
|
||||||
preset: AnimalPreset
|
preset: AnimalPreset
|
||||||
- type: Examiner
|
- type: Examiner
|
||||||
- type: UnarmedCombat
|
- type: MeleeWeapon
|
||||||
range: 1.5
|
range: 1.5
|
||||||
arcwidth: 0
|
arcwidth: 0
|
||||||
arc: bite
|
arc: bite
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
enabled: false
|
enabled: false
|
||||||
autoPopulate: false
|
autoPopulate: false
|
||||||
name: action-name-disarm
|
name: action-name-disarm
|
||||||
- type: UnarmedCombat
|
- type: MeleeWeapon
|
||||||
range: 0.5
|
range: 0.5
|
||||||
arcwidth: 0
|
arcwidth: 0
|
||||||
arc: bite
|
arc: bite
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
types:
|
types:
|
||||||
Bloodloss:
|
Bloodloss:
|
||||||
-0.25
|
-0.25
|
||||||
- type: UnarmedCombat
|
- type: MeleeWeapon
|
||||||
range: 1.5
|
range: 1.5
|
||||||
arcwidth: 0
|
arcwidth: 0
|
||||||
arc: claw
|
arc: claw
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
- type: AiFactionTag
|
- type: AiFactionTag
|
||||||
factions:
|
factions:
|
||||||
- Xeno
|
- Xeno
|
||||||
- type: UnarmedCombat
|
- type: MeleeWeapon
|
||||||
range: 1.5
|
range: 1.5
|
||||||
arcwidth: 0
|
arcwidth: 0
|
||||||
arc: bite
|
arc: bite
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
name: Cerberus, Evil Familiar
|
name: Cerberus, Evil Familiar
|
||||||
description: Obey your master. Spread chaos.
|
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.
|
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
|
range: 1.5
|
||||||
arcwidth: 0
|
arcwidth: 0
|
||||||
arc: bite
|
arc: bite
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
- type: TypingIndicator
|
- type: TypingIndicator
|
||||||
proto: guardian
|
proto: guardian
|
||||||
- type: Pullable
|
- type: Pullable
|
||||||
- type: UnarmedCombat
|
- type: MeleeWeapon
|
||||||
range: 2
|
range: 2
|
||||||
arcwidth: 30
|
arcwidth: 30
|
||||||
arc: fist
|
arc: fist
|
||||||
|
|||||||
@@ -289,7 +289,7 @@
|
|||||||
- type: CharacterInfo
|
- type: CharacterInfo
|
||||||
- type: AnimationPlayer
|
- type: AnimationPlayer
|
||||||
- type: Buckle
|
- type: Buckle
|
||||||
- type: UnarmedCombat
|
- type: MeleeWeapon
|
||||||
hitSound:
|
hitSound:
|
||||||
collection: Punch
|
collection: Punch
|
||||||
range: 0.8
|
range: 0.8
|
||||||
|
|||||||
@@ -233,7 +233,7 @@
|
|||||||
- type: CharacterInfo
|
- type: CharacterInfo
|
||||||
- type: AnimationPlayer
|
- type: AnimationPlayer
|
||||||
- type: Buckle
|
- type: Buckle
|
||||||
- type: UnarmedCombat
|
- type: MeleeWeapon
|
||||||
hitSound:
|
hitSound:
|
||||||
collection: Punch
|
collection: Punch
|
||||||
range: 0.8
|
range: 0.8
|
||||||
|
|||||||
Reference in New Issue
Block a user