mirror of
https://github.com/minetest-mods/digtron.git
synced 2025-01-03 09:37:27 +01:00
prevent crate from storing null Digtrons
This commit is contained in:
parent
94ccab9c39
commit
2949dbd764
@ -26,6 +26,13 @@ minetest.register_node("digtron:empty_crate", {
|
||||
return
|
||||
end
|
||||
|
||||
if #layout.all == 1 then
|
||||
local meta = minetest.get_meta(pos)
|
||||
minetest.sound_play("buzzer", {gain=0.5, pos=pos})
|
||||
meta:set_string("infotext", S("No Digtron components adjacent to package"))
|
||||
return
|
||||
end
|
||||
|
||||
digtron.award_crate(layout, clicker:get_player_name())
|
||||
|
||||
local layout_string = layout:serialize()
|
||||
|
Loading…
Reference in New Issue
Block a user