forked from github/server
parent
d5218b99b8
commit
e3b7e19750
|
@ -17,13 +17,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include <kernel/config.h>
|
|
||||||
|
|
||||||
#include "seed.h"
|
#include "seed.h"
|
||||||
|
|
||||||
/* kernel includes */
|
/* kernel includes */
|
||||||
#include <kernel/build.h>
|
#include <kernel/build.h>
|
||||||
#include <kernel/config.h>
|
|
||||||
#include <kernel/item.h>
|
#include <kernel/item.h>
|
||||||
#include <kernel/region.h>
|
#include <kernel/region.h>
|
||||||
|
|
||||||
|
@ -42,7 +40,7 @@ static void produce_seeds(region * r, const resource_type * rtype, int norders)
|
||||||
|
|
||||||
static int limit_seeds(const region * r, const resource_type * rtype)
|
static int limit_seeds(const region * r, const resource_type * rtype)
|
||||||
{
|
{
|
||||||
if (fval(r, RF_MALLORN)) {
|
if ((r->flags & RF_MALLORN)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return r->land ? r->land->trees[0] : 0;
|
return r->land ? r->land->trees[0] : 0;
|
||||||
|
@ -68,13 +66,13 @@ void 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(fval(r, RF_MALLORN));
|
assert(r->flags & RF_MALLORN);
|
||||||
r->land->trees[0] -= norders;
|
r->land->trees[0] -= norders;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int limit_mallornseeds(const region * r, const resource_type * rtype)
|
static int limit_mallornseeds(const region * r, const resource_type * rtype)
|
||||||
{
|
{
|
||||||
if (!fval(r, RF_MALLORN)) {
|
if (!(r->flags & RF_MALLORN)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return r->land ? r->land->trees[0] : 0;
|
return r->land ? r->land->trees[0] : 0;
|
||||||
|
|
|
@ -31,7 +31,7 @@ extern "C" {
|
||||||
void make_zombie(struct unit * u);
|
void make_zombie(struct unit * u);
|
||||||
|
|
||||||
#define MONSTER_ID 666
|
#define MONSTER_ID 666
|
||||||
#define is_monsters(f) (fval(f, FFL_NPC) && f==get_monsters())
|
#define is_monsters(f) ((f->flags & FFL_NPC) && f==get_monsters())
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
|
||||||
/* kernel includes */
|
/* kernel includes */
|
||||||
#include <kernel/config.h>
|
|
||||||
#include <kernel/race.h>
|
#include <kernel/race.h>
|
||||||
#include <kernel/order.h>
|
#include <kernel/order.h>
|
||||||
#include <kernel/unit.h>
|
#include <kernel/unit.h>
|
||||||
|
@ -40,7 +39,7 @@ void make_undead_unit(unit * u)
|
||||||
{
|
{
|
||||||
free_orders(&u->orders);
|
free_orders(&u->orders);
|
||||||
name_unit(u);
|
name_unit(u);
|
||||||
fset(u, UFL_ISNEW);
|
u->flags |= UFL_ISNEW;
|
||||||
}
|
}
|
||||||
|
|
||||||
void age_undead(unit * u)
|
void age_undead(unit * u)
|
||||||
|
|
Loading…
Reference in New Issue