aboutsummaryrefslogtreecommitdiff
path: root/wagons.lua
diff options
context:
space:
mode:
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)