Skip to content

Commit

Permalink
closes #17
Browse files Browse the repository at this point in the history
  • Loading branch information
Acemany committed Oct 21, 2024
1 parent 4c2be14 commit f861f08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 1 addition & 3 deletions core/src/io/acemany/mindustryV4/core/World.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ public Tile tile(int packed){
}

public Tile tile(int x, int y){
if(tiles == null){
return null;
}
if(tiles == null) return null;
if(!Structs.inBounds(x, y, tiles)) return null;
return tiles[x][y];
}
Expand Down
7 changes: 3 additions & 4 deletions core/src/io/acemany/mindustryV4/input/DesktopInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,10 @@ void pollInput(){
}

if(Inputs.keyTap(section, "pick_select")){
Tile picked_tile = tileAt(Gdx.input.getX(), Gdx.input.getY());
if(picked_tile.block() != null && (picked_tile.discovered() | Net.active())){
Recipe picked_recipe = Recipe.getByResult(picked_tile.block());
if(selected != null && selected.block() != null && (selected.discovered() | Net.active())){
Recipe picked_recipe = Recipe.getByResult(selected.target().block());
if(!control.unlocks.isUnlocked(picked_recipe)) return;
rotation = picked_tile.getRotation();
rotation = selected.getRotation();
recipe = picked_recipe;
}
}
Expand Down

1 comment on commit f861f08

@Acemany
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

closes #18

Please sign in to comment.