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

На главную


On<EventName>( params )

Функция, обрабатывающая зарегистрированное событие. Вместо <EventName> должно быть сформировано имя для обработчика события.

-- объявление:
объявляются непосредственно в скрипте

-- объявление:
function On<EventName>( params )

-- параметры:
params: table

-- поля: всегда разные, зависят от события, таблица может быть пустой

-- возвращаемые значения:
нет

-- примеры:
function OnSampleEvent( params )
  for key, value in params
    if type( params[key] ) == "string" then
      common.LogInfo( value )
    end
  end
end

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 CategoryCommon

На главную