Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions mapeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,7 @@ EX namespace mapeditor {
int paintstatueid = 0;
int radius = 0;
string paintwhat_str = "clear monster";
bool preserveparams = false;

cellwalker copysource;

Expand Down Expand Up @@ -1748,7 +1749,10 @@ EX namespace mapeditor {
if(anyshiftclick) { c->land = laNone; c->wall = waNone; map_version++; break; }
eLand last = c->land;
c->land = eLand(paintwhat);
if(isIcyLand(c) && isIcyLand(last))
if(preserveparams) {
// do nothing
}
else if(isIcyLand(c) && isIcyLand(last))
HEAT(c) += spillinc() / 100.;
else if(last == laDryForest && c->land == laDryForest)
c->landparam += spillinc();
Expand All @@ -1765,7 +1769,10 @@ EX namespace mapeditor {
c->wall = eWall(anyshiftclick ? paintwhat_alt_wall : paintwhat);
map_version++;

if(last != c->wall) {
if(preserveparams) {
// do nothing
}
else if(last != c->wall) {
if(hasTimeout(c))
c->wparam = 10;
else if(c->wall == waWaxWall)
Expand All @@ -1775,7 +1782,7 @@ EX namespace mapeditor {
c->wparam += spillinc();

if(c->wall == waEditStatue) {
c->wparam = paintstatueid;
if(!preserveparams) c->wparam = paintstatueid;
c->mondir = cdir;
}

Expand Down Expand Up @@ -3382,6 +3389,9 @@ EX namespace mapeditor {
dialog::addItem(XLAT("change the pattern/color of new Canvas cells"), 'c');
dialog::add_action_push(patterns::showPrePatternNoninstant);

dialog::addBoolItem_action(XLAT("preserve parameters when editing walls and lands"), preserveparams, 'P');
dialog::addInfo(XLAT("(unexpected parameter values may cause undesired behavior)"));

dialog::addItem(XLAT("configure WFC"), 'W');
dialog::add_action_push(wfc::wfc_menu);

Expand Down