Index: ps/trunk/binaries/data/mods/public/gui/session/input.js
===================================================================
--- ps/trunk/binaries/data/mods/public/gui/session/input.js
+++ ps/trunk/binaries/data/mods/public/gui/session/input.js
@@ -310,7 +310,7 @@
"autocontinue": true,
"queued": queued
});
- Engine.GuiInterfaceCall("PlaySound", { "name": "order_repair", "entity": selection[0] });
+ Engine.GuiInterfaceCall("PlaySound", { "name": "order_build", "entity": selection[0] });
if (!queued)
placementSupport.Reset();
@@ -367,7 +367,7 @@
if (hasWallSegment)
{
Engine.PostNetworkCommand(cmd);
- Engine.GuiInterfaceCall("PlaySound", { "name": "order_repair", "entity": selection[0] });
+ Engine.GuiInterfaceCall("PlaySound", { "name": "order_build", "entity": selection[0] });
}
return true;
Index: ps/trunk/binaries/data/mods/public/gui/session/unit_actions.js
===================================================================
--- ps/trunk/binaries/data/mods/public/gui/session/unit_actions.js
+++ ps/trunk/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,23 @@
!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 +391,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: ps/trunk/binaries/data/mods/public/simulation/templates/template_unit_infantry.xml
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/templates/template_unit_infantry.xml
+++ ps/trunk/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: ps/trunk/binaries/data/mods/public/simulation/templates/template_unit_support_slave.xml
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/templates/template_unit_support_slave.xml
+++ ps/trunk/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