Coffee Flask (#1372)(an instance of generic thing made by Johnathon)     A white flask with the word "COFFEE" written in big red letters on the side. Go to location of this object, Johnathon. VERB SOURCE CODE: look_self:
pass(@args);
if (this.full)
player:tell("It is full of steaming black coffee.");
else
player:tell("It is empty.");
endif
.
f*ill:
if (this.full)
player:tell("It is not empty.");
else
locn = this.location;
if (is_player(locn))
locn = locn.location;
endif
iobj = locn:match_object(iobjstr);
if ((iobj == this.fill_from) && iobj:has_coffee())
this.full = iobj.value;
iobj:use();
player:tell_lines(this:fill_ok_msg());
player.location:announce(this:ofill_ok_msg());
else
player:tell_lines(this:fill_fail_msg());
player.location:announce(this:ofill_fail_msg());
endif
endif
.
drink:
if (this.full)
player:tell_lines(this:drink_ok_msg());
player.location:announce(this:odrink_ok_msg());
this.full = this.full - 1;
else
player:tell_lines(this:drink_fail_msg());
player.location:announce(this:odrink_fail_msg());
endif
.
e*mpty:
if (this.full)
player:tell_lines(this:empty_ok_msg());
player.location:announce(this:oempty_ok_msg());
this.full = 0;
else
player:tell_lines(this:empty_fail_msg());
player.location:announce(this:oempty_fail_msg());
endif
.
fill_ok_msg ofill_ok_msg ofill_fail_msg fill_fail_msg drink_fail_msg odrink_fail_msg odrink_ok_msg drink_ok_msg empty_ok_msg oempty_ok_msg empty_fail_msg oempty_fail_msg: return $string_utils:pronoun_sub(this.(verb)); . PROPERTY DATA:       full       fill_ok_msg       ofill_ok_msg       fill_fail_msg       ofill_fail_msg       empty_ok_msg       oempty_ok_msg       empty_fail_msg       oempty_fail_msg       drink_ok_msg       odrink_ok_msg       drink_fail_msg       odrink_fail_msg       fill_from |