Scale other needed metabolism reagents (#12005)
Closes https://github.com/space-wizards/space-station-14/issues/7434
This commit is contained in:
@@ -40,17 +40,21 @@ namespace Content.Server.Chemistry.ReagentEffects.StatusEffects
|
||||
public override void Effect(ReagentEffectArgs args)
|
||||
{
|
||||
var statusSys = args.EntityManager.EntitySysManager.GetEntitySystem<StatusEffectsSystem>();
|
||||
|
||||
var time = Time;
|
||||
time *= args.Scale;
|
||||
|
||||
if (Type == StatusEffectMetabolismType.Add && Component != String.Empty)
|
||||
{
|
||||
statusSys.TryAddStatusEffect(args.SolutionEntity, Key, TimeSpan.FromSeconds(Time), Refresh, Component);
|
||||
statusSys.TryAddStatusEffect(args.SolutionEntity, Key, TimeSpan.FromSeconds(time), Refresh, Component);
|
||||
}
|
||||
else if (Type == StatusEffectMetabolismType.Remove)
|
||||
{
|
||||
statusSys.TryRemoveTime(args.SolutionEntity, Key, TimeSpan.FromSeconds(Time));
|
||||
statusSys.TryRemoveTime(args.SolutionEntity, Key, TimeSpan.FromSeconds(time));
|
||||
}
|
||||
else if (Type == StatusEffectMetabolismType.Set)
|
||||
{
|
||||
statusSys.TrySetTime(args.SolutionEntity, Key, TimeSpan.FromSeconds(Time));
|
||||
statusSys.TrySetTime(args.SolutionEntity, Key, TimeSpan.FromSeconds(time));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user