Remove items that don't have a material from the tool grid.

fixes #1353
This commit is contained in:
IntegratedQuantum 2025-04-27 12:30:04 +02:00
parent db767b9c30
commit b70eb60afd

View File

@ -520,6 +520,7 @@ pub const Tool = struct { // MARK: Tool
var items: [25]?*const BaseItem = undefined;
for(&items, 0..) |*item, i| {
item.* = reverseIndices.get(zonArray.getAtIndex([]const u8, i, "null"));
if(item.* != null and item.*.?.material == null) item.* = null;
}
return items;
}