diff --git a/Content.Shared/Actions/SharedActionsSystem.cs b/Content.Shared/Actions/SharedActionsSystem.cs index f32e0dd29c..86379277e2 100644 --- a/Content.Shared/Actions/SharedActionsSystem.cs +++ b/Content.Shared/Actions/SharedActionsSystem.cs @@ -120,8 +120,7 @@ public abstract class SharedActionsSystem : EntitySystem if (actionId == null) return; - var action = GetActionData(actionId); - if (action == null || action.UseDelay == null) + if (!TryGetActionData(actionId, out var action) || action.UseDelay == null) return; action.Cooldown = (GameTiming.CurTime, GameTiming.CurTime + action.UseDelay.Value); diff --git a/Content.Shared/RatKing/SharedRatKingSystem.cs b/Content.Shared/RatKing/SharedRatKingSystem.cs index 2d39815387..761619dc4a 100644 --- a/Content.Shared/RatKing/SharedRatKingSystem.cs +++ b/Content.Shared/RatKing/SharedRatKingSystem.cs @@ -37,12 +37,12 @@ public abstract class SharedRatKingSystem : EntitySystem if (!TryComp(uid, out ActionsComponent? comp)) return; - _action.AddAction(uid, ref component.ActionRaiseArmyEntity, component.ActionRaiseArmy, holderComp: comp); - _action.AddAction(uid, ref component.ActionDomainEntity, component.ActionDomain, holderComp: comp); - _action.AddAction(uid, ref component.ActionOrderStayEntity, component.ActionOrderStay, holderComp: comp); - _action.AddAction(uid, ref component.ActionOrderFollowEntity, component.ActionOrderFollow, holderComp: comp); - _action.AddAction(uid, ref component.ActionOrderCheeseEmEntity, component.ActionOrderCheeseEm, holderComp: comp); - _action.AddAction(uid, ref component.ActionOrderLooseEntity, component.ActionOrderLoose, holderComp: comp); + _action.AddAction(uid, ref component.ActionRaiseArmyEntity, component.ActionRaiseArmy, component: comp); + _action.AddAction(uid, ref component.ActionDomainEntity, component.ActionDomain, component: comp); + _action.AddAction(uid, ref component.ActionOrderStayEntity, component.ActionOrderStay, component: comp); + _action.AddAction(uid, ref component.ActionOrderFollowEntity, component.ActionOrderFollow, component: comp); + _action.AddAction(uid, ref component.ActionOrderCheeseEmEntity, component.ActionOrderCheeseEm, component: comp); + _action.AddAction(uid, ref component.ActionOrderLooseEntity, component.ActionOrderLoose, component: comp); UpdateActions(uid, component); }