menu swapper: add climb-up and climb-down swaps
This commit is contained in:
@@ -787,6 +787,35 @@ public interface MenuEntrySwapperConfig extends Config
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum StairsMode
|
||||||
|
{
|
||||||
|
CLIMB,
|
||||||
|
CLIMB_UP,
|
||||||
|
CLIMB_DOWN,
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "swapStairsLeftClick",
|
||||||
|
name = "Stairs left-click",
|
||||||
|
description = "Swap this option when left-clicking stairs. Also works on ladders.",
|
||||||
|
section = objectSection
|
||||||
|
)
|
||||||
|
default StairsMode swapStairsLeftClick()
|
||||||
|
{
|
||||||
|
return StairsMode.CLIMB;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "swapStairsShiftClick",
|
||||||
|
name = "Stairs shift-click",
|
||||||
|
description = "Swap this option when shift-clicking stairs. Also works on ladders.",
|
||||||
|
section = objectSection
|
||||||
|
)
|
||||||
|
default StairsMode swapStairsShiftClick()
|
||||||
|
{
|
||||||
|
return StairsMode.CLIMB;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "swapTemporossLeave",
|
keyName = "swapTemporossLeave",
|
||||||
name = "Tempoross Leave",
|
name = "Tempoross Leave",
|
||||||
|
|||||||
@@ -415,6 +415,9 @@ public class MenuEntrySwapperPlugin extends Plugin
|
|||||||
swap("eat", "guzzle", config::swapRockCake);
|
swap("eat", "guzzle", config::swapRockCake);
|
||||||
|
|
||||||
swap("travel", "dive", config::swapRowboatDive);
|
swap("travel", "dive", config::swapRowboatDive);
|
||||||
|
|
||||||
|
swap("climb", "climb-up", () -> (shiftModifier() ? config.swapStairsShiftClick() : config.swapStairsLeftClick()) == MenuEntrySwapperConfig.StairsMode.CLIMB_UP);
|
||||||
|
swap("climb", "climb-down", () -> (shiftModifier() ? config.swapStairsShiftClick() : config.swapStairsLeftClick()) == MenuEntrySwapperConfig.StairsMode.CLIMB_DOWN);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void swap(String option, String swappedOption, Supplier<Boolean> enabled)
|
private void swap(String option, String swappedOption, Supplier<Boolean> enabled)
|
||||||
|
|||||||
Reference in New Issue
Block a user