Added pick keybind / Minor visual tweaks
This commit is contained in:
@@ -400,6 +400,7 @@ keybind.screenshot.name = Map Screenshot
|
|||||||
keybind.move_x.name = Move x
|
keybind.move_x.name = Move x
|
||||||
keybind.move_y.name = Move y
|
keybind.move_y.name = Move y
|
||||||
keybind.select.name = Select/Shoot
|
keybind.select.name = Select/Shoot
|
||||||
|
keybind.pick.name = Pick Block
|
||||||
keybind.break.name = Break
|
keybind.break.name = Break
|
||||||
keybind.deselect.name = Deselect
|
keybind.deselect.name = Deselect
|
||||||
keybind.shoot.name = Shoot
|
keybind.shoot.name = Shoot
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ public class UnitTypes implements ContentList{
|
|||||||
isFlying = true;
|
isFlying = true;
|
||||||
rotateWeapon = true;
|
rotateWeapon = true;
|
||||||
engineOffset = 21;
|
engineOffset = 21;
|
||||||
engineSize = 4f;
|
engineSize = 5.3f;
|
||||||
rotatespeed = 0.01f;
|
rotatespeed = 0.01f;
|
||||||
attackLength = 90f;
|
attackLength = 90f;
|
||||||
baseRotateSpeed = 0.04f;
|
baseRotateSpeed = 0.04f;
|
||||||
@@ -284,7 +284,6 @@ public class UnitTypes implements ContentList{
|
|||||||
width = 22f;
|
width = 22f;
|
||||||
shots = 20;
|
shots = 20;
|
||||||
shotDelay = 2;
|
shotDelay = 2;
|
||||||
|
|
||||||
inaccuracy = 10f;
|
inaccuracy = 10f;
|
||||||
roundrobin = true;
|
roundrobin = true;
|
||||||
ejectEffect = Fx.none;
|
ejectEffect = Fx.none;
|
||||||
@@ -306,7 +305,7 @@ public class UnitTypes implements ContentList{
|
|||||||
isFlying = true;
|
isFlying = true;
|
||||||
rotateWeapon = true;
|
rotateWeapon = true;
|
||||||
engineOffset = 40;
|
engineOffset = 40;
|
||||||
engineSize = 6f;
|
engineSize = 7.3f;
|
||||||
rotatespeed = 0.01f;
|
rotatespeed = 0.01f;
|
||||||
baseRotateSpeed = 0.04f;
|
baseRotateSpeed = 0.04f;
|
||||||
weapon = new Weapon("reaper-gun"){{
|
weapon = new Weapon("reaper-gun"){{
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ public enum Binding implements KeyBind{
|
|||||||
deselect(KeyCode.MOUSE_RIGHT),
|
deselect(KeyCode.MOUSE_RIGHT),
|
||||||
break_block(KeyCode.MOUSE_RIGHT),
|
break_block(KeyCode.MOUSE_RIGHT),
|
||||||
rotate(new Axis(KeyCode.SCROLL)),
|
rotate(new Axis(KeyCode.SCROLL)),
|
||||||
|
pick(KeyCode.MOUSE_MIDDLE),
|
||||||
dash(KeyCode.SHIFT_LEFT),
|
dash(KeyCode.SHIFT_LEFT),
|
||||||
drop_unit(KeyCode.SHIFT_LEFT),
|
drop_unit(KeyCode.SHIFT_LEFT),
|
||||||
gridMode(KeyCode.SPACE),
|
gridMode(KeyCode.SPACE),
|
||||||
@@ -30,7 +31,8 @@ public enum Binding implements KeyBind{
|
|||||||
chat(KeyCode.ENTER),
|
chat(KeyCode.ENTER),
|
||||||
chat_history_prev(KeyCode.UP),
|
chat_history_prev(KeyCode.UP),
|
||||||
chat_history_next(KeyCode.DOWN),
|
chat_history_next(KeyCode.DOWN),
|
||||||
chat_scroll(new Axis(KeyCode.SCROLL))
|
chat_scroll(new Axis(KeyCode.SCROLL)),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
private final KeybindValue defaultValue;
|
private final KeybindValue defaultValue;
|
||||||
|
|||||||
@@ -64,18 +64,7 @@ public class PlacementFragment extends Fragment{
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean gridUpdate(InputHandler input){
|
boolean gridUpdate(InputHandler input){
|
||||||
if(!Core.input.keyDown(Binding.gridMode) || ui.chatfrag.chatOpen()) return false;
|
if(Core.input.keyDown(Binding.pick)){ //mouse eyedropper select
|
||||||
if(Core.input.keyDown(Binding.gridModeShift)){ //select category
|
|
||||||
int i = 0;
|
|
||||||
for(KeyCode key : inputCatGrid){
|
|
||||||
if(Core.input.keyDown(key)){
|
|
||||||
input.block = getByCategory(Category.values()[i]).first();
|
|
||||||
currentCategory = input.block.buildCategory;
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}else if(Core.input.keyDown(Binding.select)){ //mouse eyedropper select
|
|
||||||
Tile tile = world.tileWorld(Core.input.mouseWorld().x, Core.input.mouseWorld().y);
|
Tile tile = world.tileWorld(Core.input.mouseWorld().x, Core.input.mouseWorld().y);
|
||||||
|
|
||||||
if(tile != null){
|
if(tile != null){
|
||||||
@@ -87,6 +76,19 @@ public class PlacementFragment extends Fragment{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!Core.input.keyDown(Binding.gridMode) || ui.chatfrag.chatOpen()) return false;
|
||||||
|
if(Core.input.keyDown(Binding.gridModeShift)){ //select category
|
||||||
|
int i = 0;
|
||||||
|
for(KeyCode key : inputCatGrid){
|
||||||
|
if(Core.input.keyDown(key)){
|
||||||
|
input.block = getByCategory(Category.values()[i]).first();
|
||||||
|
currentCategory = input.block.buildCategory;
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}else{ //select block
|
}else{ //select block
|
||||||
int i = 0;
|
int i = 0;
|
||||||
Array<Block> recipes = getByCategory(currentCategory);
|
Array<Block> recipes = getByCategory(currentCategory);
|
||||||
|
|||||||
Reference in New Issue
Block a user