Item sprite cleanup
Before Width: | Height: | Size: 265 B After Width: | Height: | Size: 322 B |
Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 319 B |
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 521 B |
Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 354 B |
Before Width: | Height: | Size: 287 B After Width: | Height: | Size: 420 B |
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 507 B |
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 469 B |
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 481 B |
Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 308 B |
Before Width: | Height: | Size: 269 B After Width: | Height: | Size: 360 B |
Before Width: | Height: | Size: 327 B After Width: | Height: | Size: 386 B |
Before Width: | Height: | Size: 294 B After Width: | Height: | Size: 347 B |
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 380 B |
Before Width: | Height: | Size: 340 B After Width: | Height: | Size: 539 B |
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 489 B |
Before Width: | Height: | Size: 312 B After Width: | Height: | Size: 458 B |
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 527 B |
Before Width: | Height: | Size: 346 B After Width: | Height: | Size: 508 B |
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 484 B |
Before Width: | Height: | Size: 346 B After Width: | Height: | Size: 519 B |
@ -581,7 +581,6 @@ settings.clearcampaignsaves.confirm = Are you sure you want to clear all of your
|
||||
paused = [accent]< Paused >
|
||||
clear = Clear
|
||||
banned = [scarlet]Banned
|
||||
unplaceable.sectorcaptured = [scarlet]Requires captured sector
|
||||
yes = Yes
|
||||
no = No
|
||||
info.title = Info
|
||||
|
Before Width: | Height: | Size: 562 KiB After Width: | Height: | Size: 556 KiB |
Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 185 KiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 2.9 MiB After Width: | Height: | Size: 2.9 MiB |
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 186 KiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
@ -342,7 +342,7 @@ public class PlacementFragment extends Fragment{
|
||||
topTable.row();
|
||||
topTable.table(b -> {
|
||||
b.image(Icon.cancel).padRight(2).color(Color.scarlet);
|
||||
b.add(!player.isBuilder() ? "@unit.nobuild" : displayBlock.unplaceableMessage()).width(190f).wrap();
|
||||
b.add(!player.isBuilder() ? "@unit.nobuild" : "@banned").width(190f).wrap();
|
||||
b.left();
|
||||
}).padTop(2).left();
|
||||
}
|
||||
|
@ -191,8 +191,6 @@ public class Block extends UnlockableContent{
|
||||
public float buildCost;
|
||||
/** Whether this block is visible and can currently be built. */
|
||||
public BuildVisibility buildVisibility = BuildVisibility.hidden;
|
||||
/** Defines when this block can be placed. */
|
||||
public BuildPlaceability buildPlaceability = BuildPlaceability.always;
|
||||
/** Multiplier for speed of building this block. */
|
||||
public float buildCostMultiplier = 1f;
|
||||
/** Multiplier for cost of research in tech tree. */
|
||||
@ -521,7 +519,7 @@ public class Block extends UnlockableContent{
|
||||
}
|
||||
|
||||
public boolean isPlaceable(){
|
||||
return isVisible() && buildPlaceability.placeable() && !state.rules.bannedBlocks.contains(this);
|
||||
return isVisible() && !state.rules.bannedBlocks.contains(this);
|
||||
}
|
||||
|
||||
/** Called when building of this block begins. */
|
||||
@ -534,11 +532,6 @@ public class Block extends UnlockableContent{
|
||||
|
||||
}
|
||||
|
||||
/** @return a message detailing why this block can't be placed. */
|
||||
public String unplaceableMessage(){
|
||||
return state.rules.bannedBlocks.contains(this) ? Core.bundle.get("banned") : buildPlaceability.message();
|
||||
}
|
||||
|
||||
public boolean isFloor(){
|
||||
return this instanceof Floor;
|
||||
}
|
||||
|
@ -1,32 +0,0 @@
|
||||
package mindustry.world.meta;
|
||||
|
||||
import arc.*;
|
||||
import arc.func.*;
|
||||
import mindustry.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Like BuildVisiblity, but defines whether a block can be *placed*, with an extra message.
|
||||
* This is like defining a conditionally banned block.
|
||||
* */
|
||||
public enum BuildPlaceability{
|
||||
always(() -> true),
|
||||
sectorCaptured(() -> Vars.state.rules.sector != null && Vars.state.rules.sector.isCaptured());
|
||||
|
||||
private final Boolp placeability;
|
||||
|
||||
BuildPlaceability(Boolp placeability){
|
||||
this.placeability = placeability;
|
||||
}
|
||||
|
||||
public boolean placeable(){
|
||||
return placeability.get();
|
||||
}
|
||||
|
||||
/** @return why this block is banned. */
|
||||
public String message(){
|
||||
return Core.bundle.get("unplaceable." + name().toLowerCase(Locale.ROOT));
|
||||
}
|
||||
|
||||
}
|
@ -9,7 +9,7 @@ public enum BuildVisibility{
|
||||
debugOnly(() -> false),
|
||||
sandboxOnly(() -> Vars.state.rules.infiniteResources),
|
||||
campaignOnly(() -> Vars.state.isCampaign()),
|
||||
lightingOnly(() -> Vars.state.rules.lighting),
|
||||
lightingOnly(() -> Vars.state.rules.lighting || Vars.state.isCampaign()),
|
||||
ammoOnly(() -> Vars.state.rules.unitAmmo);
|
||||
|
||||
private final Boolp visible;
|
||||
|