Goliath mob (#30839)
* Goliath mob * Update asteroid.yml * mcfuck yourself * add cloak * fixes * Update materials.yml
This commit is contained in:
@@ -154,21 +154,6 @@ public sealed class ActionOnInteractSystem : EntitySystem
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
private bool ValidAction(BaseActionComponent action, bool canReach = true)
|
||||
{
|
||||
if (!action.Enabled)
|
||||
return false;
|
||||
|
||||
if (action.Charges.HasValue && action.Charges <= 0)
|
||||
return false;
|
||||
|
||||
var curTime = _timing.CurTime;
|
||||
if (action.Cooldown.HasValue && action.Cooldown.Value.End > curTime)
|
||||
return false;
|
||||
|
||||
return canReach || action is BaseTargetActionComponent { CheckCanAccess: false };
|
||||
}
|
||||
|
||||
private List<(EntityUid Id, T Comp)> GetValidActions<T>(List<EntityUid>? actions, bool canReach = true) where T : BaseActionComponent
|
||||
{
|
||||
var valid = new List<(EntityUid Id, T Comp)>();
|
||||
@@ -180,7 +165,7 @@ public sealed class ActionOnInteractSystem : EntitySystem
|
||||
{
|
||||
if (!_actions.TryGetActionData(id, out var baseAction) ||
|
||||
baseAction as T is not { } action ||
|
||||
!ValidAction(action, canReach))
|
||||
!_actions.ValidAction(action, canReach))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user