ls:: horodisk mode now has a parameter controlling perfection vs density

This commit is contained in:
Zeno Rogue 2023-09-18 11:09:06 +02:00
parent 9031b32cf4
commit f62fcc12fc
3 changed files with 17 additions and 2 deletions

View File

@ -2120,6 +2120,9 @@ EX void gen_temple(cell *c) {
else c->landparam = 2;
}
/* -2 should be perfect */
EX int horodisk_from = -2;
EX void moreBigStuff(cell *c) {
if(disable_bigstuff) return;
@ -2159,14 +2162,17 @@ EX void moreBigStuff(cell *c) {
if(have_alt(c) && hv_land[c->master->alt->alt] == laCamelot) {
buildCamelot(c);
}
else if(have_alt(c) && celldistAlt(c) <= 0) {
else if(have_alt(c) && celldistAlt(c) <= horodisk_from) {
eLand l = hv_land[c->master->alt->alt];
setland(c, l);
if(l == laCaribbean) generateTreasureIsland(c);
if(l == laWhirlpool && celldistAlt(c) >= -1) {
setland(c, laOcean);
c->landparam = 30;
}
if(l == laCaribbean) generateTreasureIsland(c);
if(l == laWestWall && celldistAlt(c) >= -1) {
setland(c, laCrossroads);
}
if(isEquidLand(l)) c->landparam = 1-celldistAlt(c);
}
else

View File

@ -3225,6 +3225,11 @@ EX int config3 = addHook(hooks_configfile, 100, [] {
"separate mirror images or different football types.", 'd');
param_b(debug_voronoi, "debug_voronoi")->editable(
"display Voronoi tie debug values", 'd');
param_i(horodisk_from, "horodisk_from", -2)->editable(-10, 10, 1,
"land size in horodisk mode",
"Set this to -2 to get perfect horodisks. Smaller values yield less dense horodisks, and "
"larger values might produce horodisks with errors or crashing into each other.", 'H');
param_f(global_boundary_ratio, "global_boundary_ratio")
->editable(0, 5, 0.1, "Width of cell boundaries",
"How wide should the cell boundaries be.", '0');

View File

@ -435,6 +435,10 @@ EX void show_chaos() {
if(casual) dialog::addInfo("(but the casual mode is on)");
dialog::addBreak(100);
if(ls::horodisk_structure())
add_edit(horodisk_from);
else
dialog::addBreak(100);
dialog::addBack();
dialog::display();
}