Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
PassLegacy.cs
Go to the documentation of this file.
2using Terraria.IO;
4
6
7public class PassLegacy : GenPass
8{
10 {
11 { "Reset", 2.2056f },
12 { "Terrain", 449.3722f },
13 { "Tunnels", 5.379f },
14 { "Dunes", 779.3144f },
15 { "Mount Caves", 36.1749f },
16 { "Dirt Wall Backgrounds", 238.8786f },
17 { "Rocks In Dirt", 1539.898f },
18 { "Dirt In Rocks", 1640.048f },
19 { "Clay", 302.2475f },
20 { "Small Holes", 3047.0989f },
21 { "Dirt Layer Caves", 250.0248f },
22 { "Rock Layer Caves", 2635.903f },
23 { "Surface Caves", 41.3442f },
24 { "Slush Check", 62.3121f },
25 { "Grass", 27.8485f },
26 { "Jungle", 10154.652f },
27 { "Marble", 3140.9263f },
28 { "Granite", 6769.5537f },
29 { "Mud Caves To Grass", 29042.46f },
30 { "Full Desert", 7802.5093f },
31 { "Floating Islands", 1504.831f },
32 { "Mushroom Patches", 1001.2097f },
33 { "Mud To Dirt", 355.9895f },
34 { "Silt", 198.4567f },
35 { "Shinies", 253.9256f },
36 { "Webs", 53.7234f },
37 { "Underworld", 9213.443f },
38 { "Lakes", 14.6001f },
39 { "Corruption", 1367.0684f },
40 { "Dungeon", 386.8962f },
41 { "Slush", 56.7959f },
42 { "Mountain Caves", 14.2958f },
43 { "Beaches", 7.6043f },
44 { "Gems", 1016.7447f },
45 { "Gravitating Sand", 875.1385f },
46 { "Clean Up Dirt", 632.9365f },
47 { "Pyramids", 0.3045f },
48 { "Dirt Rock Wall Runner", 24.1628f },
49 { "Living Trees", 5.6897f },
50 { "Wood Tree Walls", 72.6673f },
51 { "Altars", 24.975f },
52 { "Wet Jungle", 18.2339f },
53 { "Remove Water From Sand", 14.3244f },
54 { "Jungle Temple", 838.0293f },
55 { "Hives", 7194.6797f },
56 { "Jungle Chests", 2.3522f },
57 { "Smooth World", 6418.349f },
58 { "Settle Liquids", 13069.065f },
59 { "Waterfalls", 4614.8057f },
60 { "Ice", 236.3986f },
61 { "Wall Variety", 5988.0283f },
62 { "Traps", 113.9219f },
63 { "Life Crystals", 3.4912f },
64 { "Statues", 72.0258f },
65 { "Buried Chests", 2371.8806f },
66 { "Surface Chests", 22.1015f },
67 { "Jungle Chests Placement", 11.6857f },
68 { "Water Chests", 18.6092f },
69 { "Spider Caves", 8218.94f },
70 { "Gem Caves", 96.4863f },
71 { "Moss", 4440.283f },
72 { "Temple", 12.6321f },
73 { "Ice Walls", 8744.889f },
74 { "Jungle Trees", 933.2522f },
75 { "Floating Island Houses", 2.8349f },
76 { "Quick Cleanup", 1339.9095f },
77 { "Pots", 1363.3501f },
78 { "Spreading Grass", 80.3414f },
79 { "Piles", 274.4605f },
80 { "Cactus", 30.4524f },
81 { "Spawn Point", 0.3068f },
82 { "Grass Wall", 512.8323f },
83 { "Guide", 3.1494f },
84 { "Sunflowers", 4.7643f },
85 { "Planting Trees", 356.2866f },
86 { "Herbs", 123.8192f },
87 { "Dye Plants", 437.3852f },
88 { "Webs And Honey", 770.3133f },
89 { "Weeds", 224.6974f },
90 { "Mud Caves To Grass 2", 737.635f },
91 { "Jungle Plants", 1037.0977f },
92 { "Vines", 897.331f },
93 { "Flowers", 1.3216f },
94 { "Mushrooms", 0.7789f },
95 { "Stalac", 1079.5092f },
96 { "Gems In Ice Biome", 14.8002f },
97 { "Random Gems", 15.3893f },
98 { "Moss Grass", 770.8217f },
99 { "Muds Walls In Jungle", 73.5705f },
100 { "Larva", 0.5222f },
101 { "Settle Liquids Again", 7461.561f },
102 { "Tile Cleanup", 1813.0399f },
103 { "Lihzahrd Altars", 0.2171f },
104 { "Micro Biomes", 24240.068f },
105 { "Final Cleanup", 1768.4618f }
106 };
107
109 {
110 { "Reset", 0.9667f },
111 { "Terrain", 507.352f },
112 { "Dunes", 239.7913f },
113 { "Ocean Sand", 10.4129f },
114 { "Sand Patches", 452.6755f },
115 { "Tunnels", 4.3622f },
116 { "Mount Caves", 49.9993f },
117 { "Dirt Wall Backgrounds", 328.7817f },
118 { "Rocks In Dirt", 1537.4661f },
119 { "Dirt In Rocks", 1515.2301f },
120 { "Clay", 314.8327f },
121 { "Small Holes", 2955.9258f },
122 { "Dirt Layer Caves", 238.2545f },
123 { "Rock Layer Caves", 2708.3958f },
124 { "Surface Caves", 42.3857f },
125 { "Generate Ice Biome", 100.005f },
126 { "Grass", 29.7885f },
127 { "Jungle", 11205.83f },
128 { "Marble", 5358.8843f },
129 { "Granite", 2142.6638f },
130 { "Mud Caves To Grass", 3319.761f },
131 { "Full Desert", 9730.408f },
132 { "Floating Islands", 1364.3461f },
133 { "Mushroom Patches", 743.7686f },
134 { "Dirt To Mud", 351.3519f },
135 { "Silt", 211.84f },
136 { "Shinies", 237.4298f },
137 { "Webs", 50.6646f },
138 { "Underworld", 8936.494f },
139 { "Lakes", 12.1766f },
140 { "Corruption", 1094.237f },
141 { "Dungeon", 477.1963f },
142 { "Slush", 55.1857f },
143 { "Mountain Caves", 11.4819f },
144 { "Beaches", 7.8287f },
145 { "Gems", 895.426f },
146 { "Gravitating Sand", 933.5295f },
147 { "Clean Up Dirt", 697.0276f },
148 { "Pyramids", 6.6884f },
149 { "Dirt Rock Wall Runner", 24.7648f },
150 { "Living Trees", 4.937f },
151 { "Wood Tree Walls", 76.8709f },
152 { "Altars", 72.6607f },
153 { "Wet Jungle", 23.492f },
154 { "Remove Water From Sand", 22.0898f },
155 { "Jungle Temple", 595.8422f },
156 { "Hives", 371.392f },
157 { "Jungle Chests", 0.5896f },
158 { "Smooth World", 5841.608f },
159 { "Settle Liquids", 9398.525f },
160 { "Waterfalls", 4118.666f },
161 { "Ice", 163.0777f },
162 { "Wall Variety", 5264.0215f },
163 { "Life Crystals", 2.7582f },
164 { "Statues", 64.5737f },
165 { "Buried Chests", 1102.5532f },
166 { "Surface Chests", 12.8337f },
167 { "Jungle Chests Placement", 1.3546f },
168 { "Water Chests", 12.5981f },
169 { "Spider Caves", 475.4143f },
170 { "Gem Caves", 36.0143f },
171 { "Moss", 655.8314f },
172 { "Temple", 5.6917f },
173 { "Ice Walls", 957.0317f },
174 { "Jungle Trees", 817.2459f },
175 { "Floating Island Houses", 1.5022f },
176 { "Quick Cleanup", 1374.467f },
177 { "Pots", 1638.6091f },
178 { "Hellforge", 2.8645f },
179 { "Spreading Grass", 127.7581f },
180 { "Place Fallen Log", 17.3377f },
181 { "Traps", 562.9085f },
182 { "Piles", 288.3675f },
183 { "Spawn Point", 0.012f },
184 { "Grass Wall", 604.9992f },
185 { "Guide", 0.016f },
186 { "Sunflowers", 4.1757f },
187 { "Planting Trees", 325.0993f },
188 { "Cactus & Coral", 31.6349f },
189 { "Herbs", 120.1871f },
190 { "Dye Plants", 226.6394f },
191 { "Webs And Honey", 608.9524f },
192 { "Weeds", 187.9759f },
193 { "Mud Caves To Grass 2", 686.4958f },
194 { "Jungle Plants", 1295.0378f },
195 { "Vines", 1132.5549f },
196 { "Flowers", 16.7723f },
197 { "Mushrooms", 0.2294f },
198 { "Gems In Ice Biome", 10.3092f },
199 { "Random Gems", 18.4925f },
200 { "Moss Grass", 687.742f },
201 { "Muds Walls In Jungle", 89.7739f },
202 { "Larva", 0.2074f },
203 { "Settle Liquids Again", 7073.647f },
204 { "Tile Cleanup", 1896.7603f },
205 { "Lihzahrd Altars", 0.0071f },
206 { "Micro Biomes", 3547.4304f },
207 { "Stalac", 1180.9058f },
208 { "Remove Broken Traps", 1293.4247f },
209 { "Final Cleanup", 2080.294f }
210 };
211
213
215 : base(name, GetWeight(name))
216 {
217 _method = method;
218 }
219
220 public PassLegacy(string name, WorldGenLegacyMethod method, double weight)
221 : base(name, weight)
222 {
223 _method = method;
224 }
225
226 private static float GetWeight(string name)
227 {
228 if (!_weightMap.TryGetValue(name, out var value))
229 {
230 return 1f;
231 }
232 return value;
233 }
234
235 protected override void ApplyPass(GenerationProgress progress, GameConfiguration configuration)
236 {
237 _method(progress, configuration);
238 }
239}
PassLegacy(string name, WorldGenLegacyMethod method)
static readonly Dictionary< string, float > _weightMap_135
Definition PassLegacy.cs:9
static float GetWeight(string name)
override void ApplyPass(GenerationProgress progress, GameConfiguration configuration)
PassLegacy(string name, WorldGenLegacyMethod method, double weight)
static readonly Dictionary< string, float > _weightMap
readonly WorldGenLegacyMethod _method
delegate void WorldGenLegacyMethod(GenerationProgress progress, GameConfiguration configuration)