-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEthanolDistilleryPatches.cs
31 lines (28 loc) · 1.16 KB
/
EthanolDistilleryPatches.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using HarmonyLib;
using UnityEngine;
class EthanolDistilleryPatches
{
[HarmonyPatch(typeof(EthanolDistilleryConfig), nameof(EthanolDistilleryConfig.CreateBuildingDef))]
class EthanolDistillery_CreateBuildingDef_Patch
{
public static void Postfix(BuildingDef __result)
{
__result.EnergyConsumptionWhenActive = 60f;
__result.SelfHeatKilowattsWhenActive = 1.5f;
}
}
[HarmonyPatch(typeof(EthanolDistilleryConfig), nameof(EthanolDistilleryConfig.ConfigureBuildingTemplate))]
class EthanolDistillery_ConfigureBuildingTemplate_Patch
{
public static void Postfix(GameObject go)
{
ElementConverter elementConverter = go.GetComponent<ElementConverter>();
elementConverter.outputElements = new ElementConverter.OutputElement[3]
{
new ElementConverter.OutputElement(0.6f, SimHashes.Ethanol, 323.15f, storeOutput: true),
new ElementConverter.OutputElement(0.3f, SimHashes.ToxicSand, 323.15f, storeOutput: true),
new ElementConverter.OutputElement(0.1f, SimHashes.CarbonDioxide, 343.15f)
};
}
}
}