commit
bea8400b9f
@ -20,5 +20,7 @@ Website : http://cdqwertz.github.io/
|
||||
Minetest : http://www.minetest.net/
|
||||
|
||||
##Thanks to
|
||||
* farfadet46 (dog/wolf model + french translation)
|
||||
* farfadet46 (dog/wolf model + French translation)
|
||||
* ExcaliburZero (cleaning up my code)
|
||||
* mahmutelmas06 (Turkish translation)
|
||||
* srifqi (Indonesian translation)
|
||||
|
@ -40,6 +40,7 @@ character_editor.window = character_editor.window .. "label[0,0;Select your lang
|
||||
character_editor.window = character_editor.window .. "button[3,2;2,1;lang_EN;EN]"
|
||||
character_editor.window = character_editor.window .. "button[3,3;2,1;lang_DE;DE]"
|
||||
character_editor.window = character_editor.window .. "button[3,4;2,1;lang_FR;FR]"
|
||||
character_editor.window = character_editor.window .. "button[3,6;2,1;lang_ID;ID]"
|
||||
character_editor.window = character_editor.window .. "button[3,5;2,1;lang_TR;TR]"
|
||||
|
||||
function character_editor.show_window(player)
|
||||
@ -66,9 +67,6 @@ minetest.register_on_joinplayer(function(player)
|
||||
character_editor.mesh[player:get_player_name()] = "character.x"
|
||||
character_editor.characters[player:get_player_name()] = {}
|
||||
character_editor.set_texture(player, 1, "character.png")
|
||||
end)
|
||||
|
||||
minetest.register_on_newplayer(function(player)
|
||||
character_editor.show_window(player)
|
||||
end)
|
||||
|
||||
@ -86,6 +84,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
elseif fields["lang_FR"] then
|
||||
print("FR")
|
||||
character_editor.language[name] = "fr/"
|
||||
elseif fields["lang_ID"] then
|
||||
print("ID")
|
||||
character_editor.language[name] = "id/"
|
||||
elseif fields["lang_TR"] then
|
||||
print("TR")
|
||||
character_editor.language[name] = "tr/"
|
||||
|
@ -1,4 +1,3 @@
|
||||
default
|
||||
legendary_items
|
||||
xp
|
||||
central_message
|
||||
|
@ -36,6 +36,7 @@ minetest.register_node("default:workbench_v2", {
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 3*2)
|
||||
end,
|
||||
after_dig_node = default.drop_items,
|
||||
})
|
||||
|
||||
-- crafts
|
||||
|
15
mods/default/functions.lua
Normal file
15
mods/default/functions.lua
Normal file
@ -0,0 +1,15 @@
|
||||
function default.drop_items(pos, oldnode, oldmetadata, digger)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:from_table(oldmetadata)
|
||||
local inv = meta:get_inventory()
|
||||
for i = 1, inv:get_size("main") do
|
||||
local stack = inv:get_stack("main", i)
|
||||
if not stack:is_empty() then
|
||||
local p = { x = pos.x + math.random(0, 5)/5 - 0.5,
|
||||
y = pos.y,
|
||||
z = pos.z + math.random(0, 5)/5 - 0.5
|
||||
}
|
||||
minetest.add_item(p, stack)
|
||||
end
|
||||
end
|
||||
end
|
@ -2,6 +2,7 @@ default = {}
|
||||
|
||||
local modpath = minetest.get_modpath("default")
|
||||
|
||||
dofile(modpath.."/functions.lua")
|
||||
dofile(modpath.."/player.lua")
|
||||
dofile(modpath.."/craftitems.lua")
|
||||
dofile(modpath.."/nodes.lua")
|
||||
|
@ -367,6 +367,28 @@ minetest.register_ore({
|
||||
y_max = 30,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_coal",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 11*11*11,
|
||||
clust_num_ores = 27,
|
||||
clust_size = 6,
|
||||
y_min = -256,
|
||||
y_max = 0,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_coal",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 8*8*8,
|
||||
clust_num_ores = 27,
|
||||
clust_size = 6,
|
||||
y_min = -31000,
|
||||
y_max = -256,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_iron",
|
||||
@ -374,10 +396,111 @@ minetest.register_ore({
|
||||
clust_scarcity = 9*9*9,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
y_min = -31000,
|
||||
y_min = -100,
|
||||
y_max = 2,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_iron",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 9*9*9,
|
||||
clust_num_ores = 6,
|
||||
clust_size = 3,
|
||||
y_min = -31000,
|
||||
y_max = -50,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_iron",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 8*8*8,
|
||||
clust_num_ores = 10,
|
||||
clust_size = 3,
|
||||
y_min = -31000,
|
||||
y_max = -256,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_zinc",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 16*16*16,
|
||||
clust_num_ores = 3,
|
||||
clust_size = 3,
|
||||
y_min = -31000,
|
||||
y_max = -50,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_zinc",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 9*9*9,
|
||||
clust_num_ores = 4,
|
||||
clust_size = 3,
|
||||
y_min = -31000,
|
||||
y_max = -256,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_copper",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 10*10*10,
|
||||
clust_num_ores = 4,
|
||||
clust_size = 3,
|
||||
y_min = -31000,
|
||||
y_max = -20,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_copper",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 8*8*8,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
y_min = -31000,
|
||||
y_max = -256,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_copper",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 7*7*7,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
y_min = -31000,
|
||||
y_max = -500,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_silver",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 11*11*11,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
y_min = -31000,
|
||||
y_max = -100,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_silver",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 8*8*8,
|
||||
clust_num_ores = 6,
|
||||
clust_size = 3,
|
||||
y_min = -31000,
|
||||
y_max = -256,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_gold",
|
||||
@ -389,6 +512,17 @@ minetest.register_ore({
|
||||
y_max = -256,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_gold",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 8*8*8,
|
||||
clust_num_ores = 10,
|
||||
clust_size = 3,
|
||||
y_min = -31000,
|
||||
y_max = -400,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_diamond",
|
||||
@ -400,6 +534,28 @@ minetest.register_ore({
|
||||
y_max = -256,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_diamond",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 36 * 36 * 36,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 2,
|
||||
y_min = -31000,
|
||||
y_max = -300,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_diamond",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 8 * 8 * 8,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 2,
|
||||
y_min = -31000,
|
||||
y_max = -700,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_ruby",
|
||||
|
@ -143,7 +143,9 @@ local box_form = box_form..default.itemslot_bg(0,0.3,8,4)
|
||||
local box_form = box_form.."list[current_player;main;0,4.85;8,1;]"
|
||||
local box_form = box_form..default.itemslot_bg(0,4.85,8,1)
|
||||
local box_form = box_form.."list[current_player;main;0,6.08;8,3;8]"
|
||||
local box_form = box_form..default.itemslot_bg(0,6,8,3)
|
||||
local box_form = box_form..default.itemslot_bg(0,6.08,8,3)
|
||||
local box_form = box_form.."listring[current_name;main]"
|
||||
local box_form = box_form.."listring[current_player;main]"
|
||||
|
||||
minetest.register_node("default:box", {
|
||||
description = "Box",
|
||||
@ -165,7 +167,7 @@ minetest.register_node("default:box", {
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 8*4)
|
||||
end,
|
||||
|
||||
after_dig_node = default.drop_items,
|
||||
})
|
||||
|
||||
default.treasure_chest_items = {"default:dirt", "default:sand", "default:stone_item", "default:coin", "default:coal_lump", "default:wood"}
|
||||
@ -689,9 +691,6 @@ minetest.register_node("default:stone", {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {'default:flint'},rarity = 5},
|
||||
{items = {'default:stone_with_zinc'},rarity = 40},
|
||||
{items = {'default:stone_with_iron'},rarity = 20},
|
||||
{items = {'default:stone_with_copper'},rarity = 30},
|
||||
{items = {'default:stone_with_silver'},rarity = 60},
|
||||
{items = {"default:stone_item 5"}},
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 279 B After Width: | Height: | Size: 327 B |
@ -53,7 +53,6 @@ minetest.override_item("default:plant_grass", {drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {'farming:sugarcane'},rarity = 20},
|
||||
{items = {'farming:wheat_seeds'},rarity = 5},
|
||||
{items = {'default:plant_grass'}},
|
||||
}
|
||||
}})
|
||||
@ -62,7 +61,6 @@ minetest.override_item("default:plant_grass_2", {drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {'farming:wheat_seeds'},rarity = 5},
|
||||
{items = {'farming:sugarcane'},rarity = 20},
|
||||
{items = {'default:plant_grass'}},
|
||||
}
|
||||
}})
|
||||
@ -71,7 +69,6 @@ minetest.override_item("default:plant_grass_3", {drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {'farming:wheat_seeds'},rarity = 5},
|
||||
{items = {'farming:sugarcane'},rarity = 20},
|
||||
{items = {'default:plant_grass'}},
|
||||
}
|
||||
}})
|
||||
@ -80,7 +77,6 @@ minetest.override_item("default:plant_grass_4", {drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {'farming:wheat_seeds'},rarity = 5},
|
||||
{items = {'farming:sugarcane'},rarity = 20},
|
||||
{items = {'default:plant_grass'}},
|
||||
}
|
||||
}})
|
||||
@ -89,13 +85,24 @@ minetest.override_item("default:plant_grass_5", {drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {'farming:wheat_seeds'},rarity = 5},
|
||||
{items = {'farming:sugarcane'},rarity = 20},
|
||||
{items = {'default:plant_grass'}},
|
||||
}
|
||||
}})
|
||||
|
||||
-- other plants
|
||||
|
||||
minetest.register_node("farming:apple", {
|
||||
description = "Apple",
|
||||
tiles = {"farming_apple.png"},
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
inventory_image = "farming_apple.png",
|
||||
groups = {crumbly=3},
|
||||
walkable = false,
|
||||
on_use = minetest.item_eat(2),
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("farming:sugarcane", {
|
||||
description = "Sugarcane",
|
||||
tiles = {"farming_sugarcane.png"},
|
||||
@ -108,15 +115,32 @@ minetest.register_node("farming:sugarcane", {
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"farming:sugarcane"},
|
||||
neighbors = {"default:dirt", "default:grass"},
|
||||
neighbors = {"default:dirt", "default:grass", "default:sand"},
|
||||
interval = 10.0,
|
||||
chance = 5,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
pos.y = pos.y + 1
|
||||
minetest.set_node(pos, {name = "farming:sugarcane"})
|
||||
if minetest.get_node(pos).name == "air" then
|
||||
minetest.set_node(pos, {name = "farming:sugarcane"})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:sand"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.04,
|
||||
biomes = {
|
||||
"beach"
|
||||
},
|
||||
spawn_by = "default:water_source",
|
||||
num_spawn_by = 1,
|
||||
y_min = 0,
|
||||
y_max = 31000,
|
||||
decoration = "farming:sugarcane",
|
||||
})
|
||||
|
||||
minetest.register_node("farming:cactus", {
|
||||
description = "Cactus",
|
||||
tiles = {"farming_cactus_top.png", "farming_cactus_top.png", "farming_cactus.png"},
|
||||
@ -130,7 +154,9 @@ minetest.register_abm({
|
||||
chance = 2,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
pos.y = pos.y + 1
|
||||
minetest.set_node(pos, {name = "farming:cactus"})
|
||||
if minetest.get_node(pos).name == "air" then
|
||||
minetest.set_node(pos, {name = "farming:cactus"})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
BIN
mods/farming/textures/farming_apple.png
Normal file
BIN
mods/farming/textures/farming_apple.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 314 B |
@ -7,6 +7,8 @@ local furnace_form = furnace_form.."list[current_player;main;0,4.85;8,1;]"
|
||||
local furnace_form = furnace_form..default.itemslot_bg(0,4.85,8,1)
|
||||
local furnace_form = furnace_form.."list[current_player;main;0,6.08;8,3;8]"
|
||||
local furnace_form = furnace_form..default.itemslot_bg(0,6.08,8,3)
|
||||
local furnace_form = furnace_form.."listring[current_name;main]"
|
||||
local furnace_form = furnace_form.."listring[current_player;main]"
|
||||
|
||||
minetest.register_node("furnace:furnace", {
|
||||
description = "Furnace",
|
||||
@ -20,6 +22,7 @@ minetest.register_node("furnace:furnace", {
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 4*4)
|
||||
end,
|
||||
after_dig_node = default.drop_items,
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
@ -79,6 +82,8 @@ local pattern_form = pattern_form.."list[current_player;main;0,4.85;8,1;]"
|
||||
local pattern_form = pattern_form..default.itemslot_bg(0,4.85,8,1)
|
||||
local pattern_form = pattern_form.."list[current_player;main;0,6.08;8,3;8]"
|
||||
local pattern_form = pattern_form..default.itemslot_bg(0,6.08,8,3)
|
||||
local pattern_form = pattern_form.."listring[current_name;main]"
|
||||
local pattern_form = pattern_form.."listring[current_player;main]"
|
||||
|
||||
minetest.register_node("furnace:pattern_rod", {
|
||||
description = "Pattern for a Rod",
|
||||
@ -91,7 +96,7 @@ minetest.register_node("furnace:pattern_rod", {
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 8*4)
|
||||
end,
|
||||
|
||||
after_dig_node = default.drop_items,
|
||||
})
|
||||
|
||||
minetest.register_node("furnace:pattern_blade", {
|
||||
@ -105,7 +110,7 @@ minetest.register_node("furnace:pattern_blade", {
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 8*4)
|
||||
end,
|
||||
|
||||
after_dig_node = default.drop_items,
|
||||
})
|
||||
|
||||
minetest.register_node("furnace:pattern_plate", {
|
||||
@ -119,7 +124,7 @@ minetest.register_node("furnace:pattern_plate", {
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 8*4)
|
||||
end,
|
||||
|
||||
after_dig_node = default.drop_items,
|
||||
})
|
||||
|
||||
minetest.register_craftitem("furnace:iron_rod", {
|
||||
|
2
mods/legendary_items/depends.txt
Normal file
2
mods/legendary_items/depends.txt
Normal file
@ -0,0 +1,2 @@
|
||||
classes
|
||||
blueprint
|
@ -3,12 +3,12 @@ legendary_items.rare_weapons = {}
|
||||
legendary_items.register_rare_weapon = function(name, forlevel, def)
|
||||
table.insert(legendary_items.rare_weapons, name)
|
||||
minetest.register_tool(":legendary_items:"..name, {
|
||||
description = def.description.."\n For Level: ".. tostring(forlevel).. "\n Damage: " .. tostring(def.damage) .. "\n Rare Item",
|
||||
description = def.description.."\n For Level: ".. tostring(forlevel).. "\n Damage: " .. tostring(def.damage+classes.get_dmg(forlevel)) .. "\n Rare Item",
|
||||
inventory_image = def.inventory_image,
|
||||
wield_scale = def.wield_scale,
|
||||
tool_capabilities = {
|
||||
max_drop_level=3,
|
||||
damage_groups = {fleshy=def.damage},
|
||||
damage_groups = {fleshy=def.damage+classes.get_dmg(forlevel)},
|
||||
},
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
if user == nil then return end
|
||||
@ -24,6 +24,13 @@ legendary_items.register_rare_weapon = function(name, forlevel, def)
|
||||
end
|
||||
end
|
||||
})
|
||||
table.insert(def.materials, "default:ruby")
|
||||
blueprint.register_blueprint(name, {
|
||||
description = def.description .. "\n For Level: ".. tostring(forlevel).. "\n Damage: " .. tostring(def.damage+classes.get_dmg(forlevel)) .. "\n Rare Item",
|
||||
materials = def.materials,
|
||||
out = "legendary_items:"..name,
|
||||
color = "yellow"
|
||||
})
|
||||
end
|
||||
|
||||
-- rare
|
||||
@ -32,35 +39,40 @@ legendary_items.register_rare_weapon("old_hammer", 3, {
|
||||
description = "Old Hammer",
|
||||
inventory_image = "legendary_items_old_hammer.png",
|
||||
wield_scale = {x = 2, y = 2, z =1},
|
||||
damage = 20,
|
||||
damage = 3,
|
||||
materials = {"default:stick", "default:stone"},
|
||||
})
|
||||
|
||||
legendary_items.register_rare_weapon("old_hammer_lvl_5", 5, {
|
||||
description = "Old Hammer",
|
||||
inventory_image = "legendary_items_old_hammer.png",
|
||||
wield_scale = {x = 2, y = 2, z =1},
|
||||
damage = 28,
|
||||
damage = 5,
|
||||
materials = {"default:stick", "default:stone", "default:stone"},
|
||||
})
|
||||
|
||||
legendary_items.register_rare_weapon("old_hammer_lvl_30", 30, {
|
||||
description = "Old Hammer",
|
||||
inventory_image = "legendary_items_old_hammer.png",
|
||||
wield_scale = {x = 2, y = 2, z =1},
|
||||
damage = 40,
|
||||
damage = 7,
|
||||
materials = {"default:stick", "default:stone", "default:stone"},
|
||||
})
|
||||
|
||||
legendary_items.register_rare_weapon("old_hammer_lvl_60", 60, {
|
||||
description = "Old Hammer",
|
||||
inventory_image = "legendary_items_old_hammer.png",
|
||||
wield_scale = {x = 2, y = 2, z =1},
|
||||
damage = 75,
|
||||
damage = 11,
|
||||
materials = {"default:stick", "default:stone", "default:stone"},
|
||||
})
|
||||
|
||||
legendary_items.register_rare_weapon("old_hammer_lvl_100", 100, {
|
||||
description = "Old Hammer",
|
||||
inventory_image = "legendary_items_old_hammer.png",
|
||||
wield_scale = {x = 2, y = 2, z =1},
|
||||
damage = 150,
|
||||
damage = 17,
|
||||
materials = {"default:stick", "default:stone", "default:stone"},
|
||||
})
|
||||
|
||||
|
||||
@ -68,35 +80,40 @@ legendary_items.register_rare_weapon("old_battle_axe", 3, {
|
||||
description = "Old Battle Axe",
|
||||
inventory_image = "legendary_items_old_battle_axe.png",
|
||||
wield_scale = {x = 1.2, y = 1.2, z =1},
|
||||
damage = 21,
|
||||
damage = 3,
|
||||
materials = {"default:stick", "default:stone", "default:stone"},
|
||||
})
|
||||
|
||||
legendary_items.register_rare_weapon("old_battle_axe_lvl_10", 10, {
|
||||
description = "Old Battle Axe",
|
||||
inventory_image = "legendary_items_old_battle_axe.png",
|
||||
wield_scale = {x = 1.2, y = 1.2, z =1},
|
||||
damage = 30,
|
||||
damage = 7,
|
||||
materials = {"default:stick", "default:stone", "default:stone"},
|
||||
})
|
||||
|
||||
legendary_items.register_rare_weapon("old_battle_axe_lvl_14", 14, {
|
||||
description = "Old Battle Axe",
|
||||
inventory_image = "legendary_items_old_battle_axe.png",
|
||||
wield_scale = {x = 1.2, y = 1.2, z =1},
|
||||
damage = 33,
|
||||
damage = 7,
|
||||
materials = {"default:stick", "default:stone", "default:stone"},
|
||||
})
|
||||
|
||||
legendary_items.register_rare_weapon("sugar_sword_lvl_2", 2, {
|
||||
description = "Sugar Sword",
|
||||
inventory_image = "legendary_items_sugar_sword.png",
|
||||
wield_scale = {x = 1.2, y = 1.2, z =1},
|
||||
damage = 20,
|
||||
damage = 2,
|
||||
materials = {"default:stick", "farming:sugar"},
|
||||
})
|
||||
|
||||
legendary_items.register_rare_weapon("sugar_sword_lvl_50", 50, {
|
||||
description = "Sugar Sword",
|
||||
inventory_image = "legendary_items_sugar_sword.png",
|
||||
wield_scale = {x = 1.2, y = 1.2, z =1},
|
||||
damage = 68,
|
||||
damage = 7,
|
||||
materials = {"default:stick", "farming:sugar"},
|
||||
})
|
||||
|
||||
-- super rare
|
||||
|
@ -34,11 +34,17 @@ function pets.register_pet(name, def)
|
||||
if pets.players_pets[clicker:get_player_name()] then
|
||||
cmsg.push_message_player(clicker, "[pet] You already have a pet!")
|
||||
else
|
||||
pets.players_pets[clicker:get_player_name()] = name
|
||||
cmsg.push_message_player(clicker, "[pet] + ".. def.description)
|
||||
self.pl = clicker
|
||||
pets.players_pets[clicker:get_player_name()] = name
|
||||
pets.save_pets()
|
||||
if clicker:get_wielded_item():get_name() == (def.food or "farming:wheat_seeds") then
|
||||
local wielded_item = clicker:get_wielded_item()
|
||||
wielded_item:take_item()
|
||||
clicker:set_wielded_item(wielded_item)
|
||||
|
||||
pets.players_pets[clicker:get_player_name()] = name
|
||||
cmsg.push_message_player(clicker, "[pet] + ".. def.description)
|
||||
self.pl = clicker
|
||||
pets.players_pets[clicker:get_player_name()] = name
|
||||
pets.save_pets()
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
|
@ -297,6 +297,9 @@ function story.generator.run(part, player, line_pos)
|
||||
out = {part="", wait=false, quit=true}
|
||||
return out
|
||||
end
|
||||
if cmd[1] == "$give" and cmd[2] and cmd[3] then
|
||||
player:get_inventory():add_item("main", cmd[2].. " " .. cmd[3])
|
||||
end
|
||||
end
|
||||
end
|
||||
i = i +1
|
||||
|
4
mods/story/parts/id/quest_1.dialog
Normal file
4
mods/story/parts/id/quest_1.dialog
Normal file
@ -0,0 +1,4 @@
|
||||
Petani : Hai :)
|
||||
Petani : Bisakah Anda membantuku?
|
||||
Anda : Ya, mengapa tidak? Apa yang harus kulakukan?
|
||||
Petani : Tolong ambilkan 20 gandum untukku.
|
4
mods/story/parts/id/quest_1_done.dialog
Normal file
4
mods/story/parts/id/quest_1_done.dialog
Normal file
@ -0,0 +1,4 @@
|
||||
Petani : Terima kasih!
|
||||
Petani : Bisakah Anda menanam ulang gandumnya?
|
||||
Anda : Oke.
|
||||
Petani : Terima kasih banyak, aku sedang sibuk sekarang.
|
4
mods/story/parts/id/quest_1_done_2.dialog
Normal file
4
mods/story/parts/id/quest_1_done_2.dialog
Normal file
@ -0,0 +1,4 @@
|
||||
Petani : Terima kasih!
|
||||
Petani : Anda dapat menyimpan benih gandum dan
|
||||
mengolah roti darinya. :)
|
||||
Anda : Terima kasih. :)
|
8
mods/story/parts/id/quest_2.dialog
Normal file
8
mods/story/parts/id/quest_2.dialog
Normal file
@ -0,0 +1,8 @@
|
||||
???? : Halo.
|
||||
Anda : Hai.
|
||||
???? : Setiap petualang butuh peralatan yang baik.
|
||||
???? : Untuk peralatan yang baik, Anda butuh besi.
|
||||
???? : Anda harus menambang beberapa besi.
|
||||
Anda : Tunggu... Siapa Anda??
|
||||
???? : -
|
||||
Anda : Hah, apa itu tadi?
|
5
mods/story/parts/id/quest_3.dialog
Normal file
5
mods/story/parts/id/quest_3.dialog
Normal file
@ -0,0 +1,5 @@
|
||||
Penambang : Batu bara berguna sebagai obor!
|
||||
Penambang : Anda dapat juga menggunakannya sebagai
|
||||
bahan bakar di perapian.
|
||||
Penambang : Anda seharusnya menambang 10 batu bara.
|
||||
Penambang : Itu cukup untuk beberapa obor. :)
|
@ -1,3 +1,3 @@
|
||||
lvl1=quest_1,quest_2,quest_3
|
||||
lvl2=quest_1,quest_2,quest_3,quest_4
|
||||
lvl1=tutorial_1
|
||||
lvl2=quest_3,quest_2
|
||||
lvl3=quest_5,quest_6
|
||||
|
5
mods/story/parts/tr/tutorial_1_2.dialog
Normal file
5
mods/story/parts/tr/tutorial_1_2.dialog
Normal file
@ -0,0 +1,5 @@
|
||||
Kai : Harika. GÖrünüşe göre bayağı taş getirmişsin :)
|
||||
You : Evet
|
||||
Kai : Sana daha önce verdiğim odunlardan bir çalışma masası yapmalısın.
|
||||
Kai : Çalışma masası yapmak içinse 3 tane odunu envanterine eklemelisin. ("I" tuşuna basarak envanterini açabilirsin.)!
|
||||
Kai : Masan hazır olunca onu bir yere koy.
|
9
mods/story/parts/tutorial_1.dialog
Normal file
9
mods/story/parts/tutorial_1.dialog
Normal file
@ -0,0 +1,9 @@
|
||||
Kai : I havent seen you before, are you new here?
|
||||
You : Yes, I heard that this is a city where many adventurers live.
|
||||
Kai : That is right.
|
||||
Kai : You dont have some basic materials with you to build a house, have you?
|
||||
You : no, not yet
|
||||
Kai : Ok, I think you should get some stones - they lay on the floor.
|
||||
Kai : I have some wood for you.
|
||||
You : Thank you :D
|
||||
Kai : Come back when you have some stones.
|
15
mods/story/parts/tutorial_1.quest
Normal file
15
mods/story/parts/tutorial_1.quest
Normal file
@ -0,0 +1,15 @@
|
||||
$dialog tutorial_1
|
||||
$wait
|
||||
$give default:wood 5
|
||||
$quest dignode default:stones_on_floor 3 10
|
||||
$wait quest
|
||||
$dialog tutorial_1_2
|
||||
$wait
|
||||
$quest placenode default:workbench 1 7
|
||||
$wait quest
|
||||
$dialog tutorial_1_3
|
||||
$wait
|
||||
$give default:grass 9
|
||||
$dialog tutorial_1_4
|
||||
$wait
|
||||
$quit
|
5
mods/story/parts/tutorial_1_2.dialog
Normal file
5
mods/story/parts/tutorial_1_2.dialog
Normal file
@ -0,0 +1,5 @@
|
||||
Kai : Great, It seems like you got some stones :)
|
||||
You : Yes
|
||||
Kai : You should craft a workbench out of the wood I gave you before.
|
||||
Kai : To craft a workbench put 3 wood into your hand crafting (press I to open your inventory)!
|
||||
Kai : After that, you should place the workbench on the floor.
|
19
mods/story/parts/tutorial_1_3.dialog
Normal file
19
mods/story/parts/tutorial_1_3.dialog
Normal file
@ -0,0 +1,19 @@
|
||||
Kai : Now, just craft some strings. Like this :
|
||||
|
||||
G G G
|
||||
- - -
|
||||
- - -
|
||||
|
||||
G : Grass
|
||||
- : nothing
|
||||
|
||||
Kai : after that you need to craft a strong string:
|
||||
|
||||
S S S
|
||||
- - -
|
||||
- - -
|
||||
|
||||
S : String
|
||||
- : nothing
|
||||
|
||||
Kai : Now, craft some sticks out of one wood.
|
13
mods/story/parts/tutorial_1_4.dialog
Normal file
13
mods/story/parts/tutorial_1_4.dialog
Normal file
@ -0,0 +1,13 @@
|
||||
Kai : You can craft a stone axe now!
|
||||
|
||||
- A -
|
||||
- B -
|
||||
- C -
|
||||
|
||||
A : Stone
|
||||
B : String (strong)
|
||||
C : Stick
|
||||
|
||||
Kai : With a stone axe you can dig trees!
|
||||
Kai : You also can use it to get more stones (from caves).
|
||||
You : Thank you very much for your help :)
|
1
mods/story/parts/tutorial_2.quest
Normal file
1
mods/story/parts/tutorial_2.quest
Normal file
@ -0,0 +1 @@
|
||||
$quit
|
@ -77,20 +77,18 @@ minetest.register_abm({
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
if math.random(150) == 50 then
|
||||
village.gen(pos)
|
||||
village.gen(pos)
|
||||
if not places.pos["village_" .. tostring(village.num)] then
|
||||
places.pos["village_" .. tostring(village.num)] = {x=pos.x, y=pos.y, z=pos.z}
|
||||
village.num = village.num +1
|
||||
places.save_places()
|
||||
else
|
||||
-- TODO : save village num
|
||||
village.num = village.num +10
|
||||
if not places.pos["village_" .. tostring(village.num)] then
|
||||
places.pos["village_" .. tostring(village.num)] = {x=pos.x, y=pos.y, z=pos.z}
|
||||
village.num = village.num +1
|
||||
places.save_places()
|
||||
else
|
||||
-- TODO : save village num
|
||||
village.num = village.num +10
|
||||
if not places.pos["village_" .. tostring(village.num)] then
|
||||
places.pos["village_" .. tostring(village.num)] = {x=pos.x, y=pos.y, z=pos.z}
|
||||
village.num = village.num +1
|
||||
places.save_places()
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
@ -100,7 +98,7 @@ minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.004,
|
||||
noise_params = {offset=0, scale=0.0001, spread={x=100, y=100, z=100}, seed=354, octaves=3, persist=0.7},
|
||||
biomes = {
|
||||
"grassland"
|
||||
},
|
||||
@ -108,3 +106,31 @@ minetest.register_decoration({
|
||||
y_max = 20,
|
||||
decoration = "village:spawn",
|
||||
})
|
||||
|
||||
|
||||
-- after start game
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
if not places.pos["home_village"] and minetest.get_player_privs(player:get_player_name()).server then
|
||||
minetest.chat_send_player(player:get_player_name(), "Choose a point for the home village!")
|
||||
minetest.chat_send_player(player:get_player_name(), "Try to find a grassland biome - the start is much easier there :)")
|
||||
minetest.chat_send_player(player:get_player_name(), "The biome should be flat.")
|
||||
player:get_inventory():add_item("main", "village:create_start_game")
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_craftitem("village:create_start_game", {
|
||||
description = "Create Home Village",
|
||||
inventory_image = "village_create.png",
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.type == "node" then
|
||||
village.gen(pointed_thing.above)
|
||||
itemstack:take_item()
|
||||
places.pos["home_village"] = pointed_thing.above
|
||||
placer:setpos(pointed_thing.above)
|
||||
places.save_places()
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
BIN
mods/village/textures/village_create.png
Normal file
BIN
mods/village/textures/village_create.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 291 B |
@ -8,4 +8,5 @@ pets.register_pet("wolf:wolf", {
|
||||
walk = {x=80, y=100},
|
||||
sit = {x=0, y=80}
|
||||
},
|
||||
food = "fishing:fish",
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user