Skip to content

Commit

Permalink
Merge pull request #1 from AntumMT/settings
Browse files Browse the repository at this point in the history
Update to use Minetest 0.4.16 settings API
  • Loading branch information
DonBatman committed Nov 17, 2017
2 parents c1d4dd5 + 10a5359 commit 9288e8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions paint.lua
Expand Up @@ -9,7 +9,7 @@ function check_paintcan(pos, node)
local color = string.sub(name, 15)
local meta = minetest.get_meta(pos)
stack = ItemStack("mypaint:brush_"..color)
if minetest.setting_getbool("creative_mode") then
if minetest.settings:get_bool("creative_mode") then
return stack
end
local uses = meta:get_int("mypaint:uses") - 1
Expand Down Expand Up @@ -51,7 +51,7 @@ function paint_node(pos, node, col, itemstack)
return
end
minetest.set_node(pos, {name = name.."_"..col, param2 = node.param2})
if not minetest.setting_getbool("creative_mode") then
if not minetest.settings:get_bool("creative_mode") then
local wear = itemstack:get_wear() + 65535 / BRUSH_USES
if wear < 65535 then
itemstack:set_wear(wear)
Expand Down Expand Up @@ -162,7 +162,7 @@ for color, entry in pairs(mypaint.colors) do
local pname = "mypaint:paint_"..color
local paint = ItemStack(pname)
paint = minetest.item_place_node(paint, user, pointed_thing)
if not minetest.setting_getbool("creative_mode") then
if not minetest.settings:get_bool("creative_mode") then
if not paint or (paint:get_count() > 0) then
return
end
Expand Down

0 comments on commit 9288e8d

Please sign in to comment.