generated from your-land/yl_template
Adds preconditions
This commit is contained in:
parent
6467bd7f7e
commit
219a886ab4
12
internal.lua
12
internal.lua
@ -19,3 +19,15 @@ local function get_node_definition()
|
||||
end
|
||||
|
||||
function yl_canned_food.get_node_definition() return get_node_definition() end
|
||||
|
||||
local function can_set(pos)
|
||||
local light = minetest.get_node_light(pos)
|
||||
if (light and light > 5) then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function yl_canned_food.can_set(pos)
|
||||
return can_set(pos)
|
||||
end
|
@ -24,10 +24,10 @@ table.insert(stages, {
|
||||
duration = 10,
|
||||
--duration = "10",
|
||||
next_stages = {
|
||||
{ "yl_canned_food:melon_jam_3", 50 },
|
||||
{ "yl_canned_food:melon_jam_4", 50 },
|
||||
{ "default:cobble", 50 }
|
||||
},
|
||||
{ "yl_canned_food:melon_jam_3", 50, yl_canned_food.can_set},
|
||||
{ "yl_canned_food:melon_jam_4", 50},
|
||||
{ "default:cobble", 50, yl_canned_food.can_set}
|
||||
},
|
||||
--node definition
|
||||
tiles = {"yl_canned_food_melon_jam_2.png"},
|
||||
description = "Awesome melon jam Stage 2",
|
||||
|
Loading…
Reference in New Issue
Block a user