[Freeciv-Dev] (PR#11367) [Patch] Death to civstyle
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=11367 >
Last effect civstyle server option had - determining how Apollo
Program works - is finally gone. So option itself should go.
rm_civstyle_HEAD.diff removes traces of civstyle as completely as
possible without breaking network compatibility and savegame
compatibility with old servers. This one should go to HEAD.
rm_civstyle_S2.diff removes option itself - makes it unaccessible to
user - but leaves game.civstyle and such behind. I'm not sure if S2_0
should get only this or should rm_civstyle_HEAD.diff be committed there too.
- ML
diff -Nurd -X.diff_ignore freeciv/client/packhand.c freeciv/client/packhand.c
--- freeciv/client/packhand.c 2004-12-05 16:10:20.677384500 +0200
+++ freeciv/client/packhand.c 2004-12-06 06:38:05.048500000 +0200
@@ -1427,7 +1427,6 @@
}
game.techpenalty=pinfo->techpenalty;
game.foodbox=pinfo->foodbox;
- game.civstyle=pinfo->civstyle;
game.unhappysize = pinfo->unhappysize;
game.cityfactor = pinfo->cityfactor;
diff -Nurd -X.diff_ignore freeciv/common/capstr.c freeciv/common/capstr.c
--- freeciv/common/capstr.c 2004-12-05 16:10:21.612544500 +0200
+++ freeciv/common/capstr.c 2004-12-06 06:14:59.673500000 +0200
@@ -82,7 +82,7 @@
* as long as possible. We want to maintain network compatibility with
* the stable branch for as long as possible.
*/
-#define CAPABILITY "+Freeciv.Devel.2004.Dec.5b"
+#define CAPABILITY "+Freeciv.Devel.2004.Dec.5b civstyle_removed"
void init_our_capability(void)
{
diff -Nurd -X.diff_ignore freeciv/common/game.c freeciv/common/game.c
--- freeciv/common/game.c 2004-12-05 16:10:21.706060500 +0200
+++ freeciv/common/game.c 2004-12-06 06:15:49.689125000 +0200
@@ -221,7 +221,6 @@
game.killcitizen = GAME_DEFAULT_KILLCITIZEN;
game.scorelog = GAME_DEFAULT_SCORELOG;
game.techpenalty = GAME_DEFAULT_TECHPENALTY;
- game.civstyle = GAME_DEFAULT_CIVSTYLE;
game.razechance = GAME_DEFAULT_RAZECHANCE;
game.spacerace = GAME_DEFAULT_SPACERACE;
game.turnblock = GAME_DEFAULT_TURNBLOCK;
diff -Nurd -X.diff_ignore freeciv/common/game.h freeciv/common/game.h
--- freeciv/common/game.h 2004-12-05 16:10:21.706060500 +0200
+++ freeciv/common/game.h 2004-12-06 06:15:09.486000000 +0200
@@ -59,7 +59,6 @@
bool is_new_game; /* 1 for games never started */
int version;
char id[MAX_ID_LEN]; /* server only */
- int civstyle;
int gold;
char start_units[MAX_LEN_STARTUNIT];
int dispersion;
diff -Nurd -X.diff_ignore freeciv/common/packets.def freeciv/common/packets.def
--- freeciv/common/packets.def 2004-12-05 16:10:21.815162500 +0200
+++ freeciv/common/packets.def 2004-12-06 06:27:45.689125000 +0200
@@ -352,7 +352,7 @@
UINT8 angrycitizen;
UINT8 techpenalty;
UINT8 foodbox;
- UINT8 civstyle;
+ UINT8 civstyle; remove-cap(civstyle_removed)
UINT8 diplomacy;
BOOL spacerace;
diff -Nurd -X.diff_ignore freeciv/data/civ1.serv freeciv/data/civ1.serv
--- freeciv/data/civ1.serv 2004-12-05 16:10:22.843838500 +0200
+++ freeciv/data/civ1.serv 2004-12-06 06:19:15.361000000 +0200
@@ -8,7 +8,6 @@
rulesetdir civ1
#
# Minor civ1 rules:
-set civstyle 1
set borders 0
#
# Optional:
diff -Nurd -X.diff_ignore freeciv/data/civ2.serv freeciv/data/civ2.serv
--- freeciv/data/civ2.serv 2004-12-05 16:10:23.498450500 +0200
+++ freeciv/data/civ2.serv 2004-12-06 06:19:23.017250000 +0200
@@ -8,5 +8,4 @@
rulesetdir civ2
#
# Minor civ2 rules:
-set civstyle 2
set borders 0
diff -Nurd -X.diff_ignore freeciv/server/gamehand.c freeciv/server/gamehand.c
--- freeciv/server/gamehand.c 2004-12-05 16:10:49.901134500 +0200
+++ freeciv/server/gamehand.c 2004-12-06 06:31:36.611000000 +0200
@@ -326,7 +326,7 @@
ginfo.diplomacy = game.diplomacy;
ginfo.techpenalty = game.techpenalty;
ginfo.foodbox = game.foodbox;
- ginfo.civstyle = game.civstyle;
+ ginfo.civstyle = 2;
ginfo.spacerace = game.spacerace;
ginfo.unhappysize = game.unhappysize;
ginfo.angrycitizen = game.angrycitizen;
diff -Nurd -X.diff_ignore freeciv/server/savegame.c freeciv/server/savegame.c
--- freeciv/server/savegame.c 2004-12-05 16:10:50.431058500 +0200
+++ freeciv/server/savegame.c 2004-12-06 06:32:40.642250000 +0200
@@ -3048,6 +3048,7 @@
char** technology_order = NULL;
int technology_order_size = 0;
const char* name;
+ int civstyle = 0;
game.version = secfile_lookup_int_default(file, 0, "game.version");
tmp_server_state = (enum server_states)
@@ -3148,7 +3149,7 @@
(void) section_file_lookup(file, "game.farmfood");
}
if (game.version >= 10300) {
- game.civstyle = secfile_lookup_int_default(file, 0, "game.civstyle");
+ civstyle = secfile_lookup_int_default(file, 2, "game.civstyle");
game.save_nturns = secfile_lookup_int(file, "game.save_nturns");
}
@@ -3240,11 +3241,10 @@
secfile_lookup_int_default(file, game.allowed_city_names,
"game.allowed_city_names");
- if(game.civstyle == 1) {
+ if(civstyle == 1) {
string = "civ1";
} else {
string = "default";
- game.civstyle = GAME_DEFAULT_CIVSTYLE;
}
if (!has_capability("rulesetdir", savefile_options)) {
@@ -3675,7 +3675,9 @@
secfile_insert_int(file, game.foodbox, "game.foodbox");
secfile_insert_int(file, game.techpenalty, "game.techpenalty");
secfile_insert_int(file, game.razechance, "game.razechance");
- secfile_insert_int(file, game.civstyle, "game.civstyle");
+
+ /* Write civstyle for compatibility with old servers */
+ secfile_insert_int(file, 2, "game.civstyle");
secfile_insert_int(file, game.save_nturns, "game.save_nturns");
secfile_insert_str(file, game.save_name, "game.save_name");
secfile_insert_int(file, game.aifill, "game.aifill");
diff -Nurd -X.diff_ignore freeciv/server/settings.c freeciv/server/settings.c
--- freeciv/server/settings.c 2004-12-05 16:10:50.462230500 +0200
+++ freeciv/server/settings.c 2004-12-06 06:09:21.173500000 +0200
@@ -624,15 +624,6 @@
"percentage chance to be destroyed."), NULL,
GAME_MIN_RAZECHANCE, GAME_MAX_RAZECHANCE, GAME_DEFAULT_RAZECHANCE)
- GEN_INT("civstyle", game.civstyle,
- SSET_RULES, SSET_MILITARY, SSET_RARE, SSET_TO_CLIENT,
- N_("Style of Civ rules"),
- N_("Sets some basic rules; 1 means style of Civ1, 2 means Civ2.\n"
- "Currently this option affects the following rules:\n"
- " - Apollo shows whole map in Civ2, only cities in Civ1.\n"
- "See also README.rulesets."), NULL,
- GAME_MIN_CIVSTYLE, GAME_MAX_CIVSTYLE, GAME_DEFAULT_CIVSTYLE)
-
GEN_INT("occupychance", game.occupychance,
SSET_RULES, SSET_MILITARY, SSET_RARE, SSET_TO_CLIENT,
N_("Chance of moving into tile after attack"),
diff -Nurd -X.diff_ignore freeciv/data/civ1.serv freeciv/data/civ1.serv
--- freeciv/data/civ1.serv 2004-12-05 16:19:42.225378500 +0200
+++ freeciv/data/civ1.serv 2004-12-06 06:23:54.251625000 +0200
@@ -8,7 +8,6 @@
rulesetdir civ1
#
# Minor civ1 rules:
-set civstyle 1
set borders 0
#
# Optional:
diff -Nurd -X.diff_ignore freeciv/data/civ2.serv freeciv/data/civ2.serv
--- freeciv/data/civ2.serv 2004-12-05 16:19:43.207296500 +0200
+++ freeciv/data/civ2.serv 2004-12-06 06:24:01.189125000 +0200
@@ -8,5 +8,4 @@
rulesetdir civ2
#
# Minor civ2 rules:
-set civstyle 2
set borders 0
diff -Nurd -X.diff_ignore freeciv/server/settings.c freeciv/server/settings.c
--- freeciv/server/settings.c 2004-12-05 16:21:45.853530500 +0200
+++ freeciv/server/settings.c 2004-12-06 06:23:38.767250000 +0200
@@ -620,15 +620,6 @@
"percentage chance to be destroyed."), NULL,
GAME_MIN_RAZECHANCE, GAME_MAX_RAZECHANCE, GAME_DEFAULT_RAZECHANCE)
- GEN_INT("civstyle", game.civstyle,
- SSET_RULES, SSET_MILITARY, SSET_RARE, SSET_TO_CLIENT,
- N_("Style of Civ rules"),
- N_("Sets some basic rules; 1 means style of Civ1, 2 means Civ2.\n"
- "Currently this option affects the following rules:\n"
- " - Apollo shows whole map in Civ2, only cities in Civ1.\n"
- "See also README.rulesets."), NULL,
- GAME_MIN_CIVSTYLE, GAME_MAX_CIVSTYLE, GAME_DEFAULT_CIVSTYLE)
-
GEN_INT("occupychance", game.occupychance,
SSET_RULES, SSET_MILITARY, SSET_RARE, SSET_TO_CLIENT,
N_("Chance of moving into tile after attack"),
- [Freeciv-Dev] (PR#11367) [Patch] Death to civstyle,
Marko Lindqvist <=
|
|