lot of new features & addons

master
runs 2022-01-25 00:07:28 +01:00
parent 555fa22237
commit 94da77c278
358 changed files with 1839 additions and 514 deletions

24
minetest.conf Normal file
View File

@ -0,0 +1,24 @@
# Temperature variation for biomes.
# type: noise_params_2d
mg_biome_np_heat = {
offset = 50,
scale = 50,
spread = (384, 384, 384),
seed = 5349,
octaves = 3,
persistence = 0.5,
lacunarity = 2.0,
flags = eased
}
# Humidity variation for biomes.
# type: noise_params_2d
mg_biome_np_humidity = {
offset = 50,
scale = 50,
spread = (384, 384, 384),
seed = 842,
octaves = 3,
persistence = 0.5,
lacunarity = 2.0,
flags = eased
}

30
mods/.luacheckrc Normal file
View File

@ -0,0 +1,30 @@
unused_args = false
allow_defined_top = false
max_line_length = false
globals = {
"furn",
"minetest",
"nodez",
"player_api",
"samz",
"sfinv",
"sound",
"stairs",
"svrz",
"treez",
"wield3d"
}
read_globals = {
string = {fields = {"split"}},
table = {fields = {"copy", "getn"}},
-- Builtin
"vector", "ItemStack",
"dump", "DIR_DELIM", "VoxelArea", "Settings",
-- MTG
"default", "sfinv", "creative",
}

View File

@ -1,6 +1,8 @@
local modname = minetest.get_current_modname()
local S = minetest.get_translator(modname)
minetest.register_node("chest:chest", {
description = "Chest" .. "\n" ..
"32 inventory slots",
description = S("Chest"),
tiles ={"chest_chest.png^[sheet:2x2:0,0", "chest_chest.png^[sheet:2x2:0,0",
"chest_chest.png^[sheet:2x2:1,0", "chest_chest.png^[sheet:2x2:1,0",
"chest_chest.png^[sheet:2x2:1,0", "chest_chest.png^[sheet:2x2:0,1"},
@ -14,7 +16,7 @@ minetest.register_node("chest:chest", {
"list[current_name;main;0,0;8,4;]"..
"list[current_player;main;0,5;8,4;]" ..
"listring[]")
meta:set_string("infotext", "Chest")
meta:set_string("infotext", S("Chest"))
local inv = meta:get_inventory()
inv:set_size("main", 8*4)
end,
@ -24,17 +26,23 @@ minetest.register_node("chest:chest", {
return inv:is_empty("main")
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
minetest.chat_send_player(player:get_player_name(), "Allow put: " .. stack:to_string())
return stack:get_count()
end,
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
minetest.chat_send_player(player:get_player_name(), "Allow take: " .. stack:to_string())
return stack:get_count()
end,
on_metadata_inventory_put = function(pos, listname, index, stack, player)
minetest.chat_send_player(player:get_player_name(), "On put: " .. stack:to_string())
end,
on_metadata_inventory_take = function(pos, listname, index, stack, player)
minetest.chat_send_player(player:get_player_name(), "On take: " .. stack:to_string())
end,
})
minetest.register_craft({
output = "chest:chest 1",
type = "shaped",
recipe = {
{"group:wood", "group:wood",
"group:wood"},{"group:wood", "", ""},
{"", "", ""},
}
})

View File

@ -0,0 +1,2 @@
# textdomain: chest
Chest=Cofre

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 B

After

Width:  |  Height:  |  Size: 751 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 758 B

442
mods/furnace/init.lua Normal file
View File

@ -0,0 +1,442 @@
-- Furnace
furn = {}
local modname = minetest.get_current_modname()
local S = minetest.get_translator(modname)
--
-- Formspecs
--
function furn.get_furnace_active_formspec(fuel_percent, item_percent)
return "size[8,8.5]"..
"list[context;src;2.75,0.5;1,1;]"..
"list[context;fuel;2.75,2.5;1,1;]"..
"image[2.75,1.5;1,1;furn_furnace_fire_bg.png^[lowpart:"..
(fuel_percent)..":furn_furnace_fire_fg.png]"..
"image[3.75,1.5;1,1;furn_furnace_arrow_bg.png^[lowpart:"..
(item_percent)..":furn_furnace_arrow_fg.png^[transformR270]"..
"list[context;dst;4.75,0.96;2,2;]"..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
"listring[context;dst]"..
"listring[current_player;main]"..
"listring[context;src]"..
"listring[current_player;main]"..
"listring[context;fuel]"..
"listring[current_player;main]"
end
function furn.get_furnace_inactive_formspec()
return "size[8,8.5]"..
"list[context;src;2.75,0.5;1,1;]"..
"list[context;fuel;2.75,2.5;1,1;]"..
"image[2.75,1.5;1,1;furn_furnace_fire_bg.png]"..
"image[3.75,1.5;1,1;furn_furnace_arrow_bg.png^[transformR270]"..
"list[context;dst;4.75,0.96;2,2;]"..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
"listring[context;dst]"..
"listring[current_player;main]"..
"listring[context;src]"..
"listring[current_player;main]"..
"listring[context;fuel]"..
"listring[current_player;main]"
end
--
-- Node callback functions that are the same for active and inactive furnace
--
local function can_dig(pos, player)
local meta = minetest.get_meta(pos);
local inv = meta:get_inventory()
return inv:is_empty("fuel") and inv:is_empty("dst") and inv:is_empty("src")
end
local function allow_metadata_inventory_put(pos, listname, index, stack, player)
if minetest.is_protected(pos, player:get_player_name()) then
return 0
end
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if listname == "fuel" then
if minetest.get_craft_result({method="fuel", width=1, items={stack}}).time ~= 0 then
if inv:is_empty("src") then
meta:set_string("infotext", S("Furnace is empty"))
end
return stack:get_count()
else
return 0
end
elseif listname == "src" then
return stack:get_count()
elseif listname == "dst" then
return 0
end
end
local function allow_metadata_inventory_move(pos, from_list, from_index, to_list, to_index, count, player)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local stack = inv:get_stack(from_list, from_index)
return allow_metadata_inventory_put(pos, to_list, to_index, stack, player)
end
local function allow_metadata_inventory_take(pos, listname, index, stack, player)
if minetest.is_protected(pos, player:get_player_name()) then
return 0
end
return stack:get_count()
end
local function swap_node(pos, name)
local node = minetest.get_node(pos)
if node.name == name then
return
end
node.name = name
minetest.swap_node(pos, node)
end
--Smoke, start & stop functions
local function start_smoke(pos)
local id = minetest.add_particlespawner({
amount = 3,
time = 0,
minpos = {
x = pos.x-0.25,
y = pos.y+0.5,
z = pos.z-0.25,
},
maxpos = {
x = pos.x+0.25,
y = pos.y+0.5,
z = pos.z+0.25,
},
minvel = {x=0, y=0.25, z=0},
maxvel = {x=0, y=0.5, z=0},
--minacc = {x=1, y=0, z=1},
--maxacc = {x=1, y=0, z=1},
minexptime = 2,
maxexptime = 4,
minsize = 0.5,
maxsize = 2.0,
collisiondetection = false,
vertical = true,
texture = "furn_smoke.png",
glow = 14
})
return id
end
local function stop_smoke(pos)
local meta = minetest.get_meta(pos)
local smoke_id = meta:get_int("smoke_id") or 0
if (smoke_id > 0) then --Stop Smoke
minetest.delete_particlespawner(smoke_id)
meta:set_int("smoke_id", 0)
end
end
local function furnace_node_timer(pos, elapsed)
--
-- Initialize metadata
--
local meta = minetest.get_meta(pos)
local fuel_time = meta:get_float("fuel_time") or 0
local src_time = meta:get_float("src_time") or 0
local fuel_totaltime = meta:get_float("fuel_totaltime") or 0
local inv = meta:get_inventory()
local srclist, fuellist
local dst_full = false
local timer_elapsed = meta:get_int("timer_elapsed") or 0
meta:set_int("timer_elapsed", timer_elapsed + 1)
local cookable, cooked
local fuel
local update = true
while elapsed > 0 and update do
update = false
srclist = inv:get_list("src")
fuellist = inv:get_list("fuel")
--
-- Cooking
--
-- Check if we have cookable content
local aftercooked
cooked, aftercooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
cookable = cooked.time ~= 0
local el = math.min(elapsed, fuel_totaltime - fuel_time)
if cookable then -- fuel lasts long enough, adjust el to cooking duration
el = math.min(el, cooked.time - src_time)
end
-- Check if we have enough fuel to burn
if fuel_time < fuel_totaltime then
-- The furnace is currently active and has enough fuel
fuel_time = fuel_time + el
-- If there is a cookable item then check if it is ready yet
if cookable then
src_time = src_time + el
if src_time >= cooked.time then
-- Place result in dst list if possible
if inv:room_for_item("dst", cooked.item) then
inv:add_item("dst", cooked.item)
inv:set_stack("src", 1, aftercooked.items[1])
src_time = src_time - cooked.time
update = true
else
dst_full = true
end
-- Play cooling sound
minetest.sound_play("furn.cool_lava",
{pos = pos, max_hear_distance = 16, gain = 0.1}, true)
else
-- Item could not be cooked: probably missing fuel
update = true
end
end
else
-- Furnace ran out of fuel
if cookable then
-- We need to get new fuel
local afterfuel
fuel, afterfuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist})
if fuel.time == 0 then
-- No valid fuel in fuel list
fuel_totaltime = 0
src_time = 0
else
-- prevent blocking of fuel inventory (for automatization mods)
local is_fuel = minetest.get_craft_result({method = "fuel", width = 1, items = {afterfuel.items[1]:to_string()}})
if is_fuel.time == 0 then
table.insert(fuel.replacements, afterfuel.items[1])
inv:set_stack("fuel", 1, "")
else
-- Take fuel from fuel list
inv:set_stack("fuel", 1, afterfuel.items[1])
end
-- Put replacements in dst list or drop them on the furnace.
local replacements = fuel.replacements
if replacements[1] then
local leftover = inv:add_item("dst", replacements[1])
if not leftover:is_empty() then
local above = vector.new(pos.x, pos.y + 1, pos.z)
local drop_pos = minetest.find_node_near(above, 1, {"air"}) or above
minetest.item_drop(replacements[1], nil, drop_pos)
end
end
update = true
fuel_totaltime = fuel.time + (fuel_totaltime - fuel_time)
end
else
-- We don't need to get new fuel since there is no cookable item
fuel_totaltime = 0
src_time = 0
end
fuel_time = 0
end
elapsed = elapsed - el
end
if fuel and fuel_totaltime > fuel.time then
fuel_totaltime = fuel.time
end
if srclist and srclist[1]:is_empty() then
src_time = 0
end
--
-- Update formspec, infotext and node
--
local formspec
local item_state
local item_percent = 0
if cookable then
item_percent = math.floor(src_time / cooked.time * 100)
if dst_full then
item_state = S("100% (output full)")
else
item_state = S("@1%", item_percent)
end
else
if srclist and not srclist[1]:is_empty() then
item_state = S("Not cookable")
else
item_state = S("Empty")
end
end
local fuel_state = S("Empty")
local active = false
local result = false
local smoke_id = meta:get_int("smoke_id") or 0
if fuel_totaltime ~= 0 then
active = true
local fuel_percent = 100 - math.floor(fuel_time / fuel_totaltime * 100)
fuel_state = S("@1%", fuel_percent)
formspec = furn.get_furnace_active_formspec(fuel_percent, item_percent)
swap_node(pos, "furn:furnace_active")
if smoke_id <= 0 then --Start Smoke
smoke_id = start_smoke(pos)
meta:set_int("smoke_id", smoke_id)
--minetest.chat_send_all(tostring(fuel_time))
end
-- make sure timer restarts automatically
result = true
-- Play sound every 5 seconds while the furnace is active
if timer_elapsed == 0 or (timer_elapsed+1) % 5 == 0 then
minetest.sound_play("furn_furnace_active",
{pos = pos, max_hear_distance = 16, gain = 0.5}, true)
end
else
if fuellist and not fuellist[1]:is_empty() then
fuel_state = S("@1%", 0)
end
formspec = furn.get_furnace_inactive_formspec()
swap_node(pos, "furn:furnace")
stop_smoke(pos)
-- stop timer on the inactive furnace
minetest.get_node_timer(pos):stop()
meta:set_int("timer_elapsed", 0)
end
local infotext
if active then
infotext = S("Furnace active")
else
infotext = S("Furnace inactive")
end
infotext = infotext .. "\n" .. S("(Item: @1; Fuel: @2)", item_state, fuel_state)
--
-- Set meta values
--
meta:set_float("fuel_totaltime", fuel_totaltime)
meta:set_float("fuel_time", fuel_time)
meta:set_float("src_time", src_time)
meta:set_string("formspec", formspec)
meta:set_string("infotext", infotext)
return result
end
local function start_timer(pos)
local meta = minetest.get_meta(pos)
meta:set_int("smoke_id", 0)
minetest.get_node_timer(pos):start(1.0)
end
--
-- Node definitions
--
minetest.register_node("furn:furnace", {
description = S("Furnace"),
tiles = {
"furn_furnace_top.png", "furn_furnace_bottom.png",
"furn_furnace_side.png", "furn_furnace_side.png",
"furn_furnace_side.png", "furn_furnace_front.png"
},
paramtype2 = "facedir",
groups = {cracky=2},
legacy_facedir_simple = true,
is_ground_content = false,
sounds = sound.stone(),
can_dig = can_dig,
on_timer = furnace_node_timer,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size('src', 1)
inv:set_size('fuel', 1)
inv:set_size('dst', 4)
furnace_node_timer(pos, 0)
end,
on_metadata_inventory_move = function(pos)
start_timer(pos)
end,
on_metadata_inventory_put = function(pos)
-- start timer function, it will sort out whether furnace can burn or not.
start_timer(pos)
end,
on_metadata_inventory_take = function(pos)
-- check whether the furnace is empty or not.
start_timer(pos)
end,
on_blast = function(pos)
stop_smoke(pos)
local drops = {}
furn.get_inventory_drops(pos, "src", drops)
furn.get_inventory_drops(pos, "fuel", drops)
furn.get_inventory_drops(pos, "dst", drops)
drops[#drops+1] = "furn.furnace"
minetest.remove_node(pos)
return drops
end,
allow_metadata_inventory_put = allow_metadata_inventory_put,
allow_metadata_inventory_move = allow_metadata_inventory_move,
allow_metadata_inventory_take = allow_metadata_inventory_take,
})
minetest.register_node("furn:furnace_active", {
description = S("Furnace"),
tiles = {
"furn_furnace_top.png", "furn_furnace_bottom.png",
"furn_furnace_side.png", "furn_furnace_side.png",
"furn_furnace_side.png",
{
image = "furn_furnace_front_active.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 1.5
},
}
},
paramtype2 = "facedir",
light_source = 8,
drop = "furn:furnace",
groups = {cracky=2, not_in_creative_inventory=1},
legacy_facedir_simple = true,
is_ground_content = false,
on_timer = furnace_node_timer,
can_dig = can_dig,
allow_metadata_inventory_put = allow_metadata_inventory_put,
allow_metadata_inventory_move = allow_metadata_inventory_move,
allow_metadata_inventory_take = allow_metadata_inventory_take,
})
minetest.register_craft({
output = "furn:furnace 1",
type = "shaped",
recipe = {
{"group:stone", "group:stone",
"group:stone"},{"group:stone", "", ""},
{"", "", ""},
}
})

View File

@ -0,0 +1,9 @@
# textdomain: furn
(Item: @1; Fuel: @2)=(Producto: @1; Fuel: @2)
100% (output full)=100% (salida llena)
Empty=Vacío
Furnace=Horno
Furnace active=Horno activo
Furnace inactive=Horno inactivo
Furnace is empty=El horno está vacío
Not cookable=No cocinable

2
mods/furnace/mod.conf Normal file
View File

@ -0,0 +1,2 @@
name = furn
description = A furnace

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 727 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

@ -1,3 +1,5 @@
local mg_name = minetest.get_mapgen_setting("mg_name")
--
-- Aliases for map generator outputs
--
@ -51,6 +53,10 @@ end
-- Register biomes for biome API
--
if mg_name == "v6" or mg_name == "singlenode" then
return
end
minetest.clear_registered_biomes()
minetest.clear_registered_decorations()
@ -66,7 +72,7 @@ minetest.register_biome({
node_dungeon_alt = "nodez:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = 31000,
y_min = 4,
y_min = 1,
heat_point = 50,
humidity_point = 50,
})
@ -83,12 +89,30 @@ minetest.register_biome({
node_dungeon = "nodez:cobble",
node_dungeon_alt = "nodez:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = 3,
y_max = 0,
y_min = -255,
heat_point = 50,
humidity_point = 50,
})
minetest.register_biome({
name = "beach",
node_top = "nodez:sand",
depth_top = 1,
node_filler = "nodez:sand",
depth_filler = 3,
node_riverbed = "nodez:sand",
depth_riverbed = 2,
node_cave_liquid = "nodez:water_source",
node_dungeon = "nodez:cobble",
node_dungeon_alt = "nodez:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = 3,
y_min = -255,
heat_point = 55,
humidity_point = 55,
})
minetest.register_biome({
name = "grassland_under",
node_cave_liquid = {"nodez:water_source", "nodez:lava_source"},
@ -100,3 +124,98 @@ minetest.register_biome({
heat_point = 50,
humidity_point = 50,
})
--Clay
minetest.register_decoration({
decoration = "nodez:clay",
deco_type = "simple",
place_on = {"nodez:dirt_with_grass", "nodez:sand"},
sidelen = 16,
fill_ratio = 0.1,
biomes = {"forest", "forest_ocean", "beach"},
noise_params = {
offset = 0.005,
scale = 0.008,
spread = {x = 250, y = 250, z = 250},
seed = 222,
octaves = 3,
persist = 0.66
},
y_min = 0,
y_max = 1,
spawn_by = "nodez:water_source",
num_spawn_by = 1,
place_offset_y = -1,
flags = "place_center_x, place_center_z, force_placement",
})
minetest.register_decoration({
decoration = "nodez:clay",
deco_type = "simple",
place_on = {"nodez:dirt_with_grass", "nodez:sand"},
sidelen = 16,
fill_ratio = 0.1,
biomes = {"forest", "forest_ocean", "beach"},
noise_params = {
offset = 0.5,
scale = 0.8,
spread = {x = 250, y = 250, z = 250},
seed = 222,
octaves = 3,
persist = 0.66
},
y_min = 0,
y_max = 1,
spawn_by = "nodez:clay",
num_spawn_by = 1,
place_offset_y = -1,
flags = "place_center_x, place_center_z, force_placement",
})
--Snow
minetest.register_decoration({
decoration = "nodez:dirt_with_snow",
deco_type = "simple",
place_on = {"nodez:dirt_with_grass"},
sidelen = 16,
fill_ratio = 0.1,
biomes = {"forest", "beach"},
noise_params = {
offset = 0.5,
scale = 0.8,
spread = {x = 250, y = 250, z = 250},
seed = 672,
octaves = 3,
persist = 0.66
},
y_min = 65,
y_max = 200,
place_offset_y = -1,
flags = "place_center_x, place_center_z, force_placement",
})
minetest.register_decoration({
decoration = "nodez:dirt_with_snow",
deco_type = "simple",
place_on = {"nodez:dirt_with_grass"},
sidelen = 16,
fill_ratio = 0.1,
biomes = {"forest", "beach"},
noise_params = {
offset = 0.5,
scale = 5.0,
spread = {x = 250, y = 250, z = 250},
seed = 91,
octaves = 3,
persist = 0.66
},
y_min = 65,
y_max = 200,
spawn_by = "nodez:dirt_with_snow",
num_spawn_by = 1,
place_offset_y = -1,
flags = "place_center_x, place_center_z, force_placement",
})

View File

@ -2,16 +2,98 @@ local S = ...
minetest.register_node("nodez:dirt", {
description = S("Dirt"),
tiles ={"default_dirt.png"},
groups = {crumbly=3, soil=1},
tiles = {"nodez_dirt.png"},
groups = {crumbly=3, dirt=1, soil=1},
sounds = sound.dirt(),
})
minetest.register_node("nodez:dirt_with_grass", {
description = S("Dirt with Grass"),
tiles ={"default_grass.png",
tiles ={"nodez_grass.png",
-- a little dot on the bottom to distinguish it from dirt
"default_dirt.png^basenodes_dirt_with_grass_bottom.png",
{name = "default_dirt.png^default_grass_side.png",
"nodez_dirt.png",
{name = "nodez_dirt.png^nodez_grass_side.png",
tileable_vertical = false}},
groups = {crumbly=3, soil=1},
groups = {crumbly=3, dirt=1, soil=1},
sounds = sound.dirt(),
})
--Snow
minetest.register_node("nodez:dirt_with_snow", {
description = S("Dirt with Snow"),
tiles = {"nodez_snow.png", "nodez_dirt.png",
{name = "nodez_dirt.png^nodez_snow_side.png",
tileable_vertical = false}},
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1, snowy = 1},
drop = "nodez:dirt",
sounds = sound.dirt({
footstep = {name = "sound_snow_footstep", gain = 0.2},
}),
})
--Pottery
minetest.register_node("nodez:clay", {
description = S("Clay"),
tiles ={"nodez_clay.png"},
groups = {crumbly=2},
sounds = sound.dirt(),
})
minetest.register_craftitem("nodez:clay_lump", {
description = S("Clay Lump"),
inventory_image = "nodez_clay_lump.png"
})
minetest.register_craft({
output = "nodez:clay 1",
type = "shapeless",
recipe = {
"nodez:clay_lump", "nodez:clay_lump",
"nodez:clay_lump", "nodez:clay_lump",
}
})
minetest.register_craft({
output = "nodez:clay 1",
type = "shapeless",
recipe = {"group:water", "group:dirt"}
})
minetest.register_craft({
type = "shapeless",
output = "nodez:clay_lump 4",
recipe = {"nodez:clay"}
})
--Clay Bricks
minetest.register_craftitem("nodez:clay_brick", {
description = S("Clay Brick"),
inventory_image = "nodez_clay_brick.png"
})
minetest.register_craft({
type = "cooking",
output = "nodez:clay_brick",
recipe = "nodez:clay_lump",
cooktime = 7,
})
minetest.register_node("nodez:clay_bricks", {
description = S("Clay Bricks"),
tiles ={"nodez_clay_bricks.png"},
groups = {crumbly=2},
sounds = sound.dirt(),
})
minetest.register_craft({
output = "nodez:clay_bricks 1",
type = "shapeless",
recipe = {
"nodez:clay_brick", "nodez:clay_brick",
"nodez:clay_brick", "nodez:clay_brick",
}
})

View File

@ -7,10 +7,10 @@ minetest.register_node("nodez:lava_flowing", {
"4 damage per second".."\n"..
"Drowning damage: 1",
drawtype = "flowingliquid",
tiles = {"default_lava_flowing.png"},
tiles = {"nodez_lava_flowing.png"},
special_tiles = {
{name="default_lava_flowing.png", backface_culling = false},
{name="default_lava_flowing.png", backface_culling = false},
{name="nodez_lava_flowing.png", backface_culling = false},
{name="nodez_lava_flowing.png", backface_culling = false},
},
paramtype = "light",
light_source = minetest.LIGHT_MAX,
@ -34,10 +34,10 @@ minetest.register_node("nodez:lava_source", {
"4 damage per second".."\n"..
"Drowning damage: 1",
drawtype = "liquid",
tiles = { "default_lava.png" },
tiles = { "nodez_lava.png" },
special_tiles = {
{name = "default_lava.png", backface_culling = false},
{name = "default_lava.png", backface_culling = true},
{name = "nodez_lava.png", backface_culling = false},
{name = "nodez_lava.png", backface_culling = true},
},
paramtype = "light",
light_source = minetest.LIGHT_MAX,

View File

@ -1,4 +1,8 @@
# textdomain: nodez
Clay=Arcilla
Clay Brick=Ladrillo
Clay Bricks=Bloque de ladrillos
Clay Lump=Trozo de arcilla
Cobblestone=Empedrado
Dirt=Tierra
Dirt with Grass=Tierra con pasto
@ -12,5 +16,3 @@ River Water Source=Fuente de agua de río
Sand=Arena
Stone=Piedra
Water Source=Fuente de agua

View File

@ -2,12 +2,7 @@ local S = ...
minetest.register_node("nodez:sand", {
description = S("Sand"),
tiles ={"default_sand.png"},
groups = {crumbly=3},
})
minetest.register_node("nodez:desert_sand", {
description = S("Desert Sand"),
tiles ={"default_desert_sand.png"},
tiles ={"nodez_sand.png"},
groups = {crumbly=3},
sounds = sound.sand ()
})

View File

@ -1,28 +1,32 @@
local S = ...
local S = ...
minetest.register_node("nodez:stone", {
description = S("Stone"),
tiles = {"default_stone.png"},
groups = {cracky=3},
tiles = {"nodez_stone.png"},
groups = {cracky=3, stone=1},
sounds = sound.stone(),
})
minetest.register_node("nodez:cobble", {
description = S("Cobblestone"),
tiles ={"default_cobble.png"},
tiles ={"nodez_cobble.png"},
is_ground_content = false,
groups = {cracky=3},
groups = {cracky=3, stone=1},
sounds = sound.stone(),
})
minetest.register_node("nodez:mossycobble", {
description = S("Mossy Cobblestone"),
tiles ={"default_mossycobble.png"},
tiles ={"nodez_mossycobble.png"},
is_ground_content = false,
groups = {cracky=3},
groups = {cracky=3, stone=1},
sounds = sound.stone(),
})
minetest.register_node("nodez:gravel", {
description = S("Gravel"),
tiles ={"default_gravel.png"},
tiles ={"nodez_gravel.png"},
groups = {crumbly=2},
sounds = sound.gravel(),
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 523 B

View File

@ -1,7 +0,0 @@
The dirt_with_grass folder is for testing loading textures from subfolders.
If it works correctly, the default_grass_side.png file in the folder is used but
default_grass.png is not overwritten by the file in the folder.
default_dirt.png should be overwritten by the default_dirt.png in the unittests
mod which depends on basenodes.

View File

Before

Width:  |  Height:  |  Size: 102 B

After

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 615 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 B

View File

Before

Width:  |  Height:  |  Size: 626 B

After

Width:  |  Height:  |  Size: 626 B

View File

Before

Width:  |  Height:  |  Size: 595 B

After

Width:  |  Height:  |  Size: 595 B

View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

Before

Width:  |  Height:  |  Size: 591 B

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 569 B

View File

Before

Width:  |  Height:  |  Size: 172 B

After

Width:  |  Height:  |  Size: 172 B

View File

Before

Width:  |  Height:  |  Size: 91 B

After

Width:  |  Height:  |  Size: 91 B

View File

Before

Width:  |  Height:  |  Size: 574 B

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

View File

Before

Width:  |  Height:  |  Size: 496 B

After

Width:  |  Height:  |  Size: 496 B

View File

Before

Width:  |  Height:  |  Size: 99 B

After

Width:  |  Height:  |  Size: 99 B

View File

Before

Width:  |  Height:  |  Size: 547 B

After

Width:  |  Height:  |  Size: 547 B

View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

Before

Width:  |  Height:  |  Size: 585 B

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

Before

Width:  |  Height:  |  Size: 115 B

After

Width:  |  Height:  |  Size: 115 B

View File

@ -1,6 +1,6 @@
local S = ...
local WATER_ALPHA = "^[opacity:" .. 160
local WATER_ALPHA = "^[opacity:" .. 210
local WATER_VISC = 1
minetest.register_node("nodez:water_source", {
@ -8,10 +8,10 @@ minetest.register_node("nodez:water_source", {
"Drowning damage: 1",
drawtype = "liquid",
waving = 3,
tiles = {"default_water.png"..WATER_ALPHA},
tiles = {"nodez_water.png"..WATER_ALPHA},
special_tiles = {
{name = "default_water.png"..WATER_ALPHA, backface_culling = false},
{name = "default_water.png"..WATER_ALPHA, backface_culling = true},
{name = "nodez_water.png"..WATER_ALPHA, backface_culling = false},
{name = "nodez_water.png"..WATER_ALPHA, backface_culling = true},
},
use_texture_alpha = "blend",
paramtype = "light",
@ -34,11 +34,11 @@ minetest.register_node("nodez:water_flowing", {
"Drowning damage: 1",
drawtype = "flowingliquid",
waving = 3,
tiles = {"default_water_flowing.png"},
tiles = {"nodez_water_flowing.png"},
special_tiles = {
{name = "default_water_flowing.png"..WATER_ALPHA,
{name = "nodez_water_flowing.png"..WATER_ALPHA,
backface_culling = false},
{name = "default_water_flowing.png"..WATER_ALPHA,
{name = "nodez_water_flowing.png"..WATER_ALPHA,
backface_culling = false},
},
use_texture_alpha = "blend",
@ -63,10 +63,10 @@ minetest.register_node("nodez:river_water_source", {
"Drowning damage: 1",
drawtype = "liquid",
waving = 3,
tiles = { "default_river_water.png"..WATER_ALPHA },
tiles = { "nodez_river_water.png"..WATER_ALPHA },
special_tiles = {
{name = "default_river_water.png"..WATER_ALPHA, backface_culling = false},
{name = "default_river_water.png"..WATER_ALPHA, backface_culling = true},
{name = "nodez_river_water.png"..WATER_ALPHA, backface_culling = false},
{name = "nodez_river_water.png"..WATER_ALPHA, backface_culling = true},
},
use_texture_alpha = "blend",
paramtype = "light",
@ -91,11 +91,11 @@ minetest.register_node("nodez:river_water_flowing", {
"Drowning damage: 1",
drawtype = "flowingliquid",
waving = 3,
tiles = {"default_river_water_flowing.png"..WATER_ALPHA},
tiles = {"nodez_river_water_flowing.png"..WATER_ALPHA},
special_tiles = {
{name = "default_river_water_flowing.png"..WATER_ALPHA,
{name = "nodez_river_water_flowing.png"..WATER_ALPHA,
backface_culling = false},
{name = "default_river_water_flowing.png"..WATER_ALPHA,
{name = "nodez_river_water_flowing.png"..WATER_ALPHA,
backface_culling = false},
},
use_texture_alpha = "blend",

View File

@ -106,12 +106,7 @@ local function move_head(player, on_water)
pitch = pitch + 70
end
local head_rotation = {x= pitch, y= 0, z= 0} --the head movement {pitch, yaw, roll}
local head_offset
if minetest.get_modpath("3d_armor")~=nil then
head_offset = 6.75
else
head_offset = 6.3
end
local head_offset = 6.3
local head_position = {x=0, y=head_offset, z=0}
player:set_bone_position("Head", head_position, head_rotation) --set the head movement
end
@ -348,11 +343,6 @@ function player_api.set_texture(player)
local gender_model = player_api.get_gender_model(gender)
player_api.registered_models[gender_model].textures[1] = cloth
player_api.set_model(player, gender_model)
if minetest.get_modpath("3d_armor")~=nil then
--armor.default_skin = cloth
local player_name = player:get_player_name()
armor.textures[player_name].skin = cloth
end
player_api.set_textures(player, models[gender_model].textures)
end

View File

@ -26,31 +26,6 @@ player_api.register_model("character.b3d", {
eye_height = 1.47,
})
player_api.register_model("female.b3d", {
animation_speed = 30,
textures = {
"female.png",
"3d_armor_trans.png",
"3d_armor_trans.png",
},
animations = {
-- Standard animations.
stand = {x = 0, y = 79},
lay = {x = 162, y = 166},
walk = {x = 168, y = 187},
mine = {x = 189, y = 198},
walk_mine = {x = 200, y = 219},
sit = {x = 81, y = 160},
swin = {x = 232, y = 280},
swin_mine = {x = 281, y = 305},
swin_and_mine = {x = 306, y = 330},
swin_stand = {x = 232, y = 232},
},
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3},
stepheight = 0.6,
eye_height = 1.47,
})
-- Update appearance when the player joins
minetest.register_on_joinplayer(function(player)
local player_name = player:get_player_name()
@ -68,4 +43,13 @@ minetest.register_on_joinplayer(function(player)
player_api.registered_models[player_api.get_gender_model(gender)].textures[1] = cloth
player_api.set_model(player, player_api.get_gender_model(gender))
end
-- Set formspec prepend
local formspec = [[
bgcolor[#303030;both]
listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]
]]
player:set_formspec_prepend(formspec)
-- Set hotbar textures
player:hud_set_hotbar_image("player_api_hotbar.png")
player:hud_set_hotbar_selected_image("player_api_hotbar_selected.png")
end)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

View File

@ -1,13 +0,0 @@
# Blender MTL File: 'None'
# Material Count: 1
newmtl lambert0
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Kd /home/runs/Descargas

View File

@ -1,192 +0,0 @@
# Blender v2.83.5 OBJ File: ''
# www.blender.org
mtllib untitled.mtl
o petz_flamingo.Layer_Plane-tex
v -0.125000 0.000000 0.062500
v -0.125000 0.000000 -0.125000
v -0.125000 -0.187500 -0.125000
v -0.125000 -0.187500 0.062500
v 0.062500 0.000000 0.062500
v 0.062500 0.000000 -0.125000
v 0.062500 -0.187500 -0.125000
v 0.062500 -0.187500 0.062500
v 0.062500 -0.187500 0.000000
v 0.062500 -0.187500 -0.062500
v 0.062500 -0.375000 -0.062500
v 0.062500 -0.375000 0.000000
v 0.125000 -0.187500 0.000000
v 0.125000 -0.187500 -0.062500
v 0.125000 -0.375000 -0.062500
v 0.125000 -0.375000 0.000000
v -0.187500 -0.187500 0.000000
v -0.187500 -0.187500 -0.062500
v -0.187500 -0.375000 -0.062500
v -0.187500 -0.375000 0.000000
v -0.125000 -0.187500 0.000000
v -0.125000 -0.187500 -0.062500
v -0.125000 -0.375000 -0.062500
v -0.125000 -0.375000 0.000000
v -0.125000 -0.187500 0.000000
v -0.125000 -0.187500 -0.062500
v -0.125000 -0.375000 -0.062500
v -0.125000 -0.375000 0.000000
v 0.062500 -0.187500 0.000000
v 0.062500 -0.187500 -0.062500
v 0.062500 -0.375000 -0.062500
v 0.062500 -0.375000 0.000000
v -0.125000 -0.375000 0.000000
v -0.125000 -0.375000 -0.062500
v -0.125000 -0.500000 -0.062500
v -0.125000 -0.500000 0.000000
v -0.062500 -0.375000 0.000000
v -0.062500 -0.375000 -0.062500
v -0.062500 -0.500000 -0.062500
v -0.062500 -0.500000 0.000000
v 0.000000 -0.375000 0.000000
v 0.000000 -0.375000 -0.062500
v 0.000000 -0.500000 -0.062500
v 0.000000 -0.500000 0.000000
v 0.062500 -0.375000 0.000000
v 0.062500 -0.375000 -0.062500
v 0.062500 -0.500000 -0.062500
v 0.062500 -0.500000 0.000000
vt 0.333569 0.666431
vt 0.666195 0.666431
vt 0.333569 0.333805
vt 0.333569 0.666431
vt 0.666195 0.666431
vt 0.333569 0.333805
vt 0.666195 0.666431
vt 0.333569 0.666431
vt 0.333569 0.333805
vt 0.666195 0.666431
vt 0.333569 0.666431
vt 0.333569 0.333805
vt 0.666195 0.666431
vt 0.333569 0.666431
vt 0.333569 0.333805
vt 0.333569 0.333805
vt 0.333569 0.666431
vt 0.666195 0.666431
vt 0.666195 0.666431
vt 0.666195 0.666431
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vn -1.0000 0.0000 0.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 0.0000 -1.0000
usemtl lambert0
s off
f 1/1/1 2/2/1 3/3/1
f 3/4/1 4/5/1 1/6/1
f 6/7/2 5/8/2 7/9/2
f 8/10/2 7/11/2 5/12/2
f 7/13/3 8/14/3 3/3/3
f 4/5/3 3/4/3 8/15/3
f 5/8/4 6/7/4 2/16/4
f 2/17/4 1/18/4 5/12/4
f 8/14/5 5/19/5 1/6/5
f 1/1/5 4/5/5 8/15/5
f 6/7/6 7/11/6 2/16/6
f 3/20/6 2/17/6 7/9/6
f 9/21/1 10/22/1 11/23/1
f 11/23/1 12/24/1 9/21/1
f 14/25/2 13/26/2 15/27/2
f 16/28/2 15/27/2 13/26/2
f 15/27/3 16/28/3 11/23/3
f 12/24/3 11/23/3 16/28/3
f 13/26/4 14/25/4 10/22/4
f 10/22/4 9/21/4 13/26/4
f 16/28/5 13/26/5 9/21/5
f 9/21/5 12/24/5 16/28/5
f 14/25/6 15/27/6 10/22/6
f 11/23/6 10/22/6 15/27/6
f 17/29/1 18/30/1 19/31/1
f 19/31/1 20/32/1 17/29/1
f 22/33/2 21/34/2 23/35/2
f 24/36/2 23/35/2 21/34/2
f 23/35/3 24/36/3 19/31/3
f 20/32/3 19/31/3 24/36/3
f 21/34/4 22/33/4 18/30/4
f 18/30/4 17/29/4 21/34/4
f 24/36/5 21/34/5 17/29/5
f 17/29/5 20/32/5 24/36/5
f 22/33/6 23/35/6 18/30/6
f 19/31/6 18/30/6 23/35/6
f 25/37/1 26/38/1 27/39/1
f 27/39/1 28/40/1 25/37/1
f 30/41/2 29/42/2 31/43/2
f 32/44/2 31/43/2 29/42/2
f 31/43/3 32/44/3 27/39/3
f 28/40/3 27/39/3 32/44/3
f 29/42/4 30/41/4 26/38/4
f 26/38/4 25/37/4 29/42/4
f 32/44/5 29/42/5 25/37/5
f 25/37/5 28/40/5 32/44/5
f 30/41/6 31/43/6 26/38/6
f 27/39/6 26/38/6 31/43/6
f 33/45/1 34/46/1 35/47/1
f 35/47/1 36/48/1 33/45/1
f 38/49/2 37/50/2 39/51/2
f 40/52/2 39/51/2 37/50/2
f 39/51/3 40/52/3 35/47/3
f 36/48/3 35/47/3 40/52/3
f 37/50/4 38/49/4 34/46/4
f 34/46/4 33/45/4 37/50/4
f 40/52/5 37/50/5 33/45/5
f 33/45/5 36/48/5 40/52/5
f 38/49/6 39/51/6 34/46/6
f 35/47/6 34/46/6 39/51/6
f 41/53/1 42/54/1 43/55/1
f 43/55/1 44/56/1 41/53/1
f 46/57/2 45/58/2 47/59/2
f 48/60/2 47/59/2 45/58/2
f 47/59/3 48/60/3 43/55/3
f 44/56/3 43/55/3 48/60/3
f 45/58/4 46/57/4 42/54/4
f 42/54/4 41/53/4 45/58/4
f 48/60/5 45/58/5 41/53/5
f 41/53/5 44/56/5 48/60/5
f 46/57/6 47/59/6 42/54/6
f 43/55/6 42/54/6 47/59/6

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

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