From e6aa42bd5d7331ea2aa9b56812882aef11ca294e Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Mon, 1 Sep 2025 12:08:35 -0500 Subject: [PATCH] fix 'frill up terrain' prompting town entrance/sign text change --- src/scenedit/scen.actions.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/scenedit/scen.actions.cpp b/src/scenedit/scen.actions.cpp index 738e49aa..8d2a55c1 100644 --- a/src/scenedit/scen.actions.cpp +++ b/src/scenedit/scen.actions.cpp @@ -2466,15 +2466,18 @@ void frill_up_terrain() { for(short i = 0; i < cur_area->max_dim; i++) for(short j = 0; j < cur_area->max_dim; j++) { terrain_type = cur_area->terrain(i,j); + bool changed = false; for(size_t k = 0; k < scenario.ter_types.size(); k++) { if(terrain_type == k) continue; cTerrain& ter = scenario.ter_types[k]; - if(terrain_type == ter.frill_for && get_ran(1,1,100) < ter.frill_chance) + if(terrain_type == ter.frill_for && get_ran(1,1,100) < ter.frill_chance){ terrain_type = k; + changed = true; + } } - set_terrain(loc(i, j), terrain_type, changes); + if(changed) set_terrain(loc(i, j), terrain_type, changes); } undo_list.add(action_ptr(new aDrawTerrain("Frill Up Terrain", changes))); update_edit_menu();