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

gp:: 'dual of current' no longer can circumvent the limits

This commit is contained in:
Zeno Rogue 2024-02-22 20:41:54 +01:00
parent 3ed43b8c7d
commit 79e74e8d53

View File

@ -813,6 +813,15 @@ EX namespace gp {
screens = g; screens = g;
} }
EX bool check_whirl_set(loc xy) {
if(!check_limits(xy)) {
addMessage(XLAT("Outside of the supported limits"));
return false;
}
whirl_set(xy);
return true;
}
string helptext() { string helptext() {
return XLAT( return XLAT(
"Goldberg polyhedra are obtained by adding extra hexagons to a dodecahedron. " "Goldberg polyhedra are obtained by adding extra hexagons to a dodecahedron. "
@ -973,24 +982,24 @@ EX namespace gp {
auto p = univ_param(); auto p = univ_param();
if(S3 == 3 && !UNTRUNCATED) { if(S3 == 3 && !UNTRUNCATED) {
println(hlog, "set param to ", p * loc(1,1)); println(hlog, "set param to ", p * loc(1,1));
whirl_set(p * loc(1, 1)); if(!check_whirl_set(p * loc(1, 1))) return;
set_variation(eVariation::untruncated); set_variation(eVariation::untruncated);
start_game(); start_game();
config = human_representation(univ_param()); config = human_representation(univ_param());
} }
else if(S3 == 4 && !UNRECTIFIED) { else if(S3 == 4 && !UNRECTIFIED) {
whirl_set(p * loc(1, 1)); if(!check_whirl_set(p * loc(1, 1))) return;
set_variation(eVariation::unrectified); set_variation(eVariation::unrectified);
start_game(); start_game();
config = human_representation(univ_param()); config = human_representation(univ_param());
} }
else if(S3 == 3 && UNTRUNCATED) { else if(S3 == 3 && UNTRUNCATED) {
println(hlog, "whirl_set to ", (p * loc(1,1)) / 3); println(hlog, "whirl_set to ", (p * loc(1,1)) / 3);
whirl_set((p * loc(1,1)) / 3); if(!check_whirl_set((p * loc(1,1)) / 3)) return;
config = human_representation(univ_param()); config = human_representation(univ_param());
} }
else if(S3 == 4 && UNRECTIFIED) { else if(S3 == 4 && UNRECTIFIED) {
whirl_set((p * loc(1,1)) / 2); if(!check_whirl_set((p * loc(1,1)) / 2)) return;
config = human_representation(univ_param()); config = human_representation(univ_param());
} }
}); });