mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-07-10 11:50:24 +02:00
Removed whitespaces
This commit is contained in:
@ -8,9 +8,9 @@ function place_cocoa(itemstack, placer, pointed_thing, plantname)
|
||||
if not pt and pt.type ~= "node" then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local under = minetest.get_node(pt.under)
|
||||
|
||||
|
||||
-- return if any of the nodes is not registered
|
||||
if not minetest.registered_nodes[under.name] then
|
||||
return
|
||||
@ -20,7 +20,7 @@ function place_cocoa(itemstack, placer, pointed_thing, plantname)
|
||||
if under.name ~= "default:jungletree" then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
-- add the node and remove 1 item from the itemstack
|
||||
minetest.add_node(pt.above, {name=plantname})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
@ -144,7 +144,7 @@ minetest.register_abm({
|
||||
elseif dir == 4 then pos.z = pos.z -1
|
||||
else return
|
||||
end
|
||||
|
||||
|
||||
if minetest.get_node(pos).name == "air" and minetest.get_node_light(pos) > 12 then
|
||||
-- print ("COCOA", pos.x, pos.y, pos.z)
|
||||
minetest.set_node(pos,{name="farming:cocoa_"..tostring(math.random(1,3))})
|
||||
|
@ -28,7 +28,7 @@ minetest.register_craft({
|
||||
|
||||
--= Ethanol (Thanks to JKMurray for this idea)
|
||||
|
||||
minetest.register_craftitem("farming:bottle_ethanol", {
|
||||
minetest.register_craftitem("farming:bottle_ethanol", {
|
||||
description = "Bottle of Ethanol",
|
||||
inventory_image = "farming_bottle_ethanol.png",
|
||||
})
|
||||
|
@ -66,7 +66,7 @@ function farming.hoe_on_use(itemstack, user, pointed_thing, uses)
|
||||
if not pt or pt.type ~= "node" then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local under = minetest.get_node(pt.under)
|
||||
local upos = pointed_thing.under
|
||||
|
||||
@ -77,23 +77,23 @@ function farming.hoe_on_use(itemstack, user, pointed_thing, uses)
|
||||
|
||||
local p = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
|
||||
local above = minetest.get_node(p)
|
||||
|
||||
|
||||
-- return if any of the nodes is not registered
|
||||
if not minetest.registered_nodes[under.name]
|
||||
or not minetest.registered_nodes[above.name] then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
-- check if the node above the pointed thing is air
|
||||
if above.name ~= "air" then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
-- check if pointing at dirt
|
||||
if minetest.get_item_group(under.name, "soil") ~= 1 then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
-- turn the node into soil, wear out item and play sound
|
||||
minetest.set_node(pt.under, {name="farming:soil"})
|
||||
minetest.sound_play("default_dig_crumbly", {pos = pt.under, gain = 0.5,})
|
||||
|
@ -404,7 +404,7 @@ function farming.place_seed(itemstack, placer, pointed_thing, plantname)
|
||||
|
||||
-- can I replace above node, and am I pointing at soil
|
||||
if not minetest.registered_nodes[above.name].buildable_to
|
||||
or minetest.get_item_group(under.name, "soil") < 2
|
||||
or minetest.get_item_group(under.name, "soil") < 2
|
||||
or minetest.get_item_group(above.name, "plant") ~= 0 then -- ADDED this line for multiple seed placement bug
|
||||
return
|
||||
end
|
||||
@ -471,7 +471,7 @@ farming.register_plant = function(name, def)
|
||||
{items = {mname .. ":seed_" .. pname}, rarity = 18 - i * 2},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
local g = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, growing = 1}
|
||||
-- Last step doesn't need growing=1 so Abm never has to check these
|
||||
if i == def.steps then
|
||||
|
Reference in New Issue
Block a user