mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-25 03:55:35 +01:00
translate selection commands
This commit is contained in:
parent
84d7da3274
commit
23cb3642f1
@ -206,8 +206,24 @@ public enum BBC {
|
||||
JUMPTO_FAIL("No block in sight!", "Navigation"),
|
||||
UP_FAIL("You would hit something above you.", "Navigation"),
|
||||
|
||||
SEL_CUBOID("Cuboid: left click for point 1, right click for point 2", "Selection"),
|
||||
SEL_CUBOID_EXTEND("Cuboid: left click for a starting point, right click to extend", "Selection"),
|
||||
SEL_2D_POLYGON("2D polygon selector: Left/right click to add a point.", "Selection"),
|
||||
SEL_ELLIPSIOD("Ellipsoid selector: left click=center, right click to extend", "Selection"),
|
||||
SEL_SPHERE("Sphere selector: left click=center, right click to set radius", "Selection"),
|
||||
SEL_CYLINDRICAL("Cylindrical selector: Left click=center, right click to extend.", "Selection"),
|
||||
SEL_MAX("%s0 points maximum.", "Selection"),
|
||||
SEL_FUZZY("Fuzzy selector: Left click to select all contingent blocks, right click to add", "Selection"),
|
||||
SEL_CONVEX_POLYHEDRAL("Convex polyhedral selector: Left click=First vertex, right click to add more.", "Selection"),
|
||||
SEL_LIST("For a list of selection types use:&c //sel", "Selection"),
|
||||
SEL_MODES("Select one of the modes below:", "Selection"),
|
||||
|
||||
|
||||
TIP_SEL_FUZZY("Tip: See the different selection modes with `//sel list`", "Tips"),
|
||||
TIP_CANCEL("Tip: You can cancel an edit with `//cancel`", "Tips"),
|
||||
TIP_DOWNLOAD("Tip: Download your clipboard with `//download`", "Tips"),
|
||||
TIP_BRUSH("Tip: See all the cool brushes with `//br`", "Tips"),
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -725,33 +725,35 @@ public class SelectionCommands {
|
||||
final RegionSelector selector;
|
||||
if (typeName.equalsIgnoreCase("cuboid")) {
|
||||
selector = new CuboidRegionSelector(oldSelector);
|
||||
player.print("Cuboid: left click for point 1, right click for point 2");
|
||||
player.print(BBC.SEL_CUBOID.s());
|
||||
} else if (typeName.equalsIgnoreCase("extend")) {
|
||||
selector = new ExtendingCuboidRegionSelector(oldSelector);
|
||||
player.print("Cuboid: left click for a starting point, right click to extend");
|
||||
player.print(BBC.SEL_CUBOID_EXTEND.s());
|
||||
} else if (typeName.equalsIgnoreCase("poly")) {
|
||||
selector = new Polygonal2DRegionSelector(oldSelector);
|
||||
player.print("2D polygon selector: Left/right click to add a point.");
|
||||
player.print(BBC.SEL_2D_POLYGON.s());
|
||||
Optional<Integer> limit = ActorSelectorLimits.forActor(player).getPolygonVertexLimit();
|
||||
if (limit.isPresent()) {
|
||||
player.print(limit.get() + " points maximum.");
|
||||
player.print(BBC.SEL_MAX.f(limit.get()));
|
||||
}
|
||||
player.print(BBC.SEL_LIST.s());
|
||||
} else if (typeName.equalsIgnoreCase("ellipsoid")) {
|
||||
selector = new EllipsoidRegionSelector(oldSelector);
|
||||
player.print("Ellipsoid selector: left click=center, right click to extend");
|
||||
player.print(BBC.SEL_ELLIPSIOD.s());
|
||||
} else if (typeName.equalsIgnoreCase("sphere")) {
|
||||
selector = new SphereRegionSelector(oldSelector);
|
||||
player.print("Sphere selector: left click=center, right click to set radius");
|
||||
player.print(BBC.SEL_SPHERE.s());
|
||||
} else if (typeName.equalsIgnoreCase("cyl")) {
|
||||
selector = new CylinderRegionSelector(oldSelector);
|
||||
player.print("Cylindrical selector: Left click=center, right click to extend.");
|
||||
player.print(BBC.SEL_CYLINDRICAL.s());
|
||||
} else if (typeName.equalsIgnoreCase("convex") || typeName.equalsIgnoreCase("hull") || typeName.equalsIgnoreCase("polyhedron")) {
|
||||
selector = new ConvexPolyhedralRegionSelector(oldSelector);
|
||||
player.print("Convex polyhedral selector: Left click=First vertex, right click to add more.");
|
||||
player.print(BBC.SEL_CONVEX_POLYHEDRAL.s());
|
||||
Optional<Integer> limit = ActorSelectorLimits.forActor(player).getPolyhedronVertexLimit();
|
||||
if (limit.isPresent()) {
|
||||
player.print(limit.get() + " points maximum.");
|
||||
player.print(BBC.SEL_MAX.f(limit.get()));
|
||||
}
|
||||
player.print(BBC.SEL_LIST.s());
|
||||
} else if (typeName.startsWith("fuzzy") || typeName.startsWith("magic")) {
|
||||
Mask mask;
|
||||
if (typeName.length() > 6) {
|
||||
@ -765,21 +767,22 @@ public class SelectionCommands {
|
||||
mask = new IdMask(editSession);
|
||||
}
|
||||
selector = new FuzzyRegionSelector(player, editSession, mask);
|
||||
player.print("Fuzzy selector: Left click to select all contingent blocks, right click to add");
|
||||
player.print(BBC.SEL_FUZZY.s());
|
||||
player.print(BBC.SEL_LIST.s());
|
||||
} else {
|
||||
CommandListBox box = new CommandListBox("Selection modes");
|
||||
StyledFragment contents = box.getContents();
|
||||
StyledFragment tip = contents.createFragment(Style.RED);
|
||||
tip.append("Select one of the modes below:").newLine();
|
||||
tip.append(BBC.SEL_MODES.s()).newLine();
|
||||
|
||||
box.appendCommand("cuboid", "Select two corners of a cuboid");
|
||||
box.appendCommand("extend", "Fast cuboid selection mode");
|
||||
box.appendCommand("poly", "Select a 2D polygon with height");
|
||||
box.appendCommand("ellipsoid", "Select an ellipsoid");
|
||||
box.appendCommand("sphere", "Select a sphere");
|
||||
box.appendCommand("cyl", "Select a cylinder");
|
||||
box.appendCommand("convex", "Select a convex polyhedral");
|
||||
box.appendCommand("fuzzy[=<mask>]", "Select all connected blocks");
|
||||
box.appendCommand("//sel cuboid", "Select two corners of a cuboid");
|
||||
box.appendCommand("//sel extend", "Fast cuboid selection mode");
|
||||
box.appendCommand("//sel poly", "Select a 2D polygon with height");
|
||||
box.appendCommand("//sel ellipsoid", "Select an ellipsoid");
|
||||
box.appendCommand("//sel sphere", "Select a sphere");
|
||||
box.appendCommand("//sel cyl", "Select a cylinder");
|
||||
box.appendCommand("//sel convex", "Select a convex polyhedral");
|
||||
box.appendCommand("//sel fuzzy[=<mask>]", "Select all connected blocks");
|
||||
|
||||
player.printRaw(ColorCodeBuilder.asColorCodes(box));
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user