mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-28 18:04:52 +00:00
unlock_all flag
This commit is contained in:
parent
2f57e5a98a
commit
6cff0839fd
@ -22,6 +22,8 @@ EX bool return_false() { return false; }
|
|||||||
|
|
||||||
EX bool use_bool_dialog;
|
EX bool use_bool_dialog;
|
||||||
|
|
||||||
|
EX bool unlock_all;
|
||||||
|
|
||||||
/** set to true if a parameter was changed as a consequence of changing linked parameters */
|
/** set to true if a parameter was changed as a consequence of changing linked parameters */
|
||||||
EX bool linked_consequence;
|
EX bool linked_consequence;
|
||||||
|
|
||||||
@ -1777,6 +1779,9 @@ EX void initConfig() {
|
|||||||
param_i(stamplen, "stamplen");
|
param_i(stamplen, "stamplen");
|
||||||
param_f(anims::period, "animperiod");
|
param_f(anims::period, "animperiod");
|
||||||
|
|
||||||
|
param_b(unlock_all, "unlock_all")
|
||||||
|
-> editable("allow access to all unlockable contant", 'U');
|
||||||
|
|
||||||
param_b(use_custom_land_list, "customland_use")->be_non_editable();
|
param_b(use_custom_land_list, "customland_use")->be_non_editable();
|
||||||
for(int i=0; i<landtypes; i++) {
|
for(int i=0; i<landtypes; i++) {
|
||||||
custom_land_list[i] = true;
|
custom_land_list[i] = true;
|
||||||
|
@ -197,7 +197,7 @@ EX void ge_land_selection() {
|
|||||||
|
|
||||||
string s = XLAT1(linf[l].name);
|
string s = XLAT1(linf[l].name);
|
||||||
|
|
||||||
if(landvisited[l]) {
|
if(landvisited[l] || unlock_all) {
|
||||||
dialog::addBoolItem(s, l == specialland, dialog::list_fake_key++);
|
dialog::addBoolItem(s, l == specialland, dialog::list_fake_key++);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -431,7 +431,7 @@ EX void show_chaos() {
|
|||||||
cmode = sm::SIDE | sm::MAYDARK;
|
cmode = sm::SIDE | sm::MAYDARK;
|
||||||
gamescreen();
|
gamescreen();
|
||||||
dialog::init(XLAT("land structure"));
|
dialog::init(XLAT("land structure"));
|
||||||
chaosUnlocked = chaosUnlocked || autocheat;
|
chaosUnlocked = chaosUnlocked || unlock_all || autocheat;
|
||||||
|
|
||||||
dialog::addHelp(
|
dialog::addHelp(
|
||||||
XLAT("In the Chaos mode, lands change very often, and "
|
XLAT("In the Chaos mode, lands change very often, and "
|
||||||
@ -804,7 +804,7 @@ EX void showChangeMode() {
|
|||||||
#endif
|
#endif
|
||||||
dialog::addBoolItem(XLAT("%1 Challenge", moPrincess), (princess::challenge), 'P');
|
dialog::addBoolItem(XLAT("%1 Challenge", moPrincess), (princess::challenge), 'P');
|
||||||
dialog::add_action_confirmed([] {
|
dialog::add_action_confirmed([] {
|
||||||
if(!princess::everSaved && !autocheat)
|
if(!princess::everSaved && !autocheat && !unlock_all)
|
||||||
addMessage(XLAT("Save %the1 first to unlock this challenge!", moPrincess));
|
addMessage(XLAT("Save %the1 first to unlock this challenge!", moPrincess));
|
||||||
else restart_game(rg::princess);
|
else restart_game(rg::princess);
|
||||||
});
|
});
|
||||||
@ -814,7 +814,7 @@ EX void showChangeMode() {
|
|||||||
dialog::addBoolItem(XLAT("Yendor Challenge"), (yendor::on), 'y');
|
dialog::addBoolItem(XLAT("Yendor Challenge"), (yendor::on), 'y');
|
||||||
dialog::add_action([] {
|
dialog::add_action([] {
|
||||||
clearMessages();
|
clearMessages();
|
||||||
if(yendor::everwon || autocheat)
|
if(yendor::everwon || autocheat || unlock_all)
|
||||||
pushScreen(yendor::showMenu);
|
pushScreen(yendor::showMenu);
|
||||||
else gotoHelp(yendor::chelp);
|
else gotoHelp(yendor::chelp);
|
||||||
});
|
});
|
||||||
|
@ -501,6 +501,7 @@ EX namespace yendor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool levelUnlocked(int i) {
|
bool levelUnlocked(int i) {
|
||||||
|
if(unlock_all) return true;
|
||||||
yendorlevel& ylev(levels[i]);
|
yendorlevel& ylev(levels[i]);
|
||||||
|
|
||||||
eItem t = treasureType(ylev.l);
|
eItem t = treasureType(ylev.l);
|
||||||
@ -763,6 +764,7 @@ EX namespace tactic {
|
|||||||
|
|
||||||
bool tacticUnlocked(eLand l) {
|
bool tacticUnlocked(eLand l) {
|
||||||
if(autocheat) return true;
|
if(autocheat) return true;
|
||||||
|
if(unlock_all) return true;
|
||||||
if(l == laWildWest || l == laDual) return true;
|
if(l == laWildWest || l == laDual) return true;
|
||||||
return hiitemsMax(treasureType(l)) * landMultiplier(l) >= 20;
|
return hiitemsMax(treasureType(l)) * landMultiplier(l) >= 20;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user