Misc fog improvements
This commit is contained in:
@@ -624,7 +624,7 @@ public class SettingsMenuDialog extends BaseDialog{
|
||||
button(bundle.get("settings.reset", "Reset to Defaults"), () -> {
|
||||
for(Setting setting : list){
|
||||
if(setting.name == null || setting.title == null) continue;
|
||||
settings.put(setting.name, settings.getDefault(setting.name));
|
||||
settings.remove(setting.name);
|
||||
}
|
||||
rebuild();
|
||||
}).margin(14).width(240f).pad(6);
|
||||
|
||||
@@ -119,6 +119,12 @@ public class PlacementFragment extends Fragment{
|
||||
|
||||
if(Core.input.keyTap(Binding.pick) && player.isBuilder() && !Core.scene.hasDialog()){ //mouse eyedropper select
|
||||
var build = world.buildWorld(Core.input.mouseWorld().x, Core.input.mouseWorld().y);
|
||||
|
||||
//can't middle click buildings in fog
|
||||
if(build != null && build.inFogTo(player.team())){
|
||||
build = null;
|
||||
}
|
||||
|
||||
Block tryRecipe = build == null ? null : build instanceof ConstructBuild c ? c.current : build.block;
|
||||
Object tryConfig = build == null || !build.block.copyConfig ? null : build.config();
|
||||
|
||||
@@ -577,7 +583,7 @@ public class PlacementFragment extends Fragment{
|
||||
Tile hoverTile = world.tileWorld(Core.input.mouseWorld().x, Core.input.mouseWorld().y);
|
||||
if(hoverTile != null){
|
||||
//if the tile has a building, display it
|
||||
if(hoverTile.build != null && hoverTile.build.displayable()){
|
||||
if(hoverTile.build != null && hoverTile.build.displayable() && !hoverTile.build.inFogTo(player.team())){
|
||||
return nextFlowBuild = hoverTile.build;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user