OSDN Git Service

開いた/壊れたドアの上にアイテムを置けるようにした. アイテムのある開い
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 23 Nov 2003 09:30:47 +0000 (09:30 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 23 Nov 2003 09:30:47 +0000 (09:30 +0000)
たドアは閉まらないようにした.

lib/edit/f_info.txt
src/cmd2.c

index 8ba497f..8a31528 100644 (file)
@@ -90,8 +90,8 @@ G:':U
 W:10
 K:DESTROYED:FLOOR
 K:CLOSE:CLOSED_DOOR
-F:LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | CLOSE | DOOR | CAN_FLY |
-F:HURT_DISI | TELEPORTABLE
+F:LOS | PROJECT | MOVE | PLACE | DROP | NOTICE | REMEMBER | CLOSE | DOOR |
+F:CAN_FLY | HURT_DISI | TELEPORTABLE
 
 # 0x05 --> broken door
 
@@ -102,8 +102,8 @@ G:':u
 W:10
 K:DESTROYED:FLOOR
 K:CLOSE:BROKEN_DOOR
-F:LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | CLOSE | DOOR | CAN_FLY |
-F:HURT_DISI | TELEPORTABLE
+F:LOS | PROJECT | MOVE | PLACE | DROP | NOTICE | REMEMBER | CLOSE | DOOR |
+F:CAN_FLY | HURT_DISI | TELEPORTABLE
 
 # 0x06 --> up stairs (perm)
 
index b77a592..9c64c50 100644 (file)
@@ -1321,26 +1321,39 @@ static bool do_cmd_close_aux(int y, int x)
        /* Open door */
        if (have_flag(f_info[old_feat].flags, FF_CLOSE))
        {
-               /* Close the door */
-               cave_alter_feat(y, x, FF_CLOSE);
-
-               /* Broken door */
-               if (old_feat == c_ptr->feat)
+               /* Hack -- object in the way */
+               if ((c_ptr->o_idx || (c_ptr->info & CAVE_OBJECT)) && (feat_state(old_feat, FF_CLOSE) != old_feat))
                {
                        /* Message */
 #ifdef JP
-                       msg_print("¥É¥¢¤Ï²õ¤ì¤Æ¤·¤Þ¤Ã¤Æ¤¤¤ë¡£");
+                       msg_print("²¿¤«¤¬¤Ä¤Ã¤«¤¨¤ÆÊĤޤé¤Ê¤¤¡£");
 #else
-                       msg_print("The door appears to be broken.");
+                       msg_print("There seems stuck.");
 #endif
                }
                else
                {
-                       /* Update some things */
-                       p_ptr->update |= (PU_VIEW | PU_LITE | PU_MONSTERS | PU_MON_LITE);
+                       /* Close the door */
+                       cave_alter_feat(y, x, FF_CLOSE);
 
-                       /* Sound */
-                       sound(SOUND_SHUTDOOR);
+                       /* Broken door */
+                       if (old_feat == c_ptr->feat)
+                       {
+                               /* Message */
+#ifdef JP
+                               msg_print("¥É¥¢¤Ï²õ¤ì¤Æ¤·¤Þ¤Ã¤Æ¤¤¤ë¡£");
+#else
+                               msg_print("The door appears to be broken.");
+#endif
+                       }
+                       else
+                       {
+                               /* Update some things */
+                               p_ptr->update |= (PU_VIEW | PU_LITE | PU_MONSTERS | PU_MON_LITE);
+
+                               /* Sound */
+                               sound(SOUND_SHUTDOOR);
+                       }
                }
        }