mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-05-06 17:24:06 +00:00
ls:: randomwalk_size parameter added
This commit is contained in:
parent
fb5e4d25bb
commit
ef93305313
@ -3229,6 +3229,9 @@ EX int config3 = addHook(hooks_configfile, 100, [] {
|
|||||||
"land size in horodisk mode",
|
"land size in horodisk mode",
|
||||||
"Set this to -2 to get perfect horodisks. Smaller values yield less dense horodisks, and "
|
"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');
|
"larger values might produce horodisks with errors or crashing into each other.", 'H');
|
||||||
|
param_i(randomwalk_size, "randomwalk_size", 10)->editable(2, 100, 1,
|
||||||
|
"land size in randomwalk mode",
|
||||||
|
"The average size of a land in randomwalk mode.", 'R');
|
||||||
|
|
||||||
param_f(global_boundary_ratio, "global_boundary_ratio")
|
param_f(global_boundary_ratio, "global_boundary_ratio")
|
||||||
->editable(0, 5, 0.1, "Width of cell boundaries",
|
->editable(0, 5, 0.1, "Width of cell boundaries",
|
||||||
|
@ -2847,9 +2847,11 @@ EX void repairLandgen(cell *c) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EX int randomwalk_size = 10;
|
||||||
|
|
||||||
EX void setland_randomwalk(cell *c) {
|
EX void setland_randomwalk(cell *c) {
|
||||||
if(c->land) return;
|
if(c->land) return;
|
||||||
if(hrand(10) == 0) setland(c, currentlands[hrand(isize(currentlands))]);
|
if(hrand(randomwalk_size) == 0) setland(c, currentlands[hrand(isize(currentlands))]);
|
||||||
else {
|
else {
|
||||||
cell *c2 = nullptr;
|
cell *c2 = nullptr;
|
||||||
for(int i=0; i<10 && !(c2 && (!disksize || is_in_disk(c2)) && is_in_fractal(c2)); i++)
|
for(int i=0; i<10 && !(c2 && (!disksize || is_in_disk(c2)) && is_in_fractal(c2)); i++)
|
||||||
|
@ -437,6 +437,8 @@ EX void show_chaos() {
|
|||||||
dialog::addBreak(100);
|
dialog::addBreak(100);
|
||||||
if(ls::horodisk_structure())
|
if(ls::horodisk_structure())
|
||||||
add_edit(horodisk_from);
|
add_edit(horodisk_from);
|
||||||
|
else if(land_structure == lsChaosRW)
|
||||||
|
add_edit(randomwalk_size);
|
||||||
else
|
else
|
||||||
dialog::addBreak(100);
|
dialog::addBreak(100);
|
||||||
dialog::addBack();
|
dialog::addBack();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user