2001-01-25 10:37:55 +01:00
|
|
|
/* vi: set ts=2:
|
2008-05-24 02:20:00 +02:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* Eressea PB(E)M host Copyright (C) 1998-2003
|
|
|
|
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
|
|
|
* Katja Zedel (katze@felidae.kn-bremen.de)
|
|
|
|
* Henning Peters (faroul@beyond.kn-bremen.de)
|
|
|
|
* Enno Rehling (enno@eressea.de)
|
|
|
|
* 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.
|
|
|
|
*/
|
2001-01-25 10:37:55 +01:00
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
#include "follow.h"
|
|
|
|
|
2008-04-20 16:48:15 +02:00
|
|
|
#include <kernel/eressea.h>
|
2007-06-20 02:34:02 +02:00
|
|
|
#include <kernel/unit.h>
|
2001-01-25 10:37:55 +01:00
|
|
|
|
2008-04-20 16:48:15 +02:00
|
|
|
#include <util/attrib.h>
|
2008-04-26 16:55:22 +02:00
|
|
|
#include <util/storage.h>
|
2008-04-20 16:48:15 +02:00
|
|
|
#include <util/variant.h>
|
2001-01-25 10:37:55 +01:00
|
|
|
|
|
|
|
static int
|
2008-04-26 16:55:22 +02:00
|
|
|
read_follow(attrib * a, struct storage * store)
|
2001-01-25 10:37:55 +01:00
|
|
|
{
|
2008-05-24 02:20:00 +02:00
|
|
|
read_unit_reference(store); /* skip it */
|
|
|
|
return AT_READ_FAIL;
|
2001-01-25 10:37:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
attrib_type at_follow = {
|
2008-05-24 02:20:00 +02:00
|
|
|
"follow", NULL, NULL, NULL, NULL, read_follow
|
2001-01-25 10:37:55 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
attrib *
|
|
|
|
make_follow(struct unit * u)
|
|
|
|
{
|
2008-05-24 02:20:00 +02:00
|
|
|
attrib * a = a_new(&at_follow);
|
|
|
|
a->data.v = u;
|
|
|
|
return a;
|
2001-01-25 10:37:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
init_follow(void)
|
|
|
|
{
|
2008-05-24 02:20:00 +02:00
|
|
|
at_register(&at_follow);
|
2001-01-25 10:37:55 +01:00
|
|
|
}
|