aboutsummaryrefslogtreecommitdiff
path: root/advtrains/wagons.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-12-10 23:07:27 +0100
committerorwell96 <orwell@bleipb.de>2018-12-10 23:07:27 +0100
commitfb10420c38d09b7f60682c55a98c85359bc50eb0 (patch)
treec01c2233899cd8ab4bf446a1ef493681eb5dd00c /advtrains/wagons.lua
parentc8788e6ca7cc26f41c819983d0677502786e8985 (diff)
downloadadvtrains-fb10420c38d09b7f60682c55a98c85359bc50eb0.tar.gz
advtrains-fb10420c38d09b7f60682c55a98c85359bc50eb0.tar.bz2
advtrains-fb10420c38d09b7f60682c55a98c85359bc50eb0.zip
Fix 144e1fc4e01741f8cdd5a579ae84cde85c420d78 (there's no self in one of the instructions)
Diffstat (limited to 'advtrains/wagons.lua')
-rw-r--r--advtrains/wagons.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua
index 986cbac..4c254a8 100644
--- a/advtrains/wagons.lua
+++ b/advtrains/wagons.lua
@@ -28,8 +28,8 @@ function advtrains.create_wagon(wtype, owner)
return new_id
end
-local function make_inv_name(self)
- return "detached:advtrains_wgn_"..self.id
+local function make_inv_name(uid)
+ return "detached:advtrains_wgn_"..uid
end
@@ -580,7 +580,7 @@ function wagon:on_rightclick(clicker)
if self.seat_groups then
if #self.seats==0 then
if self.has_inventory and self.get_inventory_formspec and advtrains.check_driving_couple_protection(pname, data.owner, data.whitelist) then
- minetest.show_formspec(pname, "advtrains_inv_"..self.id, self:get_inventory_formspec(pname, make_inv_name(self)))
+ minetest.show_formspec(pname, "advtrains_inv_"..self.id, self:get_inventory_formspec(pname, make_inv_name(self.id)))
end
return
end
@@ -714,7 +714,7 @@ function wagon:show_get_on_form(pname)
local data = advtrains.wagons[self.id]
if #self.seats==0 then
if self.has_inventory and self.get_inventory_formspec and advtrains.check_driving_couple_protection(pname, data.owner, data.whitelist) then
- minetest.show_formspec(pname, "advtrains_inv_"..self.id, self:get_inventory_formspec(pname, make_inv_name(self)))
+ minetest.show_formspec(pname, "advtrains_inv_"..self.id, self:get_inventory_formspec(pname, make_inv_name(self.id)))
end
return
end
@@ -912,7 +912,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
local data = advtrains.wagons[wagon.id]
if fields.inv then
if wagon.has_inventory and wagon.get_inventory_formspec then
- minetest.show_formspec(player:get_player_name(), "advtrains_inv_"..uid, wagon:get_inventory_formspec(player:get_player_name(), make_inv_name(self)))
+ minetest.show_formspec(player:get_player_name(), "advtrains_inv_"..uid, wagon:get_inventory_formspec(player:get_player_name(), make_inv_name(uid)))
end
elseif fields.seat then
local val=minetest.explode_textlist_event(fields.seat)
@@ -977,7 +977,7 @@ function wagon:seating_from_key_helper(pname, fields, no)
end
end
if fields.inv and self.has_inventory and self.get_inventory_formspec then
- minetest.show_formspec(player:get_player_name(), "advtrains_inv_"..self.id, self:get_inventory_formspec(player:get_player_name(), make_inv_name(self)))
+ minetest.show_formspec(player:get_player_name(), "advtrains_inv_"..self.id, self:get_inventory_formspec(player:get_player_name(), make_inv_name(self.id)))
end
if fields.prop and data.owner==pname then
self:show_wagon_properties(pname)