Added pick keybind / Minor visual tweaks

This commit is contained in:
Anuken
2019-02-04 13:23:41 -05:00
parent 82b908f0ab
commit eb5b50b3e9
4 changed files with 20 additions and 16 deletions

View File

@ -400,6 +400,7 @@ keybind.screenshot.name = Map Screenshot
keybind.move_x.name = Move x
keybind.move_y.name = Move y
keybind.select.name = Select/Shoot
keybind.pick.name = Pick Block
keybind.break.name = Break
keybind.deselect.name = Deselect
keybind.shoot.name = Shoot

View File

@ -274,7 +274,7 @@ public class UnitTypes implements ContentList{
isFlying = true;
rotateWeapon = true;
engineOffset = 21;
engineSize = 4f;
engineSize = 5.3f;
rotatespeed = 0.01f;
attackLength = 90f;
baseRotateSpeed = 0.04f;
@ -284,7 +284,6 @@ public class UnitTypes implements ContentList{
width = 22f;
shots = 20;
shotDelay = 2;
inaccuracy = 10f;
roundrobin = true;
ejectEffect = Fx.none;
@ -306,7 +305,7 @@ public class UnitTypes implements ContentList{
isFlying = true;
rotateWeapon = true;
engineOffset = 40;
engineSize = 6f;
engineSize = 7.3f;
rotatespeed = 0.01f;
baseRotateSpeed = 0.04f;
weapon = new Weapon("reaper-gun"){{

View File

@ -15,6 +15,7 @@ public enum Binding implements KeyBind{
deselect(KeyCode.MOUSE_RIGHT),
break_block(KeyCode.MOUSE_RIGHT),
rotate(new Axis(KeyCode.SCROLL)),
pick(KeyCode.MOUSE_MIDDLE),
dash(KeyCode.SHIFT_LEFT),
drop_unit(KeyCode.SHIFT_LEFT),
gridMode(KeyCode.SPACE),
@ -30,7 +31,8 @@ public enum Binding implements KeyBind{
chat(KeyCode.ENTER),
chat_history_prev(KeyCode.UP),
chat_history_next(KeyCode.DOWN),
chat_scroll(new Axis(KeyCode.SCROLL))
chat_scroll(new Axis(KeyCode.SCROLL)),
;
private final KeybindValue defaultValue;

View File

@ -64,18 +64,7 @@ public class PlacementFragment extends Fragment{
}
boolean gridUpdate(InputHandler input){
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 if(Core.input.keyDown(Binding.select)){ //mouse eyedropper select
if(Core.input.keyDown(Binding.pick)){ //mouse eyedropper select
Tile tile = world.tileWorld(Core.input.mouseWorld().x, Core.input.mouseWorld().y);
if(tile != null){
@ -87,6 +76,19 @@ public class PlacementFragment extends Fragment{
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
int i = 0;
Array<Block> recipes = getByCategory(currentCategory);