Adding new Cryogenics Reagent - Opporozidone (Attempt 2) (#24074)
* Fixing mistakes * How did I make the same mistake twice --------- Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
@@ -149,6 +149,29 @@ public sealed class RottingSystem : SharedRottingSystem
|
|||||||
args.Handled = component.CurrentTemperature < Atmospherics.T0C + 0.85f;
|
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>
|
/// <summary>
|
||||||
/// Is anything speeding up the decay?
|
/// Is anything speeding up the decay?
|
||||||
/// e.g. buried in a grave
|
/// e.g. buried in a grave
|
||||||
|
|||||||
31
Content.Server/Chemistry/ReagentEffects/ReduceRotting.cs
Normal file
31
Content.Server/Chemistry/ReagentEffects/ReduceRotting.cs
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -339,6 +339,12 @@ reagent-effect-guidebook-innoculate-zombie-infection =
|
|||||||
*[other] cure
|
*[other] cure
|
||||||
} an ongoing zombie infection, and provides immunity to future infections
|
} 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 =
|
reagent-effect-guidebook-missing =
|
||||||
{ $chance ->
|
{ $chance ->
|
||||||
[1] Causes
|
[1] Causes
|
||||||
|
|||||||
@@ -127,6 +127,9 @@ reagent-desc-pyrazine = Efficiently heals burns from the hottest of fires. Cause
|
|||||||
reagent-name-insuzine = insuzine
|
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-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-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.
|
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.
|
||||||
|
|
||||||
|
|||||||
@@ -1149,6 +1149,27 @@
|
|||||||
- !type:ReagentThreshold
|
- !type:ReagentThreshold
|
||||||
min: 12
|
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
|
- type: reagent
|
||||||
id: Necrosol
|
id: Necrosol
|
||||||
name: reagent-name-necrosol
|
name: reagent-name-necrosol
|
||||||
|
|||||||
@@ -557,6 +557,19 @@
|
|||||||
products:
|
products:
|
||||||
Insuzine: 3
|
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
|
- type: reaction
|
||||||
id: Necrosol
|
id: Necrosol
|
||||||
impact: Medium
|
impact: Medium
|
||||||
|
|||||||
Reference in New Issue
Block a user