From f74de0c58aa3be0d0aa17c2a1f8b942ae2a6d5c8 Mon Sep 17 00:00:00 2001 From: syeyoung <42869671+cyoung06@users.noreply.github.com> Date: Sat, 28 Nov 2020 00:11:49 +0900 Subject: mechanics stuff --- .../dungeonsguide/dungeon/data/DungeonRoomInfo.java | 3 +++ .../dungeonsguide/dungeon/mechanics/DungeonDoor.java | 10 ++++++++++ .../dungeonsguide/dungeon/mechanics/DungeonKey.java | 7 +++++++ .../dungeon/mechanics/DungeonKeyPlacement.java | 12 ++++++++++++ .../dungeonsguide/dungeon/mechanics/DungeonLever.java | 11 +++++++++++ .../dungeonsguide/dungeon/mechanics/DungeonMechanic.java | 6 ++++++ .../dungeonsguide/dungeon/mechanics/DungeonSecret.java | 16 ++++++++++++++++ .../dungeonsguide/dungeon/mechanics/DungeonWeakWall.java | 9 +++++++++ .../dungeonsguide/dungeon/mechanics/Triggered.java | 4 ++++ .../dungeonsguide/dungeon/mechanics/Triggering.java | 4 ++++ 10 files changed, 82 insertions(+) create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDoor.java create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonKey.java create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonKeyPlacement.java create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonLever.java create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonMechanic.java create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonSecret.java create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonWeakWall.java create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/Triggered.java create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/Triggering.java (limited to 'src/main/java') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/DungeonRoomInfo.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/DungeonRoomInfo.java index b8891a19..06ca7877 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/DungeonRoomInfo.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/DungeonRoomInfo.java @@ -1,5 +1,6 @@ package kr.syeyoung.dungeonsguide.dungeon.data; +import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonMechanic; import kr.syeyoung.dungeonsguide.roomedit.valueedit.ActuallyClonable; import lombok.Getter; import lombok.Setter; @@ -33,4 +34,6 @@ public class DungeonRoomInfo implements Serializable { private String processorId = "default"; private Map properties = new HashMap(); + + private Map mechanics = new HashMap(); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDoor.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDoor.java new file mode 100644 index 00000000..01f001e0 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDoor.java @@ -0,0 +1,10 @@ +package kr.syeyoung.dungeonsguide.dungeon.mechanics; + +import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPointSet; +import lombok.Data; + +@Data +public class DungeonDoor implements Triggered { + private OffsetPointSet offsetPointSet = new OffsetPointSet(); + private Triggering triggering; +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonKey.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonKey.java new file mode 100644 index 00000000..15ca98dd --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonKey.java @@ -0,0 +1,7 @@ +package kr.syeyoung.dungeonsguide.dungeon.mechanics; + +import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint; + +public class DungeonKey implements DungeonMechanic { + private OffsetPoint key; +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonKeyPlacement.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonKeyPlacement.java new file mode 100644 index 00000000..e2f20ba3 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonKeyPlacement.java @@ -0,0 +1,12 @@ +package kr.syeyoung.dungeonsguide.dungeon.mechanics; + +import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint; +import lombok.Data; + +@Data +public class DungeonKeyPlacement implements DungeonMechanic, Triggering { + private OffsetPoint keySlot; + private DungeonKey dungeonKey; + + private Triggered triggered; +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonLever.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonLever.java new file mode 100644 index 00000000..d52982ad --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonLever.java @@ -0,0 +1,11 @@ +package kr.syeyoung.dungeonsguide.dungeon.mechanics; + +import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint; +import lombok.Data; + +@Data +public class DungeonLever implements DungeonMechanic { + private OffsetPoint lever = new OffsetPoint(0,0,0); + + private Triggered triggered; +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonMechanic.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonMechanic.java new file mode 100644 index 00000000..2af93795 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonMechanic.java @@ -0,0 +1,6 @@ +package kr.syeyoung.dungeonsguide.dungeon.mechanics; + +import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPointSet; + +public interface DungeonMechanic { +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonSecret.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonSecret.java new file mode 100644 index 00000000..4c3974fb --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonSecret.java @@ -0,0 +1,16 @@ +package kr.syeyoung.dungeonsguide.dungeon.mechanics; + +import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint; +import lombok.Data; +import lombok.Getter; +import lombok.Setter; + +@Data +public class DungeonSecret implements DungeonMechanic { + private OffsetPoint secretPoint = new OffsetPoint(0,0,0); + private SecretType secretType = SecretType.CHEST; + + public static enum SecretType { + BAT, CHEST, ITEM_DROP + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonWeakWall.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonWeakWall.java new file mode 100644 index 00000000..e233c2fb --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonWeakWall.java @@ -0,0 +1,9 @@ +package kr.syeyoung.dungeonsguide.dungeon.mechanics; + +import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPointSet; +import lombok.Data; + +@Data +public class DungeonWeakWall implements DungeonMechanic { + OffsetPointSet weakWalls = new OffsetPointSet(); +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/Triggered.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/Triggered.java new file mode 100644 index 00000000..d32a76e4 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/Triggered.java @@ -0,0 +1,4 @@ +package kr.syeyoung.dungeonsguide.dungeon.mechanics; + +public interface Triggered extends DungeonMechanic{ +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/Triggering.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/Triggering.java new file mode 100644 index 00000000..7d535d37 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/Triggering.java @@ -0,0 +1,4 @@ +package kr.syeyoung.dungeonsguide.dungeon.mechanics; + +public interface Triggering extends DungeonMechanic { +} -- cgit