Replace deprecated method 'setting_getbool' with 'settings:get_bool'
This commit is contained in:
parent
144012f082
commit
98d859fc22
2
corn.lua
2
corn.lua
@ -36,7 +36,7 @@ minetest.register_node("crops:corn", {
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
crops.plant(pointed_thing.above, {name="crops:corn_base_seed", param2 = 3})
|
crops.plant(pointed_thing.above, {name="crops:corn_base_seed", param2 = 3})
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
if not minetest.settings:get_bool("creative_mode") then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
|
@ -40,7 +40,7 @@ minetest.register_node("crops:melon_seed", {
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
crops.plant(pointed_thing.above, {name="crops:melon_plant_1"})
|
crops.plant(pointed_thing.above, {name="crops:melon_plant_1"})
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
if not minetest.settings:get_bool("creative_mode") then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
|
@ -175,7 +175,7 @@ minetest.register_node("crops:beanpoles", {
|
|||||||
end
|
end
|
||||||
minetest.set_node(pointed_thing.above, {name="crops:beanpole_base"})
|
minetest.set_node(pointed_thing.above, {name="crops:beanpole_base"})
|
||||||
minetest.set_node(top, {name="crops:beanpole_top"})
|
minetest.set_node(top, {name="crops:beanpole_top"})
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
if not minetest.settings:get_bool("creative_mode") then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
@ -207,7 +207,7 @@ minetest.register_craftitem("crops:green_bean_seed", {
|
|||||||
else
|
else
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
if not minetest.settings:get_bool("creative_mode") then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
|
@ -38,7 +38,7 @@ minetest.register_node("crops:potato_eyes", {
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
crops.plant(pointed_thing.above, {name="crops:potato_plant_1", param2 = 3})
|
crops.plant(pointed_thing.above, {name="crops:potato_plant_1", param2 = 3})
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
if not minetest.settings:get_bool("creative_mode") then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
|
@ -40,7 +40,7 @@ minetest.register_node("crops:pumpkin_seed", {
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
crops.plant(pointed_thing.above, {name="crops:pumpkin_plant_1"})
|
crops.plant(pointed_thing.above, {name="crops:pumpkin_plant_1"})
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
if not minetest.settings:get_bool("creative_mode") then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
|
@ -36,7 +36,7 @@ minetest.register_node("crops:tomato_seed", {
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
crops.plant(pointed_thing.above, {name="crops:tomato_plant_1", param2 = 1})
|
crops.plant(pointed_thing.above, {name="crops:tomato_plant_1", param2 = 1})
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
if not minetest.settings:get_bool("creative_mode") then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
|
@ -69,7 +69,7 @@ minetest.register_tool("crops:watering_can", {
|
|||||||
water = math.min(water + crops.settings.watercan, crops.settings.watercan_max)
|
water = math.min(water + crops.settings.watercan, crops.settings.watercan_max)
|
||||||
meta:set_int("crops_water", water)
|
meta:set_int("crops_water", water)
|
||||||
|
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
if not minetest.settings:get_bool("creative_mode") then
|
||||||
itemstack:set_wear(math.min(65534, wear + (65535 / crops.settings.watercan_uses)))
|
itemstack:set_wear(math.min(65534, wear + (65535 / crops.settings.watercan_uses)))
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
|
Loading…
x
Reference in New Issue
Block a user