From 9f373d65281836b1bbfb0069707a8eaa1aeb0c53 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sat, 3 Aug 2024 08:23:29 +0200 Subject: [PATCH] technic_cnc: Add group 'cracky' Fixes a regression from ba2bdf836 where stone-like nodes could no longer be dug. New sanity check to avoid such issues in the future. --- technic_cnc/cnc_materials.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/technic_cnc/cnc_materials.lua b/technic_cnc/cnc_materials.lua index c20187c4..beb6b824 100644 --- a/technic_cnc/cnc_materials.lua +++ b/technic_cnc/cnc_materials.lua @@ -10,6 +10,7 @@ local function register_material(nodename, tiles_override, descr_override) end local groups = { + cracky = ndef.groups.cracky, crumbly = ndef.groups.crumbly, choppy = ndef.groups.choppy, flammable = ndef.groups.flammable, @@ -19,6 +20,12 @@ local function register_material(nodename, tiles_override, descr_override) oddly_breakable_by_hand = ndef.groups.oddly_breakable_by_hand, not_in_creative_inventory = 1, } + local count = 0 + for _ in pairs(groups) do + count = count + 1 + end + assert(count >= 2, "Too few groups. node name=" .. nodename) + local tiles = tiles_override or { ndef.tiles[#ndef.tiles] } assert(tiles and #tiles == 1, "Unknown tile format in node name=" .. nodename)