Goliath mob (#30839)
* Goliath mob * Update asteroid.yml * mcfuck yourself * add cloak * fixes * Update materials.yml
This commit is contained in:
@@ -958,6 +958,21 @@ public abstract class SharedActionsSystem : EntitySystem
|
||||
// See client-side system for UI code.
|
||||
}
|
||||
|
||||
public bool ValidAction(BaseActionComponent action, bool canReach = true)
|
||||
{
|
||||
if (!action.Enabled)
|
||||
return false;
|
||||
|
||||
if (action.Charges.HasValue && action.Charges <= 0)
|
||||
return false;
|
||||
|
||||
var curTime = GameTiming.CurTime;
|
||||
if (action.Cooldown.HasValue && action.Cooldown.Value.End > curTime)
|
||||
return false;
|
||||
|
||||
return canReach || action is BaseTargetActionComponent { CheckCanAccess: false };
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region EquipHandlers
|
||||
|
||||
Reference in New Issue
Block a user