fix build (#20427)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user