Esempio n. 1
0
    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>();
    }
Esempio n. 2
0
    public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag)
    {
        Storage storage = BuildingTemplates.CreateDefaultStorage(go, false);

        storage.showDescriptor   = true;
        storage.storageFilters   = STORAGEFILTERS.GASES;
        storage.capacityKg       = 10f;
        storage.allowItemRemoval = false;
        go.AddOrGet <DropAllWorkable>();
        GasBottler gasBottler = go.AddOrGet <GasBottler>();

        gasBottler.storage  = storage;
        gasBottler.workTime = 9f;
        ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>();

        conduitConsumer.storage              = storage;
        conduitConsumer.conduitType          = ConduitType.Gas;
        conduitConsumer.ignoreMinMassCheck   = true;
        conduitConsumer.forceAlwaysSatisfied = true;
        conduitConsumer.alwaysConsume        = true;
        conduitConsumer.capacityKG           = storage.capacityKg;
        conduitConsumer.keepZeroMassObject   = false;
    }
 public Instance(GasBottler master)
     : base(master)
 {
 }