added salt crystal and recipes (thanks gorlock)

This commit is contained in:
tenplus1 2021-02-17 10:14:20 +00:00
parent 79035d0473
commit 3cbc4fe48e
4 changed files with 88 additions and 10 deletions

View File

@ -13,7 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t
### Changelog:
- 1.46 - Added min/max default light settings, added lettuce and blackberries with food items (thanks OgelGames), added soya and vanilla (thanks Felfa), added tofu
- 1.46 - Added min/max default light settings, added lettuce and blackberries with food items (thanks OgelGames), added soya and vanilla (thanks Felfa), added tofu, added salt crystals (thanks gorlock)
- 1.45 - Dirt and Hoes are more in line with default by using dry/wet/base, added cactus juice, added pasta, spaghetti, cabbage, korean bibimbap, code tidy
options, onion soup added (thanks edcrypt), Added apple pie, added wild cotton to savanna
- 1.44 - Added 'farming_stage_length' in mod settings for speed of crop growth, also thanks to TheDarkTiger for translation updates

View File

@ -33,7 +33,48 @@ minetest.register_node("farming:salt", {
selection_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
}
},
-- special function to make salt crystals form inside water
dropped_step = function(self, pos, dtime)
self.ctimer = (self.ctimer or 0) + dtime
if self.ctimer < 15.0 then return end
self.ctimer = 0
local needed
if self.node_inside
and self.node_inside.name == "default:water_source" then
needed = 8
elseif self.node_inside
and self.node_inside.name == "default:river_water_source" then
needed = 9
end
if not needed then return end
local objs = core.get_objects_inside_radius(pos, 0.5)
if not objs or #objs ~= 1 then return end
local salt, ent = nil, nil
for k, obj in pairs(objs) do
ent = obj:get_luaentity()
if ent and ent.name == "__builtin:item"
and ent.itemstring == "farming:salt " .. needed then
obj:remove()
core.add_item(pos, "farming:salt_crystal")
return false -- return with no further action
end
end
end
})
minetest.register_craft({
@ -44,6 +85,40 @@ minetest.register_craft({
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}
})
--= Salt Crystal
minetest.register_node("farming:salt_crystal", {
description = ("Salt crystal"),
inventory_image = "farming_salt_crystal.png",
wield_image = "farming_salt_crystal.png",
drawtype = "plantlike",
visual_scale = 0.8,
paramtype = "light",
light_source = 1,
tiles = {"farming_salt_crystal.png"},
groups = { dig_immediate = 3, attached_node = 1},
sounds = default.node_sound_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
},
})
minetest.register_craft({
type = "shapeless",
output = "farming:salt 9",
recipe = {"farming:salt_crystal", "farming:mortar_pestle"},
replacements = {{"farming:mortar_pestle", "farming:mortar_pestle"}}
})
minetest.register_craft({
output = "farming:salt_crystal",
recipe = {
{"farming:salt", "farming:salt", "farming:salt"},
{"farming:salt", "farming:salt", "farming:salt"},
{"farming:salt", "farming:salt", "farming:salt"}
}
})
--= Rose Water
minetest.register_node("farming:rose_water", {

View File

@ -145,13 +145,16 @@ Created by mDiyo (Natura), modified by TenPlus1 (License: CC BY-SA 3.0):
farming_barley.png
Created by OgelGames (CC BY-SA 4.0)
farming_berry_smoothie.png
farming_cactus_juice.png
farming_salad.png
farming_berry_smoothie.png
farming_cactus_juice.png
farming_salad.png
Created by Felfa (CC0)
farming_blackberry*.png
farming_lettuce*.png
farming_burger.png
farming_soy*.png
farming_vanilla*.png
farming_blackberry*.png
farming_lettuce*.png
farming_burger.png
farming_soy*.png
farming_vanilla*.png
Created by gorlock (CC0)
farming_salt_crystal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B