Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Sys Quatre 2021-02-23 21:15:00 +01:00
commit 8f2c41abe9
5 changed files with 209 additions and 135 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", {
@ -273,7 +348,6 @@ minetest.register_craftitem("farming:pasta", {
groups = {food_pasta = 1}
})
if minetest.get_modpath("mobs_animal") or minetest.get_modpath("xanadu")then
minetest.register_craft({
output = "farming:pasta",
type = "shapeless",
@ -283,7 +357,7 @@ minetest.register_craft({
},
replacements = {{"group:food_mixing_bowl", "farming:mixing_bowl"}}
})
else
minetest.register_craft({
output = "farming:pasta",
type = "shapeless",
@ -296,7 +370,6 @@ minetest.register_craft({
{"group:food_oil", "vessels:glass_bottle"}
}
})
end
-- Spaghetti
@ -324,7 +397,6 @@ minetest.register_craftitem("farming:bibimbap", {
on_use = minetest.item_eat(8, "farming:bowl")
})
if minetest.get_modpath("mobs_animal") or minetest.get_modpath("xanadu")then
minetest.register_craft({
output = "farming:bibimbap",
type = "shapeless",
@ -335,7 +407,7 @@ minetest.register_craft({
},
replacements = {{"group:food_skillet", "farming:skillet"}}
})
else
minetest.register_craft({
output = "farming:bibimbap",
type = "shapeless",
@ -346,7 +418,6 @@ minetest.register_craft({
},
replacements = {{"group:food_skillet", "farming:skillet"}}
})
end
-- Burger

View File

@ -155,3 +155,6 @@ Created by Felfa (CC0)
farming_burger.png
farming_soy*.png
farming_vanilla*.png
Created by gorlock (CC0)
farming_salt_crystal.png

View File

@ -59,7 +59,7 @@ Cornstarch=玉米淀粉
Bottle of Ethanol=一瓶乙醇
Cotton Seed=棉籽
Cotton=棉花
String=字符串
String=线
Cucumber=黄瓜
Garlic clove=蒜瓣
Garlic=大蒜

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B