Пользовательские дополнения

На главную


common.GetScriptCfgVar( name )

Возвращает значение скриптовой переменной из конфигурационного файла. Поддерживаются типы: boolean, number, string. Значения задаются командой "script_var". Формат команды:

script_var <name> = true/false
script_var <name> = number_value
script_var <name> = "string_value"

Например:
script_var show_chat = true
script_var chat_size = 100
script_var chat_style = "Combined"

-- Система:
Логика (GameState etc.)

-- библиотека:
common

-- объявление:
function GetScriptCfgVar( name )

-- параметры:
name: string - имя переменной

-- возвращаемые значения:
nil/boolean/number/string - значение переменной или nil, если переменная не определена

-- примеры:
local chatSize = common.GetScriptCfgVar( "chat_size" )

Search: "CategoryLuaApi" "CategoryConfig"

CategoryConfig
FunctionCommonGetScriptCfgVar
FunctionUserModsGetAvatarConfigSection
FunctionUserModsGetGlobalConfigSection
FunctionUserModsSetAvatarConfigSection
FunctionUserModsSetGlobalConfigSection

Search: "CategoryLuaApi" "CategoryCommon"

CategoryCommon
EnumGoalState
EventAddonLoadStateChanged
EventAllodsGoalAdded
EventAllodsGoalChanged
EventAllodsGoalCompleted
EventUserScreenshot
FunctionCommonAddonCreateChildForm
FunctionCommonCreateValuedObject
FunctionCommonCreateValuedText
FunctionCommonEnableUIRender
FunctionCommonExtractWStringFromValuedText
FunctionCommonFormatFloat
FunctionCommonFormatInt
FunctionCommonGetAddonInfo
FunctionCommonGetAddonMainForm
FunctionCommonGetAddonName
FunctionCommonGetAllodsGoals
FunctionCommonGetAllodsGoalsOnLoadingScreen
FunctionCommonGetApiType
FunctionCommonGetBitAnd
FunctionCommonGetBitOr
FunctionCommonGetBitXor
FunctionCommonGetCredits
FunctionCommonGetCSSList
FunctionCommonGetDateTimeFromMs
FunctionCommonGetEmptyWstring
FunctionCommonGetInstanceIdByInteger
FunctionCommonGetIntFromWString
FunctionCommonGetLocalDateTime
FunctionCommonGetLocalization
FunctionCommonGetMsFromDateTime
FunctionCommonGetRandFloat
FunctionCommonGetRandInt
FunctionCommonGetScriptCfgVar
FunctionCommonGetStateManagedAddons
FunctionCommonGetStateName
FunctionCommonGetTerritoryInfo
FunctionCommonGetTexturePath
FunctionCommonIsCapsLockEnabled
FunctionCommonIsEmptyValuedObject
FunctionCommonIsEmptyWstring
FunctionCommonIsKeyEnabled
FunctionCommonIsOnPayToPlayShard
FunctionCommonIsSubstring
FunctionCommonIsSubstringEx
FunctionCommonIsTextFiltered
FunctionCommonIsUIRenderEnabled
FunctionCommonIsValuedObject
FunctionCommonIsValuedText
FunctionCommonIsWString
FunctionCommonLogError
FunctionCommonLogInfo
FunctionCommonLogWarning
FunctionCommonMakeUserAddonFullName
FunctionCommonMakeUserScreenshot
FunctionCommonOnEvent
FunctionCommonOnReaction
FunctionCommonQuitGame
FunctionCommonRegisterEventHandler
FunctionCommonRegisterReactionHandler
FunctionCommonRequestIntegerByInstanceId
FunctionCommonSetCursor
FunctionCommonSetTextValues
FunctionCommonStateLoadManagedAddon
FunctionCommonStateLoadManagedAddonGroup
FunctionCommonStateUnloadManagedAddon
FunctionCommonStateUnloadManagedAddonGroup
FunctionCommonUnRegisterEvent
FunctionCommonUnRegisterEventHandler
FunctionCommonUnRegisterReactionHandler
FunctionCompareWString
FunctionCompareWStringEx
FunctionEscapeWString
FunctionGetWStringLength
FunctionGlobal
FunctionTruncateWString
GoalId


CategoryLuaApi CategoryFunction CategoryConfig CategoryCommon

На главную