Skip to content

Commit

Permalink
I really have to pay attention to my code
Browse files Browse the repository at this point in the history
  • Loading branch information
hiimjasmine00 committed Dec 12, 2024
1 parent ead6029 commit 1a5dae7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
set(CMAKE_CXX_VISIBILITY_PRESET hidden)

project(MoreIcons VERSION 1.5.1)
project(MoreIcons VERSION 1.5.2)

add_library(${PROJECT_NAME} SHARED
src/api/MoreIconsAPI.cpp
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# More Icons Changelog
## v1.5.2 (2024-12-11)
- Fixed a bug where selecting a new icon would not work properly in the icon kit

## v1.5.1 (2024-12-11)
- Separated icon loading by icon type
- Separated icons by texture pack in the icon kit ([#17](https://github.com/hiimjustin000/MoreIcons/issues/17))
Expand Down
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"win": "2.2074",
"mac": "2.2074"
},
"version": "v1.5.1",
"version": "v1.5.2",
"id": "hiimjustin000.more_icons",
"name": "More Icons",
"developer": "hiimjustin000",
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/GJGarageLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ class $modify(MIGarageLayer, GJGarageLayer) {
if (!dual) GameManager::get()->m_playerIconType = m_iconType;
player->setScale(m_iconType == IconType::Jetpack ? 1.5f : 1.6f);
auto selectedIconType = dual ? (IconType)sdi->getSavedValue("lasttype", 0) : m_selectedIconType;
if (MoreIconsAPI::activeForType(m_iconType, dual) == name && selectedIconType == m_iconType) {
if (Mod::get()->setSavedValue(MoreIconsAPI::savedForType(m_iconType, dual), name) == name && selectedIconType == m_iconType) {
auto& iconInfo = MoreIcons::infoForType(m_iconType)[name];
auto iconID = 1;
if (!iconInfo.id.empty()) switch (m_iconType) {
Expand Down Expand Up @@ -455,7 +455,7 @@ class $modify(MIGarageLayer, GJGarageLayer) {
m_cursor1->setPosition(sender->getParent()->convertToWorldSpace(sender->getPosition()));
m_cursor1->setVisible(true);
auto selectedIconType = dual ? (IconType)sdi->getSavedValue("lasttype", 0) : m_selectedIconType;
if (MoreIconsAPI::activeForType(m_iconType, dual) == name && selectedIconType == m_iconType) {
if (Mod::get()->setSavedValue(MoreIconsAPI::savedForType(m_iconType, dual), name) == name && selectedIconType == m_iconType) {
auto trailInfo = MoreIcons::TRAIL_INFO[name];
auto popup = ItemInfoPopup::create(!trailInfo.pack.id.empty() ? 128 : 1, UnlockType::Cube);
if (auto nameLabel = static_cast<CCLabelBMFont*>(popup->m_mainLayer->getChildByID("name-label")))
Expand Down

0 comments on commit 1a5dae7

Please # to comment.