Pick up cart if sneak (shift) is pressed when punching it

master
PilzAdam 2012-12-15 15:27:47 +01:00
parent acf74d89b6
commit 2767b159f7
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ function cart:on_punch(puncher, time_from_last_punch, tool_capabilities, directi
return
end
if puncher:get_wielded_item():get_definition().type == "tool" then
if puncher:get_player_control().sneak then
self.object:remove()
puncher:get_inventory():add_item("main", "carts:cart")
return