fix issue #1580 - item action for leash in use
Issue reported by JodiJodington: the item action for a leash didn't distringuish a leash that is already in use from one that isn't. Fixes 1580
This commit is contained in:
@@ -60,6 +60,7 @@ monsters (including pets) aren't scared of the Sokoban rolling boulder traps
|
|||||||
fix a bug in which steeds would continuously gain movement points while
|
fix a bug in which steeds would continuously gain movement points while
|
||||||
being ridden
|
being ridden
|
||||||
when hero's behavior makes erinyes stronger, cap level at 49 rather than 50
|
when hero's behavior makes erinyes stronger, cap level at 49 rather than 50
|
||||||
|
with inventory item action for leash, distingluish leash-in-use from empty one
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
+11
-3
@@ -331,9 +331,17 @@ itemactions(struct obj *otmp)
|
|||||||
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Use this tool to pick a lock");
|
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Use this tool to pick a lock");
|
||||||
else if (otmp->otyp == TINNING_KIT)
|
else if (otmp->otyp == TINNING_KIT)
|
||||||
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Use this kit to tin a corpse");
|
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Use this kit to tin a corpse");
|
||||||
else if (otmp->otyp == LEASH)
|
else if (otmp->otyp == LEASH) {
|
||||||
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Tie a pet to this leash");
|
if (!otmp->leashmon) {
|
||||||
else if (otmp->otyp == SADDLE)
|
Strcpy(buf, "Attach this leash to a pet");
|
||||||
|
} else {
|
||||||
|
mtmp = find_mid(otmp->leashmon, FM_FMON);
|
||||||
|
if (!mtmp) /* assume this won't happen */
|
||||||
|
panic("Can't find leash's monster");
|
||||||
|
Sprintf(buf, "Detach this leash from %s", some_mon_nam(mtmp));
|
||||||
|
}
|
||||||
|
ia_addmenu(win, IA_APPLY_OBJ, 'a', buf);
|
||||||
|
} else if (otmp->otyp == SADDLE)
|
||||||
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Place this saddle on a pet");
|
ia_addmenu(win, IA_APPLY_OBJ, 'a', "Place this saddle on a pet");
|
||||||
else if (otmp->otyp == MAGIC_WHISTLE
|
else if (otmp->otyp == MAGIC_WHISTLE
|
||||||
|| otmp->otyp == TIN_WHISTLE)
|
|| otmp->otyp == TIN_WHISTLE)
|
||||||
|
|||||||
Reference in New Issue
Block a user