content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
local class = require 'std.class'
local cls = class('Node')
local node_table = {}
function cls.exist(name)
return name and node_table[name]
end
function cls:_new(args)
return {
_args_ = args,
_name_ = nil,
parent_ = nil,
tree_ = nil,
_decorator_ = {},
}
end
functio... | nilq/small-lua-stack | null |
local _, Engine = ...
local Module = Engine:GetModule("ActionBars")
local MenuWidget = Module:SetWidget("Menu: Main")
local L = Engine:GetLocale()
-- Lua API
local ipairs, unpack = ipairs, unpack
local floor = math.floor
-- WoW API
local CreateFrame = CreateFrame
local GetFramerate = GetFramerate
local GetNetStats = ... | nilq/small-lua-stack | null |
function GetInfo()
local info = {
name = "uh_effect_rotate2",
displayname = {
en = "uh_effect_rotate2",
ja = "UH_VS回転"
},
tag = "effect",
affects = AF_Angle,
thumbnail = nil
}
return info
end
function InitEffect()
SetDuration(0.... | nilq/small-lua-stack | null |
---@class PS_FourFlames : ModulBase
PS_FourFlames = ModulBase:extend()
function PS_FourFlames:new()
PS_FourFlames.super.new(self)
self.Flame_A = nil ---@type GameObject
self.Flame_B = nil ---@type GameObject
self.Flame_C = nil ---@type GameObject
self.Flame_D = nil ---@type GameObject
end
function PS_FourFl... | nilq/small-lua-stack | null |
local luasnip = require("luasnip")
luasnip.snippets = {
go = {},
typescript = {},
javascript = {},
}
require("luasnip.loaders.from_vscode").load({ paths = "", include = { "go", "typescript", "javascript" } })
-- require("luasnip/loaders/from_vscode").lazy_load()
| nilq/small-lua-stack | null |
local barrier = {}
barrier.name = "BrokemiaHelper/moveBlockBarrier"
barrier.depth = 0
barrier.color = {0.45, 0.0, 0.45, 0.8}
barrier.placements = {
name = "barrier",
data = {
width = 8,
height = 8,
blockDebris = false
}
}
return barrier | nilq/small-lua-stack | null |
--- required and optional dependencies
local f = require('f')
local typex = require('typex')()
local on_attach = require('plugins.lspconfig.on_attach')
local has_lspinstall, lspinstall = pcall(require, 'nvim-lsp-installer')
local has_lspconfig, lspconfig = pcall(require, 'lspconfig')
local log = require('log'... | nilq/small-lua-stack | null |
-- check for available hunger mods
local hmod = minetest.get_modpath("hunger")
local hbmod = minetest.get_modpath("hbhunger")
local stmod = minetest.get_modpath("stamina")
-- eat pie slice function
local replace_pie = function(node, puncher, pos)
-- is this my pie?
if minetest.is_protected(pos, puncher:get_player_... | nilq/small-lua-stack | null |
drinkListTable = {
-- Non Alcoholic
-- Vanilla
[8079] = 0, -- Conjured Crystal Water
[18300] = 10, -- Hyjal Nectar
[8766] = 0, -- Morning Glory Dew
[8078] = 0, -- Conjured Sparkling Water
[8077] = 0, -- Conjured Mineral Water
[1645] = 3, -- Moonberry Juice
[19300] = 0, -- Bottled Winterspring Water
[3772] = 0, -- Conj... | nilq/small-lua-stack | null |
local function createULibSyncUsersTable()
local q = ULibSync.mysql:query('CREATE TABLE IF NOT EXISTS `ulib_users` (' ..
'`id` INT AUTO_INCREMENT PRIMARY KEY,' ..
'`steamid` VARCHAR(19) UNIQUE NOT NULL,' ..
'`removed` BOOLEAN NOT NULL DEFAULT FALSE,' ..
'`group` VARCHAR(20),' ..
'`date_created` d... | nilq/small-lua-stack | null |
object_tangible_loot_npc_loot_shared_aero_magnifier_generic = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/loot/npc_loot/shared_aero_magnifier_generic.iff"
}
ObjectTemplates:addClientTemplate(object_tangible_loot_npc_loot_shared_aero_magnifier_generic, "object/tangible/loot/npc_loot/sh... | nilq/small-lua-stack | null |
local ls = require("luasnip")
-- some shorthands...
local s = ls.snippet
local sn = ls.snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local d = ls.dynamic_node
local l = require("luasnip.extras").lambda
local r = require("luasnip.extras").rep
local p = r... | nilq/small-lua-stack | null |
bEnabled = false
msBt = {L = 1, R = 2, M = 3, B = 4, F = 5, D = 6}
function OnEvent(event, arg, family)
local x1, y1, x2, y2, t1, t2
if(event == "MOUSE_BUTTON_PRESSED" and bEnabled == false and IsKeyLockOn("scrolllock") == false)
then
t1 = GetRunningTime()
bEnabled = true
... | nilq/small-lua-stack | null |
-- Implementation of CQL Binary protocol V2 available at https://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=blob_plain;f=doc/native_protocol_v2.spec;hb=HEAD
local tcp
if ngx then
-- openresty
tcp = ngx.socket.tcp
else
-- fallback to luasocket
local socket = require("socket")
tcp = socket.tcp... | nilq/small-lua-stack | null |
-- Generated by CSharp.lua Compiler
local System = System
local SlipeMtaDefinitions
local SlipeSharedElements
local SlipeSharedUtilities
System.import(function (out)
SlipeMtaDefinitions = Slipe.MtaDefinitions
SlipeSharedElements = Slipe.Shared.Elements
SlipeSharedUtilities = Slipe.Shared.Utilities
end)
System.nam... | nilq/small-lua-stack | null |
local area = {}
local values = {}
local max_x = 21
local max_y = 21
local function get_index(x,y)
return math.floor(x) + math.floor(y) * 65536
end
local function get_xy(index)
local x = index % 65536
local y = ( index - x ) / 65536
return x,y
end
local adj = {
-1, -1,
-1, 0,
-1, 1,
0, 1,
1, 1,
1, 0... | nilq/small-lua-stack | null |
-- random
-- by Qige
-- 2017.01.05
-- 2017.03.13: add local, change "require 'six.seed'" to "local seed = require 'six.seed'"
local seed = {}
function seed.seed()
--return math.randomseed(tostring(os.time()):reverse():sub(1, 6))
return tostring(os.time()):reverse():sub(1, 6)
end
function seed.random(from, to)
... | nilq/small-lua-stack | null |
local _defaultCPath = ""
local os = ""
if(love.system == nil) then
os = "Thread"
else
os = love.system.getOS()
end
if(os ~= "Web") then
_defaultCPath = love.filesystem.getCRequirePath()
end
local _defaultLPath = love.filesystem.getRequirePath()
local function setReqPath(path)
if(os ~= "Web") then
... | nilq/small-lua-stack | null |
local prefabs =
{
"spider",
"spider_warrior",
"silk",
"spidereggsack",
"spiderqueen",
}
local assets =
{
Asset("ANIM", "anim/spider_cocoon.zip"),
Asset("SOUND", "sound/spider.fsb"),
}
local function SetStage(inst, stage)
if stage <= 3 then
inst.SoundEmitter:PlaySound("dontstarve/creatures/sp... | nilq/small-lua-stack | null |
function uptime() return tmr.now() / 1000000 end
function mod(a, b) return a - math.floor(a/b)*b end
function step(amt) return mod(tmr.now() / 1000, step * 1000) end
function file_exists(name)
local f=io.open(name,"r")
if f~=nil then io.close(f) return true else return false end
end
function monitor(interval)
... | nilq/small-lua-stack | null |
local Object = require 'libs.classic'
local Piece = require 'tetris.components.piece'
local Ruleset = Object:extend()
Ruleset.name = ""
Ruleset.hash = ""
Ruleset.enable_IRS_wallkicks = false
-- Component functions.
function Ruleset:rotatePiece(inputs, piece, grid, prev_inputs, initial)
local new_inputs = {}
for... | nilq/small-lua-stack | null |
local ffi = require 'ffi'
local gl = require 'gl'
local class = require 'ext.class'
local GLTex = require 'gl.tex'
local GLTex3D = class(GLTex)
GLTex3D.target = gl.GL_TEXTURE_3D
function GLTex3D:create(args)
self.width = args.width
self.height = args.height
self.depth = args.depth
gl.glTexImage3D(
args.target ... | nilq/small-lua-stack | null |
module ("mi.util.micrypto", package.seeall)
local b = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
function base64_enc(str)
return ((str:gsub('.', function(x)
local r,b='',x:byte()
for i=8,1,-1 do r=r..(b%2^i-b%2^(i-1)>0 and '1' or '0') end
return r;
end)..'0000')... | nilq/small-lua-stack | null |
local MyMathService = {
}
function MyMathService.Exec()
print('MyMathService.Exec')
end
return MyMathService | nilq/small-lua-stack | null |
--[[
MailSlurp API
MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - ... | nilq/small-lua-stack | null |
wHunter, optionOne, optionTwo, hunterText = nil
function createhunterGUI()
-- Window variables
local Width = 400
local Height = 250
local screenwidth, screenheight = guiGetScreenSize()
local X = (screenwidth - Width)/2
local Y = (screenheight - Height)/2
if not (wHunter) then
-- Create the wi... | nilq/small-lua-stack | null |
pushenv("CONDA_DEFAULT_ENV","spades-3.12.0")
prepend_path{"PATH","/util/opt/anaconda/deployed-conda-envs/packages/spades/envs/spades-3.12.0/bin",priority=100}
append_path("CONDA_ENVS_PATH", "/util/opt/anaconda/deployed-conda-envs/packages/spades/envs")
| nilq/small-lua-stack | null |
-- Transform between YAML 1.1 streams and Lua table representations.
-- Written by Gary V. Vaughan, 2013
--
-- Copyright (c) 2013-2015 Gary V. Vaughan
--
-- 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... | nilq/small-lua-stack | null |
includeFile("custom_content/draft_schematic/weapon/core/weapon_core_heavy_advanced.lua")
includeFile("custom_content/draft_schematic/weapon/core/weapon_core_heavy_standard.lua")
includeFile("custom_content/draft_schematic/weapon/core/weapon_core_melee_advanced.lua")
includeFile("custom_content/draft_schematic/weapon/co... | nilq/small-lua-stack | null |
--***********************************************************
--** ROBERT JOHNSON **
--** Simple collapsable window wich handle our farming info panel **
--***********************************************************
require "ISUI/ISCollapsableWindow"
---@class ISFarmingWindow : ... | nilq/small-lua-stack | null |
local group = ARGV[1]
local min_idle = ARGV[3]
local id = ARGV[2]
local stream = KEYS[1]
local result = redis.call('XCLAIM', stream, group, "reclaimer", min_idle, id)
-- non-empty table?
if next(result) then
for k, v in pairs(result) do
if v then
redis.call('XADD', stream, '*', 'job', v[2][2])
redis... | nilq/small-lua-stack | null |
-- file opens with the cursor at the same position where last left off
vim.cmd([[
autocmd BufReadPost * if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit' | exe "normal! g`\"" | endif
]])
vim.cmd([[
augroup numbertoggle
autocmd!
autocmd BufEnter,InsertLeave,WinEnter * if &nu | set rnu | endif... | nilq/small-lua-stack | null |
--[[
2020-2021 Xalalau Xubilozo. MIT License
https://xalalau.com/
--]]
-- MAIN CONFIGURATIONS
-- -----------------------------------------------------------------------------------
-- If true, will enable code live reloading, the command bs_tests and more time without hibernation
-- Unsafe! Only used while... | nilq/small-lua-stack | null |
require 'init'.init()
| nilq/small-lua-stack | null |
gr_worrt_gutbuster = Creature:new {
objectName = "@mob/creature_names:worrt_gutbuster",
socialGroup = "worrt",
faction = "",
level = 16,
chanceHit = 0.33,
damageMin = 160,
damageMax = 170,
baseXp = 960,
baseHAM = 2900,
baseHAMmax = 3500,
armor = 0,
resists = {0,0,0,0,0,110,0,-1,-1},
meatType = "meat_reptil... | nilq/small-lua-stack | null |
ITEM.name = "Кассета Наемников"
ITEM.desc = "Список треков:\n1. Тимур Муцураев - Нет дороги назад\n2. Тимур Муцураев - Шамиль ведет отряд\n3. Тимур Муцураев - Мама, приезжай и меня забери\n4. Тимур Муцураев - Они ушли\n5. Тимур Муцураев - Если духом ты слаб\n6. Любэ - Комбат\n\nНа кассете написано «Танксит-Бекдорщик»... | nilq/small-lua-stack | null |
-- * _JOKER_VERSION: 0.0.1 ** Please do not modify this line.
--[[----------------------------------------------------------
Utility Functions
- Frequent needs not specific to Joker (isEmpty, setContains, etc)
- Imported from Joker.lua
CONTENTS:
- isEmpty()
- trim()
- addToSet()
- setContains()
- dif... | nilq/small-lua-stack | null |
ENT.Type = "anim"
ENT.PrintName = "Sign"
ENT.Category = "Metrostroi (utility)"
ENT.Spawnable = false
ENT.AdminSpawnable = false
ENT.RenderGroup = RENDERGROUP_BOTH
ENT.SignModels = {}
--------------------------------------------------------------------------------
-- Inside
----------------------... | nilq/small-lua-stack | null |
-- luacheck: globals vim
local utils = {}
utils.keys = function(tbl)
local new = {}
for k, _ in pairs(tbl) do
table.insert(new, k)
end
return new
end
utils.LRU = function(sz)
return {
__newindex = function(tbl, key, value)
local lru = rawget(tbl, "__lru_tbl")
if lru == nil then
l... | nilq/small-lua-stack | null |
local Minimal = game:GetService("ReplicatedStorage"):WaitForChild("Minimal")
local Commands = Minimal:WaitForChild("Commands"):GetChildren()
local Config = require(Minimal:WaitForChild("Configuration"))
local List = script.Parent:WaitForChild("List")
local ASEP = Config.Settings.ArgumentSeperator
for _,v in ipairs(Co... | nilq/small-lua-stack | null |
-- do things when net is up
dofile("rtc/init.lua")
--dofile(arch=='linux' and "shell/main.lua" or "shell/main.lc")
--if arch=='esp32' then
-- dofile("httpd/init.lua")
--end
--dofile("tftpd/init.lua")()
--dofile("demo/init.lua")
--dofile("example/init2.lua")
--dofile("httpd/init.lua")
| nilq/small-lua-stack | null |
local function get_ancestors_of_class(instance: Instance, class_name: string): { Instance? }
instance = instance.Parent
local ancestors = { instance }
while instance do
instance = instance.Parent
if not instance or instance.ClassName ~= class_name then
continue
end
... | nilq/small-lua-stack | null |
Ext.Require("Server/Modules/RealJump.lua")
Ext.Require("Server/Modules/FallDamage.lua")
Ext.Require("Server/Modules/GBTalents.lua")
Ext.Require("Server/Modules/Corrogic.lua")
PersistentVars = {}
function EnableFallDamage(cmd)
if cmd == "on" then
print("Fall damage module activated")
PersistentVars... | nilq/small-lua-stack | null |
resource.AddWorkshop(2181831767)
resource.AddWorkshop(788109554)
resource.AddWorkshop(1275272057)
resource.AddWorkshop(442214334)
resource.AddWorkshop(892493593)
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
AddCSLuaFile("cl_hud.lua")
AddCSLuaFile("cl_scoreboard.lua")
AddCSLuaFile("cl_menu.lua")
Ad... | nilq/small-lua-stack | null |
local _M=
{
mContext=nil,
}
_M.new=function()
local p={}
setmetatable(p,_M)
_M.__index=_M
return p
end
_M.show=function(t)
oTUIObject_Show(t.mContext)
end
_M.getVisible=function(t)
return oTUIObject_GetVisible(t.mContext)
end
_M.setVisible=function(t,value)
oTUIObject_SetVisible(t.m... | nilq/small-lua-stack | null |
-- Copyright 2011-2012 Nils Nordman <nino at nordman.org>
-- Copyright 2012-2014 Robert Gieseke <rob.g@web.de>
-- License: MIT (see LICENSE)
--[[--
The Textredux core module allows you to easily create text based interfaces
for the [Textadept](http://foicica.com/textadept/) editor.
It currently consists of the follow... | nilq/small-lua-stack | null |
--[[
Graphite for Lua
List
Copyright (c) 2014 Lucien Greathouse (LPGhatguy)
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 an... | nilq/small-lua-stack | null |
function Div (div)
div.attributes.five = ("%d"):format(div.attributes.two + div.attributes.three)
div.attributes.two = nil
div.attributes.one = "eins"
return div
end
| nilq/small-lua-stack | null |
--other items
require("items.cooked_fish")
require("items.gauss_coil")
require("items.laser_axe")
--armor items
require("items.armor.power_armor_3")
--ammunition items
require("items.ammunition.auxiliary_tesla_coil")
require("items.ammunition.basic_arrow")
require("items.ammunition.heavy_duty_bullets")
require("it... | nilq/small-lua-stack | null |
CHANNEL_GPS = 65534
local function trilaterate( A, B, C )
local a2b = B.vPosition - A.vPosition
local a2c = C.vPosition - A.vPosition
if math.abs( a2b:normalize():dot( a2c:normalize() ) ) > 0.999 then
return nil
end
local d = a2b:length()
local ex = a2b:normalize( )
local i = ex:dot( a2c )
local ey = (... | nilq/small-lua-stack | null |
if SERVER then AddCSLuaFile() return end
local PANEL = {}
DEFINE_BASECLASS( "Panel" )
local DEBUG = false
local JS_CallbackHack = [[(function(){
var funcname = '%s';
window[funcname] = function(){
_gm[funcname].apply(_gm,arguments);
}
})();]]
local FilterCVar = CreateClientConVar( "js_console_filter", 0, true... | nilq/small-lua-stack | null |
-------------------------------------------------------------------------------
-- Mob Framework Mod by Sapier
--
-- You may copy, use, modify or do nearly anything except removing this
-- copyright notice.
-- And of course you are NOT allow to pretend you have written it.
--
--! @file dont_move.lua
--! @brief moveme... | nilq/small-lua-stack | null |
local M={} ; package.loaded[(...)]=M ; M.module_name=(...)
setmetatable(M,{__index=io}) -- use io as prototype
local pmio=M
--
-- pmio.lua
-- Additpmions to the I/O namespace.
-- Copyright (c) 2008-2009 Jason Perkins and the Premake project
--
--
-- Prepare to capture the output from all subsequent calls to pmio... | nilq/small-lua-stack | null |
local object = require "es.object"
local script = object:extend()
function script:new()
script.super.new(self, "script")
script._script = {}
end
function script:init(name, source, params)
if nil == name or not self:is_string(name) then
return
end
if nil == source or not self:is_string(so... | nilq/small-lua-stack | null |
--[[
© 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
--]]
include("shared.lua")
-- Called each frame.
function ENT:Think()
if (!Clockwork.... | nilq/small-lua-stack | null |
object_tangible_container_loot_npe_loot_crate_low = object_tangible_container_loot_shared_npe_loot_crate_low:new {
}
ObjectTemplates:addTemplate(object_tangible_container_loot_npe_loot_crate_low, "object/tangible/container/loot/npe_loot_crate_low.iff")
| nilq/small-lua-stack | null |
afs = {}
afs.isNormal = true
return afs | nilq/small-lua-stack | null |
addEventHandler( "onResourceStart", root,
function ()
for _, v in pairs( getElementsByType( "player" ) ) do
resendPlayerModInfo( v )
end
end
)
addEventHandler( "onPlayerJoin", root,
function ()
resendPlayerModInfo( source )
end
)
addEventHandler( "onPlayerModInfo", root,
function ( filename, itemlist ... | nilq/small-lua-stack | null |
local ModalRoot = script.Parent
local DialogRoot = ModalRoot.Parent
local AppRoot = DialogRoot.Parent
local UIBlox = AppRoot.Parent
local Packages = UIBlox.Parent
local Roact = require(Packages.Roact)
local t = require(Packages.t)
local FitFrame = require(Packages.FitFrame)
local FitFrameVertical = FitFrame.FitFrameVe... | nilq/small-lua-stack | null |
local old_settings = settings
---@type table<string, string>
local old_settings_map = {}
---@type table<string, string>
local old_settings_map_rev = {}
---Setting module. Extends the /set family of commands to work on arbitrary
---data types and allows plugins to register their own settings
---@class new_settings
set... | nilq/small-lua-stack | null |
--[[
UI Container
A UI item that contains other items
Inherits ui.base, utility.container
]]
local lib
local ui_container
local point_in_item
ui_container = {
clips_children = false,
update = function(self, event)
self:trigger_child_event("update", event)
end,
draw = function(self, event)
love.graphics.push... | nilq/small-lua-stack | null |
if (not SILE.outputters) then SILE.outputters = {} end
local f
local cx
local cy
SILE.outputters.debug = {
init = function()
print("Set paper size ", SILE.documentState.paperSize[1],SILE.documentState.paperSize[2])
print("Begin page")
end,
newPage = function()
print("New page")
end,
finish = funct... | nilq/small-lua-stack | null |
-- credit to atom0s for help with decompiling
-- Decompiled using luadec 2.2 rev: for Lua 5.1 from https://github.com/viruscamp/luadec
return {
CloseCfg = {
{
CloseNum = { 0, 29 },
Desc = "冷淡",
Font = "Tgr2",
Icon = "σÑ╜σÅïΣ║▓σ»åσ║\1661",
Id =... | nilq/small-lua-stack | null |
delegate.create("gardenbot")
--------------------------------------------------------------------------------
gardenbot = {}
--------------------------------------------------------------------------------
function gardenbot.init(args)
entity.setDeathParticleBurst("deathPoof")
entity.setAnimationState("movement", "... | nilq/small-lua-stack | null |
local notify = require("blaz.helper.notify")
-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
local function on_attach(client, bufnr)
if client.name == "tsserver" or client.name == "sumneko_lua" or client.name == "jsonls" then
client.resolved_ca... | nilq/small-lua-stack | null |
local image = require 'image'
local base64 = require 'base64'
local ffi = require 'ffi'
local etlua = require 'etlua'
laia = laia or {}
local Monitor = torch.class('laia.Monitor')
-- This table contains for each module (e.g. nn.SpatialConvolution) the
-- function that will generate the corresponding HTML file.
Monito... | nilq/small-lua-stack | null |
local tableSort = table.sort
local stringRep = string.rep
local tableConcat = table.concat
local tostring = tostring
local type = type
local pairs = pairs
local ipairs = ipairs
local next = next
local rawset = rawset
local move = table.move
local setmetatable = debu... | nilq/small-lua-stack | null |
local skynet = require "skynet"
local UserEntity = require "UserEntity"
-- UserSingleEntity
local UserSingleEntity = class("UserSingleEntity", UserEntity)
-- self.recordset格式如下:
--[[
{
[uid1] = { field1 = 1, field2 = 2 },
[uid2] = { field1 = 1, field2 = 2 }
}
--]]
function UserSingleEntity:ctor... | nilq/small-lua-stack | null |
common_io_validation.validate_instance_numbers("iot_spi") | nilq/small-lua-stack | null |
-- Strela-3 Russia Manpad
GT = {};
GT_t.ws = 0;
set_recursive_metatable(GT, GT_t.generic_human);
set_recursive_metatable(GT.chassis, GT_t.CH_t.HUMAN);
GT.animation = {};
set_recursive_metatable(GT.animation, GT_t.CH_t.HUMAN_ANIMATION);
GT.visual.shape = "soldier_ru_03";
GT.visual.shape_dstr = "soldier_ru_03_d";
GT.m... | nilq/small-lua-stack | null |
-- Main.lua
-- Implements the entire NearestAvoid AI controller
-- The bots target the nearest enemy, but avoid going through a friend bot in front of it
--- Returns true if the first number is between the second and third numbers, inclusive
local function isBetweenOrEqual(a_Val, a_Bounds1, a_Bounds2)
-- Check ... | nilq/small-lua-stack | null |
local a, b, c
a = 1
b = 2
local d
d = 3
f()
summon = function(bid, count)
if type(bid) == "string" then
bid = beings[bid].nid
end
local last_being
for i = 1, count or 1 do
last_being = Level.drop_being(bid, Level.empty_coord())
end
return last_being
end
f()
--a, b = a and b, a or b
f()
--[[while a ... | nilq/small-lua-stack | null |
hud = {}
-- HUD statbar values
hud.health = {}
hud.hunger = {}
hud.air = {}
hud.armor = {}
hud.hunger_out = {}
hud.armor_out = {}
-- HUD item ids
local health_hud = {}
local hunger_hud = {}
local air_hud = {}
local armor_hud = {}
local armor_hud_bg = {}
-- default settings
HUD_SCALEABLE = false
... | nilq/small-lua-stack | null |
local oldBuildTechData = BuildTechData
function BuildTechData()
local techData = oldBuildTechData()
table.insert(techData, { [kTechDataId] = kTechId.ProwlerMenu, [kTechDataDisplayName] = "UPGRADE_PROWLER", [kTechDataTooltipInfo] = "UPGRADE_PROWLER_TOOLTIP", })
table.insert(techData, { [kTe... | nilq/small-lua-stack | null |
-----------------------------------------------------------------------------------------
-- Composites
-- Sequencer
-- Execute the child nodes in order or randonly and return Success if all children return
-- Success, else return Failure.
-- If is Dynamic, higher priority child status is revaluated.
-- If a child r... | nilq/small-lua-stack | null |
function teleportUp(player, terrain)
local x, y, z = GetPlayerLocation(player)
CallEvent("SafeTeleport", player, x, y, terrain + 200)
end
AddRemoteEvent("Kuzkay:UnderMapFix", teleportUp) | nilq/small-lua-stack | null |
local insert, move = table.insert, table.move
local class = {
__newindex = function(t, k, v)
if type(v) ~= 'function' then
rawset(t, k, v)
return
end
rawset(t, k, function(self, ...)
if self.parents then return v(self, ...) end
local cls = {parents = {}}
for k, v in pairs(se... | nilq/small-lua-stack | null |
local vim = vim
local api = vim.api
local M = {}
function M.cursor_offset()
-- Get the offset to the start of the line where our cursor is located,
-- which is index 1, so we need to subtract 1
local offset_to_line = api.nvim_call_function('line2byte', {'.'}) - 1
-- Get the offset from start of line to where... | nilq/small-lua-stack | null |
pg = pg or {}
pg.guild_event_node = {
{
item = "sairendanchuan",
success_describe = "轻松歼灭了出现的零星塞壬,$2舰队在搜索战场时获得了$1",
id = 1,
icon = "battle",
fail_describe = "$2舰队报告,敌人逃离了战场,未能取得有效战果,获得了$1",
success_award = {
{
1,
8,
22
},
{
2,
17002,
2
}
},
fail_award = {
{
1,... | nilq/small-lua-stack | null |
--[[--------------------------------------------------------
-- Dragoon Framework - A Framework for Lua --
-- Copyright (c) 2014-2015 TsT worldmaster.fr --
--]]--------------------------------------------------------
-- Lua 5.2 have the ./?/init.lua in his path, but not Lua 5.1.
-- This module fix the problem by ad... | nilq/small-lua-stack | null |
-----------------------------------
-- Ability: Convert
-- Swaps current HP with MP.
-- Obtained: Red Mage Level 40
-- Recast Time: 10:00
-- Duration: Instant
-----------------------------------
require("scripts/globals/status")
-----------------------------------
function onAbilityCheck(player,target,ability)
ret... | nilq/small-lua-stack | null |
local sha1 = {
_VERSION = "sha.lua 0.5.0",
_URL = "https://github.com/kikito/sha.lua",
_DESCRIPTION = [[
SHA-1 secure hash computation, and HMAC-SHA1 signature computation in Lua (5.1)
Based on code originally by Jeffrey Friedl (http://regex.info/blog/lua/sha1)
And modified by Eike Deck... | nilq/small-lua-stack | null |
--------------------------------------------------------------------------
--------------------------------------------------------------------------
-- This class reads all the cache files in. It will on occasion
-- write a user cache file. This is a singleton class.
--
-- Rules: The rules about when to trust a cach... | nilq/small-lua-stack | null |
local status_ok, presence = pcall(require, "presence")
if not status_ok then
return
end
presence:setup{
-- General options
auto_update = true,
neovim_image_text = "NeoVim",
main_image = "file",
-- client_id = "793271441293967371",
log_level = nil,
debounce_timeout = 10... | nilq/small-lua-stack | null |
--[[
Title: share world to datasource
Author(s): big
CreateDate: 2017.05.12
ModifyDate: 2021.09.10
Desc: It can take snapshot for the current world. It can quick save or full save the world to datasource.
use the lib:
------------------------------------------------------------
local ShareWorld = NPL.load('(gl)Mod/W... | nilq/small-lua-stack | null |
class 'Ammunition' extends 'ActiveRecord::Base'
Ammunition:belongs_to 'Character'
| nilq/small-lua-stack | null |
--[[-----------------------------------------------------------------------------
* Infected Wars, an open source Garry's Mod game-mode.
*
* Infected Wars is the work of multiple authors,
* a full list can be found in CONTRIBUTORS.md.
* For more information, visit https://github.com/JarnoVgr/InfectedWars
*
* Inf... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Port Windurst
-- NPC: Rottata
-- Outpost Teleporter NPC
-- !pos 193.111 -12.999 215.638 240
-----------------------------------
require("scripts/globals/conquest")
-----------------------------------
local teleporterNation = tpz.nation.WINDURST
local teleporterEvent = 552... | nilq/small-lua-stack | null |
--[[
TheNexusAvenger
Prompt for the inventory.
--]]
local INVENTORY_GRID_SIZE = 5
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local GuiService = game:GetService("GuiService")
local UserInputService = game:GetService("UserInputService")
local Replicated... | nilq/small-lua-stack | null |
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('XTemplate', {
group = "Infopanel Sections",
id = "customBlackCubeDump",
PlaceObj('XTemplateTemplate', {
'__context_of_kind', "BlackCubeDumpSite",
'__template', "InfopanelSection",
'RolloverText', T(492, --[[XTemplate customBlackCubeDu... | nilq/small-lua-stack | null |
--ZFUNC-rmedge-v1
local function rmedge( graph, from, to, undirected ) --> graph
if not graph[ from ] then return graph end
if not graph[ to ] then return graph end
graph[ from ][ to ] = nil
if undirected then
graph[ to ][ from ] = nil
end
return graph
end
return rmedge
| nilq/small-lua-stack | null |
-- This file is under a Creative Commons Attribution 4.0 International Licence
-- http://creativecommons.org/licenses/by/4.0/
-- You can mess around with it, mod it to your liking, and even redistribute it.
if !WireLib then return end -- Don't do anything if wiremod isn't installed.
AddCSLuaFile()
DEFINE_BASECLASS( "ba... | nilq/small-lua-stack | null |
-- premake5.lua
-- Actions
newaction {
trigger = "clean",
description = "clean up project files",
execute = function()
os.rmdir("./Projects")
end
}
workspace "ZooRayTracer"
location ("./")
configurations { "Debug", "Release" }
project "ZooRayTracer"
location ("Projects/".. _ACTION... | nilq/small-lua-stack | null |
return {'gil','gild','gilde','gildeboek','gildebrief','gildebrieven','gildebroeder','gildedeken','gildedekens','gildehuis','gildekamer','gildekeur','gildemeester','gildepatroon','gildepatroons','gildepenning','gildepenningen','gildeproef','gilderecht','gildewezen','gildos','gilet','gillen','giller','gilletje','gilling'... | nilq/small-lua-stack | null |
AddCSLuaFile()
E2Lib = {}
local type = type
local function checkargtype(argn, value, argtype)
if type(value) ~= argtype then error(string.format("bad argument #%d to 'E2Lib.%s' (%s expected, got %s)", argn, debug.getinfo(2, "n").name, argtype, type(value)), 2) end
end
-- -------------------------- Helper functions ... | nilq/small-lua-stack | null |
module(..., package.seeall)
function save_discussion(node, request, sputnik)
request = request or {}
local params = {
author = request.user or "Anonymous user",
creation_time = tostring(os.time()),
activity_time = tostring(os.time()),
activity_node = node.id,
}
local title = request... | nilq/small-lua-stack | null |
local global = exports.global
local fonts = exports.fonts
local screenWidth, screenHeight = guiGetScreenSize()
local testShader, tec = nil, nil
local greenShader = nil
local previewObj = nil
local previewObjName = ""
local previewObjCost = 999999999
local defaultFont = nil
local firstClickDisabled = false
lo... | nilq/small-lua-stack | null |
-- Script: hello.lua
local glfw = require "moonglfw"
local nvg = require "nvg"
local color = require "nvg.color"
local pprint = require "pprint"
-- Allocate a window and deal with OpenGL
w = glfw.create_window(640, 480, "Hello world!")
glfw.make_context_current(w)
-- Only after this we can use nanovg
local ctx = nvg.n... | nilq/small-lua-stack | null |
local Treesitter = {}
Treesitter.config = function()
if not lvim.builtin.treesitter.active then
return
end
-- if you don't want all the parsers change this to a table of the ones you want
lvim.builtin.treesitter.ensure_installed = "maintained"
lvim.builtin.treesitter.highlight.enabled = true
end
return... | nilq/small-lua-stack | null |
-----------------------------------------------------------------
-- Logo Watermark- A Simple FiveM Script, Made By Jordan.#2139 --
-----------------------------------------------------------------
fx_version "bodacious"
game "gta5"
-- Define the resource metadata
name "Logo"
description "A Simple Logo Water... | nilq/small-lua-stack | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.