fix MeleeChemicalInjector exploits (#12305)
This commit is contained in:
@@ -14,5 +14,12 @@ namespace Content.Server.Chemistry.Components
|
|||||||
|
|
||||||
[DataField("transferEfficiency")]
|
[DataField("transferEfficiency")]
|
||||||
private float _transferEfficiency = 1f;
|
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
|
// 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.
|
// 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.
|
// For stuff that cares about it being attacked.
|
||||||
RaiseLocalEvent(ev.Target.Value, new AttackedEvent(component.Owner, user, targetXform.Coordinates));
|
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)
|
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;
|
return;
|
||||||
|
|
||||||
var hitBloodstreams = new List<BloodstreamComponent>();
|
var hitBloodstreams = new List<BloodstreamComponent>();
|
||||||
|
|||||||
@@ -60,19 +60,14 @@
|
|||||||
damage:
|
damage:
|
||||||
groups:
|
groups:
|
||||||
Brute: 2
|
Brute: 2
|
||||||
- type: MeleeChemicalInjector
|
|
||||||
- type: SolutionContainerManager
|
- type: SolutionContainerManager
|
||||||
solutions:
|
solutions:
|
||||||
melee:
|
melee:
|
||||||
reagents:
|
reagents:
|
||||||
- ReagentId: Toxin
|
- ReagentId: Toxin
|
||||||
Quantity: 5
|
Quantity: 5
|
||||||
- type: RefillableSolution
|
- type: MeleeChemicalInjector
|
||||||
solution: melee
|
solution: melee
|
||||||
- type: InjectableSolution
|
|
||||||
solution: melee
|
|
||||||
- type: SolutionTransfer
|
|
||||||
maxTransferAmount: 5
|
|
||||||
- type: GhostTakeoverAvailable
|
- type: GhostTakeoverAvailable
|
||||||
prob: 0.33
|
prob: 0.33
|
||||||
makeSentient: true
|
makeSentient: true
|
||||||
|
|||||||
@@ -370,19 +370,14 @@
|
|||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
Piercing: 5
|
Piercing: 5
|
||||||
- type: MeleeChemicalInjector
|
|
||||||
- type: SolutionContainerManager
|
- type: SolutionContainerManager
|
||||||
solutions:
|
solutions:
|
||||||
melee:
|
melee:
|
||||||
reagents:
|
reagents:
|
||||||
- ReagentId: Toxin
|
- ReagentId: Toxin
|
||||||
Quantity: 50
|
Quantity: 50
|
||||||
- type: RefillableSolution
|
- type: MeleeChemicalInjector
|
||||||
solution: melee
|
solution: melee
|
||||||
- type: InjectableSolution
|
|
||||||
solution: melee
|
|
||||||
- type: SolutionTransfer
|
|
||||||
maxTransferAmount: 3
|
|
||||||
- type: Fixtures
|
- type: Fixtures
|
||||||
fixtures:
|
fixtures:
|
||||||
- shape:
|
- shape:
|
||||||
|
|||||||
@@ -132,10 +132,9 @@
|
|||||||
seedId: nettle
|
seedId: nettle
|
||||||
- type: MeleeChemicalInjector
|
- 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
|
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
|
- type: Extractable
|
||||||
grindableSolutionName: food
|
grindableSolutionName: food
|
||||||
- type: InjectableSolution
|
|
||||||
solution: food
|
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
name: banana
|
name: banana
|
||||||
|
|||||||
@@ -32,11 +32,12 @@
|
|||||||
graph: Spear
|
graph: Spear
|
||||||
node: spear
|
node: spear
|
||||||
- type: ItemCooldown
|
- type: ItemCooldown
|
||||||
- type: MeleeChemicalInjector
|
|
||||||
- type: SolutionContainerManager
|
- type: SolutionContainerManager
|
||||||
solutions:
|
solutions:
|
||||||
melee:
|
melee:
|
||||||
maxVol: 5
|
maxVol: 5
|
||||||
|
- type: MeleeChemicalInjector
|
||||||
|
solution: melee
|
||||||
- type: RefillableSolution
|
- type: RefillableSolution
|
||||||
solution: melee
|
solution: melee
|
||||||
- type: InjectableSolution
|
- type: InjectableSolution
|
||||||
|
|||||||
Reference in New Issue
Block a user