diff options
author | orwell96 <orwell@bleipb.de> | 2018-12-10 22:41:02 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2018-12-10 22:54:23 +0100 |
commit | a1c0b3a6d3dddcc064e1d1a70a35d412f7dc50c7 (patch) | |
tree | 4bc896fb21c0433dffbb83111e463041d578533d | |
parent | 9c9450ccb78f5c2ce9d9d8da315507d5396bb441 (diff) | |
download | basic_trains-a1c0b3a6d3dddcc064e1d1a70a35d412f7dc50c7.tar.gz basic_trains-a1c0b3a6d3dddcc064e1d1a70a35d412f7dc50c7.tar.bz2 basic_trains-a1c0b3a6d3dddcc064e1d1a70a35d412f7dc50c7.zip |
Change get_inventory_formspec API - add invname parameter
-rw-r--r-- | advtrains_train_industrial/init.lua | 8 | ||||
-rwxr-xr-x | advtrains_train_steam/init.lua | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/advtrains_train_industrial/init.lua b/advtrains_train_industrial/init.lua index 62f4612..fcd85d1 100644 --- a/advtrains_train_industrial/init.lua +++ b/advtrains_train_industrial/init.lua @@ -92,9 +92,9 @@ advtrains.register_wagon("wagon_tank", { collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0}, drops={"default:steelblock 4"}, has_inventory = true, - get_inventory_formspec = function(self) + get_inventory_formspec = function(self, pname, invname) return "size[8,11]".. - "list[detached:advtrains_wgn_"..self.id..";box;0,0;8,3;]".. + "list["..invname..";box;0,0;8,3;]".. "list[current_player;main;0,5;8,4;]".. "listring[]" end, @@ -114,9 +114,9 @@ advtrains.register_wagon("wagon_wood", { collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0}, drops={"default:steelblock 4"}, has_inventory = true, - get_inventory_formspec = function(self) + get_inventory_formspec = function(self, pname, invname) return "size[8,11]".. - "list[detached:advtrains_wgn_"..self.id..";box;0,0;8,3;]".. + "list["..invname..";box;0,0;8,3;]".. "list[current_player;main;0,5;8,4;]".. "listring[]" end, diff --git a/advtrains_train_steam/init.lua b/advtrains_train_steam/init.lua index 3de714c..db2d087 100755 --- a/advtrains_train_steam/init.lua +++ b/advtrains_train_steam/init.lua @@ -211,9 +211,9 @@ advtrains.register_wagon("wagon_box", { collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0}, drops={"default:steelblock 1"}, has_inventory = true, - get_inventory_formspec = function(self) + get_inventory_formspec = function(self, pname, invname) return "size[8,11]".. - "list[detached:advtrains_wgn_"..self.id..";box;0,0;8,3;]".. + "list["..invname..";box;0,0;8,3;]".. "list[current_player;main;0,5;8,4;]".. "listring[]" end, |