fix MeleeChemicalInjector exploits (#12305)
This commit is contained in:
@@ -14,5 +14,12 @@ namespace Content.Server.Chemistry.Components
|
||||
|
||||
[DataField("transferEfficiency")]
|
||||
private float _transferEfficiency = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// Solution to inject from.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("solution")]
|
||||
public string Solution { get; set; } = "default";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ public sealed class MeleeWeaponSystem : SharedMeleeWeaponSystem
|
||||
|
||||
// If the user is using a long-range weapon, this probably shouldn't be happening? But I'll interpret melee as a
|
||||
// somewhat messy scuffle. See also, heavy attacks.
|
||||
_interaction.DoContactInteraction(user, ev.Target);
|
||||
_interaction.DoContactInteraction(user, ev.Target);
|
||||
|
||||
// For stuff that cares about it being attacked.
|
||||
RaiseLocalEvent(ev.Target.Value, new AttackedEvent(component.Owner, user, targetXform.Coordinates));
|
||||
@@ -555,7 +555,7 @@ public sealed class MeleeWeaponSystem : SharedMeleeWeaponSystem
|
||||
|
||||
private void OnChemicalInjectorHit(EntityUid owner, MeleeChemicalInjectorComponent comp, MeleeHitEvent args)
|
||||
{
|
||||
if (!_solutions.TryGetInjectableSolution(owner, out var solutionContainer))
|
||||
if (!_solutions.TryGetSolution(owner, comp.Solution, out var solutionContainer))
|
||||
return;
|
||||
|
||||
var hitBloodstreams = new List<BloodstreamComponent>();
|
||||
|
||||
@@ -60,19 +60,14 @@
|
||||
damage:
|
||||
groups:
|
||||
Brute: 2
|
||||
- type: MeleeChemicalInjector
|
||||
- type: SolutionContainerManager
|
||||
solutions:
|
||||
melee:
|
||||
reagents:
|
||||
- ReagentId: Toxin
|
||||
Quantity: 5
|
||||
- type: RefillableSolution
|
||||
- type: MeleeChemicalInjector
|
||||
solution: melee
|
||||
- type: InjectableSolution
|
||||
solution: melee
|
||||
- type: SolutionTransfer
|
||||
maxTransferAmount: 5
|
||||
- type: GhostTakeoverAvailable
|
||||
prob: 0.33
|
||||
makeSentient: true
|
||||
|
||||
@@ -370,19 +370,14 @@
|
||||
damage:
|
||||
types:
|
||||
Piercing: 5
|
||||
- type: MeleeChemicalInjector
|
||||
- type: SolutionContainerManager
|
||||
solutions:
|
||||
melee:
|
||||
reagents:
|
||||
- ReagentId: Toxin
|
||||
Quantity: 50
|
||||
- type: RefillableSolution
|
||||
- type: MeleeChemicalInjector
|
||||
solution: melee
|
||||
- type: InjectableSolution
|
||||
solution: melee
|
||||
- type: SolutionTransfer
|
||||
maxTransferAmount: 3
|
||||
- type: Fixtures
|
||||
fixtures:
|
||||
- shape:
|
||||
|
||||
@@ -132,10 +132,9 @@
|
||||
seedId: nettle
|
||||
- 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
|
||||
- type: Extractable
|
||||
grindableSolutionName: food
|
||||
- type: InjectableSolution
|
||||
solution: food
|
||||
|
||||
- type: entity
|
||||
name: banana
|
||||
|
||||
@@ -32,11 +32,12 @@
|
||||
graph: Spear
|
||||
node: spear
|
||||
- type: ItemCooldown
|
||||
- type: MeleeChemicalInjector
|
||||
- type: SolutionContainerManager
|
||||
solutions:
|
||||
melee:
|
||||
maxVol: 5
|
||||
- type: MeleeChemicalInjector
|
||||
solution: melee
|
||||
- type: RefillableSolution
|
||||
solution: melee
|
||||
- type: InjectableSolution
|
||||
|
||||
Reference in New Issue
Block a user