Feature #299 ยป 0027-Make-WORLD_PEACE_TURNS-ruleset-controlled.patch
common/game.h | ||
---|---|---|
/* Max number of recursive transports. */
|
||
#define GAME_TRANSPORT_MAX_RECURSIVE 5
|
||
#define WORLD_PEACE_TURNS 20
|
||
/* Ruleset settings */
|
||
#define RS_MAX_VALUE 1000000
|
common/networking/packets.def | ||
---|---|---|
UINT16 culture_vic_lead;
|
||
UINT16 culture_migration_pml;
|
||
UINT16 history_interest_pml;
|
||
UINT16 world_peace_turns;
|
||
/* size limit for cities before they can celebrate */
|
||
UINT8 celebratesize;
|
||
BOOL changable_tax;
|
data/alien/game.ruleset | ||
---|---|---|
; of a migration point.
|
||
migration_pml = 50
|
||
[world_peace]
|
||
; How many turns of world peace is required for a World Peace Victory
|
||
victory_turns = 20;
|
||
[calendar]
|
||
; Year in the beginning of the game
|
||
start_year = 250
|
data/civ1/game.ruleset | ||
---|---|---|
; of a migration point.
|
||
migration_pml = 50
|
||
[world_peace]
|
||
; How many turns of world peace is required for a World Peace Victory
|
||
victory_turns = 20;
|
||
[calendar]
|
||
; Year 1 instead of 0.
|
||
skip_year_0 = TRUE
|
data/civ2/game.ruleset | ||
---|---|---|
; of a migration point.
|
||
migration_pml = 50
|
||
[world_peace]
|
||
; How many turns of world peace is required for a World Peace Victory
|
||
victory_turns = 20;
|
||
[calendar]
|
||
; Year 1 instead of 0.
|
||
skip_year_0 = TRUE
|
data/civ2civ3/game.ruleset | ||
---|---|---|
; of a migration point.
|
||
migration_pml = 50
|
||
[world_peace]
|
||
; How many turns of world peace is required for a World Peace Victory
|
||
victory_turns = 20;
|
||
[calendar]
|
||
; Year in the beginning of the game
|
||
start_year = -4000
|
data/classic/game.ruleset | ||
---|---|---|
; of a migration point.
|
||
migration_pml = 50
|
||
[world_peace]
|
||
; How many turns of world peace is required for a World Peace Victory
|
||
victory_turns = 20;
|
||
[calendar]
|
||
; Year in the beginning of the game
|
||
start_year = -4000
|
data/goldkeep/game.ruleset | ||
---|---|---|
; of a migration point.
|
||
migration_pml = 50
|
||
[world_peace]
|
||
; How many turns of world peace is required for a World Peace Victory
|
||
victory_turns = 20;
|
||
[calendar]
|
||
; Year in the beginning of the game
|
||
start_year = -4000
|
data/granularity/game.ruleset | ||
---|---|---|
; of a migration point.
|
||
migration_pml = 50
|
||
[world_peace]
|
||
; How many turns of world peace is required for a World Peace Victory
|
||
victory_turns = 20;
|
||
[calendar]
|
||
; Year in the beginning of the game
|
||
start_year = 0
|
data/multiplayer/game.ruleset | ||
---|---|---|
; of a migration point.
|
||
migration_pml = 50
|
||
[world_peace]
|
||
; How many turns of world peace is required for a World Peace Victory
|
||
victory_turns = 20;
|
||
[calendar]
|
||
; Year in the beginning of the game
|
||
start_year = -4000
|
data/ruledit/comments-3.3.txt | ||
---|---|---|
; of a migration point.\
|
||
"
|
||
world_peace_turns = "\n\
|
||
; How many turns of world peace is required for a World Peace Victory\n\
|
||
"
|
||
calendar_fragments = "\n\
|
||
; How many fragments each year has. In addition to this, \"Turn_Fragments\" effects are\n\
|
||
; needed to control fragment accumulation.\n\
|
data/sandbox/game.ruleset | ||
---|---|---|
; of a migration point.
|
||
migration_pml = 50
|
||
[world_peace]
|
||
; How many turns of world peace is required for a World Peace Victory
|
||
victory_turns = 20;
|
||
[calendar]
|
||
; Year in the beginning of the game
|
||
start_year = -4000
|
data/stub/game.ruleset | ||
---|---|---|
; of a migration point.
|
||
migration_pml = 50
|
||
[world_peace]
|
||
; How many turns of world peace is required for a World Peace Victory
|
||
victory_turns = 20;
|
||
[calendar]
|
||
; Year in the beginning of the game
|
||
start_year = 0
|
data/webperimental/game.ruleset | ||
---|---|---|
; of a migration point.
|
||
migration_pml = 50
|
||
[world_peace]
|
||
; How many turns of world peace is required for a World Peace Victory
|
||
victory_turns = 20;
|
||
[calendar]
|
||
; Year in the beginning of the game
|
||
start_year = -4000
|
server/ruleset/ruleload.c | ||
---|---|---|
= secfile_lookup_int_default(file, RS_DEFAULT_HISTORY_INTEREST_PML,
|
||
"culture.history_interest_pml");
|
||
/* section: world_peace */
|
||
game.info.world_peace_turns
|
||
= secfile_lookup_int_default(file, RS_DEFAULT_WORLD_PEACE_TURNS,
|
||
"world_peace.victory_turns");
|
||
/* section: calendar */
|
||
game.calendar.calendar_skip_0
|
||
= secfile_lookup_bool_default(file, RS_DEFAULT_CALENDAR_SKIP_0,
|
server/ruleset/ruleload.h | ||
---|---|---|
#define RS_DEFAULT_CULTURE_MIGRATION_PML 50
|
||
#define RS_DEFAULT_HISTORY_INTEREST_PML 0
|
||
#define RS_DEFAULT_WORLD_PEACE_TURNS 20
|
||
#define RS_DEFAULT_GOODS_SELECTION GSM_LEAVING
|
||
#define RS_DEFAULT_EXTRA_APPEARANCE 15
|
server/srv_main.c | ||
---|---|---|
/* Check for World Peace victory. */
|
||
if (1 < candidates && victory_enabled(VC_WORLDPEACE)) {
|
||
if (game.info.turn - game.server.world_peace_start >= WORLD_PEACE_TURNS) {
|
||
if (game.info.turn - game.server.world_peace_start >= game.info.world_peace_turns) {
|
||
bool first = TRUE;
|
||
astr_init(&str);
|
tools/ruleutil/comments.c | ||
---|---|---|
char *research_free_tech_method;
|
||
char *culture_history_interest;
|
||
char *culture_migration_pml;
|
||
char *world_peace_turns;
|
||
char *calendar_fragments;
|
||
} comments_storage;
|
||
... | ... | |
"entrydoc.history_interest_pml");
|
||
comment_load(comments_storage.culture_migration_pml, comment_file,
|
||
"entrydoc.migration_pml");
|
||
comment_load(comments_storage.world_peace_turns, comment_file,
|
||
"entrydoc.world_peace_turns");
|
||
comment_load(comments_storage.calendar_fragments, comment_file,
|
||
"entrydoc.calendar_fragments");
|
||
... | ... | |
comment_entry_write(sfile, comments_storage.culture_history_interest,
|
||
"culture");
|
||
}
|
||
/**********************************************************************//**
|
||
Write culture migration_pml settings header.
|
||
**************************************************************************/
|
||
... | ... | |
"culture");
|
||
}
|
||
/**********************************************************************//**
|
||
Write world peace turns settings header.
|
||
**************************************************************************/
|
||
void comment_world_peace_turns(struct section_file *sfile)
|
||
{
|
||
comment_entry_write(sfile, comments_storage.world_peace_turns,
|
||
"world_peace");
|
||
}
|
||
/**********************************************************************//**
|
||
Write calendar fragments settings header.
|
||
**************************************************************************/
|
tools/ruleutil/comments.h | ||
---|---|---|
void comment_research_free_tech_method(struct section_file *sfile);
|
||
void comment_culture_history_interest(struct section_file *sfile);
|
||
void comment_culture_migration_pml(struct section_file *sfile);
|
||
void comment_world_peace_turns(struct section_file *sfile);
|
||
void comment_calendar_fragments(struct section_file *sfile);
|
||
void comment_counters(struct section_file *sfile);
|
||
tools/ruleutil/rulesave.c | ||
---|---|---|
save_default_int(sfile, game.info.history_interest_pml,
|
||
RS_DEFAULT_HISTORY_INTEREST_PML,
|
||
"culture.history_interest_pml", NULL);
|
||
if (game.info.world_peace_turns != RS_DEFAULT_WORLD_PEACE_TURNS) {
|
||
comment_world_peace_turns(sfile);
|
||
}
|
||
save_default_int(sfile, game.info.world_peace_turns,
|
||
RS_DEFAULT_WORLD_PEACE_TURNS,
|
||
"world_peace.victory_turns", NULL);
|
||
save_default_bool(sfile, game.calendar.calendar_skip_0,
|
||
RS_DEFAULT_CALENDAR_SKIP_0,
|