Skip to content

Commit ed80a75

Browse files
committed
version 2.0.0
1 parent 3ab5260 commit ed80a75

8 files changed

Lines changed: 48 additions & 30 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.21)
2-
set(CMAKE_CXX_STANDARD 20)
2+
set(CMAKE_CXX_STANDARD 23)
33
set(CMAKE_CXX_STANDARD_REQUIRED ON)
44
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS" OR IOS)
55
set(CMAKE_OSX_ARCHITECTURES "arm64")

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
# Wraith Helper
2-
3-
**Wraith Helper** is a Geometry Dash mod for **Wraith** that adds a convenient in-game button to view all available codes and keeps track of the ones you’ve already redeemed.
1+
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/dulakgg)
42

5-
## 🧾 About
3+
# Wraith Helper
64

7-
I originally created this mod just for my own convenience, but I’ve made it public so newer players can easily keep track of codes, too.
5+
<img src="logo.png" width="150" alt="the mod's logo" />
86

9-
---
7+
**Wraith Helper** is a Geometry Dash mod for **Wraith** that adds a convenient in-game button to view all available codes and keeps track of the ones you’ve already redeemed.
108

119
## 🛠 Credits
1210

1311
**Special thanks to [RayDeeUx](https://github.com/RayDeeUx)**
1412
For making my code actual code and enabling cross-platform support.
1513

16-
---
14+
**Special thanks to [OmgRod](https://github.com/OmgRod)**
15+
For updating thew mod to geode v5.
16+
17+
18+
**Version:** v2.0.0

about.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,10 @@
22

33
**Wraith Helper** is a Geometry Dash mod for **Wraith** that adds a convenient in-game button to view all available codes and keeps track of the ones you’ve already redeemed.
44

5-
## 🧾 About
6-
7-
I originally created this mod just for my own convenience, but I’ve made it public so newer players can easily keep track of codes, too.
8-
9-
---
10-
115
## 🛠 Credits
126

137
**Special thanks to [RayDeeUx](https://github.com/RayDeeUx)**
148
For making my code actual code and enabling cross-platform support.
159

16-
---
10+
**Special thanks to [OmgRod](https://github.com/OmgRod)**
11+
For updating thew mod to geode v5.

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 2.0.0
2+
- Updated to geode v5 for gd 2.2081
3+
- Added the long waited feature now the mods actually will check your save file for what codes you redeemed
4+
- Remade the logo (this is the last logo change)
5+
- Fixed issues with codes copying to clipboard
6+
17
# 1.3.1
28
- changed offline tag to online to not confuse people
39

logo.png

-242 KB
Loading

mod.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"geode": "5.0.0-beta.3",
2+
"geode": "5.3.0",
33
"gd": {
44
"win": "2.2081",
55
"mac": "2.2081",
@@ -8,7 +8,7 @@
88
},
99
"id": "dulak.wraith-help",
1010
"name": "Wraith Helper",
11-
"version": "1.3.1",
11+
"version": "2.0.0",
1212
"developer": "Dulak",
1313
"description": "Wraith codes tracker",
1414
"links": {
@@ -17,6 +17,10 @@
1717
"dependencies": {
1818
"geode.node-ids": ">=1.21.1"
1919
},
20+
"issues": {
21+
"info": "Submit problems on repo page (github) or @dulakgg on Discord.",
22+
"url": "https://github.com/dulakgg/Wraith-codes/issues"
23+
},
2024
"tags": ["enhancement", "interface", "online"],
2125
"settings": {
2226
"secret": {

src/main.cpp

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,24 @@ class MyPopup : public geode::Popup {
1818
CCMenuItemSpriteExtra* m_nextBtn = nullptr;
1919
CCLabelBMFont* m_titleLabel = nullptr;
2020
CCLabelBMFont* m_codeLabel = nullptr;
21-
std::map<std::string, std::tuple<std::string, std::string> > codes = {};
21+
std::map<std::string, std::tuple<std::string, std::string, std::string> > codes = {};
2222
std::vector<std::string> m_keys;
2323

24+
bool isCodeClaimed(std::string const& key) {
25+
auto* gsm = GameStatsManager::sharedState();
26+
if (gsm && gsm->m_wraithChests) {
27+
if (gsm->m_wraithChests->objectForKey(key)) return true;
28+
auto it = codes.find(key);
29+
if (it != codes.end()) {
30+
auto const& saveKey = std::get<2>(it->second);
31+
if (!saveKey.empty() && gsm->m_wraithChests->objectForKey(saveKey)) return true;
32+
}
33+
}
34+
return Mod::get()->getSavedValue<bool>(key, false);
35+
}
36+
2437
bool init() {
25-
if (!Popup::init(320.f, 260.f)) return false;
38+
if (!Popup::init(330.f, 270.f)) return false;
2639

2740
this->setTitle("Wraith helper");
2841

@@ -65,7 +78,7 @@ class MyPopup : public geode::Popup {
6578
auto const& tup = codes.at(key);
6679
auto const& reward = std::get<0>(tup);
6780
auto const& code = std::get<1>(tup);
68-
bool claimed = Mod::get()->getSavedValue<bool>(key, false);
81+
bool claimed = isCodeClaimed(key);
6982

7083
float y = yTop - (static_cast<float>(i - start) * lineH);
7184

@@ -181,9 +194,10 @@ class MyPopup : public geode::Popup {
181194
auto arrRes = val.as<std::vector<matjson::Value>>();
182195
if (!arrRes) continue;
183196
auto const& arr = arrRes.unwrap();
184-
std::string code = arr.size() > 0 ? arr[0].asString().unwrapOr("") : "";
185-
std::string reward = arr.size() > 1 ? arr[1].asString().unwrapOr("") : "";
186-
codes[key] = std::make_tuple(reward, code);
197+
std::string code = arr.size() > 0 ? arr[0].asString().unwrapOr("") : "";
198+
std::string reward = arr.size() > 1 ? arr[1].asString().unwrapOr("") : "";
199+
std::string saveKey = arr.size() > 2 ? arr[2].asString().unwrapOr("") : "";
200+
codes[key] = std::make_tuple(reward, code, saveKey);
187201
}
188202
}
189203
rebuildIndex();
@@ -275,16 +289,14 @@ class MyPopup : public geode::Popup {
275289
}
276290
}
277291

278-
utils::clipboard::write(code);
279-
280292
this->onClose(nullptr);
281293
}
282294
void updateProgressDisplay() {
283295
if (!m_progressLabel) return;
284296
size_t total = m_keys.size();
285297
size_t claimed = 0;
286298
for (auto const& k : m_keys) {
287-
if (Mod::get()->getSavedValue<bool>(k, false)) ++claimed;
299+
if (isCodeClaimed(k)) ++claimed;
288300
}
289301
std::string s = std::to_string(claimed) + "/" + std::to_string(total);
290302
m_progressLabel->setString(s.c_str());

support.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
if you want to support my journey <3
2-
https://ko-fi.com/dulakgg
3-
contact me on discord:
4-
dulakgg
1+
# Support
2+
3+
Support me and my other projects on --> [Ko-Fi](https://ko-fi.com/dulakgg) <3

0 commit comments

Comments
 (0)