@@ -41,10 +41,10 @@ public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructio
41
41
}
42
42
43
43
public static Rect AllocateAndDrawSearchboxRect ( Rect r ) {
44
- const float offset = ModsConfig . Search . buttonSize + 2 * ModsConfig . Search . buttonsInset ;
44
+ const float offset = ModsConfigUI . Search . buttonSize + 2 * ModsConfigUI . Search . buttonsInset ;
45
45
46
- ModsConfig . Search . DoSearchBlock (
47
- new Rect ( r . x + ModsConfig . Search . buttonsInset , r . y + ModsConfig . Search . buttonsInset , r . width - 2 * ModsConfig . Search . buttonsInset , ModsConfig . Search . buttonSize ) ,
46
+ ModsConfigUI . Search . DoSearchBlock (
47
+ new Rect ( r . x + ModsConfigUI . Search . buttonsInset , r . y + ModsConfigUI . Search . buttonsInset , r . width - 2 * ModsConfigUI . Search . buttonsInset , ModsConfigUI . Search . buttonSize ) ,
48
48
LanguageKeys . keyed . ModSwitch_Search_Watermark . Translate ( ) ) ;
49
49
50
50
return new Rect ( r . x , r . y + offset , r . width , r . height - offset ) ;
@@ -72,7 +72,7 @@ public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructio
72
72
Util . Warning ( "Could not find Page_ModsConfig.PreOpen transpiler anchor - not injecting code." ) ;
73
73
return instructions ;
74
74
}
75
- instructions [ idxAnchor ] . operand = AccessTools . Method ( typeof ( ModsConfig . Helpers ) , nameof ( ModsConfig . Helpers . ForceSteamWorkshopRequery ) ) ;
75
+ instructions [ idxAnchor ] . operand = AccessTools . Method ( typeof ( ModsConfigUI . Helpers ) , nameof ( ModsConfigUI . Helpers . ForceSteamWorkshopRequery ) ) ;
76
76
return instructions ;
77
77
}
78
78
@@ -84,8 +84,8 @@ public class Page_ModsConfig_DoModRow {
84
84
[ HarmonyPatch ( typeof ( Page_ModsConfig ) , "DoModRow" , new Type [ ] { typeof ( Listing_Standard ) , typeof ( ModMetaData ) , typeof ( int ) , typeof ( int ) } ) ]
85
85
public class SupressNonMatchingFilteredRows {
86
86
public static bool Prefix ( ModMetaData mod ) {
87
- if ( ModsConfig . Search . searchTerm != String . Empty )
88
- return mod . Name . IndexOf ( ModsConfig . Search . searchTerm , StringComparison . CurrentCultureIgnoreCase ) != - 1 ;
87
+ if ( ModsConfigUI . Search . searchTerm != String . Empty )
88
+ return mod . Name . IndexOf ( ModsConfigUI . Search . searchTerm , StringComparison . CurrentCultureIgnoreCase ) != - 1 ;
89
89
return true ;
90
90
}
91
91
}
@@ -97,7 +97,7 @@ public class InjectRightClickMenu {
97
97
public static IEnumerable < CodeInstruction > Transpiler ( IEnumerable < CodeInstruction > instructions , ILGenerator ilGen ) {
98
98
var instr = new List < CodeInstruction > ( instructions ) ;
99
99
100
- int idxCheckboxLabeledSelectable = instr . FirstIndexOf ( ci => ci . opcode == OpCodes . Call && ci . operand == ModsConfig . miCheckboxLabeledSelectable ) ;
100
+ int idxCheckboxLabeledSelectable = instr . FirstIndexOf ( ci => ci . opcode == OpCodes . Call && ci . operand == ModsConfigUI . miCheckboxLabeledSelectable ) ;
101
101
if ( idxCheckboxLabeledSelectable == - 1 ) {
102
102
Util . Warning ( "Could not find anchor for ModRow transpiler - not modifying code" ) ;
103
103
return instr ;
@@ -143,7 +143,7 @@ public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructio
143
143
// insert <code>else { GUI.contentColor = color; }</code>
144
144
instr . InsertRange ( idxBlockEnd , new [ ] {
145
145
new CodeInstruction ( OpCodes . Ldloc , localColor ) { labels = new List < Label > { lblNoClick } } ,
146
- new CodeInstruction ( OpCodes . Call , ModsConfig . miGuiSetContentColor ) ,
146
+ new CodeInstruction ( OpCodes . Call , ModsConfigUI . miGuiSetContentColor ) ,
147
147
} ) ;
148
148
149
149
// setup <code>else { ... }</code> branch label
@@ -152,12 +152,12 @@ public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructio
152
152
// insert <code>GUI.contentColor = color; if (Input.GetMouseButtonUp(1)) { DoContextMenu(mod); }</code>
153
153
instr . InsertRange ( idxCheckboxLabeledSelectable + 2 , new [ ] {
154
154
new CodeInstruction ( OpCodes . Ldloc , localColor ) ,
155
- new CodeInstruction ( OpCodes . Call , ModsConfig . miGuiSetContentColor ) ,
155
+ new CodeInstruction ( OpCodes . Call , ModsConfigUI . miGuiSetContentColor ) ,
156
156
new CodeInstruction ( OpCodes . Ldc_I4_1 ) ,
157
157
new CodeInstruction ( OpCodes . Call , AccessTools . Method ( typeof ( Input ) , nameof ( Input . GetMouseButtonUp ) ) ) ,
158
158
new CodeInstruction ( OpCodes . Brfalse , lblExistingClickCode ) ,
159
159
new CodeInstruction ( OpCodes . Ldarg_2 ) ,
160
- new CodeInstruction ( OpCodes . Call , AccessTools . Method ( typeof ( ModsConfig ) , nameof ( ModsConfig . DoContextMenu ) ) ) ,
160
+ new CodeInstruction ( OpCodes . Call , AccessTools . Method ( typeof ( ModsConfigUI ) , nameof ( ModsConfigUI . DoContextMenu ) ) ) ,
161
161
new CodeInstruction ( OpCodes . Br , lblBlockEnd ) ,
162
162
} ) ;
163
163
@@ -167,7 +167,7 @@ public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructio
167
167
// insert <code>Color color = Page_ModsConfig_DoModRow.SetGUIColorMod(mod);</code>
168
168
instr . InsertRange ( idxCheckboxLabeledSelectable - 4 , new [ ] {
169
169
new CodeInstruction ( OpCodes . Ldarg_2 ) ,
170
- new CodeInstruction ( OpCodes . Call , AccessTools . Method ( typeof ( ModsConfig . Helpers ) , nameof ( ModsConfig . Helpers . SetGUIColorMod ) ) ) ,
170
+ new CodeInstruction ( OpCodes . Call , AccessTools . Method ( typeof ( ModsConfigUI . Helpers ) , nameof ( ModsConfigUI . Helpers . SetGUIColorMod ) ) ) ,
171
171
new CodeInstruction ( OpCodes . Stloc , localColor ) ,
172
172
} ) ;
173
173
@@ -194,10 +194,10 @@ public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructio
194
194
*
195
195
* with
196
196
*
197
- * ModsConfig .DrawContentSource(rect1, rowCAnonStorey428.mod.Source, clickAction, mod);
197
+ * ModsConfigUI .DrawContentSource(rect1, rowCAnonStorey428.mod.Source, clickAction, mod);
198
198
*
199
199
*/
200
- instructions [ idxAnchor ] . operand = AccessTools . Method ( typeof ( ModsConfig ) , nameof ( ModsConfig . DrawContentSource ) ) ;
200
+ instructions [ idxAnchor ] . operand = AccessTools . Method ( typeof ( ModsConfigUI ) , nameof ( ModsConfigUI . DrawContentSource ) ) ;
201
201
instructions . Insert ( idxAnchor , new CodeInstruction ( OpCodes . Ldarg_2 ) ) ;
202
202
203
203
return instructions ;
@@ -233,7 +233,7 @@ public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructio
233
233
*
234
234
* if (workshopItem == null)
235
235
* {
236
- * ModsConfig .UpdateSteamTS(pfid, num2);
236
+ * ModsConfigUI .UpdateSteamTS(pfid, num2);
237
237
* workshopItem = new WorkshopItem_Mod();
238
238
* }
239
239
*
@@ -244,7 +244,7 @@ public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructio
244
244
new [ ] {
245
245
new CodeInstruction ( OpCodes . Ldarg_0 ) ,
246
246
new CodeInstruction ( OpCodes . Ldloc_2 ) ,
247
- new CodeInstruction ( OpCodes . Call , AccessTools . Method ( typeof ( ModsConfig . Helpers ) , nameof ( ModsConfig . Helpers . UpdateSteamTS ) ) ) ,
247
+ new CodeInstruction ( OpCodes . Call , AccessTools . Method ( typeof ( ModsConfigUI . Helpers ) , nameof ( ModsConfigUI . Helpers . UpdateSteamTS ) ) ) ,
248
248
}
249
249
) ;
250
250
0 commit comments