content stringlengths 5 1.05M |
|---|
part_functions = {}
---built
---@param entity LuaEntity The part-entity, that is built
function part_functions.built(entity)
--create new Part Object from Part Entity
--This will also create/merge the underlying balancer object
local part = part_functions.get_or_create(entity)
end
---creates new Part from... |
local S = factory.S
minetest.register_alias("factory:compressor", "factory:ind_squeezer")
function factory.ind_squeezer_active(percent, item_percent)
local formspec =
"size[8,8.5]"..
factory_gui_bg..
factory_gui_bg_img..
factory_gui_slots..
"list[current_name;src;2.75,0.5;1,1;]"..
"list[current_nam... |
local skynet = require "skynet"
local max_client = 10240
skynet.start(function()
skynet.error("Server start")
skynet.newservice("console")
skynet.newservice("debug_console", 8000)
local watchdog = skynet.uniqueservice("watchdog")
skynet.call(watchdog, "lua", "start", {
port = 5000,
... |
require "dateformat";
-- df - local winter time (without DLS)
local function isSummerTimeAmerica(df)
if df.month < 3 or df.month > 11 then return false end
if df.month > 3 and df.month < 11 then return true end
local previousSunday = df.day - df.dayOfWeek;
if df.month == 3 then
if previousSunday >= 7 and prev... |
local util = require("vim.lsp.util")
local M = {}
-- Caches all retrieved snippets information per filetype
local snippets_for_ft = {}
function M.load_snippets(expandable_only)
if expandable_only then
-- Do not cache snippets since the set of expandable
-- snippets can change on every keystroke.
return... |
-- This is a part of program for monitoring of player visiting
-- Required HoverHelm platform
-- https://computercraft.ru/topic/3771-hoverhelm-operatsionnaya-sistema-dlya-dronov-mikrokontrollerov-i-drugih-ustroystv-bez-sobstvennogo-zhestkogo-diska/
--configuration
local sleepTime = 1 --seconds scanning interval
local... |
-- The following regression test expects regress_c60Dir to be a global
-- variable that contains a valid path to the c60 dataset.
-- This regression test is currently broken (provenance has been disabled)
-- @todo Need a way of testing to see if the provenance system is enabled.
-- Hack to terminate early
if t... |
function onCreate()
-- background shit
--makeLuaSprite('ThebackgroundChaos', 'backgroundChaos',0,200)
makeLuaSprite('TheForeground', 'foregroundChaos',-515,-150)
--addLuaSprite ('ThebackgroundChaos',false)
addLuaSprite ('TheForeground',false)
close(true); --For performance reasons, close this script once the stag... |
local ffi = require "ffi"
-- Control optimisation attempts.
-- Don't use lots of short-term locks - use great long ones, reducing the overall locks-per-second
VCHI_COARSE_LOCKING = false
-- Avoid lock then unlock on exit from blocking queue operations (msg tx, bulk rx/tx)
-- (only relevant if VCHI_COARSE_LOCKING)... |
return function()
filter {}
links 'CitiCore'
add_dependencies { 'vendor:eastl' }
end
|
local env = require 'argcheck.env' -- retrieve argcheck environement
env.istype = function(obj, typename)
local thtype = torch.type(obj)
if (typename == "table|torch.*Tensor") then
return thtype == "table" or
env.istype(obj, "torch.*Tensor")
end
-- From the original argcheck env
local thname = torch.typenam... |
----------------------------------------------------------------------------------------------------
-- localized English (database module) strings
--
--get the add-on engine
local AddOnName = ...;
--prepare locale
local L = LibStub("AceLocale-3.0"):NewLocale(AddOnName, "enUS", true);
if not L then return; end
--dat... |
local success, err = pcall(require, 'discordia')
assert(success, 'Toast requires Discordia to function\n' .. tostring(err))
return {
util = require 'util',
package = require './package',
Embed = require './structures/Embed',
Array = require './structures/Array',
Client = require './structures/Clien... |
slot0 = class("MilitaryExerciseMediator", import("..base.ContextMediator"))
slot0.OPEN_RANK = "MilitaryExerciseMediator:OPEN_RANK"
slot0.OPEN_SHOP = "MilitaryExerciseMediator:OPEN_SHOP"
slot0.OPEN_DOCKYARD = "MilitaryExerciseMediator:OPEN_DOCKYARD"
slot0.REPLACE_RIVALS = "MilitaryExerciseMediator:REPLACE_RIVALS"
slot0.... |
-- nordfox, dayfox, dawnfox, duskfox
local colorscheme = "duskfox"
require("nightfox").load(colorscheme)
local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
if not status_ok then
vim.notify("colorscheme " .. colorscheme .. " not found!")
return
end
vim.g.airline_theme = colorscheme
require("lualin... |
-- 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
]]
--------------------------------------------------------------------------------
hoodwink_sharpsho... |
ENT.Base = "bw_base_drink"
ENT.HealAmount = 20
ENT.Random = false
ENT.Model = "models/props_junk/PopCan01a.mdl"
if SERVER then
AddCSLuaFile()
function ENT:Init()
if self.Random then
self:SetSkin(math.random(0, 2))
end
end
end
|
local super = require("Framework.display.InterActiveObject")
---@class Framework.UI.Button:Framework.display.InterActiveObject
Button = class("Framework.UI.Button", super)
return Button |
object_draft_schematic_furniture_furniture_beast_storage = object_draft_schematic_furniture_shared_furniture_beast_storage:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_furniture_furniture_beast_storage, "object/draft_schematic/furniture/furniture_beast_storage.iff")
|
--[[
Copyright (C) 2006-2007 Nymbia
Copyright (C) 2010-2017 Hendrik "Nevcairiel" Leppkes < h.leppkes@gmail.com >
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, ... |
--statget.lua
local loaded = false
local statget = {}
statget.MHP = function(self)
local monHPCount = TryGetProp(self, "HPCount", 0);
if monHPCount > 0 then
return monHPCount--math.floor(monHPCount);
end
local fixedMHP = TryGetProp(self, "FIXMHP_BM", 0);
if fixedMHP > 0 then
r... |
local shit =game.Players.yellowmellow199
shit.bin.LevelChange.Value = true
shit.leaderstat.LAye.Value = 4998 |
--[[
KahLua Kore - core library functions for KahLua addons.
WWW: http://kahluamod.com/kore
Git: https://github.com/kahluamods/kore
IRC: #KahLua on irc.freenode.net
E-mail: cruciformer@gmail.com
Please refer to the file LICENSE.txt for the Apache License, Version 2.0.
Copyright 2008-2018 J... |
local upstream = require "dlb.handler.upstream"
upstream.start()
|
local Angle0To360 = require("piemenu.core.angle_with_offset").Angle0To360
local M = {}
local AngleDistance = {}
M.AngleDistance = AngleDistance
function AngleDistance.new(angle, angle_next)
local d = Angle0To360.new(angle_next) - Angle0To360.new(angle)
if d <= 0 then
return d + 360
end
return d
end
retu... |
include("shared.lua")
--Include other files
include("round_controller/cl_round_controller.lua")
include("lobby_manager/cl_lobby.lua")
function GM:SpawnMenuOpen()
return true
end
|
return function()
local utils = require('utils');
utils.all(255,255,255, 11);
end |
LinkLuaModifier("modifier_sniper_assassinate_target", "global_modifiers.lua", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_assassinate_caster_crit", "global_modifiers.lua", LUA_MODIFIER_MOTION_NONE)
function AssassinateAcquireTargets(keys)
keys.ability.tTargets = keys.target_entities
keys.ability:ApplyDataDri... |
-- Loads an index containing entity -> frequency pairs.
-- TODO: rewrite this file in a simpler way (is complicated because of some past experiments).
tds = tds or require 'tds'
print('==> Loading entity freq map')
local ent_freq_file = opt.root_data_dir .. 'generated/ent_wiki_freq.txt'
min_freq = 1
e_freq = tds.... |
Ship = Ship or {}
local stateUnknown = "unknown"
local stateWayToAsteroid = "asteroid"
local stateMining = "mining"
local stateWayHome = "home"
local stateUnloading = "unloading"
-- find a random mineable object in a certain vicinity
local function filterRandomObject(station, filterFunction, radius)
local x, y = ... |
--[[
Copyright (C) 2019 Onset Roleplay
Developers:
* Bork
* Logic_
Contributors:
* Blue Mountains GmbH
]]--
-- Variables
local colour = ImportPackage('colours')
SpeedcamData = {}
MAX_SPEEDCAMS = 128
SPEEDCAM_RANGE = 1000
-- Functions
local function CreateSpeedcamData(speedcam)
SpeedcamData[speedcam] = {}
-- ... |
--[[
* main.lua
*
]]
local wx = require("wx")
local hsl = require("lib.hsl")
local rybclr = require("lib.RYBColours")
local Canvas = require("lib.canvas")
local Pyramid = require("lib.pyramid")
local Palette = require("lib.palette")
local Ribbon = require("lib.ribbon")
local Sketch = require("lib.sketc... |
local ffi = require("ffi")
local libc = require("lj2procfs.libc")
local sutil = require("lj2procfs.string-util")
function hidden_file_allow_backup(filename)
if not filename then return false end
return
sutil.startswith(filename, '.') or
filename == "lost+found" or
filename == "aquota.... |
--[[---------------------------------------------------------
Super Cooking Panic for Garry's Mod
by Xperidia (2020)
-----------------------------------------------------------]]
local fonts = {
clock = {
font = "Verdana",
size = 60,
antialias = false,
shadow = true,
},
big_text = {
font = "Verdana"... |
--[[by KGHX 2019.01]]--
module("luci.controller.n2n", package.seeall)
function index()
if not nixio.fs.access("/etc/config/n2n") then
return
end
entry({"admin", "services", "n2n"}, cbi("n2n"), _("N2N VPN")).dependent = true
end
|
local utils = {}
---toggle vim options
---@param name string
---@param values table
---@param opts table
utils.toggle_options = function(name, values, opts)
opts = vim.tbl_extend('force', { silent = false }, opts or {})
values = values or vim.api.nvim_get_option_info(name).type == 'boolean' and { true, false }
l... |
/*
* Torrent - 2013 Illuminati Productions
*
* This product is 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 ... |
SCREEN_WIDTH, SCREEN_HEIGHT = 800, 600
local fakeFont = function(name, size)
return {
getWidth = function(self, text) return #text * size end,
getHeight = function(self, text) return size end,
}
end
-- define fake love functions
love = {
graphics = {
getWidth = function() return SCREEN_WIDTH end,
... |
---
---
-- Selector Condition configuration information dao
-- Copyright (c) GoGo Easy Team & Jacobs Lei
-- Author: Jacobs Lei
-- Date: 2018/4/3
-- Time: 下午6:41
local xpcall = xpcall
local dynamicd_build = require("core.dao.dynamicd_build_sql")
local utils = require("core.utils.utils")
local user_log = require("core.l... |
print('Okay. We loaded sidebar now')
|
local test = require "test"
a = test.test("hello world!")
print(a) |
_Warehouses = {
{
name = _U('police_impound'),
menu = vector3(834.88, -1290.02, 28.23),
spawn = {
{ x = 818.21, y = -1334.90, z = 26.10 , h = 180.00},
{ x = 818.4, y = -1341.69, z = 25.94 , h = 181.12},
{ x = 817.86, y = -1348.95, z = 25.57 , h = 1... |
-- This file is used to track and simplify dealing with all enumerations
-- currently implemented in packets
enumerations = {}
enumerations.ai = { CANCEL = 0, ACTIVATE = 1, COMBAT = 2, ESCORT = 3, FOLLOW = 4, TRAVEL = 5, WANDER = 6 }
enumerations.aiPrintableAction = { CANCEL = "cancelling current AI", ACTIVATE = "acti... |
------------------------------------------------------------------------
----- Script by CookieNoob and KeyBlue (modified by svenni_badbwoi)-----
------------------------------------------------------------------------
local UIUtil = import('/lua/ui/uiutil.lua')
local LayoutHelpers = import('/lua/maui/layouthelpers.l... |
local awful = require("awful")
local gears = require("gears")
root.buttons(gears.table.join(
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev)
))
|
local linkColors = {
["9d9d9d"] = 0, [0] = "9d9d9d",
["ffffff"] = 1, [1] = "ffffff",
["1eff00"] = 2, [2] = "1eff00",
["0070dd"] = 3, [3] = "0070dd",
["a335ee"] = 4, [4] = "a335ee",
["ff8000"] = 5, [5] = "ff8000",
["e5cc80"] = 6, [6] = "e5cc80"
}
local revisedDictionary = {
["10 "] = {
{ "10 Pound Mud Snapper", 6292... |
local function roomsCmd(source)
local rooms = getRooms()
for i, room in ipairs(rooms) do
local id = getElementID(room)
local roomPlayers = getRoomPlayers(room)
outputChatBox(i..". "..id.." - "..#roomPlayers.." players", source)
end
end
local function roomCmd(source, cmd, roomId)
if(not roomId) then... |
function start (song)
end
function update (elapsed)
local currentBeat = (songPos / 1000)*(bpm/60)
hudX = getHudX()
hudY = getHudY()
if sway then
camHudAngle = 5 * math.sin(currentBeat * 0.504)
end
if quickdraw then
for i=0,7 do
setActorX(_G['defaultStrum'..i..'X'] + 32 * math.sin((c... |
local BasePlugin = require "kong.plugins.base_plugin"
local access = require "kong.plugins.tori.access"
local ToriHandler = BasePlugin:extend()
function ToriHandler:new()
ToriHandler.super.new(self, "tori")
end
-- Execute before request is being proxy
-- We check for cookie here
function ToriHandler:access(config)... |
local tbTable = GameMain:GetMod("_ModifierScript")
local tbModifier = tbTable:GetModifier("ZSZY")
function tbModifier:Enter(modifier, npc)
end
function tbModifier:Step(modifier, npc, dt)
self.durations = self.durations or {}
npc.JobEngine:InterruptJob("只手镇压", false)
end
function tbModifier:UpdateStack(mo... |
function cfile(e)
local hdrs = {}
for _, src in ipairs(e.ins) do
local f = src:gsub("[^/]*$", "")
if f == "" then
f = "."
end
hdrs[#hdrs+1] = "-I"..f
end
local cflags = e.cflags or ""
rule {
ins = e.ins,
outs = e.outs,
cmd = "$CC $CFLAGS "..cflags.." "..joined(hdrs).." -c -o &1 @1"
}
end
functi... |
--------------------------------
-- @module TMXLayer
-- @extend SpriteBatchNode
--------------------------------
-- @function [parent=#TMXLayer] getTileGIDAt
-- @param self
-- @param #vec2_table vec2
-- @param #cc.TMXTileFlags_ tmxtileflags_
-- @return unsigned int#unsigned int ret (return value: unsigned int)
... |
local Map = require("api.Map")
local Chara = require("api.Chara")
local IItem = require("api.item.IItem")
local IMapObject = require("api.IMapObject")
local Effect = require("mod.elona.api.Effect")
local Input = require("api.Input")
local Gui = require("api.Gui")
local Pos = require("api.Pos")
local Action = require("a... |
--[[
The enriched uranium rod driven EU generator.
A very large and advanced machine providing vast amounts of power.
Very efficient but also expensive to run as it needs uranium.
Provides 10000 HV EUs for one week (only counted when loaded).
The nuclear reactor core requires a casing of water and a protective
shield... |
--[[
Rewrite the state machine of Listing 4.2 without using goto.
]]
--[[
Kind of an interesting idea, but it muddles up moves with the enter signal. This exposes "enter" as a possible move which is less than desirable. Meh.
]]
local function states_as_tables()
local function enter(state)
state["enter"]()
en... |
local x, y = f()
if not y then
x, y = a, b
end
print(x, y)
|
require "fate-functions"
DifferentLoots = {
-- Military
{weight = 1, stacks = {{name="submachine-gun", count=1},{name="piercing-rounds-magazine", count=50}}},
{weight = 0.5, stacks = {{name="combat-shotgun", count=1},{name="shotgun-shell", count=100}}},
{weight = 0.1, stacks = {{name="rocket-launcher", count=1},... |
-- supporting testfile; belongs to 'cl_spec.lua'
local setup = require 'busted'.setup
local teardown = require 'busted'.teardown
local before_each = require 'busted'.before_each
local after_each = require 'busted'.after_each
local subscribe = require 'busted'.subscribe
local assert = require 'busted'.assert
local cli ... |
local Class = require "libs.hump.class"
local sti = require "libs.sti.sti"
local jugador = require "entidades.jugador"
local juego ={}
function juego:init()
end
function juego:enter()
self.gameobject={}
self.gameobject.jugadores={}
self.gameobject.enemigos={}
self.gameobject.balas={}
self.sprites_todos = req... |
--- Component to block input on specify zone by node
-- @module druid.blocker
--- Component events
-- @table Events
-- @tfield druid_event on_click On release button callback
-- @tfield druid_event on_enable_change On enable/disable callback
--- Component fields
-- @table Fields
-- @tfield node node Trigger node
loc... |
Switch = class("Switch");
function Switch:init()
self.a = false;
local ccc = getmetatable(self);
ccc.__unm = function(slf)
return slf.a
end
setmetatable(self, ccc);
end
function Switch:switch()
self.a = not self.a;
end |
local Skin = { }
Skin.Base = "Wand"
Skin.Description = [[
Generic Description
]]
Skin.ViewModel = Model("models/hpwrewrite/custom/c_liodarkwand.mdl")
Skin.WorldModel = Model("models/hpwrewrite/custom/w_liodarkwand.mdl")
Skin.NodeOffset = Vector(1416, -165, 0)
Skin.HoldType = "pistol"
HpwRewrite:AddSkin("Lio Dark ... |
return
{
HOOK_EXPLODING =
{
CalledWhen = "An explosion is about to be processed",
DefaultFnName = "OnExploding", -- also used as pagename
Desc = [[
This hook is called before an explosion has been processed in a world.</p>
<p>
See also {{OnExploded|HOOK_EXPLODED}} for a similar hook called after the e... |
mobs_created = 0
_mob = _{
new = function(this,args)
mobs_created = mobs_created + 1
this.id = mobs_created
merge(this, {
health = 1,
x = 1,
y = 1,
offset_x = 1,
offset_y = 1,
sprite = 1,
path = {},
marked = {},
search = {}
})
merge(this,args)
... |
local E, L, V, P, G = unpack(select(2, ...)); --Inport: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local A = E:GetModule('Auras');
local LSM = LibStub("LibSharedMedia-3.0")
--Cache global variables
--Lua functions
local _G = _G
local GetTime = GetTime
local unpack = unpack
local twipe = table.wipe
local format = ... |
--proc/system/rpc: RPC types
--Written by Cosmin Apreutesei. Public Domain.
setfenv(1, require'winapi')
rpc = ffi.load'Rpcrt4'
ffi.cdef[[
typedef long RPC_STATUS;
typedef unsigned short* RPC_WSTR;
RPC_STATUS RpcStringFreeW(RPC_WSTR* String);
]]
|
-- projectiles don't trigger onClientColShapeHit, so we're using dummy objects
local PROJECTILE_DUMMY_OBJECT_MODEL = 2709
-- projectileDummies[<dummy:object>] = <projectile>
local projectileDummies = {}
local function safelyDetonateProjectile(projectile)
assertArgumentType(projectile, "projectile")
setElemen... |
--- Functions for command-line scripts.
local cmd = {}
local unpack = unpack or table.unpack
local loader = require("luarocks.loader")
local util = require("luarocks.util")
local path = require("luarocks.path")
local deps = require("luarocks.deps")
local cfg = require("luarocks.core.cfg")
local dir = require("luaroc... |
--------------------------------
-- Joint Communication Module
-- (c) 2013 Stephen McGill
--------------------------------
local Config = Config or require'Config'
assert(Config, 'DCM requires a config, since it defines joints!')
local nJoint = Config.nJoint
local memory = require'memory'
local vector = require'vector'... |
local runTests = require(script.Parent.runTests)
local connections = {}
local Watcher = {}
function Watcher.addInstance(instance)
if connections[instance] then
return
end
local sourceConnection, childAddedConnection, removedConnection
if instance:IsA("LuaSourceContainer") then
local... |
--[[
# Element: Raid Role Indicator
Handles the visibility and updating of an indicator based on the unit's raid assignment (main tank or main assist).
## Widget
RaidRoleIndicator - A `Texture` representing the unit's raid assignment.
## Notes
This element updates by changing the texture.
## Examples... |
-- Generates option-picker functions from relative probabilities
-- @author Validark
math.randomseed(tick())
return {
new = function(MyOptions, MyRelativeWeights)
local Options = {}
local RelativeWeights = {}
local n = #MyOptions
if n == 0 then
error("[WeightedProbabilityFunction] must supply at least on... |
/******************************************************************************\
Wire link support
\******************************************************************************/
local floor = math.floor
local Clamp = math.Clamp
registerCallback("construct", function(self)
self.triggercache = {}
end)
registerCal... |
-- 竞技场内姓名版编号 --
local U=UnitIsUnit hooksecurefunc("CompactUnitFrame_UpdateName",function(F)if IsActiveBattlefieldArena()and F.unit:find("nameplate")then for i=1,5 do if U( F.unit ,"arena"..i)then F.name:SetText(i)F.name:SetTextColor(1,1,0)break end end end end) |
TOOL.Category = "Green Code"
TOOL.Name = "Territory"
TOOL.Command = nil
TOOL.ConfigName = ""
if CLIENT then
language.Add( "Tool.territory.name", "Territory marking" );
language.Add( "Tool.territory.desc", "Left click to add mark on cross / Right click to add mark on self position." );
language.Add( "To... |
local RUF = RUF or LibStub('AceAddon-3.0'):GetAddon('RUF')
local LSM = LibStub('LibSharedMedia-3.0')
local _, ns = ...
local oUF = ns.oUF
local elementName = 'InCombat'
local elementString = RUF.IndicatorGlyphs['InCombat']
local function Update(self, event)
local element = self.InCombatIndicator
element.Enabled = RU... |
--#ENDPOINT GET /device/data
-- Description: Get timeseries data for specific device
-- Parameters: ?identifier=<uniqueidentifier>&window=<number>
local identifier = tostring(request.parameters.identifier) -- ?identifier=<uniqueidentifier>
local window = tostring(request.parameters.window) -- in minutes,if ?window=<num... |
local MAJOR_VERSION = "LibEpgpOorProfile-1.0"
local MINOR_VERSION = 10000
local lib, oldMinor = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
if not lib then return end
function lib:GetBossKillEp()
local ep = {}
ep[663] = 1 -- MC 1
ep[664] = 1 -- MC 2
ep[665] = 1 -- MC 3
ep[666] = 1 -- MC 4
ep[... |
local mt = {}
mt.__type = "NumberRange"
function mt:__tostring()
return string.format("[%g, %g]", self.Min, self.Max)
end
function mt:__eq(other)
return self.Min == other.Min and self.Max == other.Max
end
function mt:__index(index)
error(string.format("%s is not a valid member of NumberRange", tostring(i... |
blxextdoiapi = blxextdoiapi or {}
local blxextdoiapi_module = {
name = "blxextdoiapi",
version = "v0.8c",
date = "2019/11/30",
description = "Obtain open access information from DOI via unpaywall.org",
author = "Moritz Wemheuer",
license = "LPPL v1.3c",
url ... |
local redis = require "resty.redis"
local red = redis:new()
red:set_timeout(1000) -- 1 sec
local ok, err = red:connect("127.0.0.1", 6379)
if not ok then
ngx.say("failed to connect: ", err)
return --不管是什么错误要习惯性的返回,为了防止将错误的信息放入连接池;
end
-- auth
local count
count, err = red:get_reused_times()
if 0 == count then
... |
local skynet = require "skynet"
require "skynet.manager"
local log = require "chestnut.skynet.log"
skynet.start(function()
skynet.uniqueservice("protoloader")
-- local console = skynet.newservice("console")
-- skynet.newservice("debug_console",8000)
local codweb = skynet.uniqueservice("codweb")
local ok = skyn... |
local Geometry = wickerrequire "math.geometry"
local Lambda = wickerrequire "paradigms.functional"
local Pred = wickerrequire "lib.predicates"
local bidimensional_rng = Lambda.CartesianProduct(math.random, math.random)
local SearchSpace = Class(function(self, object, maxtries)
self.object = object
if Pred.IsCurv... |
--做一个node的壳 统一把用node的class改了
--如果有发现没有加的方法 出错了 就自己加上
local ShellNode = class2("ShellNode")
function ShellNode:ctor(view)
self.view = view
end
function ShellNode:addChild(c,z)
return self.view:addChild(c,z or 0)
end
function ShellNode:setPosition(x,y)
return self.view:setPosition(x,y)
end
function She... |
mosrassen_conversationtemplate = ConvoTemplate:new {
initialScreen = "mosrassen_initial",
templateType = "Lua",
luaClassHandler = "mosrassen_racetrack_convo_handler",
screens = {}
}
mosrassen_initial = ConvoScreen:new {
id = "mosrassen_initial",
leftDialog = "@conversation/racing_mos_rassen:s_55824ba",
stopConv... |
-- t4b/init.lua
t4b = {}
function t4b.count(tab)
local count = 0
for _ in pairs(tab) do
count = count + 1
end
return count
end
|
local patengi = require("patengi")
local db_names =
{
sqlite3 = "test.db",
pgsql = "dbname=test user=postgres",
}
describe("Database tests", function()
local db_name = db_names[os.getenv("DB") or "sqlite3"]
it("should create a database", function()
assert.has_no.errors(function() patengi.open(db_name) ... |
local harpoon = require('harpoon')
local telescope = require('telescope.builtin')
local popup = require('popup')
local log = require('harpoon.dev').log
local tree = require('harpoon-finder.tree')
local config = require('harpoon-finder').get_finder_config()
local M = {}
Harpoon_win_id = nil
Harpoon_bufh = nil
local f... |
-- Written By Kip Turner, Copyright Roblox 2014
local newClickToMove = script:FindFirstChild("NewClickToMove")
if newClickToMove then
local newClickToMoveFlagSuccess, newClickToMoveFlagEnabled = pcall(function()
return UserSettings():IsUserFeatureEnabled("UserUseNewClickToMove")
end)
local useNewClickToMove = new... |
local wibox = require('wibox')
local gears = require('gears')
local beautiful = require("beautiful")
local PATH = require('path')
local utils = require("../utils")
-- local CMD = [[stat -f / --format "%b %a %s"]]
local cpu = '/sys/devices/system/cpu/cpu0/cpufreq'
local cur_freq_file = PATH.join(cpu, 'scaling_cur_freq'... |
--[[
sv_unstuck_func.lua
--]]
// The queue of players to unstuck
Unstuck.ToUnstuck = {}
--[[------------------------------------------------
Name: Unstuck.Queue()
Desc: Queue a player to be unstuck.
--]]------------------------------------------------
function Unstuck.Queue( ply )
// Return if the... |
-- values must be set from 0 to 1
local ratio = FadeOutRatio --screen width ratio
local ani = FadeOutTween --animation time
return Def.Quad{
OffCommand=function(self)
if GAMESTATE:GetNumSidesJoined() == 2 then
GAMESTATE:SetCurrentStyle("versus");
end;
setenv("routine_switch","on");
end;
Def.... |
object_mobile_smuggler_fence_yaron = object_mobile_shared_smuggler_fence_yaron:new {
}
ObjectTemplates:addTemplate(object_mobile_smuggler_fence_yaron, "object/mobile/smuggler_fence_yaron.iff")
|
require "app.game.init"
local function _print(...)
print(...)
skynet.error(...)
end
game = game or {}
function game.init()
skynet.register(".game")
-- encode时将稀疏数组编码成object,空表编码成[]
cjson.encode_sparse_array(true)
cjson.encode_empty_table_as_object(false)
logger.init()
gg.init()
--... |
Siroria = Siroria or { }
local Siroria = Siroria
function Siroria.setupMenu()
local LAM = LibStub("LibAddonMenu-2.0")
local panelData = {
type = "panel",
name = Siroria.name,
displayName = "|cff5938S|riroria",
author = "Wheels",
version = ""..Siroria.version,
--registerForRefresh = true
}
LAM:Registe... |
local redis = require "linxsh.redis.redis"
local redis_client = {}
function redis_client.getRedis()
local red = redis:new()
if context.config.redis.password~= nil then
local ok, err = red:auth(context.config.redis.password)
if not ok then
return nil
end
end
return red
end
return redis_client |
sinastra_dragon_swarm_speed_modifier = class({})
function sinastra_dragon_swarm_speed_modifier:OnCreated( kv )
end
function sinastra_dragon_swarm_speed_modifier:DeclareFunctions()
local funcs = {
MODIFIER_PROPERTY_MOVESPEED_ABSOLUTE,
}
return funcs
end
function sinastra_dragon_swarm_speed_modifier:GetModifierM... |
require "scripts/constants"
require "scripts/textures"
function block_create() --{{{2
bl = {
x = 500,
y = 0,
w = blockw,
h = blockw,
sprite = love.graphics.newImage("assets/stone.png"), --200 × 200
bg = sand1,
scale_x = 1/3,
scale_y = 1/3,
}
bl.scale_x = blockw / bl.sprite:getWi... |
ITEM.name = "Длинный стальной меч"
ITEM.desc = "Качественная сталь и хорошая заточка позволяют эффективно использовать его в бою."
ITEM.class = "nut_long_steel"
ITEM.weaponCategory = "primary"
ITEM.price = 550
ITEM.category = "Оружие"
ITEM.model = "models/morrowind/steel/longsword/w_steel_longsword.mdl"
ITEM.width = 5
... |
local helpers = require("null-ls.helpers")
local methods = require("null-ls.methods")
local prettier_eslint = helpers.make_builtin {
method = {
methods.internal.FORMATTING,
methods.internal.RANGE_FORMATTING,
},
filetypes = {
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.