mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-17 16:41:06 +01:00
Merge pull request 'Allow villager to claim filled cauldrons.' (#3856) from Codiac/MineClone2:cauldron_job_site_fix into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/3856 Reviewed-by: 𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 <mrrar@noreply.git.minetest.land>
This commit is contained in:
commit
aa3b3421d5
1 changed files with 10 additions and 2 deletions
|
@ -351,7 +351,7 @@ local professions = {
|
||||||
leatherworker = {
|
leatherworker = {
|
||||||
name = N("Leatherworker"),
|
name = N("Leatherworker"),
|
||||||
texture = "mobs_mc_villager_leatherworker.png",
|
texture = "mobs_mc_villager_leatherworker.png",
|
||||||
jobsite = "mcl_cauldrons:cauldron",
|
jobsite = "group:cauldron",
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
{ { "mcl_mobitems:leather", 9, 12 }, E1 },
|
{ { "mcl_mobitems:leather", 9, 12 }, E1 },
|
||||||
|
@ -1008,7 +1008,15 @@ end
|
||||||
----- JOBSITE LOGIC
|
----- JOBSITE LOGIC
|
||||||
local function get_profession_by_jobsite(js)
|
local function get_profession_by_jobsite(js)
|
||||||
for k,v in pairs(professions) do
|
for k,v in pairs(professions) do
|
||||||
if v.jobsite == js then return k end
|
if v.jobsite == js then
|
||||||
|
return k
|
||||||
|
-- Catch Nitwit doesn't have a jobsite
|
||||||
|
elseif v.jobsite and v.jobsite:find("^group:") then
|
||||||
|
local group = v.jobsite:gsub("^group:", "")
|
||||||
|
if minetest.get_item_group(js, group) > 0 then
|
||||||
|
return k
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue