forked from Barhidous/CulturedStart
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCSCharCreationOption.cs
More file actions
150 lines (131 loc) · 4.36 KB
/
CSCharCreationOption.cs
File metadata and controls
150 lines (131 loc) · 4.36 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TaleWorlds.CampaignSystem;
using TaleWorlds.CampaignSystem.GameState;
using TaleWorlds.Core;
using TaleWorlds.ObjectSystem;
using TaleWorlds.SaveSystem;
using TaleWorlds.Library;
using TaleWorlds.Localization;
using StoryMode.CharacterCreationSystem;
namespace zCulturedStart
{
public class CSCharCreationOption
{
private static int _CSSelcOption;
// 1 = Default 2 = merchant 3 = Exiled 4 = merc 5 = looter
public static int CSSelectOption
{
get
{
return _CSSelcOption;
}
set
{
_CSSelcOption = value;
}
}
private static int _CSGameOption;
// 0 = FP default 1 = Fp nezzy 2 = fp sandbox 3 = default 4= nezzy 5 = sandbox no kingdom
//[SaveableProperty(1)]
public static int CSGameOption
{
get
{
return _CSGameOption;
}
set
{
_CSGameOption = value;
}
}
private static int _CSLocationOption;
// 0 = home town 1 = Random location 2 - 8 = specific town
public static int CSLocationOption
{
get
{
return _CSLocationOption;
}
set
{
_CSLocationOption = value;
}
}
public static Settlement cultureSettlement(Hero hero)
{
//var result;
string sCulture = hero.MapFaction.Culture.StringId;
switch (sCulture)
{
case "sturgia":
return Settlement.Find("town_S2");
case "aserai":
return Settlement.Find("town_A8");
case "vlandia":
return Settlement.Find("town_V3");
case "battania":
return Settlement.Find("town_B2");
case "khuzait":
return Settlement.Find("town_K4");
default:
return Settlement.Find("town_ES3");
}
}
public static Settlement cultureSettlement(string sCulture)
{
//var result;
//string sCulture = hero.MapFaction.Culture.StringId;
switch (sCulture)
{
case "sturgia":
return Settlement.Find("town_S2");
case "aserai":
return Settlement.Find("town_A8");
case "vlandia":
return Settlement.Find("town_V3");
case "battania":
return Settlement.Find("town_B2");
case "khuzait":
return Settlement.Find("town_K4");
default:
return Settlement.Find("town_EW2");
}
}
public static Settlement RandcultureSettlement()
{
//var result;
return Settlement.FindAll((Settlement x) => x.IsTown).GetRandomElement<Settlement>();
}
public static Settlement CSOptionSettlement()
{
int opt = CSCharCreationOption.CSLocationOption;
switch (opt)
{
case 0:
return CSCharCreationOption.cultureSettlement(Hero.MainHero);
case 1:
return CSCharCreationOption.RandcultureSettlement();
case 2:
return Settlement.Find("town_A8");
case 3:
return Settlement.Find("town_B2");
case 4:
return Settlement.Find("town_EW2");
case 5:
return Settlement.Find("town_S2");
case 6:
return Settlement.Find("town_K4");
case 7:
return Settlement.Find("town_V3");
case 8:
return CSCharCreationOption.cultureSettlement(Hero.MainHero);
default:
return Settlement.Find("tutorial_training_field");
}
}
}
}