alpha 2:change mod namespaces
|
@ -3,16 +3,16 @@ allow_defined_top = false
|
|||
max_line_length = false
|
||||
|
||||
globals = {
|
||||
"eat",
|
||||
"eatz",
|
||||
"bedz",
|
||||
"bucket",
|
||||
"deco",
|
||||
"door",
|
||||
"bucketz",
|
||||
"decoz",
|
||||
"doorz",
|
||||
"farmz",
|
||||
"flowers",
|
||||
"furn",
|
||||
"flowerz",
|
||||
"furnz",
|
||||
"helper",
|
||||
"items",
|
||||
"itemz",
|
||||
"kitz",
|
||||
"minetest",
|
||||
"modname",
|
||||
|
@ -23,12 +23,13 @@ globals = {
|
|||
"samz",
|
||||
"sfinv",
|
||||
"sound",
|
||||
"stairs",
|
||||
"stairz",
|
||||
"svrz",
|
||||
"tools",
|
||||
"toolz",
|
||||
"torchz",
|
||||
"treez",
|
||||
"wield3d",
|
||||
"mapgen",
|
||||
"mapgenz",
|
||||
}
|
||||
|
||||
read_globals = {
|
||||
|
|
|
@ -11,8 +11,8 @@ bedz.register_bed("simple_bed", {
|
|||
},
|
||||
inventory_image = "bedz_simple_bed_inv.png",
|
||||
recipe = {
|
||||
{"group:wood", "",
|
||||
"treez:stick"},{"treez:stick", "", ""},
|
||||
{"group:wood_planks", "",
|
||||
"group:stick"},{"group:stick", "", ""},
|
||||
{"", "", ""},
|
||||
}
|
||||
})
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: bucket
|
||||
Bucket=Cubo
|
|
@ -1,13 +1,13 @@
|
|||
bucket = {}
|
||||
bucketz = {}
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
local S = minetest.get_translator(modname)
|
||||
|
||||
-- Bucket: Punch liquid source or flowing liquid to collect it
|
||||
|
||||
minetest.register_tool("bucket:bucket", {
|
||||
minetest.register_tool("bucketz:bucket", {
|
||||
description = S("Bucket"),
|
||||
inventory_image = "bucket.png",
|
||||
inventory_image = "bucketz.png",
|
||||
stack_max = 1,
|
||||
liquids_pointable = true,
|
||||
groups = { disable_repair = 1 },
|
||||
|
@ -28,4 +28,3 @@ minetest.register_tool("bucket:bucket", {
|
|||
end
|
||||
end,
|
||||
})
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
# textdomain: bucketz
|
||||
Bucket=Cubo
|
|
@ -1,2 +1,2 @@
|
|||
name = bucket
|
||||
name = bucketz
|
||||
description = Minimal bucket to pick up liquids
|
Before Width: | Height: | Size: 696 B After Width: | Height: | Size: 696 B |
Before Width: | Height: | Size: 168 B After Width: | Height: | Size: 168 B |
Before Width: | Height: | Size: 168 B After Width: | Height: | Size: 168 B |
|
@ -1,2 +0,0 @@
|
|||
# textdomain: chest
|
||||
Chest=Cofre
|
|
@ -1,11 +1,13 @@
|
|||
chestz = {}
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
local S = minetest.get_translator(modname)
|
||||
|
||||
minetest.register_node("chest:chest", {
|
||||
minetest.register_node("chestz:chest", {
|
||||
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"},
|
||||
tiles ={"chestz_chest.png^[sheet:2x2:0,0", "chestz_chest.png^[sheet:2x2:0,0",
|
||||
"chestz_chest.png^[sheet:2x2:1,0", "chestz_chest.png^[sheet:2x2:1,0",
|
||||
"chestz_chest.png^[sheet:2x2:1,0", "chestz_chest.png^[sheet:2x2:0,1"},
|
||||
paramtype2 = "facedir",
|
||||
groups = {dig_immediate=2,choppy=3},
|
||||
is_ground_content = false,
|
||||
|
@ -38,11 +40,11 @@ minetest.register_node("chest:chest", {
|
|||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "chest:chest 1",
|
||||
output = "chestz:chest 1",
|
||||
type = "shaped",
|
||||
recipe = {
|
||||
{"group:wood", "group:wood",
|
||||
"group:wood"},{"group:wood", "", ""},
|
||||
{"group:planks", "group:planks",
|
||||
"group:planks"},{"group:planks", "", ""},
|
||||
{"", "", ""},
|
||||
}
|
||||
})
|
|
@ -0,0 +1,2 @@
|
|||
# textdomain: chestz
|
||||
Chest=Cofre
|
|
@ -1,2 +1,2 @@
|
|||
name = chest
|
||||
name = chestz
|
||||
description = A simple chest to store items
|
Before Width: | Height: | Size: 751 B After Width: | Height: | Size: 751 B |
|
@ -104,8 +104,11 @@ local function use_chair(pos, player)
|
|||
return true
|
||||
end
|
||||
|
||||
function deco.register_chair(name, def)
|
||||
minetest.register_node(modname..":"..name, {
|
||||
function decoz.register_chair(name, def)
|
||||
|
||||
local chair_name = modname..":"..name
|
||||
|
||||
minetest.register_node(chair_name, {
|
||||
description = S(def.description),
|
||||
tiles = def.tiles,
|
||||
drawtype = "nodebox",
|
||||
|
@ -122,7 +125,7 @@ function deco.register_chair(name, def)
|
|||
sounds = sound.wood(),
|
||||
is_ground_content = false,
|
||||
stack_max = 4,
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, chair = 1},
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, chair = 1, deco = 1},
|
||||
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local chair_used, msg = use_chair(pos, clicker)
|
||||
|
@ -143,6 +146,14 @@ function deco.register_chair(name, def)
|
|||
end
|
||||
end
|
||||
})
|
||||
|
||||
if def.recipe then
|
||||
minetest.register_craft({
|
||||
output = chair_name,
|
||||
type = "shaped",
|
||||
recipe = def.recipe,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
--Player Status
|
||||
|
@ -159,8 +170,11 @@ end)
|
|||
--Table
|
||||
--
|
||||
|
||||
function deco.register_table(name, def)
|
||||
minetest.register_node(modname..":"..name, {
|
||||
function decoz.register_table(name, def)
|
||||
|
||||
local table_name = modname..":"..name
|
||||
|
||||
minetest.register_node(table_name, {
|
||||
description = S(def.description),
|
||||
tiles = def.tiles,
|
||||
drawtype = "nodebox",
|
||||
|
@ -177,6 +191,14 @@ function deco.register_table(name, def)
|
|||
sounds = sound.wood(),
|
||||
is_ground_content = false,
|
||||
stack_max = 1,
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, chair = 1},
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, chair = 1, deco = 1},
|
||||
})
|
||||
|
||||
if def.recipe then
|
||||
minetest.register_craft({
|
||||
output = table_name,
|
||||
type = "shaped",
|
||||
recipe = def.recipe,
|
||||
})
|
||||
end
|
||||
end
|
|
@ -1,12 +1,12 @@
|
|||
deco.register_chair("simple_chair", {
|
||||
decoz.register_chair("simple_chair", {
|
||||
description = "Simple Chair",
|
||||
tiles = {
|
||||
"treez_apple_tree_wood.png",
|
||||
"treez_apple_tree_wood.png",
|
||||
"deco_simple_chair_right.png",
|
||||
"deco_simple_chair_left.png",
|
||||
"deco_simple_chair_front.png",
|
||||
"deco_simple_chair_front.png",
|
||||
"decoz_simple_chair_right.png",
|
||||
"decoz_simple_chair_left.png",
|
||||
"decoz_simple_chair_front.png",
|
||||
"decoz_simple_chair_front.png",
|
||||
},
|
||||
node_box = {
|
||||
{-0.3125, -0.5, 0.1875, -0.1875, 0, 0.3125}, -- NodeBox13
|
|
@ -1,4 +1,4 @@
|
|||
deco = {}
|
||||
decoz = {}
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
local modpath = minetest.get_modpath(modname)
|
|
@ -1,4 +1,4 @@
|
|||
# textdomain: deco
|
||||
# textdomain: decoz
|
||||
Simple Chair=Silla sencilla
|
||||
Simple Table=Mesa sencilla
|
||||
This chair is already occupied=Esta silla ya está ocupada
|
|
@ -1,3 +1,3 @@
|
|||
name = deco
|
||||
name = decoz
|
||||
description = Some furniture and decoration
|
||||
depends = treez, stairs
|
||||
depends = treez, stairz
|
|
@ -1,14 +1,14 @@
|
|||
S, modname = ...
|
||||
|
||||
deco.register_table("simple_table", {
|
||||
decoz.register_table("simple_table", {
|
||||
description = S("Simple Table"),
|
||||
tiles = {
|
||||
"treez_apple_tree_wood.png",
|
||||
"treez_apple_tree_wood.png",
|
||||
"deco_simple_table_side.png",
|
||||
"deco_simple_table_side.png",
|
||||
"deco_simple_table_side.png",
|
||||
"deco_simple_table_side.png",
|
||||
"decoz_simple_table_side.png",
|
||||
"decoz_simple_table_side.png",
|
||||
"decoz_simple_table_side.png",
|
||||
"decoz_simple_table_side.png",
|
||||
},
|
||||
node_box = {
|
||||
{-0.5, 0.3125, -0.5, 0.5, 0.5, 0.5}, -- NodeBox14
|
|
@ -1,12 +1,12 @@
|
|||
deco.register_table("simple_table", {
|
||||
decoz.register_table("simple_table", {
|
||||
description = "Simple Table",
|
||||
tiles = {
|
||||
"treez_apple_tree_wood.png",
|
||||
"treez_apple_tree_wood.png",
|
||||
"deco_simple_table_side.png",
|
||||
"deco_simple_table_side.png",
|
||||
"deco_simple_table_side.png",
|
||||
"deco_simple_table_side.png",
|
||||
"decoz_simple_table_side.png",
|
||||
"decoz_simple_table_side.png",
|
||||
"decoz_simple_table_side.png",
|
||||
"decoz_simple_table_side.png",
|
||||
},
|
||||
node_box = {
|
||||
{-0.5, 0.3125, -0.5, 0.5, 0.5, 0.5}, -- NodeBox14
|
||||
|
@ -18,4 +18,9 @@ deco.register_table("simple_table", {
|
|||
selection_box = {
|
||||
{-0.4375, -0.5, -0.4375, 0.4375, 0.5, 0.4375},
|
||||
},
|
||||
recipe = {
|
||||
{"group:wood_planks","group:wood_planks",
|
||||
"group:stick"},{"group:stick", "", ""},
|
||||
{"", "", ""},
|
||||
}
|
||||
})
|
Before Width: | Height: | Size: 596 B After Width: | Height: | Size: 596 B |
Before Width: | Height: | Size: 546 B After Width: | Height: | Size: 546 B |
Before Width: | Height: | Size: 580 B After Width: | Height: | Size: 580 B |
Before Width: | Height: | Size: 590 B After Width: | Height: | Size: 590 B |
|
@ -1,10 +0,0 @@
|
|||
door.register_door("apple_tree", {
|
||||
description = "Apple Tree",
|
||||
tiles = {"door_apple_tree.png", backface_culling = true},
|
||||
inventory_image = "door_apple_tree_inv.png",
|
||||
recipe = {
|
||||
{"", "treez:apple_tree_wood",
|
||||
""},{"treez:apple_tree_wood", "", ""},
|
||||
{"", "", ""},
|
||||
}
|
||||
})
|
|
@ -1,6 +1,6 @@
|
|||
S, modname = ...
|
||||
|
||||
minetest.register_node("door:invisible_top", {
|
||||
minetest.register_node("doorz:invisible_top", {
|
||||
drawtype = "nodebox",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
|
@ -20,9 +20,9 @@ local function destroy_inv_top(pos)
|
|||
minetest.set_node(above_pos, {name = "air"})
|
||||
end
|
||||
|
||||
local function is_door_on_right(pos, door_dir)
|
||||
local function is_doorz_on_right(pos, doorz_dir)
|
||||
local up_vector = vector.new(0, 1, 0) --vertical y vector
|
||||
local right_vector = vector.cross(up_vector, door_dir)
|
||||
local right_vector = vector.cross(up_vector, doorz_dir)
|
||||
--local left_vector = - right_vector
|
||||
local right_pos = vector.add(pos, right_vector)
|
||||
if helper.in_group(right_pos, "door") then
|
||||
|
@ -32,27 +32,27 @@ local function is_door_on_right(pos, door_dir)
|
|||
end
|
||||
end
|
||||
|
||||
local function place_door(door_name, placer, pointed_thing)
|
||||
local function place_door(doorz_name, placer, pointed_thing)
|
||||
local pos = pointed_thing.above
|
||||
local door_dir = helper.dir_to_compass(placer:get_look_dir())
|
||||
--minetest.chat_send_all(tostring(door_dir))
|
||||
local doorz_dir = helper.dir_to_compass(placer:get_look_dir())
|
||||
--minetest.chat_send_all(tostring(doorz_dir))
|
||||
if helper.node_is_air(pos) then
|
||||
local above_pos = vector.new(pos.x, pos.y+1, pos.z)
|
||||
if helper.node_is_air(above_pos) then
|
||||
local dir = placer:get_look_dir()
|
||||
local rotation
|
||||
if is_door_on_right(pos, door_dir) then
|
||||
if is_doorz_on_right(pos, doorz_dir) then
|
||||
dir = -dir
|
||||
rotation = "left"
|
||||
else
|
||||
rotation = "right"
|
||||
end
|
||||
local facedir = minetest.dir_to_facedir(dir) or 0
|
||||
minetest.set_node(pos, {name = door_name, param2 = facedir})
|
||||
minetest.set_node(above_pos, {name = "door:invisible_top", param2 = facedir})
|
||||
minetest.set_node(pos, {name = doorz_name, param2 = facedir})
|
||||
minetest.set_node(above_pos, {name = "doorz:invisible_top", param2 = facedir})
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("door:dir", vector.to_string(door_dir))
|
||||
meta:set_string("door:rotation", rotation)
|
||||
meta:set_string("doorz:dir", vector.to_string(doorz_dir))
|
||||
meta:set_string("doorz:rotation", rotation)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
|
@ -62,9 +62,9 @@ local function place_door(door_name, placer, pointed_thing)
|
|||
end
|
||||
end
|
||||
|
||||
local function open_door(pos, node, clicker, door_name)
|
||||
local function open_door(pos, node, clicker, doorz_name)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local open_dir_str = meta:get_string("door:dir")
|
||||
local open_dir_str = meta:get_string("doorz:dir")
|
||||
local open_dir = minetest.string_to_pos(open_dir_str)
|
||||
if not open_dir then
|
||||
open_dir = vector.round(clicker:get_look_dir())
|
||||
|
@ -77,19 +77,19 @@ local function open_door(pos, node, clicker, door_name)
|
|||
) then
|
||||
if helper.node_is_air(node_open_pos, "above") then
|
||||
local facedir = minetest.dir_to_facedir(open_dir)
|
||||
local door_name_opened = door_name.."_opened"
|
||||
local rotation = meta:get_string("door:rotation")
|
||||
local doorz_name_opened = doorz_name.."_opened"
|
||||
local rotation = meta:get_string("doorz:rotation")
|
||||
if rotation == "left" then
|
||||
door_name_opened = door_name_opened.."_left"
|
||||
doorz_name_opened = doorz_name_opened.."_left"
|
||||
end
|
||||
minetest.set_node(pos, {name = door_name_opened, param2 = facedir})
|
||||
sound.play("pos", pos, "door_open")
|
||||
minetest.set_node(pos, {name = doorz_name_opened, param2 = facedir})
|
||||
sound.play("pos", pos, "doorz_open")
|
||||
local above_pos = vector.new(pos.x, pos.y+1, pos.z)
|
||||
minetest.set_node(above_pos, {name = "door:invisible_top", param2 = facedir})
|
||||
minetest.set_node(above_pos, {name = "doorz:invisible_top", param2 = facedir})
|
||||
meta = minetest.get_meta(pos)
|
||||
meta:set_int("door:facedir", node.param2)
|
||||
meta:set_string("door:dir", open_dir_str)
|
||||
meta:set_string("door:rotation", rotation)
|
||||
meta:set_int("doorz:facedir", node.param2)
|
||||
meta:set_string("doorz:dir", open_dir_str)
|
||||
meta:set_string("doorz:rotation", rotation)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
|
@ -99,25 +99,25 @@ local function open_door(pos, node, clicker, door_name)
|
|||
end
|
||||
end
|
||||
|
||||
local function close_door(pos, door_name)
|
||||
local function close_door(pos, doorz_name)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local facedir = meta:get_int("door:facedir")
|
||||
local dir = meta:get_string("door:dir")
|
||||
local rotation = meta:get_string("door:rotation")
|
||||
minetest.set_node(pos, {name = door_name, param2 = facedir})
|
||||
sound.play("pos", pos, "door_close")
|
||||
local facedir = meta:get_int("doorz:facedir")
|
||||
local dir = meta:get_string("doorz:dir")
|
||||
local rotation = meta:get_string("doorz:rotation")
|
||||
minetest.set_node(pos, {name = doorz_name, param2 = facedir})
|
||||
sound.play("pos", pos, "doorz_close")
|
||||
local above_pos = vector.new(pos.x, pos.y+1, pos.z)
|
||||
minetest.set_node(above_pos, {name = "door:invisible_top", param2 = facedir})
|
||||
minetest.set_node(above_pos, {name = "doorz:invisible_top", param2 = facedir})
|
||||
meta = minetest.get_meta(pos)
|
||||
meta:set_string("door:dir", dir)
|
||||
meta:set_string("door:rotation", rotation)
|
||||
meta:set_string("doorz:dir", dir)
|
||||
meta:set_string("doorz:rotation", rotation)
|
||||
end
|
||||
|
||||
function door.register_door(name, def)
|
||||
function doorz.register_door(name, def)
|
||||
|
||||
local door_name = modname..":"..name
|
||||
local doorz_name = modname..":"..name
|
||||
|
||||
minetest.register_node(door_name, {
|
||||
minetest.register_node(doorz_name, {
|
||||
description = S("@1 Door", S(def.description)),
|
||||
inventory_image = def.inventory_image or "",
|
||||
wield_image = def.wield_image or def.inventory_image or "",
|
||||
|
@ -125,7 +125,7 @@ function door.register_door(name, def)
|
|||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
mesh = "door.b3d",
|
||||
mesh = "doorz.b3d",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
|
@ -147,7 +147,7 @@ function door.register_door(name, def)
|
|||
sounds = sound.wood(),
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if place_door(door_name, placer, pointed_thing) then
|
||||
if place_door(doorz_name, placer, pointed_thing) then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
|
@ -158,10 +158,10 @@ function door.register_door(name, def)
|
|||
end,
|
||||
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
if not open_door(pos, node, clicker, door_name) then
|
||||
if not open_door(pos, node, clicker, doorz_name) then
|
||||
if clicker and minetest.is_player(clicker) then
|
||||
local player_name = clicker:get_player_name()
|
||||
sound.play("pos", pos, "door_blocked")
|
||||
sound.play("pos", pos, "doorz_blocked")
|
||||
minetest.chat_send_player(player_name, S("Obstructed door!"))
|
||||
end
|
||||
end
|
||||
|
@ -169,18 +169,18 @@ function door.register_door(name, def)
|
|||
})
|
||||
|
||||
for i=0,1 do
|
||||
local mesh, fixed, door_name_opened
|
||||
local mesh, fixed, doorz_name_opened
|
||||
if i == 0 then
|
||||
mesh = "door_opened.b3d"
|
||||
mesh = "doorz_opened.b3d"
|
||||
fixed = {0.375, -0.5, 0, 0.5, 1.5, 1.0}
|
||||
door_name_opened = door_name.."_opened"
|
||||
doorz_name_opened = doorz_name.."_opened"
|
||||
else
|
||||
mesh = "door_opened_left.b3d"
|
||||
mesh = "doorz_opened_left.b3d"
|
||||
fixed = {-0.5, -0.5, 0, -0.375, 1.5, 1.0}
|
||||
door_name_opened = door_name.."_opened_left"
|
||||
doorz_name_opened = doorz_name.."_opened_left"
|
||||
end
|
||||
|
||||
minetest.register_node(door_name_opened, {
|
||||
minetest.register_node(doorz_name_opened, {
|
||||
description = def.description,
|
||||
drawtype = "mesh",
|
||||
paramtype = "light",
|
||||
|
@ -198,7 +198,7 @@ function door.register_door(name, def)
|
|||
fixed,
|
||||
},
|
||||
},
|
||||
drop = door_name,
|
||||
drop = doorz_name,
|
||||
tiles = def.tiles,
|
||||
walkable = true,
|
||||
use_texture_alpha = "clip",
|
||||
|
@ -209,7 +209,7 @@ function door.register_door(name, def)
|
|||
sounds = sound.wood(),
|
||||
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
close_door(pos, door_name)
|
||||
close_door(pos, doorz_name)
|
||||
end,
|
||||
|
||||
on_destruct = function(pos)
|
||||
|
@ -221,7 +221,7 @@ function door.register_door(name, def)
|
|||
|
||||
if def.recipe then
|
||||
minetest.register_craft({
|
||||
output = door_name,
|
||||
output = doorz_name,
|
||||
type = "shaped",
|
||||
recipe = def.recipe
|
||||
})
|
|
@ -0,0 +1,10 @@
|
|||
doorz.register_door("apple_tree", {
|
||||
description = "Apple Tree",
|
||||
tiles = {"doorz_apple_tree.png", backface_culling = true},
|
||||
inventory_image = "doorz_apple_tree_inv.png",
|
||||
recipe = {
|
||||
{"", "treez:apple_tree_wood",
|
||||
""},{"treez:apple_tree_wood", "", ""},
|
||||
{"", "", ""},
|
||||
}
|
||||
})
|
|
@ -1,4 +1,4 @@
|
|||
door = {}
|
||||
doorz = {}
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
local modpath = minetest.get_modpath(modname)
|
|
@ -1,4 +1,4 @@
|
|||
# textdomain: door
|
||||
# textdomain: doorz
|
||||
@1 Door=Puerta de @1
|
||||
Apple Tree=manzano
|
||||
Obstructed door!=¡Puerta obstruida!
|
|
@ -1,3 +1,3 @@
|
|||
name = door
|
||||
name = doorz
|
||||
description = Doors!
|
||||
depends = treez, helper
|
Before Width: | Height: | Size: 737 B After Width: | Height: | Size: 737 B |
Before Width: | Height: | Size: 752 B After Width: | Height: | Size: 752 B |
|
@ -1,6 +1,6 @@
|
|||
eat = {}
|
||||
eatz = {}
|
||||
|
||||
local function eat_particlespawner(user, item_name, itemstack)
|
||||
local function eatz_particlespawner(user, item_name, itemstack)
|
||||
local pos = user:getpos()
|
||||
pos.y = pos.y + 1.43
|
||||
local texture = minetest.registered_items[item_name].inventory_image
|
||||
|
@ -19,16 +19,16 @@ local function eat_particlespawner(user, item_name, itemstack)
|
|||
maxexptime = 0.5,
|
||||
minsize = 1.5,
|
||||
maxsize = 3,
|
||||
texture = "eat_particles.png^"..texture.."^eat_particles.png^[makealpha:255,126,126",
|
||||
texture = "eatz_particles.png^"..texture.."^eatz_particles.png^[makealpha:255,126,126",
|
||||
})
|
||||
end
|
||||
|
||||
function eat.item_eat(itemstack, user, item_name, hp, hunger)
|
||||
function eatz.item_eat(itemstack, user, item_name, hp, hunger)
|
||||
if user and user:is_player() then
|
||||
playerz.change_hp(user, hp or 1, "eat")
|
||||
eat_particlespawner(user, item_name, itemstack)
|
||||
eatz_particlespawner(user, item_name, itemstack)
|
||||
playerz.change_hunger(user, hunger or 1)
|
||||
sound.play("player", user, "eat_chewing")
|
||||
sound.play("player", user, "eatz_chewing")
|
||||
end
|
||||
itemstack:take_item()
|
||||
return itemstack
|
Before Width: | Height: | Size: 269 B After Width: | Height: | Size: 269 B |
|
@ -7,7 +7,7 @@ minetest.register_craftitem("farmz:bread", {
|
|||
inventory_image = "farmz_bread.png",
|
||||
groups = {food = 1},
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
eat.item_eat(itemstack, user, "farmz:bread", 6, 8)
|
||||
eatz.item_eat(itemstack, user, "farmz:bread", 6, 8)
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -35,7 +35,7 @@ local function register_flower_deco(name, deco)
|
|||
})
|
||||
end
|
||||
|
||||
function flowers.register_flower(name, def)
|
||||
function flowerz.register_flower(name, def)
|
||||
-- Common flowers' groups
|
||||
def.groups.snappy = 3
|
||||
def.groups.flower = 1
|
||||
|
@ -51,9 +51,9 @@ function flowers.register_flower(name, def)
|
|||
description = S(def.desc),
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"flowers_" .. name .. ".png"},
|
||||
tiles = {modname.."_" .. name .. ".png"},
|
||||
inventory_image = inventory_image .. ".png",
|
||||
wield_image = "flowers_" .. name .. ".png",
|
||||
wield_image = modname.."_" .. name .. ".png",
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
|
@ -71,7 +71,7 @@ function flowers.register_flower(name, def)
|
|||
end
|
||||
end
|
||||
|
||||
function flowers.register_tall_flower(name, def)
|
||||
function flowerz.register_tall_flower(name, def)
|
||||
|
||||
local flower_name = modname .. ":" .. name
|
||||
local flower_name_top = flower_name .. "_top"
|
||||
|
@ -89,7 +89,7 @@ function flowers.register_tall_flower(name, def)
|
|||
description = S(def.desc),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"flowers_"..name.."_top.png"},
|
||||
tiles = {modname.."_"..name.."_top.png"},
|
||||
inventory_image = "flowers_"..name.."_top_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = true,
|
||||
|
@ -114,9 +114,9 @@ function flowers.register_tall_flower(name, def)
|
|||
description = S(def.desc),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"flowers_"..name.."_bottom.png"},
|
||||
inventory_image = "flowers_"..name.."_top.png",
|
||||
wield_image = "flowers_"..name.."_top.png",
|
||||
tiles = {modname.."_"..name.."_bottom.png"},
|
||||
inventory_image = modname.."_"..name.."_top.png",
|
||||
wield_image = modname.."_"..name.."_top.png",
|
||||
paramtype = "light",
|
||||
walkable = true,
|
||||
waving = 1,
|
|
@ -1,4 +1,4 @@
|
|||
flowers.list = {
|
||||
flowerz.list = {
|
||||
{
|
||||
name = "calla",
|
||||
def = {
|
||||
|
@ -186,13 +186,13 @@ flowers.list = {
|
|||
}
|
||||
}
|
||||
|
||||
for _, item in pairs(flowers.list) do
|
||||
flowers.register_flower(item.name, item.def)
|
||||
for _, item in pairs(flowerz.list) do
|
||||
flowerz.register_flower(item.name, item.def)
|
||||
end
|
||||
|
||||
--Sunflower
|
||||
|
||||
flowers.register_tall_flower("sunflower", {
|
||||
flowerz.register_tall_flower("sunflower", {
|
||||
desc = "Sunflower",
|
||||
box = {-0.25, -0.5, -0.25, 0.1875, 0.375, 0.1875},
|
||||
groups = {color_yellow = 1, flammable = 1},
|
||||
|
@ -212,7 +212,7 @@ flowers.register_tall_flower("sunflower", {
|
|||
})
|
||||
|
||||
farmz.register_plant("sunflower", {
|
||||
modname = "flowers",
|
||||
modname = "flowerz",
|
||||
description = "Sunflower",
|
||||
box = {-4/16, -0.5, -4/16, 4/16, 4/16, 4/16},
|
||||
grow_time = 5,
|
|
@ -1,4 +1,4 @@
|
|||
flowers = {}
|
||||
flowerz = {}
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
local modpath = minetest.get_modpath(modname)
|
|
@ -1,9 +1,10 @@
|
|||
# textdomain: flowers
|
||||
# textdomain: flowerz
|
||||
Calla=Calla
|
||||
Dahlia=Dalia
|
||||
Daisy=Margarita
|
||||
Daisy Gerbera=Margarita Gerbera
|
||||
Gerbera Daisy=Margarita Gerbera
|
||||
Lavender=Lavanda
|
||||
Pansy=Pensamiento
|
||||
Rose=Rosa
|
||||
Rose Bush=Rosal
|
||||
Sunflower=Girasol
|
|
@ -1,3 +1,3 @@
|
|||
name = flowers
|
||||
name = flowerz
|
||||
description = Flowers
|
||||
depends =
|
Before Width: | Height: | Size: 618 B After Width: | Height: | Size: 618 B |
Before Width: | Height: | Size: 572 B After Width: | Height: | Size: 572 B |
Before Width: | Height: | Size: 614 B After Width: | Height: | Size: 614 B |
Before Width: | Height: | Size: 566 B After Width: | Height: | Size: 566 B |
Before Width: | Height: | Size: 625 B After Width: | Height: | Size: 625 B |
Before Width: | Height: | Size: 596 B After Width: | Height: | Size: 596 B |
Before Width: | Height: | Size: 619 B After Width: | Height: | Size: 619 B |
Before Width: | Height: | Size: 619 B After Width: | Height: | Size: 619 B |
Before Width: | Height: | Size: 617 B After Width: | Height: | Size: 617 B |
Before Width: | Height: | Size: 770 B After Width: | Height: | Size: 770 B |
Before Width: | Height: | Size: 777 B After Width: | Height: | Size: 777 B |
Before Width: | Height: | Size: 639 B After Width: | Height: | Size: 639 B |
Before Width: | Height: | Size: 493 B After Width: | Height: | Size: 493 B |
Before Width: | Height: | Size: 697 B After Width: | Height: | Size: 697 B |
Before Width: | Height: | Size: 691 B After Width: | Height: | Size: 691 B |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 575 B After Width: | Height: | Size: 575 B |
Before Width: | Height: | Size: 599 B After Width: | Height: | Size: 599 B |
|
@ -1,6 +1,6 @@
|
|||
-- Furnace
|
||||
|
||||
furn = {}
|
||||
furnz = {}
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
local S = minetest.get_translator(modname)
|
||||
|
@ -9,14 +9,14 @@ local S = minetest.get_translator(modname)
|
|||
-- Formspecs
|
||||
--
|
||||
|
||||
function furn.get_furnace_active_formspec(fuel_percent, item_percent)
|
||||
function furnz.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]"..
|
||||
"image[2.75,1.5;1,1;furnz_furnace_fire_bg.png^[lowpart:"..
|
||||
(fuel_percent)..":furnz_furnace_fire_fg.png]"..
|
||||
"image[3.75,1.5;1,1;furnz_furnace_arrow_bg.png^[lowpart:"..
|
||||
(item_percent)..":furnz_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]"..
|
||||
|
@ -28,12 +28,12 @@ function furn.get_furnace_active_formspec(fuel_percent, item_percent)
|
|||
"listring[current_player;main]"
|
||||
end
|
||||
|
||||
function furn.get_furnace_inactive_formspec()
|
||||
function furnz.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]"..
|
||||
"image[2.75,1.5;1,1;furnz_furnace_fire_bg.png]"..
|
||||
"image[3.75,1.5;1,1;furnz_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]"..
|
||||
|
@ -125,7 +125,7 @@ local function start_smoke(pos)
|
|||
maxsize = 2.0,
|
||||
collisiondetection = false,
|
||||
vertical = true,
|
||||
texture = "furn_smoke.png",
|
||||
texture = "furnz_smoke.png",
|
||||
glow = 14
|
||||
})
|
||||
return id
|
||||
|
@ -198,7 +198,7 @@ local function furnace_node_timer(pos, elapsed)
|
|||
dst_full = true
|
||||
end
|
||||
-- Play cooling sound
|
||||
minetest.sound_play("furn.cool_lava",
|
||||
minetest.sound_play("furnz.cool_lava",
|
||||
{pos = pos, max_hear_distance = 16, gain = 0.1}, true)
|
||||
else
|
||||
-- Item could not be cooked: probably missing fuel
|
||||
|
@ -288,8 +288,8 @@ local function furnace_node_timer(pos, elapsed)
|
|||
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")
|
||||
formspec = furnz.get_furnace_active_formspec(fuel_percent, item_percent)
|
||||
swap_node(pos, "furnz:furnace_active")
|
||||
if smoke_id <= 0 then --Start Smoke
|
||||
smoke_id = start_smoke(pos)
|
||||
meta:set_int("smoke_id", smoke_id)
|
||||
|
@ -300,15 +300,15 @@ local function furnace_node_timer(pos, elapsed)
|
|||
|
||||
-- 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",
|
||||
minetest.sound_play("furnz_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")
|
||||
formspec = furnz.get_furnace_inactive_formspec()
|
||||
swap_node(pos, "furnz:furnace")
|
||||
stop_smoke(pos)
|
||||
-- stop timer on the inactive furnace
|
||||
minetest.get_node_timer(pos):stop()
|
||||
|
@ -346,12 +346,12 @@ end
|
|||
-- Node definitions
|
||||
--
|
||||
|
||||
minetest.register_node("furn:furnace", {
|
||||
minetest.register_node("furnz: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"
|
||||
"furnz_furnace_top.png", "furnz_furnace_bottom.png",
|
||||
"furnz_furnace_side.png", "furnz_furnace_side.png",
|
||||
"furnz_furnace_side.png", "furnz_furnace_front.png"
|
||||
},
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=2},
|
||||
|
@ -386,10 +386,10 @@ minetest.register_node("furn:furnace", {
|
|||
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"
|
||||
furnz.get_inventory_drops(pos, "src", drops)
|
||||
furnz.get_inventory_drops(pos, "fuel", drops)
|
||||
furnz.get_inventory_drops(pos, "dst", drops)
|
||||
drops[#drops+1] = "furn:furnace"
|
||||
minetest.remove_node(pos)
|
||||
return drops
|
||||
end,
|
||||
|
@ -399,14 +399,14 @@ minetest.register_node("furn:furnace", {
|
|||
allow_metadata_inventory_take = allow_metadata_inventory_take,
|
||||
})
|
||||
|
||||
minetest.register_node("furn:furnace_active", {
|
||||
minetest.register_node("furnz: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",
|
||||
"furnz_furnace_top.png", "furnz_furnace_bottom.png",
|
||||
"furnz_furnace_side.png", "furnz_furnace_side.png",
|
||||
"furnz_furnace_side.png",
|
||||
{
|
||||
image = "furn_furnace_front_active.png",
|
||||
image = "furnz_furnace_front_active.png",
|
||||
backface_culling = false,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
|
@ -418,7 +418,7 @@ minetest.register_node("furn:furnace_active", {
|
|||
},
|
||||
paramtype2 = "facedir",
|
||||
light_source = 8,
|
||||
drop = "furn:furnace",
|
||||
drop = "furnz:furnace",
|
||||
groups = {cracky=2, not_in_creative_inventory=1},
|
||||
legacy_facedir_simple = true,
|
||||
is_ground_content = false,
|
||||
|
@ -432,7 +432,7 @@ minetest.register_node("furn:furnace_active", {
|
|||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "furn:furnace 1",
|
||||
output = "furnz:furnace 1",
|
||||
type = "shaped",
|
||||
recipe = {
|
||||
{"group:stone", "group:stone",
|
|
@ -1,4 +1,4 @@
|
|||
# textdomain: furn
|
||||
# textdomain: furnz
|
||||
(Item: @1; Fuel: @2)=(Producto: @1; Fuel: @2)
|
||||
100% (output full)=100% (salida llena)
|
||||
Empty=Vacío
|
|
@ -1,2 +1,2 @@
|
|||
name = furn
|
||||
name = furnz
|
||||
description = A furnace
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 271 B After Width: | Height: | Size: 271 B |
Before Width: | Height: | Size: 347 B After Width: | Height: | Size: 347 B |
Before Width: | Height: | Size: 792 B After Width: | Height: | Size: 792 B |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 618 B After Width: | Height: | Size: 618 B |
Before Width: | Height: | Size: 579 B After Width: | Height: | Size: 579 B |
Before Width: | Height: | Size: 624 B After Width: | Height: | Size: 624 B |
|
@ -6,10 +6,10 @@ end
|
|||
|
||||
local give_initial_stuff = function(player)
|
||||
local inv = player:get_inventory()
|
||||
give_if_not_gotten_already(inv, "main", "tools:pick_mese")
|
||||
give_if_not_gotten_already(inv, "main", "tools:axe_steel")
|
||||
give_if_not_gotten_already(inv, "main", "tools:shovel_steel")
|
||||
give_if_not_gotten_already(inv, "main", "bucket:bucket")
|
||||
give_if_not_gotten_already(inv, "main", "toolz:pick_mese")
|
||||
give_if_not_gotten_already(inv, "main", "toolz:axe_steel")
|
||||
give_if_not_gotten_already(inv, "main", "toolz:shovel_steel")
|
||||
give_if_not_gotten_already(inv, "main", "bucketz:bucket")
|
||||
give_if_not_gotten_already(inv, "main", "chest_of_everything:chest")
|
||||
minetest.log("action", "[give_initial_stuff] Giving initial stuff to "..player:get_player_name())
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
name = give_initial_stuff
|
||||
description = Gives items to players on join
|
||||
depends = tools, bucket, chest_of_everything
|
||||
depends = toolz, bucketz, chest_of_everything
|
||||
|
|
|
@ -5,7 +5,7 @@ helper.table = {}
|
|||
|
||||
function helper.in_group(pos, group)
|
||||
local node = minetest.get_node_or_nil(pos)
|
||||
if (not node) or (minetest.get_node_group(node.name, group) == 0) then
|
||||
if (not node) or (minetest.get_item_group(node.name, group) == 0) then
|
||||
return false
|
||||
else
|
||||
return true
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
name = items
|
||||
description = Some misc items
|
||||
depends = nodez, flowers
|
Before Width: | Height: | Size: 5.7 KiB |
|
@ -1,4 +1,4 @@
|
|||
items = {}
|
||||
itemz = {}
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
local modpath = minetest.get_modpath(modname)
|
|
@ -1,4 +1,4 @@
|
|||
# textdomain: items
|
||||
# textdomain: itemz
|
||||
Empty Bottle=Botella Vacía
|
||||
Empty Flask=Frasco vacío
|
||||
Flask with Rose=Jarrón con rosa
|
|
@ -0,0 +1,3 @@
|
|||
name = itemz
|
||||
description = Some misc items
|
||||
depends = nodez, flowerz
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 598 B After Width: | Height: | Size: 598 B |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |