mirror of
https://github.com/mt-mods/mail.git
synced 2025-03-15 14:11:26 +00:00
* Add colors utilities Local function get_base_color(), conversions hex <=> rgb, rgb color mixer, and global function get_color() * Round numbers to avoid eventual float in string.format * Simplify inbox/outbox mixing of color Use a single if statement for each property and concatenate to displayed_color then execute mail.get_color(displayed_color) instead of making many combined if statements * Convert 3-chars hex colors to 6-chars hex colors Could break the code, the hex convert to rgb always run on 6-chars * Rework color utility using tables Instead of one-letter symbols, it now supports tables of identifiers or single strings
7 lines
246 B
Lua
7 lines
246 B
Lua
-- sub files
|
|
local MP = minetest.get_modpath(minetest.get_current_modname())
|
|
dofile(MP .. "/util/normalize.lua")
|
|
dofile(MP .. "/util/colors.lua")
|
|
dofile(MP .. "/util/contact.lua")
|
|
dofile(MP .. "/util/uuid.lua")
|
|
dofile(MP .. "/util/time_ago.lua")
|