Skip to content

Commit

Permalink
technic_cnc: Add group 'cracky'
Browse files Browse the repository at this point in the history
Fixes a regression from ba2bdf8 where stone-like nodes could no longer be dug.
New sanity check to avoid such issues in the future.
  • Loading branch information
SmallJoker committed Aug 3, 2024
1 parent 6731db1 commit 9f373d6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions technic_cnc/cnc_materials.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)

Expand Down

0 comments on commit 9f373d6

Please sign in to comment.