Mineclone compatibility (#36)
* latest versions of mapgen_helper and subterrane * initial work * call it "minetest_game" compatibility instead of "default" compatibility * Getting started on moving all default dependencies to a single root mod * distilling out more dependencies * fix some typos * more default dependencies * beds * start getting some MCL equivalents set up * mine gas dependencies * reorganize * add some mapgen stuff * getting close to actually being able to run mineclone with this * it actually runs! Crashes with out-of-memory error when you try to go below -64, but it's a start. * hide flowing pit plasma from creative inventory * mineclone 5 settings * Update subterrane * get rid of meselamp dependency, bring in ancient lanterns from deep roads * stair dependencies * add mcl fences * add mcl blast resistance and hardness to everything. Also an alternate name for Nethercap in MCL, since "nether" has another meaning there. * buckets of oil and syrup should work in mineclone now * 'splosions! * make hunters avoid repaired ancient lanterns * mapgen torchspine wasn't having its timer set * split mapgen compatibility code into its own file * bypass dependency indirection for df_farming. * apply threshold alpha to food items, they look better that way * bypass dependency indirection for df_mapitems * bypass dependency indirection for df_primordial_items * bypass dependency indirection for df_trees * bypass dependency indirection for df_underworld_items * bypass dependency indirection for df_caverns * fixing up the puzzle seal to work in both * fix puzzle seal formspec for mcl * create built-in substitutes for fireflies and bones mods for when those aren't available * set up mcl dungeon loot for underworld warriors, port over some translations from default * overlooked a debug * add itemslot backgrounds for mcl * added mineclone groups to all registered nodes. TODO: craftitems. This was extremely tedious. Completely untested, aside from simply running the game. * minor fixes to the built-in bones node * eatable group for edibles * clean up some TODOs * adjust pit plasma abm conditions * add df_ambience * fixing up explosions. Also make slade sand diggable in mcl, and fix a bug in web generators * make tower cap caves less chirpy, fix bigger goblin hut schematic, allow glowing spindlestem extract bottles * avoid an undeclared global check * alas, cave pearls aren't set up right for attached_node_facedir. * bunch of work on mineclone ores, moved main config into df_dependencies * add a few more ores * update depends in mod.conf * add opaque group to light-sensitive dirt types Mineclone adds the "opaque" group only to non-light nodes, and torches check for the opaque group to decide whether they can be placed there. light-sensitive nodes need the "light" paramtype to work, though. So adding the opaque group manually to these. * add a touch of reverb to one of the whisper tracks, it didn't fit with the others without it * bloodthorn also needs to be set opaque * add sound to torchspines * isolate Nethercap translation name to make it easier to swap out in Mineclone contexts * ambience tweak * fix dirt spreads https://github.com/FaceDeer/dfcaverns/issues/35 * adding achievements! Almost all untested yet. * fix a few achievements glitches * tweak some more achievements, add delay when achievements unlock other achievements * fix farming achievements, fix spindlestem callbacks on place * icons for farming achievements * more achievement icons, fix ancient lantern achievement * two more icons, update text * add icons for upper cavern layers * all achievements have icons now. Also add another sound to the magma sea ambience * hook into awards' trigger system to get "x/y" progress displayed for the multi-achievement achievements * ironically, Mineclone has an old version of awards that is incompatible with my trigger work. * every award should now have a description and a difficulty. * removing leftovers * missing callbacks for farmables * put growth restrictions on farmables so the achievement doesn't trigger inappropriately. * enable ores in MCL2, fix some undeclared globals, fix icecap growth in MCL (achievements are a good debugging tool) * get *all* the copper and iron containing nodes * fix old awards mod's handling of grouped dig items * Add a little bonus for players who activate a slade breacher - a handheld 'splosion tool * used the wrong drop method * beef up explosions in MCL, make slade brick craftable from slade sand and lava * better creative mode checks, fix crash when digging walls in MCL * Update subterrane * various bugfixes and tweaks * whipping up a simple puzzle chest to give a clue about ancient numbering The coding is done, but UI and a node mesh need to be done * prepare for some art tomorrow * chest node and sounds * images for the combination dials * add puzzle chests to the underworld buildings * update translations * oops, can't initialize the contents of puzzle chests every time or players get endless stuff * add backgrounds to item slots in MCL * wrap the existing function rather than copy and pasting it * fix bucket dependency in cooking recipes * add _mcl_saturation to edibles
@ -18,8 +18,8 @@ local register_cave_wheat = function(number)
|
||||
is_ground_content = false,
|
||||
buildable_to = true,
|
||||
floodable = true,
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, flora = 1},
|
||||
sounds = df_farming.sounds.leaves,
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, flora = 1, handy=1, swordy=1, hoey=1, destroy_by_lava_flow=1,dig_by_piston=1},
|
||||
sounds = df_dependencies.sound_leaves(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
@ -48,6 +48,9 @@ local register_cave_wheat = function(number)
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
_mcl_blast_resistance = 0.2,
|
||||
_mcl_hardness = 0.2,
|
||||
}
|
||||
|
||||
if number < 8 then
|
||||
@ -120,7 +123,8 @@ minetest.register_craftitem("df_farming:cave_bread", {
|
||||
sound = {eat = {name = "df_farming_chomp_crunch", gain = 1.0}},
|
||||
on_use = minetest.item_eat(5),
|
||||
_hunger_ng = {satiates = 5},
|
||||
groups = {flammable = 2, food = 5},
|
||||
_mcl_saturation = 3,
|
||||
groups = {flammable = 2, food = 5, eatable=5},
|
||||
})
|
||||
|
||||
local recipe_registered = false
|
||||
@ -129,15 +133,15 @@ if minetest.get_modpath("cottages") then
|
||||
recipe_registered = true
|
||||
end
|
||||
|
||||
if minetest.registered_items["farming:mortar_pestle"] ~= nil then
|
||||
if minetest.registered_items[df_dependencies.node_name_mortar_pestle] ~= nil then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "df_farming:cave_flour",
|
||||
recipe = {
|
||||
"df_farming:cave_wheat", "df_farming:cave_wheat", "df_farming:cave_wheat",
|
||||
"df_farming:cave_wheat", "farming:mortar_pestle"
|
||||
"df_farming:cave_wheat", df_dependencies.node_name_mortar_pestle
|
||||
},
|
||||
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}},
|
||||
replacements = {{"group:food_mortar_pestle", df_dependencies.node_name_mortar_pestle}},
|
||||
})
|
||||
recipe_registered = true
|
||||
end
|
||||
@ -164,8 +168,10 @@ minetest.register_node("df_farming:cave_straw", {
|
||||
description = S("Cave Straw"),
|
||||
tiles = {"dfcaverns_cave_straw.png"},
|
||||
is_ground_content = false,
|
||||
groups = {snappy=3, flammable=4, fall_damage_add_percent=-30, straw=1},
|
||||
sounds = df_farming.sounds.leaves,
|
||||
groups = {snappy=3, flammable=4, straw=1, handy=1,hoey=1, compostability=85, flammable=2, fire_encouragement=60, fire_flammability=20, building_block=1, fall_damage_add_percent=-80, enderman_takable=1},
|
||||
sounds = df_dependencies.sound_leaves(),
|
||||
_mcl_blast_resistance = 0.5,
|
||||
_mcl_hardness = 0.5,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
@ -203,9 +209,11 @@ if minetest.get_modpath("footprints") then
|
||||
{-0.5, -0.5, -0.5, 0.5, -3 / 8, 0.5}
|
||||
},
|
||||
},
|
||||
groups = {snappy = 3, flammable = 2, attached_node = 1},
|
||||
groups = {snappy = 3, flammable = 2, attached_node = 1, handy=1, hoey=1, compostability=85, fire_encouragement=60, fire_flammability=20, fall_damage_add_percent=-30, destroy_by_lava_flow=1,dig_by_piston=1},
|
||||
drop = "",
|
||||
sounds = df_farming.sounds.leaves,
|
||||
sounds = df_dependencies.sound_leaves(),
|
||||
_mcl_blast_resistance = 0.5,
|
||||
_mcl_hardness = 0.5,
|
||||
})
|
||||
|
||||
footprints.register_trample_node("df_farming:cave_wheat_5", {
|
||||
|
@ -1,5 +1,6 @@
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
local bucket_empty = df_dependencies.node_name_bucket_empty
|
||||
|
||||
local chomp = {eat = {name = "df_farming_chomp_crunch", gain = 1.0}}
|
||||
local crisp = {eat = {name = "df_farming_crisp_chew", gain = 1.0}}
|
||||
@ -16,7 +17,7 @@ local recipes = {
|
||||
{recipe = {"df_farming:cave_wheat_seed", "df_farming:cave_wheat_seed", "df_farming:pig_tail_seed", "df_farming:plump_helmet_spawn"}, name=S("Cave Wheat Seed Risotto"), image="dfcaverns_prepared_food14x16.png", sound = gummy},
|
||||
{recipe = {"df_farming:sweet_pod_seed", "group:food_flour"}, name=S("Sweet Pod Spore Dumplings"), image="dfcaverns_prepared_food09x16.png", sound = mushy},
|
||||
{recipe = {"df_farming:sweet_pod_seed", "group:food_flour", "group:sugar"}, name=S("Sweet Pod Spore Single Crust Pie"), image="dfcaverns_prepared_food05x16.png", sound = mushy},
|
||||
{recipe = {"df_farming:sweet_pod_seed", "group:sugar", "group:food_flour", "df_farming:dwarven_syrup_bucket"}, replacements={{"df_farming:dwarven_syrup_bucket", "bucket:bucket_empty"}}, name=S("Sweet Pod Spore Brule"), image="dfcaverns_prepared_food22x16.png", sound = soft},
|
||||
{recipe = {"df_farming:sweet_pod_seed", "group:sugar", "group:food_flour", "df_farming:dwarven_syrup_bucket"}, replacements={{"df_farming:dwarven_syrup_bucket", bucket_empty}}, name=S("Sweet Pod Spore Brule"), image="dfcaverns_prepared_food22x16.png", sound = soft},
|
||||
{recipe = {"df_farming:sugar", "group:food_flour"}, name=S("Sweet Pod Sugar Cookie"), image="dfcaverns_prepared_food02x16.png", sound = crisp},
|
||||
{recipe = {"df_farming:sugar", "group:food_flour", "df_farming:quarry_bush_leaves"}, name=S("Sweet Pod Sugar Gingerbread"), image="dfcaverns_prepared_food21x16.png", sound = chomp},
|
||||
{recipe = {"df_farming:sugar", "group:sugar", "group:food_flour", "group:food_flour"}, name=S("Sweet Pod Sugar Roll"), image="dfcaverns_prepared_food25x16.png", sound = crisp},
|
||||
@ -36,11 +37,11 @@ local recipes = {
|
||||
{recipe = {"df_farming:dimple_cup_seed", "group:food_flour", "group:sugar"}, name=S("Dimple Cup Spore Scone"), image="dfcaverns_prepared_food32x16.png", sound = chomp},
|
||||
{recipe = {"df_farming:dimple_cup_seed", "df_farming:sweet_pod_seed", "df_farming:quarry_bush_seed", "group:food_flour"}, name=S("Dimple Cup Spore Roll"), image="dfcaverns_prepared_food31x16.png", sound = soft},
|
||||
{recipe = {"df_farming:pig_tail_seed", "df_farming:cave_bread"}, name=S("Pig Tail Spore Sandwich"), image="dfcaverns_prepared_food20x16.png", sound = soft},
|
||||
{recipe = {"df_farming:pig_tail_seed", "df_farming:pig_tail_seed", "df_farming:dwarven_syrup_bucket"}, name=S("Pig Tail Spore Tofu"), replacements={{"df_farming:dwarven_syrup_bucket", "bucket:bucket_empty"}}, image="dfcaverns_prepared_food30x16.png", sound = gummy},
|
||||
{recipe = {"df_farming:pig_tail_seed", "df_farming:pig_tail_seed", "df_farming:dwarven_syrup_bucket"}, name=S("Pig Tail Spore Tofu"), replacements={{"df_farming:dwarven_syrup_bucket", bucket_empty}}, image="dfcaverns_prepared_food30x16.png", sound = gummy},
|
||||
{recipe = {"df_farming:pig_tail_seed", "df_farming:sweet_pod_seed", "group:food_flour", "group:food_flour"}, name=S("Pig Tail Spore Casserole"), image="dfcaverns_prepared_food34x16.png", sound = mushy},
|
||||
{recipe = {"df_farming:dwarven_syrup_bucket", "df_farming:dwarven_syrup_bucket"}, replacements={{"df_farming:dwarven_syrup_bucket", "bucket:bucket_empty"}, {"df_farming:dwarven_syrup_bucket", "bucket:bucket_empty"}}, name=S("Dwarven Syrup Taffy"), image="dfcaverns_prepared_food19x16.png", sound = gummy},
|
||||
{recipe = {"df_farming:dwarven_syrup_bucket", "group:sugar", "group:plump_helmet"}, replacements={{"df_farming:dwarven_syrup_bucket", "bucket:bucket_empty"}}, name=S("Dwarven Syrup Jellies"), image="dfcaverns_prepared_food06x16.png", sound = gummy},
|
||||
{recipe = {"df_farming:dwarven_syrup_bucket", "group:food_flour", "group:sugar", "df_farming:quarry_bush_seed"}, replacements={{"df_farming:dwarven_syrup_bucket", "bucket:bucket_empty"}}, name=S("Dwarven Syrup Delight"), image="dfcaverns_prepared_food24x16.png", sound = mushy},
|
||||
{recipe = {"df_farming:dwarven_syrup_bucket", "df_farming:dwarven_syrup_bucket"}, replacements={{"df_farming:dwarven_syrup_bucket", bucket_empty}, {"df_farming:dwarven_syrup_bucket", bucket_empty}}, name=S("Dwarven Syrup Taffy"), image="dfcaverns_prepared_food19x16.png", sound = gummy},
|
||||
{recipe = {"df_farming:dwarven_syrup_bucket", "group:sugar", "group:plump_helmet"}, replacements={{"df_farming:dwarven_syrup_bucket", bucket_empty}}, name=S("Dwarven Syrup Jellies"), image="dfcaverns_prepared_food06x16.png", sound = gummy},
|
||||
{recipe = {"df_farming:dwarven_syrup_bucket", "group:food_flour", "group:sugar", "df_farming:quarry_bush_seed"}, replacements={{"df_farming:dwarven_syrup_bucket", bucket_empty}}, name=S("Dwarven Syrup Delight"), image="dfcaverns_prepared_food24x16.png", sound = mushy},
|
||||
}
|
||||
|
||||
local complexity = {[2]={name="simple", value=4}, [3]={name="medium", value=6}, [4]={name="complex", value=8}}
|
||||
@ -96,8 +97,9 @@ for _, def in pairs(recipes) do
|
||||
inventory_image = def.image,
|
||||
sound = def.sound,
|
||||
on_use = minetest.item_eat(recipe_type.value),
|
||||
groups = {food = recipe_type.value},
|
||||
groups = {food = recipe_type.value, eatable=recipe_type.value},
|
||||
_hunger_ng = {satiates = recipe_type.value},
|
||||
_mcl_saturation = recipe_type.value, -- TODO: make this more interesting
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
|
@ -1,21 +0,0 @@
|
||||
df_farming.sounds = {}
|
||||
|
||||
df_farming.sounds.leaves = default.node_sound_leaves_defaults()
|
||||
df_farming.sounds.water = default.node_sound_water_defaults()
|
||||
|
||||
df_farming.node_names = {}
|
||||
|
||||
df_farming.node_names.dirt = "default:dirt"
|
||||
df_farming.node_names.dirt_moss = "df_farming:dirt_with_cave_moss"
|
||||
df_farming.node_names.floor_fungus = "df_farming:cobble_with_floor_fungus"
|
||||
df_farming.node_names.dirt_wet = "farming:soil_wet"
|
||||
df_farming.node_names.mortar_pestle = "farming:mortar_pestle"
|
||||
df_farming.node_names.bucket = "bucket:bucket_empty"
|
||||
df_farming.node_names.wool_white = "wool:white"
|
||||
|
||||
|
||||
-- these are only for initialization
|
||||
minetest.after(0, function()
|
||||
df_farming.sounds = nil
|
||||
df_farming.node_names = nil
|
||||
end)
|
@ -2,6 +2,8 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
local dimple_grow_time = df_farming.config.plant_growth_time * df_farming.config.dimple_cup_delay_multiplier / 4
|
||||
|
||||
local dimple_cup_groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, flower = 1, flora = 1, fire_encouragement=60,fire_flammability=100, compostability=70, handy=1,shearsy=1,hoey=1}
|
||||
|
||||
local register_dimple_cup = function(number)
|
||||
local name = "df_farming:dimple_cup_"..tostring(number)
|
||||
local def = {
|
||||
@ -16,8 +18,8 @@ local register_dimple_cup = function(number)
|
||||
floodable = true,
|
||||
is_ground_content = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, color_blue = 1, light_sensitive_fungus = 11, flower = 1, flora = 1},
|
||||
sounds = df_farming.sounds.leaves,
|
||||
groups = dimple_cup_groups,
|
||||
sounds = df_dependencies.sound_leaves(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
@ -42,6 +44,8 @@ local register_dimple_cup = function(number)
|
||||
},
|
||||
},
|
||||
},
|
||||
_mcl_blast_resistance = 0.2,
|
||||
_mcl_hardness = 0.2,
|
||||
}
|
||||
|
||||
if number < 4 then
|
||||
@ -56,6 +60,14 @@ for i = 1,4 do
|
||||
register_dimple_cup(i)
|
||||
end
|
||||
|
||||
local dimple_cup_groups_harvested = {}
|
||||
for group, val in pairs(dimple_cup_groups) do
|
||||
dimple_cup_groups_harvested[group] = val
|
||||
end
|
||||
dimple_cup_groups_harvested.color_blue = 1
|
||||
dimple_cup_groups_harvested.basecolor_blue = 1
|
||||
dimple_cup_groups_harvested.excolor_blue = 1
|
||||
|
||||
local name = "df_farming:dimple_cup_harvested"
|
||||
local def = {
|
||||
description = S("Dimple Cup"),
|
||||
@ -69,14 +81,16 @@ local def = {
|
||||
floodable = true,
|
||||
is_ground_content = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, attached_node = 1, color_blue = 1, light_sensitive_fungus = 11, flower = 1, flora = 1},
|
||||
sounds = df_farming.sounds.leaves,
|
||||
groups = dimple_cup_groups_harvested,
|
||||
sounds = df_dependencies.sound_leaves(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-8/16, -8/16, -8/16, 8/16, -8/16 + 4*4/16, 8/16},
|
||||
},
|
||||
},
|
||||
_mcl_blast_resistance = 0.2,
|
||||
_mcl_hardness = 0.2,
|
||||
}
|
||||
minetest.register_node(name, def)
|
||||
|
||||
|
@ -1,27 +1,13 @@
|
||||
df_farming.growth_permitted = {}
|
||||
-- The defaults here are very boring on account of how the farming code already
|
||||
-- checks soil conditions. Other mods can insert biome checks and whatnot here.
|
||||
|
||||
df_farming.growth_permitted["df_farming:cave_wheat_seed"] = function(pos)
|
||||
return true
|
||||
local growable = {[df_dependencies.node_name_dirt_wet] = true, [df_dependencies.node_name_dirt] = true}
|
||||
local check_farm_plant_soil = function(pos)
|
||||
return growable[minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name]
|
||||
end
|
||||
|
||||
df_farming.growth_permitted["df_farming:dimple_cup_seed"] = function(pos)
|
||||
return true
|
||||
end
|
||||
|
||||
df_farming.growth_permitted["df_farming:pig_tail_seed"] = function(pos)
|
||||
return true
|
||||
end
|
||||
|
||||
df_farming.growth_permitted["df_farming:quarry_bush_seed"] = function(pos)
|
||||
return true
|
||||
end
|
||||
|
||||
df_farming.growth_permitted["df_farming:sweet_pod_seed"] = function(pos)
|
||||
return true
|
||||
end
|
||||
|
||||
df_farming.growth_permitted["df_farming:plump_helmet_spawn"] = function(pos)
|
||||
return true
|
||||
end
|
||||
df_farming.growth_permitted["df_farming:cave_wheat_seed"] = check_farm_plant_soil
|
||||
df_farming.growth_permitted["df_farming:dimple_cup_seed"] = check_farm_plant_soil
|
||||
df_farming.growth_permitted["df_farming:pig_tail_seed"] = check_farm_plant_soil
|
||||
df_farming.growth_permitted["df_farming:quarry_bush_seed"] = check_farm_plant_soil
|
||||
df_farming.growth_permitted["df_farming:sweet_pod_seed"] = check_farm_plant_soil
|
||||
df_farming.growth_permitted["df_farming:plump_helmet_spawn"] = check_farm_plant_soil
|
@ -5,7 +5,6 @@ local modpath = minetest.get_modpath(modname)
|
||||
|
||||
--load companion lua files
|
||||
dofile(modpath.."/config.lua")
|
||||
dofile(modpath.."/dependencies.lua")
|
||||
dofile(modpath.."/doc.lua")
|
||||
dofile(modpath.."/aliases.lua")
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
name = df_farming
|
||||
description = Adds farmable underground plants that die in sunlight. Also includes various cooking reactions.
|
||||
depends = default
|
||||
optional_depends = farming, cottages, bucket, dynamic_liquid, wool, doc, crafting, footprints
|
||||
depends = df_dependencies
|
||||
optional_depends = cottages, dynamic_liquid, doc, crafting, footprints, oil
|
||||
|
@ -18,8 +18,8 @@ local register_pig_tail = function(number)
|
||||
is_ground_content = false,
|
||||
floodable = true,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, flora = 1},
|
||||
sounds = df_farming.sounds.leaves,
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, flora = 1, fire_encouragement=60,fire_flammability=100, compostability=70, handy=1,shearsy=1,hoey=1, destroy_by_lava_flow=1,dig_by_piston=1},
|
||||
sounds = df_dependencies.sound_leaves(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
@ -35,11 +35,11 @@ local register_pig_tail = function(number)
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
items = {'df_farming:pig_tail_seed 2', 'df_farming:pig_tail_thread 2'},
|
||||
items = {'df_farming:pig_tail_seed 2', 'df_farming:pig_tail_thread 3'},
|
||||
rarity = 9-number,
|
||||
},
|
||||
{
|
||||
items = {'df_farming:pig_tail_seed 1', 'df_farming:pig_tail_thread'},
|
||||
items = {'df_farming:pig_tail_seed 1', 'df_farming:pig_tail_thread 2'},
|
||||
rarity = 9-number,
|
||||
},
|
||||
{
|
||||
@ -48,6 +48,8 @@ local register_pig_tail = function(number)
|
||||
},
|
||||
},
|
||||
},
|
||||
_mcl_blast_resistance = 0.2,
|
||||
_mcl_hardness = 0.2,
|
||||
}
|
||||
|
||||
if number < 8 then
|
||||
@ -95,18 +97,18 @@ minetest.register_craftitem("df_farming:pig_tail_thread", {
|
||||
groups = {flammable = 1, thread = 1},
|
||||
})
|
||||
|
||||
if minetest.get_modpath("wool") then
|
||||
if df_dependencies.node_name_wool_white then
|
||||
minetest.register_craft({
|
||||
output = df_farming.node_names.wool_white,
|
||||
output = df_dependencies.node_name_wool_white,
|
||||
recipe = {
|
||||
{"group:thread", "group:thread"},
|
||||
{"group:thread", "group:thread"},
|
||||
}
|
||||
})
|
||||
end
|
||||
if minetest.get_modpath("farming") then
|
||||
if df_dependencies.node_name_string then
|
||||
minetest.register_craft({
|
||||
output = "farming:string 2",
|
||||
output = df_dependencies.node_name_string .. " 2",
|
||||
recipe = {
|
||||
{"group:thread"},
|
||||
{"group:thread"},
|
||||
@ -135,9 +137,11 @@ if minetest.get_modpath("footprints") then
|
||||
{-0.5, -0.5, -0.5, 0.5, -3 / 8, 0.5}
|
||||
},
|
||||
},
|
||||
groups = {snappy = 3, flammable = 2, attached_node = 1},
|
||||
groups = {snappy = 3, flammable = 2, attached_node = 1, handy=1, hoey=1, compostability=85, fire_encouragement=60, fire_flammability=20, fall_damage_add_percent=-30, destroy_by_lava_flow=1,dig_by_piston=1},
|
||||
drop = "",
|
||||
sounds = df_farming.sounds.leaves,
|
||||
sounds = df_dependencies.sound_leaves(),
|
||||
_mcl_blast_resistance = 0.2,
|
||||
_mcl_hardness = 0.2,
|
||||
})
|
||||
|
||||
footprints.register_trample_node("df_farming:pig_tail_5", {
|
||||
|
@ -15,12 +15,14 @@ minetest.register_node("df_farming:dead_fungus", {
|
||||
is_ground_content = false,
|
||||
buildable_to = true,
|
||||
floodable = true,
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, flow_through = 1, flora = 1},
|
||||
sounds = df_farming.sounds.leaves,
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, flow_through = 1, flora = 1, fire_encouragement=60,fire_flammability=100,destroy_by_lava_flow=1,dig_by_piston=1, compostability=65, handy=1, hoey=1},
|
||||
sounds = df_dependencies.sound_leaves(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0.0, 0.5},
|
||||
},
|
||||
_mcl_blast_resistance = 0.2,
|
||||
_mcl_hardness = 0.2,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
@ -48,12 +50,14 @@ minetest.register_node("df_farming:cavern_fungi", {
|
||||
buildable_to = true,
|
||||
floodable = true,
|
||||
light_source = 6,
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, flow_through = 1, flora = 1},
|
||||
sounds = df_farming.sounds.leaves,
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, flow_through = 1, flora = 1, fire_encouragement=50,fire_flammability=60,destroy_by_lava_flow=1,dig_by_piston=1, compostability=65, handy=1, hoey=1},
|
||||
sounds = df_dependencies.sound_leaves(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0.0, 0.5},
|
||||
},
|
||||
_mcl_blast_resistance = 0.2,
|
||||
_mcl_hardness = 0.2,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
@ -70,8 +74,8 @@ end
|
||||
|
||||
-----------------------------------------------------------------------------------------
|
||||
|
||||
local marginal = {[df_farming.node_names.dirt] = true, [df_farming.node_names.dirt_moss] = true, [df_farming.node_names.floor_fungus] = true}
|
||||
local growable = {[df_farming.node_names.dirt_wet] = true, [df_farming.node_names.dirt] = true, [df_farming.node_names.dirt_moss] = true, [df_farming.node_names.floor_fungus] = true}
|
||||
local marginal = {[df_dependencies.node_name_dirt] = true}
|
||||
local growable = {[df_dependencies.node_name_dirt_wet] = true, [df_dependencies.node_name_dirt] = true}
|
||||
|
||||
df_farming.plant_timer = function(pos, plantname, elapsed)
|
||||
local next_stage_time = minetest.registered_nodes[plantname]._dfcaverns_next_stage_time
|
||||
@ -89,6 +93,15 @@ df_farming.plant_timer = function(pos, plantname, elapsed)
|
||||
end
|
||||
end
|
||||
|
||||
local function copy_pointed_thing(pointed_thing)
|
||||
return {
|
||||
type = pointed_thing.type,
|
||||
above = pointed_thing.above and vector.copy(pointed_thing.above),
|
||||
under = pointed_thing.under and vector.copy(pointed_thing.under),
|
||||
ref = pointed_thing.ref,
|
||||
}
|
||||
end
|
||||
|
||||
local place_seed = function(itemstack, placer, pointed_thing, plantname)
|
||||
local pt = pointed_thing
|
||||
-- check if pointing at a node
|
||||
@ -130,14 +143,31 @@ local place_seed = function(itemstack, placer, pointed_thing, plantname)
|
||||
end
|
||||
|
||||
-- add the node and remove 1 item from the itemstack
|
||||
local newnode= {name = itemstack:get_name(), param2 = 1, param1=0}
|
||||
local oldnode= minetest.get_node(pt.above)
|
||||
minetest.add_node(pt.above, {name = plantname, param2 = 1})
|
||||
|
||||
local growth_permitted_function = df_farming.growth_permitted[plantname]
|
||||
if not growth_permitted_function or growth_permitted_function(pt.above) then
|
||||
df_farming.plant_timer(pt.above, plantname)
|
||||
else
|
||||
minetest.get_node_timer(pt.above):stop() -- make sure no old timers are running on this node
|
||||
end
|
||||
if not minetest.settings:get_bool("creative_mode", false) then
|
||||
|
||||
-- Run script hook
|
||||
local take_item = true
|
||||
for _, callback in ipairs(core.registered_on_placenodes) do
|
||||
-- Deepcopy pos, node and pointed_thing because callback can modify them
|
||||
local place_to_copy = vector.copy(pt.above)
|
||||
local newnode_copy = {name=newnode.name, param1=newnode.param1, param2=newnode.param2}
|
||||
local oldnode_copy = {name=oldnode.name, param1=oldnode.param1, param2=oldnode.param2}
|
||||
local pointed_thing_copy = copy_pointed_thing(pointed_thing)
|
||||
if callback(place_to_copy, newnode_copy, placer, oldnode_copy, itemstack, pointed_thing_copy) then
|
||||
take_item = false
|
||||
end
|
||||
end
|
||||
|
||||
if not minetest.is_creative_enabled(placer:get_player_name()) then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
@ -153,7 +183,7 @@ df_farming.register_seed = function(name, description, image, stage_one, grow_ti
|
||||
wield_image = image,
|
||||
drawtype = "signlike",
|
||||
paramtype2 = "wallmounted",
|
||||
groups = {seed = 1, snappy = 3, attached_node = 1, flammable = 2, dfcaverns_cookable = 1, digtron_on_place=1},
|
||||
groups = {seed = 1, snappy = 3, attached_node = 1, dfcaverns_cookable = 1, digtron_on_place=1,destroy_by_lava_flow=1,dig_by_piston=1, handy=1, hoey=1},
|
||||
_dfcaverns_next_stage = stage_one,
|
||||
_dfcaverns_next_stage_time = grow_time,
|
||||
paramtype = "light",
|
||||
@ -165,6 +195,8 @@ df_farming.register_seed = function(name, description, image, stage_one, grow_ti
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
||||
},
|
||||
_mcl_blast_resistance = 0.2,
|
||||
_mcl_hardness = 0.2,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return place_seed(itemstack, placer, pointed_thing, "df_farming:"..name)
|
||||
|
@ -5,6 +5,15 @@ local displace_z = 0.125
|
||||
|
||||
local plump_helmet_grow_time = df_farming.config.plant_growth_time * df_farming.config.plump_helmet_delay_multiplier / 4
|
||||
|
||||
local function copy_pointed_thing(pointed_thing)
|
||||
return {
|
||||
type = pointed_thing.type,
|
||||
above = pointed_thing.above and vector.copy(pointed_thing.above),
|
||||
under = pointed_thing.under and vector.copy(pointed_thing.under),
|
||||
ref = pointed_thing.ref,
|
||||
}
|
||||
end
|
||||
|
||||
local plump_helmet_on_place = function(itemstack, placer, pointed_thing, plantname)
|
||||
local pt = pointed_thing
|
||||
-- check if pointing at a node
|
||||
@ -46,14 +55,30 @@ local plump_helmet_on_place = function(itemstack, placer, pointed_thing, plantn
|
||||
end
|
||||
|
||||
-- add the node and remove 1 item from the itemstack
|
||||
minetest.add_node(pt.above, {name = plantname, param2 = math.random(0,3)})
|
||||
local new_param2 = math.random(0,3)
|
||||
local newnode= {name = plantname, param2 = new_param2, param1=0}
|
||||
local oldnode= minetest.get_node(pt.above)
|
||||
minetest.add_node(pt.above, newnode)
|
||||
|
||||
local growth_permitted_function = df_farming.growth_permitted["df_farming:plump_helmet_spawn"] -- use the same permitted function for all plump helmets
|
||||
if not growth_permitted_function or growth_permitted_function(pt.above) then
|
||||
df_farming.plant_timer(pt.above, plantname)
|
||||
end
|
||||
|
||||
if not minetest.settings:get_bool("creative_mode", false) then
|
||||
-- Run script hook
|
||||
local take_item = true
|
||||
for _, callback in ipairs(core.registered_on_placenodes) do
|
||||
-- Deepcopy pos, node and pointed_thing because callback can modify them
|
||||
local place_to_copy = vector.copy(pt.above)
|
||||
local newnode_copy = {name=newnode.name, param1=newnode.param1, param2=newnode.param2}
|
||||
local oldnode_copy = {name=oldnode.name, param1=oldnode.param1, param2=oldnode.param2}
|
||||
local pointed_thing_copy = copy_pointed_thing(pointed_thing)
|
||||
if callback(place_to_copy, newnode_copy, placer, oldnode_copy, itemstack, pointed_thing_copy) then
|
||||
take_item = false
|
||||
end
|
||||
end
|
||||
|
||||
if not minetest.is_creative_enabled(placer:get_player_name()) then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
@ -67,7 +92,7 @@ minetest.register_node("df_farming:plump_helmet_spawn", {
|
||||
tiles = {
|
||||
"dfcaverns_plump_helmet_cap.png",
|
||||
},
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, digtron_on_place=1, flora = 1},
|
||||
groups = {snappy = 3, plant = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, digtron_on_place=1, flora = 1, destroy_by_lava_flow=1,dig_by_piston=1, handy=1, hoey=1},
|
||||
_dfcaverns_next_stage = "df_farming:plump_helmet_1",
|
||||
_dfcaverns_next_stage_time = plump_helmet_grow_time,
|
||||
drawtype = "nodebox",
|
||||
@ -82,6 +107,8 @@ minetest.register_node("df_farming:plump_helmet_spawn", {
|
||||
{-0.0625 + displace_x, -0.5, -0.125 + displace_z, 0.125 + displace_x, -0.375, 0.0625 + displace_z},
|
||||
}
|
||||
},
|
||||
_mcl_blast_resistance = 0.2,
|
||||
_mcl_hardness = 0.2,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return plump_helmet_on_place(itemstack, placer, pointed_thing, "df_farming:plump_helmet_spawn")
|
||||
@ -96,6 +123,17 @@ minetest.register_node("df_farming:plump_helmet_spawn", {
|
||||
end,
|
||||
})
|
||||
|
||||
local plump_helmet_groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1, digtron_on_place=1, flora = 1, fire_encouragement=30,fire_flammability=100,destroy_by_lava_flow=1,dig_by_piston=1,compostability=65}
|
||||
local get_plump_helmet_groups = function(eatable)
|
||||
local ret = {}
|
||||
for key, val in pairs(plump_helmet_groups) do
|
||||
ret[key]=val
|
||||
end
|
||||
ret.eatable = eatable
|
||||
ret.food = eatable
|
||||
return ret
|
||||
end
|
||||
|
||||
minetest.register_node("df_farming:plump_helmet_1", {
|
||||
description = S("Plump Helmet"),
|
||||
_doc_items_longdesc = df_farming.doc.plump_helmet_desc,
|
||||
@ -105,14 +143,14 @@ minetest.register_node("df_farming:plump_helmet_1", {
|
||||
"dfcaverns_plump_helmet_cap.png",
|
||||
"dfcaverns_plump_helmet_cap.png^[lowpart:5:dfcaverns_plump_helmet_stem.png",
|
||||
},
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1, food = 1, digtron_on_place=1, flora = 1},
|
||||
groups = get_plump_helmet_groups(1),
|
||||
_dfcaverns_next_stage = "df_farming:plump_helmet_2",
|
||||
_dfcaverns_next_stage_time = plump_helmet_grow_time,
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
sounds = df_farming.sounds.leaves,
|
||||
sounds = df_dependencies.sound_leaves(),
|
||||
sound = {eat = {name = "df_farming_gummy_chew", gain = 1.0}},
|
||||
walkable = false,
|
||||
floodable = true,
|
||||
@ -123,6 +161,8 @@ minetest.register_node("df_farming:plump_helmet_1", {
|
||||
{-0.125 + displace_x, -0.4375, -0.1875 + displace_z, 0.1875 + displace_x, -0.3125, 0.125 + displace_z}, -- cap
|
||||
}
|
||||
},
|
||||
_mcl_blast_resistance = 0.3,
|
||||
_mcl_hardness = 0.3,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return plump_helmet_on_place(itemstack, placer, pointed_thing, "df_farming:plump_helmet_1")
|
||||
@ -130,6 +170,7 @@ minetest.register_node("df_farming:plump_helmet_1", {
|
||||
|
||||
on_use = minetest.item_eat(1),
|
||||
_hunger_ng = {satiates = 1},
|
||||
_mcl_saturation = 0.5,
|
||||
|
||||
on_timer = function(pos, elapsed)
|
||||
df_farming.grow_underground_plant(pos, "df_farming:plump_helmet_1", elapsed)
|
||||
@ -146,13 +187,13 @@ minetest.register_node("df_farming:plump_helmet_2", {
|
||||
"dfcaverns_plump_helmet_cap.png",
|
||||
"dfcaverns_plump_helmet_cap.png^[lowpart:15:dfcaverns_plump_helmet_stem.png",
|
||||
},
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1, food = 2, digtron_on_place=1, flora = 1},
|
||||
groups = get_plump_helmet_groups(2),
|
||||
_dfcaverns_next_stage = "df_farming:plump_helmet_3",
|
||||
_dfcaverns_next_stage_time = plump_helmet_grow_time,
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sounds = df_farming.sounds.leaves,
|
||||
sounds = df_dependencies.sound_leaves(),
|
||||
sound = {eat = {name = "df_farming_gummy_chew", gain = 1.0}},
|
||||
walkable = false,
|
||||
is_ground_content = false,
|
||||
@ -164,12 +205,16 @@ minetest.register_node("df_farming:plump_helmet_2", {
|
||||
{-0.125 + displace_x, -0.3125, -0.1875 + displace_z, 0.1875 + displace_x, -0.0625, 0.125 + displace_z}, -- cap
|
||||
}
|
||||
},
|
||||
_mcl_blast_resistance = 0.4,
|
||||
_mcl_hardness = 0.4,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return plump_helmet_on_place(itemstack, placer, pointed_thing, "df_farming:plump_helmet_2")
|
||||
end,
|
||||
|
||||
on_use = minetest.item_eat(2),
|
||||
_hunger_ng = {satiates = 2},
|
||||
_mcl_saturation = 0.7,
|
||||
|
||||
on_timer = function(pos, elapsed)
|
||||
df_farming.grow_underground_plant(pos, "df_farming:plump_helmet_2", elapsed)
|
||||
@ -185,13 +230,13 @@ minetest.register_node("df_farming:plump_helmet_3", {
|
||||
"dfcaverns_plump_helmet_cap.png",
|
||||
"dfcaverns_plump_helmet_cap.png^[lowpart:35:dfcaverns_plump_helmet_stem.png",
|
||||
},
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1, food = 3, digtron_on_place=1, flora = 1},
|
||||
groups = get_plump_helmet_groups(3),
|
||||
_dfcaverns_next_stage = "df_farming:plump_helmet_4",
|
||||
_dfcaverns_next_stage_time = plump_helmet_grow_time,
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sounds = df_farming.sounds.leaves,
|
||||
sounds = df_dependencies.sound_leaves(),
|
||||
sound = {eat = {name = "df_farming_gummy_chew", gain = 1.0}},
|
||||
walkable = false,
|
||||
is_ground_content = false,
|
||||
@ -203,12 +248,16 @@ minetest.register_node("df_farming:plump_helmet_3", {
|
||||
{-0.1875 + displace_x, -0.125, -0.25 + displace_z, 0.25 + displace_x, 0.1875, 0.1875 + displace_z}, -- cap
|
||||
}
|
||||
},
|
||||
_mcl_blast_resistance = 0.5,
|
||||
_mcl_hardness = 0.5,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return plump_helmet_on_place(itemstack, placer, pointed_thing, "df_farming:plump_helmet_3")
|
||||
end,
|
||||
|
||||
on_use = minetest.item_eat(3),
|
||||
_hunger_ng = {satiates = 3},
|
||||
_mcl_saturation = 0.9,
|
||||
|
||||
on_timer = function(pos, elapsed)
|
||||
df_farming.grow_underground_plant(pos, "df_farming:plump_helmet_3", elapsed)
|
||||
@ -224,11 +273,11 @@ minetest.register_node("df_farming:plump_helmet_4", {
|
||||
"dfcaverns_plump_helmet_cap.png",
|
||||
"dfcaverns_plump_helmet_cap.png^[lowpart:40:dfcaverns_plump_helmet_stem.png",
|
||||
},
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1, food = 4, digtron_on_place=1, flora = 1},
|
||||
groups = get_plump_helmet_groups(4),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sounds = df_farming.sounds.leaves,
|
||||
sounds = df_dependencies.sound_leaves(),
|
||||
sound = {eat = {name = "df_farming_gummy_chew", gain = 1.0}},
|
||||
walkable = false,
|
||||
is_ground_content = false,
|
||||
@ -241,6 +290,9 @@ minetest.register_node("df_farming:plump_helmet_4", {
|
||||
{-0.1875 + displace_x, 0.25, -0.25 + displace_z, 0.25 + displace_x, 0.3125, 0.1875 + displace_z}, -- cap rounding
|
||||
}
|
||||
},
|
||||
_mcl_blast_resistance = 0.6,
|
||||
_mcl_hardness = 0.6,
|
||||
|
||||
drop = {
|
||||
max_items = 4,
|
||||
items = {
|
||||
@ -268,8 +320,16 @@ minetest.register_node("df_farming:plump_helmet_4", {
|
||||
|
||||
on_use = minetest.item_eat(4),
|
||||
_hunger_ng = {satiates = 4},
|
||||
_mcl_saturation = 1,
|
||||
})
|
||||
|
||||
local picked_groups = {}
|
||||
for key, val in pairs(plump_helmet_groups) do
|
||||
picked_groups[key]=val
|
||||
picked_groups.eatable=4
|
||||
picked_groups.food=4
|
||||
end
|
||||
picked_groups.not_in_creative_inventory = nil
|
||||
-- Need a separate picked type to prevent it from giving infinite spawn by just placing and re-harvesting
|
||||
minetest.register_node("df_farming:plump_helmet_4_picked", {
|
||||
description = S("Plump Helmet"),
|
||||
@ -280,11 +340,11 @@ minetest.register_node("df_farming:plump_helmet_4_picked", {
|
||||
"dfcaverns_plump_helmet_cap.png",
|
||||
"dfcaverns_plump_helmet_cap.png^[lowpart:40:dfcaverns_plump_helmet_stem.png",
|
||||
},
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1, food = 4, digtron_on_place=1, flora = 1},
|
||||
groups = picked_groups,
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sounds = df_farming.sounds.leaves,
|
||||
sounds = df_dependencies.sound_leaves(),
|
||||
sound = {eat = {name = "df_farming_gummy_chew", gain = 1.0}},
|
||||
walkable = false,
|
||||
is_ground_content = false,
|
||||
@ -297,12 +357,16 @@ minetest.register_node("df_farming:plump_helmet_4_picked", {
|
||||
{-0.1875 + displace_x, 0.25, -0.25 + displace_z, 0.25 + displace_x, 0.3125, 0.1875 + displace_z}, -- cap rounding
|
||||
}
|
||||
},
|
||||
_mcl_blast_resistance = 0.6,
|
||||
_mcl_hardness = 0.6,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return plump_helmet_on_place(itemstack, placer, pointed_thing, "df_farming:plump_helmet_4_picked")
|
||||
end,
|
||||
|
||||
on_use = minetest.item_eat(4),
|
||||
_hunger_ng = {satiates = 4},
|
||||
_mcl_saturation = 1,
|
||||
})
|
||||
|
||||
local place_list = {
|
||||
|
@ -18,14 +18,16 @@ local register_quarry_bush = function(number)
|
||||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
floodable = true,
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, flora = 1},
|
||||
sounds = df_farming.sounds.leaves,
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, flora = 1, fire_encouragement=60,fire_flammability=100, compostability=50, handy=1,shearsy=1,hoey=1, destroy_by_lava_flow=1,dig_by_piston=1},
|
||||
sounds = df_dependencies.sound_leaves(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-8/16, -8/16, -8/16, 8/16, -8/16 + (16/5)*number/16, 8/16},
|
||||
},
|
||||
},
|
||||
_mcl_blast_resistance = 0.2,
|
||||
_mcl_hardness = 0.2,
|
||||
|
||||
on_timer = function(pos, elapsed)
|
||||
df_farming.grow_underground_plant(pos, name, elapsed)
|
||||
|
@ -2,6 +2,11 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
local sweet_pod_grow_time = df_farming.config.plant_growth_time * df_farming.config.sweet_pod_delay_multiplier / 6
|
||||
|
||||
local syrup_sound = df_dependencies.sound_water()
|
||||
if minetest.get_modpath("oil") then
|
||||
syrup_sound.footstep = {name = "oil_oil_footstep", gain = 0.2}
|
||||
end
|
||||
|
||||
local register_sweet_pod = function(number)
|
||||
local name = "df_farming:sweet_pod_"..tostring(number)
|
||||
local def = {
|
||||
@ -16,14 +21,16 @@ local register_sweet_pod = function(number)
|
||||
is_ground_content = false,
|
||||
buildable_to = true,
|
||||
floodable = true,
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, flora = 1},
|
||||
sounds = df_farming.sounds.leaves,
|
||||
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, flora = 1, fire_encouragement=60,fire_flammability=100, compostability=70, handy=1,shearsy=1,hoey=1, destroy_by_lava_flow=1,dig_by_piston=1},
|
||||
sounds = df_dependencies.sound_leaves(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-8/16, -8/16, -8/16, 8/16, -8/16 + (16/6)*number/16, 8/16},
|
||||
},
|
||||
},
|
||||
_mcl_blast_resistance = 0.2,
|
||||
_mcl_hardness = 0.2,
|
||||
|
||||
on_timer = function(pos, elapsed)
|
||||
df_farming.grow_underground_plant(pos, name, elapsed)
|
||||
@ -114,14 +121,14 @@ if minetest.get_modpath("cottages") then
|
||||
recipe_registered = true
|
||||
end
|
||||
|
||||
if minetest.registered_items[df_farming.node_names.mortar_pestle] ~= nil then
|
||||
if minetest.registered_items[df_dependencies.node_name_mortar_pestle] ~= nil then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "df_farming:sugar",
|
||||
recipe = {
|
||||
"df_farming:sweet_pods", df_farming.node_names.mortar_pestle
|
||||
"df_farming:sweet_pods", df_dependencies.node_name_mortar_pestle
|
||||
},
|
||||
replacements = {{"group:food_mortar_pestle", df_farming.node_names.mortar_pestle}},
|
||||
replacements = {{"group:food_mortar_pestle", df_dependencies.node_name_mortar_pestle}},
|
||||
})
|
||||
recipe_registered = true
|
||||
end
|
||||
@ -138,7 +145,7 @@ end
|
||||
----------------------------------------------
|
||||
-- Syrup
|
||||
|
||||
if minetest.get_modpath("bucket") then
|
||||
if df_dependencies.bucket_register_liquid then
|
||||
minetest.register_node("df_farming:dwarven_syrup_source", {
|
||||
description = S("Dwarven Syrup Source"),
|
||||
_doc_items_longdesc = df_farming.doc.sweet_pod_syrup_desc,
|
||||
@ -183,8 +190,10 @@ if minetest.get_modpath("bucket") then
|
||||
liquid_renewable = false,
|
||||
liquid_range = 2,
|
||||
post_effect_color = {a = 204, r = 179, g = 131, b = 88},
|
||||
groups = {liquid = 3, flammable = 2},
|
||||
sounds = df_farming.sounds.water,
|
||||
groups = {liquid = 1, flammable = -1, dig_by_piston=1, fire_encouragement=5},
|
||||
sounds = syrup_sound,
|
||||
_mcl_blast_resistance = 100,
|
||||
_mcl_hardness = -1,
|
||||
})
|
||||
|
||||
minetest.register_node("df_farming:dwarven_syrup_flowing", {
|
||||
@ -232,11 +241,13 @@ if minetest.get_modpath("bucket") then
|
||||
liquid_renewable = false,
|
||||
liquid_range = 2,
|
||||
post_effect_color = {a = 204, r = 179, g = 131, b = 88},
|
||||
groups = {liquid = 3, flammable = 2, not_in_creative_inventory = 1},
|
||||
sounds = df_farming.sounds.water,
|
||||
groups = {liquid = 1, flammable = -1, not_in_creative_inventory = 1, dig_by_piston=1, fire_encouragement = 5},
|
||||
sounds = syrup_sound,
|
||||
_mcl_blast_resistance = 100,
|
||||
_mcl_hardness = -1,
|
||||
})
|
||||
|
||||
bucket.register_liquid(
|
||||
df_dependencies.bucket_register_liquid(
|
||||
"df_farming:dwarven_syrup_source",
|
||||
"df_farming:dwarven_syrup_flowing",
|
||||
"df_farming:dwarven_syrup_bucket",
|
||||
@ -247,7 +258,7 @@ if minetest.get_modpath("bucket") then
|
||||
if minetest.get_modpath("crafting") then
|
||||
simplecrafting_lib.register("furnace", {
|
||||
input = {
|
||||
[df_farming.node_names.bucket] = 1,
|
||||
[df_dependencies.node_name_bucket_empty] = 1,
|
||||
["df_farming:sugar"] = 3,
|
||||
["simplecrafting_lib:heat"] = 5,
|
||||
},
|
||||
@ -257,7 +268,7 @@ if minetest.get_modpath("bucket") then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "df_farming:dwarven_syrup_bucket",
|
||||
recipe = {df_farming.node_names.bucket, "df_farming:sugar", "df_farming:sugar", "df_farming:sugar"},
|
||||
recipe = {df_dependencies.node_name_bucket_empty, "df_farming:sugar", "df_farming:sugar", "df_farming:sugar"},
|
||||
})
|
||||
end
|
||||
|
||||
|
Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 172 B |
Before Width: | Height: | Size: 820 B After Width: | Height: | Size: 535 B |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 928 B After Width: | Height: | Size: 676 B |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 804 B After Width: | Height: | Size: 564 B |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 970 B |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 706 B After Width: | Height: | Size: 641 B |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 666 B After Width: | Height: | Size: 450 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 908 B After Width: | Height: | Size: 835 B |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 757 B After Width: | Height: | Size: 536 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 706 B After Width: | Height: | Size: 512 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 904 B After Width: | Height: | Size: 826 B |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 993 B After Width: | Height: | Size: 919 B |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 999 B After Width: | Height: | Size: 919 B |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 873 B After Width: | Height: | Size: 792 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 773 B After Width: | Height: | Size: 553 B |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 623 B After Width: | Height: | Size: 418 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 773 B After Width: | Height: | Size: 479 B |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 840 B After Width: | Height: | Size: 594 B |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 533 B After Width: | Height: | Size: 326 B |
Before Width: | Height: | Size: 978 B |
Before Width: | Height: | Size: 650 B After Width: | Height: | Size: 328 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 759 B After Width: | Height: | Size: 556 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 718 B After Width: | Height: | Size: 548 B |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 782 B After Width: | Height: | Size: 557 B |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 832 B After Width: | Height: | Size: 568 B |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 694 B After Width: | Height: | Size: 411 B |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 927 B After Width: | Height: | Size: 667 B |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 705 B After Width: | Height: | Size: 444 B |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 595 B After Width: | Height: | Size: 371 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 529 B After Width: | Height: | Size: 328 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 818 B After Width: | Height: | Size: 567 B |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 322 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 888 B After Width: | Height: | Size: 645 B |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 746 B After Width: | Height: | Size: 516 B |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 852 B After Width: | Height: | Size: 537 B |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 623 B After Width: | Height: | Size: 432 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 765 B After Width: | Height: | Size: 440 B |
Before Width: | Height: | Size: 388 B After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 896 B After Width: | Height: | Size: 791 B |