-
Notifications
You must be signed in to change notification settings - Fork 1
/
ProfitableOfficesMod.cs
52 lines (44 loc) · 1.53 KB
/
ProfitableOfficesMod.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Thanks to Zenya (https://steamcommunity.com/profiles/76561197980466749) for sharing the 'Profitable Tourism' source, which this mod extends from!
using System.Reflection;
using ColossalFramework.Plugins;
using UnityEngine;
using ICities;
// !! Do not perform code updates that depend on features from .NET 4 or higher (i.e expression body styles, null coalescing, etc.) !!
namespace CS_Profitable_Offices
{
public class ProfitableOfficesMod : IUserMod
{
private string Version
{
get { return Assembly.GetExecutingAssembly().GetName().Version.ToString(); }
}
public string Name
{
get
{
return "Profitable Offices Mod (version " + Version + ")";
}
}
public string Description
{
get
{
return "Helps you earn more from office zones";
}
}
public void OnSettingsUI(UIHelperBase helper)
{
helper.AddDropdown(
"Office Income Multiplier",
ModOptions.OfficeIncomeMultipliersStr,
ModOptions.Instance.GetOfficeIncomeMultiplierIndex(),
OfficeIncomeMultiplierOnSelected
);
}
private static void OfficeIncomeMultiplierOnSelected(int sel)
{
ModOptions.Instance.OfficeIncomeMultiplier = ModOptions.OfficeIncomeMultipliers[sel];
ModOptions.Instance.Save();
}
}
}