@verb #1653:"vote" any on top of/on/onto/upon this rdo #7165 @program #1653:"vote" any on top of/on/onto/upon this if (!$council:is_councillor(player)) return player:tell("Only councillors can vote on proposals. Type @council for the list of current councillors, or ?council for more information.") elseif (!dobjstr in {"yes", "no", "y", "n"}) return player:tell("You must vote 'Yes' or 'No', or use 'abstain from ", iobjstr, "'.") elseif (this.f) return player:tell("Don't vote on a generic, fool!") endif vote = dobjstr in {"yes", "y"} ? "yes" | "no" oldvote = player in this.yes ? "yes" | (player in this.no ? "no" | (player in this.abstain ? "abstain" | $nothing)) if (vote == oldvote) return player:tell("Your vote remains unchanged.") elseif (oldvote == "abstain") player:tell("You stop abstaining, and vote '", vote, "'.") player.location:sub_announce(tostr("%N stops abstaining, and votes '", vote, "' on %t")) this.abstain = setremove(this.abstain, player) this.(vote) = setadd(this.(vote), player) elseif (oldvote != #-1) player:tell("You change your vote from '", oldvote, "' to '", vote, "'.") player.location:sub_announce(tostr("%N changes his vote on %t from '", oldvote, "' to '", vote, "'.")) this.(oldvote) = setremove(this.(oldvote), player) this.(vote) = setadd(this.(vote), player) else player:tell("You vote '", vote, "' on ", this:title()) player.location:sub_announce(tostr("%N registers his '", vote, "' vote on %t")) this.(vote) = setadd(this.(vote), player) endif player.location:announce_all(this:status()) "Last modified by igor (#8954) on Mon Aug 26 08:08:29 2002 MDT." .