OSDN Git Service

easy_floor有効時に, 床上のアイテムの山に金塊が含まれる場合でもリスト
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 2 Aug 2004 14:04:33 +0000 (14:04 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 2 Aug 2004 14:04:33 +0000 (14:04 +0000)
表示するように修正.

lib/pref/font-xxx.prf
src/object1.c
src/xtra2.c

index d2d021e..9d35063 100644 (file)
@@ -456,3 +456,6 @@ E:50:0x0D
 
 # WHISTLE
 E:4:0x03
+
+# GOLD
+E:127:0x0B
index 43440e1..fe9564f 100644 (file)
@@ -4305,7 +4305,13 @@ bool item_tester_okay(object_type *o_ptr)
        if (!o_ptr->k_idx) return (FALSE);
 
        /* Hack -- ignore "gold" */
-       if (o_ptr->tval == TV_GOLD) return (FALSE);
+       if (o_ptr->tval == TV_GOLD)
+       {
+               /* See xtra2.c */
+               extern bool show_gold_on_floor;
+
+               if (!show_gold_on_floor) return (FALSE);
+       }
 
        /* Check the tval */
        if (item_tester_tval)
@@ -6322,6 +6328,8 @@ int show_floor(int target_item, int y, int x, int *min_width)
        int wid, hgt;
        char floor_label[52 + 1];
 
+       bool dont_need_to_show_weights = TRUE;
+
        /* Get size */
        Term_get_size(&wid, &hgt);
 
@@ -6355,6 +6363,8 @@ int show_floor(int target_item, int y, int x, int *min_width)
                /* Be sure to account for the weight */
                if (show_weights) l += 9;
 
+               if (o_ptr->tval != TV_GOLD) dont_need_to_show_weights = FALSE;
+
                /* Maintain the maximum length */
                if (l > len) len = l;
 
@@ -6362,6 +6372,8 @@ int show_floor(int target_item, int y, int x, int *min_width)
                k++;
        }
 
+       if (show_weights && dont_need_to_show_weights) len -= 9;
+
        /* Save width */
        *min_width = len;
 
@@ -6408,7 +6420,7 @@ int show_floor(int target_item, int y, int x, int *min_width)
                c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
 
                /* Display the weight if needed */
-               if (show_weights)
+               if (show_weights && (o_ptr->tval != TV_GOLD))
                {
                        int wgt = o_ptr->weight * o_ptr->number;
 #ifdef JP
index c613019..b3bbce7 100644 (file)
@@ -3081,6 +3081,8 @@ static void evaluate_monster_exp(char *buf, monster_type *m_ptr)
 }
 
 
+bool show_gold_on_floor = FALSE;
+
 /*
  * Examine a grid, return a keypress.
  *
@@ -3432,7 +3434,9 @@ static int target_set_aux(int y, int x, int mode, cptr info)
                                screen_save();
 
                                /* Display */
+                               show_gold_on_floor = TRUE;
                                (void)show_floor(0, y, x, &min_width);
+                               show_gold_on_floor = FALSE;
 
                                /* Prompt */
 #ifdef JP