repo_name stringlengths 6 78 | path stringlengths 4 206 | copies stringclasses 281
values | size stringlengths 4 7 | content stringlengths 625 1.05M | license stringclasses 15
values |
|---|---|---|---|---|---|
danielmunro/luamud | main.lua | 1 | 2130 | local game = require "game"
local command = require "command"
local room = require "room"
local location = require "location"
local f = require "functional"
math.randomseed(os.time())
function uuid()
local template ='xxxyxxxyxxxyxxxyxxxyxxxyxxxyxxxy'
return string.gsub(template, '[xy]', function (c)
l... | mit |
unusualcrow/redead_reloaded | gamemode/cl_scoreboard.lua | 1 | 10267 | function GM:CustomizeScoreboard()
-- these fonts are used in the header on the top of the scoreboard
surface.CreateFont("MenuTitle", {
size = 30,
weight = 500,
antialias = true,
additive = false,
font = "Graffiare"
})
surface.CreateFont("MenuDesc", {
size = 16,
weight = 800,
antialias = true,
add... | mit |
czfshine/Don-t-Starve | data/DLC0001/scripts/map/levels/survival.lua | 1 | 9656 | require("map/level")
----------------------------------
-- Survival levels
----------------------------------
AddLevel(LEVELTYPE.SURVIVAL, {
id="SURVIVAL_DEFAULT",
name=STRINGS.UI.CUSTOMIZATIONSCREEN.PRESETLEVELS[1],
desc=STRINGS.UI.CUSTOMIZATIONSCREEN.PRESETLEVELDESC[1],
overrides={
{"start_setpeice", ... | gpl-2.0 |
danielmunro/luamud | area.lua | 1 | 2358 | local lyaml = require "lyaml"
local room = require "room"
local location = require "location"
local mob = require "mob"
local item = require "item"
local area = {
list = {}
}
function area:load()
for i in io.popen("ls data/areas/"):lines() do
print("loading " .. i .. " area file")
local f = io.open("data/... | mit |
czfshine/Don-t-Starve | data/DLC0001/scripts/prefabs/glommerflower.lua | 1 | 2793 | local assets=
{
Asset("ANIM", "anim/glommer_flower.zip"),
}
local prefabs =
{
"glommer",
}
local function OnLoseChild(inst, child)
print("bye bye glommer")
inst:AddComponent("perishable")
inst.components.perishable:SetPerishTime(TUNING.PERISH_FAST)
inst:AddTag("show_spoilage")
inst.deadchi... | gpl-2.0 |
czfshine/Don-t-Starve | ZeroBraneStudio/lualibs/metalua/compiler/parser/lexer.lua | 4 | 1560 | --------------------------------------------------------------------------------
-- Copyright (c) 2006-2014 Fabien Fleutot and others.
--
-- All rights reserved.
--
-- This program and the accompanying materials are made available
-- under the terms of the Eclipse Public License v1.0 which
-- accompanies this distribut... | gpl-2.0 |
Imacc2009/hl2rp | entities/weapons/nut_stunstick.lua | 1 | 7675 | AddCSLuaFile()
if (CLIENT) then
SWEP.PrintName = "Stunstick"
SWEP.Slot = 1
SWEP.SlotPos = 2
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = false
end
SWEP.Author = "Chessnut"
SWEP.Instructions = "Primary Fire: [RAISED] Strike\nALT + Primary Fire: [RAISED] Toggle stun\nSecondary Fire: Push/Knock"
SWEP.Purpose = "Hitti... | gpl-2.0 |
victorperin/tibia-server | data/npc/scripts/Briasol.lua | 1 | 1694 | local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg)... | apache-2.0 |
CrazyEddieTK/Zero-K | scripts/dynamicCommander.lua | 3 | 10979 | local INLOS = {inlos = true}
local spSetUnitShieldState = Spring.SetUnitShieldState
local dgunTable
local weapon1
local weapon2
local shield
local weaponNumMap = {}
local weaponsInitialized = false
local paceMult
local scaleMult
local commWreckUnitRulesParam = {"comm_baseWreckID", "comm_baseHeapID"}
local moduleWreck... | gpl-2.0 |
victorperin/tibia-server | data/movements/scripts/the queen of the banshees quest/theSixthSealFlame.lua | 1 | 1353 | local function doCheckCampfires(cpPos, itemid)
local Tile = Position(cpPos):getTile()
if Tile then
local thing = Tile:getItemById(itemid)
if thing and thing:isItem() then
return true
else
return false
end
end
end
local config = {
[1] = {pos = {x = 32309, y = 31975, z = 13}, cpId = 1421},
[2] = {pos ... | apache-2.0 |
czfshine/Don-t-Starve | data/scripts/brains/koalefantbrain.lua | 1 | 1501 | require "behaviours/wander"
require "behaviours/faceentity"
require "behaviours/chaseandattack"
require "behaviours/panic"
require "behaviours/runaway"
local MAX_CHASE_TIME = 6
local WANDER_DIST_DAY = 20
local WANDER_DIST_NIGHT = 5
local RUN_AWAY_DIST = 6
local STOP_RUN_AWAY_DIST = 12
local START_FACE_DIST = 14
loca... | gpl-2.0 |
v3n/altertum | ext/luajit/src/jit/bc.lua | 78 | 5620 | ----------------------------------------------------------------------------
-- LuaJIT bytecode listing module.
--
-- Copyright (C) 2005-2015 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
----------------------------------------------------------------------------
-... | mit |
v3n/altertum | ext/luajit/dynasm/dasm_mips.lua | 120 | 28080 | ------------------------------------------------------------------------------
-- DynASM MIPS module.
--
-- Copyright (C) 2005-2015 Mike Pall. All rights reserved.
-- See dynasm.lua for full copyright notice.
------------------------------------------------------------------------------
-- Module information:
local _i... | mit |
sigma-random/wireshark | test/lua/nstime.lua | 32 | 5569 | -- test script for various Lua functions
-- use with dhcp.pcap in test/captures directory
------------- general test helper funcs ------------
local FRAME = "frame"
local OTHER = "other"
local packet_counts = {}
local function incPktCount(name)
if not packet_counts[name] then
packet_counts[name] = 1
... | gpl-2.0 |
foodora/kong-plugin-jwt-crafter | test/plugins/jwt-crafter/access_spec.lua | 1 | 4883 | local helpers = require "spec.helpers"
local cjson = require "cjson"
local meta = require "kong.meta"
local utils = require "kong.tools.utils"
local jwt_parser = require "kong.plugins.jwt.jwt_parser"
describe("Plugin: jwt-crafter (access)", function()
local client, consumer, jwt_secret
local function has_value(t... | mit |
ioiasff/tqwr | plugins/sudoers.lua | 86 | 2292 | local function set_bot_photo(msg, success, result)
local receiver = get_receiver(msg)
if success then
local file = 'data/photos/bot.jpg'
print('File downloaded to:', result)
os.rename(result, file)
print('File moved to:', file)
set_profile_photo(file, ok_cb, false)
send_large_msg(receiver, '... | gpl-2.0 |
andywingo/snabbswitch | src/program/top/top.lua | 13 | 5353 | module(..., package.seeall)
local ffi = require("ffi")
local C = ffi.C
local lib = require("core.lib")
local shm = require("core.shm")
local counter = require("core.counter")
local S = require("syscall")
local usage = require("program.top.README_inc")
local long_opts = {
help = "h"
}
function clearterm () io.writ... | apache-2.0 |
starkos/premake-core | modules/vstudio/tests/vc200x/test_nmake_settings.lua | 14 | 2271 | --
-- tests/actions/vstudio/vc200x/test_nmake_settings.lua
-- Validate generation the VCNMakeTool element in Visual Studio 200x C/C++ projects.
-- Copyright (c) 2013 Jason Perkins and the Premake project
--
local p = premake
local suite = test.declare("vs200x_nmake_settings")
local vc200x = p.vstudio.vc200x
--
--... | bsd-3-clause |
czfshine/Don-t-Starve | mods/Cretaceous/wicker/math/complex.lua | 6 | 4422 | --[[
-- Complex number implementation as a subclass of Vector3 (with zero y coordinate).
--]]
local Pred = wickerrequire "lib.predicates"
local MathCommon = wickerrequire "math.common"
local math = math
------------------------------------------------------------------------
local C = Class(Vector3, function(self,... | gpl-2.0 |
tst2005/lua-aio | foo-poc/foo.lua | 1 | 6124 | do --{{
local sources, priorities = {}, {};assert(not sources["bootstrap.fallback"],"module already exists")sources["bootstrap.fallback"]=([===[-- <pack bootstrap.fallback> --
-- ----------------------------------------------------------
--local assert = assert
local error, ipairs, type = error, ipairs, type
local fo... | mit |
ywy2090/muduo | premake4.lua | 58 | 2093 | solution "muduo"
projectdir = basedir()
builddir = path.join(projectdir, '../build')
installdir = path.join(projectdir, '../install')
bindir = path.join(installdir, 'bin')
libdir = path.join(installdir, 'lib')
includedir = path.join(installdir, 'include')
curheadersdir = includedir
-- s... | bsd-3-clause |
victorperin/tibia-server | data/npc/scripts/A Fluffy Squirrel.lua | 1 | 1161 | local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg)... | apache-2.0 |
czfshine/Don-t-Starve | data/DLC0001/scripts/prefabs/raincoat.lua | 1 | 1549 | local assets=
{
Asset("ANIM", "anim/torso_rain.zip"),
}
local function onequip(inst, owner)
owner.AnimState:OverrideSymbol("swap_body", "torso_rain", "swap_body")
inst.components.fueled:StartConsuming()
end
local function onunequip(inst, owner)
owner.AnimState:ClearOverrideSymbol("swap_body")
inst.... | gpl-2.0 |
ranisalt/forgottenserver | data/scripts/actions/others/flower_pot.lua | 6 | 6445 | local flowers = {
{itemid = 7655, watered = false, advance = false, msg = "You should plant some seeds first."},
{itemid = 7665, watered = true, advance = false, msg = "You watered your plant.", after = 7673},
{itemid = 7673, watered = false, advance = false, msg = "Your plant doesn't need water."},
{itemid = 7670,... | gpl-2.0 |
czfshine/Don-t-Starve | data/scripts/screens/endgamedialog.lua | 1 | 2775 | local Screen = require "widgets/screen"
local Button = require "widgets/button"
local AnimButton = require "widgets/animbutton"
local ImageButton = require "widgets/imagebutton"
local Text = require "widgets/text"
local Image = require "widgets/image"
local UIAnim = require "widgets/uianim"
local Widget = require "widg... | gpl-2.0 |
alexgrist/NutScript | plugins/thirdperson.lua | 1 | 5056 |
local PLUGIN = PLUGIN
PLUGIN.name = "Third Person"
PLUGIN.author = "Black Tea"
PLUGIN.description = "Enables third person camera usage."
ix.config.Add("thirdperson", false, "Allow Thirdperson in the server.", nil, {
category = "server"
})
if (CLIENT) then
local function isHidden()
return !ix.config.Get("thirdpe... | mit |
v3n/altertum | ext/luajit/src/jit/dis_ppc.lua | 78 | 20318 | ----------------------------------------------------------------------------
-- LuaJIT PPC disassembler module.
--
-- Copyright (C) 2005-2015 Mike Pall. All rights reserved.
-- Released under the MIT/X license. See Copyright Notice in luajit.h
----------------------------------------------------------------------------... | mit |
CrazyEddieTK/Zero-K | scripts/cloakassault.lua | 15 | 15279 | local base = piece 'base'
local chest = piece 'chest'
local aim = piece 'aim'
local flare = piece 'flare'
local hips = piece 'hips'
local lthigh = piece 'lthigh'
local rthigh = piece 'rthigh'
local lforearm = piece 'lforearm'
local rforearm = piece 'rforearm'
local rshoulder = piece 'rshoulder'
local lshoulde... | gpl-2.0 |
czfshine/Don-t-Starve | ZeroBraneStudio/lualibs/dist/logger.lua | 6 | 2459 | -- Simple logger for LuaDist.
module ("dist.logger", package.seeall)
local cfg = require "dist.config"
local sys = require "dist.sys"
-- Open 'log_file' and return a log, or nil and error msg on error.
local function get_log(log_file)
log_file = log_file or cfg.log_file
assert(type(log_file) == "string", "lo... | gpl-2.0 |
czfshine/Don-t-Starve | data/scripts/map/static_layouts/brokenaltar.lua | 1 | 7541 | return {
version = "1.1",
luaversion = "5.1",
orientation = "orthogonal",
width = 40,
height = 40,
tilewidth = 16,
tileheight = 16,
properties = {},
tilesets = {
{
name = "tiles",
firstgid = 1,
tilewidth = 64,
tileheight = 64,
spacing = 0,
margin = 0,
imag... | gpl-2.0 |
rzh/mongocraft | world/Plugins/Core/worldlimiter.lua | 5 | 1163 | function OnPlayerMoving( Player )
local LimitWorldWidth = WorldsWorldLimit[Player:GetWorld():GetName()]
-- The world probably was created by an external plugin. Lets load the settings.
if not LimitWorldWidth then
LoadWorldSettings(Player:GetWorld())
LimitWorldWidth = WorldsWorldLimit[Player:GetWorld():GetName(... | apache-2.0 |
AntonioModer/skeletor | skeletor/unittests/testSkeletorComplexLoading.lua | 2 | 2012 | -- get the relative path
local thispath = select('1', ...):match(".+%.") or ""
local parent = "unittests."
thispath = string.sub(thispath, 1, string.len(thispath) - string.len(parent))
-- load skeletor module
local Skeletor = require(thispath..'skeletor')
skeletor = Skeletor(
{
wireStyle = "test",
shapeSx = 9999
... | mit |
CrazyEddieTK/Zero-K | effects/fires.lua | 17 | 9989 | -- flamer
-- fire1_burn1_flame1
-- fire1_smoke1
-- fire1_burnlight
-- fire1_burn1_flame3
-- fire1_burn1_flame4
-- fire1_burn1
-- fire1_burn1_flame2
-- fire1
return {
["flamer"] = {
fire = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
... | gpl-2.0 |
victorperin/tibia-server | data/npc/scripts/Petros.lua | 2 | 4369 | local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function ... | apache-2.0 |
victorperin/tibia-server | data/npc/scripts/Captain Seagull.lua | 2 | 8152 | local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function ... | apache-2.0 |
CrazyEddieTK/Zero-K | LuaRules/Gadgets/mission_galaxy_campaign_battle.lua | 2 | 50116 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function gadget:GetInfo()
return {
name = "Galaxy Campaign Battle Handler",
desc = "Implements unit locks and structure placement.",
author = "GoogleFr... | gpl-2.0 |
TimSimpson/Macaroni | Main/App/Source/test/lua/Macaroni/Parser/Pippy/Tests/PippyParserTests_Operators.lua | 2 | 3271 | --------------------------------------------------------------------------------
-- Copyright 2011 Tim Simpson
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use self file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.o... | apache-2.0 |
victorperin/tibia-server | data/spells/scripts/support/sharpshooter.lua | 7 | 1137 | local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
local condition = Condition(CONDITION_ATTRIBUTES)
condition:setParameter(CONDITION_PARAM_TICKS, 10000)
condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, 150)
condition:setP... | apache-2.0 |
CrazyEddieTK/Zero-K | LuaUI/Widgets/dbg_stuckkeys.lua | 18 | 1634 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function widget:GetInfo()
return {
name = "Stuck Keys",
desc = "v0.01 Alerts user when a key is stuck.",
author = "CarRepairer",
... | gpl-2.0 |
TimSimpson/Macaroni | Main/App/Source/test/lua/Macaroni/Model/TypeArgumentListTests.lua | 2 | 5146 | --------------------------------------------------------------------------------
-- Copyright 2011 Tim Simpson
--
-- 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.a... | apache-2.0 |
rgieseke/textadept | modules/textadept/find.lua | 1 | 24351 | -- Copyright 2007-2022 Mitchell. See LICENSE.
local M = ui.find
--[[ This comment is for LuaDoc.
---
-- Textadept's Find & Replace pane.
-- @field find_entry_text (string)
-- The text in the "Find" entry.
-- @field replace_entry_text (string)
-- The text in the "Replace" entry.
-- When searching for text in a d... | mit |
CrazyEddieTK/Zero-K | units/planescout.lua | 5 | 2149 | unitDef = {
unitname = [[planescout]],
name = [[Owl]],
description = [[Area Jammer, Radar/Sonar Plane]],
brakerate = 0.4,
buildCostMetal = 340,
builder = false,
buildPic = [[planescout.png]],
canFly = true,
canGuard ... | gpl-2.0 |
ho3einkj/bot | libs/lua-redis.lua | 580 | 35599 | local redis = {
_VERSION = 'redis-lua 2.0.4',
_DESCRIPTION = 'A Lua client library for the redis key value storage system.',
_COPYRIGHT = 'Copyright (C) 2009-2012 Daniele Alessandri',
}
-- The following line is used for backwards compatibility in order to keep the `Redis`
-- global module name. Using... | gpl-2.0 |
timroes/awesome | tests/test-awful-layout.lua | 10 | 4027 | -- This test hit the client layout code paths to see if there is errors.
-- it doesn't check if the layout are correct.
local awful = require("awful")
local gtable = require("gears.table")
local first_layout = nil
local t = nil
local has_spawned = false
local steps = {
-- Add enough clients
function(count... | gpl-2.0 |
CrazyEddieTK/Zero-K | LuaUI/Widgets/chili/Skins/Evolved/skin.lua | 4 | 18614 | --//=============================================================================
--// Skin
local skin = {
info = {
name = "Evolved",
version = "0.3",
author = "jK",
}
}
--//=============================================================================
--//
skin.general = {
focusColor = {0.94, ... | gpl-2.0 |
gaoch023/OpenRA | lua/sandbox.lua | 84 | 5098 | local sandbox = {
_VERSION = "sandbox 0.5",
_DESCRIPTION = "A pure-lua solution for running untrusted Lua code.",
_URL = "https://github.com/kikito/sandbox.lua",
_LICENSE = [[
MIT LICENSE
Copyright (c) 2013 Enrique García Cota
Permission is hereby granted, free of charge, to an... | gpl-3.0 |
czfshine/Don-t-Starve | data/scripts/map/protected_resources.lua | 1 | 1633 | require("constants")
local StaticLayout = require("map/static_layout")
local Rare = {
}
local Forest = {
["leif_forest"] = StaticLayout.Get("map/static_layouts/leif_forest"),--, { areas={["RandomTreeAndLeif"]={""}},}),
["spider_forest"] = StaticLayout.Get("map/static_layouts/spider_forest"),
}
local Grasslands = ... | gpl-2.0 |
ranisalt/forgottenserver | data/scripts/actions/others/taming.lua | 7 | 14773 | local TYPE_ITEM, TYPE_MONSTER = 1, 2
local config = {
[5907] = { -- slingshot
name = "bear",
id = 3,
type = TYPE_MONSTER,
achievement = "Bearbaiting",
chance = 20,
fail = {
{run = true, text = "The bear ran away."},
{broke = true, text = "Oh no! The slingshot broke."},
{sound = "GRRRRRRRRRRRR", t... | gpl-2.0 |
alireza1998/mehrshad | plugins/all.lua | 1321 | 4661 | do
data = load_data(_config.moderation.data)
local function get_msgs_user_chat(user_id, chat_id)
local user_info = {}
local uhash = 'user:'..user_id
local user = redis:hgetall(uhash)
local um_hash = 'msgs:'..user_id..':'..chat_id
user_info.msgs = tonumber(redis:get(um_hash) or 0)
user_info.name = user_print... | gpl-2.0 |
satanail/ArcTic-d | src/scripts/lua/Stable Scripts/Outland/Hellfire Peninsula/BOSS_Hellfire_Lord_Kazzak.lua | 30 | 1954 | local Didthat = 0
function Kazzak_Enrage(Unit, event, miscunit, misc)
if Unit:GetHealthPct() < 30 and Didthat == 0 then
Unit:FullCastSpell(34670)
Didthat = 1
else
end
end
function Kazzak_Shadow_Bolt(Unit, event, miscunit, misc)
print "Kazzak Shadow Bolt"
Unit:FullCastSpellOnTarget(29924,Unit:GetClosestPlayer(... | agpl-3.0 |
starkos/premake-core | tests/base/test_rule.lua | 4 | 2079 | --
-- tests/base/test_rule.lua
-- Automated test suite for custom rule.
-- Copyright (c) 2008-2021 Jason Perkins and the Premake project
--
local suite = test.declare("rule")
local p = premake
function suite.setup()
rule "TestRule"
display "Test Rule"
fileextension ".rule"
propertydefinition {
name = ... | bsd-3-clause |
czfshine/Don-t-Starve | data/DLC0001/scripts/components/moisture.lua | 1 | 8264 | local easing = require("easing")
local Moisture = Class(function(self, inst)
self.inst = inst
self.moistureclamp = {min = 0, max = 100}
self.moisture = 0
self.numSegs = 5
self.baseDryingRate = 0
self.maxDryingRate = 0.1
self.minDryingRate = 0
self.maxPlayerTempDrying = 5
self.minP... | gpl-2.0 |
Sinaloit/EPGP | modules/boss.lua | 1 | 1945 | local EPGP = Apollo.GetAddon("EPGP")
local mod = EPGP:NewModule("boss")
--local Debug = LibStub("LibDebug-1.0")
local DLG = { Spawn = function(self,a,b) Print(a) end, ActiveDialog = function() return false end }
local L = EPGP.L
local in_combat = false
function mod:ShowPopup(event_name, boss_name)
while (GameLib.Get... | mit |
czfshine/Don-t-Starve | data/DLC0001/scripts/components/colourcubemanager.lua | 1 | 6895 | local easing = require("easing")
local ColourCubeManager = Class(function(self, inst)
self.inst = inst
self.IDENTITY_COLOURCUBE = "images/colour_cubes/identity_colourcube.tex"
self.INSANITY_CCS =
{
DAY = "images/colour_cubes/insane_day_cc.tex",
DUSK = "images/colour_cubes/insane_dusk_cc.tex",
NIGHT = ... | gpl-2.0 |
CrazyEddieTK/Zero-K | scripts/cruisemissile.lua | 5 | 1424 | include "constants.lua"
local base = piece 'base'
local launched = false
function script.AimWeapon1(heading, pitch) return true end
local function RemoveMissile()
GG.MissileSilo.DestroyMissile(unitID, unitDefID)
Spring.SetUnitRulesParam(unitID, "do_not_save", 1)
Spring.SetUnitNoSelect(unitID, true)
Spring.Set... | gpl-2.0 |
CrazyEddieTK/Zero-K | LuaRules/Gadgets/unit_dont_fire_at_radar.lua | 4 | 7338 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
if not gadgetHandler:IsSyncedCode() then
return
end
--------------------------------------------------------------------------------
------------------------... | gpl-2.0 |
timroes/awesome | tests/examples/wibox/widget/progressbar/encapsulation.lua | 5 | 3393 | local parent = ... --DOC_NO_USAGE --DOC_NO_DASH --DOC_HIDE
local wibox = require("wibox") --DOC_HIDE
local color = require("gears.color") --DOC_HIDE
local beautiful = require("beautiful") --DOC_HIDE
local grad1 = color{ type = "linear", from = { 0, 0 }, to = { 20, 0 }, --DOC_HIDE
stops = { { 0, "#00ff00" }, { 1,... | gpl-2.0 |
100acrebb/ulogs | ultimatelogs/lua/ultimatelogs/client/cl_ulogs_grdbutton.lua | 2 | 4678 | --[[ _
( )
_| | __ _ __ ___ ___ _ _
/'_` | /'__`\( '__)/' _ ` _ `\ /'_` )
( (_| |( ___/| | | ( ) ( ) |( (_| |
`\__,_)`\____)(_) (_) (_) (_)`\__,_)
DButton
--]]
local PANEL = {}
AccessorFunc( PANEL, "m_bBorder", "DrawBorder", FORCE_BOOL )
function PANEL:Init()
self:SetContentAlignment( 5 )
... | mit |
ranisalt/forgottenserver | data/creaturescripts/scripts/drop_loot.lua | 7 | 1279 | function onDeath(player, corpse, killer, mostDamageKiller, lastHitUnjustified, mostDamageUnjustified)
if player:hasFlag(PlayerFlag_NotGenerateLoot) or player:getVocation():getId() == VOCATION_NONE then
return true
end
local amulet = player:getSlotItem(CONST_SLOT_NECKLACE)
local isRedOrBlack = table.contains({SKU... | gpl-2.0 |
czfshine/Don-t-Starve | ZeroBraneStudio/src/editor/markup.lua | 1 | 8591 | -- Copyright 2011-15 Paul Kulchenko, ZeroBrane LLC
-- styles for comment markup
---------------------------------------------------------
local MD_MARK_ITAL = '_' -- italic
local MD_MARK_BOLD = '**' -- bold
local MD_MARK_LINK = '[' -- link description start
local MD_MARK_LINZ = ']' -- link description end
local MD_MAR... | gpl-2.0 |
czfshine/Don-t-Starve | data/scripts/map/static_layouts/chess_blocker.lua | 1 | 15868 | return {
version = "1.1",
luaversion = "5.1",
orientation = "orthogonal",
width = 40,
height = 40,
tilewidth = 16,
tileheight = 16,
properties = {},
tilesets = {
{
name = "ground",
firstgid = 1,
filename = "../../../../tools/tiled/dont_starve/ground.tsx",
tilewidth = 64,
... | gpl-2.0 |
czfshine/Don-t-Starve | data/scripts/widgets/containerwidget.lua | 1 | 6203 | require "class"
local InvSlot = require "widgets/invslot"
local Widget = require "widgets/widget"
local Text = require "widgets/text"
local UIAnim = require "widgets/uianim"
local ImageButton = require "widgets/imagebutton"
local ItemTile = require "widgets/itemtile"
local DOUBLECLICKTIME = .33
local ContainerWidget ... | gpl-2.0 |
cloudwu/skynet | service/launcher.lua | 9 | 4124 | local skynet = require "skynet"
local core = require "skynet.core"
require "skynet.manager" -- import manager apis
local string = string
local services = {}
local command = {}
local instance = {} -- for confirm (function command.LAUNCH / command.ERROR / command.LAUNCHOK)
local launch_session = {} -- for command.QUERY,... | mit |
czfshine/Don-t-Starve | data/scripts/components/projectile.lua | 1 | 6118 | local Projectile = Class(function(self, inst)
self.inst = inst
self.owner = nil
self.target = nil
self.start = nil
self.dest = nil
self.cancatch = false
self.speed = nil
self.hitdist = 1
self.homing = true
self.range = nil
self.onthrown = nil
self.onhit = nil
sel... | gpl-2.0 |
CrazyEddieTK/Zero-K | LuaRules/Gadgets/CAI/AssetTracker.lua | 9 | 5782 | --[[ Handles force composition and position
* Should be used both for the enemies of a CAI and its allyTeam
* Maintains heatmaps for static/mobile units which are anti land/AA.
--]]
local HeatmapUnitDefID, ListUnitDefID, CombatListUnitDefID, EconomyTargetUnitDefID = VFS.Include("LuaRules/Configs/CAI/assetTrackerConfi... | gpl-2.0 |
alexgrist/NutScript | gamemode/core/derma/cl_help.lua | 1 | 10067 |
local backgroundColor = Color(0, 0, 0, 66)
local PANEL = {}
AccessorFunc(PANEL, "maxWidth", "MaxWidth", FORCE_NUMBER)
function PANEL:Init()
self:SetWide(180)
self:Dock(LEFT)
self.maxWidth = ScrW() * 0.2
end
function PANEL:Paint(width, height)
surface.SetDrawColor(backgroundColor)
surface.DrawRect(0, 0, width... | mit |
czfshine/Don-t-Starve | ZeroBraneStudio/lualibs/metalua/compiler/parser/common.lua | 9 | 1113 | --------------------------------------------------------------------------------
-- Copyright (c) 2006-2013 Fabien Fleutot and others.
--
-- All rights reserved.
--
-- This program and the accompanying materials are made available
-- under the terms of the Eclipse Public License v1.0 which
-- accompanies this distribut... | gpl-2.0 |
zhujunsan/nodemcu-firmware | lua_examples/send_text_message.lua | 75 | 3151 | --[[
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies... | mit |
sarifsystems/sarif | assets/lua/timetracker.lua | 2 | 2269 | local sarif = require "sarif"
local function formatTime(t)
local d = os.date("!%Y-%m-%dT%H:%M:%S%z", t or os.time())
return d:sub(1, -3) .. ":" .. d:sub(-2)
end
local Tracker = {}
function Tracker:start(msg)
local category = msg.p and msg.p.category or "unspecified"
local text = msg.p and msg.p.text or msg.text
... | mit |
CrazyEddieTK/Zero-K | LuaUI/Widgets/chili/Controls/button.lua | 17 | 1147 | --//=============================================================================
Button = Control:Inherit{
classname= "button",
caption = 'button',
defaultWidth = 70,
defaultHeight = 20,
}
local this = Button
local inherited = this.inherited
--//============================================================... | gpl-2.0 |
cloudwu/skynet | test/testpipeline.lua | 30 | 1265 | local skynet = require "skynet"
local redis = require "skynet.db.redis"
local conf = {
host = "127.0.0.1",
port = 6379,
db = 0
}
local function read_table(t)
local result = { }
for i = 1, #t, 2 do result[t[i]] = t[i + 1] end
return result
end
skynet.start(function()
local db = redis.connect(conf)
d... | mit |
CrazyEddieTK/Zero-K | scripts/hoverraid.lua | 11 | 1979 | include "constants.lua"
local base = piece 'base'
local turret = piece 'turret'
local gun = piece 'gun'
local flare = piece 'flare'
local ground = piece 'ground01'
local wakes = {}
for i = 1, 8 do
wakes[i] = piece('wake0' .. i)
end
local function WobbleUnit()
local wobble = true
while true do
if wobble == true t... | gpl-2.0 |
CrazyEddieTK/Zero-K | LuaUI/Widgets/chili/Controls/editbox.lua | 4 | 24644 | --//=============================================================================
--- EditBox module
--- EditBox fields.
-- Inherits from Control.
-- @see control.Control
-- @table EditBox
-- @tparam {r,g,b,a} cursorColor cursor color, (default {0,0,1,0.7})
-- @tparam {r,g,b,a} selectionColor selection color, (defaul... | gpl-2.0 |
repstd/modified_vlc | share/lua/modules/sandbox.lua | 96 | 4375 | --[==========================================================================[
sandbox.lua: Lua sandboxing facilities
--[==========================================================================[
Copyright (C) 2007 the VideoLAN team
$Id$
Authors: Antoine Cellerier <dionoea at videolan dot org>
This program is f... | gpl-2.0 |
czfshine/Don-t-Starve | data/scripts/prefabs/pickaxe.lua | 1 | 2459 | local assets=
{
Asset("ANIM", "anim/pickaxe.zip"),
Asset("ANIM", "anim/goldenpickaxe.zip"),
Asset("ANIM", "anim/swap_pickaxe.zip"),
Asset("ANIM", "anim/swap_goldenpickaxe.zip"),
}
local function onfinished(inst)
inst:Remove()
end
local function onequip(inst, owner)
owner.AnimState:OverrideSymbol("swap_ob... | gpl-2.0 |
czfshine/Don-t-Starve | data/DLC0001/scripts/components/blowinwind.lua | 1 | 4058 | local easing = require("easing")
local SPEED_VAR_PERIOD = 5
local SPEED_VAR_PERIOD_VARIANCE = 2
local BlowInWind = Class(function(self, inst)
self.inst = inst
self.maxSpeedMult = 1.5
self.minSpeedMult = .5
self.averageSpeed = (TUNING.WILSON_RUN_SPEED + TUNING.WILSON_WALK_SPEED)/2
self.speed = 0
self.windA... | gpl-2.0 |
mamadtnt/erfan | plugins/search_youtube.lua | 674 | 1270 | do
local google_config = load_from_file('data/google.lua')
local function httpsRequest(url)
print(url)
local res,code = https.request(url)
if code ~= 200 then return nil end
return json:decode(res)
end
local function searchYoutubeVideos(text)
local url = 'https://www.googleapis.com/youtube/v3/search?'
u... | gpl-2.0 |
ranisalt/forgottenserver | data/talkactions/scripts/buy_house.lua | 6 | 1397 | local config = {
level = 1,
onlyPremium = true
}
function onSay(player, words, param)
local housePrice = configManager.getNumber(configKeys.HOUSE_PRICE)
if housePrice == -1 then
return true
end
if player:getLevel() < config.level then
player:sendCancelMessage("You need level " .. config.level .. " or higher... | gpl-2.0 |
czfshine/Don-t-Starve | data/scripts/widgets/demotimer.lua | 1 | 1763 | local Widget = require "widgets/widget"
local ImageButton = require "widgets/imagebutton"
local Text = require "widgets/text"
-------------------------------------------------------------------------------------------------------
local DemoTimer = Class(Widget, function(self, owner)
self.owner = owner
Widget... | gpl-2.0 |
CrazyEddieTK/Zero-K | lups/loadConfig.lua | 5 | 1188 | -- $Id: loadConfig.lua 3171 2008-11-06 09:06:29Z det $
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
--
-- file: loadConfig.lua
-- brief: loads LUPS config files
-- autho... | gpl-2.0 |
czfshine/Don-t-Starve | data/scripts/consolecommands.lua | 1 | 9365 |
local function Spawn(prefab)
--TheSim:LoadPrefabs({prefab})
return SpawnPrefab(prefab)
end
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
-- Console Functions -- These are simple ... | gpl-2.0 |
czfshine/Don-t-Starve | data/DLC0001/scripts/components/growable.lua | 1 | 4960 | local Growable = Class(function(self, inst)
self.inst = inst
self.stages = nil
self.stage = 1
self.loopstages = false
self.growonly = false
self.springgrowth = false
self.ongrowthfn = nil
end)
--[[local waiting_for_growth = {}
local function GrowableUpdate(dt)
local tick = TheSim:GetTick()... | gpl-2.0 |
czfshine/Don-t-Starve | data/DLC0001/scripts/components/fuel.lua | 1 | 1063 | FUELTYPE =
{
"BURNABLE",
"GASOLINE",
}
local Fuel = Class(function(self, inst)
self.inst = inst
self.fuelvalue = 1
self.fueltype = "BURNABLE"
self.ontaken = nil
end)
function Fuel:SetOnTakenFn(fn)
self.ontaken = fn
end
function Fuel:Taken(taker)
self.inst:PushEvent("fueltaken", {tak... | gpl-2.0 |
project-asap/IReS-Platform | resources/unusedAsapLibraryComponents/Maxim/operators/WIND_Calc_NUM_Postgres/WIND_Calc_NUM_Postgres.lua | 3 | 1211 | -- General configuration of the operators belonging to Wind_Demo_o_Postgres workflow
BASE = "${JAVA_HOME}/bin/java -Xms64m -Xmx128m com.cloudera.kitten.appmaster.ApplicationMaster"
TIMEOUT = -1
MEMORY = 1024
CORES = 1
LABELS = "postgres"
EXECUTION_NODE_LOCATION = "hdp1"
-- Specific configuration of operator
OPERATOR =... | apache-2.0 |
alexgrist/NutScript | plugins/area/derma/cl_areaedit.lua | 1 | 4467 |
local PLUGIN = PLUGIN
local PANEL = {}
function PANEL:Init()
if (IsValid(ix.gui.areaEdit)) then
ix.gui.areaEdit:Remove()
end
ix.gui.areaEdit = self
self.list = {}
self.properties = {}
self:SetDeleteOnClose(true)
self:SetSizable(true)
self:SetTitle(L("areaNew"))
-- scroll panel
self.canvas = self:Add("D... | mit |
SorBlackPlus/Anti-spam | plugins/invite.lua | 1 | 1660 | function resolve_username(username,cb)
tdcli_function ({
ID = "SearchPublicChat",
username_ = username
}, cb, nil)
end
function getMessage(chat_id, message_id,cb)
tdcli_function ({
ID = "GetMessage",
chat_id_ = chat_id,
message_id_ = message_id
}, cb, nil)
end
function from_username(msg)
... | gpl-3.0 |
CrazyEddieTK/Zero-K | lups/ParticleClasses/SphereDistortion.lua | 5 | 6289 | -- $Id: SphereDistortion.lua 3171 2008-11-06 09:06:29Z det $
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
local SphereDistortion = {}
Sp... | gpl-2.0 |
takaaptech/knife | knife/behavior.lua | 7 | 1812 | -- behavior.lua -- a state manager
-- internal/external api
local function getCurrentFrame (behavior)
return behavior.states[behavior.state][behavior.index]
end
local function advanceFrame (behavior)
local nextState = behavior.frame.after
local nextIndex = behavior.index + 1
local maxIndex = #behavio... | mit |
iranddos/yagop | plugins/boobs.lua | 731 | 1601 | do
-- Recursive function
local function getRandomButts(attempt)
attempt = attempt or 0
attempt = attempt + 1
local res,status = http.request("http://api.obutts.ru/noise/1")
if status ~= 200 then return nil end
local data = json:decode(res)[1]
-- The OpenBoobs API sometimes returns an empty array
if no... | gpl-2.0 |
AmirFieBeR/Amir_FieBeR | plugins/boobs.lua | 731 | 1601 | do
-- Recursive function
local function getRandomButts(attempt)
attempt = attempt or 0
attempt = attempt + 1
local res,status = http.request("http://api.obutts.ru/noise/1")
if status ~= 200 then return nil end
local data = json:decode(res)[1]
-- The OpenBoobs API sometimes returns an empty array
if no... | gpl-2.0 |
timroes/awesome | lib/awful/layout/suit/tile.lua | 2 | 12522 | ---------------------------------------------------------------------------
--- Tiled layouts module for awful
--
-- @author Donald Ephraim Curtis <dcurtis@cs.uiowa.edu>
-- @author Julien Danjou <julien@danjou.info>
-- @copyright 2009 Donald Ephraim Curtis
-- @copyright 2008 Julien Danjou
-- @module awful.l... | gpl-2.0 |
rticommunity/rticonnextdds-ddsl | src/ddsl/xtypes/xml/init.lua | 2 | 17353 | --[[
Copyright (C) 2015 Real-Time Innovations, Inc.
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 agreed to in... | apache-2.0 |
project-asap/IReS-Platform | asap-platform/asap-server/asapLibrary/operators/w2v_train_spark/w2v_train_spark.lua | 1 | 1124 | CP = "/opt/hadoop-2.7.0/etc/hadoop:/opt/hadoop-2.7.0/etc/hadoop:/opt/hadoop-2.7.0/etc/hadoop:/opt/hadoop-2.7.0/share/hadoop/common/lib/*:/opt/hadoop-2.7.0/share/hadoop/common/*:/opt/hadoop-2.7.0/share/hadoop/hdfs:/opt/hadoop-2.7.0/share/hadoop/hdfs/lib/*:/opt/hadoop-2.7.0/share/hadoop/hdfs/*:/opt/hadoop-2.7.0/share/had... | apache-2.0 |
alexgrist/NutScript | gamemode/core/derma/cl_shipment.lua | 1 | 2629 |
local PANEL = {}
function PANEL:Init()
self:SetSize(460, 360)
self:SetTitle(L"shipment")
self:Center()
self:MakePopup()
self.scroll = self:Add("DScrollPanel")
self.scroll:Dock(FILL)
self.list = self.scroll:Add("DListLayout")
self.list:Dock(FILL)
end
function PANEL:SetItems(entity, items)
self.entity = ent... | mit |
czfshine/Don-t-Starve | data/scripts/widgets/statusdisplays.lua | 1 | 3231 | local Widget = require "widgets/widget"
local SanityBadge = require "widgets/sanitybadge"
local HealthBadge = require "widgets/healthbadge"
local HungerBadge = require "widgets/hungerbadge"
local StatusDisplays = Class(Widget, function(self, owner)
Widget._ctor(self, "Status")
self.owner = owner
self.bra... | gpl-2.0 |
rgieseke/textadept | core/locale.lua | 1 | 1241 | -- Copyright 2007-2022 Mitchell. See LICENSE.
local M = {}
--[[ This comment is for LuaDoc.
---
-- Map of all messages used by Textadept to their localized form.
-- If the table does not contain the localized version of a given message, it returns a string
-- that starts with "No Localization:" via a metamethod.
-- N... | mit |
czfshine/Don-t-Starve | data/scripts/bufferedaction.lua | 1 | 2752 |
BufferedAction = Class(function(self, doer, target, action, invobject, pos, recipe, distance)
self.doer = doer
self.target = target
self.initialtargetowner = self.target and self.target.components.inventoryitem and self.target.components.inventoryitem.owner
self.action = action
self.invobject = inv... | gpl-2.0 |
dani-sj/iman22 | plugins/add_bot.lua | 189 | 1492 | --[[
Bot can join into a group by replying a message contain an invite link or by
typing !add [invite link].
URL.parse cannot parsing complicated message. So, this plugin only works for
single [invite link] in a post.
[invite link] may be preceeded but must not followed by another characters.
--]]
do
local function... | gpl-2.0 |
ioiasff/creawq | plugins/add_bot.lua | 189 | 1492 | --[[
Bot can join into a group by replying a message contain an invite link or by
typing !add [invite link].
URL.parse cannot parsing complicated message. So, this plugin only works for
single [invite link] in a post.
[invite link] may be preceeded but must not followed by another characters.
--]]
do
local function... | gpl-2.0 |
borq79/Cary-Area-Public-Library-Classes | courses/diy_weather_nodemcu/source/nodemcu/script1.lua | 1 | 3183 | THINGSPEAK_API_KEY="5YR83JMEXNNXW86X"
wifi.setmode(wifi.STATION)
wifi.sta.config("libraryessid","librarypassword")
print(wifi.sta.getip())
randomNumber = math.random(0,100)
conn=net.createConnection(net.TCP, false)
conn:on("receive", function(conn, pl) print(pl) end)
conn:connect(443, "api.thingspeak.com")
conn:sen... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.