Exemple #1
0
 public RoomType(string id, string name, string tooltip, string effect, RoomTypeCategory category, RoomConstraints.Constraint primary_constraint, RoomConstraints.Constraint[] additional_constraints, RoomDetails.Detail[] display_details, int priority = 0, RoomType[] upgrade_paths = null, bool single_assignee = false, bool priority_building_use = false, string[] effects = null, int sortKey = 0)
     : base(id, name)
 {
     this.tooltip                = tooltip;
     this.effect                 = effect;
     this.category               = category;
     this.primary_constraint     = primary_constraint;
     this.additional_constraints = additional_constraints;
     this.display_details        = display_details;
     this.priority               = priority;
     this.upgrade_paths          = upgrade_paths;
     this.single_assignee        = single_assignee;
     this.priority_building_use  = priority_building_use;
     this.effects                = effects;
     this.sortKey                = sortKey;
     if (this.upgrade_paths != null)
     {
         RoomType[] upgrade_paths2 = this.upgrade_paths;
         foreach (RoomType roomType in upgrade_paths2)
         {
             Debug.Assert(roomType != null, name + " has a null upgrade path. Maybe it wasn't initialized yet.");
         }
     }
 }
Exemple #2
0
        public RoomTypes(ResourceSet parent)
            : base("RoomTypes", parent)
        {
            Initialize();
            Neutral = Add(new RoomType("Neutral", ROOMS.TYPES.NEUTRAL.NAME, ROOMS.TYPES.NEUTRAL.TOOLTIP, ROOMS.TYPES.NEUTRAL.EFFECT, Db.Get().RoomTypeCategories.None, null, null, new RoomDetails.Detail[4]
            {
                RoomDetails.SIZE,
                RoomDetails.BUILDING_COUNT,
                RoomDetails.CREATURE_COUNT,
                RoomDetails.PLANT_COUNT
            }, 0, null, false, false, null, 0));
            string           id       = "PlumbedBathroom";
            string           name     = ROOMS.TYPES.PLUMBEDBATHROOM.NAME;
            string           tooltip  = ROOMS.TYPES.PLUMBEDBATHROOM.TOOLTIP;
            string           effect   = ROOMS.TYPES.PLUMBEDBATHROOM.EFFECT;
            RoomTypeCategory bathroom = Db.Get().RoomTypeCategories.Bathroom;

            RoomConstraints.Constraint   fLUSH_TOILET           = RoomConstraints.FLUSH_TOILET;
            RoomConstraints.Constraint[] additional_constraints = new RoomConstraints.Constraint[5]
            {
                RoomConstraints.ADVANCED_WASH_STATION,
                RoomConstraints.NO_OUTHOUSES,
                RoomConstraints.NO_INDUSTRIAL_MACHINERY,
                RoomConstraints.MINIMUM_SIZE_12,
                RoomConstraints.MAXIMUM_SIZE_64
            };
            RoomDetails.Detail[] display_details = new RoomDetails.Detail[2]
            {
                RoomDetails.SIZE,
                RoomDetails.BUILDING_COUNT
            };
            int priority = 1;

            string[] effects = new string[1]
            {
                "RoomBathroom"
            };
            PlumbedBathroom = Add(new RoomType(id, name, tooltip, effect, bathroom, fLUSH_TOILET, additional_constraints, display_details, priority, null, false, false, effects, 2));
            effect          = "Latrine";
            tooltip         = ROOMS.TYPES.LATRINE.NAME;
            name            = ROOMS.TYPES.LATRINE.TOOLTIP;
            id                     = ROOMS.TYPES.LATRINE.EFFECT;
            bathroom               = Db.Get().RoomTypeCategories.Bathroom;
            fLUSH_TOILET           = RoomConstraints.TOILET;
            additional_constraints = new RoomConstraints.Constraint[4]
            {
                RoomConstraints.WASH_STATION,
                RoomConstraints.NO_INDUSTRIAL_MACHINERY,
                RoomConstraints.MINIMUM_SIZE_12,
                RoomConstraints.MAXIMUM_SIZE_64
            };
            display_details = new RoomDetails.Detail[2]
            {
                RoomDetails.SIZE,
                RoomDetails.BUILDING_COUNT
            };
            priority = 1;
            RoomType[] upgrade_paths = new RoomType[1]
            {
                PlumbedBathroom
            };
            effects = new string[1]
            {
                "RoomLatrine"
            };
            Latrine                = Add(new RoomType(effect, tooltip, name, id, bathroom, fLUSH_TOILET, additional_constraints, display_details, priority, upgrade_paths, false, false, effects, 1));
            id                     = "Bedroom";
            name                   = ROOMS.TYPES.BEDROOM.NAME;
            tooltip                = ROOMS.TYPES.BEDROOM.TOOLTIP;
            effect                 = ROOMS.TYPES.BEDROOM.EFFECT;
            bathroom               = Db.Get().RoomTypeCategories.Sleep;
            fLUSH_TOILET           = RoomConstraints.LUXURY_BED_SINGLE;
            additional_constraints = new RoomConstraints.Constraint[6]
            {
                RoomConstraints.NO_COTS,
                RoomConstraints.NO_INDUSTRIAL_MACHINERY,
                RoomConstraints.MINIMUM_SIZE_12,
                RoomConstraints.MAXIMUM_SIZE_64,
                RoomConstraints.DECORATIVE_ITEM,
                RoomConstraints.CEILING_HEIGHT_4
            };
            display_details = new RoomDetails.Detail[2]
            {
                RoomDetails.SIZE,
                RoomDetails.BUILDING_COUNT
            };
            priority = 1;
            effects  = new string[1]
            {
                "RoomBedroom"
            };
            Bedroom                = Add(new RoomType(id, name, tooltip, effect, bathroom, fLUSH_TOILET, additional_constraints, display_details, priority, null, false, false, effects, 4));
            effect                 = "Barracks";
            tooltip                = ROOMS.TYPES.BARRACKS.NAME;
            name                   = ROOMS.TYPES.BARRACKS.TOOLTIP;
            id                     = ROOMS.TYPES.BARRACKS.EFFECT;
            bathroom               = Db.Get().RoomTypeCategories.Sleep;
            fLUSH_TOILET           = RoomConstraints.BED_SINGLE;
            additional_constraints = new RoomConstraints.Constraint[3]
            {
                RoomConstraints.NO_INDUSTRIAL_MACHINERY,
                RoomConstraints.MINIMUM_SIZE_12,
                RoomConstraints.MAXIMUM_SIZE_64
            };
            display_details = new RoomDetails.Detail[2]
            {
                RoomDetails.SIZE,
                RoomDetails.BUILDING_COUNT
            };
            priority      = 1;
            upgrade_paths = new RoomType[1]
            {
                Bedroom
            };
            effects = new string[1]
            {
                "RoomBarracks"
            };
            Barracks               = Add(new RoomType(effect, tooltip, name, id, bathroom, fLUSH_TOILET, additional_constraints, display_details, priority, upgrade_paths, false, false, effects, 3));
            id                     = "GreatHall";
            name                   = ROOMS.TYPES.GREATHALL.NAME;
            tooltip                = ROOMS.TYPES.GREATHALL.TOOLTIP;
            effect                 = ROOMS.TYPES.GREATHALL.EFFECT;
            bathroom               = Db.Get().RoomTypeCategories.Food;
            fLUSH_TOILET           = RoomConstraints.MESS_STATION_SINGLE;
            additional_constraints = new RoomConstraints.Constraint[5]
            {
                RoomConstraints.NO_INDUSTRIAL_MACHINERY,
                RoomConstraints.MINIMUM_SIZE_32,
                RoomConstraints.MAXIMUM_SIZE_120,
                RoomConstraints.DECORATIVE_ITEM_20,
                RoomConstraints.REC_BUILDING
            };
            display_details = new RoomDetails.Detail[2]
            {
                RoomDetails.SIZE,
                RoomDetails.BUILDING_COUNT
            };
            priority = 1;
            effects  = new string[1]
            {
                "RoomGreatHall"
            };
            GreatHall              = Add(new RoomType(id, name, tooltip, effect, bathroom, fLUSH_TOILET, additional_constraints, display_details, priority, null, false, false, effects, 6));
            effect                 = "MessHall";
            tooltip                = ROOMS.TYPES.MESSHALL.NAME;
            name                   = ROOMS.TYPES.MESSHALL.TOOLTIP;
            id                     = ROOMS.TYPES.MESSHALL.EFFECT;
            bathroom               = Db.Get().RoomTypeCategories.Food;
            fLUSH_TOILET           = RoomConstraints.MESS_STATION_SINGLE;
            additional_constraints = new RoomConstraints.Constraint[3]
            {
                RoomConstraints.NO_INDUSTRIAL_MACHINERY,
                RoomConstraints.MINIMUM_SIZE_12,
                RoomConstraints.MAXIMUM_SIZE_64
            };
            display_details = new RoomDetails.Detail[2]
            {
                RoomDetails.SIZE,
                RoomDetails.BUILDING_COUNT
            };
            priority      = 1;
            upgrade_paths = new RoomType[1]
            {
                GreatHall
            };
            effects = new string[1]
            {
                "RoomMessHall"
            };
            MessHall      = Add(new RoomType(effect, tooltip, name, id, bathroom, fLUSH_TOILET, additional_constraints, display_details, priority, upgrade_paths, false, false, effects, 5));
            MassageClinic = Add(new RoomType("MassageClinic", ROOMS.TYPES.MASSAGE_CLINIC.NAME, ROOMS.TYPES.MASSAGE_CLINIC.TOOLTIP, ROOMS.TYPES.MASSAGE_CLINIC.EFFECT, Db.Get().RoomTypeCategories.Hospital, RoomConstraints.MASSAGE_TABLE, new RoomConstraints.Constraint[4]
            {
                RoomConstraints.NO_INDUSTRIAL_MACHINERY,
                RoomConstraints.DECORATIVE_ITEM,
                RoomConstraints.MINIMUM_SIZE_12,
                RoomConstraints.MAXIMUM_SIZE_64
            }, new RoomDetails.Detail[2]
            {
                RoomDetails.SIZE,
                RoomDetails.BUILDING_COUNT
            }, 2, null, true, true, null, 7));
            Hospital = Add(new RoomType("Hospital", ROOMS.TYPES.HOSPITAL.NAME, ROOMS.TYPES.HOSPITAL.TOOLTIP, ROOMS.TYPES.HOSPITAL.EFFECT, Db.Get().RoomTypeCategories.Hospital, RoomConstraints.CLINIC, new RoomConstraints.Constraint[5]
            {
                RoomConstraints.TOILET,
                RoomConstraints.MESS_STATION_SINGLE,
                RoomConstraints.NO_INDUSTRIAL_MACHINERY,
                RoomConstraints.MINIMUM_SIZE_12,
                RoomConstraints.MAXIMUM_SIZE_96
            }, new RoomDetails.Detail[2]
            {
                RoomDetails.SIZE,
                RoomDetails.BUILDING_COUNT
            }, 2, null, true, true, null, 8));
            PowerPlant = Add(new RoomType("PowerPlant", ROOMS.TYPES.POWER_PLANT.NAME, ROOMS.TYPES.POWER_PLANT.TOOLTIP, ROOMS.TYPES.POWER_PLANT.EFFECT, Db.Get().RoomTypeCategories.Industrial, RoomConstraints.POWER_STATION, new RoomConstraints.Constraint[2]
            {
                RoomConstraints.MINIMUM_SIZE_12,
                RoomConstraints.MAXIMUM_SIZE_96
            }, new RoomDetails.Detail[2]
            {
                RoomDetails.SIZE,
                RoomDetails.BUILDING_COUNT
            }, 2, null, true, true, null, 9));
            Farm = Add(new RoomType("Farm", ROOMS.TYPES.FARM.NAME, ROOMS.TYPES.FARM.TOOLTIP, ROOMS.TYPES.FARM.EFFECT, Db.Get().RoomTypeCategories.Agricultural, RoomConstraints.FARM_STATION, new RoomConstraints.Constraint[2]
            {
                RoomConstraints.MINIMUM_SIZE_12,
                RoomConstraints.MAXIMUM_SIZE_96
            }, new RoomDetails.Detail[2]
            {
                RoomDetails.SIZE,
                RoomDetails.BUILDING_COUNT
            }, 2, null, true, true, null, 10));
            CreaturePen = Add(new RoomType("CreaturePen", ROOMS.TYPES.CREATUREPEN.NAME, ROOMS.TYPES.CREATUREPEN.TOOLTIP, ROOMS.TYPES.CREATUREPEN.EFFECT, Db.Get().RoomTypeCategories.Agricultural, RoomConstraints.RANCH_STATION, new RoomConstraints.Constraint[2]
            {
                RoomConstraints.MINIMUM_SIZE_12,
                RoomConstraints.MAXIMUM_SIZE_96
            }, new RoomDetails.Detail[3]
            {
                RoomDetails.SIZE,
                RoomDetails.BUILDING_COUNT,
                RoomDetails.CREATURE_COUNT
            }, 2, null, true, true, null, 11));
            MachineShop = new RoomType("MachineShop", ROOMS.TYPES.MACHINE_SHOP.NAME, ROOMS.TYPES.MACHINE_SHOP.TOOLTIP, ROOMS.TYPES.MACHINE_SHOP.EFFECT, Db.Get().RoomTypeCategories.Industrial, RoomConstraints.MACHINE_SHOP, new RoomConstraints.Constraint[2]
            {
                RoomConstraints.MINIMUM_SIZE_12,
                RoomConstraints.MAXIMUM_SIZE_96
            }, new RoomDetails.Detail[2]
            {
                RoomDetails.SIZE,
                RoomDetails.BUILDING_COUNT
            }, 2, null, true, true, null, 12);
            RecRoom = Add(new RoomType("RecRoom", ROOMS.TYPES.REC_ROOM.NAME, ROOMS.TYPES.REC_ROOM.TOOLTIP, ROOMS.TYPES.REC_ROOM.EFFECT, Db.Get().RoomTypeCategories.Recreation, RoomConstraints.REC_BUILDING, new RoomConstraints.Constraint[4]
            {
                RoomConstraints.NO_INDUSTRIAL_MACHINERY,
                RoomConstraints.DECORATIVE_ITEM,
                RoomConstraints.MINIMUM_SIZE_12,
                RoomConstraints.MAXIMUM_SIZE_64
            }, new RoomDetails.Detail[2]
            {
                RoomDetails.SIZE,
                RoomDetails.BUILDING_COUNT
            }, 0, null, true, true, null, 13));
            id                     = "NatureReserve";
            name                   = ROOMS.TYPES.NATURERESERVE.NAME;
            tooltip                = ROOMS.TYPES.NATURERESERVE.TOOLTIP;
            effect                 = ROOMS.TYPES.NATURERESERVE.EFFECT;
            bathroom               = Db.Get().RoomTypeCategories.Park;
            fLUSH_TOILET           = RoomConstraints.PARK_BUILDING;
            additional_constraints = new RoomConstraints.Constraint[4]
            {
                RoomConstraints.WILDPLANTS,
                RoomConstraints.NO_INDUSTRIAL_MACHINERY,
                RoomConstraints.MINIMUM_SIZE_32,
                RoomConstraints.MAXIMUM_SIZE_120
            };
            display_details = new RoomDetails.Detail[4]
            {
                RoomDetails.SIZE,
                RoomDetails.BUILDING_COUNT,
                RoomDetails.CREATURE_COUNT,
                RoomDetails.PLANT_COUNT
            };
            priority = 1;
            effects  = new string[1]
            {
                "RoomNatureReserve"
            };
            NatureReserve          = Add(new RoomType(id, name, tooltip, effect, bathroom, fLUSH_TOILET, additional_constraints, display_details, priority, null, false, false, effects, 15));
            effect                 = "Park";
            tooltip                = ROOMS.TYPES.PARK.NAME;
            name                   = ROOMS.TYPES.PARK.TOOLTIP;
            id                     = ROOMS.TYPES.PARK.EFFECT;
            bathroom               = Db.Get().RoomTypeCategories.Park;
            fLUSH_TOILET           = RoomConstraints.PARK_BUILDING;
            additional_constraints = new RoomConstraints.Constraint[4]
            {
                RoomConstraints.WILDPLANT,
                RoomConstraints.NO_INDUSTRIAL_MACHINERY,
                RoomConstraints.MINIMUM_SIZE_12,
                RoomConstraints.MAXIMUM_SIZE_64
            };
            display_details = new RoomDetails.Detail[4]
            {
                RoomDetails.SIZE,
                RoomDetails.BUILDING_COUNT,
                RoomDetails.CREATURE_COUNT,
                RoomDetails.PLANT_COUNT
            };
            priority      = 1;
            upgrade_paths = new RoomType[1]
            {
                NatureReserve
            };
            effects = new string[1]
            {
                "RoomPark"
            };
            Park = Add(new RoomType(effect, tooltip, name, id, bathroom, fLUSH_TOILET, additional_constraints, display_details, priority, upgrade_paths, false, false, effects, 14));
        }