Skip to content

Commit

Permalink
Merge pull request #774 from cazfi/webclnt
Browse files Browse the repository at this point in the history
web-client: Correct activity values
  • Loading branch information
cazfi authored Nov 8, 2023
2 parents 1e5c567 + 086976d commit c4df61b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
8 changes: 0 additions & 8 deletions freeciv-web/src/main/webapp/javascript/2dcanvas/tilespec.js
Original file line number Diff line number Diff line change
Expand Up @@ -979,20 +979,12 @@ function get_unit_activity_sprite(punit)

switch (activity) {
case ACTIVITY_CLEAN:
case ACTIVITY_POLLUTION:
return {"key" : -1 == act_tgt ?
"unit.pollution" :
tileset_extra_id_rmactivity_graphic_tag(act_tgt),
"offset_x" : unit_activity_offset_x,
"offset_y" : - unit_activity_offset_y};

case ACTIVITY_FALLOUT:
return {"key" : -1 == act_tgt ?
"unit.fallout" :
tileset_extra_id_rmactivity_graphic_tag(act_tgt),
"offset_x" : unit_activity_offset_x,
"offset_y" : - unit_activity_offset_y};

case ACTIVITY_MINE:
return {"key" : -1 == act_tgt ?
"unit.plant" :
Expand Down
10 changes: 4 additions & 6 deletions freeciv-web/src/main/webapp/javascript/fc_types.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var MAX_LEN_CITYNAME = 50;
var FC_INFINITY = (1000 * 1000 * 1000);

var ACTIVITY_IDLE = 0;
var ACTIVITY_POLLUTION = 1;
var ACTIVITY_CULTIVATE = 1;
var ACTIVITY_MINE = 2;
var ACTIVITY_IRRIGATE = 3;
var ACTIVITY_FORTIFIED = 4;
Expand All @@ -45,14 +45,12 @@ var ACTIVITY_GOTO = 7;
var ACTIVITY_EXPLORE = 8;
var ACTIVITY_TRANSFORM = 9;
var ACTIVITY_FORTIFYING = 10;
var ACTIVITY_FALLOUT = 11;
var ACTIVITY_CLEAN = 11;
var ACTIVITY_BASE = 12; /* Building base */
var ACTIVITY_GEN_ROAD = 13;
var ACTIVITY_CONVERT = 14;
var ACTIVITY_CULTIVATE = 15;
var ACTIVITY_PLANT = 16;
var ACTIVITY_CLEAN = 17;
var ACTIVITY_LAST = 18; /* Leave this one last */
var ACTIVITY_PLANT = 15;
var ACTIVITY_LAST = 16; /* Leave this one last */

/* enum action_result */
var ACTRES_ESTABLISH_EMBASSY = 0;
Expand Down
3 changes: 1 addition & 2 deletions freeciv-web/src/main/webapp/javascript/webgl/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ function create_map_tile_label(ptile)
return canvas_to_user_facing_mesh(canvas, width, Math.floor(width * 0.5), 20, true, "ptile_" + ptile['label']);
}

/**********************************************************************
/***********************************************************************
...
***********************************************************************/
function get_unit_activity_text(punit)
Expand All @@ -302,7 +302,6 @@ function get_unit_activity_text(punit)

switch (activity) {
case ACTIVITY_CLEAN:
case ACTIVITY_POLLUTION:
return "c";

case ACTIVITY_MINE:
Expand Down

0 comments on commit c4df61b

Please sign in to comment.