move GUARD_* flags to guard.h

This commit is contained in:
Enno Rehling 2016-10-30 05:37:12 +01:00
parent 1116afed2b
commit a5e63a2472
4 changed files with 23 additions and 22 deletions

View File

@ -46,9 +46,9 @@ if [ "$HAVE_TOLUA" = "0" ] || [ -z $path ] ; then
echo "tolua is not installed, building from source"
cd $ROOT
if [ ! -d tolua ]; then
LUA_VERSION="5.1"
if [ -d /usr/include/lua5.2 ] || [ -d /usr/local/include/lua5.2 ]; then
LUA_VERSION="5.2"
if [ -d /usr/include/lua5.1 ] || [ -d /usr/local/include/lua5.1 ]; then
LUA_VERSION="5.1"
fi
echo "fetching tolua ${LUA_VERSION} from github..."
git clone https://github.com/ennorehling/tolua-${LUA_VERSION}.git tolua

View File

@ -11,6 +11,25 @@ extern "C" {
typedef enum { E_GUARD_OK, E_GUARD_UNARMED, E_GUARD_NEWBIE, E_GUARD_FLEEING } guard_t;
#define GUARD_NONE 0
#define GUARD_TAX 1
/* Verhindert Steuereintreiben */
#define GUARD_MINING 2
/* Verhindert Bergbau */
#define GUARD_TREES 4
/* Verhindert Waldarbeiten */
#define GUARD_TRAVELTHRU 8
/* Blockiert Durchreisende */
#define GUARD_LANDING 16
/* Verhindert Ausstieg + Weiterreise */
#define GUARD_CREWS 32
/* Verhindert Unterhaltung auf Schiffen */
#define GUARD_RECRUIT 64
/* Verhindert Rekrutieren */
#define GUARD_PRODUCE 128
/* Verhindert Abbau von Resourcen mit RTF_LIMITED */
#define GUARD_ALL 0xFFFF
extern struct attrib_type at_guard;
guard_t can_start_guarding(const struct unit * u);

View File

@ -114,25 +114,6 @@ struct param;
#define GF_PURE 64
/* untranslated */
#define GUARD_NONE 0
#define GUARD_TAX 1
/* Verhindert Steuereintreiben */
#define GUARD_MINING 2
/* Verhindert Bergbau */
#define GUARD_TREES 4
/* Verhindert Waldarbeiten */
#define GUARD_TRAVELTHRU 8
/* Blockiert Durchreisende */
#define GUARD_LANDING 16
/* Verhindert Ausstieg + Weiterreise */
#define GUARD_CREWS 32
/* Verhindert Unterhaltung auf Schiffen */
#define GUARD_RECRUIT 64
/* Verhindert Rekrutieren */
#define GUARD_PRODUCE 128
/* Verhindert Abbau von Resourcen mit RTF_LIMITED */
#define GUARD_ALL 0xFFFF
int maxworkingpeasants(const struct region *r);
bool markets_module(void);
int wage(const struct region *r, const struct faction *f,

View File

@ -15,6 +15,7 @@ without prior permission by the authors of Eressea.
#include "xmlreader.h"
#include "building.h"
#include "guard.h"
#include "equipment.h"
#include "item.h"
#include "keyword.h"