542 @verb #3309:"@seatsize" any is any rxd #8438 @program #3309:"@seatsize" any is any "@seatsize is " "Change the maximum capacity for a given seat. If you don't give a number, it will tell you the current capacity." if (!this:controlled_by(player)) player:tell("You don't own the room, and can't do any interior decorating - sorry!") return endif if ((check = this:match_seat(dobjstr)) == $ambiguous_match) return player:tell("I don't know which \"", dobjstr, "\" you mean.") elseif (!check) return player:tell("There's no seat named '", dobjstr, "' in ", this.name, ".") elseif ("is" in args == length(args)) player:tell(toliteral(this:seatlist()[check][1]), " seats ", this:seatlist()[check][2], ".") elseif (typeof(cap = $code_utils:toint(iobjstr)) == $ERR || cap < 1) player:tell("Don't be silly. Set the maximum capicity to some number greater than 1.") else "New code added by Dax when listset function was removed." seatlist = this:seatlist() seatlist[check][2] = cap this:set_seatlist(seatlist) "Original code" "this:set_seatlist(listset(seatlist = this:seatlist(), listset(seatlist[check], cap, 2), check))" player:tell(toliteral(this:seatlist()[check][1]), " is now set to ", cap, ".") endif "Last modified by Dax (#789) on Tue May 17 14:00:49 2005 MDT." . 0