disable the delete button when less than 50% cp, fixes #3300, patch by bb
This was SVN commit r16877.
This commit is contained in:
parent
eb47670cd1
commit
edd03ad557
BIN
binaries/data/mods/public/art/textures/ui/session/icons/kill_small_disabled.png
(Stored with Git LFS)
Normal file
BIN
binaries/data/mods/public/art/textures/ui/session/icons/kill_small_disabled.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -660,7 +660,7 @@ var unitActions =
|
||||
|
||||
/**
|
||||
* Info and actions for the entity commands
|
||||
* Currently displayed in the bottom of the central pane
|
||||
* Currently displayed in the bottom of the central panel
|
||||
*/
|
||||
var g_EntityCommands =
|
||||
{
|
||||
@ -696,13 +696,13 @@ var g_EntityCommands =
|
||||
if (entState.mirage)
|
||||
return {
|
||||
"tooltip": translate("You cannot destroy this entity because it is in the fog-of-war"),
|
||||
"icon": "kill_small.png"
|
||||
"icon": "kill_small_disabled.png"
|
||||
};
|
||||
|
||||
if (entState.capturePoints && entState.capturePoints[entState.player] < entState.maxCapturePoints / 2)
|
||||
return {
|
||||
"tooltip": translate("You cannot destroy this entity as you own less than half the capture points"),
|
||||
"icon": "kill_small.png"
|
||||
"icon": "kill_small_disabled.png"
|
||||
};
|
||||
|
||||
|
||||
@ -716,6 +716,9 @@ var g_EntityCommands =
|
||||
if (entState.mirage)
|
||||
return;
|
||||
|
||||
if (entState.capturePoints && entState.capturePoints[entState.player] < entState.maxCapturePoints / 2)
|
||||
return;
|
||||
|
||||
var selection = g_Selection.toList();
|
||||
if (selection.length < 1)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user