public override void DoPostConfigureComplete(GameObject go) { FuelTank fuelTank = go.AddOrGet <FuelTank>(); fuelTank.capacityKg = fuelTank.minimumLaunchMass; fuelTank.SetDefaultStoredItemModifiers(new List <Storage.StoredItemModifier> { Storage.StoredItemModifier.Hide, Storage.StoredItemModifier.Seal, Storage.StoredItemModifier.Insulate }); go.AddOrGet <DropToUserCapacity>(); ManualDeliveryKG manualDeliveryKG = go.AddOrGet <ManualDeliveryKG>(); manualDeliveryKG.SetStorage(fuelTank); manualDeliveryKG.refillMass = fuelTank.capacityKg; manualDeliveryKG.capacity = fuelTank.capacityKg; manualDeliveryKG.operationalRequirement = FetchOrder2.OperationalRequirement.None; manualDeliveryKG.choreTypeIDHash = Db.Get().ChoreTypes.MachineFetch.IdHash; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.consumptionRate = 10f; conduitConsumer.capacityTag = GameTags.Liquid; conduitConsumer.capacityKG = fuelTank.capacityKg; conduitConsumer.forceAlwaysSatisfied = true; conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Store; RocketModule rocketModule = go.AddOrGet <RocketModule>(); rocketModule.SetBGKAnim(Assets.GetAnim("rocket_liquid_fuel_tank_bg_kanim")); EntityTemplates.ExtendBuildingToRocketModule(go); }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { go.AddOrGet <LoopingSounds>(); Storage storage = BuildingTemplates.CreateDefaultStorage(go, false); storage.showInUI = true; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.consumptionRate = 1f; conduitConsumer.capacityKG = 10f; conduitConsumer.capacityTag = GameTags.Liquid; ElementConverter elementConverter = go.AddOrGet <ElementConverter>(); elementConverter.consumedElements = new ElementConverter.ConsumedElement[1] { new ElementConverter.ConsumedElement(new Tag("Water"), 1f) }; elementConverter.outputElements = new ElementConverter.OutputElement[1] { new ElementConverter.OutputElement(3.33333325f, SimHashes.CrudeOil, 363.15f, false, false, 2f, 1.5f, 0f, byte.MaxValue, 0) }; OilWellCap oilWellCap = go.AddOrGet <OilWellCap>(); oilWellCap.gasElement = SimHashes.Methane; oilWellCap.gasTemperature = 573.15f; oilWellCap.addGasRate = 0.0333333351f; oilWellCap.maxGasPressure = 80.00001f; oilWellCap.releaseGasRate = 0.444444478f; }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { Storage defaultStorage = BuildingTemplates.CreateDefaultStorage(go, false); defaultStorage.showDescriptor = true; defaultStorage.storageFilters = STORAGEFILTERS.LIQUIDS; defaultStorage.capacityKg = 2500f; defaultStorage.SetDefaultStoredItemModifiers(Storage.StandardSealedStorage); defaultStorage.allowItemRemoval = true; go.AddOrGet <DropAllWorkable>(); GasBottler gasBottler = go.AddOrGet <GasBottler>(); gasBottler.storage = defaultStorage; gasBottler.overrideAnims = new KAnimFile[1] { Assets.GetAnim((HashedString)"anim_interacts_washbasin_kanim") }; gasBottler.workTime = 5f; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.storage = defaultStorage; conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.ignoreMinMassCheck = true; conduitConsumer.forceAlwaysSatisfied = true; conduitConsumer.alwaysConsume = true; conduitConsumer.capacityKG = defaultStorage.capacityKg; conduitConsumer.keepZeroMassObject = false; go.AddOrGet <LoopingSounds>(); }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { GeneratedBuildings.RegisterSingleLogicInputPort(go); go.AddOrGet <LogicOperationalController>(); go.AddOrGet <RotatableExhaust>(); Vent vent = go.AddOrGet <Vent>(); vent.conduitType = ConduitType.Liquid; vent.endpointType = Endpoint.Sink; vent.overpressureMass = WallPumpsConfig.GetConfig().liquidWallVent.maxPressure; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.ignoreMinMassCheck = true; Storage storage = BuildingTemplates.CreateDefaultStorage(go, false); storage.showInUI = true; go.AddOrGet <SimpleVent>(); SimCellOccupier simCellOccupier = go.AddOrGet <SimCellOccupier>(); simCellOccupier.notifyOnMelt = true; go.AddOrGet <Insulator>(); go.AddOrGet <TileTemperature>(); BuildingHP buildingHP = go.AddOrGet <BuildingHP>(); buildingHP.destroyOnDamaged = true; }
public override void DoPostConfigureComplete(GameObject go) { go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.IndustrialMachinery, false); go.AddOrGet <MassiveHeatSink>(); MinimumOperatingTemperature minimumOperatingTemperature = go.AddOrGet <MinimumOperatingTemperature>(); minimumOperatingTemperature.minimumTemperature = 100f; PrimaryElement component = go.GetComponent <PrimaryElement>(); component.SetElement(SimHashes.Iron); component.Temperature = 294.15f; go.AddOrGet <LoopingSounds>(); Storage storage = go.AddOrGet <Storage>(); storage.capacityKg = 0.099999994f; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Gas; conduitConsumer.consumptionRate = 1f; conduitConsumer.capacityTag = GameTagExtensions.Create(SimHashes.Hydrogen); conduitConsumer.capacityKG = 0.099999994f; conduitConsumer.forceAlwaysSatisfied = true; conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Dump; ElementConverter elementConverter = go.AddOrGet <ElementConverter>(); elementConverter.consumedElements = new ElementConverter.ConsumedElement[1] { new ElementConverter.ConsumedElement(ElementLoader.FindElementByHash(SimHashes.Hydrogen).tag, 0.01f) }; go.AddOrGetDef <PoweredActiveController.Def>(); }
public override void DoPostConfigureComplete(GameObject go) { Storage storage = go.AddOrGet <Storage>(); storage.capacityKg = 2700f; storage.allowSublimation = false; storage.SetDefaultStoredItemModifiers(new List <Storage.StoredItemModifier> { Storage.StoredItemModifier.Hide, Storage.StoredItemModifier.Seal, Storage.StoredItemModifier.Insulate }); OxidizerTank oxidizerTank = go.AddOrGet <OxidizerTank>(); oxidizerTank.storage = storage; go.AddOrGet <DropToUserCapacity>(); ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.consumptionRate = 10f; conduitConsumer.capacityTag = ElementLoader.FindElementByHash(SimHashes.LiquidOxygen).tag; conduitConsumer.capacityKG = storage.capacityKg; conduitConsumer.forceAlwaysSatisfied = true; conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Dump; RocketModule rocketModule = go.AddOrGet <RocketModule>(); rocketModule.SetBGKAnim(Assets.GetAnim("rocket_oxidizer_tank_liquid_bg_kanim")); EntityTemplates.ExtendBuildingToRocketModule(go); }
//ConfigureBuildingTemplate from rafinnery example public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.IndustrialMachinery, false); go.AddOrGet <BuildingComplete>().isManuallyOperated = true; HeliumExtractor heliumExtractor = go.AddOrGet <HeliumExtractor>(); heliumExtractor.overpressureMass = 10f; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Gas; conduitConsumer.consumptionRate = totalConversion; conduitConsumer.capacityTag = SimHashes.Methane.CreateTag(); conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Dump; conduitConsumer.capacityKG = 10f; conduitConsumer.forceAlwaysSatisfied = true; ConduitDispenser conduitDispenser = go.AddOrGet <ConduitDispenser>(); conduitDispenser.conduitType = ConduitType.Gas; conduitDispenser.invertElementFilter = true; conduitDispenser.elementFilter = new SimHashes[] { SimHashes.Methane, SimHashes.Propane }; ConduitDispenser conduitDispenser2 = go.AddComponent <ConduitDispenser>(); conduitDispenser2.conduitType = ConduitType.Gas; conduitDispenser2.invertElementFilter = true; conduitDispenser2.elementFilter = new SimHashes[] { SimHashes.Methane, SimHashes.Helium }; conduitDispenser2.useSecondaryOutput = true; ConduitSecondaryOutput secondOutput = go.AddOrGet <ConduitSecondaryOutput>(); secondOutput.portInfo = secondaryPort; Storage storage = go.AddOrGet <Storage>(); storage.showInUI = true; ElementConverter elementConverter = go.AddOrGet <ElementConverter>(); elementConverter.consumedElements = new ElementConverter.ConsumedElement[] { new ElementConverter.ConsumedElement(SimHashes.Methane.CreateTag(), totalConversion) }; elementConverter.outputElements = new ElementConverter.OutputElement[] { new ElementConverter.OutputElement(heliumConversionRate, SimHashes.Sulfur, 350.15f, false, false), new ElementConverter.OutputElement(heliumConversionRate, SimHashes.Helium, 80.15f, false, true), new ElementConverter.OutputElement(propaneConversionRate, SimHashes.Propane, 81.15f, false, true) }; Prioritizable.AddRef(go); }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { go.AddOrGet <SimCellOccupier>().doReplaceElement = true; go.AddOrGet <Insulator>(); go.AddOrGet <TileTemperature>(); ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.consumptionRate = 1f; conduitConsumer.capacityKG = 5f; conduitConsumer.capacityTag = GameTags.Liquid; conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Dump; go.AddOrGet <Storage>(); PlantablePlot plantablePlot = go.AddOrGet <PlantablePlot>(); plantablePlot.AddDepositTag(GameTags.CropSeed); plantablePlot.AddDepositTag(GameTags.WaterSeed); plantablePlot.occupyingObjectRelativePosition.y = 1f; plantablePlot.SetFertilizationFlags(true, true); go.AddOrGet <CopyBuildingSettings>().copyGroupTag = GameTags.Farm; BuildingTemplates.CreateDefaultStorage(go, false).SetDefaultStoredItemModifiers(Storage.StandardSealedStorage); go.AddOrGet <PlanterBox>(); go.AddOrGet <AnimTileable>(); go.AddOrGet <DropAllWorkable>(); Prioritizable.AddRef(go); }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.RecBuilding, false); Storage storage = go.AddOrGet <Storage>(); storage.capacityKg = 20f; storage.SetDefaultStoredItemModifiers(Storage.StandardFabricatorStorage); ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.capacityTag = ElementLoader.FindElementByHash(SimHashes.Water).tag; conduitConsumer.capacityKG = 2f; conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Dump; ManualDeliveryKG manualDeliveryKG = go.AddOrGet <ManualDeliveryKG>(); manualDeliveryKG.SetStorage(storage); manualDeliveryKG.requestedItemTag = new Tag("SpiceNut"); manualDeliveryKG.capacity = 10f; manualDeliveryKG.refillMass = 5f; manualDeliveryKG.minimumMass = 1f; manualDeliveryKG.choreTypeIDHash = Db.Get().ChoreTypes.MachineFetch.IdHash; go.AddOrGet <EspressoMachineWorkable>(); go.AddOrGet <EspressoMachine>(); RoomTracker roomTracker = go.AddOrGet <RoomTracker>(); roomTracker.requiredRoomType = Db.Get().RoomTypes.RecRoom.Id; roomTracker.requirement = RoomTracker.Requirement.Recommended; }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.IndustrialMachinery); go.AddOrGet <Structure>(); go.AddOrGet <LoopingSounds>(); Storage storage = go.AddOrGet <Storage>(); storage.capacityKg = 6f; storage.showInUI = true; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.capacityTag = GameTags.AnyWater; conduitConsumer.capacityKG = storage.capacityKg; conduitConsumer.forceAlwaysSatisfied = true; conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Dump; IndustrialElectrolyzer electrolyzer = go.AddOrGet <IndustrialElectrolyzer>(); electrolyzer.portInfo = secondaryPort; Prioritizable.AddRef(go); }
static void Postfix(LiquidConditionerConfig __instance, ref GameObject go) { AirConditioner airConditioner = go.AddOrGet <AirConditioner>(); airConditioner.temperatureDelta = DynamicBuildingsState.StateManager.State.Thermos; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.consumptionRate = DynamicBuildingsState.StateManager.State.liquidandgas; }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { go.AddOrGet <LoopingSounds>(); go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.WashStation); go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.AdvancedWashStation); Shower shower = go.AddOrGet <Shower>(); shower.overrideAnims = new KAnimFile[1] { Assets.GetAnim((HashedString)"anim_interacts_shower_kanim") }; shower.workTime = 15f; shower.outputTargetElement = SimHashes.DirtyWater; shower.fractionalDiseaseRemoval = 0.95f; shower.absoluteDiseaseRemoval = -2000; shower.workLayer = Grid.SceneLayer.BuildingFront; shower.trackUses = true; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.capacityTag = ElementLoader.FindElementByHash(SimHashes.Water).tag; conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Store; conduitConsumer.capacityKG = 5f; ConduitDispenser conduitDispenser = go.AddOrGet <ConduitDispenser>(); conduitDispenser.conduitType = ConduitType.Liquid; conduitDispenser.invertElementFilter = true; conduitDispenser.elementFilter = new SimHashes[1] { SimHashes.Water }; ElementConverter elementConverter = go.AddOrGet <ElementConverter>(); elementConverter.consumedElements = new ElementConverter.ConsumedElement[2] { new ElementConverter.ConsumedElement(new Tag("Water"), 1f), new ElementConverter.ConsumedElement(SimHashes.BleachStone.CreateTag(), 0.0005f), }; elementConverter.outputElements = new ElementConverter.OutputElement[1] { new ElementConverter.OutputElement(1f, SimHashes.DirtyWater, 0.0f, true, 0.0f, 0.5f, true, 0f, 0, 0) }; Storage storage = go.AddOrGet <Storage>(); storage.capacityKg = 12f; storage.SetDefaultStoredItemModifiers(Storage.StandardSealedStorage); go.AddOrGet <RequireOutputs>().ignoreFullPipe = true; ManualDeliveryKG manualDeliveryKg1 = go.AddOrGet <ManualDeliveryKG>(); manualDeliveryKg1.SetStorage(storage); manualDeliveryKg1.requestedItemTag = SimHashes.BleachStone.CreateTag(); manualDeliveryKg1.capacity = 2f; manualDeliveryKg1.refillMass = 1f; manualDeliveryKg1.minimumMass = 1f; manualDeliveryKg1.choreTypeIDHash = Db.Get().ChoreTypes.FetchCritical.IdHash; }
public static void Postfix(GasReservoirConfig __instance, ref GameObject go) { Storage storage = BuildingTemplates.CreateDefaultStorage(go); storage.capacityKg = DynamicBuildingsState.StateManager.State.GasRes; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.capacityKG = storage.capacityKg; }
internal static void Postfix(GameObject go) { ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.consumptionRate = CustomizeBuildingsState.StateManager.State.PipeLiquidMaxPressure * CustomizeBuildingsState.StateManager.State.PipeThroughputPercent; Storage storage = go.AddOrGet <Storage>(); storage.capacityKg = conduitConsumer.consumptionRate * 2f; }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.IndustrialMachinery, false); Storage storage = go.AddOrGet <Storage>(); storage.SetDefaultStoredItemModifiers(Storage.StandardSealedStorage); storage.showInUI = true; Desalinator desalinator = go.AddOrGet <Desalinator>(); desalinator.maxSalt = 945f; ElementConverter elementConverter = go.AddComponent <ElementConverter>(); elementConverter.consumedElements = new ElementConverter.ConsumedElement[1] { new ElementConverter.ConsumedElement(new Tag("SaltWater"), 5f) }; elementConverter.outputElements = new ElementConverter.OutputElement[2] { new ElementConverter.OutputElement(4.65f, SimHashes.Water, 0f, false, true, 0f, 0.5f, 0.75f, byte.MaxValue, 0), new ElementConverter.OutputElement(0.35f, SimHashes.Salt, 0f, false, true, 0f, 0.5f, 0.25f, byte.MaxValue, 0) }; ElementConverter elementConverter2 = go.AddComponent <ElementConverter>(); elementConverter2.consumedElements = new ElementConverter.ConsumedElement[1] { new ElementConverter.ConsumedElement(new Tag("Brine"), 5f) }; elementConverter2.outputElements = new ElementConverter.OutputElement[2] { new ElementConverter.OutputElement(3.5f, SimHashes.Water, 313.15f, false, true, 0f, 0.5f, 0.75f, byte.MaxValue, 0), new ElementConverter.OutputElement(1.5f, SimHashes.Salt, 313.15f, false, true, 0f, 0.5f, 0.25f, byte.MaxValue, 0) }; DesalinatorWorkableEmpty desalinatorWorkableEmpty = go.AddOrGet <DesalinatorWorkableEmpty>(); desalinatorWorkableEmpty.workTime = 90f; desalinatorWorkableEmpty.workLayer = Grid.SceneLayer.BuildingFront; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.consumptionRate = 10f; conduitConsumer.capacityKG = 20f; conduitConsumer.capacityTag = GameTags.AnyWater; conduitConsumer.forceAlwaysSatisfied = true; conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Store; ConduitDispenser conduitDispenser = go.AddOrGet <ConduitDispenser>(); conduitDispenser.conduitType = ConduitType.Liquid; conduitDispenser.invertElementFilter = true; conduitDispenser.elementFilter = new SimHashes[2] { SimHashes.SaltWater, SimHashes.Brine }; Prioritizable.AddRef(go); }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.IndustrialMachinery, false); Storage storage = BuildingTemplates.CreateDefaultStorage(go, false); storage.SetDefaultStoredItemModifiers(Storage.StandardSealedStorage); go.AddOrGet <WaterPurifier>(); ManualDeliveryKG manualDeliveryKG = go.AddComponent <ManualDeliveryKG>(); manualDeliveryKG.SetStorage(storage); manualDeliveryKG.choreTypeIDHash = Db.Get().ChoreTypes.MachineFetch.IdHash; manualDeliveryKG.requestedItemTag = new Tag("Dirt"); manualDeliveryKG.capacity = 136.5f; manualDeliveryKG.refillMass = 19.5f; ManualDeliveryKG manualDeliveryKG2 = go.AddComponent <ManualDeliveryKG>(); manualDeliveryKG2.SetStorage(storage); manualDeliveryKG2.choreTypeIDHash = Db.Get().ChoreTypes.MachineFetch.IdHash; manualDeliveryKG2.requestedItemTag = new Tag("Phosphorite"); manualDeliveryKG2.capacity = 54.6f; manualDeliveryKG2.refillMass = 7.79999971f; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.consumptionRate = 10f; conduitConsumer.capacityTag = ElementLoader.FindElementByHash(SimHashes.DirtyWater).tag; conduitConsumer.capacityKG = 0.195000008f; conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Dump; conduitConsumer.forceAlwaysSatisfied = true; ElementConverter elementConverter = go.AddOrGet <ElementConverter>(); elementConverter.consumedElements = new ElementConverter.ConsumedElement[3] { new ElementConverter.ConsumedElement(new Tag("DirtyWater"), 0.039f), new ElementConverter.ConsumedElement(new Tag("Dirt"), 0.065f), new ElementConverter.ConsumedElement(new Tag("Phosphorite"), 0.0259999987f) }; elementConverter.outputElements = new ElementConverter.OutputElement[1] { new ElementConverter.OutputElement(0.12f, SimHashes.Fertilizer, 323.15f, false, true, 0f, 0.5f, 1f, byte.MaxValue, 0) }; BuildingElementEmitter buildingElementEmitter = go.AddOrGet <BuildingElementEmitter>(); buildingElementEmitter.emitRate = 0.01f; buildingElementEmitter.temperature = 349.15f; buildingElementEmitter.element = SimHashes.Methane; buildingElementEmitter.modifierOffset = new Vector2(2f, 2f); ElementDropper elementDropper = go.AddComponent <ElementDropper>(); elementDropper.emitMass = 10f; elementDropper.emitTag = new Tag("Fertilizer"); elementDropper.emitOffset = new Vector3(0f, 1f, 0f); Prioritizable.AddRef(go); }
private void Bind() { if (requirePower) { energy = GetComponent <IEnergyConsumer>(); button = GetComponent <BuildingEnabledButton>(); } if (requireConduit && !(bool)conduitConsumer) { conduitConsumer = GetComponent <ConduitConsumer>(); } }
public override void DoPostConfigureComplete(GameObject go) { go.AddComponent <Storage>(); ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Gas; conduitConsumer.consumptionRate = 1f; conduitConsumer.capacityTag = ElementLoader.FindElementByHash(SimHashes.Oxygen).tag; conduitConsumer.capacityKG = 10f; conduitConsumer.forceAlwaysSatisfied = true; conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Dump; }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.IndustrialMachinery, false); Storage storage = go.AddOrGet <Storage>(); storage.SetDefaultStoredItemModifiers(Storage.StandardSealedStorage); storage.showInUI = false; storage.capacityKg = 20f; go.AddOrGet <LoopingSounds>(); go.AddOrGet <Quarry>(); ElementConverter elementConverter1 = go.AddComponent <ElementConverter>(); elementConverter1.consumedElements = new ElementConverter.ConsumedElement[] { new ElementConverter.ConsumedElement("Water", WATER_INPUT_RATE) }; elementConverter1.outputElements = new ElementConverter.OutputElement[] { new ElementConverter.OutputElement(DIRTY_WATER_OUTPUT_RATE, SimHashes.DirtyWater, minOutputTemperature: 0.0f, useEntityTemperature: true, storeOutput: true, outputElementOffsetx: 0.0f, outputElementOffsety: 0.5f, 0.75f, byte.MaxValue, 0), new ElementConverter.OutputElement(ORE_OUTPUT_RATE, SimHashes.IronOre, minOutputTemperature: 0.0f, useEntityTemperature: true, storeOutput: false, outputElementOffsetx: 0.0f, outputElementOffsety: 0.5f, 1f, byte.MaxValue, 0) }; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.consumptionRate = 10f; conduitConsumer.capacityKG = 20f; conduitConsumer.capacityTag = GameTags.Water; conduitConsumer.forceAlwaysSatisfied = true; conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Dump; ConduitDispenser conduitDispenser = go.AddOrGet <ConduitDispenser>(); conduitDispenser.conduitType = ConduitType.Liquid; conduitDispenser.elementFilter = new SimHashes[1] { SimHashes.DirtyWater }; }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { go.AddOrGet <LoopingSounds>(); go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.IndustrialMachinery); Storage storage = BuildingTemplates.CreateDefaultStorage(go); storage.showInUI = true; storage.capacityKg = 30000f; storage.SetDefaultStoredItemModifiers(Storage.StandardSealedStorage); go.AddOrGet <PipedDeodorizer>(); ElementConverter elementConverter = go.AddOrGet <ElementConverter>(); elementConverter.consumedElements = new ElementConverter.ConsumedElement[1] { new ElementConverter.ConsumedElement(SimHashes.ContaminatedOxygen.CreateTag(), AIR_INPUT_RATE), }; elementConverter.outputElements = new ElementConverter.OutputElement[2] { new ElementConverter.OutputElement(AIR_OUTPUT_RATE, SimHashes.Oxygen, 0f, useEntityTemperature: false, storeOutput: true), new ElementConverter.OutputElement(DIRT_OUTPUT_RATE, SimHashes.ToxicSand, 0f, useEntityTemperature: false, storeOutput: true) }; ElementDropper elementDropper = go.AddComponent <ElementDropper>(); elementDropper.emitMass = 10f; elementDropper.emitTag = new Tag("ToxicSand"); elementDropper.emitOffset = new Vector3(1f, 1f, 0f); ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Gas; conduitConsumer.consumptionRate = AIR_INPUT_RATE; conduitConsumer.capacityKG = 2 * AIR_INPUT_RATE; conduitConsumer.capacityTag = GameTags.Breathable; // ElementLoader.FindElementByHash(SimHashes.ContaminatedOxygen).tag; conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Dump; conduitConsumer.forceAlwaysSatisfied = true; ConduitDispenser conduitDispenser = go.AddOrGet <ConduitDispenser>(); conduitDispenser.conduitType = ConduitType.Gas; conduitDispenser.alwaysDispense = true; conduitDispenser.invertElementFilter = true; conduitDispenser.elementFilter = new SimHashes[] { SimHashes.ContaminatedOxygen }; go.AddOrGet <KBatchedAnimController>().randomiseLoopedOffset = true; }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { go.AddOrGet <LoopingSounds>(); go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.IndustrialMachinery, false); Storage storage = BuildingTemplates.CreateDefaultStorage(go, false); storage.showInUI = true; storage.capacityKg = 30000f; storage.SetDefaultStoredItemModifiers(Storage.StandardSealedStorage); AirFilter airFilter = go.AddOrGet <AirFilter>(); airFilter.filterTag = GameTagExtensions.Create(SimHashes.Water); ElementConsumer elementConsumer = go.AddOrGet <PassiveElementConsumer>(); elementConsumer.elementToConsume = SimHashes.CarbonDioxide; elementConsumer.consumptionRate = 0.6f; elementConsumer.capacityKG = 0.6f; elementConsumer.consumptionRadius = 3; elementConsumer.showInStatusPanel = true; elementConsumer.sampleCellOffset = new Vector3(0f, 0f, 0f); elementConsumer.isRequired = false; elementConsumer.storeOnConsume = true; elementConsumer.showDescriptor = false; ElementConverter elementConverter = go.AddOrGet <ElementConverter>(); elementConverter.consumedElements = new ElementConverter.ConsumedElement[2] { new ElementConverter.ConsumedElement(GameTagExtensions.Create(SimHashes.Water), 1f), new ElementConverter.ConsumedElement(GameTagExtensions.Create(SimHashes.CarbonDioxide), 0.3f) }; elementConverter.outputElements = new ElementConverter.OutputElement[1] { new ElementConverter.OutputElement(1f, SimHashes.DirtyWater, 0f, false, true, 0f, 0.5f, 1f, byte.MaxValue, 0) }; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.consumptionRate = 2f; conduitConsumer.capacityKG = 2f; conduitConsumer.capacityTag = ElementLoader.FindElementByHash(SimHashes.Water).tag; conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Store; conduitConsumer.forceAlwaysSatisfied = true; ConduitDispenser conduitDispenser = go.AddOrGet <ConduitDispenser>(); conduitDispenser.conduitType = ConduitType.Liquid; conduitDispenser.invertElementFilter = true; conduitDispenser.elementFilter = new SimHashes[1] { SimHashes.Water }; go.AddOrGet <KBatchedAnimController>().randomiseLoopedOffset = true; }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.IndustrialMachinery, false); Storage storage = go.AddOrGet <Storage>(); storage.SetDefaultStoredItemModifiers(Storage.StandardSealedStorage); storage.showInUI = true; storage.capacityKg = 600 * SALT_INPUT_RATE + 20f; storage.storageFilters = new List <Tag> { GameTags.BuildableRaw, GameTags.Plastic, GameTags.Metal, GameTags.Edible }; go.AddOrGet <LoopingSounds>(); go.AddOrGet <Mineralizer>(); ElementConverter elementConverter1 = go.AddComponent <ElementConverter>(); elementConverter1.consumedElements = new ElementConverter.ConsumedElement[2] { new ElementConverter.ConsumedElement("Salt", SALT_INPUT_RATE), new ElementConverter.ConsumedElement("Water", WATER_WITH_SALT_INPUT_RATE) }; elementConverter1.outputElements = new ElementConverter.OutputElement[1] { new ElementConverter.OutputElement(OUTPUT_RATE, SimHashes.SaltWater, 0.0f, false, true, 0.0f, 0.5f, 0.75f, byte.MaxValue, 0), }; ManualDeliveryKG manualDeliveryKg = go.AddOrGet <ManualDeliveryKG>(); manualDeliveryKg.SetStorage(storage); manualDeliveryKg.requestedItemTag = new Tag("Salt"); manualDeliveryKg.capacity = 600 * SALT_INPUT_RATE; manualDeliveryKg.refillMass = 100 * SALT_INPUT_RATE; manualDeliveryKg.choreTypeIDHash = Db.Get().ChoreTypes.MachineFetch.IdHash; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.consumptionRate = 10f; conduitConsumer.capacityKG = 20f; conduitConsumer.capacityTag = GameTags.Water; conduitConsumer.forceAlwaysSatisfied = true; conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Dump; ConduitDispenser conduitDispenser = go.AddOrGet <ConduitDispenser>(); conduitDispenser.conduitType = ConduitType.Liquid; conduitDispenser.elementFilter = new SimHashes[1] { SimHashes.SaltWater }; Prioritizable.AddRef(go); }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { go.AddOrGet <LoopingSounds>(); go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.WashStation, false); go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.AdvancedWashStation, false); Shower shower = go.AddOrGet <Shower>(); shower.overrideAnims = new KAnimFile[1] { Assets.GetAnim("anim_interacts_shower_kanim") }; shower.workTime = 15f; shower.outputTargetElement = SimHashes.DirtyWater; shower.fractionalDiseaseRemoval = 0.95f; shower.absoluteDiseaseRemoval = -2000; shower.workLayer = Grid.SceneLayer.BuildingFront; shower.trackUses = true; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.capacityTag = ElementLoader.FindElementByHash(SimHashes.Water).tag; conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Store; conduitConsumer.capacityKG = 5f; ConduitDispenser conduitDispenser = go.AddOrGet <ConduitDispenser>(); conduitDispenser.conduitType = ConduitType.Liquid; conduitDispenser.invertElementFilter = true; conduitDispenser.elementFilter = new SimHashes[1] { SimHashes.Water }; ElementConverter elementConverter = go.AddOrGet <ElementConverter>(); elementConverter.consumedElements = new ElementConverter.ConsumedElement[1] { new ElementConverter.ConsumedElement(new Tag("Water"), 1f) }; elementConverter.outputElements = new ElementConverter.OutputElement[1] { new ElementConverter.OutputElement(1f, SimHashes.DirtyWater, 0f, false, true, 0f, 0.5f, 1f, byte.MaxValue, 0) }; Storage storage = go.AddOrGet <Storage>(); storage.capacityKg = 10f; storage.SetDefaultStoredItemModifiers(Storage.StandardSealedStorage); RequireOutputs requireOutputs = go.AddOrGet <RequireOutputs>(); requireOutputs.ignoreFullPipe = true; }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { go.AddOrGet <LoopingSounds>(); go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.Toilet, false); go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.FlushToilet, false); FlushToilet flushToilet = go.AddOrGet <FlushToilet>(); flushToilet.massConsumedPerUse = 5f; flushToilet.massEmittedPerUse = 11.7f; flushToilet.newPeeTemperature = 310.15f; flushToilet.diseaseId = "FoodPoisoning"; flushToilet.diseasePerFlush = 100000; flushToilet.diseaseOnDupePerFlush = 5000; KAnimFile[] overrideAnims = new KAnimFile[1] { Assets.GetAnim("anim_interacts_toiletflush_kanim") }; ToiletWorkableUse toiletWorkableUse = go.AddOrGet <ToiletWorkableUse>(); toiletWorkableUse.overrideAnims = overrideAnims; toiletWorkableUse.workLayer = Grid.SceneLayer.BuildingFront; toiletWorkableUse.resetProgressOnStop = true; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.capacityTag = ElementLoader.FindElementByHash(SimHashes.Water).tag; conduitConsumer.capacityKG = 5f; conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Store; ConduitDispenser conduitDispenser = go.AddOrGet <ConduitDispenser>(); conduitDispenser.conduitType = ConduitType.Liquid; conduitDispenser.invertElementFilter = true; conduitDispenser.elementFilter = new SimHashes[1] { SimHashes.Water }; Storage storage = go.AddOrGet <Storage>(); storage.capacityKg = 25f; storage.doDiseaseTransfer = false; storage.SetDefaultStoredItemModifiers(Storage.StandardSealedStorage); Ownable ownable = go.AddOrGet <Ownable>(); ownable.slotID = Db.Get().AssignableSlots.Toilet.Id; ownable.canBePublic = true; RequireOutputs requireOutputs = go.AddOrGet <RequireOutputs>(); requireOutputs.ignoreFullPipe = true; }
// Token: 0x06000018 RID: 24 RVA: 0x00002620 File Offset: 0x00000820 public override void ConfigureBuildingTemplate(GameObject go, Tag prefabTag) { GeneratedBuildings.MakeBuildingAlwaysOperational(go); ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.consumptionRate = 10f; conduitConsumer.capacityKG = 20f; conduitConsumer.forceAlwaysSatisfied = true; SolidConduitDispenser solidConduitDispenser = go.AddOrGet <SolidConduitDispenser>(); solidConduitDispenser.alwaysDispense = true; solidConduitDispenser.elementFilter = null; BuildingTemplates.CreateDefaultStorage(go); }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { go.AddOrGet <LoopingSounds>(); AirConditioner airConditioner = go.AddOrGet <AirConditioner>(); airConditioner.temperatureDelta = -14f; airConditioner.maxEnvironmentDelta = -50f; Storage storage = BuildingTemplates.CreateDefaultStorage(go, false); storage.showInUI = true; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Gas; conduitConsumer.consumptionRate = 1f; }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.IndustrialMachinery, false); Storage storage = go.AddOrGet <Storage>(); storage.SetDefaultStoredItemModifiers(Storage.StandardSealedStorage); storage.showInUI = true; storage.capacityKg = 600 * MINERAL_INPUT_RATE; go.AddOrGet <LoopingSounds>(); go.AddOrGet <Mineralizer>(); Prioritizable.AddRef(go); ElementConverter elementConverter1 = go.AddComponent <ElementConverter>(); elementConverter1.consumedElements = new ElementConverter.ConsumedElement[2] { new ElementConverter.ConsumedElement("Crystal", MINERAL_INPUT_RATE), new ElementConverter.ConsumedElement("Water", WATER_WITH_MINERAL_INPUT_RATE) }; elementConverter1.outputElements = new ElementConverter.OutputElement[1] { new ElementConverter.OutputElement(OUTPUT_RATE, Elements.MineralWaterElement.SimHash, 0.0f, false, true, 0.0f, 0.5f, 0.75f, byte.MaxValue, 0), }; ManualDeliveryKG manualDeliveryKg = go.AddOrGet <ManualDeliveryKG>(); manualDeliveryKg.SetStorage(storage); manualDeliveryKg.requestedItemTag = new Tag("Crystal"); manualDeliveryKg.capacity = storage.capacityKg; manualDeliveryKg.refillMass = 100 * MINERAL_INPUT_RATE; manualDeliveryKg.choreTypeIDHash = Db.Get().ChoreTypes.MachineFetch.IdHash; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.consumptionRate = 10f; conduitConsumer.capacityKG = 4 * WATER_WITH_MINERAL_INPUT_RATE; conduitConsumer.capacityTag = ElementLoader.FindElementByHash(SimHashes.Water).tag; conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Dump; ConduitDispenser conduitDispenser = go.AddOrGet <ConduitDispenser>(); conduitDispenser.conduitType = ConduitType.Liquid; conduitDispenser.elementFilter = new SimHashes[1] { Elements.MineralWaterElement.SimHash }; }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { GeneratedBuildings.MakeBuildingAlwaysOperational(go); go.AddOrGet <LoopingSounds>(); go.AddOrGet <Exhaust>(); Vent vent = go.AddOrGet <Vent>(); vent.conduitType = ConduitType.Gas; vent.endpointType = Endpoint.Sink; vent.overpressureMass = 400f; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Gas; conduitConsumer.ignoreMinMassCheck = true; BuildingTemplates.CreateDefaultStorage(go, false).showInUI = true; go.AddOrGet <SimpleVent>(); }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { Tag tag = SimHashes.CarbonDioxide.CreateTag(); go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.IndustrialMachinery, false); CoalComp oxyliteRefinery = go.AddOrGet <CoalComp>(); oxyliteRefinery.emitTag = SimHashes.Carbon.CreateTag(); oxyliteRefinery.emitMass = 10f; oxyliteRefinery.dropOffset = new Vector3(0f, 1f); ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Gas; conduitConsumer.consumptionRate = 1.2f; conduitConsumer.capacityTag = tag; conduitConsumer.capacityKG = 6f; conduitConsumer.forceAlwaysSatisfied = true; conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Dump; ConduitDispenser conduitDispenser = go.AddOrGet <ConduitDispenser>(); conduitDispenser.conduitType = ConduitType.Gas; conduitDispenser.elementFilter = new SimHashes[] { SimHashes.Oxygen }; Storage storage = go.AddOrGet <Storage>(); storage.capacityKg = 23.2f; storage.SetDefaultStoredItemModifiers(Storage.StandardSealedStorage); storage.showInUI = true; ElementConverter elementConverter = go.AddOrGet <ElementConverter>(); elementConverter.consumedElements = new ElementConverter.ConsumedElement[] { new ElementConverter.ConsumedElement(tag, 1f) }; elementConverter.outputElements = new ElementConverter.OutputElement[] { new ElementConverter.OutputElement(.25f, SimHashes.Carbon, 0f, false, true, 0f, 0.5f, 0.25f, 255, 0), new ElementConverter.OutputElement(.75f, SimHashes.Oxygen, 0f, false, true, 0f, 0f, 0.75f, 255, 0) }; Prioritizable.AddRef(go); }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { go.AddOrGet <LoopingSounds>(); AirConditioner airConditioner = go.AddOrGet <AirConditioner>(); airConditioner.temperatureDelta = -14f; airConditioner.maxEnvironmentDelta = -50f; airConditioner.isLiquidConditioner = true; ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>(); conduitConsumer.conduitType = ConduitType.Liquid; conduitConsumer.consumptionRate = 10f; Storage storage = BuildingTemplates.CreateDefaultStorage(go, false); storage.showInUI = true; storage.capacityKg = 2f * conduitConsumer.consumptionRate; storage.SetDefaultStoredItemModifiers(StoredItemModifiers); }