1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-30 15:39:54 +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")); XLAT("+5 = move instantly"));
if(xuni == 'r') 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 " XLAT("Roughly 42% cells are on the edge of your sight range. Reducing "
"the sight range makes HyperRogue work faster, but also makes " "the sight range makes HyperRogue work faster, but also makes "
"the game effectively harder.")); "the game effectively harder."));

View File

@ -586,7 +586,7 @@ namespace dialog {
if(ne.intval == &sightrange && sightrange < 4) if(ne.intval == &sightrange && sightrange < 4)
*ne.editwhat = sightrange = 4, affect('v'); *ne.editwhat = sightrange = 4, affect('v');
int msr = cheater ? 15 : 7; int msr = allowIncreasedSight() ? 15 : 7;
if(ne.intval == &sightrange && sightrange > msr) if(ne.intval == &sightrange && sightrange > msr)
*ne.editwhat = sightrange = msr, affect('v'); *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() { void drawthemap() {
frameid++; frameid++;
if(!cheater && !svg::in && !inHighQual) { if(!allowIncreasedSight()) {
if(sightrange > 7) sightrange = 7; if(sightrange > 7) sightrange = 7;
overgenerate = false; overgenerate = false;
} }

View File

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