[Freeciv-commits] r35529 - in /branches/S2_5/translations: freeciv/ru.po nations/ru.po

2017-05-12 Thread 0jacobnk . gna
Author: jtn
Date: Fri May 12 21:24:38 2017
New Revision: 35529

URL: http://svn.gna.org/viewcvs/freeciv?rev=35529=rev
Log:
Updated Russian translation from Konstantin Vedeneev.
freeciv: 100%: 6293 translated.
nations: 100%: 1844 translated.

Modified:
branches/S2_5/translations/freeciv/ru.po
branches/S2_5/translations/nations/ru.po

[This mail would be too long, it was shortened to contain the URLs only.]

Modified: branches/S2_5/translations/freeciv/ru.po
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/translations/freeciv/ru.po?rev=35529=35528=35529=diff

Modified: branches/S2_5/translations/nations/ru.po
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/translations/nations/ru.po?rev=35529=35528=35529=diff


___
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits


[Freeciv-commits] r35528 - in /trunk/tools/ruledit: effect_edit.cpp effect_edit.h

2017-05-12 Thread cazfi74
Author: cazfi
Date: Fri May 12 19:58:25 2017
New Revision: 35528

URL: http://svn.gna.org/viewcvs/freeciv?rev=35528=rev
Log:
Add editing of effect requirements

See hrm Feature #659223

Modified:
trunk/tools/ruledit/effect_edit.cpp
trunk/tools/ruledit/effect_edit.h

Modified: trunk/tools/ruledit/effect_edit.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/tools/ruledit/effect_edit.cpp?rev=35528=35527=35528=diff
==
--- trunk/tools/ruledit/effect_edit.cpp (original)
+++ trunk/tools/ruledit/effect_edit.cpp Fri May 12 19:58:25 2017
@@ -29,6 +29,7 @@
 #include "effects.h"
 
 // ruledit
+#include "req_edit.h"
 #include "ruledit.h"
 #include "validity.h"
 
@@ -44,6 +45,7 @@
   QGridLayout *effect_edit_layout = new QGridLayout();
   QHBoxLayout *active_layout = new QHBoxLayout();
   QPushButton *close_button;
+  QPushButton *reqs_button;
   QMenu *menu;
   QLabel *lbl;
   enum effect_type eff;
@@ -51,6 +53,7 @@
   ui = ui_in;
   selected = nullptr;
   filter = *filter_in;
+  name = target;
 
   list_widget = new QListWidget(this);
   effects = effect_list_new();
@@ -74,9 +77,13 @@
 
   main_layout->addLayout(active_layout);
 
+  reqs_button = new QPushButton(QString::fromUtf8(R__("Requirements")), this);
+  connect(reqs_button, SIGNAL(pressed()), this, SLOT(edit_reqs()));
+  effect_edit_layout->addWidget(reqs_button, 0, 0);
+
   close_button = new QPushButton(QString::fromUtf8(R__("Close")), this);
   connect(close_button, SIGNAL(pressed()), this, SLOT(close_now()));
-  effect_edit_layout->addWidget(close_button, 0, 0);
+  effect_edit_layout->addWidget(close_button, 1, 0);
 
   refresh();
 
@@ -141,7 +148,7 @@
   QListWidgetItem *item;
 
   fc_snprintf(buf, sizeof(buf), _("Effect #%d: %s"),
-  data->num, effect_type_name(peffect->type));
+  data->num + 1, effect_type_name(peffect->type));
 
   item = new QListWidgetItem(QString::fromUtf8(buf));
   list_widget->insertItem(data->num++, item);
@@ -171,6 +178,7 @@
 
 if (item != nullptr && item->isSelected()) {
   selected = peffect;
+  selected_nbr = i;
   fill_active();
   return;
 }
@@ -201,3 +209,21 @@
 
   refresh();
 }
+
+/**
+  User wants to edit requirements
+**/
+void effect_edit::edit_reqs()
+{
+  if (selected != nullptr) {
+char buf[128];
+req_edit *redit;
+
+fc_snprintf(buf, sizeof(buf), R__("%s effect #%d"), name.toUtf8().data(),
+selected_nbr);
+
+redit = new req_edit(ui, QString::fromUtf8(buf), >reqs);
+
+redit->show();
+  }
+}

Modified: trunk/tools/ruledit/effect_edit.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/tools/ruledit/effect_edit.h?rev=35528=35527=35528=diff
==
--- trunk/tools/ruledit/effect_edit.h   (original)
+++ trunk/tools/ruledit/effect_edit.h   Fri May 12 19:58:25 2017
@@ -51,17 +51,20 @@
   private:
 ruledit_gui *ui;
 
+QString name;
 QListWidget *list_widget;
 struct universal filter;
 struct effect_list *effects;
 
 struct effect *selected;
+int selected_nbr;
 
 QToolButton *edit_type_button;
 
   private slots:
 void select_effect();
 void fill_active();
+void edit_reqs();
 void close_now();
 
 void effect_type_menu(QAction *action);


___
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits


[Freeciv-commits] r35527 - in /trunk: ai/default/ client/ client/gui-gtk-3.0/ client/gui-gtk-3.22/ client/gui-gtk-4.0/ client/gui-qt/ client/g...

2017-05-12 Thread cazfi74
Author: cazfi
Date: Fri May 12 17:28:13 2017
New Revision: 35527

URL: http://svn.gna.org/viewcvs/freeciv?rev=35527=rev
Log:
Give map parameter to map_pos_to_tile()

See hrm Feature #659205

Modified:
trunk/ai/default/aidiplomat.c
trunk/ai/default/aiferry.c
trunk/ai/default/aiparatrooper.c
trunk/ai/default/aisettler.c
trunk/ai/default/aitools.c
trunk/ai/default/aiunit.c
trunk/ai/default/daieffects.c
trunk/client/climap.c
trunk/client/climisc.c
trunk/client/control.c
trunk/client/editor.c
trunk/client/goto.c
trunk/client/gui-gtk-3.0/mapctrl.c
trunk/client/gui-gtk-3.22/mapctrl.c
trunk/client/gui-gtk-4.0/mapctrl.c
trunk/client/gui-qt/mapview.cpp
trunk/client/gui-qt/menu.cpp
trunk/client/gui-sdl2/dialogs.c
trunk/client/gui-sdl2/finddlg.c
trunk/client/gui-sdl2/mapctrl.c
trunk/client/mapctrl_common.c
trunk/client/mapview_common.c
trunk/client/mapview_common.h
trunk/client/overview_common.c
trunk/client/tilespec.c
trunk/common/actions.c
trunk/common/aicore/path_finding.c
trunk/common/aicore/pf_tools.c
trunk/common/base.c
trunk/common/city.c
trunk/common/combat.c
trunk/common/extras.c
trunk/common/featured_text.c
trunk/common/map.c
trunk/common/map.h
trunk/common/mapimg.c
trunk/common/metaknowledge.c
trunk/common/movement.c
trunk/common/requirements.c
trunk/common/road.c
trunk/common/scriptcore/api_game_find.c
trunk/common/scriptcore/api_game_methods.c
trunk/common/terrain.c
trunk/common/unit.c
trunk/server/advisors/advdata.c
trunk/server/advisors/advgoto.c
trunk/server/advisors/autoexplorer.c
trunk/server/advisors/autosettlers.c
trunk/server/animals.c
trunk/server/barbarian.c
trunk/server/citytools.c
trunk/server/cityturn.c
trunk/server/diplomats.c
trunk/server/edithand.c
trunk/server/gamehand.c
trunk/server/generator/fracture_map.c
trunk/server/generator/height_map.c
trunk/server/generator/mapgen.c
trunk/server/generator/mapgen_utils.c
trunk/server/generator/mapgen_utils.h
trunk/server/generator/startpos.c
trunk/server/generator/temperature_map.c
trunk/server/maphand.c
trunk/server/notify.c
trunk/server/plrhand.c
trunk/server/sanitycheck.c
trunk/server/savegame2.c
trunk/server/savegame3.c
trunk/server/srv_main.c
trunk/server/stdinhand.c
trunk/server/unithand.c
trunk/server/unittools.c

[This mail would be too long, it was shortened to contain the URLs only.]

Modified: trunk/ai/default/aidiplomat.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/aidiplomat.c?rev=35527=35526=35527=diff

Modified: trunk/ai/default/aiferry.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/aiferry.c?rev=35527=35526=35527=diff

Modified: trunk/ai/default/aiparatrooper.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/aiparatrooper.c?rev=35527=35526=35527=diff

Modified: trunk/ai/default/aisettler.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/aisettler.c?rev=35527=35526=35527=diff

Modified: trunk/ai/default/aitools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/aitools.c?rev=35527=35526=35527=diff

Modified: trunk/ai/default/aiunit.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/aiunit.c?rev=35527=35526=35527=diff

Modified: trunk/ai/default/daieffects.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/daieffects.c?rev=35527=35526=35527=diff

Modified: trunk/client/climap.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/climap.c?rev=35527=35526=35527=diff

Modified: trunk/client/climisc.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/climisc.c?rev=35527=35526=35527=diff

Modified: trunk/client/control.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/control.c?rev=35527=35526=35527=diff

Modified: trunk/client/editor.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/editor.c?rev=35527=35526=35527=diff

Modified: trunk/client/goto.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/goto.c?rev=35527=35526=35527=diff

Modified: trunk/client/gui-gtk-3.0/mapctrl.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/mapctrl.c?rev=35527=35526=35527=diff

Modified: trunk/client/gui-gtk-3.22/mapctrl.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.22/mapctrl.c?rev=35527=35526=35527=diff

Modified: trunk/client/gui-gtk-4.0/mapctrl.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-4.0/mapctrl.c?rev=35527=35526=35527=diff

Modified: trunk/client/gui-qt/mapview.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/mapview.cpp?rev=35527=35526=35527=diff

Modified: trunk/client/gui-qt/menu.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/menu.cpp?rev=35527=35526=35527=diff

Modified: trunk/client/gui-sdl2/dialogs.c
URL: 

[Freeciv-commits] r35526 - /branches/S2_6/server/unithand.c

2017-05-12 Thread sveinung84
Author: sveinung
Date: Fri May 12 14:58:21 2017
New Revision: 35526

URL: http://svn.gna.org/viewcvs/freeciv?rev=35526=rev
Log:
handle_unit_get_actions(): fix target id finding.

A typo caused target id finding to abort after processing the first legal
action if a target unit existed. Fix it.

See hrm Bug #659158

Modified:
branches/S2_6/server/unithand.c

Modified: branches/S2_6/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/unithand.c?rev=35526=35525=35526=diff
==
--- branches/S2_6/server/unithand.c (original)
+++ branches/S2_6/server/unithand.c Fri May 12 14:58:21 2017
@@ -968,7 +968,7 @@
   }
 
   if (target_city_id != IDENTITY_NUMBER_ZERO
-  && target_unit != IDENTITY_NUMBER_ZERO) {
+  && target_unit_id != IDENTITY_NUMBER_ZERO) {
 /* No need to find out more. */
 break;
   }


___
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits


[Freeciv-commits] r35522 - /branches/S3_0/tools/civmanual.c

2017-05-12 Thread sveinung84
Author: sveinung
Date: Fri May 12 14:57:13 2017
New Revision: 35522

URL: http://svn.gna.org/viewcvs/freeciv?rev=35522=rev
Log:
freeciv-manual: show what unit obsoletes a unit.

See hrm Feature #659174

Modified:
branches/S3_0/tools/civmanual.c

Modified: branches/S3_0/tools/civmanual.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/tools/civmanual.c?rev=35522=35521=35522=diff
==
--- branches/S3_0/tools/civmanual.c (original)
+++ branches/S3_0/tools/civmanual.c Fri May 12 14:57:13 2017
@@ -616,6 +616,12 @@
 fprintf(doc, SUBITEM_BEGIN, "hitpoints");
 fprintf(doc, _("Hitpoints: %d"),
 putype->hp);
+fprintf(doc, SUBITEM_END);
+fprintf(doc, SUBITEM_BEGIN, "obsolete");
+fprintf(doc, _("Obsolete by: %s"),
+U_NOT_OBSOLETED == putype->obsoleted_by ?
+  Q_("?utype:None") :
+  utype_name_translation(putype->obsoleted_by));
 fprintf(doc, SUBITEM_END);
 fprintf(doc, SUBITEM_BEGIN, "helptext");
 helptext_unit(buf, sizeof(buf), NULL, "", putype);


___
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits


[Freeciv-commits] r35524 - in /branches/S3_0/data/webperimental: buildings.ruleset effects.ruleset game.ruleset

2017-05-12 Thread sveinung84
Author: sveinung
Date: Fri May 12 14:57:29 2017
New Revision: 35524

URL: http://svn.gna.org/viewcvs/freeciv?rev=35524=rev
Log:
webperimental: ally share A.Smith's Trading Co.

See hrm Feature #659192

Modified:
branches/S3_0/data/webperimental/buildings.ruleset
branches/S3_0/data/webperimental/effects.ruleset
branches/S3_0/data/webperimental/game.ruleset

Modified: branches/S3_0/data/webperimental/buildings.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/data/webperimental/buildings.ruleset?rev=35524=35523=35524=diff
==
--- branches/S3_0/data/webperimental/buildings.ruleset  (original)
+++ branches/S3_0/data/webperimental/buildings.ruleset  Fri May 12 14:57:29 2017
@@ -1169,7 +1169,7 @@
 sound_alt  = "w_generic"
 helptext   = _("\
 City improvements which would normally have an upkeep of 1 are free\
- of upkeep, for all your cities.\
+ of upkeep, for all cities belonging to you and to your allies.\
 ")
 
 [building_colossus]

Modified: branches/S3_0/data/webperimental/effects.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/data/webperimental/effects.ruleset?rev=35524=35523=35524=diff
==
--- branches/S3_0/data/webperimental/effects.ruleset(original)
+++ branches/S3_0/data/webperimental/effects.rulesetFri May 12 14:57:29 2017
@@ -1785,7 +1785,7 @@
 value  = 1
 reqs   =
 { "type", "name", "range"
-  "Building", "A.Smith's Trading Co.", "Player"
+  "Building", "A.Smith's Trading Co.", "Alliance"
 }
 
 [effect_colossus]

Modified: branches/S3_0/data/webperimental/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/data/webperimental/game.ruleset?rev=35524=35523=35524=diff
==
--- branches/S3_0/data/webperimental/game.ruleset   (original)
+++ branches/S3_0/data/webperimental/game.ruleset   Fri May 12 14:57:29 2017
@@ -97,6 +97,7 @@
 to both its owner and to all his allies.\n\
   - J.S. Bach's Cathedral makes two unhappy citizens content in allied \
 cities too.\n\
+  - A. Smith's Trading Co. pays for your allies' 1 upkeep buildings too.\n\
 \n\
 This ruleset is still in development. If playing it makes you think that \
 a rule should change go to the Freeciv-web board at \


___
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits


[Freeciv-commits] r35523 - in /branches/S3_0: client/gui-qt/ data/civ1/ data/civ2/ data/civ2civ3/ data/classic/ data/experimental/ data/multip...

2017-05-12 Thread sveinung84
Author: sveinung
Date: Fri May 12 14:57:21 2017
New Revision: 35523

URL: http://svn.gna.org/viewcvs/freeciv?rev=35523=rev
Log:
Change "Establish Embassy Stay"'s UI name.

Change the default UI name of the action "Establish Embassy Stay" from
"Establish embassy (and stay)" to "Become Ambassador".

See hrm Feature #659189

Modified:
branches/S3_0/client/gui-qt/menu.cpp
branches/S3_0/data/civ1/game.ruleset
branches/S3_0/data/civ2/game.ruleset
branches/S3_0/data/civ2civ3/game.ruleset
branches/S3_0/data/classic/game.ruleset
branches/S3_0/data/experimental/game.ruleset
branches/S3_0/data/multiplayer/game.ruleset
branches/S3_0/data/sandbox/game.ruleset
branches/S3_0/data/webperimental/game.ruleset
branches/S3_0/server/ruleset.c

Modified: branches/S3_0/client/gui-qt/menu.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-qt/menu.cpp?rev=35523=35522=35523=diff
==
--- branches/S3_0/client/gui-qt/menu.cpp(original)
+++ branches/S3_0/client/gui-qt/menu.cppFri May 12 14:57:21 2017
@@ -1435,7 +1435,7 @@
   action_vs_city->addAction(act);
   connect(act, SIGNAL(triggered()), this, SLOT(slot_action_vs_city()));
 
-  act = action_city_menu->addAction(_("Establish embassy (and stay)"));
+  act = action_city_menu->addAction(_("Become Ambassador"));
   act->setCheckable(true);
   act->setChecked(false);
   act->setData(ACTION_ESTABLISH_EMBASSY_STAY);

Modified: branches/S3_0/data/civ1/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/data/civ1/game.ruleset?rev=35523=35522=35523=diff
==
--- branches/S3_0/data/civ1/game.ruleset(original)
+++ branches/S3_0/data/civ1/game.rulesetFri May 12 14:57:21 2017
@@ -224,8 +224,8 @@
 ; /* TRANS: Incite a _Revolt (3% chance of success). */
 ui_name_incite_city = _("Incite a %sRevolt%s")
 
-; /* TRANS: Establish _Embassy (and stay) (100% chance of success). */
-ui_name_establish_embassy_stay = _("Establish %sEmbassy (and stay)%s")
+; /* TRANS: Becom_e Ambassador (100% chance of success). */
+ui_name_establish_embassy_stay = _("Becom%se Ambassador%s")
 
 ; /* TRANS: Steal _Technology (3% chance of success). */
 ui_name_steal_tech = _("Steal %sTechnology%s")

Modified: branches/S3_0/data/civ2/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/data/civ2/game.ruleset?rev=35523=35522=35523=diff
==
--- branches/S3_0/data/civ2/game.ruleset(original)
+++ branches/S3_0/data/civ2/game.rulesetFri May 12 14:57:21 2017
@@ -253,8 +253,8 @@
 ; /* TRANS: Establish _Embassy (100% chance of success). */
 ui_name_establish_embassy = _("Establish %sEmbassy%s")
 
-; /* TRANS: Establish _Embassy (and stay) (100% chance of success). */
-ui_name_establish_embassy_stay = _("Establish %sEmbassy (and stay)%s")
+; /* TRANS: Becom_e Ambassador (100% chance of success). */
+ui_name_establish_embassy_stay = _("Becom%se Ambassador%s")
 
 ; /* TRANS: Steal _Technology (3% chance of success). */
 ui_name_steal_tech = _("Steal %sTechnology%s")

Modified: branches/S3_0/data/civ2civ3/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/data/civ2civ3/game.ruleset?rev=35523=35522=35523=diff
==
--- branches/S3_0/data/civ2civ3/game.ruleset(original)
+++ branches/S3_0/data/civ2civ3/game.rulesetFri May 12 14:57:21 2017
@@ -259,8 +259,8 @@
 ; /* TRANS: Establish _Embassy (100% chance of success). */
 ui_name_establish_embassy = _("Establish %sEmbassy%s")
 
-; /* TRANS: Establish _Embassy (and stay) (100% chance of success). */
-ui_name_establish_embassy_stay = _("Establish %sEmbassy (and stay)%s")
+; /* TRANS: Becom_e Ambassador (100% chance of success). */
+ui_name_establish_embassy_stay = _("Becom%se Ambassador%s")
 
 ; /* TRANS: Steal _Technology (3% chance of success). */
 ui_name_steal_tech = _("Steal %sTechnology%s")

Modified: branches/S3_0/data/classic/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/data/classic/game.ruleset?rev=35523=35522=35523=diff
==
--- branches/S3_0/data/classic/game.ruleset (original)
+++ branches/S3_0/data/classic/game.ruleset Fri May 12 14:57:21 2017
@@ -254,8 +254,8 @@
 ; /* TRANS: Establish _Embassy (100% chance of success). */
 ui_name_establish_embassy = _("Establish %sEmbassy%s")
 
-; /* TRANS: Establish _Embassy (and stay) (100% chance of success). */
-ui_name_establish_embassy_stay = _("Establish %sEmbassy (and stay)%s")
+; /* TRANS: Becom_e Ambassador (100% chance of success). */
+ui_name_establish_embassy_stay = _("Becom%se Ambassador%s")
 
 ; /* TRANS: Steal _Technology (3% chance of success). */
 ui_name_steal_tech = _("Steal 

[Freeciv-commits] r35525 - /branches/S3_0/client/helpdata.c

2017-05-12 Thread sveinung84
Author: sveinung
Date: Fri May 12 14:57:36 2017
New Revision: 35525

URL: http://svn.gna.org/viewcvs/freeciv?rev=35525=rev
Log:
Auto help: document tired attack.

See hrm Feature #659208

Modified:
branches/S3_0/client/helpdata.c

Modified: branches/S3_0/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/helpdata.c?rev=35525=35524=35525=diff
==
--- branches/S3_0/client/helpdata.c (original)
+++ branches/S3_0/client/helpdata.c Fri May 12 14:57:36 2017
@@ -2386,6 +2386,14 @@
"type it upgrades to.\n"),
  utype_name_translation(utype->obsoleted_by));
 break;
+  case ACTION_ATTACK:
+if (game.info.tired_attack) {
+  cat_snprintf(buf, bufsz,
+   _("  * weaker when tired. If performed with less "
+ "than a single move point left the attack power "
+ "is reduced accordingly.\n"));
+  break;
+}
   default:
 /* No action specific details. */
 break;


___
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits


[Freeciv-commits] r35521 - /branches/S3_0/server/unithand.c

2017-05-12 Thread sveinung84
Author: sveinung
Date: Fri May 12 14:57:01 2017
New Revision: 35521

URL: http://svn.gna.org/viewcvs/freeciv?rev=35521=rev
Log:
handle_unit_get_actions(): fix target id finding.

A typo caused target id finding to abort after processing the first legal
action if a target unit existed. Fix it.

See hrm Bug #659158

Modified:
branches/S3_0/server/unithand.c

Modified: branches/S3_0/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/server/unithand.c?rev=35521=35520=35521=diff
==
--- branches/S3_0/server/unithand.c (original)
+++ branches/S3_0/server/unithand.c Fri May 12 14:57:01 2017
@@ -1640,7 +1640,7 @@
   }
 
   if (target_city_id != IDENTITY_NUMBER_ZERO
-  && target_unit != IDENTITY_NUMBER_ZERO) {
+  && target_unit_id != IDENTITY_NUMBER_ZERO) {
 /* No need to find out more. */
 break;
   }


___
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits


[Freeciv-commits] r35520 - /branches/S3_0/server/unithand.c

2017-05-12 Thread sveinung84
Author: sveinung
Date: Fri May 12 14:56:54 2017
New Revision: 35520

URL: http://svn.gna.org/viewcvs/freeciv?rev=35520=rev
Log:
Initialize kind before use in check.

Initialize action not enabled explanation kind so it has a value to check
even if a suitable target is present.

Found with Valgrind.

See hrm Bug #659109

Modified:
branches/S3_0/server/unithand.c

Modified: branches/S3_0/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/server/unithand.c?rev=35520=35519=35520=diff
==
--- branches/S3_0/server/unithand.c (original)
+++ branches/S3_0/server/unithand.c Fri May 12 14:56:54 2017
@@ -811,6 +811,9 @@
   bool can_exist = can_unit_exist_at_tile(punit, unit_tile(punit));
   bool on_native = is_native_tile(unit_type_get(punit), unit_tile(punit));
   int action_custom;
+
+  /* Not know yet. (Initialize before the below check.) */
+  explnat->kind = ANEK_UNKNOWN;
 
   if (action_id != ACTION_ANY) {
 /* A specific action should have a suitable target. */


___
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits


[Freeciv-commits] r35519 - /trunk/client/helpdata.c

2017-05-12 Thread sveinung84
Author: sveinung
Date: Fri May 12 14:55:27 2017
New Revision: 35519

URL: http://svn.gna.org/viewcvs/freeciv?rev=35519=rev
Log:
Auto help: document tired attack.

See hrm Feature #659208

Modified:
trunk/client/helpdata.c

Modified: trunk/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=35519=35518=35519=diff
==
--- trunk/client/helpdata.c (original)
+++ trunk/client/helpdata.c Fri May 12 14:55:27 2017
@@ -2386,6 +2386,14 @@
"type it upgrades to.\n"),
  utype_name_translation(utype->obsoleted_by));
 break;
+  case ACTION_ATTACK:
+if (game.info.tired_attack) {
+  cat_snprintf(buf, bufsz,
+   _("  * weaker when tired. If performed with less "
+ "than a single move point left the attack power "
+ "is reduced accordingly.\n"));
+  break;
+}
   default:
 /* No action specific details. */
 break;


___
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits


[Freeciv-commits] r35515 - /trunk/server/unithand.c

2017-05-12 Thread sveinung84
Author: sveinung
Date: Fri May 12 14:54:53 2017
New Revision: 35515

URL: http://svn.gna.org/viewcvs/freeciv?rev=35515=rev
Log:
handle_unit_get_actions(): fix target id finding.

A typo caused target id finding to abort after processing the first legal
action if a target unit existed. Fix it.

See hrm Bug #659158

Modified:
trunk/server/unithand.c

Modified: trunk/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=35515=35514=35515=diff
==
--- trunk/server/unithand.c (original)
+++ trunk/server/unithand.c Fri May 12 14:54:53 2017
@@ -1640,7 +1640,7 @@
   }
 
   if (target_city_id != IDENTITY_NUMBER_ZERO
-  && target_unit != IDENTITY_NUMBER_ZERO) {
+  && target_unit_id != IDENTITY_NUMBER_ZERO) {
 /* No need to find out more. */
 break;
   }


___
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits


[Freeciv-commits] r35517 - in /trunk: client/gui-qt/ data/civ1/ data/civ2/ data/civ2civ3/ data/classic/ data/experimental/ data/multiplayer/ d...

2017-05-12 Thread sveinung84
Author: sveinung
Date: Fri May 12 14:55:09 2017
New Revision: 35517

URL: http://svn.gna.org/viewcvs/freeciv?rev=35517=rev
Log:
Change "Establish Embassy Stay"'s UI name.

Change the default UI name of the action "Establish Embassy Stay" from
"Establish embassy (and stay)" to "Become Ambassador".

See hrm Feature #659189

Modified:
trunk/client/gui-qt/menu.cpp
trunk/data/civ1/game.ruleset
trunk/data/civ2/game.ruleset
trunk/data/civ2civ3/game.ruleset
trunk/data/classic/game.ruleset
trunk/data/experimental/game.ruleset
trunk/data/multiplayer/game.ruleset
trunk/data/sandbox/game.ruleset
trunk/data/webperimental/game.ruleset
trunk/server/ruleset.c

Modified: trunk/client/gui-qt/menu.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/menu.cpp?rev=35517=35516=35517=diff
==
--- trunk/client/gui-qt/menu.cpp(original)
+++ trunk/client/gui-qt/menu.cppFri May 12 14:55:09 2017
@@ -1435,7 +1435,7 @@
   action_vs_city->addAction(act);
   connect(act, SIGNAL(triggered()), this, SLOT(slot_action_vs_city()));
 
-  act = action_city_menu->addAction(_("Establish embassy (and stay)"));
+  act = action_city_menu->addAction(_("Become Ambassador"));
   act->setCheckable(true);
   act->setChecked(false);
   act->setData(ACTION_ESTABLISH_EMBASSY_STAY);

Modified: trunk/data/civ1/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/game.ruleset?rev=35517=35516=35517=diff
==
--- trunk/data/civ1/game.ruleset(original)
+++ trunk/data/civ1/game.rulesetFri May 12 14:55:09 2017
@@ -224,8 +224,8 @@
 ; /* TRANS: Incite a _Revolt (3% chance of success). */
 ui_name_incite_city = _("Incite a %sRevolt%s")
 
-; /* TRANS: Establish _Embassy (and stay) (100% chance of success). */
-ui_name_establish_embassy_stay = _("Establish %sEmbassy (and stay)%s")
+; /* TRANS: Becom_e Ambassador (100% chance of success). */
+ui_name_establish_embassy_stay = _("Becom%se Ambassador%s")
 
 ; /* TRANS: Steal _Technology (3% chance of success). */
 ui_name_steal_tech = _("Steal %sTechnology%s")

Modified: trunk/data/civ2/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/game.ruleset?rev=35517=35516=35517=diff
==
--- trunk/data/civ2/game.ruleset(original)
+++ trunk/data/civ2/game.rulesetFri May 12 14:55:09 2017
@@ -253,8 +253,8 @@
 ; /* TRANS: Establish _Embassy (100% chance of success). */
 ui_name_establish_embassy = _("Establish %sEmbassy%s")
 
-; /* TRANS: Establish _Embassy (and stay) (100% chance of success). */
-ui_name_establish_embassy_stay = _("Establish %sEmbassy (and stay)%s")
+; /* TRANS: Becom_e Ambassador (100% chance of success). */
+ui_name_establish_embassy_stay = _("Becom%se Ambassador%s")
 
 ; /* TRANS: Steal _Technology (3% chance of success). */
 ui_name_steal_tech = _("Steal %sTechnology%s")

Modified: trunk/data/civ2civ3/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/game.ruleset?rev=35517=35516=35517=diff
==
--- trunk/data/civ2civ3/game.ruleset(original)
+++ trunk/data/civ2civ3/game.rulesetFri May 12 14:55:09 2017
@@ -259,8 +259,8 @@
 ; /* TRANS: Establish _Embassy (100% chance of success). */
 ui_name_establish_embassy = _("Establish %sEmbassy%s")
 
-; /* TRANS: Establish _Embassy (and stay) (100% chance of success). */
-ui_name_establish_embassy_stay = _("Establish %sEmbassy (and stay)%s")
+; /* TRANS: Becom_e Ambassador (100% chance of success). */
+ui_name_establish_embassy_stay = _("Becom%se Ambassador%s")
 
 ; /* TRANS: Steal _Technology (3% chance of success). */
 ui_name_steal_tech = _("Steal %sTechnology%s")

Modified: trunk/data/classic/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/game.ruleset?rev=35517=35516=35517=diff
==
--- trunk/data/classic/game.ruleset (original)
+++ trunk/data/classic/game.ruleset Fri May 12 14:55:09 2017
@@ -254,8 +254,8 @@
 ; /* TRANS: Establish _Embassy (100% chance of success). */
 ui_name_establish_embassy = _("Establish %sEmbassy%s")
 
-; /* TRANS: Establish _Embassy (and stay) (100% chance of success). */
-ui_name_establish_embassy_stay = _("Establish %sEmbassy (and stay)%s")
+; /* TRANS: Becom_e Ambassador (100% chance of success). */
+ui_name_establish_embassy_stay = _("Becom%se Ambassador%s")
 
 ; /* TRANS: Steal _Technology (3% chance of success). */
 ui_name_steal_tech = _("Steal %sTechnology%s")

Modified: trunk/data/experimental/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/game.ruleset?rev=35517=35516=35517=diff

[Freeciv-commits] r35516 - /trunk/tools/civmanual.c

2017-05-12 Thread sveinung84
Author: sveinung
Date: Fri May 12 14:55:00 2017
New Revision: 35516

URL: http://svn.gna.org/viewcvs/freeciv?rev=35516=rev
Log:
freeciv-manual: show what unit obsoletes a unit.

See hrm Feature #659174

Modified:
trunk/tools/civmanual.c

Modified: trunk/tools/civmanual.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/tools/civmanual.c?rev=35516=35515=35516=diff
==
--- trunk/tools/civmanual.c (original)
+++ trunk/tools/civmanual.c Fri May 12 14:55:00 2017
@@ -616,6 +616,12 @@
 fprintf(doc, SUBITEM_BEGIN, "hitpoints");
 fprintf(doc, _("Hitpoints: %d"),
 putype->hp);
+fprintf(doc, SUBITEM_END);
+fprintf(doc, SUBITEM_BEGIN, "obsolete");
+fprintf(doc, _("Obsolete by: %s"),
+U_NOT_OBSOLETED == putype->obsoleted_by ?
+  Q_("?utype:None") :
+  utype_name_translation(putype->obsoleted_by));
 fprintf(doc, SUBITEM_END);
 fprintf(doc, SUBITEM_BEGIN, "helptext");
 helptext_unit(buf, sizeof(buf), NULL, "", putype);


___
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits


[Freeciv-commits] r35514 - /trunk/server/unithand.c

2017-05-12 Thread sveinung84
Author: sveinung
Date: Fri May 12 14:54:18 2017
New Revision: 35514

URL: http://svn.gna.org/viewcvs/freeciv?rev=35514=rev
Log:
Initialize kind before use in check.

Initialize action not enabled explanation kind so it has a value to check
even if a suitable target is present.

Found with Valgrind.

See hrm Bug #659109

Modified:
trunk/server/unithand.c

Modified: trunk/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=35514=35513=35514=diff
==
--- trunk/server/unithand.c (original)
+++ trunk/server/unithand.c Fri May 12 14:54:18 2017
@@ -811,6 +811,9 @@
   bool can_exist = can_unit_exist_at_tile(punit, unit_tile(punit));
   bool on_native = is_native_tile(unit_type_get(punit), unit_tile(punit));
   int action_custom;
+
+  /* Not know yet. (Initialize before the below check.) */
+  explnat->kind = ANEK_UNKNOWN;
 
   if (action_id != ACTION_ANY) {
 /* A specific action should have a suitable target. */


___
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits