mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Hide Abort Unit Order button when idle or guarding
Reviewed-By: bb Fixes #6854
This commit is contained in:
@@ -1550,7 +1550,8 @@ var g_EntityCommands =
|
||||
"stop": {
|
||||
"getInfo": function(entStates)
|
||||
{
|
||||
if (entStates.every(entState => !entState.unitAI))
|
||||
// Don't show generic option to abort if not applicable or in case of guard, which has its own abort action
|
||||
if (entStates.every(entState => !entState.unitAI || entState.unitAI.isIdle || entState.unitAI.isGuarding))
|
||||
return false;
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user