From 6b79d8d2bd1224c91a486561f8f671a29bb9dce4 Mon Sep 17 00:00:00 2001 From: Deskull Date: Sat, 6 Oct 2018 15:36:13 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20=E3=83=A1=E3=83=83?= =?utf8?q?=E3=82=BB=E3=83=BC=E3=82=B8=E6=95=B4=E7=90=86=E3=80=82=20/=20Ref?= =?utf8?q?actor=20messages.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/cmd-item.c | 62 +++++++++++++--------------------------------------------- src/cmd2.c | 1 - 2 files changed, 14 insertions(+), 49 deletions(-) diff --git a/src/cmd-item.c b/src/cmd-item.c index a875082e1..198418cbf 100644 --- a/src/cmd-item.c +++ b/src/cmd-item.c @@ -599,9 +599,7 @@ void kamaenaoshi(int item) void do_cmd_takeoff(void) { OBJECT_IDX item; - object_type *o_ptr; - cptr q, s; if (p_ptr->special_defense & KATA_MUSOU) @@ -610,14 +608,10 @@ void do_cmd_takeoff(void) } item_tester_no_ryoute = TRUE; + /* Get an item */ -#ifdef JP - q = "どれを装備からはずしますか? "; - s = "はずせる装備がない。"; -#else - q = "Take off which item? "; - s = "You are not wearing anything to take off."; -#endif + q = _("どれを装備からはずしますか? ", "Take off which item? "); + s = _("はずせる装備がない。", "You are not wearing anything to take off."); if (!get_item(&item, q, s, (USE_EQUIP))) return; @@ -679,11 +673,8 @@ void do_cmd_takeoff(void) /* Take off the item */ (void)inven_takeoff(item, 255); - kamaenaoshi(item); - calc_android_exp(); - p_ptr->redraw |= (PR_EQUIPPY); } @@ -708,13 +699,8 @@ void do_cmd_drop(void) item_tester_no_ryoute = TRUE; /* Get an item */ -#ifdef JP - q = "どのアイテムを落としますか? "; - s = "落とせるアイテムを持っていない。"; -#else - q = "Drop which item? "; - s = "You have nothing to drop."; -#endif + q = _("どのアイテムを落としますか? ", "Drop which item? "); + s = _("落とせるアイテムを持っていない。", "You have nothing to drop."); if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN))) return; @@ -825,15 +811,9 @@ void do_cmd_destroy(void) /* Hack -- force destruction */ if (command_arg > 0) force = TRUE; - /* Get an item */ -#ifdef JP - q = "どのアイテムを壊しますか? "; - s = "壊せるアイテムを持っていない。"; -#else - q = "Destroy which item? "; - s = "You have nothing to destroy."; -#endif + q = _("どのアイテムを壊しますか? ", "Destroy which item? "); + s = _("壊せるアイテムを持っていない。", "You have nothing to destroy."); if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return; @@ -1031,14 +1011,10 @@ void do_cmd_observe(void) cptr q, s; item_tester_no_ryoute = TRUE; + /* Get an item */ -#ifdef JP - q = "どのアイテムを調べますか? "; - s = "調べられるアイテムがない。"; -#else - q = "Examine which item? "; - s = "You have nothing to examine."; -#endif + q = _("どのアイテムを調べますか? ", "Examine which item? "); + s = _("調べられるアイテムがない。", "You have nothing to examine."); if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR))) return; @@ -1087,13 +1063,8 @@ void do_cmd_uninscribe(void) item_tester_no_ryoute = TRUE; /* Get an item */ -#ifdef JP - q = "どのアイテムの銘を消しますか? "; - s = "銘を消せるアイテムがない。"; -#else - q = "Un-inscribe which item? "; - s = "You have nothing to un-inscribe."; -#endif + q = _("どのアイテムの銘を消しますか? ", "Un-inscribe which item? "); + s = _("銘を消せるアイテムがない。", "You have nothing to un-inscribe."); if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR))) return; @@ -1149,13 +1120,8 @@ void do_cmd_inscribe(void) item_tester_no_ryoute = TRUE; /* Get an item */ -#ifdef JP - q = "どのアイテムに銘を刻みますか? "; - s = "銘を刻めるアイテムがない。"; -#else - q = "Inscribe which item? "; - s = "You have nothing to inscribe."; -#endif + q = _("どのアイテムに銘を刻みますか? ", "Inscribe which item? "); + s = _("銘を刻めるアイテムがない。", "You have nothing to inscribe."); if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR))) return; diff --git a/src/cmd2.c b/src/cmd2.c index 44cd167fd..e9aabde24 100644 --- a/src/cmd2.c +++ b/src/cmd2.c @@ -3770,7 +3770,6 @@ bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken) if (cave[y][x].m_idx) { cave_type *c_ptr = &cave[y][x]; - monster_type *m_ptr = &m_list[c_ptr->m_idx]; /* Check the visibility */ -- 2.11.0