forked from Falconne/ImprovedWorkbenches
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cs
More file actions
66 lines (51 loc) · 1.88 KB
/
Main.cs
File metadata and controls
66 lines (51 loc) · 1.88 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using HugsLib.Settings;
using HugsLib.Utils;
using RimWorld;
using UnityEngine;
using Verse;
namespace ImprovedWorkbenches
{
public class Main : HugsLib.ModBase
{
public Main()
{
Instance = this;
}
public override void WorldLoaded()
{
base.WorldLoaded();
_extendedBillDataStorage =
UtilityWorldObjectManager.GetUtilityWorldObject<ExtendedBillDataStorage>();
BillCopyPasteHandler.Clear();
}
public override void DefsLoaded()
{
_expandBillsTab = Settings.GetHandle(
"expandBillsTab", "IW.AutoOpenBillTabLabel".Translate(),
"IW.AutoOpenBillTabDesc".Translate(), true);
_showIngredientCount = Settings.GetHandle(
"showIngredientCount", "IW.ShowItemCountInFilterLabel".Translate(),
"IW.ShowItemCountInFilterDesc".Translate(), true);
}
public bool ShouldExpandBillsTab()
{
return _expandBillsTab;
}
public void OnProductionDialogBeingShown()
{
IsRootBillFilterBeingDrawn = _showIngredientCount;
}
public ExtendedBillDataStorage GetExtendedBillDataStorage()
{
return _extendedBillDataStorage;
}
internal new ModLogger Logger => base.Logger;
internal static Main Instance { get; private set; }
public readonly BillCopyPaste BillCopyPasteHandler = new BillCopyPaste();
public bool IsRootBillFilterBeingDrawn = false;
public override string ModIdentifier => "ImprovedWorkbenches";
private SettingHandle<bool> _expandBillsTab;
private SettingHandle<bool> _showIngredientCount;
private ExtendedBillDataStorage _extendedBillDataStorage;
}
}