diff --git a/mod.json b/mod.json index 2e2bc8f..4c68b8f 100644 --- a/mod.json +++ b/mod.json @@ -101,7 +101,7 @@ "dependencies": [ { "id": "geode.node-ids", - "version": ">=1.12.0", + "version": ">=1.11.0", "importance": "required" } ], @@ -124,6 +124,6 @@ ], "issues": { "url": "https://discord.com/channels/911701438269386882/1205523212444639292", - "info": "Ping me (@erymanthus) in the Geode SDK Discord server's #help channel if you need help. DMs are NOT accepted." + "info": "To disable hyphen prefixes and suffixes in custom messages, edit saved.json. For other issues, ping me (@erymanthus) in the Geode SDK Discord server's #help channel if you need help. DMs are NOT accepted." } } diff --git a/src/main.cpp b/src/main.cpp index a22909a..dce7d7f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -97,8 +97,15 @@ migration failed, womp womp)"; std::ifstream file(pathCustom); std::string str; while (std::getline(file, str)) { - std::string customStr = "- " + str + " -"; - quotes.push_back(customStr); + if (str.starts_with("\"") && str.ends_with("\"")) { + str = str.replace(0, 1, "\'\'"); + } else if (str.starts_with("\'") && str.ends_with("\'")) { + str = str.replace(0, 2, "\""); + } + if (!Mod::get()->getSavedValue("noHyphens")) { + str = fmt::format("- {} -", str); + } + quotes.push_back(str); } // technically i can write two one-time use boolean variables to allow people to toggle these things on and off as they please without the quotes adding themselves multiple times into the vector, but i'd rather add the "restart required" barrier just to be extra safe } }