mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 18:00:34 +00:00
compass probability now can be changed from menu/commandline
This commit is contained in:
parent
46256155d7
commit
3e747a2d9d
14
crystal.cpp
14
crystal.cpp
@ -898,6 +898,9 @@ int readArgs() {
|
|||||||
else if(argis("-cview")) {
|
else if(argis("-cview")) {
|
||||||
view_coordinates = true;
|
view_coordinates = true;
|
||||||
}
|
}
|
||||||
|
else if(argis("-cprob")) {
|
||||||
|
PHASEFROM(2); shift_arg_formula(compass_probability);
|
||||||
|
}
|
||||||
else if(argis("-crug")) {
|
else if(argis("-crug")) {
|
||||||
PHASE(3);
|
PHASE(3);
|
||||||
if(rug::rugged) rug::close();
|
if(rug::rugged) rug::close();
|
||||||
@ -918,6 +921,15 @@ hrmap *new_map() {
|
|||||||
return new hrmap_crystal;
|
return new hrmap_crystal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string compass_help() {
|
||||||
|
return XLAT(
|
||||||
|
"Lands in this geometry are usually built on North-South or West-East axis. "
|
||||||
|
"Compasses always point North, and all the cardinal directions to the right from compass North are East (this is not "
|
||||||
|
"true in general, but it is true for the cells where compasses are generated). "
|
||||||
|
"North is the first coordinate, while East is the sum of other coordinates."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
void show() {
|
void show() {
|
||||||
cmode = sm::SIDE | sm::MAYDARK;
|
cmode = sm::SIDE | sm::MAYDARK;
|
||||||
gamescreen(0);
|
gamescreen(0);
|
||||||
@ -934,6 +946,8 @@ void show() {
|
|||||||
dialog::addBreak(50);
|
dialog::addBreak(50);
|
||||||
dialog::addBoolItem("view coordinates in the cheat mode", view_coordinates, 'v');
|
dialog::addBoolItem("view coordinates in the cheat mode", view_coordinates, 'v');
|
||||||
dialog::add_action([]() { view_coordinates = !view_coordinates; });
|
dialog::add_action([]() { view_coordinates = !view_coordinates; });
|
||||||
|
dialog::addSelItem(XLAT("compass probability"), fts(compass_probability), 'p');
|
||||||
|
dialog::add_action([]() { dialog::editNumber(compass_probability, 0, 1, 0.1, 1, XLAT("compass probability"), compass_help()); });
|
||||||
if(geometry == gCrystal) {
|
if(geometry == gCrystal) {
|
||||||
dialog::addBoolItem("3D display", rug::rugged, 'r');
|
dialog::addBoolItem("3D display", rug::rugged, 'r');
|
||||||
dialog::add_action([]() { pushScreen(rug::show); });
|
dialog::add_action([]() { pushScreen(rug::show); });
|
||||||
|
5
help.cpp
5
help.cpp
@ -242,7 +242,10 @@ string generateHelpForItem(eItem it) {
|
|||||||
|
|
||||||
string help = helptitle(XLATN(iinf[it].name), iinf[it].color);
|
string help = helptitle(XLATN(iinf[it].name), iinf[it].color);
|
||||||
|
|
||||||
help += XLAT(iinf[it].help);
|
if(it == itCompass && geometry == gCrystal)
|
||||||
|
help += crystal::compass_help();
|
||||||
|
else
|
||||||
|
help += XLAT(iinf[it].help);
|
||||||
|
|
||||||
if(it == itSavedPrincess || it == itOrbLove) if(!inv::on)
|
if(it == itSavedPrincess || it == itOrbLove) if(!inv::on)
|
||||||
help += princessReviveHelp();
|
help += princessReviveHelp();
|
||||||
|
Loading…
Reference in New Issue
Block a user