From 7d1b7560fa0cc090200ed566753dd96695ccd3dc Mon Sep 17 00:00:00 2001 From: 4n0n <4n0n@tinkr.site> Date: Thu, 2 Feb 2023 11:14:54 -0600 Subject: [PATCH] Class emmy lua --- .gitignore | 3 +++ src/Class/Class.lua | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/.gitignore b/.gitignore index 1c25d92..f3c7e76 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ DS_Store ## ignore all files in scripts scripts/* + +## ignore vscode settings +.vscode/* diff --git a/src/Class/Class.lua b/src/Class/Class.lua index a553475..b1f3d11 100644 --- a/src/Class/Class.lua +++ b/src/Class/Class.lua @@ -19,6 +19,9 @@ function Class:__index(k) end -- Constructor +---@param locale string +---@param name string +---@param id number function Class:New(locale, name, id) local self = setmetatable({}, Class) self.class = { @@ -30,21 +33,25 @@ function Class:New(locale, name, id) end -- Get the classes locale +---@return string function Class:GetLocale() return self.class.locale end -- Get the classes name +---@return string function Class:GetName() return self.class.name end -- Get the classes id +---@return number function Class:GetID() return self.class.id end -- Return the classes color +---@return ColorMixin classColor function Class:GetColor() return C_ClassColor.GetClassColor(self.class.name) end