Give 'mcl_villages' the proper loot table, fix blacksmith shop catching fire/missing chest, add butcher shop, remove chest from large_houses, and remove screenshots.

MysticTempest 2021-01-28 01:24:43 -06:00
parent ff2cd808d5
commit ff38a44454
8 changed files with 38 additions and 29 deletions

@ -54,12 +54,13 @@ schem_path = settlements.modpath.."/schematics/"
-- --
schematic_table = { 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 = "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 = "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 = "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 = "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 = "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 = "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 = "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"}, {name = "well", mts = schem_path.."well.mts", hwidth = 6, hdepth = 8, hheight = 6, hsize = 10, max_num = 0.045, rplc = "n"},

@ -1,3 +1,4 @@
mcl_core mcl_core
mcl_loot
mcl_farming? mcl_farming?
mobs_mc? mobs_mc?

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

@ -1,3 +1,5 @@
mcl_villages = {}
local c_dirt_with_grass = minetest.get_content_id("mcl_core:dirt_with_grass") 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_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") --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 end
-- fill chest -- fill chest
local inv = minetest.get_inventory( {type="node", pos=chestpos} ) local inv = minetest.get_inventory( {type="node", pos=chestpos} )
-- always function mcl_villages.get_treasures(pr)
inv:add_item("main", "mcl_core:apple "..pr:next(1,3)) local loottable = {
-- low value items {
if pr:next(0,1) < 1 then stacks_min = 3,
inv:add_item("main", "mcl_farming:bread "..pr:next(0,3)) stacks_max = 8,
inv:add_item("main", "mcl_core:iron_ingot "..pr:next(0,3)) items = {
inv:add_item("main", "mcl_farming:melon_item "..pr:next(0,3)) { itemstring = "mcl_core:diamond", weight = 3, amount_min = 1, amount_max = 3 },
inv:add_item("main", "mcl_farming:carrot_item "..pr:next(0,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 },
-- additional fillings when farmin mod enabled { itemstring = "mcl_farming:bread", weight = 15, amount_min = 1, amount_max = 3 },
if minetest.get_modpath("farming") ~= nil and farming.mod == "redo" then { itemstring = "mcl_core:apple", weight = 15, amount_min = 1, amount_max = 3 },
if pr:next(0,1) < 1 then { itemstring = "mcl_tools:pick_iron", weight = 5 },
inv:add_item("main", "mcl_farming:melon_item "..pr:next(0,3)) { itemstring = "mcl_tools:sword_iron", weight = 5 },
inv:add_item("main", "mcl_farming:carrot_item "..pr:next(0,3)) { itemstring = "mcl_armor:chestplate_iron", weight = 5 },
inv:add_item("main", "farming:corn "..pr:next(0,3)) { itemstring = "mcl_armor:helmet_iron", weight = 5 },
end { itemstring = "mcl_armor:leggings_iron", weight = 5 },
end { itemstring = "mcl_armor:boots_iron", weight = 5 },
--]] { itemstring = "mcl_core:obsidian", weight = 5, amount_min = 3, amount_max = 7 },
end { itemstring = "mcl_core:sapling", weight = 5, amount_min = 3, amount_max = 7 },
-- medium value items { itemstring = "mcl_mobitems:saddle", weight = 3 },
if pr:next(0,3) < 1 then { itemstring = "mobs_mc:iron_horse_armor", weight = 1 },
inv:add_item("main", "mcl_tools:pick_iron "..pr:next(0,1)) { itemstring = "mobs_mc:gold_horse_armor", weight = 1 },
inv:add_item("main", "mcl_tools:pick_stone "..pr:next(0,1)) { itemstring = "mobs_mc:diamond_horse_armor", weight = 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 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 end
------------------------------------------------------------------------------- -------------------------------------------------------------------------------