Add files via upload
parent
d7bc13c94a
commit
01446ad416
|
@ -0,0 +1,82 @@
|
|||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local minetest, nodecore, pairs
|
||||
= minetest, nodecore, pairs
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
local src = "nc_optics:glass_hot_source"
|
||||
local flow = "nc_optics:glass_hot_flowing"
|
||||
|
||||
local function near(pos, crit)
|
||||
return #nodecore.find_nodes_around(pos, crit, {1, 1, 1}, {1, 0, 1}) > 0
|
||||
end
|
||||
|
||||
|
||||
nodecore.register_lode_anvil_recipe(-1, function(temper)
|
||||
return {
|
||||
label = "anvil making plumbum block",
|
||||
priority = -1,
|
||||
action = "pummel",
|
||||
toolgroups = {thumpy = 3},
|
||||
indexkeys = {modname .. ":drupe"},
|
||||
nodes = {
|
||||
{
|
||||
match = {name = modname .. ":drupe", count = 8},
|
||||
replace = "air"
|
||||
}
|
||||
},
|
||||
items = {
|
||||
modname .. ":block"
|
||||
}
|
||||
}
|
||||
end)
|
||||
|
||||
nodecore.register_craft({
|
||||
label = "melt plumbum",
|
||||
action = "cook",
|
||||
touchgroups = {
|
||||
coolant = 0,
|
||||
flame = 3
|
||||
},
|
||||
duration = 20,
|
||||
cookfx = true,
|
||||
indexkeys = {"group:plumby"},
|
||||
nodes = {
|
||||
{
|
||||
match = modname .. ":block",
|
||||
replace = modname .. ":plumbum_hot_source"
|
||||
}
|
||||
},
|
||||
after = function(pos)
|
||||
nodecore.dnt_set(pos, "fluidwander_glass")
|
||||
end
|
||||
})
|
||||
|
||||
nodecore.register_cook_abm({
|
||||
nodenames = {"group:plumby"},
|
||||
neighbors = {"group:flame"},
|
||||
neighbors_invert = true
|
||||
})
|
||||
|
||||
nodecore.register_craft({
|
||||
label = "cool plum glass",
|
||||
action = "cook",
|
||||
duration = 120,
|
||||
priority = 1,
|
||||
cookfx = {smoke = true, hiss = true},
|
||||
check = function(pos)
|
||||
return not near(pos, {flow})
|
||||
end,
|
||||
indexkeys = {src},
|
||||
nodes = {
|
||||
{
|
||||
match = src,
|
||||
replace = modname .. ":glass"
|
||||
},
|
||||
{
|
||||
y = -1,
|
||||
match = {groups = {plumbum_molten = true}}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local minetest, nodecore, math
|
||||
= minetest, nodecore, math
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
local modname = minetest.get_current_modname()
|
||||
------------------------------------------------------------------------
|
||||
--minetest.register_on_dignode(
|
||||
-- function(pos, oldnode, digger)
|
||||
-- if(oldnode.name == "nc_lode:ore")then
|
||||
-- if(math.random(100) >= 77)then
|
||||
-- local space = minetest.find_node_near(pos,1,"air",false)
|
||||
-- minetest.item_drop(ItemStack(modname .. ":drupe 1"),digger,space or pos)
|
||||
-- else end
|
||||
-- else end
|
||||
-- end)
|
||||
------------------------------------------------------------------------
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:stone"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.008,
|
||||
scale = 0.016,
|
||||
spread = {x = 120, y = 120, z = 120},
|
||||
seed = 2,
|
||||
octaves = 3,
|
||||
persist = 0.66
|
||||
},
|
||||
y_min = -31000,
|
||||
y_max = -80,
|
||||
biomes = {"deep"},
|
||||
schematic = nodecore.plumtree_schematic,
|
||||
flags = "place_center_x, place_center_z, all_floors",
|
||||
rotation = "random",
|
||||
replacements = {}
|
||||
})
|
||||
-----------------------------------------------------------------------
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local include, nodecore
|
||||
= include, nodecore
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
include("plum")
|
||||
include("molten")
|
||||
include("craft")
|
||||
include("schematic")
|
||||
include("grow")
|
|
@ -0,0 +1,5 @@
|
|||
depends = nc_api_all, nc_items, nc_fire, nc_terrain, nc_tree, nc_lode, nc_igneous
|
||||
author = Winter94
|
||||
description =
|
||||
name = wc_plumbum
|
||||
|
|
@ -0,0 +1,145 @@
|
|||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local math, minetest, nodecore
|
||||
= math, minetest, nodecore
|
||||
local math_random
|
||||
= math.random
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
|
||||
----- ----- ----- ----- -----
|
||||
|
||||
local function anim(name, len)
|
||||
return {
|
||||
name = name,
|
||||
animation = {
|
||||
["type"] = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 16
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
local moltdef = {
|
||||
description = "Molten Plumbum",
|
||||
drawtype = "liquid",
|
||||
tiles = {anim("nc_terrain_lava.png^[colorize:plum:100", 8)},
|
||||
special_tiles = {
|
||||
anim("nc_terrain_lava_flow.png^[colorize:plum:100", 8),
|
||||
anim("nc_terrain_lava_flow.png^[colorize:plum:100", 8)
|
||||
},
|
||||
paramtype = "light",
|
||||
liquid_viscosity = 9,
|
||||
liquid_renewable = false,
|
||||
liquid_range = 2,
|
||||
light_source = 8,
|
||||
walkable = false,
|
||||
buildable_to = false,
|
||||
drowning = 2,
|
||||
damage_per_second = 3,
|
||||
drop = "",
|
||||
groups = {
|
||||
igniter = 1,
|
||||
plumby = 1,
|
||||
plumbum_molten = 1,
|
||||
stack_as_node = 1,
|
||||
damage_touch = 1,
|
||||
damage_radiant = 5
|
||||
},
|
||||
stack_max = 1,
|
||||
-- post_effect_color = {a = 140, r = 0, g = 225, b = 255},
|
||||
liquid_alternative_flowing = modname .. ":plumbum_hot_flowing",
|
||||
liquid_alternative_source = modname .. ":plumbum_hot_source",
|
||||
sounds = nodecore.sounds("nc_terrain_bubbly")
|
||||
}
|
||||
|
||||
minetest.register_node(modname .. ":plumbum_hot_source",
|
||||
nodecore.underride({
|
||||
liquidtype = "source"
|
||||
}, moltdef))
|
||||
minetest.register_node(modname .. ":plumbum_hot_flowing",
|
||||
nodecore.underride({
|
||||
liquidtype = "flowing",
|
||||
drawtype = "flowingliquid",
|
||||
paramtype2 = "flowingliquid"
|
||||
}, moltdef))
|
||||
|
||||
nodecore.register_ambiance({
|
||||
label = "adamant source ambiance",
|
||||
nodenames = {modname .. ":plumbum_hot_source"},
|
||||
neigbors = {"air"},
|
||||
interval = 1,
|
||||
chance = 10,
|
||||
sound_name = "nc_terrain_bubbly",
|
||||
sound_gain = 0.2
|
||||
})
|
||||
nodecore.register_ambiance({
|
||||
label = "adamant flow ambiance",
|
||||
nodenames = {modname .. ":plumbum_hot_flowing"},
|
||||
neigbors = {"air"},
|
||||
interval = 1,
|
||||
chance = 10,
|
||||
sound_name = "nc_terrain_bubbly",
|
||||
sound_gain = 0.2
|
||||
})
|
||||
|
||||
|
||||
local src = modname .. ":plumbum_hot_source"
|
||||
local flow = modname .. ":plumbum_hot_flowing"
|
||||
|
||||
local function near(pos, crit)
|
||||
return #nodecore.find_nodes_around(pos, crit, {1, 1, 1}, {1, 0, 1}) > 0
|
||||
end
|
||||
|
||||
nodecore.register_craft({
|
||||
label = "cool plumbum",
|
||||
action = "cook",
|
||||
priority = -1,
|
||||
duration = 240,
|
||||
cookfx = {smoke = true, hiss = true},
|
||||
check = function(pos)
|
||||
return not near(pos, {flow})
|
||||
end,
|
||||
indexkeys = {src},
|
||||
nodes = {
|
||||
{
|
||||
match = src,
|
||||
replace = modname .. ":block"
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
nodecore.register_craft({
|
||||
label = "quench plumbum",
|
||||
action = "cook",
|
||||
cookfx = true,
|
||||
check = function(pos)
|
||||
return near(pos, {flow})
|
||||
and nodecore.quenched(pos)
|
||||
end,
|
||||
indexkeys = {src},
|
||||
nodes = {
|
||||
{
|
||||
match = src,
|
||||
replace = modname .. ":block"
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
nodecore.register_cook_abm({nodenames = {src}})
|
||||
|
||||
nodecore.register_fluidwandering(
|
||||
"plumbum",
|
||||
{src},
|
||||
2,
|
||||
function(pos, _, gen)
|
||||
if gen < 16 or math_random(1, 2) == 1 then return end
|
||||
minetest.set_node(pos, {name = modname .. ":block"})
|
||||
nodecore.sound_play("nc_api_craft_hiss", {gain = 1, pos = pos})
|
||||
nodecore.smokefx(pos, 0.2, 80)
|
||||
-- nodecore.fallcheck(pos)
|
||||
return true
|
||||
end
|
||||
)
|
|
@ -0,0 +1,88 @@
|
|||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local minetest, nodecore, pairs
|
||||
= minetest, nodecore, pairs
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
local modname = minetest.get_current_modname()
|
||||
------------------------------------------------------------------------
|
||||
local rootname = modname.. ":root"
|
||||
local treeroots = "nc_tree:root"
|
||||
local rootdef = nodecore.underride({
|
||||
description = "Plum Roots",
|
||||
color = "magenta"
|
||||
}, minetest.registered_items[treeroots] or {})
|
||||
minetest.register_node(rootname, rootdef)
|
||||
------------------------------------------------------------------------
|
||||
local trunkname = modname.. ":tree"
|
||||
local treetrunk = "nc_tree:tree"
|
||||
local trunkdef = nodecore.underride({
|
||||
description = "Plum Tree",
|
||||
color = "magenta"
|
||||
}, minetest.registered_items[treetrunk] or {})
|
||||
minetest.register_node(trunkname, trunkdef)
|
||||
------------------------------------------------------------------------
|
||||
local leafname = modname.. ":leaves"
|
||||
local treeleaf = "nc_tree:leaves"
|
||||
local leafdef = nodecore.underride({
|
||||
description = "Plum Leaves",
|
||||
color = "magenta",
|
||||
groups = {leaf_decay = 0}
|
||||
}, minetest.registered_items[treeleaf] or {})
|
||||
minetest.register_node(leafname, leafdef)
|
||||
------------------------------------------------------------------------
|
||||
minetest.register_node(modname.. ":drupe", {
|
||||
description = "Drupe",
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
paramtype2 = "meshoptions",
|
||||
waving = 2,
|
||||
-- visual_scale = 0.5,
|
||||
wield_scale = {x = 0.75, y = 0.75, z = 1.5},
|
||||
-- collision_box = nodecore.fixedbox(-3/16, -0.5, -3/16, 3/16, 0, 3/16),
|
||||
-- selection_box = nodecore.fixedbox(-3/16, -0.5, -3/16, 3/16, 0, 3/16),
|
||||
inventory_image = modname.. "_drupe.png",
|
||||
wield_image = modname.. "_drupe.png",
|
||||
tiles = {modname.. "_drupe.png^(nc_tree_eggcorn_planted.png^[transformFY)"},
|
||||
-- color = "blueviolet",
|
||||
groups = {
|
||||
snappy = 1,
|
||||
plumby = 1,
|
||||
lux_absorb = 20
|
||||
},
|
||||
node_placement_prediction = "nc_items:stack",
|
||||
place_as_item = true,
|
||||
sounds = nodecore.sounds("nc_lode_annealed")
|
||||
})
|
||||
------------------------------------------------------------------------
|
||||
minetest.register_node(modname .. ":block", {
|
||||
description = "Plumbum Block",
|
||||
tiles = {"nc_lode_annealed.png"},
|
||||
color = "plum",
|
||||
groups = {
|
||||
cracky = 2,
|
||||
lux_absorb = 64,
|
||||
plumby = 1
|
||||
},
|
||||
sounds = nodecore.sounds("nc_lode_annealed")
|
||||
})
|
||||
------------------------------------------------------------------------
|
||||
minetest.register_node(modname .. ":glass", {
|
||||
description = "Plum Glass",
|
||||
drawtype = "glasslike_framed",
|
||||
tiles = {
|
||||
"nc_optics_glass_glare.png^nc_optics_glass_edges.png",
|
||||
"nc_optics_glass_glare.png"
|
||||
},
|
||||
color = "plum",
|
||||
groups = {
|
||||
silica = 1,
|
||||
silica_clear = 1,
|
||||
cracky = 3,
|
||||
scaling_time = 300,
|
||||
lux_absorb = 40,
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
sounds = nodecore.sounds("nc_optics_glassy")
|
||||
})
|
||||
------------------------------------------------------------------------
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local minetest, nodecore
|
||||
= minetest, nodecore
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
|
||||
local root = {
|
||||
".....",
|
||||
".....",
|
||||
"..r..",
|
||||
".....",
|
||||
".....",
|
||||
}
|
||||
local trunk = {
|
||||
".....",
|
||||
".....",
|
||||
"..t..",
|
||||
".....",
|
||||
".....",
|
||||
}
|
||||
local bot = {
|
||||
".ddd.",
|
||||
"debed",
|
||||
"dbtbd",
|
||||
"debed",
|
||||
".ddd.",
|
||||
}
|
||||
local low = {
|
||||
".lll.",
|
||||
"lebel",
|
||||
"lbtbl",
|
||||
"lebel",
|
||||
".lll.",
|
||||
}
|
||||
local hi = {
|
||||
".lll.",
|
||||
"llell",
|
||||
"lebel",
|
||||
"llell",
|
||||
".lll.",
|
||||
}
|
||||
local top = {
|
||||
".....",
|
||||
".lll.",
|
||||
".lll.",
|
||||
".lll.",
|
||||
".....",
|
||||
}
|
||||
|
||||
nodecore.plumtree_params = {
|
||||
{},
|
||||
{
|
||||
prob = 160
|
||||
},
|
||||
{
|
||||
prob = 160
|
||||
},
|
||||
{
|
||||
leaves = 2,
|
||||
prob = 160
|
||||
},
|
||||
{
|
||||
leaves = 4
|
||||
},
|
||||
{
|
||||
leaves = 4,
|
||||
prob = 160
|
||||
},
|
||||
{
|
||||
leaves = 6,
|
||||
notrunk = true,
|
||||
prob = 160
|
||||
},
|
||||
{
|
||||
leaves = 2,
|
||||
notrunk = true
|
||||
}
|
||||
}
|
||||
|
||||
nodecore.plumtree_schematic = nodecore.ezschematic(
|
||||
{
|
||||
["."] = {name = "air", prob = 0},
|
||||
r = {name = modname .. ":root", prob = 255, force_place = true},
|
||||
t = {name = modname .. ":tree", prob = 255},
|
||||
b = {name = modname .. ":leaves", param2 = 2, prob = 255},
|
||||
e = {name = modname .. ":leaves", param2 = 1, prob = 255},
|
||||
l = {name = modname .. ":leaves", prob = 240},
|
||||
d = {name = modname .. ":drupe", prob = 10, param2 = 10}
|
||||
},
|
||||
{
|
||||
root,
|
||||
trunk,
|
||||
trunk,
|
||||
trunk,
|
||||
bot,
|
||||
low,
|
||||
hi,
|
||||
top
|
||||
},
|
||||
{
|
||||
yslice_prob = {
|
||||
{ypos = 1, prob = 255},
|
||||
{ypos = 2, prob = 160},
|
||||
{ypos = 3, prob = 160},
|
||||
{ypos = 4, prob = 160},
|
||||
{ypos = 5, prob = 200},
|
||||
{ypos = 6, prob = 160},
|
||||
{ypos = 7, prob = 255},
|
||||
}
|
||||
}
|
||||
)
|
Binary file not shown.
After Width: | Height: | Size: 541 B |
Loading…
Reference in New Issue