Status effects fix. Refresh the status effect cooldown. (#5708)
This commit is contained in:
@@ -15,12 +15,17 @@ public class Electrocute : ReagentEffect
|
||||
|
||||
[DataField("electrocuteDamageScale")] public int ElectrocuteDamageScale = 5;
|
||||
|
||||
/// <remarks>
|
||||
/// true - refresh electrocute time, false - accumulate electrocute time
|
||||
/// </remarks>
|
||||
[DataField("refresh")] public bool Refresh = true;
|
||||
|
||||
public override bool ShouldLog => true;
|
||||
|
||||
public override void Effect(ReagentEffectArgs args)
|
||||
{
|
||||
EntitySystem.Get<ElectrocutionSystem>().TryDoElectrocution(args.SolutionEntity, null,
|
||||
Math.Max((args.Quantity * ElectrocuteDamageScale).Int(), 1), TimeSpan.FromSeconds(ElectrocuteTime));
|
||||
Math.Max((args.Quantity * ElectrocuteDamageScale).Int(), 1), TimeSpan.FromSeconds(ElectrocuteTime), Refresh);
|
||||
|
||||
args.Source?.RemoveReagent(args.Reagent.ID, args.Quantity);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user