v2.2.0: added a new tile type that matches empty but cannot be modified
This commit is contained in:
@@ -1458,6 +1458,7 @@ public abstract class Level implements Bundlable {
|
||||
case Terrain.EMPTY:
|
||||
case Terrain.EMPTY_SP:
|
||||
case Terrain.EMPTY_DECO:
|
||||
case Terrain.CUSTOM_DECO_EMPTY:
|
||||
case Terrain.SECRET_TRAP:
|
||||
return Messages.get(Level.class, "floor_name");
|
||||
case Terrain.GRASS:
|
||||
|
||||
@@ -54,6 +54,7 @@ public class Terrain {
|
||||
public static final int BOOKSHELF = 27;
|
||||
public static final int ALCHEMY = 28;
|
||||
|
||||
public static final int CUSTOM_DECO_EMPTY = 32; //regular empty tile that can't be overridden, used for custom visuals mainly
|
||||
//solid environment decorations
|
||||
public static final int CUSTOM_DECO = 23; //invisible decoration that will also be a custom visual, re-uses the old terrain ID for signs
|
||||
public static final int STATUE = 25;
|
||||
@@ -108,10 +109,14 @@ public class Terrain {
|
||||
flags[BOOKSHELF] = flags[BARRICADE];
|
||||
flags[ALCHEMY] = SOLID;
|
||||
|
||||
flags[CUSTOM_DECO_EMPTY] = flags[EMPTY];
|
||||
flags[CUSTOM_DECO] = SOLID;
|
||||
flags[STATUE] = SOLID;
|
||||
flags[STATUE_SP] = flags[STATUE];
|
||||
|
||||
flags[MINE_CRYSTAL] = SOLID;
|
||||
flags[MINE_BOULDER] = SOLID;
|
||||
|
||||
}
|
||||
|
||||
public static int discover( int terr ) {
|
||||
|
||||
@@ -58,7 +58,7 @@ public class MassGraveRoom extends SpecialRoom {
|
||||
level.addItemToSpawn(new PotionOfLiquidFlame());
|
||||
|
||||
Painter.fill(level, this, Terrain.WALL);
|
||||
Painter.fill(level, this, 1, Terrain.EMPTY_SP);
|
||||
Painter.fill(level, this, 1, Terrain.CUSTOM_DECO_EMPTY);
|
||||
|
||||
Bones b = new Bones();
|
||||
|
||||
@@ -72,7 +72,7 @@ public class MassGraveRoom extends SpecialRoom {
|
||||
int pos;
|
||||
do {
|
||||
pos = level.pointToCell(random());
|
||||
} while (level.map[pos] != Terrain.EMPTY_SP || level.findMob(pos) != null);
|
||||
} while (level.map[pos] != Terrain.CUSTOM_DECO_EMPTY || level.findMob(pos) != null);
|
||||
skele.pos = pos;
|
||||
level.mobs.add( skele );
|
||||
}
|
||||
@@ -91,7 +91,7 @@ public class MassGraveRoom extends SpecialRoom {
|
||||
int pos;
|
||||
do {
|
||||
pos = level.pointToCell(random());
|
||||
} while (level.map[pos] != Terrain.EMPTY_SP || level.heaps.get(pos) != null);
|
||||
} while (level.map[pos] != Terrain.CUSTOM_DECO_EMPTY || level.heaps.get(pos) != null);
|
||||
Heap h = level.drop(item, pos);
|
||||
h.setHauntedIfCursed();
|
||||
h.type = Heap.Type.SKELETON;
|
||||
|
||||
@@ -56,7 +56,11 @@ public class MineGiantRoom extends CaveRoom {
|
||||
CrystalSpire m = new CrystalSpire();
|
||||
m.pos = level.pointToCell(p);
|
||||
level.mobs.add(m);
|
||||
Painter.set(level, p, Terrain.EMPTY);
|
||||
Painter.set(level, p, Terrain.CUSTOM_DECO_EMPTY);
|
||||
Painter.set(level, p.x-1, p.y, Terrain.CUSTOM_DECO_EMPTY);
|
||||
Painter.set(level, p.x+1, p.y, Terrain.CUSTOM_DECO_EMPTY);
|
||||
Painter.set(level, p.x, p.y-1, Terrain.CUSTOM_DECO_EMPTY);
|
||||
Painter.set(level, p.x, p.y-2, Terrain.CUSTOM_DECO_EMPTY);
|
||||
|
||||
} else {
|
||||
Painter.fillEllipse(level, this, 3, Terrain.EMPTY);
|
||||
|
||||
@@ -59,7 +59,7 @@ public class RitualSiteRoom extends StandardRoom {
|
||||
|
||||
level.customTiles.add(vis);
|
||||
|
||||
Painter.fill(level, c.x-1, c.y-1, 3, 3, Terrain.EMPTY_DECO);
|
||||
Painter.fill(level, c.x-1, c.y-1, 3, 3, Terrain.CUSTOM_DECO_EMPTY);
|
||||
|
||||
level.addItemToSpawn(new CeremonialCandle());
|
||||
level.addItemToSpawn(new CeremonialCandle());
|
||||
|
||||
@@ -96,6 +96,7 @@ public class DungeonTileSheet {
|
||||
chasmStitcheable.put( Terrain.BOOKSHELF, CHASM_FLOOR );
|
||||
chasmStitcheable.put( Terrain.BARRICADE, CHASM_FLOOR );
|
||||
chasmStitcheable.put( Terrain.PEDESTAL, CHASM_FLOOR );
|
||||
chasmStitcheable.put( Terrain.CUSTOM_DECO_EMPTY,CHASM_FLOOR );
|
||||
chasmStitcheable.put( Terrain.MINE_BOULDER, CHASM_FLOOR );
|
||||
chasmStitcheable.put( Terrain.MINE_CRYSTAL, CHASM_FLOOR );
|
||||
|
||||
@@ -134,7 +135,7 @@ public class DungeonTileSheet {
|
||||
Terrain.BARRICADE, Terrain.HIGH_GRASS, Terrain.FURROWED_GRASS, Terrain.SECRET_TRAP,
|
||||
Terrain.TRAP, Terrain.INACTIVE_TRAP, Terrain.EMPTY_DECO,
|
||||
Terrain.CUSTOM_DECO, Terrain.WELL, Terrain.STATUE, Terrain.ALCHEMY,
|
||||
Terrain.MINE_CRYSTAL, Terrain.MINE_BOULDER,
|
||||
Terrain.CUSTOM_DECO_EMPTY, Terrain.MINE_CRYSTAL, Terrain.MINE_BOULDER,
|
||||
Terrain.DOOR, Terrain.OPEN_DOOR, Terrain.LOCKED_DOOR, Terrain.CRYSTAL_DOOR
|
||||
));
|
||||
|
||||
@@ -392,6 +393,7 @@ public class DungeonTileSheet {
|
||||
directVisuals.put(Terrain.SECRET_TRAP, directVisuals.get(Terrain.EMPTY));
|
||||
directVisuals.put(Terrain.TRAP, directVisuals.get(Terrain.EMPTY));
|
||||
directVisuals.put(Terrain.INACTIVE_TRAP, directVisuals.get(Terrain.EMPTY));
|
||||
directVisuals.put(Terrain.CUSTOM_DECO_EMPTY,directVisuals.get(Terrain.EMPTY));
|
||||
|
||||
directVisuals.put(Terrain.EMPTY_DECO, FLOOR_DECO);
|
||||
directVisuals.put(Terrain.LOCKED_EXIT, LOCKED_EXIT);
|
||||
|
||||
Reference in New Issue
Block a user