content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
local spell = {} spell = {} spell["numericaltype"] = [[Absolute Value]] spell["element"] = [[Almighty]] spell["cost"] = 99 spell["desc"] = [[I'll show you my true power! Empties HP and SP to near-null but deals massive damage to the enemy *CHAOS ONLY*]] spell["numberofhits"] = 5 spell["conditional"] = [[if battle.end ...
nilq/small-lua-stack
null
util.AddNetworkString("OCRP_UpdateLootingTable") sound.Add( { name = "OCRP_LootingSound", channel = CHAN_BODY, volume = .1, pitch = {95, 110}, sound = "physics/body/body_medium_scrape_rough_loop1.wav" } ) function PMETA:LootItem(item) self:StopSound("OCRP_LootingSound") local target = self...
nilq/small-lua-stack
null
#!../../bin/exe/lua -- setup some default search paths, require("apps").default_paths() local pack=require("wetgenes.pack") local wstr=require("wetgenes.string") local wwin=require("wetgenes.win") local posix=require("posix") --find device in /proc/bus/input/devices ? local fp=assert(posix.open("/dev/input/event1...
nilq/small-lua-stack
null
module('love.audio') function getActiveSourceCount() end function getDistanceModel() end function getDopplerScale() end function getSourceCount() end function getOrientation() end function getPosition() end function getVelocity() end function getVolume() end function newSource() end function pause() end function play(...
nilq/small-lua-stack
null
function filterSubSections(txt) if txt == '' then return '' else return '<div id="subsections">\n<h3>Subsections</h3>\n' .. txt .. '\n</div>' end end
nilq/small-lua-stack
null
vim.cmd([[ augroup auto_read autocmd! autocmd FocusGained,BufEnter,CursorHold,CursorHoldI * \ if mode() == 'n' && getcmdwintype() == '' | checktime | endif autocmd FileChangedShellPost * echohl WarningMsg \ | echo "File changed on disk. Buffer reloaded!" | echohl ...
nilq/small-lua-stack
null
--[[ [{ "pos": { "x": 100, "y": 200, "z": 300 }, "name": "", "push": false, "pull": true, "radius": 120 }] --]] local jumppoints = {} local old_calculate_power = jumpdrive.calculate_power jumpdrive.calculate_power = function(radius, distance, sourcePos, targetPos) for _, jumppoint in ipairs(jumppoints) ...
nilq/small-lua-stack
null
---@module PlayerAnimation 枪械模块:玩家的动画控制类 ---@copyright Lilith Games, Avatar Team ---@author Sharif Ma local PlayerAnimation = class('PlayerAnimation') ---PlayerAnimation类的构造函数 ---@param _gun GunBase function PlayerAnimation:initialize(_gun) self.gun = _gun self.id = _gun.animationId self.player = _gun.char...
nilq/small-lua-stack
null
object_building_mustafar_particle_must_lava_fire = object_building_mustafar_particle_shared_must_lava_fire:new { } ObjectTemplates:addTemplate(object_building_mustafar_particle_must_lava_fire, "object/building/mustafar/particle/must_lava_fire.iff")
nilq/small-lua-stack
null
--[[ TPB (Transaction Parameter Block) structure: encode the options for creating transactions encode(tpb_options_t) -> TPB encoded string. USAGE: - pass the encoded TPB to to isc_start_multiple() to start a transaction. - table reservation options occupy the array part of tpb_options_t, one numerical index for...
nilq/small-lua-stack
null
--[[ Title: Draw Our client-side draw functions ]] --[[ Function: csayDraw Draws a csay text on the screen. Parameters: msg - The message to draw. color - *(Optional, defaults to 255, 255, 255, 255)* The color of the text duration - *(Optional, defaults to 5)* The length of the text fade - *(Optional,...
nilq/small-lua-stack
null
---@type table<string,TagTooltipData> UI.Tooltip.TagTooltips = {} UI.Tooltip.HasTagTooltipData = false ---@class TagTooltipData ---@field Title TranslatedString ---@field Description TranslatedString local TagTooltips = UI.Tooltip.TagTooltips ---@type TranslatedString local ts = Classes.TranslatedString local chao...
nilq/small-lua-stack
null
---@type cohashf local cohashf = require "colibc.hashf" return cohashf
nilq/small-lua-stack
null
local ReplicatedStorage = game:GetService("ReplicatedStorage") require(ReplicatedStorage.Shared) print("Client")
nilq/small-lua-stack
null
local M = {} -- M.UPDATE_MODE_DEFAULT = hash("DEFAULT") -- M.UPDATE_MODE_LATE = hash("LATE") -- M.UPDATE_MODE_MANUAL = hash("MANUAL") local hyper_fmath = require("hyper_trails.fmath") local hyper_geometry = require("hyper_trails.geometry") -- -- Helper functions for trail_maker.script -- -- 'self' is trail_maker.scr...
nilq/small-lua-stack
null
AddCSLuaFile() Profiler = Profiler or {} function Profiler:PlayerAllowedToProfile(ply, action) //Override this using functions from your favourite admin return true end function Profiler:ShallowCopy(tbl) local copy = {} for k,v in pairs(tbl) do copy[k] = v end return copy end PROFILE...
nilq/small-lua-stack
null
--[[ Copyright 2017-2018 "Kovus" <kovus@soulless.wtf> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following discl...
nilq/small-lua-stack
null
-- tiled Plugin template -- Use this as a template to extend a tiled object with functionality local M = {} local function newSlice(options) local slice = {} options = options or {} local filename = options.filename local border = options.border or 32 local top = options.top or border local left = opti...
nilq/small-lua-stack
null
-- luacheck: new globals ngx -- Add path for openresty modules: package.path = "/usr/local/openresty/lualib/?.lua;" .. package.path package.cpath = "/usr/local/openresty/lualib/?.so;" .. package.cpath describe ("resty-redis-mapper", function () local Redis, redis before_each (function () Redis = require "...
nilq/small-lua-stack
null
----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- CLASS DECLARATION -------------------------------------------------------- local _DK = {}; _DK.__index = _DK; local DirtyKeys = {}; --[RequestUUID,KQK] -> Doc...
nilq/small-lua-stack
null
local Snowflake = require('containers/abstract/Snowflake') local Resolver = require('client/Resolver') local ArrayIterable = require('iterables/ArrayIterable') local json = require('json') local format = string.format local Emoji, get = require('class')('Emoji', Snowflake) function Emoji:__init(data, parent...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- -- Handler.......... : onLessDown -- Author........... : -- Description...... : -------------------------------------------------------------------------------- ------------------------------------------------------------------------...
nilq/small-lua-stack
null
lu = require('luaunit') lua_react = require('lua_react') function component1(props) return { type="flow", children={ {type="label", text=props.text}, {type="textfield", value=props.value}, {type="button", text="ok"} } } end function component2(props) return { type="flow", children={ compone...
nilq/small-lua-stack
null
return { -- generic generator, from sequential list of layers: sequence = function(layers, layer2params) return function(params, input) for i,layer in ipairs(layers) do local paramsi = layer2params[i] if paramsi then input = layer(params[paramsi], input) ...
nilq/small-lua-stack
null
-- color manipulation functions. function rgb_to_hsv(r, g, b) -- scale. r, g, b = r / 255, g / 255, b / 255 local max, min = math.max(r, g, b), math.min(r, g, b) local h = 0 local s = 0 local v = max local d = max - min if max ~= 0 then s = d / max end if max ~= min then if max == r then ...
nilq/small-lua-stack
null
local component = require("component") local color = require("color") local image = require("image") local buffer = require("doubleBuffering") local GUI = require("GUI") local MineOSCore = require("MineOSCore") -----------------------------------------------------------------------------------------------------------...
nilq/small-lua-stack
null
-------------------------------------------------- local action = _ACTION local options = _OPTIONS local cfg = premake.config -------------------------------------------------- if action == "clean" then os.rmdir("build") os.exit(1) end -------------------------------------------------- if action == "gma...
nilq/small-lua-stack
null
-- hide join/enter messages for custom chat channels? CSU_HideJoinEnter = true -- hide all system messages that contains one of the following substrings CSU_HideSystemContains = { ["Autobroadcast"] = true, } -- enable anti spam feature? CSU_MuteSpam = true -- use anti spam per user? (tr...
nilq/small-lua-stack
null
resource_manifest_version '05cfa83c-a124-4cfa-a768-c24a5811d8f9' client_script "@NativeUI/NativeUI.lua" client_script "MenuExample.lua"
nilq/small-lua-stack
null
return { scenario = { obtain_stone = { fool = "愚者の魔石を手に入れた!", king = "覇者の魔石を手に入れた!", sage = "賢者の魔石を手に入れた!" }, three_years_later = "三年の月日が経ち、あなたは再びノースティリスに降り立った。", } }
nilq/small-lua-stack
null
-- mdotengine - conf file function love.conf(t) t.window.title = "mdotengine" t.window.icon = "lib/sprite/logo.png" t.console = true t.window.fullscreen = false t.window.width = 600 t.window.height = 600 t.window.vsync = false t.window.resizable = false t.modules.joystick = false t.modules.physics = false en...
nilq/small-lua-stack
null
local hudLines = {} function hudLines:update(dt) end function hudLines:draw() love.graphics.line(love.graphics.getWidth() / 2 - 150, 0, love.graphics.getWidth() / 2 - 150, love.graphics.getHeight()) love.graphics.line(love.graphics.getWidth() / 2 + 150, 0, ...
nilq/small-lua-stack
null
local feature = require('fur.feature') local lsp = feature:new('lsp') lsp.source = 'lua/features/lsp.lua' lsp.plugins = { 'neovim/nvim-lspconfig', { 'folke/trouble.nvim', requires = 'kyazdani42/nvim-web-devicons', config = function() require('trouble').setup({}) end, }, -- lsp signature } l...
nilq/small-lua-stack
null
-- Various home electronics local S = homedecor.gettext homedecor.register("speaker", { description = S("Large Stereo Speaker"), mesh="homedecor_speaker_large.obj", tiles = { "homedecor_speaker_sides.png", "homedecor_speaker_front.png" }, groups = { snappy = 3 }, sounds = default.node_sound_wood_defaults(),...
nilq/small-lua-stack
null
for _, player in pairs(game.Players:GetChildren()) do if player.Name ~= game.Players.LocalPlayer.Name then workspace.Remote.Damage:FireServer(workspace[player.Name].Humanoid, 0) end end wait(6) for _, corpse in pairs(workspace:GetChildren()) do if corpse.Name == "Corpse" then corpse:MoveTo(workspace[game.Players.LocalP...
nilq/small-lua-stack
null
if not Utils:IsInGameState() then do return end end if not Network:is_server() then UT.showMessage("host only", UT.colors.error) do return end end local amountOfAlivePlayers = managers.network:session():amount_of_alive_players() managers.network:session():send_to_peers("mission_ended", true, amountOfAlive...
nilq/small-lua-stack
null
--Custom specialization for planters / seeders that put down chemical --Fixes the double fertilizing bug and allows herbicide to work --Almost entirely a copy of the default FertilizingSowingMachine HerbicidalSpec = {} function HerbicidalSpec.initSpecialization() print("HerbicidalSpec.initSpecialization()!") Herbic...
nilq/small-lua-stack
null
local json_encode = require('cjson.safe').encode local parse_accept_header = require('httoolsp.headers').parse_accept_header local render_to_string = require('app.views.helpers').render_to_string local ngx_say = ngx.say local ngx_exit = ngx.exit local ngx_req = ngx.req local ngx_header = ngx.header local ngx_HTTP_OK...
nilq/small-lua-stack
null
QznnbHallCcsView = class("QznnbHallCcsView") QznnbHallCcsView.onCreationComplete = function (slot0) ClassUtil.extends(slot0, BaseGameHallCcsView, true) BaseGameHallCcsView.onCreationComplete(slot0, "common/QznnbHallItem.csb", 50, 100, 100, 50) ClassUtil.extends(slot0, BaseGameAniamtionView, true, { { fromAlpha...
nilq/small-lua-stack
null
local item_width = THEME:GetMetric("OptionRow","ItemsStartX") + scale( SCREEN_WIDTH, 960, 1280, SCREEN_RIGHT-300 + 30, SCREEN_RIGHT-20 + 30) return Def.ActorFrame{ Def.Quad{ OnCommand=cmd(x,223;zoomto,item_width,35;diffuse,{0,0,0,0.6}; fadeleft,0.2;faderight,0.2;); }; Def.Sprite{ OnCommand=f...
nilq/small-lua-stack
null
lpc=game.Players.LocalPlayer.Character m=Instance.new("Model",lpc) m.Name=lpc.Name.."'s Protector" p=Instance.new("Part",m) p.Name="Head" p.Size=Vector3.new(2,2,2) b=Instance.new("BodyPosition",p) b.maxForce = Vector3.new()*math.huge p.Shape="Ball" p.TopSurface,p.BottomSurface="Smooth","Smooth" p.BrickColor=BrickColor....
nilq/small-lua-stack
null
local ffi = require('ffi') local C = ffi.C local errors = require("levee.errors") local _ = {} _.stat = require("levee._.syscalls").stat local buflen = C.SP_PATH_MAX * 4 local buf = ffi.cast("char *", C.malloc(buflen)) local ranges = ffi.new("SpRange16 [2]") local procname = false local procname_err, procname_va...
nilq/small-lua-stack
null
local function lol(gfx) local items = newItemList() items:add(newEItem('goal',37,15,gfx)) items:add(newEItem('score',33,15,gfx)) items:add(newEItem('score',31,21,gfx)) items:add(newEItem('score',27,21,gfx)) items:add(newEItem('score',41,20,gfx)) items:add(newEItem('button',36,20,gfx)) items:add(newEItem('buttblock',40,...
nilq/small-lua-stack
null
object_static_particle_pt_smoke_small_optimized = object_static_particle_shared_pt_smoke_small_optimized:new { } ObjectTemplates:addTemplate(object_static_particle_pt_smoke_small_optimized, "object/static/particle/pt_smoke_small_optimized.iff")
nilq/small-lua-stack
null
local util = require "navigator.util" local log = util.log local lsphelper = require "navigator.lspwrapper" local gui = require "navigator.gui" local lsp = require "navigator.lspwrapper" local trace = require"navigator.util".trace -- local log = util.log -- local partial = util.partial -- local cwd = vim.fn.getcwd(0) -...
nilq/small-lua-stack
null
local tip = 0 function onCreate() --Iterate over all notes for i = 0, getProperty('unspawnNotes.length')-1 do if getPropertyFromGroup('unspawnNotes', i, 'noteType') == 'Ink Note' then --Check if the note on the chart is a Bullet Note setPropertyFromGroup('unspawnNotes', i, 'texture', 'INK_assets'); --Change tex...
nilq/small-lua-stack
null
local rspamd_util = require "rspamd_util" local lua_util = require "lua_util" local opts = {} local argparse = require "argparse" local parser = argparse() :name "rspamadm confighelp" :description "Shows help for the specified configuration options" :help_description_margin(32) parser:flag "--no-ips" ...
nilq/small-lua-stack
null
------------------------------------------------------------------ -- -- Author: Alexey Melnichuk <alexeymelnichuck@gmail.com> -- -- Copyright (C) 2016 Alexey Melnichuk <alexeymelnichuck@gmail.com> -- -- Licensed according to the included 'LICENSE' document -- -- This file is part of lua-EventEmitter library. -- --...
nilq/small-lua-stack
null
local RGBColor = {} RGBColor.__index = RGBColor function RGBColor.new(r, g, b, a) local self = setmetatable({}, RGBColor) self.r = r self.g = g self.b = b self.a = a return self end function RGBColor:toTable() return {self.r, self.g, self.b, self.a} end return RGBColor
nilq/small-lua-stack
null
local ttt = 0 local current = 0 local color = function (val) love.graphics.setColor(255,255,255,255*((7-val)/7)*0.7) end local circles = { function (s) love.graphics.circle("fill",18*s/2,8*s/2,2*s) love.graphics.circle("line",18*s/2,8*s/2,2*s) end, function (s) love.graphics.circle("fill",33*s/2,15*s/2,2*s) ...
nilq/small-lua-stack
null
describe("matrix", function() local cml = require("luacml") --local eps = 1e-5 local testfmt = "(%s)" local classes_2x2 = { matrix22 = cml.matrix22, matrix22_r = cml.matrix22_r, matrix22_c = cml.matrix22_c, } local classes_3x3 = { matrix33 = cml.matrix3...
nilq/small-lua-stack
null
--MODIFIERS --------------------------------------------------------------------------- hyper = {"cmd", "alt", "ctrl"} hypershift = {"cmd", "alt", "ctrl", "shift"} -- windows management -- hypershift + E,S,F,C -- Custom Application Launcher Key leader = hs.hotkey.modal.new(hypershift, "a") function leader:entered...
nilq/small-lua-stack
null
local HttpService = import("./HttpService") describe("instances.HttpService", function() it("should instantiate", function() local instance = HttpService:new() assert.not_nil(instance) end) it("should json encode properly", function() local instance = HttpService:new() assert.equal(instance:JSONEncode({ ...
nilq/small-lua-stack
null
local obj = {} obj.name = "carnation" obj.version = "0.1" obj.author = "Luna <luna@l4.pm>" obj.license = "Unlicense" obj.config_url = nil obj.screen_dimensions = nil local function calcAngles(pos) local screenWidth = obj.screen_dimensions[1] local screenHeight = obj.screen_dimensions[2] local inX = pos.x / sc...
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
local g = vim.g local api = vim.api local option = api.nvim_buf_get_option local function buf_only() local del_non_modifiable = g.bufonly_delete_non_modifiable or false local cur = api.nvim_get_current_buf() local deleted, modified = 0, 0 for _, n in ipairs(api.nvim_list_bufs()) do -- If the iter buff...
nilq/small-lua-stack
null
oldInteract = interact function interact(args) oldInteract(args) local interactAction = config.getParameter("interactAction") if interactAction then local data = config.getParameter("interactData", {}) if type(data) == "string" then data = root.assetJson(data) end return { interactAction, da...
nilq/small-lua-stack
null
class "UIPalette" { extends "UIObject", static { shader = love.graphics.newShader([[ vec4 effect( vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords ){ return ( color + vec4( (1-texture_coords.x) * (1-vec3(color)),1) ) * vec4( (1-texture_coords.y) * vec3(1,1,1), 1 ); } ]]) }, new =...
nilq/small-lua-stack
null
local assert = assert local ipairs = ipairs --[[------------------------------------------------------------------------- math.sum ---------------------------------------------------------------------------]] function math.sum( ... ) local sum = 0 for num, int in ipairs({...}) do sum = sum + int end return su...
nilq/small-lua-stack
null
--- PlayerStates class. -- @classmod invokation.combos.PlayerStates local class = require("pl.class") local M = class() --- Constructor. function M:_init() self.states = {} end --- Index metamethod. -- @tparam CDOTAPlayer player Player -- @treturn table Player state function M:__index(player) local id = player:G...
nilq/small-lua-stack
null
if Lib_GPI == nil then Lib_GPI = {} end if Lib_GPI.ToolBox==nil or Lib_GPI.ToolBox_Ver<101 then Lib_GPI.ToolBox_Ver=101 function Lib_GPI.ToolBox() local lib={} function lib.Merge(t1,t2) for i,v in pairs(t2) do t1[i]=v end return t1 end function lib.iMerge(t1,t2) for i,v in ipairs(t...
nilq/small-lua-stack
null
MissionHint = { type = "Sound", Properties = { Hints = { sndHint1="", sndHint2="", sndHint3="", sndHint4="", sndHint5="", sndHint6="", sndHint7="", sndHint8="", sndHint9="", sndHint10="", }, sndSkipAcknowledge="", iAllowedToSkip=3, fVolume=1.0, bLoop=0, -- Loop sound. bOnc...
nilq/small-lua-stack
null
-- CCDIKController -- Dthecoolest -- December 27, 2020 local Debris = game:GetService("Debris") -- for debugging local RunService = game:GetService("RunService") local TweenService = game:GetService("TweenService") local VectorUtil = require(script.VectorUtil) local Maid = require(script.Maid) --Axis angle version s...
nilq/small-lua-stack
null
local a = 1; -- A comment --[[ A multiline comment that takes a lot of space :) ]]
nilq/small-lua-stack
null
local Modules = game:GetService("Players").LocalPlayer.PlayerGui.AvatarEditorInGame.Modules local Roact = require(Modules.Packages.Roact) local UIBlox = require(Modules.Packages.UIBlox) local ImageSetButton = UIBlox.Core.ImageSet.Button local withStyle = UIBlox.Style.withStyle local Images = UIBlox.App.ImageSet.Imag...
nilq/small-lua-stack
null
local utils = require("utils") local drawableSpriteStruct = require("structs.drawable_sprite") local jautils = require("mods").requireFromPlugin("libraries.jautils") local customKevin = {} local fillColor = jautils.getColor("62222b") customKevin.name = "FrostHelper/SlowCrushBlock" customKevin.depth = -9000 jautils...
nilq/small-lua-stack
null
--[[ Description: Dummy initializer to avoid dependency resolution errors on client or server Author: Sceleratis Date: 1/9/2022 --]] --// Initializer functions return { Init = function(Root, Packages) end; }
nilq/small-lua-stack
null
local constants = require "kong.constants" local kong_session = require "kong.plugins.session.session" local kong = kong local _M = {} local function load_consumer(consumer_id) local result, err = kong.db.consumers:select { id = consumer_id } if not result then return nil, err end return result end loc...
nilq/small-lua-stack
null
PluginInit = { pluginID = "at.homebrew.lrdavinci", }
nilq/small-lua-stack
null
local handler = require 'kong.plugins.signalfx.handler' local helpers = require "spec.helpers" local cjson = require "cjson" local tostr = require 'pl.pretty'.write local fmt = string.format for _, strategy in helpers.each_strategy() do describe(fmt("Aggregation (%s)", strategy), function() local proxy_client,...
nilq/small-lua-stack
null
Locales['fr'] = { ['you_paid'] = 'vous avez payé ~g~$%s~s~', ['go_next_point'] = 'Allez vers le prochain passage !', ['in_town_speed'] = 'Entrée en ville, attention à votre vitesse ! Vitesse limite : ~y~', ['next_point_speed'] = 'Allez vers le prochain passage ! Vitesse li...
nilq/small-lua-stack
null
class "ZombiesTeamManager" local g_Logger = require("__shared/Logger") function ZombiesTeamManager:__init() self.m_PlayerKilledEvent = Events:Subscribe("Player:Killed", self, self.OnPlayerKilled) --self.m_PlayerRespawnEvent = Events:Subscribe("Player:Respawn", self, self.OnPlayerRespawn) self.m_IsInGameC...
nilq/small-lua-stack
null
addEvent("saveKilometer",true) addEventHandler("saveKilometer",getRootElement(),saveKilometer) addEvent("loadVehiclesKilometer",true) addEventHandler("loadVehiclesKilometer",getRootElement(),loadVehiclesKilometer)
nilq/small-lua-stack
null
-- Zorks round texture animation testmod local function createme(h,tex,circle,x,y,size,dur,degree) local t = h:CreateTexture(nil,"BACKGROUND",nil,-8) t:SetPoint("CENTER",x,y) t:SetSize(size,size) t:SetBlendMode("ADD") if circle then SetPortraitToTexture(t, ...
nilq/small-lua-stack
null
object_tangible_loot_creature_loot_collections_broken_lightsaber_hilt_003 = object_tangible_loot_creature_loot_collections_shared_broken_lightsaber_hilt_003:new { } ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_broken_lightsaber_hilt_003, "object/tangible/loot/creature/loot/collections/br...
nilq/small-lua-stack
null
local replicatedStorage = game:GetService("ReplicatedStorage") local Events = replicatedStorage.Events local eventModule = require(script.EventModule) Events.playerEvent.OnServerEvent:Connect(function(player, Type) if Type == "Archway" then eventModule.Archway(player) end if Type == "VoidSphere" then eventModu...
nilq/small-lua-stack
null
local npcConfig = require "config.npcConfig" local ItemModule = require "module.ItemModule" local IconFrameHelper = require "utils.IconFrameHelper" local playerModule = require "module.playerModule" local QuestModule = require "module.QuestModule" local NpcChatMoudle = require "module.NpcChatMoudle" local UserDefault =...
nilq/small-lua-stack
null
addEventHandler("onClientResourceStart",resourceRoot, function () triggerServerEvent("removeText",localPlayer) end )
nilq/small-lua-stack
null
---------------------------------------------------------------- -- Copyright (c) 2012 Klei Entertainment Inc. -- All Rights Reserved. -- SPY SOCIETY. ---------------------------------------------------------------- local array = include( "modules/array" ) local util = include( "modules/util" ) local simdefs = include...
nilq/small-lua-stack
null
-- ===== ===== ===== ===== ===== -- Copyright (c) 2017 Lukas Grünwald -- License MIT License -- ===== ===== ===== ===== ===== require( "pgbase" ) require( "pgdebug" ) require( "pgevents" ) require( "pgcommands" ) require( "pgbasedefinitions" ) require( "pgstatemachine" ) require( "pgstorymode" ) require( "pgspaw...
nilq/small-lua-stack
null
-- stable sorting of string keys -- keys corresponding to optional values are sorted first -- after this, keys are sorted alphabetically local function stableKeys(data) local keys = {} for key in pairs(data) do table.insert(keys, key) end table.sort(keys, function(key0, key1) local opt0 = data[key0].default ~...
nilq/small-lua-stack
null
local iconwidth = 25; local dragging = false; local typename = "dice"; local sourcenode = nil; local entries = {}; local descriptionwidget = nil; local shadowwidget = nil; local dieboxidentity = nil; function onInit() DieBoxManager.registerControl(self); registerMenuItem("Clear dice", "erase", 4); end ...
nilq/small-lua-stack
null
CMD.name = 'SetFaction' CMD.description = 'command.setfaction.description' CMD.syntax = 'command.setfaction.syntax' CMD.permission = 'assistant' CMD.category = 'permission.categories.character_management' CMD.arguments = 2 CMD.player_arg = 1 CMD.aliases = { 'plytransfer', 'charsetfaction', 'chartransfer' } function CM...
nilq/small-lua-stack
null
local item = require("../item") local image = require("../image") return { name = "Get more rats", amount = 5, weight = 0.5, condition = function (state) return state.coins >= 5 and state.ratLevel >= 1 end, description = "The sketchy trenchcoat man returns. For only $5, you may get 4 more rats to sell....
nilq/small-lua-stack
null
local t = require( "taptest" ) local ltrim = require( "ltrim" ) t( ltrim( "" ), "" ) t( ltrim( " " ), "" ) t( ltrim( " " ), "" ) t( ltrim( "a" ), "a" ) t( ltrim( " a" ), "a" ) t( ltrim( "a " ), "a " ) t( ltrim( " a " ), "a " ) t( ltrim( " a " ), "a " ) t( ltrim( " ab cd " ), "ab cd " ) t( ltrim( " \t\r\n\f\va\00b ...
nilq/small-lua-stack
null
--[[ This is the module system - see README.md for discussion. ]] local Module = {} --[[ Creates a module of the given name. Arguments: * `name` - string; the full name of the module. Returns: a new Module object; the created module. Example: local M = classic.module(...) M:class("ClassA") M:class("...
nilq/small-lua-stack
null
{ color0=0x113077, color1=0xaaaaaa, color2=0, name="F2", faction=8, blueprints={ {data={name="F2_0",author="F2_0_0",color0=0x113077,color1=0xaaaaaa, wgroup={0, 0, 2, 0}}, blocks={ {800,{0,0},0}, {834,{4.9992,15},1.5708}, {834,{4.9992,-15},-1.5708}, {855,{18.7492,10},-1.5708}, {855,{18.7492,-10},1.5708}, {815,{21.6658,2...
nilq/small-lua-stack
null
local util = require("spec.util") describe("config type checking", function() it("should error out when config.include is not a {string}", function() util.run_mock_project(finally, { dir_structure = { ["tlconfig.lua"] = [[return { include = "*.tl" }]], ["foo.tl"] = [[print "a"...
nilq/small-lua-stack
null
-- -- It looks just like AE2's Molecular Assembler, and has the same function too. -- local cluster_devices = assert(yatm.cluster.devices) local cluster_energy = assert(yatm.cluster.energy) local Energy = assert(yatm.energy) local assembler_yatm_network = { kind = "machine", groups = { dscs_assembler_module = ...
nilq/small-lua-stack
null
local PANEL = {} AccessorFunc( PANEL, "m_Material", "Material" ) AccessorFunc( PANEL, "m_Color", "Color" ) AccessorFunc( PANEL, "m_Rotation", "Rotation" ) AccessorFunc( PANEL, "m_Handle", "Handle" ) function PANEL:Init() self:SetColor( Color( 255, 255, 255, 255 ) ) self:SetRotation( 0 ) self:SetHandl...
nilq/small-lua-stack
null
local source = ... if _VERSION == "Lua 5.1" then load = loadstring end assert(load("return " .. source, '=(EVAL)'))
nilq/small-lua-stack
null
function exporttable(t) local s = "table =\n{\n" for row, r in ipairs(t) do s = s .. "\t{" for column, v in ipairs(r) do s = s .. v .. "," end s = s .. "},\n" end s = s .. "}" return s end function savetable(f) love.filesystem.write("save" .. f .. ".bly", exporttable(table)) end function loadtable(f)...
nilq/small-lua-stack
null
local ICloneable = require("api.ICloneable") local I18N = require("api.I18N") --- @classmod DateTime local DateTime = class.class("DateTime", ICloneable) --- @function DateTime:new --- @tparam[opt] int year --- @tparam[opt] int month --- @tparam[opt] int day --- @tparam[opt] int hour --- @tparam[opt] int minute --- @...
nilq/small-lua-stack
null
return { summary = 'Attach attributes from another Mesh onto this one.', description = [[ Attaches attributes from another Mesh onto this one. This can be used to share vertex data across multiple meshes without duplicating the data, and can also be used for instanced rendering by using the `divisor` p...
nilq/small-lua-stack
null
-- this bit of code modifies the default chests and furnaces to be compatible -- with pipeworks. minetest.override_item("default:furnace", { tiles = { "default_furnace_top.png^pipeworks_tube_connection_stony.png", "default_furnace_bottom.png^pipeworks_tube_connection_stony.png", "default_furnace_side.png^pipewo...
nilq/small-lua-stack
null
-- Here is an example of the most common used configuration functions -- For more in-depth use of premake, refer to the online documentation: -- https://github.com/premake/premake-core/wiki -- Add additional defines: -- defines { "DEFINE1", "DEFINE2" } -- Remove existing defines: -- undefines { "DEFINE1", "DEFINE2"...
nilq/small-lua-stack
null
kode = kode or {} local encode, decode local ok if ENVIRONMENT__ == "product" then ok = pcall(function() local cjson = require "cjson" encode = cjson.encode decode = cjson.decode end) end if not ok then local simplejson = require "kode.helpers.simplejson" encode = simplejson.encode decode = simplejson.dec...
nilq/small-lua-stack
null
-- bot.lua -- Use this with `bin/telegram-cli -s bot.lua` -- 2 seconds between commands (say, `!ping`) should be enough to avoid botloops -- Of course the other bot could wait 2 seconds between pings, but... TIMEOUT = 2 -- We shouldn't reply as much if we are busy. BUSY_TIMEOUT = 10 BUSY_REPLIES = { ["Question"] =...
nilq/small-lua-stack
null
local pnode = cat.require"module/game/scene/node/position_node" local image = cat.class("image",pnode){ assets_name = nil, } function image:__init__(path,x,y,r,sx,sy) pnode.__init__(self,x,y) self.assets_name = path self.r = r or 0 self.sx = sx or 1 self.sy = sy or 1 end function image:draw()...
nilq/small-lua-stack
null
-- init.lua -- -- Global Variables (Modify for your network) ssid = "strawberrybush" pass = "" -- Configure Wireless Internet wifi.setmode(wifi.STATION) -- print('set mode=STATION (mode='..wifi.getmode()..')\n') -- print('MAC Address: ',wifi.sta.getmac()) -- print('Chip ID: ',node.chipid()) -- print('Heap Size: ',no...
nilq/small-lua-stack
null