* 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:
Moony
2021-11-25 00:06:13 -06:00
committed by GitHub
parent 2a409de436
commit d5c5cbeaf4
12 changed files with 236 additions and 4 deletions

View 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);
}
}