buzz buzz (#5490)
* buzz buzz * Darn now i'm all out of periods thanks mirror fix toy issue * desc edits. * rng and alphabee * adds some missed parens
This commit is contained in:
25
Content.Server/Chemistry/ReagentEffects/Electrocute.cs
Normal file
25
Content.Server/Chemistry/ReagentEffects/Electrocute.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using Content.Server.Atmos.Components;
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Server.Electrocution;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
|
||||
namespace Content.Server.Chemistry.ReagentEffects;
|
||||
|
||||
public class Electrocute : ReagentEffect
|
||||
{
|
||||
[DataField("electrocuteTime")] public int ElectrocuteTime = 2;
|
||||
|
||||
[DataField("electrocuteDamageScale")] public int ElectrocuteDamageScale = 5;
|
||||
|
||||
public override void Effect(ReagentEffectArgs args)
|
||||
{
|
||||
EntitySystem.Get<ElectrocutionSystem>().TryDoElectrocution(args.SolutionEntity, null,
|
||||
Math.Max((args.Quantity * ElectrocuteDamageScale).Int(), 1), TimeSpan.FromSeconds(ElectrocuteTime));
|
||||
|
||||
args.Source?.RemoveReagent(args.Reagent.ID, args.Quantity);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user