From beedda8b62a1a43b9f447417306fc9798cad58da Mon Sep 17 00:00:00 2001 From: musilto9 Date: Mon, 13 Apr 2020 22:23:09 +0200 Subject: [PATCH] changed doors --- .../ruscz/game/gameOfProd/Cells/Block.java | 26 ++++++++++- .../ruscz/game/gameOfProd/Cells/DoorCell.java | 13 ++++-- .../ruscz/game/gameOfProd/Cells/Person.java | 6 +-- .../game/gameOfProd/Image/ImageCell.java | 18 ++++++- .../game/gameOfProd/Image/ImageDoor.java | 42 +++++++++++++++++ .../game/gameOfProd/Image/ImagePerson.java | 1 - .../java/ruscz/game/gameOfProd/Map/Map.java | 37 ++++++++++----- .../gameOfProd/Windows/WindowOfFreeMove.java | 44 +++--------------- src/main/resources/dark-door.png | Bin 0 -> 1702 bytes src/main/resources/maps/boss-cellmap.txt | 2 +- src/main/resources/maps/boss.txt | 4 +- src/main/resources/maps/office-cellmap.txt | 2 +- src/main/resources/maps/office-tileset.txt | 5 +- src/main/resources/maps/office.txt | 13 ++---- src/main/resources/maps/openspace-cellmap.txt | 2 +- src/main/resources/maps/openspace.txt | 16 +++---- src/main/resources/save/savedGame/events.txt | 2 +- 17 files changed, 150 insertions(+), 83 deletions(-) create mode 100644 src/main/java/ruscz/game/gameOfProd/Image/ImageDoor.java create mode 100644 src/main/resources/dark-door.png 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 0000000000000000000000000000000000000000..d43e4e21327f81d939b3a0110b0a811e2c03275a GIT binary patch literal 1702 zcmZWq2{7Af6#xF>su1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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