kingdoms: missing mallorn seeds

This commit is contained in:
Enno Rehling 2005-11-26 00:09:29 +00:00
parent f0ce33304b
commit b04b3ea168
3 changed files with 29 additions and 28 deletions

View File

@ -48,10 +48,10 @@ limit_seeds(const region * r, const resource_type * rtype)
void void
init_seed(void) init_seed(void)
{ {
attrib * a; attrib * a;
resource_limit * rdata; resource_limit * rdata;
rt_seed = rt_find("seed"); rt_seed = rt_find("seed");
if (rt_seed!=NULL) { if (rt_seed!=NULL) {
a = a_add(&rt_seed->attribs, a_new(&at_resourcelimit)); a = a_add(&rt_seed->attribs, a_new(&at_resourcelimit));
rdata = (resource_limit*)a->data.v; rdata = (resource_limit*)a->data.v;
@ -65,34 +65,35 @@ init_seed(void)
static void static void
produce_mallornseeds(region * r, const resource_type * rtype, int norders) produce_mallornseeds(region * r, const resource_type * rtype, int norders)
{ {
assert(rtype==rt_mallornseed && r->land && r->land->trees[0] >= norders); assert(rtype==rt_mallornseed && r->land && r->land->trees[0] >= norders);
assert(fval(r, RF_MALLORN)); assert(fval(r, RF_MALLORN));
r->land->trees[0] -= norders; r->land->trees[0] -= norders;
} }
static int static int
limit_mallornseeds(const region * r, const resource_type * rtype) limit_mallornseeds(const region * r, const resource_type * rtype)
{ {
assert(rtype==rt_mallornseed); assert(rtype==rt_mallornseed);
if (!fval(r, RF_MALLORN)) { if (!fval(r, RF_MALLORN)) {
return 0; return 0;
} }
return r->land?r->land->trees[0]:0; return r->land?r->land->trees[0]:0;
} }
void void
init_mallornseed(void) init_mallornseed(void)
{ {
attrib * a; attrib * a;
resource_limit * rdata; resource_limit * rdata;
rt_mallornseed = rt_find("mallornseed"); rt_mallornseed = rt_find("mallornseed");
assert(rt_mallornseed!=NULL); if (rt_mallornseed!=NULL) {
rt_mallornseed->flags |= RTF_LIMITED; rt_mallornseed->flags |= RTF_LIMITED;
rt_mallornseed->flags |= RTF_POOLED; rt_mallornseed->flags |= RTF_POOLED;
a = a_add(&rt_mallornseed->attribs, a_new(&at_resourcelimit)); a = a_add(&rt_mallornseed->attribs, a_new(&at_resourcelimit));
rdata = (resource_limit*)a->data.v; rdata = (resource_limit*)a->data.v;
rdata->limit = limit_mallornseeds; rdata->limit = limit_mallornseeds;
rdata->use = produce_mallornseeds; rdata->use = produce_mallornseeds;
}
} }

View File

@ -182,7 +182,7 @@ void deathcounts(struct region * r, int delta);
void chaoscounts(struct region * r, int delta); void chaoscounts(struct region * r, int delta);
void setluxuries(struct region * r, const struct luxury_type * sale); void setluxuries(struct region * r, const struct luxury_type * sale);
extern int get_maxluxuries(); extern int get_maxluxuries(void);
short rroad(const struct region * r, direction_t d); short rroad(const struct region * r, direction_t d);
void rsetroad(struct region * r, direction_t d, short value); void rsetroad(struct region * r, direction_t d, short value);

View File

@ -6,11 +6,11 @@
<xi:include href="de/strings.xml"/> <xi:include href="de/strings.xml"/>
<xi:include href="en/strings.xml"/> <xi:include href="en/strings.xml"/>
<xi:include href="knigdoms/resources.xml"/> <xi:include href="kingdoms/resources.xml"/>
<xi:include href="knigdoms/races.xml"/> <xi:include href="kingdoms/races.xml"/>
<xi:include href="prefixes.xml"/> <xi:include href="prefixes.xml"/>
<xi:include href="calendar.xml"/> <xi:include href="calendar.xml"/>
<xi:include href="knigdoms/terrains.xml"/> <xi:include href="kingdoms/terrains.xml"/>
<equipment> <equipment>
<set name="new_faction"> <set name="new_faction">
@ -19,7 +19,7 @@
</set> </set>
</equipment> </equipment>
<game name="knigdoms" welcome="kingdoms"> <game name="kingdoms" welcome="kingdoms">
<!-- Game specific settings --> <!-- Game specific settings -->
<order name="ARBEITEN" disable="yes"/> <order name="ARBEITEN" disable="yes"/>
<order name="BEKLAUEN" disable="yes"/> <order name="BEKLAUEN" disable="yes"/>
@ -101,12 +101,12 @@
</game> </game>
<strings> <strings>
<string name="newbie_info_1"> <string name="newbie_info_1">
<text locale="de">Bitte denke daran, deine Befehle mit dem Betreff ERESSEA BEFEHLE an knigdoms-server@eressea.de zu senden. Am besten, du verwendest die Befehlsvorlage am Ende des Reports.</text> <text locale="de">Bitte denke daran, deine Befehle mit dem Betreff ERESSEA BEFEHLE an kingdoms-server@eressea.de zu senden. Am besten, du verwendest die Befehlsvorlage am Ende des Reports.</text>
<text locale="en">Remember to send your orders to knigdoms-server@eressea.de with the subject ERESSEA ORDERS.</text> <text locale="en">Remember to send your orders to kingdoms-server@eressea.de with the subject ERESSEA ORDERS.</text>
</string> </string>
<string name="mailto"> <string name="mailto">
<text locale="de">koe-server@eressea.de</text> <text locale="de">kingdoms-server@eressea.de</text>
<text locale="en">koe-server@eressea.de</text> <text locale="en">kingdoms-server@eressea.de</text>
</string> </string>
<string name="mailcmd"> <string name="mailcmd">
<text locale="de">ERESSEA BEFEHLE</text> <text locale="de">ERESSEA BEFEHLE</text>