mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
[Quest API] Add HTML color tag method to Perl and Lua. (#1324)
* Add HTML color tag method to Perl and Lua. - Add quest::gethexcolorcode(color_name) to Perl. - Add eq.get_hex_color_code(color_name) to Lua. Full color list here: https://pastebin.com/rUYKr1ye * Convert to static and use strcasecmp over strcmp. Co-authored-by: Chris Miles <akkadius1@gmail.com>
This commit is contained in:
@@ -2322,6 +2322,10 @@ std::string lua_seconds_to_time(int duration) {
|
||||
return quest_manager.secondstotime(duration);
|
||||
}
|
||||
|
||||
std::string lua_get_hex_color_code(std::string color_name) {
|
||||
return quest_manager.gethexcolorcode(color_name);
|
||||
}
|
||||
|
||||
#define LuaCreateNPCParse(name, c_type, default_value) do { \
|
||||
cur = table[#name]; \
|
||||
if(luabind::type(cur) != LUA_TNIL) { \
|
||||
@@ -2863,6 +2867,7 @@ luabind::scope lua_register_general() {
|
||||
luabind::def("debug", (void(*)(std::string, int))&lua_debug),
|
||||
luabind::def("log_combat", (void(*)(std::string))&lua_log_combat),
|
||||
luabind::def("seconds_to_time", &lua_seconds_to_time),
|
||||
luabind::def("get_hex_color_code", &lua_get_hex_color_code),
|
||||
|
||||
/**
|
||||
* Expansions
|
||||
|
||||
Reference in New Issue
Block a user