diff --git a/Content.Client/Entry/IgnoredComponents.cs b/Content.Client/Entry/IgnoredComponents.cs index 4c23856a4c..ae7d931da8 100644 --- a/Content.Client/Entry/IgnoredComponents.cs +++ b/Content.Client/Entry/IgnoredComponents.cs @@ -120,7 +120,6 @@ namespace Content.Client.Entry "EmptyOnMachineDeconstruct", "ExplodeOnTrigger", "Utensil", - "UnarmedCombat", "TimedSpawner", "NodeContainer", "PowerSupplier", diff --git a/Content.Server/AI/Operators/Combat/Melee/UnarmedCombatOperator.cs b/Content.Server/AI/Operators/Combat/Melee/UnarmedCombatOperator.cs index 39695b768b..6ee0ec1fbe 100644 --- a/Content.Server/AI/Operators/Combat/Melee/UnarmedCombatOperator.cs +++ b/Content.Server/AI/Operators/Combat/Melee/UnarmedCombatOperator.cs @@ -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; } diff --git a/Content.Server/AI/Utility/Actions/Combat/Melee/UnarmedAttackEntity.cs b/Content.Server/AI/Utility/Actions/Combat/Melee/UnarmedAttackEntity.cs index 56ba6abd56..d1d089f20c 100644 --- a/Content.Server/AI/Utility/Actions/Combat/Melee/UnarmedAttackEntity.cs +++ b/Content.Server/AI/Utility/Actions/Combat/Melee/UnarmedAttackEntity.cs @@ -20,7 +20,7 @@ namespace Content.Server.AI.Utility.Actions.Combat.Melee public override void SetupOperators(Blackboard context) { MoveToEntityOperator moveOperator; - if (IoCManager.Resolve().TryGetComponent(Owner, out UnarmedCombatComponent? unarmedCombatComponent)) + if (IoCManager.Resolve().TryGetComponent(Owner, out MeleeWeaponComponent? unarmedCombatComponent)) { moveOperator = new MoveToEntityOperator(Owner, Target, unarmedCombatComponent.Range - 0.01f); } diff --git a/Content.Server/AI/Utility/Considerations/Combat/Melee/CanUnarmedCombatCon.cs b/Content.Server/AI/Utility/Considerations/Combat/Melee/CanUnarmedCombatCon.cs index 3bb6001067..ab8548d0dc 100644 --- a/Content.Server/AI/Utility/Considerations/Combat/Melee/CanUnarmedCombatCon.cs +++ b/Content.Server/AI/Utility/Considerations/Combat/Melee/CanUnarmedCombatCon.cs @@ -10,7 +10,7 @@ namespace Content.Server.AI.Utility.Considerations.Combat.Melee { var entityManager = IoCManager.Resolve(); var entity = context.GetState().GetValue(); - return entityManager.HasComponent(entity) ? 1.0f : 0.0f; + return entityManager.HasComponent(entity) ? 1.0f : 0.0f; } } } diff --git a/Content.Server/Weapon/Melee/Components/MeleeWeaponComponent.cs b/Content.Server/Weapon/Melee/Components/MeleeWeaponComponent.cs index 6841c91b3a..c773d2f8e9 100644 --- a/Content.Server/Weapon/Melee/Components/MeleeWeaponComponent.cs +++ b/Content.Server/Weapon/Melee/Components/MeleeWeaponComponent.cs @@ -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")] diff --git a/Content.Server/Weapon/Melee/Components/UnarmedCombatComponent.cs b/Content.Server/Weapon/Melee/Components/UnarmedCombatComponent.cs deleted file mode 100644 index a59ac9a1e6..0000000000 --- a/Content.Server/Weapon/Melee/Components/UnarmedCombatComponent.cs +++ /dev/null @@ -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 - { - } -} diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index 9ba6773557..7773438083 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -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 diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/bear.yml b/Resources/Prototypes/Entities/Mobs/NPCs/bear.yml index c503b57a87..636316f068 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/bear.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/bear.yml @@ -55,7 +55,7 @@ - type: Temperature heatDamageThreshold: 500 coldDamageThreshold: 0 - - type: UnarmedCombat + - type: MeleeWeapon range: 0.5 arcwidth: 0 arc: claw diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml b/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml index dd183bc2af..774d375ca7 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml @@ -45,7 +45,7 @@ spawned: - id: FoodMeat amount: 2 - - type: UnarmedCombat + - type: MeleeWeapon range: 1.5 arcwidth: 0 arc: bite diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/mimic.yml b/Resources/Prototypes/Entities/Mobs/NPCs/mimic.yml index 268f9a13e5..ad63d17a8a 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/mimic.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/mimic.yml @@ -36,7 +36,7 @@ - type: CharacterInfo - type: HumanoidAppearance - type: AnimationPlayer - - type: UnarmedCombat + - type: MeleeWeapon range: 1.5 arcwidth: 0 arc: fist diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml b/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml index 688e01bad0..75c325956f 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml @@ -66,7 +66,7 @@ normal: narsian crit: narsian_dead dead: narsian_dead - - type: UnarmedCombat + - type: MeleeWeapon range: 1.5 arcwidth: 0 arc: bite diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml b/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml index 606dd615c0..db9dbfe9ad 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml @@ -109,7 +109,7 @@ template: AnimalTemplate preset: AnimalPreset - type: Examiner - - type: UnarmedCombat + - type: MeleeWeapon range: 1.5 arcwidth: 0 arc: bite diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/spacetick.yml b/Resources/Prototypes/Entities/Mobs/NPCs/spacetick.yml index 7042b25c55..437bd15471 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/spacetick.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/spacetick.yml @@ -53,7 +53,7 @@ enabled: false autoPopulate: false name: action-name-disarm - - type: UnarmedCombat + - type: MeleeWeapon range: 0.5 arcwidth: 0 arc: bite diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml b/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml index 916fd6d779..a9a8b0e538 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml @@ -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 diff --git a/Resources/Prototypes/Entities/Mobs/Player/familiars.yml b/Resources/Prototypes/Entities/Mobs/Player/familiars.yml index dc10a07788..88307c5a93 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/familiars.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/familiars.yml @@ -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 diff --git a/Resources/Prototypes/Entities/Mobs/Player/guardian.yml b/Resources/Prototypes/Entities/Mobs/Player/guardian.yml index 7597e72c68..a15ccfca7b 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/guardian.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/guardian.yml @@ -59,7 +59,7 @@ - type: TypingIndicator proto: guardian - type: Pullable - - type: UnarmedCombat + - type: MeleeWeapon range: 2 arcwidth: 30 arc: fist diff --git a/Resources/Prototypes/Entities/Mobs/Species/human.yml b/Resources/Prototypes/Entities/Mobs/Species/human.yml index 162481cb8d..d5a010bc9b 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/human.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/human.yml @@ -289,7 +289,7 @@ - type: CharacterInfo - type: AnimationPlayer - type: Buckle - - type: UnarmedCombat + - type: MeleeWeapon hitSound: collection: Punch range: 0.8 diff --git a/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml b/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml index 27462c5285..047d4258dd 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml @@ -233,7 +233,7 @@ - type: CharacterInfo - type: AnimationPlayer - type: Buckle - - type: UnarmedCombat + - type: MeleeWeapon hitSound: collection: Punch range: 0.8