Merge pull request #1 from IIIullaIII/master

Update from Original
master
acmgit 2020-05-05 11:38:17 +02:00 committed by GitHub
commit c433b136d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
267 changed files with 1321 additions and 891 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.

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 +0,0 @@
# CANNABIS_MOD
THE HEMP MOD

View File

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

View File

@ -1,152 +0,0 @@
minetest.register_alias("canapa", "cannabis:canapa")
--nodes
local S = cannabis.S
minetest.register_node("cannabis:canapa", {
description = S("Hemp"),
drawtype = "plantlike",
tiles = {"cannabis_canapa.png"},
inventory_image = "cannabis_canapa.png",
wield_image = "cannabis_canapa.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 = default.node_sound_leaves_defaults(),
drop = {
max_items = 2,
items = {
{items = {"cannabis:canapa"}, rarity = 1 },
{items = {"cannabis:canapa_leaves"}, rarity = 1 },
}
},
after_dig_node = function(pos, node, metadata, digger)
default.dig_up(pos, node, digger)
end,
})
-- 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)
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
return
end
pos.y = pos.y + 1
local height = 0
while node.name == "cannabis:canapa" and height < 6 do
height = height + 1
pos.y = pos.y + 1
node = minetest.get_node(pos)
end
if height == 6 or node.name ~= "air" then
return
end
minetest.set_node(pos, {name = "cannabis:canapa"})
return true
end
minetest.register_abm({
nodenames = {"cannabis:canapa"},
neighbors = {"default:dirt", "default:dirt_with_grass"},
interval = 10,
chance = 2,
action = function(...)
minetest.grow_canapa(...)
end
})
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
--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_craft({
type = "fuel",
recipe = "cannabis:canapa",
burntime = 10,
})

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

89
cannabis/LICENSE.txt Normal file
View File

@ -0,0 +1,89 @@
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 ,
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
FOR THE REST OF THE CODE THE LICENSE IS OF THE TYPE: MIT
L'autorizzazione è concessa, gratuitamente,
a chiunque ottenga una copia di questo software e dei file di documentazione associati (il "Software"),
per trattare il Software senza restrizioni,
inclusi senza limitazione i diritti di utilizzo, copia, modifica, unione , pubblicare, distribuire,
concedere in sublicenza e / o vendere copie del Software e per consentire alle persone a cui il Software è fornito di farlo,
fatte salve le seguenti condizioni:
La nota di copyright e il presente avviso di autorizzazione di cui sopra devono essere inclusi in tutte le copie o parti sostanziali del software.
IL SOFTWARE È FORNITO "COSÌ COM'È", SENZA ALCUN TIPO DI GARANZIA, ESPRESSA O IMPLICITA, COMPRESO MA NON LIMITATO ALLE GARANZIE DI COMMERCIABILITÀ,
IDONEITÀ PER UNO SCOPO PARTICOLARE E NON VIOLAZIONE. IN NESSUN CASO GLI AUTORI OI TITOLARI DEL COPYRIGHT SARANNO RESPONSABILI DI QUALSIASI RECLAMO,
DANNO O ALTRO RESPONSABILITÀ, SE IN AZIONE DI CONTRATTO, TORT O ALTRO, DERIVANTE DA,
FUORI O IN CONNESSIONE CON IL SOFTWARE O L'UTILIZZO O ALTRE OFFERTE NEL SOFTWARE.
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.
PER I MEDIA FILE LA LICENZA E'DI TIPO: CC BY-NC
Permette di distribuire, modificare,
creare opere derivate dall'originale,
ma non a scopi commerciali,
a condizione che venga: riconosciuta una menzione di paternità adeguata,
fornito un link alla licenza e indicato se sono state effettuate delle modifiche.
Chi modifica l'opera originale non è tenuto a utilizzare le stesse licenze per le opere derivate.
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,
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
FOR MEDIA FILES THE LICENSE IS TYPE: MT
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.
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.)
FOR MEDIA FILES THE LICENSE IS TYPE: CC BY-NC
Allows you to distribute, modify,
create works derived from the original,
  but not for commercial purposes,
  provided that: a mention of adequate authorship is recognized,
  provided a link to the license and indicated if changes have been made.
Anyone who modifies the original work is not required to use the same licenses for derivative works.

35
cannabis/README.md Normal file
View File

@ -0,0 +1,35 @@
# cannabis
IT)
Questa mod punta ad illustrare la vasta possibilità e settori di utilizzo della canapa , la sua importanza nei vari settori medici culinari industriali bioenergetici ricreativi etc
punta anche a sfatare le bugie che fin ora sono state dette su di essa
e far conoscere come puo essere utile per pulire l'aria e i terreni dall'inquinamento questa mod non illustrera soltanto il lato ricreativo
come ce lo hanno mostrato fin ora cioè in maniera distorta.
Questo e' il motivo per cui ho creato questa mod per debellare l'gnoranza e la mal'informazione sulla canapa in maniera educativa,
completare tutti gli asppetti della mod richiede un po di lavoro per questo e' ancora in fase di lavorazione ed espansione
EN)
This mod aims to illustrate the vast possibilities and sectors of use of hemp, its importance in the various medical culinary industrial bioenergetic recreational sectors etc
it also aims to dispel the lies that have so far been said about it
and let people know how it can be useful to clean the air and the soil from pollution this mod will not only illustrate the recreational side
as they have shown us so far, that is, in a distorted way.
This is the reason why I created this mod to eradicate the ignorance and misinformation about hemp in an educational way,
completing all the twists of the mod requires a bit of work for this and is still in the processing and expansion phase
DE)
717/5000
Dieser Mod soll die enormen Möglichkeiten und Sektoren der Verwendung von Hanf, seine Bedeutung in den verschiedenen medizinisch-kulinarischen industriellen bioenergetischen Freizeitsektoren usw. Veranschaulichen
es zielt auch darauf ab, die Lügen zu zerstreuen, die bisher darüber gesagt wurden
und lassen Sie die Leute wissen, wie nützlich es sein kann, die Luft und den Boden von Verschmutzung zu reinigen. Dieser Mod wird nicht nur die Erholungsseite veranschaulichen
wie sie uns bisher gezeigt haben, also verzerrt.
Dies ist der Grund, warum ich diesen Mod erstellt habe, um die Unwissenheit und Fehlinformation über Hanf auf pädagogische Weise zu beseitigen.
Das Abschließen aller Drehungen des Mods erfordert ein wenig Arbeit und befindet sich noch in der Verarbeitungs- und Erweiterungsphase
ES)
Este mod tiene como objetivo ilustrar las vastas posibilidades y sectores de uso del cáñamo, su importancia en los diversos sectores médicos, culinarios, industriales, bioenergéticos, recreativos, etc.
También tiene como objetivo disipar las mentiras que hasta ahora se han dicho al respecto
y que la gente sepa cómo puede ser útil limpiar el aire y el suelo de la contaminación, este mod no solo ilustrará el lado recreativo
como nos han mostrado hasta ahora, es decir, de manera distorsionada.
Esta es la razón por la que creé este mod para erradicar la ignorancia y la información errónea sobre el cáñamo de una manera educativa,
completar todos los giros del mod requiere un poco de trabajo para esto y todavía está en la fase de procesamiento y expansión

98
cannabis/armor.lua Normal file
View File

@ -0,0 +1,98 @@
--armor
if minetest.get_modpath("cannabis") then
local stats = {
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.." 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.." 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.." 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.." 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,
})
end
for k, v in pairs(mats) do
minetest.register_craft({
output = "cannabis:helmet_"..k,
recipe = {
{v, v, v},
{v, "", v},
{"", "", ""},
},
})
minetest.register_craft({
output = "cannabis:chestplate_"..k,
recipe = {
{v, "", v},
{v, v, v},
{v, v, v},
},
})
minetest.register_craft({
output = "cannabis:leggings_"..k,
recipe = {
{v, v, v},
{v, "", v},
{v, "", v},
},
})
minetest.register_craft({
output = "cannabis:boots_"..k,
recipe = {
{v, "", v},
{v, "", v},
},
})
end
if minetest.get_modpath("shields") then
for k, v in pairs(stats) do
minetest.register_tool("cannabis:shield_"..k, {
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,
})
local m = mats[k]
minetest.register_craft({
output = "cannabis:shield_"..k,
recipe = {
{m, m, m},
{m, m, m},
{"", m, ""},
},
})
end
end
end

176
cannabis/canapa.lua Normal file
View File

@ -0,0 +1,176 @@
minetest.register_node("cannabis:canapa", {
description = "Canapa",
drawtype = "plantlike",
tiles = {"cannabis_canapa.png"},
inventory_image = "cannabis_canapa.png",
wield_image = "cannabis_canapa.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"}, 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
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, 1, {"group:water"}) then
return
end
pos.y = pos.y + 1
local height = 0
while node.name == "cannabis:canapa" and height < 6 do
height = height + 1
pos.y = pos.y + 1
node = minetest.get_node(pos)
end
if height == 6 or node.name ~= "air" then
return
end
minetest.set_node(pos, {name = "cannabis:canapa"})
return true
end
--mapgen
minetest.register_abm({
label = "Grow canapa",
nodenames = {"cannabis:canapa"},
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",
})
-- This file supplies hemp for the plantlife modpack
-- Last revision: 2016-01-14
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_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
cannabis/canapa.mts Normal file

Binary file not shown.

174
cannabis/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,
})

217
cannabis/craftitem.lua Normal file
View File

@ -0,0 +1,217 @@
--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 ",
recipe = {
{"","",""},
{"","",""},
{"cannabis:canapa_flower","cannabis:canapa_raisin","cannabis:canapa_flower"},
}
})
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 ",
recipe ={
{"cannabis:canapa","cannabis:canapa","cannabis:canapa"},
{"cannabis:canapa","cannabis:canapa","cannabis:canapa"},
}
})
minetest.register_craft({
output = "cannabis:canapa_glue 10 ",
recipe = {
{"cannabis:canapa_plastic","cannabis:canapa_raisin","cannabis:canapa_plastic"},
{"cannabis:canapa_raisin","cannabis:canapa_oil","cannabis:canapa_raisin"},
{"cannabis:canapa_plastic","cannabis:canapa_raisin","cannabis:canapa_plastic"},
}
})
minetest.register_craft({
output = "cannabis:climbing ",
recipe = {
{"cannabis:canapa_leaves","cannabis:canapa_leaves","cannabis:canapa_leaves"},
{"cannabis:canapa_leaves","cannabis:canapa_leaves","cannabis:canapa_leaves"},
{"cannabis:canapa_leaves","cannabis:canapa_leaves","cannabis:canapa_leaves"},
}
})
minetest.register_craft({
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"},
{"cannabis:canapa_fiber","cannabis:canapa_glue","cannabis:canapa_fiber"},
}
})
minetest.register_craft({
output = "cannabis:canapa_raisin 3 ",
recipe = {
{"","",""},
{"","",""},
{"cannabis:canapa_flower","cannabis:canapa_flower",""},
}
})
minetest.register_craft({
output = "cannabis:canapa_flower 5 ",
recipe = {
{"","",""},
{"","",""},
{"cannabis:canapa_leaves","cannabis:canapa_leaves",""},
}
})
minetest.register_craft({
output = "cannabis:canapa_seed 10 ",
recipe = {
{"cannabis:canapa","",""},
{"","cannabis:canapa",""},
{"","","cannabis:canapa"},
}
})
minetest.register_craft({
output = "cannabis:canapa_fiber 10 ",
recipe = {
{"","","cannabis:canapa"},
{"","cannabis:canapa",""},
{"cannabis:canapa","",""},
}
})
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",
recipe = {"cannabis:canapa_seed", "cannabis:canapa_seed", "cannabis:canapa_seed", "cannabis:canapa_seed"}
})
minetest.register_craft({
type = "cooking",
cooktime = 10,
output = "cannabis:canapa_bread",
recipe = "cannabis:canapa_flour"
})
minetest.register_craft({
output = "cannabis:cannabis_foglie_block 5 ",
recipe = {
{"cannabis:climbing","cannabis:climbing","cannabis:climbing"},
{"cannabis:climbing","cannabis:climbing","cannabis:climbing"},
{"cannabis:climbing","cannabis:climbing","cannabis:climbing"},
}
})
minetest.register_craft({
type = "shapeless",
output = "cannabis:climbing 9",
recipe = {"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"}
})

161
cannabis/craftred.lua Normal file
View File

@ -0,0 +1,161 @@
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:climbing_r ",
recipe = {
{"cannabis:canapa_red_leaves","cannabis:canapa_red_leaves","cannabis:canapa_red_leaves"},
{"cannabis:canapa_red_leaves","cannabis:canapa_red_leaves","cannabis:canapa_red_leaves"},
{"cannabis:canapa_red_leaves","cannabis:canapa_red_leaves","cannabis:canapa_red_leaves"},
}
})
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({
output = "cannabis:cannabis_foglie_red_block ",
recipe = {
{"cannabis:climbing_r","cannabis:climbing_r","cannabis:climbing_r"},
{"cannabis:climbing_r","cannabis:climbing_r","cannabis:climbing_r"},
{"cannabis:climbing_r","cannabis:climbing_r","cannabis:climbing_r"},
}
})
minetest.register_craft({
type = "shapeless",
output = "cannabis:mixed_hr_ingot 3",
recipe = {"cannabis:fibra_ingot", "cannabis:foglie_ingot", "cannabis:tessuto_ingot"}
})
minetest.register_craft({
type = "shapeless",
output = "cannabis:climbing_r 9",
recipe = {"cannabis:cannabis_foglie_red_block", "", ""}
})

9
cannabis/depends.txt Normal file
View File

@ -0,0 +1,9 @@
default
fire
3d_armor?
maptools?

0
i18n.py → cannabis/i18n.py Executable file → Normal file
View File

15
cannabis/init.lua Normal file
View File

@ -0,0 +1,15 @@
--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.."/node_ingot.lua")
dofile(path.."/craftitem.lua")
dofile(path.."/armor.lua")
dofile(path.."/joint.lua")
dofile(path.."/canapa_rossa.lua")
dofile(path.."/craftred.lua")
dofile(path.."/rope.lua")

183
cannabis/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",""},
}
})
-----------------------------------------
--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

View File

@ -1,122 +1,29 @@
local S = cannabis.S
--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 },
}
local mats = {
fibra="cannabis:fibra_ingot",
tessuto="cannabis:tessuto_ingot",
foglie="cannabis:foglie_ingot",
high="cannabis:high_performance_ingot",
}
for k, v in pairs(stats) do
minetest.register_tool("cannabis:helmet_"..k, {
description = v.name..S(" 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"),
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"),
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"),
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,
})
end
for k, v in pairs(mats) do
minetest.register_craft({
output = "cannabis:helmet_"..k,
recipe = {
{v, v, v},
{v, "", v},
{"", "", ""},
},
})
minetest.register_craft({
output = "cannabis:chestplate_"..k,
recipe = {
{v, "", v},
{v, v, v},
{v, v, v},
},
})
minetest.register_craft({
output = "cannabis:leggings_"..k,
recipe = {
{v, v, v},
{v, "", v},
{v, "", v},
},
})
minetest.register_craft({
output = "cannabis:boots_"..k,
recipe = {
{v, "", v},
{v, "", v},
},
})
end
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"),
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,
})
local m = mats[k]
minetest.register_craft({
output = "cannabis:shield_"..k,
recipe = {
{m, m, m},
{m, m, m},
{"", m, ""},
},
})
end
end
end
minetest.register_craftitem("cannabis:mixed_hr_ingot", {
description = S("Mixed HR Ingot"),
description = ("Mixed HR Ingot"),
inventory_image = "cannabis_mixed_hr_ingot.png",
})
minetest.register_craftitem(":cannabis:fibra_ingot", {
description = S("Fiber Ingot"),
description = ("fibra Ingot"),
inventory_image = "cannabis_fibra_ingot.png",
})
minetest.register_craftitem(":cannabis:foglie_ingot", {
description = S("Sheet Ingot"),
description = ("foglie Ingot"),
inventory_image = "cannabis_foglie_ingot.png",
})
minetest.register_craftitem("cannabis:high_performance_ingot", {
description = S("High Performance Ingot"),
description = ("High Performance Ingot"),
inventory_image = "cannabis_high_performance_ingot.png",
})
minetest.register_craftitem(":cannabis:tessuto_ingot", {
description = S("Textil 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
@ -163,50 +70,62 @@ 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
--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 = S("High Performance 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_foglie_red_block", {
description = ("Foglie Block"),
tiles = { "cannabis_foglie_red_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 = S("High Performance Block"),
description = ("High Performance Block"),
tiles = { "cannabis_high_performance_block.png" },
is_ground_content = true,
is_ground_content = false,
groups = {cracky=1, level=2},
sounds = "cannabis_canapa_s3"
})
minetest.register_node("cannabis:cannabis_fibra_block", {
description = S("Fiber Block"),
description = ("Fibra Block"),
tiles = { "cannabis_fibra_block.png" },
is_ground_content = true,
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',
@ -233,6 +152,18 @@ minetest.register_craft({
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 = {}

10
cannabis/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.

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

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.

After

Width:  |  Height:  |  Size: 338 B

View File

Before

Width:  |  Height:  |  Size: 155 B

After

Width:  |  Height:  |  Size: 155 B

View File

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 141 B

View File

Before

Width:  |  Height:  |  Size: 222 B

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

View File

Before

Width:  |  Height:  |  Size: 158 B

After

Width:  |  Height:  |  Size: 158 B

View File

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 167 B

View File

Before

Width:  |  Height:  |  Size: 262 B

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

View File

Before

Width:  |  Height:  |  Size: 181 B

After

Width:  |  Height:  |  Size: 181 B

View File

Before

Width:  |  Height:  |  Size: 188 B

After

Width:  |  Height:  |  Size: 188 B

View File

Before

Width:  |  Height:  |  Size: 291 B

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

View File

Before

Width:  |  Height:  |  Size: 158 B

After

Width:  |  Height:  |  Size: 158 B

View File

Before

Width:  |  Height:  |  Size: 182 B

After

Width:  |  Height:  |  Size: 182 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.

After

Width:  |  Height:  |  Size: 165 B

View File

Before

Width:  |  Height:  |  Size: 157 B

After

Width:  |  Height:  |  Size: 157 B

View File

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 168 B

View File

Before

Width:  |  Height:  |  Size: 281 B

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

View File

Before

Width:  |  Height:  |  Size: 273 B

After

Width:  |  Height:  |  Size: 273 B

View File

Before

Width:  |  Height:  |  Size: 366 B

After

Width:  |  Height:  |  Size: 366 B

View File

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 142 B

View File

Before

Width:  |  Height:  |  Size: 227 B

After

Width:  |  Height:  |  Size: 227 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.

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

View File

Before

Width:  |  Height:  |  Size: 237 B

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

View File

Before

Width:  |  Height:  |  Size: 218 B

After

Width:  |  Height:  |  Size: 218 B

View File

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 141 B

View File

Before

Width:  |  Height:  |  Size: 269 B

After

Width:  |  Height:  |  Size: 269 B

View File

Before

Width:  |  Height:  |  Size: 222 B

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 412 B

After

Width:  |  Height:  |  Size: 412 B

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 740 B

After

Width:  |  Height:  |  Size: 740 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

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.

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.

After

Width:  |  Height:  |  Size: 234 B

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