-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAlgaeDistilleryPatch.cs
35 lines (32 loc) · 1.34 KB
/
AlgaeDistilleryPatch.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
32
33
34
35
using HarmonyLib;
using UnityEngine;
class AlgaeDistilleryPatches
{
[HarmonyPatch(typeof(AlgaeDistilleryConfig), nameof(AlgaeDistilleryConfig.CreateBuildingDef))]
class AlgaeDistillery_CreateBuildingDef_Patch
{
public static void Postfix(BuildingDef __result)
{
__result.EnergyConsumptionWhenActive = 240f;
__result.ExhaustKilowattsWhenActive = 0.25f;
__result.SelfHeatKilowattsWhenActive = 0.75f;
}
}
[HarmonyPatch(typeof(AlgaeDistilleryConfig), nameof(AlgaeDistilleryConfig.ConfigureBuildingTemplate))]
class AlgaeDistillery_ConfigureBuildingTemplate_Patch
{
public static void Postfix(GameObject go)
{
ElementConverter elementConverter = go.GetComponent<ElementConverter>();
elementConverter.consumedElements = new ElementConverter.ConsumedElement[1]
{
new ElementConverter.ConsumedElement(SimHashes.SlimeMold.CreateTag(), 3f)
};
elementConverter.outputElements = new ElementConverter.OutputElement[2]
{
new ElementConverter.OutputElement(1f, SimHashes.Algae, 303.15f, storeOutput: true, outputElementOffsety: 1f),
new ElementConverter.OutputElement(2f, SimHashes.DirtyWater, 303.15f, storeOutput: true)
};
}
}
}