forked from github/server
move at_guard into guard module as well
This commit is contained in:
parent
3055f517dc
commit
dd9420fc38
11
src/guard.c
11
src/guard.c
|
@ -21,6 +21,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <kernel/config.h>
|
||||
#include "guard.h"
|
||||
|
||||
#include <kernel/save.h>
|
||||
#include <kernel/unit.h>
|
||||
#include <kernel/faction.h>
|
||||
#include <kernel/race.h>
|
||||
|
@ -30,6 +31,16 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
|
||||
#include <assert.h>
|
||||
|
||||
attrib_type at_guard = {
|
||||
"guard",
|
||||
DEFAULT_INIT,
|
||||
DEFAULT_FINALIZE,
|
||||
DEFAULT_AGE,
|
||||
a_writeint,
|
||||
a_readint,
|
||||
ATF_UNIQUE
|
||||
};
|
||||
|
||||
void update_guards(void)
|
||||
{
|
||||
const region *r;
|
||||
|
|
|
@ -9,6 +9,9 @@ extern "C" {
|
|||
struct unit;
|
||||
|
||||
typedef enum { E_GUARD_OK, E_GUARD_UNARMED, E_GUARD_NEWBIE, E_GUARD_FLEEING } guard_t;
|
||||
|
||||
extern struct attrib_type at_guard;
|
||||
|
||||
guard_t can_start_guarding(const struct unit * u);
|
||||
void update_guards(void);
|
||||
unsigned int guard_flags(const struct unit * u);
|
||||
|
|
|
@ -51,6 +51,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include "types.h"
|
||||
#include "unit.h"
|
||||
|
||||
|
||||
#include <kernel/spell.h>
|
||||
#include <kernel/spellbook.h>
|
||||
|
||||
|
@ -74,6 +75,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <util/xml.h>
|
||||
|
||||
#include "donations.h"
|
||||
#include "guard.h"
|
||||
#include "prefix.h"
|
||||
|
||||
#ifdef USE_LIBXML2
|
||||
|
@ -1177,16 +1179,6 @@ attrib_type at_germs = {
|
|||
ATF_UNIQUE
|
||||
};
|
||||
|
||||
attrib_type at_guard = {
|
||||
"guard",
|
||||
DEFAULT_INIT,
|
||||
DEFAULT_FINALIZE,
|
||||
DEFAULT_AGE,
|
||||
a_writeint,
|
||||
a_readint,
|
||||
ATF_UNIQUE
|
||||
};
|
||||
|
||||
void setstatus(struct unit *u, int status)
|
||||
{
|
||||
assert(status >= ST_AGGRO && status <= ST_FLEE);
|
||||
|
|
|
@ -306,7 +306,6 @@ extern "C" {
|
|||
|
||||
void free_gamedata(void);
|
||||
|
||||
extern struct attrib_type at_guard;
|
||||
extern struct helpmode helpmodes[];
|
||||
extern const char *parameters[];
|
||||
extern const char *localenames[];
|
||||
|
|
Binary file not shown.
|
@ -1,3 +0,0 @@
|
|||
ERESSEA 72vx "naeg86"
|
||||
EINHEIT nqLx
|
||||
BENENNEN EINHEIT 'Goldene Herde'
|
Loading…
Reference in New Issue