tortoise:: shading now can be disabled

This commit is contained in:
Zeno Rogue 2020-03-22 09:46:13 +01:00
parent 33bacc8731
commit 11447fcb7b
4 changed files with 19 additions and 2 deletions

View File

@ -617,7 +617,7 @@ void celldrawer::tune_colors() {
aura_color = fcol;
if(peace::on && peace::hint && c->land != laTortoise) {
if(peace::on && peace::hint && (c->land != laTortoise || !tortoise::shading_on())) {
int d =
(c->land == laCamelot || (c->land == laCaribbean && celldistAlt(c) <= 0) || (c->land == laPalace && celldistAlt(c))) ? celldistAlt(c):
celldist(c);

View File

@ -2536,10 +2536,16 @@ EX namespace tortoise {
else val = target;
}
EX bool shading_enabled = true;
EX bool shading_on() {
return shading_enabled && seek();
}
EX void updateVals(int delta) {
int currbits = getBits(cwt.at);
for(int i=0; i<numbits; i++)
update(seekval[i], seek() && !(peace::on && !peace::hint) ? getBit(seekbits, i) : .5, delta);
update(seekval[i], shading_on() ? getBit(seekbits, i) : .5, delta);
for(int i=0; i<numbits; i++)
update(currval[i], getBit(currbits, i), delta);
}

View File

@ -620,6 +620,8 @@ EX void initConfig() {
addsaver(racing::standard_centering, "race_standard_centering");
#endif
addsaver(tortoise::shading_enabled, "tortoise_shading", true);
addsaver(bounded_mine_percentage, "bounded_mine_percentage");
addsaver(nisot::geodesic_movement, "solv_geodesic_movement", true);
@ -2091,6 +2093,10 @@ EX void show_color_dialog() {
}
#endif
if(cwt.at->land == laTortoise) {
dialog::addBoolItem_action(XLAT("Galápagos shading"), tortoise::shading_enabled, 'T');
}
dialog::addInfo(XLAT("colors of some game objects can be edited by clicking them."));
dialog::addBreak(50);

View File

@ -1083,5 +1083,10 @@ EX void gotoHelpFor(eLand l) {
listbeasts();
}});
else listbeasts();
if(l == laTortoise)
help_extensions.push_back(help_extension{'t', XLAT("Galápagos shading"), [] () {
tortoise::shading_enabled = !tortoise::shading_enabled;
}});
}
}