BOARDROO.C
LIB3/D/HOME/CITY/TOWNHALL/BOARDROO.C · 1.1 KB
From the archive nm4dos.zip
Download the archive « Back to the archive contents
#include "path.h"
inherit "std/room";
object board;
string *issues;
setup()
{
issues = ({ });
board = clone_object("/obj/misc/board");
board->set_datafile("town_hall");
board->move(this_object());
set_short("The board room of the town hall");
set_long("This is the area of the town hall to which players "
+"can come to air their views on mud-related matters. Also, "
+"they can leave notes for others to comment on.\n");
set_zone("town hall");
set_light(60);
add_exit("north", "corridor1", "door");
add_sign("An enamelled metal plate",
"Type 'vote' for a list of current voting issues,\n"
+"and 'vote <isssue>' to vote on an issue.\n", "sign", "sign");
}
void init()
{
::init();
add_action("do_vote", "vote");
}
int do_vote(string str)
{
if (!str || str == "")
{
write("No issues currently up for vote.\n");
return 1;
}
if(member_array(str, issues))
{
write("You vote on "+str+".\n");
return 1;
}
notify_fail(capitalize(str)+" issues are not currently up for vote.\n");
return 0;
}