forked from github/server
crwritemap has been exported to lua as write_map(filename).
This commit is contained in:
parent
8e2225e4d5
commit
e4bdec8e7c
|
@ -1535,3 +1535,18 @@ report_computer(FILE * F, faction * f, struct seen_region ** seen, const faction
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
crwritemap(const char * filename)
|
||||
{
|
||||
FILE * F = fopen(filename, "w+");
|
||||
region * r;
|
||||
for (r=regions;r;r=r->next) {
|
||||
plane * p = rplane(r);
|
||||
fprintf(F, "REGION %d %d %d\n", r->x, r->y, p?p->id:0);
|
||||
fprintf(F, "\"%s\";Name\n\"%s\";Terrain\n", rname(r, default_locale), LOC(default_locale, terrain[rterrain(r)].name));
|
||||
}
|
||||
fclose(F);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@ extern void creport_init(void);
|
|||
extern void report_init(void);
|
||||
extern void report_cleanup(void);
|
||||
|
||||
extern int crwritemap(const char * filename);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
// gamecode includes
|
||||
#include <gamecode/laws.h>
|
||||
#include <gamecode/monster.h>
|
||||
#include <gamecode/creport.h>
|
||||
|
||||
// kernel includes
|
||||
#include <kernel/alliance.h>
|
||||
|
@ -214,6 +215,7 @@ bind_eressea(lua_State * L)
|
|||
def("atoi36", &atoi36),
|
||||
def("itoa36", &itoa36),
|
||||
def("read_game", &read_game),
|
||||
def("write_map", &crwritemap),
|
||||
def("write_game", &write_game),
|
||||
def("write_passwords", &writepasswd),
|
||||
def("init_reports", &init_reports),
|
||||
|
|
|
@ -143,20 +143,6 @@ struct settings global = {
|
|||
1000, /* maxunits */
|
||||
};
|
||||
|
||||
static int
|
||||
crwritemap(void)
|
||||
{
|
||||
FILE * F = fopen("world.cr", "w+");
|
||||
region * r;
|
||||
for (r=regions;r;r=r->next) {
|
||||
plane * p = rplane(r);
|
||||
fprintf(F, "REGION %d %d %d\n", r->x, r->y, p?p->id:0);
|
||||
fprintf(F, "\"%s\";Name\n\"%s\";Terrain\n", rname(r, default_locale), LOC(default_locale, terrain[rterrain(r)].name));
|
||||
}
|
||||
fclose(F);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
game_init(void)
|
||||
{
|
||||
|
@ -651,7 +637,7 @@ main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
if (g_writemap) {
|
||||
return crwritemap();
|
||||
return crwritemap("world.cr");
|
||||
}
|
||||
|
||||
if (turn == 0) srand((int)time(0));
|
||||
|
|
15
src/todo.txt
15
src/todo.txt
|
@ -1,28 +1,15 @@
|
|||
TODO:
|
||||
|
||||
parteien- oder gruppenweises aftermath-markieren.
|
||||
|
||||
XUL for Eressea
|
||||
|
||||
weights in item descriptions
|
||||
|
||||
[11:01] <Enno`> am besten wäre, wenn mailit nur die optionen, nicht das ganze script enthielte
|
||||
[11:01] <Enno`> und ein skript dann mailit als input nähme
|
||||
[11:02] <Enno`> also nur enno@eressea.upb.de pka3 BZIP2 nr cr zv
|
||||
|
||||
Deathcloud: Magieresistenz des Magiers in das attribut, nicht auflösen wenn magier tot.
|
||||
|
||||
Messungen:
|
||||
Messen, was CR alleine kostet.
|
||||
Messen, was no-ZV bringt. Zugvorlage abstellen.
|
||||
Conan:
|
||||
Auswertung 0:30 h
|
||||
Verpacken: 1:35 h
|
||||
|
||||
error handling in lua/luabind?
|
||||
|
||||
mapper: parteien sofort aussetzen.
|
||||
|
||||
english registration confirmation is deutsch!
|
||||
|
||||
NO_RUNNING
|
||||
|
@ -43,8 +30,6 @@ getstrtoken() - das static loswerden
|
|||
|
||||
R_PERSON fix in vin2?
|
||||
|
||||
calendar in XML
|
||||
|
||||
unterschiede in vin3 + wdw per config statt defines?
|
||||
|
||||
#define NEWATSROI 1
|
||||
|
|
Loading…
Reference in New Issue