Adds metabolism effects to pretty much every chem already in the game (#5349)

* pass 1

* a little more reagent effect for breakfast

* move lots of stuff around

* implements all medicines

* implement all cleaning & elements

* implement toxins/pyrotechnic

* p

* linter fixies

* fixes + narcotic balancing

* fix and standardize

* reviews

* things
This commit is contained in:
mirrorcult
2021-11-20 16:47:53 -07:00
committed by GitHub
parent 8c64450305
commit 181fd055ce
36 changed files with 1107 additions and 532 deletions

View File

@@ -0,0 +1,28 @@
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Damage;
using Content.Shared.FixedPoint;
using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Chemistry.ReagentEffectConditions
{
public class TotalDamage : ReagentEffectCondition
{
[DataField("max")]
public FixedPoint2 Max = FixedPoint2.MaxValue;
[DataField("min")]
public FixedPoint2 Min = FixedPoint2.Zero;
public override bool Condition(ReagentEffectArgs args)
{
if (args.EntityManager.TryGetComponent(args.SolutionEntity, out DamageableComponent damage))
{
var total = damage.TotalDamage;
if (total > Min && total < Max)
return true;
}
return false;
}
}
}