From: NHOrus Date: Tue, 4 Jul 2017 08:49:02 +0000 (+0300) Subject: Unspk'd find X-Git-Tag: takebird~48 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=de5696431d57e1ce7e18e753de035da1334b761a;p=open-adventure.git Unspk'd find --- diff --git a/actions.c b/actions.c index f4633f5..1c52d28 100644 --- a/actions.c +++ b/actions.c @@ -725,17 +725,26 @@ int fill(token_t verb, token_t obj) static int find(token_t verb, token_t obj) /* Find. Might be carrying it, or it might be here. Else give caveat. */ { - int spk = actions[verb].message; + if (TOTING(obj)) { + rspeak(ALREADY_CARRYING); + return GO_CLEAROBJ; + } + + if (game.closed) { + rspeak(NEEDED_NEARBY); + return GO_CLEAROBJ; + } + if (AT(obj) || (LIQUID() == obj && AT(BOTTLE)) || obj == LIQLOC(game.loc) || - (obj == DWARF && atdwrf(game.loc) > 0)) - spk = YOU_HAVEIT; - if (game.closed) - spk = NEEDED_NEARBY; - if (TOTING(obj)) - spk = ALREADY_CARRYING; - rspeak(spk); + (obj == DWARF && atdwrf(game.loc) > 0)) { + rspeak(YOU_HAVEIT); + return GO_CLEAROBJ; + } + + + rspeak(actions[verb].message); return GO_CLEAROBJ; }