From 35a69b50021cb5b300af730928cdbfcb16727f43 Mon Sep 17 00:00:00 2001
From: Sokomine <wegwerf@anarres.dyndns.org>
Date: Wed, 8 Apr 2020 03:16:24 +0200
Subject: [PATCH] pass replacements on to handle_schematics.clear_area

---
 plotmarker_formspec.lua | 2 +-
 protection.lua          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/plotmarker_formspec.lua b/plotmarker_formspec.lua
index ee5fb42..0dd65ad 100644
--- a/plotmarker_formspec.lua
+++ b/plotmarker_formspec.lua
@@ -169,7 +169,7 @@ mg_villages.plotmarker_formspec = function( pos, formname, fields, player )
 		if( fields.remove_building and fields.remove_building ~= "" ) then
 			-- clear the space above ground, put dirt below ground, but keep the
 			-- surface intact
-			handle_schematics.clear_area( start_pos, end_pos, pos.y-1);
+			handle_schematics.clear_area( start_pos, end_pos, pos.y-1, replacements);
 			-- also clear the meta data to avoid strange effects
 			handle_schematics.clear_meta( start_pos, end_pos );
 			formspec = formspec.."label[3,3;"..S("The plot has been cleared.").."]";
diff --git a/protection.lua b/protection.lua
index 39a5529..f9ac921 100644
--- a/protection.lua
+++ b/protection.lua
@@ -357,7 +357,7 @@ mg_villages.plotmarker_formspec = function( pos, formname, fields, player )
 		if( fields.remove_building and fields.remove_building ~= "" ) then
 			-- clear the space above ground, put dirt below ground, but keep the
 			-- surface intact
-			handle_schematics.clear_area( start_pos, end_pos, pos.y-1);
+			handle_schematics.clear_area( start_pos, end_pos, pos.y-1, replacements);
 			-- also clear the meta data to avoid strange effects
 			handle_schematics.clear_meta( start_pos, end_pos );
 			formspec = formspec.."label[3,3;"..S("The plot has been cleared.").."]";