public override void ConfigureBuildingTemplate(UnityEngine.GameObject go, Tag prefab_tag)
        {
            BuildingConfigManager.Instance.IgnoreDefaultKComponent(typeof(RequiresFoundation), TAG);
            Prioritizable.AddRef(go);

            var storage = go.AddOrGet <global::Storage>();

            storage.showInUI          = true;
            storage.showDescriptor    = true;
            storage.storageFilters    = StorageFilters;
            storage.allowItemRemoval  = true;
            storage.capacityKg        = 12000;
            storage.storageFullMargin = STORAGE.STORAGE_LOCKER_FILLED_MARGIN;
            storage.fetchCategory     = global::Storage.FetchCategory.GeneralStorage;
            storage.SetDefaultStoredItemModifiers(StoredItemModifiers);

            go.AddOrGet <EnergyConsumer>().powerSortOrder = 4; // TODO is there a TUNING enum for this?
            go.AddOrGet <StorageCold>();

            go.AddOrGet <CopyBuildingSettings>().copyGroupTag = TAG;
            go.AddOrGet <StorageLocker>();
            go.AddOrGet <StorageContainer>();
            go.AddOrGet <LogicStorageSensor>();
            go.AddOrGet <DropAllWorkable>();

            go.AddOrGet <BuildingAttachPoint>().points = new BuildingAttachPoint.HardPoint[1]
            {
                new BuildingAttachPoint.HardPoint(new CellOffset(0, 3), StorageContainerConfig.TAG, null)
            };
        }
Esempio n. 2
0
        public override void ConfigureBuildingTemplate(UnityEngine.GameObject go, Tag prefab_tag)
        {
            BuildingConfigManager.Instance.IgnoreDefaultKComponent(typeof(RequiresFoundation), TAG);
            // TODO handle stacking better so the building needs a foundation, might need to patch BuildingDef.CheckFoundation or RequiresFoundation

            var storage = go.AddOrGet <global::Storage>();

            storage.showInUI          = true;
            storage.showDescriptor    = true;
            storage.storageFilters    = TUNING.STORAGEFILTERS.NOT_EDIBLE_SOLIDS;
            storage.allowItemRemoval  = true;
            storage.capacityKg       *= 10;
            storage.storageFullMargin = STORAGE.STORAGE_LOCKER_FILLED_MARGIN;
            storage.fetchCategory     = global::Storage.FetchCategory.GeneralStorage;

            go.AddOrGet <StorageLocker>();
            go.AddOrGet <StorageContainer>();
            go.AddOrGet <LogicStorageSensor>();
            go.AddOrGet <DropAllWorkable>();
            go.AddOrGet <UserNameable>();

            go.AddOrGet <CopyBuildingSettings>().copyGroupTag = TAG;
            go.AddOrGet <BuildingAttachPoint>().points        = new BuildingAttachPoint.HardPoint[1]
            {
                new BuildingAttachPoint.HardPoint(new CellOffset(0, 3), TAG, null)
            };
        }
Esempio n. 3
0
        public override void ConfigureBuildingTemplate(UnityEngine.GameObject go, Tag prefab_tag)
        {
            Prioritizable.AddRef(go);
            var storage = go.AddOrGet <global::Storage>();

            storage.showInUI          = true;
            storage.showDescriptor    = true;
            storage.storageFilters    = STORAGE_TAG;
            storage.allowItemRemoval  = true;
            storage.capacityKg       *= 4;
            storage.storageFullMargin = STORAGE.STORAGE_LOCKER_FILLED_MARGIN;
            storage.fetchCategory     = global::Storage.FetchCategory.GeneralStorage;
            go.AddOrGet <CopyBuildingSettings>().copyGroupTag = TAG;
            go.AddOrGet <StorageLocker>();
            go.AddOrGet <DropAllWorkable>();
        }
Esempio n. 4
0
        public override void ConfigureBuildingTemplate(UnityEngine.GameObject go, Tag prefab_tag)
        {
            Prioritizable.AddRef(go);

            var storage = go.AddOrGet <global::Storage>();

            storage.showInUI       = true;
            storage.showDescriptor = true;
            storage.storageFilters = new List <Tag>(
                PipLib.PLUtil.ArrayConcat(STORAGEFILTERS.FOOD.ToArray(),
                                          new Tag[] { GameTags.Liquifiable }));
            storage.allowItemRemoval  = true;
            storage.capacityKg        = 800;
            storage.storageFullMargin = STORAGE.STORAGE_LOCKER_FILLED_MARGIN;
            storage.fetchCategory     = global::Storage.FetchCategory.GeneralStorage;
            storage.SetDefaultStoredItemModifiers(global::Storage.StandardInsulatedStorage);

            go.AddOrGet <EnergyConsumer>().powerSortOrder = 4; // TODO is there a TUNING enum for this?
            go.AddOrGet <StorageCold>();

            go.AddOrGet <CopyBuildingSettings>().copyGroupTag = prefab_tag;
            go.AddOrGet <StorageLocker>();
            go.AddOrGet <LogicStorageSensor>();
        }
Esempio n. 5
0
 public override void DoPostConfigureComplete(UnityEngine.GameObject go)
 {
     go.AddOrGet<LogicCableIO>().isReader = true;
     go.GetComponent<KPrefabID>().AddTag(GameTags.OverlayInFrontOfConduits, false);
 }
 public override void DoPostConfigureComplete(UnityEngine.GameObject go)
 {
     go.GetComponent <KPrefabID>().AddTag(GameTags.OverlayInFrontOfConduits, false);
     go.AddOrGet <LogicBundledEmitter>();
 }