-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from XavierSomething/Opporozidone
Added Opporozidone and ReduceRotting Effect
- Loading branch information
Showing
6 changed files
with
97 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using Content.Server.Stunnable; | ||
using Content.Shared.Chemistry.Reagent; | ||
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> | ||
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)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters