aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/features
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java6
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonDeaths.java4
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonSecrets.java19
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeatureCopyMessages.java24
4 files changed, 49 insertions, 4 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java b/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java
index e5fbafbd..4712f8aa 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java
@@ -6,10 +6,7 @@ import kr.syeyoung.dungeonsguide.features.impl.advanced.FeatureRoomDebugInfo;
import kr.syeyoung.dungeonsguide.features.impl.boss.*;
import kr.syeyoung.dungeonsguide.features.impl.boss.terminal.FeatureTerminalSolvers;
import kr.syeyoung.dungeonsguide.features.impl.dungeon.*;
-import kr.syeyoung.dungeonsguide.features.impl.etc.FeatureCooldownCounter;
-import kr.syeyoung.dungeonsguide.features.impl.etc.FeatureDisableMessage;
-import kr.syeyoung.dungeonsguide.features.impl.etc.FeatureTooltipDungeonStat;
-import kr.syeyoung.dungeonsguide.features.impl.etc.FeatureTooltipPrice;
+import kr.syeyoung.dungeonsguide.features.impl.etc.*;
import kr.syeyoung.dungeonsguide.features.impl.secret.FeatureActions;
import kr.syeyoung.dungeonsguide.features.impl.secret.FeatureMechanicBrowse;
import lombok.Getter;
@@ -68,6 +65,7 @@ public class FeatureRegistry {
public static final SimpleFeature FIX_SPIRIT_BOOTS = register(new SimpleFeature("fixes", "Spirit Boots Fixer", "Fix Spirit boots messing up with inventory", "fixes.spirit", true));
public static final FeatureDisableMessage FIX_MESSAGES = register(new FeatureDisableMessage());
+ public static final FeatureCopyMessages ETC_COPY_MSG = register(new FeatureCopyMessages());
public static final SimpleFeature BOSSFIGHT_CHESTPRICE = register(new FeatureChestPrice());
public static final FeatureAutoReparty BOSSFIGHT_AUTOREPARTY = register(new FeatureAutoReparty());
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonDeaths.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonDeaths.java
index 33b88be8..46827fce 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonDeaths.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonDeaths.java
@@ -2,6 +2,7 @@ package kr.syeyoung.dungeonsguide.features.impl.dungeon;
import kr.syeyoung.dungeonsguide.SkyblockStatus;
import kr.syeyoung.dungeonsguide.dungeon.DungeonContext;
+import kr.syeyoung.dungeonsguide.dungeon.events.DungeonDeathEvent;
import kr.syeyoung.dungeonsguide.e;
import kr.syeyoung.dungeonsguide.features.FeatureParameter;
import kr.syeyoung.dungeonsguide.features.GuiFeature;
@@ -10,6 +11,7 @@ import kr.syeyoung.dungeonsguide.features.listener.TickListener;
import kr.syeyoung.dungeonsguide.features.text.StyledText;
import kr.syeyoung.dungeonsguide.features.text.TextHUDFeature;
import kr.syeyoung.dungeonsguide.utils.TextUtils;
+import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.util.ChatComponentText;
import net.minecraftforge.client.event.ClientChatReceivedEvent;
@@ -125,6 +127,7 @@ public class FeatureDungeonDeaths extends TextHUDFeature implements ChatListener
String nickname = TextUtils.stripColor(m.group(1));
int deaths = context.getDeaths().containsKey(nickname) ? context.getDeaths().get(nickname) : 0;
context.getDeaths().put(nickname, deaths + 1);
+ context.createEvent(new DungeonDeathEvent(nickname, txt, deaths));
e.sendDebugChat(new ChatComponentText("Death verified :: "+nickname+" / "+(deaths + 1)));
}
Matcher m2 = meDeathPattern.matcher(txt);
@@ -132,6 +135,7 @@ public class FeatureDungeonDeaths extends TextHUDFeature implements ChatListener
String nickname = "me";
int deaths = context.getDeaths().containsKey(nickname) ? context.getDeaths().get(nickname) : 0;
context.getDeaths().put(nickname, deaths + 1);
+ context.createEvent(new DungeonDeathEvent(Minecraft.getMinecraft().thePlayer.getName(), txt, deaths));
e.sendDebugChat(new ChatComponentText("Death verified :: me / "+(deaths + 1)));
}
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonSecrets.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonSecrets.java
index 71261369..443e5d79 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonSecrets.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonSecrets.java
@@ -45,6 +45,25 @@ public class FeatureDungeonSecrets extends TextHUDFeature {
return 0;
}
+ public int getTotalSecretsInt() {
+ DungeonContext context = skyblockStatus.getContext();
+ int totalSecrets = 0;
+ for (DungeonRoom dungeonRoom : context.getDungeonRoomList()) {
+ if (dungeonRoom.getTotalSecrets() != -1)
+ totalSecrets += dungeonRoom.getTotalSecrets();
+ }
+ return totalSecrets;
+ }
+ public boolean sureOfTotalSecrets() {
+ DungeonContext context = skyblockStatus.getContext();
+ if (context.getMapProcessor().getUndiscoveredRoom() > 0) return false;
+ boolean allknown = true;
+ for (DungeonRoom dungeonRoom : context.getDungeonRoomList()) {
+ if (dungeonRoom.getTotalSecrets() == -1) allknown = false;
+ }
+ return allknown;
+ }
+
public String getTotalSecrets() {
DungeonContext context = skyblockStatus.getContext();
int totalSecrets = 0;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeatureCopyMessages.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeatureCopyMessages.java
new file mode 100644
index 00000000..bb91ddf1
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeatureCopyMessages.java
@@ -0,0 +1,24 @@
+package kr.syeyoung.dungeonsguide.features.impl.etc;
+
+import kr.syeyoung.dungeonsguide.features.SimpleFeature;
+import kr.syeyoung.dungeonsguide.features.listener.ChatListener;
+import kr.syeyoung.dungeonsguide.utils.TextUtils;
+import net.minecraft.event.ClickEvent;
+import net.minecraft.event.HoverEvent;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.ChatStyle;
+import net.minecraftforge.client.event.ClientChatReceivedEvent;
+
+public class FeatureCopyMessages extends SimpleFeature implements ChatListener {
+ public FeatureCopyMessages() {
+ super("ETC", "Copy Chat Messages", "Click on copy to copy", "etc.copymsg");
+ setEnabled(false);
+ }
+ @Override
+ public void onChat(ClientChatReceivedEvent clientChatReceivedEvent) {
+ if (!isEnabled()) return;
+ if (clientChatReceivedEvent.type == 2) return;
+
+ clientChatReceivedEvent.message.appendSibling(new ChatComponentText(" §7[Copy]").setChatStyle(new ChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, TextUtils.stripColor(clientChatReceivedEvent.message.getFormattedText()))).setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ChatComponentText("§eCopy Message")))));
+ }
+}