Allow creating unhidden traps in special levels
des.trap({ type = "rust", seen = true });
This commit is contained in:
@@ -1468,6 +1468,8 @@ mktrap(int num, int mktrapflags, struct mkroom *croom, coord *tm)
|
||||
|
||||
if (kind == WEB && !(mktrapflags & MKTRAP_NOSPIDERONWEB))
|
||||
(void) makemon(&mons[PM_GIANT_SPIDER], m.x, m.y, NO_MM_FLAGS);
|
||||
if ((mktrapflags & MKTRAP_SEEN))
|
||||
t->tseen = TRUE;
|
||||
|
||||
/* The hero isn't the only person who's entered the dungeon in
|
||||
search of treasure. On the very shallowest levels, there's a
|
||||
|
||||
@@ -1743,6 +1743,8 @@ create_trap(spltrap* t, struct mkroom* croom)
|
||||
|
||||
if (!t->spider_on_web)
|
||||
mktrap_flags |= MKTRAP_NOSPIDERONWEB;
|
||||
if (t->seen)
|
||||
mktrap_flags |= MKTRAP_SEEN;
|
||||
|
||||
tm.x = x;
|
||||
tm.y = y;
|
||||
@@ -4117,6 +4119,7 @@ lspo_trap(lua_State *L)
|
||||
get_table_xy_or_coord(L, &x, &y);
|
||||
tmptrap.type = get_table_traptype_opt(L, "type", -1);
|
||||
tmptrap.spider_on_web = get_table_boolean_opt(L, "spider_on_web", 1);
|
||||
tmptrap.seen = get_table_boolean_opt(L, "seen", FALSE);
|
||||
}
|
||||
|
||||
if (tmptrap.type == NO_TRAP)
|
||||
|
||||
Reference in New Issue
Block a user