Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. *Read more...*

Feature #871245 ยป 0029-Cache-if-infrapoints-are-in-use-in-the-ruleset.patch

Marko Lindqvist, 2020-04-28 04:57 PM

View differences:

client/gui-gtk-3.22/menu.c
menu_entry_set_sensitive("EDIT_MODE",
can_conn_enable_editing(&client.conn));
editgui_refresh();
menu_entry_set_sensitive("INFRA_DLG", game.info.infrapoints > 0);
menu_entry_set_sensitive("INFRA_DLG", terrain_control.infrapoints);
{
char road_buf[500];
common/networking/packets.def
MOVEFRAGS move_fragments;
MOVEFRAGS igter_cost;
BOOL pythagorean_diagonal;
BOOL infrapoints;
STRING gui_type_base0[MAX_LEN_NAME];
STRING gui_type_base1[MAX_LEN_NAME];
end
fc_version
# - No new mandatory capabilities can be added to the release branch; doing
# so would break network capability of supposedly "compatible" releases.
#
NETWORK_CAPSTRING="+Freeciv.Devel-3.1-2020.Apr.28"
NETWORK_CAPSTRING="+Freeciv.Devel-3.1-2020.Apr.28b"
FREECIV_DISTRIBUTOR=""
server/infrapts.c
****************************************************************************/
void handle_player_place_infra(struct player *pplayer, int tile, int extra)
{
struct tile *ptile = index_to_tile(&(wld.map), tile);
struct extra_type *pextra = extra_by_number(extra);
struct tile *ptile;
struct extra_type *pextra;
if (!terrain_control.infrapoints) {
return;
}
ptile = index_to_tile(&(wld.map), tile);
pextra = extra_by_number(extra);
if (ptile == NULL || pextra == NULL) {
return;
server/ruleset.c
filename);
ok = FALSE;
}
terrain_control.infrapoints = FALSE; /* This will be updated if we find
* an placeable extra. */
terrain_control.pythagorean_diagonal
= secfile_lookup_bool_default(file, RS_DEFAULT_PYTHAGOREAN_DIAGONAL,
"parameters.pythagorean_diagonal");
......
"%s.removal_time_factor", section);
pextra->infracost = secfile_lookup_int_default(file, 1,
"%s.infracost", section);
if (pextra->infracost > 0) {
terrain_control.infrapoints = TRUE;
}
pextra->defense_bonus = secfile_lookup_int_default(file, 0,
"%s.defense_bonus",
    (1-1/1)