Example #1
0
/* daily - seeds and names a site (will re-seed and rename if used after start) */
void initlocation(Location &loc)
{
   loc.init();

   char str[80];

   switch(loc.type)
   {
   case SITE_DOWNTOWN: loc.rename("Downtown", "Downtown"); break;
   case SITE_UDISTRICT: loc.rename("The University District", "U-District"); break;
   case SITE_COMMERCIAL: loc.rename("The Commercial District", "C-District"); break;
   case SITE_INDUSTRIAL: loc.rename("The Industrial District", "I-District"); break;
   case SITE_OUTOFTOWN: loc.rename("On the Outskirts of the City", "Outskirts"); break;
   case SITE_GOVERNMENT_POLICESTATION: loc.rename("Police Station", "Police Station"); break;
   case SITE_GOVERNMENT_COURTHOUSE:
      if(law[LAW_DEATHPENALTY]==-2) {
         loc.rename("Halls of Ultimate Judgment", "Judge Hall");
      } else {
         loc.rename("Court House", "Court House");
      } break;
   case SITE_GOVERNMENT_FIRESTATION:
      if(law[LAW_FREESPEECH]==-2) {
         loc.rename("Fireman HQ", "Fireman HQ");
      } else {
         loc.rename("Fire Station", "Fire Station");
      } break;
   case SITE_GOVERNMENT_PRISON:
      if(law[LAW_PRISONS]==-2)
      {
         switch(LCSrandom(5))
         {
            case 0:strcpy(loc.name,"Happy");break;
            case 1:strcpy(loc.name,"Cheery");break;
            case 2:strcpy(loc.name,"Quiet");break;
            case 3:strcpy(loc.name,"Green");break;
            case 4:strcpy(loc.name,"Nectar");break;
         }
         strcat(loc.name," ");
         switch(LCSrandom(5))
         {
            case 0:strcat(loc.name,"Valley");break;
            case 1:strcat(loc.name,"Meadow");break;
            case 2:strcat(loc.name,"Hills");break;
            case 3:strcat(loc.name,"Glade");break;
            case 4:strcat(loc.name,"Forest");break;
         }
         strcat(loc.name," Forced Labor Camp");
         strcpy(loc.shortname,"Labor Camp");
      }
      else
      {
         lastname(str);
         strcpy(loc.name,str);
         strcat(loc.name," Prison");
         strcpy(loc.shortname,"Prison");
      }
      break;
   case SITE_INDUSTRY_NUCLEAR:
      if(law[LAW_NUCLEARPOWER]==2) {
         loc.rename("Nuclear Waste Center", "NWaste Center");
      } else {
         loc.rename("Nuclear Power Plant", "NPower Plant");
      } break;
   case SITE_GOVERNMENT_INTELLIGENCEHQ:
      if(law[LAW_PRIVACY]==-2 && law[LAW_POLICEBEHAVIOR]==-2) {
         loc.rename("Ministry of Love", "Min. Love");
      } else {
         loc.rename("Intelligence HQ", "Int. HQ");
      } break;
   case SITE_GOVERNMENT_ARMYBASE:
      lastname(str);
      strcpy(loc.name,str);
      strcat(loc.name," Army Base");
      strcpy(loc.shortname,"Army Base");
      break;
   case SITE_CORPORATE_HEADQUARTERS:
      loc.rename("Corporate HQ","Corp. HQ");
      break;
   case SITE_BUSINESS_BANK:
      loc.rename("American Bank Corp", "Bank");
      break;
   case SITE_BUSINESS_PAWNSHOP:
      if(law[LAW_GUNCONTROL]==ALIGN_ELITELIBERAL)
      {
         char str[80];
         lastname(str);
         strcpy(loc.name,str);
         strcat(loc.name,"'s Pawnshop");
         strcpy(loc.shortname,"Pawnshop");
      }
      else
      {
         char str[80];
         lastname(str);
         strcpy(loc.name,str);
         strcat(loc.name," Pawn & Gun");
         strcpy(loc.shortname,"Pawnshop");
      }
      break;
   case SITE_CORPORATE_HOUSE:
      if(law[LAW_CORPORATE]==-2&&
                             law[LAW_TAX]==-2)
      {
         loc.rename("CEO Castle", "CEO Castle");
      }
      else
      {
         loc.rename("CEO Residence", "CEO House");
      }
      break;
   case SITE_RESIDENTIAL_SHELTER:
      loc.rename("Homeless Shelter", "Shelter");
      break;
   case SITE_INDUSTRY_WAREHOUSE:
      do {
         strcpy(loc.name,"Abandoned ");
         char str[50];
         /*lastname(str);
         strcat(loc.name,str);
         strcat(loc.name," ");*/

         switch(LCSrandom(10))
         {
         case 0:
            strcat(loc.name,"Meat Plant");
            strcpy(loc.shortname,"Meat Plant");
            break;
         case 1:
            strcat(loc.name,"Warehouse");
            strcpy(loc.shortname,"Warehouse");
            break;
         case 2:
            strcat(loc.name,"Paper Mill");
            strcpy(loc.shortname,"Paper Mill");
            break;
         case 3:
            strcat(loc.name,"Cement Factory");
            strcpy(loc.shortname,"Cement");
            break;
         case 4:
            strcat(loc.name,"Fertilizer Plant");
            strcpy(loc.shortname,"Fertilizer");
            break;
         case 5:
            strcat(loc.name,"Drill Factory");
            strcpy(loc.shortname,"Drill");
            break;
         case 6:
            strcat(loc.name,"Steel Plant");
            strcpy(loc.shortname,"Steel");
            break;
         case 7:
            strcat(loc.name,"Packing Plant");
            strcpy(loc.shortname,"Packing");
            break;
         case 8:
            strcat(loc.name,"Toy Factory");
            strcpy(loc.shortname,"Toy");
            break;
         case 9:
            strcat(loc.name,"Building Site");
            strcpy(loc.shortname,"Building");
            break;
         }
      } while (loc.duplicatelocation());
      break;
   case SITE_INDUSTRY_POLLUTER:
      switch(LCSrandom(5))
      {
      case 0:
         loc.rename("Aluminum Factory", "Alum Fact");
         break;
      case 1:
         loc.rename("Plastic Factory", "Plast Fact");
         break;
      case 2:
         loc.rename("Oil Refinery", "Refinery");
         break;
      case 3:
         loc.rename("Auto Plant", "Auto Plant");
         break;
      case 4:
         loc.rename("Chemical Factory", "Chem Fact");
         break;
      }
      break;
   case SITE_MEDIA_CABLENEWS:
      loc.rename("Cable News Station", "News Station");
      break;
   case SITE_MEDIA_AMRADIO:
      loc.rename("AM Radio Station", "Radio Station");
      break;
   case SITE_RESIDENTIAL_APARTMENT_UPSCALE:
   case SITE_RESIDENTIAL_APARTMENT:
      do {
         lastname(str);
         strcpy(loc.name,str);
         strcat(loc.name," Apartments");
         strcpy(loc.shortname,str);
         strcat(loc.shortname," Apts");
      } while (loc.duplicatelocation());
      break;
   case SITE_RESIDENTIAL_TENEMENT:
      do {
         char str[50] = "";
         do {
            lastname(str);
         } while(strlen(str)>7);
         strcpy(loc.name,str);
         strcat(loc.name," St. ");
         strcat (loc.name, "Housing Projects");
         strcpy (loc.shortname, "Projects");
      } while (loc.duplicatelocation());
      break;
   case SITE_HOSPITAL_UNIVERSITY:
      loc.rename("The University Hospital", "U Hospital");
      break;
   case SITE_HOSPITAL_CLINIC:
      loc.rename("The Free CLINIC", "CLINIC");
      break;
   case SITE_LABORATORY_GENETIC:
      lastname(str);
      strcpy(loc.name,str);
      strcat(loc.name," Genetics");
      strcpy(loc.shortname,"Genetics Lab");
      break;
   case SITE_LABORATORY_COSMETICS:
      lastname(str);
      strcpy(loc.name,str);
      strcat(loc.name," Cosmetics");
      strcpy(loc.shortname,"Cosmetics Lab");
      break;
   case SITE_BUSINESS_CARDEALERSHIP:
      firstname(str,GENDER_WHITEMALEPATRIARCH);
      strcpy(loc.name,str);
      strcat(loc.name," ");
      lastname(str);
      strcat(loc.name,str);
      strcat(loc.name,"'s Used Cars");
      strcpy(loc.shortname,"Dealership");
      break;
   case SITE_BUSINESS_DEPTSTORE:
      lastname(str);
      strcpy(loc.name,str);
      strcat(loc.name,"'s Department Store");
      strcpy(loc.shortname,"Dept. Store");
      break;
   case SITE_BUSINESS_HALLOWEEN:
      lastname(str);
      loc.rename("The Oubliette", "Oubliette");
      break;
   case SITE_INDUSTRY_SWEATSHOP:
      lastname(str);
      strcpy(loc.name,str);
      strcat(loc.name," Garment Makers");
      strcpy(loc.shortname,"Sweatshop");
      break;
   case SITE_BUSINESS_CRACKHOUSE:
   do {
      char str[50];
      lastname(str);
      strcpy(loc.name,str);
      strcat(loc.name," St. ");

      if (law[LAW_DRUGS]==2)
      {
         switch (LCSrandom (4))
         {
         case 0:
            strcat (loc.name, "Recreational Drugs Center");
            strcpy (loc.shortname, "Drugs Center");
            break;
         case 1:
            strcat (loc.name, "Coffee House");
            strcpy (loc.shortname, "Coffee House");
            break;
         case 2:
            strcat (loc.name, "Cannabis Lounge");
            strcpy (loc.shortname, "Cannabis Lounge");
            break;
         case 3:
            strcat (loc.name, "Marijuana Dispensary");
            strcpy (loc.shortname, "Dispensary");
            break;
         }
      }
      else
      {
         strcat (loc.name, "Crack House");
         strcpy (loc.shortname, "Crack House");
      }
   } while (loc.duplicatelocation());
   break;

   case SITE_BUSINESS_JUICEBAR:
      strcpy(loc.name,"");
      switch(LCSrandom(5))
      {
         case 0:strcat(loc.name,"Natural");break;
         case 1:strcat(loc.name,"Harmonious");break;
         case 2:strcat(loc.name,"Restful");break;
         case 3:strcat(loc.name,"Healthy");break;
         case 4:strcat(loc.name,"New You");break;
      }
      strcat(loc.name," ");
      switch(LCSrandom(5))
      {
         case 0:strcat(loc.name,"Diet");break;
         case 1:strcat(loc.name,"Methods");break;
         case 2:strcat(loc.name,"Plan");break;
         case 3:strcat(loc.name,"Orange");break;
         case 4:strcat(loc.name,"Carrot");break;
      }
      strcat(loc.name," Juice Bar");
      strcpy(loc.shortname,"Juice Bar");
      break;
   case SITE_BUSINESS_VEGANCOOP:
      strcpy(loc.name,"");
      switch(LCSrandom(5))
      {
         case 0:strcat(loc.name,"Asparagus");break;
         case 1:strcat(loc.name,"Tofu");break;
         case 2:strcat(loc.name,"Broccoli");break;
         case 3:strcat(loc.name,"Radish");break;
         case 4:strcat(loc.name,"Eggplant");break;
      }
      strcat(loc.name," ");
      switch(LCSrandom(5))
      {
         case 0:strcat(loc.name,"Forest");break;
         case 1:strcat(loc.name,"Rainbow");break;
         case 2:strcat(loc.name,"Garden");break;
         case 3:strcat(loc.name,"Farm");break;
         case 4:strcat(loc.name,"Meadow");break;
      }
      strcat(loc.name," Vegan Co-op");
      strcpy(loc.shortname,"Vegan Co-op");
      break;
   case SITE_BUSINESS_INTERNETCAFE:
      strcpy(loc.name,"");
      switch(LCSrandom(5))
      {
         case 0:strcat(loc.name,"Electric");break;
         case 1:strcat(loc.name,"Wired");break;
         case 2:strcat(loc.name,"Nano");break;
         case 3:strcat(loc.name,"Micro");break;
         case 4:strcat(loc.name,"Techno");break;
      }
      strcat(loc.name," ");
      switch(LCSrandom(5))
      {
         case 0:strcat(loc.name,"Panda");break;
         case 1:strcat(loc.name,"Troll");break;
         case 2:strcat(loc.name,"Latte");break;
         case 3:strcat(loc.name,"Unicorn");break;
         case 4:strcat(loc.name,"Pixie");break;
      }
      strcat(loc.name," Internet Cafe");
      strcpy(loc.shortname,"Net Cafe");
      break;
   case SITE_BUSINESS_CIGARBAR:
      lastname(str);
      strcpy(loc.name,"The ");
      strcat(loc.name,str);
      strcat(loc.name," Gentlemen's Club");
      strcpy(loc.shortname,"Cigar Bar");
      break;
   case SITE_BUSINESS_LATTESTAND:
      strcpy(loc.name,"");
      switch(LCSrandom(5))
      {
         case 0:strcat(loc.name,"Frothy");break;
         case 1:strcat(loc.name,"Milky");break;
         case 2:strcat(loc.name,"Caffeine");break;
         case 3:strcat(loc.name,"Morning");break;
         case 4:strcat(loc.name,"Evening");break;
      }
      strcat(loc.name," ");
      switch(LCSrandom(5))
      {
         case 0:strcat(loc.name,"Mug");break;
         case 1:strcat(loc.name,"Cup");break;
         case 2:strcat(loc.name,"Jolt");break;
         case 3:strcat(loc.name,"Wonder");break;
         case 4:strcat(loc.name,"Express");break;
      }
      strcat(loc.name," Latte Stand");
      strcpy(loc.shortname,"Latte Stand");
      break;
   case SITE_OUTDOOR_PUBLICPARK:
      lastname(loc.name);
      strcat(loc.name," Park");
      strcpy(loc.shortname,"Park");
      break;
   case SITE_RESIDENTIAL_BOMBSHELTER:
      loc.rename("Fallout Shelter", "Bomb Shelter");
      break;
   case SITE_BUSINESS_BARANDGRILL:
      loc.rename("Desert Eagle Bar & Grill", "Bar & Grill");
      break;
   case SITE_OUTDOOR_BUNKER:
      loc.rename("Robert E. Lee Bunker", "Bunker");
      break;
   case SITE_BUSINESS_ARMSDEALER:
      loc.rename("Black Market", "Black Market");
      break;
   }
}