]> granicus.if.org Git - nethack/commitdiff
Allow specifying a montype on figurines in lua files
authorcopperwater <aosdict@gmail.com>
Wed, 15 Apr 2020 02:30:20 +0000 (22:30 -0400)
committerPasi Kallinen <paxed@alt.org>
Wed, 15 Apr 2020 03:47:58 +0000 (06:47 +0300)
This was already allowed for the other montype-compatible objects like
statues, corpses, eggs and tins. I don't see a reason why figurines
shouldn't be part of this group; perhaps it was an oversight.

src/sp_lev.c

index 817a93ba5bce25aece0f68f91a8310c98a232446..48177b0fc5a4a8ee6bff0e0eb45f9a1b66854acb 100755 (executable)
@@ -3459,7 +3459,8 @@ lua_State *L;
         tmpobj.id = -1;
 
     if (tmpobj.id == STATUE || tmpobj.id == EGG
-        || tmpobj.id == CORPSE || tmpobj.id == TIN) {
+        || tmpobj.id == CORPSE || tmpobj.id == TIN
+        || tmpobj.id == FIGURINE) {
         struct permonst *pm = NULL;
         int i, lflags = 0;
         char *montype = get_table_str_opt(L, "montype", NULL);