public static void Patch_VerbTracker_GetVerbsCommands_Postfix( ref VerbTracker __instance, ref IEnumerable <Command> __result, ref KeyCode hotKey) { CompEquippable directOwner = __instance.directOwner as CompEquippable; MultiVerbComp multiVerb = (MultiVerbComp)null; if (directOwner == null || (M0)(multiVerb = (MultiVerbComp)ThingCompUtility.TryGetComp <MultiVerbComp>((Thing)((ThingComp)directOwner).parent)) == null) { return; } List <Command> commandList = new List <Command>(); int index = 0; commandList.AddRange(__result); using (List <Verb> .Enumerator enumerator = __instance.get_AllVerbs().GetEnumerator()) { while (enumerator.MoveNext()) { MechaniteForgeHarmonyPatches.Command_MultiVerb commandMultiVerb = new MechaniteForgeHarmonyPatches.Command_MultiVerb(enumerator.Current, multiVerb, index); commandList.Add((Command)commandMultiVerb); ++index; } } __result = (IEnumerable <Command>)commandList; }
// Token: 0x06000029 RID: 41 RVA: 0x00002A08 File Offset: 0x00000C08 public static void Patch_VerbTracker_GetVerbsCommands_Postfix(ref VerbTracker __instance, ref IEnumerable <Command> __result, ref KeyCode hotKey) { CompEquippable compEquippable = __instance.directOwner as CompEquippable; MultiVerbComp multiVerb = null; bool flag = compEquippable != null && (multiVerb = compEquippable.parent.TryGetComp <MultiVerbComp>()) != null; if (flag) { List <Command> list = new List <Command>(); int num = 0; list.AddRange(__result); foreach (Verb verb in __instance.AllVerbs) { MechaniteForgeHarmonyPatches.Command_MultiVerb item = new MechaniteForgeHarmonyPatches.Command_MultiVerb(verb, multiVerb, num); list.Add(item); num++; } __result = list; } }
// Token: 0x06000047 RID: 71 RVA: 0x00003400 File Offset: 0x00001600 public override bool GroupsWith(Gizmo other) { MechaniteForgeHarmonyPatches.Command_MultiVerb command_MultiVerb = other as MechaniteForgeHarmonyPatches.Command_MultiVerb; return(command_MultiVerb != null && command_MultiVerb.verb.verbProps == this.verb.verbProps && command_MultiVerb.index == this.index); }