fixed lost textures
added red hemp
added joint
unnecessary files removed
added craft for ropes mod
master
IIIullaIII 2020-05-03 21:49:55 +02:00
parent 5c1c007d7a
commit 12cc800279
150 changed files with 1094 additions and 779 deletions

41
.gitignore vendored
View File

@ -1,41 +0,0 @@
# Compiled Lua sources
luac.out
# luarocks build files
*.src.rock
*.zip
*.tar.gz
# Object files
*.o
*.os
*.ko
*.obj
*.elf
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
*.def
*.exp
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

21
LICENSE
View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2017 IIIullaIII
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

44
LICENSE.lua Normal file
View File

@ -0,0 +1,44 @@
Copyright (C) "BY ULLA"
IT
PUOI UTILIZZARE QUESTA MOD IN MINETEST,
PUOI INTEGRARLA IN ALTRE MOD PER MINETEST
O UTILIZZARNE SINGOLE PARTI
QUESTA MOD HA SOLO UNA RESTRIZIONE :
OGNI PARTE ORIGINALE CREATA DA ME (TEXTURES MODELLI ETC..)
NON PUÒ ESSERE UTILIZZATA PER SCOPI PUBBLICITARI O ALTRI GIOCHI ESCLUDENDO LA MIA APPROVAZIONE IN OGNI CASO VA INDICATO IL MIO NOME >ANDREA DI PIETRO ULLA <
PER QUANTO RIGUARDA IL CODICE SCRITTO, LE LICENZE SONO QUELLE DI MINETEST DEFAULT
ANCHE PER IL CODICE AGGIUNTO O MODIFICATO ,
IL CODICE DELLE ARMATURE DIPENDONO DALLA LICENZA DI 3D_ARMOR
3D Armor - Visible Player Armor
===============================
License Source Code: Copyright (C) 2013-2018 Stuart Jones - LGPL v2.1
Armor Textures: Copyright (C) 2017-2018 davidthecreator - CC-BY-SA 3.0
Special credit to Jordach and MirceaKitsune for providing the default 3d character model.
QUESTA LICENZA DEVE ESSERE INSERITA IN OGNI PROGETTO CHE USA LA MOD O PARTE DI ESSA .
QUESTA MOD PUÒ ESSERE MIGLIORATA , SENZA ESCLUDERE IL MIO NOME PER AVERE IDEATO E CREATO LA MOD
PUOI UTILIZZARLA NEI TUOI VIDEO PER MINETEST
EN
YOU CAN USE THIS MOD IN MINETEST,
YOU CAN INTEGRATE IT IN OTHER MOD FOR MINETEST
OR USE SINGLE PARTS
THIS MOD HAS A RESTRICTION ONLY:
EVERY ORIGINAL PART MADE BY ME (TEXTURES MODELS ETC ..)
IT CAN NOT BE USED FOR ADVERTISING PURPOSES OR OTHER GAMES BY EXCLUDING MY APPROVAL IN ANY CASE IT SHOWS MY NAME> ANDREA DI PIETRO ULLA <
WITH REGARD TO THE WRITTEN CODE, THE LICENSES ARE THOSE OF MINETEST DEFAULT
ALSO FOR THE ADDED OR MODIFIED CODE,
THE ARMORIES CODE DEPENDS ON THE 3D_HARMOR LICENSE :
(3D Armor - Visible Player Armor
===============================
License Source Code: Copyright (C) 2013-2018 Stuart Jones - LGPL v2.1
Armor Textures: Copyright (C) 2017-2018 davidthecreator - CC-BY-SA 3.0
Special credit to Jordach and MirceaKitsune for providing the default 3d character model.)
THIS LICENSE MUST BE INSERTED IN ANY PROJECT WHICH USES MOD OR PART OF IT.
THIS MOD CAN BE IMPROVED, WITHOUT EXCLUDING MY NAME TO HAVE IDEATED AND CREATED MOD
YOU CAN USE IT IN YOUR VIDEOS FOR MINETEST

View File

@ -1,200 +0,0 @@
CANNABIS_MOD"BY ULLA"
THIS MODE IS CREATED FOR MINETEST FROM
ULLA
USE PERSONAL CODE (CC BY-SA 3.0 IT)
AND MODIFIED CODE REQUIRED BY OTHER MODS WHICH:
3d_armor_ modpack
MINETEST default
FOR THESE MODS YOU MUST VISIT ORIGINAL LICENSES OF WHICH:
3D Armor - Visible Player Armor
===============================
License Source Code: Copyright (C) 2013-2017 Stuart Jones - LGPL v2.1
Armor Textures: Copyright (C) 2013-2017 Ryan Jones - CC-BY-SA 3.0
Special credit to Jordach and MirceaKitsune for providing the default 3d character model.
MINETEST DEFAULT LICENSE
License of source code
----------------------
GNU Lesser General Public License, version 2.1
Copyright (C) 2011-2016 celeron55, Perttu Ahola <celeron55@gmail.com>
Copyright (C) 2011-2016 Various Minetest developers and contributors
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:
https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
Licenses of media (textures, models and sounds)
-----------------------------------------------
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
Copyright (C) 2010-2016:
celeron55, Perttu Ahola <celeron55@gmail.com>
Cisoun
G4JC
VanessaE
RealBadAngel
Calinou
MirceaKitsune
Jordach
PilzAdam
jojoa1997
InfinityProject
Splizard
Zeg9
paramat
BlockMen
sofar
Neuromancer
Gambit
asl97
KevDoy
Mito551
GreenXenith
kaeza
kilbith
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
ShareAlike — If you remix, transform, or build upon the material, you must distribute
your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by-sa/3.0/
-----------------------
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
Copyright (C) 2014-2016 brunob.santos
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
ShareAlike — If you remix, transform, or build upon the material, you must distribute
your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by-sa/4.0/
-----------------------
Attribution-ShareAlike 2.0 Generic (CC BY-SA 2.0)
Copyright (C) 2014-2016 Neuromancer
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
ShareAlike — If you remix, transform, or build upon the material, you must distribute
your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by-sa/2.0/
-----------------------
Attribution 3.0 Unported (CC BY 3.0)
Copyright (C) 2009 cmusounddesign
Copyright (C) 2010 Tomlija
Copyright (C) 2010 lsprice
Copyright (C) 2014 sonictechtonic
Copyright (C) 2015 yadronoff
Copyright (C) 2007 HerbertBoland
Copyright (C) 2006 AGFX
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by/3.0/

View File

@ -1,2 +1 @@
# CANNABIS_MOD
THE HEMP MOD
# cannabis

View File

@ -1,7 +0,0 @@
rename the mod to:
cannabis
rinominare la mod in
cannabis

188
armor.lua
View File

@ -1,41 +1,42 @@
local S = cannabis.S
--armor
--armor
if minetest.get_modpath("cannabis") then
local stats = {
fibra = { name="fibra", armor=1.8, heal=10, use=650 },
tessuto= { name="tessuto", armor=2.5, heal=8, use=200 },
foglie = { name="foglie", armor=2.7, heal=10, use=100 },
high = { name="high_performance", armor=2.7, heal=10, use=75 },
fibra = { name="fibra", armor=3.8, heal=28, use=100 },
tessuto= { name="tessuto", armor=2.0, heal=18, use=50 },
foglie = { name="foglie", armor=2.7, heal=8, use=10 },
high = { name="high_performance", armor=3.9, heal=38, use=1 },
adminh = { name="adminh", armor=100, heal=100, use=100 ,armor_water=1,not_in_creative_inventory=0},
}
local mats = {
fibra="cannabis:fibra_ingot",
tessuto="cannabis:tessuto_ingot",
foglie="cannabis:foglie_ingot",
high="cannabis:high_performance_ingot",
adminh="cannabis:adminh_block",
}
for k, v in pairs(stats) do
minetest.register_tool("cannabis:helmet_"..k, {
description = v.name..S(" Helmet"),
description = v.name.." Helmet",
inventory_image = "cannabis_armor_inv_helmet_"..k..".png",
groups = {armor_head=math.floor(5*v.armor), armor_heal=v.heal, armor_use=v.use},
wear = 0,
})
minetest.register_tool("cannabis:chestplate_"..k, {
description = v.name..S(" Chestplate"),
description = v.name.." Chestplate",
inventory_image = "cannabis_armor_inv_chestplate_"..k..".png",
groups = {armor_torso=math.floor(8*v.armor), armor_heal=v.heal, armor_use=v.use},
wear = 0,
})
minetest.register_tool("cannabis:leggings_"..k, {
description = v.name..S(" Leggings"),
description = v.name.." Leggings",
inventory_image = "cannabis_armor_inv_leggings_"..k..".png",
groups = {armor_legs=math.floor(7*v.armor), armor_heal=v.heal, armor_use=v.use},
wear = 0,
})
minetest.register_tool("cannabis:boots_"..k, {
description = v.name..S(" Boots"),
description = v.name.." Boots",
inventory_image = "cannabis_armor_inv_boots_"..k..".png",
groups = {armor_feet=math.floor(4*v.armor), armor_heal=v.heal, armor_use=v.use},
wear = 0,
@ -78,7 +79,7 @@ local S = cannabis.S
if minetest.get_modpath("shields") then
for k, v in pairs(stats) do
minetest.register_tool("cannabis:shield_"..k, {
description = v.name..S(" Hemp Shield"),
description = v.name.." hemp Shield",
inventory_image = "cannabis_armor_inv_shield_"..k..".png",
groups = {armor_shield=math.floor(5*v.armor), armor_heal=v.heal, armor_use=v.use},
wear = 0,
@ -95,166 +96,3 @@ local S = cannabis.S
end
end
end
minetest.register_craftitem("cannabis:mixed_hr_ingot", {
description = S("Mixed HR Ingot"),
inventory_image = "cannabis_mixed_hr_ingot.png",
})
minetest.register_craftitem(":cannabis:fibra_ingot", {
description = S("Fiber Ingot"),
inventory_image = "cannabis_fibra_ingot.png",
})
minetest.register_craftitem(":cannabis:foglie_ingot", {
description = S("Sheet Ingot"),
inventory_image = "cannabis_foglie_ingot.png",
})
minetest.register_craftitem("cannabis:high_performance_ingot", {
description = S("High Performance Ingot"),
inventory_image = "cannabis_high_performance_ingot.png",
})
minetest.register_craftitem(":cannabis:tessuto_ingot", {
description = S("Textil Ingot"),
inventory_image = "cannabis_tessuto_ingot.png",
})
local function for_each_registered_item(action)
local already_reg = {}
for k, _ in pairs(minetest.registered_items) do
table.insert(already_reg, k)
end
local really_register_craftitem = minetest.register_craftitem
minetest.register_craftitem = function(name, def)
really_register_craftitem(name, def)
action(string.gsub(name, "^:", ""))
end
local really_register_tool = minetest.register_tool
minetest.register_tool = function(name, def)
really_register_tool(name, def)
action(string.gsub(name, "^:", ""))
end
local really_register_node = minetest.register_node
minetest.register_node = function(name, def)
really_register_node(name, def)
action(string.gsub(name, "^:", ""))
end
for _, name in ipairs(already_reg) do
action(name)
end
end
local function register_block(block, ingot)
minetest.register_craft({
output = block,
recipe = {
{ingot, ingot, ingot},
{ingot, ingot, ingot},
{ingot, ingot, ingot},
}
})
minetest.register_craft({
output = ingot.." 9",
recipe = {
{block}
}
})
end
register_block("cannabis:cannabis_fibra_block", "cannabis:fibra_ingot")
register_block("cannabis:cannabis_high_performance_block", "cannabis:high_performance_ingot")
register_block("cannabis:cannabis_tessuto_block", "cannabis:tessuto_ingot")
register_block("cannabis:cannabis_foglie_block", "cannabis:foglie_ingot")
minetest.register_node("cannabis:cannabis_foglie_block", {
description = S("Sheet Block"),
tiles = { "cannabis_foglie_block.png" },
is_ground_content = true,
groups = {cracky=1, level=2},
sounds = "cannabis:cannabis_canapa_s3"
})
minetest.register_node("cannabis:cannabis_tessuto_block", {
description = S("Textil Block"),
tiles = { "cannabis_tessuto_block.png" },
is_ground_content = true,
groups = {cracky=1, level=2},
sounds = "cannabis_canapa_s3"
})
--register node
minetest.register_node("cannabis:hp_block_canapa",
{
description = S("High Performance Block Canapa"),
tiles = {"hp_block_canapa.png"},
is_ground_content = false,
groups = {choppy = 30, oddly_breakable_by_hand = 1, flammable = 3, wood = 1},
sounds = "cannabis:cannabis_canapa_s2",
})
minetest.register_node("cannabis:cannabis_high_performance_block", {
description = S("High Performance Block"),
tiles = { "cannabis_high_performance_block.png" },
is_ground_content = true,
groups = {cracky=1, level=2},
sounds = "cannabis_canapa_s3"
})
minetest.register_node("cannabis:cannabis_fibra_block", {
description = S("Fiber Block"),
tiles = { "cannabis_fibra_block.png" },
is_ground_content = true,
groups = {cracky=1, level=2},
sounds = "cannabis_canapa_s3"
})
minetest.register_craft({
type = 'cooking',
recipe = "cannabis:canapa_fiber",
output = "cannabis:fibra_ingot",
})
minetest.register_craft({
type = 'cooking',
recipe = "cannabis:canapa_leaves",
output = "cannabis:foglie_ingot",
})
minetest.register_craft({
type = 'cooking',
recipe = "cannabis:canapa_paper",
output = "cannabis:tessuto_ingot",
})
minetest.register_craft({
type = 'cooking',
recipe = "cannabis:canapa_plastic",
cooktime = 2,
output = "cannabis:high_performance_ingot",
})
local function for_each_registered_item(action)
local already_reg = {}
for k, _ in pairs(minetest.registered_items) do
table.insert(already_reg, k)
end
local really_register_craftitem = minetest.register_craftitem
minetest.register_craftitem = function(name, def)
really_register_craftitem(name, def)
action(string.gsub(name, "^:", ""))
end
local really_register_tool = minetest.register_tool
minetest.register_tool = function(name, def)
really_register_tool(name, def)
action(string.gsub(name, "^:", ""))
end
local really_register_node = minetest.register_node
minetest.register_node = function(name, def)
really_register_node(name, def)
action(string.gsub(name, "^:", ""))
end
for _, name in ipairs(already_reg) do
action(name)
end
end

View File

@ -1,10 +1,5 @@
minetest.register_alias("canapa", "cannabis:canapa")
--nodes
local S = cannabis.S
minetest.register_node("cannabis:canapa", {
description = S("Hemp"),
description = "Canapa",
drawtype = "plantlike",
tiles = {"cannabis_canapa.png"},
inventory_image = "cannabis_canapa.png",
@ -16,76 +11,29 @@ minetest.register_node("cannabis:canapa", {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
},
groups = {snappy=3,flammable=2},
sounds = default.node_sound_leaves_defaults(),
groups = {snappy = 3, flammable = 2},
sounds = "cannabis_canapa_s",
drop = {
max_items = 2,
max_items = 3,
items = {
{items = {"cannabis:canapa"}, rarity = 1 },
{items = {"cannabis:canapa_leaves"}, rarity = 1 },
{items = {"cannabis:canapa_seed"}, rarity = 1 },
}
},
after_dig_node = function(pos, node, metadata, digger)
default.dig_up(pos, node, digger)
end,
})
--function
-- Papyrus
-- canapa mapgen
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = -0.3,
scale = 0.7,
spread = {x = 50, y = 50, z = 50},
seed = 454,
octaves = 3,
persist = 0.7
},
y_min = 1,
y_max = 1,
decoration = "cannabis:canapa",
height = 2,
height_max = 6,
spawn_by = "default:water_source",
num_spawn_by = 1,
})
--mapgen cannabis
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt", "default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = -0.3,
scale = 0.7,
spread = {x=100, y=100, z=100},
seed = 354,
octaves = 3,
persist = 0.7
},
biomes = {"savanna_shore"},
y_min = 1,
y_max = 6,
schematic = minetest.get_modpath("cannabis").."/schematics/canapa.mts",
})
-- canapa grow
function minetest.grow_canapa(pos, node)
function minetest.grow_canapa(pos, node)
pos.y = pos.y - 1
local name = minetest.get_node(pos).name
if name ~= "default:dirt_with_grass" and name ~= "default:dirt" then
return
end
if not minetest.find_node_near(pos, 3, {"group:water"}) then
if not minetest.find_node_near(pos, 1, {"group:water"}) then
return
end
pos.y = pos.y + 1
@ -100,53 +48,129 @@ minetest.register_node("cannabis:canapa", {
end
minetest.set_node(pos, {name = "cannabis:canapa"})
return true
end
end
--mapgen
minetest.register_abm({
label = "Grow canapa",
nodenames = {"cannabis:canapa"},
neighbors = {"default:dirt", "default:dirt_with_grass"},
interval = 10,
chance = 2,
neighbors ={"default:dirt_with_grass"},
interval = 14,
chance = 71,
action = function(...)
minetest.grow_canapa(...)
end
})
minetest.register_biome({
name = "canapa_swamp",
--node_dust = "",
node_top = "default:dirt_with_grass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = -1,
y_max = 0,
heat_point = 89,
humidity_point = 22,
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = -0.3,
scale = 0.7,
spread = {x = 100, y = 100, z = 100},
seed = 1,
octaves = 3,
persist = 1.5
},
biomes = {"canapa_swamp"},
y_min = 1,
y_max = 5,
decoration = "cannabis:canapa",
height = 5,
height_max = 5,
spawn_by = "default:water_source",
num_spawn_by = 1,
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = -0.3,
scale = 0.7,
spread = {x = 100, y = 100, z = 100},
seed = 354,
octaves = 3,
persist = 0.7
},
biomes = {"canapa_swamp"},
y_min = 0,
y_max = 0,
schematic = "canapa.mts",--minetest.get_modpath("cannabis").."/schematics/canapa.mts",
})
function default.dig_up(pos, node, digger)
if digger == nil then return end
local np = {x = pos.x, y = pos.y + 1, z = pos.z}
local nn = minetest.get_node(np)
if nn.name == node.name then
minetest.node_dig(np, nn, digger)
end
end
-- This file supplies hemp for the plantlife modpack
-- Last revision: 2016-01-14
--craft
minetest.register_craft({
output = 'cannabis:paper',
recipe = {
{'cannabis:canapa', 'cannabis:canapa', 'cannabis:canapa'},
}
})
minetest.register_craft({
output = 'cannabis:canapa_fuel 4 ',
recipe ={
{"cannabis:canapa","cannabis:canapa",""},
{"cannabis:canapa","cannabis:canapa",""},
{"cannabis:canapa","cannabis:canapa",""},
}
})
minetest.register_craft({
type = "fuel",
recipe = "cannabis:canapa_fuel",
burntime = 25,
minetest.register_node('cannabis:seedling', {
description = ("hemp (seedling)"),
drawtype = 'plantlike',
waving = 1,
tiles = { '1hemp_seedling.png' },
inventory_image = '1hemp_seedling.png',
wield_image = '1hemp_seedling.png',
sunlight_propagates = true,
paramtype = 'light',
walkable = false,
groups = { snappy = 3, poisonivy=1, flora_block=1 },
sounds = "cannabis_canapa_s3",
buildable_to = true,
})
minetest.register_craft({
type = "fuel",
recipe = "cannabis:canapa",
burntime = 10,
minetest.register_node('cannabis:sproutling', {
description = ("hemp (sproutling)"),
drawtype = 'plantlike',
waving = 1,
tiles = { 'hemp_sproutling.png' },
inventory_image = 'hemp_sproutling.png',
wield_image = 'hemp_sproutling.png',
sunlight_propagates = true,
paramtype = 'light',
walkable = false,
groups = { snappy = 3, poisonivy=1, flora_block=1 },
sounds = "cannabis_canapa_s3",
buildable_to = true,
})
minetest.register_node('cannabis:climbing', {
description = ("hemp (climbing plant)"),
drawtype = 'signlike',
tiles = { 'hemp_climbing.png' },
inventory_image = 'hemp_climbing.png',
wield_image = 'hemp_climbing.png',
sunlight_propagates = true,
paramtype = 'light',
paramtype2 = 'wallmounted',
walkable = false,
groups = { snappy = 3, poisonivy=1, flora_block=1 },
sounds = "cannabis_canapa_s3",
selection_box = {
type = "wallmounted",
--wall_side = = <default>
},
buildable_to = true,
})

BIN
canapa.mts Normal file

Binary file not shown.

174
canapa_rossa.lua Normal file
View File

@ -0,0 +1,174 @@
minetest.register_node("cannabis:canapa_red", {
description = "Canapa",
drawtype = "plantlike",
tiles = {"cannabis_canapa_red.png"},
inventory_image = "cannabis_canapa_red.png",
wield_image = "cannabis_canapa_red.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
},
groups = {snappy = 3, flammable = 2},
sounds = "cannabis_canapa_s",
drop = {
max_items = 3,
items = {
{items = {"cannabis:canapa_red"}, rarity = 1 },
{items = {"cannabis:canapa_red_leaves"}, rarity = 1 },
{items = {"cannabis:canapa_red_seed"}, rarity = 1 },
}
},
after_dig_node = function(pos, node, metadata, digger)
default.dig_up(pos, node, digger)
end,
})
--function
function minetest.grow_canapa_red(pos, node)
pos.y = pos.y - 1
local name = minetest.get_node(pos).name
if name ~= "default:desert_sand" and name ~= "default:sand" then
return
end
if not minetest.find_node_near(pos, 5, {"group:water"}) then
return
end
pos.y = pos.y + 1
local height = 0
while node.name == "cannabis:canapa_red" and height < 6 do
height = height + 1
pos.y = pos.y + 1
node = minetest.get_node(pos)
end
if height == 5 or node.name ~= "air" then
return
end
minetest.set_node(pos, {name = "cannabis:canapa_red"})
return true
end
--mapgen
minetest.register_abm({
label = "Grow canapa red",
nodenames = {"cannabis:canapa_red"},
neighbors ={"default:desert_sand","default:sand"},
interval = 5,
chance = 40,
action = function(...)
minetest.grow_canapa_red(...)
end
})
minetest.register_biome({
name = "canapa_swampr",
--node_dust = "",
node_top ={"default:desert_sand","summer:sabbia_mare"},
depth_top = 1,
node_filler = "default:desert_sand",
depth_filler = 1,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 1,
y_max =31000,
--heat_point = 0,
-- humidity_point = 1,
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"summer:sabbia_mare","default:dirt_with_grass","default:desert_sand","default:dirt_with_dry_grass"},
sidelen = 16,
noise_params = {
offset = -0.3,
scale = 0.7,
spread = {x = 100, y = 100, z = 100},
seed = 1,
octaves = 3,
persist = 1.5
},
biomes = {"canapa_swampr"},
y_min = 1,
y_max = 5,
decoration = "cannabis:canapa_red",
height = 5,
height_max = 5,
spawn_by ={ "default:desert_sand","default:sand"},
num_spawn_by = 1,
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt","default:dirt_with_grass","default:desert_sand","default:dirt_with_dry_grass"},
sidelen = 16,
noise_params = {
offset = -0.3,
scale = 0.7,
spread = {x = 100, y = 100, z = 100},
seed = 354,
octaves = 3,
persist = 0.7
},
biomes = {"canapa_swampr"},
y_min = 0,
y_max = 31000,
schematic = "canapa.mts",
})
minetest.register_node('cannabis:seedling_r', {
description = ("hemp red(seedling)"),
drawtype = 'plantlike',
waving = 1,
tiles = { '1hemp_seedling_red.png' },
inventory_image = '1hemp_seedling_red.png',
wield_image = '1hemp_seedling_red.png',
sunlight_propagates = true,
paramtype = 'light',
walkable = false,
groups = { snappy = 3, poisonivy=1, flora_block=1 },
sounds = "cannabis_canapa_s3",
buildable_to = true,
})
minetest.register_node('cannabis:sproutling_r', {
description = ("hemp red (sproutling)"),
drawtype = 'plantlike',
waving = 1,
tiles = { 'hemp_sproutling_red.png' },
inventory_image = 'hemp_sproutling_red.png',
wield_image = 'hemp_sproutling_red.png',
sunlight_propagates = true,
paramtype = 'light',
walkable = false,
groups = { snappy = 3, poisonivy=1, flora_block=1 },
sounds = "cannabis_canapa_s3",
buildable_to = true,
})
minetest.register_node('cannabis:climbing_r', {
description = ("hemp red (climbing plant)"),
drawtype = 'signlike',
tiles = { 'hemp_climbing_red.png' },
inventory_image = 'hemp_climbing_red.png',
wield_image = 'hemp_climbing_red.png',
sunlight_propagates = true,
paramtype = 'light',
paramtype2 = 'wallmounted',
walkable = false,
groups = { snappy = 3, poisonivy=1, flora_block=1 },
sounds = "cannabis_canapa_s3",
selection_box = {
type = "wallmounted",
--wall_side = = <default>
},
buildable_to = true,
})

@ -1 +0,0 @@
Subproject commit 94177a7d3998d91d914cc875ea924ae8cfbe7763

View File

@ -1,7 +1,75 @@
--craft item :fiber, fuel, plastic, paper,flower,oil,flour,bred,raisin,seed,leaves
minetest.register_craftitem("cannabis:canapa_fiber", {
description = "Fiber",
inventory_image = "cannabis_canapa_fiber.png",
})
minetest.register_craftitem("cannabis:canapa_fuel", {
description = "Fuel",
inventory_image = "cannabis_fuel.png",
})
minetest.register_craftitem("cannabis:canapa_plastic", {
description = "Plastic",
inventory_image = "cannabis_plastic.png",
})
minetest.register_craftitem("cannabis:canapa_paper", {
description = "Paper",
inventory_image = "cannabis_paper.png",
})
minetest.register_craftitem("cannabis:canapa_flour", {
description = "Flour",
inventory_image = "cannabis_canapa_flour.png",
})
minetest.register_craftitem("cannabis:canapa_bread", {
description = "Bread",
inventory_image = "cannabis_canapa_bread.png",
on_use = minetest.item_eat(10),
})
minetest.register_craftitem("cannabis:canapa_seed", {
description = "Hemp_Seed",
inventory_image = "cannabis_canapa_seed.png",
on_use = minetest.item_eat(10),
})
minetest.register_craftitem("cannabis:canapa_leaves", {
description = "Hemp_Leaves",
inventory_image = "cannabis_canapa_leaves.png",
on_use = minetest.item_eat(5),
})
minetest.register_craftitem("cannabis:canapa_flower", {
description = "Hemp_Flower",
inventory_image = "cannabis_canapa_flower.png",
on_use = minetest.item_eat(5),
})
minetest.register_craftitem("cannabis:canapa_raisin", {
description = "Hemp_Raisin",
inventory_image = "cannabis_canapa_raisin.png",
on_use = minetest.item_eat(5),
})
minetest.register_craftitem("cannabis:canapa_oil", {
description = "Hemp_Oil",
inventory_image = "cannabis_canapa_oil.png",
on_use = minetest.item_eat(5),
})
minetest.register_craftitem("cannabis:canapa_glue", {
description = "Hemp_Glue",
inventory_image = "cannabis_canapa_glue.png",
on_use = minetest.item_eat(1),
})
--crafting
minetest.register_craft({
output = 'cannabis:canapa_oil 4 ',
output = "cannabis:canapa_oil 4 ",
recipe = {
{"","",""},
{"","",""},
@ -9,10 +77,17 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "cannabis:canapa_fuel 4 ",
recipe ={
{"cannabis:canapa","cannabis:canapa",""},
{"cannabis:canapa","cannabis:canapa",""},
{"cannabis:canapa","cannabis:canapa",""},
}
})
minetest.register_craft({
output = 'cannabis:canapa_plastic 8 ',
output = "cannabis:canapa_plastic 8 ",
recipe ={
{"cannabis:canapa","cannabis:canapa","cannabis:canapa"},
{"cannabis:canapa","cannabis:canapa","cannabis:canapa"},
@ -21,7 +96,7 @@ minetest.register_craft({
minetest.register_craft({
output = 'cannabis:canapa_glue 10 ',
output = "cannabis:canapa_glue 10 ",
recipe = {
{"cannabis:canapa_plastic","cannabis:canapa_raisin","cannabis:canapa_plastic"},
{"cannabis:canapa_raisin","cannabis:canapa_oil","cannabis:canapa_raisin"},
@ -30,7 +105,7 @@ minetest.register_craft({
})
minetest.register_craft({
output = 'cannabis:hp_block_canapa 4 ',
output = "cannabis:hp_block_canapa 4 ",
recipe = {
{"cannabis:canapa_fiber","cannabis:canapa_glue","cannabis:canapa_fiber"},
{"cannabis:canapa_glue","cannabis:canapa_fiber","cannabis:canapa_glue"},
@ -40,7 +115,7 @@ minetest.register_craft({
minetest.register_craft({
output = 'cannabis:canapa_raisin 3 ',
output = "cannabis:canapa_raisin 3 ",
recipe = {
{"","",""},
{"","",""},
@ -50,7 +125,7 @@ minetest.register_craft({
minetest.register_craft({
output = 'cannabis:canapa_flower 5 ',
output = "cannabis:canapa_flower 5 ",
recipe = {
{"","",""},
{"","",""},
@ -60,7 +135,7 @@ minetest.register_craft({
minetest.register_craft({
output = 'cannabis:canapa_seed 10 ',
output = "cannabis:canapa_seed 10 ",
recipe = {
{"cannabis:canapa","",""},
{"","cannabis:canapa",""},
@ -70,7 +145,7 @@ minetest.register_craft({
minetest.register_craft({
output = 'cannabis:canapa_fiber 10 ',
output = "cannabis:canapa_fiber 10 ",
recipe = {
{"","","cannabis:canapa"},
{"","cannabis:canapa",""},
@ -78,6 +153,28 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "cannabis:canapa_paper 6 ",
recipe = {
{"cannabis:canapa", "cannabis:canapa", "cannabis:canapa"
},
}
})
minetest.register_craft({
type = "fuel",
recipe = "cannabis:canapa",
burntime = 15,
})
minetest.register_craft({
type = "fuel",
recipe = "cannabis:canapa_fuel",
burntime = 50,
})
minetest.register_craft({
type = "shapeless",
output = "cannabis:canapa_flour 4",
@ -86,37 +183,10 @@ minetest.register_craft({
minetest.register_craft({
type = "cooking",
cooktime = 15,
cooktime = 10,
output = "cannabis:canapa_bread",
recipe = "cannabis:canapa_flour"
})
--__________________________________________________________________________________________________
minetest.register_craft({
output = 'cannabis:canapa_fuel 4 ',
recipe ={
{"cannabis:canapa","cannabis:canapa",""},
{"cannabis:canapa","cannabis:canapa",""},
{"cannabis:canapa","cannabis:canapa",""},
}
})
minetest.register_craft({
type = "fuel",
recipe = "cannabis:canapa_fuel",
burntime = 25,
})
minetest.register_craft({
type = "fuel",
recipe = "cannabis:canapa",
burntime = 5,
})
minetest.register_craft({
output = 'cannabis:canapa_paper 6 ',
recipe = {
{'cannabis:canapa', 'cannabis:canapa', 'cannabis:canapa'
},
}
})
minetest.register_craft({
type = "shapeless",
@ -130,28 +200,3 @@ minetest.register_craft({
recipe = {"cannabis:fibra_ingot", "cannabis:foglie_ingot", "cannabis:tessuto_ingot"}
})
minetest.register_craft({
type = 'cooking',
recipe = "cannabis:canapa_fiber",
output = "cannabis:fibra_ingot",
})
minetest.register_craft({
type = 'cooking',
recipe = "cannabis:canapa_leaves",
output = "cannabis:foglie_ingot",
})
minetest.register_craft({
type = 'cooking',
recipe = "cannabis:canapa_paper",
output = "cannabis:tessuto_ingot",
})
minetest.register_craft({
type = 'cooking',
recipe = "cannabis:canapa_plastic",
cooktime = 2,
output = "cannabis:high_performance_ingot",
})

146
craftred.lua Normal file
View File

@ -0,0 +1,146 @@
minetest.register_craftitem("cannabis:canapa_red_seed", {
description = "Hemp_Seed",
inventory_image = "cannabis_canapa_red_seed.png",
on_use = minetest.item_eat(10),
})
minetest.register_craftitem("cannabis:canapa_red_leaves", {
description = "Hemp_Leaves",
inventory_image = "cannabis_canapa_red_leaves.png",
on_use = minetest.item_eat(5),
})
minetest.register_craftitem("cannabis:canapa_red_flower", {
description = "Hemp_red_Flower",
inventory_image = "cannabis_canapa_red_flower.png",
on_use = minetest.item_eat(5),
})
-------------------------------------------------------------------
minetest.register_craft({
output = "cannabis:canapa_oil 4 ",
recipe = {
{"","",""},
{"","",""},
{"cannabis:canapa_red_flower","cannabis:canapa_red_raisin","cannabis:canapa_red_flower"},
}
})
minetest.register_craft({
output = "cannabis:canapa_fuel 4 ",
recipe ={
{"cannabis:canapa_red","cannabis:canapa_red",""},
{"cannabis:canapa_red","cannabis:canapa_red",""},
{"cannabis:canapa_red","cannabis:canapa_red",""},
}
})
minetest.register_craft({
output = "cannabis:canapa_plastic 8 ",
recipe ={
{"cannabis:canapa_red","cannabis:canapa_red","cannabis:canapa_red"},
{"cannabis:canapa_red","cannabis:canapa_red","cannabis:canapa_red"},
}
})
minetest.register_craft({
output = "cannabis:canapa_glue 10 ",
recipe = {
{"cannabis:canapa_red_plastic","cannabis:canapa_red_raisin","cannabis:canapa_red_plastic"},
{"cannabis:canapa_red_raisin","cannabis:canapa_red_oil","cannabis:canapa_red_raisin"},
{"cannabis:canapa_red_plastic","cannabis:canapa_red_raisin","cannabis:canapa_red_plastic"},
}
})
minetest.register_craft({
output = "cannabis:hp_block_canapa 4 ",
recipe = {
{"cannabis:canapa_red_fiber","cannabis:canapa_red_glue","cannabis:canapa_red_fiber"},
{"cannabis:canapa_red_glue","cannabis:canapa_red_fiber","cannabis:canapa_red_glue"},
{"cannabis:canapa_red_fiber","cannabis:canapa_red_glue","cannabis:canapa_red_fiber"},
}
})
minetest.register_craft({
output = "cannabis:canapa_raisin 3 ",
recipe = {
{"","",""},
{"","",""},
{"cannabis:canapa_red_flower","cannabis:canapa_red_flower",""},
}
})
minetest.register_craft({
output = "cannabis:canapa_red_flower 5 ",
recipe = {
{"","",""},
{"","",""},
{"cannabis:canapa_red_leaves","cannabis:canapa_red_leaves",""},
}
})
minetest.register_craft({
output = "cannabis:canapa_red_seed 10 ",
recipe = {
{"cannabis:canapa_red","",""},
{"","cannabis:canapa_red",""},
{"","","cannabis:canapa_red"},
}
})
minetest.register_craft({
output = "cannabis:canapa_fiber 10 ",
recipe = {
{"","","cannabis:canapa_red"},
{"","cannabis:canapa_red",""},
{"cannabis:canapa_red","",""},
}
})
minetest.register_craft({
output = "cannabis:canapa_paper 6 ",
recipe = {
{"cannabis:canapa_red", "cannabis:canapa_red", "cannabis:canapa_red"
},
}
})
minetest.register_craft({
type = "fuel",
recipe = "cannabis:canapa_red",
burntime = 15,
})
minetest.register_craft({
type = "shapeless",
output = "cannabis:canapa_red_flour 4",
recipe = {"cannabis:canapa_red_seed", "cannabis:canapa_red_seed", "cannabis:canapa_red_seed", "cannabis:canapa_red_seed"}
})
minetest.register_craft({
type = "cooking",
cooktime = 10,
output = "cannabis:canapa_bread",
recipe = "cannabis:canapa_flour"
})
minetest.register_craft({
type = "shapeless",
output = "cannabis:climbing 30",
recipe = {"cannabis:cannabis_foglie_block", "cannabis:cannabis_foglie_block", "cannabis:cannabis_foglie_block"}
})
minetest.register_craft({
type = "shapeless",
output = "cannabis:mixed_hr_ingot 3",
recipe = {"cannabis:fibra_ingot", "cannabis:foglie_ingot", "cannabis:tessuto_ingot"}
})

View File

@ -1,6 +1,8 @@
default
3d_armor
fire
3d_armor?
maptools?

157
init.lua
View File

@ -1,154 +1,15 @@
--minetest.register_alias("canapa","cannabis:canapa")
cannabis = {}
local S
if(minetest.get_translator) then
S = minetest.get_translator(minetest.get_current_modname())
else
S = function ( s ) return s end
end
cannabis.S = S
--aliases
--minetest.get_modpath("cannabis")
minetest.register_alias("canapa","cannabis:canapa")
--tools
local path = minetest.get_modpath("cannabis")
dofile(path.."/tools.lua")
dofile(path.."/canapa.lua")
dofile(path.."/craft.lua")
dofile(path.."/node_ingot.lua")
dofile(path.."/craftitem.lua")
dofile(path.."/armor.lua")
--craft item :fiber, fuel, plastic, paper,flower,oil,flour,bred,raisin,seed,leaves
minetest.register_craftitem("cannabis:canapa_fiber", {
description = S("Fiber"),
inventory_image = "cannabis_canapa_fiber.png",
})
minetest.register_craftitem("cannabis:canapa_fuel", {
description = S("Fuel"),
inventory_image = "cannabis_fuel.png",
})
minetest.register_craftitem("cannabis:canapa_plastic", {
description = S("Plastic"),
inventory_image = "cannabis_plastic.png",
})
minetest.register_craftitem("cannabis:canapa_paper", {
description = S("Paper"),
inventory_image = "cannabis_paper.png",
})
minetest.register_craftitem("cannabis:canapa_flour", {
description = S("Flour"),
inventory_image = "cannabis_canapa_flour.png",
})
minetest.register_craftitem("cannabis:canapa_bread", {
description = S("Bread"),
inventory_image = "cannabis_canapa_bread.png",
on_use = minetest.item_eat(10),
})
minetest.register_craftitem("cannabis:canapa_seed", {
description = S("Hemp Seed"),
inventory_image = "cannabis_canapa_seed.png",
on_use = minetest.item_eat(10),
})
minetest.register_craftitem("cannabis:canapa_leaves", {
description = S("Hemp Leaves"),
inventory_image = "cannabis_canapa_leaves.png",
on_use = minetest.item_eat(5),
})
minetest.register_craftitem("cannabis:canapa_flower", {
description = S("Hemp Flower"),
inventory_image = "cannabis_canapa_flower.png",
on_use = minetest.item_eat(5),
})
minetest.register_craftitem("cannabis:canapa_raisin", {
description = S("Hemp Raisin"),
inventory_image = "cannabis_canapa_raisin.png",
on_use = minetest.item_eat(5),
})
minetest.register_craftitem("cannabis:canapa_oil", {
description = S("Hemp Oil"),
inventory_image = "cannabis_canapa_oil.png",
on_use = minetest.item_eat(5),
})
minetest.register_craftitem("cannabis:canapa_glue", {
description = S("Hemp Glue"),
inventory_image = "cannabis_canapa_glue.png",
on_use = minetest.item_eat(1),
})
-- This file supplies hemp for the plantlife modpack
-- Last revision: 2016-01-14
minetest.register_node('cannabis:seedling', {
description = S("Hemp (seedling)"),
drawtype = 'plantlike',
waving = 1,
tiles = { '1hemp_seedling.png' },
inventory_image = '1hemp_seedling.png',
wield_image = '1hemp_seedling.png',
sunlight_propagates = true,
paramtype = 'light',
walkable = false,
groups = { snappy = 3, poisonivy=1, flora_block=1 },
sounds = "cannabis_canapa_s3",
buildable_to = true,
})
minetest.register_node('cannabis:sproutling', {
description = S("Hemp (sproutling)"),
drawtype = 'plantlike',
waving = 1,
tiles = { 'hemp_sproutling.png' },
inventory_image = 'hemp_sproutling.png',
wield_image = 'hemp_sproutling.png',
sunlight_propagates = true,
paramtype = 'light',
walkable = false,
groups = { snappy = 3, poisonivy=1, flora_block=1 },
sounds = "cannabis_canapa_s3",
buildable_to = true,
})
minetest.register_node('cannabis:climbing', {
description = S("Hemp (climbing plant)"),
drawtype = 'signlike',
tiles = { 'hemp_climbing.png' },
inventory_image = 'hemp_climbing.png',
wield_image = 'hemp_climbing.png',
sunlight_propagates = true,
paramtype = 'light',
paramtype2 = 'wallmounted',
walkable = false,
groups = { snappy = 3, poisonivy=1, flora_block=1 },
sounds = "cannabis_canapa_s3",
selection_box = {
type = "wallmounted",
--wall_side = = <default>
},
buildable_to = true,
})
dofile(path.."/joint.lua")
dofile(path.."/canapa_rossa.lua")
dofile(path.."/craftred.lua")
dofile(path.."/rope.lua")

183
joint.lua Normal file
View File

@ -0,0 +1,183 @@
minetest.register_craftitem("cannabis:joint_fumo_acceso", {
description = "Joint fumo acceso",
inventory_image = "joint_joint_fac.png",
stack_max = 1 ,
on_use = function(itemstack, user, pointed_thing)
itemstack:add_wear(1000)
return itemstack
end
})
minetest.register_craftitem("cannabis:joint_erba_spento", {
description = "Joint erba spento",
inventory_image = "joint_joint_csp.png",
})
minetest.register_craftitem("cannabis:joint_fumo_spento", {
description = "Joint fumo spento",
inventory_image = "joint_joint_fsp.png",
})
minetest.register_craftitem("cannabis:joint_cima", {
description = "Joint cima triturata",
inventory_image = "joint_cima_s.png",
})
minetest.register_craftitem("cannabis:joint_fumo", {
description = "Joint fumo triturato",
inventory_image = "joint_fumo_s.png",
})
minetest.register_craftitem("cannabis:joint_cartina", {
description = "Joint cartina",
inventory_image = "joint_cartina.png",
})
minetest.register_craftitem("cannabis:joint_cartina_cima", {
description = "Joint cartina con erba",
inventory_image = "joint_cartina_cima.png",
})
minetest.register_craftitem("cannabis:joint_cartina_fumo", {
description = "Joint cartina con fumo",
inventory_image = "joint_cartina_fumo.png",
})
minetest.register_craftitem("cannabis:joint_filter_box", {
description = "Joint filter confezione",
inventory_image = "joint_filter_p.png",
})
minetest.register_craftitem("cannabis:joint_filter", {
description = "Joint filto",
inventory_image = "joint_filter.png",
})
minetest.register_craftitem("cannabis:joint_accendino", {
description = "Joint accendino",
inventory_image = "joint_accendino.png",
})
--______________________________________________________________________________
--craft
--______________________________________________________________________________
minetest.register_craft({
output = "cannabis:joint_fumo 3 ",
recipe = {
{"","",""},
{"","cannabis:canapa_raisin",""},
{"","cannabis:joint_accendino",""},
}
})
minetest.register_craft({
output = "cannabis:joint_cima 3 ",
recipe = {
{"","cannabis:canapa_leaves",""},
{"","cannabis:canapa_flower",""},
{"","cannabis:canapa_leaves",""},
}
})
minetest.register_craft({
output = "cannabis:joint_accendino 5 ",
recipe = {
{"default:steel_ingot","fire:flint_and_steel","cannabis:canapa_plastic"},
{"cannabis:canapa_plastic","cannabis:canapa_fuel","cannabis:canapa_plastic"},
{"cannabis:canapa_plastic","cannabis:canapa_plastic","cannabis:canapa_plastic"},
}
})
minetest.register_craft({
output = "cannabis:joint_cartina 10 ",
recipe = {
{"","",""},
{"","",""},
{"cannabis:canapa_paper","cannabis:canapa_paper","cannabis:canapa_paper"},
}
})
minetest.register_craft({
output = "cannabis:joint_cartina_cima ",
recipe = {
{"","",""},
{"","cannabis:joint_cima",""},
{"","cannabis:joint_cartina",""},
}
})
minetest.register_craft({
output = "cannabis:joint_cartina_fumo ",
recipe = {
{"","",""},
{"","cannabis:joint_fumo","cannabis:canapa_leaves"},
{"","cannabis:joint_cartina",""},
}
})
minetest.register_craft({
output = "cannabis:joint_filter_box ",
recipe = {
{"","",""},
{"cannabis:canapa_paper","cannabis:canapa_paper",""},
{"cannabis:canapa_paper","cannabis:canapa_paper",""},
}
})
minetest.register_craft({
type = "shapeless",
output = "cannabis:joint_filter 10 ",
recipe = {"cannabis:joint_filter_box", "", "", ""}
})
minetest.register_craft({
output = "cannabis:joint_fumo_spento ",
recipe = {
{"","",""},
{"","",""},
{"cannabis:joint_filter","cannabis:joint_cartina_fumo",""},
}
})
minetest.register_craft({
output = "cannabis:joint_erba_spento ",
recipe = {
{"","",""},
{"","",""},
{"cannabis:joint_filter","cannabis:joint_cartina_cima",""},
}
})
minetest.register_craft({
output = "cannabis:joint_fumo_acceso ",
recipe = {
{"","",""},
{"","",""},
{"cannabis:joint_fumo_spento","cannabis:joint_accendino",""},
}
})
minetest.register_craft({
output = "cannabis:joint_erba_acceso ",
recipe = {
{"","",""},
{"","",""},
{"cannabis:joint_erba_spento","cannabis:joint_accendino",""},
}
})
--TODO---------------------------------------
--local smokeCOLOR = {
-- green = { a=64, r=1, g=255, b=1 } ,
-- blue = { a=64, r=1, g=1, b=25 },
--}
-- Iterate through waters.
-- Color wll be the key (green or blue)
-- underwatercolor will be the value (one of the tables above)
--for color, smokecolor in pairs(smokeCOLOR) do
-- water
minetest.register_craftitem("cannabis:joint_erba_acceso", {
description = "Joint erba acceso",
inventory_image = "joint_joint_cac.png",
stack_max = 1 ,
-- post_effect_color = smokeCOLOR,
on_use = function(itemstack, user, pointed_thing)
itemstack:add_wear(1000)
return itemstack
end
})
--end

185
node_ingot.lua Normal file
View File

@ -0,0 +1,185 @@
minetest.register_craftitem("cannabis:mixed_hr_ingot", {
description = ("Mixed HR Ingot"),
inventory_image = "cannabis_mixed_hr_ingot.png",
})
minetest.register_craftitem(":cannabis:fibra_ingot", {
description = ("fibra Ingot"),
inventory_image = "cannabis_fibra_ingot.png",
})
minetest.register_craftitem(":cannabis:foglie_ingot", {
description = ("foglie Ingot"),
inventory_image = "cannabis_foglie_ingot.png",
})
minetest.register_craftitem("cannabis:high_performance_ingot", {
description = ("High Performance Ingot"),
inventory_image = "cannabis_high_performance_ingot.png",
})
minetest.register_craftitem(":cannabis:tessuto_ingot", {
description = ("Tessuto Ingot"),
inventory_image = "cannabis_tessuto_ingot.png",
})
minetest.register_craftitem(":cannabis:adminh_ingot", {
description = ("Adminh Ingot"),
inventory_image = "cannabis_adminh_ingot.png",
})
local function for_each_registered_item(action)
local already_reg = {}
for k, _ in pairs(minetest.registered_items) do
table.insert(already_reg, k)
end
local really_register_craftitem = minetest.register_craftitem
minetest.register_craftitem = function(name, def)
really_register_craftitem(name, def)
action(string.gsub(name, "^:", ""))
end
local really_register_tool = minetest.register_tool
minetest.register_tool = function(name, def)
really_register_tool(name, def)
action(string.gsub(name, "^:", ""))
end
local really_register_node = minetest.register_node
minetest.register_node = function(name, def)
really_register_node(name, def)
action(string.gsub(name, "^:", ""))
end
for _, name in ipairs(already_reg) do
action(name)
end
end
local function register_block(block, ingot)
minetest.register_craft({
output = block,
recipe = {
{ingot, ingot, ingot},
{ingot, ingot, ingot},
{ingot, ingot, ingot},
}
})
minetest.register_craft({
output = ingot.." 9",
recipe = {
{block}
}
})
end
register_block("cannabis:cannabis_fibra_block", "cannabis:fibra_ingot")
register_block("cannabis:cannabis_high_performance_block", "cannabis:high_performance_ingot")
register_block("cannabis:cannabis_tessuto_block", "cannabis:tessuto_ingot")
register_block("cannabis:cannabis_foglie_block", "cannabis:foglie_ingot")
register_block("cannabis:cannabis_adminh_block", "cannabis:adminh_ingot")
minetest.register_node("cannabis:hp_block_canapa",
{
description = "hp_block_canapa",
tiles = {"hp_block_canapa.png"},
is_ground_content = false,
groups = {choppy = 30, oddly_breakable_by_hand = 1, flammable = 3, wood = 1},
sounds = "cannabis:cannabis_canapa_s2",
})
minetest.register_node("cannabis:cannabis_foglie_block", {
description = ("Foglie Block"),
tiles = { "cannabis_foglie_block.png" },
is_ground_content = false,
groups = {cracky=1, level=2},
sounds = "cannabis:cannabis_canapa_s3"
})
minetest.register_node("cannabis:cannabis_tessuto_block", {
description = ("Tessuto Block"),
tiles = { "cannabis_tessuto_block.png" },
is_ground_content = false,
groups = {cracky=1, level=2},
sounds = "cannabis_canapa_s3"
})
minetest.register_node("cannabis:cannabis_high_performance_block", {
description = ("High Performance Block"),
tiles = { "cannabis_high_performance_block.png" },
is_ground_content = false,
groups = {cracky=1, level=2},
sounds = "cannabis_canapa_s3"
})
minetest.register_node("cannabis:cannabis_fibra_block", {
description = ("Fibra Block"),
tiles = { "cannabis_fibra_block.png" },
is_ground_content = false,
groups = {cracky=1, level=2},
sounds = "cannabis_canapa_s3"
})
minetest.register_node("cannabis:cannabis_adminh_block", {
description = ("Adminh Block"),
tiles = { "cannabis_adminh_block.png" },
is_ground_content = false,
groups = {unbreackable =1},
sounds = "cannabis:cannabis_canapa_s3"
})
minetest.register_craft({
type = 'cooking',
recipe = "cannabis:canapa_fiber",
output = "cannabis:fibra_ingot",
})
minetest.register_craft({
type = 'cooking',
recipe = "cannabis:canapa_leaves",
output = "cannabis:foglie_ingot",
})
minetest.register_craft({
type = 'cooking',
recipe = "cannabis:canapa_paper",
output = "cannabis:tessuto_ingot",
})
minetest.register_craft({
type = 'cooking',
recipe = "cannabis:canapa_plastic",
cooktime = 2,
output = "cannabis:high_performance_ingot",
})
minetest.register_craft({
type = 'cooking',
recipe = "cannabis:canapa_oil",
cooktime = 1000,
output = "cannabis:adminh_ingot",
})
minetest.register_craft({
type = 'cooking',
recipe = "cannabis:canapa_red_oil",
cooktime = 1000,
output = "cannabis:adminh_ingot",
})
local function for_each_registered_item(action)
local already_reg = {}
for k, _ in pairs(minetest.registered_items) do
table.insert(already_reg, k)
end
local really_register_craftitem = minetest.register_craftitem
minetest.register_craftitem = function(name, def)
really_register_craftitem(name, def)
action(string.gsub(name, "^:", ""))
end
local really_register_tool = minetest.register_tool
minetest.register_tool = function(name, def)
really_register_tool(name, def)
action(string.gsub(name, "^:", ""))
end
local really_register_node = minetest.register_node
minetest.register_node = function(name, def)
really_register_node(name, def)
action(string.gsub(name, "^:", ""))
end
for _, name in ipairs(already_reg) do
action(name)
end
end

10
rope.lua Normal file
View File

@ -0,0 +1,10 @@
if minetest.get_modpath("ropes") then
minetest.register_craft({
output = 'ropes:ropesegment',
recipe = {
{'cannabis:canapa_fiber'},
{'cannabis:canapa_fiber'},
{'cannabis:canapa_fiber'},
}
})
end

Binary file not shown.

4
textures/.directory Normal file
View File

@ -0,0 +1,4 @@
[Dolphin]
PreviewsShown=true
Timestamp=2016,10,30,14,48,47
Version=3

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
textures/adminh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 B

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 B

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 275 B

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 B

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 419 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 B

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

After

Width:  |  Height:  |  Size: 234 B

View File

Before

Width:  |  Height:  |  Size: 197 B

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
textures/cannabis_fuel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 B

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 B

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Some files were not shown because too many files have changed in this diff Show More