Re: [Freeciv-Dev] (PR#40625) "Lake" tiles for 2.2, Amplio

2009-01-04 Thread john w. bjerk

http://bugs.freeciv.org/Ticket/Display.html?id=40625 >

Thanks,
It's not clear to me if caz has implemented the code for lakes yet.  I  
just wanted graphics to be ready.


--- j. w. bjerk  /  "eleazar"
 www.jwbjerk.com


On Jan 4, 2009, at 8:30 PM, Madeline Book wrote:

>
> http://bugs.freeciv.org/Ticket/Display.html?id=40625 >
>
>> [jwbj...@gmail.com - Sun Jan 04 22:01:23 2009]:
>>
>> I created the requested images for the "lake" terrain for the amplio
>> tileset.
>> see here:
>> http://forum.freeciv.org/viewtopic.php?p=22599#22599
>
> Alright I added the lake graphics at the bottom of terrain2.png
> (new version attached). I'm not sure though how exactly the
> terrain2.spec file needs to be changed...
>
>
> ---
> 村人は淡水に感謝します。
> 






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


[Freeciv-Dev] (PR#40624) Editor behavior when there is no military bases in ruleset

2009-01-04 Thread Madeline Book

http://bugs.freeciv.org/Ticket/Display.html?id=40624 >

> [cazf...@gmail.com - Sun Jan 04 21:38:32 2009]:
> 
>  Maybe it should be impossible to select military base tool at all
> when ruleset has no base types at all. Currently it ends printing
> error message "...because 0 is not a valid base type id" (this is not
> too bad, at least it doesn't crash)

Attached patch makes the editor gui popup an error message if
the ruleset does not define any values for the tool the user
tries to select.


---
エラー。定義されていない現実。
 client/editor.c  |   30 ++
 client/editor.h  |1 +
 client/gui-gtk-2.0/editgui.c |   30 --
 3 files changed, 59 insertions(+), 2 deletions(-)

diff --git a/client/editor.c b/client/editor.c
index d5b89f8..a09be2c 100644
--- a/client/editor.c
+++ b/client/editor.c
@@ -270,6 +270,36 @@ bool editor_is_active(void)
 }
 
 /
+  Returns TRUE if the given tool should be made availble to the user via
+  the editor GUI. For example, this will return FALSE for ETT_MILITARY_BASE
+  if there are no bases defined in the ruleset.
+
+  NB: This depends on the ruleset information received from the server, so
+  it will return FALSE if the client does not have it yet.
+/
+bool editor_tool_is_usable(enum editor_tool_type ett)
+{
+  if (!editor || !(0 <= ett && ett < NUM_EDITOR_TOOL_TYPES)) {
+return FALSE;
+  }
+
+  switch (ett) {
+  case ETT_MILITARY_BASE:
+return base_count() > 0;
+break;
+  case ETT_TERRAIN_RESOURCE:
+return resource_count() > 0;
+break;
+  case ETT_UNIT:
+return utype_count() > 0;
+break;
+  default:
+break;
+  }
+  return TRUE;
+}
+
+/
   Returns TRUE if the given tool type has sub-values (e.g. the terrain
   tool has values corresponding to the terrain types).
 /
diff --git a/client/editor.h b/client/editor.h
index 093c509..2388720 100644
--- a/client/editor.h
+++ b/client/editor.h
@@ -82,6 +82,7 @@ int editor_tool_get_applied_player(enum editor_tool_type ett);
 void editor_tool_set_applied_player(enum editor_tool_type,
 int player_no);
 
+bool editor_tool_is_usable(enum editor_tool_type ett);
 bool editor_tool_has_value(enum editor_tool_type ett);
 bool editor_tool_has_value_erase(enum editor_tool_type ett);
 int editor_tool_get_value(enum editor_tool_type ett);
diff --git a/client/gui-gtk-2.0/editgui.c b/client/gui-gtk-2.0/editgui.c
index 2168cc2..4bb25ed 100644
--- a/client/gui-gtk-2.0/editgui.c
+++ b/client/gui-gtk-2.0/editgui.c
@@ -97,6 +97,7 @@ static void editbar_mode_button_toggled(GtkToggleButton *tb,
 gpointer userdata);
 static void editbar_tool_button_toggled(GtkToggleButton *tb,
 gpointer userdata);
+static void try_to_set_editor_tool(enum editor_tool_type ett);
 
 static struct editbar *editor_toolbar;
 static struct editinfobox *editor_infobox;
@@ -162,6 +163,31 @@ static void editbar_mode_button_toggled(GtkToggleButton *tb,
 }
 
 /
+  Try to set the given tool as the current editor tool. If the tool is
+  unavailable (editor_tool_is_usable) an error popup is displayed.
+/
+static void try_to_set_editor_tool(enum editor_tool_type ett)
+{
+  if (!(0 <= ett && ett < NUM_EDITOR_TOOL_TYPES)) {
+return;
+  }
+
+  if (!editor_tool_is_usable(ett)) {
+GtkWidget *dialog;
+dialog = gtk_message_dialog_new(GTK_WINDOW(toplevel),
+GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s",
+_("The current ruleset does not define any "
+  "objects corresponding to this editor tool."));
+gtk_window_set_title(GTK_WINDOW(dialog), editor_tool_get_name(ett));
+gtk_dialog_run(GTK_DIALOG(dialog));
+gtk_widget_destroy(dialog);
+  } else {
+editor_set_tool(ett);
+  }
+}
+
+/
   Callback to handle toggling of any of the tool buttons.
 /
 static void editbar_tool_button_toggled(GtkToggleButton *tb,
@@ -174,7 +200,7 @@ static void editbar_tool_button_toggled(GtkToggleButton *tb,
   ett = GPOINTER_TO_INT(userdata);
 
   if (active) {
-editor_set_tool(ett);
+try_to_set_editor_tool(ett);
 editgui_refresh();
   }
 }
@@ -1712,7 +1738,7 @@ gboolean handle_edit_key_press(GdkEventKey *ev)
   }
 
   if (new_ett != NU

[Freeciv-Dev] (PR#40625) "Lake" tiles for 2.2, Amplio

2009-01-04 Thread Madeline Book

http://bugs.freeciv.org/Ticket/Display.html?id=40625 >

> [jwbj...@gmail.com - Mon Jan 05 03:13:15 2009]:
> 
> It's not clear to me if caz has implemented the code for lakes
> yet.  I just wanted graphics to be ready.

As far as I know lakes are defined in the terrain ruleset
file (since the editor can place them) and the generator
does create them (i.e. small oceans are turned into lakes).
I'll try to figure out this complicated spec file syntax. ;)


---
まだ喉が渇きませんか。

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


Re: [Freeciv-Dev] compilers that aren't C99

2009-01-04 Thread Brandon Van Every
On Sun, Jan 4, 2009 at 5:52 PM, Vasco Alexandre da Silva Costa
 wrote:
> On Fri, Jan 2, 2009 at 8:55 PM, Brandon Van Every  wrote:
>>
>> One could argue that GNU is C centric, being obsessed with the ability
>> to bring up programs on all systems, no matter how obscure.  Also,
>> most "advanced" languages that are not C++, like Scheme or Lisp or
>> OCaml or whatnot, have a much easier time talking to C.
>
> Actually, GCC usually supports C++ features before they are
> implemented in Visual Studio.

By GNU I meant the Free Software Foundation.  I think they are C
centric, due to the tools they are trying to advance.  Disagree?


Cheers,
Brandon Van Every

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


Re: [Freeciv-Dev] (PR#16811) Issue tracking system for Freeciv

2009-01-04 Thread Brandon J. Van Every

http://bugs.freeciv.org/Ticket/Display.html?id=16811 >

I think this should be in the ticket, so I'm sending it to RT.

On Sun, Jan 4, 2009 at 3:47 PM, Kevin Benton  wrote:
> Brandon J. Van Every wrote:
>>
>> I don't see any big deal
>> with RT because it's not my first instinct to look for someone else's
>> bug to work on.  My first instincts are to:
>>
>
> Okay - I'm glad you don't care.  I do care, however, because I think RT is a
> piece of garbage when it comes to tracking software development projects.  I
> also hate the way it's currently configured to prevent others from being
> able to view bugs and look for duplicates.  It's discouraging to those of us
> who actively want to participate in other parts of development like QA,
> Reviews, etc.  It's also discouraging for those of us on the "outside"
> looking in trying to get a sense of where things are in the development
> process because things are pretty hidden unless you actively try to look at
> bugs that wouldn't show up in "normal" searches.

My experience in open source is you have to communicate with other
developers somehow.  I've been heavily involved in a couple of smaller
projects.  They communicated by active mailing lists, and that worked
fine.  I've perused the Mozilla bug tracker.  Culturally, they use it
for communication instead of mailing lists.  They're a huge project so
perhaps they are justified in using bug trackers and newsgroups to
communicate.  It is quite amusing, however, to see vast threads of bug
tracker discussion that never go anywhere.  Especially when the
discussion goes for years, with big lulls between.  It's like the
collective gestalt of such a system is extremely limited.  The bug
tracker is only as good as the people and the work they actually do.

>> 2) evaluate the readability of the source code.  So far, I find it
>> readable.
>
> Again - great, but why not let the issue tracking system help in the review
> process to make sure it's better still?

Because I don't personally need or benefit from that much process.  I
think "swimming through muck" is a core skill in open source
development.  If a person can't do it, then they just don't get
anywhere, and probably find something else to go do.  Also, all the
small projects I've seen, that have actually survived for a few years,
have had decently readable code.  The ones that don't just die,
because nobody can figure out how to contribute.  Freeciv is long past
that stage.

>> 4) evaluate the political tone and management of the project.  What do
>> people really spend their time on?  What do they stew and get to
>> loggerheads about?  What do they fail to get done?  What do they
>> actively obstruct?
>
> Again - what does this have to do with the issue tracking system?

Because it's a mistake to advance a technology to solve a cultural problem.

> If all
> you want to do is write code, great and bring it on.  The problem I see is
> at some point, it needs to be scrutinized by others, integration tested, and
> issues need to be tracked and easy to look at for those who want to write
> code themselves.  This is where a good issue tracking system comes in.

Can you point to any open source project that's about the size of
Freeciv, that actually has a lot of programmers doing QA testbeds
instead of core development of new features?  Most people find this
quite boring, and I say that as a build engineer who has tried to goad
people into more QA.  My experience is that on small projects, it
doesn't happen.  So there is a danger of overengineering a bug
tracker, like expecting Mozilla-size development, when in fact it will
never happen.

> As I said earlier in this ticket, I'm willing to provide the elbow grease
> necessary, however, I am not willing to host it personally because I can't
> guarantee that I won't get hit by a bus and therefore, I am not able to
> guarantee it to be up.

Ok how about providing the elbow grease to solve that problem?  I
Googled for a few minutes and found there are definitely open source
services that provide bug trackers.  Show us one that's gonna stay
alive independent of you.

> I don't take lightly the commitment I'd be making if I choose to become a
> contributor to the Freeciv (or any other) project.  I choose carefully
> because I have a life and I need to make sure I don't give up too much of
> what's really important to me.  Freeciv is a way for me to relax.  I would
> like to contribute to it in certain areas like the CMA because I really
> think it could be improved a lot.  [...and several other game design ideas.]

Most volunteer developers care mainly about relaxing.  At least that's
what I see, in practice, as far as what they actually put their energy
into.  I think you can see why bug trackers and QA end up at the back
of the queue.  If QA isn't the #1 thing you want to do, are you sure
you want to walk down this road?  Maybe you should just dig into the
CMA code and whatever else.  Possibly accept RT for what it is: a

Re: [Freeciv-Dev] compilers that aren't C99

2009-01-04 Thread Vasco Alexandre da Silva Costa
On Fri, Jan 2, 2009 at 8:55 PM, Brandon Van Every  wrote:
> On Fri, Jan 2, 2009 at 3:08 PM, Marko Lindqvist  wrote:
>>
>>  I have been told that VisualStudio lacks several C99 features (and
>> has incompatible implementation for some, I believe) simply because
>> it's not even meant to be C compiler. It's an C++ compiler.
>
> I don't think "meant to be" is quite the right turn of phrase, since
> it is a C compiler.  Rather, as noted in that "wontfix" notice,
> Microsoft feels that its customers are C++ centric.  So they put their
> development resources into that, and not C99.
>
> I must admit, C++ having far more users than C is an argument with
> some weight.  Especially in the game industry: C is done for some
> things, but C++ is the primary resume skill.  You may not care about
> resume skills around here, but a lot of people feel that kind of
> justification is important for what projects they work on.  I have
> wondered how "Freeciv is strictly C" might impede developer retention.
>
> One could argue that GNU is C centric, being obsessed with the ability
> to bring up programs on all systems, no matter how obscure.  Also,
> most "advanced" languages that are not C++, like Scheme or Lisp or
> OCaml or whatnot, have a much easier time talking to C.

Actually, GCC usually supports C++ features before they are
implemented in Visual Studio.
Take TR1 functionality for example. One thing it tradiotionally lagged
behind was in code optimization, but even that has changed recently.

-- 
Vasco Alexandre da Silva Costa
PhD Student and Teaching Assistant at Department of Information
Systems and Computer Science
IST/Technical University of Lisbon

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


[Freeciv-Dev] (PR#40625) "Lake" tiles for 2.2, Amplio

2009-01-04 Thread john w. bjerk

http://bugs.freeciv.org/Ticket/Display.html?id=40625 >

I created the requested images for the "lake" terrain for the amplio  
tileset.
see here:
http://forum.freeciv.org/viewtopic.php?p=22599#22599


--- j. w. bjerk  /  "eleazar"
 www.jwbjerk.com



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


[Freeciv-Dev] (PR#40626) Improved graphics for "Stratege" tileset

2009-01-04 Thread john w. bjerk

http://bugs.freeciv.org/Ticket/Display.html?id=40626 >

I created an appropriately stylzed nuke explosion, and a visually  
distinct medieval cityset.
get them here:
http://forum.freeciv.org/viewtopic.php?p=22563#22563


--- j. w. bjerk  /  "eleazar"
 www.jwbjerk.com



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


Re: [Freeciv-Dev] (PR#40612) AutoReply: Patch: migration

2009-01-04 Thread Matthias Pfafferodt

http://bugs.freeciv.org/Ticket/Display.html?id=40612 >

The migration patch (version 6)

changes:

- split the patch in three parts:
  * the patch
  * patch to add an option for the food check
  * some freelog(LOG_NORMAL,...) debugging messages

The patch was tested.

Matthias

diff -ur -X./freeciv-2.1.99svn15393/diff_ignore freeciv-2.1.99svn.patch_migration_food/server/cityturn.c freeciv-2.1.99svn.patch_migration_debug/server/cityturn.c
--- freeciv-2.1.99svn.patch_migration_food/server/cityturn.c	2009-01-04 21:28:25.0 +0100
+++ freeciv-2.1.99svn.patch_migration_debug/server/cityturn.c	2009-01-04 22:19:27.0 +0100
@@ -1466,7 +1466,7 @@
 utype_name_translation(utype));
 
 /* Log before signal emitting, so pointers are certainly valid */
-freelog(LOG_VERBOSE, "%s %s tried to build %s, which is not available.",
+freelog(LOG_NORMAL, "%s %s tried to build %s, which is not available.",
 nation_rule_name(nation_of_city(pcity)),
 city_name(pcity),
 utype_rule_name(utype));
@@ -2076,7 +2076,7 @@
   player_name(pplayer_from), city_name(pcity_to));
   }
 
-  freelog(LOG_DEBUG, "[M] T%d migration successful (%s -> %s)",
+  freelog(LOG_NORMAL, "[M] T%d migration successful (%s -> %s)",
   game.info.turn, city_from_name, city_name(pcity_to));
 
   return TRUE;
@@ -2136,7 +2136,7 @@
 float score_from = city_score(pcity) * 3;
 float score_tmp = 0;
 
-freelog(LOG_DEBUG, "[M] T%d check city: %s score: %6.3f (%s)",
+freelog(LOG_NORMAL, "[M] T%d check city: %s score: %6.3f (%s)",
 game.info.turn, city_name(pcity), score_from,
 player_name(pplayer));
 
@@ -2161,7 +2161,7 @@
   score_tmp = city_score(acity) * (GAME_MAX_MIGRATION_DIST + 1 - dist)
   / (GAME_MAX_MIGRATION_DIST + 1);
 
-  freelog(LOG_DEBUG, "[M] T%d - compare city: %s (%s) dist: %d "
+  freelog(LOG_NORMAL, "[M] T%d - compare city: %s (%s) dist: %d "
   "score: %6.3f", game.info.turn, city_name(acity),
   player_name(city_owner(acity)), dist, score_tmp);
 
@@ -2173,7 +2173,7 @@
   best_city_player_score = score_tmp;
   best_city_player = acity;
 
-  freelog(LOG_DEBUG, "[M] T%d - best city (player): %s (%s) score: "
+  freelog(LOG_NORMAL, "[M] T%d - best city (player): %s (%s) score: "
   "%6.3f (> %6.3f)", game.info.turn,
   city_name(best_city_player), player_name(pplayer),
   best_city_player_score, score_from);
@@ -2187,7 +2187,7 @@
   best_city_world_score = score_tmp;
   best_city_world = acity;
 
-  freelog(LOG_DEBUG, "[M] T%d - best city (world): %s (%s) score: "
+  freelog(LOG_NORMAL, "[M] T%d - best city (world): %s (%s) score: "
   "%6.3f (> %6.3f)", game.info.turn,
   city_name(best_city_world),
   player_name(city_owner(best_city_world)),
diff -ur -X./freeciv-2.1.99svn15393/diff_ignore freeciv-2.1.99svn.patch_migration/common/game.c freeciv-2.1.99svn.patch_migration_food/common/game.c
--- freeciv-2.1.99svn.patch_migration/common/game.c	2009-01-04 21:22:21.0 +0100
+++ freeciv-2.1.99svn.patch_migration_food/common/game.c	2009-01-04 21:22:39.0 +0100
@@ -276,6 +276,7 @@
   game.info.savepalace= GAME_DEFAULT_SAVEPALACE;
   game.info.natural_city_names = GAME_DEFAULT_NATURALCITYNAMES;
   game.info.migrationturn = GAME_DEFAULT_MIGRATION_TURN;
+  game.info.migrationturn = GAME_DEFAULT_MIGRATION_FOOD;
   game.info.migrationdist = GAME_DEFAULT_MIGRATION_DIST;
   game.info.migrationworld = GAME_DEFAULT_MIGRATION_WORLD;
   game.info.migrationplayer = GAME_DEFAULT_MIGRATION_PLAYER;
diff -ur -X./freeciv-2.1.99svn15393/diff_ignore freeciv-2.1.99svn.patch_migration/common/game.h freeciv-2.1.99svn.patch_migration_food/common/game.h
--- freeciv-2.1.99svn.patch_migration/common/game.h	2009-01-04 21:22:21.0 +0100
+++ freeciv-2.1.99svn.patch_migration_food/common/game.h	2009-01-04 21:22:39.0 +0100
@@ -254,6 +254,8 @@
 #define GAME_MIN_MIGRATION_TURN  0
 #define GAME_MAX_MIGRATION_TURN  100
 
+#define GAME_DEFAULT_MIGRATION_FOOD   TRUE
+
 #define GAME_DEFAULT_MIGRATION_DIST   3
 #define GAME_MIN_MIGRATION_DIST   1
 #define GAME_MAX_MIGRATION_DIST   7
diff -ur -X./freeciv-2.1.99svn15393/diff_ignore freeciv-2.1.99svn.patch_migration/common/packets.def freeciv-2.1.99svn.patch_migration_food/common/packets.def
--- freeciv-2.1.99svn.patch_migration/common/packets.def	2009-01-04 21:22:21.0 +0100
+++ freeciv-2.1.99svn.patch_migration_food/common/packets.def	2009-01-04 21:22:39.0 +0100
@@ -415,6 +415,7 @@
   BOOL savepalace;
   BOOL natural_city_names;
   UINT8 migrationturn;
+  BOOL migrationfood;
   UINT8 migrationdist;
   UINT8 migrationplayer;
   UINT8 migrationworld;
diff -ur -X./freeciv-2.1.99svn15393/diff_ignore freeciv-2.1.99svn.patch_migration/server/cityturn.c free

Re: [Freeciv-Dev] (PR#40619) AutoReply: gold upkeep

2009-01-04 Thread Matthias Pfafferodt

http://bugs.freeciv.org/Ticket/Display.html?id=40619 >

The gold upkeep patch (version 2)

changes:

- give the struct for the list some memory and free all used memory
- split the patch in two parts:
  * the patch
  * some freelog(LOG_NORMAL,...) debugging messages
- correct an error in the definition of the default value
- additional comments / explanations
- randomly chosen unit to disband

The patch was tested with an adapted ruleset (gold upkeep).

Matthias

diff -ur -X./freeciv-2.1.99svn15393/diff_ignore freeciv-2.1.99svn.patch_gold/server/cityturn.c freeciv-2.1.99svn.patch_gold_debug/server/cityturn.c
--- freeciv-2.1.99svn.patch_gold/server/cityturn.c	2009-01-04 22:08:54.0 +0100
+++ freeciv-2.1.99svn.patch_gold_debug/server/cityturn.c	2009-01-04 22:08:03.0 +0100
@@ -428,7 +428,6 @@
   int gold;
   gold=pplayer->economic.gold;
   pplayer->bulbs_last_turn = 0;
-
   /* finances depend on the setting for 'game.info.economicsystem'
* 0: finances are check for each city (old system; done in
*update_city_activity())
@@ -440,7 +439,11 @@
   if (game.info.economicsystem == 1 && pplayer->economic.gold < 0) {
 /* not enough gold - we have to sell something or even kill some
  * units (only with gold upkeep!) to get the gold */
+freelog(LOG_NORMAL,"[E:N] %d - %6d (balance:start)",
+game.info.economicsystem, pplayer->economic.gold);
 balance_finances_nation(pplayer);
+freelog(LOG_NORMAL,"[E:N] %d - %6d (balance:end)",
+game.info.economicsystem, pplayer->economic.gold);
   }
 
   pplayer->ai.prev_gold = gold;
@@ -1952,14 +1955,24 @@
 update_tech(pplayer, pcity->prod[O_SCIENCE]);
 
 /* finances */
+freelog(LOG_NORMAL,"[E:C %s] %d - %6d (before)", city_name(pcity),
+game.info.economicsystem, pplayer->economic.gold);
 pplayer->economic.gold += pcity->prod[O_GOLD];
+freelog(LOG_NORMAL,"[E:C %s] %d - %6d (prod)", city_name(pcity),
+game.info.economicsystem, pplayer->economic.gold);
 pplayer->economic.gold -= pay_for_buildings(pcity);
+freelog(LOG_NORMAL,"[E:C %s] %d - %6d (buildings)", city_name(pcity),
+game.info.economicsystem, pplayer->economic.gold);
 pplayer->economic.gold -= pay_for_units(pcity);
+freelog(LOG_NORMAL,"[E:C %s] %d - %6d (units)", city_name(pcity),
+game.info.economicsystem, pplayer->economic.gold);
 
 if (game.info.economicsystem == 0 && pplayer->economic.gold < 0) {
   /* not enough gold - we have to sell something or even kill some
* units (only with gold upkeep!) to get the gold */
   balance_finances_city(pplayer, pcity);
+  freelog(LOG_NORMAL,"[E:C %s] %d - %6d (balance)", city_name(pcity),
+  game.info.economicsystem, pplayer->economic.gold);
 }
 
 if(city_unhappy(pcity)) {
diff -ur -X./freeciv-2.1.99svn15393/diff_ignore freeciv-2.1.99svn.patch_shuffle/common/game.h freeciv-2.1.99svn.patch_gold/common/game.h
--- freeciv-2.1.99svn.patch_shuffle/common/game.h	2008-12-30 23:29:33.0 +0100
+++ freeciv-2.1.99svn.patch_gold/common/game.h	2009-01-04 21:54:19.0 +0100
@@ -183,6 +183,10 @@
 #define GAME_MIN_AIFILL  0
 #define GAME_MAX_AIFILL  GAME_MAX_MAX_PLAYERS
 
+#define GAME_DEFAULT_ECONOMIC_SYSTEM 0
+#define GAME_MIN_ECONOMIC_SYSTEM 0
+#define GAME_MAX_ECONOMIC_SYSTEM 1
+
 #define GAME_DEFAULT_FOODBOX 100
 #define GAME_MIN_FOODBOX 1
 #define GAME_MAX_FOODBOX 1
diff -ur -X./freeciv-2.1.99svn15393/diff_ignore freeciv-2.1.99svn.patch_shuffle/common/packets.def freeciv-2.1.99svn.patch_gold/common/packets.def
--- freeciv-2.1.99svn.patch_shuffle/common/packets.def	2008-12-30 23:29:33.0 +0100
+++ freeciv-2.1.99svn.patch_gold/common/packets.def	2009-01-04 21:22:01.0 +0100
@@ -389,6 +389,7 @@
   UINT8 diplcost, freecost, conquercost;
   UINT8 angrycitizen;
   UINT8 techpenalty;
+  UINT8 economicsystem;
   UINT32 foodbox;
   UINT32 shieldbox;
   UINT32 sciencebox;
diff -ur -X./freeciv-2.1.99svn15393/diff_ignore freeciv-2.1.99svn.patch_shuffle/data/civ1/game.ruleset freeciv-2.1.99svn.patch_gold/data/civ1/game.ruleset
--- freeciv-2.1.99svn.patch_shuffle/data/civ1/game.ruleset	2008-12-30 23:29:34.0 +0100
+++ freeciv-2.1.99svn.patch_gold/data/civ1/game.ruleset	2009-01-04 21:54:25.0 +0100
@@ -56,6 +56,17 @@
 ;   "Fallout"   - Nuclear Fallout (distinct from industrial/population).
 nuke_contamination	= "Pollution"
 
+; Parameters used to describe the economic system
+; 0: Gold upkeep for buildings and units has to be paid by the each city.
+;If there is not enough gold, randomly chosen buildings of the city
+;are sold. If there still is not enough gold, units of this city with
+;gold upkeep are disbanded. (old system)
+; 1: Gold upkeep for buildings and units comes from the overall finances.
+;If there is not enough gold first randomly chosen buildings (taking
+;into account _all_ c

[Freeciv-Dev] (PR#40624) Editor behavior when there is no military bases in ruleset

2009-01-04 Thread Marko Lindqvist

http://bugs.freeciv.org/Ticket/Display.html?id=40624 >

 Maybe it should be impossible to select military base tool at all
when ruleset has no base types at all. Currently it ends printing
error message "...because 0 is not a valid base type id" (this is not
too bad, at least it doesn't crash)


 - ML



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


[Freeciv-Dev] (PR#40623) Tech tree should have icons for settler actions

2009-01-04 Thread Marko Lindqvist

http://bugs.freeciv.org/Ticket/Display.html?id=40623 >

 GTK -client: Tech tree does not show any icons indicating which
technology makes it possible for settlers to build fortresses,
airbases, farmland... it should.


 - ML



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


Re: [Freeciv-Dev] (PR#40622) Patch: grammatical corrections in the swedish translation

2009-01-04 Thread Erik Larsson

http://bugs.freeciv.org/Ticket/Display.html?id=40622 >

The patch is against the trunk (rev. 15280).

I compared the branches S2_0 and S2_1 and they both contain the line
which my patch changes.

I am quite new to subversion and all the terms surrounding it... was
that satisfactory answers to your questions?

Regards,

Erik


sön 2009-01-04 klockan 01:43 -0800 skrev Daniel Markstedt:
> http://bugs.freeciv.org/Ticket/Display.html?id=40622 >
> 
> Against which version/branch is the patch?
> 
> Have you compared several branches?
> 
> Daniel
> 
> On Sun, 04 Jan 2009 07:24:36 +0900, Erik Larsson  wrote:
> 
> >
> > http://bugs.freeciv.org/Ticket/Display.html?id=40622 >
> >
> > Hi,
> >
> > Here is a patch for the swedish translation. It corrects two grammatical
> > mistakes.
> >
> > /Erik
> >
> >
> 
> 
> 



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


Re: [Freeciv-Dev] (PR#40617) Assertion with RiverNative flag

2009-01-04 Thread Marko Lindqvist

http://bugs.freeciv.org/Ticket/Display.html?id=40617 >

2009/1/2 Marko Lindqvist:
> 2009/1/2 Yoav Luft:
>>> civserver: advmilitary.c:1183: kill_something_with: Assertion `SEA_MOVING 
>>> == utype_move_type(boattype)' failed.
>
>
>>  or at least check that the
>> movement type is not "land"?
>
>  ...this sounds like a most sensible solution.

 Mainly untested patch


 - ML

diff -Nurd -X.diff_ignore freeciv/ai/advmilitary.c freeciv/ai/advmilitary.c
--- freeciv/ai/advmilitary.c2008-10-27 04:13:32.0 +0200
+++ freeciv/ai/advmilitary.c2009-01-04 14:35:03.0 +0200
@@ -1180,7 +1180,7 @@
   boattype = get_role_unit(L_FERRYBOAT, 0);
 }
   }
-  assert(SEA_MOVING == utype_move_type(boattype));
+  assert(LAND_MOVING != utype_move_type(boattype));
 
   go_by_boat = !(WARMAP_COST(ptile) <= (MIN(6, move_rate) * THRESHOLD)
  && goto_is_sane(myunit, acity->tile, TRUE));
diff -Nurd -X.diff_ignore freeciv/server/ruleset.c freeciv/server/ruleset.c
--- freeciv/server/ruleset.c2008-12-28 14:53:34.0 +0200
+++ freeciv/server/ruleset.c2009-01-04 14:50:00.0 +0200
@@ -1334,11 +1334,15 @@
   ival = find_unit_role_by_rule_name(sval);
   if (ival==L_LAST) {
 freelog(LOG_ERROR, "\"%s\" unit_type \"%s\": bad role name \"%s\".",
-filename,
-utype_rule_name(u),
-sval);
+filename, utype_rule_name(u), sval);
+  } else if ((ival == L_FERRYBOAT || ival == L_BARBARIAN_BOAT)
+ && u->uclass->move_type == LAND_MOVING) {
+freelog(LOG_ERROR,
+"\"%s\" unit_type \"%s\": role \"%s\" for land moving unit.",
+filename, utype_rule_name(u), sval);
+  } else {
+BV_SET(u->roles, ival - L_FIRST);
   }
-  BV_SET(u->roles, ival - L_FIRST);
   assert(utype_has_role(u, ival));
 }
 free(slist);
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#40622) Patch: grammatical corrections in the swedish translation

2009-01-04 Thread Daniel Markstedt

http://bugs.freeciv.org/Ticket/Display.html?id=40622 >

Against which version/branch is the patch?

Have you compared several branches?

Daniel

On Sun, 04 Jan 2009 07:24:36 +0900, Erik Larsson  wrote:

>
> http://bugs.freeciv.org/Ticket/Display.html?id=40622 >
>
> Hi,
>
> Here is a patch for the swedish translation. It corrects two grammatical
> mistakes.
>
> /Erik
>
>




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


[Freeciv-Dev] (PR#40622) Patch: grammatical corrections in the swedish translation

2009-01-04 Thread Erik Larsson

http://bugs.freeciv.org/Ticket/Display.html?id=40622 >

Hi,

Here is a patch for the swedish translation. It corrects two grammatical
mistakes.

/Erik 


Index: sv.po
===
--- sv.po	(revision 15393)
+++ sv.po	(working copy)
@@ -20730,7 +20730,7 @@
 "Great philosophers from all the world join your civilization: you get an "
 "immediate advance."
 msgstr ""
-"Stora filosofer från hela världen ansluta sig till vår civilisation: vi få "
+"Stora filosofer från hela världen ansluter sig till vår civilisation: vi får "
 "genast 1 framsteg."
 
 #: data/default/techs.ruleset:531 data/civ2/techs.ruleset:528
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev