Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
            }                                                 // skip original method

            static void Postfix(GameObject go)
            {
                RocketEngineImproved rocketEngine = go.AddOrGet <RocketEngineImproved>();

                rocketEngine.ExhaustVelocity = SteamEngineStats.ExhaustVelocity;
                rocketEngine.RangePenalty    = SteamEngineStats.RangePenalty;
                rocketEngine.MinFuel         = SteamEngineStats.MinFuel;
                rocketEngine.MaxFuel         = SteamEngineStats.MaxFuel;
                rocketEngine.OnlyFuel        = true;

                rocketEngine.fuelTag             = ElementLoader.FindElementByHash(SimHashes.Steam).tag;
                rocketEngine.explosionEffectHash = SpawnFXHashes.MeteorImpactDust;
                rocketEngine.requireOxidizer     = false;
                rocketEngine.exhaustElement      = SimHashes.Steam;
                rocketEngine.exhaustTemperature  = ElementLoader.FindElementByHash(SimHashes.Steam).lowTemp + 50f;
                FuelTank fuelTank = go.AddOrGet <FuelTank>();

                fuelTank.capacityKg = SteamEngineStats.MaxStorage;
                fuelTank.FuelType   = ElementLoader.FindElementByHash(SimHashes.Steam).tag;

                var list = new List <Storage.StoredItemModifier>();

                list.Add(Storage.StoredItemModifier.Hide);
                list.Add(Storage.StoredItemModifier.Seal);
                list.Add(Storage.StoredItemModifier.Insulate);
                fuelTank.SetDefaultStoredItemModifiers(list);

                ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>();

                conduitConsumer.conduitType          = ConduitType.Gas;
                conduitConsumer.consumptionRate      = 10f;
                conduitConsumer.capacityTag          = fuelTank.FuelType;
                conduitConsumer.capacityKG           = SteamEngineStats.MaxStorage;
                conduitConsumer.forceAlwaysSatisfied = true;
                conduitConsumer.wrongElementResult   = ConduitConsumer.WrongElementResult.Dump;
                go.AddOrGet <RocketModule>().SetBGKAnim(Assets.GetAnim("rocket_steam_engine_bg_kanim"));
                EntityTemplates.ExtendBuildingToRocketModule(go);
            }