2001-01-25 10:37:55 +01:00
|
|
|
/* vi: set ts=2:
|
|
|
|
*
|
2002-11-02 15:10:52 +01:00
|
|
|
*
|
2003-07-29 11:48:03 +02:00
|
|
|
* Eressea PB(E)M host Copyright (C) 1998-2003
|
2001-01-25 10:37:55 +01:00
|
|
|
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
|
|
|
* Katja Zedel (katze@felidae.kn-bremen.de)
|
|
|
|
* Henning Peters (faroul@beyond.kn-bremen.de)
|
2007-09-02 20:11:17 +02:00
|
|
|
* Enno Rehling (enno@eressea.de)
|
2001-01-25 10:37:55 +01:00
|
|
|
* Ingo Wilken (Ingo.Wilken@informatik.uni-oldenburg.de)
|
|
|
|
*
|
|
|
|
* This program may not be used, modified or distributed without
|
|
|
|
* prior permission by the authors of Eressea.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
#include <eressea.h>
|
|
|
|
#include "demonseye.h"
|
|
|
|
|
|
|
|
/* kernel includes */
|
2002-04-07 10:56:28 +02:00
|
|
|
#include <faction.h>
|
2001-01-25 10:37:55 +01:00
|
|
|
#include <item.h>
|
2002-04-07 10:56:28 +02:00
|
|
|
#include <message.h>
|
|
|
|
#include <plane.h>
|
|
|
|
#include <region.h>
|
|
|
|
#include <unit.h>
|
2001-01-25 10:37:55 +01:00
|
|
|
|
2001-12-10 01:13:39 +01:00
|
|
|
/* util includes */
|
|
|
|
#include <functions.h>
|
|
|
|
|
2001-01-25 10:37:55 +01:00
|
|
|
/* libc includes */
|
|
|
|
#include <assert.h>
|
|
|
|
|
|
|
|
static int
|
2004-06-21 18:45:27 +02:00
|
|
|
summon_igjarjuk(struct unit * u, const struct item_type * itype, int amount, struct order * ord)
|
2001-01-25 10:37:55 +01:00
|
|
|
{
|
2002-04-07 10:56:28 +02:00
|
|
|
struct plane * p = rplane(u->region);
|
2002-03-16 18:30:48 +01:00
|
|
|
unused(amount);
|
2001-01-25 10:37:55 +01:00
|
|
|
unused(itype);
|
2002-04-07 10:56:28 +02:00
|
|
|
if (p!=NULL) {
|
2004-06-21 18:45:27 +02:00
|
|
|
ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "use_realworld_only", ""));
|
2002-04-07 10:56:28 +02:00
|
|
|
return EUNUSABLE;
|
|
|
|
} else {
|
|
|
|
assert(!"not implemented");
|
|
|
|
return EUNUSABLE;
|
|
|
|
}
|
2001-01-25 10:37:55 +01:00
|
|
|
}
|
|
|
|
|
2005-10-26 22:12:28 +02:00
|
|
|
static boolean
|
2004-06-21 18:45:27 +02:00
|
|
|
give_igjarjuk(const struct unit * src, const struct unit * d, const struct item_type * itype, int n, struct order * ord)
|
2001-01-25 10:37:55 +01:00
|
|
|
{
|
2007-07-21 17:35:07 +02:00
|
|
|
ADDMSG(&src->faction->msgs, msg_feedback(src, ord, "error_giveeye", ""));
|
2001-01-25 10:37:55 +01:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2001-02-02 09:40:49 +01:00
|
|
|
void
|
2001-12-10 01:13:39 +01:00
|
|
|
register_demonseye(void)
|
2001-02-02 09:40:49 +01:00
|
|
|
{
|
2007-12-03 20:26:17 +01:00
|
|
|
register_item_use(summon_igjarjuk, "useigjarjuk");
|
|
|
|
register_function((pf_generic)give_igjarjuk, "giveigjarjuk");
|
2001-02-02 09:40:49 +01:00
|
|
|
}
|