Project

General

Profile

Bug #1676 » 1676_S3_2.patch

Dean Brown, 09/13/2025 11:44 PM

View differences:

common/game.h
#define RS_MIN_UPGRADE_VETERAN_LOSS 0
#define RS_MAX_UPGRADE_VETERAN_LOSS MAX_VET_LEVELS
#define RS_DEFAULT_TECH_UPKEEP_DIVIDER 100
#define RS_MIN_TECH_UPKEEP_DIVIDER 1
#define RS_MAX_TECH_UPKEEP_DIVIDER 100000
#define RS_DEFAULT_TECH_UPKEEP_DIVIDER 100
#define RS_MIN_TECH_UPKEEP_DIVIDER 1
#define RS_MAX_TECH_UPKEEP_DIVIDER 100000
#define RS_DEFAULT_HP 10
#define RS_MIN_HP 1
#define RS_MAX_HP 10000
#define RS_DEFAULT_POISON_EMPTIES_FOOD_STOCK FALSE
#define RS_DEFAULT_STEAL_MAP_REVEALS_CITIES TRUE
server/ruleset.c
const char *path,
struct veteran_system **vsystem, char *err,
size_t err_len);
static int secfile_lookup_int_default_min_max(struct section_file *file,
int def, int min, int max,
const char *path, ...)
fc__attribute((__format__ (__printf__, 5, 6)));
char *script_buffer = NULL;
char *parser_buffer = NULL;
......
"%s.vision_radius_sq", sec_name)
|| !secfile_lookup_int(file, &u->transport_capacity,
"%s.transport_cap", sec_name)
|| !secfile_lookup_int(file, &u->hp,
"%s.hitpoints", sec_name)
|| !secfile_lookup_int(file, &u->firepower,
"%s.firepower", sec_name)
|| !secfile_lookup_int(file, &u->fuel,
......
ok = FALSE;
break;
}
u->hp
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_HP,
RS_MIN_HP,
RS_MAX_HP,
"%s.hitpoints", sec_name);
u->move_rate *= SINGLE_MOVE;
if (u->firepower <= 0) {
......
/**********************************************************************//**
Print an error message if the value is out of range.
**************************************************************************/
static int secfile_lookup_int_default_min_max(struct section_file *file,
int def, int min, int max,
const char *path, ...)
fc__attribute((__format__ (__printf__, 5, 6)));
static int secfile_lookup_int_default_min_max(struct section_file *file,
int def, int min, int max,
const char *path, ...)
(2-2/2)