public static void EnhanceStockAllowToggle(Command_Toggle toggle) { var standInDesignator = toggle.isActive() ? allowDesignatorStandIn : forbidDesignatorStandIn; DesignatorContextMenuController.RegisterReverseDesignatorPair(standInDesignator, toggle); AddIconReplacementSupport(toggle, standInDesignator); }
private static void DisableCommandIfNotActivated(Pawn_DraftController __instance, Command_Toggle toggleCommand) { if (toggleCommand.isActive() && !__instance.pawn.IsActivated()) { __instance.Drafted = false; } }
public override bool InheritInteractionsFrom(Gizmo other) { Command_Toggle command_Toggle = other as Command_Toggle; return(command_Toggle != null && command_Toggle.isActive() == this.isActive()); }