Make Reactions conserve thermal energy (#16190)

This commit is contained in:
Leon Friedrich
2023-05-13 15:10:32 +12:00
committed by GitHub
parent 99fceaf2e4
commit 0c4002bbd3
13 changed files with 70 additions and 79 deletions

View File

@@ -18,9 +18,10 @@ public sealed class Electrocute : ReagentEffect
public override void Effect(ReagentEffectArgs args)
{
EntitySystem.Get<ElectrocutionSystem>().TryDoElectrocution(args.SolutionEntity, null,
args.EntityManager.System<ElectrocutionSystem>().TryDoElectrocution(args.SolutionEntity, null,
Math.Max((args.Quantity * ElectrocuteDamageScale).Int(), 1), TimeSpan.FromSeconds(ElectrocuteTime), Refresh, ignoreInsulation: true);
args.Source?.RemoveReagent(args.Reagent.ID, args.Quantity);
if (args.Reagent != null)
args.Source?.RemoveReagent(args.Reagent.ID, args.Quantity);
}
}