From 5c65b446468fe6608069e50634ded3f5bfd48ae5 Mon Sep 17 00:00:00 2001 From: PizzaPlanner <80210845+PizzaPlanner@users.noreply.github.com> Date: Wed, 8 Jul 2026 17:15:01 +0200 Subject: [PATCH] add support for surface blacklist customization --- data.lua | 7 +++++++ script/autodeconstruct.lua | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 data.lua diff --git a/data.lua b/data.lua new file mode 100644 index 0000000..8a5d622 --- /dev/null +++ b/data.lua @@ -0,0 +1,7 @@ +data:extend { + { + type = "mod-data", + name = "autodeconstruct-blacklist", + data = { surfaces = {"BPL_TheLab", "bpsb%-lab"} } + } +} \ No newline at end of file diff --git a/script/autodeconstruct.lua b/script/autodeconstruct.lua index f45e28e..8bb7e6b 100644 --- a/script/autodeconstruct.lua +++ b/script/autodeconstruct.lua @@ -4,7 +4,7 @@ autodeconstruct = {} local math2d = require("math2d") -local blacklist_surface_prefixes = {"BPL_TheLab", "bpsb%-lab"} +local blacklist_surface_prefixes = prototypes.mod_data["autodeconstruct-blacklist"].data.surfaces local RESOURCE_CHECK_TIME = 15 local RESOURCE_EJECT_TIME = 30 local DECONSTRUCT_TIMEOUT = 1800