forked from github/server
Makefille and mapper changes required to use the new code.
This commit is contained in:
parent
8823db9702
commit
cd944cf98c
|
@ -1169,9 +1169,9 @@ extern const char * dbrace(const struct race * rc);
|
|||
extern void set_param(struct param ** p, const char * name, const char * data);
|
||||
extern const char* get_param(const struct param * p, const char * name);
|
||||
|
||||
extern int NMRTimeout();
|
||||
extern int LongHunger();
|
||||
extern boolean TradeDisabled();
|
||||
extern int NMRTimeout(void);
|
||||
extern int LongHunger(void);
|
||||
extern boolean TradeDisabled(void);
|
||||
extern int SkillCap(skill_t sk);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -3,7 +3,7 @@ SUBDIRS =
|
|||
LIBRARY = libe-modules.a
|
||||
BINARY =
|
||||
|
||||
SOURCES = $(wildcard *.c)
|
||||
SOURCES = alliance.c arena.c dungeon.c gmcmd.c infocmd.c museum.c score.c victoryconditions.c xecmd.c xmas.c
|
||||
OBJECTS = $(SOURCES:%.c=$(BUILD_DIR)/%.o)
|
||||
|
||||
include $(ERESSEA_SRC)/Makefile.include
|
||||
|
|
|
@ -32,7 +32,9 @@
|
|||
#include <unit.h>
|
||||
|
||||
/* modules */
|
||||
#ifdef ALLIANCES
|
||||
#include <modules/alliance.h>
|
||||
#endif
|
||||
|
||||
/* util includes */
|
||||
#include <base36.h>
|
||||
|
|
|
@ -31,7 +31,9 @@
|
|||
#include <item.h>
|
||||
|
||||
/* modules includes */
|
||||
#ifdef ALLIANCES
|
||||
# include <modules/alliance.h>
|
||||
#endif
|
||||
|
||||
/* util includes */
|
||||
#include <base36.h>
|
||||
|
@ -204,9 +206,9 @@ showregion(region * r, char full)
|
|||
str[strlen(buf)+1] = 0;
|
||||
adddbllist(®list, str);
|
||||
|
||||
if (r->terrain != T_OCEAN && r->terrain!=T_FIREWALL) {
|
||||
sprintf(buf, " %hd turns old:", r->age);
|
||||
adddbllist(®list, buf);
|
||||
if (r->terrain != T_OCEAN && r->terrain!=T_FIREWALL) {
|
||||
sprintf(buf, " %d peasants, %d(%d) silver", rpeasants(r), rmoney(r), count_all_money(r));
|
||||
adddbllist(®list, buf);
|
||||
#if GROWING_TREES
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include <items/weapons.h>
|
||||
#include <items/items.h>
|
||||
|
||||
#include <modules/xmas2000.h>
|
||||
#include <modules/gmcmd.h>
|
||||
#ifdef ALLIANCES
|
||||
#include <modules/alliance.h>
|
||||
|
@ -367,9 +366,9 @@ newbie_region(region * r)
|
|||
if (r==NULL || r->units==NULL) return 0;
|
||||
for (u=r->units;u;u=u->next) {
|
||||
if (u->faction->age>10) return 0;
|
||||
if (u->faction->age==0) return 1;
|
||||
/* if (u->faction->age==0) return 1; */
|
||||
}
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1557,6 +1556,36 @@ log_newstuff(void)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
frame_regions(void)
|
||||
{
|
||||
region * r = regions;
|
||||
int lastage=r->age;
|
||||
while (r!=0) {
|
||||
if (r->age<20) {
|
||||
if (r->age+1<lastage) r->age = lastage;
|
||||
}
|
||||
lastage=r->age;
|
||||
r = r->next;
|
||||
}
|
||||
r = regions;
|
||||
while (r!=0) {
|
||||
if (r->terrain==T_OCEAN) {
|
||||
direction_t d;
|
||||
for (d=0;d!=6;++d) {
|
||||
region * rn = rconnect(r, d);
|
||||
if (rn!=0 && rn->terrain==T_OCEAN) {
|
||||
if ((rn->age+5)*2<r->age && r->age<50) {
|
||||
if (rn->units) log_printf("Cannot terraform %s\n", regionname(rn, NULL));
|
||||
else terraform(rn, T_FIREWALL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
r=r->next;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
|
@ -1665,6 +1694,12 @@ main(int argc, char *argv[])
|
|||
register_ships();
|
||||
register_items();
|
||||
register_spells();
|
||||
#ifdef MUSEUM_MODULE
|
||||
register_museum();
|
||||
#endif
|
||||
#ifdef ARENA_MODULE
|
||||
register_arena();
|
||||
#endif
|
||||
/* register_dungeon(); */
|
||||
|
||||
init_data(xmlfile?xmlfile:"eressea.xml");
|
||||
|
@ -1677,14 +1712,6 @@ main(int argc, char *argv[])
|
|||
init_rawmaterials();
|
||||
#endif
|
||||
|
||||
#ifdef MUSEUM_MODULE
|
||||
init_museum();
|
||||
#endif
|
||||
#ifdef ARENA_MODULE
|
||||
init_arena();
|
||||
#endif
|
||||
init_xmas2000();
|
||||
|
||||
init_gmcmd();
|
||||
|
||||
if(!*datafile)
|
||||
|
@ -1718,6 +1745,7 @@ main(int argc, char *argv[])
|
|||
setminmax();
|
||||
srand(time((time_t *) NULL));
|
||||
|
||||
frame_regions();
|
||||
if (autoseeding) {
|
||||
runautoseed();
|
||||
remove_empty_units();
|
||||
|
|
Loading…
Reference in New Issue