diff options
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics')
9 files changed, 42 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonBreakableWall.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonBreakableWall.java index 19f711cb..b2577371 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonBreakableWall.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonBreakableWall.java @@ -96,4 +96,9 @@ public class DungeonBreakableWall implements DungeonMechanic, RouteBlocker { public Set<String> getTotalPossibleStates(DungeonRoom dungeonRoom) { return Sets.newHashSet("open", "closed"); } + + @Override + public OffsetPoint getRepresentingPoint() { + return secretPoint.getOffsetPointList().size() == 0 ? null : secretPoint.getOffsetPointList().get(0); + } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDoor.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDoor.java index 25aedb7e..39d53931 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDoor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDoor.java @@ -99,4 +99,9 @@ public class DungeonDoor implements DungeonMechanic, RouteBlocker { public Set<String> getTotalPossibleStates(DungeonRoom dungeonRoom) { return Sets.newHashSet("open", "closed"); } + + @Override + public OffsetPoint getRepresentingPoint() { + return secretPoint.getOffsetPointList().size() == 0 ? null : secretPoint.getOffsetPointList().get(0); + } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonLever.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonLever.java index 2d29be31..a87d21fc 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonLever.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonLever.java @@ -93,4 +93,8 @@ public class DungeonLever implements DungeonMechanic { public Set<String> getTotalPossibleStates(DungeonRoom dungeonRoom) { return Sets.newHashSet("triggered", "untriggered"); } + @Override + public OffsetPoint getRepresentingPoint() { + return leverPoint; + } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonMechanic.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonMechanic.java index 26c75997..7dd91ae6 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonMechanic.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonMechanic.java @@ -1,6 +1,7 @@ package kr.syeyoung.dungeonsguide.dungeon.mechanics; import kr.syeyoung.dungeonsguide.dungeon.actions.Action; +import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint; import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom; import java.awt.*; @@ -16,4 +17,6 @@ public interface DungeonMechanic extends Serializable { Set<String> getPossibleStates(DungeonRoom dungeonRoom); Set<String> getTotalPossibleStates(DungeonRoom dungeonRoom); + + OffsetPoint getRepresentingPoint(); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonOnewayDoor.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonOnewayDoor.java index 3710b7f9..ca7ca9e3 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonOnewayDoor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonOnewayDoor.java @@ -87,4 +87,10 @@ public class DungeonOnewayDoor implements DungeonMechanic, RouteBlocker { public Set<String> getTotalPossibleStates(DungeonRoom dungeonRoom) { return Sets.newHashSet("open", "closed"); } + + + @Override + public OffsetPoint getRepresentingPoint() { + return secretPoint.getOffsetPointList().size() == 0 ? null : secretPoint.getOffsetPointList().get(0); + } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonOnewayLever.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonOnewayLever.java index ae8f594b..dc9b6fcb 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonOnewayLever.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonOnewayLever.java @@ -91,4 +91,9 @@ public class DungeonOnewayLever implements DungeonMechanic { public Set<String> getTotalPossibleStates(DungeonRoom dungeonRoom) { return Sets.newHashSet("triggered", "untriggered"); } + + @Override + public OffsetPoint getRepresentingPoint() { + return leverPoint; + } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonPressurePlate.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonPressurePlate.java index 4eeeab35..2677bc3b 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonPressurePlate.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonPressurePlate.java @@ -95,4 +95,8 @@ public class DungeonPressurePlate implements DungeonMechanic { public Set<String> getTotalPossibleStates(DungeonRoom dungeonRoom) { return Sets.newHashSet("triggered", "untriggered"); } + @Override + public OffsetPoint getRepresentingPoint() { + return platePoint; + } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonSecret.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonSecret.java index 4e8d8658..c12c066e 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonSecret.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonSecret.java @@ -121,4 +121,8 @@ public class DungeonSecret implements DungeonMechanic { public Set<String> getTotalPossibleStates(DungeonRoom dungeonRoom) { return Sets.newHashSet("found"/*, "definitely_not", "not_sure", "created", "error"*/); } + @Override + public OffsetPoint getRepresentingPoint() { + return secretPoint; + } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonTomb.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonTomb.java index 9fad7caf..26f8f5f9 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonTomb.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonTomb.java @@ -94,4 +94,10 @@ public class DungeonTomb implements DungeonMechanic, RouteBlocker { public Set<String> getTotalPossibleStates(DungeonRoom dungeonRoom) { return Sets.newHashSet("open", "closed"); } + + + @Override + public OffsetPoint getRepresentingPoint() { + return secretPoint.getOffsetPointList().size() == 0 ? null : secretPoint.getOffsetPointList().get(0); + } } |