From b61898c30c1e1049e8767ca98fd38e7010a32e45 Mon Sep 17 00:00:00 2001 From: Lane Kolbly Date: Wed, 12 Jul 2017 05:30:43 -0500 Subject: Lua plugin cColor (#3833) --- Server/Plugins/APIDump/APIDesc.lua | 172 +++++++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) (limited to 'Server/Plugins') diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua index 65ae69144..29545a692 100644 --- a/Server/Plugins/APIDump/APIDesc.lua +++ b/Server/Plugins/APIDump/APIDesc.lua @@ -1730,6 +1730,178 @@ end }, }, }, + cColor = + { + Desc = [[ + Encapsulates a RGB color, e.g. for armor. + ]], + Functions = + { + Clear = + { + Notes = "Resets the color to uninitialized." + }, + constructor = + { + { + Returns = { {Type="cColor"} }, + Notes = "Creates an uninitialized cColor. Each component must be between 0 and 255, inclusive.", + }, + { + Params = + { + { + Name = "Red", + Type = "number", + }, + { + Name = "Green", + Type = "number", + }, + { + Name = "Blue", + Type = "number", + }, + }, + Returns = { {Type="cColor"} }, + Notes = "Creates the specified cColor. All components must be between 0 and 255, inclusive.", + }, + }, + GetColor = + { + Returns = + { + { + Name = "Red", + Type = "number", + }, + { + Name = "Green", + Type = "number", + }, + { + Name = "Blue", + Type = "number", + }, + }, + Notes = "Returns the color's red, green, and blue components, respectively." + }, + GetRed = + { + Returns = + { + { + Name = "Red", + Type = "number", + }, + }, + Notes = "Returns the color's red component." + }, + GetGreen = + { + Returns = + { + { + Name = "Green", + Type = "number", + }, + }, + Notes = "Returns the color's green component." + }, + GetBlue = + { + Returns = + { + { + Name = "Blue", + Type = "number", + }, + }, + Notes = "Returns the color's blue component." + }, + IsValid = + { + Returns = + { + { + Type = "boolean" + }, + }, + Notes = "True if the color is valid, false if the color has not been set yet." + }, + SetColor = + { + Params = + { + { + Name = "Red", + Type = "number" + }, + { + Name = "Green", + Type = "number" + }, + { + Name = "Blue", + Type = "number" + }, + }, + Notes = "Sets the color's red, green, and blue components. Values range from 0 to 255." + }, + SetRed = + { + Params = + { + { + Name = "Red", + Type = "number", + }, + }, + Notes = "Sets the color's red component. Must be between 0 and 255, inclusive." + }, + SetGreen = + { + Params = + { + { + Name = "Green", + Type = "number", + }, + }, + Notes = "Sets the color's green component. Must be between 0 and 255, inclusive." + }, + SetBlue = + { + Params = + { + { + Name = "Blue", + Type = "number", + }, + }, + Notes = "Sets the color's blue component. Must be between 0 and 255, inclusive." + }, + }, + Constants = + { + COLOR_LIMIT = + { + Notes = "The upper bound (exclusive) for a color component", + }, + COLOR_MAX = + { + Notes = "The maximum value for a color component", + }, + COLOR_MIN = + { + Notes = "The minimum value for a color component", + }, + COLOR_NONE = + { + Notes = "A constant denoting the color is invalid (note: use IsValid)", + }, + }, + }, cCompositeChat = { Desc = [[ -- cgit v1.2.3