mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
rivers creator dialog
This commit is contained in:
parent
c5698c5a11
commit
8bbfe6dd2c
7 changed files with 165 additions and 64 deletions
|
|
@ -531,8 +531,7 @@ function toggleAddRiver() {
|
|||
|
||||
function addRiverOnClick() {
|
||||
const {cells, rivers} = pack;
|
||||
const point = d3.mouse(this);
|
||||
let i = findCell(point[0], point[1]);
|
||||
let i = findCell(...d3.mouse(this));
|
||||
|
||||
if (cells.r[i]) return tip("There is already a river here", false, "error");
|
||||
if (cells.h[i] < 20) return tip("Cannot create river in water cell", false, "error");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue