Ejemplo n.º 1
0
        public static void Patch()
        {
            try
            {
                HarmonyHelper.Patch();

                Logger.Log("Patched successfully!");

                PFC_Config.Enable = PlayerPrefsExtra.GetBool("pfcEnable", true);

                Logger.Log("Obtained values from config");

                OptionsPanelHandler.RegisterModOptions(new Options("Pickup Full Carry-alls"));

                Logger.Log("Registered mod options");

                ItemActionHelper.RegisterAction(MouseButton.Middle, TechType.LuggageBag, InventoryOpener.OnMiddleClick, "open storage", InventoryOpener.Condition);
                ItemActionHelper.RegisterAction(MouseButton.Middle, TechType.SmallStorage, InventoryOpener.OnMiddleClick, "open storage", InventoryOpener.Condition);

                /*
                 * ItemActionHandler.RegisterMiddleClickAction(TechType.LuggageBag, InventoryOpener.OnMiddleClick, "open storage");
                 * ItemActionHandler.RegisterMiddleClickAction(TechType.SmallStorage, InventoryOpener.OnMiddleClick, "open storage");
                 *
                 * Logger.Log("Registered middle click actions");
                 */
            }
            catch (Exception e)
            {
                Logger.Exception(e, LoggedWhen.Initializing);
            }
        }
Ejemplo n.º 2
0
 public static void AddActions()
 {
     ItemActionHelper.RegisterAction(MouseButton.Left, _1_Previous, _1_Previous_OnClick, "Use", true.ToPredicate <InventoryItem>());
     ItemActionHelper.RegisterAction(MouseButton.Left, _2_1_Play, _2_1_Play_OnClick, "Use", true.ToPredicate <InventoryItem>());
     ItemActionHelper.RegisterAction(MouseButton.Left, _2_2_Pause, _2_2_Pause_OnClick, "Use", true.ToPredicate <InventoryItem>());
     ItemActionHelper.RegisterAction(MouseButton.Left, _3_Next, _3_Next_OnClick, "Use", true.ToPredicate <InventoryItem>());
     ItemActionHelper.RegisterAction(MouseButton.Left, _4_1_EnableRepeat, _4_1_EnableRepeat_OnClick, "Use", true.ToPredicate <InventoryItem>());
     ItemActionHelper.RegisterAction(MouseButton.Left, _4_2_DisableRepeat, _4_2_DisableRepeat_OnClick, "Use", true.ToPredicate <InventoryItem>());
     ItemActionHelper.RegisterAction(MouseButton.Left, _5_1_EnableShuffle, _5_1_EnableShuffle_OnClick, "Use", true.ToPredicate <InventoryItem>());
     ItemActionHelper.RegisterAction(MouseButton.Left, _5_2_DisableShuffle, _5_2_DisableShuffle_OnClick, "Use", true.ToPredicate <InventoryItem>());
     ItemActionHelper.RegisterAction(MouseButton.Left, _6_ExitInterface, _6_ExitInterface_OnClick, "Use", true.ToPredicate <InventoryItem>());
 }
Ejemplo n.º 3
0
 public new void Patch()
 {
     base.Patch();
     ItemActionHelper.RegisterAction(MouseButton.Left, TechType, OnLeftClick, "play/pause", (item) => !item.item.gameObject.GetComponent <OSTAudioPlayer>().IsOpen);
     ItemActionHelper.RegisterAction(MouseButton.Middle, TechType, OnMiddleClick, "open/close interface", true.ToPredicate <InventoryItem>());
 }