public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag)
        {
            go.AddOrGet <LoopingSounds>();
            ShinseiChiller shinseiChiller = go.AddOrGet <ShinseiChiller>();

            shinseiChiller.targetTemperature = 3200f;
            shinseiChiller.SetLiquidHeater();
            shinseiChiller.minimumCellMass = 0f;//400f;

            //required!
            go.AddOrGet <MinimumOperatingTemperature>().minimumTemperature = 16f;
        }
Beispiel #2
0
        public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag)
        {
            //not super sure what these do
            go.AddOrGet <LoopingSounds>();
            ShinseiChiller shinseiChiller = go.AddOrGet <ShinseiChiller>();

            //For a heater, this only allows it to run until it hits that temp
            //For a chiller, if it gets that hot (can't cool enough) it stops trying
            //Basically, should equal melting for a cooler
            shinseiChiller.targetTemperature = 1600f;

            //sets the minimum temperature of the building before it stops working
            //CRUCIAL if a heat-negating building, otherwise you get a crash
            go.AddOrGet <MinimumOperatingTemperature>().minimumTemperature = 120f;
        }
Beispiel #3
0
        public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag)
        {
            //not super sure what these do
            go.AddOrGet <LoopingSounds>();
            ShinseiChiller shinseiChiller = go.AddOrGet <ShinseiChiller>();

            //go.AddOrGet<KAnimControllerBase>().TintColour = Color();

            //For a heater, this only allows it to run until it hits that temp
            //For a chiller, if it gets that hot (can't cool enough) it stops trying
            //Basically, should equal melting for a cooler
            shinseiChiller.targetTemperature = 1600.15f;

            //this requires an ElementConverter, it's basically an internal anti-entrophy machine
            go.AddOrGet <MassiveHeatSink>();

            //can hold 1kg of whatever (in this case, hydrogen, which is a bit)
            go.AddOrGet <Storage>().capacityKg = 1f;

            //required ElementConverter that is the consumer, with a list (of size one) of elements it eats
            go.AddOrGet <ElementConverter>().consumedElements = new ElementConverter.ConsumedElement[]
            {
                new ElementConverter.ConsumedElement(ElementLoader.FindElementByHash(SimHashes.Hydrogen).tag, 0.01f)
            };

            //here's how that hydrogen above is going to actually get to the converter
            ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>();

            conduitConsumer.conduitType          = ConduitType.Gas;
            conduitConsumer.consumptionRate      = 1f;
            conduitConsumer.capacityTag          = GameTagExtensions.Create(SimHashes.Hydrogen);
            conduitConsumer.capacityKG           = 1f;
            conduitConsumer.forceAlwaysSatisfied = true;
            conduitConsumer.wrongElementResult   = ConduitConsumer.WrongElementResult.Dump;

            //required ElementConverter that is the producer, with a list (of nothing, no output) of elements it generates
            ElementConverter elementConverter = go.AddOrGet <ElementConverter>();

            elementConverter.outputElements = new ElementConverter.OutputElement[0];

            //sets the minimum temperature of the building before it stops working
            //CRUCIAL if a heat-negating building, otherwise you get a crash
            go.AddOrGet <MinimumOperatingTemperature>().minimumTemperature = 120f;
        }