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

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