From be137a7af5d31cfc831deae6be10e48d117eadb8 Mon Sep 17 00:00:00 2001 From: mdn522 Date: Sun, 5 Dec 2021 10:57:53 +0600 Subject: [PATCH] Renamed to TeleportHotkey from QuickTeleport Fixed GD Point Dumper Added more aliases Added more known GD Points --- GDPointTags.md | 34 +++++++++++++++++-- QuickTeleport/files/Alias.txt | 4 --- QuickTeleport/files/config.txt | 4 --- QuickTeleport/files/mod.json | 11 ------ QuickTeleport.sln => TeleportHotkey.sln | 2 +- {QuickTeleport => TeleportHotkey}/Helper.cs | 6 ++-- .../MainPatcher.cs | 16 +++++---- .../Patchers/EnvironmentEngine_Patcher.cs | 9 ++--- .../Properties/AssemblyInfo.cs | 4 +-- .../TeleportHotkey.csproj | 4 +-- TeleportHotkey/files/Alias.txt | 14 ++++++++ TeleportHotkey/files/config.txt | 8 +++++ TeleportHotkey/files/mod.json | 11 ++++++ 13 files changed, 87 insertions(+), 40 deletions(-) delete mode 100644 QuickTeleport/files/Alias.txt delete mode 100644 QuickTeleport/files/config.txt delete mode 100644 QuickTeleport/files/mod.json rename QuickTeleport.sln => TeleportHotkey.sln (86%) rename {QuickTeleport => TeleportHotkey}/Helper.cs (64%) rename {QuickTeleport => TeleportHotkey}/MainPatcher.cs (91%) rename {QuickTeleport => TeleportHotkey}/Patchers/EnvironmentEngine_Patcher.cs (82%) rename {QuickTeleport => TeleportHotkey}/Properties/AssemblyInfo.cs (93%) rename QuickTeleport/QuickTeleport.csproj => TeleportHotkey/TeleportHotkey.csproj (97%) create mode 100644 TeleportHotkey/files/Alias.txt create mode 100644 TeleportHotkey/files/config.txt create mode 100644 TeleportHotkey/files/mod.json diff --git a/GDPointTags.md b/GDPointTags.md index c119879..41ea972 100644 --- a/GDPointTags.md +++ b/GDPointTags.md @@ -5,12 +5,40 @@ Dumped ## Known GD Point Tags -| GD Point Tag | Alias | Note | +*Alias is subject to change if a more proper GD Point Tag is found + +| GD Point Tag | Alias | Location/Note | | ------------- | ----- | ----- | +| camp_idle_1 | RefugeeCamp | Somewhere Outside Refugee Camp | +| cellar_d | Cellar | **Cellar** | +| cellar_storage_d | | **Cellar** Crate Storage | +| church_inside_1 | Church | **Church**: Inside | +| dungeon | | **Bee Farm** | +| enter_to_church | ChurchGateOutside | **Graveyard** Church Gate | +| graveyard_to_church | | **Graveyard**: Center | +| gd_player_stand | SacrificeZone | **Sacrifice Zone**: South of the Dungeon | | gd_player_respawn | Home | **Home**: Inside | -| gd_player_respawn_1 | QuarryHut | **Quarry**: Inside Hut | +| gd_player_respawn_1 | QuarryHut | **Quarry Hut**: | | gd_enbl_mining_hut_workyard | Quarry | **Quarry**: Between Building Area and Marble Deposit | -| camp_idle_1 | RefugeeCamp | Somewhere Outside Refugee Camp | +| mf_wood_d | | **Workyard**: Left Entrance | +| mf_wood_d_2 | Workyard | **Workyard**: Left Entrance (Little Bit Right) | +| player_tavern_cellar_d | TavernCellar | **Tavern Cellar** | +| stone_workyard_d | QuarrySouth | **Quarry**: South of Hut | +| storage_d | | **Merchant Storage**: | +| storage_merchant_point | | **Merchant Storage**: Middle of Crates | +| swamp_fishing_spot_point | SwampFishingSpot | **Swamp**: Fishing Spot | +| vineyard_d | Vinyard | **Vinyard** | + +### Proper GD Points Still Unknown for Following Locations: +* Dead Horse +* Lighthouse +* Mountain Fort +* Morgue +* Alchemy Lab +* Talking Skull +* etc. + +You have to search through all GD points below to find them if it exists. it's a very time consuming task. if you find it. let us know ;) --- diff --git a/QuickTeleport/files/Alias.txt b/QuickTeleport/files/Alias.txt deleted file mode 100644 index 54b61c7..0000000 --- a/QuickTeleport/files/Alias.txt +++ /dev/null @@ -1,4 +0,0 @@ -Home=gd_player_respawn -Quarry=gd_enbl_mining_hut_workyard -QuarryHut=gd_player_respawn_1 -RefugeeCamp=camp_idle_1 diff --git a/QuickTeleport/files/config.txt b/QuickTeleport/files/config.txt deleted file mode 100644 index 192c8d0..0000000 --- a/QuickTeleport/files/config.txt +++ /dev/null @@ -1,4 +0,0 @@ -ConfigReloadKey=F5 -Home=Keypad1 -gd_enbl_mining_hut_workyard=Keypad4 -camp_idle_1=Keypad5 diff --git a/QuickTeleport/files/mod.json b/QuickTeleport/files/mod.json deleted file mode 100644 index 45294ad..0000000 --- a/QuickTeleport/files/mod.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "Id": "QuickTeleport", - "DisplayName": "QuickTeleport - Teleport Using Hotkey", - "Author": "Abdullah Mallik", - "Version": "0.1.0", - "Requires": [ ], - "Enable": true, - "AssemblyName": "QuickTeleport.dll", - "EntryMethod": "QuickTeleport.MainPatcher.Patch", - "Config": {} -} \ No newline at end of file diff --git a/QuickTeleport.sln b/TeleportHotkey.sln similarity index 86% rename from QuickTeleport.sln rename to TeleportHotkey.sln index e1b4acf..2bae7fd 100644 --- a/QuickTeleport.sln +++ b/TeleportHotkey.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.29613.14 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuickTeleport", "QuickTeleport\QuickTeleport.csproj", "{700C6F12-C0FF-4B98-AA54-C52BCC102563}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TeleportHotkey", "TeleportHotkey\TeleportHotkey.csproj", "{700C6F12-C0FF-4B98-AA54-C52BCC102563}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/QuickTeleport/Helper.cs b/TeleportHotkey/Helper.cs similarity index 64% rename from QuickTeleport/Helper.cs rename to TeleportHotkey/Helper.cs index b901cc6..f261ed9 100644 --- a/QuickTeleport/Helper.cs +++ b/TeleportHotkey/Helper.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.IO; -namespace QuickTeleport { +namespace TeleportHotkey { public static class Helper { - public static string logPath = ".\\QMods\\QuickTeleport\\log.txt"; - public static string errorPath = ".\\QMods\\QuickTeleport\\error.txt"; + public static string logPath = ".\\QMods\\TeleportHotkey\\log.txt"; + public static string errorPath = ".\\QMods\\TeleportHotkey\\error.txt"; public static void Log(string v, bool error = false) { using (StreamWriter streamWriter = File.AppendText(error ? Helper.errorPath : Helper.logPath)) diff --git a/QuickTeleport/MainPatcher.cs b/TeleportHotkey/MainPatcher.cs similarity index 91% rename from QuickTeleport/MainPatcher.cs rename to TeleportHotkey/MainPatcher.cs index ee52c2c..27ce412 100644 --- a/QuickTeleport/MainPatcher.cs +++ b/TeleportHotkey/MainPatcher.cs @@ -4,10 +4,10 @@ using UnityEngine; using System.Collections.Generic; -namespace QuickTeleport { +namespace TeleportHotkey { public class MainPatcher { public static void Patch() { - HarmonyInstance harmony = HarmonyInstance.Create("com.mdn522.quickteleport.mod"); + HarmonyInstance harmony = HarmonyInstance.Create("com.mdn522.teleporthotkey.mod"); harmony.PatchAll(Assembly.GetExecutingAssembly()); } } @@ -100,7 +100,7 @@ public Options(Options opts) { } public static void Log(string line) { - File.AppendAllText(@"./QMods/QuickTeleport/log.txt", line); + File.AppendAllText(@"./QMods/TeleportHotkey/log.txt", line); } private static bool parseBool(string raw) { @@ -141,8 +141,8 @@ public static Options GetOptions(bool forceReload) { return options_; } - string cfgPath = @"./QMods/QuickTeleport/config.txt"; - string aliasPath = @"./QMods/QuickTeleport/Alias.txt"; + string cfgPath = @"./QMods/TeleportHotkey/config.txt"; + string aliasPath = @"./QMods/TeleportHotkey/Alias.txt"; options_.ArbitraryGDPointKeys.Clear(); options_.GDPointAliases.Clear(); @@ -166,7 +166,11 @@ public static Options GetOptions(bool forceReload) { break; case "DumpGDPointsKey": try { - options_.DumpGDPointsKey.ChangeKey(Enum.Parse(rawVal)); + if (options_.DumpGDPointsKey == null) { + options_.DumpGDPointsKey = new SinglePressKey(Enum.Parse(rawVal)); + } else { + options_.DumpGDPointsKey.ChangeKey(Enum.Parse(rawVal)); + } } catch { } break; diff --git a/QuickTeleport/Patchers/EnvironmentEngine_Patcher.cs b/TeleportHotkey/Patchers/EnvironmentEngine_Patcher.cs similarity index 82% rename from QuickTeleport/Patchers/EnvironmentEngine_Patcher.cs rename to TeleportHotkey/Patchers/EnvironmentEngine_Patcher.cs index 9669cc0..f7c8986 100644 --- a/QuickTeleport/Patchers/EnvironmentEngine_Patcher.cs +++ b/TeleportHotkey/Patchers/EnvironmentEngine_Patcher.cs @@ -4,9 +4,9 @@ using System.Linq; using Harmony; using UnityEngine; -using static QuickTeleport.Config; +using static TeleportHotkey.Config; -namespace QuickTeleport { +namespace TeleportHotkey { [HarmonyPatch(typeof(EnvironmentEngine))] [HarmonyPatch("Update")] class EnvironmentEngine_Update_Patch { @@ -18,12 +18,12 @@ static bool Prefix(EnvironmentEngine __instance) { Config.Options opts = Config.GetOptions(); if (opts.ConfigReloadKey.IsPressed()) { Config.GetOptions(true); - EffectBubblesManager.ShowImmediately(MainGame.me.player.pos3, "QuickTeleport configuration reloaded"); + EffectBubblesManager.ShowImmediately(MainGame.me.player.pos3, "TeleportHotkey configuration reloaded"); } else if (opts.DumpGDPointsKey != null && opts.DumpGDPointsKey.IsPressed()) { Helper.Log("Dumping GD Points", false); Helper.Log("-------------------------------------", false); foreach (GDPoint gd_point in WorldMap.gd_points) { - Helper.Log(string.Format("TAG: \"{0}\"; IS DISABLED: {1}", gd_point.gd_tag, gd_point.IsDisabled().ToString()), false); + Helper.Log(string.Format("TAG: \"{0}\"; NAME: \"{1}\" IS DISABLED: {2}", gd_point.gd_tag, gd_point.name, gd_point.IsDisabled().ToString()), false); } EffectBubblesManager.ShowImmediately(MainGame.me.player.pos3, "Dumped GD Points to Log.txt"); @@ -31,6 +31,7 @@ static bool Prefix(EnvironmentEngine __instance) { foreach (KeyValuePair kvp in opts.ArbitraryGDPointKeys.ToArray()) { string gd_point = kvp.Key; + // Alias Resolving if (opts.GDPointAliases.ContainsKey(gd_point)) { gd_point = opts.GDPointAliases[gd_point]; } diff --git a/QuickTeleport/Properties/AssemblyInfo.cs b/TeleportHotkey/Properties/AssemblyInfo.cs similarity index 93% rename from QuickTeleport/Properties/AssemblyInfo.cs rename to TeleportHotkey/Properties/AssemblyInfo.cs index 4bf73a0..9de9180 100644 --- a/QuickTeleport/Properties/AssemblyInfo.cs +++ b/TeleportHotkey/Properties/AssemblyInfo.cs @@ -5,11 +5,11 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("QuickTeleport")] +[assembly: AssemblyTitle("TeleportHotkey")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("QuickTeleport")] +[assembly: AssemblyProduct("TeleportHotkey")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/QuickTeleport/QuickTeleport.csproj b/TeleportHotkey/TeleportHotkey.csproj similarity index 97% rename from QuickTeleport/QuickTeleport.csproj rename to TeleportHotkey/TeleportHotkey.csproj index 77a404e..f66bfb5 100644 --- a/QuickTeleport/QuickTeleport.csproj +++ b/TeleportHotkey/TeleportHotkey.csproj @@ -7,8 +7,8 @@ {700C6F12-C0FF-4B98-AA54-C52BCC102563} Library Properties - QuickTeleport - QuickTeleport + TeleportHotkey + TeleportHotkey v4.5.1 512 true diff --git a/TeleportHotkey/files/Alias.txt b/TeleportHotkey/files/Alias.txt new file mode 100644 index 0000000..2383904 --- /dev/null +++ b/TeleportHotkey/files/Alias.txt @@ -0,0 +1,14 @@ +# For More GD Points Refer to https://github.com/mdn522/GYK-QuickTeleport/blob/main/GDPointTags.md +Cellar=cellar_d +Church=church_inside_1 +ChurchGateOutside=enter_to_church +Home=gd_player_respawn +RefugeeCamp=camp_idle_1 +Quarry=gd_enbl_mining_hut_workyard +QuarryHut=gd_player_respawn_1 +QuarrySouth=stone_workyard_d +SacrificeZone=gd_player_stand +SwampFishingSpot=swamp_fishing_spot_point +TavernCellar=player_tavern_cellar_d +Vinyard=vineyard_d +Workyard=mf_wood_d_2 \ No newline at end of file diff --git a/TeleportHotkey/files/config.txt b/TeleportHotkey/files/config.txt new file mode 100644 index 0000000..4545fbc --- /dev/null +++ b/TeleportHotkey/files/config.txt @@ -0,0 +1,8 @@ +ConfigReloadKey=F5 +# DumpGDPointsKey=F6 + +Home=Keypad0 +Workyard=Keypad1 +QuarrySouth=Keypad4 +RefugeeCamp=Keypad8 + diff --git a/TeleportHotkey/files/mod.json b/TeleportHotkey/files/mod.json new file mode 100644 index 0000000..bff2b7f --- /dev/null +++ b/TeleportHotkey/files/mod.json @@ -0,0 +1,11 @@ +{ + "Id": "TeleportHotkey", + "DisplayName": "TeleportHotkey", + "Author": "Abdullah Mallik", + "Version": "0.1.1", + "Requires": [ ], + "Enable": true, + "AssemblyName": "TeleportHotkey.dll", + "EntryMethod": "TeleportHotkey.MainPatcher.Patch", + "Config": {} +} \ No newline at end of file