joint.lua 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. -- get Boilerplate for Translations
  2. local S = cannabis.S
  3. local path = cannabis.path
  4. --[[minetest.register_craftitem("cannabis:joint_fumo_acceso", {
  5. description = S("Joint of hash lit"),
  6. inventory_image = "joint_joint_fac.png",
  7. stack_max = 1 ,
  8. on_use = function(pos,player,pointed_thing)
  9. local p = player:get_pos()
  10. minetest.add_particlespawner({
  11. amount = 600,
  12. time = 3,
  13. minpos = {x=p.x-2,y=p.y+1,z=p.z-1},
  14. maxpos = {x=p.x+2,y=p.y+15,z=p.z+2},
  15. minvel = {x=0.2, y=0.2, z=0.2},
  16. maxvel = {x=0.4, y=0.8, z=0.4},
  17. minacc = {x=-0.2,y=0,z=-0.2},
  18. maxacc = {x=0.2,y=0.1,z=0.2},
  19. minexptime = 6,
  20. maxexptime = 8,
  21. minsize = 10,
  22. maxsize = 12,
  23. collisiondetection = false,
  24. vertical = false,
  25. texture = "j_smoke.png",
  26. -- playername = player
  27. toggle_eyes(player:get_player_name(), 1)
  28. })
  29. minetest.sound_play("canapa_joint", {
  30. to_player = "",
  31. gain = 1.0,
  32. })
  33. after_use=minetest.item_eat(2)
  34. after_use =function(itemstack, user, pointed_thing)
  35. itemstack:take_item()
  36. return
  37. end
  38. end
  39. }) ]]
  40. --______________________________________________________________________________________________________________________________________________
  41. --| |
  42. --| CRAFT ITEM JOINT |
  43. --|_____________________________________________________________________________________________________________________________________________|
  44. --_______________________________________________________________________fumo spento___________________________________________________________________
  45. minetest.register_craftitem("cannabis:joint_fumo_spento", {
  46. description = S("Joint of hash unlit"),
  47. inventory_image = "joint_joint_fsp.png",
  48. })
  49. --_______________________________________________________________________erba verde spento_____________________________________________________________
  50. minetest.register_craftitem("cannabis:joint_erba_spento", {
  51. description = S("Joint of weed unlit"),
  52. inventory_image = "joint_joint_csp.png",
  53. })
  54. --_______________________________________________________________________erba rossa spento_____________________________________________________________
  55. minetest.register_craftitem("cannabis:joint_erba_rossa_spento", {
  56. description = S("Joint of red_weed unlit"),
  57. inventory_image = "joint_joint_cspr.png",
  58. })
  59. --_______________________________________________________________________erba ice spento_______________________________________________________________
  60. minetest.register_craftitem("cannabis:joint_erba_ice_spento", {
  61. description = S("Joint of ice_weed unlit"),
  62. inventory_image = "joint_joint_cspi.png",
  63. })
  64. --_______________________________________________________________________FUMO ACCESO___________________________________________________________________
  65. --[[ ___________________________________________________________________________________________________________________________________________________________
  66. | |
  67. | |
  68. | local item = ItemStack("my_mod:my_item") --aggiunge un item dopo l uso codice da mettere alla fine come il codice del sound |
  69. | player:get_inventory():add_item("main", item) |
  70. | |
  71. | |
  72. |___________________________________________________________________________________________________________________________________________________________|]]
  73. minetest.register_craftitem("cannabis:joint_fumo_acceso", {
  74. description = S("Joint of hash lit"),
  75. inventory_image = "joint_joint_fac.png",
  76. stack_max = 1,
  77. on_use = function(itemstack,player,pointed_thing)
  78. if itemstack:take_item() ~= nil then
  79. local p = player:get_pos()
  80. minetest.add_particlespawner({
  81. amount = 600,
  82. time = 3,
  83. minpos = {x=p.x-2,y=p.y+1,z=p.z-1},
  84. maxpos = {x=p.x+2,y=p.y+15,z=p.z+2},
  85. minvel = {x=0.2, y=0.2, z=0.2},
  86. maxvel = {x=0.4, y=0.8, z=0.4},
  87. minacc = {x=-0.2,y=0,z=-0.2},
  88. maxacc = {x=0.2,y=0.1,z=0.2},
  89. minexptime = 6,
  90. maxexptime = 8,
  91. minsize = 10,
  92. maxsize = 12,
  93. collisiondetection = false,
  94. vertical = false,
  95. texture = "j_smoke_f.png"
  96. })
  97. minetest.sound_play("canapa_joint", { to_player = "", gain = 1.0 })
  98. toggle_f_eyes(player:get_player_name(), 1)
  99. local new_stack = ItemStack("cannabis:joint_fumo_acceso_m")
  100. return new_stack
  101. end
  102. end
  103. })
  104. --_______________________________________________________________________FUMO ACCESO CONSUMATO_______________________________________________________
  105. minetest.register_craftitem("cannabis:joint_fumo_acceso_m", {
  106. description = S("Half Joint of hash lit"),
  107. inventory_image = "joint_joint_fac_m.png",
  108. stack_max = 1,
  109. on_use = function(itemstack,player,pointed_thing)
  110. if itemstack:take_item() ~= nil then
  111. local p = player:get_pos()
  112. minetest.add_particlespawner({
  113. amount = 500,
  114. time = 3,
  115. minpos = {x=p.x-2,y=p.y+1,z=p.z-1},
  116. maxpos = {x=p.x+2,y=p.y+15,z=p.z+2},
  117. minvel = {x=0.2, y=0.2, z=0.2},
  118. maxvel = {x=0.4, y=0.8, z=0.4},
  119. minacc = {x=-0.2,y=0,z=-0.2},
  120. maxacc = {x=0.2,y=0.1,z=0.2},
  121. minexptime = 6,
  122. maxexptime = 8,
  123. minsize = 10,
  124. maxsize = 12,
  125. collisiondetection = false,
  126. vertical = false,
  127. texture = "j_smoke_f.png"
  128. })
  129. minetest.sound_play("canapa_joint_f", { to_player = "", gain = 1.0 })
  130. toggle_f_eyes(player:get_player_name(), 1)
  131. return itemstack
  132. end
  133. end
  134. })
  135. --______________________________________________________________________ E. VERDE ACCESA_________________________________________________
  136. minetest.register_craftitem("cannabis:joint_erba_acceso", {
  137. description = S("Joint of weed lit"),
  138. inventory_image = "joint_joint_cac.png",
  139. stack_max = 1 ,
  140. -- post_effect_color = smokeCOLOR,
  141. on_use =function(itemstack,player,pointed_thing)
  142. if itemstack:take_item() ~= nil then
  143. local p = player:get_pos()
  144. minetest.add_particlespawner({
  145. amount = 600,
  146. time = 3,
  147. minpos = {x=p.x-2,y=p.y+1,z=p.z-1},
  148. maxpos = {x=p.x+2,y=p.y+15,z=p.z+2},
  149. minvel = {x=0.2, y=0.2, z=0.2},
  150. maxvel = {x=0.4, y=0.8, z=0.4},
  151. minacc = {x=-0.2,y=0,z=-0.2},
  152. maxacc = {x=0.2,y=0.1,z=0.2},
  153. minexptime = 6,
  154. maxexptime = 8,
  155. minsize = 10,
  156. maxsize = 12,
  157. collisiondetection = false,
  158. vertical = false,
  159. texture = "j_smoke_v.png",
  160. })
  161. minetest.sound_play("canapa_joint_v", { to_player = "", gain = 1.0 })
  162. toggle_v_eyes(player:get_player_name(), 1)
  163. local new_stack = ItemStack("cannabis:joint_erba_acceso_m") -- sostituisce un item con un altro item
  164. return new_stack
  165. end
  166. end
  167. })
  168. --_______________________________________________________________________E. VERDE CONSUMATA_______________________________________
  169. minetest.register_craftitem("cannabis:joint_erba_acceso_m", {
  170. description = S("Half Joint of weed lit"),
  171. inventory_image = "joint_joint_cac_m.png",
  172. stack_max = 1,
  173. on_use = function(itemstack,player,pointed_thing)
  174. if itemstack:take_item() ~= nil then
  175. local p = player:get_pos()
  176. minetest.add_particlespawner({
  177. amount = 500,
  178. time = 3,
  179. minpos = {x=p.x-2,y=p.y+1,z=p.z-1},
  180. maxpos = {x=p.x+2,y=p.y+15,z=p.z+2},
  181. minvel = {x=0.2, y=0.2, z=0.2},
  182. maxvel = {x=0.4, y=0.8, z=0.4},
  183. minacc = {x=-0.2,y=0,z=-0.2},
  184. maxacc = {x=0.2,y=0.1,z=0.2},
  185. minexptime = 6,
  186. maxexptime = 8,
  187. minsize = 10,
  188. maxsize = 12,
  189. collisiondetection = false,
  190. vertical = false,
  191. texture = "j_smoke_v.png"
  192. })
  193. minetest.sound_play("canapa_joint_v", { to_player = "", gain = 1.0 })
  194. toggle_v_eyes(player:get_player_name(), 1)
  195. return itemstack
  196. end
  197. end
  198. })
  199. --_______________________________________________________________________E. ROSSA______________________________________
  200. minetest.register_craftitem("cannabis:joint_erba_rossa_acceso", {
  201. description = S("Joint of red weed lit"),
  202. inventory_image = "joint_joint_cacr.png",
  203. stack_max = 1 ,
  204. on_use =function(itemstack,player,pointed_thing)
  205. if itemstack:take_item() ~= nil then
  206. local p = player:get_pos()
  207. minetest.add_particlespawner({
  208. amount = 600,
  209. time = 3,
  210. minpos = {x=p.x-2,y=p.y+1,z=p.z-1},
  211. maxpos = {x=p.x+2,y=p.y+15,z=p.z+2},
  212. minvel = {x=0.2, y=0.2, z=0.2},
  213. maxvel = {x=0.4, y=0.8, z=0.4},
  214. minacc = {x=-0.2,y=0,z=-0.2},
  215. maxacc = {x=0.2,y=0.1,z=0.2},
  216. minexptime = 6,
  217. maxexptime = 8,
  218. minsize = 10,
  219. maxsize = 12,
  220. collisiondetection = false,
  221. vertical = false,
  222. texture = "j_smoke_r.png",
  223. })
  224. minetest.sound_play("canapa_joint_r", { to_player = "", gain = 1.0 })
  225. toggle_r_eyes(player:get_player_name(), 1)
  226. local new_stack = ItemStack("cannabis:joint_erba_rossa_acceso_m") -- sostituisce un item con un altro item
  227. return new_stack
  228. end
  229. end
  230. })
  231. --_______________________________________________________________________E.ROSSA ACCESA CONSUMATA_______________________
  232. minetest.register_craftitem("cannabis:joint_erba_rossa_acceso_m", {
  233. description = S("Half Joint of red weed lit"),
  234. inventory_image = "joint_joint_cacr_m.png",
  235. stack_max = 1,
  236. on_use = function(itemstack,player,pointed_thing)
  237. if itemstack:take_item() ~= nil then
  238. local p = player:get_pos()
  239. minetest.add_particlespawner({
  240. amount = 500,
  241. time = 3,
  242. minpos = {x=p.x-2,y=p.y+1,z=p.z-1},
  243. maxpos = {x=p.x+2,y=p.y+15,z=p.z+2},
  244. minvel = {x=0.2, y=0.2, z=0.2},
  245. maxvel = {x=0.4, y=0.8, z=0.4},
  246. minacc = {x=-0.2,y=0,z=-0.2},
  247. maxacc = {x=0.2,y=0.1,z=0.2},
  248. minexptime = 6,
  249. maxexptime = 8,
  250. minsize = 10,
  251. maxsize = 12,
  252. collisiondetection = false,
  253. vertical = false,
  254. texture = "j_smoke_r.png"
  255. })
  256. minetest.sound_play("canapa_joint_r", { to_player = "", gain = 1.0 })
  257. toggle_r_eyes(player:get_player_name(), 1)
  258. return itemstack
  259. end
  260. end
  261. })
  262. --_______________________________________________________________________E. ICE____________________________________________
  263. minetest.register_craftitem("cannabis:joint_erba_ice_acceso", {
  264. description = S("Joint of ice_weed lit"),
  265. inventory_image = "joint_joint_caci.png",
  266. stack_max = 1 ,
  267. -- post_effect_color = smokeCOLOR,
  268. on_use =function(itemstack,player,pointed_thing)
  269. if itemstack:take_item() ~= nil then
  270. local p = player:get_pos()
  271. minetest.add_particlespawner({
  272. amount = 600,
  273. time = 3,
  274. minpos = {x=p.x-2,y=p.y+1,z=p.z-1},
  275. maxpos = {x=p.x+2,y=p.y+15,z=p.z+2},
  276. minvel = {x=0.2, y=0.2, z=0.2},
  277. maxvel = {x=0.4, y=0.8, z=0.4},
  278. minacc = {x=-0.2,y=0,z=-0.2},
  279. maxacc = {x=0.2,y=0.1,z=0.2},
  280. minexptime = 6,
  281. maxexptime = 8,
  282. minsize = 10,
  283. maxsize = 12,
  284. collisiondetection = false,
  285. vertical = false,
  286. texture = "j_smoke_i.png",
  287. })
  288. minetest.sound_play("canapa_joint_i", { to_player = "", gain = 1.0 })
  289. toggle_i_eyes(player:get_player_name(), 1)
  290. local new_stack = ItemStack("cannabis:joint_erba_ice_acceso_m") -- sostituisce un item con un altro item
  291. return new_stack
  292. end
  293. end
  294. })
  295. --_______________________________________________________________________E. ICE ACCESA CONSUMATA_______________________________
  296. minetest.register_craftitem("cannabis:joint_erba_ice_acceso_m", {
  297. description = S("Half Joint of ice_weed lit"),
  298. inventory_image = "joint_joint_caci_m.png",
  299. stack_max = 1,
  300. on_use = function(itemstack,player,pointed_thing)
  301. if itemstack:take_item() ~= nil then
  302. local p = player:get_pos()
  303. minetest.add_particlespawner({
  304. amount = 500,
  305. time = 3,
  306. minpos = {x=p.x-2,y=p.y+1,z=p.z-1},
  307. maxpos = {x=p.x+2,y=p.y+15,z=p.z+2},
  308. minvel = {x=0.2, y=0.2, z=0.2},
  309. maxvel = {x=0.4, y=0.8, z=0.4},
  310. minacc = {x=-0.2,y=0,z=-0.2},
  311. maxacc = {x=0.2,y=0.1,z=0.2},
  312. minexptime = 6,
  313. maxexptime = 8,
  314. minsize = 10,
  315. maxsize = 12,
  316. collisiondetection = false,
  317. vertical = false,
  318. texture = "j_smoke_i.png"
  319. })
  320. minetest.sound_play("canapa_joint_i", { to_player = "", gain = 1.0 })
  321. toggle_i_eyes(player:get_player_name(), 1)
  322. return itemstack
  323. end
  324. end
  325. })
  326. --______________________________________________________________________________________________________________________________________________
  327. --| |
  328. --| CRAFTITEM STAFF |
  329. --|_____________________________________________________________________________________________________________________________________________|
  330. --_______________________________________________________________________INFIORESCENZA VERDE TRITURATA____________________________________________
  331. minetest.register_craftitem("cannabis:joint_cima", {
  332. description = S("Flowering chopped"),
  333. inventory_image = "joint_cima_s.png",
  334. })
  335. --_______________________________________________________________________INFIORESCENZA ROSSA TRITURATA____________________________________________
  336. minetest.register_craftitem("cannabis:joint_cimar", {
  337. description = S("Red flowering chopped"),
  338. inventory_image = "joint_cima_sr.png",
  339. })
  340. --_______________________________________________________________________INFIORESCENZA ICE TRITURATA____________________________________________
  341. minetest.register_craftitem("cannabis:joint_cimai", {
  342. description = S("Ice flowering chopped"),
  343. inventory_image = "joint_cima_si.png",
  344. })
  345. --_______________________________________________________________________FUMO SQUAGLIATO______________________________________________________
  346. minetest.register_craftitem("cannabis:joint_fumo", {
  347. description = S("Hash melted"),
  348. inventory_image = "joint_fumo_s.png",
  349. })
  350. --_______________________________________________________________________CARTINE______________________________________________________________
  351. minetest.register_craftitem("cannabis:joint_cartina", {
  352. description = S("Rolling paper"),
  353. inventory_image = "joint_cartina.png",
  354. })
  355. --_______________________________________________________________________CARTINA DA ARROTOLARE CON CIMA VERDE E FOGLIE__________________________
  356. minetest.register_craftitem("cannabis:joint_cartina_cima", {
  357. description = S("Rolling paper with hemp leaves and flowering chopped "),
  358. inventory_image = "joint_cartina_cima.png",
  359. })
  360. --_______________________________________________________________________CARTINA DA ARROTOLARE CON CIMA ROSSA E FOGLIE__________________________
  361. minetest.register_craftitem("cannabis:joint_cartina_cimar", {
  362. description = S("Rolling paper with hemp leaves and red flowering chopped "),
  363. inventory_image = "joint_cartina_cimar.png",
  364. })
  365. --_______________________________________________________________________CARTINA DA ARROTOLARE CON CIMA ICE E FOGLIE__________________________
  366. minetest.register_craftitem("cannabis:joint_cartina_cimai", {
  367. description = S("Rolling paper with hemp leaves and ice flowering chopped "),
  368. inventory_image = "joint_cartina_cimai.png",
  369. })
  370. --_______________________________________________________________________CARTINA DA ARROTOLARE CON FUMO E FOGLIE_________________________________
  371. minetest.register_craftitem("cannabis:joint_cartina_fumo", {
  372. description = S("Rolling paper with hemp leaves and melted hash"),
  373. inventory_image = "joint_cartina_fumo.png",
  374. })
  375. --_______________________________________________________________________SCATOLA DI FILTRI________________________________________________________
  376. minetest.register_craftitem("cannabis:joint_filter_box", {
  377. description = S("Filters pack"),
  378. inventory_image = "joint_filter_p.png",
  379. })
  380. --_______________________________________________________________________FILTRI ARROTOLATI________________________________________________________
  381. minetest.register_craftitem("cannabis:joint_filter", {
  382. description = S("Filter"),
  383. inventory_image = "joint_filter.png",
  384. })
  385. --_______________________________________________________________________ACCENDINO_________________________________________________________________
  386. minetest.register_craftitem("cannabis:joint_lighter", {
  387. description = S("Lighter"),
  388. inventory_image = "joint_accendino.png",
  389. })
  390. --______________________________________________________________________________________________________________________________________________
  391. --| |
  392. --| CRAFT JOINT |
  393. --|_____________________________________________________________________________________________________________________________________________|
  394. --_______________________________________________________________________FUMO SPENTO_________________
  395. minetest.register_craft({
  396. output = "cannabis:joint_fumo_spento ",
  397. recipe = {
  398. {"","",""},
  399. {"","",""},
  400. {"cannabis:joint_filter","cannabis:joint_cartina_fumo",""},
  401. }
  402. })
  403. --_______________________________________________________________________FUMO ACCESO_________________
  404. minetest.register_craft({
  405. output = "cannabis:joint_fumo_acceso ",
  406. recipe = {
  407. --{"","",""},
  408. {"cannabis:joint_fumo_spento"},
  409. {"cannabis:joint_lighter"},
  410. }
  411. })
  412. --_______________________________________________________________________ERBA VERDE SPENTO___________
  413. minetest.register_craft({
  414. output = "cannabis:joint_erba_spento ",
  415. recipe = {
  416. {"","",""},
  417. {"","",""},
  418. {"cannabis:joint_filter","cannabis:joint_cartina_cima",""},
  419. }
  420. })
  421. --_______________________________________________________________________ERBA VERDE ACCESO___________
  422. minetest.register_craft({
  423. output = "cannabis:joint_erba_acceso ",
  424. recipe = {
  425. --{"","",""},
  426. {"cannabis:joint_erba_spento"},
  427. {"cannabis:joint_lighter"},
  428. }
  429. })
  430. --_______________________________________________________________________ERBA ROSSA SPENTO___________
  431. minetest.register_craft({
  432. output = "cannabis:joint_erba_rossa_spento ",
  433. recipe = {
  434. {"","",""},
  435. {"","",""},
  436. {"cannabis:joint_filter","cannabis:joint_cartina_cimar",""},
  437. }
  438. })
  439. --_______________________________________________________________________ERBA ROSSA ACCESO___________
  440. minetest.register_craft({
  441. output = "cannabis:joint_erba_rossa_acceso ",
  442. recipe = {
  443. --{"","",""},
  444. {"cannabis:joint_erba_rossa_spento"},
  445. {"cannabis:joint_lighter"},
  446. }
  447. })
  448. --_______________________________________________________________________ERBA ICE SPENTO___________
  449. minetest.register_craft({
  450. output = "cannabis:joint_erba_ice_spento ",
  451. recipe = {
  452. {"","",""},
  453. {"","",""},
  454. {"cannabis:joint_filter","cannabis:joint_cartina_cimai",""},
  455. }
  456. })
  457. --_______________________________________________________________________ERBA ICE ACCESO___________
  458. minetest.register_craft({
  459. output = "cannabis:joint_erba_ice_acceso ",
  460. recipe = {
  461. --{"","",""},
  462. {"cannabis:joint_erba_ice_spento"},
  463. {"cannabis:joint_lighter"},
  464. }
  465. })
  466. --______________________________________________________________________________________________________________________________________________
  467. --| |
  468. --| CRAFT JOINT STAFF |
  469. --|_____________________________________________________________________________________________________________________________________________|
  470. --_________________________________________________________________________________________
  471. --_______________________________________________________________________SQUAGLIARE FUMO______
  472. minetest.register_craft({
  473. output = "cannabis:joint_fumo 3 ",
  474. recipe = {
  475. {"","",""},
  476. {"","cannabis:canapa_raisin",""},
  477. {"","cannabis:joint_lighter",""},
  478. }
  479. })
  480. --_______________________________________________________________________MESCOLA CIMA_______________________
  481. local Color_list = {
  482. { "canapa_red_flower", "canapa_red_leaves"},
  483. { "canapa_flower", "canapa_leaves"},
  484. { "canapa_ice_flower", "canapa_ice_leaves"},
  485. }
  486. for i in ipairs(Color_list) do
  487. local flowers = Color_list[i][1]
  488. local leaves = Color_list[i][2]
  489. --_______________________________________________________________________MESCOLA CIMA VERDE CON FOGLIE_______________________
  490. minetest.register_craft({
  491. output = "cannabis:joint_cima 3 ",
  492. recipe = {
  493. {"","cannabis:"..leaves.."",""},
  494. {"","cannabis:canapa_flower",""},
  495. {"","cannabis:"..leaves.."",""},
  496. }
  497. })
  498. --_______________________________________________________________________MESCOLA CIMA ROSSA CON FOGLIE_______________________
  499. minetest.register_craft({
  500. output = "cannabis:joint_cimar 3 ",
  501. recipe = {
  502. {"","cannabis:"..leaves.."",""},
  503. {"","cannabis:canapa_red_flower",""},
  504. {"","cannabis:"..leaves.."",""},
  505. }
  506. })
  507. --_______________________________________________________________________MESCOLA CIMA ICE CON FOGLIE_______________________
  508. minetest.register_craft({
  509. output = "cannabis:joint_cimai 3 ",
  510. recipe = {
  511. {"","cannabis:"..leaves.."",""},
  512. {"","cannabis:canapa_ice_flower",""},
  513. {"","cannabis:"..leaves.."",""},
  514. }
  515. })
  516. --____________________________________________________________________________________________________
  517. --______________________________________________________________________________
  518. --craft
  519. --____________________________________________________________________accendino__________
  520. minetest.register_craft({
  521. output = "cannabis:joint_lighter 5 ",
  522. recipe = {
  523. {"default:steel_ingot","fire:flint_and_steel","cannabis:canapa_plastic"},
  524. {"cannabis:canapa_plastic","cannabis:canapa_fuel","cannabis:canapa_plastic"},
  525. {"cannabis:canapa_plastic","cannabis:canapa_plastic","cannabis:canapa_plastic"},
  526. }
  527. })
  528. --_______________________________________________________________________cartina__________________
  529. minetest.register_craft({
  530. output = "cannabis:joint_cartina 10 ",
  531. recipe = {
  532. {"","",""},
  533. {"","",""},
  534. {"cannabis:canapa_paper","cannabis:canapa_paper","cannabis:canapa_paper"},
  535. }
  536. })
  537. --_______________________________________________________________________mettere la mescola d erba verde nella cartina___________________________________
  538. minetest.register_craft({
  539. output = "cannabis:joint_cartina_cima ",
  540. recipe = {
  541. {"","",""},
  542. {"","cannabis:joint_cima","cannabis:"..leaves..""},
  543. {"","cannabis:joint_cartina",""},
  544. }
  545. })
  546. --_______________________________________________________________________mettere la mescola d erba rossa nella cartina___________________________________
  547. minetest.register_craft({
  548. output = "cannabis:joint_cartina_cimar ",
  549. recipe = {
  550. {"","",""},
  551. {"","cannabis:joint_cimar","cannabis:"..leaves..""},
  552. {"","cannabis:joint_cartina",""},
  553. }
  554. })
  555. --_______________________________________________________________________mettere la mescola d erba ice nella cartina___________________________________
  556. minetest.register_craft({
  557. output = "cannabis:joint_cartina_cimai ",
  558. recipe = {
  559. {"","",""},
  560. {"","cannabis:joint_cimai","cannabis:"..leaves..""},
  561. {"","cannabis:joint_cartina",""},
  562. }
  563. })
  564. --________________________________________________________________________mettere la mescola fumo foglie nella cartina fare table per usare tutte le foglie
  565. minetest.register_craft({
  566. output = "cannabis:joint_cartina_fumo ",
  567. recipe = {
  568. {"","",""},
  569. {"","cannabis:joint_fumo","cannabis:"..leaves..""},
  570. {"","cannabis:joint_cartina",""},
  571. }
  572. })
  573. --________________________________________________________________________box filtri___________________________________________________________________________
  574. minetest.register_craft({
  575. output = "cannabis:joint_filter_box ",
  576. recipe = {
  577. {"","",""},
  578. {"cannabis:canapa_paper","cannabis:canapa_paper",""},
  579. {"cannabis:canapa_paper","cannabis:canapa_paper",""},
  580. }
  581. })
  582. --__________________________________________________________________________arrotolare filtri__________________________________________________________________
  583. minetest.register_craft({
  584. type = "shapeless",
  585. output = "cannabis:joint_filter 10 ",
  586. recipe = {"cannabis:joint_filter_box"}
  587. })
  588. --_______________________________________________________________________accendino con torch________________________________________________________________
  589. minetest.register_craft({
  590. output = "cannabis:joint_lighter 3 ",
  591. recipe = {
  592. {"default:steel_ingot","default:torch","cannabis:canapa_plastic"},
  593. {"cannabis:canapa_plastic","cannabis:canapa_fuel","cannabis:canapa_plastic"},
  594. {"cannabis:canapa_plastic","cannabis:canapa_plastic","cannabis:canapa_plastic"},
  595. }
  596. })
  597. -----------------------------------------
  598. --local smokeCOLOR = {
  599. -- green = { a=64, r=1, g=255, b=1 } ,
  600. -- blue = { a=64, r=1, g=1, b=25 },
  601. --}
  602. -- Iterate through waters.
  603. -- Color wll be the key (green or blue)
  604. -- underwatercolor will be the value (one of the tables above)
  605. --for color, smokecolor in pairs(smokeCOLOR) do
  606. -- water
  607. --end
  608. --________________________________________________________________________accendino con acciarino vedere flint e still acciarino per dare stesse funzioni ad accendino
  609. if minetest.get_modpath("fire") then
  610. minetest.register_craft({
  611. output = "cannabis:joint_lighter 10 ",
  612. recipe = {
  613. {"default:steel_ingot","fire:flint_and_steel","cannabis:canapa_plastic"},
  614. {"cannabis:canapa_plastic","cannabis:canapa_fuel","cannabis:canapa_plastic"},
  615. {"cannabis:canapa_plastic","cannabis:canapa_plastic","cannabis:canapa_plastic"},
  616. }
  617. })
  618. end
  619. end