diff options
author | orwell96 <mono96.mml@gmail.com> | 2016-09-12 21:06:00 +0200 |
---|---|---|
committer | orwell96 <mono96.mml@gmail.com> | 2016-09-12 21:06:00 +0200 |
commit | f54d3b2e6cbba105f6ddd8c7f006db3e04d05b0e (patch) | |
tree | 85e375bae1e658798e239c186820afab9411adb6 /wagons.lua | |
parent | 1cffe6a9b63305eaccce007af5db522cfb5989d1 (diff) | |
download | advtrains-f54d3b2e6cbba105f6ddd8c7f006db3e04d05b0e.tar.gz advtrains-f54d3b2e6cbba105f6ddd8c7f006db3e04d05b0e.tar.bz2 advtrains-f54d3b2e6cbba105f6ddd8c7f006db3e04d05b0e.zip |
Adding crafting recipes
Diffstat (limited to 'wagons.lua')
-rw-r--r-- | wagons.lua | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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)
|