From edf4640c70e68ff120ccb173b09d33f968cb1801 Mon Sep 17 00:00:00 2001 From: Ashton <38200084+Alphalaneous@users.noreply.github.com> Date: Fri, 18 Oct 2024 17:51:53 -0400 Subject: [PATCH 1/5] Fix $ path --- src/UIModding.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/UIModding.cpp b/src/UIModding.cpp index 69dc1b9..ebece90 100644 --- a/src/UIModding.cpp +++ b/src/UIModding.cpp @@ -1463,8 +1463,9 @@ void UIModding::handleModifications(CCNode* node, matjson::Object nodeObject) { void UIModding::doUICheck(CCNode* node) { - std::string path = "ui/" + node->getID() + ".json"; - + std::string path = "ui/" + node->getID() + ".json" + std::replace(path.begin(), path.end(), '/', '$'); + unsigned long fileSize = 0; unsigned char* buffer = CCFileUtils::sharedFileUtils()->getFileData(path.c_str(), "rb", &fileSize); @@ -1515,7 +1516,6 @@ void UIModding::startFileListeners() { for (std::string path : packs) { std::string uiPath = fmt::format("{}{}", path, "ui\\"); - std::replace(uiPath.begin(), uiPath.end(), '$', '/'); FileWatcher* fw = new FileWatcher(uiPath, std::chrono::milliseconds(500)); listeners.push_back(fw); @@ -1598,4 +1598,4 @@ void UIModding::doUICheckForType(std::string type, CCNode* node) { matjson::Object object = value.as_object(); handleModifications(node, object); } -} \ No newline at end of file +} From 3c1ea62019a1610b1b3fe41d48f2faf4312ec2fb Mon Sep 17 00:00:00 2001 From: Ashton <38200084+Alphalaneous@users.noreply.github.com> Date: Fri, 18 Oct 2024 17:54:17 -0400 Subject: [PATCH 2/5] Oops, real fix for $ --- src/UIModding.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/UIModding.cpp b/src/UIModding.cpp index ebece90..d095263 100644 --- a/src/UIModding.cpp +++ b/src/UIModding.cpp @@ -1463,8 +1463,10 @@ void UIModding::handleModifications(CCNode* node, matjson::Object nodeObject) { void UIModding::doUICheck(CCNode* node) { - std::string path = "ui/" + node->getID() + ".json" - std::replace(path.begin(), path.end(), '/', '$'); + std::string nodeID = node->getID(); + std::replace(nodeID.begin(), nodeID.end(), '/', '$'); + std::string path = "ui/" + nodeID->getID() + ".json" + unsigned long fileSize = 0; unsigned char* buffer = CCFileUtils::sharedFileUtils()->getFileData(path.c_str(), "rb", &fileSize); From 186a8a0ee9acde6af0672c2d581d78660a2418b7 Mon Sep 17 00:00:00 2001 From: Ashton <38200084+Alphalaneous@users.noreply.github.com> Date: Fri, 18 Oct 2024 17:54:55 -0400 Subject: [PATCH 3/5] Real real fix for $ --- src/UIModding.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UIModding.cpp b/src/UIModding.cpp index d095263..031a8e3 100644 --- a/src/UIModding.cpp +++ b/src/UIModding.cpp @@ -1465,7 +1465,7 @@ void UIModding::doUICheck(CCNode* node) { std::string nodeID = node->getID(); std::replace(nodeID.begin(), nodeID.end(), '/', '$'); - std::string path = "ui/" + nodeID->getID() + ".json" + std::string path = "ui/" + nodeID + ".json" unsigned long fileSize = 0; From 046aaafe7412c075048abb393f8b3d9207c0a176 Mon Sep 17 00:00:00 2001 From: Ashton <38200084+Alphalaneous@users.noreply.github.com> Date: Fri, 18 Oct 2024 17:55:44 -0400 Subject: [PATCH 4/5] Forgot semicolon --- src/UIModding.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UIModding.cpp b/src/UIModding.cpp index 031a8e3..70333d4 100644 --- a/src/UIModding.cpp +++ b/src/UIModding.cpp @@ -1465,7 +1465,7 @@ void UIModding::doUICheck(CCNode* node) { std::string nodeID = node->getID(); std::replace(nodeID.begin(), nodeID.end(), '/', '$'); - std::string path = "ui/" + nodeID + ".json" + std::string path = "ui/" + nodeID + ".json"; unsigned long fileSize = 0; From 8e3ea7f8d9964dc436c5899de9817fdc800ccdc0 Mon Sep 17 00:00:00 2001 From: Ashton <38200084+Alphalaneous@users.noreply.github.com> Date: Fri, 18 Oct 2024 18:24:33 -0400 Subject: [PATCH 5/5] Update mod.json --- mod.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod.json b/mod.json index 413b33a..4a79963 100644 --- a/mod.json +++ b/mod.json @@ -5,7 +5,7 @@ "android": "2.206", "mac": "2.206" }, - "version": "v1.5.2", + "version": "v1.5.3", "id": "alphalaneous.happy_textures", "name": "Happy Textures :3", "developer": "Alphalaneous",