content
stringlengths
5
1.05M
--- AnimationEntry wrapper WrapEntry = {} WrapEntry.__index = WrapEntry function WrapEntry:new(o) return setmetatable(o or {}, self) end function WrapEntry:_then(args) if type(args) ~= 'table' then args = { property = args } end return WrapEntry:new { entry = self.entry:Then( args.property, args.duration or 0, args.easing, args.repeat_num or 0 ) } end function WrapEntry:_and(args) if args == nil then args = {} elseif type(args) ~= 'table' then args = { property = args } end -- if self has head, the new entry will be head's child if self.head then if self.head.entry then -- self.head is WrapEntry return WrapEntry:new { entry = self.head.entry:Then( args.property, args.duration or 0, args.easing, args.repeat_num or 0 ) } else -- self.head is WrapAnim return WrapEntry:new { entry = self.head.anim:Do( args.property, args.duration or 0, args.easing, args.repeat_num or 0 ) } end else return WrapEntry:new { entry = self.entry:And( args.property, args.duration or 0, args.easing, args.repeat_num or 0 ) } end end function WrapEntry:_for(duration) self.entry:For(duration) return self end function WrapEntry:_with(func) self.entry:With(func) return self end function WrapEntry:_repeat(repeat_num) self.entry:Repeat(repeat_num) return self end function WrapEntry:stop() self.entry:Stop() end --- AnimationEntry wrapper end --- NovaAnimation wrapper WrapAnim = {} WrapAnim.__index = WrapAnim function WrapAnim:new(o) return setmetatable(o or {}, self) end function WrapAnim:_do(args) if type(args) ~= 'table' then args = { property = args } end return WrapEntry:new { entry = self.anim:Do( args.property, args.duration or 0, args.easing, args.repeat_num or 0 ) } end function WrapAnim:stop() self.anim:Stop() end --- NovaAnimation wrapper end --- alias for defining methods for both WrapEntry and WrapAnim WrapAnim._then = WrapAnim._do function make_anim_method(func_name, func, preload_func, preload_param) if WrapEntry[func_name] then warn('Duplicate animation method: ' .. func_name) return end WrapEntry[func_name] = func WrapAnim[func_name] = func if preload_func then if preload_param then if type(preload_param) == 'table' then for i = 1, #preload_param do local item = preload_param[i] if type(item) == 'table' then preload_func(func_name, unpack(item)) else preload_func(func_name, item) end end else preload_func(func_name, preload_param) end else preload_func(func_name) end end end --- AnimationProperty wrapper RELATIVE = Nova.UseRelativeValue.Yes --- argument can be specified as positional or named --- named argument will override positional ones --- positional: --- name: index: type: description: --- obj 1 string or userdata the object to move --- to 2 Vector3 target value, Euler angle for rotation --- from 3 Vector3 start value, Euler angle for rotation, default is the value when the animation entry starts --- relative 3 UseRelativeValue use RELATIVE to indicate that target value is relative local function wrap_vec3_property(p) return function(t) local obj = t.obj or t[1] if obj == nil then warn('obj == nil') return nil end local transform = obj.transform local to = t.to or t[2] if to == nil then warn('to == nil') return nil end local from = t.from local relative = t.relative if t[3] == RELATIVE then relative = relative or t[3] else from = from or t[3] end if from then return p(transform, from, to) elseif relative then return p(transform, to, relative) else return p(transform, to) end end end _move = wrap_vec3_property(Nova.PositionAnimationProperty) _rotate = wrap_vec3_property(Nova.RotationAnimationProperty) _scale = wrap_vec3_property(Nova.ScaleAnimationProperty) --- argument can be specified as positional or named --- named argument will override positional ones --- positional: --- name: index: type: description: --- action 1 function action to be done function _action(t) local action = t.action or t[1] if action == nil then warn('action == nil') return nil end return Nova.ActionAnimationProperty(action) end --- argument can be specified as positional or named --- named argument will override positional ones --- positional: --- name: index: type: description: --- mat 1 Material the material to animate --- name 2 string name of the material property --- to 3 Vector3 target value --- from 4 Vector3 start value, default is the value when the animation entry starts function _change_mat_float(t) local mat = t.mat or t[1] if mat == nil then warn('mat == nil') return nil end local name = t.name or t[2] local to = t.to or t[3] if to == nil then warn('to == nil') return nil end local from = t.from or t[4] if from then return Nova.MaterialFloatAnimationProperty(mat, name, from, to) else return Nova.MaterialFloatAnimationProperty(mat, name, to) end end --- AnimationProperty wrapper end
return { summary = 'A pseudo-random number generator.', description = [[ A RandomGenerator is a standalone object that can be used to independently generate pseudo-random numbers. If you just need basic randomness, you can use `lovr.math.random` without needing to create a random generator. ]], constructor = 'lovr.math.newRandomGenerator' }
function onCreate() -- background shit makeLuaSprite('metal', 'metal', -600, -300); setScrollFactor('metal', 0.9, 0.9); addLuaSprite('metal', false); close(true); --For performance reasons, close this script once the stage is fully loaded, as this script won't be used anymore after loading the stage end
return PlaceObj("ModDef", { "title", "Permanent Dreamers Lightmodel", "version", 5, "version_major", 0, "version_minor", 5, "id", "ChoGGi_PermanentDreamersLightmodel", "author", "ChoGGi", "image", "Preview.png", "steam_id", "1433249476", "pops_any_uuid", "1df82b63-e65e-4d4f-b22e-cfc33556fdf0", "code", { "Code/Script.lua", }, "lua_revision", 1007000, -- Picard "description", [[Always a green morning. Requested by BLAde. ]], })
data:extend({ { type = "item", name = "heli-remote-equipment", icon = "__Helicopters__/graphics/icons/heli-remote-icon.png", icon_size = 32, placed_as_equipment_result = "heli-remote-equipment", flags = {"goes-to-main-inventory"}, subgroup = "equipment", order = "g[heli-remote]-a[heli-remote-item]", stack_size = 1, default_request_amount = 1, }, { type = "item", name = "heli-pad-item", icon = "__Helicopters__/graphics/icons/heli_pad.png", icon_size = 32, flags = {"goes-to-quickbar"}, subgroup = "transport", order = "b[personal-transport]-d[heli-pad-item]", place_result = "heli-pad-placement-entity", stack_size = 10 }, })
local ModOverride = require('ModOverride') local UI = require('UI') registerForEvent('onInit', function() ModOverride.Init() UI.Init() UI.OnReadyCheck(ModOverride.IsReady) UI.OnListItems(function(filter) return ModOverride.GetItems(filter) end) UI.OnAddToInventory(function(iconicMod) local player = Game.GetPlayer() local itemId = ItemID.FromTDBID(iconicMod.recorId) Game.GetTransactionSystem():GiveItem(player, itemId, 1) end) end) registerForEvent('onOverlayOpen', function() UI.Show() end) registerForEvent('onOverlayClose', function() UI.Hide() end) registerForEvent('onDraw', function() UI.Draw() end)
local BasePlugin = require "kong.plugins.base_plugin" local access = require "kong.plugins.bcgov-gwa-endpoint.access" local singletons = require "kong.singletons" local cache = singletons.cache local crud = require "kong.api.crud_helpers" local BcGovGwaHandler = BasePlugin:extend() function BcGovGwaHandler:new() BcGovGwaHandler.super.new(self, "bcgov-gwa-endpoint") end function BcGovGwaHandler:init_worker() local worker_events = singletons.worker_events singletons.worker_events.register(function(data) if data.operation == "delete" then local new = data.entity cache:invalidate("consumerCustomId."..new.custom_id) cache:invalidate("consumerUsername."..new.username) elseif data.operation == "update" then local old = data.old_entity cache:invalidate("consumerCustomId."..old.custom_id) cache:invalidate("consumerUsername."..old.username) end end, "crud", "consumers") singletons.worker_events.register(function(data) local new = data.entity if data.operation == "delete" then local cacheKey = "consumerGroup."..new.consumer_id..new.group -- Don't fail if cache clearing fails pcall(function() cache:invalidate(cacheKey) end) elseif data.operation == "update" then local old = data.old_entity cache:invalidate("consumerGroup."..old.consumer_id..old.group) singletons.dao.group_names:insert({group = new.group}) elseif data.operation == "create" then singletons.dao.group_names:insert({group = new.group}) end end, "crud", "acls") end function BcGovGwaHandler:access(conf) BcGovGwaHandler.super.access(self) access.execute(conf) end BcGovGwaHandler.PRIORITY = 1000 return BcGovGwaHandler
local _ = 121 _ = 121.2323 _ = 121.2323e-1 _ = 121.2323e13434 _ = 2323E34 _ = 0x12323 _ = 0xfF2323 _ = 0xabcdef _ = 0xABCDEF _ = [[ hello world ]] _ = [=[ hello world ]=] _ = [====[ hello world ]====] _ = "another world" _ = 'what world'
--[ FeedM - edited by szymczakovv & elfeedo ]-- -- Name: FeedM-Reworked -- Author: szymczakovv#1937, elfeedoo#6093 -- Date: 05/01/2021 -- Version: 0.1.6 -- Informations fx_version 'adamant' game 'gta5' description 'FeedM' author 'Karl Saunders reworked by elfeedoo & szymczakovv' version '0.0.6 (rework version 0.1.6)' -- Client client_scripts {'config.lua', 'utils.lua', 'client.lua'} -- Exports export 'ShowNotification' export 'ShowAdvancedNotification' export 'ShowAdvancedInfinityNotification' export 'ShowInfinityNotification'
local fio = require('fio') local t = require('luatest') local g = t.group() local helpers = require('test.helper') g.before_all = function() g.server = helpers.Server:new({ workdir = fio.tempdir(), alias = 'dummy', command = helpers.entrypoint('srv_basic'), http_port = 8181, cluster_cookie = 'test-cluster-cookie', advertise_port = 13301, env = { TARANTOOL_CUSTOM_PROC_TITLE = 'test-title', TARANTOOL_SWIM_SUSPECT_TIMEOUT_SECONDS = 100, }, }) g.server:start() t.helpers.retrying({timeout = 5}, function() g.server:graphql({query = '{ servers { uri } }'}) end) end g.after_all = function() g.server:stop() fio.rmtree(g.server.workdir) end function g.test_uninitialized() local resp = g.server:graphql({ query = [[ { servers { uri replicaset { roles } } replicasets { status } cluster { self { uri uuid alias } suggestions { refine_uri { uuid } force_apply { uuid } disable_servers { uuid } restart_replication { uuid } } can_bootstrap_vshard vshard_bucket_count } } ]] }) local servers = resp['data']['servers'] t.assert_equals(#servers, 1) t.assert_equals(servers[1], { uri = 'localhost:13301', replicaset = box.NULL }) t.assert_almost_equals( g.server:graphql({ query = [[{ servers { uri clock_delta } }]] }).data.servers[1].clock_delta, 0, 0.1 ) local replicasets = resp['data']['replicasets'] t.assert_equals(#replicasets, 0) t.assert_equals(resp['data']['cluster']['self'], { uri = 'localhost:13301', alias = 'dummy', uuid = box.NULL }) t.assert_equals(resp['data']['cluster']['suggestions'], { refine_uri = box.NULL, force_apply = box.NULL, disable_servers = box.NULL, restart_replication = box.NULL, }) t.assert_equals(resp['data']['cluster']['can_bootstrap_vshard'], false) t.assert_equals(resp['data']['cluster']['vshard_bucket_count'], 3000) t.assert_error_msg_contains( [[Invalid attempt to call join_server().]] .. [[ This instance isn't bootstrapped yet]] .. [[ and advertises uri="localhost:13301"]] .. [[ while you are joining uri="127.0.0.1:13301".]], function() g.server:graphql({ query = [[ mutation { join_server(uri: "127.0.0.1:13301") } ]] }) end ) -- edit_topology message slightly differs from join_server t.assert_error_msg_equals( [["127.0.0.1:13301": Missing localhost:13301 in clusterwide config,]] .. [[ check advertise_uri correctness]], function() return g.server:graphql({query = [[ mutation{ cluster { edit_topology(replicasets: [{ join_servers: [{uri: "127.0.0.1:13301"}] }]) { servers { uri } } }} ]]}) end ) local resp = g.server:graphql({ query = [[{ cluster { failover } }]] }) t.assert_equals(resp['data']['cluster']['failover'], false) t.assert_error_msg_contains( "Current instance isn't bootstrapped yet", function() return g.server:graphql({ query = [[ mutation { cluster { failover(enabled: false) } } ]] }) end ) t.assert_error_msg_contains( "Current instance isn't bootstrapped yet", function() return g.server:graphql({ query = [[ mutation { cluster { config(sections: []) { filename } } } ]] }) end ) t.assert_error_msg_contains( "Current instance isn't bootstrapped yet", function() return g.server:graphql({ query = [[ query { cluster { config { filename } } } ]] }) end ) t.assert_error_msg_contains( "Current instance isn't bootstrapped yet", function() return g.server:graphql({ query = [[ mutation { cluster { schema(as_yaml: "") { as_yaml } } } ]] }) end ) t.assert_error_msg_contains( "Current instance isn't bootstrapped yet", function() return g.server:graphql({ query = [[ query { cluster { schema {as_yaml} } } ]] }) end ) t.assert_equals( g.server.net_box:eval([[return require('title').get()]]), 'tarantool srv_basic.lua: test-title', "Instance's title wasn't set") end function g.test_membership_options() t.assert_equals( g.server.net_box:eval([[return require('membership.options').PROTOCOL_PERIOD_SECONDS]]), 0.2 ) t.assert_equals( g.server.net_box:eval([[return require('membership.options').SUSPECT_TIMEOUT_SECONDS]]), 100 ) end function g.test_rpc() local candidates = g.server.net_box:call( 'package.loaded.cartridge.rpc_get_candidates', {'myrole-permanent'} ) t.assert_equals(candidates, {}) local _, err = g.server.net_box:call( 'package.loaded.cartridge.rpc_call', {'myrole-permanent', 'unknown'} ) t.assert_covers(err, { class_name = "RemoteCallError", err = 'No remotes with role "myrole-permanent" available', }) end function g.test_issues() t.assert_equals(helpers.list_cluster_issues(g.server), {}) end
local obj = {} local vim_icon = hs.menubar.new() local inputEnglish = "com.apple.keylayout.ABC" local cfg = { key_interval = 100, icon = { vim = "𝑽", novim = "" }, } local mode = { on = false, triggered = false, } function obj:init(mode) local function vim_end() mode.triggered = true end self.close = vim_end vim_icon:setClickCallback(setVimDisplay) hs.fnutils.each({ { mod={} , key='h' , func=rapidKey({} , 'left') , repetition=true } , { mod={} , key='j' , func=rapidKey({} , 'down') , repetition=true } , { mod={} , key='k' , func=rapidKey({} , 'up') , repetition=true } , { mod={} , key='l' , func=rapidKey({} , 'right') , repetition=true } , { mod={} , key='u' , func=rapidKey({'shift'} , '-') , repetition=true } , { mod={} , key='p' , func=rapidKey({} , 'delete') , repetition=true } , { mod={} , key='d' , func=rapidKey({} , 'forwarddelete') , repetition=true } , { mod={} , key='1' , func=leftClick() , repetition=true } , { mod={} , key='2' , func=rightClick() , repetition=true } , { mod={} , key='w' , func=rapidKey({'alt'} , 'right') , repetition=true } , { mod={} , key='b' , func=rapidKey({'alt'} , 'left') , repetition=true } , { mod={} , key='n' , func=rapidKey({'command'} , 'left') , repetition=true } , { mod={} , key='.' , func=rapidKey({'command'} , 'right') , repetition=true } , { mod={} , key='8' , func=rapidKey({'alt', 'shift'} , 'left') , repetition=true } , { mod={} , key='9' , func=rapidKey({'alt', 'shift' } , 'right') , repetition=true } , { mod={} , key='7' , func=rapidKey({'command','shift'} , 'left') , repetition=true } , { mod={} , key='0' , func=rapidKey({'command', 'shift'} , 'right') , repetition=true } , }, function(v) if v.repetition then mode:bind(v.mod, v.key, v.func, vim_end, v.func) else mode:bind(v.mod, v.key, v.func, vim_end) end end) self.on = function() mode:enter() setVimDisplay(true) mode.triggered = false mode.on = true end self.off = function() setVimDisplay() mode:exit() local input_source = hs.keycodes.currentSourceID() if not mode.triggered then if not (input_source == inputEnglish) then hs.eventtap.keyStroke({}, 'right') hs.keycodes.currentSourceID(inputEnglish) hs.eventtap.keyStroke({}, 'escape') end hs.eventtap.keyStroke({}, 'escape') end mode.triggered = true mode.on = false end return self end function isInScreen(screen, win) return win:screen() == screen end function setVimDisplay(state) if state then vim_icon:setTitle(cfg.icon.vim) else vim_icon:setTitle(cfg.icon.novim) end end function rapidKey(modifiers, key) modifiers = modifiers or {} return function() hs.eventtap.event.newKeyEvent(modifiers, string.lower(key), true):post() hs.timer.usleep(cfg.key_interval) hs.eventtap.event.newKeyEvent(modifiers, string.lower(key), false):post() end end function inputKey(modifiers, key) modifiers = modifiers or {} return function() hs.eventtap.keyStroke(modifiers, key) end end function leftClick() local ptMouse = hs.mouse.getAbsolutePosition() local types = hs.eventtap.event.types hs.eventtap.event.newMouseEvent(types.leftMouseDown, ptMouse ):post() hs.eventtap.event.newMouseEvent(types.leftMouseUp, ptMouse):post() end function rightClick() local ptMouse = hs.mouse.getAbsolutePosition() local types = hs.eventtap.event.types hs.eventtap.event.newMouseEvent(types.rightMouseDown, ptMouse ):post() hs.eventtap.event.newMouseEvent(types.rightMouseUp, ptMouse):post() end return obj
local depth, tunnelSize = ... shell.run("./driller", depth) shell.run("tunnel", tunnelSize)
-- https://github.com/Planimeter/lassimp -- LuaJIT FFI bindings for Assimp by Planimeter on GitHub --[[ MIT License Copyright (c) 2017 Planimeter Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] dofile("lwlgl.lua") ffi = require("ffi") ffi.cdef([[ typedef float ai_real; typedef signed int ai_int; typedef unsigned int ai_uint; struct aiVector3D { ai_real x, y, z; }; struct aiVector2D { ai_real x, y; }; struct aiColor4D { ai_real r, g, b, a; }; struct aiMatrix3x3 { ai_real a1, a2, a3; ai_real b1, b2, b3; ai_real c1, c2, c3; }; struct aiMatrix4x4 { ai_real a1, a2, a3, a4; ai_real b1, b2, b3, b4; ai_real c1, c2, c3, c4; ai_real d1, d2, d3, d4; }; struct aiQuaternion { ai_real w, x, y, z; }; struct aiPlane { ai_real a,b,c,d; }; struct aiRay { struct aiVector3D pos, dir; }; struct aiColor3D { ai_real r, g, b; }; struct aiString { size_t length; char data[1024]; } ; typedef enum aiReturn { aiReturn_SUCCESS = 0x0, aiReturn_FAILURE = -0x1, aiReturn_OUTOFMEMORY = -0x3, _AI_ENFORCE_ENUM_SIZE = 0x7fffffff } aiReturn; enum aiOrigin { aiOrigin_SET = 0x0, aiOrigin_CUR = 0x1, aiOrigin_END = 0x2, _AI_ORIGIN_ENFORCE_ENUM_SIZE = 0x7fffffff }; enum aiDefaultLogStream { aiDefaultLogStream_FILE = 0x1, aiDefaultLogStream_STDOUT = 0x2, aiDefaultLogStream_STDERR = 0x4, aiDefaultLogStream_DEBUGGER = 0x8, _AI_DLS_ENFORCE_ENUM_SIZE = 0x7fffffff }; struct aiMemoryInfo { unsigned int textures; unsigned int materials; unsigned int meshes; unsigned int nodes; unsigned int animations; unsigned int cameras; unsigned int lights; unsigned int total; }; struct aiScene; struct aiNode; struct aiMaterial; struct aiTexture; struct aiCamera; struct aiLight; struct aiMetadata; struct aiBone; struct aiMesh; struct aiAnimation; struct aiNodeAnim; struct aiVectorKey { double mTime; struct aiVector3D mValue; }; struct aiQuatKey { double mTime; struct aiQuaternion mValue; }; struct aiMeshKey { double mTime; unsigned int mValue; }; struct aiMeshMorphKey { double mTime; unsigned int *mValues; double *mWeights; unsigned int mNumValuesAndWeights; }; enum aiAnimBehaviour { aiAnimBehaviour_DEFAULT = 0x0, aiAnimBehaviour_CONSTANT = 0x1, aiAnimBehaviour_LINEAR = 0x2, aiAnimBehaviour_REPEAT = 0x3, _aiAnimBehaviour_Force32Bit = 2147483647 }; struct aiNodeAnim { struct aiString mNodeName; unsigned int mNumPositionKeys; struct aiVectorKey* mPositionKeys; unsigned int mNumRotationKeys; struct aiQuatKey* mRotationKeys; unsigned int mNumScalingKeys; struct aiVectorKey* mScalingKeys; enum aiAnimBehaviour mPreState; enum aiAnimBehaviour mPostState; }; struct aiMeshAnim { struct aiString mName; unsigned int mNumKeys; struct aiMeshKey* mKeys; }; struct aiMeshMorphAnim { struct aiString mName; unsigned int mNumKeys; struct aiMeshMorphKey* mKeys; }; struct aiAnimation { struct aiString mName; double mDuration; double mTicksPerSecond; unsigned int mNumChannels; struct aiNodeAnim** mChannels; unsigned int mNumMeshChannels; struct aiMeshAnim** mMeshChannels; unsigned int mNumMorphMeshChannels; struct aiMeshMorphAnim **mMorphMeshChannels; }; struct aiCamera { struct aiString mName; struct aiVector3D mPosition; struct aiVector3D mUp; struct aiVector3D mLookAt; float mHorizontalFOV; float mClipPlaneNear; float mClipPlaneFar; float mAspect; }; struct aiScene; struct aiFileIO; struct aiExportFormatDesc { const char* id; const char* description; const char* fileExtension; }; size_t aiGetExportFormatCount(void); const struct aiExportFormatDesc* aiGetExportFormatDescription( size_t pIndex); void aiReleaseExportFormatDescription( const struct aiExportFormatDesc *desc ); void aiCopyScene(const struct aiScene* pIn, struct aiScene** pOut); void aiFreeScene(const struct aiScene* pIn); aiReturn aiExportScene( const struct aiScene* pScene, const char* pFormatId, const char* pFileName, unsigned int pPreprocessing); aiReturn aiExportSceneEx( const struct aiScene* pScene, const char* pFormatId, const char* pFileName, struct aiFileIO* pIO, unsigned int pPreprocessing ); struct aiExportDataBlob { size_t size; void* data; struct aiString name; struct aiExportDataBlob * next; }; const struct aiExportDataBlob* aiExportSceneToBlob( const struct aiScene* pScene, const char* pFormatId, unsigned int pPreprocessing ); void aiReleaseExportBlob( const struct aiExportDataBlob* pData ); struct aiFileIO; struct aiFile; typedef size_t (*aiFileWriteProc) (struct aiFile*, const char*, size_t, size_t); typedef size_t (*aiFileReadProc) (struct aiFile*, char*, size_t,size_t); typedef size_t (*aiFileTellProc) (struct aiFile*); typedef void (*aiFileFlushProc) (struct aiFile*); typedef enum aiReturn (*aiFileSeek) (struct aiFile*, size_t, enum aiOrigin); typedef struct aiFile* (*aiFileOpenProc) (struct aiFileIO*, const char*, const char*); typedef void (*aiFileCloseProc) (struct aiFileIO*, struct aiFile*); typedef char* aiUserData; struct aiFileIO { aiFileOpenProc OpenProc; aiFileCloseProc CloseProc; aiUserData UserData; }; struct aiFile { aiFileReadProc ReadProc; aiFileWriteProc WriteProc; aiFileTellProc TellProc; aiFileTellProc FileSizeProc; aiFileSeek SeekProc; aiFileFlushProc FlushProc; aiUserData UserData; }; enum aiImporterFlags { aiImporterFlags_SupportTextFlavour = 0x1, aiImporterFlags_SupportBinaryFlavour = 0x2, aiImporterFlags_SupportCompressedFlavour = 0x4, aiImporterFlags_LimitedSupport = 0x8, aiImporterFlags_Experimental = 0x10 }; struct aiImporterDesc { const char* mName; const char* mAuthor; const char* mMaintainer; const char* mComments; unsigned int mFlags; unsigned int mMinMajor; unsigned int mMinMinor; unsigned int mMaxMajor; unsigned int mMaxMinor; const char* mFileExtensions; }; const struct aiImporterDesc* aiGetImporterDesc( const char *extension ); struct aiScene; struct aiFileIO; typedef void (*aiLogStreamCallback)(const char* , char* ); struct aiLogStream { aiLogStreamCallback callback; char* user; }; struct aiPropertyStore { char sentinel; }; typedef int aiBool; const struct aiScene* aiImportFile( const char* pFile, unsigned int pFlags); const struct aiScene* aiImportFileEx( const char* pFile, unsigned int pFlags, struct aiFileIO* pFS); const struct aiScene* aiImportFileExWithProperties( const char* pFile, unsigned int pFlags, struct aiFileIO* pFS, const struct aiPropertyStore* pProps); const struct aiScene* aiImportFileFromMemory( const char* pBuffer, unsigned int pLength, unsigned int pFlags, const char* pHint); const struct aiScene* aiImportFileFromMemoryWithProperties( const char* pBuffer, unsigned int pLength, unsigned int pFlags, const char* pHint, const struct aiPropertyStore* pProps); const struct aiScene* aiApplyPostProcessing( const struct aiScene* pScene, unsigned int pFlags); struct aiLogStream aiGetPredefinedLogStream( enum aiDefaultLogStream pStreams, const char* file); void aiAttachLogStream( const struct aiLogStream* stream); void aiEnableVerboseLogging(aiBool d); enum aiReturn aiDetachLogStream( const struct aiLogStream* stream); void aiDetachAllLogStreams(void); void aiReleaseImport( const struct aiScene* pScene); const char* aiGetErrorString(void); aiBool aiIsExtensionSupported( const char* szExtension); void aiGetExtensionList( struct aiString* szOut); void aiGetMemoryRequirements( const struct aiScene* pIn, struct aiMemoryInfo* in); struct aiPropertyStore* aiCreatePropertyStore(void); void aiReleasePropertyStore(struct aiPropertyStore* p); void aiSetImportPropertyInteger( struct aiPropertyStore* store, const char* szName, int value); void aiSetImportPropertyFloat( struct aiPropertyStore* store, const char* szName, ai_real value); void aiSetImportPropertyString( struct aiPropertyStore* store, const char* szName, const struct aiString* st); void aiSetImportPropertyMatrix( struct aiPropertyStore* store, const char* szName, const struct aiMatrix4x4* mat); void aiCreateQuaternionFromMatrix( struct aiQuaternion* quat, const struct aiMatrix3x3* mat); void aiDecomposeMatrix( const struct aiMatrix4x4* mat, struct aiVector3D* scaling, struct aiQuaternion* rotation, struct aiVector3D* position); void aiTransposeMatrix4( struct aiMatrix4x4* mat); void aiTransposeMatrix3( struct aiMatrix3x3* mat); void aiTransformVecByMatrix3( struct aiVector3D* vec, const struct aiMatrix3x3* mat); void aiTransformVecByMatrix4( struct aiVector3D* vec, const struct aiMatrix4x4* mat); void aiMultiplyMatrix4( struct aiMatrix4x4* dst, const struct aiMatrix4x4* src); void aiMultiplyMatrix3( struct aiMatrix3x3* dst, const struct aiMatrix3x3* src); void aiIdentityMatrix3( struct aiMatrix3x3* mat); void aiIdentityMatrix4( struct aiMatrix4x4* mat); size_t aiGetImportFormatCount(void); const struct aiImporterDesc* aiGetImportFormatDescription( size_t pIndex); enum aiLightSourceType { aiLightSource_UNDEFINED = 0x0, aiLightSource_DIRECTIONAL = 0x1, aiLightSource_POINT = 0x2, aiLightSource_SPOT = 0x3, aiLightSource_AMBIENT = 0x4, aiLightSource_AREA = 0x5, _aiLightSource_Force32Bit = 2147483647 }; struct aiLight { struct aiString mName; enum aiLightSourceType mType; struct aiVector3D mPosition; struct aiVector3D mDirection; struct aiVector3D mUp; float mAttenuationConstant; float mAttenuationLinear; float mAttenuationQuadratic; struct aiColor3D mColorDiffuse; struct aiColor3D mColorSpecular; struct aiColor3D mColorAmbient; float mAngleInnerCone; float mAngleOuterCone; struct aiVector2D mSize; }; enum aiTextureOp { aiTextureOp_Multiply = 0x0, aiTextureOp_Add = 0x1, aiTextureOp_Subtract = 0x2, aiTextureOp_Divide = 0x3, aiTextureOp_SmoothAdd = 0x4, aiTextureOp_SignedAdd = 0x5, _aiTextureOp_Force32Bit = 2147483647 }; enum aiTextureMapMode { aiTextureMapMode_Wrap = 0x0, aiTextureMapMode_Clamp = 0x1, aiTextureMapMode_Decal = 0x3, aiTextureMapMode_Mirror = 0x2, _aiTextureMapMode_Force32Bit = 2147483647 }; enum aiTextureMapping { aiTextureMapping_UV = 0x0, aiTextureMapping_SPHERE = 0x1, aiTextureMapping_CYLINDER = 0x2, aiTextureMapping_BOX = 0x3, aiTextureMapping_PLANE = 0x4, aiTextureMapping_OTHER = 0x5, _aiTextureMapping_Force32Bit = 2147483647 }; enum aiTextureType { aiTextureType_NONE = 0x0, aiTextureType_DIFFUSE = 0x1, aiTextureType_SPECULAR = 0x2, aiTextureType_AMBIENT = 0x3, aiTextureType_EMISSIVE = 0x4, aiTextureType_HEIGHT = 0x5, aiTextureType_NORMALS = 0x6, aiTextureType_SHININESS = 0x7, aiTextureType_OPACITY = 0x8, aiTextureType_DISPLACEMENT = 0x9, aiTextureType_LIGHTMAP = 0xA, aiTextureType_REFLECTION = 0xB, aiTextureType_UNKNOWN = 0xC, _aiTextureType_Force32Bit = 2147483647 }; enum aiShadingMode { aiShadingMode_Flat = 0x1, aiShadingMode_Gouraud = 0x2, aiShadingMode_Phong = 0x3, aiShadingMode_Blinn = 0x4, aiShadingMode_Toon = 0x5, aiShadingMode_OrenNayar = 0x6, aiShadingMode_Minnaert = 0x7, aiShadingMode_CookTorrance = 0x8, aiShadingMode_NoShading = 0x9, aiShadingMode_Fresnel = 0xa, _aiShadingMode_Force32Bit = 2147483647 }; enum aiTextureFlags { aiTextureFlags_Invert = 0x1, aiTextureFlags_UseAlpha = 0x2, aiTextureFlags_IgnoreAlpha = 0x4, _aiTextureFlags_Force32Bit = 2147483647 }; enum aiBlendMode { aiBlendMode_Default = 0x0, aiBlendMode_Additive = 0x1, _aiBlendMode_Force32Bit = 2147483647 }; struct aiUVTransform { struct aiVector2D mTranslation; struct aiVector2D mScaling; ai_real mRotation; } __attribute__((__packed__)); enum aiPropertyTypeInfo { aiPTI_Float = 0x1, aiPTI_Double = 0x2, aiPTI_String = 0x3, aiPTI_Integer = 0x4, aiPTI_Buffer = 0x5, _aiPTI_Force32Bit = 2147483647 }; struct aiMaterialProperty { struct aiString mKey; unsigned int mSemantic; unsigned int mIndex; unsigned int mDataLength; enum aiPropertyTypeInfo mType; char* mData; }; struct aiMaterial { struct aiMaterialProperty** mProperties; unsigned int mNumProperties; unsigned int mNumAllocated; }; enum aiReturn aiGetMaterialProperty( const struct aiMaterial* pMat, const char* pKey, unsigned int type, unsigned int index, const struct aiMaterialProperty** pPropOut); enum aiReturn aiGetMaterialFloatArray( const struct aiMaterial* pMat, const char* pKey, unsigned int type, unsigned int index, ai_real* pOut, unsigned int* pMax); enum aiReturn aiGetMaterialIntegerArray(const struct aiMaterial* pMat, const char* pKey, unsigned int type, unsigned int index, int* pOut, unsigned int* pMax); enum aiReturn aiGetMaterialColor(const struct aiMaterial* pMat, const char* pKey, unsigned int type, unsigned int index, struct aiColor4D* pOut); enum aiReturn aiGetMaterialUVTransform(const struct aiMaterial* pMat, const char* pKey, unsigned int type, unsigned int index, struct aiUVTransform* pOut); enum aiReturn aiGetMaterialString(const struct aiMaterial* pMat, const char* pKey, unsigned int type, unsigned int index, struct aiString* pOut); unsigned int aiGetMaterialTextureCount(const struct aiMaterial* pMat, enum aiTextureType type); enum aiReturn aiGetMaterialTexture(const struct aiMaterial* mat, enum aiTextureType type, unsigned int index, struct aiString* path, enum aiTextureMapping* mapping , unsigned int* uvindex , ai_real* blend , enum aiTextureOp* op , enum aiTextureMapMode* mapmode , unsigned int* flags ); struct aiFace { unsigned int mNumIndices; unsigned int* mIndices; }; struct aiVertexWeight { unsigned int mVertexId; float mWeight; }; struct aiBone { struct aiString mName; unsigned int mNumWeights; struct aiVertexWeight* mWeights; struct aiMatrix4x4 mOffsetMatrix; }; enum aiPrimitiveType { aiPrimitiveType_POINT = 0x1, aiPrimitiveType_LINE = 0x2, aiPrimitiveType_TRIANGLE = 0x4, aiPrimitiveType_POLYGON = 0x8, _aiPrimitiveType_Force32Bit = 2147483647 }; struct aiAnimMesh { struct aiVector3D* mVertices; struct aiVector3D* mNormals; struct aiVector3D* mTangents; struct aiVector3D* mBitangents; struct aiColor4D* mColors[0x8]; struct aiVector3D* mTextureCoords[0x8]; unsigned int mNumVertices; float mWeight; }; enum aiMorphingMethod { aiMorphingMethod_VERTEX_BLEND = 0x1, aiMorphingMethod_MORPH_NORMALIZED = 0x2, aiMorphingMethod_MORPH_RELATIVE = 0x3, _aiMorphingMethod_Force32Bit = 2147483647 }; struct aiMesh { unsigned int mPrimitiveTypes; unsigned int mNumVertices; unsigned int mNumFaces; struct aiVector3D* mVertices; struct aiVector3D* mNormals; struct aiVector3D* mTangents; struct aiVector3D* mBitangents; struct aiColor4D* mColors[0x8]; struct aiVector3D* mTextureCoords[0x8]; unsigned int mNumUVComponents[0x8]; struct aiFace* mFaces; unsigned int mNumBones; struct aiBone** mBones; unsigned int mMaterialIndex; struct aiString mName; unsigned int mNumAnimMeshes; struct aiAnimMesh** mAnimMeshes; unsigned int mMethod; }; typedef enum aiMetadataType { AI_BOOL = 0, AI_INT32 = 1, AI_UINT64 = 2, AI_FLOAT = 3, AI_DOUBLE = 4, AI_AISTRING = 5, AI_AIVECTOR3D = 6, FORCE_32BIT = 2147483647 } aiMetadataType; struct aiMetadataEntry { aiMetadataType mType; void* mData; }; struct aiMetadata { unsigned int mNumProperties; struct aiString* mKeys; struct aiMetadataEntry* mValues; }; enum aiPostProcessSteps { aiProcess_CalcTangentSpace = 0x1, aiProcess_JoinIdenticalVertices = 0x2, aiProcess_MakeLeftHanded = 0x4, aiProcess_Triangulate = 0x8, aiProcess_RemoveComponent = 0x10, aiProcess_GenNormals = 0x20, aiProcess_GenSmoothNormals = 0x40, aiProcess_SplitLargeMeshes = 0x80, aiProcess_PreTransformVertices = 0x100, aiProcess_LimitBoneWeights = 0x200, aiProcess_ValidateDataStructure = 0x400, aiProcess_ImproveCacheLocality = 0x800, aiProcess_RemoveRedundantMaterials = 0x1000, aiProcess_FixInfacingNormals = 0x2000, aiProcess_SortByPType = 0x8000, aiProcess_FindDegenerates = 0x10000, aiProcess_FindInvalidData = 0x20000, aiProcess_GenUVCoords = 0x40000, aiProcess_TransformUVCoords = 0x80000, aiProcess_FindInstances = 0x100000, aiProcess_OptimizeMeshes = 0x200000, aiProcess_OptimizeGraph = 0x400000, aiProcess_FlipUVs = 0x800000, aiProcess_FlipWindingOrder = 0x1000000, aiProcess_SplitByBoneCount = 0x2000000, aiProcess_Debone = 0x4000000, aiProcess_GlobalScale = 0x8000000 }; struct aiTexel { unsigned char b,g,r,a; } __attribute__((__packed__)); struct aiTexture { unsigned int mWidth; unsigned int mHeight; char achFormatHint[9]; struct aiTexel* pcData; }; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wattributes" struct aiNode { struct aiString mName; struct aiMatrix4x4 mTransformation; struct aiNode* mParent; unsigned int mNumChildren; struct aiNode** mChildren; unsigned int mNumMeshes; unsigned int* mMeshes; struct aiMetadata* mMetaData; }; #pragma GCC diagnostic pop struct aiScene { unsigned int mFlags; struct aiNode* mRootNode; unsigned int mNumMeshes; struct aiMesh** mMeshes; unsigned int mNumMaterials; struct aiMaterial** mMaterials; unsigned int mNumAnimations; struct aiAnimation** mAnimations; unsigned int mNumTextures; struct aiTexture** mTextures; unsigned int mNumLights; struct aiLight** mLights; unsigned int mNumCameras; struct aiCamera** mCameras; char* mPrivate; }; const char* aiGetLegalString (void); unsigned int aiGetVersionMinor (void); unsigned int aiGetVersionMajor (void); unsigned int aiGetVersionRevision (void); unsigned int aiGetCompileFlags (void); ]]) assimp = ffi.load(lwlgl.libs.assimp[2])
local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE) combat:setParameter(COMBATPARAM_USECHARGES, 1) local condition = Condition(CONDITION_BLEEDING) condition:setParameter(CONDITION_PARAM_DELAYED, 10) condition:addDamage(15, 2000, -50) combat:addCondition(condition) local spell = Spell("instant") function spell.onCastSpell(creature, var) return combat:execute(creature, var) end spell:group("attack") spell:id(141) spell:name("Inflict Wound") spell:words("utori kor") spell:level(40) spell:mana(30) spell:isAggressive(true) spell:range(1) spell:needTarget(true) spell:blockWalls(true) spell:cooldown(30 * 1000) spell:groupCooldown(2 * 1000) spell:needLearn(false) spell:vocation("knight;true", "elite knight;true") spell:register()
_ANA.ana.acc = 0 -- nd accesses _ANA.ana.abrt = 0 -- nd flows _ANA.ana.excpt = 0 -- nd excpt -- any variable access calls this function -- to be inserted on parent Parallel sub[i] or Class function iter (n) local par = n.__par and n.__par.tag return par=='ParOr' or par=='ParAnd' or par=='ParEver' or n.tag=='Dcl_cls' end function INS (acc, exists) if _AST.iter'Thread'() then acc.md = 'no' -- no acc inside threads end if not exists then acc.cls = CLS() -- cls that acc resides end local n = _AST.iter(iter)() -- child Block from PAR if n then n.ana.accs[#n.ana.accs+1] = acc end return acc end function CHG (acc, md) if _AST.iter'Thread'() then return end acc.md = md end F = { -- accs need to be I-indexed (see CHK_ACC) Dcl_cls_pre = function (me) me.ana.accs = {} end, ParOr_pre = function (me) for _, sub in ipairs(me) do sub.ana.accs = {} end end, ParAnd_pre = 'ParOr_pre', ParEver_pre = 'ParOr_pre', ParOr_pos = function (me) -- insert all my subs on my parent Par if _AST.iter(_AST.pred_par) then -- requires ParX_pos for _, sub in ipairs(me) do for _,acc in ipairs(sub.ana.accs) do -- check par/enter only against immediate pars if acc.md ~= 'par' then -- check ParOr esc only against immediate pars if not (acc.md=='esc' and acc.id.tag=='ParOr') then -- check Loop esc only against nested pars --if not (acc.md=='esc' and acc.id.tag=='Loop' --and acc.id.depth>me.depth) then INS(acc, true) --end end end end end end end, ParAnd_pos = 'ParOr_pos', ParEver_pos = 'ParAnd_pos', Spawn = 'New', New = function (me) for _,acc in ipairs(me.cls.ana.accs) do INS(acc, true) end end, -- TODO: usar o Dcl_var p/ isso --[=[ Orgs = function (me) -- insert cls accs on my parent ParOr for _, var in ipairs(me.vars) do for _,acc in ipairs(var.cls.ana.accs) do INS(acc, true) end end end, ]=] EmitExt = function (me) local _, e1, e2 = unpack(me) if e1.evt.pre == 'input' then return end INS { path = me.ana.pre, id = e1.evt.id, -- like functions (not table events) md = 'cl', tp = '_', any = false, err = 'event `'..e1.evt.id..'´ (line '..me.ln[2]..')' } --[[ if e2 then local tp = _TP.deref(e1.evt.ins, true) if e2.accs and tp then e2.accs[1][4] = (e2.accs[1][2] ~= 'no') -- &x does not become "any" e2.accs[1][2] = (me.c and me.c.mod=='pure' and 'rd') or 'wr' e2.accs[1][3] = tp end end ]] end, Op2_call = function (me) local _, f, exps = unpack(me) local ps = {} CHG(f.ref.acc, 'cl') for i, exp in ipairs(exps) do local tp = _TP.deref(exp.tp, true) if tp then local v = exp.ref if v then -- ignore constants --DBG(exp.tag, exp.ref) v.acc.any = exp.lval -- f(&x) // a[N] f(a) // not "any" CHG(v.acc, (me.c and me.c.mod=='pure' and 'rd') or 'wr') v.acc.tp = tp end end end end, EmitInt = function (me) local _, e1, e2 = unpack(me) CHG(e1.ref.acc, 'tr') e1.ref.acc.node = me -- emtChk me.emtChk = false end, SetExp = function (me) local _,_,to = unpack(me) CHG(to.ref.acc, 'wr') end, AwaitInt = function (me) CHG(me[1].ref.acc, 'aw') F.AwaitExt(me) -- flow end, ['Op1_*'] = function (me) me.ref.acc.any = true me.ref.acc.tp = _TP.deref(me.ref.acc.tp,true) end, ['Op1_&'] = function (me) CHG(me.ref.acc, 'no') end, ['Op2_.'] = function (me) if me.org then me.ref.acc.org = me.org.ref end end, Global = function (me) me.acc = INS { path = me.ana.pre, id = 'Global', md = 'rd', tp = me.tp, any = true, err = 'variable `global´ (line '..me.ln[2]..')', } end, This = function (me) me.acc = INS { path = me.ana.pre, id = me, md = 'rd', tp = me.tp, any = true, err = 'variable `this´ (line '..me.ln[2]..')', } end, Var = function (me) if me.__par.tag=='VarList' and me.__par.__par.tag=='Async' then return -- <async (v)> is not an access end me.acc = INS { path = me.ana.pre, id = me.var, md = 'rd', tp = me.var.tp, any = false, err = 'variable/event `'..me.var.id..'´ (line '..me.ln[2]..')', } end, Nat = function (me) me.acc = INS { path = me.ana.pre, id = me[1], md = 'rd', tp = '_', any = false, err = 'symbol `'..me[1]..'´ (line '..me.ln[2]..')', } end, -- FLOW -- Break = function (me, TAG, PRE) TAG = TAG or 'Loop' PRE = PRE or me.ana.pre local top = _AST.iter(TAG)() INS { path = PRE, id = top, md = 'esc', err = 'escape (line '..me.ln[2]..')', } end, Escape = function (me) F.Break(me, 'SetBlock') end, Node = function (me) local top = me.__par and me.__par.tag if top == 'ParOr' then if not me.ana.pos[false] then F.Break(me, 'ParOr', me.ana.pos) end end if top=='ParOr' or top=='ParAnd' or top=='ParEver' then if not me.ana.pre[false] then me.parChk = false -- only chk if ND flw INS { path = me.ana.pre, id = me,--.__par, md = 'par', err = 'par enter (line '..me.ln[2]..')', } end end end, AwaitExt = function (me) INS { path = me.ana.pos, id = me,--_AST.iter(TAG)(), md = 'awk', err = 'awake (line '..me.ln[2]..')', } end, AwaitT = 'AwaitExt', --AwaitInt = <see above>, } _AST.visit(F) ------------------------------------------------------------------------------ local ND = { acc = { par={},awk={},esc={}, cl = { cl=true, tr=true, wr=true, rd=true, aw=true }, tr = { cl=true, tr=true, wr=false, rd=false, aw=true }, wr = { cl=true, tr=false, wr=true, rd=true, aw=false }, rd = { cl=true, tr=false, wr=true, rd=false, aw=false }, aw = { cl=true, tr=true, wr=false, rd=false, aw=false }, no = {}, -- never ND ('ref') }, flw = { cl={},tr={},wr={},rd={},aw={},no={}, par = { par=false, awk=false, esc=true }, awk = { par=false, awk=false, esc=true }, esc = { par=true, awk=true, esc=true }, }, } local ALL = nil -- holds all emits starting from top-most PAR --[[ ana = { acc = 1, -- false positive }, ana = { isForever = true, n_unreachs = 1, }, ]] -- {path [A]=true, [a]=true } => {ret [A]=true, [aX]=true,[aY]=true } -- {T [a]={[X]=true,[Y]=true} } (emits2pres) local function int2exts (path, NO_emts, ret) ret = ret or {} local more = false -- converged for int in pairs(path) do if type(int)=='table' and int[1].pre=='event' then for emt_acc in pairs(ALL) do if int[1]==emt_acc.id and (not NO_emts[emt_acc]) then for ext in pairs(emt_acc.path) do if not ret[ext] then more = true -- not converged yet ret[ext] = true -- insert new ext end end end end else ret[int] = true -- already an ext end end if more then return int2exts(ret, NO_emts, ret, cache) -- not converged else if next(ret)==nil then ret[false] = true -- include "never" if empty end return ret end end function par_rem (path, NO_par) for id in pairs(path) do if NO_par[id] then path[id] = nil end end if next(path)==nil then path[true] = true -- include "tight" became empty end return path end function par_isConc (path1, path2, T) for id1 in pairs(path1) do for id2 in pairs(path2) do if (id1 == false) then elseif (id1 == id2) or (type(id1) == 'table') and (type(id2) == 'table') and (id1[1] == id2[1]) then return true end end end end --local CACHE = setmetatable({}, --{__index=function(t,k) t[k]={} return t[k] end}) function CHK_ACC (accs1, accs2, NO_par, NO_emts) local cls = CLS() -- "acc": i/j are concurrent, and have incomp. acc -- accs need to be I-indexed for _, acc1 in ipairs(accs1) do local path1 = int2exts(acc1.path, NO_emts) path1 = par_rem(path1, NO_par) for _, acc2 in ipairs(accs2) do local path2 = int2exts(acc2.path, NO_emts) path2 = par_rem(path2, NO_par) if par_isConc(path1,path2) then -- FLOW if ND.flw[acc1.md][acc2.md] then if _AST.isChild(acc1.id, acc2.id) or _AST.isChild(acc2.id, acc1.id) then DBG('WRN : abortion : '.. acc1.err..' vs '..acc2.err) _ANA.ana.abrt = _ANA.ana.abrt + 1 --[[ DBG'===============' DBG(acc1.cls.id, acc1, acc1.id, acc1.md, acc1.tp, acc1.any, acc1.err) for k in pairs(path1) do DBG('path1', acc1.path, type(k)=='table' and k[1].id or k) end DBG(acc2.cls.id, acc2, acc2.id, acc2.md, acc2.tp, acc2.any, acc2.err) for k in pairs(path2) do DBG('path2', acc2.path, type(k)=='table' and k[1].id or k) end DBG'===============' ]] if acc1.md == 'par' then acc1.id.parChk = true end if acc2.md == 'par' then acc2.id.parChk = true end end end -- ACC if ND.acc[acc1.md][acc2.md] then -- this.x vs this.x (both accs bounded to cls) local cls_ = (acc1.cls == cls) or (acc2.cls == cls) -- a.x vs this.x local _nil = {} local o1 = (acc1.org or acc2.org) o1 = o1 and o1.acc or _nil local o2 = (acc2.org or acc1.org) o2 = o2 and o2.acc or _nil -- orgs are compatible local org_ = (o1 == o2) or o1.any or o2.any -- orgs are compatible local org_ = o1.id == o2.id or o1.any or o2.any -- ids are compatible local id_ = acc1.id == acc2.id or acc1.md=='cl' and acc2.md=='cl' or acc1.any and _TP.contains(acc1.tp,acc2.tp) or acc2.any and _TP.contains(acc2.tp,acc1.tp) -- C's are det local c1 = _ENV.c[acc1.id] c1 = c1 and (c1.mod=='pure' or c1.mod=='constant') local c2 = _ENV.c[acc2.id] c2 = c2 and (c2.mod=='pure' or c2.mod=='constant') local c_ = c1 or c2 or (_ENV.dets[acc1.id] and _ENV.dets[acc1.id][acc2.id]) --DBG(id_, c_,c1,c2, acc1.any,acc2.any) if cls_ and org_ and id_ and (not c_) then if _OPTS.warn_nondeterminism then DBG('WRN : nondeterminism : '..acc1.err ..' vs '..acc2.err) end _ANA.ana.acc = _ANA.ana.acc + 1 end end end end end end function _chk (n, id) for k in pairs(n) do if type(k)=='table' and k[1]==id then return true end end return false end -- TODO: join with CHK_ACC -- emits vs rets/ors/breaks (the problem is that emits are considered in par) function CHK_EXCPT (s1, s2, isOR) for _, ana in ipairs(s1.ana.accs) do if ana.md == 'tr' then if _chk(s2.ana.pos,ana.id) and isOR or -- terminates w/ same event s2.ana.pos[false] --or -- ~terminates (return/break) --s2.ana.pos[true] -- terminates tight then if _OPTS.warn_exception then DBG('WRN : exception : line '..s2.ln[2]..' vs '..ana.err) end _ANA.ana.excpt = _ANA.ana.excpt + 1 ana.node.emtChk = true end end end end G = { -- take all emits from top-level PAR ParOr_pre = function (me) if ALL then return end ALL = {} for _, sub in ipairs(me) do for _,acc in ipairs(sub.ana.accs) do if acc.md == 'tr' then ALL[acc] = true end end end end, ParAnd_pre = 'ParOr_pre', ParEver_pre = 'ParOr_pre', -- look for nondeterminism ParOr = function (me) for i=1, #me do for j=i+1, #me do -- holds invalid emits local NO_emts = {} for _,acc in ipairs(me[i].ana.accs) do if acc.md == 'tr' then NO_emts[acc] = true -- same trail (happens bef or aft) end end for _,acc in ipairs(me[j].ana.accs) do if acc.md == 'tr' then NO_emts[acc] = true -- same trail (happens bef or aft) end end for acc in pairs(ALL) do if _ANA.CMP(acc.path, me.ana.pre) then NO_emts[acc] = true -- instantaneous emit end end CHK_ACC(me[i].ana.accs, me[j].ana.accs, me.ana.pre, --_ANA.union(me.ana.pre,me.ana.pos), NO_emts) CHK_EXCPT(me[i], me[j], me.tag=='ParOr') CHK_EXCPT(me[j], me[i], me.tag=='ParOr') end end end, ParAnd = 'ParOr', ParEver = 'ParOr', -- TODO: workaround -- Loop can only be repeated after nested PARs evaluate CHK_* Loop = function (me) -- pre = pre U pos if not me[1].ana.pos[false] then _ANA.union(me[1], next(me.ana.pre), me[1].ana.pos) end end, } _AST.visit(G)
-- Minetest 0.4 mod: bones -- See README.txt for licensing and other information. bone_file = minetest.get_worldpath().."/player_bones" player_bones = default.deserialize_from_file(bone_file) local replaceable_node_types = { "default:lava_source", "default:lava_flowing", "default:water_source", "default:water_flowing", "air" } local function is_owner(pos, name) local owner = minetest.get_meta(pos):get_string("owner") if owner == "" or owner == name then return true end return false end local function not_pillaged(pos) local meta = minetest.get_meta(pos) if ( meta:get_string("pillaged") == "" ) then return true end return false end local function settle_bones(pos) local nextpos = pos; local node -- find ground beneath player repeat pos = nextpos nextpos = {x=pos.x, y=pos.y-1, z=pos.z} node = minetest.get_node_or_nil(nextpos) until node == nil or not settle_type(node.name) node = minetest.get_node_or_nil(pos) -- if the player is inside rock or something if node == nil or not settle_type(node.name) then -- find nearby empty node pos = minetest.find_node_near(pos, 3, replaceable_node_types) end -- if nothing nearby is empty if pos == nil then return nil end return pos;--{x=math.floor(pos.x*10)/10, y=math.floor(pos.y*10)/10, z=math.floor(pos.z*10)/10} end function settle_type (nodename) for i=1,#replaceable_node_types do if nodename == replaceable_node_types[i] then return true end end return false end minetest.register_node("bones:bones", { description = "Bones", tiles = { "bones_top.png", "bones_bottom.png", "bones_side.png", "bones_side.png", "bones_rear.png", "bones_front.png" }, paramtype2 = "facedir", groups = {dig_immediate=2}, sounds = default.node_sound_dirt_defaults({ footstep = {name="default_gravel_footstep", gain=0.5}, dug = {name="default_gravel_footstep", gain=1.0}, }), on_punch = function(pos, node, player) if node == nil or node.name ~= "bones:bones" then return end local meta = minetest.env:get_meta(pos) local name = player:get_player_name() if name ~= meta:get_string("owner") then return end local meta = minetest.env:get_meta(pos) local bones_inv = meta:get_inventory() if ( bones_inv == nil ) then return end local player_inv = player:get_inventory() if ( player_inv == nil ) then minetest.log("error", 'Bones: Unable to get player '..name..' inventory') return end for i=1,32 do local stack = bones_inv:get_stack("main", i) if stack ~= nil and not stack:is_empty() then local leftover = player_inv:add_item("main", stack) bones_inv:set_stack("main", i, nil) if leftover ~= nil and not leftover:is_empty() then bones_inv:set_stack("main", i, leftover) else bones_inv:set_stack("main", i, nil) end end end minetest.log("action", name.." unloaded his fresh bones at "..minetest.pos_to_string(pos)) -- destroy the bone node minetest.set_node(pos, {name="air", param1=0, param2=0}) minetest.log("action","Destroying bones "..minetest.pos_to_string(pos)) end, can_dig = function(pos, player) return is_owner(pos, player:get_player_name()) end, after_dig_node = function(pos, oldnode, oldmetadata, digger) local meta = minetest:get_meta(pos) meta:from_table(oldmetadata) local inv = meta:get_inventory() default.dump_inv(pos,"main",inv) player_bones[meta:get_string("owner")] = nil default.serialize_to_file(bone_file,player_bones) end, allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) if is_owner(pos, player:get_player_name()) then return count end return 0 end, allow_metadata_inventory_put = function(pos, listname, index, stack, player) return 0 end, allow_metadata_inventory_take = function(pos, listname, index, stack, player) if is_owner(pos, player:get_player_name()) or not_pillaged(pos) then return stack:get_count() end return 0 end, on_metadata_inventory_take = function(pos, listname, index, stack, player) local meta = minetest.get_meta(pos) meta:set_string("pillaged","1") if meta:get_string("owner") ~= "" and meta:get_inventory():is_empty("main") then meta:set_string("infotext", meta:get_string("owner").."'s old bones") meta:set_string("formspec", "") meta:set_string("owner", "") end end, on_timer = function(pos, elapsed) local meta = minetest.get_meta(pos) local time = meta:get_int("time")+elapsed meta:set_int("time",time) local publish = 1800 local delete = 7200 if time >= publish and meta:get_string("owner") ~= "" then meta:set_string("infotext", meta:get_string("owner").."'s old bones") meta:set_string("owner", "") end if time >= delete then local inv = meta:get_inventory() if inv:is_empty("main") == false then dump_bones(pos) end minetest.after(5,minetest.remove_node,pos) player_bones[meta:get_string("owner")] = nil default.serialize_to_file(bone_file,player_bones) return false end return true end, }) function dump_bones(pos) -- drop everything in the bones on the ground default.dump_inv(pos,"main") end function bones_on_dieplayer (player) if minetest.setting_getbool("creative_mode") or minetest.check_player_privs(player:get_player_name(),{immortal=true}) then player:set_hp(20) return end local pos = player:getpos() local name = player:get_player_name() pos = settle_bones(pos) if pos == nil then return end player_bones[name] = pos default.serialize_to_file(bone_file,player_bones) minetest.sound_play("default_death",{ object = player, }) minetest.chat_send_player(player:get_player_name(),"Your bones are at "..math.floor(pos.x + 0.5) .. "," .. math.floor(pos.y+0.5) .. "," .. math.floor(pos.z+0.5)) pos.x = math.floor(pos.x+0.5) pos.y = math.floor(pos.y+0.5) pos.z = math.floor(pos.z+0.5) local param2 = minetest.dir_to_facedir(player:get_look_dir()) local nn = minetest.get_node(pos).name if minetest.registered_nodes[nn].can_dig and not minetest.registered_nodes[nn].can_dig(pos, player) then local player_inv = player:get_inventory() for i=1,player_inv:get_size("main") do player_inv:set_stack("main", i, nil) end for i=1,player_inv:get_size("craft") do player_inv:set_stack("craft", i, nil) end return end --minetest.dig_node(pos) minetest.add_node(pos, {name="bones:bones", param2=param2}) local meta = minetest.get_meta(pos) local inv = meta:get_inventory() local player_inv = player:get_inventory() inv:set_size("main", 8*4) local empty_list = inv:get_list("main") inv:set_list("main", player_inv:get_list("main")) player_inv:set_list("main", empty_list) for i=1,player_inv:get_size("craft") do inv:add_item("main", player_inv:get_stack("craft", i)) player_inv:set_stack("craft", i, nil) end meta:set_string("formspec", "size[8,9;]".. "list[current_name;main;0,0;8,4;]".. "list[current_player;main;0,5;8,4;]") meta:set_string("infotext", player:get_player_name().."'s fresh bones") meta:set_string("owner", player:get_player_name()) meta:set_int("time", 0) local timer = minetest.get_node_timer(pos) timer:start(10) end
-- -- Prepare a new Premake release. This is still incomplete and some manual -- work is needed to get everything packaged up. -- -- BEFORE RUNNING THIS SCRIPT: -- * Make sure all tests pass on Windows AND Posix systems -- * Update CHANGELOG.txt -- * Run `premake4 embed` -- * Commit all changes to premake-stable -- * Tag premake-stable with the version number -- * Prepare release news item -- -- RUN THE SCRIPT: -- On each platform, run `premake4 release x.x binary` -- (and copy binary to /usr/local/bin if desired) -- On one platform, run `premake4 release x.x source` -- -- AFTER RUNNING THIS SCRIPT: -- * Upload release files to SourceForge -- * On SourceForge, set file platforms and release changelog -- * Update the download page on Industrious One -- * Post the news item to the forums -- * Update the Premake project page on Industrious One -- * Post to Twitter -- * Send to email list -- * Add release to Freshmeat (http://freshmeat.net/projects/premake) -- * Push changes to repositories on BitBucket -- -- Info on using Mercurial to manage releases: -- http://hgbook.red-bean.com/read/managing-releases-and-branchy-development.html -- http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/ -- function dorelease() local z local hgroot = "https://bitbucket.org/premake/premake-stable" -- -- Helper function: runs a command (formatted, with optional arguments) and -- suppresses any output. Works on both Windows and POSIX. Might be a good -- candidate for a core function. -- local function exec(cmd, ...) cmd = string.format(cmd, unpack(arg)) local z = os.execute(cmd .. " > output.log 2> error.log") os.remove("output.log") os.remove("error.log") return z end -- -- Make sure a version was specified -- if #_ARGS ~= 2 then error("** Usage: release [version] [source | binary]", 0) end local version = _ARGS[1] local kind = _ARGS[2] local pkgname = "premake-" .. version -- -- Look for required utilities -- local required = { "hg", "zip", "tar", "make", "gcc" } for _, value in ipairs(required) do z = exec("%s --version", value) if z ~= 0 then error("** '" .. value .. "' not found", 0) end end -- -- Pre-release checklist -- print( "") print( "BEFORE RUNNING THIS SCRIPT you should..." ) print( "* Pass all tests on Windows AND Posix systems" ) print( "* Update CHANGELOG.txt") print( "* Run `premake4 embed`") print( "* Commit all changes to premake-stable" ) print( "* Tag premake-stable with the version number" ) print( "* Prepare release news item") print( "") print( "Press [Enter] to begin.") io .read() --------------------------------------------------------------------------- -- -- Everything below this needs to be reworked for Mercurial -- --------------------------------------------------------------------------- -- -- Check out the release tagged sources to releases/ -- print("Downloading release tag...") os.mkdir("release") os.chdir("release") os.rmdir(pkgname) z = exec( "hg clone -r %s %s %s", version, hgroot, pkgname) if z ~= 0 then error("** Failed to download tagged sources", 0) end os.chdir(pkgname) -- -- Update the version number in premake.c -- print("Updating version number...") io.input("src/host/premake.c") local text = io.read("*a") text = text:gsub("HEAD", version) io.output("src/host/premake.c") io.write(text) io.close() -- -- Make absolutely sure the embedded scripts have been updated -- print("Updating embedded scripts...") z = exec("premake4 embed") if z ~= 0 then error("** Failed to update the embedded scripts", 0) end -- -- Generate source packaging -- if kind == "source" then -- -- Remove extra directories -- print("Cleaning up the source tree...") os.rmdir("samples") os.rmdir("packages") os.rmdir(".hg") os.rmdir(".hgignore") os.rmdir(".hgtags") -- -- Generate project files to the build directory -- print("Generating project files...") exec("premake4 /to=build/vs2005 vs2005") exec("premake4 /to=build/vs2008 vs2008") exec("premake4 /to=build/vs2010 vs2010") exec("premake4 /to=build/gmake.windows /os=windows gmake") exec("premake4 /to=build/gmake.unix /os=linux gmake") exec("premake4 /to=build/gmake.macosx /os=macosx /platform=universal32 gmake") exec("premake4 /to=build/codeblocks.windows /os=windows codeblocks") exec("premake4 /to=build/codeblocks.unix /os=linux codeblocks") exec("premake4 /to=build/codeblocks.macosx /os=macosx /platform=universal32 codeblocks") exec("premake4 /to=build/codelite.windows /os=windows codelite") exec("premake4 /to=build/codelite.unix /os=linux codelite") exec("premake4 /to=build/codelite.macosx /os=macosx /platform=universal32 codelite") exec("premake4 /to=build/xcode3 /platform=universal32 xcode3") -- -- Create source package -- print("Creating source code package...") os.chdir("..") exec("zip -r9 %s-src.zip %s/*", pkgname, pkgname) -- -- Create a binary package for this platform. This step requires a working -- GNU/Make/GCC environment. I use MinGW on Windows. -- else print("Building platform binary release...") exec("premake4 /platform=universal32 gmake") exec("make config=%s", iif(os.is("macosx"), "releaseuniv32", "release")) local fname os.chdir("bin/release") if os.is("windows") then fname = string.format("%s-windows.zip", pkgname) exec("zip -9 %s premake4.exe", fname) else fname = string.format("%s-%s.tar.gz", pkgname, os.get()) exec("tar czvf %s premake4", fname) end os.copyfile(fname, "../../../" .. fname) os.chdir("../../..") end -- -- Upload files to SourceForge -- -- -- Clean up -- -- -- Remind me of required next steps -- print("") print( "Finished.") end
-- ===================================================================================== -- Name: proxy.lua -- Author: Gurpreet Singh -- Url: https://github.com/ffs97/bluez-dbus-lua/proxy.lua -- License: The MIT License (MIT) -- -- This submodule implements a wrapper for Dbus Proxies -- ===================================================================================== -- Imports {{{ local lgi = require("lgi") local Gio = lgi.require("Gio") local DBusProxy = Gio.DBusProxy local DBusNodeInfo = Gio.DBusNodeInfo local DBusProxyFlags = Gio.DBusProxyFlags local DBusCallFlags = Gio.DBusCallFlags local DBusInterfaceInfo = Gio.DBusInterfaceInfo local helpers = require("helpers") -- }}} -- ------------------------------------------------------------------------------------- -- Defining the Proxy Object local Proxy = {} -- ------------------------------------------------------------------------------------- -- Defining Local Functions -- Generate proxy property {{{ local function attach_property(proxy, property) local prop = {} if property.flags.READABLE then prop.get = function() return proxy._proxy:get_cached_property(property.name) end prop.connect = function(callback) proxy:properties_changed(property.name, callback) end end if property.flags.WRITABLE then prop.set = function(args) proxy._proxy:set_cached_property(property.name, args) end end proxy[property.name] = prop end -- }}} -- Generate proxy method {{{ local function attach_method(proxy, interface, method) local args = {} for _, arg in ipairs(method.in_args) do args[#args + 1] = {name = arg.name, type = arg.signature} end proxy._methods[method.name] = {args = args, interface = interface} proxy[method.name] = function(...) assert( #{...} == #args, string.format( "ERROR: " .. interface .. "." .. method.name .. " expects %d parameters but got %d", #args, #{...} ) ) for idx, val in ipairs({...}) do args[idx].value = val end return proxy:call(interface, method.name, helpers.pack_variant(args)) end end -- }}} -- Generate proxy signal {{{ local function attach_signal(proxy, signal) proxy[signal.name] = function(sender, callback) proxy._proxy.on_g_signal = function(_, sender_name, signal_name, args) if sender and sender_name ~= sender then return end if signal.name == signal_name then return callback(args) end end end end -- }}} -- ------------------------------------------------------------------------------------- -- Adding Functions and Signals -- Introspect {{{ function Proxy:introspect() return self:call("org.freedesktop.DBus.Introspectable", "Introspect") end -- }}} -- Method call {{{ function Proxy:call(interface, method, args, timeout) return self._proxy:call_sync( interface .. "." .. method, args, DBusCallFlags.NONE, timeout or -1 ) end -- }}} -- Properties signal {{{ function Proxy:properties_changed(property, callback) self._proxy.on_g_properties_changed = function(_, changed) if changed.value[property] ~= nil then local value = changed:get_child_value(0):get_child_value(1) return callback(value) end end end -- }}} -- ------------------------------------------------------------------------------------- -- Adding Proxy Definition -- Defining proxy {{{ function Proxy:new(bus, name, path, interface, flags) self._bus = bus self._path = path self._name = name self._methods = {} self._flags = flags self._interface = interface local proxy, err = DBusProxy.new_sync( self._bus, self._flags or DBusProxyFlags.NONE, DBusInterfaceInfo({name = self._interface}), self._name, self._path, self._interface ) if err then error("There was an error in defining the proxy " .. name .. ". " .. err) end self._proxy = proxy local introspect_data introspect_data, err = self:introspect() if err then io.stderr:write("WARNING: Could not introspect " .. path .. " at " .. name) return end introspect_data = helpers.unpack_variant(introspect_data) local node = DBusNodeInfo.new_for_xml(introspect_data) for _, iface in ipairs(node.interfaces) do if iface.name == self._interface then for _, method in ipairs(iface.methods) do attach_method(self, iface.name, method) end for _, signal in ipairs(iface.signals) do attach_signal(self, signal) end for _, property in ipairs(iface.properties) do attach_property(self, property) end end end return self end -- }}} -- ------------------------------------------------------------------------------------- return Proxy
-- == Rm(Remove) == -- Copyright (c) 2018 by Rene K. Mueller <spiritdude@gmail.com> -- License: MIT License (see LICENSE file) -- Description: remove file(s) -- -- History: -- 2018/01/08: 0.0.2: multiple files -- 2018/01/03: 0.0.1: first version return function(...) table.remove(arg,1) for i,f in ipairs(arg) do if file.exists(f) then file.remove(f) else console.print("ERROR: file <"..f.."> not found") end end if #arg == 0 then console.print("ERROR: rm requires at least an argument") end end
local token = {} local validator = require('authman.validator') ----- -- oauth access token -- oauth_token (access_token, consumer_key, refresh_token, redirect_url, scope, expires_in, created_at) ----- function token.model(config) local model = {} model.SPACE_NAME = config.spaces.oauth_token.name model.PRIMARY_INDEX = 'primary' model.REFRESH_INDEX = 'refresh' model.CONSUMER_INDEX = 'consumer' model.ACCESS_TOKEN = 1 model.CONSUMER_KEY = 2 model.REFRESH_TOKEN = 3 model.REDIRECT_URL = 4 model.SCOPE = 5 model.EXPIRES_IN = 6 model.CREATED_AT = 7 model.RESOURCE_OWNER = 8 model.CONSUMER_INDEX_CONSUMER_KEY = 1 model.CONSUMER_INDEX_RESOURCE_OWNER = 2 function model.get_space() return box.space[model.SPACE_NAME] end function model.serialize(token_tuple, data) local result = { access_token = token_tuple[model.ACCESS_TOKEN], consumer_key = token_tuple[model.CONSUMER_KEY], refresh_token = token_tuple[model.REFRESH_TOKEN], redirect_url = token_tuple[model.REDIRECT_URL], scope = token_tuple[model.SCOPE], expires_in = token_tuple[model.EXPIRES_IN], created_at = token_tuple[model.CREATED_AT], resource_owner = token_tuple[model.RESOURCE_OWNER], } if data ~= nil then for k,v in pairs(data) do result[k] = v end end return result end function model.create(token_tuple) return model.get_space():insert(token_tuple) end function model.get_by_access_token(access_token) if validator.not_empty_string(access_token) then return model.get_space():get(access_token) end end function model.get_by_refresh_token(refresh_token) if validator.not_empty_string(refresh_token) then return model.get_space().index[model.REFRESH_INDEX]:get(refresh_token) end end function model.delete(access_token) if validator.not_empty_string(access_token) then return model.get_space():delete(access_token) end end function model.delete_expired(expiration_ts) local total = 0 local total_deleted = 0 for _, tuple in model.get_space().index[model.PRIMARY_INDEX]:pairs(nil, {iterator = box.index.ALL}) do if tuple[model.CREATED_AT] + tuple[model.EXPIRES_IN] <= expiration_ts then model.get_space():delete({tuple[model.ACCESS_TOKEN]}) total_deleted = total_deleted + 1 end total = total + 1 if math.fmod(total, 500) == 0 then fiber.yield() end end return total_deleted end function model.delete_by_refresh(refresh_token) if validator.not_empty_string(refresh_token) then return model.get_space().index[model.REFRESH_INDEX]:delete(refresh_token) end end function model.get_by_consumer_key(consumer_key, resource_owner) if validator.not_empty_string(consumer_key) then local query = {[model.CONSUMER_INDEX_CONSUMER_KEY] = consumer_key} if validator.not_empty_string(resource_owner) then query[model.CONSUMER_INDEX_RESOURCE_OWNER] = resource_owner end return model.get_space().index[model.CONSUMER_INDEX]:select(query) end end function model.delete_by_consumer_key(consumer_key, resource_owner) local token_list = model.get_by_consumer_key(consumer_key, resource_owner) if token_list ~= nil then for i, tuple in ipairs(token_list) do model.get_space():delete({tuple[model.ACCESS_TOKEN]}) end return token_list end end return model end return token
ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.PrintName = "Armory" ENT.Author = "Owain Owjo" ENT.Category = "The XYZ Network Custom Stuff" ENT.RenderGroup = RENDERGROUP_BOTH ENT.Spawnable = true ENT.AdminSpawnable = true function ENT:SetupDataTables() self:NetworkVar("Int", 0, "Cooldown") self:NetworkVar("Int", 1, "Holding") end local function lockpickable(ply, entity) if entity:GetCooldown() > CurTime() then if CLIENT then XYZShit.Msg("Armory", Color(0, 50, 150), "The police armory is currently on a cooldown. Please wait roughly "..math.Round(entity:GetCooldown()-CurTime(), 0).." seconds before trying to raid it again.", ply) end return false end entity:SetCooldown(CurTime()+1) if SERVER and timer.Exists("xyz_meeting_end_timer") and XYZMeeting.MeetingData.stopCrime then XYZShit.Msg("Armory", Color(0, 50, 150), "There's an ongoing meeting...", ply) return false end if XYZShit.IsGovernment(ply:Team(), true) then if CLIENT then XYZShit.Msg("Armory", Color(0, 50, 150), "Police cannot rob the armory...", ply) end return false end if player.GetCount() < 10 then if CLIENT then XYZShit.Msg("Armory", Color(0, 50, 150), "Not enough players to rob the armory.", ply) end return false end local cops = 0 for k, v in pairs(player.GetAll()) do if v:isCP() then cops = cops + 1 continue end if XYZShit.IsGovernment(v:Team()) then cops = cops + 1 continue end end if player.GetCount()*0.2 > cops then if CLIENT then XYZShit.Msg("Armory", Color(0, 50, 150), "Not enough police to rob the armory.", ply) end return false end return true end hook.Add("canLockpick", "xyz_armory_lockpick", function(ply, ent) if ent:GetClass() == "xyz_armory" then return lockpickable(ply, ent) end end) hook.Add("onLockpickCompleted", "xyz_armory_lockpick_complete", function(ply, bool, ent) if not IsValid(ent) then return end if ent:GetClass() == "xyz_armory" then if bool then if SERVER then XYZShit.Msg("Armory", Color(0, 50, 150), "Stay near the armory for 30 seconds.", ply) XYZShit.Msg("Armory", Color(0, 50, 150), "The police armory is being robbed.") hook.Call("XYZArmoryRob", nil, ply) ply.xyz_armory_active = ent timer.Create("xyz_armory_reward", 30, 1, function() ply.xyz_armory_active = nil if not IsValid(ent) or not IsValid(ent) then return end if ply:GetPos():Distance(ent:GetPos()) > 400 then XYZShit.Msg("Armory", Color(0, 50, 150), "You are too far away from the armory", ply) return end XYZShit.Msg("Armory", Color(0, 50, 150), "You have taken $100,000 from the vault.", ply) XYZShit.Msg("Armory", Color(0, 50, 150), ply:Name().." has robbed the police armory.") hook.Call("XYZArmoryRobbed", nil, ply, 100000) --ply:addMoney(40000) local bag = ents.Create("pvault_moneybag") bag:SetPos(ent:GetPos()+(ent:GetForward()*40)) bag:Spawn() bag.cooldown = CurTime()+2 bag:SetValue(100000) ent:CloseDoor() ent:SetCooldown(CurTime()+1200) ent:SetHolding(0) timer.Simple(1200, function() if not IsValid(ent) then return end hook.Call("XYZArmoryRestock", nil, ent, 100000) ent:SetHolding(100000) end) end) ent:OpenDoor() end end end end)
object_mobile_dressed_tatooine_keska = object_mobile_shared_dressed_tatooine_keska:new { } ObjectTemplates:addTemplate(object_mobile_dressed_tatooine_keska, "object/mobile/dressed_tatooine_keska.iff")
UIPanel = Class(LuaBehaviour) function UIPanel:Awake() local _, viewCanvas = self.transform:TryGetComponent(typeof(Canvas)) self.viewCanvas = viewCanvas local _, viewCanvasGroup = self.transform:TryGetComponent(typeof(CanvasGroup)) self.viewCanvasGroup = viewCanvasGroup local _, viewGraphicRaycaster = self.transform:TryGetComponent(typeof(GraphicRaycaster)) self.viewGraphicRaycaster = viewGraphicRaycaster end function UIPanel:OnOpen(...) end function UIPanel:Show() self.viewCanvas.enabled = true end function UIPanel:Hide() self.viewCanvas.enabled = false end function UIPanel:IsVisible() return self.viewCanvas.enabled end function UIPanel:OnDoAnimationShow(onViewShow) onViewShow() end function UIPanel:OnViewShow() end function UIPanel:OnDoAnimationHide(onViewHide) onViewHide() end function UIPanel:OnViewHide() self:Hide() end function UIPanel:OnDestroy() self.viewCanvas = nil self.viewCanvasGroup = nil self.viewGraphicRaycaster = nil end return UIPanel
--configure gpio --configure int handler / or timer --configure email / sms
-- license:BSD-3-Clause -- copyright-holders:MAMEdev Team --------------------------------------------------------------------------- -- -- tiny.lua -- -- Small driver-specific example makefile -- Use make SUBTARGET=tiny to build -- --------------------------------------------------------------------------- -------------------------------------------------- -- Specify all the CPU cores necessary for the -- drivers referenced in tiny.lst. -------------------------------------------------- CPUS["Z80"] = true CPUS["M6502"] = true CPUS["MCS48"] = true CPUS["MCS51"] = true CPUS["M6800"] = true CPUS["M6805"] = true CPUS["M6809"] = true CPUS["M680X0"] = true CPUS["TMS9900"] = true CPUS["COP400"] = true -------------------------------------------------- -- Specify all the sound cores necessary for the -- drivers referenced in tiny.lst. -------------------------------------------------- SOUNDS["SAMPLES"] = true SOUNDS["DAC"] = true SOUNDS["DISCRETE"] = true SOUNDS["AY8910"] = true SOUNDS["YM2151"] = true SOUNDS["ASTROCADE"] = true SOUNDS["TMS5220"] = true SOUNDS["OKIM6295"] = true SOUNDS["HC55516"] = true SOUNDS["YM3812"] = true SOUNDS["CEM3394"] = true SOUNDS["VOTRAX"] = true SOUNDS["VOLT_REG"] = true -------------------------------------------------- -- specify available video cores -------------------------------------------------- -------------------------------------------------- -- specify available machine cores -------------------------------------------------- MACHINES["6821PIA"] = true MACHINES["TTL74148"] = true MACHINES["TTL74153"] = true MACHINES["TTL74157"] = true MACHINES["TTL7474"] = true MACHINES["TTL74259"] = true MACHINES["RIOT6532"] = true MACHINES["PIT8253"] = true MACHINES["Z80CTC"] = true MACHINES["Z80PIO"] = true MACHINES["68681"] = true MACHINES["BANKDEV"] = true MACHINES["GEN_LATCH"] = true MACHINES["TICKET"] = true MACHINES["WATCHDOG"] = true -------------------------------------------------- -- specify available bus cores -------------------------------------------------- BUSES["CENTRONICS"] = true -------------------------------------------------- -- This is the list of files that are necessary -- for building all of the drivers referenced -- in tiny.lst -------------------------------------------------- function createProjects_mame_tiny(_target, _subtarget) project ("mame_tiny") targetsubdir(_target .."_" .. _subtarget) kind (LIBTYPE) uuid (os.uuid("drv-mame-tiny")) addprojectflags() precompiledheaders() includedirs { MAME_DIR .. "src/osd", MAME_DIR .. "src/emu", MAME_DIR .. "src/devices", MAME_DIR .. "src/mame", MAME_DIR .. "src/lib", MAME_DIR .. "src/lib/util", MAME_DIR .. "3rdparty", GEN_DIR .. "mame/layout", } files{ MAME_DIR .. "src/mame/drivers/carpolo.cpp", MAME_DIR .. "src/mame/includes/carpolo.h", MAME_DIR .. "src/mame/machine/carpolo.cpp", MAME_DIR .. "src/mame/video/carpolo.cpp", MAME_DIR .. "src/mame/drivers/circus.cpp", MAME_DIR .. "src/mame/includes/circus.h", MAME_DIR .. "src/mame/audio/circus.cpp", MAME_DIR .. "src/mame/video/circus.cpp", MAME_DIR .. "src/mame/drivers/exidy.cpp", MAME_DIR .. "src/mame/includes/exidy.h", MAME_DIR .. "src/mame/audio/exidy.cpp", MAME_DIR .. "src/mame/audio/exidy.h", MAME_DIR .. "src/mame/video/exidy.cpp", MAME_DIR .. "src/mame/audio/exidy440.cpp", MAME_DIR .. "src/mame/audio/exidy440.h", MAME_DIR .. "src/mame/drivers/starfire.cpp", MAME_DIR .. "src/mame/includes/starfire.h", MAME_DIR .. "src/mame/video/starfire.cpp", MAME_DIR .. "src/mame/drivers/vertigo.cpp", MAME_DIR .. "src/mame/includes/vertigo.h", MAME_DIR .. "src/mame/machine/vertigo.cpp", MAME_DIR .. "src/mame/video/vertigo.cpp", MAME_DIR .. "src/mame/drivers/victory.cpp", MAME_DIR .. "src/mame/includes/victory.h", MAME_DIR .. "src/mame/video/victory.cpp", MAME_DIR .. "src/mame/audio/targ.cpp", MAME_DIR .. "src/mame/drivers/astrocde.cpp", MAME_DIR .. "src/mame/includes/astrocde.h", MAME_DIR .. "src/mame/video/astrocde.cpp", MAME_DIR .. "src/mame/drivers/gridlee.cpp", MAME_DIR .. "src/mame/includes/gridlee.h", MAME_DIR .. "src/mame/audio/gridlee.cpp", MAME_DIR .. "src/mame/video/gridlee.cpp", MAME_DIR .. "src/mame/drivers/williams.cpp", MAME_DIR .. "src/mame/includes/williams.h", MAME_DIR .. "src/mame/machine/williams.cpp", MAME_DIR .. "src/mame/audio/williams.cpp", MAME_DIR .. "src/mame/audio/williams.h", MAME_DIR .. "src/mame/video/williams.cpp", MAME_DIR .. "src/mame/drivers/gaelco.cpp", MAME_DIR .. "src/mame/includes/gaelco.h", MAME_DIR .. "src/mame/video/gaelco.cpp", MAME_DIR .. "src/mame/machine/gaelcrpt.cpp", MAME_DIR .. "src/mame/drivers/wrally.cpp", MAME_DIR .. "src/mame/includes/wrally.h", MAME_DIR .. "src/mame/machine/wrally.cpp", MAME_DIR .. "src/mame/video/wrally.cpp", MAME_DIR .. "src/mame/machine/gaelco_ds5002fp.cpp", MAME_DIR .. "src/mame/machine/gaelco_ds5002fp.h", MAME_DIR .. "src/mame/drivers/looping.cpp", MAME_DIR .. "src/mame/drivers/supertnk.cpp", } end function linkProjects_mame_tiny(_target, _subtarget) links { "mame_tiny", } end
require("php/phpCmd"); require("hall/php/phpManager"); local getIndex = function(self) return PhpManager.getInstance():getPhpCmdValue(); end PHP_CORE_LOGIN = PHP_CMD_CONSTANT + 0x0001;---!!!此处必须为0x01,server会去理解此cmd PHP_UPDATE_USERINFO = getIndex(); --用户信息更新 PHP_NOTICE = getIndex(); PHP_MODIFY_PWD = getIndex(); PHP_USER_INFO_REWARD = getIndex(); PHP_REWARD_CONFIG = getIndex(); PHP_REWARD_MONEY = getIndex(); PHP_ACTIVITY_LISTS = getIndex(); PHP_ACTIVITY_NUMBER = getIndex(); PHP_GET_RANK_LIST = getIndex();--获取排行列表 PHP_GET_RANK_INFO = getIndex();--获取某个用户排行信息 PHP_GET_RANK_TAB = getIndex(); --获取排行榜tab PHP_CORE_INIT = getIndex();--登录初始化接口 PHP_UPDATE = getIndex();--APK升级 PHP_KEEPALIVE = getIndex();--保持会话????? PHP_LOGIN_sendResetToken= getIndex(); --重置token下发 PHP_LOGIN_resetPwd= getIndex(); --通行证手机|邮箱账号重置密码 PHP_LOGIN_checkReg= getIndex(); --检查是否绑定手机 PHP_LOGIN_LOGIC_checkReg = getIndex(); --检查是否绑定手机LoginLogic PHP_LOGIN_bindPhone= getIndex(); --通行证手机绑定 PHP_GET_MSGCODE = getIndex(); --获取运营商号码 PHP_MSGUPCHECK= getIndex(); --短信上行检测接口 PHP_LEVEL_PLAYER_NUM = getIndex(); --短信上行检测接口 PHP_SEND_GETUI_ID = getIndex();--上报个推id PHP_REGISTER_GETCODE = getIndex();--获取注册验证码 PHP_REGISTER_GETCODE_BY_VOICE = getIndex(); --语音验证获取注册验证码 PHP_FILLINFO_CONFIG = getIndex(); --首次设置资料奖励配置 PHP_REGISTER_FILLINFO = getIndex(); --首次设置资料奖励领取 PHP_UPDATE_SAFEBOX = getIndex(); --更新保险箱 PHP_GET_SAFEBOX_CONFIG = getIndex(); --获取保险箱配置 PHP_GET_MESSAGE = getIndex(); --获取消息 PHP_READ_MESSAGE = getIndex(); --阅读消息 PHP_Radio_List = getIndex(); --广播列表 PHP_Radio_Send = getIndex(); --发布广播 PHP_TASK_GETWEICHATINFO = getIndex(); -- 获取微信分享中的内容(标题、链接、主题文字) PHP_DAY_MISSION_GET_LIST = getIndex(); --获取每日任务列表 PHP_DAY_MISSION_GET_REWARD = getIndex(); --获取每日任务奖励 PHP_DAY_MISSION_SEND_SHARE_FLAG = getIndex(); --每日任务发送分享标识 PHP_GET_USERINFO = getIndex(); PHP_HALL_BOTTOM_BUTTON = getIndex(); PHP_clientMessages = getIndex(); ---社交 PHP_FRIENDS_AD = getIndex(); --获取社交广告 PHP_NEWS_DEL = getIndex(); PHP_FRIENDS_SEND_MSG = getIndex();--发送消息 PHP_RANK_AWARD_PERMSG = getIndex(); --排行榜填写领奖信息 PHP_USER_GETAWARDS = getIndex(); ---私信获取奖励 PHP_SIGNINAWARD_SIGNININFO = getIndex(); --新版签到 PHP_SIGININAWARD_SIGININ = getIndex();---新版获取签到奖励 PHP_SIGNINAWARD_GETSIGNINCALENDAR = getIndex(); --获取签到日历 PHP_AGENCY_CONFIG = getIndex();--代理商系统配置信息 ---------------------------------------------------------------------------------------- PHP_LEVEL_MEDEL_CONFIG = getIndex(); --等级信息列表 PHP_GAME_LEVEL_LIST = getIndex(); --房间列表新接口 PHP_GAME_LEVEL_COUNT = getIndex(); --房间列表人数 PHP_HALL_GAME_PLAYER_NUM = getIndex(); --大厅获取各游戏人数 PHP_HALLVIEW_CONFIG = getIndex();--大厅配置 PHP_HALLVIEW_CONFIG_SORT = getIndex(); -- 大厅游戏位列表 PHP_MODULELIST_CONFIG = getIndex();--大厅支持的模块的配置 PHP_MOREGAMES_UPDATEINSTALL = getIndex();--用户安装的游戏更新 ----------------------------------------------------------------------------------------- PHP_VIPPROPS = getIndex(); -- VIP特权 PHP_MALL_VIP_AD = getIndex(); ---商城底部广告条 PHP_DEGRADE_GET_GOODS_BY_MONEY_DIS = getIndex();-- PHP_SHOP_DIAMOND_BUY = getIndex(); --钻石商品购买 PHP_SHOP_DIAMOND_RECORD = getIndex(); --钻石购买记录 --diamond.dmdinit,diamond.dmdtabgoods PHP_DIAMOND_DMDINIT = getIndex(); --新版兑换商城,获取配置 PHP_DIAMOND_DMDTABGOODS = getIndex();--获取钻石商品tab中的详细信息 PHP_SEND_PAYMENT_ORDER = getIndex(); --IOS支付获取orderID PHP_SEND_PAY_ORDER = getIndex(); --IOS支付回调支付中心 PHP_GAME_PLAY_INFO = getIndex(); --请求php获取用户某个游戏的信息 PHP_ROOM_PAY_SEND_ORDER = getIndex();--请求上报订单信息 PHP_IOS_SWITCH_3RDPay = getIndex(); -- IOS第三方支付开关 PHP_GOODS_INFO = getIndex();--支付列表统一接口 PHP_MARKET_TABS = getIndex();--商城Tab配置 PHP_PROPS_INFO = getIndex(); --请求自己的道具信息 PHP_BUY_MALL_PROP = getIndex(); --请求自己的道具信息 PHP_GET_MESSAGE_NUM = getIndex(); --获取消息数量 -----------------------------私人房 --------------------------------------- PHP_PRIVATE_ROOM_CONFIG = getIndex(); --可建私人房的游戏列表 PHP_PRIVATE_ROOM_RECORD_LIST = getIndex(); -- 约牌记录列表 PHP_PRIVATE_ROOM_RECORD_DETAIL = getIndex(); -- 约牌记录详情 -----------------------------比赛相关 --------------------------------------- PHP_SHARE_TEMPLE = getIndex(); ---获取分享主题模板 PHP_REQUEST_MATCH_LIST = getIndex(); PHP_REQUEST_MATCH_DETAIL = getIndex(); --获取某个比赛奖励,描述信息 PHP_REQUEST_MATCH_BASIC = getIndex(); --获取某个比赛的完整信息,不包括奖励 PHP_GET_NEXT_LOOP_MATCH = getIndex(); --获取循环赛信息 PHP_REQUEST_MATCH_TAG_LIST = getIndex(); -- 比赛标签列表 PHP_MATCH_RECORD_STATISTICS = getIndex(); -- 比赛战绩统计 PHP_MATCH_RECORD_MATCH_LIST = getIndex(); -- 比赛历史战绩 PHP_MATCH_RECORD_REWARD_STATISTICS = getIndex(); -- 比赛奖励统计 PHP_MATCH_RECORD_MASTER_RANK_LIST = getIndex(); -- 比赛大师分排行 -----------------------------比赛相关 end------------------------------------ PHP_USE_PROPS = getIndex(); PHP_BAG_PROP_INFO = getIndex(); --获取背包内道具列表 PHP_BAG_PROP_ABANDON = getIndex(); --丢弃背包内道具 -----------------------------统一支付------------------------------------- PHP_GET_PMODECONFIG = getIndex(); PHP_SEND_VALIDATE = getIndex(); PHP_SEND_PAYMENT_ORDER_TEST = getIndex(); --联运下单 PHP_CRYSTAL_BUY_GOODS = getIndex(); --用金条购买商品 PHP_NEW_GOODS_BASE = getIndex(); --物品配置 PHP_GOODS_DETAIL_INFO = getIndex(); ------------------------------摇摇乐模块-------------------------------------- PHP_SLOT_MACHINE_SWITCH = getIndex(); --获取老虎机开关配置 PHP_SLOT_MACHINE_CONFIG = getIndex(); --获取老虎机配置 PHP_SLOT_MACHINE_REWARD = getIndex(); --老虎机抽奖 PHP_SLOT_MACHINE_RECORD = getIndex(); --获取老虎机抽奖记录 PHP_SLOT_MACHINE_GAME_SWITCH = getIndex(); --获取小游戏开关配置 ------------------------------IOS、ANDROID 审核过滤---------------------------- PHP_IOS_FILTER_OPEN = getIndex(); --ios审核过滤开关 PHP_ANDROID_FILTER_OPEN = getIndex(); -- android 审核过滤开关 ------------------------------举报---------------------------- PHP_REPORT_PLAYER = getIndex(); -- 举报 -----------------------------商城广告------------------------- PHP_MARKET_TABS_AD = getIndex(); -- 商城广告 PHP_REPORT_GAME_VERSION = getIndex(); --子游戏版本号上报 PHP_ROOM_GET_GAME_BG = getIndex(); --房间背景桌布等配置 ----------------------------- 银元场 ------------------------------------- PHP_REQUEST_SILVER_DATA = getIndex(); --------------------------社交短信邀请好友注册--------------------------------------- PHP_SMS_INVITE_FRIEND = getIndex(); PHP_GET_EXTERNAL_IMDOMAIN = getIndex(); --------------------------------口令------------------------------- PHP_PASSWORD_PUSH_INFO = getIndex(); -- 获取口令 PHP_PASSWORD_POP_INFO = getIndex(); -- 获取口令数据 PHP_SMS_INVITE_FRIEND_LIST = getIndex(); ------------------------------新背包模块---------------------------- PHP_PACKAGE_BAGLIST = getIndex(); -- 拉取背包列表 PHP_PACKAGE_USE = getIndex(); -- 合成,使用,丢弃等功能都用这个接口 PHP_PACKAGE_SELL = getIndex(); -- 回兑 PHP_PACKAGE_RECORD = getIndex(); -- 拉取兑换历史记录 PHP_SCAN_SHANGJIA = getIndex(); -- 扫描线下商家二维码 PHP_EXCHANGE_APPLY = getIndex(); -- 线下商家兑换申请 PHP_PACKAGE_REFRESH_PROP= getIndex(); -- 根据物品ID获取玩家对应的该物品信息 PHP_GET_FLOATBALL_CONFIG = getIndex(); --拉取浮动球配置信息 PHP_HOLIDAYS_BG = getIndex(); -- 获取节假日特色背景图 PHP_BINDATOM = getIndex(); -- 代理商V2.0-客户端扫码绑定代理商 ------------------------------金条兑换------------------------------ PHP_GOLDBAR_CONFIG = getIndex(); -- 获取金条兑换的配置 PHP_GOLDBAR_EXCHANGE = getIndex(); -- 兑换金条 ------------------------------红包------------------------------ PHP_REDENVELOPE_CONFIG = getIndex(); -- 红包配置 PHP_REDENVELOPE_SEND = getIndex(); -- 发红包 PHP_REDENVELOPE_SEND_LIST = getIndex(); -- 发红包列表 PHP_REDENVELOPE_DETAIL = getIndex(); -- 红包领取详情 -----------------------猜拳模块-------------------------- PHP_MORA_GAME_SWITCH = getIndex(); --获取猜拳开关配置 PHP_MORA_GAME_CONFIG = getIndex(); --获取猜拳配置 PHP_MORA_GAME_REWARD = getIndex(); --猜拳结果 PHP_MORA_GAME_RECORD = getIndex(); --猜拳记录 ------------------------------邀请赛------------------------------ PHP_INVITATIONAL_SELECT_CONFIG = getIndex(); --创建比赛参数选项配置 PHP_INVITATIONAL_RULES_CONTENT = getIndex(); --获取比赛规则内容 PHP_INVITATIONAL_AWARD_FORMULA = getIndex(); --奖圈对应奖金分配公式 PHP_INVITATIONAL_MATCH_MIN_PLAYERS = getIndex(); --比赛创建界面最低参赛人数选项 PHP_INVITATIONAL_MY_APPLY_LISTS = getIndex(); --我报名的列表 PHP_INVITATIONAL_QCODEURL = getIndex(); --邀请好友二维码地址 PHP_INVITATIONAL_AWARDRANK = getIndex(); --完整排名 HallPhpCmdMap = { [PHP_CORE_LOGIN] = "core.login"; [PHP_UPDATE] = "system.update"; [PHP_HALLVIEW_CONFIG] = "system.gamesposCfg"; [PHP_HALLVIEW_CONFIG_SORT] = "system.gamesposIds"; [PHP_MODULELIST_CONFIG] = "system.modules"; [PHP_MOREGAMES_UPDATEINSTALL] = "system.updateinstalled"; [PHP_LEVEL_MEDEL_CONFIG] = "core.getLevelConfig"; [PHP_REWARD_CONFIG] = "dailyloginaward.config"; [PHP_NOTICE] = "notices.getList"; [PHP_REWARD_MONEY] = "dailyloginaward.get"; [PHP_UPDATE_USERINFO] = "user.setuinfo"; [PHP_GET_USERINFO] = "user.getuinfo"; [PHP_SEND_PAYMENT_ORDER] = "order.create"; [PHP_SEND_PAYMENT_ORDER_TEST] = "order.auditCreate"; [PHP_SEND_PAY_ORDER] = "order.repost"; [PHP_ACTIVITY_LISTS] = "activity.url"; [PHP_SEND_VALIDATE] = "order.validate"; [PHP_ACTIVITY_NUMBER] = "activity.number"; [PHP_TASK_GETWEICHATINFO] = "tasks.getsharetopic"; [PHP_GET_RANK_LIST] = "rank.getranklist"; [PHP_GET_RANK_INFO] = "rank.getrank"; [PHP_GET_RANK_TAB] = "rank.tabs"; [PHP_CORE_INIT] = "core.init"; [PHP_DEGRADE_GET_GOODS_BY_MONEY_DIS] = "mall.payback"; [PHP_KEEPALIVE] = "user.keepalive"; [PHP_GAME_PLAY_INFO] = "user.playinfo"; [PHP_ROOM_PAY_SEND_ORDER] = "order.creat_order_stat"; [PHP_GET_MSGCODE] = "system.msgcode"; [PHP_MSGUPCHECK] = "system.msgupcheck"; [PHP_LOGIN_sendResetToken] = "passport.sendResetToken"; [PHP_LOGIN_resetPwd] = "passport.resetPwd"; [PHP_LOGIN_checkReg] = "passport.checkReg"; [PHP_LOGIN_LOGIC_checkReg] = "passport.checkReg"; [PHP_REGISTER_GETCODE] = "passport.regToken"; [PHP_REGISTER_GETCODE_BY_VOICE] = "passport.voiceToken"; [PHP_LOGIN_bindPhone] = "passport.reg"; [PHP_LEVEL_PLAYER_NUM] ="system.statLevelPlayersByGame"; [PHP_SEND_GETUI_ID] = "user.setPushToken"; [PHP_FILLINFO_CONFIG] = "user.awardSetUinfoCfg"; [PHP_REGISTER_FILLINFO] = "user.awardSetUinfo"; [PHP_UPDATE_SAFEBOX] = "user.updatesafebox"; [PHP_GET_SAFEBOX_CONFIG] = "system.safeboxConfig"; [PHP_GET_MESSAGE] = "message.getMess"; [PHP_READ_MESSAGE] = "message.readNewMessage"; [PHP_Radio_List] = "broadcast.getlist"; [PHP_Radio_Send] = "broadcast.send"; [PHP_SHOP_DIAMOND_BUY] = "diamond.buy"; [PHP_SHOP_DIAMOND_RECORD] = "diamond.record"; [PHP_GAME_LEVEL_LIST] = "system.getLevelInfoByGameV2"; --system.getLevelPlayersByGame(注释掉的以后不用了) [PHP_GAME_LEVEL_COUNT] = "system.getLevelCnt"; [PHP_HALL_GAME_PLAYER_NUM] = "system.statPlayersByGame"; [PHP_DAY_MISSION_GET_LIST] = "mission.getList"; [PHP_DAY_MISSION_GET_REWARD] = "mission.finish"; [PHP_DAY_MISSION_SEND_SHARE_FLAG] = "mission.setShareFlagNew"; [PHP_HALL_BOTTOM_BUTTON] = "system.getclienttoolbar"; [PHP_clientMessages] = "lang.clientMessages"; [PHP_NEWS_DEL] = "news.del"; [PHP_FRIENDS_SEND_MSG] = "chat.send"; [PHP_VIPPROPS] = "shop.vipprops"; [PHP_IOS_SWITCH_3RDPay] = "shop.switch3rdpay"; [PHP_RANK_AWARD_PERMSG] = "match.address"; [PHP_USER_GETAWARDS] = "user.getnewawards"; [PHP_DIAMOND_DMDINIT] = "diamond.dmdtabs"; --新版兑换商城,获取配置 [PHP_DIAMOND_DMDTABGOODS] = "diamond.dmdtabgoods";--获取钻石商品tab中的详细信息 [PHP_MALL_VIP_AD] = "shop.vipadv";--商城底部广告 [PHP_GOODS_INFO] = "shop.info"; [PHP_MARKET_TABS] = "shop.tabcfg"; [PHP_CRYSTAL_BUY_GOODS] = "crystal.buy"; [PHP_SIGNINAWARD_SIGNININFO] ="signinaward.getSigninInfos"; [PHP_SIGININAWARD_SIGININ] ="signinaward.signin"; [PHP_SIGNINAWARD_GETSIGNINCALENDAR] = "signinaward.getSigninCalendar"; [PHP_PROPS_INFO] = "props.propsCoreInfo"; [PHP_BUY_MALL_PROP] = "shop.props"; [PHP_NEW_GOODS_BASE] = "shop.getgoodsbase"; [PHP_GOODS_DETAIL_INFO] = "shop.goodsbasedetail"; [PHP_GET_MESSAGE_NUM] = "message.getMessageNum"; [PHP_SHARE_TEMPLE] = "mission.getShareTopicList";--获取分享主题模板 [PHP_REQUEST_MATCH_LIST] = "match.lists"; -- php请求比赛列表 since 15/10/26 [PHP_REQUEST_MATCH_DETAIL] = "match.detail"; -- [PHP_REQUEST_MATCH_BASIC] = "match.basic"; -- [PHP_AGENCY_CONFIG] = "agent.agentConfig"; [PHP_BAG_PROP_ABANDON] = "bag.abandon"; [PHP_BAG_PROP_INFO] = "bag.info"; [PHP_USE_PROPS] = "props.consume"; -- 请求使用房间道具 [PHP_GET_PMODECONFIG] = "shop.pmodeCfg"; [PHP_SLOT_MACHINE_SWITCH] = "slot.getSwitch"; [PHP_SLOT_MACHINE_CONFIG] = "slot.getConfig"; [PHP_SLOT_MACHINE_REWARD] = "slot.setDraw"; [PHP_SLOT_MACHINE_RECORD] = "slot.getHistory"; [PHP_SLOT_MACHINE_GAME_SWITCH] = "slot.getGameSwitch"; [PHP_IOS_FILTER_OPEN] = "system.iosFilterOpen"; [PHP_ANDROID_FILTER_OPEN] = "system.andriodFilterOpen"; [PHP_REPORT_PLAYER] = "jubao.setData"; --举报 [PHP_MARKET_TABS_AD] = "goodsdocument.getData"; -- 商城广告 [PHP_REPORT_GAME_VERSION] = "system.saveGameVer"; [PHP_ROOM_GET_GAME_BG] = "system.getGameBg"; [PHP_REQUEST_SILVER_DATA] = "silver.show"; -- 银元场任务 [PHP_GET_EXTERNAL_IMDOMAIN] = "externals.getImdomain"; [PHP_SMS_INVITE_FRIEND] = "friends.sendInviteMsg"; [PHP_FRIENDS_AD] = "friends.ad"; [PHP_PASSWORD_PUSH_INFO] = "command.generate"; [PHP_PASSWORD_POP_INFO] = "command.get"; [PHP_SMS_INVITE_FRIEND_LIST] = "friends.tokenInviteMsg"; [PHP_PACKAGE_BAGLIST] = "bag.boxlist"; [PHP_PACKAGE_USE] = "bag.boxuse"; [PHP_PACKAGE_SELL] = "bag.reverse"; [PHP_PACKAGE_RECORD] = "bag.boxRecord"; [PHP_SCAN_SHANGJIA] = "bag.scanShangjiaGoods"; [PHP_EXCHANGE_APPLY] = "bag.exchangeApply"; [PHP_PACKAGE_REFRESH_PROP] = "bag.getboxItemIDsInfo"; [PHP_GET_NEXT_LOOP_MATCH] = "match.getnextloopmatch"; [PHP_GET_FLOATBALL_CONFIG] = "system.getAssistiveBallCfg"; [PHP_REQUEST_MATCH_TAG_LIST] = "match.taglist"; [PHP_HOLIDAYS_BG] = "system.getHolidaysBg"; [PHP_MATCH_RECORD_STATISTICS] = "user.matchstats"; [PHP_MATCH_RECORD_MATCH_LIST] = "user.matchrecord"; [PHP_MATCH_RECORD_REWARD_STATISTICS] = "user.awardsstat"; [PHP_MATCH_RECORD_MASTER_RANK_LIST] = "friends.getMasterRank"; [PHP_BINDATOM] = "agent.binda2m"; [PHP_GOLDBAR_CONFIG] = "crystal.moneyExchangeConfig"; [PHP_GOLDBAR_EXCHANGE] = "crystal.moneyExchange"; [PHP_PRIVATE_ROOM_CONFIG] = "system.privateroom"; [PHP_PRIVATE_ROOM_RECORD_LIST] = "privateroom.records"; [PHP_PRIVATE_ROOM_RECORD_DETAIL] = "privateroom.detail"; [PHP_REDENVELOPE_CONFIG] = "lucky.getLuckyConf"; [PHP_REDENVELOPE_SEND] = "lucky.shareLuckyMoney"; [PHP_REDENVELOPE_SEND_LIST] = "lucky.shareLuckyList"; [PHP_REDENVELOPE_DETAIL] = "lucky.getLuckyDetail"; [PHP_MORA_GAME_SWITCH] = "morra.getSwitch"; [PHP_MORA_GAME_CONFIG] = "morra.getConfig"; [PHP_MORA_GAME_REWARD] = "morra.setDraw"; [PHP_MORA_GAME_RECORD] = "morra.getHistory"; [PHP_INVITATIONAL_SELECT_CONFIG] = "matchinvite.getSelectConfig"; [PHP_INVITATIONAL_RULES_CONTENT] = "matchinvite.getRulesContent"; [PHP_INVITATIONAL_AWARD_FORMULA] = "matchinvite.getAwardFormula"; [PHP_INVITATIONAL_MATCH_MIN_PLAYERS] = "matchinvite.getInMatchNum"; [PHP_INVITATIONAL_MY_APPLY_LISTS] = "matchinvite.myApplyLists"; [PHP_INVITATIONAL_QCODEURL] = "matchinvite.inviteQcodeUrl"; [PHP_INVITATIONAL_AWARDRANK] = "matchinvite.awardRank"; }; PhpSocketCmdMap = CombineTables(PhpSocketCmdMap or {}, HallPhpCmdMap or {});
local VARS = {} if not _ANA then return -- isTmp=false for all vars end F = { Dcl_var_pre = function (me) local var = me.var if var.pre~='var' or var.cls or var.inTop then return -- only normal vars can be tmp end VARS[var] = true var.isTmp = true end, Var = function (me) local var = me.var if _AST.iter'Thread'() then return -- all threads vars are "tmp" end if _AST.iter'Dcl_fun'() then return -- all function vars are "tmp" end if var.pre~='var' or var.cls then var.isTmp = false return -- only normal vars can be tmp end --[[ -- var int i; -- var T[2] t with -- i = i + 1; // "i" cannot be tmp -- end; --]] local constr = _AST.par(me, 'Dcl_constr') if constr and (var.blk.__depth < constr.__depth) then local org = _AST.par(me, 'Dcl_var') if org then local _, _, arr = unpack(org) if arr then var.isTmp = false end end end local glb = _ENV.clss.Global if var.inTop or (var.blk==_ENV.clss.Main.blk_ifc and glb and glb.is_ifc and glb.blk_ifc.vars[var.id]) then var.isTmp = false return -- vars in interfaces cannot be tmp end local dcl = _AST.iter'Dcl_var'() if dcl and dcl[1]==var.id then return -- my declaration is not an access end if me.__par.tag == 'SetBlock' then return -- set is performed on respective `return´ end local v = VARS[var] local op = _AST.iter'Op1_&'() local isRef = op and (op.ref == me) if _AST.iter'Finally'() or -- finally executes through "call" _AST.iter'AwaitInt'() or -- await ptr:a (ptr is tested on awake) isRef or -- reference may escape var.arr -- array may escape: TODO conservative -- (arrays as parameters) then var.isTmp = false VARS[var] = nil return end if v == true then VARS[var] = me.ana.pre return -- first access end if not (v and _ANA.CMP(v,me.ana.pre)) then var.isTmp = false -- found a Par or Await in the path return end end, EmitInt = function (me) VARS = {} -- NO: run in different ceu_call end, New = function (me) VARS = {} -- NO: start organism end, Spawn = 'New', Loop_pre = function (me) local awaits = false _AST.visit( { AwaitT = function (me) awaits = true end, AwaitInt = 'AwaitT', AwaitExt = 'AwaitT', AwaitN = 'AwaitT', AwaitS = 'AwaitT', EmitInt = 'AwaitT', Async = 'AwaitT', Thread = 'AwaitT', New = 'AwaitT', Spawn = 'AwaitT', }, me) if ((not awaits) and (not _AST.iter(_AST.pred_async)())) or me.isAwaitUntil then return -- OK: (tight loop outside Async) or (await ... until) end VARS = {} -- NO: loop in between Dcl/Accs is dangerous --[[ -- x is on the stack but may be written in two diff reactions -- a non-ceu code can reuse the stack in between input int E; var int x; loop do var int tmp = await E; if tmp == 0 then break; end x = tmp; end return x; ]] end, --[[ ]] ParOr_pre = function (me) for var, v in pairs(VARS) do if v ~= true then VARS[var] = nil -- remove previously accessed vars end end end, ParAnd_pre = 'ParOr_pre', ParEver_pre = 'ParOr_pre', ParOr = 'ParOr_pre', ParAnd = 'ParOr_pre', ParEver = 'ParOr_pre', -- TODO: should pre's be already different? Async_pre = 'ParOr_pre', Async = 'ParOr_pre', } _AST.visit(F)
object_tangible_loot_creature_loot_collections_col_meatlump_rank_01 = object_tangible_loot_creature_loot_collections_shared_col_meatlump_rank_01:new { } ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_col_meatlump_rank_01, "object/tangible/loot/creature/loot/collections/col_meatlump_rank_01.iff")
-- Gemeinschaft 5 module: log -- (c) AMOOMA GmbH 2012-2013 -- module(...,package.seeall) Log = {} -- Create logger object function Log.new(self, arg) arg = arg or {} object = arg.object or {} setmetatable(object, self); self.__index = self; self.disabled = arg.disabled or false; self.buffer = arg.buffer; self.prefix = arg.prefix or '### '; self.level_console = arg.level_console or 0; self.level_alert = arg.level_alert or 1; self.level_critical = arg.level_critical or 2; self.level_error = arg.level_error or 3; self.level_warning = arg.level_warning or 4; self.level_notice = arg.level_notice or 5; self.level_info = arg.level_info or 6; self.level_debug = arg.level_debug or 7; self.level_devel = arg.level_devel or 4; return object; end function Log.message(self, log_level, message_arguments ) if self.disabled then return end local message = tostring(self.prefix); for index, value in pairs(message_arguments) do if type(index) == 'number' then if type(value) == 'table' then require 'common.array'; message = message .. common.array.to_json(value, 3); else message = message .. tostring(value); end end end if self.buffer then table.insert(self.buffer, message); elseif freeswitch then freeswitch.consoleLog(log_level, message .. '\n'); end end function Log.console(self, ...) self:message(self.level_console, {...}); end function Log.alert(self, ...) self:message(self.level_alert, {...}); end function Log.critical(self, ...) self:message(self.level_critical, {...}); end function Log.error(self, ...) self:message(self.level_error, {...}); end function Log.warning(self, ...) self:message(self.level_warning, {...}); end function Log.notice(self, ...) self:message(self.level_notice, {...}); end function Log.info(self, ...) self:message(self.level_info, {...}); end function Log.debug(self, ...) self:message(self.level_debug, {...}); end function Log.devel(self, ...) local arguments = {...}; table.insert(arguments, 1, '**'); self:message(self.level_devel, arguments); end
--[[ entry structure { r = number, g = number, b = number, a = number, entity = entity } ]] --locals local render_target_art = render.GetScreenEffectTexture(0) local render_target_outline = render.GetScreenEffectTexture(1) --render parameters local blip_period = 2 local outline_scale = 4 local outline_step = 1 local outline_min = -outline_scale local outline_max = outline_scale --materials local material_art = CreateMaterial("pyrition/outline_blip/art", "UnlitGeneric", { ["$basetexture"] = render_target_art:GetName(), ["$vertexalpha"] = 1, ["$vertexcolor"] = 1, ["$translucent"] = 1 }) local material_outline = CreateMaterial("pyrition/outline_blip/outline", "UnlitGeneric", { ["$basetexture"] = render_target_outline:GetName(), ["$vertexalpha"] = 1, ["$vertexcolor"] = 1, ["$translucent"] = 1 }) ----localized functions local entity_meta = FindMetaTable("Entity") local fl_cam_End2D = cam.End2D local fl_cam_End3D = cam.End3D local fl_cam_Start2D = cam.Start2D local fl_cam_Start3D = cam.Start3D local fl_Entity_DrawModel = entity_meta.DrawModel local fl_Entity_GetNoDraw = entity_meta.GetNoDraw local fl_render_Clear = render.Clear local fl_render_PopFilterMag = render.PopFilterMag local fl_render_PopFilterMin = render.PopFilterMin local fl_render_PopRenderTarget = render.PopRenderTarget local fl_render_PushFilterMag = render.PushFilterMag local fl_render_PushFilterMin = render.PushFilterMin local fl_render_PushRenderTarget = render.PushRenderTarget local fl_render_SetStencilEnable = render.SetStencilEnable local fl_render_SetStencilCompareFunction = render.SetStencilCompareFunction local fl_render_SetStencilFailOperation = render.SetStencilFailOperation local fl_render_SetStencilPassOperation = render.SetStencilPassOperation local fl_render_SetStencilReferenceValue = render.SetStencilReferenceValue local fl_render_SetStencilTestMask = render.SetStencilTestMask local fl_render_SetStencilWriteMask = render.SetStencilWriteMask local fl_render_SetStencilZFailOperation = render.SetStencilZFailOperation local fl_render_SuppressEngineLighting = render.SuppressEngineLighting local fl_surface_DrawRect = surface.DrawRect local fl_surface_DrawTexturedRect = surface.DrawTexturedRect local fl_surface_SetDrawColor = surface.SetDrawColor local fl_surface_SetMaterial = surface.SetMaterial -- local function draw_blip(entity, r, g, b, a, real_time, scr_w, scr_h, blip_modulo, blip_alpha, blip_modulo_scale) --anti alias is making this shit draw dark edges which looks gross and weird, so we disable it fl_render_PushFilterMag(TEXFILTER.POINT) fl_render_PushFilterMin(TEXFILTER.POINT) --we need stencils, and we won't need lighting fl_render_SetStencilEnable(true) fl_render_SuppressEngineLighting(true) --this draws a colored shape of the model fl_render_PushRenderTarget(render_target_art) fl_render_Clear(0, 0, 0, 0, true, true) --write 1 to the stencil buffer where the model is --we purposely fail so the model isn't rendered fl_cam_Start3D() fl_render_SetStencilCompareFunction(STENCIL_NEVER) fl_render_SetStencilFailOperation(STENCIL_REPLACE) fl_render_SetStencilPassOperation(STENCIL_KEEP) fl_render_SetStencilReferenceValue(1) fl_render_SetStencilTestMask(0xFF) fl_render_SetStencilWriteMask(0xFF) fl_render_SetStencilZFailOperation(STENCIL_KEEP) fl_Entity_DrawModel(entity) fl_cam_End3D() --draw a white rect over the entire screen where the stencil is equal to 1 fl_cam_Start2D() fl_render_SetStencilCompareFunction(STENCIL_EQUAL) fl_render_SetStencilFailOperation(STENCIL_KEEP) fl_surface_SetDrawColor(255, 255, 255) fl_surface_DrawRect(0, 0, scr_w, scr_h) fl_cam_End2D() fl_render_PopRenderTarget() --this draws an outline with that shape fl_render_PushRenderTarget(render_target_outline) fl_render_Clear(255, 0, 0, 0, true, true) --fail to draw the model and write to the stencil buffer fl_cam_Start3D() fl_render_SetStencilCompareFunction(STENCIL_NEVER) fl_render_SetStencilFailOperation(STENCIL_REPLACE) fl_render_SetStencilPassOperation(STENCIL_KEEP) fl_render_SetStencilReferenceValue(1) fl_render_SetStencilTestMask(0xFF) fl_render_SetStencilWriteMask(0xFF) fl_render_SetStencilZFailOperation(STENCIL_KEEP) fl_Entity_DrawModel(entity) fl_cam_End3D() --draw the shape in several offsetted positions, but not where the stencil buffer is 1 fl_cam_Start2D() --if the compare function does not pass, it will not render what you attempt to draw --by setting the fail operation to replace and purposefully faliling to draw the pixels of the model we can write to the stencil buffer without actually drawing the model fl_render_SetStencilCompareFunction(STENCIL_NOTEQUAL) fl_surface_SetDrawColor(255, 255, 255, 255) fl_surface_SetMaterial(material_art) for x = outline_min, outline_max, outline_step do local x_zero = x == 0 for y = outline_min, outline_max, outline_step do if x_zero and y == 0 then continue end fl_surface_DrawTexturedRect(x, y, scr_w, scr_h) end end fl_cam_End2D() fl_render_PopRenderTarget() --we're done with the stencil fl_render_SetStencilEnable(false) fl_render_SuppressEngineLighting(false) --this draws the outline we made with different translations fl_cam_Start2D() local blip_w, blip_h = scr_w * blip_modulo_scale, scr_h * blip_modulo_scale --draw the outline fl_surface_SetDrawColor(r, g, b, a) fl_surface_SetMaterial(material_outline) fl_surface_DrawTexturedRect(0, 0, scr_w, scr_h) --draw the scaled blipping outline fl_surface_SetDrawColor(r, g, b, blip_alpha * a) fl_surface_DrawTexturedRect((scr_w - blip_w) * 0.5, (scr_h - blip_h) * 0.5, blip_w, blip_h) fl_cam_End2D() fl_render_PopFilterMag() fl_render_PopFilterMin() end --hooks hook.Add("PostDrawEffects", "PyritionGFXOutlineBlip", function() local entities = PYRITION.GFX.BlipOutline local real_time = RealTime() local scr_w, scr_h = ScrW(), ScrH() local blip_modulo = (real_time / blip_period) % 1 local blip_module_alpha = 1 - blip_modulo local blip_modulo_scale = blip_modulo ^ 0.9 * 0.2 + 1 for index, data in ipairs(entities) do local entity = data.entity if IsValid(entity) then if fl_Entity_GetNoDraw(entity) then continue end draw_blip(entity, data.r, data.g, data.b, data.a, real_time, scr_w, scr_h, blip_modulo, blip_module_alpha, blip_modulo_scale) end end end)
local backend = {} local response = require 'http_ng.response' local METHODS = { ["GET"] = ngx.HTTP_GET, ["HEAD"] = ngx.HTTP_HEAD, ["PATCH"] = ngx.HTTP_PATCH, ["PUT"] = ngx.HTTP_PUT, ["POST"] = ngx.HTTP_POST, ["DELETE"] = ngx.HTTP_DELETE, ["OPTIONS"] = ngx.HTTP_OPTIONS } local PROXY_LOCATION = '/___http_call' backend.capture = ngx.location.capture backend.send = function(request) local res = backend.capture(PROXY_LOCATION, { method = METHODS[request.method], body = request.body, ctx = { headers = request.headers }, vars = { _url = request.url } }) if res.truncated then -- Do what? what error message it should say? end return response.new(res.status, res.header, res.body) end return backend
local class = require 'modules/oops' Ball = class { __init = function(self, x, y, width, height) self.x = x self.y = y self.width = width self.height = height self.dx = math.random(2) == 1 and -100 or 100 self.dy = math.random(-50, 50) * 1.5 end, -- Reset ball's position to the starting one reset = function(self) self.x = VIRTUAL_WIDTH/2 - 2 self.y = VIRTUAL_HEIGHT/2 - 2 self.dx = math.random(2) == 1 and -100 or 100 self.dy = math.random(-50, 50) * 1.5 end, -- Update ball's current position update = function(self, dt) self.x = self.x + self.dx * dt self.y = self.y + self.dy * dt end, -- On-screen rendering of the ball render = function(self) love.graphics.rectangle('fill', self.x, self.y, self.width, self.height) end, -- Collision check by AABB method collides = function(self, Paddle) if self.x > Paddle.x + Paddle.width or Paddle.x > self.x + self.width then return false end if self.y > Paddle.y + Paddle.height or Paddle.y > self.y + self.height then return false end return true end }
--[[ Copyright © 2017, SirEdeonX All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of xivhotbar nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SirEdeonX BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ]] local defaults = {} defaults.buttonbackgroundalpha = 150 defaults.iscompact = false defaults.iconpack = 'default' defaults.FrameSkip = 0 defaults.SkillchainIndicator = {} defaults.SkillchainIndicator.Opacity = 220 defaults.SkillchainIndicator.WindowWaitingColor = {} defaults.SkillchainIndicator.WindowWaitingColor.Red = 237 defaults.SkillchainIndicator.WindowWaitingColor.Green = 28 defaults.SkillchainIndicator.WindowWaitingColor.Blue = 36 defaults.SkillchainIndicator.WindowOpenColor = {} defaults.SkillchainIndicator.WindowOpenColor.Red = 15 defaults.SkillchainIndicator.WindowOpenColor.Green = 205 defaults.SkillchainIndicator.WindowOpenColor.Blue = 5 defaults.Hotbar = {} defaults.Hotbar.Number = 3 defaults.Hotbar.HideEmptySlots = false defaults.Hotbar.HideActionName = false defaults.Hotbar.HideActionCost = false defaults.Hotbar.HideActionElement = true defaults.Hotbar.HideRecastAnimation = false defaults.Hotbar.HideRecastText = false defaults.Hotbar.HideBattleNotice = false defaults.Controls = {} defaults.Controls.ToggleBattleMode = 43 defaults.Theme = {} defaults.Theme.BattleNotice = 'ffxiv' defaults.Theme.Slot = 'ffxiv' defaults.Theme.Frame = 'ffxiv' defaults.Style = {} defaults.Style.SlotAlpha = 100 defaults.Style.SlotSpacing = 6 defaults.Style.HotbarSpacing = 56 defaults.Style.OffsetX = 0 defaults.Style.OffsetY = 0 defaults.Color = {} defaults.Color.MpCost = {} defaults.Color.MpCost.Red = 230 defaults.Color.MpCost.Green = 91 defaults.Color.MpCost.Blue = 151 defaults.Color.TpCost = {} defaults.Color.TpCost.Red = 254 defaults.Color.TpCost.Green = 222 defaults.Color.TpCost.Blue = 0 defaults.Color.Feedback = {} defaults.Color.Feedback.Opacity = 150 defaults.Color.Feedback.Speed = 30 defaults.Color.Disabled = {} defaults.Color.Disabled.Opacity = 100 defaults.Texts = {} defaults.Texts.Font = 'sans-serif' defaults.Texts.Size = 7 defaults.Texts.OffsetX = 0 defaults.Texts.OffsetY = 0 defaults.Texts.Color = {} defaults.Texts.Color.Alpha = 255 defaults.Texts.Color.Red = 255 defaults.Texts.Color.Green = 255 defaults.Texts.Color.Blue = 255 defaults.Texts.Stroke = {} defaults.Texts.Stroke.Width = 2 defaults.Texts.Stroke.Alpha = 200 defaults.Texts.Stroke.Red = 20 defaults.Texts.Stroke.Green = 20 defaults.Texts.Stroke.Blue = 20 return defaults
-------------------- THIS CODE WILL FUCK MECHANIC JOB local LVM = createColRectangle( 1937.48, 2139.54, 40, 40 ) -- LV mechanic local LSM = createColRectangle( 1670.93, -1062.47, 20, 20 ) -- LV mechanic local SFM = createColRectangle( -1995.35, 240.06, 20, 20 ) -- LV mechanic local SFPM = createColTube( -1187.39, 24.41, 13, 20, 20 ) -- LV mechanic local LVPM = createColTube( 1532.73, 1736.07, 9, 20, 20 ) -- LV mechanic local LSPM = createColTube( 2007.49, -2447.35, 12, 20, 20 ) -- LV mechanic local zones = {LVM,LSM,SFM,SFPM,LVPM,LSPM} --[[ setTimer(function() for index,vehicle in ipairs(getElementsByType("vehicle")) do --LOOP through all Vehicles for i, zone in pairs( zones ) do if isElementWithinColShape(vehicle,zone) then if getElementHealth(vehicle) <= 255 then setElementCollisionsEnabled(vehicle, false) setElementAlpha(vehicle,150) else setElementCollisionsEnabled(vehicle, true) setElementAlpha(vehicle,250) end end end end end,5000,0) addEvent("showAbusersAtServer",true) addEventHandler("showAbusersAtServer",root,function(target,msg) outputChatBox(msg,source,255,0,0) end) function zoneExit(hitElement,matchdim) if not matchdim then return false end if hitElement and getElementType(hitElement) == "vehicle" then setElementCollisionsEnabled(hitElement, true) setElementAlpha(hitElement,250) end end for i, zone in pairs( zones ) do addEventHandler( "onColShapeLeave", zone, zoneExit ) end]] -- When a cop wants to arrest a player while robbing wat nog meer alleen de markers toch, en de int zelf pff we moeten een bankrob ik ga ff ig kijken of die mappers er zijn addEvent ( "onPlayerNightstickHit" ) addEventHandler ( "onPlayerNightstickHit", root, function ( theCop ) if ( getPlayerTeam( source ) ) then if ( getElementData ( source, "safezone" ) ) then if getPedWeapon(theCop) == 3 then cancelEvent() end end end end )
-- arm64 syscall numbers are the new architecture defaults -- so we could reuse this file for other architectures -- note that there are some name differences for new 32 bit architectures local nr = { SYS = { io_setup = 0, io_destroy = 1, io_submit = 2, io_cancel = 3, io_getevents = 4, setxattr = 5, lsetxattr = 6, fsetxattr = 7, getxattr = 8, lgetxattr = 9, fgetxattr = 10, listxattr = 11, llistxattr = 12, flistxattr = 13, removexattr = 14, lremovexattr = 15, fremovexattr = 16, getcwd = 17, lookup_dcookie = 18, eventfd2 = 19, epoll_create1 = 20, epoll_ctl = 21, epoll_pwait = 22, dup = 23, dup3 = 24, fcntl = 25, inotify_init1 = 26, inotify_add_watch = 27, inotify_rm_watch = 28, ioctl = 29, ioprio_set = 30, ioprio_get = 31, flock = 32, mknodat = 33, mkdirat = 34, unlinkat = 35, symlinkat = 36, linkat = 37, renameat = 38, umount2 = 39, mount = 40, pivot_root = 41, nfsservctl = 42, statfs = 43, fstatfs = 44, truncate = 45, ftruncate = 46, fallocate = 47, faccessat = 48, chdir = 49, fchdir = 50, chroot = 51, fchmod = 52, fchmodat = 53, fchownat = 54, fchown = 55, openat = 56, close = 57, vhangup = 58, pipe2 = 59, quotactl = 60, getdents64 = 61, lseek = 62, read = 63, write = 64, readv = 65, writev = 66, pread64 = 67, pwrite64 = 68, preadv = 69, pwritev = 70, sendfile = 71, pselect6 = 72, ppoll = 73, signalfd4 = 74, vmsplice = 75, splice = 76, tee = 77, readlinkat = 78, fstatat = 79, fstat = 80, sync = 81, fsync = 82, fdatasync = 83, sync_file_range = 84, timerfd_create = 85, timerfd_settime = 86, timerfd_gettime = 87, utimensat = 88, acct = 89, capget = 90, capset = 91, personality = 92, exit = 93, exit_group = 94, waitid = 95, set_tid_address = 96, unshare = 97, futex = 98, set_robust_list = 99, get_robust_list = 100, nanosleep = 101, getitimer = 102, setitimer = 103, kexec_load = 104, init_module = 105, delete_module = 106, timer_create = 107, timer_gettime = 108, timer_getoverrun = 109, timer_settime = 110, timer_delete = 111, clock_settime = 112, clock_gettime = 113, clock_getres = 114, clock_nanosleep = 115, syslog = 116, ptrace = 117, sched_setparam = 118, sched_setscheduler = 119, sched_getscheduler = 120, sched_getparam = 121, sched_setaffinity = 122, sched_getaffinity = 123, sched_yield = 124, sched_get_priority_max = 125, sched_get_priority_min = 126, sched_rr_get_interval = 127, restart_syscall = 128, kill = 129, tkill = 130, tgkill = 131, sigaltstack = 132, rt_sigsuspend = 133, rt_sigaction = 134, rt_sigprocmask = 135, rt_sigpending = 136, rt_sigtimedwait = 137, rt_sigqueueinfo = 138, rt_sigreturn = 139, setpriority = 140, getpriority = 141, reboot = 142, setregid = 143, setgid = 144, setreuid = 145, setuid = 146, setresuid = 147, getresuid = 148, setresgid = 149, getresgid = 150, setfsuid = 151, setfsgid = 152, times = 153, setpgid = 154, getpgid = 155, getsid = 156, setsid = 157, getgroups = 158, setgroups = 159, uname = 160, sethostname = 161, setdomainname = 162, getrlimit = 163, setrlimit = 164, getrusage = 165, umask = 166, prctl = 167, getcpu = 168, gettimeofday = 169, settimeofday = 170, adjtimex = 171, getpid = 172, getppid = 173, getuid = 174, geteuid = 175, getgid = 176, getegid = 177, gettid = 178, sysinfo = 179, mq_open = 180, mq_unlink = 181, mq_timedsend = 182, mq_timedreceive = 183, mq_notify = 184, mq_getsetattr = 185, msgget = 186, msgctl = 187, msgrcv = 188, msgsnd = 189, semget = 190, semctl = 191, semtimedop = 192, semop = 193, shmget = 194, shmctl = 195, shmat = 196, shmdt = 197, socket = 198, socketpair = 199, bind = 200, listen = 201, accept = 202, connect = 203, getsockname = 204, getpeername = 205, sendto = 206, recvfrom = 207, setsockopt = 208, getsockopt = 209, shutdown = 210, sendmsg = 211, recvmsg = 212, readahead = 213, brk = 214, munmap = 215, mremap = 216, add_key = 217, request_key = 218, keyctl = 219, clone = 220, execve = 221, mmap = 222, fadvise64 = 223, swapon = 224, swapoff = 225, mprotect = 226, msync = 227, mlock = 228, munlock = 229, mlockall = 230, munlockall = 231, mincore = 232, madvise = 233, remap_file_pages = 234, mbind = 235, get_mempolicy = 236, set_mempolicy = 237, migrate_pages = 238, move_pages = 239, rt_tgsigqueueinfo = 240, perf_event_open = 241, accept4 = 242, recvmmsg = 243, wait4 = 260, prlimit64 = 261, fanotify_init = 262, fanotify_mark = 263, name_to_handle_at = 264, open_by_handle_at = 265, clock_adjtime = 266, syncfs = 267, setns = 268, sendmmsg = 269, process_vm_readv = 270, process_vm_writev = 271, kcmp = 272, finit_module = 273, sched_setattr = 274, sched_getattr = 275, renameat2 = 276, seccomp = 277, getrandom = 278, memfd_create = 279, bpf = 280, execveat = 281, } } return nr
require("ZZBase64") require("TSLib") require("ocr") local ts = require("ts") local image = require("tsimg") function duociGet(base64,timestamp,ltype,page,min,max) duociGetStr = ""; local subString = string.sub(base64,min,max) if(string.len(subString) == 5000) then nextMin = page*5000 + 1 nextMax = nextMin + 5000 - 1 page = page+1 header_send = { ["Content-Type"] = "application/x-www-form-urlencoded", } body_send = {["image"] = subString,["timestamp"] = timestamp,["number"] = string.len(base64)/5000,["type"] = ltype} local code,header_resp, body_resp = ts.httpsGet("http://192.168.40.67:8080/discern/ocrSub", header_send,body_send) duociGet(base64,timestamp,ltype,page,nextMin,nextMax) else header_send = { ["Content-Type"] = "application/x-www-form-urlencoded", } body_send = {["image"] = subString,["timestamp"] = timestamp,["number"] = string.len(base64)/5000,["type"] = ltype} local code,header_resp, body_resp = ts.httpsGet("http://192.168.40.67:8080/discern/ocrSub", header_send,body_send) duociGetStr = body_resp end return duociGetStr end --截图并且旋转270° function cutImage(x1,y1,x2,y2,ltype) path = userPath(); path = path.."/res/1.png" snapshot(path, x1, y1, x2, y2) local newImage1,msg = image.loadFile(userPath() .. "/res/1.png") if image.is(newImage1) then --将图片对象顺时针旋转 270 度 local newImage2,msg = image.setRotation270(newImage1); if image.is(newImage2) then --将图片对象转换为图片 local boo,msg = image.saveToPngFile(newImage2,userPath() .. "/res/1.png") else dialog(msg,3) end else dialog(msg,3) end local files local file = io.open(path,"rb") if file then files = file:read("*a") file:close() else toast("没有找到文件",2) end base64 = ZZBase64.encode(files) timestamp = os.time() if(string.len(base64) > 5000) then duociGet(base64,timestamp,ltype,1,1,5000) else header_send = { ["Content-Type"] = "application/x-www-form-urlencoded", } body_send = {["image"] = base64,["type"] = ltype} local code,header_resp, body_resp = ts.httpsGet("http://192.168.40.67:8080/discern/ocr", header_send,body_send) toast(body_resp,2) end return body_resp end str = "1234567890q1234567890" resultStr = ""; function stepString(min,max,page,step) my = "1" -- body length = string.len(str); local subString = string.sub(str,min,max) if(string.len(subString) == 5) then nextMin = page*step + 1 nextMax = nextMin + step - 1 page = page+1 stepString(nextMin,nextMax,page,step) else my ="2" dialog(my) end return my end --dialog(stepString(1,5,1,5)) str = cutImage(477,1057,502,1084) --dialog(str)
object_mobile_dressed_dark_jedi_master_female_twk_01 = object_mobile_shared_dressed_dark_jedi_master_female_twk_01:new { } ObjectTemplates:addTemplate(object_mobile_dressed_dark_jedi_master_female_twk_01, "object/mobile/dressed_dark_jedi_master_female_twk_01.iff")
object_tangible_item_beast_barn_lite_beast_dna_storage_device = object_tangible_item_beast_barn_lite_shared_beast_dna_storage_device:new { } ObjectTemplates:addTemplate(object_tangible_item_beast_barn_lite_beast_dna_storage_device, "object/tangible/item/beast/barn_lite/beast_dna_storage_device.iff")
--[[ Credit for these translations goes to: StingerSoft Alphabot zuko3d Ivlin Ant1dotE KizEY --]] local L = LibStub("AceLocale-3.0"):NewLocale("TellMeWhen", "ruRU", false) if not L then return end L["ABSORBAMT"] = "Количество поглощаемого урона" -- Needs review L["ABSORBAMT_DESC"] = "Проверяет общую сумму поглощающих щитов, которые имеет объект" -- Needs review L["ACTIVE"] = "% активно" -- Needs review L["AIR"] = "Воздух" L["ALLOWCOMM"] = "Разрешает поделиться в игре" -- Needs review L["ALLOWCOMM_DESC"] = "Позволяет другим пользователям TellMeWhen выслать вам данные" -- Needs review L["ALLOWVERSIONWARN"] = "Сообщать о новой версии" L["ALPHA"] = "Альфа" -- Needs review L["ANCHOR_CURSOR_DUMMY"] = "Макет якоря курсора TellMeWhen" L["ANCHOR_CURSOR_DUMMY_DESC"] = [=[Это макет курсора. Он должен помочь Вам расположить иконки, привязанные к курсору. Привязка групп к курсору полезна иконкам, проверяющим объект 'mouseover' (указатель мышки на цели объекта). Вы можете, удерживая |cff7fffffRight-Click-and-drag|r правую кнопку мышки, перетащить иконку к данному макету, чтобы привязать группу иконки к курсору. Из-за бага Blizzard'ов, анимация кулдауна - круговое затенение иконки - будет неверно отображаться. Так что Вам лучше отключить ее для иконок, привязанных к якорю. |cff7fffffLeft-Click and drag|r для перемещения макета.]=] L["ANCHORTO"] = "Связать с" -- Needs review L["ANIM_ACTVTNGLOW"] = "Иконка: Активация рамки" -- Needs review L["ANIM_ACTVTNGLOW_DESC"] = "Показывает на иконке границу активации близзардовского заклинания." -- Needs review L["ANIM_ALPHASTANDALONE"] = "Прозрачность" -- Needs review L["ANIM_ALPHASTANDALONE_DESC"] = "Задайте максимальную прозрачность анимации" -- Needs review L["ANIM_ANCHOR_NOT_FOUND"] = "Невозможно найти кадр с именем %q для привязки к нему анимации. Разве этот кадр не используется текущим видом иконки?" -- Needs review L["ANIM_ANIMSETTINGS"] = "Установки" -- Needs review L["ANIM_ANIMTOUSE"] = "Анимация для использования" -- Needs review L["ANIM_COLOR"] = "Цвет/Прозрачность" -- Needs review L["ANIM_COLOR_DESC"] = "Сконфигурируйте цвет и непрозрачность мигания." -- Needs review L["ANIM_DURATION"] = "Продолжительность анимации" -- Needs review L["ANIM_DURATION_DESC"] = "Установите, сколько времени анимация должна продлиться после того, как она вызвана." -- Needs review L["ANIM_FADE"] = "Мигание при неудаче" -- Needs review L["ANIM_FADE_DESC"] = "С галочкой для гладкого перехода между миганиями. Без галочки для немедленной вспышки." -- Needs review L["ANIM_ICONALPHAFLASH"] = "Иконка: Альфа мигание" -- Needs review L["ANIM_ICONALPHAFLASH_DESC"] = "Непосредственно подсвечивает иконку изменением ее непрозрачности." -- Needs review L["ANIM_ICONBORDER"] = "Иконка: Граница" -- Needs review L["ANIM_ICONBORDER_DESC"] = "Перекрывает цветную границу на иконке." -- Needs review L["ANIM_ICONCLEAR"] = "Иконка: Прекращение анимации" -- Needs review L["ANIM_ICONCLEAR_DESC"] = "Прекратить всю анимацию на данной иконке." -- Needs review L["ANIM_ICONFADE"] = "Иконка: Постепенное проявление Вкл/Выкл" -- Needs review L["ANIM_ICONFADE_DESC"] = "Постепенно применяет любые изменения непрозрачности, которые происходили с отобранным событием." -- Needs review L["ANIM_ICONFLASH"] = "Иконка: Цветное мигание" -- Needs review L["ANIM_ICONFLASH_DESC"] = "Иконка подсвечивается мигающим цветом" -- Needs review L["ANIM_ICONOVERLAYIMG"] = "Иконка: Отображение перекрытия" -- Needs review L["ANIM_ICONOVERLAYIMG_DESC"] = "Перекрывает иконку пользовательским изображением." -- Needs review L["ANIM_ICONSHAKE"] = "Иконка: Тряска" -- Needs review L["ANIM_ICONSHAKE_DESC"] = "Трясет иконку при срабатывании." -- Needs review L["ANIM_INFINITE"] = "Играть неопределенно" -- Needs review L["ANIM_INFINITE_DESC"] = "С галочкой, чтобы заставить мультипликацию играть, пока она не перепишется другой мультипликацией на иконке такого же типа, или пока играет %q мультипликация." -- Needs review L["ANIM_MAGNITUDE"] = "Магнитуда встряски" -- Needs review L["ANIM_MAGNITUDE_DESC"] = "Установите, насколько сильный должна быть встряска." -- Needs review L["ANIM_PERIOD"] = "Период Вспышки" -- Needs review L["ANIM_PERIOD_DESC"] = [=[Устанавливает, сколько времени каждое мигание должно длиться - время, когда мигание показывается или усиливается. Установите 0, если Вам не нужно постепенное проявление или мигание.]=] -- Needs review L["ANIM_PIXELS"] = "%s пикселей " -- Needs review L["ANIM_SCREENFLASH"] = "Экран: Мигает" -- Needs review L["ANIM_SCREENFLASH_DESC"] = "Мигает наложенным на экран цветом" -- Needs review L["ANIM_SCREENSHAKE"] = "Экран: Тряска" -- Needs review L["ANIM_SCREENSHAKE_DESC"] = [=[При срабатывании трясет весь экран. ВАЖНО: Это сработает если Вы будете или вне боя или если имена персонажей не были включены во время загрузки.]=] -- Needs review L["ANIM_SECONDS"] = "%s Секунд" -- Needs review L["ANIM_SIZE_ANIM"] = "Граничное начальное количество" -- Needs review L["ANIM_SIZE_ANIM_DESC"] = "Задайте насколько большой должна быть вся граница." -- Needs review L["ANIM_SIZEX"] = "Ширина изображения" -- Needs review L["ANIM_SIZEX_DESC"] = "Задайте ширину изображения." -- Needs review L["ANIM_SIZEY"] = "Высота изображения" -- Needs review L["ANIM_SIZEY_DESC"] = "Задайте высоту изображения" -- Needs review L["ANIM_TAB"] = "Анимация" -- Needs review L["ANIM_TAB_DESC"] = "Настроить анимацию. Некоторые эффекты применяются к иконке, некоторые - ко всему экрану." -- Needs review L["ANIM_TEX"] = "Текстура" -- Needs review L["ANIM_TEX_DESC"] = [=[Выберите текстуру, которая должна быть перекрыта. Вы можете ввести Название или ID заклинания, имеющего текстуру, которую Вы хотите использовать, или Вы можете ввести путь к текстуре, такой как 'Interface/Icons/spell_nature_healingtouch', или только 'spell_nature_healingtouch', если путем является 'Interface/Icons' Вы можете использовать также свои собственные текстуры, пока они размещены в каталоге WoW (установите это поле в пути к текстуре относительно корневого каталога WoW) в .tga или .blp формате, и имеют размерности, кратные 2 (32, 64, 128, и т.д.)]=] -- Needs review L["ANIM_THICKNESS"] = "Толщина границы" -- Needs review L["ANIM_THICKNESS_DESC"] = "Задайте толщину границы" -- Needs review L["ANN_CHANTOUSE"] = "Исп. канал" -- Needs review L["ANN_EDITBOX"] = "Выводимый текст" -- Needs review L["ANN_EDITBOX_DESC"] = "Введите текст, который будет выводиться при определенном событии. Могут быть использованы стандартные замещения: \"%t\" для вашей цели и \"%f\" для вашего фокуса." -- Needs review L["ANN_EDITBOX_WARN"] = "Наберите текст для отображения в этом месте" -- Needs review L["ANN_FCT_DESC"] = "Выводы в %s стиле Blizzard'а. Возможность вывода текста в вашем интерфейсе ДОЛЖНА быть включена." -- Needs review L["ANN_NOTEXT"] = "<Нет текста>" -- Needs review L["ANN_SHOWICON"] = "Показать текстуру значка" -- Needs review L["ANN_SHOWICON_DESC"] = "Некоторые текстовые поля могут отображать помимо текста текстуры. Установите эту опцию для включения данной особенности." -- Needs review L["ANN_STICKY"] = "Прилипание" -- Needs review L["ANN_SUB_CHANNEL"] = "Подраздел" -- Needs review L["ANN_TAB"] = "Извещения" -- Needs review L["ANN_TAB_DESC"] = "Настроить выводимый текст. Можно указать канал чата, фрейм или другие аддоны." -- Needs review L["ANN_WHISPERTARGET"] = "Шепнуть цели" L["ANN_WHISPERTARGET_DESC"] = [=[Введите имя игрока которому вы хотите шепнуть. Игрок должен быть с вашего сервера и одной фракции с вами.]=] -- Needs review L["ASCENDING"] = "Восходящий" L["ASPECT"] = "Аспект" L["AURA"] = "Аура" -- Needs review L["BACK_IE"] = "назад" L["BACK_IE_DESC"] = "Загрузить последнюю отредактированную иконку (%s |T%s:0|t)." -- Needs review L["Bleeding"] = "Кровотечение" L["BOTTOM"] = "Внизу" L["BOTTOMLEFT"] = "Внизу слева" L["BOTTOMRIGHT"] = "Внизу справа" L["BUFFCNDT_DESC"] = "Только первое заклинание будет проверено, все другие будут проигнорированы." -- Needs review L["BUFFTOCHECK"] = "Баф для проверки" -- Needs review L["BUFFTOCOMP1"] = "Первый баф для сравнения" -- Needs review L["BUFFTOCOMP2"] = "Второй баф для сравнения" -- Needs review L["BURNING_EMBERS_FRAGMENTS"] = "\"Фрагменты\" горящих углей" -- Needs review L["BURNING_EMBERS_FRAGMENTS_DESC"] = [=[Каждый целый Горящий Уголь содержит десять его фрагиентов. Например, если у вас есть 1 целый горящий уголь и еще половина, тогда у вас 15 фрагментов.]=] -- Needs review L["CASTERFORM"] = "Может произносить заклинания" L["CENTER"] = "В центре" L["CHAT_FRAME"] = "Область чата" -- Needs review L["CHAT_MSG_CHANNEL"] = "Канал чата" -- Needs review L["CHAT_MSG_CHANNEL_DESC"] = "Отображает в виде сообщения в канале чата (например Торговля или любой другой к которому вы присоединены)" -- Needs review L["CHAT_MSG_SMART"] = "Умный чат" -- Needs review L["CHAT_MSG_SMART_DESC"] = "Сообщение отображается в наиболее подходящем канале чата: Рейд, Группа, Поле сражения или Сказать." -- Needs review L["CHOOSEICON_DESC"] = [=[|cff7fffffClick|r для выбора иконки/группы. |cff7fffffLeft-Click and drag|r для переназначения. |cff7fffffRight-Click and drag|r для перестановки.]=] L["CHOOSENAME_DIALOG"] = [=[Введите название или ID того, что Вы хотите отслеживать на этой иконке. Можно добавить несколько названий (любые комбинации имен, ID или эквивалентов), разделяя их ';'. Shift+ЛКМ введет заклинания/предметы/текст или перетащите мышью заклинания/предметы для ввода их в это поле.]=] -- Needs review L["CHOOSENAME_DIALOG_PETABILITIES"] = "|cFFFF5959Способности питомцев|r нужно указывать в виде идентификаторов (SpellID)." L["CLEU_"] = "Любое событие" -- Needs review L["CLEU_CAT_AURA"] = "Баф/Дебаф" -- Needs review L["CLEU_CAT_CAST"] = "Заклинания" -- Needs review L["CLEU_CAT_MISC"] = "Разное" L["CLEU_CAT_SPELL"] = "Заклинания" -- Needs review L["CLEU_CAT_SWING"] = "мили/рендж" L["CLEU_COMBATLOG_OBJECT_AFFILIATION_MASK"] = "Контроль взаимосвязями (отношениями)" -- Needs review L["CLEU_COMBATLOG_OBJECT_AFFILIATION_MINE"] = "Отношение контроллера: Игрок (Вы)" -- Needs review L["CLEU_COMBATLOG_OBJECT_AFFILIATION_MINE_DESC"] = "Отметьте для исключения юнитов, подконтрольных вам." -- Needs review L["CLEU_COMBATLOG_OBJECT_AFFILIATION_OUTSIDER"] = "Отношение контроллера: Посторонние" -- Needs review L["CLEU_COMBATLOG_OBJECT_AFFILIATION_OUTSIDER_DESC"] = "Проверка для исключения объекта, которым управляет кто-то, кто с Вами не в группе." -- Needs review L["CLEU_COMBATLOG_OBJECT_AFFILIATION_PARTY"] = "Управление группой: Члены группы" -- Needs review L["CLEU_COMBATLOG_OBJECT_AFFILIATION_PARTY_DESC"] = "Проверка для исключения объекта, которым управляет кто-то, кто с Вами в группе." -- Needs review L["CLEU_COMBATLOG_OBJECT_AFFILIATION_RAID"] = "Управление группой: Члены рейда" -- Needs review L["CLEU_COMBATLOG_OBJECT_AFFILIATION_RAID_DESC"] = "Проверка для исключения объектов, контролируемых кем-либо еще в Вашей рейдовой группе" -- Needs review L["CLEU_COMBATLOG_OBJECT_CONTROL_MASK"] = "Контроллер" -- Needs review L["CLEU_COMBATLOG_OBJECT_CONTROL_NPC"] = "Контроллер:Сервер" -- Needs review L["CLEU_COMBATLOG_OBJECT_CONTROL_PLAYER"] = "Контроль: Человек" -- Needs review L["CLEU_COMBATLOG_OBJECT_NONE_DESC"] = "С галочкой, чтобы исключить объекты, которые абсолютно неизвестны клиенту WoW. Это происходит очень редко и может вообще быть оставлено без проверки." -- Needs review L["CLEU_COMBATLOG_OBJECT_TYPE_GUARDIAN_DESC"] = "С галочкой исключить Охрану. Охрана - объекты, которые защищают свой контроллер, но не могут управляться непосредственно." -- Needs review L["CLEU_DAMAGE_SHIELD"] = "Щит от урона" -- Needs review L["CLEU_DAMAGE_SHIELD_DESC"] = "Возникает, если вредоносный щит (%s, %s, итд., но не %s) повреждает объект." -- Needs review L["CLEU_DAMAGE_SHIELD_MISSED"] = "Щит от урона пропущен" -- Needs review L["CLEU_DAMAGE_SHIELD_MISSED_DESC"] = "Происходит, когда щит от урона (%s, %s, и т.д., но не %s) не в состоянии повредить цель." -- Needs review L["CLEU_DAMAGE_SPLIT"] = "Разделение урона" -- Needs review L["CLEU_DAMAGE_SPLIT_DESC"] = "Возникает, когда урон разделяется между двумя или более целями" -- Needs review L["CLEU_DESTUNITS"] = "Проверка дальности до объекта" -- Needs review L["CLEU_DESTUNITS_DESC"] = "Выберите конечные объекты, на которые иконка должна реагировать, |cff7fffffOR|r оставьте поле пустым, чтобы позволить иконке реагировать на любой результат события" -- Needs review L["CLEU_DIED"] = "Смерть" L["CLEU_ENCHANT_APPLIED"] = "Зачарование Нанесено" -- Needs review L["CLEU_ENCHANT_APPLIED_DESC"] = "Покрывает временные энчанты оружия типа яда роги или шаманских улучшений" -- Needs review L["CLEU_ENCHANT_REMOVED"] = "Зачарование Удалено" -- Needs review L["CLEU_ENCHANT_REMOVED_DESC"] = "Покрывает временные энчанты оружия типа яда роги или шаманских улучшений" -- Needs review L["CLEU_ENVIRONMENTAL_DAMAGE"] = "Урон окружающей среде" -- Needs review L["CLEU_ENVIRONMENTAL_DAMAGE_DESC"] = "Включает урон от лавы, усталости, нехватки дыхания и падения" -- Needs review L["CLEU_EVENTS"] = "События для проверки" -- Needs review L["CLEU_EVENTS_ALL"] = "Все" L["CLEU_EVENTS_DESC"] = "Выберите на какие события боя вы хотите, чтобы реагировала иконка." -- Needs review L["CLEU_FLAGS_DEST"] = "Исключения" -- Needs review L["CLEU_FLAGS_SOURCE"] = "Исключения" -- Needs review L["CLEU_HEADER"] = "Фильтры события боя" -- Needs review L["CLEU_PARTY_KILL"] = "Кил партии" -- Needs review L["CLEU_RANGE_DAMAGE"] = "Урон на растоянии (дальний)" -- Needs review L["CLEU_RANGE_MISSED"] = "Дальний промах" -- Needs review L["CLEU_SOURCEUNITS"] = "Источник объекта(ов) для проверки" -- Needs review L["CLEU_SOURCEUNITS_DESC"] = "Выберите цель, на которую вы хотите, чтобы реагировала иконка, |cff7fffffOR|r оставьте пустым, чтобы иконка реагировла на любое событие." -- Needs review L["CLEU_SPELL_AURA_APPLIED"] = "Аура наложена" -- Needs review L["CLEU_SPELL_AURA_APPLIED_DOSE"] = "Ауры наложены" -- Needs review L["CLEU_SPELL_AURA_BROKEN"] = "Аура снята" -- Needs review L["CLEU_SPELL_AURA_BROKEN_SPELL"] = "Аура снята спелом" -- Needs review L["CLEU_SPELL_AURA_BROKEN_SPELL_DESC"] = [=[Срабатывает если аура, обычно некоторая форма контроля, снимается уроном от заклинания. Снятая аура это то, на что сработала иконка; снявшее заклинание можно вывести с помощью подстановки [Extra] в тестовых подсказках.]=] -- Needs review L["CLEU_SPELL_AURA_REFRESH"] = "Аура обновлена" -- Needs review L["CLEU_SPELL_AURA_REMOVED"] = "аура удалена" L["CLEU_SPELL_AURA_REMOVED_DOSE"] = "Ауры удалены" -- Needs review L["CLEU_SPELL_CAST_FAILED"] = "Неудачный каст" -- Needs review L["CLEU_SPELL_CAST_START"] = "Начало каста" -- Needs review L["CLEU_SPELL_CAST_START_DESC"] = [=[Происходит, когда начинают произносить заклинание. ВАЖНО: Чтобы предотвратить потенциальные злоупотребления, Blizzard исключил из этого события объект назначения, таким образом, Вы не можете это выбрать.]=] -- Needs review L["CLEU_SPELL_CAST_SUCCESS"] = "Успешное применение заклинания" L["CLEU_SPELL_CAST_SUCCESS_DESC"] = "Происходит, когда заклинание успешно применено." L["CLEU_SPELL_CREATE_DESC"] = "Происходит, когда объект, такой как ловушка охотника или портал мага, создан." L["CLEU_SPELL_DAMAGE"] = "Урон от заклинания" -- Needs review L["CLEU_SPELL_DAMAGE_CRIT"] = "Критический эффект заклинания" L["CLEU_SPELL_DAMAGE_CRIT_DESC"] = "Происходит, когда любое заклинание наносит критический урон. Это будет происходить также часть, как и %q событие." L["CLEU_SPELL_DAMAGE_DESC"] = "Происходит, когда любое заклинание наносит критический урон." L["CLEU_SPELL_DAMAGE_NONCRIT"] = "Спел не критовый" -- Needs review L["CLEU_SPELL_DAMAGE_NONCRIT_DESC"] = "Происходит, когда любое заклинание наносит некритический урон. Occurs when any spell does non-critical damage. Это будет происходить также часть, как и %q событие." L["CLEU_SPELL_DISPEL"] = "Рассеивание залинания" -- Needs review L["CLEU_SPELL_DISPEL_DESC"] = [=[Срабатывает если аура снимается рассеиванием. Иконка может зависеть от рассеянной ауры. Рассеевшее заклинание можно вывести с помощью подстановки [Extra] в тестовых подсказках.]=] -- Needs review L["CLEU_SPELL_DISPEL_FAILED"] = "Рассеивание не удалось" -- Needs review L["CLEU_SPELL_DISPEL_FAILED_DESC"] = [=[Срабатывает если ауру не удается снять рассеиванием. Иконка может зависеть от ауры, которую пытались рассеять. Неудавшееся рассеивающее заклинание можно вывести с помощью подстановки [Extra] в тестовых подсказках. ]=] -- Needs review L["CLEU_SPELL_DRAIN"] = "Утечка ресурса" -- Needs review L["CLEU_SPELL_DRAIN_DESC"] = "Срабатывает если параметры (здоровье/мана/ярость/энергия/итд) потеряны объектом." -- Needs review L["CLEU_SPELL_ENERGIZE"] = "Восполнение ресурса" -- Needs review L["CLEU_SPELL_ENERGIZE_DESC"] = "Срабатывает если параметры (здоровье/мана/ярость/энергия/итд) получены объектом." -- Needs review L["CLEU_SPELL_EXTRA_ATTACKS"] = "Получен дополнительный урон" -- Needs review L["CLEU_SPELL_EXTRA_ATTACKS_DESC"] = "Срабатывает если прок дал дополнительный удар в ближнем бою." -- Needs review L["CLEU_SPELL_HEAL"] = "Лечение" L["CLEU_SPELL_INSTAKILL"] = "Мгновенное убийство" L["CLEU_SPELL_INTERRUPT"] = "Прерывание - Заклинание прервано" L["CLEU_SPELL_INTERRUPT_DESC"] = [=[Срабатывает если заклинание прерывается. Иконка может зависеть от прерванного заклинания. Прерывающее заклинание можно вывести с помощью подстановки [Extra] в тестовых подсказках. Понимайте разницу между двумя различными событиями прерывания - оба всегда будут срабатывать, если заклинание прервано, но каждый отбирает использованные заклинания отдельно. ]=] -- Needs review L["CLEU_SPELL_INTERRUPT_SPELL"] = "Прерывание - прерывание используемого заклинания" -- Needs review L["CLEU_SPELL_INTERRUPT_SPELL_DESC"] = [=[Происходит, если произнесение заклинания прервано. Иконка может быть отфильтрована заклинанием, которое вызвало прерывание. К заклинанию, которое было прервано, можно получить доступ с подстановкой [Extra] в текстовых подсказках. Отметьте различие между двумя событиями прерывания - оба всегда будут происходить, если заклинание будет прервано, но каждое выбирает свои заклинания по-разному.]=] -- Needs review L["CLEU_SPELL_LEECH"] = "Уменьшение значений параметров" -- Needs review L["CLEU_SPELL_LEECH_DESC"] = "Срабатывает если параметры (здоровье/мана/ярость/энергия/итд) потеряны одним объектом и, одновременно, получены другим." -- Needs review L["CLEU_SPELL_MISSED"] = "Промах заклинания" L["CLEU_SPELL_PERIODIC_DAMAGE"] = "Периодический урон" L["CLEU_SPELL_PERIODIC_DRAIN"] = "Переодическая Утечка ресурса" -- Needs review L["CLEU_SPELL_PERIODIC_ENERGIZE"] = "Периодическое Восполнение ресурса" -- Needs review L["CLEU_SPELL_PERIODIC_HEAL"] = "Периодическое исцеление" -- Needs review L["CLEU_SPELL_PERIODIC_LEECH"] = "Периодическая откачка" -- Needs review L["CLEU_SPELL_PERIODIC_MISSED"] = "Периодический промах" -- Needs review L["CLEU_SPELL_REFLECT"] = "Отражение заклинания" L["CLEU_SPELL_REFLECT_DESC"] = [=[Срабатывает если вы отразили заклинание обратно на кастера. Исходящий объект - это любой отразивший, объект назначения - это любой, кто отразил обратно]=] -- Needs review L["CLEU_SPELL_RESURRECT"] = "Воскрешение" L["CLEU_SPELL_RESURRECT_DESC"] = "Происходит, когда объект воскрешен после смерти." L["CLEU_SPELL_STOLEN"] = "Аура украдена" -- Needs review L["CLEU_SPELL_STOLEN_DESC"] = [=[Происходит если баф украден, возможно посредством %s. Иконка может быть выбрана заклинанием, которое было украдено.]=] -- Needs review L["CLEU_SPELL_SUMMON"] = "Заклинание призыва" L["CLEU_SPELL_SUMMON_DESC"] = "Происходит, когда NPC, такой как пет или тотем, призван или создан." L["CLEU_SWING_DAMAGE"] = "Колеблющийся урон" -- Needs review L["CLEU_SWING_MISSED"] = "Колеблющийся промах" -- Needs review L["CLEU_TIMER"] = "Таймер для настройки на события" -- Needs review L["CLEU_TIMER_DESC"] = [=[Продолжительность таймера в секундах, выводится на иконке когда событие имеет место. Вы можете также установить время действия используя формат "Заклинание: Продолжительность" в строке ввода %q, которая будет использоваться всякий раз при обработке события, использующего заклинание, которое Вы установили как фильтр. Если продолжительность заклинания никак не определена, или у Вас нет никаких предустановок фильтра заклинания (строка ввода чиста), то будет использоваться эта продолжительность.]=] -- Needs review L["CLEU_UNIT_DESTROYED"] = "Объект Унечтожен" -- Needs review L["CLEU_UNIT_DESTROYED_DESC"] = "Срабатывает если объект, такой как тотем, уничтожен." -- Needs review L["CLEU_UNIT_DIED"] = "Объект Мертв" -- Needs review L["CLEU_WHOLECATEGORYEXCLUDED"] = [=[Вы исключили каждую часть %q категории, вследствие чего, эта с иконкой не будут происходить никакие события. Отмените хотя бы одно выделение для правильного функционирования.]=] L["CMD_DISABLE"] = "Выкл." L["CMD_ENABLE"] = "Вкл." L["CMD_OPTIONS"] = "Параметры" L["CMD_PROFILE"] = "Профиль" L["CMD_PROFILE_INVALIDPROFILE"] = "Профиля с названием %q не существует!" L["CMD_PROFILE_INVALIDPROFILE_SPACES"] = "Подсказка: если в названии профиля есть пробелы, возьмите название в кавычки" -- Needs review L["CMD_TOGGLE"] = "переключение" L["CNDTCAT_ATTRIBUTES_PLAYER"] = "Свойства игрока" L["CNDTCAT_ATTRIBUTES_UNIT"] = "Свойства объекта" L["CNDTCAT_BUFFSDEBUFFS"] = "Баффы/Дебаффы" -- Needs review L["CNDTCAT_CURRENCIES"] = "Деньги" -- Needs review L["CNDTCAT_FREQUENTLYUSED"] = "Часто используемый" L["CNDTCAT_MISC"] = "Разный" L["CNDTCAT_RESOURCES"] = "Ресурсы" -- Needs review L["CNDTCAT_SPELLSABILITIES"] = "Заклинания/Предметы" -- Needs review L["CNDTCAT_STATS"] = "Характеристики" -- Needs review L["CNDT_DEPRECATED_DESC"] = "Свойство %s более не функционирует. Это результат изменений в механике игры. Удалите его или смените на другое свойство." L["CNDT_MULTIPLEVALID"] = "Вы можете ввести несколько названий/IDs для проверки, разделяя их точкой с запятой." L["CNDT_ONLYFIRST"] = "Только первое заклинание/предмет будет проверяться - списки, разделённые \";\" некорректны для условия этого типа" -- Needs review L["CNDT_SLIDER_DESC_CLICKSWAP_TOMANUAL"] = "|cff7fffffRight-Click|r для переключения на ручной ввод." L["CNDT_SLIDER_DESC_CLICKSWAP_TOSLIDER"] = "|cff7fffffRight-Click|r для переключения на выбор с использованием ползунка." L["CNDT_SLIDER_DESC_CLICKSWAP_TOSLIDER_DISALLOWED"] = "Только ручной ввод разрешен для значений свыше %s (ползунки Blizzard's могут странно срабатывать с большими значениями.)" L["CNDT_TOTEMNAME"] = "Название(я) тотема" L["CNDT_TOTEMNAME_DESC"] = [=[Оставьте пустым, чтобы отслеживать любые тотемы выбранного типа. Введите название тотема, или список названий, разделенных точкой с запятой, для отслеживания конкретных тотемов.]=] L["CNDT_UNKNOWN_DESC"] = "Ваши параметры содержат состояние с названием %s, но такого состояния не найдено. Возможно Вы используете старую версию TMW, или данное состояние было удалено." L["CODESNIPPET_AUTORUN"] = "Автозапуск при загрузке" -- Needs review L["CODESNIPPET_DELETE"] = "Удалить фрагмент." L["CODESNIPPET_DELETE_CONFIRM"] = "Вы уверены, что хотите удалить фрагмент кода %q?" L["CODESNIPPET_GLOBAL"] = "Глобальные Фрагменты" L["CODESNIPPET_ORDER"] = "Порядок запуска" L["CODESNIPPET_ORDER_DESC"] = [=[Установите порядок, в котором данный фрагмент будет запускаться относительно других фрагментов. %s и %s будут смешаны при запуске, основываясь на данном значении. Допустимы десятичные значения. Последовательный порядок не гарантирован, если два фрагмента используют один и тот же порядок.]=] L["CODESNIPPET_PROFILE"] = "Фрагменты Профиля" L["CODESNIPPET_RENAME"] = "Название Фрагмента кода" L["CODESNIPPET_RENAME_DESC"] = [=[Выберите название для данного фрагмента для простого его распознавания. Названия не обязаны быть уникальными.]=] L["CODESNIPPET_RUNNOW"] = "Запустить Фрагмент сейчас" L["COLOR_MSQ_ONLY"] = "Только цвет границы Маски" -- Needs review L["COMPARISON"] = "Сравнение" L["CONDITIONALPHA_METAICON"] = "Неудачные сосотояния" -- Needs review L["CONDITIONALPHA_METAICON_DESC"] = "Эта непрозрачность будет применяться когда спадут условия." -- Needs review L["CONDITIONPANEL_ADD"] = "Добавить условие" -- Needs review L["CONDITIONPANEL_ALIVE"] = "Цель жива" L["CONDITIONPANEL_ALIVE_DESC"] = "Это условие исполняется если указанная цель жива." L["CONDITIONPANEL_ALTPOWER"] = "Альтернативный ресурс" -- Needs review L["CONDITIONPANEL_AND"] = "и" L["CONDITIONPANEL_ANDOR"] = "и/или" L["CONDITIONPANEL_ANDOR_DESC"] = "Нажмите для переключения между операторами И/ИЛИ" L["CONDITIONPANEL_BITFLAGS_SELECTED"] = "|cff7fffffВыбрано|r:" -- Needs review L["CONDITIONPANEL_BLIZZEQUIPSET"] = "Набор вещей надет" -- Needs review L["CONDITIONPANEL_BLIZZEQUIPSET_INPUT"] = "Наименование набора вещей" -- Needs review L["CONDITIONPANEL_CLASS"] = "Класс объекта" L["CONDITIONPANEL_CLASSIFICATION"] = "Тип объекта" L["CONDITIONPANEL_COMBAT"] = "Объект в бою" L["CONDITIONPANEL_COMBO"] = "Длина серии приемов" L["CONDITIONPANEL_DEFAULT"] = "Выберите тип ..." L["CONDITIONPANEL_ECLIPSE_DESC"] = [=[Затмение друида имеет диапазон от -100 (лунное затмение) до 100 (солнечное затмение). Введите -80 если вы хотите чтобы значок сработал при значении лунной силы равной 80.]=] L["CONDITIONPANEL_EQUALS"] = "равно" L["CONDITIONPANEL_EXISTS"] = "Цель существует" L["CONDITIONPANEL_GREATER"] = "Больше" L["CONDITIONPANEL_GREATEREQUAL"] = "Больше или равно" L["CONDITIONPANEL_GROUPTYPE"] = "Тип группы" -- Needs review L["CONDITIONPANEL_ICON"] = "Показать значок" L["CONDITIONPANEL_ICON_DESC"] = [=[Проверка условий работает только если прозрачность иконки больше 0. Если необходимо скрыть значок, но при этом вести проверку условий, установите параметр %q в настройках прозрачности значка. Для проверки условий значка группа в которой он находится также должна отбражаться.]=] -- Needs review L["CONDITIONPANEL_ICON_HIDDEN"] = "Скрыт" -- Needs review L["CONDITIONPANEL_ICONHIDDENTIME"] = "Иконка невидимого времени" -- Needs review L["CONDITIONPANEL_ICON_SHOWN"] = "Отображается" L["CONDITIONPANEL_ICONSHOWNTIME"] = "Иконка отображаемого времени" -- Needs review L["CONDITIONPANEL_INSTANCETYPE"] = "Тип подземелья" L["CONDITIONPANEL_INSTANCETYPE_LEGACY"] = "%s (Устаревшее)" -- Needs review L["CONDITIONPANEL_INTERRUPTIBLE"] = "Можно прервать" -- Needs review L["CONDITIONPANEL_LESS"] = "Меньше" L["CONDITIONPANEL_LESSEQUAL"] = "Меньше или равно" L["CONDITIONPANEL_LEVEL"] = "Уровень объекта" L["CONDITIONPANEL_MOUNTED"] = "На транспорте" L["CONDITIONPANEL_NAME"] = "Название объекта" L["CONDITIONPANEL_NAMETOMATCH"] = "Имя равно" -- Needs review L["CONDITIONPANEL_NAMETOOLTIP"] = "Вы можете указать несколько имен для проверки разделив их точкой с запятой (;). Условие считается выполненным если совпало хотя одно имя." -- Needs review L["CONDITIONPANEL_NOTEQUAL"] = "Не равно" L["CONDITIONPANEL_OPERATOR"] = "Оператор" L["CONDITIONPANEL_OR"] = "Или" L["CONDITIONPANEL_PETSPEC"] = "специализация питомца" -- Needs review L["CONDITIONPANEL_POWER"] = "Основной ресурс" L["CONDITIONPANEL_POWER_DESC"] = [=[Будет проверять энергию, если цель - друид в форме кошки, ярость - если цель воин, и т.д.]=] L["CONDITIONPANEL_PVPFLAG"] = "Объект с меткой PvP" L["CONDITIONPANEL_REMOVE"] = "Удалить это условие" L["CONDITIONPANEL_RESTING"] = "Отдыхает" -- Needs review L["CONDITIONPANEL_ROLE"] = "Роль игорка" -- Needs review L["CONDITIONPANEL_SPELLRANGE"] = "Заклинание достает до цели" -- Needs review L["CONDITIONPANEL_SWIMMING"] = "Плавание" L["CONDITIONPANEL_TYPE"] = "Тип" L["CONDITIONPANEL_UNIT"] = "Объект" -- Needs review L["CONDITIONPANEL_UNITISUNIT"] = "Объект равен" -- Needs review L["CONDITIONPANEL_UNITISUNIT_DESC"] = "Это условие выполнено если объект в первом поле ввода совпадает с объектом во втором поле ввода." -- Needs review L["CONDITIONPANEL_UNITISUNIT_EBDESC"] = "Введите объект для сравнения с объектом в первом поле ввода." -- Needs review L["CONDITIONPANEL_VALUEN"] = "Значение" L["CONDITIONPANEL_VEHICLE"] = "Объект на сред. передвижения" L["CONDITIONS"] = "Условия" -- Needs review L["CONFIGMODE"] = "TellMeWhen в режиме настройки. Значки не будут работать до выхода из режима настройки. Наберите /tmw для включения/выключения режима настройки." -- Needs review L["CONFIGMODE_EXIT"] = "Выйти из режима настройки" L["CONFIGMODE_NEVERSHOW"] = "Больше не показывать" L["CONFIGPANEL_CLEU_HEADER"] = "Боевые события" -- Needs review L["COPYGROUP"] = "Копировать всю группу" L["COPYPOSSCALE"] = "Копировать расположение/масштаб" -- Needs review L["CrowdControl"] = "Контроль" L["Curse"] = "Проклятье" L["DamageBuffs"] = "Наносящие урон баффы" -- Needs review L["DamageShield"] = "Поглощающий щит" -- Needs review L["DEBUFFTOCHECK"] = "Дебафф для проверки" -- Needs review L["DEBUFFTOCOMP1"] = "Первый дебаф для сравнения" -- Needs review L["DEBUFFTOCOMP2"] = "Второй дебаф для сравнения" -- Needs review L["DEFAULT"] = "По умолчанию" -- Needs review L["DefensiveBuffs"] = "Защитные баффы" -- Needs review L["DESCENDING"] = "Нисходящий" -- Needs review L["DISABLED"] = "Отключено" L["Disease"] = "Болезнь" L["Disoriented"] = "Дезориентация" L["DR-Disorient"] = "Ослепление" -- Needs review L["DR-Silence"] = "Немота" -- Needs review L["DR-Taunt"] = "Таунты" -- Needs review L["DT_DOC_gsub"] = "Дает досту к функции LUA string.gsub для DogTags для мощных возможностей построковой обработки." -- Needs review L["DT_DOC_IsShown"] = "Сообщает, показана или нет иконка" -- Needs review L["DT_DOC_LocType"] = "Показывает тип эффекта потери контроля, отображаемый на иконке. (Этот признак должен использоваться с %s типом иконок)." -- Needs review L["DT_DOC_Opacity"] = "Возвращает непрозрачность значка. Возвращаемое значение между 0 и 1." -- Needs review L["DT_DOC_strfind"] = "Дает досту к функции LUA string.find для DogTags для мощных возможностей построковой обработки." -- Needs review L["DURATION"] = "Продолжительность" -- Needs review L["EARTH"] = "Земля" -- Needs review L["ECLIPSE_DIRECTION"] = "Направление затмения" L["elite"] = "Элитный" -- Needs review L["ENABLINGOPT"] = "Дополнение TellMeWhen_Options отключено. Включаю ..." L["Enraged"] = "Энрейдж" -- Needs review L["ERROR_MISSINGFILE"] = "Для использования TellMeWhen %s необходима перезагрузка WoW (%s не найден). Перезагрузить WoW сейчас?" -- Needs review L["ERROR_MISSINGFILE_NOREQ"] = [=[Может понадобиться полный перезапуск игры, чтобы использовать TellMeWhen %s: %s не найден. Хотите перезапустить WoW сейчас?]=] -- Needs review L["ERROR_MISSINGFILE_REQFILE"] = "Требуемый файл" -- Needs review L["EVENT_FREQUENCY"] = "Триггер Частота" -- Needs review L["EVENTHANDLER_LUA_LUAEVENTf"] = "Lua событие: %s" -- Needs review L["EVENTS_CHOOSE_EVENT"] = "Выберите Триггер:" -- Needs review L["EVENTS_CHOOSE_HANDLER"] = "Выберите Уведомление:" -- Needs review L["EVENTS_HANDLER_ADD_DESC"] = "|cff7fffffНажмите|r чтобы добавить извещение такого типа." -- Needs review L["EVENTS_SETTINGS_CNDTJUSTPASSED"] = "И это только что начало происходить" -- Needs review L["EVENTS_SETTINGS_CNDTJUSTPASSED_DESC"] = "Препятствует тому, чтобы событие было обработано, если состояние, сформулированное выше, только что не начало происходить." -- Needs review L["EVENTS_SETTINGS_HEADER"] = "Настройки события" -- Needs review L["EVENTS_SETTINGS_ONLYSHOWN"] = "Обрабатывать только если значок отображается" L["EVENTS_SETTINGS_ONLYSHOWN_DESC"] = "Препятствует обработке события если иконка не показана" -- Needs review L["EVENTS_SETTINGS_PASSINGCNDT"] = "Обрабатывается только если условие проходит" -- Needs review L["EVENTS_SETTINGS_PASSINGCNDT_DESC"] = "Предотвращает обработку события пока нижележащее условие не будет выполнено" -- Needs review L["EVENTS_SETTINGS_PASSTHROUGH"] = "Продолжайте для нижележащих событий" -- Needs review L["EVENT_WHILECONDITIONS"] = "Условия Триггера" -- Needs review L["EXPORT_f"] = "Экспорт %s" L["EXPORT_HEADING"] = "Экспорт" L["EXPORT_TOCOMM"] = "Игроку" L["EXPORT_TOCOMM_DESC"] = [=[Введите имя игрока в поле и выберите эту опцию чтобы переслать ему настройки. Игрок должен быть доступен для команды /whisper (та же фракция и сервер что и вы, быть в онлайне) и обладать TellMeWhen версии 4.0.0 и выше. Также Вы можете ввести "GUILD" или "RAID" (внимание на регистр) для посылке всей сваей гильдии или рейду.]=] -- Needs review L["EXPORT_TOGUILD"] = "в Гильдию" L["EXPORT_TORAID"] = "в рейд" L["EXPORT_TOSTRING"] = "В строку" L["EXPORT_TOSTRING_DESC"] = "Строка, содержащая настройки, которые впоследствии можно будет ввести в поле ввода. Чтобы ее скопировать нажмите Ctrl+C, после чего строку можно вставить туда, куда пожелаете." -- Needs review L["FALSE"] = "Неверно" L["Feared"] = "Страх" L["fGROUP"] = "Группа: %s" L["fICON"] = "Значок: %s" L["FIRE"] = "Огонь" -- Needs review L["FONTCOLOR"] = "Цвет шрифта" -- Needs review L["FONTSIZE"] = "Размер шрифта" -- Needs review L["FORWARDS_IE"] = "вперед" L["FORWARDS_IE_DESC"] = "Загрузить следующую иконку, которая была отредактирована (%s |T%s:0|t)." -- Needs review L["fPROFILE"] = "Профиль: %s" -- Needs review L["FROMNEWERVERSION"] = "Вы импортируете данные созданные в более новой версии TellMeWhen. Некоторые установки не будут работать пока вы не обновите TellMeWhen до последней версии." -- Needs review L["fTEXTLAYOUT"] = "Расположение текста: %s" -- Needs review L["GCD"] = "Глобальная перезарядка" -- Needs review L["GCD_ACTIVE"] = "GCD активен" -- Needs review L["GENERIC_NUMREQ_CHECK_DESC"] = "Установите эту опцию чтобы включить и настроить %s" -- Needs review L["GENERICTOTEM"] = "тотем %d" -- Needs review L["GROUP"] = "Группа" L["GROUPCONDITIONS"] = "Усл. группы" L["GROUPICON"] = "Группа: %s, значок: %d" L["Heals"] = "Исцеления игрока" L["HELP_BUFF_NOSOURCERPPM"] = [=[Похоже, вы пытаетесь отследить %s, которое является RPPM-бафом. Из-за ошибки Blizzard, его нельзя отследить, если у вас включена настройка %q. Отключите эту настройку если хотиет отслеживать Please disable this setting if you want this buff to be tracked properly.]=] -- Needs review L["HELP_EXPORT_DOCOPY_MAC"] = "Нажми |cff7fffffCMD+C|r , чтобы скопировать" -- Needs review L["HELP_EXPORT_DOCOPY_WIN"] = "Нажми |cff7fffffCTRL+C|r , чтобы скопировать" -- Needs review L["HELP_NOUNIT"] = "Добавьте объект!" L["HELP_NOUNITS"] = "Нужно добавить хотя бы один объект!" L["HELP_POCKETWATCH"] = [=[|TInterface\Icons\INV_Misc_PocketWatch_01:20|t - Значок часов. Этот значок отображается когда заклинание проверяемое по имени отсутствует в вашей книге заклинаний. Для отображения правильного значка измените имя заклинания на Spell ID (нажмите ЛКМ на имени в поле ввода, выберите правильное заклинание в списке подсказок и нажмите на нем ПКМ) ]=] -- Needs review L["ICON"] = "иконка" -- Needs review L["ICONALPHAPANEL_FAKEHIDDEN"] = "Всегда скрывать" L["ICONALPHAPANEL_FAKEHIDDEN_DESC"] = "Скрывает значок, оставляя его активным, что позволяет условиям других значков использовать его." -- Needs review L["ICONGROUP"] = "Значок: %s (группа: %s)" L["ICONMENU_ABSENT"] = "Отсутствует" L["ICONMENU_ADDMETA"] = "Добавить к мета-значку" -- Needs review L["ICONMENU_ANCHORTO"] = "Якорь к %s" -- Needs review L["ICONMENU_ANCHORTO_DESC"] = [=[Якорь %s к %s, чтобы всякий раз, когда %s перемещается, %s переместился вслед. Продвинутые якорные параметры настройки доступны в групповыз насторйках.]=] -- Needs review L["ICONMENU_ANCHORTO_UIPARENT"] = "Перезагружает якорь" -- Needs review L["ICONMENU_ANCHORTO_UIPARENT_DESC"] = [=[Перезагружает якорь %s назад к Вашему экрану (Исходный UI). В настоящее время привязан к %s. Продвинутые якорные параметры настройки(окружение) доступны в групповых настройках.]=] -- Needs review L["ICONMENU_APPENDCONDT"] = "Добавляет как %q состояние" -- Needs review L["ICONMENU_BAROFFS"] = [=[Это количество будет добавлено к полоске, чтобы возместить его. Полезный для пользовательских индикаторов того, когда Вы должны начать произносить заклинание чтобы воспрепятствовать спадению бафа или указать на ресурсы, требуемые для произнесения заклинания и к этому еще иметь некоторый запас для прерывания.]=] -- Needs review L["ICONMENU_BOTH"] = "Любой" L["ICONMENU_BUFF"] = "Баф" L["ICONMENU_BUFFDEBUFF"] = "Баф/Дебаф" L["ICONMENU_BUFFDEBUFF_DESC"] = "Отслеживает баффы и/или дебаффы." -- Needs review L["ICONMENU_BUFFTYPE"] = "Баф или дебаф?" L["ICONMENU_CAST"] = "Применение" L["ICONMENU_CAST_DESC"] = "Отслеживает касты и поддержания заклинаний." -- Needs review L["ICONMENU_CHECKNEXT"] = "Расширенные суб-меты" -- Needs review L["ICONMENU_CHECKNEXT_DESC"] = [=[Галочка заставит эту иконку распространить на все подходящие иконки любых мета иконок на любой уровень вместо того, чтобы прость ставить галочки на под-мета иконки так, как будто они были бы только другой обычной иконкой. Кроме того, эта иконка не будет показывать иконок, которые уже показала другая мета иконка, которая обновляет перед ними. ]=] -- Needs review L["ICONMENU_CHECKREFRESH"] = "Отслеживает обновления" -- Needs review L["ICONMENU_CHECKREFRESH_DESC"] = [=[Боевой журнал Близзардов жутко глючит когда дело доходит до обновляемых заклинаний или страха (или других заклинаний, которые ломаются после определенного количества ущерба). Боевой журнал скажет, что заклинание было обновлено когда нанесен ущерб, даже при том, что этого технически не было. Без галочки это поле отключает отслеживание обновлений, но помните, что правильные обновления будут также проигнорированы. Рекомендуется оставить эту галочку, если DRы, которые Вы проверяете, не ломаются после определенного количества ущерба.]=] -- Needs review L["ICONMENU_CHOOSENAME_ITEMSLOT_DESC"] = [=[Введите название, ID или ячейку снаряжения того, что Вы хотите отслеживать на этой иконке. Можно добавить несколько названий (любые комбинации имен, ID или ячеек снаряжения), разделяя их ';'. Ячейки снаряжения - это номера соответствующие предметам надетым на персонаже (голова, шея и т.д.). При изменении предмета в ячейке снаряжения соответствующее изменение произойдет и в значке. Shift+ЛКМ введет предметы и текст или перетащите их мышью для ввода их в это поле.]=] -- Needs review L["ICONMENU_CHOOSENAME_ORBLANK"] = "или оставьте пустым чтобы отслеживать всё" -- Needs review L["ICONMENU_CHOOSENAME_WPNENCH_DESC"] = [=[Введите название(я) оружейных энчантов для отслеживания их этой иконкой. Можете добавить несколько названий отделяя их (;). |cFFFF5959ВАЖНО|r: название энчанта должно быть введено точно так, как оно всплывает в подсказке вашего оружия когда энчант активирован (т.е. "%s", а не "%s"). ]=] -- Needs review L["ICONMENU_CHOSEICONTOEDIT"] = "Выберите иконку для редактирования:" -- Needs review L["ICONMENU_CLEU"] = "Боевое событие" L["ICONMENU_CLEU_DESC"] = [=[Отслеживает события боя. Примеры включают промахи спеллов, инстант касты, смерти, но иконка может отслеживать почти что угодно.]=] -- Needs review L["ICONMENU_CNDTIC"] = "Значок-условие" -- Needs review L["ICONMENU_CNDTIC_DESC"] = "Отслеживает состояние условий." L["ICONMENU_CNDTIC_ICONMENUTOOLTIP"] = "(%d |4Состояние:Состояния;)" -- Needs review L["ICONMENU_COMPONENTICONS"] = "Составные значки" -- Needs review L["ICONMENU_COOLDOWNCHECK"] = "Проверять восстановление?" L["ICONMENU_COOLDOWNCHECK_DESC"] = "Включить изменение цвета иконки, когда контратакующая способность на восстановлении" L["ICONMENU_COPYHERE"] = "Копировать сюда" L["ICONMENU_COUNTING"] = "Таймер работает" -- Needs review L["ICONMENU_CUSTOMTEX"] = "Пользовательская текстура" L["ICONMENU_CUSTOMTEX_DESC"] = [=[Если Вы хотите заменить текстуру этой иконки, введите Название или ID заклинания, которое имеет нужную текстуру. Вы можете ввести путь по которому находится ваша текстура, пример: "Interface/Icons/123.tga", где "123.tga" - имя файла с текстурой, "Interface/Icons/" - путь к ней. Вы можете просмотреть список динамических текстур, введя "$" (dollar sign; ALT-36). Вы можете использовать свои текстуры до тех пор, пока они находятся в каталоге в WoW, имеют формат .TGA и .BLP, имеют размер степени числа 2 (32, 64, 128, etc).]=] -- Needs review L["ICONMENU_DEBUFF"] = "Дебаф" L["ICONMENU_DISPEL"] = "Тип развеивания" L["ICONMENU_DONTREFRESH"] = "Не обновлять" -- Needs review L["ICONMENU_DONTREFRESH_DESC"] = "Ставьте галочку чтобы заставить кулдаун не перезагружать, если срабатывания триггера не происходит во время отсчета в обратном порядке." -- Needs review L["ICONMENU_DR"] = "Убывающая доходность (димишинг)" -- Needs review L["ICONMENU_DRABSENT"] = "Неуменьшенный " -- Needs review L["ICONMENU_DR_DESC"] = "Отслеживает продолжительность и степень убывающей доходности (димишинга)." -- Needs review L["ICONMENU_DRPRESENT"] = "Уменьшенный" -- Needs review L["ICONMENU_DRS"] = "Убывающая доходность (димишинг)" -- Needs review L["ICONMENU_DURATION_MAX_DESC"] = "Максимальный срок действия для отображения иконки" L["ICONMENU_DURATION_MIN_DESC"] = "Минимальная срок действия для отображения иконки" L["ICONMENU_ENABLE"] = "Включено" L["ICONMENU_FAKEMAX_DESC"] = [=[Эта настройка используется для того, чтобы вся группа иконок затухала с одинаковой скоростью, что даёт визуальную индикацию, какие таймеры истекают первыми. Установите в 0 для отключения.]=] -- Needs review L["ICONMENU_FOCUS"] = [=[Фокус ]=] L["ICONMENU_FOCUSTARGET"] = "Цель фокуса" L["ICONMENU_FRIEND"] = "Дружественный" L["ICONMENU_HIDEUNEQUIPPED"] = "Спрятать, когда слот свободен" L["ICONMENU_HIDEUNEQUIPPED_DESC"] = "При установке этой опции значок будет скрыт если проверяемый слот оружия пуст" -- Needs review L["ICONMENU_HOSTILE"] = "Враждебный" L["ICONMENU_ICD"] = "Внутренний кулдаун" L["ICONMENU_ICDBDE"] = "Баф/Дебаф/Урон/Энергия/Призыв" -- Needs review L["ICONMENU_ICD_DESC"] = "Отслеживает время восстановления проков или др. подобных эффектов" -- Needs review L["ICONMENU_ICDTYPE"] = "Срабатывает от" -- Needs review L["ICONMENU_IGNORENOMANA"] = "Игнорировать нехватку энергии" -- Needs review L["ICONMENU_IGNORENOMANA_DESC"] = [=[Ставьте галочку чтобы заставить абилку не рассматриваться как непригодную по причине нехватки ресурсов для ее использования . Полезный для способностей(абилок), таких как %s или %s]=] -- Needs review L["ICONMENU_IGNORERUNES"] = "Игнорирование рун" L["ICONMENU_IGNORERUNES_DESC"] = "Отметьте для того, чтобы считать КД готовым, если единственное, что его блокирует - КД на руну или ГКД." -- Needs review L["ICONMENU_IGNORERUNES_DESC_DISABLED"] = "Для включения опции \"Игнорировать руны\" необходимо включить опцию \"Проверять восстановление\"" -- Needs review L["ICONMENU_INVERTBARDISPLAYBAR_DESC"] = "Отметьте для того, чтобы полоска заполнялась полностью по истечении времени." -- Needs review L["ICONMENU_INVERTBARS"] = "Заполнение полосок вверх" L["ICONMENU_ITEMCOOLDOWN"] = "Кулдаун предмета" -- Needs review L["ICONMENU_ITEMCOOLDOWN_DESC"] = "Отслеживает восстановление предметов." L["ICONMENU_LIGHTWELL_DESC"] = "Отслеживает продолжительность и изменения вашего %s." -- Needs review L["ICONMENU_MANACHECK"] = "Проверять энергию?" L["ICONMENU_MANACHECK_DESC"] = "Включить изменение цвета иконки при недостатке маны/ярости/рунической силы/и т.д." L["ICONMENU_META"] = "Мета-значок" L["ICONMENU_META_DESC"] = [=[Объединяет несколько значков в один. Значки у которых установлено %q будут отображаться в мета-значке так же, как если бы они отображались самостоятельно.]=] L["ICONMENU_META_ICONMENUTOOLTIP"] = "(%d |4Иконка:Иконки;)" -- Needs review L["ICONMENU_MOUSEOVER"] = "Курсор мыши над" L["ICONMENU_MOUSEOVERTARGET"] = "Цель под курсором мыши" L["ICONMENU_MOVEHERE"] = "Переместить сюда" L["ICONMENU_NOTCOUNTING"] = "Таймер не запущен" -- Needs review L["ICONMENU_NOTREADY"] = "Не готов" L["ICONMENU_OFFS"] = "Возмещение" -- Needs review L["ICONMENU_ONFAIL"] = "Неудача" -- Needs review L["ICONMENU_ONLYBAGS"] = "Только если в сумках" -- Needs review L["ICONMENU_ONLYBAGS_DESC"] = "Ставьте галочку для отображения иконки только в случае если само изделие находится в Ваших сумках (или надето). Если разрешен 'Только если надето', то и это также принудительно включено." -- Needs review L["ICONMENU_ONLYEQPPD"] = "Только если одето" L["ICONMENU_ONLYEQPPD_DESC"] = "Установите эту опцию для отображения значка только если предмет надет на персонаже." L["ICONMENU_ONLYIFCOUNTING"] = "Показывать только если таймер активен" -- Needs review L["ICONMENU_ONLYIFCOUNTING_DESC"] = "Ставьте галочку для показа иконки, только если в настоящее время есть активный таймер, работающий на иконке со значением больше чем 0." -- Needs review L["ICONMENU_ONLYIFNOTCOUNTING"] = "Показывает только если таймер не активен" -- Needs review L["ICONMENU_ONLYINTERRUPTIBLE"] = "Только прерываемое" L["ICONMENU_ONLYINTERRUPTIBLE_DESC"] = "Установите эту опцию для показа только прерываемых заклинаний." -- Needs review L["ICONMENU_ONLYMINE"] = "Показывать только если это мое заклинание" -- Needs review L["ICONMENU_ONLYMINE_DESC"] = "При установке этой опции значок будет проверять только ваши собственные баффы/дебаффы" -- Needs review L["ICONMENU_ONLYSEEN"] = "Только если видно" -- Needs review L["ICONMENU_ONLYSEEN_DESC"] = "Отметте это, чтобы заставить иконку показать только кулдаун если объект произнес это, по крайней мере, однажды. Вы должны поставить галочку, если Вы проверяете заклинания других Классов в одной иконке." -- Needs review L["ICONMENU_ONSUCCEED"] = "Успех" -- Needs review L["ICONMENU_OOPOWER"] = "Из Мощность" L["ICONMENU_OORANGE"] = "Вне диапазона" L["ICONMENU_PETTARGET"] = "Цель питомца" L["ICONMENU_PRESENT"] = "Присутствует" L["ICONMENU_RANGECHECK"] = "Проверять расстояние до объекта?" L["ICONMENU_RANGECHECK_DESC"] = "Включить изменение цвета иконки, когда вы вне зоны досягаемости" L["ICONMENU_REACT"] = "Реакция цели" L["ICONMENU_REACTIVE"] = "Реактивный заклинания или способности" L["ICONMENU_REACTIVE_DESC"] = [=[Отслеживает удобство и простоту использования реактивных абилок. Реактивные абилки, такие как %s, %s, и %s - это абилки, которые годны к употреблению только когда соблюдены определенные условия.]=] -- Needs review L["ICONMENU_READY"] = "готов" L["ICONMENU_RUNES"] = "Восстановление руны" -- Needs review L["ICONMENU_RUNES_DESC"] = "Отслеживает восстановление рун." L["ICONMENU_SHOWCBAR_DESC"] = "Показывает полоску, наложенную на нижнюю половину иконки, которая будет отображать кулдаун/оставшуюся продожительность (или время, которое прошло если галочкой отмечено 'Заполнение полоски')," -- Needs review L["ICONMENU_SHOWPBAR_DESC"] = "Показывает полоску, наложенную на верхнюю половину иконки, которая будет отображать ресурс, необходимый для произнесения заклинания (или количество того, что у вас есть если галочкой отмечено 'Заполнение полоски')," -- Needs review L["ICONMENU_SHOWSTACKS"] = "Показать стаки" -- Needs review L["ICONMENU_SHOWSTACKS_DESC"] = "Ставьте галочку для показа числа стаков имеющейся вещи." -- Needs review L["ICONMENU_SHOWTIMER"] = "Показывать таймер" L["ICONMENU_SHOWTIMER_DESC"] = "При установке этой опции на значке будет отображаться стандартная круговая анимация восстановления" -- Needs review L["ICONMENU_SHOWTIMERTEXT"] = "Показывать значение таймера" L["ICONMENU_SHOWTIMERTEXT_DESC"] = [=[Проверка этого параметра выводит цифровое значение остающегося кулдауна/продолжительности на ионке. Применимо только если выбран параметр 'Показывать таймер' и установлен OmniCC (или аналог).]=] -- Needs review L["ICONMENU_SHOWWHEN"] = "Показать условия и нерозрачность" L["ICONMENU_SHOWWHENNONE"] = "Показать если нет результата" -- Needs review L["ICONMENU_SORTASC"] = "Низкая продолжительность" -- Needs review L["ICONMENU_SORTASC_DESC"] = "Поставьте этот флажок, чтобы расположить по приоритетам и показать заклинания с самой низкой продолжительностью." -- Needs review L["ICONMENU_SORTASC_META_DESC"] = "Поставьте этот флажок, чтобы расположить по приоритетам и показать иконки с самой маленькой продолжительностью." -- Needs review L["ICONMENU_SORTDESC"] = "Высокая продолжительность" -- Needs review L["ICONMENU_SORTDESC_DESC"] = "Поставьте этот флажок, чтобы расположить по приоритетам и показать заклинания с самой высокой продолжительностью." -- Needs review L["ICONMENU_SORTDESC_META_DESC"] = "Поставьте этот флажок, чтобы расположить по приоритетам и показать иконки с самой большой продолжительностью." -- Needs review L["ICONMENU_SORT_STACKS_ASC"] = "Мало стаков" -- Needs review L["ICONMENU_SORT_STACKS_ASC_DESC"] = "Установите этот флажок, для расстановки приоритетов и показа заклинаний с самым низким количеством стаков." -- Needs review L["ICONMENU_SORT_STACKS_DESC"] = "Много стаков" -- Needs review L["ICONMENU_SORT_STACKS_DESC_DESC"] = "Установите этот флажок, для расстановки приоритетов и показа заклинаний с самым высоким количеством стаков." -- Needs review L["ICONMENU_SPELLCAST_COMPLETE"] = "Конец произнесения залинания/Мгновенное залинание" -- Needs review L["ICONMENU_SPELLCAST_COMPLETE_DESC"] = [=[Выберите эту опцию если внутренний кулдаун начинается когда: |cff7fffff1)|r Вы заканчиваете произносить заклинание, или |cff7fffff2)|r Вы произносите мгновенное заклинание . Вы должны ввести название/ID заклинания которое вызывает внутренний кулдаун в %q поле ввода.]=] -- Needs review L["ICONMENU_SPELLCAST_START"] = "Начало произнесения залинания" -- Needs review L["ICONMENU_SPELLCAST_START_DESC"] = [=[Выберите эту опцию если внутренний кулдаун начинается когда: |cff7fffff1)|r Вы начинаете произносить заклинание. Вы должны ввести название/ID заклинания которое вызывает внутренний кулдаун в %q поле ввода.]=] -- Needs review L["ICONMENU_SPELLCOOLDOWN"] = "Кулдаун заклинания" -- Needs review L["ICONMENU_SPELLCOOLDOWN_DESC"] = "Отслеживает восстановление заклинаний." -- Needs review L["ICONMENU_SPLIT"] = "Разделится на новую группу" -- Needs review L["ICONMENU_SPLIT_DESC"] = "Создать новую группу и переместить в нее эту иконку. Большинство параметров настройки группы будут перенесены на новую группу." -- Needs review L["ICONMENU_STACKS_MAX_DESC"] = "Максимальное количество стаков, необходимое для отображения значка" -- Needs review L["ICONMENU_STACKS_MIN_DESC"] = "Минимальное количество стаков, необходимое для отображения значка" -- Needs review L["ICONMENU_STEALABLE"] = "Только возможные для снятия" -- Needs review L["ICONMENU_STEALABLE_DESC"] = "Ставьте галочку для показа только бафов, которые могут быть сняты залинанием. Лучше всего использовать ставя галочку для 'Магического' типа диспела." -- Needs review L["ICONMENU_SWAPWITH"] = "Обменять с" -- Needs review L["ICONMENU_TARGETTARGET"] = "Цель цели" L["ICONMENU_TOTEM"] = "Тотем" L["ICONMENU_TOTEM_DESC"] = "Отслеживает ваши тотемы." -- Needs review L["ICONMENU_TYPE"] = "Тип иконки" L["ICONMENU_UNITCOOLDOWN"] = "Восстановление объекта" L["ICONMENU_UNITCOOLDOWN_DESC"] = [=[Отслеживает время восстановления заклинания, предмета и т.д. у другого объекта. %s можно отслеживать используя %q в качестве имени.]=] -- Needs review L["ICONMENU_UNIT_DESC"] = [=[Введите название объекта для отслеживания. Объекты могут быть выбраны из выпадающего списка справа или добавлены вручную. Могут быть использованы стандартные имена (например, player) или имена дружественных объектов (например, %s). Множественные имена объектов должны быть разделены точкой с запятой (;). Для большей информации о объектах посетите http://www.wowpedia.org/UnitId]=] -- Needs review L["ICONMENU_UNITS"] = "Объекты" L["ICONMENU_UNITSTOWATCH"] = "Наблюдаемый объект" L["ICONMENU_UNITSUCCEED"] = "Unit's Conditions Succeed" -- Needs review L["ICONMENU_UNUSABLE"] = "Недоступно" L["ICONMENU_USABLE"] = "Доступно" L["ICONMENU_USEACTIVATIONOVERLAY"] = "Проверка активации границы" -- Needs review L["ICONMENU_USEACTIVATIONOVERLAY_DESC"] = "Отметить это, чтобы заставить наличием блестящей желтой границы вокруг действия вынудить иконку работать как используемую." -- Needs review L["ICONMENU_VEHICLE"] = "Средство передвижения" L["ICONMENU_WPNENCHANT"] = "Чары на оружии" L["ICONMENU_WPNENCHANT_DESC"] = "Отслеживает временные улучшения на оружии" -- Needs review L["ICONMENU_WPNENCHANTTYPE"] = " Для отслеживания слота оружия" L["IconModule_CooldownSweepCooldown"] = "Очистка кулдауна" -- Needs review L["IconModule_SelfIcon"] = "Иконка" -- Needs review L["IconModule_Texture_ColoredTexture"] = "текстура" -- Needs review L["ICONTOCHECK"] = "Значок для проверки" L["ICON_TOOLTIP2NEW"] = [=[|cff7fffffПКМ|r для свойств значка. |cff7fffffПКМ и тащите|r на другой значок для перемещения/копирования. |cff7fffffТащите|r заклинание или предмет на значок для быстрого назначения свойств.]=] -- Needs review L["ICON_TOOLTIP2NEWSHORT"] = "|cff7fffffПКМ|r для выбора опций иконки" -- Needs review L["ICONTYPE_DEFAULT_HEADER"] = "Инструкции" -- Needs review L["ImmuneToMagicCC"] = "Невосприимчивость к контролю" L["ImmuneToStun"] = "Невосприимчивость к эффектам оглушения" L["IMPORTERROR_FAILEDPARSE"] = "При обработке строки произошла ошибка. Убедитесь что вы полностью скопировали строку из источника." -- Needs review L["IMPORT_EXPORT"] = "Импорт/Экспорт/Восстановление" -- Needs review L["IMPORT_EXPORT_BUTTON_DESC"] = "Нажмите на этот список для импорта/экспорта значков, групп и профилей." -- Needs review L["IMPORT_EXPORT_DESC"] = [=[Нажмите на стрелку выпадающего меню справа от поля ввода чтобы импортировать/экспортировать значки, группы и профили. Импорт в или из строки, или экспорт другому игроку потребует использование этой сторки ввода. Для детального понимания просмотрите подсказку из выпадающего меню. ]=] -- Needs review L["IMPORT_FAILED"] = "Импорт не удался!" -- Needs review L["IMPORT_FROMBACKUP"] = "Из архива" L["IMPORT_FROMBACKUP_DESC"] = "Настройки, восстановленные из этого меню будут таими, какими были на: %s" -- Needs review L["IMPORT_FROMBACKUP_WARNING"] = "Архив настроек: %s" L["IMPORT_FROMCOMM"] = "От игрока" L["IMPORT_FROMCOMM_DESC"] = "Если другой пользователь поделится с вами своими настройками, вы сможете импортировать их в этом меню." L["IMPORT_FROMLOCAL"] = "Из профиля" L["IMPORT_FROMSTRING"] = "Из строки" L["IMPORT_FROMSTRING_DESC"] = [=[Строки позволяют пользователям обмениваться настройками TellMeWhen. Для импорта настроек из строки скопируйте ее в буфер обмена (Ctrl+C), нажмите Ctrl+V находясь в поле ввода, после чего вернитесь в это меню. ]=] L["IMPORT_HEADING"] = "Импорт настроек" L["IMPORT_LUA_CONFIRM"] = "Ok, импортируй это" -- Needs review L["IMPORT_LUA_DENY"] = "Об импортной операции" -- Needs review L["IMPORT_PROFILE"] = "Копировать профиль" L["IMPORT_PROFILE_NEW"] = "Создать новый профиль" L["IMPORT_PROFILE_OVERWRITE"] = "Переписать %s" L["Incapacitated"] = "Обездвижен" L["INCHEALS"] = "Входящее лечение объекта" -- Needs review L["INCHEALS_DESC"] = [=[роверяет общую сумму входящего лечения объекта (ХоТы и произносимые касты). Работает только для дружественных целей. Вражеские цели всегда будут показывать 0 входящего лечения.]=] -- Needs review L["INRANGE"] = "В диапазоне" -- Needs review L["ITEMCOOLDOWN"] = "Восстановление предмета" -- Needs review L["ITEMEQUIPPED"] = "Предмет надет" -- Needs review L["ITEMINBAGS"] = "Подсчет изделия (включает charges)" -- Needs review L["ITEMTOCHECK"] = "Предмет для проверки" -- Needs review L["ITEMTOCOMP1"] = "Первый предмет для сравнения" -- Needs review L["ITEMTOCOMP2"] = "Второй предмет для сравнения" -- Needs review L["LAYOUTDIRECTION"] = "Установка Направления" -- Needs review L["LDB_TOOLTIP1"] = "|cff7fffffЩелкните мышью|r для переключения блокировки групп" L["LDB_TOOLTIP2"] = "|cff7fffffЩелкните ПКМ|r для того чтобы показать/скрыть указанные группы" L["LEFT"] = "Влево" L["LOADERROR"] = "Дополнение TellMeWhen_Options не может быть загружено:" -- Needs review L["LOCKED"] = "Закреплено" L["LUACONDITION"] = "Lua скрипт" -- Needs review L["LUACONDITION2"] = "Состояние Lua" -- Needs review L["Magic"] = "Магия" L["MAIN"] = "Основное" L["!!Main Addon Description"] = "Визуальные, звуковые и текстовые оповещения о готовности заклинаний, способностей, наличии баффов/дебаффов и многого другого." -- Needs review L["MAINASSIST"] = "Главный помощник" -- Needs review L["MAINTANK"] = "Осн. танк" -- Needs review L["MESSAGERECIEVE"] = "%s прислал(а) вам строку данных TellMeWhen. Вы можете импортировать эти данные в TellMeWhen используя выпадающий список %q в редакторе значков." -- Needs review L["MESSAGERECIEVE_SHORT"] = "%s прислал(а) вам строку данных TellMeWhen!" -- Needs review L["META_ADDICON"] = "добавить иконку" -- Needs review L["METAPANEL_DOWN"] = "Сместить вниз" L["METAPANEL_REMOVE"] = "Удалить эту иконку" L["METAPANEL_UP"] = "Сместить вверх" L["MISCELLANEOUS"] = "Разное" -- Needs review L["MiscHelpfulBuffs"] = "Разные полезные баффы" -- Needs review L["MOON"] = "Луна" L["MP5"] = "%d MP5" -- Needs review L["MUSHROOM"] = "Гриб %d" -- Needs review L["NEWVERSION"] = "Доступна новая версия TellMeWhen: %s" -- Needs review L["NONE"] = "Ничего из нижеперечисленного" L["normal"] = "Обычный" -- Needs review L["NOTINRANGE"] = "Вне диапазона доступности" -- Needs review L["ONLYCHECKMINE"] = "Проверять только мои" -- Needs review L["ONLYCHECKMINE_DESC"] = "Установите эту опцию для проверки только своих бафов/дебафов" -- Needs review L["OUTLINE_MONOCHORME"] = "Черно-белый" L["OUTLINE_NO"] = "Без контура" L["OUTLINE_THICK"] = "Толстый контур" L["OUTLINE_THIN"] = "Тонкий контур" L["PARENTHESIS_TYPE_("] = "открывающая" -- Needs review L["PARENTHESIS_TYPE_)"] = "закрывающая" -- Needs review L["PARENTHESIS_WARNING1"] = [=[Число открывающих и закрывающих скобок не совпадает. Необходимо еще %d %s |4скобка:скобок;]=] -- Needs review L["PARENTHESIS_WARNING2"] = [=[Недостаточно открывающих скобок! Необходимо на %d больше открывающих скобок]=] -- Needs review L["PERCENTAGE"] = "Процент" -- Needs review L["PET_TYPE_CUNNING"] = "Хитрость" -- Needs review L["PET_TYPE_FEROCITY"] = "Свирепость" -- Needs review L["PET_TYPE_TENACITY"] = "Упорство" -- Needs review L["PLAYER_DESC"] = "(Вы)" -- Needs review L["Poison"] = "Яд" L["PvPSpells"] = "Масс контроль в PvP, и т.д." -- Needs review L["RaidWarningFrame"] = "Рамка предупреждения рейда" -- Needs review L["rare"] = "Редкий" -- Needs review L["rareelite"] = "Редкий Элитный" -- Needs review L["REDO"] = "Повторить" -- Needs review L["ReducedHealing"] = "Снижение эффективности исцеления" L["RESET_ICON"] = "Сброс" -- Needs review L["RESET_ICON_DESC"] = "Сбросить настройки всех этих иконок" -- Needs review L["RESIZE"] = "Изменить размер" L["RESIZE_TOOLTIP"] = "Чтобы изменить размер, нажмите и тащите " L["RIGHT"] = "Вправа" L["Rooted"] = "Корни" L["RUNES"] = "Проверить руны" -- Needs review L["RUNSPEED"] = "Скорость бега объекта" -- Needs review L["SENDSUCCESSFUL"] = "Отправлено успешно" -- Needs review L["SHAPESHIFT"] = "Изменение облика" -- Needs review L["Shatterable"] = "Разбиваемо" L["Silenced"] = "Немота" L["Slowed"] = "Замедлен" L["SORTBYNONE_DURATION"] = "Нормальная длительность" -- Needs review L["SORTBYNONE_META_DESC"] = "Если отмечено, то иконки будут проверяться в порядке, который был сформирован выше." -- Needs review L["SORTBYNONE_STACKS"] = "Обычные стаки" -- Needs review L["SOUND_CUSTOM"] = "Пользовательский звуковой файл" L["SOUND_CUSTOM_DESC"] = [=[Укажите путь к пользовательскому звуковому файлу. Приведем несколько примеров (здесь "file' - это имя звукового файла, "ext" - его расширение (поддерживаются только ogg и mp3)): - "CustomSounds\file.ext" - файл находится в папке CustomSounds которая размещена в корневой папке WoW (папке в которой находятся файл WoW.exe, папки WTF и Interface и т.д.) - "Interface\AddOns\file.ext": - файл находится в папке AddOns - "file.ext": - файл находится в в корневой папке WoW ВАЖНО: необходимо перезапустить WoW для распознавания файлов которых до запуска не было.]=] -- Needs review L["SOUNDERROR1"] = "Файл должен иметь расширение!" -- Needs review L["SOUNDERROR2"] = "Файлы в формате WAV не поддерживаются WoW 4.0+" -- Needs review L["SOUNDERROR3"] = "Поддерживаются только файлы в формате OGG и MP3." -- Needs review L["SOUND_EVENT_DISABLEDFORTYPE"] = "Недоступно" -- Needs review L["SOUND_EVENT_NOEVENT"] = "Ненастроенное событие" -- Needs review L["SOUND_EVENT_ONCLEU_DESC"] = "Это событие срабатывает, когда событие боя, отслеживаемое иконкой случается." -- Needs review L["SOUND_EVENT_ONDURATION"] = "При изменении длительности" -- Needs review L["SOUND_EVENT_ONDURATION_DESC"] = [=[Это событие возникает когда изменяется продолжительность таймера иконки. Поскольку это событие имеет место каждый раз, когда иконка обновляется во время работы таймера, то следует установить условие, а событие будет иметь место только когда состояние того условия изменится.]=] -- Needs review L["SOUND_EVENT_ONFINISH"] = "При окончании" L["SOUND_EVENT_ONFINISH_DESC"] = [=[Это событие будет запущено по окончании времени восстановления заклинания/предмета, спадении баффа и т.п. Внимание: обработчик этого события не исполняется после событий "При отображении" или "При сокрытии"]=] -- Needs review L["SOUND_EVENT_ONHIDE"] = "При скрытии" L["SOUND_EVENT_ONHIDE_DESC"] = "Это событие происходит при скрытии значка (даже если установлена опция %q)" -- Needs review L["SOUND_EVENT_ONSHOW"] = "При отображении" L["SOUND_EVENT_ONSHOW_DESC"] = "Это событие происходит при отображении значка (даже если установлена опция %q)" -- Needs review L["SOUND_EVENT_ONSPELL"] = "При изменении заклинания" -- Needs review L["SOUND_EVENT_ONSPELL_DESC"] = "Это событие происходит при смене заклинания/предмета/и т.п., информация о котором отображается на этом значке." -- Needs review L["SOUND_EVENT_ONSTACK_DESC"] = [=[Это событие включается когда отслеживаемые стаки или предмет изменяют состояние. Это включает число уменьшения для %s иконок]=] -- Needs review L["SOUND_EVENT_ONSTART_DESC"] = "Это событие случается когда КД становится становится недоступным, бафф/дебаф применен и т.п." -- Needs review L["SOUND_EVENT_ONUNIT"] = "При изменении объекта" L["SOUND_EVENT_ONUNIT_DESC"] = "Это событие происходит при изменении состояния объекта, отображаемого на этом значке." -- Needs review L["SOUND_SOUNDTOPLAY"] = "Звук для воспроизведения" -- Needs review L["SOUND_TAB"] = "Звук" -- Needs review L["SOUND_TAB_DESC"] = "Назначьте звук для проигрывания.Можно указать звук от LibSharedMedia, или звуковой файл." -- Needs review L["SPEED"] = "Скорость объекта" -- Needs review L["SpeedBoosts"] = "Повышения скорости" -- Needs review L["SPELLCOOLDOWN"] = "Кулдаун заклинания" -- Needs review L["SPELLTOCHECK"] = "Заклинание для проверки" L["STACKS"] = "Стаки" -- Needs review L["STANCE"] = "Стойка" -- Needs review L["STRATA_BACKGROUND"] = "Фон" L["STRATA_DIALOG"] = "Окно настроек" L["STRATA_FULLSCREEN"] = "Полный экран" L["STRATA_FULLSCREEN_DIALOG"] = "Полноэкранное окно настроек" -- Needs review L["STRATA_HIGH"] = "Высокая" L["STRATA_LOW"] = "Низкая" L["STRATA_MEDIUM"] = "Средняя" L["STRATA_TOOLTIP"] = "Подсказка" L["Stunned"] = "Оглушен" L["SUG_BUFFEQUIVS"] = "Эквиваленты бафов" -- Needs review L["SUG_CLASSSPELLS"] = "Известные заклинания игрока/питомца" -- Needs review L["SUG_DEBUFFEQUIVS"] = "Эквиваленты дебафов" -- Needs review L["SUG_DISPELTYPES"] = "Типы рассеивания заклинаний" -- Needs review L["SUGGESTIONS"] = "Предложения:" -- Needs review L["SUG_INSERT_ANY"] = "|cff7fffffНажмите|r" L["SUG_INSERTEQUIV"] = "%s вставить эквивалентность" -- Needs review L["SUG_INSERTERROR"] = "%s чтобы вставить сообщение об ошибке" -- Needs review L["SUG_INSERTID"] = "%s чтобы добавить по ID" -- Needs review L["SUG_INSERTITEMSLOT"] = "%s чтобы добавить как ID ячейки снаряжения" -- Needs review L["SUG_INSERT_LEFT"] = "|cff7fffffНажмите ЛКМ|r" L["SUG_INSERTNAME"] = "%s чтобы добавить по имени" -- Needs review L["SUG_INSERT_RIGHT"] = "|cff7fffffНажмите ПКМ|r" L["SUG_INSERTTEXTSUB"] = "%s для ввода признака" -- Needs review L["SUG_MISC"] = "Смешанный" -- Needs review L["SUG_NPCAURAS"] = "Известные баффы/дебаффы НПЦ" -- Needs review L["SUG_PATTERNMATCH_FISHINGLURE"] = "Приманка %(рыбная ловля %+%d+%)" L["SUG_PATTERNMATCH_SHARPENINGSTONE"] = "Оружие заточено %(%+%d+ к урону)" L["SUG_PATTERNMATCH_WEIGHTSTONE"] = "Оружие утяжелено %(%+%d+ к урону)" L["SUG_PLAYERAURAS"] = "Известные баффы/дебаффы игроков/питомцев" -- Needs review L["SUG_PLAYERSPELLS"] = "Ваши заклинания" -- Needs review L["SUG_TOOLTIPTITLE_TEXTSUBS"] = [=[Следующее - это признаки, которые Вы можете захотеть использовать в этой текстовой подсказке. Использование подстановки заставит заменить их соответствующими данными везде, где они отражаются. Для дополнительной информации об этих признаках, и большего их количества, щелкните по этой кнопке. Нажатие на ввход вставит его в строку ввода.]=] -- Needs review L["SUN"] = "Солнце" L["TEXTLAYOUTS_DEFAULTS_BINDINGLABEL"] = "Привязка/Ярлык" -- Needs review L["TEXTLAYOUTS_DEFAULTS_ICON1"] = "Расположение иконки 1" -- Needs review L["TEXTLAYOUTS_DEFAULTS_STACKS"] = "Стаки" -- Needs review L["TEXTLAYOUTS_DEFAULTTEXT"] = "Текст по умолчанию" -- Needs review L["TEXTLAYOUTS_DEFAULTTEXT_DESC"] = "Отредактируйте текст по умолчанию, который будет использоваться на иконке" -- Needs review L["TEXTLAYOUTS_DELETELAYOUT"] = "Удалить Расположение" -- Needs review L["TEXTLAYOUTS_fLAYOUT"] = "Расположение текста: %s" -- Needs review L["TEXTLAYOUTS_SETTEXT"] = "Введите текст" -- Needs review L["TEXTLAYOUTS_SKINAS"] = "Шкурка как" -- Needs review L["TEXTLAYOUTS_SKINAS_COUNT"] = "Текст стака" -- Needs review L["TEXTLAYOUTS_SKINAS_HOTKEY"] = "Привязанный текст" -- Needs review L["TEXTLAYOUTS_SKINAS_NONE"] = "Нет" -- Needs review L["TEXTLAYOUTS_STRING_COPYMENU"] = "Скопировать" -- Needs review L["TEXTLAYOUTS_STRING_SETDEFAULT"] = "По умолчанию" -- Needs review L["TEXTLAYOUTS_UNNAMED"] = "<без имени>" -- Needs review L["Tier11Interrupts"] = "Прерывания Тира 11" -- Needs review L["TOP"] = "Вверху" L["TOPLEFT"] = "Вверху слева" L["TOPRIGHT"] = "Вверху справа" L["TOTEMS"] = "Тотемы для проверки" -- Needs review L["TRUE"] = "Верно" L["UIPANEL_BARTEXTURE"] = "Текстура полосы" L["UIPANEL_COLUMNS"] = "Столбцы" L["UIPANEL_DELGROUP"] = "Удалить эту группу" L["UIPANEL_DRAWEDGE"] = "Подсвечивать рамку таймера" L["UIPANEL_DRAWEDGE_DESC"] = "Подсвечивать рамку таймера восстановления для улучшения видимости" L["UIPANEL_EFFTHRESHOLD"] = "Порог эффективности защитных заклинаний (бафов)" -- Needs review L["UIPANEL_EFFTHRESHOLD_DESC"] = "Определяет минимальное количество бафов/дебафов для переключения на более эффективный способ их проверки при наличии большого их количества. Не забудьте, что как только количество проверяемых аур превышает это число, более старые ауры будут расположены по приоритетам вместо порядка, основанного на последовательности их получения." -- Needs review L["UIPANEL_FONT_DESC"] = "Шрифт для отображения значения суммирования эффекта на иконке." L["UIPANEL_FONTFACE"] = "Шрифт" -- Needs review L["UIPANEL_FONT_OUTLINE"] = "Контур шрифта" L["UIPANEL_FONT_SIZE"] = "Размер шрифта" L["UIPANEL_FONT_XOFFS"] = "Смещение по X" L["UIPANEL_FONT_YOFFS"] = "Смещение по Y" L["UIPANEL_GLYPH"] = "Символ" -- Needs review L["UIPANEL_GROUPNAME"] = "Переименовать группу" L["UIPANEL_GROUPRESET"] = "Сбросить расположение" L["UIPANEL_GROUPS"] = "Группы" L["UIPANEL_GROUPSORT"] = "Сортировка иконок" -- Needs review L["UIPANEL_GROUPSORT_alpha"] = "Нерозрачность" -- Needs review L["UIPANEL_GROUPSORT_alpha_DESC"] = "Сортировать группу по непрозрачности ее иконок" -- Needs review L["UIPANEL_GROUPSORT_duration"] = "Продолжительность" -- Needs review L["UIPANEL_GROUPSORT_duration_DESC"] = "Сортирует группу по продолжительности, оставшейся на этих иконках" -- Needs review L["UIPANEL_GROUPSORT_id"] = "ID иконки" -- Needs review L["UIPANEL_GROUPSORT_id_DESC"] = "Сортирует группу по ID номерам ее иконок" -- Needs review L["UIPANEL_GROUPSORT_shown"] = "Показанная" -- Needs review L["UIPANEL_GROUPSORT_shown_DESC"] = "Сортирует группу по показавщимся иконкам. " -- Needs review L["UIPANEL_ICONS"] = "Значки" -- Needs review L["UIPANEL_ICONSPACING"] = "Промежуток между значками" L["UIPANEL_ICONSPACING_DESC"] = "Расстояние на котором значки расположены друг от друга в группе" L["UIPANEL_LEVEL"] = "Уровень фрейма" -- Needs review L["UIPANEL_LOCK"] = "Заблокировать группу" L["UIPANEL_LOCK_DESC"] = "Заблокировать возможность перемещения или изменения размера группы." L["UIPANEL_LOCKUNLOCK"] = "Заблокировать/разблокировать аддон" L["UIPANEL_MAINOPT"] = "Основные параметры" L["UIPANEL_ONLYINCOMBAT"] = "Показывать только в бою" L["UIPANEL_POINT"] = "Точка" -- Needs review L["UIPANEL_POSITION"] = "Расположение" L["UIPANEL_PRIMARYSPEC"] = "Первый набор талантов" L["UIPANEL_PTSINTAL"] = "Очков в таланте" L["UIPANEL_RELATIVEPOINT"] = "Относительная точка" -- Needs review L["UIPANEL_RELATIVETO"] = "Относительно" -- Needs review L["UIPANEL_RELATIVETO_DESC"] = "Введите '/framestack' для переключения с заголовка, содержащего список всех фреймов которые Вы закончили с помощью мыши, и их имен, на вставку этого диалога." -- Needs review L["UIPANEL_ROWS"] = "Строки" L["UIPANEL_SCALE"] = "Масштаб" L["UIPANEL_SECONDARYSPEC"] = "Второй набор талантов" L["UIPANEL_SPEC"] = "Набор талантов" L["UIPANEL_SPECIALIZATIONROLE_DESC"] = "Проверяет роль (танк, хил или ДД) вашего текущей талантной специализации" -- Needs review L["UIPANEL_STRATA"] = "Экранная глубина" -- Needs review L["UIPANEL_SUBTEXT2"] = [=[Значки работают когда они заблокированы. Когда разблокированы, вы можете перемещать группы значков и изменять их размер, а так же настраивать отдельные значки правым щелчком мыши. Для блокировки/разблокировки аддона наберите /tellmewhen or /tmw.]=] -- Needs review L["UIPANEL_TOOLTIP_COLUMNS"] = "Установить число столбцов в этой группе" L["UIPANEL_TOOLTIP_GROUPRESET"] = "Сбросить расположение и масштаб этой группы" L["UIPANEL_TOOLTIP_ONLYINCOMBAT"] = "Показывать эту группу только в бою" L["UIPANEL_TOOLTIP_ROWS"] = "Установить число строк в этой группе" L["UIPANEL_TOOLTIP_UPDATEINTERVAL"] = "Частота (в секундах) проверки параметров и условий значков. Значение 0 означает максимально быструю проверку. Внимание: маленькие значения могут сильно снизить частоту кадров на слабых компьютерах." -- Needs review L["UIPANEL_TREE_DESC"] = "Проверка позволяет показать эту группу, когда это дерево талантов активно, или, без проверки, чтобы заставить ее исчезнуть, когда оно не активно." -- Needs review L["UIPANEL_UPDATEINTERVAL"] = "Интервал обновления" L["UIPANEL_WARNINVALIDS"] = "Предупреждать о недействительных иконках" L["UNDO"] = "Отменить" -- Needs review L["UNITTWO"] = "Второй объект" L["UNKNOWN_ICON"] = "<Неизвестная/Недоступная иконка>" -- Needs review L["UNKNOWN_UNKNOWN"] = "<Неизвестно ???>" -- Needs review L["UNNAMED"] = "((Без названия))" -- Needs review L["VALIDITY_CONDITION2_DESC"] = "#%d состояние" -- Needs review L["VALIDITY_ISINVALID"] = "недействительно" -- Needs review L["WARN_DRMISMATCH"] = [=[Внимание! Вы проверяете убывающую эффективность залинаний из двух различных известных категорий. Все заклинания обязаны быть из одной убывающей категории чтобы иконка фунционировала должным образом. Были обнаружены следующие категории и заклинания :]=] -- Needs review L["WATER"] = "Вода" -- Needs review L["worldboss"] = "Ворлд Босс" -- Needs review
--====================================================================-- -- dmc_ui/dmc_widget/widget_background/nice_slice_view.lua -- -- Documentation: http://docs.davidmccuskey.com/ --====================================================================-- --[[ The MIT License (MIT) Copyright (c) 2015 David McCuskey Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --]] --====================================================================-- --== DMC Corona Widgets : 9-Slice Background View --====================================================================-- -- Semantic Versioning Specification: http://semver.org/ local VERSION = "0.1.0" --====================================================================-- --== DMC Widgets Setup --====================================================================-- local dmc_ui_data = _G.__dmc_ui local dmc_ui_func = dmc_ui_data.func local ui_find = dmc_ui_func.find --====================================================================-- --== DMC Widgets : new9SliceBackground --====================================================================-- --====================================================================-- --== Imports local Objects = require 'dmc_objects' local uiConst = require( ui_find( 'ui_constants' ) ) local WidgetBase = require( ui_find( 'core.widget' ) ) --====================================================================-- --== Setup, Constants local newImage = display.newImage --== To be set in initialize() local dUI = nil --====================================================================-- --== Support Functions local function loadSpriteSheet( info, image ) local spriteInfo = require( info ) return graphics.newImageSheet( image, spriteInfo:getSheet() ) end --====================================================================-- --== 9-Slice Background View Class --====================================================================-- --- Background 9-Slice View Module. -- -- @classmod Widget.Background.9Slice -- @usage -- dUI = require 'dmc_ui' -- widget = dUI.new9SliceBackground() local NineSliceView = newClass( WidgetBase, {name="9-Slice Background View"} ) --- Class Constants. -- @section --== Class Constants NineSliceView.TYPE = uiConst.NINE_SLICE --== Theme Constants NineSliceView.STYLE_CLASS = nil -- added later NineSliceView.STYLE_TYPE = uiConst.NINE_SLICE -- TODO: hook up later -- NineSliceView.DEFAULT = 'default' -- NineSliceView.THEME_STATES = { -- NineSliceView.DEFAULT, -- } --======================================================-- -- Start: Setup DMC Objects --== Init function NineSliceView:__init__( params ) -- print( "NineSliceView:__init__", params ) params = params or {} self:superCall( '__init__', params ) --==-- --== Create Properties ==-- -- properties stored in Class self._sheet = nil self._spriteSheet_dirty=true -- properties stored in Style self._offsetLeft_dirty=true self._offsetRight_dirty=true self._offsetTop_dirty=true self._offsetBottom_dirty=true self._sheetInfo_dirty=true self._sheetImage_dirty=true self._spriteFrames_dirty=true -- virtual self._sliceLayout_dirty=true self._sliceX_dirty=true self._sliceY_dirty=true --== Object References ==-- -- display group for slices self._dgSlice = nil -- image slices self._tl = nil self._tm = nil self._tr = nil self._ml = nil self._mm = nil self._mr = nil self._bl = nil self._bm = nil self._br = nil end --[[ function NineSliceView:__undoInit__() -- print( "NineSliceView:__undoInit__" ) --==-- self:superCall( '__undoInit__' ) end --]] --== createView function NineSliceView:__createView__() -- print( "NineSliceView:__createView__" ) self:superCall( '__createView__' ) --==-- local dg = display.newGroup() self._dgSlice = dg self.view:insert( 2, dg ) -- insert between layers end function NineSliceView:__undoCreateView__() -- print( "NineSliceView:__undoCreateView__" ) self._dgSlice:removeSelf() self._dgSlice=nil --==-- self:superCall( '__undoCreateView__' ) end --== initComplete --[[ function NineSliceView:__initComplete__() -- print( "NineSliceView:__initComplete__" ) self:superCall( '__initComplete__' ) --==-- end function NineSliceView:__undoInitComplete__() --print( "NineSliceView:__undoInitComplete__" ) --==-- self:superCall( '__undoInitComplete__' ) end --]] -- END: Setup DMC Objects --======================================================-- --====================================================================-- --== Static Methods function NineSliceView.initialize( manager ) -- print( "NineSliceView.initialize" ) dUI = manager local Style = dUI.Style local StyleFactory = Style.BackgroundFactory NineSliceView.STYLE_CLASS = StyleFactory.NineSlice Style.registerWidget( NineSliceView ) end --====================================================================-- --== Public Methods -- none --====================================================================-- --== Private Methods function NineSliceView:_adjustSliceLayout( width, height, off ) -- print( "NineSliceView:_adjustSliceLayout", width, height ) local leftW = self._tl.width-off.L local rightW = self._tr.width-off.R local midW = width - leftW - rightW local topH = self._tl.height-off.T local bottomH = self._bl.height-off.B local midH = height - topH - bottomH - off.T local o, tmp, tmp2, s --== Top o = self._tl o.x, o.y = 0-off.L, 0-off.T tmp = o o = self._tm o.x, o.y = tmp.x+tmp.width, tmp.y s = midW / o.width o.width = midW tmp2 = o o = self._tr o.x, o.y = tmp2.x+tmp2.width, tmp.y --== Middle tmp = self._tl x = 0-off.L o = self._ml o.height = midH o.x, o.y = tmp.x, tmp.y+tmp.height tmp = o o = self._mm o.width, o.height = midW, midH o.x, o.y = tmp.x+tmp.width, tmp.y tmp2 = o o = self._mr o.height = midH o.x, o.y = tmp2.x+tmp2.width, tmp.y --== Bottom tmp = self._ml o = self._bl o.x, o.y = tmp.x, tmp.y+tmp.height tmp = o o = self._bm o.width = midW o.x, o.y = tmp.x+tmp.width, tmp.y tmp2 = o o = self._br o.x, o.y = tmp2.x+tmp2.width, tmp.y end function NineSliceView:_removeImageSlices() -- print( "NineSliceView:_removeImageSlices" ) local o o = self._tl if o then o:removeSelf() self._tl = nil end o = self._tm if o then o:removeSelf() self._tm = nil end o = self._tr if o then o:removeSelf() self._tr = nil end o = self._ml if o then o:removeSelf() self._ml = nil end o = self._mm if o then o:removeSelf() self._mm = nil end o = self._mr if o then o:removeSelf() self._mr = nil end o = self._bl if o then o:removeSelf() self._bl = nil end o = self._bm if o then o:removeSelf() self._bm = nil end o = self._br if o then o:removeSelf() self._br = nil end end function NineSliceView:_createImageSlices( sheet, frames ) -- print( "NineSliceView:_createImageSlices", sheet, frames ) local dg = self._dgSlice self:_removeImageSlices() -- do middle pieces first -- put on lower layer for overlap -- TL o = newImage( sheet, frames.topLeft ) o.anchorX, o.anchorY = 0,0 dg:insert( o ) self._tl = o -- TM o = newImage( sheet, frames.topMiddle ) o.anchorX, o.anchorY = 0,0 dg:insert( o ) self._tm = o -- TR o = newImage( sheet, frames.topRight ) o.anchorX, o.anchorY = 0,0 dg:insert( o ) self._tr = o -- ML o = newImage( sheet, frames.middleLeft ) o.anchorX, o.anchorY = 0,0 dg:insert( o ) self._ml = o -- MM o = newImage( sheet, frames.middleMiddle ) o.anchorX, o.anchorY = 0,0 dg:insert( o ) self._mm = o -- MR o = newImage( sheet, frames.middleRight ) o.anchorX, o.anchorY = 0,0 dg:insert( o ) self._mr = o -- BL o = newImage( sheet, frames.bottomLeft ) o.anchorX, o.anchorY = 0,0 dg:insert( o ) self._bl = o -- BM o = newImage( sheet, frames.bottomMiddle ) o.anchorX, o.anchorY = 0,0 dg:insert( o ) self._bm = o -- BR o = newImage( sheet, frames.bottomRight ) o.anchorX, o.anchorY = 0,0 dg:insert( o ) self._br = o end function NineSliceView:__commitProperties__() -- print( 'NineSliceView:__commitProperties__' ) local style = self.curr_style local view = self.view if self._sheetInfo_dirty or self._sheetImage_dirty then self._sheet = loadSpriteSheet( style.sheetInfo, style.sheetImage ) self._sheetInfo_dirty=false self._sheetImage_dirty=false self._spriteSheet_dirty=true end if self._spriteSheet_dirty then self:_createImageSlices( self._sheet, style.spriteFrames ) self._spriteSheet_dirty=false end -- x/y if self._x_dirty then view.x = self._x self._x_dirty = false end if self._y_dirty then view.y = self._y self._y_dirty = false end if self._width_dirty then self._width_dirty=false self._sliceLayout_dirty=true self._sliceX_dirty=true end if self._height_dirty then self._height_dirty=false self._sliceLayout_dirty=true self._sliceY_dirty=true end if self._sliceLayout_dirty then local offsets = { L=style.offsetLeft, R=style.offsetRight, T=style.offsetTop, B=style.offsetBottom, } self:_adjustSliceLayout( style.width, style.height, offsets ) self._sliceLayout_dirty=false end -- anchorX/anchorY if self._anchorX_dirty then self._anchorX_dirty=false self._sliceX_dirty=true end if self._anchorY_dirty then self._anchorY_dirty=false self._sliceY_dirty=true end if self._sliceX_dirty then local dg = self._dgSlice local anchorX = style.anchorX local width = style.width local offsetLeft, offsetRight = style.offsetLeft, style.offsetRight local anchor = width*anchorX dg.x = self._x - anchor self._sliceX_dirty=false end if self._sliceY_dirty then local dg = self._dgSlice local anchorY = style.anchorY local height = style.height local offsetTop, offsetBottom = style.offsetTop, style.offsetBottom local realH = height - (offsetTop + offsetBottom) local anchor = height*anchorY dg.y = self._y - anchor self._sliceY_dirty=false end end --====================================================================-- --== Event Handlers function NineSliceView:stylePropertyChangeHandler( event ) -- print( "NineSliceView:stylePropertyChangeHandler", event ) local style = event.target local etype= event.type local property= event.property local value = event.value -- print( "Style Changed", etype, property, value ) if etype==style.STYLE_RESET then self._debugOn_dirty = true self._width_dirty=true self._height_dirty=true self._anchorX_dirty=true self._anchorY_dirty=true self._offsetLeft_dirty=true self._offsetRight_dirty=true self._offsetTop_dirty=true self._offsetBottom_dirty=true self._sheetInfo_dirty=true self._sheetImage_dirty=true self._spriteFrames_dirty=true self._sliceLayout_dirty=true self._sliceX_dirty=true self._sliceY_dirty=true self._spriteSheet_dirty=true property = etype else if property=='debugActive' then self._debugOn_dirty=true elseif property=='width' then self._width_dirty=true elseif property=='height' then self._height_dirty=true elseif property=='anchorX' then self._anchorX_dirty=true elseif property=='anchorY' then self._anchorY_dirty=true elseif property=='spriteFrames' then self._spriteFrames_dirty=true elseif property=='offsetLeft' then self._offsetLeft_dirty=true elseif property=='offsetRight' then self._offsetRight_dirty=true elseif property=='offsetTop' then self._offsetTop_dirty=true elseif property=='offsetBottom' then self._offsetBottom_dirty=true elseif property=='sheetInfo' then self._sheetInfo_dirty=true elseif property=='sheetImage' then self._sheetImage_dirty=true end end self:__invalidateProperties__() self:__dispatchInvalidateNotification__( property, value ) end return NineSliceView
-- base16-vim (https://github.com/chriskempson/base16-vim) -- by Chris Kempson (http://chriskempson.com) -- Adapted by Max Rossmannek (https://gitlab.com/mrossinek) -- Colors were adapted from the PaperColor and OceanicNext schemes -- GUI color definitions local gui00 = "#1b1b1b" local gui01 = "#343434" local gui02 = "#4f4f4f" local gui03 = "#656565" local gui04 = "#a7a7a7" local gui05 = "#c0c0c0" local gui06 = "#d3d3d3" local gui07 = "#e9e9e9" local gui08 = "#c62828" local gui09 = "#db6827" local gui0A = "#f0a825" local gui0B = "#558b2e" local gui0C = "#00838f" local gui0D = "#1565c1" local gui0E = "#8e42be" local gui0F = "#ab7957" -- Neovim terminal colors vim.g.terminal_color_0 = "#2c2c2c" vim.g.terminal_color_1 = "#c62828" vim.g.terminal_color_2 = "#558b2e" vim.g.terminal_color_3 = "#f9a825" vim.g.terminal_color_4 = "#1565c1" vim.g.terminal_color_5 = "#8e42be" vim.g.terminal_color_6 = "#00838f" vim.g.terminal_color_7 = "#ffffff" vim.g.terminal_color_8 = "#969694" vim.g.terminal_color_9 = "#f15250" vim.g.terminal_color_10 = "#86bd47" vim.g.terminal_color_11 = "#f8e63a" vim.g.terminal_color_12 = "#77b2f6" vim.g.terminal_color_13 = "#b933a8" vim.g.terminal_color_14 = "#25c3dc" vim.g.terminal_color_15 = "#ffffff" vim.g.terminal_color_background = "#2c2c2c" vim.g.terminal_color_foreground = "#ffffff" vim.cmd[[hi clear]] vim.cmd[[syntax reset]] vim.g.colors_name = "mrossinek" -- Highlight Functions and Color definitions local function high_clear(group) vim.api.nvim_command('hi! clear ' .. group) end local function high_link(group, link) vim.api.nvim_command('hi! link ' .. group .. ' ' .. link) end local function high_blend(group, blend) vim.api.nvim_command('hi ' .. group .. ' blend=' .. blend) end local function highlight(group, style) local fg = ' guifg=NONE' local bg = ' guibg=NONE' local sp = ' guisp=NONE' local blend = nil local attr_list = {} for attr, value in pairs(style) do if attr == 'foreground' then fg = ' guifg=' .. value elseif attr == 'background' then bg = ' guibg=' .. value elseif attr == 'special' then sp = ' guisp=' .. value elseif attr == 'blend' then blend = value elseif value then table.insert(attr_list, attr) end end local attrs = ' gui=' if #attr_list > 0 then attrs = attrs .. table.concat(attr_list, ',') else attrs = attrs .. 'NONE' end high_clear(group) vim.api.nvim_command( 'hi! ' .. group .. fg .. bg .. sp .. attrs ) if blend then high_blend(group, blend) end end local function apply_highlight(groups) for group, styles in pairs(groups) do highlight(group, styles) end end -- named colors local named_colors = { Grey = {foreground = gui04}, Red = {foreground = gui08}, Orange = {foreground = gui09}, Yellow = {foreground = gui0A}, Green = {foreground = gui0B}, Aqua = {foreground = gui0C}, Blue = {foreground = gui0D}, Purple = {foreground = gui0E}, Brown = {foreground = gui0F}, } apply_highlight(named_colors) -- basic UI local basic_ui = { Bold = {bold = true}, ColorColumn = {background = gui00}, Conceal = {foreground = gui0D}, Cursor = {foreground = gui00, background = gui05}, CursorColumn = {background = gui00}, CursorLine = {background = gui00}, CursorLineNr = {foreground = gui0A, background = gui01}, Debug = {foreground = gui08}, Directory = {foreground = gui0D}, Error = {foreground = gui00, background = gui08}, ErrorMsg = {foreground = gui08, background = gui00}, Exception = {foreground = gui08}, FloatBorder = {foreground = gui0E}, FoldColumn = {foreground = gui0C, background = gui01}, Folded = {foreground = gui01, background = gui03}, IncSearch = {foreground = gui01, background = vim.g.terminal_color_3}, Italic = {italic = true}, LineNr = {foreground = gui03, background = gui01}, Macro = {foreground = gui08}, MatchParen = {background = gui03}, ModeMsg = {foreground = gui0B}, MoreMsg = {foreground = gui0B}, NonText = {foreground = gui03}, Normal = {foreground = gui06}, NormalFloat = {foreground = gui06}, PMenu = {foreground = gui05, background = gui01}, PMenuSel = {foreground = gui0C, background = gui05, bold = true, blend = 0}, Question = {foreground = gui0D}, QuickFixLine = {background = gui01}, Search = {foreground = gui01, background = vim.g.terminal_color_11}, SignColumn = {foreground = gui03, background = gui01}, SpecialKey = {foreground = gui03}, SpellBad = {foreground = gui08, undercurl = true, special = gui08}, SpellCap = {foreground = gui0D, undercurl = true, special = gui0D}, SpellLocal = {foreground = gui0C, undercurl = true, special = gui0C}, SpellRare = {foreground = gui0E, undercurl = true, special = gui0E}, StatusLine = {foreground = gui04, background = gui02}, StatusLineNC = {foreground = gui03, background = gui01}, Substitute = {foreground = gui01, background = gui0A}, Strikethrough = {strikethrough = true}, TabLine = {foreground = gui04}, TabLineFill = {foreground = gui01}, TabLineSel = {foreground = gui0C, bold = true}, Title = {foreground = gui0D, bold = true}, TooLong = {foreground = gui08}, Underlined = {underline = true}, VertSplit = {foreground = gui02, background = gui02}, Visual = {background = gui02}, VisualNOS = {foreground = gui08}, WarningMsg = {foreground = gui08}, WildMenu = {foreground = gui08, background = gui0A}, } apply_highlight(basic_ui) -- Syntax highlighting local syntax = { Boolean = {foreground = gui09}, Character = {foreground = gui08}, Comment = {foreground = gui04, italic = true}, Conditional = {foreground = gui0E}, Constant = {foreground = gui09}, Define = {foreground = gui0E}, Delimiter = {foreground = gui0F}, Float = {foreground = gui09}, Function = {foreground = gui0D}, Identifier = {foreground = gui08}, Include = {foreground = gui0D}, Keyword = {foreground = gui0E}, Label = {foreground = gui0A}, Number = {foreground = gui09}, Operator = {foreground = gui05}, PreProc = {foreground = gui0A}, Repeat = {foreground = gui0A}, Special = {foreground = gui0C}, SpecialChar = {foreground = gui0F}, Statement = {foreground = gui0D}, StorageClass = {foreground = gui0A}, String = {foreground = gui0B}, Structure = {foreground = gui0E}, Tag = {foreground = gui0A}, Todo = {foreground = gui0A}, Type = {foreground = gui0A}, Typedef = {foreground = gui0A}, } apply_highlight(syntax) -- Treesitter local treesitter = { TSURI = {foreground = gui08}, } apply_highlight(treesitter) -- LSP local lsp = { DiagnosticError = {foreground = gui08}, DiagnosticHint = {foreground = gui06}, DiagnosticInformation = {foreground = gui0C}, DiagnosticSignError = {foreground = gui08, background = gui01}, DiagnosticSignHint = {foreground = gui06, background = gui01}, DiagnosticSignInformation = {foreground = gui0C, background = gui01}, DiagnosticSignWarning = {foreground = gui0A, background = gui01}, DiagnosticWarning = {foreground = gui0A}, LspSignatureActiveParameter = {foreground = gui0C, italic = true}, } apply_highlight(lsp) high_link("LspDiagnosticsError" , "DiagnosticError") high_link("LspDiagnosticsHint" , "DiagnosticHint") high_link("LspDiagnosticsInformation" , "DiagnosticInformation") high_link("LspDiagnosticsWarning" , "DiagnosticWarning") high_link("LspDiagnosticsSignError" , "DiagnosticSignError") high_link("LspDiagnosticsSignHint" , "DiagnosticSignHint") high_link("LspDiagnosticsSignInformation" , "DiagnosticSignInformation") high_link("LspDiagnosticsSignWarning" , "DiagnosticSignWarning") -- diff local diff_add = "#2a4517" local diff_change = "#404040" local diff_delete = "#631414" local diff_text = "#0b3260" local diff = { DiffAdd = {background = diff_add}, DiffAdded = {background = diff_add}, DiffChange = {background = diff_change}, DiffDelete = {background = diff_delete}, DiffFile = {background = diff_delete}, DiffLine = {background = diff_text}, DiffNewFile = {background = diff_add}, DiffRemoved = {background = diff_delete}, DiffText = {background = diff_text}, } apply_highlight(diff) -- languages local languages = {} -- will be re-added from previous config as seen fit -- plugins local plugins = {} plugins.coveragepy = { NoCoverage = {foreground = gui08, background = gui01, bold = true}, NoBranchCoverage = {foreground = gui0A, background = gui01, bold = true}, } apply_highlight(plugins.coveragepy) plugins.signs = { GitSignsAdd = {foreground = gui0B, background = gui01}, GitSignsAddNr = {foreground = gui0B, background = gui01}, GitSignsChange = {foreground = gui0A, background = gui01}, GitSignsChangeNr = {foreground = gui0A, background = gui01}, GitSignsDelete = {foreground = gui08, background = gui01}, GitSignsDeleteNr = {foreground = gui08, background = gui01}, MarkSignHL = {foreground = gui08, background = gui01}, } apply_highlight(plugins.signs) high_link("GitSignsCurrentLineBlame", "NonText") plugins.telescope = { TelescopeMatching = {foreground = "Cyan"}, } apply_highlight(plugins.telescope) high_link("TelescopeSelection", "CursorLine") plugins.folke = { Twilight = {foreground = gui03}, } apply_highlight(plugins.folke)
tcp_cnn_logic = tcp_cnn_logic or {} function tcp_cnn_logic.on_close() end function tcp_cnn_logic.on_open() end function tcp_cnn_logic.on_recv() end g_listen_handler = nil g_cnn_handler_connect = nil g_cnn_handler_accept = nil function test_net_open(t, err_num) print("test_net_open t", t:netid()) print("test_net_open err_num", err_num) end function test_net_close(t, err_num) print("test_net_close t", t:netid()) print("test_net_close err_num", err_num) end function test_net_recv(t, pid, bin) print("test_net_recv t", t:netid()) print("test_net_recv pid", pid) print("test_net_recv bin", bin) end function test_net_gen_cnn(t) -- print("test_net_gen_cnn t", t) print("test_net_gen_cnn t", t:netid()) local cnn = TcpConnect:new() cnn:set_recv_cb(test_net_recv) cnn:set_open_cb(test_net_open) cnn:set_close_cb(test_net_close) g_cnn_handler_accept = cnn return cnn end function test_send(pid) if g_cnn_handler_connect then g_cnn_handler_connect:send(pid, "hello world") end end LogicMain = {} function LogicMain.start() print("this is logic for_test") -- test tryuselualib tryuselualib.log_msg("1234") othertryuselualib.log_msg("3345") print("work dir is ", lfs.currentdir()) -- lfs.chdir(lfs.currentdir() .. "/..") -- print("work dir is ", lfs.currentdir()) xml.print_table(LOGIC_SETTING) local cnn = native.LuaTcpConnect:new() local ret = cnn:init(tcp_cnn_logic) print("xxx", ret) print(cnn) g_listen_handler = TcpListen:new() g_listen_handler:set_open_cb(test_net_open) g_listen_handler:set_close_cb(test_net_close) g_listen_handler:set_gen_cnn_cb(test_net_gen_cnn) native.net_listen("0.0.0.0", 1234, g_listen_handler:get_native_listen_weak_ptr()) g_cnn_handler_connect = TcpConnect:new() g_cnn_handler_connect:set_open_cb(test_net_open) g_cnn_handler_connect:set_close_cb(test_net_close) g_cnn_handler_connect:set_recv_cb(test_net_recv) print("hello worl xxxxx here") native.net_connect("127.0.0.1", 1234, g_cnn_handler_connect:get_native_connect_weak_ptr()) print("hello worl xxxxx here 2") g_cnn_handler_connect:send(1, "hello world") print("hello worl xxxxx here 3") end
require 'cunn' -- example of matching descriptors on GPU N = 76 -- the number of patches to match patches = torch.rand(N,2,64,64):cuda() -- load the network and move to cuda net = torch.load'../networks/2ch/2ch_liberty_nn.t7':cuda() -- in place mean subtraction local p = patches:view(N,2,64*64) p:add(-p:mean(3):expandAs(p)) -- get the output similarities output = net:forward(patches) -- OR if there is a lot of patches to match -- it is better to split them to smaller batches batch_size = 128 -- preallocate the output tensor similarities = torch.CudaTensor(N) similarities_split = similarities:split(batch_size) for i,v in ipairs(patches:split(batch_size)) do similarities_split[i]:copy(net:forward(v)) end
--!A cross-platform build utility based on Lua -- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Version 2.0 (the -- "License"); you may not use this file except in compliance -- with the License. You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- Copyright (C) 2015 - 2019, TBOOX Open Source Group. -- -- @author ruki -- @file qt_add_static_plugins.lua -- -- add static plugins for qt rules -- -- e.g. -- -- @code -- includes("qt_add_static_plugins.lua") -- target("test") -- add_rules("qt.application") -- add_files("src/*.c") -- qt_add_static_plugins("QSvgPlugin", {linkdirs = "plugins/imageformats", links = {"qsvg", "Qt5Svg"}}) -- @endcode -- function qt_add_static_plugins(plugin, opt) opt = opt or {} add_values("qt.plugins", plugin) if opt.links then add_values("qt.links", unpack(table.wrap(opt.links))) end if opt.linkdirs then add_values("qt.linkdirs", unpack(table.wrap(opt.linkdirs))) end end
--[[ Author: tochonement Email: tochonement@gmail.com 23.07.2021 --]] whoi.util = whoi.util or {} local lib = whoi.util do local function setter(tbl, key, name) tbl["Set" .. name] = function(self, value) self[key] = value return self end end local function getter(tbl, key, name, force) local func = function(self) return self[key] end tbl["Get" .. name] = func if force and force == FORCE_BOOL then tbl["Is" .. name] = func end end function lib.accessor(tbl, key, name, force) name = name or string.upper(string.Left(key, 1)) .. string.sub(key, 2) setter(tbl, key, name) getter(tbl, key, name, force) end end do local prefixText = "(WHOI) " local prefixColor = Color(251, 197, 49) function lib.print(...) MsgC(prefixColor, prefixText, color_white, ...) Msg("\n") end end if CLIENT then do local function process(panel, class, callback) for _, child in ipairs(panel:GetChildren()) do if child.ClassName == class then if IsValid(child) then callback(child) end return else process(child, class, callback) end end end function lib.findPanel(class, callback) process(vgui.GetWorldPanel(), class, callback) end end do local colorShadow = ColorAlpha(color_black, 200) function lib.shadowText(text, font, x, y, color, alignmentX, alignmentY, shadowDistance) shadowDistance = shadowDistance or 1 draw.SimpleText(text, font, x, y + shadowDistance, colorShadow, alignmentX, alignmentY) return draw.SimpleText(text, font, x, y, color, alignmentX, alignmentY) end end do function lib.drawKey(x0, y0, size, key) local iconId = whoi.webicon.create("https://i.imgur.com/AYEhLpJ.png", "smooth mips") whoi.webicon.draw(iconId, x0 - size / 2, y0 - size / 2, size, size) draw.SimpleText(key, whoi.font.create("Roboto", math.ceil(size * 0.6)), x0, y0, color_black, 1, 1) end end else function lib.notify(ply, text, type, length, ...) netez.send(ply, "Notification", text, type, length, {...}) end end
local ffi = require("ffi") local common = require("openflow_common") local OFP_ASSERT = common.OFP_ASSERT require("openflow_1_2") local exports = {} ffi.cdef[[ enum ofp13_instruction_type { OFPIT13_METER = 6 /* Apply meter (rate limiter) */ }; ]] ffi.cdef[[ /* Instruction structure for OFPIT_METER */ struct ofp13_instruction_meter { ovs_be16 type; /* OFPIT13_METER */ ovs_be16 len; /* Length is 8. */ ovs_be32 meter_id; /* Meter instance. */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_instruction_meter") == 8); ffi.cdef[[ /* enum ofp_config_flags value OFPC_INVALID_TTL_TO_CONTROLLER * is deprecated in OpenFlow 1.3 */ /* Flags to configure the table. Reserved for future use. */ enum ofp13_table_config { OFPTC13_DEPRECATED_MASK = 3 /* Deprecated bits */ }; /* OpenFlow 1.3 specific flags for flow_mod messages. */ enum ofp13_flow_mod_flags { OFPFF13_NO_PKT_COUNTS = 1 << 3, /* Don't keep track of packet count. */ OFPFF13_NO_BYT_COUNTS = 1 << 4 /* Don't keep track of byte count. */ }; ]] ffi.cdef[[ /* Common header for all meter bands */ struct ofp13_meter_band_header { ovs_be16 type; /* One of OFPMBT_*. */ ovs_be16 len; /* Length in bytes of this band. */ ovs_be32 rate; /* Rate for this band. */ ovs_be32 burst_size; /* Size of bursts. */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_meter_band_header") == 12); ffi.cdef[[ /* Meter configuration. OFPT_METER_MOD. */ struct ofp13_meter_mod { ovs_be16 command; /* One of OFPMC_*. */ ovs_be16 flags; /* Set of OFPMF_*. */ ovs_be32 meter_id; /* Meter instance. */ /* struct ofp13_meter_band_header bands[0]; The bands length is inferred from the length field in the header. */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_meter_mod") == 8); ffi.cdef[[ /* Meter numbering. Flow meters can use any number up to OFPM_MAX. */ enum ofp13_meter { /* Last usable meter. */ OFPM13_MAX = 0xffff0000, /* Virtual meters. */ OFPM13_SLOWPATH = 0xfffffffd, /* Meter for slow datapath. */ OFPM13_CONTROLLER = 0xfffffffe, /* Meter for controller connection. */ OFPM13_ALL = 0xffffffff, /* Represents all meters for stat requests commands. */ }; /* Meter commands */ enum ofp13_meter_mod_command { OFPMC13_ADD, /* New meter. */ OFPMC13_MODIFY, /* Modify specified meter. */ OFPMC13_DELETE /* Delete specified meter. */ }; /* Meter configuration flags */ enum ofp13_meter_flags { OFPMF13_KBPS = 1 << 0, /* Rate value in kb/s (kilo-bit per second). */ OFPMF13_PKTPS = 1 << 1, /* Rate value in packet/sec. */ OFPMF13_BURST = 1 << 2, /* Do burst size. */ OFPMF13_STATS = 1 << 3 /* Collect statistics. */ }; /* Meter band types */ enum ofp13_meter_band_type { OFPMBT13_DROP = 1, /* Drop packet. */ OFPMBT13_DSCP_REMARK = 2, /* Remark DSCP in the IP header. */ OFPMBT13_EXPERIMENTER = 0xFFFF /* Experimenter meter band. */ }; ]] ffi.cdef[[ /* OFPMBT_DROP band - drop packets */ struct ofp13_meter_band_drop { ovs_be16 type; /* OFPMBT_DROP. */ ovs_be16 len; /* Length in bytes of this band. */ ovs_be32 rate; /* Rate for dropping packets. */ ovs_be32 burst_size; /* Size of bursts. */ uint8_t pad[4]; }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_meter_band_drop") == 16); ffi.cdef[[ /* OFPMBT_DSCP_REMARK band - Remark DSCP in the IP header */ struct ofp13_meter_band_dscp_remark { ovs_be16 type; /* OFPMBT_DSCP_REMARK. */ ovs_be16 len; /* Length in bytes of this band. */ ovs_be32 rate; /* Rate for remarking packets. */ ovs_be32 burst_size; /* Size of bursts. */ uint8_t prec_level; /* Number of drop precedence level to add. */ uint8_t pad[3]; }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_meter_band_dscp_remark") == 16); ffi.cdef[[ /* OFPMBT_EXPERIMENTER band - Write actions in action set */ struct ofp13_meter_band_experimenter { ovs_be16 type; /* OFPMBT_EXPERIMENTER. */ ovs_be16 len; /* Length in bytes of this band. */ ovs_be32 rate; /* Rate for dropping packets. */ ovs_be32 burst_size; /* Size of bursts. */ ovs_be32 experimenter; /* Experimenter ID which takes the same form as in struct ofp_experimenter_header. */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_meter_band_experimenter") == 16); ffi.cdef[[ /* OF 1.3 adds MORE flag also for requests */ enum ofp13_multipart_request_flags { OFPMPF13_REQ_MORE = 1 << 0 /* More requests to follow. */ }; ]] ffi.cdef[[ /* OF 1.3 splits table features off the ofp_table_stats */ /* Body of reply to OFPMP13_TABLE request. */ struct ofp13_table_stats { uint8_t table_id; /* Identifier of table. Lower numbered tables are consulted first. */ uint8_t pad[3]; /* Align to 32-bits. */ ovs_be32 active_count; /* Number of active entries. */ ovs_be64 lookup_count; /* Number of packets looked up in table. */ ovs_be64 matched_count; /* Number of packets that hit table. */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_table_stats") == 24); ffi.cdef[[ /* Common header for all Table Feature Properties */ struct ofp13_table_feature_prop_header { ovs_be16 type; /* One of OFPTFPT_*. */ ovs_be16 length; /* Length in bytes of this property. */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_table_feature_prop_header") == 4); ffi.cdef[[ /* Body for ofp_multipart_request of type OFPMP_TABLE_FEATURES./ * Body of reply to OFPMP_TABLE_FEATURES request. */ struct ofp13_table_features { ovs_be16 length; /* Length is padded to 64 bits. */ uint8_t table_id; /* Identifier of table. Lower numbered tables are consulted first. */ uint8_t pad[5]; /* Align to 64-bits. */ char name[OFP_MAX_TABLE_NAME_LEN]; ovs_be64 metadata_match; /* Bits of metadata table can match. */ ovs_be64 metadata_write; /* Bits of metadata table can write. */ ovs_be32 config; /* Bitmap of OFPTC_* values */ ovs_be32 max_entries; /* Max number of entries supported. */ /* Table Feature Property list */ /* struct ofp13_table_feature_prop_header properties[0]; */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_table_features") == 64); ffi.cdef[[ /* Table Feature property types. * Low order bit cleared indicates a property for a regular Flow Entry. * Low order bit set indicates a property for the Table-Miss Flow Entry. */ enum ofp13_table_feature_prop_type { OFPTFPT13_INSTRUCTIONS = 0, /* Instructions property. */ OFPTFPT13_INSTRUCTIONS_MISS = 1, /* Instructions for table-miss. */ OFPTFPT13_NEXT_TABLES = 2, /* Next Table property. */ OFPTFPT13_NEXT_TABLES_MISS = 3, /* Next Table for table-miss. */ OFPTFPT13_WRITE_ACTIONS = 4, /* Write Actions property. */ OFPTFPT13_WRITE_ACTIONS_MISS = 5, /* Write Actions for table-miss. */ OFPTFPT13_APPLY_ACTIONS = 6, /* Apply Actions property. */ OFPTFPT13_APPLY_ACTIONS_MISS = 7, /* Apply Actions for table-miss. */ OFPTFPT13_MATCH = 8, /* Match property. */ OFPTFPT13_WILDCARDS = 10, /* Wildcards property. */ OFPTFPT13_WRITE_SETFIELD = 12, /* Write Set-Field property. */ OFPTFPT13_WRITE_SETFIELD_MISS = 13, /* Write Set-Field for table-miss. */ OFPTFPT13_APPLY_SETFIELD = 14, /* Apply Set-Field property. */ OFPTFPT13_APPLY_SETFIELD_MISS = 15, /* Apply Set-Field for table-miss. */ OFPTFPT13_EXPERIMENTER = 0xFFFE, /* Experimenter property. */ OFPTFPT13_EXPERIMENTER_MISS = 0xFFFF, /* Experimenter for table-miss. */ }; ]] ffi.cdef[[ /* Instructions property */ struct ofp13_table_feature_prop_instructions { ovs_be16 type; /* One of OFPTFPT13_INSTRUCTIONS, OFPTFPT13_INSTRUCTIONS_MISS. */ ovs_be16 length; /* Length in bytes of this property. */ /* Followed by: * - Exactly (length - 4) bytes containing the instruction ids, then * - Exactly (length + 7)/8*8 - (length) (between 0 and 7) * bytes of all-zero bytes */ /* struct ofp11_instruction instruction_ids[0]; List of instructions without any data */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_table_feature_prop_instructions") == 4); ffi.cdef[[ /* Next Tables property */ struct ofp13_table_feature_prop_next_tables { ovs_be16 type; /* One of OFPTFPT13_NEXT_TABLES, OFPTFPT13_NEXT_TABLES_MISS. */ ovs_be16 length; /* Length in bytes of this property. */ /* Followed by: * - Exactly (length - 4) bytes containing the table_ids, then * - Exactly (length + 7)/8*8 - (length) (between 0 and 7) * bytes of all-zero bytes */ /* uint8_t next_table_ids[0]; */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_table_feature_prop_next_tables") == 4); ffi.cdef[[ /* Actions property */ struct ofp13_table_feature_prop_actions { ovs_be16 type; /* One of OFPTFPT13_WRITE_ACTIONS, OFPTFPT13_WRITE_ACTIONS_MISS, OFPTFPT13_APPLY_ACTIONS, OFPTFPT13_APPLY_ACTIONS_MISS. */ ovs_be16 length; /* Length in bytes of this property. */ /* Followed by: * - Exactly (length - 4) bytes containing the action_ids, then * - Exactly (length + 7)/8*8 - (length) (between 0 and 7) * bytes of all-zero bytes */ /* struct ofp_action_header action_ids[0]; List of actions without any data */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_table_feature_prop_actions") == 4); ffi.cdef[[ /* Match, Wildcard or Set-Field property */ struct ofp13_table_feature_prop_oxm { ovs_be16 type; /* One of OFPTFPT13_MATCH, OFPTFPT13_WILDCARDS, OFPTFPT13_WRITE_SETFIELD, OFPTFPT13_WRITE_SETFIELD_MISS, OFPTFPT13_APPLY_SETFIELD, OFPTFPT13_APPLY_SETFIELD_MISS. */ ovs_be16 length; /* Length in bytes of this property. */ /* Followed by: * - Exactly (length - 4) bytes containing the oxm_ids, then * - Exactly (length + 7)/8*8 - (length) (between 0 and 7) * bytes of all-zero bytes */ /* ovs_be32 oxm_ids[0]; Array of OXM headers */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_table_feature_prop_oxm") == 4); ffi.cdef[[ /* Experimenter table feature property */ struct ofp13_table_feature_prop_experimenter { ovs_be16 type; /* One of OFPTFPT13_EXPERIMENTER, OFPTFPT13_EXPERIMENTER_MISS. */ ovs_be16 length; /* Length in bytes of this property. */ ovs_be32 experimenter; /* Experimenter ID which takes the same form as in struct ofp_experimenter_header. */ ovs_be32 exp_type; /* Experimenter defined. */ /* Followed by: * - Exactly (length - 12) bytes containing the experimenter data, then * - Exactly (length + 7)/8*8 - (length) (between 0 and 7) * bytes of all-zero bytes */ /* ovs_be32 experimenter_data[0]; */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_table_feature_prop_experimenter") == 12); ffi.cdef[[ /* Body of reply to OFPMP13_PORT request. If a counter is unsupported, set * the field to all ones. */ struct ofp13_port_stats { struct ofp11_port_stats ps; ovs_be32 duration_sec; /* Time port has been alive in seconds. */ ovs_be32 duration_nsec; /* Time port has been alive in nanoseconds beyond duration_sec. */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_port_stats") == 112); ffi.cdef[[ /* Body of reply to OFPMP13_QUEUE request */ struct ofp13_queue_stats { struct ofp11_queue_stats qs; ovs_be32 duration_sec; /* Time queue has been alive in seconds. */ ovs_be32 duration_nsec; /* Time queue has been alive in nanoseconds beyond duration_sec. */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_queue_stats") == 40); ffi.cdef[[ /* Body of reply to OFPMP13_GROUP request */ struct ofp13_group_stats { struct ofp11_group_stats gs; ovs_be32 duration_sec; /* Time group has been alive in seconds. */ ovs_be32 duration_nsec; /* Time group has been alive in nanoseconds beyond duration_sec. */ /* struct ofp11_bucket_counter bucket_stats[]; */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_group_stats") == 40); ffi.cdef[[ /* Body of OFPMP13_METER and OFPMP13_METER_CONFIG requests. */ struct ofp13_meter_multipart_request { ovs_be32 meter_id; /* Meter instance, or OFPM_ALL. */ uint8_t pad[4]; /* Align to 64 bits. */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_meter_multipart_request") == 8); ffi.cdef[[ /* Statistics for each meter band */ struct ofp13_meter_band_stats { ovs_be64 packet_band_count; /* Number of packets in band. */ ovs_be64 byte_band_count; /* Number of bytes in band. */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_meter_band_stats") == 16); ffi.cdef[[ /* Body of reply to OFPMP13_METER request. Meter statistics. */ struct ofp13_meter_stats { ovs_be32 meter_id; /* Meter instance. */ ovs_be16 len; /* Length in bytes of this stats. */ uint8_t pad[6]; ovs_be32 flow_count; /* Number of flows bound to meter. */ ovs_be64 packet_in_count; /* Number of packets in input. */ ovs_be64 byte_in_count; /* Number of bytes in input. */ ovs_be32 duration_sec; /* Time meter has been alive in seconds. */ ovs_be32 duration_nsec; /* Time meter has been alive in nanoseconds beyond duration_sec. */ struct ofp13_meter_band_stats band_stats[0]; /* The band_stats length is inferred from the length field. */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_meter_stats") == 40); ffi.cdef[[ /* Body of reply to OFPMP13_METER_CONFIG request. Meter configuration. */ struct ofp13_meter_config { ovs_be16 length; /* Length of this entry. */ ovs_be16 flags; /* Set of OFPMC_* that apply. */ ovs_be32 meter_id; /* Meter instance. */ /* struct ofp13_meter_band_header bands[0]; The bands length is inferred from the length field. */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_meter_config") == 8); ffi.cdef[[ /* Body of reply to OFPMP13_METER_FEATURES request. Meter features. */ struct ofp13_meter_features { ovs_be32 max_meter; /* Maximum number of meters. */ ovs_be32 band_types; /* Bitmaps of OFPMBT13_* values supported. */ ovs_be32 capabilities; /* Bitmaps of "ofp13_meter_flags". */ uint8_t max_bands; /* Maximum bands per meters */ uint8_t max_color; /* Maximum color value */ uint8_t pad[2]; }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_meter_features") == 16); ffi.cdef[[ /* Asynchronous message configuration. */ /* The body of this is the same as nx_async_config */ /* OFPT_GET_ASYNC_REPLY or OFPT_SET_ASYNC. */ struct ofp13_async_config { ovs_be32 packet_in_mask[2]; /* Bitmasks of OFPR_* values. */ ovs_be32 port_status_mask[2]; /* Bitmasks of OFPPR_* values. */ ovs_be32 flow_removed_mask[2];/* Bitmasks of OFPRR_* values. */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_async_config") == 24); ffi.cdef[[ /* Packet received on port (datapath -> controller). */ struct ofp13_packet_in { struct ofp12_packet_in pi; ovs_be64 cookie; /* Cookie of the flow entry that was looked up */ /* Followed by: * - Match * - Exactly 2 all-zero padding bytes, then * - An Ethernet frame whose length is inferred from header.length. * The padding bytes preceding the Ethernet frame ensure that the IP * header (if any) following the Ethernet header is 32-bit aligned. */ /* struct ofp12_match match; */ /* uint8_t pad[2]; Align to 64 bit + 16 bit */ /* uint8_t data[0]; Ethernet frame */ }; ]] OFP_ASSERT(ffi.sizeof("struct ofp13_packet_in") == 16); return exports;
local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) local area = createCombatArea(AREA_WAVE4, AREADIAGONAL_WAVE4) combat:setArea(area) function onGetFormulaValues(player, level, maglevel) min = -((level * 2) + (maglevel * 3)) * 0.25 max = -((level * 2) + (maglevel * 3)) * 0.6 return min, max end combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") function onCastSpell(creature, var) -- check for stairHop delay if not getCreatureCondition(creature, CONDITION_PACIFIED) then return combat:execute(creature, var) else creature:sendCancelMessage(RETURNVALUE_YOUAREEXHAUSTED) creature:getPosition():sendMagicEffect(CONST_ME_POFF) return false end end
return { { effect_list = { { type = "BattleSkillAddBuff", casterAniEffect = "", target_choise = "TargetSelf", targetAniEffect = "", arg_list = { buff_id = 10862 } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66281, emitter = "BattleBulletEmitter" } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66301, emitter = "BattleBulletEmitter" } } } }, { effect_list = { { type = "BattleSkillAddBuff", casterAniEffect = "", target_choise = "TargetSelf", targetAniEffect = "", arg_list = { buff_id = 10862 } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66282, emitter = "BattleBulletEmitter" } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66302, emitter = "BattleBulletEmitter" } } } }, { effect_list = { { type = "BattleSkillAddBuff", casterAniEffect = "", target_choise = "TargetSelf", targetAniEffect = "", arg_list = { buff_id = 10862 } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66283, emitter = "BattleBulletEmitter" } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66303, emitter = "BattleBulletEmitter" } } } }, { effect_list = { { type = "BattleSkillAddBuff", casterAniEffect = "", target_choise = "TargetSelf", targetAniEffect = "", arg_list = { buff_id = 10862 } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66284, emitter = "BattleBulletEmitter" } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66304, emitter = "BattleBulletEmitter" } } } }, { effect_list = { { type = "BattleSkillAddBuff", casterAniEffect = "", target_choise = "TargetSelf", targetAniEffect = "", arg_list = { buff_id = 10862 } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66285, emitter = "BattleBulletEmitter" } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66305, emitter = "BattleBulletEmitter" } } } }, { effect_list = { { type = "BattleSkillAddBuff", casterAniEffect = "", target_choise = "TargetSelf", targetAniEffect = "", arg_list = { buff_id = 10862 } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66286, emitter = "BattleBulletEmitter" } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66306, emitter = "BattleBulletEmitter" } } } }, { effect_list = { { type = "BattleSkillAddBuff", casterAniEffect = "", target_choise = "TargetSelf", targetAniEffect = "", arg_list = { buff_id = 10862 } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66287, emitter = "BattleBulletEmitter" } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66307, emitter = "BattleBulletEmitter" } } } }, { effect_list = { { type = "BattleSkillAddBuff", casterAniEffect = "", target_choise = "TargetSelf", targetAniEffect = "", arg_list = { buff_id = 10862 } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66288, emitter = "BattleBulletEmitter" } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66308, emitter = "BattleBulletEmitter" } } } }, { effect_list = { { type = "BattleSkillAddBuff", casterAniEffect = "", target_choise = "TargetSelf", targetAniEffect = "", arg_list = { buff_id = 10862 } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66289, emitter = "BattleBulletEmitter" } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66309, emitter = "BattleBulletEmitter" } } } }, { effect_list = { { type = "BattleSkillAddBuff", casterAniEffect = "", target_choise = "TargetSelf", targetAniEffect = "", arg_list = { buff_id = 10862 } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66290, emitter = "BattleBulletEmitter" } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66310, emitter = "BattleBulletEmitter" } } } }, uiEffect = "", name = "强袭模式·EX", cd = 0, painting = 1, id = 10860, picture = "0", castCV = "skill", desc = "强袭模式·EX", aniEffect = { effect = "jineng", offset = { 0, -2, 0 } }, effect_list = { { type = "BattleSkillAddBuff", casterAniEffect = "", target_choise = "TargetSelf", targetAniEffect = "", arg_list = { buff_id = 10862 } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66280, emitter = "BattleBulletEmitter" } }, { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 66300, emitter = "BattleBulletEmitter" } } } }
-- One click toggles a device -- Define the names on your devices here: local remotecontrol = "WallMote" Devices = {} Devices[1] = "Office" Devices[2] = "Kitchen" Devices[3] = "Garage" Devices[4] = "Window" debug = true local sequence = 0 local action = 0 local scene = 0 -- DO NOT EDIT BELOW THIS LINE -- KEY_PRESS = 0 KEY_HOLD = 2 KEY_RELEASE = 1 COMMAND_CLASS_MULTI_CHANNEL_V2 = 0x60 COMMAND_CLASS_CENTRAL_SCENE = 0x5B CENTRAL_SCENE_NOTIFICATION = 0x03 local deviceManager = require "telldus.DeviceManager" function control(device_to_control, action) if action == KEY_PRESS then local control = deviceManager:findByName(device_to_control) if control == nil then print("Could not find device: %s", device_to_control) return end if control:state() == 1 then -- Device is on control:command("turnoff", nil, "WallMote") print("Turning off device: %s", control:name()) elseif control:state() == 2 then -- Device is off control:command("turnon", nil, "WallMote") print("Turning on device: %s", control:name()) end end end function onZwaveMessageReceived(device, flags, cmdClass, cmd, data) if device:name() ~= remotecontrol then return end if cmdClass == COMMAND_CLASS_MULTI_CHANNEL_V2 then -- If the device is using multichannel association in Lifeline cmdClass = data[2] cmd = data[3] if cmdClass ~= COMMAND_CLASS_CENTRAL_SCENE or cmd ~= CENTRAL_SCENE_NOTIFICATION then return end if list.len(data) < 5 then return end sequence = data[4] action = data[5] scene = data[6] else -- If the device is using association in Lifeline if cmdClass ~= COMMAND_CLASS_CENTRAL_SCENE or cmd ~= CENTRAL_SCENE_NOTIFICATION then if list.len(data) < 3 then return end end sequence = data[0] action = data[1] scene = data[2] end if debug == true then print("CENTRAL_SCENE_NOTIFICATION from: %s, Scene: %s, Action: %s", device:name(), scene, action) end control(Devices[scene], action) end
input = [[Given$a$text$file$of$many$lines,$where$fields$within$a$line$ are$delineated$by$a$single$'dollar'$character,$write$a$program that$aligns$each$column$of$fields$by$ensuring$that$words$in$each$ column$are$separated$by$at$least$one$space. Further,$allow$for$each$word$in$a$column$to$be$either$left$ justified,$right$justified,$or$center$justified$within$its$column.]] outputLeft = alignColumn(input) outputRight = alignColumn(input, "right") alignColumn(input, "center", "output.txt")
default.chest_formspec = "size[9,9]".. "background[-0.19,-0.25;9.41,10.48;default_wood.png]".. "bgcolor[#080808BB;true]".. "listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]".. 'list[current_name;storage;3,1.5;3,3;]'.. 'list[current_player;main;0.5,6.5;8,4;]' local nightstand_inv_size = 9,10.5 local nightstand_inv_vers = 1 furniture_mod.fireplace_formspec = 'size[8,6]'.. default.gui_bg.. default.gui_bg_img.. default.gui_slots.. 'background[8,6;0,0;default_brick.png;true]'.. 'list[current_name;fuel;1,0;1,1;]'.. 'list[current_player;main;0,2.5;8,4;]' default.get_hotbar_bg(0,4.85) furniture_mod.oven_formspec = "size[8,7]".. 'background[8,8;8,8;default_steel_block.png;true]'.. "image[4,1;1,1;default_furnace_fire_bg.png]".. "list[current_name;fuel;3,1;1,1;]".. "list[current_name;src;0,0;2,2;]".. "list[current_name;dst;6,0;2,2;]".. "list[current_player;main;0,3;8,4;]" furniture_mod.microwave_formspec = "size[8,7]".. 'background[8,8;8,8;default_steel_block.png;true]'.. "image[4,1;1,1;default_furnace_fire_bg.png]".. "list[current_name;fuel;3,1;1,1;]".. "list[current_name;src;0,0;2,1;]".. "list[current_name;dst;6,0;2,1;]".. "list[current_player;main;0,3;8,4;]"
local sensors = {} return sensors
CLASS.name = "Civil Protection Elite" CLASS.desc = "The top officers of the Civil Protection." CLASS.faction = FACTION_CP function CLASS:onCanBe(client) return client:isCombineRank(SCHEMA.eliteRanks) end CLASS_CP_ELITE = CLASS.index
-- premake5.lua -- version: premake-5.0.0-alpha14 -- %TM_SDK_DIR% should set to the directory of The Machinery SDK workspace "hello_world" configurations { "Debug", "Release" } language "C++" cppdialect "C++11" flags { "FatalWarnings", "MultiProcessorCompile" } warnings "Extra" inlining "Auto" sysincludedirs { "" } targetdir "bin/%{cfg.buildcfg}" filter "system:windows" platforms { "Win64" } systemversion "latest" filter "platforms:Win64" defines { "TM_OS_WINDOWS", "_CRT_SECURE_NO_WARNINGS" } includedirs { "%TM_SDK_DIR%/headers" } staticruntime "On" architecture "x64" libdirs { "%TM_SDK_DIR%/lib/" .. _ACTION .. "/%{cfg.buildcfg}" } disablewarnings { "4057", -- Slightly different base types. Converting from type with volatile to without. "4100", -- Unused formal parameter. I think unusued parameters are good for documentation. "4152", -- Conversion from function pointer to void *. Should be ok. "4200", -- Zero-sized array. Valid C99. "4201", -- Nameless struct/union. Valid C11. "4204", -- Non-constant aggregate initializer. Valid C99. "4206", -- Translation unit is empty. Might be #ifdefed out. "4214", -- Bool bit-fields. Valid C99. "4221", -- Pointers to locals in initializers. Valid C99. "4702", -- Unreachable code. We sometimes want return after exit() because otherwise we get an error about no return value. } linkoptions { "/ignore:4099" } -- warning LNK4099: linking object as if no debug info filter "configurations:Debug" defines { "TM_CONFIGURATION_DEBUG", "DEBUG" } symbols "On" filter "configurations:Release" defines { "TM_CONFIGURATION_RELEASE" } optimize "On" project "hello_world" location "build/hello_world" targetname "hello_world" targetdir "bin/%{cfg.buildcfg}" kind "ConsoleApp" language "C++" files { "hello_world.c" } defines { "TM_LINKS_FOUNDATION" } links { "foundation" }
-- @param {o} itable local function pop(o) local r = o[#o] o[#o] = nil return r end return pop
-- Tests for correct display (cursor column position) with +conceal and -- tabulators. local helpers = require('test.functional.helpers')(after_each) local feed, insert, clear, feed_command = helpers.feed, helpers.insert, helpers.clear, helpers.feed_command local expect_pos = function(row, col) return helpers.eq({row, col}, helpers.eval('[screenrow(), screencol()]')) end describe('cursor and column position with conceal and tabulators', function() setup(clear) it('are working', function() insert([[ start: .concealed. text |concealed| text .concealed. text |concealed| text .a. .b. .c. .d. |a| |b| |c| |d|]]) -- Conceal settings. feed_command('set conceallevel=2') feed_command('set concealcursor=nc') feed_command('syntax match test /|/ conceal') -- Start test. feed_command('/^start:') feed('ztj') expect_pos(2, 1) -- We should end up in the same column when running these commands on the -- two lines. feed('ft') expect_pos(2, 17) feed('$') expect_pos(2, 20) feed('0j') expect_pos(3, 1) feed('ft') expect_pos(3, 17) feed('$') expect_pos(3, 20) feed('j0j') expect_pos(5, 8) -- Same for next test block. feed('ft') expect_pos(5, 25) feed('$') expect_pos(5, 28) feed('0j') expect_pos(6, 8) feed('ft') expect_pos(6, 25) feed('$') expect_pos(6, 28) feed('0j0j') expect_pos(8, 1) -- And check W with multiple tabs and conceals in a line. feed('W') expect_pos(8, 9) feed('W') expect_pos(8, 17) feed('W') expect_pos(8, 25) feed('$') expect_pos(8, 27) feed('0j') expect_pos(9, 1) feed('W') expect_pos(9, 9) feed('W') expect_pos(9, 17) feed('W') expect_pos(9, 25) feed('$') expect_pos(9, 26) feed_command('set lbr') feed('$') expect_pos(9, 26) feed_command('set list listchars=tab:>-') feed('0') expect_pos(9, 1) feed('W') expect_pos(9, 9) feed('W') expect_pos(9, 17) feed('W') expect_pos(9, 25) feed('$') expect_pos(9, 26) end) end)
slot0 = class("WorldStoryGroup") slot1 = pg.memory_group slot0.Ctor = function (slot0, slot1) slot0.id = slot1.id slot0.configId = slot1.id slot0.config = slot0[slot0.configId] slot0.storyIds = slot0.config.memories end slot0.getStoryIds = function (slot0) return slot0.storyIds end return slot0
local Encode = require("t.enc") return Encode.crc
style = {["off_color"] = "fff", ["on_color"] = "fff", ["line_color"] = "000", ["line_width"] = "0.5"}; red_style = {["off_color"] = "fff", ["on_color"] = "fff", ["line_color"] = "f30", ["line_width"] = "2"}; text_style = {["font_size"] = "16"} include("names") include("terms") name = {} heig = {} index = {} ind = {} for i = 1,5 do index[i] = i end ind = lib.math.random_shuffle(index) for i = 1,5 do name[i] = musko_ime_nom[ind[i]]; end aver = 185 + math.random(20) sum = 0 for i = 1,4 do sign = math.random(2) if (sign == 1) then heig[i] = aver + math.random(5) else heig[i] = aver - math.random(5) end sum = sum + heig[i] end heig[5] = 5 * aver - sum mycanvas = function() lib.start_canvas(350, 250, "center") v = 30 ov = 80 w = 120 ow = 20 lib.add_line(v, ow, 0, ow+6*v, style, false, false) lib.add_line(2*v+w, ow, 0, ow+6*v, style, false, false) lib.add_line(v+2*w, ow, 0, ow+6*v, style, false, false) for j = 1,5 do lib.add_line(v, ow+(j-1)*v, 2*w, 0, style, false, false) end lib.add_line(v, ow+5*v, 2*w, 0, red_style, false, false) lib.add_line(v, 2*ow+6*v, 2*w, 0, red_style, false, false) lib.add_text(ov, v, name[1], text_style, false, false) lib.add_text(ov+w+5, v, heig[1], text_style, false, false) lib.add_text(ov+w+v, v, "cm", text_style, false, false) lib.add_text(ov, 2*v, name[2], text_style, false, false) lib.add_text(ov+w+5, 2*v, heig[2], text_style, false, false) lib.add_text(ov+w+v, 2*v, "cm", text_style, false, false) lib.add_text(ov, 3*v, name[3], text_style, false, false) lib.add_input(ov+w-ow, 3*v-7, 60, 30, lib.check_number(heig[3], 30)) lib.add_text(ov+w+v+10, 3*v, "cm", text_style, false, false) lib.add_text(ov, 4*v, name[4], text_style, false, false) lib.add_text(ov+w+5, 4*v, heig[4], text_style, false, false) lib.add_text(ov+w+v, 4*v, "cm", text_style, false, false) lib.add_text(ov, 5*v, name[5], text_style, false, false) lib.add_text(ov+w+5, 5*v, heig[5], text_style, false, false) lib.add_text(ov+w+v, 5*v, "cm", text_style, false, false) lib.add_text(w-ow, 6*v, msg[1], text_style, false, false) lib.add_text(w-ow, 6*v+ow, msg[2], text_style, false, false) lib.add_text(ov+w+5, 2*ov+v, aver, text_style, false, false) lib.add_text(ov+w+v, 2*ov+v, "cm", text_style, false, false) lib.end_canvas() end
require("common/popupWindow"); local match_hall_record_reward_tips_layout = require(ViewPath .. "hall/matchHall/widget/match_hall_record_reward_tips_layout"); -- 战绩奖励提示 local GameMatchHallRecordRewardTips = class(PopupWindow, false); local h_index = 0; local getIndex = function(self) h_index = h_index + 1; return h_index; end GameMatchHallRecordRewardTips.s_controls = { contentBg = getIndex(); textView = getIndex(); }; GameMatchHallRecordRewardTips.Delegate = { } GameMatchHallRecordRewardTips.s_cmds = { }; GameMatchHallRecordRewardTips.ctor = function(self) super(self, match_hall_record_reward_tips_layout); self:setFillParent(true, true); self:setAlign(kAlignCenter); self:setEventTouch(self, self.onBgTouch) self:setEventDrag(self, self.onEmptyFunc); self:_initView(); self:addToRoot(); end GameMatchHallRecordRewardTips.dtor = function(self) end GameMatchHallRecordRewardTips.isShowing = function(self) return self.m_isShowing; end GameMatchHallRecordRewardTips.show = function(self, data) PopupWindow.show(self, PopupWindowStyle.NORMAL); self.m_isShowing = true; self:_initData(data); self:_resetView(); self:_showData(); end GameMatchHallRecordRewardTips.hidden = function(self) if self.m_isShowing then self.m_isShowing = false; PopupWindow.hidden(self, PopupWindowStyle.NORMAL); end end GameMatchHallRecordRewardTips.setContentPos = function(self, x, y) local w, h = self.m_contentBg:getSize(); self.m_contentBg:setAlign(kAlignTopLeft); self.m_contentBg:setPos(x - 0.2 * w, y - h); end GameMatchHallRecordRewardTips.onEmptyFunc = function(self) end GameMatchHallRecordRewardTips.onBgTouch = function(self, action) if action == kFingerUp then self:_closeView(); end end ------------------------------------------------------------------------- GameMatchHallRecordRewardTips._closeView = function(self) EventDispatcher.getInstance():dispatch(kClosePopupWindows); end GameMatchHallRecordRewardTips._initData = function(self, data) self.m_data = data; end GameMatchHallRecordRewardTips._showData = function(self) local data = self.m_data; self.m_textView:setText(data.desc); self:_checkContentSize(); end GameMatchHallRecordRewardTips._initView = function(self) self.m_contentBg = self:findViewById(self.s_controls.contentBg); self.m_textView = self:findViewById(self.s_controls.textView); end GameMatchHallRecordRewardTips._resetView = function(self) self.m_textView:setText("", nil, 1); end GameMatchHallRecordRewardTips._checkContentSize = function(self) if self.m_textView.m_res and self.m_contentBg.m_res then local textH = self.m_textView.m_res:getHeight(); self.m_textView:setSize(nil, textH); local contentH = self.m_contentBg.m_res:getHeight(); local h = (textH + 32) > contentH and (textH + 32) or contentH; self.m_contentBg:setSize(nil, h); end end -------------------------------------------------------------------------------- GameMatchHallRecordRewardTips.s_controlConfig = { [GameMatchHallRecordRewardTips.s_controls.contentBg] = {"contentBg"}; [GameMatchHallRecordRewardTips.s_controls.textView] = {"contentBg", "textView"}; }; GameMatchHallRecordRewardTips.s_controlFuncMap = { }; GameMatchHallRecordRewardTips.s_cmdConfig = { }; return GameMatchHallRecordRewardTips;
-- Modified from https://github.com/Kong/kong/blob/0.14.1/kong/plugins/log-serializers/basic.lua local tablex = require "pl.tablex" local list = require "pl.List" local stringx = require "pl.stringx" local cjson = require "cjson.safe" local _M = {} local EMPTY = tablex.readonly({}) function _M.serialize(ngx, filters) local authenticated_entity if ngx.ctx.authenticated_credential ~= nil then authenticated_entity = { id = ngx.ctx.authenticated_credential.id, consumer_id = ngx.ctx.authenticated_credential.consumer_id } end local request_uri = ngx.var.request_uri or "" local req_headers = ngx.req.get_headers() local jwt_claims = get_jwt_claims(req_headers) if filters.request_headers_blacklist then req_headers = blacklist_filter(req_headers, filters.request_headers_blacklist) elseif filters.request_headers_whitelist then req_headers = whitelist_filter(req_headers, filters.request_headers_whitelist) end resp_headers = ngx.resp.get_headers() if filters.response_headers_blacklist then resp_headers = blacklist_filter(resp_headers, filters.response_headers_blacklist) elseif filters.response_headers_whitelist then resp_headers = whitelist_filter(resp_headers, filters.response_headers_whitelist) end return { request = { uri = request_uri, url = ngx.var.scheme .. "://" .. ngx.var.host .. ":" .. ngx.var.server_port .. request_uri, querystring = query_params, -- parameters, as a table method = ngx.req.get_method(), -- http method headers = req_headers, size = ngx.var.request_length }, upstream_uri = ngx.var.upstream_uri, response = { status = ngx.status, headers = resp_headers, size = ngx.var.bytes_sent }, tries = (ngx.ctx.balancer_data or EMPTY).tries, latencies = { kong = (ngx.ctx.KONG_ACCESS_TIME or 0) + (ngx.ctx.KONG_RECEIVE_TIME or 0) + (ngx.ctx.KONG_REWRITE_TIME or 0) + (ngx.ctx.KONG_BALANCER_TIME or 0), proxy = ngx.ctx.KONG_WAITING_TIME or -1, request = ngx.var.request_time * 1000 }, authenticated_entity = authenticated_entity, route = ngx.ctx.route, service = ngx.ctx.service, api = ngx.ctx.api, consumer = ngx.ctx.authenticated_consumer, jwt_claims = jwt_claims, client_ip = ngx.var.remote_addr, started_at = ngx.req.start_time() * 1000 } end function get_jwt_claims(headers) if not headers['authorization'] then return nil end -- The JWT consists of 2-3 period-delimited, base64 encoded sections (signature is optional): -- header.payload.[signature] -- The claims we're interested in are in the payload, so we capture the second base64 encoded string local encoded_claims = string.match(headers['authorization'], 'Bearer [%w/+]+=?=?%.([%w/+]+=?=?)%.') if not encoded_claims then return nil end local claims = ngx.decode_base64(encoded_claims) if not claims then return nil end local parsed_claims, err = cjson.decode(claims) if err then return nil end -- only log a subset of claims to avoid logging PII/PHI return whitelist_filter(parsed_claims, { 'cid', 'exp', 'iat', 'iss', 'jti', 'scp' }) end function blacklist_filter(t, blacklist) blacklist = list(blacklist):map(string.lower) return tablex.pairmap(function(k,v) if blacklist:contains(k:lower()) then v = "FILTERED" end return v, k end, t) end function whitelist_filter(t, whitelist) whitelist = list(whitelist):map(string.lower) return tablex.pairmap(function(k,v) if not whitelist:contains(k:lower()) then v = "FILTERED" end return v, k end, t) end return _M
-- require("foo") -- print(pcall(require, "error")) -- syntax error local function trace3() -- local e = {} -- setmetatable(e, {__tostring = function() return "runtime error" end}) error(e or "runtime error") end local function trace2() trace3() end local function trace1() trace2() end trace1()
dofile("staff.lua") global{ ROOT='http://www.tecgraf.puc-rio.br', EMAIL="|LOGIN|@tecgraf.puc-rio.br", WWW="|ROOT|/~|LOGIN|", webmast='|ROOT|/webmaster.html', TECGRAF='<A HREF="http://www.tecgraf.puc-rio.br">TeCGraf</A>', CS='<A HREF="http://www.inf.puc-rio.br">Computer Science Department</A>', PUCRIO='<A HREF="http://www.puc-rio.br">PUC-Rio</A>', } staff{ DI="inf.puc-rio.br", LOGIN="roberto", NAME="Roberto Ierusalimschy", TITLE="D.Sc., |PUCRIO|, 1990", POSITION="Associate Professor, |CS|, |PUCRIO|", AREAS="Programming Languages, Object Oriented Programming", EMAIL="|LOGIN|@|DI|", WWW="http://www.|DI|/~|LOGIN|", } staff{ PCG="http://www.graphics.cornell.edu", LOGIN="celes", NAME="Waldemar Celes", TITLE="D.Sc., |PUCRIO|, 1995", POSITION="Postdoctoral Associate at ".. '<A HREF="|PCG|">Program of Computer Graphics</A>, '.. '<A HREF="http://www.cornell.edu">Cornell University</A>', WWW="|PCG|/~celes/", AREAS="Image segmentation and 3D reconstruction; " .."Physical simulation and educational software;" .."Geometric modeling and topological data structures;" .."Extension languages and customizable applications" } staff{ LOGIN="lhf", NAME="Luiz Henrique de Figueiredo", TITLE='D.Sc., <A HREF="http://www.impa.br">IMPA</A>, 1992', POSITION='Associate Researcher at <A HREF="http://www.lncc.br">LNCC</A>; Consultant at |TECGRAF|', AREAS="Geometric modeling; Software tools", WWW="http://www2.lncc.br/~lhf/", }
local _, private = ... if private.isClassic then return end --[[ Lua Globals ]] -- luacheck: globals next --[[ Core ]] local Aurora = private.Aurora local Base, Hook, Skin = Aurora.Base, Aurora.Hook, Aurora.Skin do --[[ FrameXML\FloatingGarrisonFollowerTooltip.lua ]] function Hook.GarrisonFollowerAbilityTooltipTemplate_SetAbility(tooltipFrame, garrFollowerAbilityID, followerTypeID) if tooltipFrame.CounterIcon then tooltipFrame._auroraCounterIconBG:SetShown(tooltipFrame.CounterIcon:IsShown()) end end function Hook.GarrisonFollowerTooltipTemplate_SetGarrisonFollower(tooltipFrame, data, xpWidth) for i = 1, #tooltipFrame.Abilities do local Ability = tooltipFrame.Abilities[i] if not Ability._auroraSkinned then Skin.GarrisonFollowerAbilityTemplate(Ability) Ability._auroraSkinned = true end end for i = 1, #tooltipFrame.Traits do local Trait = tooltipFrame.Traits[i] if not Trait._auroraSkinned then Skin.GarrisonFollowerAbilityTemplate(Trait) Trait._auroraSkinned = true end end end end do --[[ FrameXML\FloatingGarrisonFollowerTooltip.xml ]] function Skin.GarrisonFollowerTooltipContentsTemplate(Frame) Frame.Class:SetPoint("TOPRIGHT", -2, -2) Frame.XPBarBackground:SetPoint("TOPLEFT", Frame.PortraitFrame, "BOTTOMRIGHT", 0, -2) Frame.Name:SetPoint("TOPLEFT", Frame.PortraitFrame, "TOPRIGHT", 4, -4) Frame.ClassSpecName:SetPoint("TOPLEFT", Frame.Name, "BOTTOMLEFT", 0, -15) Frame.ILevel:SetPoint("TOPLEFT", Frame.ClassSpecName, "BOTTOMLEFT", 0, -15) Frame.Quality:ClearAllPoints() Frame.Quality:SetPoint("TOP", Frame.PortraitFrame, "BOTTOM", 0, -2) Frame.Quality:SetJustifyH("CENTER") Frame.XPBar:SetPoint("TOPLEFT", Frame.XPBarBackground) Skin.GarrisonFollowerPortraitTemplate(Frame.PortraitFrame) Frame.PortraitFrame:SetPoint("TOPLEFT", 4, -4) end function Skin.GarrisonFollowerTooltipTemplate(Frame) Skin.GarrisonFollowerTooltipContentsTemplate(Frame) Skin.TooltipBorderedFrameTemplate(Frame) end function Skin.GarrisonShipyardFollowerTooltipTemplate(Frame) Skin.TooltipBorderedFrameTemplate(Frame) Frame.XPBarBackground:SetPoint("TOPLEFT", Frame, "BOTTOMRIGHT", 0, -2) Frame.Name:SetPoint("TOPLEFT", Frame, "TOPRIGHT", 4, -4) Frame.ClassSpecName:SetPoint("TOPLEFT", Frame.Name, "BOTTOMLEFT", 0, -15) Frame.Quality:ClearAllPoints() Frame.Quality:SetPoint("TOP", Frame, "BOTTOM", 0, -2) Frame.Quality:SetJustifyH("CENTER") Frame.XPBar:SetPoint("TOPLEFT", Frame.XPBarBackground) end function Skin.GarrisonFollowerAbilityTemplate(Frame) Base.CropIcon(Frame.Icon, Frame) Skin.PositionGarrisonAbiltyBorder(Frame.Border, Frame.Icon) end function Skin.GarrisonFollowerAbilityTooltipTemplate(Frame) Skin.TooltipBorderedFrameTemplate(Frame) Base.CropIcon(Frame.Icon, Frame) Frame._auroraCounterIconBG = Base.CropIcon(Frame.CounterIcon, Frame) Skin.PositionGarrisonAbiltyBorder(Frame.CounterIconBorder, Frame.CounterIcon) end function Skin.GarrisonFollowerAbilityWithoutCountersTooltipTemplate(Frame) Skin.TooltipBorderedFrameTemplate(Frame) Base.CropIcon(Frame.Icon, Frame) Skin.PositionGarrisonAbiltyBorder(Frame.AbilityBorder, Frame.Icon) end function Skin.GarrisonFollowerMissionAbilityWithoutCountersTooltipTemplate(Frame) Skin.TooltipBorderedFrameTemplate(Frame) Base.CropIcon(Frame.Icon, Frame) Skin.PositionGarrisonAbiltyBorder(Frame.AbilityBorder, Frame.Icon) end end function private.FrameXML.FloatingGarrisonFollowerTooltip() if private.disabled.tooltips then return end ----====####$$$$%%%%%$$$$####====---- -- FloatingGarrisonFollowerTooltip -- ----====####$$$$%%%%%$$$$####====---- _G.hooksecurefunc("GarrisonFollowerAbilityTooltipTemplate_SetAbility", Hook.GarrisonFollowerAbilityTooltipTemplate_SetAbility) _G.hooksecurefunc("GarrisonFollowerTooltipTemplate_SetGarrisonFollower", Hook.GarrisonFollowerTooltipTemplate_SetGarrisonFollower) local floatingTooltips = { ["GarrisonFollowerTooltipTemplate"] = _G.FloatingGarrisonFollowerTooltip, ["GarrisonShipyardFollowerTooltipTemplate"] = _G.FloatingGarrisonShipyardFollowerTooltip, ["GarrisonFollowerAbilityTooltipTemplate"] = _G.FloatingGarrisonFollowerAbilityTooltip, ["TooltipBorderedFrameTemplate"] = _G.FloatingGarrisonMissionTooltip, } for template, frame in next, floatingTooltips do Skin[template](frame) Skin.UIPanelCloseButton(frame.CloseButton) end ----====####$$$$%%%%%$$$$####====---- -- GarrisonFollowerTooltip -- ----====####$$$$%%%%%$$$$####====---- Skin.GarrisonFollowerTooltipTemplate(_G.GarrisonFollowerTooltip) Skin.GarrisonFollowerAbilityTooltipTemplate(_G.GarrisonFollowerAbilityTooltip) Skin.GarrisonFollowerAbilityWithoutCountersTooltipTemplate(_G.GarrisonFollowerAbilityWithoutCountersTooltip) Skin.GarrisonFollowerMissionAbilityWithoutCountersTooltipTemplate(_G.GarrisonFollowerMissionAbilityWithoutCountersTooltip) Skin.GarrisonShipyardFollowerTooltipTemplate(_G.GarrisonShipyardFollowerTooltip) end
--[[ Copyright (c) 2013 Mark (Mark L) Lawlor Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --]] --! Customise window used in the main menu and ingame. class "UICustomise" (UIResizable) ---@type UICustomise local UICustomise = _G["UICustomise"] local col_bg = { red = 154, green = 146, blue = 198, } local col_shadow = { red = 134, green = 126, blue = 178, } local col_caption = { red = 174, green = 166, blue = 218, } function UICustomise:UICustomise(ui, mode) self:UIResizable(ui, 320, 280, col_bg) local app = ui.app self.mode = mode self.modal_class = mode == "menu" and "main menu" or "options" or "customise" self.on_top = mode == "menu" self.esc_closes = true self.resizable = false self:setDefaultPosition(0.5, 0.25) self.default_button_sound = "selectx.wav" self.app = app -- Window parts definition -- Title self:addBevelPanel(80, 10, 160, 20, col_caption):setLabel(_S.customise_window.caption) .lowered = true -- Movies, global switch self:addBevelPanel(20, 40, 135, 20, col_shadow, col_bg, col_bg) :setLabel(_S.customise_window.movies):setTooltip(_S.tooltip.customise_window.movies).lowered = true self.movies_panel = self:addBevelPanel(160, 40, 135, 20, col_bg):setLabel(app.config.movies and _S.customise_window.option_on or _S.customise_window.option_off) self.movies_button = self.movies_panel:makeToggleButton(0, 0, 140, 20, nil, self.buttonMoviesGlobal) :setToggleState(app.config.movies):setTooltip(_S.tooltip.customise_window.movies) -- Intro movie self:addBevelPanel(20, 65, 135, 20, col_shadow, col_bg, col_bg) :setLabel(_S.customise_window.intro):setTooltip(_S.tooltip.customise_window.intro).lowered = true self.intro_panel = self:addBevelPanel(160, 65, 135, 20, col_bg):setLabel(app.config.play_intro and _S.customise_window.option_on or _S.customise_window.option_off) self.intro_button = self.intro_panel:makeToggleButton(0, 0, 140, 20, nil, self.buttonIntro) :setToggleState(app.config.play_intro):setTooltip(_S.tooltip.customise_window.intro) -- Allow user actions when paused self:addBevelPanel(20, 90, 135, 20, col_shadow, col_bg, col_bg) :setLabel(_S.customise_window.paused):setTooltip(_S.tooltip.customise_window.paused).lowered = true self.paused_panel = self:addBevelPanel(160, 90, 135, 20, col_bg):setLabel(app.config.allow_user_actions_while_paused and _S.customise_window.option_on or _S.customise_window.option_off) self.paused_button = self.paused_panel:makeToggleButton(0, 0, 140, 20, nil, self.buttonPaused) :setToggleState(app.config.allow_user_actions_while_paused):setTooltip(_S.tooltip.customise_window.paused) -- Volume down is opening casebook self:addBevelPanel(20, 115, 135, 20, col_shadow, col_bg, col_bg) :setLabel(_S.customise_window.volume):setTooltip(_S.tooltip.customise_window.volume).lowered = true self.volume_panel = self:addBevelPanel(160, 115, 135, 20, col_bg):setLabel(app.config.volume_opens_casebook and _S.customise_window.option_on or _S.customise_window.option_off) self.volume_button = self.volume_panel:makeToggleButton(0, 0, 140, 20, nil, self.buttonVolume) :setToggleState(app.config.volume_opens_casebook):setTooltip(_S.tooltip.customise_window.volume) -- Alien DNA from emergencies only/must stand/can knock on doors self:addBevelPanel(20, 140, 135, 20, col_shadow, col_bg, col_bg) :setLabel(_S.customise_window.aliens):setTooltip(_S.tooltip.customise_window.aliens).lowered = true self.aliens_panel = self:addBevelPanel(160, 140, 135, 20, col_bg):setLabel(app.config.alien_dna_only_by_emergency and _S.customise_window.option_on or _S.customise_window.option_off) self.aliens_button = self.aliens_panel:makeToggleButton(0, 0, 140, 20, nil, self.buttonAliens) :setToggleState(app.config.alien_dna_only_by_emergency):setTooltip(_S.tooltip.customise_window.aliens) -- Allow female patients with Fractured Bones self:addBevelPanel(20, 165, 135, 20, col_shadow, col_bg, col_bg) :setLabel(_S.customise_window.fractured_bones):setTooltip(_S.tooltip.customise_window.fractured_bones).lowered = true self.fractured_bones_panel = self:addBevelPanel(160, 165, 135, 20, col_bg):setLabel(app.config.disable_fractured_bones_females and _S.customise_window.option_on or _S.customise_window.option_off) self.fractured_bones_button = self.fractured_bones_panel:makeToggleButton(0, 0, 140, 20, nil, self.buttonFractured_bones) :setToggleState(app.config.disable_fractured_bones_females):setTooltip(_S.tooltip.customise_window.fractured_bones) -- Allow average contents when building rooms self:addBevelPanel(20, 190, 135, 20, col_shadow, col_bg, col_bg) :setLabel(_S.customise_window.average_contents):setTooltip(_S.tooltip.customise_window.average_contents).lowered = true self.average_contents_panel = self:addBevelPanel(160, 190, 135, 20, col_bg):setLabel(app.config.enable_avg_contents and _S.customise_window.option_on or _S.customise_window.option_off) self.average_contents_button = self.average_contents_panel:makeToggleButton(0, 0, 140, 20, nil, self.buttonAverage_contents) :setToggleState(app.config.enable_avg_contents):setTooltip(_S.tooltip.customise_window.average_contents) -- "Back" button self:addBevelPanel(20, 220, 280, 40, col_bg):setLabel(_S.customise_window.back) :makeButton(0, 0, 280, 40, nil, self.buttonBack):setTooltip(_S.tooltip.customise_window.back) end function UICustomise:buttonAudioGlobal(checked) local window = UIAudio(self.ui, "menu") self.ui:addWindow(window) end function UICustomise:buttonMoviesGlobal(checked) local app = self.ui.app app.config.movies = not app.config.movies self.movies_button:toggle() self.movies_panel:setLabel(app.config.movies and _S.customise_window.option_on or _S.customise_window.option_off) self:reload() app:saveConfig() end function UICustomise:buttonIntro(checked) local app = self.ui.app app.config.play_intro = not app.config.play_intro self.intro_button:toggle() self.intro_panel:setLabel(app.config.play_intro and _S.customise_window.option_on or _S.customise_window.option_off) self:reload() app:saveConfig() end function UICustomise:buttonPaused(checked) local app = self.ui.app app.config.allow_user_actions_while_paused = not app.config.allow_user_actions_while_paused self.paused_button:toggle() self.paused_panel:setLabel(app.config.allow_user_actions_while_paused and _S.customise_window.option_on or _S.customise_window.option_off) self:reload() app:saveConfig() end function UICustomise:buttonVolume(checked) local app = self.ui.app app.config.volume_opens_casebook = not app.config.volume_opens_casebook self.volume_button:toggle() self.volume_panel:setLabel(app.config.volume_opens_casebook and _S.customise_window.option_on or _S.customise_window.option_off) self:reload() app:saveConfig() end function UICustomise:buttonAliens(checked) local app = self.ui.app app.config.alien_dna_only_by_emergency = not app.config.alien_dna_only_by_emergency app.config.alien_dna_must_stand = not app.config.alien_dna_must_stand app.config.alien_dna_can_knock_on_doors = not app.config.alien_dna_can_knock_on_doors self.aliens_button:toggle() self.aliens_panel:setLabel(app.config.alien_dna_only_by_emergency and _S.customise_window.option_on or _S.customise_window.option_off) app:saveConfig() self:reload() local err = {_S.errors.alien_dna} self.ui:addWindow(UIInformation(self.ui, err)) end function UICustomise:buttonFractured_bones(checked) local app = self.ui.app app.config.disable_fractured_bones_females = not app.config.disable_fractured_bones_females self.fractured_bones_button:toggle() self.fractured_bones_panel:setLabel(app.config.disable_fractured_bones_females and _S.customise_window.option_on or _S.customise_window.option_off) app:saveConfig() self:reload() local err = {_S.errors.fractured_bones} self.ui:addWindow(UIInformation(self.ui, err)) end function UICustomise:buttonAverage_contents(checked) local app = self.ui.app app.config.enable_avg_contents = not app.config.enable_avg_contents self.average_contents_button:toggle() self.average_contents_panel:setLabel(app.config.enable_avg_contents and _S.customise_window.option_on or _S.customise_window.option_off) app:saveConfig() self:reload() end function UICustomise:buttonBack() self:close() local window = UIOptions(self.ui, "menu") self.ui:addWindow(window) end -- So that we can see the option has been changed reload the menu function UICustomise:reload() local window = UICustomise(self.ui, "menu") self.ui:addWindow(window) end function UICustomise:close() UIResizable.close(self) if self.mode == "menu" then self.ui:addWindow(UIMainMenu(self.ui)) end end
return function (request, next_middleware) local response = next_middleware() local api_key = "YOUR-KEEN-IO-API-KEY-HERE" local size = base64.encode(json.encode({ size = #response.body })) http.get('https://api.keen.io/3.0/projects/<PROJECT_ID>/events/<EVENT_COLLECTION>?api_key=' .. api_key .. '&data=' .. size) return response end
return Def.ActorFrame{ Def.Quad{ InitCommand=cmd(Center;FullScreen;diffuse,Color.Blue) } }
local status_ok, web_devicons = pcall(require, "which-key") if not status_ok then return end
include("CQUICommon.lua"); -- =========================================================================== -- Cached Base Functions -- =========================================================================== BASE_CQUI_AddCityStateRow = AddCityStateRow; -- =========================================================================== -- CONSTANTS -- =========================================================================== local COLOR_ICON_BONUS_OFF:number = UI.GetColorValueFromHexLiteral(0xff606060); local ICON_NAMES = {"%[ICON_TechBoosted%] ", "%[ICON_CivicBoosted%] ", "%[ICON_TradeRoute%] ", "%[ICON_Barbarian%] "}; local CITYSTATEBASE_DEFAULT_SIZEY :number = 48; -- =========================================================================== -- CQUI Members -- =========================================================================== local CQUI_InlineCityStateQuest = true; local CQUI_InlineCityStateQuestFontSize = 10; -- =========================================================================== function CQUI_OnSettingsInitialized() -- print_debug("CityStates_CQUI: CQUI_OnSettingsInitialized ENTRY") CQUI_InlineCityStateQuest = GameConfiguration.GetValue("CQUI_InlineCityStateQuest"); CQUI_InlineCityStateQuestFontSize = GameConfiguration.GetValue("CQUI_InlineCityStateQuestFontSize"); end -- =========================================================================== function CQUI_OnSettingsUpdate() -- print_debug("CityStates_CQUI: CQUI_OnSettingsUpdate ENTRY") CQUI_OnSettingsInitialized(); Refresh(); end -- =========================================================================== function CQUI_RemoveQuestIconsFromString( inStr:string ) local lookupStr :string = inStr; local outStr :string = lookupStr; for _,iconName in ipairs(ICON_NAMES) do if (string.find(lookupStr, iconName)) then outStr = string.gsub(lookupStr, iconName, ""); end end return outStr; end -- =========================================================================== -- CQUI Function Extensions -- =========================================================================== function AddCityStateRow( kCityState:table ) local kInst :table = BASE_CQUI_AddCityStateRow(kCityState); local anyQuests :boolean = false; local questString :string; for _,kQuest in pairs( kCityState.Quests ) do anyQuests = true; questString = kQuest.Name; end -- get city state quest, ensure the CQUI-added QuestRow is valid (in case another mod loads its XML but does not replace this lua) if (IsCQUI_InlineCityStateQuestEnabled() and kInst.QuestRow ~= nil) then kInst.QuestIcon:SetHide(true); if (anyQuests) then -- Adjust the size of the container based on the font size of the Inline City State Quest kInst.CityStateBase:SetSizeY(CITYSTATEBASE_DEFAULT_SIZEY + CQUI_InlineCityStateQuestFontSize - 2); kInst.QuestRow:SetHide(false); kInst.CityStateQuest:SetFontSize(CQUI_InlineCityStateQuestFontSize); kInst.CityStateQuest:SetString(CQUI_RemoveQuestIconsFromString(questString)); kInst.CityStateQuest:SetColor(kCityState.ColorSecondary); else kInst.CityStateBase:SetSizeY(CITYSTATEBASE_DEFAULT_SIZEY); kInst.QuestRow:SetHide(true); end else kInst.CityStateBase:SetSizeY(CITYSTATEBASE_DEFAULT_SIZEY); if (kInst.QuestRow ~= nil) then -- Reference only if valid (another mod may have replaced the XML but not the lua) kInst.QuestRow:SetHide(true); end -- SetHide is TRUE if anyQuests is FALSE kInst.QuestIcon:SetHide(not anyQuests); end -- Determine the 2nd place (or first-place tie), produce text for Tooltip on the EnvoyCount label local envoyTable:table = {}; -- Iterate through all players that have influenced this city state local localPlayerID = Game.GetLocalPlayer(); for iOtherPlayer,influence in pairs(kCityState.Influence) do local pLocalPlayer :table = Players[localPlayerID]; local civName :string = "LOCAL_CITY_STATES_UNKNOWN"; local isLocalPlayer:boolean = false; if (pLocalPlayer ~= nil) then local pPlayerConfig :table = PlayerConfigurations[iOtherPlayer]; if (localPlayerID == iOtherPlayer) then civName = Locale.Lookup("LOC_CITY_STATES_YOU") .. " (" .. Locale.Lookup(pPlayerConfig:GetPlayerName()) .. ")"; isLocalPlayer = true; else if (pLocalPlayer:GetDiplomacy():HasMet(iOtherPlayer)) then civName = Locale.Lookup(pPlayerConfig:GetPlayerName()); else civName = Locale.Lookup("LOCAL_CITY_STATES_UNKNOWN") end end table.insert(envoyTable, {Name = civName, EnvoyCount = influence, IsLocalPlayer = isLocalPlayer}); end end if (#envoyTable > 0) then -- Sort the table by value descending, alphabetically where tied, favoring local player table.sort(envoyTable, function(a,b) if (a.EnvoyCount == b.EnvoyCount) then if (a.IsLocalPlayer) then return true; elseif (b.IsLocalPlayer) then return false; else return a.Name < b.Name; end else return a.EnvoyCount > b.EnvoyCount end end); local envoysToolTip = Locale.Lookup("LOC_CITY_STATES_ENVOYS_SENT")..":"; for i=1, #envoyTable do envoysToolTip = envoysToolTip .. "[NEWLINE] - " .. envoyTable[i].Name .. ": " .. envoyTable[i].EnvoyCount; end kInst.EnvoyCount:SetToolTipString(envoysToolTip); if (#envoyTable > 1 and kInst.SecondHighestName ~= nil) then -- Show 2nd place if there is one (recall Lua tables/arrays start at index 1) -- The check on kInst.SecondHighestName is for cases where another mod replaces the XML, but not the citystates lua file local secondPlaceIdx = 2; -- is there a tie for first? if (envoyTable[1].EnvoyCount == envoyTable[2].EnvoyCount) then -- Already sorted above, so this is either local player or the leader appearing first alphabetically secondPlaceIdx = 1; end local secondHighestIsPlayer = envoyTable[secondPlaceIdx].IsLocalPlayer; local secondHighestName = envoyTable[secondPlaceIdx].Name; local secondHighestEnvoys = envoyTable[secondPlaceIdx].EnvoyCount; if (secondHighestIsPlayer) then secondHighestName = Locale.Lookup("LOC_CITY_STATES_YOU"); end -- Add changes to the actual UI object placeholders, which are created in the CityStates.xml file kInst.SecondHighestName:SetColor(secondHighestIsPlayer and kCityState.ColorSecondary or COLOR_ICON_BONUS_OFF); kInst.SecondHighestName:SetText(secondHighestName); kInst.SecondHighestEnvoys:SetColor(secondHighestIsPlayer and kCityState.ColorSecondary or COLOR_ICON_BONUS_OFF); kInst.SecondHighestEnvoys:SetText(secondHighestEnvoys); end end return kInst; end -- =========================================================================== function IsCQUI_InlineCityStateQuestEnabled() return CQUI_InlineCityStateQuest; end -- =========================================================================== -- CQUI Initialize Function -- =========================================================================== function Initialize_CQUI() print_debug("citystates_CQUI: Initialize_CQUI CQUI CityStates (Common File)") -- CQUI related events LuaEvents.CQUI_SettingsInitialized.Add(CQUI_OnSettingsInitialized); LuaEvents.CQUI_SettingsUpdate.Add(CQUI_OnSettingsUpdate); end Initialize_CQUI();
local Util = require "lib.util" --RESOLUTIONMANAGER-- --adds a menu to quickly change screen resolutions --TODO individual resolution for multiple screens local ResolutionManager = { menu = hs.menubar.new(), menuIcon = hs.image.imageFromName("NSActionTemplate") } function ResolutionManager:getResolutionsMenuTable() local currentScreen = hs.screen.mainScreen() local currentMode = currentScreen:currentMode() local currentModeEntry = self:getMenuEntryForMode(currentMode) local availableModes = currentScreen:availableModes() local sortedAvailableModesKeys = Util.sortKeys(availableModes, function(a, b) local aGreaterThanB = false if a.scale > b.scale then aGreaterThanB = true elseif a.scale == b.scale and a.w > b.w then aGreaterThanB = true elseif a.scale == b.scale and a.w == b.w and a.h > b.h then aGreaterThanB = true end return aGreaterThanB end) local menuTable = { currentModeEntry, { title = "-"} } for i, key in ipairs(sortedAvailableModesKeys) do local mode = availableModes[key] mode.desc = key table.insert(menuTable, self:getMenuEntryForMode(mode)) end return menuTable end function ResolutionManager:getMenuEntryForMode(mode) local me = self return { title = mode.desc, fn = function() me:setResolution(mode) end } end function ResolutionManager:setResolution(mode) hs.screen.mainScreen():setMode(mode.w, mode.h, mode.scale) end function ResolutionManager:init() self.menu:setMenu(function() return ResolutionManager:getResolutionsMenuTable() end) self.menu:setIcon(self.menuIcon) self.menu:setTooltip("Select screen resolution") end return ResolutionManager
require("compatibility.more-science-pack.recipe") require("compatibility.more-science-pack.recipe-science-pack") require("compatibility.underground-pipe-pack") require("prototypes.updates-solar") require("prototypes.updates-misc-recipe") require("prototypes.updates-recipe-science-components") require("prototypes.updates-recipe-science-pack") require("prototypes.updates-electronics") require("prototypes.updates-recipe-nickel") require("prototypes.updates-recipe-zinc") require("prototypes.updates-recipe-silicon") require("prototypes.updates-recipe-silver") require("prototypes.updates-recipe-gold") require("prototypes.updates-recipe-cobalt") require("prototypes.updates-recipe-alloy") require("prototypes.updates-recipe-plastic") require("prototypes.updates-recipe-carbon") require("prototypes.updates-recipe-lead") require("prototypes.updates-recipe-momo-item") require("prototypes.updates-recipe-module") require("prototypes.updates-stack-size") require("prototypes.bobextended.bobextended-update") momoTweak.recipe.CreateElectronicsRecipe() momoTweak.recipe.CreateScienceComponentsRecipe() momoTweak.recipe.Nickel() momoTweak.recipe.Zinc() momoTweak.recipe.Silicon() momoTweak.recipe.Silver() momoTweak.recipe.Gold() momoTweak.recipe.Cobalt() momoTweak.recipe.Lead() momoTweak.recipe.Alloy() momoTweak.recipe.Plastic() momoTweak.recipe.Carbon() momoTweak.recipe.ScienceComponentsRecipeUpdate() momoTweak.recipe.SciencePack() momoTweak.recipe.MiscRecipe() momoTweak.recipe.StoneSlab() momoTweak.recipe.CarbonPlate() momoTweak.updates.Solar() momoTweak.updates.HarderElectronics() momoTweak.updates.ExtendedUpdate() momoTweak.updates.StackSize() momoTweak.recipe.Module() momoTweak.updates.StackSize() if (momoTweak.mods.msp) then momoTweak.compatibility.msp.PackRecipe() momoTweak.compatibility.msp.MspToScienceRecipe() end if (momoTweak.mods.undergroundPipePack) then momoTweak.compatibility.undergroundPipePack.Recipe() end
local require_safe = require("utils").require_safe local M = {} M.setup = function() local config = { virtual_text = false, -- disable text that appears beside code signs = false, update_in_insert = true, underline = true, severity_sort = true, float = { focusable = false, style = "minimal", border = "rounded", source = "always", header = "", prefix = "", }, } vim.diagnostic.config(config) vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded", }) vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = "rounded", }) end local function lsp_highlight_document(client) -- Set autocommands conditional on server_capabilities if client.resolved_capabilities.document_highlight then vim.api.nvim_exec( [[ augroup lsp_document_highlight autocmd! * <buffer> autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight() autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references() augroup END ]], false ) end end local function lsp_keymaps(bufnr) local opts = { noremap = true, silent = true } vim.api.nvim_buf_set_keymap(bufnr, "n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "gD", "<cmd>lua vim.lsp.buf.declaration()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts) vim.api.nvim_set_keymap('n', '[g', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts) vim.api.nvim_set_keymap('n', ']g', '<cmd>lua vim.diagnostic.goto_prev()<CR>', opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "gl", '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics({ border = "rounded" })<CR>', opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "gcq", "<cmd>lua vim.diagnostic.setloclist()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "gcr", "<cmd>lua vim.lsp.buf.rename()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "gca", "<cmd>lua vim.lsp.buf.code_action()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gcf', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts) vim.cmd [[ command! Format execute 'lua vim.lsp.buf.formatting()' ]] end M.on_attach = function(client, bufnr) if client.name == "tsserver" then client.resolved_capabilities.document_formatting = false end lsp_keymaps(bufnr) lsp_highlight_document(client) end local capabilities = vim.lsp.protocol.make_client_capabilities() local cmp_nvim_lsp = require_safe("cmp_nvim_lsp") M.capabilities = cmp_nvim_lsp.update_capabilities(capabilities) return M
object_tangible_loot_creature_loot_collections_eow_defective_holoshroud = object_tangible_loot_creature_loot_collections_shared_eow_defective_holoshroud:new { } ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_eow_defective_holoshroud, "object/tangible/loot/creature/loot/collections/eow_defective_holoshroud.iff")
local DIR_ROOT = (path.getabsolute('..') .. '/') dofile('genie_common.lua') function unet_project(options) options = unet_verify_options(options) project 'unet' kind 'StaticLib' includedirs { DIR_ROOT .. 'include/', } pchheader 'Unet_common.h' pchsource(DIR_ROOT .. 'src/Unet_common.cpp') unet_defines() unet_modules(options.modules, true) unet_guid() -- Files files { DIR_ROOT .. 'src/*.cpp', DIR_ROOT .. 'src/*.c', DIR_ROOT .. 'src/Results/*.cpp', DIR_ROOT .. 'include/**.hpp', DIR_ROOT .. 'include/**.h', } -- Remove xxhash.cpp because we're using it with XXH_INLINE_ALL removefiles { DIR_ROOT .. 'src/xxhash.cpp' } defines { 'XXH_INLINE_ALL' } -- System sources if os.get() == 'windows' then files { DIR_ROOT .. 'src/System/SystemWindows.cpp', } elseif os.get() == 'linux' then files { DIR_ROOT .. 'src/System/SystemLinux.cpp', } elseif os.get() == 'macosx' then files { DIR_ROOT .. 'src/System/SystemMacOS.mm', } end -- On Windows, disable permissive compiling for more healthy Windows errors if os.get() == 'windows' then buildoptions { '/permissive-' } end end
if not modules then modules = { } end modules ['regi-8859-4'] = { version = 1.001, comment = "companion to regi-ini.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" } return { [0] = 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F, 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F, 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, 0x00A0, 0x0104, 0x0138, 0x0156, 0x00A4, 0x0128, 0x013B, 0x00A7, 0x00A8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00AD, 0x017D, 0x00AF, 0x00B0, 0x0105, 0x02DB, 0x0157, 0x00B4, 0x0129, 0x013C, 0x02C7, 0x00B8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014A, 0x017E, 0x014B, 0x0100, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x012E, 0x010C, 0x00C9, 0x0118, 0x00CB, 0x0116, 0x00CD, 0x00CE, 0x012A, 0x0110, 0x0145, 0x014C, 0x0136, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x0172, 0x00DA, 0x00DB, 0x00DC, 0x0168, 0x016A, 0x00DF, 0x0101, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x012F, 0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x012B, 0x0111, 0x0146, 0x014D, 0x0137, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x0169, 0x016B, 0x02D9 }
function SparseVolumeToVolumeFunc(property) local rs = property.resample if rs == '' then rs = 1.0 end local vm = require("SparseVolumeToVolume")(); vm:Create(property.sparsevolume, rs) function volume() return vm:VolumeData() end return { volume = volume } end
minetest.register_craft({ output = 'uscurrency:safe', recipe = { {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, {'default:steel_ingot', '', 'default:steel_ingot'}, {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, } }) minetest.register_craft({ output = 'uscurrency:shop', recipe = { {'default:sign_wall'}, {'default:chest_locked'}, } }) minetest.register_craft({ output = 'uscurrency:barter', recipe = { {'default:sign_wall'}, {'default:chest'}, } }) -- Money -- Penny minetest.register_craft({ type = "shapeless", output = "uscurrency:penny 5", recipe = {"uscurrency:nickel" }, }) -- Nickel minetest.register_craft({ type = "shapeless", output = "uscurrency:nickel", recipe = {"uscurrency:penny", "uscurrency:penny", "uscurrency:penny", "uscurrency:penny", "uscurrency:penny" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:nickel 2", recipe = {"uscurrency:dime" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:nickel 5", recipe = {"uscurrency:quarter" }, }) -- Dime minetest.register_craft({ type = "shapeless", output = "uscurrency:dime", recipe = {"uscurrency:nickel", "uscurrency:nickel" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dime", recipe = {"uscurrency:nickel", "uscurrency:penny", "uscurrency:penny", "uscurrency:penny", "uscurrency:penny", "uscurrency:penny" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dime 7", recipe = {"uscurrency:nickel", "uscurrency:nickel", "uscurrency:nickel", "uscurrency:nickel", "uscurrency:quarter", "uscurrency:quarter" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dime 8", recipe = {"uscurrency:nickel", "uscurrency:nickel", "uscurrency:nickel", "uscurrency:nickel", "uscurrency:nickel", "uscurrency:nickel", "uscurrency:quarter", "uscurrency:quarter" }, }) -- Quarter minetest.register_craft({ type = "shapeless", output = "uscurrency:quarter", recipe = {"uscurrency:dime", "uscurrency:penny", "uscurrency:penny", "uscurrency:penny", "uscurrency:penny", "uscurrency:penny", "uscurrency:nickel", "uscurrency:nickel"}, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:quarter", recipe = {"uscurrency:dime", "uscurrency:nickel", "uscurrency:nickel", "uscurrency:nickel"}, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:quarter", recipe = {"uscurrency:nickel", "uscurrency:nickel", "uscurrency:nickel", "uscurrency:nickel", "uscurrency:nickel"}, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:quarter", recipe = {"uscurrency:dime", "uscurrency:dime", "uscurrency:nickel"}, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:quarter", recipe = {"uscurrency:nickel", "uscurrency:nickel", "uscurrency:nickel", "uscurrency:nickel", "uscurrency:penny", "uscurrency:penny", "uscurrency:penny", "uscurrency:penny", "uscurrency:penny"}, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:quarter 2", recipe = {"uscurrency:dime", "uscurrency:dime", "uscurrency:nickel", "uscurrency:dime", "uscurrency:dime", "uscurrency:nickel"}, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:quarter 2", recipe = {"uscurrency:dime", "uscurrency:dime", "uscurrency:dime", "uscurrency:dime", "uscurrency:dime"}, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:quarter 2", recipe = {"uscurrency:dime", "uscurrency:nickel", "uscurrency:nickel", "uscurrency:nickel", "uscurrency:nickel", "uscurrency:nickel", "uscurrency:nickel", "uscurrency:nickel", "uscurrency:nickel"}, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dollar_5", recipe = {"uscurrency:dollar", "uscurrency:dollar", "uscurrency:dollar", "uscurrency:dollar", "uscurrency:dollar"}, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dollar_10", recipe = {"uscurrency:dollar_5", "uscurrency:dollar_5"}, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dollar_5 2", recipe = {"uscurrency:dollar_10"}, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dollar 5", recipe = {"uscurrency:dollar_5"}, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dollar", recipe = {"uscurrency:quarter", "uscurrency:quarter", "uscurrency:quarter", "uscurrency:quarter" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:quarter", recipe = {"uscurrency:dime", "uscurrency:dime", "uscurrency:nickel" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dime", recipe = {"uscurrency:nickel", "uscurrency:penny", "uscurrency:penny", "uscurrency:penny", "uscurrency:penny", "uscurrency:penny" } }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dime", recipe = {"uscurrency:nickel", "uscurrency:nickel"}, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dollar_5 2", recipe = {"uscurrency:dollar_10" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dollar_10 2", recipe = {"uscurrency:dollar_20" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dollar 5", recipe = {"uscurrency:dollar_5" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dollar 20", recipe = {"uscurrency:dollar_10", "uscurrency:dollar_10" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dollar_10 5", recipe = {"uscurrency:dollar_50" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dollar 50", recipe = {"uscurrency:dollar_10", "uscurrency:dollar_20", "uscurrency:dollar_20" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dollar_100", recipe = {"uscurrency:dollar_50", "uscurrency:dollar_50" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dollar_100", recipe = {"uscurrency:dollar_20", "uscurrency:dollar_20", "uscurrency:dollar_20", "uscurrency:dollar_20", "uscurrency:dollar_20"}, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dollar_20 5", recipe = {"uscurrency:dollar_100" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dollar_20", recipe = {"uscurrency:dollar_10", "uscurrency:dollar_10" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:quarter 4", recipe = {"uscurrency:dollar" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dime 5", recipe = { "uscurrency:quarter", "uscurrency:quarter" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:nickel 5", recipe = { "uscurrency:quarter" }, }) minetest.register_craft({ type = "fuel", recipe = "uscurrency:dollar_bundle", burntime = 1, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dollar_500", recipe = {"uscurrency:dollar_100", "uscurrency:dollar_100", "uscurrency:dollar_100", "uscurrency:dollar_100", "uscurrency:dollar_100" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dollar_100 5", recipe = {"uscurrency:dollar_500" }, }) minetest.register_craft({ type = "shapeless", output = "uscurrency:dollar_1000", recipe = {"uscurrency:dollar_500", "uscurrency:dollar_500" }, })
local PANEL = {} function PANEL:Init() local slider = vgui.Create("DSlider", self) local label = vgui.Create("DLabel", self) local wang = vgui.Create("DNumberWang", self) label:SetTextColor(Color(0, 0, 0, 255)) slider:SetLockY(0.5) slider:SetTrapInside(true) Derma_Hook(slider, "Paint", "Paint", "NumSlider") wang.OnValueChanged = function(panel, val) val = math.Clamp(tonumber(val), wang:GetMin(), wang:GetMax()) if self.min_override and (val == wang:GetMin()) then wang:SetText(self.min_override[2]) elseif self.max_override and (val == wang:GetMax()) then wang:SetText(self.max_override[2]) end slider:SetSlideX(val/wang:GetMax()) end slider.TranslateValues = function(panel, x, y) wang:SetFraction(x) return x, y end self.slider = slider self.label = label self.wang = wang end function PANEL:Paint() end function PANEL:GetValue() local value = self.wang:GetValue() if self.max_override then if (self.wang:GetText() == self.max_override[2]) then value = self.max_override[1] end end if self.min_override then if (self.wang:GetText() == self.min_override[2]) then value = self.min_override[1] end end return value end function PANEL:SetDecimals(decimals) self.wang:SetDecimals(decimals) end function PANEL:SetText(text) self.label:SetText(text) end function PANEL:SetMinMax(min, max) self.wang:SetMinMax(min, max) end function PANEL:SetMinOverride(min, text) self.min_override = {min, text} end function PANEL:SetMaxOverride(max, text) self.max_override = {max, text} end function PANEL:SetMinMaxOverride(min, max) self:SetMaxOverride(max) self:SetMinOverride(min) end function PANEL:GetSlider() return self.slider end function PANEL:GetLabel() return self.label end function PANEL:GetWang() return self.wang end function PANEL:PerformLayout() self.wang:SetWide(40) self.wang:SetPos(self:GetWide()-self.wang:GetWide(), 0) self.label:SetPos(8, 3) self.label:SizeToContents() self.slider:SetSize(self:GetWide(), 16) self.slider:SetPos(0, self:GetTall()-self.slider:GetTall()) end vgui.Register("WSlider", PANEL, 'DPanel');
-- List of commonly used variables all across the library return { engineInit = { gravity = Vector2.new(0, .3), friction = 0.99, airfriction = 0.99, bounce = 0.8, timeSteps = 1, canvas = { topLeft = Vector2.new(0, 0), size = workspace.CurrentCamera.ViewportSize, }, }, universalMass = 1, speed = 55, properties = { "gravity", "friction", "collisionmultiplier", "airfriction", }, rigidbody = { props = { "Object", "Collidable", "Anchored", "LifeSpan", "KeepInCanvas", "Gravity", "Friction", "AirFriction", "Structure", "Mass" }, must_have = { "Object" } }, constraint = { color = Color3.new(1, 1, 1), thickness = 4, types = { "rope", "spring", "rod" }, props = { "Type", "Point1", "Point2", "Visible", "Thickness", "RestLength", "SpringConstant", "Color", }, must_have = { "Type", "Point1", "Point2", } }, point = { radius = 2.5, color = Color3.new(1), uicRadius = UDim.new(1, 0), props = { "Position", "Visible", "Snap", "KeepInCanvas", "Radius", "Color" }, must_have = { "Position" } }, offset = Vector2.new(0, 36), VALID_OBJECT_PROPS = { "Position", "Visible", "Snap", "KeepInCanvas", "Radius", "Color", "Type", "Point1", "Point2", "Thickness", "RestLength", "SpringConstant", "Object", "Collidable", "Anchored", "LifeSpan", "Gravity", "Friction", "AirFriction", "Structure", "Mass" }, OBJECT_PROPS_TYPES = { Position = "Vector2", Visible = "boolean", Snap = "boolean", KeepInCanvas = "boolean", Radius = "number", Color = "Color3", Type = "string", Thickness = "number", RestLength = "number", SpringConstant = "number", Object = "Instance", Collidable = "boolean", Anchored = "boolean", LifeSpan = "number", Gravity = "Vector2", Friction = "number", AirFriction = "number", Structure = "table", Mass = "number" }, }
--地心抵抗军·普罗米修斯 local m=14000228 local cm=_G["c"..m] function cm.initial_effect(c) --xyz summon aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),4,2,nil,nil,99) c:EnableReviveLimit() --SpecialSummon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(m,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCost(cm.spcost) e1:SetTarget(cm.sptg) e1:SetOperation(cm.spop) c:RegisterEffect(e1) --repeat attack local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(m,1)) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLE_START) e2:SetTarget(cm.thtg) e2:SetOperation(cm.thop) c:RegisterEffect(e2) end function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) end function cm.filter(c,e,tp) return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) end function cm.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end end function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local tc=c:GetBattleTarget() if chk==0 then return tc and tc:IsAbleToHand() end Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0) end function cm.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetAttacker() if c==tc then tc=Duel.GetAttackTarget() end if tc and tc:IsRelateToBattle() then Duel.SendtoHand(tc,nil,REASON_EFFECT) end if c:IsRelateToEffect(e) and c:IsChainAttackable() then Duel.ChainAttack() end end
aliveai_electric={player={}} aliveai_electric.pos_between=function(pos1,pos2,density) if not ((pos1 and pos1.x and pos1.y and pos1.z) or (pos2 and pos2.x and pos2.y and pos2.z)) then return end local d=aliveai.distance(pos1,pos2) density=density or 1 local allpos={} local v = {x = pos1.x - pos2.x, y = pos1.y - pos2.y-1, z = pos1.z - pos2.z} local amount = (v.x ^ 2 + v.y ^ 2 + v.z ^ 2) ^ 0.5 local d=math.sqrt((pos1.x-pos2.x)*(pos1.x-pos2.x) + (pos1.y-pos2.y)*(pos1.y-pos2.y)+(pos1.z-pos2.z)*(pos1.z-pos2.z)) v.x = (v.x / amount)*-1 v.y = (v.y / amount)*-1 v.z = (v.z / amount)*-1 for i=1,d,density do local posn={x=pos1.x+(v.x*i),y=pos1.y+(v.y*i),z=pos1.z+(v.z*i)} if not aliveai.def(posn,"buildable_to") then return allpos end table.insert(allpos,posn) end return allpos end aliveai_electric.getobjects=function(pos1,pos2) if not ((pos1 and pos1.x and pos1.y and pos1.z) or (pos2 and pos2.x and pos2.y and pos2.z)) then return end local d=aliveai.distance(pos1,pos2) local p={} local obs2={} local obs1=minetest.get_objects_inside_radius(pos1, d) local allpos={} local v = {x = pos1.x - pos2.x, y = pos1.y - pos2.y-1, z = pos1.z - pos2.z} local amount = (v.x ^ 2 + v.y ^ 2 + v.z ^ 2) ^ 0.5 local d=math.sqrt((pos1.x-pos2.x)*(pos1.x-pos2.x) + (pos1.y-pos2.y)*(pos1.y-pos2.y)+(pos1.z-pos2.z)*(pos1.z-pos2.z)) v.x = (v.x / amount)*-1 v.y = (v.y / amount)*-1 v.z = (v.z / amount)*-1 for i=1,d,1 do local posn={x=pos1.x+(v.x*i),y=pos1.y+(v.y*i),z=pos1.z+(v.z*i)} if not aliveai.def(posn,"buildable_to") then return obs2,allpos,posn else for _, ob in ipairs(obs1) do if aliveai.samepos(aliveai.roundpos(posn),aliveai.roundpos(ob:get_pos())) then table.insert(obs2,ob) end end end table.insert(allpos,posn) end return obs2,allpos end minetest.register_on_dieplayer(function(player) aliveai_electric.player[player:get_player_name()]=nil end) aliveai_electric.hit=function(ob,level,dmg1) if not ob or aliveai.team(ob)=="nuke" then return end level=level or 2 dmg1=dmg1 or 2 local hp=aliveai.gethp(ob) if aliveai.is_bot(ob) then hp=hp+(ob:get_luaentity().hp_max*2) end local en=0 if ob:get_luaentity() then en=1 end local playername if ob:is_player() then playername=ob:get_player_name() aliveai_electric.player[playername]=1 end minetest.sound_play("aliveai_electric", {pos=ob:get_pos(), gain = 0.1, max_hear_distance = 10}) local time=0 for i=0,level,1 do local dmg=math.random(1,dmg1) hp=hp-dmg minetest.after((i*0.3)+time, function(ob,playername) if playername and not aliveai_electric.player[playername] then return end if aliveai.gethp(ob,1)>0 then local p=ob:get_pos() minetest.add_particlespawner({ amount = 8, time =0.2, maxpos = {x=p.x+0.5,y=p.y+1.5,z=p.z+0.5}, minpos = {x=p.x-0.5,y=p.y+0.5,z=p.z-0.5}, minvel = {x=-0.01, y=-0.01, z=-0.01}, maxvel = {x=0.01, y=0.01, z=0.01}, minacc = {x=0, y=0, z=0}, maxacc = {x=0, y=0, z=0}, minexptime = 0.5, maxexptime = 1, minsize = 1, maxsize = 4, texture = "aliveai_electric_vol.png^[colorize:#ffffffff", glow=13, }) if aliveai.def(p,"buildable_to") then minetest.set_node(p,{name="aliveai_electric:chock"}) elseif aliveai.def({x=p.x,y=p.y+1,z=p.z},"buildable_to") then minetest.set_node({x=p.x,y=p.y+1,z=p.z},{name="aliveai_electric:chock"}) end aliveai.punchdmg(ob,dmg) if en==1 and ob then local v = ob:get_velocity() ob:set_velocity({x=math.random(-1,1)*0.1, y=v and v.y or 0, z=math.random(-1,1)*0.1}) end elseif aliveai_nitroglycerine and dmg>4 and math.random(1,5)==1 then aliveai_nitroglycerine.explode(ob:get_pos(),{radius=2,blow_nodes=0}) end if playername and i>=level then aliveai_electric.player[playername]=nil end end, ob,playername) time=math.random(1,5)*0.1 if hp<=0 then return false end end end aliveai_electric.dir=function(user,pointed) if user:get_luaentity() then user=user:get_luaentity() end local type=pointed.type local pos1=user:get_pos() pos1.y=pos1.y+1.5 local pos2 if type=="object" then pos2=pointed.ref:get_pos() elseif type=="node" then pos2=pointed.under elseif type=="nothing" then local dir if user:get_luaentity() then if user:get_luaentity().aliveai and user:get_luaentity().fight then local dir=aliveai.get_dir(user:get_luaentity(),user:get_luaentity().fight) pos2={x=pos1.x+(dir.x*30),y=pos1.y+(dir.y*30),z=pos1.z+(dir.z*30)} else pos2=aliveai.pointat(user:get_luaentity(),30) end else local dir=user:get_look_dir() pos2={x=pos1.x+(dir.x*30),y=pos1.y+(dir.y*30),z=pos1.z+(dir.z*30)} end else return end if aliveai.def(pos1,"walkable") then return end return pos1,pos2 end aliveai_electric.lightning2=function(obs,pos,hit) if not (obs and pos) then return end if pos[1] then minetest.sound_play("aliveai_electric_lightning", { pos = pos[1], max_hear_distance = 5, gain = 0.1, }) end if pos[#pos] then minetest.sound_play("aliveai_electric_lightning", { pos = pos[#pos], max_hear_distance = 5, gain = 0.1, }) end local oo for _, ob in ipairs(obs) do if aliveai.is_bot(ob) then aliveai.dying(ob:get_luaentity(),1) end aliveai.punchdmg(ob,15) aliveai_electric.hit(ob) minetest.sound_play("aliveai_electric_lightning", { pos=ob:get_pos(), max_hear_distance = 5, gain = 0.1, }) oo=1 end if not oo and pos[#pos] then for i, ob2 in pairs(minetest.get_objects_inside_radius(pos[#pos], 2)) do if aliveai.is_bot(ob2) then aliveai.dying(ob2:get_luaentity(),1) end aliveai.punchdmg(ob2,15) aliveai_electric.hit(ob2) end end for _, p in ipairs(pos) do minetest.set_node(p,{name="aliveai_electric:lightning"}) end if aliveai_nitroglycerine and hit then aliveai_nitroglycerine.explode(hit,{radius=2}) end end aliveai_electric.lightning1=function(obs,pos,hit) if not (obs and pos) then return end if pos[1] then minetest.sound_play("aliveai_electric_lightning", { pos = pos[1], max_hear_distance = 5, gain = 0.1, }) end if pos[#pos] then minetest.sound_play("aliveai_electric_lightning", { pos = pos[#pos], max_hear_distance = 5, gain = 0.1, }) end for _, ob in ipairs(obs) do minetest.set_node(ob:get_pos(), {name="aliveai_electric:lightning_clump"}) aliveai_electric.hit(ob,math.random(2,7)) minetest.sound_play("aliveai_electric_lightning", { pos=ob:get_pos(), max_hear_distance = 5, gain = 0.1, }) end for _, p in ipairs(pos) do minetest.add_particlespawner({ amount = 20, time =0.2, minpos = {x=p.x-0.3,y=p.y-0.3,z=p.z-0.3}, maxpos = {x=p.x+0.3,y=p.y+0.3,z=p.z+0.3}, minvel = {x=-0.1, y=-0.1, z=-0.1}, maxvel = {x=0.1, y=0.1, z=0.1}, minacc = {x=0, y=0, z=0}, maxacc = {x=0, y=0, z=0}, minexptime = 0.1, maxexptime = 0.5, minsize = 1, maxsize = 3, texture = "aliveai_electric_vol.png", glow=13, }) minetest.set_node(p,{name="aliveai_electric:chock"}) end if hit and pos[#pos] then minetest.set_node(pos[#pos],{name="aliveai_electric:lightning_clump"}) end end minetest.register_node("aliveai_electric:lightning_clump", { description = "Lightning clump", groups = {not_in_creative_inventory=1}, drops="", tiles = { { name = "aliveai_electric_clump.png", animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 0.4, }, }, }, pointable=false, post_effect_color = {a = 210, r =10, g = 80, b = 230}, drawtype="plantlike", light_source = 8, paramtype = "light", alpha = 50, sunlight_propagates = true, liquid_viscosity = 8, liquid_renewable = false, liquid_range = 0, liquid_alternative_flowing="aliveai_electric:lightning_clump", liquid_alternative_source="aliveai_electric:lightning_clump", liquidtype = "source", walkable=false, is_ground_content = false, on_construct=function(pos) minetest.get_node_timer(pos):start(1) end, on_timer=function(pos, elapsed) local rnd=math.random(1,3) local sp=0 for i, ob in pairs(minetest.get_objects_inside_radius(pos, 3)) do local p=ob:get_pos() if aliveai.team(ob)~="nuke" and aliveai.def(p,"buildable_to") then minetest.set_node(p, {name="aliveai_electric:lightning_clump"}) aliveai_electric.hit(ob) minetest.sound_play("aliveai_electric", {pos=pos, gain = 0.1, max_hear_distance = 10,}) p.y=p.y+1 if aliveai.def(p,"buildable_to") then minetest.set_node(p, {name="aliveai_electric:lightning_clump"}) end end sp=sp+1 if sp>2 then break end end if rnd>=2 then minetest.set_node(pos, {name = "air"}) return false else local np=minetest.find_node_near(pos, 2,{"air"}) if np~=nil then minetest.set_node(np, {name="aliveai_electric:lightning_clump"}) minetest.sound_play("aliveai_electric", {pos=pos, gain = 0.1, max_hear_distance = 10}) end end return true end }) minetest.register_node("aliveai_electric:lightning", { description = "lightning", drawtype="glasslike", tiles = {"default_cloud.png^[colorize:#ff3fd7ff"}, drop="", light_source = default.LIGHT_MAX - 1, paramtype = "light", walkable=false, sunlight_propagates = true, pointable=false, buildable_to = true, groups = {not_in_creative_inventory=1}, post_effect_color = {a = 255, r=255, g=255, b=255}, walkable=false, damage_per_second = 10, on_construct = function(pos) minetest.get_node_timer(pos):start(0.3) end, on_timer = function (pos, elapsed) minetest.set_node(pos,{name="air"}) end, }) minetest.register_node("aliveai_electric:chock", { drawtype="airlike", tiles = {"aliveai_air.png"}, drop="", light_source = default.LIGHT_MAX - 1, walkable=false, sunlight_propagates = true, pointable=false, buildable_to = true, groups = {not_in_creative_inventory=1}, post_effect_color = {a = 200, r=255, g=255, b=255}, walkable=false, on_construct = function(pos) minetest.get_node_timer(pos):start(0.1) end, on_timer = function (pos, elapsed) minetest.set_node(pos,{name="air"}) end, })
-- -- Copyright (c) 2015, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. -- -- Author: Alexander M Rush <srush@seas.harvard.edu> -- Sumit Chopra <spchopra@fb.com> -- Jason Weston <jase@fb.com> -- The top-level training script require('torch') require('nngraph') local nnlm = require('summary.nnlm') local data = require('summary.data') local encoder = require('summary.encoder') cmd = torch.CmdLine() cmd:text() cmd:text() cmd:text('Train a summarization model.') cmd:text() data.add_opts(cmd) encoder.add_opts(cmd) nnlm.addOpts(cmd) opt = cmd:parse(arg) local function main() -- Load in the data. local tdata = data.load_title(opt.titleDir, true) local article_data = data.load_article(opt.articleDir) local valid_data = data.load_title(opt.validTitleDir, nil, tdata.dict) local valid_article_data = data.load_article(opt.validArticleDir, article_data.dict) -- Make main LM local train_data = data.init(tdata, article_data) local valid = data.init(valid_data, valid_article_data) local encoder_mlp = encoder.build(opt, train_data) local mlp = nnlm.create_lm(opt, tdata.dict, encoder_mlp, opt.bowDim, article_data.dict) mlp:train(train_data, valid) end main()
--[[ A multi line comment call out box ]]-- -- This is a local variable local total = 0 -- Here is a function function Init() -- This is a call out example -- Here is a loop for i = 1, total do -- Here is a condition in a for loop if (Tile(pos.x, pos.y).SpriteId > -1) then -- Here is a block of code in a for loop if condition table.insert(tileIDs, index) --Testing multiple close blocks (Should be ignored) end end end
AuctionatorBagItemContainerMixin = {} function AuctionatorBagItemContainerMixin:OnLoad() self.iconSize = Auctionator.Config.Get(Auctionator.Config.Options.SELLING_ICON_SIZE) self.items = {} self.buttons = {} self.buttonPool = CreateAndInitFromMixin(Auctionator.Utilities.PoolMixin) self.buttonPool:SetCreator(function() local button = CreateFrame("Button", nil, self, "AuctionatorBagItem") button:SetSize(self.iconSize, self.iconSize) return button end) end function AuctionatorBagItemContainerMixin:Reset() self.items = {} for _, item in ipairs(self.buttons) do item:Hide() self.buttonPool:Return(item) end self.buttons = {} end function AuctionatorBagItemContainerMixin:GetRowLength() return math.floor(250/self.iconSize) end function AuctionatorBagItemContainerMixin:GetRowWidth() return self:GetRowLength() * self.iconSize end function AuctionatorBagItemContainerMixin:AddItems(itemList) for _, item in ipairs(itemList) do self:AddItem(item) end self:DrawButtons() end function AuctionatorBagItemContainerMixin:AddItem(item) local button = self.buttonPool:Get() button:Show() button:SetItemInfo(item) table.insert(self.buttons, button) table.insert(self.items, item) end function AuctionatorBagItemContainerMixin:DrawButtons() local rows = 1 for index, button in ipairs(self.buttons) do if index == 1 then button:SetPoint("TOPLEFT", self, "TOPLEFT", 0, -2) elseif ((index - 1) % self:GetRowLength()) == 0 then rows = rows + 1 button:SetPoint("TOPLEFT", self.buttons[index - self:GetRowLength()], "BOTTOMLEFT") else button:SetPoint("TOPLEFT", self.buttons[index - 1], "TOPRIGHT") end end if #self.buttons > 0 then self:SetSize(self.buttons[1]:GetWidth() * 3, rows * self.iconSize + 2) else self:SetSize(0, 0) end self:SetSize(self.iconSize * self:GetRowLength(), self:GetHeight()) end function AuctionatorBagItemContainerMixin:GetNumItems() return #self.items end
ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.PrintName = "Radio" ENT.Category = "CityRP" ENT.Spawnable = true ENT.Model = "models/props_lab/citizenradio.mdl" function ENT:SetupDataTables() self:NetworkVar("Int", 0, "price") self:NetworkVar("Entity", 1, "owning_ent") end function ENT:GitPos() return self:GetPos() end
--電脳堺悟-老々 -- --Script by JustFish function c101102011.initial_effect(c) --spsummon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(101102011,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE+CATEGORY_GRAVE_ACTION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,101102011) e1:SetTarget(c101102011.sptg) e1:SetOperation(c101102011.spop) c:RegisterEffect(e1) end function c101102011.tfilter(c,tp) local type1=c:GetType()&0x7 return c:IsSetCard(0x24e) and c:IsFaceup() and Duel.IsExistingMatchingCard(c101102011.tgfilter,tp,LOCATION_DECK,0,1,nil,tp,type1) end function c101102011.tgfilter(c,type1) return not c:IsType(type1) and c:IsSetCard(0x24e) and c:IsAbleToGrave() end function c101102011.spfilter(c,e,tp,code1) return c:IsSetCard(0x24e) and not c:IsCode(code1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function c101102011.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c101102011.tfilter(chkc,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(c101102011.tfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,c101102011.tfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function c101102011.spop(e,tp,eg,ep,ev,re,r,rp) local c,tc=e:GetHandler(),Duel.GetFirstTarget() local type1=tc:GetType()&0x7 if tc:IsRelateToEffect(e) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c101102011.tgfilter,tp,LOCATION_DECK,0,1,1,nil,type1) local tgc=g:GetFirst() if tgc and Duel.SendtoGrave(tgc,REASON_EFFECT)~=0 and tgc:IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then local code1=tgc:GetCode() local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101102011.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp,code1) if #sg>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(101102011,1)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sc=sg:Select(tp,1,1,nil):GetFirst() Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD) sc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetReset(RESET_EVENT+RESETS_STANDARD) sc:RegisterEffect(e2) Duel.SpecialSummonComplete() end end end local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e3:SetTargetRange(1,0) e3:SetTarget(c101102011.splimit) e3:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e3,tp) end function c101102011.splimit(e,c) return not (c:IsLevelAbove(3) or c:IsRankAbove(3)) end
--[[----------------------------------------------------------------------------- * Infected Wars, an open source Garry's Mod game-mode. * * Infected Wars is the work of multiple authors, * a full list can be found in CONTRIBUTORS.md. * For more information, visit https://github.com/JarnoVgr/InfectedWars * * Infected Wars is free software: you can redistribute it and/or modify * it under the terms of the MIT License. * * A full copy of the MIT License can be found in LICENSE.txt. -----------------------------------------------------------------------------]] AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" ) include('shared.lua') local sndOnline = Sound( "weapons/tripwire/mine_activate.wav" ) function ENT:Think() if ( self:GetActiveTime() == 0 || self:GetActiveTime() > CurTime() ) then return end if ( self.Activated ) then return end self.Activated = true self.Entity:GetOwner():EmitSound( sndOnline ) end function ENT:StartTouch( ent ) if ( self:GetActiveTime() == 0 || self:GetActiveTime() > CurTime() ) then return end if ent:IsPlayer() then if ent:Team() == TEAM_UNDEAD then ent:SetDetectable(true) self.Entity:GetOwner():GetTable():Alarm() else self.Entity:GetOwner():GetTable():Notify() end end end
--Remap escape to leave terminal mode vim.api.nvim_exec([[ augroup SpellCheck autocmd! autocmd BufNewFile,BufRead *.md setlocal spell augroup end ]], false)
AddCSLuaFile() --Entity only for spawner! function ENT:Initialize() self:Remove() end ENT.Type = "anim" ENT.Base = "gmod_subway_base" ENT.PrintName = "81-717 SPB Custom" ENT.SkinsType = "81-717_spb" ENT.Spawnable = false ENT.AdminSpawnable = false ENT.SubwayTrain = { Type = "81", Name = "81-717.5m", WagType = 1, Manufacturer = "SPB", } ENT.Spawner = { model = { "models/metrostroi_train/81-717/81-717_spb.mdl", "models/metrostroi_train/81-717/interior_spb.mdl", "models/metrostroi_train/81-717/717_body_additional_spb.mdl", "models/metrostroi_train/81-717/brake_valves/334.mdl", "models/metrostroi_train/81-717/lamps_type1.mdl", "models/metrostroi_train/81-717/couch_old.mdl", "models/metrostroi_train/81-717/couch_cap_l.mdl", "models/metrostroi_train/81-717/handlers_old.mdl", "models/metrostroi_train/81-717/mask_spb_222.mdl", "models/metrostroi_train/81-717/couch_cap_r.mdl", "models/metrostroi_train/81-717/cabine_spb_central.mdl", "models/metrostroi_train/81-717/pult/body_spb_yellow.mdl", "models/metrostroi_train/81-717/pult/pult_spb_yellow.mdl", "models/metrostroi_train/81-717/pult/puav_new.mdl", "models/metrostroi_train/81-717/pult/ars_spb_yellow.mdl", }, head = "gmod_subway_81-717_lvz", interim = "gmod_subway_81-714_lvz", func = function(train,i,max,LastRot) train.CustomSettings = true local typ = train:GetNW2Int("Type") if 1==i or i==max then train.NumberRangesID = typ==1 and math.ceil(math.random()+0.5) or typ+1 else train.NumberRangesID = typ end end, {"Type","Spawner.717.Type","List",{"Spawner.717.Type.Line2","Spawner.717.Type.Line4","Spawner.717.Type.Line5"}}, {"Scheme","Spawner.717.Schemes","List",function() local Schemes = {} for k,v in pairs(Metrostroi.Skins["717_new_schemes"] or {}) do Schemes[k] = v.name or k end return Schemes end}, {}, Metrostroi.Skins.GetTable("Texture","Spawner.Texture",false,"train"), Metrostroi.Skins.GetTable("PassTexture","Spawner.PassTexture",false,"pass"), Metrostroi.Skins.GetTable("CabTexture","Spawner.CabTexture",false,"cab"), {}, {"BodyType","Spawner.717.BodyType","List",{"Spawner.717.Common.Random","Spawner.717.Common.Standart","Spawner.717.Common.Old"}}, {"SeatType","Spawner.717.SeatType","List",{"Spawner.717.Common.Random","Spawner.717.Common.Old","Spawner.717.Common.New","Spawner.717.Common.NewBlue"}}, {}, {"SpawnMode","Spawner.717.SpawnMode","List",{"Spawner.717.SpawnMode.Full","Spawner.717.SpawnMode.Deadlock","Spawner.717.SpawnMode.NightDeadlock","Spawner.717.SpawnMode.Depot"}, nil,function(ent,val,rot,i,wagnum,rclk) if rclk then return end if ent._SpawnerStarted~=val then ent.VB:TriggerInput("Set",val<=2 and 1 or 0) ent.ParkingBrake:TriggerInput("Set",val==3 and 1 or 0) if ent.AR63 then local first = i==1 or _LastSpawner~=CurTime() ent.OhrSig:TriggerInput("Set",val<4 and 1 or 0) ent.A53:TriggerInput("Set",val<=3 and 1 or 0) ent.AR63:TriggerInput("Set",val<=2 and 1 or 0) ent.R_UNch:TriggerInput("Set",val==1 and 1 or 0) ent.R_UPO:TriggerInput("Set",val<=2 and 1 or 0) if ent.Plombs.RC1 and val<=2 then ent.VPAOn:TriggerInput("Set",1) timer.Simple(1,function() if not IsValid(ent) or val > 2 then return end ent.VPAOn:TriggerInput("Set",0) end) else ent.VPAOn:TriggerInput("Set",0) end ent.VAU:TriggerInput("Set",(ent.Plombs.RC2 and val<=2) and 1 or 0) ent.L_4:TriggerInput("Set",val==1 and 1 or 0) ent.BPSNon:TriggerInput("Set",(val==1 and first) and 1 or 0) ent.VMK:TriggerInput("Set",(val==1 and first) and 1 or 0) ent.ARS:TriggerInput("Set",(ent.Plombs.RC1 and val==1 and first) and 1 or 0) ent.ALS:TriggerInput("Set",(ent.Plombs.RC1 and val==1) and 1 or 0) ent.L_1:TriggerInput("Set",val==1 and 1 or 0) ent.L_3:TriggerInput("Set",val==1 and 1 or 0) ent.L_4:TriggerInput("Set",val==1 and 1 or 0) ent.EPK:TriggerInput("Set",(ent.Plombs.RC1 and val==1) and 1 or 0) _LastSpawner=CurTime() ent.CabinDoor = val==4 and first ent.PassengerDoor = val==4 ent.RearDoor = val==4 else ent.FrontDoor = val==4 ent.RearDoor = val==4 end if val == 1 then timer.Simple(1,function() if not IsValid(ent) then return end ent.BV:TriggerInput("Enable",1) end) end ent.GV:TriggerInput("Set",val<4 and 1 or 0) ent._SpawnerStarted = val end ent.Pneumatic.TrainLinePressure = val==3 and math.random()*4 or val==2 and 4.5+math.random()*3 or 7.6+math.random()*0.6 if val==4 then ent.Pneumatic.BrakeLinePressure = 5.2 end end}, }
-- Token -- Represents a token from lexing/parsing a NameList text. The grammar is described in more detail in grammar_example.txt local Token = {} Token.types = { eof=0, identifier=1, string=2, literal=3, list_placeholder=4, parentheses_block=5, list_block=6, weight_block=7, separator=8, operator=9, comment=10 } -- Used only for errors / debugging -- Shouldn't need localization as a result Token.type_names = { [Token.types.eof] = "EOF", [Token.types.identifier] = "Identifier", [Token.types.string] = "String", [Token.types.literal] = "Numeric Literal", [Token.types.list_placeholder] = "List Placeholder Token", [Token.types.parentheses_block] = "Parentheses", [Token.types.list_block] = "List Block", [Token.types.weight_block] = "Weight Block", [Token.types.separator] = "Separator", [Token.types.operator] = "Operator", [Token.types.comment] = "Comment" } function Token.new(o) o = o or {} assert(o.type ~= nil, "Tokens must have a type associated with them.") --value return o end function Token.debugString(o) local token_type_string = Token.type_names[o.type] or string.format("Unknown [%s]", tostring(o.type)) if o.value == nil then return string.format("(%s)", tostring(token_type_string)) end return string.format("(%s = %s)", token_type_string, tostring(o.value)) end return Token
------------------------- --EMA shiftEMASettings = { period = 0, period2 = 0, shift = 1, Size = 0 } function iterateShiftEMA(iSec, cell) iterateSLTP = false local param1Min = 20 local param1Max = 120 local param1Step = 1 local param2Min = 20 local param2Max = 180 local param2Step = 1 local param3Min = 1 local param3Max = 10 local param3Step = 1 local settingsTable = {} local allCount = 0 for param1 = param1Min, param1Max, param1Step do --_param2Min = math.max(math.ceil(param1+1), param2Min) for param2 = param2Min, param2Max, param2Step do for param3 = param3Min, math.ceil(0.8*param1), param3Step do --for param3 = param3Min, param3Max, param3Step do allCount = allCount + 1 settingsTable[allCount] = { period = param1, period2 = param2, -- 1 -линейная, 2 - параболическая, - 3 степени shift = param3, Size = Size } end end end iterateAlgorithm(iSec, cell, settingsTable) end function initShiftEMA() EMA=nil TEMA=nil cache_TEMA1=nil cache_TEMA2=nil cache_TEMA3=nil trend=nil calcAlgoValue=nil calcChartResults=nil MA = nil Y = nil Close = nil Open = nil High = nil Low = nil Cycle = nil it = nil Price = nil end function shiftEMA(index, settings, DS) local period = settings.period or 29 local period2 = settings.period2 or 29 local shift = settings.shift or 1 local Size = settings.Size or 2000 local indexToCalc = 1000 indexToCalc = settings.Size or indexToCalc local beginIndexToCalc = settings.beginIndexToCalc or math.max(1, settings.beginIndex - indexToCalc) local endIndexToCalc = settings.endIndex or DS:Size() --подготавливаем массив данных по периодам if index == nil then index = 1 end if EMA == nil then myLog("--------------------------------------------------") myLog("Показатель Period "..tostring(period)) myLog("Показатель Period2 "..tostring(period2)) myLog("Показатель shift "..tostring(shift)) myLog("--------------------------------------------------") MA = {} MA[index] = 0 Y = {} Y[index] = 0 Close = {} Close[index] = 0 Open = {} Open[index] = 0 High = {} High[index] = 0 Low = {} Low[index] = 0 EMA = {} EMA[index] = 1 TEMA = {} TEMA[index] = 1 cache_TEMA1={} cache_TEMA2={} cache_TEMA3={} cache_TEMA1[index]= 0 cache_TEMA2[index]= 0 cache_TEMA3[index]= 0 trend = {} trend[index] = 1 calcAlgoValue = {} calcAlgoValue[index] = {} calcChartResults = {} calcChartResults[index] = {} return calcAlgoValue, trend, calcChartResults end MA[index] = MA[index-1] Open[index] = Open[index-1] High[index] = High[index-1] Low[index] = Low[index-1] Close[index] = Close[index-1] Y[index] = Y[index-1] EMA[index] = EMA[index-1] TEMA[index] = TEMA[index-1] cache_TEMA1[index] = cache_TEMA1[index-1] cache_TEMA2[index] = cache_TEMA2[index-1] cache_TEMA3[index] = cache_TEMA3[index-1] calcAlgoValue[index] = calcAlgoValue[index-1] trend[index] = trend[index-1] calcChartResults[index] = calcChartResults[index-1] if index <= beginIndexToCalc + period + shift + 20 or index > endIndexToCalc then return calcAlgoValue, trend, calcChartResults end local k = 2/(period2+1) local kTEMA = 2/(period+1) EMA[index] = (DS:C(index)+DS:O(index))/2 if DS:C(index) ~= nil then local val = dValue(index,'C') EMA[index]=round(k*val+(1-k)*EMA[index-1], 5) cache_TEMA1[index]=kTEMA*val+(1-kTEMA)*cache_TEMA1[index-1] cache_TEMA2[index]=kTEMA*cache_TEMA1[index]+(1-kTEMA)*cache_TEMA2[index-1] cache_TEMA3[index]=kTEMA*cache_TEMA2[index]+(1-kTEMA)*cache_TEMA3[index-1] TEMA[index] = 3*cache_TEMA1[index] - 3*cache_TEMA2[index] + cache_TEMA3[index] local isUpPinBar = DS:C(index)>DS:O(index) and (DS:H(index)-DS:C(index))/(DS:H(index) - DS:L(index))>=0.5 local isLowPinBar = DS:C(index)<DS:O(index) and (DS:C(index)-DS:L(index))/(DS:H(index) - DS:L(index))>=0.5 --not isUpPinBar and --not isLowPinBar and local isBuy = (TEMA[index] > EMA[index-shift] and TEMA[index-1] <= EMA[index-shift-1]) local isSell = (TEMA[index] < EMA[index-shift] and TEMA[index-1] >= EMA[index-shift-1]) if isBuy then trend[index] = 1 end if isSell then trend[index] = -1 end calcAlgoValue[index] = TEMA[index] end calcChartResults[index] = {TEMA[index], EMA[index-shift-1]} return calcAlgoValue, trend, calcChartResults end local newIndex = #ALGORITHMS['names']+1 ALGORITHMS['names'][newIndex] = "ShiftEMA" ALGORITHMS['initParams'][newIndex] = initShiftEMA ALGORITHMS['initAlgorithms'][newIndex] = initShiftEMA ALGORITHMS['itetareAlgorithms'][newIndex] = iterateShiftEMA ALGORITHMS['calcAlgorithms'][newIndex] = shiftEMA ALGORITHMS['tradeAlgorithms'][newIndex] = simpleTrade ALGORITHMS['settings'][newIndex] = shiftEMASettings
local make_layered_icon = require("icon") local function get_parent_technology(recipe_name) for _, technology in pairs(data.raw.technology) do --log(technology.name) if (technology.enabled or technology.enabled == nil) and technology.effects then for _, effect in pairs(technology.effects) do if effect.type == "unlock-recipe" and effect.recipe == recipe_name then --log(recipe_name) return technology.name end end end end return nil end local function setup_crane_tech(itemName, newName) local parent_tech_name = get_parent_technology(itemName) --log(itemName.. " is unlocked by " .. parent_tech_name) if parent_tech_name then local tech_name = "technology-" .. parent_tech_name .. "-crane" local technology = data.raw["technology"][tech_name] if not technology then technology = util.table.deepcopy(data.raw["technology"][parent_tech_name]) technology.name = tech_name make_layered_icon(technology,true) technology.effects = {} technology.unit.count = technology.unit.count * 2 technology.prerequisites = { "railway", parent_tech_name } data:extend({technology}) end table.insert( technology.effects, { type = "unlock-recipe", recipe = newName } ) end end return setup_crane_tech
local oldMarineBuy_GetEquipped = MarineBuy_GetEquipped function MarineBuy_GetEquipped() local equipped = oldMarineBuy_GetEquipped() local player = Client.GetLocalPlayer() local items = GetChildEntities(player, "ScriptActor") for _, item in ipairs(items) do local techId = item:GetTechId() if techId == kTechId.Axe and item.hasWelder then table.insertunique(equipped, kTechId.Welder) end end return equipped end local oldMarineBuy_GetEquipment = MarineBuy_GetEquipment function MarineBuy_GetEquipment() local inventory = oldMarineBuy_GetEquipment() local player = Client.GetLocalPlayer() local items = GetChildEntities( player, "ScriptActor" ) for _, item in ipairs(items) do local techId = item:GetTechId() if techId == kTechId.Axe and item.hasWelder then inventory[kTechId.Welder] = true end end return inventory end -- this isn't called from anywhere... --[[ local oldMarineBuy_GetEquippedWeapons = MarineBuy_GetEquippedWeapons function MarineBuy_GetEquippedWeapons() local t = oldMarineBuy_GetEquippedWeapons() local player = Client.GetLocalPlayer() local items = GetChildEntities(player, "ScriptActor") for _, item in ipairs(items) do local techId = item:GetTechId() if techId == kTechId.Axe and item.hasWelder then local itemName = GetDisplayNameForTechId(kTechId.Welder) table.insert(t, itemName) local index = TechIdToWeaponIndex(kTechId.Welder) table.insert(t, 0) table.insert(t, index - 1) end end return t end ]]--
describe('unwrap', function() it('produces an error if its parent errors', function() local observable = Rx.Observable.of(''):map(function(x) return x() end) expect(observable.subscribe).to.fail() expect(observable:unwrap().subscribe).to.fail() end) it('produces any multiple values as individual values', function() local observable = Rx.Observable.create(function(observer) observer:onNext(1) observer:onNext(2, 3) observer:onNext(4, 5, 6) observer:onCompleted() end) expect(observable).to.produce({{1}, {2, 3}, {4, 5, 6}}) expect(observable:unwrap()).to.produce(1, 2, 3, 4, 5, 6) end) end)
---@class vm local vm = require 'vm.vm' local searcher = require 'core.searcher' function vm.getDefs(source, field) return searcher.requestDefinition(source, field) end function vm.getAllDefs(source, field) return searcher.requestAllDefinition(source, field) end
-- Copyright (c) 2021 Trevor Redfern -- -- This software is released under the MIT License. -- https://opensource.org/licenses/MIT describe("game.ui.camera.actions.set_dimensions", function() local set_dimensions = require "game.ui.camera.actions.set_dimensions" it("takes a width and height for the camera to be", function() local action = set_dimensions(48, 293) assert.equals("CAMERA_SET_DIMENSIONS", action.type) assert.equals(48, action.payload.width) assert.equals(293, action.payload.height) end) end)
require_ 'macro.do' -- unrolling a loop y = 0 do_( i,1, 10, y = y + i ) assert(y == 55) -- do_ defined a _local_ macro 'i' assert(i == nil) -- tuples usually expand to A_1,A_2,A_3 and so forth tuple(3) A,B B = 10,20,30 print(B) def_ do3(v,s) do_(v,1,3,s) -- but inside a do_ statements with tuples work element-wise -- debug_ do_(k,1,3, A = B/2 ) --[[ print(A) --]]
local Native = require('lib.native.native') ---@class AbilityIntegerLevelArrayField local AbilityIntegerLevelArrayField = { } return AbilityIntegerLevelArrayField
-------------------------------- -- @module Source -- @extend Ref -- @parent_module audio ---@class audio.Source:cc.Ref local Source = {} audio.Source = Source -------------------------------- --- Creates an identical copy of the Source in the stopped state. --- Will save memory and time when the Source is static. --- note Cloned Sources inherit all the set-able state of the original Source, but they are initialized stopped. --- return The new identical copy of this Source. ---@return audio.Source function Source:clone() end -------------------------------- --- Creates Source from without data source. The audio data must be manually queued by the user. ---@param sampleRate number ---@param bitDepth number ---@param channels number ---@param buffers number ---@return audio.Source function Source:create(sampleRate, bitDepth, channels, buffers) end -------------------------------- --- Creates Source from a Decoder. The audio is decoded in chunks when needed. ---@param decoder audio.Decoder ---@return audio.Source function Source:createFromDecoder(decoder) end -------------------------------- --- Creates Source from a SoundData, which holds the whole audio data. ---@param soundData audio.SoundData ---@return audio.Source function Source:createFromSoundData(soundData) end -------------------------------- --- Gets a list of the Source's active effect names. --- return A list of the source's active effect names. ---@return string[] function Source:getActiveEffects() end -------------------------------- --- Gets the amount of air absorption applied to the Source. --- see setAirAbsorptionFactor --- return The amount of air absorption applied to the Source. ---@return number function Source:getAirAbsorptionFactor() end -------------------------------- --- ---@return number function Source:getBitDepth() end -------------------------------- --- ---@return number function Source:getBytesPerFrame() end -------------------------------- --- ---@return number function Source:getChannelCount() end -------------------------------- --- Gets the Source's directional volume cones. --- return An array contains innerAngle, outerAngle, outerVolume, outerHighGain. ---@return number[] function Source:getCone() end -------------------------------- --- Gets the direction of the Source. --- return The direction vector. ---@return vec3_table function Source:getDirection() end -------------------------------- --- Gets the filter settings associated to a specific effect. --- This function returns empty map if the effect was applied with no filter settings associated to it. --- param name The name of the effect. --- return The settings for the filter associated to this effect. ---@param name string ---@return map_table function Source:getEffect(name) end -------------------------------- --- Gets the filter settings currently applied to the Source. --- return The filter settings to use for this Source, or empty map if the Source has no active filter. ---@return map_table function Source:getFilter() end -------------------------------- --- Gets the number of free buffer slots in a queueable Source. --- If the queueable Source is playing, this value will increase up to the amount the Source was created with. --- If the queueable Source is stopped, it will process all of its internal buffers first, in which case this --- function will always return the amount it was created with. --- return How many more SoundData objects can be queued up. ---@return number function Source:getFreeBufferCount() end -------------------------------- --- ---@return string function Source:getLastError() end -------------------------------- --- Returns the looping end time of the Source. --- return The looping end time in seconds. ---@return number function Source:getLoopingEnd() end -------------------------------- --- Returns the looping start time of the Source. --- return The looping start time in seconds. ---@return number function Source:getLoopingStart() end -------------------------------- --- Gets the maximum attenuation distances of the Source. --- see setMaxDistance --- return The current maximum attenuation distance. ---@return number function Source:getMaxDistance() end -------------------------------- --- Returns the volume limits of the Source. --- return The maximum volume. ---@return number function Source:getMaxVolume() end -------------------------------- --- Returns the volume limits of the Source. --- return The minimum volume. ---@return number function Source:getMinVolume() end -------------------------------- --- Gets the current pitch of the Source. --- return The pitch, where 1.0 is normal. ---@return number function Source:getPitch() end -------------------------------- --- Gets the position of the Source. --- return The position of the Source. ---@return vec3_table function Source:getPosition() end -------------------------------- --- Gets the reference attenuation distances of the Source. --- see setReferenceDistance --- return The current reference attenuation distance. ---@return number function Source:getReferenceDistance() end -------------------------------- --- Returns the rolloff factor of the Source. --- return The rolloff factor. ---@return number function Source:getRolloffFactor() end -------------------------------- --- ---@return number function Source:getSampleRate() end -------------------------------- --- Gets the currently playing position of the Source. --- return The currently playing position of the Source in seconds. ---@return number function Source:getTime() end -------------------------------- --- Gets total frames of the Source. ---@return number function Source:getTotalFrames() end -------------------------------- --- Gets total seconds of the Source. ---@return number function Source:getTotalTime() end -------------------------------- --- Gets the type of the Source. --- return The type of the source. ---@return number function Source:getType() end -------------------------------- --- Gets the velocity of the Source. --- return The velocity vector. ---@return vec3_table function Source:getVelocity() end -------------------------------- --- Gets the current volume of the Source. --- return The volume of the Source, where 1.0 is normal volume. ---@return number function Source:getVolume() end -------------------------------- --- ---@return boolean function Source:isFinished() end -------------------------------- --- Returns whether the Source will loop. --- return True if the Source will loop, false otherwise. ---@return boolean function Source:isLooping() end -------------------------------- --- Returns whether the Source is playing. --- return True if the Source is playing, false otherwise. ---@return boolean function Source:isPlaying() end -------------------------------- --- Gets whether the Source's position, velocity, direction, and cone angles are relative to the listener. --- return True if the position, velocity, direction and cone angles are relative to the listener, false if they're absolute. ---@return boolean function Source:isRelative() end -------------------------------- --- Returns whether the Source supports looping point. --- return True if the Source supports looping point, false otherwise. ---@return boolean function Source:isSupportLoopingPoint() end -------------------------------- --- Pauses the Source. ---@return audio.Source function Source:pause() end -------------------------------- --- ---@return array_table function Source:pauseAll() end -------------------------------- --- Pauses the given Sources. --- param sources Sources to pause. ---@param sources array_table ---@return audio.Source function Source:pauseBatch(sources) end -------------------------------- --- Starts playing the Source. --- return Whether the Source was able to successfully start playing. ---@return boolean function Source:play() end -------------------------------- --- Starts playing multiple Sources simultaneously. --- param sources Sources to play. --- return True if all sources successfully played, false if there is error. ---@param sources array_table ---@return boolean function Source:playBatch(sources) end -------------------------------- --- Queues SoundData for playback in a queueable Source. --- param data The data to queue. The SoundData's sample rate, bit depth, and channel count must match the Source's. --- param offset --- param length --- return True if the data was successfully queued for playback, false if there were no available buffers to use for queueing. ---@param data audio.SoundData ---@param offset number ---@param length number ---@return boolean function Source:queue(data, offset, length) end -------------------------------- --- Disables the effect. --- param name The name of the effect previously set up with Engine::setEffect. ---@param name string ---@return boolean function Source:removeEffect(name) end -------------------------------- --- Disables filtering on this Source. ---@return boolean function Source:removeFilter() end -------------------------------- --- Sets the currently playing position of the Source. --- param offset The position to seek to in frames. ---@param offset number ---@return audio.Source function Source:seek(offset) end -------------------------------- --- Sets the amount of air absorption applied to the Source. --- By default the value is set to 0 which means that air absorption effects are disabled. --- A value of 1 will apply high frequency attenuation to the Source at a rate of 0.05 dB per meter. --- Air absorption can simulate sound transmission through foggy air, dry air, smoky atmosphere, etc. --- It can be used to simulate different atmospheric conditions within different locations in an area. --- param value The amount of air absorption applied to the Source. Must be between 0 and 10. ---@param value number ---@return audio.Source function Source:setAirAbsorptionFactor(value) end -------------------------------- --- ---@param innerAngle number ---@param outerAngle number ---@param outerVolume number ---@param outerHighGain number ---@return audio.Source ---@overload fun(self:audio.Source, param:number[]):audio.Source function Source:setCone(innerAngle, outerAngle, outerVolume, outerHighGain) end -------------------------------- --- Sets the direction vector of the Source. --- A zero vector makes the source non-directional. --- param v The direction vector. ---@param v vec3_table ---@return audio.Source function Source:setDirection(v) end -------------------------------- --- Applies the given previously defined effect to this Source,<br> -- and applies a filter to the Source which affects the sound fed into the effect.<br> -- param name The name of the effect previously set up with Engine::setEffect.<br> -- param filterParams The filter settings to apply prior to the effect.<br> -- return Whether the effect and filter were successfully applied to this Source. ---@param name string ---@param filterParams map_table ---@return boolean ---@overload fun(self:audio.Source, name:string):boolean function Source:setEffect(name, filterParams) end -------------------------------- --- Sets a low-pass, high-pass, or band-pass filter to apply when playing the Source. --- note While the cutoff frequency cannot be set directly, changing high/lowgain has the effect of altering the cutoff. --- param params The filter settings to use for this Source. --- return Whether the filter was successfully applied to the Source. ---@param params map_table ---@return boolean function Source:setFilter(params) end -------------------------------- --- Sets whether the Source should loop. --- When music loops, it will play forever until stopped or paused. --- param enable True if the source should loop, false otherwise. ---@param enable boolean ---@return audio.Source function Source:setLooping(enable) end -------------------------------- --- Sets start and end points for looping of the Source. --- When music loops, it will play until tEnd and then rewind to tStart. --- param tStart Looping start time in seconds. Default is 0. --- param tEnd Looping end time in seconds. Default is total time of the Source. ---@param tStart number ---@param tEnd number ---@return audio.Source function Source:setLoopingPoint(tStart, tEnd) end -------------------------------- --- Sets the maximum attenuation distances of the Source. --- The parameters, combined with the current DistanceModel, affect how the Source's volume attenuates based on distance. --- Distance attenuation is only applicable to Sources based on mono (rather than stereo) audio. --- param value The new maximum attenuation distance. ---@param value number ---@return audio.Source function Source:setMaxDistance(value) end -------------------------------- --- Sets the volume limits of the Source. The limits have to be numbers from 0 to 1. --- param v The maximum volume. ---@param v number ---@return audio.Source function Source:setMaxVolume(v) end -------------------------------- --- Sets the volume limits of the Source. The limits have to be numbers from 0 to 1. --- param v The minimum volume. ---@param v number ---@return audio.Source function Source:setMinVolume(v) end -------------------------------- --- Sets the pitch of the Source. --- param value Calculated with regard to 1 being the base pitch. --- Each reduction by 50 percent equals a pitch shift of -12 semitones (one octave reduction). --- Each doubling equals a pitch shift of 12 semitones (one octave increase). --- Zero is not a legal value. ---@param value number ---@return audio.Source function Source:setPitch(value) end -------------------------------- --- Sets the position of the Source. --- note This only works for mono (i.e. non-stereo) sound files. --- param v The position of the Source. ---@param v vec3_table ---@return audio.Source function Source:setPosition(v) end -------------------------------- --- Sets the reference attenuation distances of the Source. --- The parameters, combined with the current DistanceModel, affect how the Source's volume attenuates based on distance. --- Distance attenuation is only applicable to Sources based on mono (rather than stereo) audio. --- param value The new reference attenuation distance. If the current DistanceModel is clamped, --- this is the minimum distance before the Source is no longer attenuated. ---@param value number ---@return audio.Source function Source:setReferenceDistance(value) end -------------------------------- --- Sets whether the Source's position, velocity, direction, and cone angles are relative to the listener, or absolute. --- By default, all sources are absolute and therefore relative to the origin of love's coordinate system [0, 0, 0]. --- Only absolute sources are affected by the position of the listener. Please note that positional audio only works for mono (i.e. non-stereo) sources. --- param enable True to make the position, velocity, direction and cone angles relative to the listener, false to make them absolute. ---@param enable boolean ---@return audio.Source function Source:setRelative(enable) end -------------------------------- --- Sets the rolloff factor which affects the strength of the used distance attenuation. --- param value The rolloff factor. ---@param value number ---@return audio.Source function Source:setRolloffFactor(value) end -------------------------------- --- Sets the currently playing position of the Source. --- param seconds The position to seek to in seconds. ---@param seconds number ---@return audio.Source function Source:setTime(seconds) end -------------------------------- --- Sets the velocity of the Source. --- This does not change the position of the Source, but lets the application know --- how it has to calculate the doppler effect. --- param v The velocity vector. ---@param v vec3_table ---@return audio.Source function Source:setVelocity(v) end -------------------------------- --- Sets the current volume of the Source. --- param value The volume for a Source, where 1.0 is normal volume. Volume cannot be raised above 1.0. ---@param value number ---@return audio.Source function Source:setVolume(value) end -------------------------------- --- Stops the Source. ---@return audio.Source function Source:stop() end -------------------------------- --- ---@return audio.Source function Source:stopAll() end -------------------------------- --- Simultaneously stops all given Sources. --- param sources Sources to stop. ---@param sources array_table ---@return audio.Source function Source:stopBatch(sources) end -------------------------------- --- Gets the currently playing position of the Source. --- return The currently playing position of the Source in frames. ---@return number function Source:tell() end -------------------------------- local Type = {} --- Source.Type = Type --- Type.STATIC = 0 --- Type.STREAM = 1 --- Type.QUEUE = 2 --- Type.MAX_ENUM = 3 return nil
--[=[ Sets up `require.optional("Name")`. Errors are still preserved because Roblox reports errors of module scripts regardless of caller execution context. ```lua local BasicPane = require.optional("BasicPane") ``` @class optional ]=] --[=[ Optional require, if the instance does not exist, or errors while loading, then nil is returned. @function optional @param _require function @param _module string | number | Instance @return T? @within optional ]=] return function(_require, _module) assert(_require, "Bad _require function") assert(type(_module) == "string" or type(_module) == "number" or (typeof(_module) == "Instance" and _module:IsA("ModuleScript")), "Bad module identifier") local result local ok, _ = pcall(function() result = _require(_module) end) if not ok then return nil end return result end