forked from github/server
- Guard-Konvertierung.
This commit is contained in:
parent
4e076dd4ae
commit
cda9b45c1c
|
@ -2510,6 +2510,12 @@ void
|
||||||
guard(unit * u, unsigned int mask)
|
guard(unit * u, unsigned int mask)
|
||||||
{
|
{
|
||||||
int flags = GUARD_CREWS | GUARD_LANDING | GUARD_TRAVELTHRU | GUARD_TAX;
|
int flags = GUARD_CREWS | GUARD_LANDING | GUARD_TRAVELTHRU | GUARD_TAX;
|
||||||
|
#if GUARD_DISABLES_PRODUCTION == 1
|
||||||
|
flags |= GUARD_PRODUCE;
|
||||||
|
#endif
|
||||||
|
#if GUARD_DISABLES_RECRUIT == 1
|
||||||
|
flags |= GUARD_RECRUIT;
|
||||||
|
#endif
|
||||||
switch (old_race(u->race)) {
|
switch (old_race(u->race)) {
|
||||||
case RC_ELF:
|
case RC_ELF:
|
||||||
if (u->faction->race != u->race) break;
|
if (u->faction->race != u->race) break;
|
||||||
|
|
|
@ -32,5 +32,6 @@
|
||||||
#define PEASANTS_DO_NOT_STARVE 0
|
#define PEASANTS_DO_NOT_STARVE 0
|
||||||
|
|
||||||
#define GUARD_DISABLES_RECRUIT 0
|
#define GUARD_DISABLES_RECRUIT 0
|
||||||
|
#define GUARD_DISABLES_PRODUCTION 0
|
||||||
#define RESOURCE_QUANTITY 1.0
|
#define RESOURCE_QUANTITY 1.0
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
|
|
||||||
#define PEASANT_ADJUSTMENT 0
|
#define PEASANT_ADJUSTMENT 0
|
||||||
#define GUARD_DISABLES_RECRUIT 0
|
#define GUARD_DISABLES_RECRUIT 0
|
||||||
|
#define GUARD_DISABLES_PRODUCTION 0
|
||||||
|
|
||||||
#define RESOURCE_QUANTITY 1.0
|
#define RESOURCE_QUANTITY 1.0
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
#define NEW_MIGRATION 1
|
#define NEW_MIGRATION 1
|
||||||
#define PEASANTS_DO_NOT_STARVE 0
|
#define PEASANTS_DO_NOT_STARVE 0
|
||||||
#define GUARD_DISABLES_RECRUIT 1
|
#define GUARD_DISABLES_RECRUIT 1
|
||||||
|
#define GUARD_DISABLES_PRODUCTION 1
|
||||||
|
#define RESOURCE_QUANTITY 1.0
|
||||||
|
|
||||||
#define VICTORY_CONDITION VICTORY_MURDER
|
#define VICTORY_CONDITION VICTORY_MURDER
|
||||||
#define VICTORY_DELAY 4
|
#define VICTORY_DELAY 4
|
||||||
|
|
|
@ -31,5 +31,6 @@
|
||||||
|
|
||||||
#define PEASANT_ADJUSTMENT 0
|
#define PEASANT_ADJUSTMENT 0
|
||||||
#define GUARD_DISABLES_RECRUIT 0
|
#define GUARD_DISABLES_RECRUIT 0
|
||||||
|
#define GUARD_DISABLES_PRODUCTION 0
|
||||||
|
|
||||||
#define RESOURCE_QUANTITY 1.0
|
#define RESOURCE_QUANTITY 1.0
|
||||||
|
|
|
@ -2717,6 +2717,26 @@ fix_seeds(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
guard_conversion(void)
|
||||||
|
{
|
||||||
|
faction *f;
|
||||||
|
unit *u;
|
||||||
|
int mask = GUARD_CREWS | GUARD_LANDING | GUARD_TRAVELTHRU | GUARD_TAX;
|
||||||
|
|
||||||
|
for(f=factions; f; f=f->next) {
|
||||||
|
for(u=f->units; u; u=u->nextF) {
|
||||||
|
int g = getguard(u);
|
||||||
|
|
||||||
|
if( (g & mask) == mask) {
|
||||||
|
setguard(u, g | GUARD_PRODUCE | GUARD_RECRUIT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
korrektur(void)
|
korrektur(void)
|
||||||
{
|
{
|
||||||
|
@ -2766,6 +2786,7 @@ korrektur(void)
|
||||||
do_once("fsee", fix_seeds());
|
do_once("fsee", fix_seeds());
|
||||||
do_once("orc2", orc_conversion2());
|
do_once("orc2", orc_conversion2());
|
||||||
do_once("witm", warn_items());
|
do_once("witm", warn_items());
|
||||||
|
do_once("guac", guard_conversion());
|
||||||
warn_password();
|
warn_password();
|
||||||
|
|
||||||
/* seems something fishy is going on, do this just
|
/* seems something fishy is going on, do this just
|
||||||
|
|
Loading…
Reference in New Issue