mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 18:00:34 +00:00
editing map/portals now changes map_version
This commit is contained in:
parent
f4282e1118
commit
3ce5597cc1
@ -755,6 +755,7 @@ EX void show_portals() {
|
||||
unconnected.push_back(tcw);
|
||||
connections.erase(cw);
|
||||
connections.erase(tcw);
|
||||
mapeditor::map_version++;
|
||||
});
|
||||
}
|
||||
else if(in_list) {
|
||||
@ -771,6 +772,7 @@ EX void show_portals() {
|
||||
dialog::addItem(XLAT("connect " + lalign(0, p)), dialog::list_fake_key++);
|
||||
dialog::add_action([p, cw] {
|
||||
connect_portal(cw, p, edit_spin);
|
||||
mapeditor::map_version++;
|
||||
erase_unconnected(p);
|
||||
});
|
||||
}
|
||||
|
@ -10,6 +10,9 @@ namespace hr {
|
||||
|
||||
EX namespace mapeditor {
|
||||
|
||||
/* changes when the map is changed */
|
||||
EX int map_version;
|
||||
|
||||
EX bool drawing_tool;
|
||||
EX bool intexture;
|
||||
EX bool snapping;
|
||||
@ -1492,7 +1495,7 @@ EX namespace mapeditor {
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
if(anyshiftclick) { c->land = laNone; c->wall = waNone; break; }
|
||||
if(anyshiftclick) { c->land = laNone; c->wall = waNone; map_version++; break; }
|
||||
eLand last = c->land;
|
||||
c->land = eLand(paintwhat);
|
||||
if(isIcyLand(c) && isIcyLand(last))
|
||||
@ -1510,6 +1513,7 @@ EX namespace mapeditor {
|
||||
case 3: {
|
||||
eWall last = c->wall;
|
||||
c->wall = eWall(anyshiftclick ? paintwhat_alt_wall : paintwhat);
|
||||
map_version++;
|
||||
|
||||
if(last != c->wall) {
|
||||
if(hasTimeout(c))
|
||||
@ -1532,6 +1536,7 @@ EX namespace mapeditor {
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
map_version++;
|
||||
c->land = laNone;
|
||||
c->wall = waNone;
|
||||
c->item = itNone;
|
||||
@ -1540,11 +1545,13 @@ EX namespace mapeditor {
|
||||
// c->tmp = -1;
|
||||
break;
|
||||
case 6:
|
||||
map_version++;
|
||||
c->land = laCanvas;
|
||||
c->wall = ((GDIM == 3) ^ anyshiftclick) ? waWaxWall : waNone;
|
||||
c->landparam = paintwhat >> 8;
|
||||
break;
|
||||
case 4: {
|
||||
map_version++;
|
||||
cell *copywhat = where.second.at;
|
||||
c->wall = copywhat->wall;
|
||||
c->item = copywhat->item;
|
||||
|
Loading…
Reference in New Issue
Block a user