content stringlengths 5 1.05M |
|---|
local ViewBase = require("games/common2/module/viewBase");
require("games/common2/onlooker/data/onlookerRecordData");
local OnlookerMyBarrageView = class(ViewBase,false);
OnlookerMyBarrageView.s_controls = {
infoView = ToolKit.getIndex();
infoLine1 = ToolKit.getIndex();
infoLine2 = ToolKit.getIndex();
};
... |
local saga = require("lspsaga")
saga.init_lsp_saga({})
|
object_mobile_dressed_meatlump_male_02 = object_mobile_shared_dressed_meatlump_male_02:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_meatlump_male_02, "object/mobile/dressed_meatlump_male_02.iff")
|
-- rfsm fsm json encoding
--
-- (C) 2010-2013 Markus Klotzbuecher <markus.klotzbuecher@mech.kuleuven.be>
-- (C) 2014-2020 Markus Klotzbuecher <mk@mkio.de>
--
-- SPDX-License-Identifier: BSD-3-Clause
local rfsm = require "rfsm"
local rfsm_marsh = require "rfsm_marsh"
local json = require "json"
local utils = require "u... |
function Diff2Cl(d,A)
CD = GameColor.Difficulty[d];
return { CD[1], CD[2], CD[3], CD[4]*A }
end;
local LP={0,0};
local DP={0,0};
local t = Def.ActorFrame{
OnCommand=cmd(y,-10);
};
t[#t+1] = Def.Quad{
InitCommand=cmd(CenterX;y,35.5;zoomx,SCREEN_RIGHT;zoomy,(1/6)*SCREEN_BOTTOM;diffusealpha,0.1);
OnCommand=cmd(queuecomma... |
function Watchkeeper_Gargolmar_Hamstring(Unit, event, miscunit, misc)
print "Watchkeeper Gargolmar Hamstring"
Unit:FullCastSpellOnTarget(26141,Unit:GetRandomPlayer())
Unit:SendChatMessage(11, 0, "Hamstring on you...")
end
function Watchkeeper_Gargolmar_Stun(Unit, event, miscunit, misc)
print "Watchkeeper Gargolmar... |
-- Global Tables
local binaryTree = {} -- BST
local battleButtons = {} -- map of creature id
-- Global variables that will inherit from init
local battleWindow, battleButton, battlePanel, mouseWidget, filterPanel, toggleFilterButton
local lastBattleButtonSwitched, lastCreatureSelected
-- Hide Buttons ("hidePlayers", ... |
function EBF:GetMyMessage(info)
return myMessageVar
end
function EBF:SetMyMessage(info, input)
myMessageVar = input
EBF:Print("My message is now: " .. myMessageVar)
end
EBF.defaults = {
profile = {
addons = {
elvui = {
enabled = false,
name = "ElvUI",
loaded = false
},... |
--Type => SubSystem
--ThingToBuild => name of subsystem to build
--RequiredResearch => global research dependencies
--RequiredShipSubSystems => subsystems dependencies for local to the ship
--RequiredFleetSubSystems => Fleet wide subsystem dependencies
--DisplayPriority => Order in UI lists
--DisplayedName => Localized... |
local socket = require( "socket" )
local Time = require( "time" )
-- .getMiliseconds()
-- .getMicroSeconds()
-- .getTime()
-- .getDiff()
-- .getSeconds()
local EQ = {}
----------------------------------------------
-- EventQueue Module Constants and Globals --
-- Written by Daniel R. Koris(aka Davenge) --
----------... |
me = Game.Players.acb227
char = me.Character
f = Instance.new("Model")
f.Name = "Justina Beiber"
f.Parent = char
part = Instance.new("Part")
part.Parent = f
part.Name = "Base"
part.Anchored = true
part.Size = Vector3.new(10, 3, 10)
part.CFrame = CFrame.new(0, 1.5, 35)
part = Instance.new("Part")
part.Paren... |
local Constants = require(script.Parent.Parent.Core.Constants)
local ENTITY_ATTRIBUTE_NAME = Constants.EntityAttributeName
local INSTANCE_REF_FOLDER = Constants.InstanceRefFolder
local ErrConversionFailed = "%s (%s) cannot be turned into an attribute"
local function instanceConversion(attributeMap, attributeName, va... |
function widget:GetInfo()
return {
name = "CrabCoverAI",
desc = "attempt to Crab cover upon aproaching bombing. Version 1.1",
author = "terve886",
date = "2019",
license = "PD", -- should be compatible with Spring
layer = 10,
enabled... |
local communicates = {
"Welcome to Canary Server! Visit the organization to see all our work: https://github.com/opentibiabr",
"Did you like it? Help support what we do here with a donation by visiting the link: https://docs.opentibiabr.org/donate/",
"Visit our discord to ask questions or report issues: https://disc... |
minetest.register_chatcommand("setskin", {
params = "",
privs = {startlocation=true},
description = "Set your skin name.",
func = function(name, param)
local player = minetest.get_player_by_name(name)
if not player then
return false, "Player not found"
end
u_skins.u_skins[name] = param
u_skins.up... |
--[[
s:UI Slash Commands
Martin Karer / Sezz, 2014
http://www.sezz.at
--]]
require "ChatSystemLib";
-----------------------------------------------------------------------------
local S = Apollo.GetPackage("Gemini:Addon-1.1").tPackage:GetAddon("SezzUI");
local M = {};
-------------------------... |
#!/usr/bin/env texlua
module = "iftex"
checkconfigs = {"build","config-plain","config-etex-plain"}
checkengines= {"pdftex","luatex","xetex","ptex","uptex"}
checkruns = 1
sourcefiles={"*.sty"}
typesetfiles={"iftex.tex"}
docfiles={"iftex.tex"}
tdsroot = "generic"
packtdszip = true
|
local skynet = require "skynet"
local errorcode = require("game/sprotocfg/errorcode")
local utilsFunc = require("utils/utilsFunc")
local lru_list = require("zjutils/lru_list")
local udpd
local roomMgr
local funcT = {}
local teamArr = {
[errorcode.TEAM_TYPE_WOLF] = {}, --array element = {pid=,score=}
[errorcode.TEA... |
local Native = require('lib.native.native')
---@class RarityControl
local RarityControl = {
Frequent = Native.ConvertRarityControl(0), --RARITY_FREQUENT
Rare = Native.ConvertRarityControl(1), --RARITY_RARE
}
return RarityControl
|
local self = {}
self.ProtoInfos={
MESSAGE = {
package = "MessageProto.Message"
},
LOGINREGIST={
msgtype = "LOGINREGIST",
package="MessageProto.LoginRegistMsg",
servicename="loginservice",
},
HOTFIX={
msgtype = "HOTFIX",
package="MessageProto.HotfixMsg... |
local po = require "resty.pushover"
describe("resty.pushover", function()
describe("new()", function()
local http_save
local http
local httpc
local opts
before_each(function()
http = require("spec.mock_http")()
http_save = po._set_resty_http(http)
httpc = http.get_client()
... |
local config = {}
config.nvim_lsp = function()
require("modules.completion.lsp")
end
config.cmp = function()
vim.cmd([[packadd cmp-under-comparator]])
local t = function(str)
return vim.api.nvim_replace_termcodes(str, true, true, true)
end
local has_words_before = function()
local line, col = unpac... |
-- Provides info about currently active Modal Lens
include( "InstanceManager" );
include( "GameCapabilities" );
include( "CQUICommon.lua" );
-- ===========================================================================
-- MODDED LENS
-- ===========================================================================
g_... |
-- Update the environment to always check the "scripts" directory.
package.path = package.path .. ";./scripts/?.lua"
package.path = package.path .. ";./scripts/common/?.lua"
package.path = package.path .. ";./scripts/quests/?.lua"
package.path = package.path .. ";./scripts/quests/aeschburh/?.lua"
package.path = package... |
--HOOKS
--- Hook used for determining if an object connects to a specified position
-- @param pipeName string - name of the pipe type to push through
-- @param position vec2 - world position to compare node positions to
-- @param pipeDirection vec2 - direction of the pipe to see if the object connects
-- @returns node... |
---@diagnostic disable: undefined-global
local tag_gen = function(tag, attributes)
attributes = attributes or {}
local padding = ' '
local _attributes = ''
if not vim.tbl_isempty(attributes) then
for _, attribute in ipairs(attributes) do
_attributes = attribute == '' and _attributes .. padding .. '{}... |
local i18n = require("core.i18n")
i18n.add {
ui = {
yes = "Yes",
no = "No..",
bye = "Bye bye.",
more = "(More)",
save = "*saving*",
playtime = "{$1}:{$2}:{$3} Sec",
save_on_suspend = "App focus was lost. Quicksaving game.",
date = "{$1} {$2}/{$3}",
date_hour =... |
object_ship_jedi_starfighter_tier2 = object_ship_shared_jedi_starfighter_tier2:new {
}
ObjectTemplates:addTemplate(object_ship_jedi_starfighter_tier2, "object/ship/jedi_starfighter_tier2.iff")
|
---@type Ellyb
local Ellyb = Ellyb(...);
if Ellyb.EditBoxes then
return
end
-- Lua imports
local pairs = pairs;
-- WoW imports
local IsShiftKeyDown = IsShiftKeyDown;
local EditBoxes = {};
local readOnlyEditBoxes = {};
local EditBox = CreateFrame("EditBox");
EditBox:Hide();
---@param editBox EditBox|ScriptObject... |
local L = LibStub("AceLocale-3.0"):NewLocale("BestInSlot", "enUS", true)
--Common strings
L["Patch %s"] = true
L["Raid Tier"] = true
L["Difficulty"] = true
L["Specialization"] = true
L["Raid Instance"] = true
L["Selection"] = true
L["Overview"] = true
L["Shared Boss Loot"] = true
L["commands"] = true
L["Select all"] =... |
local template = require "resty.template" -- 调用模板
local redis = require "resty.redis_iresty"
local red = redis:new()
local msg = red:get("num")
if ngx.null == msg then
return ngx.say("获取库存失败");
end
local context = {
title = "品优购",
-- 从redis中获取库存信息,在页面中显示
num = msg
}
local request_uri = ngx.var.request... |
LeftActor = {
def = "simple_actor",
size = 3,
position = {-5, 0},
tag = "spawned, left-tilted",
}
RightActor = {
def = "simple_actor",
size = 5,
position = {5, 0},
color = {1, 0, 0},
alpha = 0.8,
tag = "spawned, right-tilted",
}
|
local File = assert(io.open('output/4_5254.bmp', 'rb'))
-- black pixels per row:
-- 1 2 3 0 1 2 3 0 1
--
-- size in bytes by width and height in pixels:
-- h\w 1 2 3 4 5 6 7 8 9
-- _____________________________________________
--| 1 58 62 66 66 70 74 78 78
--| 2 62 70 78 78 86 94 102 102
--| 3 66 78 90 90 102 114 ... |
OpenStorage = function(storageId)
local cachedStorage = cachedData["storages"][storageId]
if not cachedStorage then
cachedData["storages"][storageId] = {}
cachedData["storages"][storageId]["items"] = {}
end
local totalWeight = 0
local menuElements = {
{
["label... |
local skynet = require "skynet.manager"
local usage = [[
Welcome,I'am a robot(version: 0.0.1)
usage:
telnet 127.0.0.1 %s to control it
#从1000001角色ID开始启动100个机器人
start app/service/newrobot 100 1000001
]]
skynet.start(function ()
local port = skynet.getenv("debug_port") or 6666
usage = string.format(usage,port)
... |
-- $Id: CheckBox.lua 53 2016-07-12 21:56:30Z diesal2010 $
local DiesalGUI = LibStub("DiesalGUI-1.0")
-- ~~| Libraries |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
local DiesalTools = LibStub("DiesalTools-1.0")
local Diesa... |
--------------------------------------------------------------------------------
-- player.lua
--------------------------------------------------------------------------------
local _PACKAGE = (...):match("^(.+)[%./][^%./]+") or ""
local INFO_MSG = tengine.INFO_MSG
local DEBUG_MSG = tengine.DEBUG_MSG
local ERROR_MSG =... |
local current_folder = (...):gsub('%.init$', '')
local Observable = require(current_folder .. '.observable')
require(current_folder .. '.combinators')
return Observable
|
global = {}
jest = {}
local mockError = function()
mockWarn(true)
end
function mockWarn(asError)
if asError == nil then
asError=false
end
expect:extend({toHaveBeenWarned=function(received)
asserted:add(received)
local passed = warn.mock.calls:some(function(args)
args[0+1]:find(received) > -1... |
local utils = require("neo-tree.utils")
local log = require("neo-tree.log")
local git_utils = require("neo-tree.git.utils")
local M = {}
local sep = utils.path_separator
M.load_ignored_per_directory = function(path)
if type(path) ~= "string" then
log.error("load_ignored_per_directory: path must be a string")
... |
local ClubShared =
{
Tables =
{
},
};
APIDocumentation:AddDocumentationTable(ClubShared); |
return {
hey = function(str)
-- Empty string.
if not str or #str == 0 then
return "Fine, be that way."
-- Question mark present.
elseif str:find("%?") then
return "Sure"
-- Two or more repetitions of uppercase.
elseif str:find("%u%u") then
... |
local M = {}
if vim == nil or vim.api == nil or vim.treesitter == nil or vim.treesitter.highlighter == nil then
return
end
--local parsers = {}
--local queries = require'nvim-treesitter.query'
--local parsers = require'nvim-treesitter.parsers'
--local hl_map = vim.treesitter.highlighter.hl_map
local lang_map = {}
... |
--[[--ldoc desc
@Module Clock.lua
@Author AeishenLin
Date: 2018-10-22 18:43:44
Last Modified by: AeishenLin
Last Modified time: 2018-10-22 18:58:30
]]
local mkproprety = function(getFun, setFun)
local instance = {proprety = true}
instance.get = getFun
instance.set = setFun
setmetatable(instance, {__n... |
--ZFUNC-getin-v1
local function getin( tab, ... ) --> val
local path = { ... }
local val = tab
for i, v in ipairs( path ) do
val = val[ v ]
if not val then
return nil
end
end
return val
end
return getin
|
ShyunNpc = {
click = async(function(player, npc)
local t = {
graphic = convertGraphic(npc.look, "monster"),
color = npc.lookColor
}
player.npcGraphic = t.graphic
player.npcColor = t.color
player.dialogType = 0
player.lastClick = npc.ID
if player.baseClass ~= 3 then
player:dialogSeq({t, "Sorry I... |
local table = require("__flib__.table")
local constants = require("prototypes.constants")
local module_template = {
type = "module",
subgroup = "ee-modules",
stack_size = 50,
art_style = "vanilla",
}
for _, module_data in pairs(constants.module_data) do
local module = table.deep_copy(module_template)
mod... |
--- Count various statistics about a query.
local utils = require('graphql.utils')
local error_codes = require('graphql.error_codes')
local check = utils.check
local e = error_codes
local statistics = {}
--- Count fetch event.
local function objects_fetched(self, info)
check(self, 'self', 'table')
check(inf... |
--************************
--name : SINGLE_AG_CS_02.lua
--ver : 0.1
--author : Kintama
--date : 2004/09/09
--lang : en
--desc : terminal mission
--npc :
--************************
--changelog:
--2004/09/09(0.1): Added description
--************************
function DIALOG()
NODE(0)
G... |
local ttstream = require('ttstream')
local opcodes = {}
local actions = {}
function actions.defaultAction(vm, opcode, opentry, ms)
print(string.format("0x%02X %8s", opcode, opentry.name))
end
function actions.NPUSHB(vm, opcode, opentry, ms)
local nbytes = ms:get8();
--print("NPUSHB: ", nbytes)
if not ... |
local Aye = Aye;
Aye.OnEnable = function()
-- allow loading modules
Aye.load = true;
-- load modules
for AddOnID =1, GetNumAddOns() do
local name, _, _, _, reason = GetAddOnInfo(AddOnID);
if reason == "DEMAND_LOADED" then
name = name:match("^Aye%.(.*)");
if name then
local AddOnDependencies ... |
-- tokyonight
local M = {}
function M.setup()
vim.g.tokyonight_style = "storm"
vim.cmd "colorscheme tokyonight"
end
M.colors = {
fg = "#c0caf5",
bg = "#1a1b26",
accent = "#7aa2f7",
lightbg = "#24283b",
fgfaded = "#565f89",
grey = "#4e5172",
light_grey = "#686c99",
dark_grey = "#222433",
bright ... |
local operationType = {}
operationType.RIGHT_CHI = 0x0001--右吃
operationType.MID_CHI = 0x0002--中吃
operationType.LEFT_CHI = 0x0004--左吃
operationType.PENG = 0x0008--碰
operationType.GANG = 0x0010--碰杠
operationType.AN_GANG = 0x0020--暗杠
operationType.BU_GANG = 0x0040--补杠
operationType.TING = 0x0080--听牌... |
local test = require "u-test"
test.test_loop_table = function()
local sentinel_hps = {
{host = "127.0.0.1", port = 26380},
{host = "127.0.0.1", port = 26381},
{host = "127.0.0.1", port = 26382},
other = {}
}
local i = 1
-- ipairs ignore non array index
for k, hp in ipairs(sentinel_hps) do
... |
#!/usr/bin/env luajit
local env = setmetatable({}, {__index=_G})
require 'ext.env'(env)
if setfenv then setfenv(1, env) else _ENV = env end
require 'symmath'.setup{env=env}
local MathJax = symmath.export.MathJax
symmath.tostring = MathJax
local printbr = MathJax.print
MathJax.header.title = 'sum of two metrics'
print(... |
--// Package Metadata
return {
Name = "DefaultCommands";
Version = 1.0;
Description = [[ Responsible for the declaration of default commands. ]];
Author = "Sceleratis";
Package = script.Parent;
Dependencies = {
"System.Core",
"System.Utilities",
"System.Admin",
"System.UI"
};
}
|
require('Utilities');
function HasCommander(territory)
return #territory.NumArmies.SpecialUnits ~= 0;
end
function NumTerritoriesToSwap(terrs)
--Return Mod.Settings.NumTerritories, unless at least one player doesn't have that many swappable terrs, in which case return smallest player's number of territories
local ... |
local logger = require "rspamd_logger"
local tcp = require "rspamd_tcp"
local N = "razor"
local symbol_razor = "RAZOR"
local opts = rspamd_config:get_all_opt(N)
-- Default settings
local cfg_host = "127.0.0.1"
local cfg_port = 9192
local function check_razor(task)
local function cb(err, data)
if err then... |
return function(room)
local hotspot
hotspot = Hotspot.new("new1", 5, "New Hotspot 1", true,
Polygon.new({
}) , 0)
room:addHotspot(hotspot)
hotspot = Hotspot.new("udoor", 8, "Meadow", true,
Polygon.new({
515, 418,
628, 420,
668, 396,
... |
require'which-key'.setup{
}
|
--[[
Functions that facilitate loading, parsing, manipulating and storing of config files.
]]
_libs = _libs or {}
require('tables')
require('sets')
require('lists')
require('strings')
local table, set, list, string = _libs.tables, _libs.sets, _libs.lists, _libs.strings
local xml = require('xml')
local files = re... |
local M = {}
local uv = vim.loop
local path_sep = uv.os_uname().version:match "Windows" and "\\" or "/"
local in_headless = #vim.api.nvim_list_uis() == 0
---Join path segments that were passed as input
---@return string
function _G.join_paths(...)
local result = table.concat({ ... }, path_sep)
return result
end
... |
IsDead = false
ESX = nil
sleep, HasAlreadyEnteredMarker, InsideMarker = true, false, false
PlayerData, CurrentActionData = {}, {}
Citizen.CreateThread(
function()
while ESX == nil do
TriggerEvent(
"esx:getSharedObject",
function(obj)
ESX = obj... |
local status_ok, indent_blankline = pcall(require, "indent_blankline")
if not status_ok then
vim.notify("indent_blankline not found!")
return
end
indent_blankline.setup({
char = "▏",
show_current_context = true,
blankline_show_trailing_blankline_indent = false,
})
|
return {
log = require("apioak.pdk.log"),
ctx = require("apioak.pdk.ctx"),
json = require("apioak.pdk.json"),
time = require("apioak.pdk.time"),
shared = require("apioak.pdk.shared"),
table = require("apioak.pdk.table"),
string = require("apioak.pdk.string"),
req... |
local StarterPlayer = game:GetService("StarterPlayer")
local DEFAULT_SPEED = StarterPlayer.CharacterWalkSpeed
return function(state, action)
state = state or DEFAULT_SPEED
if action.type == "MOVESPEED_SET" then
return action.moveSpeed
end
return state
end |
-- AUTHOR: Stephen McGill, 2017
-- Description: Open files using memory mapping
local lib = {}
------------------
-- Dependencies
local ffi = require'ffi'
local bit = require'bit'
local C = ffi.C
------------------
local unpack = unpack or require'table'.unpack
-- /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h
loc... |
-- This file is auto-generated by shipwright.nvim
local common_fg = "#B1A39C"
local inactive_bg = "#2D2927"
local inactive_fg = "#CAD0D4"
return {
normal = {
a = { bg = "#5E5652", fg = common_fg, gui = "bold" },
b = { bg = "#47413E", fg = common_fg },
c = { bg = "#342F2D", fg = "#B4BDC3" },
},
insert = {
a... |
-- Licensed under MIT.
-- Enjoy!
AddCSLuaFile()
Replicate = Replicate or {}
Replicate.Funcs = Replicate.Funcs or {}
Replicate.Templates = Replicate.Templates or {}
function Replicate.SetupMetaTable(tbl, name)
if not tbl or not istable(tbl) then
error("Cannot setup a nil or invalid table.")
end
if... |
---@class LegendaryCrafting
C_LegendaryCrafting = {}
function C_LegendaryCrafting.CloseRuneforgeInteraction() end
---@param description RuneforgeLegendaryCraftDescription
function C_LegendaryCrafting.CraftRuneforgeLegendary(description) end
---@param baseItem table
---@param runeforgePowerID number @ [OPTIONAL]
--... |
--- libdas: DENG asset management library
--- licence: Apache, see LICENCE file
--- file: WavefrontObjCompiler.lua - WavefrontObjCompiler class test build configuration
--- author: Karl-Mihkel Ott
local WavefrontObjCompiler = {}
function WavefrontObjCompiler.build()
project "WavefrontObjCompilerTest"
kind... |
local class = {}
class.__index = class
function class:new(...)
self = setmetatable({}, self)
if self.new == class.new then self.new = nil end
if self.extend == class.extend then self.extend = nil end
self:init(...)
return self
end
function class:extend()
self = setmetatable({}, self)
self... |
imenilac = array_denom[ITEM];
brojilac = array_enum[ITEM];
boja = array_boja[ITEM];
sln = ""
for i=0,18 do
sln = sln.."solution["..i.."]="
if i < (18*brojilac) / imenilac then
sln = sln.."1;"
else
sln = sln.."0;"
end
end |
local ReLU, parent = torch.class('cudnn.ReLU','cudnn._Pointwise')
function ReLU:updateOutput(input)
if not self.mode then self.mode = 'CUDNN_ACTIVATION_RELU' end
return parent.updateOutput(self, input)
end
|
--[[
Copyright (C) 2021 Zeping Lee
--]]
local richtext = {}
local unicode = require("unicode")
local util = require("citeproc.citeproc-util")
local RichText = {
contents = nil,
formats = nil,
_tag_formats = {
["i"] = {["font-style"] = "italic"},
["b"] = {["font-weight"] = "bold"},
["sup"] = {["... |
local lib = ursa.lib
local ul = {}
ursalibcontext = ul
-- it may seem like we should be chdir'ing when things are pushed or popped, but we actually live "natively" in the root directory. We only chdir when we need to.
local context_base = {prefix = "", absolute = lib.getcwd()}
local context_top = {current = context_... |
-- Copyright 2016 The Cartographer Authors
--
-- 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... |
local API = Class:extend()
local Request = Import("ga.duacord.duacord.API.Request")
function API:initialize(Client)
self.Client = Client
end
function API:Request(Method, Url, Body, AuditReason)
return Request(Method, Url, Body, AuditReason, self.Client)
end
return API |
local S = mobs.intllib
function mobs.give_to_player(player, item)
local stack = ItemStack(item)
local amount = stack:get_count()
local stack_max = stack:get_stack_max()
local inv = player:get_inventory()
-- Item gets split into multiple stacks if there are more than the max
while amount > 0 do
local to_add = ... |
-------------------------------------------------------------------------------
--[Reviver] -- Revives the selected entity
-------------------------------------------------------------------------------
local Event = require('__stdlib__/stdlib/event/event')
local Area = require('__stdlib__/stdlib/area/area')
local Pla... |
local mt = {}
--因为不同项目的节点接口不同,比如get_pos,set_pos之类的,所以就用这个中间层粘合,请传入你们项目的wrapper,其实现了具体的一系列接口
function mt:init_wrapper( wrapper )
self.wrapper = wrapper
end
function mt:get_wrapper( )
assert(self.wrapper, "has not init wrapper!")
return self.wrapper
end
--[[
例如:
local mt = {}
function mt.get_anchored_pos(node)
if... |
local gui = false
local currentlyInGame = false
local passed = false;
function lockpick(pickhealth,pickdamage,pickPadding,distance)
openGui()
play(pickhealth,pickdamage,pickPadding,distance)
currentlyInGame = true
while currentlyInGame do
Wait(400)
end
if passed then return 100 else return 0 end
end
... |
local wibox = require("wibox")
local gears = require("gears")
local beautiful = require("beautiful")
local interfaces = { "eth0", "wlan0", "eno1", "lo" }
local ip
for i = 1, 4 do
local fd = io.popen("ifconfig " .. interfaces[i])
local output = fd:read("*all")
fd:close()
ip = string.match(... |
-- is that?
wait(0.5)
Player = game:GetService("Players")
me = Player.kash5
char = me.Character
Modelname = "SwordV10"
local HIT = false
local DMG = 200
local AIM = false
local Trans = false
Busy = false
Onfire = false
torso = char.Torso
neck = torso.Neck
hum = char.Humanoid
rightarm = char["Right Arm"]
leftarm = char... |
-- Dokan : user-mode file system library for Windows
--
-- Copyright (C) 2008 Hiroki Asakawa info@dokan-dev.net
--
-- http://dokan-dev.net/en
--
-- This program is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License as published by the Free
-- S... |
local Lovox = require("lib.lovox")
local Assets = require("assets/assets").sword
return Lovox.newVoxelBatch(love.graphics.newArrayImage(Assets), Assets.layers, 1, "dynamic")
|
-----------------------------------
-- Area: Upper Delkfutt's Tower
-- Mob: Jotunn Wildkeeper
-----------------------------------
require("scripts/globals/regimes")
-----------------------------------
function onMobDeath(mob, player, isKiller)
tpz.regime.checkRegime(player, mob, 787, 2, tpz.regime.type.GROUNDS)
... |
-- Part of BioLua by SweetPalma, 2017. All rights reserved.
-- Common import tree:
return {
object = require 'biolua.object',
test = require 'biolua.test',
sequence = {
Nucleic = require 'biolua.sequence.nucleic',
Amino = require 'biolua.sequence.amino'
},
parser = {
Fasta = require 'biolua.parser.fast... |
--
-- tests/tests_stress.lua
-- Stress test for Premake.
-- Copyright (c) 2009, 2013 Jason Perkins and the Premake project
--
local numprojects = 10
local numfiles = 100
local numbuildcfgs = 4
local numplatforms = 6
dofile("pepperfish_profiler.lua")
profiler = newProfiler()
profiler:start()
workspace "MyWorks... |
local ServerScriptService = game:GetService("ServerScriptService")
local agentsFolder = ServerScriptService:WaitForChild("Agents", 2)
local soldatAi = require(agentsFolder:WaitForChild("SoldierAi", 1))
local DestroyService = require(agentsFolder:WaitForChild("DestroyService", 1))
local soldierAgent = {
SoldatBra... |
return Def.Sprite {
Texture=NOTESKIN:GetPath( '_down', 'tap note' );
Frames = Sprite.LinearFrames( 8, 1 );
InitCommand=cmd(setstate,2);
DrawTapNoteMessageCommand=function(self,parent)
parent:spin();
end;
};
|
--[[--------------------------------------------------------------------------
*
* Mello Trainer
* (C) Michael Goodwin 2017
* http://github.com/thestonedturtle/mellotrainer/releases
*
* This menu used the Scorpion Trainer as a framework to build off of.
* https://github.com/pongo1231/ScorpionTrainer
* (C) Emre ... |
local function OnLoad()
ShowImage("GLOBAL/_end_h")
ShowImage("GLOBAL/_new_h")
ShowImage("GLOBAL/_sel_h")
ShowImage("GLOBAL/_vol1_h")
ShowImage("GLOBAL/_vol2_h")
ShowImage("GLOBAL/_vol3_h")
ShowImage("GLOBAL/_vol4_h")
ShowImage("GLOBAL/_vol5_h")
end
local function MouseMoved(x, y, dx, dy, istouch)
end
local fu... |
local first_data_load = true
local room = tfm.get.room
local repeated = {_count = 0}
local maps = {_count = 0}
local is_invalid = false
local levels
local function newMap()
if repeated._count == maps._count then
repeated = {_count = 0}
end
local map
repeat
map = maps[math.random(1, maps._count)]
until map an... |
---------------------------------------------------------------------------------------------
-- Requirement summary:
-- [Policies]: SDL.OnPolicyUpdate initiation of PTU
-- [HMI API] SDL.OnPolicyUpdate notification
--
-- Description:
-- 1. Used preconditions: SDL and HMI are running, Device connected to SDL is consente... |
require'lualine'.setup {
options = {
disabled_filetypes = { 'NvimTree' },
},
}
|
--
-- tests/actions/vstudio/vc2010/test_links.lua
-- Validate linking and project references in Visual Studio 2010 C/C++ projects.
-- Copyright (c) 2011 Jason Perkins and the Premake project
--
T.vstudio_vs2010_links = { }
local suite = T.vstudio_vs2010_links
local vc2010 = premake.vstudio.vc2010
--
-- Setup
--
... |
local fixSet = {
"陈果", "陈卓", "陈实", "陈晨"
}
local keySet = {
"观",
"景",
"远",
"池",
"晨",
"驰",
"橙",
"劲",
"科",
"畅",
"坚",
"萌",
"捷",
"醒",
"铭",
"漫",
"沐",
"晴",
"石",
"思",
"潜",
"润",
"实",
"霜",
"视",
"势",
"深",
"稳",
... |
-----------------------------------
-- Area: Ilrusi Atoll
-- Mob: Cursed Chest
-----------------------------------
require("scripts/globals/status")
-----------------------------------
function onMobFight(mob, target)
local PX = target:getXPos()
local PY = target:getYPos()
local PZ = target:getZPos()
... |
local jobs = require("worktrees.jobs")
local utils = require("worktrees.utils")
local status = require("worktrees.status")
local M = {}
M._default_options = {
log_level = vim.log.levels.WARN,
log_status = true,
}
M.setup = function(opts)
local options = opts or {}
M._options = vim.tbl_deep_extend("fo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.