public PlanetaryMarket(Planet_Inhabitable planet) : base(planet, 1.5f)
    {
        name         = "Planetary Market";
        buildingType = BuildingType.PlanetaryMarket;

        InitiallizePOPWorkingList(5);

        workingPOPSlotList[0].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1f), null));
        workingPOPSlotList[0].yields.Add(new JobYield((GlobalResourceType.Money, 3f), null));
        workingPOPSlotList[0].job = Job.Clerk;

        workingPOPSlotList[1].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1f), null));
        workingPOPSlotList[1].yields.Add(new JobYield((GlobalResourceType.Money, 3f), null));
        workingPOPSlotList[1].job = Job.Clerk;

        workingPOPSlotList[2].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1f), null));
        workingPOPSlotList[2].yields.Add(new JobYield((GlobalResourceType.Money, 3f), null));
        workingPOPSlotList[2].job = Job.Clerk;

        workingPOPSlotList[3].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1f), null));
        workingPOPSlotList[3].yields.Add(new JobYield((GlobalResourceType.Money, 3f), null));
        workingPOPSlotList[3].job = Job.Clerk;

        workingPOPSlotList[4].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1f), null));
        workingPOPSlotList[4].yields.Add(new JobYield((GlobalResourceType.Money, 3f), null));
        workingPOPSlotList[4].job = Job.Clerk;
    }
Example #2
0
    public ColonizationCenter(Planet_Inhabitable planet) : base(planet, 1f)
    {
        name = "Colonization Center";

        buildingType = BuildingType.ColonizationCenter;
        InitiallizePOPWorkingList(6);

        workingPOPSlotList[0].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 0.5f), null));
        workingPOPSlotList[0].yields.Add(new JobYield((GlobalResourceType.Electricity, 1.5f), null));
        workingPOPSlotList[0].job = Job.Technician;

        workingPOPSlotList[1].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 0.5f), null));
        workingPOPSlotList[1].yields.Add(new JobYield((GlobalResourceType.Mineral, 6f), null));
        workingPOPSlotList[1].job = Job.Miner;

        workingPOPSlotList[2].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 0.5f), null));
        workingPOPSlotList[2].yields.Add(new JobYield((GlobalResourceType.Food, 6f), null));
        workingPOPSlotList[2].job = Job.Farmer;

        workingPOPSlotList[3].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1f), null));
        workingPOPSlotList[3].yields.Add(new JobYield((GlobalResourceType.Money, 3f), null));
        workingPOPSlotList[3].job = Job.Clerk;

        workingPOPSlotList[4].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1f), null));
        workingPOPSlotList[4].yields.Add(new JobYield((GlobalResourceType.Money, 3f), null));
        workingPOPSlotList[4].job = Job.Clerk;

        workingPOPSlotList[5].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1f), null));
        workingPOPSlotList[5].job = Job.Enforcer;
    }
Example #3
0
    public ControlTower(Planet_Inhabitable planet) : base(planet, 0.5f)
    {
        name         = "Control Tower";
        buildingType = BuildingType.ControlTower;
        InitiallizePOPWorkingList(1);

        workingPOPSlotList[0].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 2), null));
        workingPOPSlotList[0].job = Job.Admiral;
    }
Example #4
0
    public POP(string name, Planet_Inhabitable planet)
    {
        System.Random r = new System.Random();
        this.name = name;
        int aptitude = r.Next() % 12 + 1;

        this.aptitude = (Job)aptitude; // Sets aptitude.
        this.planet   = planet;
    }
Example #5
0
    public PoliceStation(Planet_Inhabitable planet) : base(planet, 1)
    {
        name         = "Police Station";
        buildingType = BuildingType.PoliceStation;

        InitiallizePOPWorkingList(2);

        workingPOPSlotList[0].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1f), null));
        workingPOPSlotList[0].job = Job.Enforcer;

        workingPOPSlotList[1].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1f), null));
        workingPOPSlotList[1].job = Job.Enforcer;
    }
Example #6
0
    public GovernmentHall(Planet_Inhabitable planet) : base(planet, 1)
    {
        name         = "Government Hall";
        buildingType = BuildingType.GovernmentHall;

        InitiallizePOPWorkingList(2);

        workingPOPSlotList[0].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1.5f), null));
        workingPOPSlotList[0].job = Job.Administrator;

        workingPOPSlotList[1].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1.5f), null));
        workingPOPSlotList[1].job = Job.Administrator;
    }
    public MineralDistrict(Planet_Inhabitable planet) : base(planet)
    {
        name = "Mineral District";

        districtType = DistrictType.Mineral;
        InitiallizePOPWorkingList(2);

        workingPOPSlotList[0].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 0.5f), null));
        workingPOPSlotList[0].yields.Add(new JobYield((GlobalResourceType.Mineral, 6f), null));
        workingPOPSlotList[0].job = Job.Miner;

        workingPOPSlotList[1].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 0.5f), null));
        workingPOPSlotList[1].yields.Add(new JobYield((GlobalResourceType.Mineral, 6f), null));
        workingPOPSlotList[1].job = Job.Miner;
    }
Example #8
0
    public CommandCenter(Planet_Inhabitable planet) : base(planet, 1)
    {
        name         = "Fleet Training Center";
        buildingType = BuildingType.FleetTrainingCenter;
        InitiallizePOPWorkingList(3);

        workingPOPSlotList[0].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1), null));
        workingPOPSlotList[0].job = Job.Soldier;

        workingPOPSlotList[1].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1), null));
        workingPOPSlotList[1].job = Job.Soldier;

        workingPOPSlotList[2].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1), null));
        workingPOPSlotList[2].job = Job.Soldier;
    }
    public ElectricityDistrict(Planet_Inhabitable planet) : base(planet)
    {
        name = "Electricity District";

        districtType = DistrictType.Electricity;
        InitiallizePOPWorkingList(2);

        workingPOPSlotList[0].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 0.5f), null));
        workingPOPSlotList[0].yields.Add(new JobYield((GlobalResourceType.Electricity, 1.5f), null));
        workingPOPSlotList[0].job = Job.Technician;

        workingPOPSlotList[1].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 0.5f), null));
        workingPOPSlotList[1].yields.Add(new JobYield((GlobalResourceType.Electricity, 1.5f), null));
        workingPOPSlotList[1].job = Job.Technician;

    }    
    public BioPlant(Planet_Inhabitable planet) : base(planet, 1)
    {
        name         = "Mineral Extractor";
        buildingType = BuildingType.BioPlant;

        InitiallizePOPWorkingList(2);

        workingPOPSlotList[0].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 0.5f), null));
        workingPOPSlotList[0].upkeeps.Add(new JobUpkeep((GlobalResourceType.Food, 5), null));
        workingPOPSlotList[0].yields.Add(new JobYield((GlobalResourceType.Electricity, 1), null));
        workingPOPSlotList[0].job = Job.Farmer;

        workingPOPSlotList[1].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 0.5f), null));
        workingPOPSlotList[1].upkeeps.Add(new JobUpkeep((GlobalResourceType.Food, 5), null));
        workingPOPSlotList[1].yields.Add(new JobYield((GlobalResourceType.Electricity, 1), null));
        workingPOPSlotList[1].job = Job.Farmer;
    }
Example #11
0
    public HouseOfWisdom(Planet_Inhabitable planet) : base(planet, 1)
    {
        name         = "House of Wisdom";
        buildingType = BuildingType.HouseOfWisdom;

        InitiallizePOPWorkingList(3);

        workingPOPSlotList[0].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1.5f), null));
        workingPOPSlotList[0].yields.Add(new JobYield((GlobalResourceType.Physics, 4f), null));
        workingPOPSlotList[0].job = Job.Physicist;

        workingPOPSlotList[1].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1.5f), null));
        workingPOPSlotList[1].yields.Add(new JobYield((GlobalResourceType.Sociology, 4f), null));
        workingPOPSlotList[1].job = Job.Sociologist;

        workingPOPSlotList[2].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1.5f), null));
        workingPOPSlotList[2].yields.Add(new JobYield((GlobalResourceType.Engineering, 4f), null));
        workingPOPSlotList[2].job = Job.Engineer;
    }
    public District GetDistrict(DistrictType type, Planet_Inhabitable planet)
    {
        switch (type)
        {
        case DistrictType.Electricity:
            return(new ElectricityDistrict(planet));

        case DistrictType.Mineral:
            return(new MineralDistrict(planet));

        case DistrictType.Food:
            return(new FoodDistrict(planet));

        case DistrictType.House:
            return(new HouseDistrict(planet));

        default:
            throw new NotImplementedException("Wait");
        }
    }
    public Building GetBuilding(BuildingType type, Planet_Inhabitable planet)
    {
        switch (type)
        {
        case BuildingType.ColonizationCenter:
            return(new ColonizationCenter(planet));

        case BuildingType.AlloySmelter:
            return(new AlloySmelter(planet));

        case BuildingType.HouseOfWisdom:
            return(new HouseOfWisdom(planet));

        case BuildingType.PlanetaryMarket:
            return(new PlanetaryMarket(planet));

        case BuildingType.GovernmentHall:
            return(new GovernmentHall(planet));

        case BuildingType.PoliceStation:
            return(new PoliceStation(planet));

        case BuildingType.ControlTower:
            return(new ControlTower(planet));

        case BuildingType.FleetTrainingCenter:
            return(new FleetTrainingCenter(planet));

        case BuildingType.CommandCenter:
            return(new CommandCenter(planet));

        case BuildingType.MineralExtractor:
            return(new MineralExtractor(planet));

        case BuildingType.BioPlant:
            return(new BioPlant(planet));

        default:
            throw new NotImplementedException("Wait");
        }
    }
Example #14
0
    public AlloySmelter(Planet_Inhabitable planet) : base(planet, 1)
    {
        name         = "Alloy Smelter";
        buildingType = BuildingType.AlloySmelter;
        InitiallizePOPWorkingList(3);

        workingPOPSlotList[0].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1f), null));
        workingPOPSlotList[0].upkeeps.Add(new JobUpkeep((GlobalResourceType.Mineral, 4f), null));
        workingPOPSlotList[0].yields.Add(new JobYield((GlobalResourceType.Alloy, 2f), null));
        workingPOPSlotList[0].job = Job.Technician;

        workingPOPSlotList[1].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1f), null));
        workingPOPSlotList[1].upkeeps.Add(new JobUpkeep((GlobalResourceType.Mineral, 4f), null));
        workingPOPSlotList[1].yields.Add(new JobYield((GlobalResourceType.Alloy, 2f), null));
        workingPOPSlotList[1].job = Job.Technician;

        workingPOPSlotList[2].upkeeps.Add(new JobUpkeep((GlobalResourceType.Money, 1f), null));
        workingPOPSlotList[2].upkeeps.Add(new JobUpkeep((GlobalResourceType.Mineral, 4f), null));
        workingPOPSlotList[2].yields.Add(new JobYield((GlobalResourceType.Alloy, 2f), null));
        workingPOPSlotList[2].job = Job.Technician;
    }
Example #15
0
 public TurnResource(Planet_Inhabitable planet)
 {
     this.planet = planet;
 }
 public WorkingPlaceFactory(Planet_Inhabitable planet)
 {
     this.planet = planet;
 }
 protected POPWorkingPlace(WorkingPlaceType type, Planet_Inhabitable planet)
 {
     this.planet = planet;
     this.type   = type;
     OnConstructing();
 }
    public void PutElementOnQueue(Planet_Inhabitable planet)
    {
        Transform elem = Instantiate(elementPrefab, transform);

        elem.GetComponent <ConstructionQueueElementUI>().planet = planet;
    }
 public District(Planet_Inhabitable planet) : base(WorkingPlaceType.District, planet) // Every district's upkeep is 0.5 fuel.
 {
     baseUpkeep.resourceType = GlobalResourceType.Electricity;
     baseUpkeep.amount       = 0.5f;
 }
Example #20
0
 protected Building(Planet_Inhabitable planet, float fuelUpkeep) : base(WorkingPlaceType.Building, planet)
 {
     baseUpkeep.resourceType = GlobalResourceType.Electricity;
     baseUpkeep.amount       = fuelUpkeep;
 }
Example #21
0
 public HouseDistrict(Planet_Inhabitable planet) : base(planet)
 {
     districtType = DistrictType.House;
     InitiallizePOPWorkingList(0);
 }
 public Resource(Planet_Inhabitable planet)
 {
     this.planet  = planet;
     turnResource = new TurnResource(planet);
 }