summaryrefslogtreecommitdiff
path: root/Thronefall_1_57/Decompile/Thronefall/Choice.cs
blob: 07d72c03efd63b4cb7fe6691e11d58ea70104968 (plain)
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
using System;
using UnityEngine;

[Serializable]
public class Choice
{
	public bool disabledInThisMode;

	public string name = "<nameHere>";

	[TextArea]
	public string tooltip = "<tooltipHere>";

	public Sprite icon;

	public EquippableBuildingUpgrade requiresUnlocked;

	public bool CanBePicked
	{
		get
		{
			if (!LevelProgressManager.instance.AreAllBuildOptionsUnlockedInThisLevel())
			{
				if (!(requiresUnlocked == null))
				{
					return PerkManager.instance.UnlockedEquippables.Contains(requiresUnlocked);
				}
				return true;
			}
			return true;
		}
	}

	public Choice(string _name, string _tooltip, Sprite _icon = null)
	{
		name = _name;
		tooltip = _tooltip;
		icon = null;
	}
}