args.Handled = component.CurrentTemperature < Atmospherics.T0C + 0.85f;
}
+
+ public void ReduceAccumulator(EntityUid uid, TimeSpan time)
+ {
+ if (!TryComp<PerishableComponent>(uid, out var perishable))
+ return;
+
+ if (!TryComp<RottingComponent>(uid, out var rotting))
+ {
+ perishable.RotAccumulator -= time;
+ return;
+ }
+ var total = (rotting.TotalRotTime + perishable.RotAccumulator) - time;
+
+ if (total < perishable.RotAfter)
+ {
+ RemCompDeferred(uid, rotting);
+ perishable.RotAccumulator = total;
+ }
+
+ else
+ rotting.TotalRotTime = total - perishable.RotAfter;
+ }
+
/// <summary>
/// Is anything speeding up the decay?
/// e.g. buried in a grave
--- /dev/null
+using Content.Shared.Chemistry.Reagent;
+using JetBrains.Annotations;
+using Robust.Shared.Prototypes;
+using Content.Server.Atmos.Rotting;
+
+namespace Content.Server.Chemistry.ReagentEffects
+{
+ /// <summary>
+ /// Reduces the rotting accumulator on the patient, making them revivable.
+ /// </summary>
+ [UsedImplicitly]
+ public sealed partial class ReduceRotting : ReagentEffect
+ {
+ [DataField("seconds")]
+ public double RottingAmount = 10;
+
+ protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys)
+ => Loc.GetString("reagent-effect-guidebook-reduce-rotting",
+ ("chance", Probability),
+ ("time", RottingAmount));
+ public override void Effect(ReagentEffectArgs args)
+ {
+ if (args.Scale != 1f)
+ return;
+
+ var rottingSys = args.EntityManager.EntitySysManager.GetEntitySystem<RottingSystem>();
+
+ rottingSys.ReduceAccumulator(args.SolutionEntity, TimeSpan.FromSeconds(RottingAmount));
+ }
+ }
+}
*[other] cure
} an ongoing zombie infection, and provides immunity to future infections
+reagent-effect-guidebook-reduce-rotting =
+ { $chance ->
+ [1] Regenerates
+ *[other] regenerate
+ } {NATURALFIXED($time, 3)} {MANY("second", $time)} of rotting
+
reagent-effect-guidebook-missing =
{ $chance ->
[1] Causes
reagent-name-insuzine = insuzine
reagent-desc-insuzine = Rapidly repairs dead tissue caused by electrocution, but cools you slightly. Completely freezes the patient when overdosed.
+reagent-name-opporozidone = opporozidone
+reagent-desc-opporozidone= A difficult to synthesize cryogenic drug used to regenerate rotting tissue and brain matter.
+
reagent-name-necrosol = necrosol
reagent-desc-necrosol = A necrotic substance that seems to be able to heal frozen corpses. It can treat and rejuvenate plants when applied in small doses.
conditions:
- !type:ReagentThreshold
min: 12
+
+- type: reagent
+ id: Opporozidone #Name based of an altered version of the startreck chem "Opporozine"
+ name: reagent-name-opporozidone
+ group: Medicine
+ desc: reagent-desc-opporozidone
+ physicalDesc: reagent-physical-desc-sickly
+ flavor: acid
+ color: "#b5e36d"
+ worksOnTheDead: true
+ metabolisms:
+ Medicine:
+ effects:
+ - !type:ReduceRotting
+ seconds: 20
+ conditions:
+ #Patient must be dead and in a cryo tube (or something cold)
+ - !type:Temperature
+ max: 150.0
+ - !type:MobStateCondition
+ mobstate: Dead
- type: reagent
id: Necrosol
products:
Insuzine: 3
+- type: reaction
+ id: Opporozidone
+ minTemp: 400 #Maybe if a method of reducing reagent temp exists one day, this could be -50
+ reactants:
+ Cognizine:
+ amount: 1
+ Plasma:
+ amount: 2
+ Doxarubixadone:
+ amount: 1
+ products:
+ Opporozidone: 3
+
- type: reaction
id: Necrosol
impact: Medium