aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlockhead <jbis1337@hotmail.com>2020-07-08 02:03:09 +1000
committerGabriel PĂ©rez-Cerezo <gabriel@gpcf.eu>2020-07-10 22:14:39 +0200
commit3040c53413a5ddb7e0e84f02f85de7868510c889 (patch)
tree36d4a8411bad8d081a497b821401d2fa23270c45
parentad49854fed1ccd426db5ab43d6734856a6b0bc74 (diff)
downloadadvtrains-3040c53413a5ddb7e0e84f02f85de7868510c889.tar.gz
advtrains-3040c53413a5ddb7e0e84f02f85de7868510c889.tar.bz2
advtrains-3040c53413a5ddb7e0e84f02f85de7868510c889.zip
Move recipes to train_track and add crossing recipes
-rw-r--r--advtrains/crafting.lua36
-rw-r--r--advtrains_train_track/init.lua53
2 files changed, 54 insertions, 35 deletions
diff --git a/advtrains/crafting.lua b/advtrains/crafting.lua
index d7e7343..cb0813c 100644
--- a/advtrains/crafting.lua
+++ b/advtrains/crafting.lua
@@ -2,41 +2,7 @@
--crafting.lua
--registers crafting recipes
---tracks
-minetest.register_craft({
- output = 'advtrains:dtrack_placer 50',
- recipe = {
- {'default:steel_ingot', 'group:stick', 'default:steel_ingot'},
- {'default:steel_ingot', 'group:stick', 'default:steel_ingot'},
- {'default:steel_ingot', 'group:stick', 'default:steel_ingot'},
- },
-})
-minetest.register_craft({
- type = "shapeless",
- output = 'advtrains:dtrack_slopeplacer 2',
- recipe = {
- "advtrains:dtrack_placer",
- "advtrains:dtrack_placer",
- "default:gravel",
- },
-})
-
-minetest.register_craft({
- output = 'advtrains:dtrack_bumper_placer 2',
- recipe = {
- {'group:wood', 'dye:red'},
- {'default:steel_ingot', 'default:steel_ingot'},
- {'advtrains:dtrack_placer', 'advtrains:dtrack_placer'},
- },
-})
-minetest.register_craft({
- type="shapeless",
- output = 'advtrains:dtrack_detector_off_placer',
- recipe = {
- "advtrains:dtrack_placer",
- "mesecons:wire_00000000_off"
- },
-})
+--tracks: see advtrains_train_track
--signals
minetest.register_craft({
output = 'advtrains:retrosignal_off 2',
diff --git a/advtrains_train_track/init.lua b/advtrains_train_track/init.lua
index b646ed7..a14335f 100644
--- a/advtrains_train_track/init.lua
+++ b/advtrains_train_track/init.lua
@@ -12,6 +12,15 @@ advtrains.register_tracks("default", {
formats={},
}, advtrains.ap.t_30deg_flat)
+minetest.register_craft({
+ output = 'advtrains:dtrack_placer 50',
+ recipe = {
+ {'default:steel_ingot', 'group:stick', 'default:steel_ingot'},
+ {'default:steel_ingot', 'group:stick', 'default:steel_ingot'},
+ {'default:steel_ingot', 'group:stick', 'default:steel_ingot'},
+ },
+})
+
-- Diamond Crossings
-- perpendicular
advtrains.register_tracks("default", {
@@ -23,6 +32,15 @@ advtrains.register_tracks("default", {
description=attrans("Perpendicular Diamond Crossing Track"),
formats = {}
}, advtrains.ap.t_perpcrossing)
+
+minetest.register_craft({
+ output = 'advtrains:dtrack_xing_placer 3',
+ recipe = {
+ {'', 'advtrains:dtrack_placer', ''},
+ {'advtrains:dtrack_placer', 'advtrains:dtrack_placer', 'advtrains:dtrack_placer'},
+ {'', 'advtrains:dtrack_placer', ''}
+ }
+})
-- 45-90(
advtrains.register_tracks("default", {
nodename_prefix="advtrains:dtrack_xing4590",
@@ -33,6 +51,14 @@ advtrains.register_tracks("default", {
description=attrans("45/90 Degree Diamond Crossing Track"),
formats = {}
}, advtrains.ap.t_9045crossing)
+minetest.register_craft({
+ output = 'advtrains:dtrack_xing4590_placer 2',
+ recipe = {
+ {'advtrains:dtrack_placer', '', ''},
+ {'advtrains:dtrack_placer', 'advtrains:dtrack_placer', 'advtrains:dtrack_placer'},
+ {'', '', 'advtrains:dtrack_placer'}
+ }
+})
--slopes
advtrains.register_tracks("default", {
@@ -46,6 +72,17 @@ advtrains.register_tracks("default", {
formats={vst1={true, false, true}, vst2={true, false, true}, vst31={true}, vst32={true}, vst33={true}},
}, advtrains.ap.t_30deg_slope)
+minetest.register_craft({
+ type = "shapeless",
+ output = 'advtrains:dtrack_slopeplacer 2',
+ recipe = {
+ "advtrains:dtrack_placer",
+ "advtrains:dtrack_placer",
+ "default:gravel",
+ },
+})
+
+
--bumpers
advtrains.register_tracks("default", {
nodename_prefix="advtrains:dtrack_bumper",
@@ -57,6 +94,14 @@ advtrains.register_tracks("default", {
description=attrans("Bumper"),
formats={},
}, advtrains.ap.t_30deg_straightonly)
+minetest.register_craft({
+ output = 'advtrains:dtrack_bumper_placer 2',
+ recipe = {
+ {'group:wood', 'dye:red'},
+ {'default:steel_ingot', 'default:steel_ingot'},
+ {'advtrains:dtrack_placer', 'advtrains:dtrack_placer'},
+ },
+})
--legacy bumpers
for _,rot in ipairs({"", "_30", "_45", "_60"}) do
minetest.register_alias("advtrains:dtrack_bumper"..rot, "advtrains:dtrack_bumper_st"..rot)
@@ -221,6 +266,14 @@ if mesecon then
}
end
}, advtrains.ap.t_30deg_straightonly_noplacer)
+ minetest.register_craft({
+ type="shapeless",
+ output = 'advtrains:dtrack_detector_off_placer',
+ recipe = {
+ "advtrains:dtrack_placer",
+ "mesecons:wire_00000000_off"
+ },
+})
end
--TODO legacy
--I know lbms are better for this purpose