public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { GeneratedBuildings.MakeBuildingAlwaysOperational(go); BuildingConfigManager.Instance.IgnoreDefaultKComponent(typeof(RequiresFoundation), prefab_tag); Conduit conduit = go.AddOrGet <Conduit>(); conduit.type = ConduitType.Liquid; go.AddOrGet <Tintable>(); Tintable.AddToTintTable(ID, new Color32(255, 0, 0, 255)); }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { GeneratedBuildings.MakeBuildingAlwaysOperational(go); BuildingConfigManager.Instance.IgnoreDefaultKComponent(typeof(RequiresFoundation), prefab_tag); ValveBase valveBase = go.AddOrGet <ValveBase>(); valveBase.conduitType = CONDUIT_TYPE; valveBase.maxFlow = 100f; valveBase.animFlowRanges = new ValveBase.AnimRangeInfo[3] { new ValveBase.AnimRangeInfo(30f, "lo"), new ValveBase.AnimRangeInfo(70f, "med"), new ValveBase.AnimRangeInfo(100f, "hi") }; go.AddOrGet <Valve>(); Tintable tint = go.AddOrGet <Tintable>(); Tintable.AddToTintTable(ID, new Color32(255, 40, 40, 255)); Workable workable = go.AddOrGet <Workable>(); workable.workTime = 5f; }