Removed Stupidness
This commit is contained in:
parent
147c301b68
commit
0dcdf48d35
|
|
@ -76,15 +76,10 @@ public sealed class MassSleepPowerSystem : SharedMassSleepPowerSystem
|
|||
|
||||
foreach (var target in _lookup.GetEntitiesInRange(args.User, psionic.Comp.Radius))
|
||||
{
|
||||
if (args.Used == target
|
||||
|| !Psionic.CanBeTargeted(target)
|
||||
|| !_statusEffects.TrySetStatusEffectDuration(target, MassSleepStatusEffect, out var effect, psionic.Comp.Duration)
|
||||
|| !TryComp<RegenerativeSleepingStatusEffectComponent>(effect, out var statusEffect))
|
||||
if (args.Used != target && Psionic.CanBeTargeted(target))
|
||||
continue;
|
||||
|
||||
statusEffect.Quantity = psionic.Comp.Quantity;
|
||||
statusEffect.ReagentId = psionic.Comp.ReagentId;
|
||||
Dirty(effect.Value, statusEffect);
|
||||
|
||||
_statusEffects.TryUpdateStatusEffectDuration(target, MassSleepStatusEffect, psionic.Comp.Duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,12 +16,12 @@ public sealed partial class RegenerativeSleepingStatusEffectComponent : Componen
|
|||
/// <summary>
|
||||
/// The reagent ID that will be inserted into the bloodstream.
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
[DataField]
|
||||
public string ReagentId = "Prometheum";
|
||||
|
||||
/// <summary>
|
||||
/// The amount of reagent to be inserted every second.
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
public FixedPoint2 Quantity = 0.5f;
|
||||
[DataField(required: true)]
|
||||
public FixedPoint2 Quantity;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,3 +41,4 @@
|
|||
name: forced to sleep by mass sleep power
|
||||
components:
|
||||
- type: RegenerativeSleepingStatusEffect
|
||||
quantity: 0.5
|
||||
|
|
|
|||
Loading…
Reference in New Issue