/
LIB3/
LIB3/D/ADMIN/
LIB3/D/ADMIN/OBJ/
LIB3/D/ADMIN/ROOM/W/
LIB3/D/HOME/
LIB3/D/HOME/CITY/ARENA/
LIB3/D/HOME/CITY/ITEMS/
LIB3/D/HOME/CITY/POSTOFFI/
LIB3/DOC/
LIB3/GLOBAL/SPECIAL/
LIB3/GLOBAL/VIRTUAL/
LIB3/NET/
LIB3/NET/CONFIG/
LIB3/NET/DAEMON/CHARS/
LIB3/NET/GOPHER/
LIB3/NET/INHERIT/
LIB3/NET/OBJ/
LIB3/NET/SAVE/
LIB3/NET/VIRTUAL/
LIB3/OBJ/B_DAY/
LIB3/OBJ/HANDLERS/TERM_TYP/
LIB3/PLAYERS/B/
LIB3/PLAYERS/N/
LIB3/ROOM/
LIB3/SAVE/
LIB3/SAVE/BOARDS/
LIB3/SAVE/ENVIRON/
LIB3/SAVE/POST/
LIB3/STD/COMMANDS/SHADOWS/
LIB3/STD/CREATOR/
LIB3/STD/DOM/
LIB3/STD/EFFECTS/
LIB3/STD/EFFECTS/HEALING/
LIB3/STD/EFFECTS/OTHER/
LIB3/STD/EFFECTS/POISONS/
LIB3/STD/ENVIRON/
LIB3/STD/GUILDS/
LIB3/STD/LIQUIDS/
LIB3/STD/ROOM/
LIB3/STD/TRIGGER/SHADOW/
LIB3/W/
LIB3/W/BANNOR/
LIB3/W/NEWSTYLE/
inherit "/failsafe/simul_efun";
inherit "/failsafe/print_object";

static string name,
       *alias,
       *adjectives,
       *plurals;

/* name handleing stuff */
void set_name(string str) { name = str; }
string query_name() { return name; }
string query_cap_name() { return capitalize(name); }

void create() {
  alias = ({ });
  plurals = ({ });
  adjectives = ({ });
}

/* alias stuff */
void add_alias(mixed str) {
  if (pointerp(str)) {
    alias += str;
    return ;
  }
  if (member_array(str, alias) == -1)
    alias += ({ str });
}

int remove_alias(string str) {
  int i;
  if ((i=member_array(str, alias)) == -1)
    return 0;
  alias = delete(alias, i, 1);
  return 1;
}

string *query_alias() { return alias; }

int id(string str) {
  return (str == name) || (member_array(str, alias) != -1);
}

/* plural stuff */
void set_main_plural(string str) {
  plurals = ({ str }) + plurals;
}

string query_plural() { 
  if (sizeof(plurals))
    return plurals[0];
  return name;
}

string pretty_plural() {
  if (sizeof(plurals))
    return plurals[0];
  return name;
}

void add_plural(string str) { 
  plurals += ({ str });
}

void remove_plural(string str) {
  int i;

  if ((i=member_array(str, plurals)) != -1)
    plurals = delete(plurals,i,1);
}

void add_plurals(string *str) {
  plurals += str;
}

string *query_plurals() { return plurals; }

int id_plural(string str) {
  return (member_array(str, plurals) != -1);
}

void add_adjective(mixed str) {
  int i;

  if (pointerp(str))
    for (i=0;i<sizeof(str);i++)
      add_adjective(str[i]);
  else
    if (member_array(str, adjectives) == -1)
      adjectives += ({ str });
}

void remove_adjective(mixed str) {
  int i;

  if (pointerp(str))
    for (i=0;i<sizeof(str);i++)
      remove_adjective(str[i]);
  else
    if ((i=member_array(str, adjectives)) != -1)
      adjectives = delete(adjectives, i, 1);
}

string *query_adjectives() { return adjectives; }

/* ok parse command stuff */
string *parse_command_id_list() { return ({ name }) + alias; }
string *parse_command_plural_id_list() { return plurals; }
string *parse_command_adjectiv_id_list() { return adjectives; }

int query_parse_id(mixed *arr) {
  return (arr[0]-- > 0);
}