More map submission testing / Desktop editor pick tile support

This commit is contained in:
Anuken
2024-10-02 12:29:26 -04:00
parent aaa27a0b69
commit 939b8a9ed8
10 changed files with 63 additions and 5 deletions

View File

@@ -165,7 +165,7 @@ public class Build{
/** Returns whether a tile can be placed at this location by this team. */
public static boolean validPlace(Block type, Team team, int x, int y, int rotation, boolean checkVisible){
//the wave team can build whatever they want as long as it's visible - banned blocks are not applicable
if(type == null || (checkVisible && (!type.environmentBuildable() || (!type.isPlaceable() && !(state.rules.waves && team == state.rules.waveTeam && type.isVisible()))))){
if(type == null || (!state.rules.editor && (checkVisible && (!type.environmentBuildable() || (!type.isPlaceable() && !(state.rules.waves && team == state.rules.waveTeam && type.isVisible())))))){
return false;
}
@@ -205,7 +205,7 @@ public class Build{
}
//campaign darkness check
if(world.getDarkness(x, y) >= 3){
if(!type.ignoreBuildDarkness && world.getDarkness(x, y) >= 3){
return false;
}