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:
17
src/mkroom.c
17
src/mkroom.c
@@ -713,6 +713,23 @@ coord *c;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
boolean
|
||||
somexyspace(croom, c)
|
||||
struct mkroom *croom;
|
||||
coord *c;
|
||||
{
|
||||
int trycnt = 0;
|
||||
boolean okay;
|
||||
|
||||
do {
|
||||
okay = somexy(croom, c) && isok(c->x, c->y) && !occupied(c->x, c->y)
|
||||
&& (levl[c->x][c->y].typ == ROOM
|
||||
|| levl[c->x][c->y].typ == CORR
|
||||
|| levl[c->x][c->y].typ == ICE);
|
||||
} while (trycnt++ < 100 && !okay);
|
||||
return okay;
|
||||
}
|
||||
|
||||
/*
|
||||
* Search for a special room given its type (zoo, court, etc...)
|
||||
* Special values :
|
||||
|
||||
Reference in New Issue
Block a user