<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39370 >
Per I. Mathisen wrote: > Yes. Patch to change this most welcome. > Apparently, it was a conscious decision by some prior developer. There is a documented vision parameter that is only FALSE for cities. Therefore, I propose a configurable ruleset option. Tested, works for me.
--- ../cities.ruleset Sun Feb 18 23:01:51 2007 +++ data/default/cities.ruleset Thu May 17 14:43:49 2007 @@ -60,6 +60,8 @@ ;forced_luxury = 100 ;forced_gold = 0 +vision_reveal_tiles = 1 ; was default zero for old savegames + ; ; City styles define the way cities are drawn ; --- ../citytools.c Tue Mar 20 22:22:54 2007 +++ server/citytools.c Thu May 17 13:49:28 2007 @@ -791,7 +791,7 @@ give_citymap_from_player_to_player(pcity, pgiver, ptaker); old_vision = pcity->server.vision; - pcity->server.vision = vision_new(ptaker, pcity->tile, FALSE); + pcity->server.vision = vision_new(ptaker, pcity->tile, game.info.city_reveal_tiles); vision_layer_iterate(v) { vision_change_sight(pcity->server.vision, v, vision_get_sight(old_vision, v)); @@ -974,7 +974,7 @@ } /* Before arranging workers to show unknown land */ - pcity->server.vision = vision_new(pplayer, ptile, FALSE); + pcity->server.vision = vision_new(pplayer, ptile, game.info.city_reveal_tiles); city_refresh_vision(pcity); tile_set_city(ptile, pcity); --- ../packets.def Tue Mar 20 22:23:07 2007 +++ common/packets.def Thu May 17 13:25:59 2007 @@ -417,6 +417,7 @@ UINT8 allowed_city_names; IMPROVEMENT palace_building; IMPROVEMENT land_defend_building; + BOOL city_reveal_tiles; BOOL changable_tax; UINT8 forced_science; UINT8 forced_luxury; --- ../ruleset.c Sun Feb 18 23:01:46 2007 +++ server/ruleset.c Thu May 17 13:42:57 2007 @@ -2319,6 +2319,7 @@ game.info.angrycitizen = secfile_lookup_bool_default(file, GAME_DEFAULT_ANGRYCITIZEN, "parameters.angry_citizens"); + game.info.changable_tax = secfile_lookup_bool_default(file, TRUE, "parameters.changable_tax"); game.info.forced_science = @@ -2332,6 +2333,10 @@ freelog(LOG_FATAL, "Forced taxes do not add up in ruleset!"); exit(EXIT_FAILURE); } + + /* old versions didn't reveal tiles */ + game.info.city_reveal_tiles = + secfile_lookup_bool_default(file, FALSE, "parameters.vision_reveal_tiles"); /* City Styles ... */ --- ../savegame.c Tue Mar 20 22:22:54 2007 +++ server/savegame.c Thu May 17 13:45:08 2007 @@ -2378,7 +2378,7 @@ } /* adding the cities contribution to fog-of-war */ - pcity->server.vision = vision_new(pcity->owner, pcity->tile, FALSE); + pcity->server.vision = vision_new(pcity->owner, pcity->tile, game.info.city_reveal_tiles); city_refresh_vision(pcity); pcity->units_supported = unit_list_new();
_______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev