mirror of
https://github.com/appgurueu/modlib.git
synced 2024-08-19 21:04:13 +02:00
Add minetest.colorspec:to_number_rgb
This commit is contained in:
parent
d1baf23814
commit
e212ba7f3b
@ -245,6 +245,10 @@ function colorspec:to_number()
|
|||||||
return self.r * 0x1000000 + self.g * 0x10000 + self.b * 0x100 + self.a
|
return self.r * 0x1000000 + self.g * 0x10000 + self.b * 0x100 + self.a
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function colorspec:to_number_rgb()
|
||||||
|
return self.r * 0x10000 + self.g * 0x100 + self.b
|
||||||
|
end
|
||||||
|
|
||||||
colorspec_to_colorstring = minetest.colorspec_to_colorstring or function(spec)
|
colorspec_to_colorstring = minetest.colorspec_to_colorstring or function(spec)
|
||||||
return colorspec.from_any(spec):to_string()
|
return colorspec.from_any(spec):to_string()
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user