Beispiel #1
0
        // 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)
        {
            Prioritizable.AddRef(go);
            Storage storage1 = go.AddComponent <Storage>();

            storage1.showInUI             = true;
            storage1.allowItemRemoval     = false;
            storage1.ignoreSourcePriority = true;
            storage1.showDescriptor       = true;
            storage1.storageFilters       = STORAGEFILTERS.NOT_EDIBLE_SOLIDS;
            storage1.storageFullMargin    = STORAGE.STORAGE_LOCKER_FILLED_MARGIN;
            storage1.fetchCategory        = Storage.FetchCategory.Building;
            storage1.capacityKg           = 25f;
            storage1.allowClearable       = false;
            Storage storage2 = go.AddComponent <Storage>();

            storage2.showInUI             = true;
            storage2.allowItemRemoval     = true;
            storage2.ignoreSourcePriority = true;
            storage2.showDescriptor       = true;
            List <Tag> tagList = new List <Tag>();

            tagList.AddRange((IEnumerable <Tag>)STORAGEFILTERS.NOT_EDIBLE_SOLIDS);
            tagList.AddRange((IEnumerable <Tag>)STORAGEFILTERS.FOOD);
            tagList.AddRange((IEnumerable <Tag>)STORAGEFILTERS.LIQUIDS);
            storage2.storageFilters                = tagList;
            storage2.storageFullMargin             = STORAGE.STORAGE_LOCKER_FILLED_MARGIN;
            storage2.fetchCategory                 = Storage.FetchCategory.StorageSweepOnly;
            storage2.capacityKg                    = 1000f;
            storage2.allowClearable                = true;
            storage2.onlyTransferFromLowerPriority = true;
            go.AddOrGet <CharacterOverlay>();
            // Non DLC:
            // go.AddOrGet<SweepBotStation>();
            // DLC:
            go.AddOrGet <SweepBotStation>().SetStorages(storage1, storage2);
            dispenser                = go.AddOrGet <SolidConduitDispenser>();
            dispenser.storage        = storage2;
            dispenser.alwaysDispense = true;
        }