Skip to content

Commit 934e905

Browse files
committed
man fuck this
1 parent 104d57c commit 934e905

File tree

2 files changed

+2
-35
lines changed

2 files changed

+2
-35
lines changed

mod.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,6 @@
4545
"type": "bool",
4646
"default": false
4747
},
48-
"screenshotOnDeathPreference": {
49-
"name": "Auto-Screenshot Preferred Type (READ!)",
50-
"description": "Pick the kind of screenshot you want. No, you can't have all of the types of screenshots; pick wisely!\n\n<cy>\"But this could've been a toggle in PRNTSCRN!\"</c> No.",
51-
"type": "string",
52-
"default": "Screenshot As-Is",
53-
"one-of": [
54-
"Screenshot As-Is",
55-
"Screenshot the Level, Keep UI",
56-
"Screenshot the Level, Hide (~99% of) UI",
57-
"Screenshot the Level, Use PRNTSCRN Settings"
58-
]
59-
},
6048
"changeDeathText": {
6149
"name": "Change \"New Best\" Texts",
6250
"description": "Leaving this enabled is semi-important, since it's kind of the original purpose of this mod. You can disable it though if you want, I guess.",

src/PlayLayer.cpp

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,6 @@ class $modify(MyPlayLayer, PlayLayer) {
2222
static bool isNewBestFloat(PlayLayer* pl) {
2323
return pl->getCurrentPercent() > pl->m_level->m_normalPercent.value();
2424
}
25-
void PRNTSCRNOnDeath(float) {
26-
const std::string& screenshotPreference = getModString("screenshotOnDeathPreference");
27-
log::info("screenshotPreference: {}", screenshotPreference);
28-
if (!manager->hasPRNTSCRN) return;
29-
log::info("screenshotPreference: {}, mod is loaded", screenshotPreference);
30-
if (screenshotPreference == "Screenshot the Level, Keep UI") {
31-
(void) PRNTSCRN::screenshotPlayLayerWithoutAnyVisibilityFilters();
32-
} else if (screenshotPreference == "Screenshot the Level, Hide (~99% of) UI") {
33-
bool originalSetting = Loader::get()->getLoadedMod("ninxout.prntscrn")->getSettingValue<bool>("hide-ui");
34-
Loader::get()->getLoadedMod("ninxout.prntscrn")->setSettingValue<bool>("hide-ui", true);
35-
(void) PRNTSCRN::screenshotNode(this);
36-
Loader::get()->getLoadedMod("ninxout.prntscrn")->setSettingValue<bool>("hide-ui", originalSetting);
37-
} else if (screenshotPreference == "Screenshot the Level, Use PRNTSCRN Settings") {
38-
(void) PRNTSCRN::screenshotNode(this);
39-
} else {
40-
(void) PRNTSCRN::screenshotNode(CCScene::get());
41-
}
42-
log::info("screenshot Taken?");
43-
}
4425
void resetLevel() {
4526
PlayLayer::resetLevel();
4627
Manager::getSharedInstance()->addedNextKeyWhenLabel = false;
@@ -172,9 +153,7 @@ class $modify(MyPlayLayer, PlayLayer) {
172153
PlayLayer::showNewBest(newReward, orbs, diamonds, demonKey, noRetry, noTitle);
173154
log::info("isNewBestFloat: {}", MyPlayLayer::isNewBestFloat(this));
174155
log::info("manager->hasPRNTSCRN: {}", manager->hasPRNTSCRN);
175-
if (manager->hasPRNTSCRN && MyPlayLayer::isNewBestFloat(this) && getModBool("screenshotOnDeath")) {
176-
log::info("screenshottingg.......");
177-
this->scheduleOnce(schedule_selector(MyPlayLayer::PRNTSCRNOnDeath), .5f);
178-
}
156+
if (!manager->hasPRNTSCRN || !MyPlayLayer::isNewBestFloat(this) || !getModBool("screenshotOnDeath")) return;
157+
(void) PRNTSCRN::screenshotNode(CCScene::get());
179158
}
180159
};

0 commit comments

Comments
 (0)