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.util.*;
|
||||
import arc.util.ArcAnnotate.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.graphics.g3d.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.type.Sector.*;
|
||||
import mindustry.ui.*;
|
||||
import mindustry.world.blocks.storage.*;
|
||||
import mindustry.world.blocks.storage.CoreBlock.*;
|
||||
@ -184,7 +182,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
planets.drawPlane(hovered, () -> {
|
||||
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){
|
||||
Draw.rect(icon, 0, 0);
|
||||
@ -372,12 +370,8 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
|
||||
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, () -> {
|
||||
if(sector.is(SectorAttribute.naval)){
|
||||
ui.showInfo("You need a naval loadout to launch here.");
|
||||
return;
|
||||
}
|
||||
|
||||
boolean shouldHide = true;
|
||||
|
||||
|
@ -80,6 +80,8 @@ public class Block extends UnlockableContent{
|
||||
public boolean rebuildable = true;
|
||||
/** whether this water can only be placed on water */
|
||||
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. */
|
||||
public boolean placeableOn = true;
|
||||
/** 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));
|
||||
}
|
||||
|
||||
if(!type.requiresWater && !contactsShallows(tile.x, tile.y, type)){
|
||||
if(!type.requiresWater && !contactsShallows(tile.x, tile.y, type) && !type.placeableLiquid){
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ public class Build{
|
||||
other == null ||
|
||||
!other.block().alwaysReplace ||
|
||||
!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)
|
||||
){
|
||||
return false;
|
||||
@ -141,8 +141,8 @@ public class Build{
|
||||
return true;
|
||||
}else{
|
||||
return tile.interactable(team)
|
||||
&& (contactsShallows(tile.x, tile.y, type) || type.requiresWater)
|
||||
&& (!tile.floor().isDeep() || type.floating || type.requiresWater)
|
||||
&& (contactsShallows(tile.x, tile.y, type) || type.requiresWater || type.placeableLiquid)
|
||||
&& (!tile.floor().isDeep() || type.floating || type.requiresWater || type.placeableLiquid)
|
||||
&& tile.floor().placeableOn
|
||||
&& (!type.requiresWater || tile.floor().liquidDrop == Liquids.water)
|
||||
&& (((type.canReplace(tile.block()) || (tile.block instanceof BuildBlock && tile.<BuildEntity>bc().cblock == type))
|
||||
|