forked from github/server
har du data saa er det altid en god ide aa spare den, ellers forsvinne ting plutselig
This commit is contained in:
parent
5d541465b1
commit
a8b9c29be4
2 changed files with 9 additions and 1 deletions
|
@ -176,6 +176,7 @@ struct building_type;
|
||||||
#define NOLASTORDER_VERSION 320 /* do not use lastorder */
|
#define NOLASTORDER_VERSION 320 /* do not use lastorder */
|
||||||
#define SPELLNAME_VERSION 321 /* reference spells by name */
|
#define SPELLNAME_VERSION 321 /* reference spells by name */
|
||||||
#define TERRAIN_VERSION 322 /* terrains are a full type and saved by name */
|
#define TERRAIN_VERSION 322 /* terrains are a full type and saved by name */
|
||||||
|
#define REGIONITEMS_VERSION 323 /* regions have items */
|
||||||
|
|
||||||
#define MIN_VERSION CURSETYPE_VERSION
|
#define MIN_VERSION CURSETYPE_VERSION
|
||||||
#define REGIONOWNERS_VERSION 400
|
#define REGIONOWNERS_VERSION 400
|
||||||
|
@ -184,7 +185,7 @@ struct building_type;
|
||||||
#ifdef ENEMIES
|
#ifdef ENEMIES
|
||||||
# define RELEASE_VERSION ENEMIES_VERSION
|
# define RELEASE_VERSION ENEMIES_VERSION
|
||||||
#else
|
#else
|
||||||
# define RELEASE_VERSION TERRAIN_VERSION
|
# define RELEASE_VERSION REGIONITEMS_VERSION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if RESOURCE_CONVERSION
|
#if RESOURCE_CONVERSION
|
||||||
|
|
|
@ -1410,6 +1410,9 @@ readregion(FILE * F, short x, short y)
|
||||||
assert(itype->rtype->ltype);
|
assert(itype->rtype->ltype);
|
||||||
r_setdemand(r, itype->rtype->ltype, ri(F));
|
r_setdemand(r, itype->rtype->ltype, ri(F));
|
||||||
}
|
}
|
||||||
|
if (global.data_version>=REGIONITEMS_VERSION) {
|
||||||
|
read_items(F, &r->land->items);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
a_read(F, &r->attribs);
|
a_read(F, &r->attribs);
|
||||||
|
|
||||||
|
@ -1462,6 +1465,10 @@ writeregion(FILE * F, const region * r)
|
||||||
wi(F, demand->value);
|
wi(F, demand->value);
|
||||||
}
|
}
|
||||||
fputs("end \n", F);
|
fputs("end \n", F);
|
||||||
|
#if RELEASE_VERSION>=REGIONITEMS_VERSION
|
||||||
|
write_items(F, r->land->items);
|
||||||
|
wnl(F);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
a_write(F, r->attribs);
|
a_write(F, r->attribs);
|
||||||
wnl(F);
|
wnl(F);
|
||||||
|
|
Loading…
Reference in a new issue