diff --git a/mods/MAPGEN/mcl_villages/const.lua b/mods/MAPGEN/mcl_villages/const.lua index 5aa87078fe..285152f54f 100644 --- a/mods/MAPGEN/mcl_villages/const.lua +++ b/mods/MAPGEN/mcl_villages/const.lua @@ -54,12 +54,13 @@ schem_path = settlements.modpath.."/schematics/" -- schematic_table = { {name = "large_house", mts = schem_path.."large_house.mts", hwidth = 11, hdepth = 12, hheight = 9, hsize = 14, max_num = 0.08, rplc = "n"}, - {name = "blacksmith", mts = schem_path.."blacksmith.mts", hwidth = 7, hdepth = 7, hheight = 13, hsize = 13, max_num = 0.050, rplc = "n"}, + {name = "blacksmith", mts = schem_path.."blacksmith.mts", hwidth = 7, hdepth = 7, hheight = 13, hsize = 13, max_num = 0.055, rplc = "n"}, + {name = "butcher", mts = schem_path.."butcher.mts", hwidth = 11, hdepth = 8, hheight = 10, hsize = 14, max_num = 0.03, rplc = "n"}, {name = "church", mts = schem_path.."church.mts", hwidth = 13, hdepth = 13, hheight = 14, hsize = 15, max_num = 0.04, rplc = "n"}, {name = "farm", mts = schem_path.."farm.mts", hwidth = 7, hdepth = 7, hheight = 13, hsize = 13, max_num = 0.1, rplc = "n"}, {name = "lamp", mts = schem_path.."lamp.mts", hwidth = 3, hdepth = 3, hheight = 13, hsize = 10, max_num = 0.1, rplc = "n"}, {name = "library", mts = schem_path.."library.mts", hwidth = 12, hdepth = 12, hheight = 8, hsize = 13, max_num = 0.04, rplc = "n"}, - {name = "medium_house", mts = schem_path.."medium_house.mts", hwidth = 8, hdepth = 12, hheight = 8, hsize = 14, max_num = 0.09, rplc = "n"}, + {name = "medium_house", mts = schem_path.."medium_house.mts", hwidth = 8, hdepth = 12, hheight = 8, hsize = 14, max_num = 0.08, rplc = "n"}, {name = "small_house", mts = schem_path.."small_house.mts", hwidth = 9, hdepth = 7, hheight = 8, hsize = 13, max_num = 0.7, rplc = "n"}, {name = "tavern", mts = schem_path.."tavern.mts", hwidth = 11, hdepth = 10, hheight = 10, hsize = 13, max_num = 0.050, rplc = "n"}, {name = "well", mts = schem_path.."well.mts", hwidth = 6, hdepth = 8, hheight = 6, hsize = 10, max_num = 0.045, rplc = "n"}, diff --git a/mods/MAPGEN/mcl_villages/depends.txt b/mods/MAPGEN/mcl_villages/depends.txt index 3c04a572be..9ba29f3ee3 100644 --- a/mods/MAPGEN/mcl_villages/depends.txt +++ b/mods/MAPGEN/mcl_villages/depends.txt @@ -1,3 +1,4 @@ mcl_core +mcl_loot mcl_farming? mobs_mc? diff --git a/mods/MAPGEN/mcl_villages/schematics/blacksmith.mts b/mods/MAPGEN/mcl_villages/schematics/blacksmith.mts index cfdaf99ad7..d7fb66593d 100644 Binary files a/mods/MAPGEN/mcl_villages/schematics/blacksmith.mts and b/mods/MAPGEN/mcl_villages/schematics/blacksmith.mts differ diff --git a/mods/MAPGEN/mcl_villages/schematics/butcher.mts b/mods/MAPGEN/mcl_villages/schematics/butcher.mts new file mode 100644 index 0000000000..251033b1ec Binary files /dev/null and b/mods/MAPGEN/mcl_villages/schematics/butcher.mts differ diff --git a/mods/MAPGEN/mcl_villages/schematics/large_house.mts b/mods/MAPGEN/mcl_villages/schematics/large_house.mts index 7b749bf840..36be603f44 100644 Binary files a/mods/MAPGEN/mcl_villages/schematics/large_house.mts and b/mods/MAPGEN/mcl_villages/schematics/large_house.mts differ diff --git a/mods/MAPGEN/mcl_villages/screenshot.png b/mods/MAPGEN/mcl_villages/screenshot.png deleted file mode 100644 index 64185d0b97..0000000000 Binary files a/mods/MAPGEN/mcl_villages/screenshot.png and /dev/null differ diff --git a/mods/MAPGEN/mcl_villages/screenshot_2.png b/mods/MAPGEN/mcl_villages/screenshot_2.png deleted file mode 100644 index ba299c8512..0000000000 Binary files a/mods/MAPGEN/mcl_villages/screenshot_2.png and /dev/null differ diff --git a/mods/MAPGEN/mcl_villages/utils.lua b/mods/MAPGEN/mcl_villages/utils.lua index 66a3fd6b58..f3c66575a2 100644 --- a/mods/MAPGEN/mcl_villages/utils.lua +++ b/mods/MAPGEN/mcl_villages/utils.lua @@ -1,3 +1,5 @@ +mcl_villages = {} + local c_dirt_with_grass = minetest.get_content_id("mcl_core:dirt_with_grass") local c_dirt_with_snow = minetest.get_content_id("mcl_core:dirt_with_grass_snow") --local c_dirt_with_dry_grass = minetest.get_content_id("mcl_core:dirt_with_dry_grass") @@ -235,33 +237,38 @@ function settlements.fill_chest(pos, pr) end -- fill chest local inv = minetest.get_inventory( {type="node", pos=chestpos} ) - -- always - inv:add_item("main", "mcl_core:apple "..pr:next(1,3)) - -- low value items - if pr:next(0,1) < 1 then - inv:add_item("main", "mcl_farming:bread "..pr:next(0,3)) - inv:add_item("main", "mcl_core:iron_ingot "..pr:next(0,3)) - inv:add_item("main", "mcl_farming:melon_item "..pr:next(0,3)) - inv:add_item("main", "mcl_farming:carrot_item "..pr:next(0,3)) - --[[ - -- additional fillings when farmin mod enabled - if minetest.get_modpath("farming") ~= nil and farming.mod == "redo" then - if pr:next(0,1) < 1 then - inv:add_item("main", "mcl_farming:melon_item "..pr:next(0,3)) - inv:add_item("main", "mcl_farming:carrot_item "..pr:next(0,3)) - inv:add_item("main", "farming:corn "..pr:next(0,3)) - end - end - --]] - end - -- medium value items - if pr:next(0,3) < 1 then - inv:add_item("main", "mcl_tools:pick_iron "..pr:next(0,1)) - inv:add_item("main", "mcl_tools:pick_stone "..pr:next(0,1)) - inv:add_item("main", "mcl_fire:flint_and_steel "..pr:next(0,1)) - inv:add_item("main", "mcl_buckets:bucket_empty "..pr:next(0,1)) - inv:add_item("main", "mcl_tools:sword_iron "..pr:next(0,1)) - end + function mcl_villages.get_treasures(pr) + local loottable = { + { + stacks_min = 3, + stacks_max = 8, + items = { + { itemstring = "mcl_core:diamond", weight = 3, amount_min = 1, amount_max = 3 }, + { itemstring = "mcl_core:iron_ingot", weight = 10, amount_min = 1, amount_max = 5 }, + { itemstring = "mcl_core:gold_ingot", weight = 5, amount_min = 1, amount_max = 3 }, + { itemstring = "mcl_farming:bread", weight = 15, amount_min = 1, amount_max = 3 }, + { itemstring = "mcl_core:apple", weight = 15, amount_min = 1, amount_max = 3 }, + { itemstring = "mcl_tools:pick_iron", weight = 5 }, + { itemstring = "mcl_tools:sword_iron", weight = 5 }, + { itemstring = "mcl_armor:chestplate_iron", weight = 5 }, + { itemstring = "mcl_armor:helmet_iron", weight = 5 }, + { itemstring = "mcl_armor:leggings_iron", weight = 5 }, + { itemstring = "mcl_armor:boots_iron", weight = 5 }, + { itemstring = "mcl_core:obsidian", weight = 5, amount_min = 3, amount_max = 7 }, + { itemstring = "mcl_core:sapling", weight = 5, amount_min = 3, amount_max = 7 }, + { itemstring = "mcl_mobitems:saddle", weight = 3 }, + { itemstring = "mobs_mc:iron_horse_armor", weight = 1 }, + { itemstring = "mobs_mc:gold_horse_armor", weight = 1 }, + { itemstring = "mobs_mc:diamond_horse_armor", weight = 1 }, + } + }, + } + local items = mcl_loot.get_multi_loot(loottable, pr) + return items + end + +local items = mcl_villages.get_treasures(pr) +mcl_loot.fill_inventory(inv, "main", items) end -------------------------------------------------------------------------------