content stringlengths 5 1.05M |
|---|
local ffi = require 'ffi'
local dbg = require 'scripts.debugger'
local twig = require 'scripts/twig'
local hlpr = assert(loadfile("project/helpers.lua"))(cef)
local tinsert = table.insert
local tremove = table.remove
ffi.cdef[[
typedef struct lj_fpool_finfo {
char id[32];
char fn... |
local compe = require'compe'
local Source = {}
function Source.get_metadata(_)
return {
priority = 10,
dup = 0,
menu = '[Tmux]'
}
end
function Source.determine(_, context)
return compe.helper.determine(context)
end
function Source.complete(_, context)
vim.fn["tmuxcomplete#async#gather_candidates"... |
local FCPM_ID = 1 -- 2 / 3 / 4 / 5
local telemetry = {}
function main()
local result = can.init(250, can_handler)
if result ~= 0 then
enapter.log("CAN init failed: "..result.." "..can.err_to_str(result), "error", true)
end
scheduler.add(30000, properties)
scheduler.add(1000, metrics)
end
function prope... |
--[[
Configuration from default, moddir and worlddir, in that order.
See init.lua for license.
]]
-- change these for other mods
local M = thirsty
local modname = 'thirsty'
local fileroot = modname
-- make sure config exists; keep constant reference to it
local C = M.config or {}
M.config = C
local function try_c... |
local lsp_installer = require("nvim-lsp-installer")
local M = {}
M.lsp_map_keys = function(server, bufnr)
local function map_key(...)
-- Map to buffer if buffer number is supplied,
-- globally otherwise
if bufnr == nil then
vim.api.nvim_set_keymap(...)
else
... |
local common = require "upcache.common"
local console = common.console
local module = {}
local tagHeader = common.prefixHeader .. "-Tag"
-- monotonous version prefix - prevents key conflicts between nginx reboots
local MVP = ngx.time()
local function build_key(key, tags)
if tags == nil then return key end
local nk... |
--[[
# Control flow
--]]
-- #T# Table of contents
-- #C# Decision making
-- #C# - Conditional statements
-- #C# Loops
-- #C# - for loop
-- #C# - while loop
-- #C# - repeat-until loop
-- #T# Beginning of content
-- #C# Decision making
-- # |-------------------------------------------------------------
-- #T# deci... |
-- General
vim.opt.autowrite = true
vim.opt.updatetime = 100 -- Faster updates, better UX
vim.opt.hidden = true -- Don't unload buffers when abandoned
vim.opt.encoding = "utf-8"
vim.opt.inccommand = "nosplit"
vim.opt.omnifunc = "syntaxcomplete#Complete"
vim.opt.mouse = "nv" -- Enable mouse support only for Normal and V... |
noble = {
"object/mobile/dressed_noble_bothan_female_01.iff",
"object/mobile/dressed_noble_bothan_male_01.iff",
"object/mobile/dressed_noble_fat_human_female_01.iff",
"object/mobile/dressed_noble_fat_human_female_02.iff",
"object/mobile/dressed_noble_fat_human_male_01.iff",
"object/mobile/dressed_noble_fat_human_... |
local PlayerData = {}
local curMarker = nil
ESX = nil
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
while ESX.GetPlayerData().job == nil do
Citizen.Wait(10)
end
PlayerData = ESX.GetPlayerData()
end)
... |
local LAvatar = class("LAvatar")
function LAvatar:ctor()
--静态数据
self._id = nil
self._card = nil -- enum.battle.card.skeletons
self._name = nil -- enum.battle.avatar.skeleton
self._moveType = nil -- enum.battle.moveType.land
self._side = enum.battle.side.red
self._hasSecondly = false --是否有二阶段,怪的类型
self._... |
love.window.updateMode( 1000, 1000) |
return {
cbuilderlvl1 = {
acceleration = 0.04,
blocking = false,
brakerate = 0.4,
buildcostenergy = 13528,
buildcostmetal = 365,
builddistance = 100,
builder = true,
buildpic = "cbuilderlvl1.dds",
buildtime = 10000,
canfly = true,
canguard = true,
canmove = true,
canpatrol = tru... |
--[[
Copyright 2015 The Luvit Authors. All Rights Reserved.
Licensed 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... |
data:extend({
{
type = "recipe",
name = "bery0zas-sparging-column",
category = "bery0zas-air-filtering-machine",
enabled = false,
energy_required = 10.0,
ingredients = {
{"electric-engine-unit", 3},
{"electronic-circuit", 3},
{"iron-plate", 10},
{"steel-plate", 10},
{"pipe", 10}
},
resul... |
XYZSettings.SettingsCache = {} -- or XYZSettings.SettingsCache or {}
XYZSettings.RegisteredSettings = {} -- or XYZSettings.SettingsCache or {}
-- Manage settings
function XYZSettings.GetSetting(setting, default)
if XYZSettings.SettingsCache[setting] ~= nil then
return XYZSettings.SettingsCache[setting]
end
ret... |
local M = {}
local timers = {}
function M.frames(frames, callback)
if frames == 0 then
callback()
else
table.insert(timers, {frames = frames, callback = callback})
end
end
function M.seconds(seconds, callback)
table.insert(timers, {seconds = seconds, callback = callback})
end
function M.cancel_all()... |
local materials = {
[9] = true,
[19] = true,
[21] = true,
[23] = true,
[24] = true,
[31] = true,
[32] = true,
[35] = true,
[38] = true,
[40] = true,
[43] = true,
[46] = true,
[47] = true,
[48] = true,
}
function Main.update:Mud()
if not IsDriver or not Materials then return end
local mudRatio = 0.0
l... |
att.PrintName = "Power"
att.Icon = Material("snowysnowtime/2k/ico/h3/smg_sil.png")
att.Description = "Changing the internals allows the M7 SMG to be much more efficient. It has increased recoil due to this."
att.Desc_Pros = {
"+ Increased Rate of Fire (10%)"
}
att.Desc_Cons = {
"- Increased Recoil (15%)",
"- Reduced... |
local GetVariable = BP.BaseClass(BP.Node)
function GetVariable:Constructor( graph )
self.is_updatable_bp_node = true
self.graph = graph
print('Cat:GetVariable.lua[5] graph', graph)
end
function GetVariable:Update( deltaTime )
print('Cat:GetVariable.lua[8] update')
end
return GetVariable |
--[[
Copyright (C) Udorn (Blackhand)
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 2
of the License, or (at your option) any later version.
This program is distributed in the... |
pace.StreamQueue = pace.StreamQueue or {}
local frame_number = 0
local last_frame
local ERROR_COLOR = Color(228, 37, 37)
local function catchError(err)
pac.Message(ERROR_COLOR, 'Error: ', err)
pac.Message(debug.traceback())
end
timer.Create("pac_check_stream_queue", 0.1, 0, function()
if not pace.BusyStreaming an... |
local Tunnel = module("vrp", "lib/Tunnel")
local Proxy = module("vrp", "lib/Proxy")
vRP = Proxy.getInterface("vRP")
vRPclient = Tunnel.getInterface("vRP", "vrp_mugging")
cooldownlist = {}
RegisterServerEvent('vrp_mugging:giveMoney')
AddEventHandler('vrp_mugging:giveMoney', function()
local user_id = vRP.getUserI... |
-- sponsorblock.lua
--
-- This script skips sponsored segments of YouTube videos
-- using data from https://github.com/ajayyy/SponsorBlock
local ON_WINDOWS = package.config:sub(1,1) ~= '/'
local options = {
server_address = "https://api.sponsor.ajay.app",
python_path = ON_WINDOWS and "python" or "python3",
... |
local PANEL = {}
local outpadding = 14
local padding = 5
local stripeW = 5
local MAT_FAILED = Material("lambda/failed.png")
local MAT_SUCCESS = Material("lambda/success.png")
function PANEL:Init()
self:SetTitle("")
self:SetPos(padding, ScrH() * 0.25)
self:SetDeleteOnClose(false)
self:ShowCloseButton(false)
sel... |
wrk.method = "POST"
wrk.body = string.rep("body", 1000000)
wrk.headers["Content-Type"] = "application/x-www-form-urlencoded"
|
-----------------------------------
-- Area: Aht Urhgan Whitegate
-- NPC: Sharin-Garin
-- Type: Adventurer's Assistant
-- !pos 122.658 -1.315 33.001 50
-----------------------------------
local ID = require("scripts/zones/Aht_Urhgan_Whitegate/IDs")
-----------------------------------
require("scripts/globals/besieged"... |
object_tangible_deed_pet_deed_droideka_deed = object_tangible_deed_pet_deed_shared_droideka_deed:new {
}
ObjectTemplates:addTemplate(object_tangible_deed_pet_deed_droideka_deed, "object/tangible/deed/pet_deed/droideka_deed.iff")
|
--------------------------------------------------------------------------------
-- TODO:
-- * Decide if use function calls in the style:
-- - string.len(s), or
-- - s:len()
-- It is in the first form now, check if it works in the second form and change
-- in all the code.
------------------------------------------... |
local S, L, O, U, D, E = unpack(select(2, ...));
local Module = S:NewNameplateModule('FactionIcon');
local ShouldShowName = S:GetNameplateModule('Handler').ShouldShowName;
-- Local Config
local ENABLED;
local factionIcons = {
['Alliance'] = 'Interface\\FriendsFrame\\PlusManz-Alliance',
['Horde'] = 'Interf... |
--IupCanvas Example in IupLua
require( "iuplua" )
cv = iup.canvas {size="300x100", xmin=0, xmax=99, posx=0, dx=10}
dg = iup.dialog{iup.frame{cv}; title="IupCanvas"}
function cv:motion_cb(x, y, r)
print(x, y, r)
end
function cv:k_any(c)
print("c = ", c)
print(" XkeyBase(c) = ", iup... |
return {
bot_api_key = '616471199:AAGcf24Ahby6-ld1whRTkkDJYIyu7key_yg',
admin = 607826953,
channel = '@Dragon_Wolf_Ch', --channel username with the '@'
plugins = {
'start.lua','aboutus.lua','contactus.lua',
},
api_errors = {
[101] = 'Not enough rights to kick participant', --SUPERGROUP: bot is not admin
[... |
local ser = require 'ser'
LevelDisplay = class("LevelDisplay")
function LevelDisplay:initialize()
self.walls = {} -- max 16
self.spawners = {} -- max 4
self.exits = {} -- max 4
self.starts = {} -- max 1
self.keys = {} -- max 4
self.treasures = {} -- max 3
self.changesMade = false
self.currentLevel = 0
self... |
--this is a desperate attempt to adjust the worms acid resistance to allow proper nest-battles during force transitions.
for key, turret in pairs(data.raw["turret"]) do
if string.match(turret.name, "worm") or string.match(turret.name, "Worm") then
resTable = turret.resistances
for _, res... |
require("scripts.recipeOO")
recipePrototypes = {}
for x,typeVar in pairs(inserterTypes) do
for y,rangeVar in pairs(inserterRanges) do
table.insert(recipePrototypes, createRecipePrototype(typeVar, rangeVar))
end
end
data:extend(recipePrototypes) |
-- where the hallway ends
local max_width = 350
local quote_bmts = {}
local count = 1
local quotes = {
{
text="What happens when we get there, the place where the hallway ends?",
color={0.8, 0.666, 0.666, 0},
y=140,
},
{
text="For me anyway, it's a combination of understanding and being understood, forgiving... |
local speedomulti = 2.236936
local speedtext = "MPH"
local mapon, checkvehclass = true, true
local speedfps = 125
local minimap = RequestScaleformMovie("minimap")
local speedBuffer, velBuffer = {}, {}
local Driving, Underwater, enableCruise, wasInCar, pedinVeh, beltOn = false, false, false, false, false, false
local l... |
local M = {}
local io = io
local string = string
local tostring = tostring
local ngx = ngx
local ffi = require "ffi"
local util = require "shuaicj.upload.util"
ffi.cdef[[
typedef unsigned long MD5_LONG;
enum {
MD5_CBLOCK = 64,
MD5_LBLOCK = MD5_CBLOCK/4
};
typedef struct MD5state_st
{
MD5_LONG A,B,C,D;
... |
return {
include = function()
includedirs "../vendor/cpp-url/include/"
end,
run = function()
language "C++"
kind "StaticLib"
files {
"../vendor/cpp-url/src/**.cpp",
}
end
}
|
local menu = {} -- previously: Gamestate.new()
menu.name = "showCreepers"
function menu:enter(prev, cards, changes)
menu.prev = prev
menu.cards = cards
menu.changes = changes
end
local offsets = {
{ x = 621, y = 153 },
{ x = 373, y = 153 },
{ x = 869, y = 153 },
{ x = 124, y = 153 },
{ ... |
leveldb = require 'lualeveldb'
local opt = leveldb.options()
opt.createIfMissing = true
opt.errorIfExists = false
assert(type(tostring(opt)) == "string")
print(opt)
local db = leveldb.open (opt, 'tostring.db')
assert(type(tostring(db)) == "string")
print(db)
|
addNetworkString = util.AddNetworkString
addNetworkString("VBNET::Groups::RequestGroupPlayerList")
addNetworkString("VBNET::Groups::InvitePlayerToGroup")
addNetworkString("VBNET::Groups::PlayerJoinGroup")
addNetworkString("VBNET::Groups::PlayerQuitGroup")
addNetworkString("VBNET::Groups::KickPlayer")
addNetworkString("... |
--
-- Info Definition Table format
--
--
-- These keywords must be lowercase for LuaParser to read them.
--
-- key: user defined or one of the SKIRMISH_AI_PROPERTY_* defines in
-- SSkirmishAILibrary.h
-- value: the value of the property
-- desc: the description (could be used as a tooltip)
-... |
function start (song)
print("Song: " .. song .. " @ " .. bpm .. " downscroll: " .. downscroll)
end
local defaultHudX = 0
local defaultHudY = 0
local defaultWindowX = 0
local defaultWindowY = 0
local lastStep = 0
local floatShit = 0
local dadMidpointX = 0
local dadMidpointY = 0
local eyeX = 0
local eyeY = 0
func... |
local shipImg = actor.LoadSprite("image/ship.png", { 64, 64 })
local LEFT = 1
local RIGHT = 2
local UP = 3
local DOWN = 4
actor.Cage("Blocker", 1.0, 0.5)
actor.SimpleCollide("Blocker", "Player", actor.Blocker)
local animFPS = 64
local function AnimatePlayer(player, stop)
local start = eapi.GetFrame(player... |
---------------------------------------------------------------------------------------------------
-- func: getcraftRank <craft skill or ID> {player}
-- desc: returns target's RANK of specified craft skill
---------------------------------------------------------------------------------------------------
require("scri... |
------------------------------------------------------------------------------------------------------
-- Initialise the variable we will be working with
------------------------------------------------------------------------------------------------------
Cryolysis3 = LibStub("AceAddon-3.0"):NewAddon("Cryolysis3", "Ac... |
Locales ['pl'] = {
['voice'] = '~y~Głos: ~s~%s',
['normal'] = 'normalny',
['shout'] = 'krzyk',
['whisper'] = 'szept',
}
|
return {
postgres = {
up = [[
ALTER TABLE IF EXISTS ONLY "basicauth_credentials"
ALTER "created_at" TYPE TIMESTAMP WITH TIME ZONE USING "created_at" AT TIME ZONE 'UTC',
ALTER "created_at" SET DEFAULT CURRENT_TIMESTAMP(0) AT TIME ZONE 'UTC';
-- Unique constraint on "username" already a... |
require("tokenize")
require("parse")
while true do
io.write("%> ")
local line = io.read("l")
if line == "exit" then break end
local tokens = Tokenize(line)
local ast = Parse(tokens)
end |
require "suproxy.utils.stringUtils"
local _M={}
local printFlag="___printted"
--format and print table in json style
function _M.printTableF(tab,options,layer,map)
options=options or {}
local printIndex=options.printIndex or false
local layer=layer or 1
local stopLayer=options.stopLayer or 0xfff... |
storm_basic_attack = class({})
storm_ex_basic_attack = class({})
LinkLuaModifier("modifier_storm_basic_attack_cooldown", "abilities/heroes/storm/storm_basic_attack/modifier_storm_basic_attack_cooldown", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_storm_ex_basic_attack", "abilities/heroes/storm/storm_basic_attac... |
require'tabline'.setup{}
|
local isLocating = false
local WAYPOINTLOC = { }
local DistToPoint = 0
local TRACKELEMENT = nil
function createWaypointLoc ( x, y, z )
TRACKELEMENT = nil
local px, py, pz = getElementPosition ( localPlayer )
local dist = getDistanceBetweenPoints2D ( px, py, x, y )
if ( dist <= 20 ) then
exports.NGMessages:sendCl... |
-- s-300pmu2 92h6e tr (truck)
GT = {};
GT_t.ws = 0;
set_recursive_metatable(GT, GT_t.generic_stationary);
set_recursive_metatable(GT.chassis, GT_t.CH_t.STATIC);
GT.chassis.life = 4;
GT.visual.shape = "92n6_truck";
GT.visual.shape_dstr = "30h6_truck_d";
GT.visual.fire_pos[2] = 1;
GT.snd.radarRotation = "RadarRotation... |
-- Ctrl-Q in conemu to reload Clink Lua scripts
-- Clink match generators: https://github.com/mridgers/clink/blob/master/docs/clink.md#user-content-match-generators
-- Strings: http://lua-users.org/wiki/StringLibraryTutorial
-- Patterns: http://lua-users.org/wiki/PatternsTutorial
-- Escaping: http://www.lua.org/pil/20.... |
function widget:GetInfo()
return {
name = "Unit Stats",
desc = "Shows detailed unit stats",
author = "Niobium + Doo",
date = "Jan 11, 2009",
version = 1.7,
license = "GNU GPL, v2 or later",
layer = -9999999999,
enabled = true, -- loaded by default?
}
end
i... |
local parser = require "parser"
ngx.req.read_body()
local body = ngx.req.get_body_data()
local p, err = parser.new(body, ngx.var.http_content_type)
if not p then
ngx.say("failed to create parser: ", err)
return
end
local filePath, originFileName, extName
while true do
local part_body, name = p:parse_part... |
fx_version 'bodacious'
games { 'rdr3', 'gta5' }
author 'Kanersps'
description 'A MySQL plugin for EssentialMode'
--[[migration_files {
'migrations/0001_create_user.cs',
'migrations/0002_add_roles.cs'
}]]
server_scripts {
'@mysql-async/lib/MySQL.lua',
--'@fxmigrant/helper.lua',
'server.lua'
}
dependencies {
... |
local hascrypto, crypto = pcall(require, 'crypto')
if hascrypto then
print "Using luacrypto"
return crypto.hmac.digest
end
local sha1 = require 'extern.sha1'
print "Using sha1.lua"
return function(hash, c, secret)
assert(hash == "sha1", "unsupported digest type")
return sha1.hmac_binary(secret, c)
... |
--- Reading and writing strings using file-like objects. <br>
--
-- f = stringio.open(text)
-- l1 = f:read() -- read first line
-- n,m = f:read ('*n','*n') -- read two numbers
-- for line in f:lines() do print(line) end -- iterate over all lines
-- f = stringio.create()
-- f:write('hello')
-- f:wr... |
local fs = require('fs')
local app = require('app')
local util = require('util')
local lnode = require('lnode')
local devices = require('devices')
local context = {}
local exports = {}
-- 检查指定的链接文件
---@param srcname string 链接文件名
---@param destname string 目标目录名
function exports.checkPathLink(srcname, destname)
fs.... |
/**
* General configuration
**/
hook.Add("InitPostEntity", "SH_SZ.InitPostEntity", function()
CAMI.RegisterPrivilege({
Name = "Safezone - edit",
MinAccess = "superadmin"
})
end)
-- Use Steam Workshop for the content instead of FastDL?
SH_SZ.UseWorkshop = true
-- Controls for the Editor camera.
-- See a full li... |
ITEM.name = "Monolith Sunrise"
ITEM.description = "A basic Sunrise suit colored in favor of Monolith."
ITEM.category = "Outfit"
ITEM.model = "models/tnb/stalker/items/sunrise.mdl"
ITEM.width = 2
ITEM.height = 2
ITEM.outfitCategory = "model"
ITEM.pacData = {}
ITEM.newSkin = 3
ITEM.replacements = {"anorak", "sunrise"} |
-----------------------------------------------------------------------------------
--
-- Copyright (C) 1994 Narvik University College
-- Contact: GMlib Online Portal at http://episteme.hin.no
--
-- This file is part of the Geometric Modeling Library, GMlib.
--
-- GMlib is free software: you can redistribute it ... |
return {
description = "softban (ban and unban) a member from the server.",
args = {{"user","Please specify a user."},{"string","Please state the softban reason."}},
permissions = {raw={"kickMembers"}},
category = "mod"
},
function(message,args,flags)
local user = args.myArgs[1]
local guild = me... |
data:extend({
{
type = "int-setting",
minimum_value = "1",
maximum_value = "1000",
default_value = "500",
name = "steelaxe-subscience-new-pack-count",
setting_type = "startup",
localised_name = "New science pack count",
localised_description = "Number of new science packs to generate. ... |
--# Monster converted using Devm monster converter #--
local mType = Game.createMonsterType("Draken Spellweaver")
local monster = {}
monster.description = "a draken spellweaver"
monster.experience = 3100
monster.outfit = {
lookType = 340,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0,
l... |
#!/usr/bin/env lua
--[[ lptytest.lua
-
- test aspects of lpty
-
- Gunnar Zötl <gz@tset.de>, 2010-2015
- Released under MIT/X11 license. See file LICENSE for details.
--]]
lpty = require "lpty"
p = lpty.new()
ntests = 0
nfailed = 0
-- announce which test we are performing and what it tests
function announce(st... |
-- 分成两个部分,一个部分涂颜色,一个部分扣文字
require "utf" -- 文件里面有数字好像加载会出错。。不知道为什么
BigSampleRate = 18
SmallSampleRate = 18
FontName = "STHUPO.TTF"
ImgName = "img.png"
function love.load()
file = io.open("src.txt", "r")
str = file:read("*a")
local sampleFunc = function ( gap )
drawdata = {}
img = love.graphics.newImage(ImgNam... |
--[[
游戏逻辑常用的全局函数
]]
function message(message, ...)
local msg = GetTextByLanguageI(message, ...)
delay_call(0, function()
g_panel_mgr.show_multiple_in_top_scene('common.dlg_common_tips_panel', msg)
end)
end
function message_new(message, ...)
local msg = GetTextByLanguageI(message, ...)
... |
local this = {}
this.uiType = "normal"
this.assetModel = "Test"
this.assetName = "TestUI"
local panel = require("TestUIPanel")
this.Awake = function(gameObject)
panel.Awake(gameObject)
UIEventListener.Get(panel.testBtn.gameObject).onClick = function(go, eventData)
this.TestBtnOnClick(go, eventDat... |
local haml = require "haml"
local n = 5000
local template = [=[
!!! html
%html
%head
%title Test
%body
%h1 simple markup
%div#content
%ul
- for _, letter in ipairs({"a", "b", "c", "d", "e", "f", "g"}) do
%li= letter
]=]
if arg[1] then
local f = assert(io.open(arg[1]))
template =... |
jester.help_map.record = {}
jester.help_map.record.description_short = [[Record sound from a channel.]]
jester.help_map.record.description_long = [[This module provides actions which deal with recording sound from a channel.]]
jester.help_map.record.actions = {}
jester.help_map.record.actions.record = {}
jester.help_... |
-- Gemeinschaft 5 module: ip calculation functions
-- (c) AMOOMA GmbH 2012-2013
--
module(...,package.seeall)
function ipv4_to_i(ip_address_str)
local octet4, octet3, octet2, octet1 = ip_address_str:match('(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)');
if octet4 and octet3 and octet2 and octet1 then
retur... |
local t = require('luatest')
local log = require('log')
local fio = require('fio')
local Cluster = require('test.luatest_helpers.cluster')
local server = require('test.luatest_helpers.server')
local COUNT = 100
local pg = t.group('quorum_misc', {{engine = 'memtx'}, {engine = 'vinyl'}})
pg.before_each(function(cg)
... |
-------------------------------------------------------------------------------
--
-- tek.lib.region
-- Written by Timm S. Mueller <tmueller at schulze-mueller.de>
-- See copyright notice in COPYRIGHT
--
-- OVERVIEW::
-- This library implements the management of regions, which are
-- collections of non-overlapping re... |
-- Create the MF object --
if global.mobileFactory ~= nil then
global.upsysTickTable = {}
global.entsTable = {}
game.print("Mobile Factory to OOP Update")
-- Copy all variables --
global.MF = MF:new(global.mobileFactory)
local MF = global.MF
MF.fS = global.factorySurface
MF.ccS = global.controlSurface
... |
-- @docclass
ProtocolLogin = extends(Protocol)
-- private functions
local function sendLoginPacket(protocol)
local msg = OutputMessage.create()
msg:addU8(ClientEnterAccount)
msg:addU16(1) -- todo: ClientOs
msg:addU16(g_game.getClientVersion())
msg:addU32(g_things.getDatSignature())
msg:addU32(g_sprites.ge... |
local pdk = require("apioak.pdk")
local table_name = "oak_upstreams"
local _M = {}
_M.table_name = table_name
function _M.all()
local sql = pdk.string.format("SELECT * FROM %s", table_name)
local res, err = pdk.database.execute(sql)
if err then
return nil, err
end
for i = 1, #res do
... |
local backpack_qn_pin_map = require("qnFiles/qnPlist/hall/backpack_qn_pin");
local newObjectCase_pin_map = require("qnFiles/qnPlist/hall/newObjectCase_pin");
local newObjectCaseRecordNotice=
{
name="newObjectCaseRecordNotice",type=0,typeName="View",time=0,x=0,y=0,width=1280,height=720,visible=1,nodeAlign=kAlignTopLeft... |
-- TokenRing.lua
local Computicle = require("Computicle");
local TokenRing = {
Messages = {
DELIVER = 101,
},
}
setmetatable(TokenRing, {
__call = function(self, ...)
return self:create(...);
end,
});
local TokenRing_mt = {
__index = TokenRing,
}
TokenRing.init = function(self, nodelist)
local obj = {
... |
--[[----------------------------------------------------------------------------
Application Name: 02_3dViewer
Summary:
Show the pointcloud that the camera acquired
Description:
Set up the camera to take live ima... |
local match = string.match
local G = ...
local id = G.ID("requireselectedmodule.requireselectedmodule")
local menuid
local function getEOLCharacter()
-- it would be nice if I could reference the
-- mode constants directly but AFAICT I can't
local EOLMode = GetEditor():GetEOLMode()
if EOLMode == 0 then
r... |
package.path = "../../?.lua;" .. package.path
local Modern = require 'modern'
--
local M1 = Modern:extend()
function M1:new() print('M1:new') self:foo() end
function M1:foo() print('M1:foo') self:bar() end
function M1:bar() print('M1:bar') end
--
local M2 = Modern:extend()
function M2:new() print('M2:new') end
f... |
--- AceConfigTab-3.0 provides support for tab-completion to AceConfig tables.
-- Note: This library is not yet finalized.
-- @class file
-- @name AceConfigTab-3.0
-- @release $Id: AceConfigTab-3.0.lua 769 2009-04-04 11:05:08Z nevcairiel $
local MAJOR, MINOR = "AceConfigTab-3.0", 1
local lib = LibStub:NewLibrary(MAJOR,... |
fugue.particles = {}
function fugue.initParticles()
for i = 1, 100, 1 do
fugue.particles[i] = {}
local p = fugue.particles[i]
p.pos = vec3d(0,0,0)
p.vel = vec3d(0,0,0)
p.active = false
end
end
fugue.initParticles()
function fugue.updateParticles()
local activationCountdown = 10
for i = 1... |
local BitBuffer = require("bitBuffer")
local buffer = BitBuffer()
local clock = os.clock
local specialized, generic
local generic_arg1, generic_arg2
local v = ...
if v == "u8" then
specialized = buffer.writeUInt8
generic = buffer.writeByte
elseif v == "u16" then
specialized = buffer.writeUInt16
gene... |
--------------------------------------------------------------------------------
-- Handler.......... : onTestAchievements
-- Author........... :
-- Description...... :
--------------------------------------------------------------------------------
----------------------------------------------------------------... |
object_tangible_holiday_empire_day_command_console_comscan_subcomponent_crate = object_tangible_holiday_empire_day_shared_command_console_comscan_subcomponent_crate:new {
}
ObjectTemplates:addTemplate(object_tangible_holiday_empire_day_command_console_comscan_subcomponent_crate, "object/tangible/holiday/empire_day/co... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:25' using the latest game version.
NOTE: This file should only be used as IDE support; it should NOT be distributed with addons!
****************************************************************************
CONTENTS OF THIS FILE IS COPYRI... |
local cdecl = cdecl or ''
cdecl = cdecl..[[
// Helpers: UTF-8 <> wchar
int igImTextStrToUtf8(char* buf, int buf_size, const ImWchar* in_text, const ImWchar* in_text_end); // return output UTF-8 bytes count
int igImTextCharFromUtf8(unsigned int* out_char, const char* in_text, const char* in_text_end); // ... |
local wibox = require("wibox")
local awful = require("awful")
-- Modules
local tasklist = require("widget.tasklist")
local M = {}
local bar = awful.wibar({ position = "top", screen = s, height = 20, bg = "#00000000" })
function M.bar(s)
-- Create the wibox
-- Add widgets to the wibox
bar:setup({
... |
--************************
--name : SINGLE_DEL_NX_01.lua
--ver : 0.1
--author : Ferron
--date : 2004/09/08
--lang : de
--desc : terminal mission
--npc :
--************************
--changelog:
--2004/09/08(0.1): recheck(Ferron)
--YYYY/MM/DD(0.0)
--************************
function DIALOG()
... |
necklace_crushed_brooch = {
minimumLevel = 0,
maximumLevel = -1,
customObjectName = "",
directObjectTemplate = "object/tangible/wearables/necklace/necklace_crushed_brooch.iff",
craftingValues = {
},
customizationStringNames = {},
customizationValues = {},
skillMods = {
{"force_assembly", 25},
{"force_e... |
-- Copyright (C) 2019 Miku AuahDark
--
-- 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,... |
app = require("app_mhz19")
config = require("config")
setup = require("setup")
telnet = require("telnet")
setup.start() |
local t = Def.ActorFrame {
LoadActor("Backing");
};
if SCREENMAN:GetTopScreen() ~= "ScreenNetRoom" then
t[#t+1] = Def.ActorFrame{
--P1 Light--
Def.Sprite{
Texture=THEME:GetPathG("MusicWheelItem Song","NormalPart/score");
InitCommand=function(s)
if GAMESTATE:GetNumPlayersEnabled() == 2 then
s:x(-158):zoom... |
--------------------------------
-- @module AssetsManager
-- @extend Node
-- @parent_module cc
---@class cc.AssetsManager:cc.Node
local AssetsManager = {}
cc.AssetsManager = AssetsManager
--------------------------------
---
---@param storagePath string
---@return cc.AssetsManager
function AssetsManager:setStorageP... |
--[[
Copyright 2016 Marek Vavrusa <mvavrusa@cloudflare.com>
Licensed 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 t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.