Exemplo n.º 1
0
        protected override void PrepareConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            category = GetCategory <StructureCategoryStorage>();

            build.StagesCount          = 5;
            build.StageDurationSeconds = BuildDuration.Short;
            build.AddStageRequiredItem <ItemPlanks>(count: 4);
            build.AddStageRequiredItem <ItemIngotIron>(count: 1);

            repair.StagesCount          = 5;
            repair.StageDurationSeconds = BuildDuration.Short;
            repair.AddStageRequiredItem <ItemPlanks>(count: 2);
            repair.AddStageRequiredItem <ItemIngotIron>(count: 1);
        }
Exemplo n.º 2
0
        protected override void PrepareConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            category = GetCategory <StructureCategoryFood>();

            build.StagesCount          = 1;
            build.StageDurationSeconds = BuildDuration.Short;
            build.AddStageRequiredItem <ItemTwigs>(count: 10);
            build.AddStageRequiredItem <ItemStone>(count: 10);

            repair.StagesCount          = 5;
            repair.StageDurationSeconds = BuildDuration.Short;
            repair.AddStageRequiredItem <ItemTwigs>(count: 1);
            repair.AddStageRequiredItem <ItemStone>(count: 1);
        }
Exemplo n.º 3
0
        protected override void PrepareConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            category = GetCategory <StructureCategoryIndustry>();

            build.StagesCount          = 5;
            build.StageDurationSeconds = BuildDuration.Medium;
            build.AddStageRequiredItem <ItemIngotSteel>(count: 2);
            build.AddStageRequiredItem <ItemIngotGold>(count: 1);
            build.AddStageRequiredItem <ItemCement>(count: 2);

            repair.StagesCount          = 10;
            repair.StageDurationSeconds = BuildDuration.Medium;
            repair.AddStageRequiredItem <ItemIngotSteel>(count: 1);
        }
Exemplo n.º 4
0
        protected override void PrepareConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            category = GetCategory <StructureCategoryFood>();

            build.StagesCount          = 5;
            build.StageDurationSeconds = BuildDuration.Short;
            build.AddStageRequiredItem <ItemIngotSteel>(count: 2);
            build.AddStageRequiredItem <ItemWire>(count: 3);
            build.AddStageRequiredItem <ItemComponentsElectronic>(count: 1);

            repair.StagesCount          = 10;
            repair.StageDurationSeconds = BuildDuration.Short;
            repair.AddStageRequiredItem <ItemIngotSteel>(count: 1);
        }
Exemplo n.º 5
0
        protected override void PrepareConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            category = GetCategory <StructureCategoryOther>();

            build.StagesCount          = 1;
            build.StageDurationSeconds = BuildDuration.Instant;
            build.AddStageRequiredItem <ItemTwigs>(count: 20);
            build.AddStageRequiredItem <ItemFibers>(count: 50);

            repair.StagesCount          = 10;
            repair.StageDurationSeconds = BuildDuration.Short;
            repair.AddStageRequiredItem <ItemTwigs>(count: 2);
            repair.AddStageRequiredItem <ItemFibers>(count: 5);
        }
Exemplo n.º 6
0
        protected override void PrepareConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            tileRequirements.Add(LandClaimSystem.ValidatorIsOwnedLand);

            category = GetCategory <StructureCategoryOther>();

            build.StagesCount          = 5;
            build.StageDurationSeconds = BuildDuration.Short;
            build.AddStageRequiredItem <ItemIngotCopper>(count: 2);

            repair.StagesCount          = 5;
            repair.StageDurationSeconds = BuildDuration.Short;
            repair.AddStageRequiredItem <ItemIngotCopper>(count: 1);
        }
Exemplo n.º 7
0
        protected override void PrepareConstructionConfigWell(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            category = GetCategory <StructureCategoryIndustry>();

            build.StagesCount          = 5;
            build.StageDurationSeconds = BuildDuration.Medium;
            build.AddStageRequiredItem <ItemIngotSteel>(count: 2);
            build.AddStageRequiredItem <ItemHygroscopicGranules>(count: 10);
            build.AddStageRequiredItem <ItemComponentsElectronic>(count: 1);

            repair.StagesCount          = 5;
            repair.StageDurationSeconds = BuildDuration.Medium;
            repair.AddStageRequiredItem <ItemIngotSteel>(count: 1);
        }
Exemplo n.º 8
0
        protected override void PrepareConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            category = GetCategory <StructureCategoryBuildings>();

            build.StagesCount          = 10;
            build.StageDurationSeconds = BuildDuration.Short;
            build.AddStageRequiredItem <ItemIngotSteel>(count: 6);
            build.AddStageRequiredItem <ItemComponentsMechanical>(count: 1);
            build.AddStageRequiredItem <ItemCement>(count: 25);

            repair.StagesCount          = 10;
            repair.StageDurationSeconds = BuildDuration.Short;
            repair.AddStageRequiredItem <ItemIngotSteel>(count: 4);
        }
Exemplo n.º 9
0
        protected override void PrepareConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            category = GetCategory <StructureCategoryIndustry>();

            build.StagesCount          = 10;
            build.StageDurationSeconds = BuildDuration.Short;
            build.AddStageRequiredItem <ItemPlanks>(count: 10);
            build.AddStageRequiredItem <ItemIngotCopper>(count: 1);
            build.AddStageRequiredItem <ItemBottleWater>(count: 1);

            repair.StagesCount          = 5;
            repair.StageDurationSeconds = BuildDuration.Short;
            repair.AddStageRequiredItem <ItemPlanks>(count: 5);
            repair.AddStageRequiredItem <ItemIngotCopper>(count: 1);
        }
Exemplo n.º 10
0
        protected sealed override void PrepareDecorationConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair)
        {
            tileRequirements
            .Clear()
            .Add(ConstructionTileRequirements.BasicRequirements)
            .Add(ConstructionTileRequirements.ValidatorNoStaticObjectsExceptPlayersStructures)
            .Add(ConstructionTileRequirements.ValidatorNoFarmPlot)
            .Add(ValidatorNoFloorDecoration)
            .Add(ConstructionTileRequirements.ValidatorNotRestrictedArea)
            .Add(ConstructionTileRequirements.ValidatorNoNpcsAround)
            .Add(ConstructionTileRequirements.ValidatorNoPlayersNearby)
            .Add(LandClaimSystem.ValidatorIsOwnedOrFreeLand)
            .Add(LandClaimSystem.ValidatorNoRaid)
            .Add(LandClaimSystem.ValidatorNoShieldProtection);

            this.PrepareFloorDecorationConstructionConfig(build, repair);
        }
        protected override void PrepareConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            category = GetCategory <StructureCategoryLight>();

            build.StagesCount          = 10;
            build.StageDurationSeconds = BuildDuration.Short;
            build.AddStageRequiredItem <ItemIngotSteel>(count: 2);
            build.AddStageRequiredItem <ItemIngotCopper>(count: 2);
            build.AddStageRequiredItem <ItemGlassRaw>(count: 4);

            repair.StagesCount         = 10;
            build.StageDurationSeconds = BuildDuration.Short;
            repair.AddStageRequiredItem <ItemIngotSteel>(count: 1);
            repair.AddStageRequiredItem <ItemIngotCopper>(count: 1);
        }
Exemplo n.º 12
0
        protected override void PrepareConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            category = GetCategory <StructureCategoryElectricity>();

            build.StagesCount          = 10;
            build.StageDurationSeconds = BuildDuration.Short;
            build.AddStageRequiredItem <ItemWire>(count: 10);
            build.AddStageRequiredItem <ItemIngotIron>(count: 1);
            build.AddStageRequiredItem <ItemAcidSulfuric>(count: 1);

            repair.StagesCount          = 10;
            repair.StageDurationSeconds = BuildDuration.Short;
            repair.AddStageRequiredItem <ItemWire>(count: 5);
            repair.AddStageRequiredItem <ItemIngotIron>(count: 1);
        }
Exemplo n.º 13
0
        protected sealed override void PrepareFarmConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair)
        {
            tileRequirements
            .Clear()
            .Add(ConstructionTileRequirements.BasicRequirements)
            .Add(ErrorSoilNotSuitable, c => c.Tile.ProtoTile is IProtoTileFarmAllowed)
            .Add(ConstructionTileRequirements.ValidatorNoFarmPlot)
            .Add(ConstructionTileRequirements.ValidatorNoFloor)
            .Add(ConstructionTileRequirements.ValidatorNoStaticObjectsExceptFloor)
            .Add(ConstructionTileRequirements.ValidatorNoPhysicsBodyStatic)
            .Add(ConstructionTileRequirements.ValidatorNotRestrictedArea)
            .Add(ConstructionTileRequirements.ValidatorNoNpcsAround)
            .Add(LandClaimSystem.ValidatorIsOwnedOrFreeArea)
            .Add(LandClaimSystem.ValidatorNoRaid);

            this.PrepareFarmPlotConstructionConfig(tileRequirements, build, repair);
        }
Exemplo n.º 14
0
        protected override void PrepareConstructionConfigWell(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            category = GetCategory <StructureCategoryIndustry>();

            build.StagesCount          = 10;
            build.StageDurationSeconds = BuildDuration.Short;
            build.AddStageRequiredItem <ItemWire>(count: 4);
            build.AddStageRequiredItem <ItemIngotCopper>(count: 1);
            build.AddStageRequiredItem <ItemRubberVulcanized>(count: 1);

            repair.StagesCount          = 10;
            repair.StageDurationSeconds = BuildDuration.Short;
            repair.AddStageRequiredItem <ItemWire>(count: 2);
            repair.AddStageRequiredItem <ItemIngotCopper>(count: 1);
        }
Exemplo n.º 15
0
        protected override void PrepareConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            // TODO: set proper values here
            category = GetCategory <StructureCategoryOther>();

            build.StagesCount          = 10;
            build.StageDurationSeconds = BuildDuration.Short;
            build.AddStageRequiredItem <ItemIngotSteel>(count: 10);
            build.AddStageRequiredItem <ItemGlassRaw>(count: 20);
            build.AddStageRequiredItem <ItemComponentsElectronic>(count: 1);

            repair.StagesCount          = 10;
            repair.StageDurationSeconds = BuildDuration.Short;
            repair.AddStageRequiredItem <ItemIngotSteel>(count: 4);
        }
Exemplo n.º 16
0
        protected override void PrepareConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            tileRequirements.Clear()
            .Add(ConstructionTileRequirements.DefaultForPlayerStructuresOwnedOrFreeLand);

            category = GetCategory <StructureCategoryIndustry>();

            build.StagesCount          = 5;
            build.StageDurationSeconds = BuildDuration.Short;
            build.AddStageRequiredItem <ItemPlanks>(count: 5);

            repair.StagesCount          = 10;
            repair.StageDurationSeconds = BuildDuration.Short;
            repair.AddStageRequiredItem <ItemPlanks>(count: 1);
        }
Exemplo n.º 17
0
        protected override void PrepareConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            category = GetCategory <StructureCategoryOther>();
            this.PrepareLaunchpadConstructionConfig(build, repair, upgrade);
            if (upgrade.Entries.Count > 1 ||
                (upgrade.Entries.Count == 1 &&
                 upgrade.Entries[0].RequiredItems.Count > 0))
            {
                throw new Exception("There must be max 1 upgrade entry and there must be no required items");
            }

            var tasksList = new LaunchpadTasksList();

            this.PrepareLaunchpadTasks(tasksList);
            this.TasksList = tasksList.AsReadOnly();
        }
Exemplo n.º 18
0
        protected sealed override void PrepareTileRequirements(ConstructionTileRequirements tileRequirements)
        {
            var configBuild   = new ConstructionStageConfig();
            var configRepair  = new ConstructionStageConfig();
            var configUpgrade = new ConstructionUpgradeConfig();

            tileRequirements.Add(ConstructionTileRequirements.ValidatorNotRestrictedArea)
            .Add(ConstructionTileRequirements.ValidatorNoNpcsAround)
            .Add(LandClaimSystem.ValidatorIsOwnedOrFreeArea)
            .Add(LandClaimSystem.ValidatorNoRaid);

            this.PrepareConstructionConfig(
                tileRequirements,
                configBuild,
                configRepair,
                configUpgrade,
                out var category);

            this.Category = category
                            ?? throw new Exception(
                                      "Structure category is not set during "
                                      + nameof(this.PrepareConstructionConfig)
                                      + " call");

            foreach (var upgradeEntry in configUpgrade.Entries)
            {
                if (upgradeEntry.RequiredItems.Count > 4)
                {
                    // we don't allow more than 4 items for upgrades (the upgrade UI space is strictly limited)
                    throw new Exception(this.ShortId
                                        + " requires more than 4 items to upgrade to "
                                        + upgradeEntry.ProtoStructure.ShortId
                                        + ". Max 4 items allowed");
                }
            }

            this.ConfigBuild   = configBuild;
            this.ConfigRepair  = configRepair;
            this.ConfigUpgrade = configUpgrade;
        }
Exemplo n.º 19
0
        protected override void PrepareLandClaimConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            category = GetCategory <StructureCategoryOther>();

            // build is not allowed - it's an upgrade from previous level
            // for requirements for the upgrade see construction upgrade config from previous level
            build.IsAllowed = false;

            repair.StagesCount          = 10;
            repair.StageDurationSeconds = BuildDuration.Short;
            repair.AddStageRequiredItem <ItemIngotIron>(count: 2);
            repair.AddStageRequiredItem <ItemIngotCopper>(count: 2);

            upgrade.AddUpgrade <ObjectLandClaimT3>()
            .AddRequiredItem <ItemIngotSteel>(count: 25)
            .AddRequiredItem <ItemIngotCopper>(count: 25);
        }
Exemplo n.º 20
0
        protected override void PrepareConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            category = GetCategory <StructureCategoryIndustry>();

            // Oil pump requires each tile to contain an oil seep.
            // Notice: technically it will be possible to construct one oil pump on two oil seeps if they're nearby,
            // so there should be the oil spawn limitation to avoid that case!
            tileRequirements
            .Clear()
            .Add(ErrorRequiresOilSeep,
                 c => c.Tile.StaticObjects.Any(_ => _.ProtoStaticWorldObject is ObjectDepositOilSeep))
            .Add(ConstructionTileRequirements.BasicRequirements)
            .Add(ConstructionTileRequirements.ValidatorClientOnlyNoCurrentPlayer)
            .Add(ConstructionTileRequirements.ValidatorNoPhysicsBodyDynamic)
            .Add(ConstructionTileRequirements.ErrorNoFreeSpace,
                 c => !ConstructionTileRequirements.TileHasAnyPhysicsObjectsWhere(
                     c.Tile,
                     o => o.PhysicsBody.IsStatic &&
                     !(o.PhysicsBody.AssociatedWorldObject?.ProtoWorldObject
                       is ObjectDepositOilSeep)))
            .Add(ConstructionTileRequirements.ValidatorNotRestrictedArea)
            .Add(LandClaimSystem.ValidatorIsOwnedOrFreeArea);

            build.StagesCount          = 10;
            build.StageDurationSeconds = BuildDuration.Short;
            build.AddStageRequiredItem <ItemIngotSteel>(count: 20);
            build.AddStageRequiredItem <ItemIngotCopper>(count: 15);
            build.AddStageRequiredItem <ItemCement>(count: 25);

            repair.StagesCount          = 10;
            repair.StageDurationSeconds = BuildDuration.Short;
            repair.AddStageRequiredItem <ItemIngotSteel>(count: 5);
            repair.AddStageRequiredItem <ItemIngotCopper>(count: 2);
        }
Exemplo n.º 21
0
        protected override void PrepareConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            category = GetCategory <StructureCategoryElectricity>();

            build.StagesCount          = 10;
            build.StageDurationSeconds = BuildDuration.Medium;
            build.AddStageRequiredItem <ItemIngotSteel>(count: 5);
            build.AddStageRequiredItem <ItemOrePragmium>(count: 5);
            build.AddStageRequiredItem <ItemPlastic>(count: 2);
            build.AddStageRequiredItem <ItemComponentsHighTech>(count: 1);

            repair.StagesCount          = 10;
            repair.StageDurationSeconds = BuildDuration.Medium;
            repair.AddStageRequiredItem <ItemIngotSteel>(count: 2);
            repair.AddStageRequiredItem <ItemOrePragmium>(count: 2);
            repair.AddStageRequiredItem <ItemPlastic>(count: 1);
        }
Exemplo n.º 22
0
        protected override void PrepareConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            category = GetCategory <StructureCategoryOther>();

            // TODO: set proper requirements
            build.StagesCount          = 10;
            build.StageDurationSeconds = BuildDuration.Short;
            build.AddStageRequiredItem <ItemIngotSteel>(count: 25);
            build.AddStageRequiredItem <ItemIngotCopper>(count: 25);
            build.AddStageRequiredItem <ItemIngotLithium>(count: 5);
            build.AddStageRequiredItem <ItemPlastic>(count: 5);
            build.AddStageRequiredItem <ItemComponentsHighTech>(count: 2);

            repair.StagesCount          = 10;
            repair.StageDurationSeconds = BuildDuration.Short;
            repair.AddStageRequiredItem <ItemIngotSteel>(count: 10);
            repair.AddStageRequiredItem <ItemIngotCopper>(count: 10);
        }
Exemplo n.º 23
0
        protected override void PrepareLandClaimConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            category = GetCategory <StructureCategoryOther>();

            build.StagesCount =
                1;                                               // important, due to issues with building permissions we had to make this 1 stage building
            build.StageDurationSeconds = BuildDuration.Short;    // irrelevant, since it is 1 stage building
            build.AddStageRequiredItem <ItemPlanks>(count: 100); // price reflects the entire cost
            build.AddStageRequiredItem <ItemStone>(count: 50);

            repair.StagesCount          = 10;
            repair.StageDurationSeconds = BuildDuration.Short;
            repair.AddStageRequiredItem <ItemPlanks>(count: 5);

            upgrade.AddUpgrade <ObjectLandClaimT2>()
            .AddRequiredItem <ItemIngotIron>(count: 25)
            .AddRequiredItem <ItemIngotCopper>(count: 25);
        }
Exemplo n.º 24
0
        protected override void PrepareConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            tileRequirements.Clear()
            .Add(ConstructionTileRequirements.ValidatorNoStaticObjectsExceptFloor)
            .AddClientOnly(ConstructionTileRequirements.ValidatorClientOnlyNoCurrentPlayer)
            .Add(ConstructionTileRequirements.ValidatorNoPhysicsBodyDynamic)
            .Add(ConstructionTileRequirements.ValidatorNotRestrictedArea)
            .Add(ConstructionTileRequirements.ValidatorNoNpcsAround)
            .Add(ConstructionTileRequirements.ValidatorNoPlayersNearby)
            .Add(LandClaimSystem.ValidatorIsOwnedLandInPvEOnly)
            .Add(LandClaimSystem.ValidatorNoRaid)
            .Add(LandClaimSystem.ValidatorNoShieldProtection);

            this.PrepareConstructionConfigSprinkler(build,
                                                    repair,
                                                    upgrade,
                                                    out category);
        }
Exemplo n.º 25
0
        protected override void PrepareConstructionConfig(
            ConstructionTileRequirements tileRequirements,
            ConstructionStageConfig build,
            ConstructionStageConfig repair,
            ConstructionUpgradeConfig upgrade,
            out ProtoStructureCategory category)
        {
            category = GetCategory <StructureCategoryIndustry>();

            // Lithium salt extractor requires each tile to contain a geothermal spring.
            tileRequirements
            .Clear()
            .Add(ErrorRequiresGeothermalSpring,
                 c => c.Tile.StaticObjects.Any(_ => _.ProtoStaticWorldObject is ObjectDepositGeothermalSpring))
            .Add(ConstructionTileRequirements.BasicRequirements)
            .Add(ConstructionTileRequirements.ValidatorClientOnlyNoCurrentPlayer)
            .Add(ConstructionTileRequirements.ValidatorNoPhysicsBodyDynamic)
            .Add(ConstructionTileRequirements.ErrorNoFreeSpace,
                 c => !ConstructionTileRequirements.TileHasAnyPhysicsObjectsWhere(
                     c.Tile,
                     t => t.PhysicsBody.IsStatic &&
                     !(t.PhysicsBody.AssociatedWorldObject?.ProtoWorldObject is
                       ObjectDepositGeothermalSpring)))
            .Add(ConstructionTileRequirements.ValidatorNotRestrictedArea)
            .Add(LandClaimSystem.ValidatorIsOwnedOrFreeArea);

            build.StagesCount          = 10;
            build.StageDurationSeconds = BuildDuration.Short;
            build.AddStageRequiredItem <ItemIngotSteel>(count: 20);
            build.AddStageRequiredItem <ItemIngotCopper>(count: 15);
            build.AddStageRequiredItem <ItemCement>(count: 25);

            repair.StagesCount          = 10;
            repair.StageDurationSeconds = BuildDuration.Short;
            repair.AddStageRequiredItem <ItemIngotSteel>(count: 5);
            repair.AddStageRequiredItem <ItemIngotCopper>(count: 2);
        }
Exemplo n.º 26
0
 protected abstract void PrepareConstructionConfigWell(
     ConstructionTileRequirements tileRequirements,
     ConstructionStageConfig build,
     ConstructionStageConfig repair,
     ConstructionUpgradeConfig upgrade,
     out ProtoStructureCategory category);
Exemplo n.º 27
0
 protected override void PrepareTileRequirements(ConstructionTileRequirements tileRequirements)
 {
     tileRequirements.Add(ConstructionTileRequirements.ValidatorNoPlatforms);
 }
Exemplo n.º 28
0
 protected override void PrepareTileRequirements(ConstructionTileRequirements tileRequirements)
 {
     base.PrepareTileRequirements(tileRequirements);
     tileRequirements.Add(ConstructionTileRequirements.ValidatorNotRestrictedAreaEvenForServer);
 }
Exemplo n.º 29
0
 protected abstract void PrepareDecorationConstructionConfig(
     ConstructionTileRequirements tileRequirements,
     ConstructionStageConfig build,
     ConstructionStageConfig repair);
Exemplo n.º 30
0
 protected abstract void PrepareConstructionConfigGenerator(
     ConstructionTileRequirements tileRequirements,
     ConstructionStageConfig build,
     ConstructionStageConfig repair,
     InputItems inputItems,
     out ProtoStructureCategory category);