[painting] fix brush not painting
dark_grey and dark_green brushes weren't painting before, they do now! thanks to juli for his help!
This commit is contained in:
parent
7c0f44d4e3
commit
f6bc6053cc
@ -234,8 +234,9 @@ minetest.register_entity("painting:paintent", {
|
||||
|
||||
on_punch = function(self, puncher)
|
||||
--check for brush.
|
||||
local name = string.match(puncher:get_wielded_item():get_name(), "_([^_]*)")
|
||||
local name = string.sub(puncher:get_wielded_item():get_name(), #"painting:brush_"+1)
|
||||
if not colors[name] then -- Not one of the brushes; can't paint.
|
||||
minetest.chat_send_all(name)
|
||||
return
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user