forked from github/server
- rhorses/sethorses reguläre Funktion. Besseres Debugging.
This commit is contained in:
parent
b682917dd1
commit
aa619ea977
|
@ -504,7 +504,7 @@ addgive(unit * u, unit * u2, int n, resource_t res, const char * cmd, int error)
|
|||
|
||||
/* Derzeit fallen nur Silber und Pferde an die Region
|
||||
* */
|
||||
void
|
||||
void
|
||||
give_peasants(int n, const item_type * itype, unit * src)
|
||||
{
|
||||
region *r = src->region;
|
||||
|
|
|
@ -613,6 +613,19 @@ rmoney(const region * r)
|
|||
return ((r)->land?(r)->land->money:0);
|
||||
}
|
||||
|
||||
void
|
||||
rsethorses(region *r, int value)
|
||||
{
|
||||
assert(r->land != NULL && value >= 0);
|
||||
r->land->horses = value;
|
||||
}
|
||||
|
||||
int
|
||||
rhorses(region *r)
|
||||
{
|
||||
return r->land?r->land->horses:0;
|
||||
}
|
||||
|
||||
void
|
||||
rsetmoney(region * r, int value)
|
||||
{
|
||||
|
|
|
@ -171,9 +171,8 @@ int rpeasants(const struct region * r);
|
|||
void rsetpeasants(struct region * r, int value);
|
||||
int rmoney(const struct region * r);
|
||||
void rsetmoney(struct region * r, int value);
|
||||
|
||||
#define rhorses(r) ((r)->land?(r)->land->horses:0)
|
||||
#define rsethorses(r, value) ((r)->land?((r)->land->horses=(value)):(assert((value)>=0), (value)),0)
|
||||
int rhorses(struct region * r);
|
||||
void rsethorses(struct region * r, int value);
|
||||
|
||||
#define rbuildings(r) ((r)->buildings)
|
||||
|
||||
|
|
Loading…
Reference in New Issue