Skip to content

Commit

Permalink
webclient: Rename autosettlers as autoworkers
Browse files Browse the repository at this point in the history
Signed-off-by: Marko Lindqvist <[email protected]>
  • Loading branch information
cazfi committed Sep 23, 2023
1 parent cc758a5 commit 3ba35bb
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions freeciv-web/src/main/webapp/docs/controls.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Auto explore
<img src="/images/orders/road_default.png">
Build road

<img src="/images/orders/auto_settlers_default.png">
Auto settlers
<img src="/images/orders/auto_workers_default.png">
Auto workers

<img src="/images/orders/mine_default.png">
Build mine
Expand Down
30 changes: 15 additions & 15 deletions freeciv-web/src/main/webapp/javascript/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -1150,9 +1150,9 @@ function update_unit_order_commands()
if (ptype['name'] == "Settlers" || ptype['name'] == "Workers"
|| ptype['name'] == "Engineers") {

if (ptype['name'] == "Settlers") unit_actions["autosettlers"] = {name: "Auto settler (A)"};
if (ptype['name'] == "Workers") unit_actions["autosettlers"] = {name: "Auto workers (A)"};
if (ptype['name'] == "Engineers") unit_actions["autosettlers"] = {name: "Auto engineers (A)"};
if (ptype['name'] == "Settlers") unit_actions["autoworkers"] = {name: "Auto settler (A)"};
if (ptype['name'] == "Workers") unit_actions["autoworkers"] = {name: "Auto workers (A)"};
if (ptype['name'] == "Engineers") unit_actions["autoworkers"] = {name: "Auto engineers (A)"};

if (!tile_has_extra(ptile, EXTRA_ROAD)) {
$("#order_railroad").hide();
Expand Down Expand Up @@ -1190,7 +1190,7 @@ function update_unit_order_commands()
$("#order_fortify").hide();
$("#order_sentry").hide();
$("#order_explore").hide();
$("#order_auto_settlers").show();
$("#order_auto_workers").show();
$("#order_clean").show();
if (!tile_has_extra(ptile, EXTRA_MINE)
&& tile_terrain(ptile)['mining_time'] > 0) {
Expand Down Expand Up @@ -1252,7 +1252,7 @@ function update_unit_order_commands()
$("#order_irrigate").hide();
$("#order_build_farmland").hide();
$("#order_fortify").show();
$("#order_auto_settlers").hide();
$("#order_auto_workers").hide();
$("#order_sentry").show();
$("#order_explore").show();
$("#order_clean").hide();
Expand Down Expand Up @@ -2050,7 +2050,7 @@ map_handle_key(keyboard_key, key_code, ctrl, alt, shift, the_event)
break;

case 'A':
key_unit_auto_settle();
key_unit_auto_work();
break;

case 'L':
Expand Down Expand Up @@ -2313,8 +2313,8 @@ function handle_context_menu_callback(key)
key_unit_mine();
break;

case "autosettlers":
key_unit_auto_settle();
case "autoworkers":
key_unit_auto_work();
break;

case "clean":
Expand Down Expand Up @@ -2972,20 +2972,20 @@ function request_unit_act_sel_vs_own_tile()

/**************************************************************************
Call to request (from the server) that the focus unit is put into
autosettler mode.
autoworker mode.
**************************************************************************/
function key_unit_auto_settle()
function key_unit_auto_work()
{
var funits = get_units_in_focus();

for (var i = 0; i < funits.length; i++) {
var punit = funits[i];
request_unit_autosettlers(punit);

request_unit_autoworkers(punit);
}
setTimeout(update_unit_focus, 700);
}



/**************************************************************************
Ask the server to cancel unit orders, if any.
**************************************************************************/
Expand Down Expand Up @@ -3040,9 +3040,9 @@ function request_unit_ssa_set(punit, agent)

/****************************************************************************
Call to request (from the server) that the settler unit is put into
autosettler mode.
autoworker mode.
****************************************************************************/
function request_unit_autosettlers(punit)
function request_unit_autoworkers(punit)
{
if (punit != null ) {
request_unit_cancel_orders(punit);
Expand Down
4 changes: 2 additions & 2 deletions freeciv-web/src/main/webapp/webclient/orders.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
<a href="#" onclick="request_unit_build_city();"><img src="/images/orders/build_city_default.png" name="build_city_button" alt="" border="0" width="30" height="30"></a>
</div>

<div id="order_auto_settlers" class="order_button" title="Auto build settler improvements (A)">
<a href="#" onclick="key_unit_auto_settle();"><img src="/images/orders/auto_settlers_default.png" name="auto_settlers_button" alt="" border="0" width="30" height="30"></a>
<div id="order_auto_workers" class="order_button" title="Auto build worker improvements (A)">
<a href="#" onclick="key_unit_auto_work();"><img src="/images/orders/auto_workers_default.png" name="auto_workers_button" alt="" border="0" width="30" height="30"></a>
</div>

<div id="order_irrigate" class="order_button" title="Create irrigation (i)" >
Expand Down

0 comments on commit 3ba35bb

Please sign in to comment.