diff options
author | Zefram <zefram@fysh.org> | 2014-11-06 10:29:53 +0000 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2014-11-06 08:33:14 -0500 |
commit | f205e5f4047aa251d2a30f5df3b8a1c48dc827c9 (patch) | |
tree | df4ce48ae229ad48131adee17a05182fb801920e | |
parent | 7c6c3b96792d0d3a1178bf40f142fbe2cae65f34 (diff) |
Fix anonymous digging of non-empty machine
The quarry was causing crashes when it reached a machine that was
undiggable due to containing items.
-rw-r--r-- | technic/machines/register/common.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/technic/machines/register/common.lua b/technic/machines/register/common.lua index 0e59d0e..c9f8b5d 100644 --- a/technic/machines/register/common.lua +++ b/technic/machines/register/common.lua @@ -122,8 +122,10 @@ function technic.machine_can_dig(pos, player) local inv = meta:get_inventory() if not inv:is_empty("src") or not inv:is_empty("dst") or not inv:is_empty("upgrade1") or not inv:is_empty("upgrade2") then - minetest.chat_send_player(player:get_player_name(), - S("Machine cannot be removed because it is not empty")) + if player then + minetest.chat_send_player(player:get_player_name(), + S("Machine cannot be removed because it is not empty")) + end return false else return true |