Made super pickaxe arm swing and right click modes mutually exclusive.

Dieser Commit ist enthalten in:
sk89q 2011-01-19 02:32:17 -08:00
Ursprung b7c620bc2f
Commit 669a1911af

Datei anzeigen

@ -686,6 +686,7 @@ public class WorldEditController {
// Tree tool // Tree tool
} else if (split[0].equalsIgnoreCase("/tree")) { } else if (split[0].equalsIgnoreCase("/tree")) {
checkArgs(split, 0, 0, split[0]); checkArgs(split, 0, 0, split[0]);
session.setArmSwingMode(null);
session.setRightClickMode(new TreePlanter()); session.setRightClickMode(new TreePlanter());
player.print("Tree tool equipped. Right click with a pickaxe."); player.print("Tree tool equipped. Right click with a pickaxe.");
return true; return true;
@ -693,6 +694,7 @@ public class WorldEditController {
// Big tree tool // Big tree tool
} else if (split[0].equalsIgnoreCase("/bigtree")) { } else if (split[0].equalsIgnoreCase("/bigtree")) {
checkArgs(split, 0, 0, split[0]); checkArgs(split, 0, 0, split[0]);
session.setArmSwingMode(null);
session.setRightClickMode(new BigTreePlanter()); session.setRightClickMode(new BigTreePlanter());
player.print("Big tree tool equipped. Right click with a pickaxe."); player.print("Big tree tool equipped. Right click with a pickaxe.");
return true; return true;
@ -700,6 +702,7 @@ public class WorldEditController {
// Pine tree tool // Pine tree tool
} else if (split[0].equalsIgnoreCase("/pinetree")) { } else if (split[0].equalsIgnoreCase("/pinetree")) {
checkArgs(split, 0, 0, split[0]); checkArgs(split, 0, 0, split[0]);
session.setArmSwingMode(null);
session.setRightClickMode(new PineTreePlanter()); session.setRightClickMode(new PineTreePlanter());
player.print("Pine tree tree tool equipped. Right click with a pickaxe."); player.print("Pine tree tree tool equipped. Right click with a pickaxe.");
return true; return true;
@ -707,6 +710,7 @@ public class WorldEditController {
// Info tool // Info tool
} else if (split[0].equalsIgnoreCase("/info")) { } else if (split[0].equalsIgnoreCase("/info")) {
checkArgs(split, 0, 0, split[0]); checkArgs(split, 0, 0, split[0]);
session.setArmSwingMode(null);
session.setRightClickMode(new QueryTool()); session.setRightClickMode(new QueryTool());
player.print("Info tool equipped. Right click with a pickaxe."); player.print("Info tool equipped. Right click with a pickaxe.");
return true; return true;
@ -715,6 +719,7 @@ public class WorldEditController {
} else if (split[0].equalsIgnoreCase("/repl")) { } else if (split[0].equalsIgnoreCase("/repl")) {
checkArgs(split, 1, 1, split[0]); checkArgs(split, 1, 1, split[0]);
BaseBlock targetBlock = getBlock(player, split[1]); BaseBlock targetBlock = getBlock(player, split[1]);
session.setArmSwingMode(null);
session.setRightClickMode(new BlockReplacer(targetBlock)); session.setRightClickMode(new BlockReplacer(targetBlock));
player.print("Block replacer tool equipped. Right click with a pickaxe."); player.print("Block replacer tool equipped. Right click with a pickaxe.");
return true; return true;
@ -732,6 +737,7 @@ public class WorldEditController {
return true; return true;
} }
BaseBlock targetBlock = getBlock(player, split[1]); BaseBlock targetBlock = getBlock(player, split[1]);
session.setRightClickMode(null);
session.setArmSwingMode(new SphereBrush(targetBlock, radius, nonReplacing)); session.setArmSwingMode(new SphereBrush(targetBlock, radius, nonReplacing));
if (nonReplacing) { if (nonReplacing) {
player.print("Non-replacing sphere brush tool equipped."); player.print("Non-replacing sphere brush tool equipped.");
@ -750,6 +756,7 @@ public class WorldEditController {
return true; return true;
} }
BaseBlock targetBlock = getBlock(player, split[1]); BaseBlock targetBlock = getBlock(player, split[1]);
session.setRightClickMode(null);
session.setArmSwingMode(new ReplacingSphereBrush(targetBlock, radius)); session.setArmSwingMode(new ReplacingSphereBrush(targetBlock, radius));
player.print("Replacing sphere brush tool equipped. Swing with a pickaxe."); player.print("Replacing sphere brush tool equipped. Swing with a pickaxe.");
return true; return true;