content
stringlengths
5
1.05M
--ZFUNC-without-v1 local function without( tab, ... ) --> reduced local values = { ... } local ignore = {} for _, v in ipairs( values ) do ignore[ v ] = true end local reduced = {} for _, v in ipairs( tab ) do if not ignore[ v ] then table.insert( reduced, v ) end end ...
-- This is called from ENT:KeyValue(key,value) to store the output from -- the map, it could also be called from ENT:AcceptInput I think, so if -- ent_fire addoutput is used, we can store that too (that hasn't been -- tested though). -- Usage: self:StoreOutput("<name of output>","<entities to fire>,<input name>,<param...
Class = require "libs.hump.class" Vector = require "libs.hump.vector" sti = require "libs.sti" Map = Class { init = function(self, map_path) self.map = sti.new(map_path) end } function Map:GetMap() return self.map end function Map:update() self.map:update() end function Map:draw() self.map:draw() end retu...
local map = vim.api.nvim_set_keymap local nop_list = { '<Up>', '<Down>', '<Left>', '<Right>' } for _, nop in pairs(nop_list) do local opts = { noremap = true, silent = true } map('n', nop, '<nop>', opts) map('i', nop, '<nop>', opts) end map('n', '<Space>', '<nop>', { noremap = true, silent = true }) map('x', '...
ENT.Base = "lab_base" ENT.PrintName = "Doctor Lab" function ENT:initVars() self.model = "models/props_c17/TrapPropeller_Engine.mdl" self.initialPrice = 2000 self.labPhrase = "Doctor Lab" self.itemPhrase = "Medical Kit" end
local NUMBERPLATE_TEXTURE_NAME = "nomer" local NUMBERPLATE_WIDTH = 256 local NUMBERPLATE_HEIGHT = 128 local mainRenderTarget = dxCreateRenderTarget(NUMBERPLATE_WIDTH, NUMBERPLATE_HEIGHT, true) local backgroundTexture local textFont local textOffsetX = 10 local textOffsetY = 17 local textWidth = 229 local textSize = ...
local coverage = require('arken.coverage') local test = {} test.should_return_a_table = function() assert( type(coverage.dump()) == 'table' ) end return test
object_mobile_battle_droid_greeter = object_mobile_shared_battle_droid_greeter:new { } ObjectTemplates:addTemplate(object_mobile_battle_droid_greeter, "object/mobile/battle_droid_greeter.iff")
----------------------------------- -- -- Zone: Alzadaal_Undersea_Ruins (72) -- ----------------------------------- local ID = require("scripts/zones/Alzadaal_Undersea_Ruins/IDs") require("scripts/globals/missions") require("scripts/globals/besieged") require("scripts/globals/settings") require("scripts/globals/titles"...
local body_part_UI_entity = {}; local config; local table_helpers; local drawing; function body_part_UI_entity.new(part_visibility, part_name_label, flinch_visibility, flinch_bar, flinch_text_label, flinch_value_label, flinch_percentage_label, break_visibility, break_bar, break_text_label, break_value_label, bre...
local game = require 'game' return{ name = 'benzalkFire', type = 'projectile', friction = 1, --0.01 * game.step, width = 72, height = 33, frameWidth = 72, frameHeight = 33, solid = true, lift = game.gravity, playerCanPickUp = false, enemyCanPickUp = false, canPlayerStore = true, velocity = { x...
id = 'V-38629' severity = 'medium' weight = 10.0 title = 'The graphical desktop environment must set the idle timeout to no more than 15 minutes.' description = 'Setting the idle delay controls when the screensaver will start, and can be combined with screen locking to prevent access from passersby.' fixtext = [=[Run t...
local colorscheme = require('undercity.colorscheme') local highlight_groups = require('undercity.highlight_groups') local M = {} M.colorscheme = function() colorscheme(highlight_groups) end return M
-- example config for google music manager sandbox, which is created on top of external debian chroot, prepared by debian-setup.cfg.lua -- using debian-sandbox.cfg.lua config file as base -- xpra x11-forwarding software (must be installed on host, v2.0 and up) may be used to isolate sanbox from host x11 service. -- op...
term.clear() term.setCursorPos(1,1) shell.run("main.lua")
require 'nn' require 'cunn' require 'cudnn' require 'dpnn' dofile './Models/Linear.lua' dofile './Models/ErrorFeedback.lua' dofile './Models/Sequential2.lua' torch.include('dpnn', 'Module.lua') local backend_name = 'cudnn' local backend if backend_name == 'cudnn' then --require 'cudnn' backend = cudnn cudnn.b...
/* _ _ _ _ _ _ | | ___ | |__ __ _ ___ | | __ __ _ | | __ | |_ _ _ ___ ___ __ __ _ __ (_) ___ _ | | / _ \ | '_ \ / _` | / __| | |/ / / _` | | |/ / | __| | | |...
--[[-------------------------------------------------------------------------- -- Dragoon Framework - A Framework for Lua/LOVE -- -- Copyright (c) 2014-2015 TsT worldmaster.fr <tst2005@gmail.com> -- --]]-------------------------------------------------------------------------- local config = require "aio.config" c...
slot0 = class("ShipPreviewMediator", import("..base.ContextMediator")) slot0.register = function (slot0) slot0.viewComponent:setShip(slot0.contextData.shipVO, slot0.contextData.weaponIds, slot0.contextData.equipSkinId) end slot0.listNotificationInterests = function (slot0) return {} end slot0.handleNotification = ...
cc = cc or {} ---Mesh object ---@class Mesh : Ref local Mesh = {} cc.Mesh = Mesh -------------------------------- --- Returns the Material being used by the Mesh ---@return Material function Mesh:getMaterial() end -------------------------------- ---get per vertex size in bytes ---@return int function Mesh:getVertexS...
-- split directory and option return function (str) str = string.match(str,"^%s*(.+)") or str; local opt,sum = "",nil; for sp in string.gmatch(str,"[^%s]+") do if not sum then sum = sp; else local epos = string.find(sp,"\\"); if epos then ...
local utils = require('metrics.utils') local fun = require('fun') local collectors_list = {} local function update() local list_on_instance = rawget(_G, '__cartridge_issues_list_on_instance') if not list_on_instance then return end local ok, issues = pcall(list_on_instance) if not ok th...
local power = 0 function start (song) print("Song: " .. song .. " @ " .. bpm .. " donwscroll: " .. downscroll) end function update (elapsed) local currentBeat = (songPos / 1000)*(bpm/60) end function beatHit (beat) end function stepHit (step) end
--[[ sh_playerthink_handler.lua MrGrimm In order to reduce the amount of loops through all players in each Think function, you can add a hook which in one loop will call the functions added. Don't know if this would make any difference. --]] PlayerThink = {} local hookFunctions = {} --[[------------...
describe("A context", function() before(function() end) after(function() end) context("A nested context", function() it("A test", function() assert_not_equal("ham", "cheese") end) context("Another nested context", function() it("Another test", function() assert_greater_than(2, 1) ...
premake.xcode4 = {} local xcode4 = premake.xcode4 function xcode4.workspace_head() _p('<?xml version="1.0" encoding="UTF-8"?>') _p('<Workspace') _p(1,'version = "1.0">') end function xcode4.workspace_tail() _p('</Workspace>') end function xcode4.workspace_file_ref(prj) local projpath = path.getrelative(prj...
require( "util" ) require( "vectors" ) local font = nil local spriteData = nil local spriteImage = nil local sprites = List() local gameMode = nil -- start, play, stop local message = nil local messages = { start='Tetris - Press any key to start', stop='Game Over - Press any key to restart' } local ...
-- -- SDKExamples.lua -- solution "SDKExamples" -- configurations { "Debug", "Release" } -- project "GeodatabaseCS" -- kind "SharedLib" -- language "C#" -- targetdir "bin/%{cfg.buildcfg}" -- files { "GeodatabaseSDK/**.cs" } links { --Pro Assemblies "C:/Program Files/ArcGIS/Pro...
ENT.Base = "aw_base" ENT.Type = "anim" ENT.Author = "The HellBox" ENT.Spawnable = false function ENT:PostSetupDataTables() self:NetworkVar( "Int", 3, "Category" ) self:NetworkVar( "Int", 4, "Prop" ) end
local player = {} player.name = "Player" player.vx = 0 player.vy = 0 player.speed = 64 player.maxSpd = 64 player.x = 0 player.y = 0 player.sprites = nil player.sprite = nil player.facing = 0 -- 0 = Up; 1 = Right; 2 = Down; 3 = Left player.state = "idle" local states = { ["idle"] = nil, ["attack"] = attack...
if (SERVER) then AddCSLuaFile("shared.lua") SWEP.AutoSwitchTo = true SWEP.AutoSwitchFrom = true SWEP.HoldType = "melee" SWEP.IconLetter = "I" end if (CLIENT) then SWEP.DrawAmmo = true SWEP.ViewModelFOV = 64 SWEP.ViewModelFlip = false SWEP.CSMuzzleFlashes = false SWEP.PrintName = "Ent Index" SW...
local TableUtil = require("sebaestschjin-tts.TableUtil") local XmlUiFactory = require("sebaestschjin-tts.xmlui.XmlUiFactory") local XmlUiElement = require("sebaestschjin-tts.xmlui.XmlUiElement") ---@class seb_XmlUi_ScrollView : seb_XmlUi_Element ---@class seb_XmlUi_ScrollView_Static ---@overload fun(element: tts__UIS...
--[[ lua-ical, utility for parsing iCalendar file format written in Lua Copyright (C) 2016 MParolari This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your opt...
-- -- Set options -- Follows the sorting as in `:options` -- local function setup() -- 1. Important -- Things that need to get done before anything else. vim.cmd [[ au! ]] vim.cmd [[ filetype plugin indent on ]] vim.o.rtp = vim.o.rtp .. ',/usr/local/opt/fzf' -- 2. Moving around, searching and patterns v...
local dc1 = DifficultyIndexColor(1) local dc2 = DifficultyIndexColor(2) local image = ThemePrefs.Get("VisualTheme") local t = Def.ActorFrame{ OffCommand=function(self) self:linear(1) end } -- centers t[#t+1] = Def.ActorFrame { InitCommand=function(self) self:diffusealpha(0) end; OnCommand=func...
RegisterNUICallback('', function() end) SendNUIMessage('', function() end)
local smenu = require "create_settings_menu" local bg = 1 local buttons = 3 function draw_background_smenu() for i = 1, 7 do love.graphics.draw(smenu[bg].background[i], smenu[bg].x, smenu[bg].y, math.rad(0), smenu[bg].scalex, smenu[bg].scaley) end love.graphics.draw(smenu[bg].woodbg, smenu[bg].woodx, smenu[b...
require("luavoce") for name, value in pairs(voce) do print(name, "\t\t", value) end print("Initializing luavoce...") voce.init([[C:\Users\carlsonp\Desktop\src\lua-voce\submodules\voce\lib]], true, true, [[C:\Users\carlsonp\Desktop\src\lua-voce\submodules\voce\lib\gram]], "digits.gram")
--- --- --- Garbage Collection Thread --- --- function gcThread( event, data) if event == masterEventList.todMinute then -- print("executing garbage collection") lgc.collect() -- print("memory useage", lgc.count()) end end eventSystem.allocateQueue("gc", gcThread) publishSubscribe.attach( masterEventList....
--[[ Copyright (c) 2015, The CubeSpaceCC Team Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL ...
local dir = scriptPath() package.path = package.path .. ';'..dir..'?.lua' require('app.config') local api = require('app.api') setImmersiveMode(true) setImagePath(Config.imagePath) Settings:setCompareDimension(true, 960) Settings:setScriptDimension(true, 1920) toast('請先到好友列表找出指定禮裝,十秒後將進行判定。') wait(10) local sup = Con...
function onAddItem(moveitem, tileitem, position) if moveitem:getId() == 2693 then moveitem:transform(2689) position:sendMagicEffect(CONST_ME_HITBYFIRE) elseif moveitem:getId() == 6277 then moveitem:transform(2687, 12) position:sendMagicEffect(CONST_ME_HITBYFIRE) end return true end
local Utils = {} BeardLib.Utils = Utils function Utils:RefreshCurrentNode() local selected_node = managers.menu:active_menu().logic:selected_node() managers.menu:active_menu().renderer:refresh_node(selected_node) local selected_item = selected_node:selected_item() selected_node:select_item(selec...
emu.keypost('\n')
#!/usr/bin/env lua -- generates ips patches from lgbtasm-formatted asm files. if #arg < 3 then error(string.format( 'usage: lua %s <outfile> <bankfile> <asmfile>...', arg[0])) end local lgbtasm = require('lgbtasm/lgbtasm') local struct = require('lua-struct/struct') local outdir = arg[#arg] -- returns t...
--------------------------------------------------- -- Rail Cannon 1 gear -- 1 Gear: Rail Cannon is single target and ignores Utsusemi --------------------------------------------------- require("scripts/globals/settings") require("scripts/globals/status") require("scripts/globals/monstertpmoves") ---------------------...
function initiateCFGLoader ( ) end function loadCFGIntoMemory ( cfgstr ) local function isValidChar ( char ) local num = string.byte ( char ) if ( num == 9 ) or ( num == 32 ) or ( num >= 48 and num <= 57 ) or ( num >= 65 and num <= 90 ) or ( num >= 97 and num <= 122 ) then ...
local zmq = require("zmq") local json = require("json") require('onmt.init') local cmd = torch.CmdLine() cmd:text("") cmd:text("**onmt.translation_server**") cmd:text("") cmd:option('-config', '', [[Read options from this file]]) onmt.translate.Translator.declareOpts(cmd) cmd:option('-host', '127.0.0.1', [[Host to...
local MakePlayerCharacter = require "prefabs/player_common" local assets = { Asset("ANIM", "anim/wickerbottom.zip"), Asset("SOUND", "sound/wickerbottom.fsb") } local fn = function(inst) inst:AddComponent("reader") inst:AddTag("insomniac") inst.components.eater.stale_hunger = TUNING.WICKERBOTTOM_...
--[[ ------------------------------------ Script Name: Little NZ | Snipers Dream Team Mod Copyright (c) 2016-2018, Jericho Crosby <jericho.crosby227@gmail.com> * IGN: Chalwk * Written by Jericho Crosby ----------------------------------- ]]-- api_version = "1.12.0.0" tbag = { } weapon = { } weapons = { } objects = { }...
:ls --/----------------------------------\-- --|-> Loading functions............<-|-- --\----------------------------------/-- -- Tables -- iOrb= {} --> Orb Data iBan= {} --> Ban table iCmd= {} --> Commands using players, booleans and numbers or nothing iStr= {} --> Commands using strings, booleans or nothing iVal...
local activityData = { { factor=0, name="Надбавка за классность"}, { factor=0, name="отсутствует"}, { factor=5, name="3 класс - 5% от оклада по ВД" }, { factor=10, name="2 класс - 10% от оклада по ВД"}, { factor=20, name="1 класс - 20% от оклада по ВД"}, { factor=30, name="мастер - 30% от оклада по ВД"}, } retu...
--[[ Settings for the launcher --]] local Configurations = { LAUNCH_SPEED = 100 , -- 80 LAUNCH_TIME = .15 , -- 15 COOLDOWN = .1 , -- 3 DAMAGE = 100 , -- 30 PIE_LIFETIME = 5 -- 5 }; return Configurations
local datafile = require 'datafile' local exec = require 'espeon.util.exec' local shell = require 'espeon.util.shell' local espeon_conf = datafile.path('res/espeon.conf') return { description = 'Write a default espeon.conf to .', execute = function() exec('cp ' .. espeon_conf .. ' .') print('Default espe...
-- SIE CONFIDENTIAL -- PhyreEngine(TM) Package 3.18.0.0 -- Copyright (C) 2016 Sony Interactive Entertainment Inc. -- All Rights Reserved. -- Script to provide a simple default implementation of the functionality -- required to drive a PCameraControllerComponent. -- Description: -- Updates the camera transformation b...
AddCSLuaFile() DEFINE_BASECLASS( "base_wire_entity" ) ENT.PrintName = "Wire Relay" ENT.WireDebugName = "Relay" ENT.Author = "tad2020" if CLIENT then return end -- No more client function ENT:Initialize() self:PhysicsInit( SOLID_VPHYSICS ) self:SetMoveType( MOVETYPE_VPHYSICS ) self:SetSolid( SOLID_VPHYSI...
local lu = require 'luaunit' local fn = require 'fn' local M = {} function M.test_none() local f = fn.partialtrail(table.insert) local t = {} f(t, 1) lu.assertEquals(#t, 1) lu.assertEquals(t[1], 1) end function M.test_one() local t = {} local f = fn.partialtrail(table.insert, nil, 1) lu.assertEquals...
-- Created by Elfansoer --[[ Ability checklist (erase if done/checked): - Scepter Upgrade - Break behavior - Linken/Reflect behavior - Spell Immune/Invulnerable/Invisible behavior - Illusion behavior - Stolen behavior ]] -------------------------------------------------------------------------------- void_spirit_resona...
--[[ Install to /usr/lib/lua/luci/controller/myapp/mymodule.lua ]]-- module("luci.controller.myapp.mymodule", package.seeall) function index() -- Create a new item in the main menu bar entry({"admin", "radio"}, cbi("myapp-mymodule/radio"), _("Radio"), 21).dependent = true -- Attach the submenus to the main me...
#!/bin/sh LUAROCKS_SYSCONFDIR='/usr/local/etc/luarocks' exec '/usr/local/bin/lua' -e 'package.path="/home/katka/Desktop/FIIT/BP/luadb/etc/luarocks_test/modules/testy/share/lua/5.3/?.lua;/home/katka/Desktop/FIIT/BP/luadb/etc/luarocks_test/modules/testy/share/lua/5.3/?/init.lua;"..package.path;package.cpath="/home/katka...
string.DEFAULT_CURRENCY = "$" local function attachCurrency( str, currency ) return ( currency or string.DEFAULT_CURRENCY or "$" ) .. str end function string.formatMoney( amount, currency ) if not amount then return attachCurrency( "0", currency ) end if amount >= 1e14 then return attachCurrency( tostri...
local M = {} M.__index = M function M.new(gamestate, bodyToFollow) local self = setmetatable({ gamestate = gamestate, x = 0, y = 0, vx = 0, vy = 0, ax = 0, ay = 0, scalex = 8, scaley = 8, rotate = 0, bodyToFollow = bodyToFollow...
-- Express.js-like HTTP server Class express = { new = function(tcpServe) if not tcpServer then tcpServer = net.createServer(net.TCP) end local defaultPort = 80 local supportedMethods = {'GET','POST','PUT','DELETE','HEAD'} local statusCodes = { ...
-- Setup LUAJIT2.1 FFI into libcrypto.so for MD5 local ffi=require('ffi') local status,C for _,lib in ipairs( {'crypto', 'libcrypto.so.1.0.2k', 'libcrypto.so.1.0.0', '/lib64/libcrypto.so.1.1.1c'} ) do status, C = pcall(function() return ffi.load(lib) end) if status then break end end if not status then error "C...
-- Storage.lua -- Implements the SQL storage. -- The current database version. If something changes in the structure of the database or table use this local g_CurrentDatabaseVersion = 1 local g_Queries = {} local QueryPath = cPluginManager:Get():GetCurrentPlugin():GetLocalFolder() .. "/Storage/Queries" for ...
-- profile.lua utaha.profile:apply { tileW = 48, tileH = 48, avatarW = 24, avatarH = 32, assetsDir = "assets", editor = { windowW = 1024, windowH = 900, rawPicLoadFile = "res/raw-pic-load.lua", stylesFile = "res/styles.lua", layoutFile = "res/form-layouts...
ACF.RegisterMissileClass("AAM", { Name = "Air-To-Air Missiles", Description = "Missiles specialized for air-to-air flight. They have varying range, but are agile, can be radar-guided, and withstand difficult launch angles well.", Sound = "acf_missiles/missiles/missile_rocket.mp3", Effect = "Rocket Motor", Spre...
AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" ) include('shared.lua') function ENT:Initialize() self:PhysicsInitBox( Vector( -16, -16, -1 ), Vector( 16, 16, 73 ) ) self:SetCollisionBounds( Vector( -16, -16, -1 ), Vector( 16, 16, 73 ) ) self:SetSolid( SOLID_BBOX ) self:SetCollisionGroup(COLLISION_GROUP_...
local skynet = require "skynet" local mysql = require "skynet.db.mysql" local function get_db() local function on_connect(db) db:query("set charset utf8"); end local db=mysql.connect({ host="127.0.0.1", port=3306, database="skynet", user="root", password="1", max_packet_size = 1024 * 10...
local a=module('_core','libs/Tunnel')local b=module('_core','libs/Proxy')APICKF=b.getInterface('API')cAPI=a.getInterface('cAPI')hpp={}a.bindInterface("hpp_toogle",hpp)Citizen.CreateThread(function()while true do Citizen.Wait(5*60*1000)collectgarbage("count")collectgarbage("collect")end end)function hpp.checkHasGroup(c)...
--NOTE: Don't use permaprop for the NPC's, use !savepillsellers instead. BLUES_PHARMA = BLUES_PHARMA or {} BLUES_PHARMA.CONFIG = {} --This is how fast the "overdose" value goes down. This is per seconds (0 - 100) --Default: 0.5 = Aprox 3 minutes from full overdose BLUES_PHARMA.CONFIG.OverdoseCooldownRate = 2 --These ...
local windows = {} function addWindow(name) assert(type(window) == "string", "Invalid Name for the New Window") windows[#window + 1] = { name = name } return #window end function removeWindow(id) assert((type(id) == "nunber") and (id > 0), "Invalid ID") table.remove(windows, id) ...
local Constants = require(script.Parent.Parent.Constants) local Budget = require(script.Parent.Budget) local lastBudgetUpdateAt = 0 local function getBudgetTasks(clock) local tasks = {} if clock - lastBudgetUpdateAt >= Constants.BUDGET_UPDATE_INTERVAL then local numberOfUpdates = math.floor((clock - lastBudgetUp...
#!/usr/bin/env lua -- vim: ts=2 sw=2 et : -- Unit tests. -- Tim Menzies, (c) 2021 -- ----------------------------- local lib = require "lib" -- sda asdas asdasdasa local rows = require "rows" local Sym = require "sym" local Num = require "num" local powerset,watch,csv = lib.powerset,lib.watch,lib.csv lo...
ModifyEvent(-2, -2, -1, -1, -1, -1, -1, 2468, 2468, 2468, -2, -2, -2);--by fanyu 打开箱子,改变贴图 场景23-编号3 GetItem(7, 2); do return end;
return { tllhoverrocket = { acceleration = 0.04, brakerate = 0.27, buildcostenergy = 3639, buildcostmetal = 325, builder = false, buildpic = "tllhoverrocket.dds", buildtime = 12521, canattack = true, canguard = true, canhover = true, canmove = true, canpatrol = true, canstop = 1, category =...
-- Initialize the unit frames stuff. if(SanieUI.debug == true) then print("Loading init") end SanieUI["unitframes"] = { ["GetFontString"] = function(frame, name, size, outline) local fontString = frame:CreateFontString(nil, "OVERLAY") fontString:SetFont(name, size, outline) fontString:SetShadowColor(0,0,0,1) ...
#!/usr/bin/env lua require 'Test.Assertion' if not pcall(require, 'lxp.lom') then skip_all 'no xml' end plan(17) package.loaded['socket.http'] = { request = function (req) req.sink([[ <config logdir="/var/log/foo/" debugfile="/tmp/foo.debug"> <server name="sahara" osname="solaris" osversion="2.6">...
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ========== local _slots = { { flags_missing = 4, goto_spot = "Pathfind", groups = { ["A"] = true, }, spots = { "Workvr", }, usable_by_child = false, }, { goto_spot = "LeadToSpot", groups = { ["B"] = true, }, spots = { "Floor", ...
local _={} _.name="AppleTree" _.new=function(options) local result=BaseEntity.new(options) Entity.setSprite(result,"tree_apple_1") result.isDrawable=true result.growPhase=1 result.isActive=false result.originX=15 result.originY=46 Taggable.addTag(result, "tree") Entity.afterCreated(result,_,options) ...
#!/usr/bin/env tarantool local function table2str(t) local res = "" for _, line in pairs(t) do local s = "" for _, field in pairs(line) do s = s .. '|' .. field .. '|\t' end res = res .. s .. '\n' end return res end local function myread(self, bytes) sel...
function positionPlayer(thePlayer) local x,y,z = getElementPosition(thePlayer) local rx,ry,rz = getElementRotation(thePlayer) local int = getElementInterior(thePlayer) local dim = getElementDimension(thePlayer) outputChatBox("position: "..x.." "..y.. " " ..z,thePlayer,220,0,0) outputChatBo...
-- -- Please see the license.html file included with this distribution for -- attribution and copyright information. -- function onInit() registerMenuItem(Interface.getString("list_menu_createitem"), "insert", 5); constructDefaultSkills(); CharManager.updateSkillPoints(window.getDatabaseNode()); lo...
Number_Properties_Priority = 2.0 Number_Properties = { dm_challenge_research_baseline = 0, } String_Properties_Priority = 2.0 String_Properties = { }
require("love.keyboard") -- Key state handling. 0 = up, 1 = pressed, 2 = down, 3 = released function manageKeys( Keys ) for ak, Key in pairs(Keys) do if love.keyboard.isDown(Key.reference) then if Key.value == 1 then Key.value = 2 elseif Key.value ~= 2 then Key.value = 1 ...
if(select(2, UnitClass('player')) ~= 'DRUID') then return end local parent, ns = ... local oUF = ns.oUF local ECLIPSE_BAR_SOLAR_BUFF_ID = ECLIPSE_BAR_SOLAR_BUFF_ID local ECLIPSE_BAR_LUNAR_BUFF_ID = ECLIPSE_BAR_LUNAR_BUFF_ID local SPELL_POWER_ECLIPSE = SPELL_POWER_ECLIPSE local MOONKIN_FORM = MOONKIN_FORM local UNIT_...
require'nvim-treesitter.configs'.setup { textobjects = { select = { enable = true, -- Automatically jump forward to textobj, similar to targets.vim lookahead = true, keymaps = { -- You can use the capture groups defined in textobjects.scm ...
local GRedPoint = class("GRedPoint") function GRedPoint:ctor() -- 红点分 动态数据, 静态数据 self._bindMap = self:bindCallback() end function GRedPoint:init() end -- 各个界面 需要注册 红点的东西, 中间节点也用 -- 取消红点配置,这个是清除叶子节点数据的,需要递归通知UI,清楚UI的红点 function GRedPoint:cancel(redPointName) end function GRedPoint:checkCondition(redPointName) ...
local Prop = {} Prop.Name = "Bazaar Market 8" Prop.Cat = "Stores" Prop.Price = 250 Prop.Doors = { Vector( -11245, -9327.5, 347.20901489258 ), Vector( -11187, -9576.5, 346.99899291992 ), } GM.Property:Register( Prop )
local sformat = string.format local sgmatch = string.gmatch local tinsert = table.insert local util = {} function util.explode(str,sep) local array = {} local reg = sformat("([^%s]+)",sep) for mem in sgmatch(str,reg) do tinsert(array, mem) end return array end return util
ys = ys or {} slot1 = ys.Battle.BattleConst ys.Battle.BattleShrapnelBulletFactory = singletonClass("BattleShrapnelBulletFactory", ys.Battle.BattleBulletFactory) ys.Battle.BattleShrapnelBulletFactory.__name = "BattleShrapnelBulletFactory" ys.Battle.BattleShrapnelBulletFactory.INHERIT_NONE = 0 ys.Battle.BattleShrapnelBul...
dofile(yatm_mesecon_sequencer.modpath .. "/nodes/sequencer.lua")
local socket = require "socket" local address, port = "localhost", 12345 udp = socket.udp() udp:setpeername(address, port) udp:settimeout(0) local greenX, greenY = '100', '100' local redX, redY = '400', '100' function love.draw() love.graphics.setColor(0, 1, 0) love.graphics.rectangle("fill", greenX, greenY, 50, 50...
object_mobile_npe_dressed_rakqua_bowman_05 = object_mobile_npe_shared_dressed_rakqua_bowman_05:new { } ObjectTemplates:addTemplate(object_mobile_npe_dressed_rakqua_bowman_05, "object/mobile/npe/dressed_rakqua_bowman_05.iff")
artifactreward46 = { minimumLevel = 0, maximumLevel = -1, customObjectName = "Artifact 46", directObjectTemplate = "object/tangible/collection/col_nym_weed_02.iff", craftingValues = { }, customizationStringNames = {}, customizationValues = {} } addLootItemTemplate("artifactreward46", artifactreward46)
local M = {} M.map = vim.api.nvim_set_keymap M.bmap = vim.api.nvim_buf_set_keymap M.prequire = function(name) local ok, m = pcall(require, name) if not ok then print('Error: Could not load', name) return nil end return m end M.useWhichKey = function(config) local which_key = M.pr...
-- =========== -- VALID VALUE -- =========== ---Checks if value is meaningful. `if IsValid(value) then` is stricter than `if value then` ---@param value any ---@return boolean function IsValid(value) if type(value) == 'nil' then return false elseif type(value) == 'boolean' then return value elseif type(...
local lunamark = require("lunamark") local writer = lunamark.writer.html.new() local parse = lunamark.reader.markdown.new(writer, { smart = true }) local result, metadata = parse([[ # Hello World ## I'm lua markdown hopefully we can get this working eventually. Seems to be working somewhat okay? --- 1. This 2. IS 3....
local gzip = require 'gzip' local function line(header, c) header = header or '' c = c or '-' print(string.rep(string.sub(c, 1, 1), 78 - string.len(header))..header) end line(' gzip', '=') line(' gzip writing') local loops = 1000 local testfile = "test.gz" local of = gzip.open(testfile, "wb9") if (no...
-- NoIndex: true --[[ Lokasenna_GUI - Frame class For documentation, see this class's page on the project wiki: https://github.com/jalovatt/Lokasenna_GUI/wiki/Frame Creation parameters: name, z, x, y, w, h[, shadow, fill, color, round] ]]-- if not GUI then reaper.ShowMessageBox("Couldn't access GUI f...