forked from github/server
destructive NMRTimeout
This commit is contained in:
parent
6584ced55c
commit
ef9e7f9540
|
@ -1173,6 +1173,21 @@ quit(void)
|
||||||
int dropouts[2];
|
int dropouts[2];
|
||||||
int * age = NULL;
|
int * age = NULL;
|
||||||
|
|
||||||
|
static void
|
||||||
|
nmr_death(faction * f)
|
||||||
|
{
|
||||||
|
static int rule = -1;
|
||||||
|
if (rule<0) rule = get_param_int(global.parameters, "rules.nmr.destroy", 0);
|
||||||
|
if (rule) {
|
||||||
|
unit * u;
|
||||||
|
for (u=f->units;u;u=u->nextF) {
|
||||||
|
if (u->building && fval(u, UFL_OWNER)) {
|
||||||
|
remove_building(&u->region->buildings, u->building);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
parse_restart(void)
|
parse_restart(void)
|
||||||
{
|
{
|
||||||
|
@ -1206,6 +1221,7 @@ parse_restart(void)
|
||||||
for (f = factions; f; f = f->next) {
|
for (f = factions; f; f = f->next) {
|
||||||
if(fval(f, FFL_NOIDLEOUT)) f->lastorders = turn;
|
if(fval(f, FFL_NOIDLEOUT)) f->lastorders = turn;
|
||||||
if (NMRTimeout()>0 && turn - f->lastorders >= NMRTimeout()) {
|
if (NMRTimeout()>0 && turn - f->lastorders >= NMRTimeout()) {
|
||||||
|
nmr_death(f);
|
||||||
destroyfaction(f);
|
destroyfaction(f);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,6 +165,7 @@
|
||||||
<param name="rules.economy.wages" value="1"/>
|
<param name="rules.economy.wages" value="1"/>
|
||||||
<param name="rules.economy.roqf" value="5"/>
|
<param name="rules.economy.roqf" value="5"/>
|
||||||
<param name="rules.economy.herbrot" value="0"/>
|
<param name="rules.economy.herbrot" value="0"/>
|
||||||
|
<param name="rules.nmr.destroy" value="1"/>
|
||||||
<param name="rules.give" value="15"/> <!-- self + peasants + herbs + lux - goods -->
|
<param name="rules.give" value="15"/> <!-- self + peasants + herbs + lux - goods -->
|
||||||
<param name="rules.economy.grow" value="1"/>
|
<param name="rules.economy.grow" value="1"/>
|
||||||
<param name="rules.tactics.formula" value="1"/> <!-- 10% per skilldiff -->
|
<param name="rules.tactics.formula" value="1"/> <!-- 10% per skilldiff -->
|
||||||
|
|
Loading…
Reference in New Issue