1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 06:27:17 +00:00

Sight range increase is now allowed in some of the special modes (not only the cheat mode)

This commit is contained in:
Zeno Rogue 2017-08-18 02:58:55 +02:00
parent fef663e1b3
commit 465089333f
4 changed files with 17 additions and 3 deletions

View File

@ -642,7 +642,7 @@ void showGraphConfig() {
XLAT("+5 = move instantly"));
if(xuni == 'r')
dialog::editNumber(sightrange, 4, cheater ? 10 : 7, 1, 7, XLAT("sight range"),
dialog::editNumber(sightrange, 4, allowIncreasedSight() ? 10 : 7, 1, 7, XLAT("sight range"),
XLAT("Roughly 42% cells are on the edge of your sight range. Reducing "
"the sight range makes HyperRogue work faster, but also makes "
"the game effectively harder."));

View File

@ -586,7 +586,7 @@ namespace dialog {
if(ne.intval == &sightrange && sightrange < 4)
*ne.editwhat = sightrange = 4, affect('v');
int msr = cheater ? 15 : 7;
int msr = allowIncreasedSight() ? 15 : 7;
if(ne.intval == &sightrange && sightrange > msr)
*ne.editwhat = sightrange = msr, affect('v');

View File

@ -4429,11 +4429,24 @@ void drawFlashes() {
}
}
bool allowIncreasedSight() {
if(cheater) return true;
if(peace::on) return true;
#if CAP_TOUR
if(tour::on) return true;
#endif
#if CAP_ROGUEVIZ
if(rogueviz::on) return true;
#endif
if(randomPatternsMode) return true;
return false;
}
void drawthemap() {
frameid++;
if(!cheater && !svg::in && !inHighQual) {
if(!allowIncreasedSight()) {
if(sightrange > 7) sightrange = 7;
overgenerate = false;
}

View File

@ -1528,3 +1528,4 @@ extern bool showstartmenu;
void selectLanguageScreen();
bool inscreenrange(cell *c);
bool allowIncreasedSight();