From: Deskull Date: Thu, 10 Jan 2019 13:15:15 +0000 (+0900) Subject: [Refactor] #38824 get_item() を choose_object() に置換中。 / Replacing get_item() to choose... X-Git-Url: http://git.osdn.net/view?p=hengband%2Fhengband.git;a=commitdiff_plain;h=d891e1b8ec7d3661ef290ec0eb37eea793f7db9b [Refactor] #38824 get_item() を choose_object() に置換中。 / Replacing get_item() to choose_object(). --- diff --git a/src/cmd-activate.c b/src/cmd-activate.c index 0cb72caaf..add8bcaaf 100644 --- a/src/cmd-activate.c +++ b/src/cmd-activate.c @@ -385,7 +385,7 @@ void do_cmd_activate(void) q = _("どのアイテムを始動させますか? ", "Activate which item? "); s = _("始動できるアイテムを装備していない。", "You have nothing to activate."); - if (!get_item(&item, q, s, (USE_EQUIP | IGNORE_BOTHHAND_SLOT))) return; + if (!choose_object(&item, q, s, (USE_EQUIP | IGNORE_BOTHHAND_SLOT))) return; /* Activate the item */ do_cmd_activate_aux(item); diff --git a/src/cmd-eat.c b/src/cmd-eat.c index d382c862b..db3179fc0 100644 --- a/src/cmd-eat.c +++ b/src/cmd-eat.c @@ -500,7 +500,6 @@ void do_cmd_eat_food(void) OBJECT_IDX item; cptr q, s; - if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN)) { set_action(ACTION_NONE); @@ -512,7 +511,7 @@ void do_cmd_eat_food(void) q = _("どれを食べますか? ", "Eat which item? "); s = _("食べ物がない。", "You have nothing to eat."); - if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return; + if (!choose_object(&item, q, s, (USE_INVEN | USE_FLOOR))) return; /* Eat the object */ do_cmd_eat_food_aux(item); diff --git a/src/cmd-item.c b/src/cmd-item.c index a86e00a5a..9af1e7a55 100644 --- a/src/cmd-item.c +++ b/src/cmd-item.c @@ -186,7 +186,7 @@ void do_cmd_wield(void) /* Choose a weapon from the equipment only */ q = _("どちらの武器と取り替えますか?", "Replace which weapon? "); s = _("おっと。", "Oops."); - if (!get_item(&slot, q, s, (USE_EQUIP | IGNORE_BOTHHAND_SLOT))) return; + if (!choose_object(&slot, q, s, (USE_EQUIP | IGNORE_BOTHHAND_SLOT))) return; if (slot == INVEN_RARM) need_switch_wielding = INVEN_LARM; } @@ -202,7 +202,7 @@ void do_cmd_wield(void) /* Choose a hand */ q = _("どちらの手に装備しますか?", "Equip which hand? "); s = _("おっと。", "Oops."); - if (!get_item(&slot, q, s, (USE_EQUIP))) return; + if (!choose_object(&slot, q, s, (USE_EQUIP))) return; } break;