craft.lua 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. --CRAFTING
  2. -- Blocks
  3. minetest.register_craft({
  4. output = 'trainblocks:subwayblock',
  5. recipe = {
  6. {'', 'dye:blue', ''},
  7. {'dye:white', 'default:glass', 'dye:white'},
  8. {'', 'dye:blue', ''},
  9. }
  10. })
  11. minetest.register_craft({
  12. output = 'trainblocks:sbahnblock',
  13. recipe = {
  14. {'', 'dye:green', ''},
  15. {'dye:white', 'default:glass', 'dye:white'},
  16. {'', 'dye:green', ''},
  17. }
  18. })
  19. minetest.register_craft({
  20. output = 'trainblocks:station_block',
  21. recipe = {
  22. {'', 'dye:black', ''},
  23. {'dye:white', 'default:glass', 'dye:white'},
  24. {'', 'dye:black', ''},
  25. }
  26. })
  27. --Swap with modern blocks
  28. minetest.register_craft({
  29. type = 'shapeless',
  30. output = 'trainblocks:station_block_modern',
  31. recipe = {'trainblocks:station_block'}
  32. })
  33. minetest.register_craft({
  34. type = 'shapeless',
  35. recipe = {'trainblocks:station_block_modern'},
  36. output = 'trainblocks:station_block'
  37. })
  38. --lineblocks from 1 to 10
  39. local dyes1 = {"blue", "red", "violet", "green", "orange", "yellow", "grey", "magenta", "cyan", "black"}
  40. local dyes2 = {"white", "white", "white", "white", "white", "black", "white", "white", "white", "white"}
  41. for count = 1, 10, 1 do
  42. minetest.register_craft({
  43. output = "trainblocks:line" .. count .. " 4",
  44. recipe = {
  45. {'', "dye:" .. dyes1[count] , ''},
  46. {"dye:" .. dyes2[count], 'default:glass', ''},
  47. {'', '', ''},
  48. }
  49. })
  50. end
  51. -- Platform signs 0-10
  52. minetest.register_craft({
  53. output = "trainblocks:platformsign0",
  54. recipe = {
  55. {'dye:blue', 'default:glass', ''},
  56. {'', 'dye:white', ''},
  57. {'', '' ,''}
  58. }
  59. })
  60. minetest.register_craft({
  61. output = "trainblocks:platformsign1",
  62. recipe = {
  63. {'dye:blue', 'default:glass', 'dye:white'},
  64. {'', '', 'dye:white'},
  65. {'', '' ,'dye:white'}
  66. }
  67. })
  68. minetest.register_craft({
  69. output = "trainblocks:platformsign2",
  70. recipe = {
  71. {'dye:blue', 'default:glass', ''},
  72. {'dye:white', 'dye:white', ''},
  73. {'', '' ,''}
  74. }
  75. })
  76. minetest.register_craft({
  77. output = "trainblocks:platformsign3",
  78. recipe = {
  79. {'dye:blue', 'default:glass', ''},
  80. {'dye:white', 'dye:white', 'dye:white'},
  81. {'', '' ,''}
  82. }
  83. })
  84. minetest.register_craft({
  85. output = "trainblocks:platformsign4",
  86. recipe = {
  87. {'dye:blue', 'default:glass', ''},
  88. {'dye:white', 'dye:white', ''},
  89. {'dye:white', 'dye:white' ,''}
  90. }
  91. })
  92. minetest.register_craft({
  93. output = "trainblocks:platformsign5",
  94. recipe = {
  95. {'dye:blue', 'default:glass', ''},
  96. {'dye:white', 'dye:white', 'dye:white'},
  97. {'dye:white', 'dye:white' ,''}
  98. }
  99. })
  100. minetest.register_craft({
  101. output = "trainblocks:platformsign6",
  102. recipe = {
  103. {'dye:blue', 'default:glass', ''},
  104. {'dye:white', 'dye:white', 'dye:white'},
  105. {'dye:white', 'dye:white' ,'dye:white'}
  106. }
  107. })
  108. minetest.register_craft({
  109. output = "trainblocks:platformsign7",
  110. recipe = {
  111. {'dye:blue', 'default:glass', 'dye:white'},
  112. {'', '', 'dye:white'},
  113. {'', 'dye:white' ,''}
  114. }
  115. })
  116. minetest.register_craft({
  117. output = "trainblocks:platformsign8",
  118. recipe = {
  119. {'dye:blue', 'default:glass', 'dye:white'},
  120. {'dye:white', '', 'dye:white'},
  121. {'dye:white', 'dye:white' ,'dye:white'}
  122. }
  123. })
  124. minetest.register_craft({
  125. output = "trainblocks:platformsign9",
  126. recipe = {
  127. {'dye:blue', 'default:glass', 'dye:white'},
  128. {'', 'dye:white', 'dye:white'},
  129. {'', '' ,'dye:white'}
  130. }
  131. })
  132. minetest.register_craft({
  133. output = "trainblocks:platformsign10",
  134. recipe = {
  135. {'dye:blue', 'default:glass', ''},
  136. {'dye:white', '', ''},
  137. {'dye:white', '' ,'dye:white'}
  138. }
  139. })
  140. --subway direction signs
  141. minetest.register_craft({
  142. output = 'trainblocks:subwaysignL 2',
  143. recipe = {
  144. {'', '', ''},
  145. {'dye:white', 'default:glass', 'dye:blue'},
  146. {'', '', ''},
  147. }
  148. })
  149. minetest.register_craft({
  150. output = 'trainblocks:subwaysignR 2',
  151. recipe = {
  152. {'', '', ''},
  153. {'dye:blue', 'default:glass', 'dye:white'},
  154. {'', '', ''},
  155. }
  156. })
  157. --sbahn direction signs
  158. minetest.register_craft({
  159. output = 'trainblocks:sbahnsignL 2',
  160. recipe = {
  161. {'', '', ''},
  162. {'dye:white', 'default:glass', 'dye:green'},
  163. {'', '', ''},
  164. }
  165. })
  166. minetest.register_craft({
  167. output = 'trainblocks:sbahnsignR 2',
  168. recipe = {
  169. {'', '', ''},
  170. {'dye:white', 'default:glass', 'dye:green'},
  171. {'', '', ''},
  172. }
  173. })
  174. -- Station direction signs
  175. minetest.register_craft({
  176. output = 'trainblocks:stationsignL 2',
  177. recipe = {
  178. {'', '', ''},
  179. {'dye:white', 'default:glass', 'dye:black'},
  180. {'', '', ''}
  181. }
  182. })
  183. minetest.register_craft({
  184. output = 'trainblocks:stationsignR 2',
  185. recipe = {
  186. {'', '', ''},
  187. {'dye:black', 'default:glass', 'dye:white'},
  188. {'', '', ''}
  189. }
  190. })
  191. -- Switch betwen modern station direction signs and older style
  192. minetest.register_craft({
  193. type = "shapeless",
  194. output = 'trainblocks:stationsignR_modern',
  195. recipe = {'trainblocks:stationsignR'}
  196. })
  197. minetest.register_craft({
  198. type = "shapeless",
  199. output = 'trainblocks:stationsignL_modern',
  200. recipe = {'trainblocks:stationsignL'}
  201. })
  202. minetest.register_craft({
  203. type = "shapeless",
  204. recipe = {'trainblocks:stationsignR_modern'},
  205. output = 'trainblocks:stationsignR'
  206. })
  207. minetest.register_craft({
  208. type = "shapeless",
  209. recipe = {'trainblocks:stationsignL_modern'},
  210. output = 'trainblocks:stationsignL'
  211. })