11#include < Geode/Geode.hpp>
22#include " ../../SwelvyBG.hpp"
3- #include < alphalaneous.alphas_geode_utils/include/NodeModding.h >
3+ #include < Geode/modify/GJShopLayer.hpp >
44
55using namespace geode ::prelude;
66
7- SET_SWELVY_SPRITE (GJShopLayer, " gd/GJShopLayer" );
7+ class $modify(MyGJShopLayer, GJShopLayer) {
8+ bool init (ShopType p0) {
9+ if (!GJShopLayer::init (p0)) {
10+ return false ;
11+ }
12+ if (p0 == ShopType::Normal) {
13+ if (Mod::get ()->getSettingValue <bool >(" gd/GJShopLayer-Normal" )){
14+ if (auto bg = this ->getChildByID (" background" )) {
15+ bg->setVisible (false );
16+ }
17+
18+ auto swelvyBG = SwelvyBG::create ();
19+ swelvyBG->setZOrder (-999 );
20+
21+
22+ this ->addChild (swelvyBG);
23+ }
24+ } else if (p0 == ShopType::Secret) {
25+ if (Mod::get ()->getSettingValue <bool >(" gd/GJShopLayer-Secret" )){
26+ if (auto bg = this ->getChildByID (" background" )) {
27+ bg->setVisible (false );
28+ }
29+
30+ auto swelvyBG = SwelvyBG::create ();
31+ swelvyBG->setZOrder (-999 );
32+
33+
34+ this ->addChild (swelvyBG);
35+ }
36+ } else if (p0 == ShopType::Community) {
37+ if (Mod::get ()->getSettingValue <bool >(" gd/GJShopLayer-Community" )){
38+ if (auto bg = this ->getChildByID (" background" )) {
39+ bg->setVisible (false );
40+ }
41+
42+ auto swelvyBG = SwelvyBG::create ();
43+ swelvyBG->setZOrder (-999 );
44+
45+
46+ this ->addChild (swelvyBG);
47+ }
48+ } else if (p0 == ShopType::Mechanic) {
49+ if (Mod::get ()->getSettingValue <bool >(" gd/GJShopLayer-Mechanic" )){
50+ if (auto bg = this ->getChildByID (" background" )) {
51+ bg->setVisible (false );
52+ }
53+
54+ auto swelvyBG = SwelvyBG::create ();
55+ swelvyBG->setZOrder (-999 );
56+
57+
58+ this ->addChild (swelvyBG);
59+ }
60+ } else if (p0 == ShopType::Diamond) {
61+ if (Mod::get ()->getSettingValue <bool >(" gd/GJShopLayer-Diamond" )){
62+ if (auto bg = this ->getChildByID (" background" )) {
63+ bg->setVisible (false );
64+ }
65+
66+ auto swelvyBG = SwelvyBG::create ();
67+ swelvyBG->setZOrder (-999 );
68+
69+
70+ this ->addChild (swelvyBG);
71+ }
72+ }
73+ return true ;
74+ }
75+ };
0 commit comments