aboutsummaryrefslogtreecommitdiff
path: root/wagons.lua
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2016-09-12 21:06:00 +0200
committerorwell96 <mono96.mml@gmail.com>2016-09-12 21:06:00 +0200
commitf54d3b2e6cbba105f6ddd8c7f006db3e04d05b0e (patch)
tree85e375bae1e658798e239c186820afab9411adb6 /wagons.lua
parent1cffe6a9b63305eaccce007af5db522cfb5989d1 (diff)
downloadadvtrains-f54d3b2e6cbba105f6ddd8c7f006db3e04d05b0e.tar.gz
advtrains-f54d3b2e6cbba105f6ddd8c7f006db3e04d05b0e.tar.bz2
advtrains-f54d3b2e6cbba105f6ddd8c7f006db3e04d05b0e.zip
Adding crafting recipes
Diffstat (limited to 'wagons.lua')
-rw-r--r--wagons.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/wagons.lua b/wagons.lua
index b5ab97d..78d7b67 100644
--- a/wagons.lua
+++ b/wagons.lua
@@ -120,11 +120,11 @@ function wagon:on_punch(puncher, time_from_last_punch, tool_capabilities, direct
local inv = puncher:get_inventory()
if minetest.setting_getbool("creative_mode") then
- if not inv:contains_item("main", "advtrains:locomotive") then
- inv:add_item("main", "advtrains:locomotive")
+ if not inv:contains_item("main", self.name) then
+ inv:add_item("main", self.name)
end
else
- inv:add_item("main", "advtrains:locomotive")
+ inv:add_item("main", self.name)
end
table.remove(self:train().trainparts, self.pos_in_trainparts)