diff options
Diffstat (limited to 'moretrains_industrial/init.lua')
-rw-r--r-- | moretrains_industrial/init.lua | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/moretrains_industrial/init.lua b/moretrains_industrial/init.lua new file mode 100644 index 0000000..3694d91 --- /dev/null +++ b/moretrains_industrial/init.lua @@ -0,0 +1,73 @@ +local S +if minetest.get_modpath("intllib") then + S = intllib.Getter() +else + S = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end +end + +advtrains.register_wagon("moretrains_wagon_tank", { + mesh="moretrains_wagon_tank.obj", + textures = {"moretrains_wagon_tank.png"}, + seats = {}, + drives_on={default=true}, + max_speed=20, + visual_size = {x=1, y=1}, + wagon_span=2.349, + 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, pname, invname) + return "size[8,11]".. + "list["..invname..";box;0,0;8,3;]".. + "list[current_player;main;0,5;8,4;]".. + "listring[]" + end, + inventory_list_sizes = { + box=8*3, + }, +}, S("Industrial tank wagon"), "moretrains_wagon_tank_inv.png") + + +advtrains.register_wagon("moretrains_wagon_wood", { + mesh="moretrains_wagon_wood.obj", + textures = {"moretrains_wagon_wood.png"}, + seats = {}, + drives_on={default=true}, + max_speed=20, + visual_size = {x=1, y=1}, + wagon_span=2.554, + 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, pname, invname) + return "size[8,11]".. + "list["..invname..";box;0,0;8,3;]".. + "list[current_player;main;0,5;8,4;]".. + "listring[]" + end, + inventory_list_sizes = { + box=8*3, + }, +}, S("Industrial wood wagon"), "moretrains_wagon_tank_inv.png") + +advtrains.register_wagon("moretrains_wagon_wood_loaded", { + mesh="moretrains_wagon_wood_loaded.obj", + textures = {"moretrains_wagon_wood.png"}, + seats = {}, + drives_on={default=true}, + max_speed=20, + visual_size = {x=1, y=1}, + wagon_span=2.554, + 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, pname, invname) + return "size[8,11]".. + "list["..invname..";box;0,0;8,3;]".. + "list[current_player;main;0,5;8,4;]".. + "listring[]" + end, + inventory_list_sizes = { + box=8*3, + }, +}, S("Industrial wood wagon (loaded)"), "moretrains_wagon_tank_inv.png")
\ No newline at end of file |