File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,8 @@ function core.register_item(name, itemdef)
116
116
end
117
117
itemdef .name = name
118
118
119
+ local is_overriding = core .registered_items [name ]
120
+
119
121
-- Apply defaults and add to registered_* table
120
122
if itemdef .type == " node" then
121
123
-- Use the nodebox as selection box if it's not set manually
@@ -177,7 +179,13 @@ function core.register_item(name, itemdef)
177
179
-- core.log("Registering item: " .. itemdef.name)
178
180
core .registered_items [itemdef .name ] = itemdef
179
181
core .registered_aliases [itemdef .name ] = nil
180
- register_item_raw (itemdef )
182
+
183
+ -- Used to allow builtin to register ignore to registered_items
184
+ if name ~= " ignore" then
185
+ register_item_raw (itemdef )
186
+ elseif is_overriding then
187
+ core .log (" warning" , " Attempted redefinition of \" ignore\" " )
188
+ end
181
189
end
182
190
183
191
function core .unregister_item (name )
You can’t perform that action at this time.
0 commit comments