/*Origional code by Dazzle 'do_strip_area_affect',
converted to set_sector by Ghreth*/
void do_set_sector(CHAR_DATA *ch, char *argument)
{
/*I have extended bitvectors, if you do not then change the long long to int*/
long long i;
AREA_DATA *pArea;
EDIT_AREA(ch, pArea);
/*Make sure you dont do this by mistake*/
if ( ch->desc->editor == 0 )
{
send_to_char( "You are not editing the area.\n\r", ch );
return;
}
if ( argument[0] == '\0' )
{
send_to_char( "What sector would you like set for this area?\n\r", ch );
/*List of choices, lopes color code involved*/
send_to_char( "{rhills {Dinside {gfield {Gforest {rmountain {cswim\n\r", ch );
send_to_char( "{bnoswim {Dswamp {mair {ydesert {Rlava {Wsnow {Dcave {wcity{x\n\r", ch );
return;
}
for(i = 0; sector_flags[i].name != NULL; i++)
{
if(is_exact_name(argument, sector_flags[i].name))
{
int x;
ROOM_INDEX_DATA *pRoom;
// Parse through the list.
for(x = ch->in_room->area->min_vnum; x != ch->in_room->area->max_vnum; x++)
{
if((pRoom = get_room_index(x)) != NULL)
{
/*If its not set, set it*/
if(pRoom->sector_type != i);
pRoom->sector_type = i;
}
}
send_to_char("Sector Flag Added to Area!\n\r",ch);
pArea = ch->in_room->area;
SET_BIT( pArea->area_flags, AREA_CHANGED );
//do_asave(ch, "area"); /*I thought too hasty*/
return;
}
}
send_to_char("That flag does not exist, choose from the list below.\n\r",ch);
/*List of choices again, lopes color code still involved*/
send_to_char( "{rhills {Dinside {gfield {Gforest {rmountain {cswim\n\r", ch );
send_to_char( "{bnoswim {Dswamp {mair {ydesert {Rlava {Wsnow {Dcave {wcity{x\n\r", ch );
return;
}