Beispiel #1
0
        public override void DoPostConfigureComplete(GameObject go)
        {
            BuildingTemplates.DoPostConfigure(go);

            GeneratedBuildings.RemoveLoopingSounds(go);
            // MeshTile stuff
            go.GetComponent <KPrefabID>().AddTag(GameTags.FloorTiles);
//            go.GetComponent<ZoneTile>();

            // Pump stuff
            go.AddOrGet <Storage>().capacityKg = 1f;
            var elementConsumer = go.AddOrGet <ElementConsumer>();

            elementConsumer.configuration     = ElementConsumer.Configuration.AllLiquid;
            elementConsumer.consumptionRate   = DrainOptions.Instance.DrainSize < 0.1f ? 0.1f : DrainOptions.Instance.DrainSize;
            elementConsumer.storeOnConsume    = true;
            elementConsumer.showInStatusPanel = false;
            elementConsumer.consumptionRadius = 1;
            var conduitDispenser = go.AddOrGet <ConduitDispenser>();

            conduitDispenser.conduitType    = ConduitType.Liquid;
            conduitDispenser.alwaysDispense = true;
            conduitDispenser.elementFilter  = null;

            // add anim
            go.GetComponent <KBatchedAnimController>().initialAnim = "built";

            if (DrainOptions.Instance.UseSolidDrain)
            {
                elementConsumer.sampleCellOffset = new Vector3(0, 1f);
            }
        }
 public override void DoPostConfigureComplete(GameObject go)
 {
     GeneratedBuildings.RemoveLoopingSounds(go);
     go.AddComponent <ZoneTile>();
     //go.AddOrGet<KBoxCollider2D>();
     go.GetComponent <KPrefabID>().AddTag(GameTags.FloorTiles);
 }
Beispiel #3
0
 public override void DoPostConfigureComplete(GameObject go)
 {
     GeneratedBuildings.RemoveLoopingSounds(go);
     go.GetComponent <KPrefabID>().AddTag(GameTags.FloorTiles, false);
     go.AddComponent <SimTemperatureTransfer>();
     go.AddComponent <ZoneTile>();
 }
 public override void DoPostConfigureComplete(GameObject go)
 {
     GeneratedBuildings.RemoveLoopingSounds(go);
     go.GetComponent <KPrefabID>().AddTag(GameTags.FloorTiles, false);
     go.GetComponent <KPrefabID>().AddTag(TagManager.Create("Colorshifting"), false);
     go.AddComponent <TileUpdater>();
 }
Beispiel #5
0
        public override void DoPostConfigureComplete(GameObject go)
        {
            go.AddOrGetDef <VentController.Def>();
            AddVisualizer(go, false);

            GeneratedBuildings.RemoveLoopingSounds(go);
        }
Beispiel #6
0
        public static void DoPostConfigureComplete(GameObject go, float suckRate, ConduitType conduitType, float overPressureThreshold)
        {
            go.AddOrGetDef <OperationalController.Def>();
            go.AddOrGet <EnergyConsumer>();
            FanRotatablePassiveElementConsumer elementConsumer1 = go.AddComponent <FanRotatablePassiveElementConsumer>();

            switch (conduitType)
            {
            case ConduitType.Gas:
                elementConsumer1.configuration = ElementConsumer.Configuration.AllGas;
                break;

            case ConduitType.Liquid:
                elementConsumer1.configuration = ElementConsumer.Configuration.AllLiquid;
                break;
            }
            elementConsumer1.consumptionRate     = suckRate;
            elementConsumer1.storeOnConsume      = true;
            elementConsumer1.showInStatusPanel   = false;
            elementConsumer1.consumptionRadius   = 1;
            elementConsumer1.rotatableCellOffset = new Vector3(0f, -1f);
            elementConsumer1.showDescriptor      = false;
            Storage storage = go.AddOrGet <Storage>();

            storage.capacityKg = 2 * suckRate;
            storage.showInUI   = true;
            Fan fan = go.AddOrGet <Fan>();

            fan.conduitType      = conduitType;
            fan.overpressureMass = overPressureThreshold;

            GeneratedBuildings.RemoveLoopingSounds(go);
            go.GetComponent <KPrefabID>().AddTag(GameTags.FloorTiles, false);
        }
Beispiel #7
0
        public override void DoPostConfigureComplete(GameObject go)
        {
            GeneratedBuildings.RemoveLoopingSounds(go);
            // MeshTile stuff
            go.GetComponent <KPrefabID>().AddTag(GameTags.FloorTiles);
            go.AddComponent <SimTemperatureTransfer>();
            go.AddComponent <ZoneTile>();
            // Pump stuff
            go.AddOrGet <Storage>().capacityKg = 1f;
            var elementConsumer = go.AddOrGet <ElementConsumer>();

            elementConsumer.configuration     = ElementConsumer.Configuration.AllLiquid;
            elementConsumer.consumptionRate   = 0.1f;
            elementConsumer.storeOnConsume    = true;
            elementConsumer.showInStatusPanel = false;
            elementConsumer.consumptionRadius = 1;
            var conduitDispenser = go.AddOrGet <ConduitDispenser>();

            conduitDispenser.conduitType    = ConduitType.Liquid;
            conduitDispenser.alwaysDispense = true;
            conduitDispenser.elementFilter  = null;
            BuildingTemplates.DoPostConfigure(go);
            // add anim
            go.GetComponent <KBatchedAnimController>().initialAnim = "built";
        }
Beispiel #8
0
        public override void DoPostConfigureComplete(GameObject go)
        {
            //go.AddOrGetDef<StorageController.Def>();

            GeneratedBuildings.RegisterSingleLogicInputPort(go);
            go.AddOrGet <LogicOperationalController>();
            go.AddOrGet <EnergyConsumer>();
            go.AddOrGet <RotatablePump>();
            Storage storage = go.AddOrGet <Storage>();

            storage.capacityKg = WallPumpsConfig.GetConfig().gasWallPump.pumpRate * 2;
            RotatableElementConsumer elementConsumer = go.AddOrGet <RotatableElementConsumer>();

            elementConsumer.configuration       = ElementConsumer.Configuration.AllGas;
            elementConsumer.consumptionRate     = WallPumpsConfig.GetConfig().gasWallPump.pumpRate;
            elementConsumer.storeOnConsume      = true;
            elementConsumer.showInStatusPanel   = false;
            elementConsumer.rotatableCellOffset = new Vector3(0, 1);
            elementConsumer.consumptionRadius   = 2;
            ConduitDispenser conduitDispenser = go.AddOrGet <ConduitDispenser>();

            conduitDispenser.conduitType    = ConduitType.Gas;
            conduitDispenser.alwaysDispense = true;
            conduitDispenser.elementFilter  = null;
            go.AddOrGetDef <OperationalController.Def>();
            AddVisualizer(go, false);

            GeneratedBuildings.RemoveLoopingSounds(go);
        }
    public override void DoPostConfigureComplete(GameObject go)
    {
        GeneratedBuildings.RemoveLoopingSounds(go);
        go.GetComponent <KPrefabID>().AddTag(GameTags.FloorTiles, false);
        KPrefabID component = go.GetComponent <KPrefabID>();

        component.AddTag(GameTags.Bunker, false);
    }
Beispiel #10
0
        public override void DoPostConfigureComplete(GameObject go)
        {
            GeneratedBuildings.RemoveLoopingSounds(go);
            go.GetComponent <KPrefabID>().AddTag(GameTags.FloorTiles);
            GeneratedBuildings.MakeBuildingAlwaysOperational(go);
            GeneratedBuildings.RegisterLogicPorts(go, TileTemperatureSensorConfig.OUTPUT_PORT);
            LogicTemperatureSensor logicTemperatureSensor = go.AddOrGet <LogicTemperatureSensorNoAnim>();

            logicTemperatureSensor.manuallyControlled = false;
            logicTemperatureSensor.minTemp            = 0f;
            logicTemperatureSensor.maxTemp            = 9999f + 273;
        }
Beispiel #11
0
 public static void CommonConduitPostConfigureComplete(GameObject go)
 {
     GeneratedBuildings.RemoveLoopingSounds(go);
 }
Beispiel #12
0
 public override void DoPostConfigureComplete(GameObject go)
 {
     ThermalInterfacePlate?.DoPostConfigureComplete(go);
     GeneratedBuildings.RemoveLoopingSounds(go);
     go.AddComponent <ThermalInterfacePlate>();
 }
Beispiel #13
0
 public override void DoPostConfigureComplete(GameObject go)
 {
     GeneratedBuildings.RemoveLoopingSounds(go);
     go.GetComponent <KPrefabID>().AddTag(GameTags.FarmTiles, false);
     FarmTileConfig.SetUpFarmPlotTags(go);
 }
Beispiel #14
0
 public override void DoPostConfigureComplete(GameObject go)
 {
     GeneratedBuildings.RemoveLoopingSounds(go);
     go.AddOrGet <Threshold>();
 }
Beispiel #15
0
 public override void DoPostConfigureComplete(GameObject go)
 {
     GeneratedBuildings.RemoveLoopingSounds(go);
     BuildingTemplates.DoPostConfigure(go);
 }
Beispiel #16
0
 public override void DoPostConfigureComplete(GameObject go)
 {
     go.AddOrGet <Scaffolding>();
     GeneratedBuildings.RemoveLoopingSounds(go);
 }