#include "boot.clh" object THING parents LOCATED_OBJ, DESCRIBED_OBJ; name = "Generic Thing"; obj home; verb "get take" = get; verb "drop throw" = drop; method location return #-1; endmethod method init ignore E_METHODNF; if (this == THING) this.add_owner(WIZARD); else if (player.home) home = player.home; else home = player; endif pass(); this.moveto(player); endif endmethod /* init */ method id return pass() to DESCRIBED_OBJ; endmethod method accept return 0; /* THING's aren't containers */ endmethod method get var result; if (args[1] != "all" && !this.match(args[2])) return 1; elseif (location == player) result = "You already have that!"; elseif (location != player.location) result = "I don't see that here."; elseif (this.moveto(player)) result = "Taken."; player.location.announce(player.name + " takes " + this.name + ".", {player}); else result = "You can't get that."; endif if (args[1] == "all") player.tell(name + ": " + result); else player.tell(result); endif endmethod /* get */ method drop var result; if (args[1] != "all" && !this.match(args[2])) return 1; elseif (location != player) result = "You don't have that!"; elseif (this.moveto(player.location)) result = "Dropped."; player.location.announce(player.name + " drops " + this.name + ".", {player}); else result = "You can't drop that."; endif if (args[1] == "all") player.tell(name + ": " + result); else player.tell(result); endif endmethod /* drop */ endobject /* THING */