content stringlengths 5 1.05M |
|---|
-- @Author:pandayu
-- @Version:1.0
-- @DateTime:2018-09-09
-- @Project:pandaCardServer CardGame
-- @Contact: QQ:815099602
local model = require "game.model.role_model"
local config = require "game.template.item"
local task_config = require "game.template.task"
--有个性化id
local _M = model:extends()
_M.class = "role.virtua... |
local function addPattern(h, p)
local t = h.trie;
for char in p:gmatch('%D') do
if not(t[char]) then t[char] = {} end
t = t[char]
end
t["_"] = {};
local lastWasDigit = 0
for char in p:gmatch('.') do
if char:find("%d") then
lastWasDigit = 1
table.insert(t["_"], tonumber(char))
el... |
stella_deed = {
minimumLevel = 0,
maximumLevel = 0,
customObjectName = "",
directObjectTemplate = "object/tangible/mission/quest_item/stella_q2_needed.iff",
craftingValues = {},
customizationStringNames = {},
customizationValues = {}
}
addLootItemTemplate("stella_deed", stella_deed)
|
--[[
Helpful wrapper around LayoutValuesConsumer to make it a
little less verbose to use
]]
local Root = script.Parent.Parent.Parent
local CorePackages = game:GetService("CorePackages")
local PurchasePromptDeps = require(CorePackages.PurchasePromptDeps)
local Roact = PurchasePromptDeps.Roact
local LayoutValuesConsu... |
local helpers = require('test.functional.helpers')(after_each)
local clear, nvim, eq = helpers.clear, helpers.nvim, helpers.eq
describe('sign', function()
before_each(clear)
describe('unplace {id}', function()
describe('without specifying buffer', function()
it('deletes the sign from all buffers', functi... |
PLUGIN:set_global('Container')
local stored = Container.stored or {}
Container.stored = stored
do
function Container:register_prop(model, data)
if istable(model) then
for k, v in pairs(model) do
stored[v:lower()] = data
end
else
stored[model:lower()] = data
end
end
functio... |
--------------------------------------------------
-- HTTP Accept-Language header handler --
-- @author f.ghibellini@gmail.com --
-- @license MIT --
-- @requires: --
-- -gnu find --
-- @descriptio... |
lure.dom.HTMLCssRule = {}
-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
function lure.dom.HTMLCssRule.new(pSelectorText, pDeclarationText)
local self = {}
--===================================================================
-- OBJECT METATABLE ... |
local M = {}
local ffi = require 'ffi'
ffi.cdef [[
typedef struct {
int32_t start;
int32_t stop;
} Range;
]]
M.range_t = ffi.typeof("Range")
function M.GetLevelTable(tbl, level)
if level >= 3 and tbl.Level3 then
return tbl.Level3
end
if level >= 2 and tbl.Level2 then
return tbl.Level3
... |
god_of_wind_tornado_blast = class({})
god_of_wind_tornado_barrier = class({})
god_of_wind_dispalce = class({})
god_of_wind_typhoon = class({}) |
if ngx.ctx.isstatic or ngx.ctx.islogd ~= "1" then
return
end
if ngx.ctx.log_level == '1' then
return
end
local resp_body = string.sub(ngx.arg[1], 1, 1000)
ngx.ctx.buffered = (ngx.ctx.buffered or"")..resp_body
if ngx.arg[2] then
ngx.ctx.resp_body = ngx.ctx.buffered
end |
require "custom.func"
function run()
local V = func[state.view] --获得该界面的函数组
if not V then
return run_default() --若没有该界面的函数组,运行通用默认
end
local F = V[state.target] --获取该界面 该目标下的函数
if not F then
F = V[target_default] --若没有该界面 该目标下的函数,则获取该界面默认函数
if not F then
return func_default() ... |
local config = {}
function config.nvim_autopairs()
require("nvim-autopairs").setup({})
require("nvim-autopairs.completion.cmp").setup({
map_cr = true,
map_complete = true,
})
end
function config.nvim_colorizer()
require("colorizer").setup({
css = { rgb_fn = true },
scss = { rgb_fn = true },
sass = { rgb... |
--!strict
local root = script.Parent.Parent
local t = require(root.t)
local Colors = root.Colors
local XYZ = require(Colors.XYZ)
---
--[[
Equations
XYZ -> L*u*v*: http://www.brucelindbloom.com/Eqn_XYZ_to_Luv.html
L*u*v* -> XYZ: http://www.brucelindbloom.com/Eqn_Luv_to_XYZ.html
]]
local XYZ_CONS... |
--Automatically generated by SWGEmu Spawn Tool v0.12 loot editor.
rebel_signet_ring = {
minimumLevel = 0,
maximumLevel = 0,
customObjectName = "",
directObjectTemplate = "object/tangible/wearables/ring/ring_s03_quest.iff",
craftingValues = {
},
customizationStringNames = {},
customizationValues = {},
skillMod... |
GM.AuctionMenu = nil
PANEL = {}
function PANEL:Init()
self.Frame = CreateGenericFrame("", false, true)
self.Frame.Paint = function() end
self.TabSheet = CreateGenericTabPanel(self.Frame)
self.BuyAuctions = self.TabSheet:NewTab("Buy and Sell", "buyauctionstab", "gui/money", "Buy out auctions and create auctions he... |
--@name Double or nothing
--@client
--@include ./sh_constants.lua
dofile('./sh_constants.lua')
-- @ include ./cl_adminpanel.lua
--dofile('./cl_adminpanel.lua')
local debug_mode = false
local initialized = false
local DON_BET
local DON_MAXIMUM
local DON_DEMO
local jackpot
local multiplier
local potential_winnings
loc... |
-- Copyright (c) 2020 Trevor Redfern
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
describe("moonpie.tables.pick_random", function()
local pickRandom = require "moonpie.tables.pick_random"
it("can choose a random element from a table", function()
local it... |
module 'mock'
CLASS: AnimatorTrackField ( AnimatorValueTrack )
:MODEL{
Field 'fieldId' :string();
}
function AnimatorTrackField:__init()
self.name = 'field'
self.targetField = false
self.fieldId = false
end
function AnimatorTrackField:onInit()
end
function AnimatorTrackField:isMatched( obj, fieldId, relativeT... |
local PANEL = {}
PANEL.chars = {}
function PANEL:Init()
local scrw, scrh = ScrW(), ScrH()
self:SetPos(0, 0)
self:SetSize(scrw, scrh)
self.button_close:safe_remove()
self.list = vgui.Create('fl_horizontalbar', self)
self.list:SetSize(scrw * 0.5, scrh * 0.5)
self.list:SetPos(scrw * 0.5 - self.list:GetW... |
require("Mod/Battle/BattleState")
require("Mod/Battle/BattleEvent")
require("Mod/Battle/BattleUnitEvent")
require("Mod/Battle/BattleBulletEvent")
require("Mod/Battle/BattleBuffEvent")
require("Mod/Battle/Data/BattleConst")
require("Mod/Battle/Data/BattleConfig")
require("Mod/Battle/Data/BattleAttr")
require("Mod/Battle... |
local function has_aktive_lsp()
local bufnr = vim.api.nvim_get_current_buf()
for _, client in pairs(vim.lsp.buf_get_clients(bufnr)) do
if client.resolved_capabilities.document_symbol then
return true
end
end
return false
end
local M = {}
function M.close()
require("nvim-... |
local cjson = require "cjson"
-- timestamp from NICT
function getTimestampFromNICT()
local b,c,h = fa.request("https://ntp-b1.nict.go.jp/cgi-bin/json")
res = cjson.decode(b)
return string.format("%d",res.st)
end
-- save timestamp
function saveTime(timestamp)
local year = os.date("%Y",timestamp)
l... |
ITEM.name = "Blueberry Soda"
ITEM.model = "models/props_junk/popcan01a.mdl"
ITEM.description = "A blue can filled with some carbonated flavoured water."
ITEM.thirstAmount = 0.15
ITEM.price = 100
ITEM.useSound = "gmodz/items/can.wav"
ITEM.iconCam = {
pos = Vector(76.027618408203, 63.794639587402, 46.273990631104),
a... |
object_static_worldbuilding_furniture_bear_rug = object_static_worldbuilding_furniture_shared_bear_rug:new {
}
ObjectTemplates:addTemplate(object_static_worldbuilding_furniture_bear_rug, "object/static/worldbuilding/furniture/bear_rug.iff") |
local buff = {}
local function checkplayerbuffs(players,playerbuffselected)
for i = 1, #players do
if playerbuffselected == 0 then
return false
end
end
return true
end
local function NewPlayerBuffs(players,buffs)
local playerbuffs = {}
for i = 1, #players do
--t... |
function score(name)
total = 0
for c in name:gmatch("%u") do
total = total + c:byte() - string.byte('A') + 1
end
return total
end
local f = io.open("p022_names.txt")
local all_names = f:read()
local names = {}
for name in all_names:gmatch('"(%u+)"') do
table.insert(names, name)
end
table.sort(names)
tota... |
a = 1
b = a*2
a = 1;
b = a*2;
a = 1 ; b = a*2
a = 1 b = a*2 -- ugly, but valid
print(a)
print(b) |
-- Vehicles to enable/disable air control
local vehicleClassDisableControl = {
[0] = true, --compacts
[1] = true, --sedans
[2] = true, --SUV's
[3] = true, --coupes
[4] = true, --muscle
[5] = true, --sport classic
[6] = true, --sport
[7] = true, --super
... |
--Stack changes, if it is true you make the biggest stacks
stackchanges = true --Default: True
--Inventory size changes, if it is true, your inventory size is more big
inventorychanges = true --Default: True
--Enable ores, if it is true it will add more ores
dimoresenable = false --Default: True |
return function(name, ...)
local f = require("templates."..name)
local t = f(...)
return Object:new(t)
end
|
local packer = nil
local function init()
if packer == nil then
packer = require 'packer'
packer.init { disable_commands = true }
end
local use = packer.use
packer.reset()
-- Packer
use 'wbthomason/packer.nvim'
-- Async building & commands
use { 'tpope/vim-dispatch', cmd = { 'Dispatch', 'Make'... |
local toast = require '../init'
local util = require 'util'
local function embedGen(self, usage, pre)
local aliases = table.concat(self.aliases, ', ')
local perms = table.concat(self.userPerms, ', ')
local other = self.nsfw and 'NSFW only'
local sub = ''
for _, cmd in ipairs(self.subCommands) do
sub = sub .. c... |
-- MIPS ioctl differences
return function(s)
local arch = {
ioctl = function(_IO, _IOR, _IOW, _IORW)
return {
FIOGETOWN = _IOR('f', 123, "int"),
FIOSETOWN = _IOW('f', 124, "int"),
SIOCATMARK = _IOR('s', 7, "int"),
SIOCSPGRP = _IOW('s', 8, "pid"),
SIOCGPGRP =... |
-- NPC integration
function SWEP:NPC_Initialize()
if CLIENT then return end
if !IsValid(self:GetOwner()) then return end
if !self:GetOwner():IsNPC() then return end
self:NPC_SetupAttachments()
self:SetHoldType(self.HoldtypeNPC or self:GetBuff_Override("Override_HoldtypeActive") or self.HoldtypeA... |
local validate = vim.validate
local api = vim.api
local lsp = vim.lsp
local uv = vim.loop
local fn = vim.fn
local M = {}
M.default_config = {
log_level = lsp.protocol.MessageType.Warning;
message_level = lsp.protocol.MessageType.Warning;
settings = vim.empty_dict();
init_options = vim.empty_dict();
handlers... |
--[[
Modify the implementation of setarray so that it accepts only boolean values.
]]
array = require 'array'
a = array.new(1000)
a:set(1, true)
print(a:get(1)) --> true
a:set(1, 15) --> bad argument #3 to 'set' (boolean expected)
|
-- 通用服务配置
local dbproxy_common = {
{db_name = "account", db_type = "mongodb", host = "127.0.0.1"}, -- host,port,username,password,authmod
{db_name = "game", db_type = "mongodb", host = "127.0.0.1"},
{db_name = "global", db_type = "mongodb", host = "127.0.0.1"},
{db_name = "log", db_type = "mongodb", hos... |
--an update for when the player launches the grappling hook
function Player:grapplingUpdate(dt)
self:grappleMove()
local currentHookPosition = Vector(
lume.lerp(self.pos.x, self.grappleTarget.pos.x,self.grappleCount/5),
lume.lerp(self.pos.y, self.grappleTarget.pos.y,self.grappleCount/5)
)
self:updateGra... |
-- Player declarations
local player = game.Players.kash5
local char = player.Character
-- Body parts
local torso = char.Torso
-- Tool declarations
local mouseDown = false
local keysDown = {}
-- Earth bending declarations
local raisingEarth = false
local raisingTower = false
local wall = false
local groundAttack = fa... |
include('shared.lua')
ENT.RenderGroup = RENDERGROUP_OPAQUE
function ENT:Initialize()
end
function ENT:Draw()
self:DrawModel()
end
|
--- Instance
local PATH = (...):gsub('%.[^%.]+$', '')
local Entity = require(PATH..".entity")
local System = require(PATH..".system")
local Type = require(PATH..".type")
local List = require(PATH..".list")
local Instance = {}
Instance.__index = Instance
--- Creates a new Instance.
-- @return The new instance
fu... |
---
-- Decimate a complex or real valued signal. This block band-limits and
-- downsamples the input signal. It reduces the sample rate for downstream
-- blocks in the flow graph by a factor of M.
--
-- $$ y[n] = (x * h_{lpf})[nM] $$
--
-- @category Sample Rate Manipulation
-- @block DecimatorBlock
-- @tparam int decim... |
--socket.lua
local ssub = string.sub
local sfind = string.find
local log_err = logger.err
local log_info = logger.info
local qxpcall = quanta.xpcall
local NetwkTime = enum("NetwkTime")
local socket_mgr = quanta.get("socket_mgr")
local thread_mgr = quanta.get("thread_mgr")
... |
local path = ...
return {
cpu = require(path .. ".cpu"),
bus = require(path .. ".bus"),
disassembler = require(path .. ".disassembler"),
instructions = require(path .. ".instructions"),
opcodes = require(path .. ".opcodes"),
ram = require(path .. ".ram"),
rom = require(path .. ".rom")
} |
--[[
Map Tools: configuration handling
Copyright (c) 2012-2015 Calinou and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
maptools.config = {}
local function getbool_default(setting, default)
local value = minetest.setting_getbool(setting)
if value == nil then
value = de... |
module(..., package.seeall)
NODE = {
title="Translations",
prototype="@Lua_Config",
}
NODE.content = [=============[
-- If you edit this page outside Sputnik, please use an editor
-- that handles unicode properly, e.g. "gedit".
FALLBACKS = {
en = "en_US",
pt = "pt_BR",
_all = "en_US",
}
---------------... |
AddCSLuaFile("shared.lua")
AddCSLuaFile("cl_init.lua")
include("shared.lua")
function ENT:Initialize()
self:SetModel("models/blues_pharm/jar_4.mdl")
self:PhysicsInit( SOLID_VPHYSICS )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSolid( SOLID_VPHYSICS )
local physics = self:GetPhysicsObject()
if (physics:IsVali... |
-- Converted by xaneh#6591
-- İf you want more qb scripts = https://discord.gg/wBNwPCv
resource_manifest_version "44febabe-d386-4d18-afbe-5e627f4af937"
description 'Qbus:Apartments'
server_scripts {
"server/main.lua",
"config.lua",
}
client_scripts {
"client/main.lua",
"client/gui.lua",
"config... |
local posix = require('posix')
local config = require(".config")
local _M = {}
-- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
-- helpers
function _M.hc(arguments)
os.execute("herbstclient " .. arguments)
end
function _M.do_config(command, hash)
-- loop over hash
for key, value in ... |
workspace "Sortilyzer"
architecture "x64"
configurations {
"Debug",
"Release"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
IncludeDir = {}
IncludeDir["GLEW"] = "Sortilyzer/src/Dependencies/GLEW/include"
IncludeDir["GLFW"] = "Sortilyzer/src/Dependencies/GLFW/include"
IncludeDir["img... |
if mods["pyhightech"] then
data:extend({
{
type = 'recipe',
name = 'clay-r1',
category = 'clay',
enabled = true,
energy_required = 4,
subgroup = "others",
order = "j-a",
category = "red-enrichment-chamber",
ingredients = {
{type = 'fluid', name = 'steam', amount = 100, temperature =... |
require("msys.core")
local mod = {}
-- set_binding can be called from multiple threads,
-- so you should not use globals to make binding decisions.
function mod:validate_set_binding(msg)
blat = 2 -- Oops, setting a global.
if fred == 1 then -- Oops, reading a global.
msg:set_binding("fred")
end
end
msys.re... |
--- @ignore
local draw = draw
local surface = surface
local math = math
local IsValid = IsValid
local TryTranslation = LANG.TryTranslation
local base = "base_stacking_element"
DEFINE_BASECLASS(base)
HUDELEMENT.Base = base
if CLIENT then
local width = 300
local height = 20
HUDELEMENT.margin = 10
HUDELEMENT.bar... |
--[[
@Authors: Ben Dol (BeniS)
@Details:
]]
dofile('loot.lua')
-- required by the event handler
function LootModule.getModuleId()
return "LootModule"
end
LootModule.dependencies = {
"BotModule"
}
--[[ Default Options ]]
LootModule.options = {
--
}
--[[ Register Events ]]
table.merge(LootModule, {
--... |
---------------------------------------------------------------------------------------------------
-- User story: Smoke
-- Use case: SetInteriorVehicleData
-- Item: Happy path
--
-- Requirement summary:
-- [ReadDID] SUCCESS: getting SUCCESS:RC.SetInteriorVehicleData()
--
-- Description:
-- Mobile application sends val... |
local liblon = require("liblon")
local ser = {}
function ser.serialize(value, pretty)
return liblon.sertable(value) -- liblon currently always prettify the tables.
end
function ser.unserialize(value)
return liblon.loadlon(value)
end
return ser
|
local ContainerBase = require("ContainerBase")
local HDiv = ContainerBase:extend()
HDiv.type = "HDiv"
HDiv.baseStyle = {
placement = "fill",
}
setmetatable(HDiv.baseStyle, {__index=ContainerBase.baseStyle})
function HDiv:getContentDimensions()
local maxW = 0
local maxH = 0
for _, W in ipairs(self.ite... |
local t = {
aa, bbb, ccc, ddd, eee, fff
}
local t2 = { 1, 2, 3, 4, 5 }
local t3 = { 123131,
aaa, bbbb, ccc, 1, 2, 3, 4, 5
}
local t4 = {
aaa = 1,
bbbb = 4456,
["wgfwwfw"] = 890,
[{}] = 131,
[function() end] = 131,
[1231] = 12321,
[ [[123]] ] = 456
}
local t5 = {
qewqe ... |
local Object = require("kong.vendor.classic")
local _M = Object:extend()
local name_helper = require("kong.plugins.mtls_certs_manager.x509_name_helper")
local encode_base64 = ngx.encode_base64
local keyauth_credentials = kong.db.keyauth_credentials
local x509 = require("resty.openssl.x509")
local csr = require("resty.... |
local ffi = require( "ffi" )
local sdl = require( "ffi/sdl" )
local cr = require( "ffi/cairo" )
local wm = require( "lib/wm/sdl" )
local random = math.random
local lines = {{ x=0, y=0, solid = false }}
local function make_colors(n)
n = n or 16
local colors = {}
for i=1, n do
local r = ran... |
include("shared.lua")
local toScreen = FindMetaTable("Vector").ToScreen
local colorAlpha = ColorAlpha
local drawText = nut.util.drawText
local configGet = nut.config.get
function ENT:onDrawEntityInfo(alpha)
--local position = toScreen(self.LocalToWorld(self, self.OBBCenter(self)))
--local x, y = position.x... |
local AceConfigRegistry = LibStub("AceConfigRegistry-3.0")
local _, addon = ...
local errors = addon.errors
--[[-------------------------------------------------------------------
-- Define Slash commands
-------------------------------------------------------------------]] --
local function setPointCmd()
if Worl... |
local sandbox = {}
function sandbox.new()
local self = setmetatable({}, {__index = sandbox})
self.table_lookup = {}
self.__backup = {}
return self
end
function sandbox:deep_restore(tab, backup)
self.table_lookup[tab] = true
for k, v in pairs(tab) do
if backup[k] == nil then
... |
--------------------------------------------------------------------------------
-- Module Declaration
--
local mod, CL = BigWigs:NewBoss("Skycap'n Kragg", 1754, 2102)
if not mod then return end
mod:RegisterEnableMob(126832)
mod.engageId = 2093
mod.respawnTime = 25
---------------------------------------------------... |
local shapeShifts = {
"Ghost Wolf",
"Bear Form",
"Dire Bear Form",
"Cat Form",
"Moonkin Form",
"Aquatic Form",
"Travel Form",
"Shadowform",
};
local shapeShiftErros = {
ERR_MOUNT_SHAPESHIFTED,
ERR_NOT_WHILE_SHAPESHIFTED,
ERR_TAXIPLAYERSHAPESHIFTED
}
local mountedErrors = {... |
--* This Document is AutoGenerate by OrangeFilter, Don't Change it! *
---@meta
---
---[3.3]color curves[parent:]
---
---@class Gradient
Gradient = {}
---
---[3.3]constructor, no param
---
--- @nodiscard
function Gradient:new() end
---
---[3.3]add color key
---
--- @param arg0 float
--- @param arg1 Color#color
--- @... |
return {
{
Pandoc = function(doc)
local meta = {}
local hello = { pandoc.Str "Hello,", pandoc.Space(), pandoc.Str "World!" }
local blocks = { pandoc.Para(hello) }
return pandoc.Pandoc(blocks, meta)
end
}
}
|
require "scripts.core.item"
require "gamemode.Spark.modifiers.modifier_aura_armor"
require "gamemode.Spark.modifiers.modifier_armor"
require "gamemode.Spark.modifiers.modifier_attack_speed"
Hjalldrengs_Grasp = class(Item)
function Hjalldrengs_Grasp:OnCreated ()
self:SetCastingBehavior(CastingBehavior(CastingBehavior... |
--[[
Unit test for LinearNet tester
Copyright 2016 Xiang Zhang
--]]
local Test = require('test')
local math = require('math')
local Data = require('data')
local Model = require('model')
-- A Logic Named Joe
local joe = {}
function joe.main()
if joe.init then
print('Initializing testing environment')
... |
local S = minetest.get_translator(minetest.get_current_modname())
local SERIALIZATION_VERSION = 1
local errors = {
owned = function(owner) return S("Cannot pickup node. Owned by @1.", owner) end,
full_inv = S("Not enough room in inventory to pickup node."),
bad_item = function(item) return S("Cannot pickup node c... |
--- Load libraries from the internets with caching to disk
local USER_AGENT = "Ficsit-Appliances/Deps https://github.com/abesto/ficsit-appliances"
local REPOSITORY = "abesto/ficsit-appliances"
local function pci(cls)
local device = computer.getPCIDevices(findClass(cls))[1]
if device == nil then
error("... |
--青き眼の祭司
function c456448980.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(456448980,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET... |
require("cmp").register_source("neosnippet", require("cmp_neosnippet").Source.new())
|
-----------------------------------------
-- Spell: Blindna
-- Removes blindness from target.
-----------------------------------------
require("scripts/globals/status")
require("scripts/globals/msg")
-----------------------------------------
function onMagicCastingCheck(caster,target,spell)
return 0
end
function... |
-- Copyright (C) Yichun Zhang (agentzh)
local ffi = require "ffi"
local ffi_new = ffi.new
local ffi_sizeof = ffi.sizeof
local ffi_cast = ffi.cast
local ffi_fill = ffi.fill
local ngx_now = ngx.now
local uintptr_t = ffi.typeof("uintptr_t")
local setmetatable = setmetatable
local tonumber = tonumber
-- queue data type... |
--this version actually works
local tab = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
base64 = {
enc = function(data)
local l,out = 0,''
local m = (3-data:len()%3)%3
local d = data..string.rep('\0',m)
for i=1,d:len() do
l = bit.lshift(l,8)
l = l+d:byte(i,i)
if i%3==0 then
f... |
function onPlayStart(name, delegate)
globalOptionsCache[name].onPlayStart = delegate
end
exports('onPlayStart', onPlayStart)
function onPlayEnd(name, delegate)
globalOptionsCache[name].onPlayEnd = delegate
end
exports('onPlayEnd', onPlayEnd)
function onLoading(name, delegate)
globalOptionsCache[name].on... |
local THIRDPARTY_DIR = "thirdparty"
local BGFX_DIR = path.join(THIRDPARTY_DIR, "bgfx")
local BIMG_DIR = path.join(THIRDPARTY_DIR, "bimg")
local BX_DIR = path.join(THIRDPARTY_DIR, "bx")
local EIGEN_DIR = path.join(THIRDPARTY_DIR, "eigen")
local EMBREE_DIR = path.join(THIRDPARTY_DIR, "embree3")
local ENKITS_DIR = path.jo... |
local Keyboard = {}
local key_states = {}
function Keyboard:update(dt)
for k,v in pairs(key_states) do
key_states[k] = nil
end
end
function Keyboard:key(key)
return love.keyboard.isDown(key)
end
function Keyboard:key_down(key)
return key_states[key]
end
function Keyboard:key_up(key)
re... |
function onCastSpell(creature, variant)
return creature:conjureItem(0, 2546, 8, CONST_ME_MAGIC_BLUE)
end
|
local activityConfig = require "config.activityConfig"
local CemeteryConf = require "config.cemeteryConfig"
local HeroScroll = require "hero.HeroScroll"
local equipConfig = require "config.equipmentConfig"
local SmallTeamDungeonConf = require "config.SmallTeamDungeonConf"
local ActivityTeamlist = require "config.activi... |
object_tangible_quest_rebel_rtp_leia_communication_array = object_tangible_quest_rebel_shared_rtp_leia_communication_array:new {
}
ObjectTemplates:addTemplate(object_tangible_quest_rebel_rtp_leia_communication_array, "object/tangible/quest/rebel/rtp_leia_communication_array.iff")
|
-- lua-mnemonic, Return random words from the list
-- Copyright (c) 2015 Boris Nagaev
-- See the LICENSE file for terms of use.
local mnemonic = {}
mnemonic.lists = {}
mnemonic.lists.common_en = {
"like", "just", "love", "know", "never", "want", "time",
"out", "there", "make", "look", "eye", "down", "only",
... |
local colors = require("base46").get_colors "base_16"
vim.g.terminal_color_0 = "#" .. colors.base00
vim.g.terminal_color_1 = "#" .. colors.base08
vim.g.terminal_color_2 = "#" .. colors.base0B
vim.g.terminal_color_3 = "#" .. colors.base0A
vim.g.terminal_color_4 = "#" .. colors.base0D
vim.g.terminal_color_5 = "#" .. col... |
function getNA4Actions(no)
if(no < 0)then return {};
elseif(no == 0)then
return {};
elseif(no == 1)then
return {};
elseif(no == 2)then
return {};
end
return {};
end
NA4ProfileNames = {[0]='Assassination',[1]='Combat',[2]='Subtlety',};
NA4ProfileDescriptions = {[0]='天赋:--属性:',[1]='天赋:--属性:',[2]=... |
local class = require('src.Utils.MiddleClass');
local Logger = require('src.Utils.Logger');
local Node = require('src.Node');
--- An action node, used to execute a specific thing.
---@class Action: Node
local Action = class('Action', Node);
function Action:_parseXmlNode(node, context)
if node._children.n ~= 0 th... |
-- This file contains all the chatter-api related functions.
-- Contains all the plugins that want to change something in chat.
g_Plugins = {}
-- Registers a plugin.
-- a_Tag is the tag you want to replace for example {FACTION}
-- a_PluginName is the name of the plugin who is calling
-- a_CallbackName is the... |
local jvm_loader=assert(package.loadlib('./libluajava-1.1.dylib','luaopen_jvm'))
local javavm =jvm_loader()
local vm =javavm.create("-Djava.class.path=./luajava-1.1.jar","-XstartOnFirstThread")
print'create ok'
local luajava=assert(vm:luajava())
System = assert(luajava.bindClass)("java.lang.System")
System.out:println(... |
-- TIP: to find all possible translations in the modules directory use the following command
-- find \( -name "*.lua" -o -name "*.otui" \) -exec grep -oE "tr\\('(\\\\'|[^'])*'" {} \; -exec grep -oE "tr\\(\"(\\\\\"|[^\"])*" {} \; | sort | uniq | sed "s/^tr(.\(.*\).$/[\"\1\"] = nil,/"
Locales = { }
-- private variables... |
local keyboard = {
-- Control
LEFT_CONTROL = 29,
RIGHT_CONTROL = 157,
-- Shift
LEFT_SHIFT = 42,
RIGHT_SHIFT = 54,
-- Alt
LEFT_ALT = 56,
RIGHT_ALT = 184,
-- Command (Mac & Linux) or Windows Key (Windows), I added both in case someone is from windows
COMMAND_KEY = 219,
WINDOWS_KEY = 219,
-- N... |
describe("Audio", function()
local audio
local utils
local loadedFilesCount
local function round(num)
local mult = 100
return math.floor(num * mult + 0.5) / mult
end
setup(function()
_G.load_WAV_file = function(path)
loadedFilesCount = loadedFilesCount + 1
... |
local playsession = {
{"sky_2017", {601873}},
{"Dammpi", {590533}},
{"tokastar", {556695}},
{"jackazzm", {585253}},
{"Preums", {553964}},
{"Tcheko", {404522}},
{"AmiloPL", {77693}},
{"Cloudtv", {396636}},
{"tykak", {546917}},
{"Immo", {531720}},
{"floxys", {157537}},
{"15944831778", {488181}},
{"Krono", {8... |
--control.lua
require "lualib/extensions"
require "config"
local TrainDepot = require "models/TrainDepot"
local TrainCounter = require "models/TrainCounter"
script.on_configuration_changed(function (event)
local train_depot_changes = event.mod_changes["TrainDepot"]
if train_depot_changes then
local old_versi... |
local present, onedark = pcall(require, 'onedark')
if present then
onedark.setup({
style = 'dark',
code_style = {
comments = 'italic',
keywords = 'none',
functions = 'bold',
strings = 'none',
variables = 'none',
},
})
requir... |
return {
id = 12,
x1 = 1,
x2 = 'A',
x3 = {
x1 = 1,
},
x4 = {
_type_ = 'DemoD2',
x1 = 2,
x2 = 3,
},
s1 = "asf",
s2 = {key='key1',text="abcdef"},
} |
Grid_Units = 250
--[[ CHUNKS : {
x0y0 = {
x0y0 = {},
x1y0 = {},
x0y1 = {},
},
x0y1 = {
},
}
]]--
Chunk_Units = 2500
-- RESET CACHE WHEN CHANGING THESE ^
-- Chunk_Units / Grid_Units has to return an integer
Entities_Spawn = {
"Character",
"Prop",
"StaticMesh",
... |
local handy = request('!.mechs.processor.handy')
local opt = handy.opt
local opt_rep = handy.opt_rep
local word = request('^.words.word')
return
{
name = 'if_block',
{
name = 'if_part',
word('if'),
'>expression',
word('then'),
'>statements',
},
opt_rep(
{
... |
return {
require("plugin/snip_engine/luasnip"),
{ 'rafamadriz/friendly-snippets' },
}
|
ENT.Type = "point"
ENT.Base = "base_point"
function ENT:Initialize()
self.Active = true
self.Radius = 400
self.SoundRadius = 800
self.Pos = self.Entity:GetPos()
end
function ENT:SetArtifact( ent )
self.Artifact = ent
end
function ENT:GetArtifact()
return self.Artifact or NULL
end
function ENT:S... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.