Shaped and themed rooms
Allows creating shaped or themed rooms for the Dungeons of Doom via lua script. Invalidates bones and saves. Makefiles updated for unix/linux by adding themerms.lua, but other OSes need to have that added.
This commit is contained in:
@@ -1136,6 +1136,8 @@ struct instance_globals {
|
||||
struct sp_coder *coder;
|
||||
xchar xstart, ystart;
|
||||
xchar xsize, ysize;
|
||||
boolean in_mk_themerooms;
|
||||
boolean themeroom_failed;
|
||||
|
||||
/* spells.c */
|
||||
int spl_sortmode; /* index into spl_sortchoices[] */
|
||||
|
||||
@@ -57,6 +57,7 @@ typedef struct dungeon { /* basic dungeon identifier */
|
||||
char dname[24]; /* name of the dungeon (eg. "Hell") */
|
||||
char proto[15]; /* name of prototype file (eg. "tower") */
|
||||
char fill_lvl[15]; /* name of "fill" level protype file */
|
||||
char themerms[15]; /* lua file name containing themed rooms */
|
||||
char boneid; /* character to id dungeon in bones files */
|
||||
d_flags flags; /* dungeon flags */
|
||||
xchar entry_lev; /* entry level */
|
||||
@@ -64,6 +65,7 @@ typedef struct dungeon { /* basic dungeon identifier */
|
||||
xchar dunlev_ureached; /* how deep you have been in this dungeon */
|
||||
int ledger_start, /* the starting depth in "real" terms */
|
||||
depth_start; /* the starting depth in "logical" terms */
|
||||
lua_State *themelua; /* themerms compiled lua */
|
||||
} dungeon;
|
||||
|
||||
/*
|
||||
|
||||
@@ -1446,6 +1446,7 @@ E int FDECL(somex, (struct mkroom *));
|
||||
E int FDECL(somey, (struct mkroom *));
|
||||
E boolean FDECL(inside_room, (struct mkroom *, XCHAR_P, XCHAR_P));
|
||||
E boolean FDECL(somexy, (struct mkroom *, coord *));
|
||||
E boolean FDECL(somexyspace, (struct mkroom *, coord *));
|
||||
E void FDECL(mkundead, (coord *, BOOLEAN_P, int));
|
||||
E struct permonst *NDECL(courtmon);
|
||||
E void FDECL(save_rooms, (NHFILE *));
|
||||
@@ -2478,6 +2479,7 @@ E void FDECL(sysopt_seduce_set, (int));
|
||||
|
||||
/* ### sp_lev.c ### */
|
||||
#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_TARGET)
|
||||
E void NDECL(create_des_coder);
|
||||
E struct mapfragment *FDECL(mapfrag_fromstr, (char *));
|
||||
E void FDECL(mapfrag_free, (struct mapfragment **));
|
||||
E schar FDECL(mapfrag_get, (struct mapfragment *, int, int));
|
||||
|
||||
@@ -19,6 +19,7 @@ struct mkroom {
|
||||
schar fdoor; /* index for the first door of the room */
|
||||
schar nsubrooms; /* number of subrooms */
|
||||
boolean irregular; /* true if room is non-rectangular */
|
||||
schar roomnoidx;
|
||||
struct mkroom *sbrooms[MAX_SUBROOMS]; /* Subrooms pointers */
|
||||
struct monst *resident; /* priest/shopkeeper/guard for this room */
|
||||
};
|
||||
@@ -48,6 +49,7 @@ struct shclass {
|
||||
/* values for rtype in the room definition structure */
|
||||
enum roomtype_types {
|
||||
OROOM = 0, /* ordinary room */
|
||||
THEMEROOM = 1, /* like OROOM, but never converted to special room */
|
||||
COURT = 2, /* contains a throne */
|
||||
SWAMP = 3, /* contains pools */
|
||||
VAULT = 4, /* detached room usually reached via teleport trap */
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
||||
* and save files.
|
||||
*/
|
||||
#define EDITLEVEL 16
|
||||
#define EDITLEVEL 17
|
||||
|
||||
#define COPYRIGHT_BANNER_A "NetHack, Copyright 1985-2020"
|
||||
#define COPYRIGHT_BANNER_B \
|
||||
|
||||
Reference in New Issue
Block a user