Index: binaries/data/mods/public/gui/session/unit_actions.js
===================================================================
--- binaries/data/mods/public/gui/session/unit_actions.js
+++ binaries/data/mods/public/gui/session/unit_actions.js
@@ -351,7 +351,7 @@
});
Engine.GuiInterfaceCall("PlaySound", {
- "name": "order_repair",
+ "name": action.foundation ? "order_build" : "order_repair",
"entity": selection[0]
});
@@ -364,18 +364,20 @@
!playerCheck(entState, targetState, ["Player", "Ally"]))
return false;
- return { "possible": true };
+ return { "possible": true, "foundation": targetState.foundation };
},
"preSelectedActionCheck": function(target, selection)
{
if (preSelectedAction != ACTION_REPAIR)
return false;
- if (getActionInfo("repair", target, selection).possible)
+ let actionInfo = getActionInfo("repair", target, selection);
+ if (actionInfo.possible)
return {
"type": "repair",
"cursor": "action-repair",
- "target": target
+ "target": target,
+ "foundation": actionInfo.foundation
};
return {
@@ -386,25 +388,29 @@
},
"hotkeyActionCheck": function(target, selection)
{
+ let actionInfo = getActionInfo("repair", target, selection);
if (!Engine.HotkeyIsPressed("session.repair") ||
- !getActionInfo("repair", target, selection).possible)
+ !actionInfo.possible)
return false;
return {
"type": "repair",
"cursor": "action-repair",
- "target": target
+ "target": target,
+ "foundation": actionInfo.foundation
};
},
"actionCheck": function(target, selection)
{
- if (!getActionInfo("repair", target, selection).possible)
+ let actionInfo = getActionInfo("repair", target, selection);
+ if (!actionInfo.possible)
return false;
return {
"type": "repair",
"cursor": "action-repair",
- "target": target
+ "target": target,
+ "foundation": actionInfo.foundation
};
},
"specificness": 11,
Index: binaries/data/mods/public/simulation/templates/template_unit_infantry.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/template_unit_infantry.xml
+++ binaries/data/mods/public/simulation/templates/template_unit_infantry.xml
@@ -106,6 +106,7 @@
voice/{lang}/civ/civ_{phenotype}_attack.xml
voice/{lang}/civ/civ_{phenotype}_gather.xml
voice/{lang}/civ/civ_{phenotype}_repair.xml
+ voice/{lang}/civ/civ_{phenotype}_build.xml
voice/{lang}/civ/civ_{phenotype}_garrison.xml
actor/human/movement/walk.xml
actor/human/movement/run.xml
Index: binaries/data/mods/public/simulation/templates/template_unit_support_slave.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/template_unit_support_slave.xml
+++ binaries/data/mods/public/simulation/templates/template_unit_support_slave.xml
@@ -69,6 +69,7 @@
voice/{lang}/civ/civ_{phenotype}_walk.xml
voice/{lang}/civ/civ_{phenotype}_gather.xml
voice/{lang}/civ/civ_{phenotype}_repair.xml
+ voice/{lang}/civ/civ_{phenotype}_build.xml
voice/{lang}/civ/civ_{phenotype}_garrison.xml
actor/human/movement/walk.xml
actor/human/movement/run.xml