prevent nettles from injecting through hardsuit (#14895)
* prevent nettles from injecting through hardsuit * pro * better * pro * pro * noob * inject popup * caution * ) * ; * 💀 * 💀 * scaf + bomb suit immune to nettle --------- Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -15,6 +15,12 @@ namespace Content.Server.Chemistry.Components
|
||||
[DataField("transferEfficiency")]
|
||||
private float _transferEfficiency = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this will inject through hardsuits or not.
|
||||
/// </summary>
|
||||
[DataField("pierceArmor"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool PierceArmor = true;
|
||||
|
||||
/// <summary>
|
||||
/// Solution to inject from.
|
||||
/// </summary>
|
||||
|
||||
@@ -15,7 +15,10 @@ using Content.Shared.Database;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Hands.Components;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.StatusEffect;
|
||||
using Content.Shared.Tag;
|
||||
using Content.Shared.Verbs;
|
||||
using Content.Shared.Weapons.Melee;
|
||||
using Content.Shared.Weapons.Melee.Events;
|
||||
@@ -35,8 +38,10 @@ public sealed class MeleeWeaponSystem : SharedMeleeWeaponSystem
|
||||
[Dependency] private readonly BloodstreamSystem _bloodstream = default!;
|
||||
[Dependency] private readonly ContestsSystem _contests = default!;
|
||||
[Dependency] private readonly ExamineSystem _examine = default!;
|
||||
[Dependency] private readonly InventorySystem _inventory = default!;
|
||||
[Dependency] private readonly LagCompensationSystem _lag = default!;
|
||||
[Dependency] private readonly SolutionContainerSystem _solutions = default!;
|
||||
[Dependency] private readonly TagSystem _tag = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -254,6 +259,13 @@ public sealed class MeleeWeaponSystem : SharedMeleeWeaponSystem
|
||||
if (Deleted(entity))
|
||||
continue;
|
||||
|
||||
// prevent deathnettles injecting through hardsuits
|
||||
if (!comp.PierceArmor && _inventory.TryGetSlotEntity(entity, "outerClothing", out var suit) && _tag.HasTag(suit.Value, "Hardsuit"))
|
||||
{
|
||||
PopupSystem.PopupEntity(Loc.GetString("melee-inject-failed-hardsuit", ("weapon", owner)), args.User, args.User, PopupType.SmallCaution);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (bloodQuery.TryGetComponent(entity, out var bloodstream))
|
||||
hitBloodstreams.Add((entity, bloodstream));
|
||||
}
|
||||
|
||||
1
Resources/Locale/en-US/weapons/melee/melee.ftl
Normal file
1
Resources/Locale/en-US/weapons/melee/melee.ftl
Normal file
@@ -0,0 +1 @@
|
||||
melee-inject-failed-hardsuit = Your {$weapon} cannot inject through hardsuits!
|
||||
@@ -163,6 +163,9 @@
|
||||
- type: ExplosionResistance
|
||||
damageCoefficient: 0.8
|
||||
- type: GroupExamine
|
||||
- type: Tag
|
||||
tags:
|
||||
- Hardsuit
|
||||
|
||||
- type: entity
|
||||
parent: ClothingOuterBaseLarge
|
||||
|
||||
@@ -74,6 +74,9 @@
|
||||
containers:
|
||||
toggleable-clothing: !type:ContainerSlot {}
|
||||
- type: GroupExamine
|
||||
- type: Tag
|
||||
tags:
|
||||
- Hardsuit
|
||||
|
||||
- type: entity
|
||||
abstract: true
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
- type: ExplosionResistance
|
||||
damageCoefficient: 0.65
|
||||
- type: GroupExamine
|
||||
- type: Tag
|
||||
tags:
|
||||
- Hardsuit
|
||||
|
||||
- type: entity
|
||||
parent: ClothingOuterEVASuitBase
|
||||
|
||||
@@ -133,6 +133,7 @@
|
||||
- type: MeleeChemicalInjector
|
||||
transferAmount: 6 #To OD someone you would need 2 nettles and about 6-7 hits, the DOT is likely to crit them if they are running away with almost no health
|
||||
solution: food
|
||||
pierceArmor: false
|
||||
- type: Extractable
|
||||
grindableSolutionName: food
|
||||
|
||||
|
||||
@@ -293,6 +293,9 @@
|
||||
- type: Tag
|
||||
id: Handcuffs
|
||||
|
||||
- type: Tag
|
||||
id: Hardsuit # Prevent melee injectors that can't penetrate hardsuits from injecting the wearer (nettles)
|
||||
|
||||
- type: Tag
|
||||
id: Head
|
||||
|
||||
|
||||
Reference in New Issue
Block a user