content stringlengths 5 1.05M |
|---|
local Chara = require("api.Chara")
local Gui = require("api.Gui")
local I18N = require("api.I18N")
local Item = require("api.Item")
local Sidequest = require("mod.elona_sys.sidequest.api.Sidequest")
local Guild = require("mod.elona.api.Guild")
local Rank = require("mod.elona.api.Rank")
local Itemgen = require("mod.elon... |
-- Variant Tests (without using Testing Framework)
return {function() -- wrap the function in a table to avoid detection by the TestRunnerPlugin
local modules = game.ServerStorage.TestRunnerPlugin
local progress = 0
spawn(function()
if not progress then
print("Variant tests successful")
elseif progress ~= -1 then
... |
require "content/characters/base_types"
local negotiation_defs = require "negotiation/negotiation_defs"
local battle_defs = require "battle/battle_defs"
local BATTLE_EVENT = battle_defs.BATTLE_EVENT
local CARD_FLAGS = battle_defs.CARD_FLAGS
local EVENT = negotiation_defs.EVENT
Content.AddNegotiationCard("secr... |
return {
cols = 5,
rows = 5,
griddler = { 0, 1, 1, 1, 0,
0, 0, 1, 0, 0,
1, 1, 0, 1, 1,
1, 0, 0, 0, 1,
1, 0, 0, 0, 1 }
} |
local eventtap = hs.eventtap
local eventTypes = hs.eventtap.event.types
local logger = hs.logger.new('super')
local state = {}
state.isActive = false
state.outputNextSpace = false
state.isTyping = false
state.training = false
local modifiers = function (event)
local modifiers = {}
-- Apply the standard modifier ... |
---------------------------------------------------------------------------------------------------
-- Proposal:
-- https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0204-same-app-from-multiple-devices.md
-- Description:
-- Check how SDL responds when same applications from different mobiles having... |
ChaseAndAttack = Class(BehaviourNode, function(self, inst, max_chase_time, give_up_dist, max_attacks, findnewtargetfn, walk)
BehaviourNode._ctor(self, "ChaseAndAttack")
self.inst = inst
self.findnewtargetfn = findnewtargetfn
self.max_chase_time = max_chase_time
self.give_up_dist = give_up_dist
s... |
local sdl = require 'sdl2'
local ffi = require 'ffi'
local C = ffi.C
local serialize = require 'threads.serialize'
ffi.cdef[[
struct THCode {
const char *data;
int size;
};
struct THWorker {
SDL_mutex *mutex;
SDL_cond *notfull;
SDL_cond *notempty;
int head;
int tail;
int isempty;
int isfull;
int ... |
local myname, ns = ...
ns.defaults = {
profile = {
show_on_world = true,
show_on_minimap = false,
show_junk = false,
show_npcs = true,
show_treasure = true,
found = false,
repeatable = true,
icon_scale = 0.9,
icon_alpha = 0.9,
icon_ite... |
--entityEnumerator Written by IllidanS4
--[[
The MIT License (MIT)
Copyright (c) 2017 IllidanS4
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 limitat... |
-- ファイルを転送するスクリプト
-- ファイルをタイムシフト再生できる: http://localhost:5510/xcode.lua?fname=video/foo.ts
dofile(mg.script_name:gsub('[^\\/]*$','')..'util.lua')
-- 安全な(POST的でない)処理を意識するのでCSRF対策トークンは求めない
query=mg.request_info.query_string
fpath=mg.get_var(query,'fname')
if fpath then
fpath=DocumentToNativePath(fpath)
end
... |
local ModeSelectScene = Scene:extend()
ModeSelectScene.title = "Game Start"
current_mode = 1
current_ruleset = 1
function ModeSelectScene:new()
-- reload custom modules
initModules()
if table.getn(game_modes) == 0 or table.getn(rulesets) == 0 then
self.display_warning = true
current_mode = 1
current_ruleset... |
WidgetGroupLib = {}
function WidgetGroupLib.new(name)
print("WidgetGroupLib.new")
local w = WidgetLib2.newSimple(name)
w.Widgets = {}
w.render = function (o) WidgetGroupLib.render(o) end
-- etc
print(name)
print("w.name:" .. w.name)
return w
end
function WidgetGroupLib.render(w)
for k,v in pairs(... |
local event = require 'utils.event'
local gain_multiplier = 4
local function on_research_finished(event)
local research = event.research
local force_name = research.force.name
if not global.shotgun_shell_damage_modifier_old[force_name] then global.shotgun_shell_damage_modifier_old[force_name] = game.forces[force_... |
description = [[
Spiders a web server and displays its directory structure along with
number and types of files in each folder. Note that files listed as
having an 'Other' extension are ones that have no extension or that
are a root document.
]]
---
-- @usage
-- nmap --script http-sitemap-generator -p 80 <host>
--
--
... |
function split(inputstr, sep)
if sep == nil then
sep = "%s"
end
local t={}
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
table.insert(t, str)
end
return t
end
local function getTypes()
local tab = {}
for index,_ in pairs(Config.types) do
table.insert(tab, index)
end
return tab
end
local f... |
local RUF = RUF or LibStub('AceAddon-3.0'):GetAddon('RUF')
local LSM = LibStub('LibSharedMedia-3.0')
local _, ns = ...
local oUF = ns.oUF
local _, PlayerClass
local DebuffDispel = {-- DISPELLING ALLIES, 10 = Classic since there are no specs in classic.
['DEATHKNIGHT'] = {
[1] = {'None'},
[2] = {'None'},
[3] = {... |
local sceneHandler = {scenes = {}}
local cur = nil
local scenes = love.filesystem.getDirectoryItems('src/scenes')
Engine.util.print('Scenes:', '++\t')
for k, file in ipairs(scenes) do
local name = string.sub(file, 1, string.len(file) - 4)
sceneHandler.scenes[name] = require('src.scenes.'..name)
Engine.uti... |
-- Copyright (c) 2021 Trevor Redfern
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
local Names = {}
local list = require "moonpie.collections.list"
local tables = require "moonpie.tables"
Names.firstNames = list:new()
Names.lastNames = list:new()
function N... |
local trpc = {}
local method = {}
local fiber = require('fiber')
local log = require('log')
local uuid = require('uuid')
local const_status_new = 0
local const_status_working = 1
local DEFAULT_TTL = 1
local DEFAULT_TTR = 1
local ERROR_PULL_RETRY = 901
local ERROR_TIMEOUT_PULL = 902
local ERROR_TIMEOUT_WORKER = 903
... |
--- Text processing utilities.
--
-- This provides a Template class (modeled after the same from the Python
-- libraries, see string.Template). It also provides similar functions to those
-- found in the textwrap module.
--
-- IMPORTANT: this module has been deprecated and will be removed in a future
-- version (2.0). ... |
-- ClientRemoteProperty
-- Stephen Leitnick
-- December 20, 2021
local Promise = require(script.Parent.Parent.Parent.Promise)
local Signal = require(script.Parent.Parent.Parent.Signal)
local ClientRemoteSignal = require(script.Parent.ClientRemoteSignal)
local Types = require(script.Parent.Parent.Types)
--[... |
-- 全局模块
require "Global.Global"
local AssetBundleManager = CS.AssetBundles.AssetBundleManager.Instance
-- package.cpath =
-- package.cpath ..
-- ";c:/Users/Administrator.XSOOY-20190615H/.vscode/extensions/tangzx.emmylua-0.3.37/debugger/emmy/windows/x64/?.dll"
-- local dbg = require("emmy_core")
-- dbg.tcpListe... |
---
-- @author wesen
-- @copyright 2020 wesen <wesen-ac@web.de>
-- @release 0.1
-- @license MIT
--
local luaunit = require "luaunit"
local Object = require "classic"
---
-- Checks that the Callable class works as expected.
--
-- @type TestCallable
--
local TestCallable = Object:extend()
---
-- Checks that a Callabl... |
class("GalleryLikeCommand", pm.SimpleCommand).execute = function (slot0, slot1)
slot2 = slot1:getBody()
slot5 = slot2.likeCBFunc
slot6 = getProxy(AppreciateProxy)
pg.ConnectionMgr.GetInstance():Send(17505, {
id = slot2.picID,
action = slot2.isAdd
}, 17506, function (slot0)
if slot0.result == 0 then
if sl... |
function isqrt(x)
local q = 1
local r = 0
while q <= x do
q = q << 2
end
while q > 1 do
q = q >> 2
local t = x - r - q
r = r >> 1
if t >= 0 then
x = t
r = r + q
end
end
return r
end
print("Integer square root for number... |
--[[
The contents of this file are subject to the Common Public Attribution
License Version 1.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://ultimate-empire-at-war.com/cpal. The License is based on the Mozilla
Public License Versio... |
local skynet = require "skynet"
local c = require "skynet.core"
local smg_interface = require "smg.interface"
local profile = require "skynet.profile"
local smg = require "skynet.smg"
require "skynet.manager"
local smg_name = tostring(...)
local loaderpath = skynet.getenv"smg_loader"
local loader = loaderpath... |
--- Holds binders
-- @classmod HideBindersServer
-- @author Quenty
local require = require(script.Parent.loader).load(script)
local BinderProvider = require("BinderProvider")
local Binder = require("Binder")
return BinderProvider.new(function(self, serviceBag)
self:Add(Binder.new("Hide", require("Hide"), serviceBag... |
Config = {}
Config.DrawDistance = 100.0
Config.MarkerType = 3
Config.MarkerSize = { x = 1.0, y = 2.0, z = 1.0 }
Config.MarkerColor = { r = 129, g = 75, b = 1 }
Config.EnablePlayerManagement = true
Config.EnableArmoryManagement ... |
-----------------------------------
-- Area: Southern San d'Oria
-- NPC: Moozo-Koozo
-- Title Change NPC
-- !pos 83 0 120 230
-------------------------------------
local ID = require("scripts/zones/Southern_San_dOria/IDs")
require("scripts/globals/npc_util")
require("scripts/globals/quests")
require("scripts/globals/... |
local class = require("libs.class")
local utils = require("utils")
local Animation = require("animation")
local Animator = class("Animator")
Animator.animationFiles = {}
local modified = utils.ModifiedChecker()
function Animator.reloadAnimationFiles()
for path, file in pairs(Animator.animationFiles) do
... |
-- Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
--
-- This software is provided 'as-is', without any express or implied
-- warranty. In no event will the authors be held liable for any damages
-- arising from the use of this software.
--
-- Permission is granted to anyone to use this software for any purp... |
--proc/controls/toolbar: standard toolbar control
--Written by Cosmin Apreutesei. Public Domain.
setfenv(1, require'winapi')
require'winapi.window'
require'winapi.comctl'
--creation
TOOLBARCLASSNAME = 'ToolbarWindow32'
TBSTYLE_TOOLTIPS = 0x0100
TBSTYLE_WRAPABLE = 0x0200
TBSTYLE_ALTDRAG ... |
local ObjectManager = require("managers.object.object_manager")
huttInformantConvoHandler = conv_handler:new {}
function huttInformantConvoHandler:getInitialScreen(pPlayer, pNpc, pConvTemplate)
local convoTemplate = LuaConversationTemplate(pConvTemplate)
local electionNum = BestineElection:getElectionNumber()
loca... |
function test()
local res = 0
for i="1", 1000.4134, 3 do
res = res + i
end
return res
end
jit("compile", test)
local res = test()
assert(res == 167167.0)
--[[
function <../tests/40_OP_FORPREP.lua:1,7> (9 instructions at 0x2369500)
0 params, 5 slots, 0 upvalues, 5 locals, 4 constants, 0 functio... |
local _M =
{
["skUnknown"] = _SCINTILLA.next_image_type(),
["skConditional"] = _SCINTILLA.next_image_type(),
["skDynLib"] = _SCINTILLA.next_image_type(),
["skParam"] = _SCINTILLA.next_image_type(),
["skGenericParam"] = _SCINTILLA.next_image_type(),
["skTemp"] = _SCINTILLA... |
--[[
Filename: NotificationManagerC.lua
Authors: Sam@ke
--]]
NotificationManagerC = {}
function NotificationManagerC:constructor(parent)
mainOutput("NotificationManagerC was loaded.")
self.mainClass = parent
self.screenWidth, self.screenHeight = guiGetScreenSize()
self.scaleFactor = (1 /1080) * self.screenHe... |
local INTERIOR = 0
local DIMENSION = 0
local mapObjects = {
createObject(18030, 1451.0996, -1123.334, 25.3, 0, 0, 39.996),
createObject(2387, 1450.9, -1137.4, 22.9, 0, 0, 39.996),
createObject(2387, 1448.2, -1139.7, 22.9, 0, 0, 39.99),
createObject(18072, 1456, -1137, 25, 0, 0, 39.996),
createObject(18070, 1445.... |
local args = {...}
local import_prefix = args[1]
if import_prefix then import_prefix = import_prefix:match("^(.-)[^%.]+$") end
if not import_prefix then import_prefix = "" end
local classmodule = require(import_prefix .. "class")
--[[
Some "standard" errors:
- ErrorBase - a generic error class
- UnknownError - an ... |
local P9813 = require("P9813")
local cled = P9813.new(5, 6, 1)
local h = 0
local c = 200
local l = 100
for i = 1, 100, 1 do
for h = 0, 768, 25 do
cled:hclColor(1, h, c, l)
cled:refresh()
end
end |
-- state "enum"
local CMD = 0 -- command
local NRM = 1 -- normal
local QTE = 2 -- quoted
local ESC = 3 -- escape
local REM = 4 -- remainder
---@param str string
return function(str)
local s = 0
local i = 0
---@type command
local cmd
---@type argdef[]
local defs
local cur = ""
local a... |
if not SYSPATH then return end
local meta = {}
function meta:setNick(nick)
self.nick = nick
end
return meta |
return require("sys.init") |
instrument { name = "Fractal Chaos Bands", overlay = true }
local function high_fractal ()
local res = make_series ()
local p = high [2]
if not get_value (p) then return res end
local is_fractal = high <= p and high [1] <= p and high [3] <= p and high [4] <= p
res:set (iff(is_fractal, p, res[1]... |
LCD = {}
LCD.__index = LCD;
local TABLE = { 119, 36, 93, 109, 46, 107, 123, 37, 127, 111 } -- Binary notation is not available in Lua.
local H_SYM = "-"
local V_SYM = "|"
local S_SYM = " "
function LCD.create(input, segments)
local self = {}
setmetatable(self, LCD);
self.numbers = {}
for i = 1, #input do
... |
working_villages.register_job("working_villages:job_empty", {
description = "empty (working_villages)",
inventory_image = "default_paper.png",
jobfunc = function() end,
})
-- only a recipe of the empty job is registered.
-- other job is created by writing on the empty job.
minetest.register_craft{
o... |
-------------------------------------------------------------------------------------------
--
-- raylib [text] example - Text formatting
--
-- This example has been created using raylib 1.6 (www.raylib.com)
-- raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
--
-- Copyright (c... |
describe("hussar.request_router.checkers", function()
local away = require "away"
local debugger = require "away.debugger"
local RequestRouter = require "hussar.request_router"
local checkers = require "hussar.request_router.checkers"
describe("PATH", function()
it("return true if request's ... |
DEBUGGING = false
DEBUG_FILE = "rocketremote_debug.txt"
require("util")
local GUI_NAME = "rocket_remote"
local GUI_POS = "left"
local UPDATE_INTERVAL = 5 -- seconds
-------------------------------------------------------------------------------
local function init_globals()
if global.silos ~= nil then return ... |
local class = cat.require("base/class")
local function new_single_signal(name)
local single_signal = {
name = name,
all_connect = {}
}
--信号触发运行object的"func"函数
function single_signal:connect(object,func)
self.all_connect[func] = object
end
function single_signal:disconn... |
--[[ Netherstorm -- Severed Spirit.lua
This script was written and is protected
by the GPL v2. This script was released
by BlackHer0 of the BLUA Scripting
Project. Please give proper accredidations
when re-releasing or sharing this script
with others in the emulation community.
~~End of License Agreement
-- BlackHer0... |
--[[
Storage class is used to access saved variables.
]]
-- Usings
---@type Map
local Map = EsoAddonFramework_Framework_Map
---@type StorageScope
local StorageScope = EsoAddonFramework_Framework_StorageScope
-- Constants
local Namespace = "storage"
local Version = 1
-- Fields
local _accountStorage
local _char... |
setfenv(1, require "sysapi-ns")
EPOCH_BIAS = 116444736000000000
TICKS_PER_SEC = 10000000
TICKS_PER_MSEC = 10000
TICKS_PER_USEC = 10
ffi.cdef [[
typedef struct _FILETIME {
DWORD dwLowDateTime;
DWORD dwHighDateTime;
} FILETIME, *PFILETIME, *LPFILETIME;
]]
ffi.cdef [[
BOOL GetProcessTimes(
HANDLE ... |
local types = require "ptable.utils.types"
local helper = {}
-- Parameter to be used in the reflection and make reference to the obtention of
-- function name.
local PARAMETER_NAME = "n"
-- Parameter to be used in the reflection and make reference to the obtention of
-- thread stack.
local STACK_NUMBER = 2
---Creat... |
-- explosion_veryheavy_rocket_trail-2
-- explosion_veryheavy_rocket-2
-- explosion_veryheavy_rocket_controller-2
return {
["explosion_veryheavy_rocket_trail-2"] = {
fakelight = {
air = false,
class = [[CSimpleGroundFlash]],
count = 1,
ground ... |
local t = Def.ActorFrame{}
t[#t+1] = LoadActor("songinfo")
t[#t+1] = Def.ActorFrame {
InitCommand=function(self)
self:rotationz(-90):xy(SCREEN_CENTER_X/2-WideScale(get43size(150),150),270)
self:delayedFadeIn(5)
end,
OffCommand=function(self)
self:stoptweening()
self:sleep(0.025)
self:smooth(0.2)
self:di... |
-- import
local UIWidgetModule = require 'candy.ui.light.UIWidget'
local UIWidget = UIWidgetModule.UIWidget
local ComponentModule = require 'candy.Component'
-- module
local UIComboBoxModule = {}
--------------------------------------------------------------------
-- UIComboBoxDataItem
-------------------------------... |
-- 3D2D-VGUI --
-- Example shows how to draw a single DFrame and it's children in 3D world space.
require "3d2dvgui"
local tr = LocalPlayer():GetEyeTrace()
local pos = tr.HitPos + tr.HitNormal * 4
local ang = tr.HitNormal:Angle()
ang:RotateAroundAxis( ang:Up(), 90 )
ang:RotateAroundAxis( ang:Forward() * -1, -90 )
lo... |
AddCSLuaFile()
local name = "Jaguar XFR Police Photon"
local A = "AMBER"
local R = "RED"
local B = "BLUE"
local W = "WHITE"
local CW = "C_WHITE"
local SW = "S_WHITE"
local EMV = {}
EMV.Siren = 5
EMV.Color = nil
EMV.Skin = 0
EMV.Positions = {
--FR
{ Vector(3.02,-6.797,74.45), Angle(0,0,0), "led_lightbar" }, -- 1
{... |
--- === Env ===
---
--- loads environment variables from dotenv-alike files, and overrides `os.getenv`
--- function to first get variables from the `Env` instance, falling back to a
--- vanilla `os.getenv` call if none is set.
---
--- This is mostly useful on MacOS 10.10+, due to the changes on launchctl and
--- its AP... |
object_tangible_collection_flower_19 = object_tangible_collection_shared_flower_19:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_flower_19, "object/tangible/collection/flower_19.iff") |
includeFile("tangible/holiday/empire_day/painting_empire_day_2010_rebel.lua")
includeFile("tangible/holiday/empire_day/imperial_recruitment_poster.lua")
includeFile("tangible/holiday/empire_day/imperial_recruitment_poster_defaced.lua")
includeFile("tangible/holiday/empire_day/rebel_resistance_poster_torn.lua")
includeF... |
--[[
ZLIB binding, providing:
* DEFLATE compression & decompression
* GZIP file compression & decompression
* CRC32 & ADLER32 checksums.
Written by Cosmin Apreutesei. Public Domain.
DEFLATE ----------------------------------------------------------------------
zlib.deflate(read, write[, bufsize][, format][, lev... |
Gamestate = require('./libraries/gamestate')
menu = require('./src/menu')
local background = nil
local cursor
function love.load()
background = love.graphics.newImage('assets/background.jpg')
music = love.audio.newSource('assets/music.mp3')
music:setLooping(true)
music:play()
-- TODO: Change cursor image
cursor... |
local SKIN = {}
SKIN.Background = color(255, 255, 255)
SKIN.PanelBackground = color(240, 240, 240)
SKIN.PanelBorder = color(165, 165, 165)
SKIN.PanelFocused = color(0, 162, 232)
SKIN.FrameBorder = color(100, 100, 100)
SKIN.FrameControlBar = color(225, 225, 225)
SKIN.FrameFocusedControlBar = color(0, 162, 232)
SKIN.... |
local communityRankLayer = require(ViewPath.."hall/community/friend/friendlist/communityRankLayer");
local CommunityRankTypeList = require("hall/community/widget/friend/friendList/communityRankTypeList");
local community_pin_map = require("qnFiles/qnPlist/hall/community_pin")
local NVerticalListView = require("u... |
function lang_switch_keys(lang)
local in_lang = {}
local langs =
{
[1] = {lang_key = "tr", lang_name = "Türkçe", script_name = "Satır Temizleme", sub_menu = "Satır/Temizle"},
[2] = {lang_key = "en", lang_name = "English", script_name = "Strip Lines", sub_menu = "Lines/Strip"}
}
local lang_list = ... |
--[[
Author: ReturnedTrue
Date Created: 17/07/2020
Name: Class
Description: A basic OOP class, can be easily extended upon.
--]]
--// Class definition
local Class = {};
Class.__index = Class;
--// Class constructor
function Class.new(PropertyValue)
local self = setmetatable({}, Class);
self.P... |
local exports = {}
local tap = require('tap')
local fiber = require('fiber')
local response = require('authman.response')
local error = require('authman.error')
local validator = require('authman.validator')
local v = require('test.values')
-- model configuration
local config = validator.config(require('test.config'))... |
local system = {
pathForFile = function(name, folder)
return './' .. name
end,
getTimer = function()
return '1234'
end
}
system.switchPlatform = function(platform)
system.getInfo = function(info)
if (info == 'platformName') then
return platform
elseif (info == 'environment') then
... |
--[[
© CloudSixteen.com do not share, re-distribute or modify
without permission of its author (kurozael@gmail.com).
Clockwork was created by Conna Wiles (also known as kurozael.)
http://cloudsixteen.com/license/clockwork.html
--]]
CW_SWEDISH = Clockwork.lang:GetTable("Swedish");
CW_SWEDISH["WaitTalkInLOOC"] = "... |
---@class binary
local binary = {
}
---@type binary
_G.binary = _G.binary or binary
---@class binary_asset
local binary_asset = {
---@type binary
content = nil
}
---@type binary_asset
_G.binary_asset = _G.binary_asset or binary_asset
|
local rx = require("reactivex")
subject = rx.Subject.create()
subject:subscribe(function(x)
print('observer a ' .. x)
end)
subject:subscribe(function(x)
print('observer b ' .. x)
end)
subject:onNext(1)
subject(2)
subject:onNext(3)
-- This will print:
--
-- observer a 1
-- observer b 1
-- observer a 2
-- observ... |
test = require 'u-test'
common = require 'common'
function GetAchievementsForTitleId_Handler()
print("GetAchievementsForTitleId_Handler")
XblAchievementsGetAchievementsForTitleIdAsync()
end
function OnXblAchievementsGetAchievementsForTitleIdAsync()
XblAchievementsResultGetAchievements()
hr, hasNext = ... |
resource_manifest_version '05cfa83c-a124-4cfa-a768-c24a5811d8f9'
client_scripts {
'config.lua',
'client.lua',
'functions.lua'
}
server_scripts {
'@mysql-async/lib/MySQL.lua',
'config.lua',
'server.lua'
}
client_script "@Anticheat/acloader.lua" |
natives["java.lang.Throwable"] = natives["java.lang.Throwable"] or {}
natives["java.lang.Throwable"]["fillInStackTrace()Ljava/lang/Throwable;"] = function(this)
local stackTrace = newArray(getArrayClass("[Ljava.lang.StackTraceElement;"), 0)
local lStackTrace = getStackTrace()
stackTrace[4] = #lStackTrace -... |
-- implementation of freeform note layout based on list of trigger areas
local l = require('lume')
local hexgrid = require('hexgrid')
local freeform = {}
freeform.__index = freeform
freeform.editing = false
freeform.selected = 1
function freeform.new(triggers)
local self = setmetatable(
{layout= triggers,
... |
-- Copyright (c) 2021 Trevor Redfern
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
local types = require "game.ui.camera.actions.types"
return function(width, height)
return {
type = types.camera_set_dimensions,
payload = {
width = width,
... |
-- Insert-mode tests.
local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local expect = helpers.expect
local command = helpers.command
local eq = helpers.eq
local eval = helpers.eval
describe('insert-mode', function()
before_each(fu... |
tools = require 'tools'
return function (t)
print(tools.tstring(t))
end |
local print = print
local ipairs = ipairs
local table = table
local math = math
local mouse = mouse -- luacheck: no global
local awful = require "awful"
local gears = require "gears"
local minilog = require "awesome-leader.lua-minilog"
local logger = minilog.logger('off')
local leader = {timeout = 4}
local hotkeys_p... |
return function()
local Signal = require(script.Parent.Signal)
describe("new", function()
it("should create a new Signal", function()
local sig = Signal.new()
expect(sig._callbacks).to.be.a("table")
expect(next(sig._callbacks)).to.equal(nil)
expect(sig._disconnected).to.be.a("table")
expect(next(si... |
--[[
Licensed according to the included 'LICENSE' document
Author: Thomas Harning Jr <harningt@gmail.com>
]]
local lpeg = require("lpeg")
local util = require("json.decode.util")
local jsonutil = require("json.util")
local table_maxn = require("table").maxn
local unpack = unpack
module("json.decode.array")
-- Ut... |
local sql = require("sqlite3")
local conn = sql.open("bot.db")
local options = require("options")
print("Creating database...")
conn:exec([[
CREATE TABLE IF NOT EXISTS guild_settings (
guild_id TEXT PRIMARY KEY,
prefix TEXT,
mass_ping_cooldown REAL,
delete_command_messages BOOLEAN DEFAULT 0 NOT NULL CHEC... |
local srv = srv
local dat = dat
local log = log
local env = {}
env._load_hash = {}
env._load_func = function(name)
local f = env._load_hash[name]
if f then
return f
end
local filename, err = package.searchpath(name, package.path)
if filename == nil then
error(err)
end
local... |
local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen')
local assert_visible = helpers.assert_visible
local assert_alive = helpers.assert_alive
local dedent = helpers.dedent
local eq = helpers.eq
local neq = helpers.neq
local eval = helpers.eval
local feed = h... |
------------------------------------------------------------------------
-- Copyright (c) 2019-2021 Daniele Bochicchio
-- License: MIT License
-- Source Code: https://github.com/dbochicchio/Vera-VirtualDevices
------------------------------------------------------------------------
module("L_VirtualSceneController1", ... |
local PLUGIN = PLUGIN
if (CLIENT) then
SWEP.PrintName = "열쇠 꾸러미"
SWEP.Slot = 1
SWEP.SlotPos = 2
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = false
end
SWEP.Author = "Chessnut"
SWEP.Instructions = "왼쪽 클릭: 문 잠그기\n오른쪽 클릭: 문 잠금 해제"
SWEP.Purpose = "당신이 소유한 문에 사용되는 열쇠들입니다."
SWEP.Drop = false
SWEP.ViewModelFOV = 45
SWEP... |
include("shared.lua")
AddCSLuaFile("shared.lua")
function ENT:PhysicsUpdate(ph)
self:base("wac_hc_base").PhysicsUpdate(self,ph)
if self.rotorRpm > 0.6 and self.rotorRpm < 0.79 and IsValid(self.TopRotorModel) then
self.TopRotorModel:SetBodygroup(1,1)
elseif self.rotorRpm > 0.8 and IsValid(self.TopRotorMod... |
-- https://github.com/dot123
-- 事件通知管理器
EventMgr = BaseClass("EventMgr")
-- 初始化
function EventMgr:init()
self.listeners = {}
end
-- 切换账号
function EventMgr:onReload()
end
function EventMgr:addEventListener(type, listener, cls)
if not type or not listener then
return
end
local list = self.li... |
sludge_panther = Creature:new {
objectName = "@mob/creature_names:sludge_panther",
socialGroup = "panther",
faction = "",
level = 16,
chanceHit = 0.31,
damageMin = 170,
damageMax = 180,
baseXp = 1102,
baseHAM = 2900,
baseHAMmax = 3500,
armor = 0,
resists = {115,5,5,-1,-1,-1,-1,-1,-1},
meatType = "meat_carn... |
local ci = require_host("1.0")
local git_executable = ci:find("find-git", "1.0")
local execute = ci:find("exec", "1.0")
local logger = ci:require("logger", "1.0")
return ci:implement_package(
"git", "1.0", --interface
"git-exe", "1.0", --implementation
function (version)
local git = {}
function git:clone(from, ... |
--- API for managing clipboards
-- @author David Delassus <david.jose.delassus@gmail.com>
module ("cream.clipboard")
--- Create a new clipboard
-- @param name Clipboard's ATOM name, usually it is <code>PRIMARY</code>, but it can also be <code>CLIPBOARD</code>.
-- @return A new clipboard
-- @class function
-- @n... |
--[[
Represent global gunction defined like
function somename.bla.bla:bla(args)
Layout ("--" means empty line):
--
function <dotted_name><colon_name><params>
<body>
end
--
]]
return
function(self, node)
local printer = self.printer
printer:request_empty_line()
printer:ad... |
trusts = {['name'] = 'Trusts',['menu'] = 'trusts',
['m3g1'] = 'lock yush reset;',
['m3g3'] = 'lock yush back;',
['m3g4'] = t_healers,
['m3g5'] = t_support,
['m3g6'] = t_tanks,
['m3g7'] = t_nukers,
['m3g8'] = t_midranged,
['m3g9'] = t_heavy,
['m3g10'] = 'Moogle',
['m3g13'] = 'Cherukiki'... |
--- String Array Metatable
-- For working with string arrays without duplicate values
-- @classmod string_array
local M = {
_module = 'string-array-class'
}
local Is = require('stdlib/utils/is')
--- Does this array contain name.
-- @tparam string name The string to find.
-- @treturn boolean string is in array
fu... |
if settings.startup["enable-tuonelatweaks"] and settings.startup["enable-tuonelatweaks"].value == true then
if not tuonela then tuonela = {} end
if settings.startup["enable-tanks_for_bob"] and settings.startup["enable-tanks_for_bob"].value == true then
require("prototypes.steel-wall")
require('prototypes/tuonelaa... |
vim.opt_local.wrap = true
vim.opt_local.spell = true
vim.opt_local.spelllang = "en_us"
|
static_mage = {
cast = function(player, target)
local duration = 15000
local magicCost = 20
if (not player:canCast(1, 1, 0)) then
return
end
if (player.magic < magicCost) then
player:sendMinitext("Not enough mana.")
return
end
if (target.state == 1) then
player:sendMinitext("That is no lon... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.