-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathOptions.cs
171 lines (145 loc) · 5.45 KB
/
Options.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
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
using System.Collections.Generic;
namespace BMG
{
public class OptionsBase
{
public int format { get; set; }
}
public class Options1 : OptionsBase
{
public string setPath { get; set; }
public string preset { get; set; }
public BatchSettings[] batch { get; set; }
public string exportFileName { get; set; } = "bmg_?number?.png";
public string exportFolderName { get; set; } = "output";
public bool saveLogFile { get; set; } = true;
public ConsoleOptions console { get; set; } = new ConsoleOptions();
public Title title { get; set; } = new Title();
public Render render { get; set; } = new Render();
public AutoCrop autoCrop { get; set; } = new AutoCrop();
public AssetSwitcher[] assetSwitchers { get; set; }
public Randomizers randomizers { get; set; } = new Randomizers();
public class Replace
{
public char from { get; set; }
public char to { get; set; }
}
public class BatchSettings
{
public string name { get; set; } = "?number?";
public string[] map { get; set; }
public int biome { get; set; }
public int sizeMultiplier { get; set; }
public char[] skipTiles { get; set; } = new char[0];
public Replace[] replaceTiles { get; set; }
public string exportFileName { get; set; }
public Tiledata.TileDefault[] overrideBiome { get; set; }
public SpecialTileRules[] specialTileRules { get; set; }
public float[] emptyBorderAmount { get; set; } = new float[] { 1 };
public string gamemode { get; set; }
public int? randomSeed { get; set; }
public Dictionary<string, Metadata[]> mapMetadata { get; set; }
}
public class ConsoleOptions
{
public bool setup { get; set; } = true;
public bool tileDraw { get; set; } = true;
public bool orderedHorTileDraw { get; set; } = true;
public bool orderedTileDraw { get; set; } = true;
public bool saveLocation { get; set; } = true;
public bool aal { get; set; } = true;
public bool statusChange { get; set; } = true;
public bool gamemodeModding { get; set; } = true;
}
public class SpecialTileRules
{
public char tileCode { get; set; }
public int tileTime { get; set; }
public int tileType { get; set; }
}
public class RecordedSTR
{
public char tileCode { get; set; }
public int tileTime { get; set; }
}
public static void RecordRSTR(List<RecordedSTR> rstrArray, char tileCode)
{
foreach (var rstro in rstrArray)
if (rstro.tileCode == tileCode)
{
rstro.tileTime++;
return;
}
rstrArray.Add(new RecordedSTR()
{
tileCode = tileCode,
tileTime = 0
});
}
public class AppInfo
{
public bool showVersion { get; set; } = true;
}
public class Job
{
public char percentageBarFillCharacter { get; set; } = '#';
public char percentageBarBackgroundCharacter { get; set; } = '-';
public string order { get; set; } = "?percentage? [?progressBar?] ?jobName? ?jobsRatio?";
}
public class Status
{
public char percentageBarFillCharacter { get; set; } = '#';
public char percentageBarBackgroundCharacter { get; set; } = '-';
public string order { get; set; } = "?percentage? [?progressBar?] ?statusText? ?actionRatio?";
}
public class StatusDetails
{
public bool showBiome { get; set; } = true;
public bool showTile { get; set; } = true;
}
public class Modules
{
public AppInfo appInfo { get; set; } = new AppInfo();
public Job job { get; set; } = new Job();
public Status status { get; set; } = new Status();
public StatusDetails statusDetails { get; set; } = new StatusDetails();
}
public class Title
{
public Modules modules { get; set; } = new Modules();
public string layout { get; set; } = "?appInfo? - ?job? - ?status? - ?statusDetails?";
public bool disableUpdate { get; set; } = false;
}
public class Render
{
public int[] include { get; set; } = { };
public int[] exclude { get; set; } = { };
}
public class AutoCrop
{
public bool enabled { get; set; } = false;
public char[] tiles { get; set; } = { };
}
public class AssetSwitcher
{
public TileAsset find { get; set; }
public TileAsset replace { get; set; }
}
public class TileAsset
{
public string tile { get; set; }
public int type { get; set; }
}
public class Randomizers
{
public bool enabled { get; set; } = true;
public int? seed { get; set; }
}
public class Metadata
{
public int x { get; set; }
public int y { get; set; }
public int t { get; set; }
}
}
}