fix MeleeChemicalInjector exploits (#12305)

This commit is contained in:
Rane
2022-10-30 22:04:51 -04:00
committed by GitHub
parent 4616a9f7e7
commit 8f4bd8b83b
6 changed files with 14 additions and 17 deletions

View File

@@ -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";
} }
} }

View File

@@ -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>();

View File

@@ -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

View File

@@ -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:

View File

@@ -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

View File

@@ -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