diff --git a/src/main/java/ruscz/game/gameOfProd/Cells/Block.java b/src/main/java/ruscz/game/gameOfProd/Cells/Block.java index d6fbf90..99b5966 100644 --- a/src/main/java/ruscz/game/gameOfProd/Cells/Block.java +++ b/src/main/java/ruscz/game/gameOfProd/Cells/Block.java @@ -8,22 +8,46 @@ import java.awt.*; public class Block extends Cell { private ImageCell imageCell; private boolean paint; + private String partial; public Block(int x, int y, ImageCell imageCell, boolean paint) { super(x, y, WindowOfFreeMove.CELL_SIZE, Color.BLUE); this.imageCell = imageCell; this.paint = paint; + this.partial = ""; + } + + public Block(int x, int y, ImageCell imageCell, String partial, boolean paint) { + super(x, y, WindowOfFreeMove.CELL_SIZE, Color.BLUE); + this.imageCell = imageCell; + this.partial = partial; + this.paint = paint; } public boolean isInBlock(int x, int y) { return (this.getX() == x) && (this.getY() == y); } + public boolean isInBlock(int x, int y, boolean half) { + return (this.getX() == x) && (this.getY() == y) && !(partial.equals("d")); + } + + public boolean isPartial() { + return !(partial.equals("")); + } + @Override public void paint(Graphics2D g) { super.paint(g); if (paint) - g.drawImage(imageCell.getImagesOfTiles().get(imageCell.getImageFromCellMap("BLOCK")), getX() * getSize(), + if (partial.equals("u")) + g.drawImage(imageCell.getImagesOfTiles().get(imageCell.getImageFromCellMap("BLOCK")), getX() * getSize(), + getY() * getSize() - (getSize() / 2), getSize(), getSize(), null); + else if (partial.equals("d")) + g.drawImage(imageCell.getImagesOfTiles().get(imageCell.getImageFromCellMap("BLOCK")), getX() * getSize(), + getY() * getSize() + (getSize() / 2), getSize(), getSize(), null); + else + g.drawImage(imageCell.getImagesOfTiles().get(imageCell.getImageFromCellMap("BLOCK")), getX() * getSize(), getY() * getSize(), getSize(), getSize(), null); } } \ No newline at end of file diff --git a/src/main/java/ruscz/game/gameOfProd/Cells/DoorCell.java b/src/main/java/ruscz/game/gameOfProd/Cells/DoorCell.java index dab4df4..8fcb2b5 100644 --- a/src/main/java/ruscz/game/gameOfProd/Cells/DoorCell.java +++ b/src/main/java/ruscz/game/gameOfProd/Cells/DoorCell.java @@ -2,6 +2,7 @@ package ruscz.game.gameOfProd.Cells; import ruscz.game.gameOfProd.Dialog.Dialog; import ruscz.game.gameOfProd.Image.ImageCell; +import ruscz.game.gameOfProd.Image.ImageDoor; import ruscz.game.gameOfProd.Windows.WindowOfFreeMove; import java.awt.*; @@ -10,25 +11,29 @@ public class DoorCell extends InteractionCell { private boolean isOpen; private boolean isLocked; private boolean requiresKey; + private boolean directionVert; - public DoorCell(int x, int y, String message, Dialog dialog, ImageCell imageCell, WindowOfFreeMove window, boolean requiresKey) { + public DoorCell(int x, int y, boolean directionVert, String message, Dialog dialog, ImageCell imageCell, WindowOfFreeMove window, boolean requiresKey) { super(x, y, message, dialog, imageCell, window, true); this.isOpen = false; this.isLocked = true; this.requiresKey = requiresKey; + this.directionVert = directionVert; } - public DoorCell(int x, int y, ImageCell imageCell, WindowOfFreeMove window) { + public DoorCell(int x, int y, boolean directionVert, ImageCell imageCell, WindowOfFreeMove window) { super(x, y, null, null, imageCell, window, true); this.isOpen = false; this.isLocked = false; + this.directionVert = directionVert; } @Override public void paint(Graphics2D g) { int open = isOpen ? 1 : 0; - g.drawImage(super.getImageCell().getImagesOfTiles().get(super.getImageCell().getImageFromCellMap("DOOR") + open), getX() * getSize(), - getY() * getSize(), getSize(), getSize(), null); + int direction = directionVert ? 0 : 2; + g.drawImage(super.getImageCell().getImageDoor().getImagesOfDoor()[open + direction], (getX() - 1) * getSize(), + (getY() - 1) * getSize(), getSize() * 2, getSize() * 2, null); } public boolean isOpen() { diff --git a/src/main/java/ruscz/game/gameOfProd/Cells/Person.java b/src/main/java/ruscz/game/gameOfProd/Cells/Person.java index 3c4955d..fc2361b 100644 --- a/src/main/java/ruscz/game/gameOfProd/Cells/Person.java +++ b/src/main/java/ruscz/game/gameOfProd/Cells/Person.java @@ -114,10 +114,10 @@ public class Person extends Cell { break; } if (directionMove != WindowOfFreeMove.KEY_EVENT) { - if (directionMove != 0 && !map.isBusyCell(x, y) && !map.isInteractionCell(x, y) && !map.isClosedDoor(x, y)) { + if (directionMove != 0 && !map.isBusyCell(x, y, true) && !map.isInteractionCell(x, y) && !map.isClosedDoor(x, y)) { directionMoveLast = directionMove; isMoving = true; - } else if (directionMove != 0 && map.isBusyCell(x, y)) { + } else if (directionMove != 0 && map.isBusyCell(x, y, true)) { directionMoveLast = 0; } else if (directionMove != 0 && map.isInteractionCell(x, y)) { directionMoveLast = 0; @@ -131,7 +131,7 @@ public class Person extends Cell { map.findEventByXY(x, y).moveToMap(); } } else { - if (!map.isInteractionCell(x, y) && !map.isBusyCell(x, y) && !map.isClosedDoor(x, y)) { + if (!map.isInteractionCell(x, y) && !map.isBusyCell(x, y, true) && !map.isClosedDoor(x, y)) { set(x, y); } } diff --git a/src/main/java/ruscz/game/gameOfProd/Image/ImageCell.java b/src/main/java/ruscz/game/gameOfProd/Image/ImageCell.java index 9710fde..9f6dc6d 100644 --- a/src/main/java/ruscz/game/gameOfProd/Image/ImageCell.java +++ b/src/main/java/ruscz/game/gameOfProd/Image/ImageCell.java @@ -17,6 +17,7 @@ public class ImageCell { private static BufferedImage image; private LinkedList imagesOfTiles; private HashMap cellMap; + private ImageDoor imageDoor; private int[][] mapBackground; private int[][] mapForeground; @@ -106,7 +107,20 @@ public class ImageCell { while (scanner.hasNextLine()) { String data = scanner.nextLine(); String[] cellInfo = data.split(" "); - cellMap.put(cellInfo[0], Integer.parseInt(cellInfo[1])); + if (cellInfo[0].equals("DOOR")) { + Rectangle[] rec = new Rectangle[12]; + int CELL_SIZE = WindowOfFreeMove.CELL_SIZE; + int count = 0; + for (int i = 0; i < rec.length / 4; i++) { + for (int j = 0; j < rec.length / 3; j++) { + rec[count] = new Rectangle(CELL_SIZE * i, CELL_SIZE * j, CELL_SIZE, CELL_SIZE); + count++; + } + } + imageDoor = new ImageDoor(cellInfo[1], rec); + } + else + cellMap.put(cellInfo[0], Integer.parseInt(cellInfo[1])); } } catch (FileNotFoundException e) { e.printStackTrace(); @@ -121,6 +135,8 @@ public class ImageCell { return imagesOfTiles; } + public ImageDoor getImageDoor() { return imageDoor; } + public void paintBackground(Graphics g, int x, int y) { g.drawImage(imagesOfTiles.get(mapBackground[x][y]), x * WindowOfFreeMove.CELL_SIZE, y * WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null); diff --git a/src/main/java/ruscz/game/gameOfProd/Image/ImageDoor.java b/src/main/java/ruscz/game/gameOfProd/Image/ImageDoor.java new file mode 100644 index 0000000..1cd31f4 --- /dev/null +++ b/src/main/java/ruscz/game/gameOfProd/Image/ImageDoor.java @@ -0,0 +1,42 @@ +package ruscz.game.gameOfProd.Image; + +import javax.imageio.ImageIO; +import java.awt.*; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; + +public class ImageDoor { + private BufferedImage image; + private BufferedImage[] imagesOfDoor; + private int size; + + public void setAllImagesOfDoor(Rectangle[] rectangles){ + imagesOfDoor = new BufferedImage[4]; + + if (rectangles.length < 4) + throw new IllegalArgumentException(); + + for (int j = 0; j < 4; j++) { + BufferedImage img = image.getSubimage(0, size * j * 2, size * 2, size * 2); + imagesOfDoor[j] = img; + } + } + + public ImageDoor(String door, Rectangle[] rectangles) { + try { + String[] doorInfo = door.split(","); + image = ImageIO.read(new File("src/main/resources/" + doorInfo[0])); + size = Integer.parseInt(doorInfo[1]); + } catch (IOException e) { + e.printStackTrace(); + } + + setAllImagesOfDoor(rectangles); + } + + + public BufferedImage[] getImagesOfDoor() { + return imagesOfDoor; + } +} diff --git a/src/main/java/ruscz/game/gameOfProd/Image/ImagePerson.java b/src/main/java/ruscz/game/gameOfProd/Image/ImagePerson.java index 93396a7..775fee0 100644 --- a/src/main/java/ruscz/game/gameOfProd/Image/ImagePerson.java +++ b/src/main/java/ruscz/game/gameOfProd/Image/ImagePerson.java @@ -25,7 +25,6 @@ public class ImagePerson { for (int i = 0; i < 3; i++) { for (int j = 0; j < 4; j++) { BufferedImage img = image.getSubimage(subimageWidth * i, subimageHeight * j, subimageWidth, subimageHeight); -// imagesOfDirection[count] = resize(img); imagesOfDirection[count] = img; count++; } diff --git a/src/main/java/ruscz/game/gameOfProd/Map/Map.java b/src/main/java/ruscz/game/gameOfProd/Map/Map.java index 7328e9d..ed40a80 100644 --- a/src/main/java/ruscz/game/gameOfProd/Map/Map.java +++ b/src/main/java/ruscz/game/gameOfProd/Map/Map.java @@ -79,13 +79,20 @@ public class Map { String[] line = data.split(" "); for (int x = 0; x < Integer.parseInt(size[0]); x++) { TypeOfCell cellType; - if (line[x].equals("BLOCK") || line[x].equals("block")) { + if (line[x].contains("BLOCK") || line[x].equals("block")) { cellType = TypeOfCell.BLOCK; map.getMapArray()[x][y] = cellType; - if (line[x].equals("BLOCK")) - map.getBlocks().add(new Block(x, y, map.getImageCell(), true)); - else + String[] block = line[x].split(","); + if (block[0].equals("BLOCK")) + if (block.length == 2) { + map.getBlocks().add(new Block(x, y, map.getImageCell(), block[1], true)); + } + else { + map.getBlocks().add(new Block(x, y, map.getImageCell(), true)); + } + else { map.getBlocks().add(new Block(x, y, map.getImageCell(), false)); + } } else if (line[x].equals("EMPTY")) { cellType = TypeOfCell.EMPTY; map.getMapArray()[x][y] = cellType; @@ -102,10 +109,10 @@ public class Map { map.setSpawnPoint(x, y); } else if (line[x].contains("DOOR") && !line[x].contains("DOORTO")) { String[] door = line[x].split(","); - if (line[x].equals("DOOR")) - map.addInteractionEvent(new DoorCell(x, y, map.getImageCell(), window)); + if (door.length == 2) + map.addInteractionEvent(new DoorCell(x, y, Boolean.parseBoolean(door[1]), map.getImageCell(), window)); else - map.addInteractionEvent(new DoorCell(x, y, door[1], new Dialog(window.getDialogBar()), map.getImageCell(), window, Boolean.parseBoolean(door[2]))); + map.addInteractionEvent(new DoorCell(x, y, Boolean.parseBoolean(door[1]), door[2], new Dialog(window.getDialogBar()), map.getImageCell(), window, Boolean.parseBoolean(door[3]))); } } } @@ -132,12 +139,12 @@ public class Map { else if (line[x].contains("DOORTO")) { String[] doorTo = line[x].split(","); if (doorTo[1].equals("locked")) { - map.addInteractionEvent(new DoorCell(x, y, doorTo[2], new Dialog(window.getDialogBar()), map.getImageCell(), window, Boolean.parseBoolean(doorTo[3]))); - map.addMoveToEvent(new EventMoveToCell(Integer.parseInt(doorTo[4]), Integer.parseInt(doorTo[5]), x, y, findMapByName(doorTo[6], window), window, false)); + map.addInteractionEvent(new DoorCell(x, y, Boolean.parseBoolean(doorTo[2]), doorTo[3], new Dialog(window.getDialogBar()), map.getImageCell(), window, Boolean.parseBoolean(doorTo[4]))); + map.addMoveToEvent(new EventMoveToCell(Integer.parseInt(doorTo[5]), Integer.parseInt(doorTo[6]), x, y, findMapByName(doorTo[7], window), window, false)); } else { - map.addInteractionEvent(new DoorCell(x, y, map.getImageCell(), window)); - map.addMoveToEvent(new EventMoveToCell(Integer.parseInt(doorTo[1]), Integer.parseInt(doorTo[2]), x, y, findMapByName(doorTo[3], window), window, false)); + map.addInteractionEvent(new DoorCell(x, y, Boolean.parseBoolean(doorTo[1]), map.getImageCell(), window)); + map.addMoveToEvent(new EventMoveToCell(Integer.parseInt(doorTo[2]), Integer.parseInt(doorTo[3]), x, y, findMapByName(doorTo[4], window), window, false)); } } } @@ -236,6 +243,14 @@ public class Map { return false; } + public boolean isBusyCell(int x, int y, boolean half) { + for (Block cell : block) { + if (cell.isInBlock(x, y, half)) + return true; + } + return false; + } + public boolean isCellMoveTo(int x, int y) { for (EventMoveToCell cell : moveToCells) if (x == cell.getX() && y == cell.getY() && cell.getClass().getName().equals("ruscz.game.gameOfProd.Cells.EventMoveToCell")) diff --git a/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMove.java b/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMove.java index 9b068d7..f5661b2 100644 --- a/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMove.java +++ b/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMove.java @@ -183,41 +183,6 @@ public class WindowOfFreeMove extends JLayeredPane { public class Canvas extends JPanel { @Override -// public void paint(Graphics g) { -// if (isReadyToPaint) { -// super.paint(g); -// Graphics2D g2D = (Graphics2D) g; -// g2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, -// RenderingHints.VALUE_ANTIALIAS_ON); -// for (int i = 0; i < mapManager.getActualMap().getCanvasSize()[0]; i++) { -// for (int j = 0; j < mapManager.getActualMap().getCanvasSize()[1]; j++) { -// mapManager.getActualMap().getImageCell().paintBackground(g2D, i, j); -// } -// } -// for (Cell cell : mapManager.getActualMap().getMoveToCells()) { -// cell.paint(g2D); -// } -// for (Cell cell : mapManager.getActualMap().getBlocks()) { -// cell.paint(g2D); -// } -// for (Cell cell : mapManager.getActualMap().getInteractionEventCells()) { -// cell.paint(g2D); -// } -// for (Cell cell : mapManager.getActualMap().getDoorCells()) { -// cell.paint(g2D); -// } -// for (Person person : mapManager.getActualMap().getNpcs()) { -// person.paint(g2D); -// } -// for (int i = 0; i < mapManager.getActualMap().getCanvasSize()[0]; i++) { -// for (int j = 0; j < mapManager.getActualMap().getCanvasSize()[1]; j++) { -// mapManager.getActualMap().getImageCell().paintForeground(g2D, i, j); -// } -// } -// mapManager.getActualMap().getPerson().paint(g2D); -// } -// } - public void paint(Graphics g) { if (isReadyToPaint) { super.paint(g); @@ -231,15 +196,18 @@ public class WindowOfFreeMove extends JLayeredPane { for (Cell cell : mapManager.getActualMap().getMoveToCells()) { if (cell.getY() == i) cell.paint(g2D); } - for (Cell cell : mapManager.getActualMap().getBlocks()) { - if (cell.getY() == i) cell.paint(g2D); + for (Block cell : mapManager.getActualMap().getBlocks()) { + if (cell.getY() == i && !cell.isPartial()) cell.paint(g2D); } if (mapManager.getActualMap().getPerson().getY() == i && mapManager.getActualMap().getPerson().getDirectionMoveLast() != KEY_UP) mapManager.getActualMap().getPerson().paint(g2D); for (Cell cell : mapManager.getActualMap().getInteractionEventCells()) { if (cell.getY() == i) cell.paint(g2D); } if (mapManager.getActualMap().getPerson().getY() == (i-1) && mapManager.getActualMap().getPerson().getDirectionMoveLast() == KEY_UP) mapManager.getActualMap().getPerson().paint(g2D); - for (Cell cell : mapManager.getActualMap().getDoorCells()) { + for (Block cell : mapManager.getActualMap().getBlocks()) { + if (cell.getY() == i && cell.isPartial()) cell.paint(g2D); + } + for (DoorCell cell : mapManager.getActualMap().getDoorCells()) { if (cell.getY() == i) cell.paint(g2D); } for (Person person : mapManager.getActualMap().getNpcs()) { diff --git a/src/main/resources/dark-door.png b/src/main/resources/dark-door.png new file mode 100644 index 0000000..d43e4e2 Binary files /dev/null and b/src/main/resources/dark-door.png differ diff --git a/src/main/resources/maps/boss-cellmap.txt b/src/main/resources/maps/boss-cellmap.txt index ecb4ed5..2bf3640 100644 --- a/src/main/resources/maps/boss-cellmap.txt +++ b/src/main/resources/maps/boss-cellmap.txt @@ -2,4 +2,4 @@ BLOCK 2 MOVETO 1 EVENT 3 TRIGGER 4 -DOOR 254 \ No newline at end of file +DOOR dark-door.png,32 \ No newline at end of file diff --git a/src/main/resources/maps/boss.txt b/src/main/resources/maps/boss.txt index 0ad3b9b..93de7b8 100644 --- a/src/main/resources/maps/boss.txt +++ b/src/main/resources/maps/boss.txt @@ -17,5 +17,5 @@ BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK -BLOCK EMPTY EMPTY EMPTY TRIGGER,ohhimark EMPTY EMPTY EMPTY BLOCK -BLOCK BLOCK BLOCK BLOCK DOORTO,0,1,office BLOCK BLOCK BLOCK BLOCK \ No newline at end of file +BLOCK BLOCK,d BLOCK,d BLOCK,d TRIGGER,ohhimark BLOCK,d BLOCK,d BLOCK,d BLOCK +BLOCK BLOCK BLOCK BLOCK DOORTO,true,0,1,office BLOCK BLOCK BLOCK BLOCK \ No newline at end of file diff --git a/src/main/resources/maps/office-cellmap.txt b/src/main/resources/maps/office-cellmap.txt index ecb4ed5..2bf3640 100644 --- a/src/main/resources/maps/office-cellmap.txt +++ b/src/main/resources/maps/office-cellmap.txt @@ -2,4 +2,4 @@ BLOCK 2 MOVETO 1 EVENT 3 TRIGGER 4 -DOOR 254 \ No newline at end of file +DOOR dark-door.png,32 \ No newline at end of file diff --git a/src/main/resources/maps/office-tileset.txt b/src/main/resources/maps/office-tileset.txt index cc005af..d520e4f 100644 --- a/src/main/resources/maps/office-tileset.txt +++ b/src/main/resources/maps/office-tileset.txt @@ -2,8 +2,7 @@ Openspace1.png 512 512 32 Openspace2.png 512 512 32 D_Inside_House.png 512 512 32 -6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 -6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 @@ -17,4 +16,6 @@ 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 \ No newline at end of file diff --git a/src/main/resources/maps/office.txt b/src/main/resources/maps/office.txt index 2598b8b..b007b39 100644 --- a/src/main/resources/maps/office.txt +++ b/src/main/resources/maps/office.txt @@ -1,17 +1,14 @@ -20 16 -BLOCK BLOCK BLOCK BLOCK DOOR BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK -BLOCK BLOCK BLOCK BLOCK DOORTO,0,3,boss BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK +20 13 +BLOCK,d BLOCK,d BLOCK,d BLOCK,d EMPTY BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d +BLOCK BLOCK BLOCK BLOCK DOORTO,true,0,3,boss BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK DOOR,true,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,true,locked,false BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK -BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY moveto,1,2,openspace EMPTY EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY moveto,1,2,openspace EMPTY EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK -BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block -BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK -BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK -BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK \ No newline at end of file +BLOCK BLOCK,d EMPTY BLOCK,d BLOCK,d BLOCK,d BLOCK,d EMPTY BLOCK,d BLOCK,d BLOCK,d BLOCK,d EMPTY BLOCK,d BLOCK,d BLOCK,d BLOCK,d EMPTY BLOCK,d BLOCK +BLOCK BLOCK DOOR,true,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,true,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,true,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,true,locked,false BLOCK BLOCK \ No newline at end of file diff --git a/src/main/resources/maps/openspace-cellmap.txt b/src/main/resources/maps/openspace-cellmap.txt index fdd1800..f24a83d 100644 --- a/src/main/resources/maps/openspace-cellmap.txt +++ b/src/main/resources/maps/openspace-cellmap.txt @@ -2,4 +2,4 @@ BLOCK 2 MOVETO 1 EVENT 0 TRIGGER 4 -DOOR 254 \ No newline at end of file +DOOR dark-door.png,32 \ No newline at end of file diff --git a/src/main/resources/maps/openspace.txt b/src/main/resources/maps/openspace.txt index db2b795..5a5869e 100644 --- a/src/main/resources/maps/openspace.txt +++ b/src/main/resources/maps/openspace.txt @@ -2,17 +2,17 @@ BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK block block block EMPTY EMPTY EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY inter,laugh inter,laugh EMPTY EMPTY BLOCK BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK -BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block -BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY DOOR EMPTY EMPTY EMPTY BLOCK EMPTY block block block block EMPTY block -BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK DOOR BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY block block block block EMPTY block -BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY block block block block EMPTY block +BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY block BLOCK,u EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block +BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY DOOR,false EMPTY EMPTY EMPTY BLOCK EMPTY block block block block EMPTY block +BLOCK BLOCK,d EMPTY BLOCK,d BLOCK,d BLOCK,d EMPTY BLOCK,d BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY block block block block EMPTY block +BLOCK BLOCK DOOR,true,locked,false BLOCK BLOCK BLOCK DOOR,true BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY block block block block EMPTY block BLOCK block EMPTY block BLOCK block EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY block block block block EMPTY block BLOCK block EMPTY block BLOCK block EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK -BLOCK block EMPTY block BLOCK block EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK -BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK DOOR BLOCK BLOCK BLOCK +BLOCK block EMPTY block BLOCK block EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK BLOCK,d BLOCK,d BLOCK,d EMPTY BLOCK,d BLOCK,d BLOCK +BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK DOOR,true BLOCK BLOCK BLOCK BLOCK EMPTY block block EMPTY inter,minecraft inter,minecraft EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK -BLOCK EMPTY block block EMPTY inter,minecraft inter,minecraft EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY block EMPTY EMPTY EMPTY block block -BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY DOOR EMPTY EMPTY EMPTY EMPTY EMPTY block block EMPTY block block block +BLOCK EMPTY block block EMPTY inter,minecraft inter,minecraft EMPTY BLOCK,u EMPTY EMPTY EMPTY EMPTY EMPTY block EMPTY EMPTY EMPTY block block +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY DOOR,false EMPTY EMPTY EMPTY EMPTY EMPTY block block EMPTY block block block BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY moveto,1,2,office EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY moveto,0,2,m1 EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block EMPTY block EMPTY BLOCK diff --git a/src/main/resources/save/savedGame/events.txt b/src/main/resources/save/savedGame/events.txt index 245388a..f79dde1 100644 --- a/src/main/resources/save/savedGame/events.txt +++ b/src/main/resources/save/savedGame/events.txt @@ -64,7 +64,7 @@ 4 18 - true + false