From 4a9e39b07d5aa922df6509ec2bc52e8de0cde0ea Mon Sep 17 00:00:00 2001 From: Pedro Santos Date: Tue, 11 Oct 2022 23:58:26 -0700 Subject: [PATCH] Add phrase and description in ix.option.Add() https://docs.gethelix.co/libraries/ix.option/#OptionStructure states you can set the phrase and description via the OptionStructure. This allows that functionality, so you don't need to define it within a language file. --- gamemode/core/libs/sh_option.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gamemode/core/libs/sh_option.lua b/gamemode/core/libs/sh_option.lua index 3532e1b4a..5d46f0bdd 100644 --- a/gamemode/core/libs/sh_option.lua +++ b/gamemode/core/libs/sh_option.lua @@ -93,8 +93,8 @@ function ix.option.Add(key, optionType, default, data) -- end ix.option.stored[key] = { key = key, - phrase = "opt" .. upperName, - description = "optd" .. upperName, + phrase = data.phrase or "opt" .. upperName, + description = data.description or "optd" .. upperName, type = optionType, default = default, min = data.min or 0,