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