diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..2b4e094 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,23 @@ +License for Code +---------------- + +Copyright (C) 2018 maxx photography.hipp.m@gmail.com + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +License for Textures, Models and Sounds +--------------------------------------- + +CC-BY-SA 3.0 UNPORTED. Created by maxx \ No newline at end of file diff --git a/README.md b/README.md index 853f09f..04e107b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1 @@ -# trainblocks_bc -trainblocks backwards-compatible to advtrains_subwayblocks +# trainblocks diff --git a/alias.lua b/alias.lua new file mode 100644 index 0000000..912a0b2 --- /dev/null +++ b/alias.lua @@ -0,0 +1,10 @@ +--for the subwayblocks mod by gabriel I added a file which converts the subwaysigns by him to mine +--(important especially for Linuxworks server) + + for count = 1, 10, 1 do + minetest.register_alias("advtrains_subwayblocks:line" .. count, "trainblocks:line" .. count) + end + + minetest.register_alias("advtrains_subwayblocks:germany", "trainblocks:subwayblock") + + minetest.register_alias("advtrains_subwayblocks:mr", "trainblocks:mr") diff --git a/craft.lua b/craft.lua new file mode 100644 index 0000000..c589d06 --- /dev/null +++ b/craft.lua @@ -0,0 +1,78 @@ +--CRAFTING + +-- Blocks + +minetest.register_craft({ + output = 'trainblocks:subwayblock', + recipe = { + {'', 'dye:blue', ''}, + {'dye:white', 'default:glass', 'dye:white'}, + {'', 'dye:blue', ''}, + } +}) + +minetest.register_craft({ + output = 'trainblocks:sbahnblock', + recipe = { + {'', 'dye:orange', ''}, + {'dye:white', 'default:glass', 'dye:white'}, + {'', 'dye:orange', ''}, + } +}) + +--lineblocks from 1 to 10 +local dyes1 = {"blue", "red", "violet", "green", "orange", "yellow", "gray", "magenta", "cyan", "black"} +local dyes2 = {"white", "white", "white", "white", "white", "black", "white", "white", "white", "white"} + +for count = 1, 10, 1 do +minetest.register_craft({ + output = "trainblocks:line" .. count .. " 4", + recipe = { + {'', "dye:" .. dyes1[count] , ''}, + {"dye:" .. dyes2[count], 'default:glass', ''}, + {'', '', ''}, + } +}) +end + + + +--subway direction signs + +minetest.register_craft({ + output = 'trainblocks:subwaysignL 2', + recipe = { + {'', '', ''}, + {'dye:white', 'default:glass', 'dye:blue'}, + {'', '', ''}, + } +}) + +minetest.register_craft({ + output = 'trainblocks:subwaysignR 2', + recipe = { + {'', '', ''}, + {'dye:blue', 'default:glass', 'dye:white'}, + {'', '', ''}, + } +}) + +--sbahn direction signs + +minetest.register_craft({ + output = 'trainblocks:sbahnsignL 2', + recipe = { + {'', '', ''}, + {'dye:white', 'default:glass', 'dye:orange'}, + {'', '', ''}, + } +}) + +minetest.register_craft({ + output = 'trainblocks:sbahnsignR 2', + recipe = { + {'', '', ''}, + {'dye:blue', 'default:glass', 'dye:orange'}, + {'', '', ''}, + } +}) \ No newline at end of file diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..4ad96d5 --- /dev/null +++ b/depends.txt @@ -0,0 +1 @@ +default diff --git a/description.txt b/description.txt new file mode 100644 index 0000000..b013174 --- /dev/null +++ b/description.txt @@ -0,0 +1,4 @@ +This mod adds important signs for the advanced trains mod! + +change-log: +version 1.0: release diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..1e1e268 --- /dev/null +++ b/init.lua @@ -0,0 +1,349 @@ + +--[[ + + Trainblocks + ============= + This mod adds signs for the advanced trains mod by orwell + + version 0.1 by maxx + + Copyright (C) 2018 Maximilian Hipp and gpcf + + See LICENSE.txt for more information + + History: + 2018-03-04 version 0.1 release + +]]-- + +--import file /craft.lua + +dofile(minetest.get_modpath("trainblocks") .. "/craft.lua") +dofile(minetest.get_modpath("trainblocks") .. "/alias.lua") + + + + + +--subwayblock germany + +minetest.register_node("trainblocks:subwayblock", { + description = "Subwayblock", + light_source = 8, + tiles = { + "down_subwayblock.png", + "down_subwayblock.png", + "front_subwayblock.png", + "front_subwayblock.png", + "front_subwayblock.png", + "front_subwayblock.png" + }, + is_ground_content = true, + groups = {cracky = 3}, + drop = "trainblocks:subwayblock" +}) + +--sbahn block + +minetest.register_node("trainblocks:sbahnblock", { + description = "Sbahnblock", + light_source = 8, + tiles = { + "down_sbahnblock.png", + "down_sbahnblock.png", + "front_sbahnblock.png", + "front_sbahnblock.png", + "front_sbahnblock.png", + "front_sbahnblock.png" + }, + is_ground_content = true, + groups = {cracky = 3}, + drop = "trainblocks:sbahnblock" +}) + +--subway signs Line 1 to 10 + +--[[for count = 1, 10, 1 do +minetest.register_node("trainblocks:line" .. count, { + description = "Line " .. count, + drawtype = "nodebox", + + tiles = {"front_line" .. count .. ".png"}, + inventory_image = "inventory_line" .. count .. ".png", + light_source = 5, + groups = {cracky = 3}, + + paramtype2 = "facedir", + paramtype = 'light', + node_box = { + type = "fixed", + fixed = { + { -4/16, -4/16, 6/16, 4/16, 4/16, 8/16}, + }, + }, + +}) +end --]] + +--for bachwards-compatibility there has to be a signlike drawtype + +for count = 1, 10, 1 do + minetest.register_node("trainblocks:line" .. count, { + description = "Line ".. count, + tiles = {"front_line" .. count .. ".png"}, + drawtype = "nodebox", + paramtype2 = "wallmounted", + legacy_wallmounted = true, + paramtype=light, + light_source=12, + sunlight_propagates = true, + is_ground_content = false, + walkable = false, + + groups = {choppy = 2, attached_node = 1, flammable = 2, oddly_breakable_by_hand = 3}, + node_box = { + type = "wallmounted", + wall_top ={-0.5, -0.25, -0.25, -0.4375, 0.25, 0.25}, + wall_bottom = {-0.5, -0.25, -0.25, -0.4375, 0.25, 0.25}, + wall_side = {-0.5, -0.25, -0.25, -0.4375, 0.25, 0.25}, + + } + + }) + end + +--subway signs R and L + +minetest.register_node("trainblocks:subwaysignL", { + description = "Subway Sign Left", + tiles = { + "subway_sign3.png", + "subway_sign3.png", + "subway_sign3.png", + "subway_sign3.png", + "subway_sign2.png", + "subway_sign2.png^[transformFX", + }, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + { -8/16, -5/16, 6/16, 8/16, 5/16, 8/16}, + }, + }, + + + paramtype2 = "facedir", + paramtype = 'light', + light_source = 6, + is_ground_content = false, + groups = {cracky = 3}, +}) + +minetest.register_node("trainblocks:subwaysignR", { + description = "Subway Sign Right", + tiles = { + "subway_sign3.png", + "subway_sign3.png", + "subway_sign3.png", + "subway_sign3.png", + "subway_sign2.png", + "subway_sign2.png", + }, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + { -8/16, -5/16, 6/16, 8/16, 5/16, 8/16}, + }, + }, + + + paramtype2 = "facedir", + paramtype = 'light', + light_source = 6, + is_ground_content = false, + groups = {cracky = 3}, +}) + + +--subway signs R and L + +minetest.register_node("trainblocks:sbahnsignL", { + description = "SBahn Sign Left", + tiles = { + "sbahn_sign3.png", + "sbahn_sign3.png", + "sbahn_sign3.png", + "sbahn_sign3.png", + "sbahn_sign2l.png", + "sbahn_sign2l.png^[transformFX", + }, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + { -8/16, -5/16, 6/16, 8/16, 5/16, 8/16}, + }, + }, + + + paramtype2 = "facedir", + paramtype = 'light', + light_source = 6, + is_ground_content = false, + groups = {cracky = 3}, +}) + +minetest.register_node("trainblocks:sbahnsignR", { + description = "SBahn Sign Right", + tiles = { + "sbahn_sign3.png", + "sbahn_sign3.png", + "sbahn_sign3.png", + "sbahn_sign3.png", + "sbahn_sign2.png", + "sbahn_sign2.png", + }, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + { -8/16, -5/16, 6/16, 8/16, 5/16, 8/16}, + }, + }, + + + paramtype2 = "facedir", + paramtype = 'light', + light_source = 6, + is_ground_content = false, + groups = {cracky = 3}, +}) + + + +--station signs + +minetest.register_node("trainblocks:stationsignR", { + description = "Station Sign Right", + tiles = { + "station_sign3.png", + "station_sign3.png", + "station_sign3.png", + "station_sign3.png", + "station_sign2.png", + "station_sign2.png", + }, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + { -8/16, -5/16, 6/16, 8/16, 5/16, 8/16}, + }, + }, + + + paramtype2 = "facedir", + paramtype = 'light', + light_source = 6, + is_ground_content = false, + groups = {cracky = 3}, +}) + +minetest.register_node("trainblocks:stationsignL", { + description = "Station Sign Left", + tiles = { + "station_sign3.png", + "station_sign3.png", + "station_sign3.png", + "station_sign3.png", + "station_sign2.png", + "station_sign2.png^[transformFX", + }, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + { -8/16, -5/16, 6/16, 8/16, 5/16, 8/16}, + }, + }, + + + paramtype2 = "facedir", + paramtype = 'light', + light_source = 6, + is_ground_content = false, + groups = {cracky = 3}, +}) + +minetest.register_node("trainblocks:stationsign", { + description = "Station Sign", + tiles = { + "station_sign3.png", + "station_sign3.png", + "station_sign3.png", + "station_sign3.png", + "station_sign.png", + "station_sign.png", + }, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + { -8/16, -8/16, 6/16, 8/16, 8/16, 8/16}, + }, + }, + + + paramtype2 = "facedir", + paramtype = 'light', + light_source = 6, + is_ground_content = false, + groups = {cracky = 3}, +}) + + +--platform signs from 1 to 10 + +for count = 1, 10, 1 do +minetest.register_node("trainblocks:platformsign" .. count, { + description = "Platform Sign " .. count, + drawtype = "nodebox", + + tiles = {"front_platform" .. count .. ".png"}, + inventory_image = "inventory_platform" .. count .. ".png", + light_source = 5, + groups = {cracky = 3}, + + paramtype2 = "facedir", + paramtype = 'light', + + node_box = { + type = "fixed", + fixed = { + { -4/16, -4/16, 6/16, 4/16, 4/16, 8/16}, + }, + }, + +}) +end + + +--gabriel's mountain railway block + +minetest.register_node("trainblocks:mr", { + description = "Mountain Railway Block", + light_source = 8, + tiles = { + "down_mr.png", + "down_mr.png", + "front_mr.png", + "front_mr.png", + "front_mr.png", + "front_mr.png" + }, + is_ground_content = true, + groups = {cracky = 3}, + drop = "trainblocks:sbahnblock" +}) \ No newline at end of file diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..deef1a9 Binary files /dev/null and b/screenshot.png differ diff --git a/textures/down_mr.png b/textures/down_mr.png new file mode 100644 index 0000000..5966d3e Binary files /dev/null and b/textures/down_mr.png differ diff --git a/textures/down_sbahnblock.png b/textures/down_sbahnblock.png new file mode 100644 index 0000000..2e1187c Binary files /dev/null and b/textures/down_sbahnblock.png differ diff --git a/textures/down_subwayblock.png b/textures/down_subwayblock.png new file mode 100644 index 0000000..64e26ba Binary files /dev/null and b/textures/down_subwayblock.png differ diff --git a/textures/front_line1.png b/textures/front_line1.png new file mode 100644 index 0000000..df0421c Binary files /dev/null and b/textures/front_line1.png differ diff --git a/textures/front_line10.png b/textures/front_line10.png new file mode 100644 index 0000000..0fd9d1e Binary files /dev/null and b/textures/front_line10.png differ diff --git a/textures/front_line2.png b/textures/front_line2.png new file mode 100644 index 0000000..5522aa2 Binary files /dev/null and b/textures/front_line2.png differ diff --git a/textures/front_line3.png b/textures/front_line3.png new file mode 100644 index 0000000..6317744 Binary files /dev/null and b/textures/front_line3.png differ diff --git a/textures/front_line4.png b/textures/front_line4.png new file mode 100644 index 0000000..bd8390f Binary files /dev/null and b/textures/front_line4.png differ diff --git a/textures/front_line5.png b/textures/front_line5.png new file mode 100644 index 0000000..f7f257e Binary files /dev/null and b/textures/front_line5.png differ diff --git a/textures/front_line6.png b/textures/front_line6.png new file mode 100644 index 0000000..b67bf50 Binary files /dev/null and b/textures/front_line6.png differ diff --git a/textures/front_line7.png b/textures/front_line7.png new file mode 100644 index 0000000..b2feaf5 Binary files /dev/null and b/textures/front_line7.png differ diff --git a/textures/front_line8.png b/textures/front_line8.png new file mode 100644 index 0000000..995ebd8 Binary files /dev/null and b/textures/front_line8.png differ diff --git a/textures/front_line9.png b/textures/front_line9.png new file mode 100644 index 0000000..2851723 Binary files /dev/null and b/textures/front_line9.png differ diff --git a/textures/front_mr.png b/textures/front_mr.png new file mode 100644 index 0000000..58d4ba0 Binary files /dev/null and b/textures/front_mr.png differ diff --git a/textures/front_platform1.png b/textures/front_platform1.png new file mode 100644 index 0000000..4c92ac6 Binary files /dev/null and b/textures/front_platform1.png differ diff --git a/textures/front_platform10.png b/textures/front_platform10.png new file mode 100644 index 0000000..55bb94d Binary files /dev/null and b/textures/front_platform10.png differ diff --git a/textures/front_platform2.png b/textures/front_platform2.png new file mode 100644 index 0000000..ef76b7c Binary files /dev/null and b/textures/front_platform2.png differ diff --git a/textures/front_platform3.png b/textures/front_platform3.png new file mode 100644 index 0000000..8291817 Binary files /dev/null and b/textures/front_platform3.png differ diff --git a/textures/front_platform4.png b/textures/front_platform4.png new file mode 100644 index 0000000..77aded5 Binary files /dev/null and b/textures/front_platform4.png differ diff --git a/textures/front_platform5.png b/textures/front_platform5.png new file mode 100644 index 0000000..96a11b3 Binary files /dev/null and b/textures/front_platform5.png differ diff --git a/textures/front_platform6.png b/textures/front_platform6.png new file mode 100644 index 0000000..2850eb8 Binary files /dev/null and b/textures/front_platform6.png differ diff --git a/textures/front_platform7.png b/textures/front_platform7.png new file mode 100644 index 0000000..88f0ae2 Binary files /dev/null and b/textures/front_platform7.png differ diff --git a/textures/front_platform8.png b/textures/front_platform8.png new file mode 100644 index 0000000..7e415d9 Binary files /dev/null and b/textures/front_platform8.png differ diff --git a/textures/front_platform9.png b/textures/front_platform9.png new file mode 100644 index 0000000..f19e2dc Binary files /dev/null and b/textures/front_platform9.png differ diff --git a/textures/front_sbahnblock.png b/textures/front_sbahnblock.png new file mode 100644 index 0000000..11ea952 Binary files /dev/null and b/textures/front_sbahnblock.png differ diff --git a/textures/front_subwayblock.png b/textures/front_subwayblock.png new file mode 100644 index 0000000..b29000e Binary files /dev/null and b/textures/front_subwayblock.png differ diff --git a/textures/inventory_line1.png b/textures/inventory_line1.png new file mode 100644 index 0000000..bb36f51 Binary files /dev/null and b/textures/inventory_line1.png differ diff --git a/textures/inventory_line10.png b/textures/inventory_line10.png new file mode 100644 index 0000000..4cf23ab Binary files /dev/null and b/textures/inventory_line10.png differ diff --git a/textures/inventory_line2.png b/textures/inventory_line2.png new file mode 100644 index 0000000..e929d7e Binary files /dev/null and b/textures/inventory_line2.png differ diff --git a/textures/inventory_line3.png b/textures/inventory_line3.png new file mode 100644 index 0000000..1b9f075 Binary files /dev/null and b/textures/inventory_line3.png differ diff --git a/textures/inventory_line4.png b/textures/inventory_line4.png new file mode 100644 index 0000000..c96c65d Binary files /dev/null and b/textures/inventory_line4.png differ diff --git a/textures/inventory_line5.png b/textures/inventory_line5.png new file mode 100644 index 0000000..cd00ea7 Binary files /dev/null and b/textures/inventory_line5.png differ diff --git a/textures/inventory_line6.png b/textures/inventory_line6.png new file mode 100644 index 0000000..d182ec8 Binary files /dev/null and b/textures/inventory_line6.png differ diff --git a/textures/inventory_line7.png b/textures/inventory_line7.png new file mode 100644 index 0000000..0dd914b Binary files /dev/null and b/textures/inventory_line7.png differ diff --git a/textures/inventory_line8.png b/textures/inventory_line8.png new file mode 100644 index 0000000..1e55c81 Binary files /dev/null and b/textures/inventory_line8.png differ diff --git a/textures/inventory_line9.png b/textures/inventory_line9.png new file mode 100644 index 0000000..2f17ee3 Binary files /dev/null and b/textures/inventory_line9.png differ diff --git a/textures/inventory_platform1.png b/textures/inventory_platform1.png new file mode 100644 index 0000000..e9b5f37 Binary files /dev/null and b/textures/inventory_platform1.png differ diff --git a/textures/inventory_platform10.png b/textures/inventory_platform10.png new file mode 100644 index 0000000..a89fba0 Binary files /dev/null and b/textures/inventory_platform10.png differ diff --git a/textures/inventory_platform2.png b/textures/inventory_platform2.png new file mode 100644 index 0000000..8ee7315 Binary files /dev/null and b/textures/inventory_platform2.png differ diff --git a/textures/inventory_platform3.png b/textures/inventory_platform3.png new file mode 100644 index 0000000..c447ace Binary files /dev/null and b/textures/inventory_platform3.png differ diff --git a/textures/inventory_platform4.png b/textures/inventory_platform4.png new file mode 100644 index 0000000..72fc664 Binary files /dev/null and b/textures/inventory_platform4.png differ diff --git a/textures/inventory_platform5.png b/textures/inventory_platform5.png new file mode 100644 index 0000000..36d4148 Binary files /dev/null and b/textures/inventory_platform5.png differ diff --git a/textures/inventory_platform6.png b/textures/inventory_platform6.png new file mode 100644 index 0000000..cfc1e54 Binary files /dev/null and b/textures/inventory_platform6.png differ diff --git a/textures/inventory_platform7.png b/textures/inventory_platform7.png new file mode 100644 index 0000000..85fd675 Binary files /dev/null and b/textures/inventory_platform7.png differ diff --git a/textures/inventory_platform8.png b/textures/inventory_platform8.png new file mode 100644 index 0000000..da8f850 Binary files /dev/null and b/textures/inventory_platform8.png differ diff --git a/textures/inventory_platform9.png b/textures/inventory_platform9.png new file mode 100644 index 0000000..21bb299 Binary files /dev/null and b/textures/inventory_platform9.png differ diff --git a/textures/sbahn_sign2.png b/textures/sbahn_sign2.png new file mode 100644 index 0000000..ed96261 Binary files /dev/null and b/textures/sbahn_sign2.png differ diff --git a/textures/sbahn_sign2l.png b/textures/sbahn_sign2l.png new file mode 100644 index 0000000..ee99cf5 Binary files /dev/null and b/textures/sbahn_sign2l.png differ diff --git a/textures/sbahn_sign3.png b/textures/sbahn_sign3.png new file mode 100644 index 0000000..2031e27 Binary files /dev/null and b/textures/sbahn_sign3.png differ diff --git a/textures/station_sign.png b/textures/station_sign.png new file mode 100644 index 0000000..f2048af Binary files /dev/null and b/textures/station_sign.png differ diff --git a/textures/station_sign2.png b/textures/station_sign2.png new file mode 100644 index 0000000..3f2b558 Binary files /dev/null and b/textures/station_sign2.png differ diff --git a/textures/station_sign3.png b/textures/station_sign3.png new file mode 100644 index 0000000..cdfd200 Binary files /dev/null and b/textures/station_sign3.png differ diff --git a/textures/subway_sign2.png b/textures/subway_sign2.png new file mode 100644 index 0000000..e5521f3 Binary files /dev/null and b/textures/subway_sign2.png differ diff --git a/textures/subway_sign3.png b/textures/subway_sign3.png new file mode 100644 index 0000000..eff85f2 Binary files /dev/null and b/textures/subway_sign3.png differ