Quote Originally Posted by ZorbaTHut View Post
Quote Originally Posted by Aieny View Post
Code:
function rarityColor(rarityName) 	ret = {} 	if rarityName == "trash" then ret.r = .34375; ret.g = .34375; ret.b = .34375; 	elseif rarityName == "common" then ret.r = .98; ret.g = .98 ret.b = .98; 	elseif rarityName == "uncommon" then ret.r = 0; ret.g = .797; ret.b = 0; 	elseif rarityName == "rare" then ret.r = .148; ret.g = .496; ret.b = .977; 	elseif rarityName == "epic" then ret.r = .676; ret.g = .281; ret.b = .98; 	elseif rarityName == "quest" then ret.r = 1; ret.g = 1; ret.b = 0; 	elseif rarityName == "relic" then ret.r = 1; ret.g = .5; ret.b = 0; 	else ret.r = .98; ret.g = .98 ret.b = .98; end 	return ret end
Given the time investment required to come up with a generic information-requesting interface, and documenting that interface, and making sure it adjusts to the real values, and so forth, this is currently the official recommended solution to that problem We'll have a better solution someday, but right now I think you'd rather have new APIs.
Jump to post...