Большой ребаланс милишки (#681)
* MeleeThrowOnHit rework * buff baseball bat * better mjolnir * telebaton system unhardcode + refactor + transform TelescopicBatonComponent to KnockDownOnHitComponent * fix telebaton prototype * darova * fix KnockDownOnHitSystem * chaplain weapons rebalance * fix nullrod hit sound * BloodstreamSystem cleanup * bleeding rebalance * damage rebalance * small baseball bat fix
This commit is contained in:
@@ -123,6 +123,30 @@ namespace Content.Shared.StatusEffect
|
||||
return false;
|
||||
}
|
||||
|
||||
// WD added start
|
||||
// May god forgive us
|
||||
public bool TryAddStatusEffect<T>(EntityUid uid, string key, TimeSpan time, bool refresh, Component component,
|
||||
StatusEffectsComponent? status = null)
|
||||
where T : IComponent, new()
|
||||
{
|
||||
if (!Resolve(uid, ref status, false))
|
||||
return false;
|
||||
|
||||
if (TryAddStatusEffect(uid, key, time, refresh, status))
|
||||
{
|
||||
// If they already have the comp, we just won't bother updating anything.
|
||||
if (!EntityManager.HasComponent<T>(uid))
|
||||
{
|
||||
EntityManager.AddComponent(uid, component);
|
||||
status.ActiveEffects[key].RelevantComponent = _componentFactory.GetComponentName(component.GetType());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
// WD added end
|
||||
|
||||
public bool TryAddStatusEffect(EntityUid uid, string key, TimeSpan time, bool refresh, string component,
|
||||
StatusEffectsComponent? status = null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user