terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
GUICrafting.cs
Go to the documentation of this file.
1using System;
3using Controller;
6using Terraria;
7using Terraria.UI;
8
9// Token: 0x02000138 RID: 312
10public class GUICrafting
11{
12 // Token: 0x0600082C RID: 2092 RVA: 0x00020550 File Offset: 0x0001E750
13 public void Reset()
14 {
15 if (!true)
16 {
17 }
18 if (!true)
19 {
20 }
21 }
22
23 // Token: 0x170000D6 RID: 214
24 // (get) Token: 0x0600082D RID: 2093 RVA: 0x00020564 File Offset: 0x0001E764
25 public bool HasFocus
26 {
27 get
28 {
30 GUIItemFilter filter = this.Filter;
31 bool flag;
32 return flag;
33 }
34 }
35
36 // Token: 0x0600082E RID: 2094 RVA: 0x00020584 File Offset: 0x0001E784
37 public void DrawCraftButton()
38 {
39 int num = 1;
40 if (num == 0)
41 {
42 }
43 int focusRecipe = Main.focusRecipe;
44 if (num == 0)
45 {
46 }
48 int numAvailableRecipes = Main.numAvailableRecipes;
49 int size = this.FilteredItems._size;
50 if (this.Filter.Expanded)
51 {
53 }
54 }
55
56 // Token: 0x170000D7 RID: 215
57 // (get) Token: 0x0600082F RID: 2095 RVA: 0x000206F4 File Offset: 0x0001E8F4
59 {
60 get
61 {
62 int num;
63 int focusRecipe3;
64 do
65 {
66 num = 1;
67 if (num == 0)
68 {
69 }
70 int focusRecipe = Main.focusRecipe;
71 if (num == 0)
72 {
73 }
75 int numAvailableRecipes = Main.numAvailableRecipes;
76 if (num == 0)
77 {
78 }
79 int[] availableRecipe = Main.availableRecipe;
81 }
82 while (num == 0);
83 return focusRecipe3;
84 }
85 }
86
87 // Token: 0x170000D8 RID: 216
88 // (get) Token: 0x06000830 RID: 2096 RVA: 0x00020748 File Offset: 0x0001E948
90 {
91 get
92 {
94 if (craftHover != null)
95 {
96 Item[] requiredItem = craftHover.requiredItem;
97 return 15;
98 }
99 }
100 }
101
102 // Token: 0x170000D9 RID: 217
103 // (get) Token: 0x06000831 RID: 2097 RVA: 0x0002076C File Offset: 0x0001E96C
104 public bool Collapsed
105 {
106 get
107 {
108 if (!true)
109 {
110 }
112 bool flag;
113 return flag;
114 }
115 }
116
117 // Token: 0x06000832 RID: 2098 RVA: 0x00020788 File Offset: 0x0001E988
118 public void DrawExpandButton()
119 {
120 }
121
122 // Token: 0x06000833 RID: 2099 RVA: 0x00020798 File Offset: 0x0001E998
123 public void DrawMaterialsGridTooltip(Vector2 position)
124 {
128 Item[] requiredItem;
129 if (craftHover != null)
130 {
131 requiredItem = craftHover.requiredItem;
132 return;
133 }
134 if (requiredItem == null)
135 {
136 }
137 }
138
139 // Token: 0x06000834 RID: 2100 RVA: 0x000021DB File Offset: 0x000003DB
140 public void DrawMaterialsGrid()
141 {
142 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
143 }
144
145 // Token: 0x06000835 RID: 2101 RVA: 0x000207CC File Offset: 0x0001E9CC
147 {
148 if (!this.Filter.Expanded)
149 {
150 bool hasFocus = this.HasFocus;
153 double totalSeconds = (now - lastActivated).TotalSeconds;
154 if (this.materialsGridActive)
155 {
157 }
158 if (this.menuTogglePressed && !this.materialsGridActive)
159 {
162 guicontrollerCraftingMaterials.Activate();
163 return;
164 }
165 }
166 }
167
168 // Token: 0x06000836 RID: 2102 RVA: 0x0002084C File Offset: 0x0001EA4C
169 public void ResetFilters()
170 {
171 GUIItemFilter filter = this.Filter;
172 }
173
174 // Token: 0x06000837 RID: 2103 RVA: 0x000021DB File Offset: 0x000003DB
175 private void UpdateFilter(bool force = false)
176 {
177 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
178 }
179
180 // Token: 0x06000838 RID: 2104 RVA: 0x00020860 File Offset: 0x0001EA60
190
191 // Token: 0x06000839 RID: 2105 RVA: 0x00020888 File Offset: 0x0001EA88
192 public void RefreshGridNav()
193 {
194 int num = 1;
195 bool hasFocus = this.HasFocus;
196 int num2 = 1;
197 this.UpdateFilter(num2 != 0);
198 if (num == 0)
199 {
200 }
203 int focusRecipe = Main.focusRecipe;
205 if (guicontrollerCrafting != null)
206 {
207 }
208 }
209
210 // Token: 0x0600083A RID: 2106 RVA: 0x000208CC File Offset: 0x0001EACC
211 public void Draw()
212 {
213 int num = 1;
214 if (num == 0)
215 {
216 }
219 if (num == 0)
220 {
221 }
222 if (num == 0)
223 {
224 }
225 long num2 = 0L;
226 this.UpdateFilter(num2 != 0L);
228 int focusRecipe = Main.focusRecipe;
229 int size = this.FilteredItems._size;
234 if (rectangle == null)
235 {
236 }
237 int mouseX = Main.mouseX;
238 int mouseY = Main.mouseY;
239 }
240
241 // Token: 0x0600083B RID: 2107 RVA: 0x0002098C File Offset: 0x0001EB8C
242 public float CraftItemScale(int index)
243 {
244 /*
245An exception occurred when decompiling this method (0600083B)
246
247ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single GUICrafting::CraftItemScale(System.Int32)
248
249 ---> System.Exception: Basic block has to end with unconditional control flow.
250{
251 Block_0:
252 stloc:!0(var_0_05, callgetter:!0(PageControllerLayoutDefinition`1::get_Instance))
253}
254
255 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
256 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
257 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
258 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
259 --- End of inner exception stack trace ---
260 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
261 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
262*/;
263 }
264
265 // Token: 0x0600083C RID: 2108 RVA: 0x000209A0 File Offset: 0x0001EBA0
267 {
268 int num = 1;
269 int num2 = 1;
270 this.UpdateFilter(num2 != 0);
271 if (num == 0)
272 {
273 }
274 int numAvailableRecipes = Main.numAvailableRecipes;
275 if (num == 0)
276 {
277 }
278 int[] availableRecipe = Main.availableRecipe;
279 int num3 = this.multiCraftRecipe;
280 }
281
282 // Token: 0x0600083D RID: 2109 RVA: 0x000209E8 File Offset: 0x0001EBE8
284 {
285 if (!true)
286 {
287 }
288 int focusRecipe = Main.focusRecipe;
290 if (this.Filter.Expanded)
291 {
293 }
295 {
296 int type = Main.mouseItem.type;
297 if (type != 0)
298 {
299 if (type == 0)
300 {
301 }
303 if (stack != 0)
304 {
305 if (stack == 0)
306 {
307 }
308 Item mouseItem = Main.mouseItem;
309 int[] availableRecipe = Main.availableRecipe;
310 }
311 }
312 }
313 int type2 = Main.mouseItem.type;
314 int maxStack;
315 if (type2 != 0)
316 {
317 if (type2 == 0)
318 {
319 }
324 maxStack = Main.mouseItem.maxStack;
325 int num = this.multiCraftRecipe;
326 if (maxStack == 0)
327 {
328 }
330 }
331 if (maxStack == 0)
332 {
333 }
334 int myPlayer = Main.myPlayer;
335 }
336
337 // Token: 0x0600083E RID: 2110 RVA: 0x00020D6C File Offset: 0x0001EF6C
338 public void CraftItemOver(int index)
339 {
341 int num = 1;
342 this.wasOverItem = num != 0;
343 int size = filteredItems._size;
344 }
345
346 // Token: 0x0600083F RID: 2111 RVA: 0x00020E84 File Offset: 0x0001F084
347 public void CraftItemDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
348 {
349 int size = this.FilteredItems._size;
350 }
351
352 // Token: 0x06000840 RID: 2112 RVA: 0x00020F9C File Offset: 0x0001F19C
353 public float MaterialItemScale(int index)
354 {
355 /*
356An exception occurred when decompiling this method (06000840)
357
358ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single GUICrafting::MaterialItemScale(System.Int32)
359
360 ---> System.Exception: Basic block has to end with unconditional control flow.
361{
362 Block_0:
363 stloc:!0(var_0_05, callgetter:!0(PageControllerLayoutDefinition`1::get_Instance))
364}
365
366 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
367 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
368 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
369 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
370 --- End of inner exception stack trace ---
371 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
372 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
373*/;
374 }
375
376 // Token: 0x06000841 RID: 2113 RVA: 0x00020FB0 File Offset: 0x0001F1B0
378 {
379 }
380
381 // Token: 0x06000842 RID: 2114 RVA: 0x00020FC0 File Offset: 0x0001F1C0
382 public void MaterialItemOver(int index)
383 {
384 int num = 1;
385 if (num == 0)
386 {
387 }
388 int[] availableRecipe = Main.availableRecipe;
389 int focusRecipe = Main.focusRecipe;
390 if (num == 0)
391 {
392 return;
393 }
394 GUIItemFilter filter = this.Filter;
395 if (filter != null)
396 {
397 if (filter == null)
398 {
399 }
402 bool expanded = filter.Expanded;
410 return;
411 }
420 }
421
422 // Token: 0x06000843 RID: 2115 RVA: 0x00021268 File Offset: 0x0001F468
423 public void MaterialItemTooltipDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
424 {
427 int myPlayer = Main.myPlayer;
428 Item[] requiredItem = this.CraftHover.requiredItem;
429 Vector2 position3 = requiredItem.position;
431 if (requiredItem == null)
432 {
434 if (this.materialsGridActive)
435 {
436 int selectedItem = this.materialController.selectedItem;
439 }
440 }
441 }
442
443 // Token: 0x06000844 RID: 2116 RVA: 0x0002139C File Offset: 0x0001F59C
444 public void MaterialItemDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
445 {
446 int num = 1;
447 if (num == 0)
448 {
449 }
450 int[] availableRecipe = Main.availableRecipe;
451 int focusRecipe = Main.focusRecipe;
452 if (num != 0)
453 {
454 if (num == 0)
455 {
456 }
457 int myPlayer = Main.myPlayer;
463 if (this.materialsGridActive)
464 {
465 int selectedItem = this.materialController.selectedItem;
466 this.MaterialItemOver(index);
469 }
470 return;
471 }
474 }
475
476 // Token: 0x06000845 RID: 2117 RVA: 0x000214E4 File Offset: 0x0001F6E4
477 public GUICrafting()
478 {
479 }
480
481 // Token: 0x04000707 RID: 1799
482 private float CraftButtonScale = (float)16256;
483
484 // Token: 0x04000708 RID: 1800
485 private int Offset;
486
487 // Token: 0x04000709 RID: 1801
488 private int LastId;
489
490 // Token: 0x0400070A RID: 1802
492
493 // Token: 0x0400070B RID: 1803
494 private string LastSearch;
495
496 // Token: 0x0400070C RID: 1804
498
499 // Token: 0x0400070D RID: 1805
501
502 // Token: 0x0400070E RID: 1806
503 public float craftScrollOffset;
504
505 // Token: 0x0400070F RID: 1807
506 private float craftScrollMomentum;
507
508 // Token: 0x04000710 RID: 1808
510
511 // Token: 0x04000711 RID: 1809
513
514 // Token: 0x04000712 RID: 1810
515 private bool pendingCraft;
516
517 // Token: 0x04000713 RID: 1811
518 public float hoverCraftDelay;
519
520 // Token: 0x04000714 RID: 1812
522
523 // Token: 0x04000715 RID: 1813
524 private float ExpandButtonScale;
525
526 // Token: 0x04000716 RID: 1814
527 public bool menuTogglePressed;
528
529 // Token: 0x04000717 RID: 1815
531
532 // Token: 0x04000718 RID: 1816
534
535 // Token: 0x04000719 RID: 1817
537
538 // Token: 0x0400071A RID: 1818
539 private int multiCraftDelay;
540
541 // Token: 0x0400071B RID: 1819
542 private int multiCraftRecipe;
543
544 // Token: 0x0400071C RID: 1820
545 private bool wasOverItem;
546
547 // Token: 0x0400071D RID: 1821
548 private int cursorOver;
549
550 // Token: 0x0400071E RID: 1822
551 private int HoverRecipe;
552
553 // Token: 0x0400071F RID: 1823
555
556 // Token: 0x04000720 RID: 1824
558
559 // Token: 0x04000721 RID: 1825
560 private string materialHoverItemName;
561
562 // Token: 0x04000722 RID: 1826
564}
class f__AnonymousType0<< Count > j__TPar
static DrPlatform.DrPlatformType CurrentPlatform
Definition DrPlatform.cs:26
int multiCraftRecipe
void DrawExpandButton()
GUITransactionButton.InputState lastState
void LoadPageRegion()
bool pendingCraft
float hoverCraftDelay
void MaterialItemTooltipOver(int index)
GUIItemFilter.CategoryFilter LastCategory
bool menuTogglePressed
void CraftButtonOver(GUITransactionButton.InputState state)
string LastSearch
void CraftItemDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
void Reset()
int craftScrollDragging
void UpdateFilter(bool force=false)
GUIControllerCraftingMaterials materialController
void MaterialItemTooltipDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
Item materialToolTip
void RefocusExistingRecipeIfStillAvailable()
List< int > FilteredItems
void DrawMaterialsGridTooltip(Vector2 position)
string materialHoverItemName
void DrawMaterialsGrid()
float CraftItemScale(int index)
DateTime NavigationTick
float MaterialItemScale(int index)
float craftScrollOffset
int multiCraftDelay
Recipe CraftHover
int CraftHoverNumMaterials
float craftScrollMomentum
void ResetFilters()
void MaterialItemOver(int index)
int SelectedNumMaterials
void RefreshGridNav()
void CraftItemOver(int index)
void DrawCraftButton()
void UpdateMaterialNavigation()
void MaterialItemDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
bool materialsGridActive
float ExpandButtonScale
GUIItemFilter Filter
Vector2 craftDragOffset
float CraftButtonScale
static InterfaceProfile_Layout Active
Vector2 position
Definition Entity.cs:460
int maxStack
Definition Item.cs:2225
static int myPlayer
Definition Main.cs:2337
static int focusRecipe
Definition Main.cs:2323
static Item mouseItem
Definition Main.cs:2155
static int numAvailableRecipes
Definition Main.cs:2309
static int[] availableRecipe
Definition Main.cs:2281
static int mouseY
Definition Main.cs:601
static int mouseX
Definition Main.cs:587
static void GetThroughDelayedFindRecipes()
Definition Recipe.cs:195
Item[] requiredItem
Definition Recipe.cs:1026
static void UpdateTooltipContext(int context, int slot)
Definition ItemSlot.cs:972
static float UITextAlpha
static XNAUnityRunner.ForcedInputMode PrimaryInputMode
static DateTime Now
Definition DateTime.cs:530