Removed "naval" sector requirement
|
Before Width: | Height: | Size: 778 B After Width: | Height: | Size: 777 B |
|
Before Width: | Height: | Size: 608 KiB After Width: | Height: | Size: 608 KiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 187 KiB |
|
Before Width: | Height: | Size: 307 KiB After Width: | Height: | Size: 306 KiB |
|
Before Width: | Height: | Size: 386 KiB After Width: | Height: | Size: 386 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 188 KiB After Width: | Height: | Size: 188 KiB |
|
Before Width: | Height: | Size: 302 KiB After Width: | Height: | Size: 306 KiB |
|
Before Width: | Height: | Size: 391 KiB After Width: | Height: | Size: 391 KiB |
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
@@ -14,14 +14,12 @@ import arc.scene.ui.layout.*;
|
|||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import arc.util.ArcAnnotate.*;
|
import arc.util.ArcAnnotate.*;
|
||||||
import mindustry.content.*;
|
|
||||||
import mindustry.ctype.*;
|
import mindustry.ctype.*;
|
||||||
import mindustry.game.*;
|
import mindustry.game.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
import mindustry.graphics.g3d.*;
|
import mindustry.graphics.g3d.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.type.Sector.*;
|
|
||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
import mindustry.world.blocks.storage.*;
|
import mindustry.world.blocks.storage.*;
|
||||||
import mindustry.world.blocks.storage.CoreBlock.*;
|
import mindustry.world.blocks.storage.CoreBlock.*;
|
||||||
@@ -184,7 +182,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
planets.drawPlane(hovered, () -> {
|
planets.drawPlane(hovered, () -> {
|
||||||
Draw.color(Color.white, Pal.accent, Mathf.absin(5f, 1f));
|
Draw.color(Color.white, Pal.accent, Mathf.absin(5f, 1f));
|
||||||
|
|
||||||
TextureRegion icon = hovered.locked() && !canLaunch(hovered) ? Icon.lock.getRegion() : hovered.is(SectorAttribute.naval) ? Liquids.water.icon(Cicon.large) : null;
|
TextureRegion icon = hovered.locked() && !canLaunch(hovered) ? Icon.lock.getRegion() : null;
|
||||||
|
|
||||||
if(icon != null){
|
if(icon != null){
|
||||||
Draw.rect(icon, 0, 0);
|
Draw.rect(icon, 0, 0);
|
||||||
@@ -372,12 +370,8 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
|
|
||||||
stable.row();
|
stable.row();
|
||||||
|
|
||||||
if((sector.hasBase() && mode == look) || canLaunch(sector) || sector.preset.alwaysUnlocked){
|
if((sector.hasBase() && mode == look) || canLaunch(sector) || (sector.preset != null && sector.preset.alwaysUnlocked)){
|
||||||
stable.button(sector.hasBase() ? "Resume" : "Launch", Styles.transt, () -> {
|
stable.button(sector.hasBase() ? "Resume" : "Launch", Styles.transt, () -> {
|
||||||
if(sector.is(SectorAttribute.naval)){
|
|
||||||
ui.showInfo("You need a naval loadout to launch here.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean shouldHide = true;
|
boolean shouldHide = true;
|
||||||
|
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ public class Block extends UnlockableContent{
|
|||||||
public boolean rebuildable = true;
|
public boolean rebuildable = true;
|
||||||
/** whether this water can only be placed on water */
|
/** whether this water can only be placed on water */
|
||||||
public boolean requiresWater = false;
|
public boolean requiresWater = false;
|
||||||
|
/** whether this water can be placed on any liquids, anywhere */
|
||||||
|
public boolean placeableLiquid = false;
|
||||||
/** whether this floor can be placed on. */
|
/** whether this floor can be placed on. */
|
||||||
public boolean placeableOn = true;
|
public boolean placeableOn = true;
|
||||||
/** whether this block has insulating properties. */
|
/** whether this block has insulating properties. */
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ public class Build{
|
|||||||
return type.bounds(x, y, Tmp.r1).grow(0.01f).contains(tile.block.bounds(tile.centerX(), tile.centerY(), Tmp.r2));
|
return type.bounds(x, y, Tmp.r1).grow(0.01f).contains(tile.block.bounds(tile.centerX(), tile.centerY(), Tmp.r2));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!type.requiresWater && !contactsShallows(tile.x, tile.y, type)){
|
if(!type.requiresWater && !contactsShallows(tile.x, tile.y, type) && !type.placeableLiquid){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@ public class Build{
|
|||||||
other == null ||
|
other == null ||
|
||||||
!other.block().alwaysReplace ||
|
!other.block().alwaysReplace ||
|
||||||
!other.floor().placeableOn ||
|
!other.floor().placeableOn ||
|
||||||
(other.floor().isDeep() && !type.floating && !type.requiresWater) ||
|
(other.floor().isDeep() && !type.floating && !type.requiresWater && !type.placeableLiquid) ||
|
||||||
(type.requiresWater && tile.floor().liquidDrop != Liquids.water)
|
(type.requiresWater && tile.floor().liquidDrop != Liquids.water)
|
||||||
){
|
){
|
||||||
return false;
|
return false;
|
||||||
@@ -141,8 +141,8 @@ public class Build{
|
|||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
return tile.interactable(team)
|
return tile.interactable(team)
|
||||||
&& (contactsShallows(tile.x, tile.y, type) || type.requiresWater)
|
&& (contactsShallows(tile.x, tile.y, type) || type.requiresWater || type.placeableLiquid)
|
||||||
&& (!tile.floor().isDeep() || type.floating || type.requiresWater)
|
&& (!tile.floor().isDeep() || type.floating || type.requiresWater || type.placeableLiquid)
|
||||||
&& tile.floor().placeableOn
|
&& tile.floor().placeableOn
|
||||||
&& (!type.requiresWater || tile.floor().liquidDrop == Liquids.water)
|
&& (!type.requiresWater || tile.floor().liquidDrop == Liquids.water)
|
||||||
&& (((type.canReplace(tile.block()) || (tile.block instanceof BuildBlock && tile.<BuildEntity>bc().cblock == type))
|
&& (((type.canReplace(tile.block()) || (tile.block instanceof BuildBlock && tile.<BuildEntity>bc().cblock == type))
|
||||||
|
|||||||