Código atual
parent
a288b99fab
commit
c43567b914
|
@ -0,0 +1,47 @@
|
|||
--
|
||||
-- Mod Atualizador
|
||||
--
|
||||
-- Para modpack 3d_armor
|
||||
--
|
||||
|
||||
-- Redefinir resistencia das armaduras
|
||||
minetest.override_item("3d_armor:helmet_wood", {groups = {armor_head=5, armor_heal=0, armor_use=40}})
|
||||
minetest.override_item("3d_armor:chestplate_wood", {groups = {armor_torso=7, armor_heal=0, armor_use=60}})
|
||||
minetest.override_item("3d_armor:leggings_wood", {groups = {armor_legs=5, armor_heal=0, armor_use=50}})
|
||||
minetest.override_item("3d_armor:boots_wood", {groups = {armor_feet=5, armor_heal=0, armor_use=20}})
|
||||
minetest.override_item("3d_armor:helmet_steel", {groups = {armor_head=7, armor_heal=0, armor_use=150}})
|
||||
minetest.override_item("3d_armor:chestplate_steel", {groups = {armor_torso=9, armor_heal=0, armor_use=200}})
|
||||
minetest.override_item("3d_armor:leggings_steel", {groups = {armor_legs=7, armor_heal=0, armor_use=175}})
|
||||
minetest.override_item("3d_armor:boots_steel", {groups = {armor_feet=7, armor_heal=0, armor_use=100}})
|
||||
|
||||
-- Redefinir resistencia dos escudos
|
||||
minetest.override_item("shields:shield_wood", {groups = {armor_shield=5, armor_heal=0, armor_use=50}})
|
||||
minetest.override_item("shields:shield_enhanced_wood", {groups = {armor_shield=7, armor_heal=0, armor_use=100}})
|
||||
minetest.override_item("shields:shield_steel", {groups = {armor_shield=9, armor_heal=0, armor_use=170}})
|
||||
|
||||
-- Remover receitas indesejadas
|
||||
-- Armadura de cacto
|
||||
minetest.clear_craft({output = '3d_armor:helmet_cactus'})
|
||||
minetest.clear_craft({output = '3d_armor:chestplate_cactus'})
|
||||
minetest.clear_craft({output = '3d_armor:leggings_cactus'})
|
||||
minetest.clear_craft({output = '3d_armor:boots_cactus'})
|
||||
minetest.clear_craft({output = 'shields:shield_cactus'})
|
||||
minetest.clear_craft({output = 'shields:shield_enhanced_cactus'})
|
||||
-- Armadura de bronze
|
||||
minetest.clear_craft({output = '3d_armor:helmet_bronze'})
|
||||
minetest.clear_craft({output = '3d_armor:chestplate_bronze'})
|
||||
minetest.clear_craft({output = '3d_armor:leggings_bronze'})
|
||||
minetest.clear_craft({output = '3d_armor:boots_bronze'})
|
||||
minetest.clear_craft({output = 'shields:shield_bronze'})
|
||||
-- Armadura de ouro
|
||||
minetest.clear_craft({output = '3d_armor:helmet_gold'})
|
||||
minetest.clear_craft({output = '3d_armor:chestplate_gold'})
|
||||
minetest.clear_craft({output = '3d_armor:leggings_gold'})
|
||||
minetest.clear_craft({output = '3d_armor:boots_gold'})
|
||||
minetest.clear_craft({output = 'shields:shield_gold'})
|
||||
-- Armadura de diamante
|
||||
minetest.clear_craft({output = '3d_armor:helmet_diamond'})
|
||||
minetest.clear_craft({output = '3d_armor:chestplate_diamond'})
|
||||
minetest.clear_craft({output = '3d_armor:leggings_diamond'})
|
||||
minetest.clear_craft({output = '3d_armor:boots_diamond'})
|
||||
minetest.clear_craft({output = 'shields:shield_diamond'})
|
|
@ -0,0 +1,6 @@
|
|||
Mod Atualizar
|
||||
===================
|
||||
|
||||
Esse mod trabalha atualizando altomaticamente
|
||||
alguns parametros do subgame minetest_game para
|
||||
minemacro
|
|
@ -0,0 +1,16 @@
|
|||
--
|
||||
-- Mod Atualizador
|
||||
--
|
||||
-- Para mod antipvp
|
||||
--
|
||||
|
||||
-- LBM para remover carpetes do antigo mod antpvp [pode remover apos reset do servidor (4/6/2017)]
|
||||
minetest.register_lbm({
|
||||
name = "atualizador:remover_carpetes_antpvp",
|
||||
nodenames = {"antpvp:carpete"},
|
||||
action = function(pos, node)
|
||||
-- Coloca novo node no lugar
|
||||
minetest.set_node(pos, {name="antipvp:placa", param2 = node.param2})
|
||||
end,
|
||||
})
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
--
|
||||
-- Mod Atualizador
|
||||
--
|
||||
-- Para mod mobs
|
||||
--
|
||||
|
||||
-- Remover receitas de itens indesejados
|
||||
|
||||
-- Carne Assada
|
||||
minetest.clear_craft({output = 'creatures:meat'})
|
|
@ -0,0 +1,467 @@
|
|||
--
|
||||
-- Mod Atualizador
|
||||
--
|
||||
-- Para mod default
|
||||
--
|
||||
|
||||
-- Alimentação
|
||||
minetest.override_item("default:apple", {on_use = minetest.item_eat(1)})
|
||||
|
||||
-- Remover Receitas
|
||||
minetest.clear_craft({output = 'fire:flint_and_steel'})
|
||||
minetest.clear_craft({output = 'default:meselamp'})
|
||||
|
||||
-- Tirar drops
|
||||
minetest.override_item("default:glass", {drop = ""})
|
||||
minetest.override_item("default:obsidian_glass", {drop = ""})
|
||||
|
||||
-- Ajustar drops das folhas de arvores
|
||||
minetest.override_item("default:leaves", {drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
items = {'default:sapling'},
|
||||
rarity = 20
|
||||
}
|
||||
}
|
||||
}})
|
||||
minetest.override_item("default:jungleleaves", {drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
items = {'default:junglesapling'},
|
||||
rarity = 20
|
||||
}
|
||||
}
|
||||
}})
|
||||
minetest.override_item("default:pine_needles", {drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
items = {'default:pine_sapling'},
|
||||
rarity = 20
|
||||
}
|
||||
}
|
||||
}})
|
||||
minetest.override_item("default:acacia_leaves", {drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
items = {'default:acacia_sapling'},
|
||||
rarity = 20
|
||||
}
|
||||
}
|
||||
}})
|
||||
minetest.override_item("default:aspen_leaves", {drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
items = {'default:aspen_sapling'},
|
||||
rarity = 20
|
||||
}
|
||||
}
|
||||
}})
|
||||
|
||||
-- Alterar alcance de fluxo de alguns liquidos
|
||||
minetest.override_item("default:lava_flowing", {liquid_range = 1})
|
||||
minetest.override_item("default:water_flowing", {liquid_range = 4})
|
||||
minetest.override_item("default:river_water_flowing", {liquid_range = 4})
|
||||
|
||||
-- Empilhamento de itens
|
||||
minetest.override_item("default:apple", {stack_max = 20})
|
||||
|
||||
-- Ajuste de Receitas
|
||||
|
||||
-- Bloco de Tijolinhos
|
||||
minetest.clear_craft({output = 'default:brick'})
|
||||
minetest.register_craft({
|
||||
output = 'default:brick',
|
||||
recipe = {
|
||||
{'default:clay_brick', 'default:clay_brick', 'default:clay_brick'},
|
||||
{'default:clay_brick', 'default:clay_brick', 'default:clay_brick'},
|
||||
{'default:clay_brick', 'default:clay_brick', 'default:clay_brick'}
|
||||
}
|
||||
})
|
||||
-- Livro
|
||||
minetest.clear_craft({output = 'default:book'})
|
||||
minetest.register_craft({
|
||||
output = 'default:book',
|
||||
recipe = {
|
||||
{'default:paper', 'default:paper', 'default:paper'},
|
||||
{'default:paper', 'farming:string', 'default:paper'},
|
||||
{'default:paper', 'default:paper', 'default:paper'}
|
||||
}
|
||||
})
|
||||
-- Papel
|
||||
minetest.clear_craft({output = 'default:paper'})
|
||||
minetest.register_craft({
|
||||
output = 'default:paper',
|
||||
recipe = {
|
||||
{'default:papyrus', 'default:papyrus', 'default:papyrus'},
|
||||
{'default:papyrus', 'default:cobble', 'default:papyrus'},
|
||||
{'default:papyrus', 'default:papyrus', 'default:papyrus'}
|
||||
}
|
||||
})
|
||||
-- Chave Lisa (chave bruta)
|
||||
minetest.clear_craft({output = 'default:skeleton_key'})
|
||||
minetest.register_craft({
|
||||
output = 'default:skeleton_key',
|
||||
recipe = {
|
||||
{'group:stick', 'default:steel_ingot'},
|
||||
}
|
||||
})
|
||||
|
||||
-- Reajuste de Ferramentas
|
||||
|
||||
-- Picaretas
|
||||
minetest.override_item("default:pick_wood", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.2,
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
cracky = {times={[3]=1.60}, uses=10, maxlevel=1},
|
||||
},
|
||||
damage_groups = {fleshy=1},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:pick_stone", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.3,
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
cracky = {times={[2]=2.0, [3]=1.20}, uses=20, maxlevel=1},
|
||||
},
|
||||
damage_groups = {fleshy=1},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:pick_steel", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level=1,
|
||||
groupcaps={
|
||||
cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=20, maxlevel=2},
|
||||
},
|
||||
damage_groups = {fleshy=2},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:pick_bronze", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level=1,
|
||||
groupcaps={
|
||||
cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=30, maxlevel=2},
|
||||
},
|
||||
damage_groups = {fleshy=2},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:pick_mese", {
|
||||
description = "Picareta de Mese",
|
||||
inventory_image = "default_tool_mesepick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.9,
|
||||
max_drop_level=3,
|
||||
groupcaps={
|
||||
cracky = {times={[1]=2.4, [2]=1.2, [3]=0.60}, uses=20, maxlevel=3},
|
||||
},
|
||||
damage_groups = {fleshy=3},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:pick_diamond", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.9,
|
||||
max_drop_level=3,
|
||||
groupcaps={
|
||||
cracky = {times={[1]=2.0, [2]=1.0, [3]=0.50}, uses=30, maxlevel=3},
|
||||
},
|
||||
damage_groups = {fleshy=4},
|
||||
}
|
||||
})
|
||||
-- Pas
|
||||
minetest.override_item("default:shovel_wood", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.2,
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
crumbly = {times={[1]=3.00, [2]=1.60, [3]=0.60}, uses=10, maxlevel=1},
|
||||
},
|
||||
damage_groups = {fleshy=1},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:shovel_stone", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.4,
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
crumbly = {times={[1]=1.80, [2]=1.20, [3]=0.50}, uses=20, maxlevel=1},
|
||||
},
|
||||
damage_groups = {fleshy=1},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:shovel_steel", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.1,
|
||||
max_drop_level=1,
|
||||
groupcaps={
|
||||
crumbly = {times={[1]=1.50, [2]=0.90, [3]=0.40}, uses=30, maxlevel=2},
|
||||
},
|
||||
damage_groups = {fleshy=2},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:shovel_bronze", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.1,
|
||||
max_drop_level=1,
|
||||
groupcaps={
|
||||
crumbly = {times={[1]=1.50, [2]=0.90, [3]=0.40}, uses=40, maxlevel=2},
|
||||
},
|
||||
damage_groups = {fleshy=2},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:shovel_mese", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level=3,
|
||||
groupcaps={
|
||||
crumbly = {times={[1]=1.20, [2]=0.60, [3]=0.30}, uses=20, maxlevel=3},
|
||||
},
|
||||
damage_groups = {fleshy=3},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:shovel_diamond", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level=1,
|
||||
groupcaps={
|
||||
crumbly = {times={[1]=1.10, [2]=0.50, [3]=0.30}, uses=30, maxlevel=3},
|
||||
},
|
||||
damage_groups = {fleshy=4},
|
||||
}
|
||||
})
|
||||
-- Machados
|
||||
minetest.override_item("default:axe_wood", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
choppy = {times={[2]=3.00, [3]=2.00}, uses=10, maxlevel=1},
|
||||
},
|
||||
damage_groups = {fleshy=1},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:axe_stone", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.2,
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
choppy={times={[1]=3.00, [2]=2.00, [3]=1.50}, uses=20, maxlevel=1},
|
||||
},
|
||||
damage_groups = {fleshy=1},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:axe_steel", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level=1,
|
||||
groupcaps={
|
||||
choppy={times={[1]=2.50, [2]=1.40, [3]=1.00}, uses=20, maxlevel=2},
|
||||
},
|
||||
damage_groups = {fleshy=2},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:axe_bronze", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level=1,
|
||||
groupcaps={
|
||||
choppy={times={[1]=2.50, [2]=1.40, [3]=1.00}, uses=30, maxlevel=2},
|
||||
},
|
||||
damage_groups = {fleshy=2},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:axe_mese", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.9,
|
||||
max_drop_level=1,
|
||||
groupcaps={
|
||||
choppy={times={[1]=2.20, [2]=1.00, [3]=0.60}, uses=20, maxlevel=3},
|
||||
},
|
||||
damage_groups = {fleshy=3},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:axe_diamond", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.9,
|
||||
max_drop_level=1,
|
||||
groupcaps={
|
||||
choppy={times={[1]=2.10, [2]=0.90, [3]=0.50}, uses=30, maxlevel=2},
|
||||
},
|
||||
damage_groups = {fleshy=4},
|
||||
}
|
||||
})
|
||||
-- Espadas
|
||||
minetest.override_item("default:sword_wood", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1,
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
snappy={times={[2]=1.6, [3]=0.40}, uses=10, maxlevel=1},
|
||||
},
|
||||
damage_groups = {fleshy=2},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:sword_stone", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.2,
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
snappy={times={[2]=1.4, [3]=0.40}, uses=20, maxlevel=1},
|
||||
},
|
||||
damage_groups = {fleshy=3},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:sword_steel", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.8,
|
||||
max_drop_level=1,
|
||||
groupcaps={
|
||||
snappy={times={[1]=2.5, [2]=1.20, [3]=0.35}, uses=30, maxlevel=2},
|
||||
},
|
||||
damage_groups = {fleshy=4},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:sword_bronze", {
|
||||
description = "Espada de Bronze (Dano 5)",
|
||||
inventory_image = "default_tool_bronzesword.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.8,
|
||||
max_drop_level=1,
|
||||
groupcaps={
|
||||
snappy={times={[1]=2.5, [2]=1.20, [3]=0.35}, uses=40, maxlevel=2},
|
||||
},
|
||||
damage_groups = {fleshy=5},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:sword_mese", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.7,
|
||||
max_drop_level=1,
|
||||
groupcaps={
|
||||
snappy={times={[1]=2.0, [2]=1.00, [3]=0.35}, uses=30, maxlevel=3},
|
||||
},
|
||||
damage_groups = {fleshy=6},
|
||||
}
|
||||
})
|
||||
minetest.override_item("default:sword_diamond", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.7,
|
||||
max_drop_level=1,
|
||||
groupcaps={
|
||||
snappy={times={[1]=1.90, [2]=0.90, [3]=0.30}, uses=40, maxlevel=3},
|
||||
},
|
||||
damage_groups = {fleshy=7},
|
||||
}
|
||||
})
|
||||
-- Adiciona prefixo indicativo de dado nas espadas
|
||||
minetest.override_item("default:sword_wood", {description=minetest.registered_tools["default:sword_wood"].description.." (Dano 2)"})
|
||||
minetest.override_item("default:sword_stone", {description=minetest.registered_tools["default:sword_stone"].description.." (Dano 3)"})
|
||||
minetest.override_item("default:sword_steel", {description=minetest.registered_tools["default:sword_steel"].description.." (Dano 4)"})
|
||||
minetest.override_item("default:sword_bronze", {description=minetest.registered_tools["default:sword_bronze"].description.." (Dano 5)"})
|
||||
minetest.override_item("default:sword_mese", {description=minetest.registered_tools["default:sword_mese"].description.." (Dano 6)"})
|
||||
minetest.override_item("default:sword_diamond", {description=minetest.registered_tools["default:sword_diamond"].description.." (Dano 7)"})
|
||||
|
||||
-- Adicionar fome ao cavar um item
|
||||
local minerios_fome = {}
|
||||
if minetest.get_modpath("hbhunger") ~= nil then
|
||||
minerios_fome.nodes = {
|
||||
-- Nodes dos minerios e fome retirada
|
||||
["default:stone_with_diamond"] = 5,
|
||||
["default:stone_with_mese"] = 4,
|
||||
["default:stone_with_gold"] = 3,
|
||||
["default:stone_with_copper"] = 2,
|
||||
["default:stone_with_iron"] = 1,
|
||||
}
|
||||
minerios_fome.old_node_dig = minetest.node_dig
|
||||
function minetest.node_dig(pos, node, digger)
|
||||
if minerios_fome.nodes[node.name] then
|
||||
local name = digger:get_player_name()
|
||||
hbhunger.hunger[name] = hbhunger.hunger[name]-minerios_fome.nodes[node.name]
|
||||
end
|
||||
return minerios_fome.old_node_dig(pos, node, digger)
|
||||
end
|
||||
end
|
||||
|
||||
-- Abm que faz nuvem sumir
|
||||
minetest.register_abm({
|
||||
nodenames = {"default:cloud"},
|
||||
interval = 10,
|
||||
chance = 4,
|
||||
action = function(pos)
|
||||
minetest.remove_node(pos)
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
-- Reduz a intensidade de agrupamento de fogo
|
||||
local limite_fogo = 20
|
||||
minetest.register_abm{
|
||||
label = "reduzir fogo",
|
||||
nodenames = {"fire:basic_flame"},
|
||||
interval = 5,
|
||||
chance = 5,
|
||||
action = function(pos)
|
||||
local nds = minetest.find_nodes_in_area({x=pos.x-4, y=pos.y-4, z=pos.z-4}, {x=pos.x+4, y=pos.y+4, z=pos.z+4}, {"fire:basic_flame"})
|
||||
|
||||
-- Verifica se fogo está sob controle
|
||||
if table.maxn(nds) <= limite_fogo then return end
|
||||
|
||||
-- Retirar fogo aleatoriamente até ficar sob controle
|
||||
while table.maxn(nds) > limite_fogo do
|
||||
|
||||
-- Pega um node de fogo aleatorio
|
||||
local i = math.random(1, table.maxn(nds)) -- indice aleatorio da coordenada
|
||||
local nd = nds[i]
|
||||
minetest.remove_node(nd) -- remove fogo
|
||||
-- Remove a coordenada da tabela
|
||||
table.remove(nds, i)
|
||||
end
|
||||
|
||||
|
||||
end,
|
||||
}
|
||||
|
||||
-- Remove o drop de grama seca (mantendo os itens que não são grama, como sementes)
|
||||
for _,grass_name in ipairs({"grass", "dry_grass"}) do
|
||||
for i = 1, 5 do
|
||||
|
||||
local drop = minetest.registered_items["default:"..grass_name.."_"..i].drop
|
||||
|
||||
|
||||
if drop then
|
||||
|
||||
-- Caso tenha uma tabela de itens
|
||||
if drop.items then
|
||||
|
||||
-- Repassa todos os drops exeto o de grama padrão (default:grass_1)
|
||||
local n_items = {}
|
||||
for _,item in ipairs(drop.items) do
|
||||
|
||||
if not string.find(item.items[1], "default:"..grass_name.."_") then
|
||||
table.insert(n_items, item)
|
||||
end
|
||||
end
|
||||
drop.items = n_items
|
||||
|
||||
minetest.override_item("default:"..grass_name.."_"..i, {drop = drop})
|
||||
|
||||
-- Caso só tenha uma string do item
|
||||
elseif string.find(drop, "default:"..grass_name.."_") then
|
||||
minetest.override_item("default:"..grass_name.."_"..i, {drop = ""})
|
||||
end
|
||||
|
||||
-- Caso o valor seja torna drop vazio para evitar drop normal
|
||||
else
|
||||
minetest.override_item("default:"..grass_name.."_"..i, {drop = ""})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
default?
|
||||
doors?
|
||||
farming?
|
||||
flowers?
|
||||
dye?
|
||||
hudbars?
|
||||
3d_armor?
|
||||
shields?
|
||||
tnt?
|
||||
wool?
|
||||
porretes?
|
||||
tradutor?
|
||||
antipvp?
|
||||
sfinv?
|
|
@ -0,0 +1,11 @@
|
|||
--
|
||||
-- Mod Atualizador
|
||||
--
|
||||
-- Para mod doors
|
||||
--
|
||||
|
||||
-- Tirar drop das portas de vidro
|
||||
minetest.override_item("doors:door_glass_a", {drop = ""})
|
||||
minetest.override_item("doors:door_glass_b", {drop = ""})
|
||||
minetest.override_item("doors:door_obsidian_glass_a", {drop = ""})
|
||||
minetest.override_item("doors:door_obsidian_glass_b", {drop = ""})
|
|
@ -0,0 +1,20 @@
|
|||
--
|
||||
-- Mod Atualizador
|
||||
--
|
||||
-- Para mod farming
|
||||
--
|
||||
|
||||
-- Alimentação
|
||||
minetest.override_item("farming:bread", {on_use = minetest.item_eat(3)})
|
||||
|
||||
-- Empilhamento de itens
|
||||
minetest.override_item("farming:bread", {stack_max = 10})
|
||||
|
||||
-- Ajustando Enxadas
|
||||
minetest.override_item("farming:hoe_wood", {max_uses = 10})
|
||||
minetest.override_item("farming:hoe_stone", {max_uses = 20})
|
||||
minetest.override_item("farming:hoe_steel", {max_uses = 100})
|
||||
minetest.override_item("farming:hoe_bronze", {max_uses = 220})
|
||||
minetest.override_item("farming:hoe_mese", {max_uses = 350})
|
||||
minetest.override_item("farming:hoe_diamond", {max_uses = 500})
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
--
|
||||
-- Mod Atualizador
|
||||
--
|
||||
-- Para comidas
|
||||
--
|
||||
|
||||
local register_food = hbhunger.register_food
|
||||
|
||||
if minetest.get_modpath("default") ~= nil then
|
||||
register_food("default:apple", 1)
|
||||
end
|
||||
|
||||
if minetest.get_modpath("farming") ~= nil then
|
||||
register_food("farming:bread", 3)
|
||||
end
|
||||
|
||||
if minetest.get_modpath("creatures") ~= nil then
|
||||
register_food("creatures:flesh", 5)
|
||||
register_food("creatures:meat", 10)
|
||||
end
|
||||
|
||||
if minetest.get_modpath("flowers") ~= nil then
|
||||
register_food("flowers:mushroom_brown", 1)
|
||||
end
|
||||
|
||||
if minetest.get_modpath("macroplantas") ~= nil then
|
||||
if minetest.get_modpath("macroplantas").."/melancia.lua" ~= nil then
|
||||
register_food("macroplantas:pedaco_melancia", 1)
|
||||
end
|
||||
end
|
||||
|
||||
if minetest.get_modpath("oficios:basicos") ~= nil then
|
||||
register_food("oficios_basicos:frutos_selvagens", 1)
|
||||
end
|
||||
|
||||
if minetest.get_modpath("chicken") ~= nil then
|
||||
register_food("creatures:chicken_flesh", 4)
|
||||
register_food("creatures:chicken_meat", 7)
|
||||
end
|
|
@ -0,0 +1,56 @@
|
|||
--
|
||||
-- Mod Atualizador
|
||||
--
|
||||
|
||||
-- Lista de mods para atualizar
|
||||
--[[
|
||||
Para adicionar um novo script de atualização para um mod
|
||||
crie um novo arquivo com o nome do mod (meu_mod.lua) e
|
||||
insira o nome dele na lista abaixo.
|
||||
Traduções não são o foco desse atualizador.
|
||||
]]
|
||||
local lista = {
|
||||
-- Nativos (minetest_game)
|
||||
"doors",
|
||||
"default",
|
||||
"farming",
|
||||
"tnt",
|
||||
"wool",
|
||||
"sfinv",
|
||||
-- Avulsos
|
||||
"creatures",
|
||||
"3d_armor",
|
||||
"antipvp",
|
||||
"mobs",
|
||||
"itemframes",
|
||||
"mesecons",
|
||||
"hbhunger",
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
-- Colocar mods na tabela
|
||||
local mods = {}
|
||||
for i, name in ipairs(minetest.get_modnames()) do
|
||||
mods[name] = true
|
||||
end
|
||||
|
||||
-- Notificador de Inicializador
|
||||
local notificar = function(msg)
|
||||
if minetest.setting_get("log_mods") then
|
||||
minetest.debug("[ATUALIZADOR]"..msg)
|
||||
end
|
||||
end
|
||||
|
||||
local modpath = minetest.get_modpath("atualizador")
|
||||
|
||||
-- Carregar scripts de atualização de cada mod
|
||||
notificar("Carregando...")
|
||||
for i, name in ipairs(lista) do
|
||||
if mods[name] then dofile(modpath.."/"..name..".lua") end
|
||||
end
|
||||
notificar("OK")
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
--
|
||||
-- Mod Atualizador
|
||||
--
|
||||
-- Para mod itemframes
|
||||
--
|
||||
|
||||
-- Remover Receitas
|
||||
minetest.clear_craft({output = 'itemframes:pedestal'}) -- Pedestal
|
||||
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
--
|
||||
-- Mod Atualizador
|
||||
--
|
||||
-- Para modpack mesecons
|
||||
--
|
||||
|
||||
-- FPGA
|
||||
minetest.clear_craft({output = 'mesecons_fpga:fpga0000'})
|
||||
minetest.clear_craft({output = 'mesecons_fpga:programmer'})
|
||||
|
||||
-- Planta que pisca
|
||||
minetest.clear_craft({output = 'mesecons_blinkyplant:blinky_plant_off'})
|
||||
|
||||
-- Detectores
|
||||
minetest.clear_craft({output = 'mesecons_detector:object_detector_off'})
|
||||
minetest.clear_craft({output = 'mesecons_detector:node_detector_off'})
|
||||
|
||||
-- Botao
|
||||
minetest.clear_craft({output = 'mesecons_button:button_off'})
|
||||
|
||||
-- Delayer (temporizador)
|
||||
minetest.clear_craft({output = 'mesecons_delayer:delayer_off_1'})
|
||||
|
||||
-- Portas Lógicas
|
||||
minetest.clear_craft({output = 'mesecons_gates:nand_off'})
|
||||
minetest.clear_craft({output = 'mesecons_gates:diode_off'})
|
||||
minetest.clear_craft({output = 'mesecons_gates:xor_off'})
|
||||
minetest.clear_craft({output = 'mesecons_gates:nor_off'})
|
||||
minetest.clear_craft({output = 'mesecons_gates:not_off'})
|
||||
|
||||
-- Micro Controlador
|
||||
minetest.clear_craft({output = 'mesecons_microcontroller:microcontroller0000'})
|
||||
|
||||
-- Controlador Lua
|
||||
minetest.clear_craft({output = 'mesecons_luacontroller:luacontroller0000'})
|
||||
|
||||
-- Switch
|
||||
minetest.clear_craft({output = 'mesecons_switch:mesecon_switch_off'})
|
||||
|
||||
-- Lavanca
|
||||
minetest.clear_craft({output = 'mesecons_walllever:wall_lever_off'})
|
||||
|
||||
-- Placas de pressao
|
||||
minetest.clear_craft({output = 'mesecons_pressureplates:pressure_plate_stone_off'})
|
||||
minetest.clear_craft({output = 'mesecons_pressureplates:pressure_plate_wood_off'})
|
||||
|
||||
-- Tocha
|
||||
minetest.clear_craft({output = 'mesecons_torch:mesecon_torch_on'})
|
||||
|
||||
-- Planta de força
|
||||
minetest.clear_craft({output = 'mesecons_powerplant:power_plant'})
|
||||
|
||||
-- Turbina de agua
|
||||
minetest.clear_craft({output = 'mesecons_hydroturbine:hydro_turbine_off'})
|
|
@ -0,0 +1,42 @@
|
|||
--
|
||||
-- Mod Atualizador
|
||||
--
|
||||
-- Para mod mobs
|
||||
--
|
||||
|
||||
-- Mobs Redo
|
||||
if mobs and mobs.mod == "redo" then
|
||||
|
||||
-- Remove receitas de itens
|
||||
-- Etiqueta
|
||||
minetest.clear_craft({output = 'mobs:nametag'})
|
||||
-- Laço magico
|
||||
-- minetest.clear_craft({output = 'mobs:magic_lasso'})
|
||||
-- Rede de pegar mobs
|
||||
minetest.clear_craft({output = 'mobs:net'})
|
||||
-- Sela?
|
||||
minetest.clear_craft({output = 'mobs:saddle'})
|
||||
-- Runa protetora?
|
||||
minetest.clear_craft({output = 'mobs:protector'})
|
||||
|
||||
-- Mudando receitas
|
||||
-- Tesoura
|
||||
minetest.clear_craft({output = 'mobs:shears'})
|
||||
minetest.register_craft({
|
||||
output = 'mobs:shears',
|
||||
recipe = {
|
||||
{'', 'default:steel_ingot', ''},
|
||||
{'default:steel_ingot', 'default:steel_ingot', 'group:stick'},
|
||||
{'', 'group:stick', ''},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'mobs:shears',
|
||||
recipe = {
|
||||
{'', 'default:steel_ingot', ''},
|
||||
{'group:stick', 'default:steel_ingot', 'default:steel_ingot'},
|
||||
{'', 'group:stick', ''},
|
||||
}
|
||||
})
|
||||
|
||||
end
|
|
@ -0,0 +1,31 @@
|
|||
--
|
||||
-- Mod Atualizador
|
||||
--
|
||||
-- Para mod sfinv
|
||||
--
|
||||
|
||||
|
||||
-- Altera a aba de craftação do inventario de sobrevivencia
|
||||
sfinv.override_page("sfinv:crafting", {
|
||||
title = "Artesanato",
|
||||
get = function(self, player, context)
|
||||
return sfinv.make_formspec(player, context, [[
|
||||
label[2,0.5;Micro Craftador]
|
||||
list[current_player;craft;2,1;2,1;1]
|
||||
list[current_player;craft;2,2;2,1;4]
|
||||
list[current_player;craftpreview;4.95,1.5;1,1;]
|
||||
image[3.95,1.5;1,1;gui_furnace_arrow_bg.png^[transformR270]
|
||||
listring[current_player;main]
|
||||
listring[current_player;craft]
|
||||
image[0,4.75;1,1;gui_hb_bg.png]
|
||||
image[1,4.75;1,1;gui_hb_bg.png]
|
||||
image[2,4.75;1,1;gui_hb_bg.png]
|
||||
image[3,4.75;1,1;gui_hb_bg.png]
|
||||
image[4,4.75;1,1;gui_hb_bg.png]
|
||||
image[5,4.75;1,1;gui_hb_bg.png]
|
||||
image[6,4.75;1,1;gui_hb_bg.png]
|
||||
image[7,4.75;1,1;gui_hb_bg.png]
|
||||
]], true)
|
||||
end
|
||||
})
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -0,0 +1,76 @@
|
|||
--
|
||||
-- Mod Atualizador
|
||||
--
|
||||
-- Para mod tnt
|
||||
--
|
||||
|
||||
-- Arquivos de audio estão sendo carregados para explosões do explosivo
|
||||
|
||||
local b = true
|
||||
|
||||
local z = function()
|
||||
b = true
|
||||
end
|
||||
|
||||
-- Metodo de explosao original
|
||||
local old_boom = tnt.boom
|
||||
|
||||
-- Evita explosões em massa que travam o servidor
|
||||
tnt.boom = function(pos, def, name)
|
||||
|
||||
-- Pega o nome do explosivo
|
||||
if not name then
|
||||
local node = minetest.get_node(pos)
|
||||
name = string.gsub(node.name, "_burning", "")
|
||||
if minetest.get_node_group(name, "tnt") == 0 then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
-- Verifica se o explosivo ainda esta la
|
||||
local node = minetest.get_node(pos)
|
||||
if string.gsub(node.name, "_burning", "") ~= name then
|
||||
return
|
||||
end
|
||||
|
||||
if b then
|
||||
b = false
|
||||
minetest.after(1, z)
|
||||
return old_boom(pos, def)
|
||||
end
|
||||
|
||||
-- Tenta explodir novamente apos 2 segundos
|
||||
return minetest.after(2, tnt.boom, pos, def, name)
|
||||
end
|
||||
|
||||
-- Limpar explosivos acessos
|
||||
minetest.register_abm({
|
||||
nodenames = {"tnt:tnt_burning"},
|
||||
interval = 15,
|
||||
chance = 4,
|
||||
action = function(pos)
|
||||
minetest.after(15, minetest.remove_node, {x=pos.x,y=pos.y,z=pos.z})
|
||||
end
|
||||
})
|
||||
|
||||
-- Receita de Explosivo TNT
|
||||
minetest.clear_craft({output = 'tnt:tnt'}) -- Remove a padrão
|
||||
minetest.register_craft({
|
||||
output = "tnt:tnt",
|
||||
recipe = {
|
||||
{"farming:cotton", "tnt:gunpowder", "farming:cotton"},
|
||||
{"tnt:gunpowder", "tnt:gunpowder", "tnt:gunpowder"},
|
||||
{"default:paper", "tnt:gunpowder", "default:paper"}
|
||||
}
|
||||
})
|
||||
|
||||
-- Receita de Polvora
|
||||
minetest.clear_craft({output = 'tnt:gunpowder'}) -- Remove a padrão
|
||||
minetest.register_craft({
|
||||
output = "tnt:gunpowder",
|
||||
recipe = {
|
||||
{"default:coal_lump", "default:coal_lump", "default:coal_lump"},
|
||||
{"default:coal_lump", "macronodes:enxofre", "default:coal_lump"},
|
||||
{"default:junglewood", "macronodes:enxofre", "default:junglewood"}
|
||||
}
|
||||
})
|
|
@ -0,0 +1,57 @@
|
|||
--
|
||||
-- Mod Atualizador
|
||||
--
|
||||
-- Para mod wool
|
||||
--
|
||||
|
||||
-- Tabela de tintas do mod wool original
|
||||
local dyes = {
|
||||
{"white", "White", "basecolor_white"},
|
||||
{"grey", "Grey", "basecolor_grey"},
|
||||
{"black", "Black", "basecolor_black"},
|
||||
{"red", "Red", "basecolor_red"},
|
||||
{"yellow", "Yellow", "basecolor_yellow"},
|
||||
{"green", "Green", "basecolor_green"},
|
||||
{"cyan", "Cyan", "basecolor_cyan"},
|
||||
{"blue", "Blue", "basecolor_blue"},
|
||||
{"magenta", "Magenta", "basecolor_magenta"},
|
||||
{"orange", "Orange", "excolor_orange"},
|
||||
{"violet", "Violet", "excolor_violet"},
|
||||
{"brown", "Brown", "unicolor_dark_orange"},
|
||||
{"pink", "Pink", "unicolor_light_red"},
|
||||
{"dark_grey", "Dark Grey", "unicolor_darkgrey"},
|
||||
{"dark_green", "Dark Green", "unicolor_dark_green"},
|
||||
}
|
||||
|
||||
|
||||
-- Receitas
|
||||
minetest.clear_craft({output = 'wool:white'}) -- Remove as recetias de tecido branco
|
||||
for _, row in ipairs(dyes) do
|
||||
|
||||
local name = row[1]
|
||||
if name ~= "white" then
|
||||
|
||||
-- Remove a receita antiga
|
||||
minetest.clear_craft({output = 'wool:'..name})
|
||||
|
||||
-- Cria receitas
|
||||
minetest.register_craft({
|
||||
output = 'wool:'..name,
|
||||
recipe = {
|
||||
{'default:paper','dye:'..name,'default:paper'},
|
||||
{'default:paper','wool:white','default:paper'},
|
||||
{'default:paper','default:paper','default:paper'},
|
||||
}
|
||||
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'wool:white',
|
||||
recipe = {
|
||||
{'default:paper','dye:white','default:paper'},
|
||||
{'default:paper','wool:'..name,'default:paper'},
|
||||
{'default:paper','default:paper','default:paper'},
|
||||
}
|
||||
|
||||
})
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue