forked from github/server
move market function out of config.c
This commit is contained in:
parent
4a66732637
commit
413f70d1a1
|
@ -11,6 +11,7 @@ without prior permission by the authors of Eressea.
|
||||||
#include <kernel/config.h>
|
#include <kernel/config.h>
|
||||||
#include <kernel/version.h>
|
#include <kernel/version.h>
|
||||||
#include "creport.h"
|
#include "creport.h"
|
||||||
|
#include "market.h"
|
||||||
#include "guard.h"
|
#include "guard.h"
|
||||||
#include "travelthru.h"
|
#include "travelthru.h"
|
||||||
|
|
||||||
|
|
|
@ -1061,11 +1061,6 @@ int rule_give(void)
|
||||||
return rule;
|
return rule;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool markets_module(void)
|
|
||||||
{
|
|
||||||
return (bool)config_get_int("modules.markets", 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct param *configuration;
|
static struct param *configuration;
|
||||||
static int config_cache_key = 1;
|
static int config_cache_key = 1;
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,6 @@ struct param;
|
||||||
#define GF_PURE 64
|
#define GF_PURE 64
|
||||||
/* untranslated */
|
/* untranslated */
|
||||||
|
|
||||||
bool markets_module(void);
|
|
||||||
int wage(const struct region *r, const struct faction *f,
|
int wage(const struct region *r, const struct faction *f,
|
||||||
const struct race *rc, int in_turn);
|
const struct race *rc, int in_turn);
|
||||||
|
|
||||||
|
|
|
@ -85,6 +85,11 @@ static int rc_herb_trade(const struct race *rc)
|
||||||
#define MAX_MARKETS 128
|
#define MAX_MARKETS 128
|
||||||
#define MIN_PEASANTS 50 /* if there are at least this many peasants, you will get 1 good */
|
#define MIN_PEASANTS 50 /* if there are at least this many peasants, you will get 1 good */
|
||||||
|
|
||||||
|
bool markets_module(void)
|
||||||
|
{
|
||||||
|
return (bool)config_get_int("modules.markets", 0);
|
||||||
|
}
|
||||||
|
|
||||||
void do_markets(void)
|
void do_markets(void)
|
||||||
{
|
{
|
||||||
quicklist *traders = 0;
|
quicklist *traders = 0;
|
||||||
|
|
|
@ -17,7 +17,8 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
struct building;
|
struct building;
|
||||||
|
|
||||||
extern void do_markets(void);
|
bool markets_module(void);
|
||||||
|
void do_markets(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
#include <kernel/config.h>
|
#include <kernel/config.h>
|
||||||
#include "autoseed.h"
|
#include "autoseed.h"
|
||||||
|
|
||||||
|
#include "market.h"
|
||||||
|
|
||||||
/* kernel includes */
|
/* kernel includes */
|
||||||
#include <kernel/alliance.h>
|
#include <kernel/alliance.h>
|
||||||
#include <kernel/item.h>
|
#include <kernel/item.h>
|
||||||
|
|
|
@ -25,8 +25,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include "reports.h"
|
#include "reports.h"
|
||||||
#include "guard.h"
|
#include "guard.h"
|
||||||
#include "laws.h"
|
#include "laws.h"
|
||||||
#include "travelthru.h"
|
#include "market.h"
|
||||||
#include "monster.h"
|
#include "monster.h"
|
||||||
|
#include "travelthru.h"
|
||||||
|
|
||||||
/* modules includes */
|
/* modules includes */
|
||||||
#include <modules/score.h>
|
#include <modules/score.h>
|
||||||
|
|
Loading…
Reference in New Issue