Goliath mob (#30839)

* Goliath mob

* Update asteroid.yml

* mcfuck yourself

* add cloak

* fixes

* Update materials.yml
This commit is contained in:
Nemanja
2024-08-18 12:22:36 -04:00
committed by GitHub
parent d673bdfe67
commit a540b8840e
29 changed files with 718 additions and 24 deletions

View File

@@ -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