content stringlengths 5 1.05M |
|---|
object_tangible_deed_vehicle_deed_hoverlifter_speeder_crafted = object_tangible_deed_vehicle_deed_shared_hoverlifter_speeder_crafted:new {
}
ObjectTemplates:addTemplate(object_tangible_deed_vehicle_deed_hoverlifter_speeder_crafted, "object/tangible/deed/vehicle_deed/hoverlifter_speeder_crafted.iff")
|
local device = require("device")
-- enable discovery
if require("settings").discovery ~= false then
print("Heap: ", node.heap(), 'UPnP:', 'Listening for UPnP discovery')
net.multicastJoin(wifi.sta.getip(), '239.255.255.250')
local upnp = net.createUDPSocket()
upnp:listen(1900, '0.0.0.0')
upnp:on('receive', f... |
return LoadFont("Common Normal") .. {
InitCommand=function(self)
self:xy(0,10):halign(0):zoom(0.4)
end;
BeginCommand=function(self)
self:settext("AG")
end;
}; |
-- local utf8 = require("utf8")
CheckBox = {}
CheckBox._index = CheckBox
function CheckBox:Create(posX, posY, widthP, heightP, backColor, xColor, foreColor, value)
local this =
{
x = posX,
y = posY,
width = widthP,
height = heightP,
active = value,
colo... |
local count = redis.call('ZADD', KEYS[1], ARGV[2], ARGV[1])
--if elements with lower priority are on head
local v = redis.call('ZRANGE', KEYS[1], 0, 0, 'WITHSCORES')
if v[1] ~= nil and tonumber(v[2]) < tonumber(ARGV[3]) then
redis.call('PUBLISH', KEYS[2], v[2])
end
return count; |
SDA_PIN = 6 -- sda pin, GPIO12
SCL_PIN = 5 -- scl pin, GPIO14
bh1750 = require("bh1750")
bh1750.init(SDA_PIN, SCL_PIN)
ws2812.init()
dht=require("dht")
status,temp,humi,temp_decimial,humi_decimial = dht.read(2)
print(temp)
print(humi)
lux = bh1750.read_lux()
print("lux: " .. lux)
m = mqtt.Client("esp4", 120)
m:on("c... |
function new_utils()
local scale={x=1,y=1}
local ret={}
function ret.set_timer(f,t)
local timer=0
return function(...)
if timer < love.timer.getTime() then
f(...)
timer=love.timer.getTime()+t
end
end
end
function ret.update_draw(f)
functi... |
local bollo = LibStub("AceAddon-3.0"):GetAddon("Bollo")
local Sort = bollo:NewModule("Sort")
local table_sort = table.sort
local RegisteredIcons = {}
function Sort:AddOptions(name, module)
if type(name) ~= "string" then
error("Wrong argument to #1 :AddOptions, expected string")
end
if self.options.args[name] t... |
--
--
-- ----------------------------------------------------------
-- Mosaic | OF Visual Patching Developer Platform
--
-- Copyright (c) 2019 Emanuele Mazza aka n3m3da
--
-- Mosaic is distributed under the MIT License. This gives everyone the
-- freedoms to use Mosaic in any context: commercial or non-commercial,
-- ... |
local nmap = require "nmap"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
local ipOps = require "ipOps"
local tableaux = require "tableaux"
description = [[
Extracts information from Ubiquiti networking devices.
This script leverages Ubiquiti's Discovery Service... |
att.PrintName = "BR55-R38 Hailstorm"
att.Icon = Material("snowysnowtime/2k/ico/h3/smg_sil.png")
att.Description = "Converts the Battle Rifle to a slow-fire, high impact automatic weapon."
att.Desc_Pros = {
" Fully Automatic",
"+ Increased Damage (70%)",
"+ Increased Ranged Damage (60%)"
}
att.Desc_Cons = {
"- Decr... |
local user_agent = require 'user_agent'
local ffi = require("ffi")
local env = require 'resty.env'
describe('User Agent', function()
before_each(function() user_agent.reset() end)
describe('.deployment', function()
it('reads from environment', function()
env.set('THREESCALE_DEPLOYMENT_ENV', 'foobar')
... |
-----------------------------------
-- Area: Metalworks
-- NPC: Ghemp
-- Type: Smithing Guild Master
-- !pos -109 2 27 237
-----------------------------------
local ID = require("scripts/zones/Metalworks/IDs");
require("scripts/globals/crafting");
require("scripts/globals/status");
-----------------------------------
... |
-- Author: Yugen
--
-- Shadowlands + Burning Crusade Classic + Classic
--
-- Dark Minimalist UI for World of Warcraft
--------------------------------------------------------------
-- DarkerUI Core--
--------------------------------------------------------------
local addonName, addonTable = ...
local GetWoWVersion = (... |
local t =
LoadActor("UpRightFoot tap Note") ..
{
InitCommand = function(self)
self:basezoomx(-1)
end
}
return t
|
function toggleGodMode(thePlayer)
local account = getPlayerAccount(thePlayer)
if (not account or isGuestAccount(account)) then return end
local accountName = getAccountName(account)
if (isObjectInACLGroup("user."..accountName, aclGetGroup("Admin"))) then
if getElementData(thePlayer, "invincible... |
require "scripts.core.item"
require "gamemode.Spark.modifiers.modifier_damage";
Gladius = class(Item)
function Gladius:OnCreated ()
self:SetCastingBehavior(CastingBehavior(CastingBehavior.PASSIVE));
end
function Gladius:GetModifiers ()
return {
"modifier_damage"
}
end
return Gladius |
local playsession = {
{"Dammpi", {395943}},
{"iReed", {395497}},
{"toddrofls", {389258}},
{"HYPPS", {351352}},
{"fkeentm", {60502}},
{"tykak", {185611}},
{"Salmonei", {5722}},
{"sharpshot2566", {3306}}
}
return playsession |
local PANEL = {}
AccessorFunc( PANEL, "hovered_color", "HoveredColor" )
AccessorFunc( PANEL, "clicked_color", "ClickedColor" )
AccessorFunc( PANEL, "default_circle_color", "DefaultCircleColor" )
AccessorFunc( PANEL, "circle_color", "CircleColor" )
function PANEL:Init()
self:SetBarTall( 7 )
self:SetCursor( "si... |
-- populated on tool loading
local tools_conf = {
};
local function run_group(group, ch, wnd)
local ad = active_display();
local as = ad.selected;
-- hack around the problem with many menu paths written using the dumb
-- active_display().selected
if (wnd) then
ad.selected = wnd;
end
-- this doesn't check / acc... |
-- http://stackoverflow.com/questions/17987618/how-to-add-a-sleep-or-wait-to-my-lua-script
local ffi = require("ffi")
ffi.cdef[[
typedef struct libvlc_instance_t libvlc_instance_t;
typedef int64_t libvlc_time_t;
libvlc_instance_t * libvlc_new( int argc , const char *const *argv );
void libvlc_release( libvlc_instance_t... |
local inspect = require("inspect")
local commands = require("commands")
local functional = require("util.functional")
local message = require("message")
local shortcuts = {}
shortcuts.map = {}
shortcuts.messages = false
function down(...)
return love.keyboard.isDown(...)
end
function splitShortcut(str)
lo... |
-- test_enumbattery.lua
local ffi = require("ffi")
local bit = require("bit")
local bor = bit.bor;
local band = bit.band;
local bnot = bit.bnot;
local devguid = require("devguid")
local WinBase = require("WinBase")
local errorhandling = require("core_errorhandling_l1_1_1");
local SetupApi = require("SetupApi")
local W... |
-- Adjusts properties of caravans
--[====[
caravan
=======
Adjusts properties of caravans on the map. See also `force` to create caravans.
This script has multiple subcommands. Commands listed with the argument
``[IDS]`` can take multiple caravan IDs (see ``caravan list``). If no IDs are
specified, then the commands... |
local skynet = require "skynet"
local protobuf = require "protobuf"
local pb
local pb_files = {
"./proto/cmd.pb",
"./proto/account.pb",
}
local cmd = {}
function cmd.init()
for _,v in ipairs(pb_files) do
protobuf.register_file(v)
end
end
function cmd.encode(msg_name, msg)
skynet.error("encode ".. msg_name)
... |
require "Scripts/Materials/IMaterial"
require "Scripts/Enemies/IEnemy"
Sticky =
{
_name = "Sticky"
}
function Sticky:Create()
local b = {}
setmetatable(b, Sticky)
setmetatable(Sticky, { __index = IMaterial})
return b
end
Sticky.__index = Sticky;
function Fire:OnContact(otherBody)
otherBody:... |
-------------------------
-- Traditional Chinese Localization String resources
-- Huami Co, ltd. (2014)
-- Herbert dai
-- 20140815
-------------------------
localization_zh_rTW_table = {
calories_table={
{str="≈1個茶葉蛋", calories=96},
{str="≈1片麵包", calories=100},
{str="≈1瓶冰紅茶", calories=112},
... |
-- CrowdNavigation example.
-- This sample demonstrates:
-- - Generating a dynamic navigation mesh into the scene
-- - Performing path queries to the navigation mesh
-- - Adding and removing obstacles/agents at runtime
-- - Raycasting drawable components
-- - Crowd movement management
-- - Acces... |
local PLUGIN = PLUGIN
function PLUGIN:ShouldDrawEntityInfo(entity)
if (entity.isDoor(entity)) then
return true
end;
end;
local toScreen = FindMetaTable("Vector").ToScreen
function PLUGIN:DrawEntityInfo(entity, alpha)
if (entity.isDoor(entity)) then
local data = entity:getNetVar("doorData") or {}
if (!dat... |
-- tolua: variable class
-- Written by Waldemar Celes
-- TeCGraf/PUC-Rio
-- Jul 1998
-- $Id: $
-- This code is free software; you can redistribute it and/or modify it.
-- The software provided hereunder is on an "as is" basis, and
-- the author has no obligation to provide maintenance, support, updates,
-- enhancement... |
local MP = minetest.get_modpath("eco_mapgen")
eco_mapgen.register_biome({
name = "grass",
match = {
temperature = 50,
humidity = 50
},
flat = MP .. "/schematics/base/grass_flat",
slope_upper = MP .. "/schematics/base/grass_slope_upper",
slope_lower = MP .. "/schematics/base/grass_slope_lower",
slope_inne... |
local skynet = require "skynet"
local socket = require "socket"
local config = require "config"
local redis_conf = skynet.getenv "redis"
local name = config (redis_conf)
local readline = socket.readline
local readbytes = socket.read
local table = table
local string = string
local redis = {}
local command = {}
local m... |
local a=js.global;local b=a.document;local c=function(d)return b:querySelector(d)end;local e=function(d)local f=b:querySelectorAll(d)local g={}for h in js.of(f)do table.insert(g,h)end;return g end;local i=function(...)local j=coroutine.running()assert(j,"fetch must be called inside a running coroutine")local k={...}for... |
include('shared.lua')
function ENT:Initialize()
self.Light = Material( "sprites/light_glow02_add" )
self.Beep = CurTime() + 1
end
function ENT:OnRemove()
end
function ENT:Think()
if self.Beep < CurTime() then
self.Beep = CurTime() + 1
end
end
function ENT:Draw()
self.Entity:DrawModel()
if self... |
module 'mock'
--------------------------------------------------------------------
CLASS: AnimatorEventTrack ( AnimatorTrack )
:MODEL{}
function AnimatorEventTrack:isPlayable()
return true
end
function AnimatorEventTrack:toString()
return ''
end
-------------------------------------------------------------------... |
if (SERVER) then
MsgC(Color(255, 0, 0), "Laundry system by Dborasik loading, thanks for using! \n");
end; |
-- add modes: debug and release
add_rules("mode.debug", "mode.release")
-- enable unicode
add_defines("_UNICODE", "UNICODE")
-- add target
target("echo")
-- add rules
add_rules("wdk.env.umdf", "wdk.driver")
-- set test sign
-- set_values("wdk.sign.mode", "test")
-- set release sign
-- set_va... |
ITEM.name = "Digger Helmet"
ITEM.model = "models/maver1k_xvii/metro_digger_helmet.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.price = 250
ITEM.pacData = {
[1] = {
["children"] = {
[1] = {
["children"] = {
},
["self"] = {
["Angles"] = Angle(0.000, -90.000, -90.000),
["UniqueID"] = "2827706147... |
local Class = require("trip.Class")
local cos = math.cos
local insert = table.insert
local pi = math.pi
local sin = math.sin
local M = Class.new()
function M:init(limb, targetFixture, config)
self.limb = assert(limb)
self.targetFixture = assert(targetFixture)
self.creature = assert(self.limb.creature)
self.e... |
local YK = require("Core.YK")
local fgui = require("FGUI.FairyGUI")
local basewind = require("Core.WindowBase")
---@class ThreeEliminateWindObj
---@field n2 test
---@field BtnEntranceEditor FairyGUI.GButton
---@class ThreeEliminateWind : WindowBase
---@field Objs ThreeEliminateWindObj
local this = YK.wind_class(basew... |
---------------------------------------------------------------------
-- Make addon available to other addons
---------------------------------------------------------------------
local _, ns = ...
kln = ns
ns.lib = {}
ns.prefix = "|cFF7F2A90kln|r"
|
-- OperatingSystem -- provides some utility functions from the operating
-- system e.g. checking for files or directories,
-- returning a temporary path etc.
--
-- author: Dr. Thomas Tensi, 2019-08
-- ====================
-- IMPORTS
-- ====================
require("io")
requi... |
----------------------------------------------------------------------------------------------------
-- Script: cpu_rand.lua
-- Description: CPU test. Random tests.
----------------------------------------------------------------------------------------------------
dofile("../scripts/inc/nesdbg.lua")
local numSu... |
local coroutine,yield = coroutine,coroutine.yield
local sub,gsub,find = string.sub,string.gsub,string.find
local tonumber = tonumber
local function parse_template(template)
local position, reset
local matches, matchstart, matchend
local function collectmatches(mstart, mend, ...)
if not mstart then... |
--
-- client_name.lua
-- focused client name component
--
local wibox = require("wibox")
-- update currently focused client name
local update_widget = function (widget)
local c = client.focus
if c ~= nil then
widget.text = c.name or c.class or ""
else
widget.text = ""
end
end
-- create client_name wi... |
--- === cp.test ===
---
--- CommandPost Test Scripts.
local require = require
local inspect = require("hs.inspect")
local suites = {}
local format = string.format
local insert, remove = table.insert, table.remove
local unpack = _G.unpack or table.unpack
local function topSuite()
return #suites > 0 and suite... |
local imbuement = Action()
function imbuement.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if configManager.getBoolean(configKeys.TOGLE_IMBUEMENT_SHRINE_STORAGE) and player:getStorageValue(Storage.Imbuement) ~= 1 then
return player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You did not collect enoug... |
require('colorizer').setup({
'css',
'javascript',
'typescript',
'vue',
css = { rgb_fn = true },
javascript = { css = true },
typescript = { css = true },
vue = { css = true },
})
|
local LocalizationService = game:GetService("LocalizationService");
local lang;
local module = {};
setmetatable(module,{
__call = function(self,key,format)
local item = lang[key];
if format then
for i,v in pairs(format) do
item = string.gsub(item,(":{{%s}}:"):format(i),... |
local ui, uiu, uie = require("ui").quick()
local moonshine = require("moonshine")
local config = require("config")
local blurrer = {}
function blurrer.drawBlurredCanvasContent(canvas, x, y, paddingL, paddingT, blurFade)
love.graphics.clear(0, 0, 0, 0)
love.graphics.setColor(blurFade, blurFade, blurFade, blur... |
-- FOR TEST FLIB.GUI
-- 暂时封存
local Event = require('klib/klib').Event
local Gui = require('__flib__.gui')
Gui.add_templates {
mouse_filter = { type = "button", mouse_button_filter = { "left" } },
drag_handle = { type = "empty-widget",
style = "draggable_space_header",
s... |
local run = function()
local Opco = "local A = Inst[1];\nlocal Cls = {};\nfor Idx = 1, #Lupvals do\nlocal List = Lupvals[Idx];\nfor Idz = 0, #List do\nlocal Upv = List[Idz];\nlocal Stk = Upv[1];\nlocal Pos = Upv[2];\nif (Stk == Stack) and (Pos >= A) then\nCls[Pos] = Stk[Pos];\nUpv[1] = Cls;\nend;\nend;\nend;"
... |
local Slot = require("motras_slot")
local UnderpassUtils = require("motras_underpassutils")
local t = require("motras_types")
local c = require("motras_constants")
local Station = require("motras_station")
describe("Station", function ()
describe('new', function ()
it('creates station with defaul... |
-------------------------------------------------
--
-- MODEL & CRITERION
--
-------------------------------------------------
Seq = nn.Sequential
ReLU = cudnn.ReLU
function SpatBatchNorm(n_outputs)
return nn.SpatialBatchNormalization(n_outputs, 1e-5, 0.1)
:init('weight', nninit.normal, 1.0, 0.02)
... |
--[[
MIT License
Copyright (c) 2019-2020 Mitchell Davis <coding.jackalope@gmail.com>
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
... |
function create()
entity = getNewEntity("baseLuaEntity")
sizeMultiplier = getGlobalValue("sizeMultiplier")
setEntityLabel(entity, "cloud")
setEntityX(entity, -300 * sizeMultiplier)
setEntityY(entity, (rand() % 200) * sizeMultiplier )
setEntityDeltaX(entity, (rand() % 140) + 10)
setEntityRend... |
for index, lab in pairs(data.raw["lab"]) do
if lab.energy_source.type == "electric" then
lab.energy_usage = ((settings.startup["Energy_consumption_m"].value * string.sub(lab.energy_usage,0, string.len(lab.energy_usage)-2)) .. "kW")
else
if lab.energy_source.type == "burner" or lab.energy_source.type == "fluid" then --... |
local _, NeP = ...
local _G = _G
-- USAGE: UNIT.area(DISTANCE).enemies >= #
NeP.DSL:Register("area.enemies", function(unit, distance)
if not _G.UnitExists(unit) then return 0 end
local total = 0
for _, Obj in pairs(NeP.OM:Get('Enemy', true)) do
if _G.UnitCanAttack(Obj.key, "player")
and (NeP.DSL:Get('combat... |
local left, right = 0, 1
local top, mid = 0, 1
local half_width, full_width = 2, 1
local half_height, full_height = 2, 1
local function move_win(xx, yy, ww, hh)
return function()
local win = hs.window.focusedWindow()
local f = win:frame()
local max = win:screen():frame()
f.x = max... |
local openssl = require("openssl")
local ca = require("utils.ca")
local M = {}
M.luaopensslv, M.luav, M.opensslv = openssl.version()
M.libressl = M.opensslv:find("^LibreSSL")
M.openssl3 = M.opensslv:find("^OpenSSL 3")
function M.sslProtocol(srv, protocol)
protocol = protocol or openssl.ssl.default
if M.opensslv:... |
local Class = require 'lib.hump.class'
-- MapType
-- represents a type and variant of a map node
local MapType = Class{name='MapType',
function(self, variant, style)
self._variants = self._variants or {
default = 'empty',
empty = 'empty',
}
self._defaultTransparent = false
self._defaultAccessible = fals... |
AuctionatorConfigTooltipsFrameMixin = CreateFromMixins(AuctionatorPanelConfigMixin)
function AuctionatorConfigTooltipsFrameMixin:OnLoad()
Auctionator.Debug.Message("AuctionatorConfigTooltipsFrameMixin:OnLoad()")
self.name = AUCTIONATOR_L_CONFIG_TOOLTIPS_CATEGORY
self.parent = "Auctionator"
self:SetupPanel()
... |
local function JailPos(ply)
-- Admin or Chief can set the Jail Position
if (RPExtraTeams[ply:Team()] and RPExtraTeams[ply:Team()].chief and GAMEMODE.Config.chiefjailpos) or ply:hasDarkRPPrivilege("rp_commands") then
DarkRP.storeJailPos(ply)
else
local str = DarkRP.getPhrase("admin_only")
if GAMEMODE.Config.chi... |
--[[--------------------------------------------------------------------
luahidapi test program 2
tests custom USB HID IN and OUT
Kein-Hong Man <keinhong@gmail.com>
2012-05-18
The author hereby places this code into PUBLIC DOMAIN
NOTE
- Connection to the custom HID device needs a USB-capable MCU
pr... |
client_script {
"@vrp/lib/utils.lua",
"init.lua"
}
server_script {
"@vrp/lib/utils.lua",
"server.lua"
}
files {
"c-cardoors.lua",
"client.lua"
} |
<<<<<<< HEAD
local Mouse = require("zUI/Mouse")
local Vec2 = require("zUI/Vec2")
local Vec3 = require("zUI/Vec3")
local BaseUI = {}
BaseUI.__index = BaseUI
setmetatable(BaseUI, { __call = function(_, ...) return BaseUI.new(...) end })
BaseUI.display_events = {}
BaseUI.shadow_shader = love.graphics.newShader([[
e... |
object_ship_tiebomber_tier10 = object_ship_shared_tiebomber_tier10:new {
}
ObjectTemplates:addTemplate(object_ship_tiebomber_tier10, "object/ship/tiebomber_tier10.iff")
|
local utils = {}
local function calcQuads(image, count)
-- calc sub images in a texture, assuming there is only one row
local quads = {}
local sw, sh = image:getDimensions()
local w = sw / count
for x = 1,count do
quads[x] = love.graphics.newQuad((x -1) * w, 0, w, sh, sw, sh)
end
return qu... |
local type_order = {["function"] = 5, boolean = 2, number = 1, string = 3, table = 4, thread = 7, userdata = 6}
local function sort_keys(_0_0, _1_0)
local _1_ = _0_0
local a = _1_[1]
local _2_ = _1_0
local b = _2_[1]
local ta = type(a)
local tb = type(b)
if ((ta == tb) and ((ta == "string") or (ta == "num... |
mtbench.register("check_player_privs", function(executeCondition)
local count = 0
while executeCondition() do
local playername = "name_" .. math.random(10000)
local priv = "priv_" .. math.random(10000)
minetest.check_player_privs(playername, priv)
count = count + 1
end
return count
end)
|
---@class FMulticastSparseDelegate
local FMulticastSparseDelegate = {}
return FMulticastSparseDelegate
|
local api = vim.api
local config = require("lvim-focus.config")
local utils = require("lvim-focus.utils")
local M = {}
local GOLDEN_RATIO = 1.7
M.ignore_by_ft = function(ft)
for _, type in pairs(config.blacklist_ft) do
if type == ft then
return 1
end
end
end
M.ignore_by_bt = func... |
test_run = require('test_run').new()
engine = test_run:get_cfg('engine')
box.sql.execute('pragma sql_default_engine=\''..engine..'\'')
-- Create space
box.sql.execute("CREATE TABLE t (id INTEGER PRIMARY KEY, v INTEGER UNIQUE ON CONFLICT ABORT)")
box.sql.execute("CREATE TABLE q (id INTEGER PRIMARY KEY, v INTEGER UNIQUE... |
-- Battery
baticon = _Awesome.wibox.widget.imagebox(_Awesome.beautiful.widget_batt)
bat_widget = _Awesome.lain.widgets.bat({
battery="BAT1",
settings = function()
if bat_now.perc ~= "N/A" then
bat_now.perc = bat_now.perc .. "% "
widget:set_text(bat_now.perc)
else
widget:... |
function gadget:GetInfo()
return {
name = "mo_noowner",
desc = "Noowner code for FFA games. Removes abandoned teams",
author = "TheFatController",
date = "19 Jan 2008",
license = "GNU GPL, v2 or later",
layer = 0,
enabled = true -- loaded by default?
}
end
-----------------------------------... |
return core.ComponentConstructor("PositionComponent",{
make = function(entity,x,y)
entity.x = x or 0
entity.y = y or 0
end,
remove = function(entity)
entity.x = nil
entity.y = nil
end
}) |
PLUGIN.gunData.ma85_wf_smg25 = {
holster = {
bone = "ValveBiped.Bip01_Spine2",
ang = Angle(180, 90,0),
pos = Vector(4, -15, -3),
},
slot = 2,
width = 3,
height = 2,
price = 2000,
}
PLUGIN.gunData.ma85_wf_smg26 = {
holster = {
bone = "ValveBiped.Bip01_Spine2",
ang = Angle(180, 90,0),
pos = Vector(4, ... |
_G.My = _G.My or {}
My.EventHandler = EventHandler:new({allowedEvents = {
"onWorldCreation",
"onStationSpawn",
"onPlayerSpawn",
"onPlayerTemplateSet",
"onPlayerDestruction",
"onEnemySpawn",
"onEnemyDestruction",
"onStageStart",
"onStageFinished",
"onWaveStart",
}, unique = false... |
--[[
Provides translations for game configuration
@class GameConfigTranslator
]]
local require = require(script.Parent.loader).load(script)
return require("JSONTranslator").new("en", {}) |
local PANEL = {}
local adminicon = Material("icon16/shield.png")
local equippedicon = Material("icon16/eye.png")
local groupicon = Material("icon16/group.png")
local canbuycolor = Color(0, 100, 0, 125)
local cantbuycolor = Color(100, 0, 0, 125)
local ownedcolor = Color(0, 0, 200, 125)
function PANEL:Init()
self.Inf... |
/*---------------------------------------------------------------------------
Vector3 class
Author: Oskar
---------------------------------------------------------------------------*/
do
local meta = {}
meta.__index = meta
function meta:__add( other )
return Vector3( self.x + other.x, self.y + other.y, self... |
print "Loading qolor.lua"
|
-- ANSI colour names
local colours = {"red","green","yellow","blue","magenta","cyan"}
return {
login1 = {
f = function(client, data)
print((client.sock:getpeername() or "nil")..": Initial text: "..(data or "nil"))
-- Can't set client's name to a 0-length string
if #data == 0 then
return... |
------------------------------
-- functions
------------------------------
function setdiff(a_list, b_list)
local match_list = {}
for _, train in ipairs(a_list) do
local is_mismatch = false
for _, mismatch in ipairs(b_list) do
if train == mismatch then
is_mismatch = true
break
end
end
if not... |
local Config = require "sub.config"
local TAG = "Animation Script"
local Animation = {
enter_animation = nil, enter_duration = 1,
exit_animation = nil, exit_duration = 1,
loop_animation = nil, loop_duration = 1,
params = {
alpha = 1.0,
position = { 0, 0, 0 },
scale = { 1.0, 1.0, ... |
#!/usr/bin/env cgilua.cgi
local function getfield (t, f)
for w in string.gfind(f, "[%w_]+") do
if not t then return nil end
t = t[w]
end
return t
end
function test_lib (libname)
local ok, err = pcall (require, libname)
if not ok then
cgilua.put ("Library <tt><b>"..libname.."</b></tt> not found<br>\n"... |
BaseNpc_SetSkillValue(playerNpc, "{{ action.value_object.fields.ScriptName.value }}", "{{ action.target_field.name }}", {{ if action.original_operator != "=" }}BaseNpc_GetSkillValue(playerNpc, "{{ action.value_object.fields.ScriptName.value }}", "{{ action.target_field.name }}") {{ action.operator }}{{ end }} {{ if act... |
local allowCountdown = false
function onEndSong()
if not allowCountdown then
runTimer('endText', 0.1);
allowCountdown = true;
startCountdown()
return Function_Stop;
end
return Function_Continue;
end
function onTimerCompleted(tag, loops, loopsLeft)
if tag == 'endText' then... |
local mod = get_mod("NeuterUltEffects")
local other_overcharge_hud_sounds = {
["staff_overcharge_warning_low"] = true,
["staff_overcharge_warning_med"] = true,
["staff_overcharge_warning_high"] = true,
["staff_overcharge_warning_critical"] = true,
["drakegun_overcharge_warning_low"] = true,
["drakegun_overcharge... |
function lovr.conf(t)
-- Pass --desktop at startup (after asset path) to force desktop/fake driver
if arg[1] == "--desktop" then
t.headset.drivers = {"desktop"}
local argn = #arg -- Move other args over to replace missing one
for i=1,argn do
arg[i] = arg[i+1]
end
end
end
|
workspace "Neato"
architecture "x64"
startproject "Sandbox"
configurations
{
"Debug",
"Release",
"Dist"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
IncludeDir = {}
IncludeDir["GLFW"] = "Neato/vendor/GLFW/include"
IncludeDir["Glad"] = "Neato/vendor/Glad/include"
IncludeDir["ImGui"] = "N... |
-- ===========================================================================
-- HUD's Launch Bar
-- Copyright (c) 2017-2018 Firaxis Games
--
-- Controls raising full-screen and "choosers" found in upper-left of HUD.
-- ===========================================================================
include( "GameCapabilit... |
return Def.ActorFrame{
Def.Quad{
Name="Horizontal",
InitCommand = function(self)
self:x(-4):zoomto(504,44):halign(0)
self:diffuseramp()
self:effectperiod(1)
self:effectcolor1(color("#FFFFFF00"))
self:effectcolor2(Alpha(COLOR.MainHighlight,0.2))
end,
}
} |
local AddonName, AddonTable = ...
AddonTable.skinning = {
-- Leather
172093,
172089,
172096,
-- Hides
172094,
172095,
172097,
-- Misc
178061,
172092,
177279,
}
|
local g_WndData = {}
local g_WndCount = 0
local GaUpdate
local GaOnElementDestroy
local function GaRemoveWnd(wnd)
if(not g_WndData[wnd]) then return end
g_WndData[wnd] = nil
removeEventHandler('onClientElementDestroy', wnd, GaOnElementDestroy)
g_WndCount = g_WndCount - 1
if (g_WndCount <= 0) the... |
local _;
VUHDO_HOT_MODELS = { };
VUHDO_HOT_BAR_MODELS = { };
--
local tSortTable = { };
function VUHDO_initHotComboModels()
table.wipe(VUHDO_HOT_MODELS);
VUHDO_HOT_MODELS[1] = { "", "-- " .. VUHDO_I18N_EMPTY_HOTS .. " --" };
VUHDO_HOT_MODELS[2] = { "OTHER", "|cff0000ff[s]|r " .. VUHDO_I18N_OTHER_HOTS};
VUHDO_HOT_... |
impulse.hudEnabled = impulse.hudEnabled or true
local hidden = {}
hidden["CHudHealth"] = true
hidden["CHudBattery"] = true
hidden["CHudAmmo"] = true
hidden["CHudSecondaryAmmo"] = true
hidden["CHudCrosshair"] = true
hidden["CHudHistoryResource"] = true
hidden["CHudDeathNotice"] = true
hidden["CHudDamageIndicator"] = tr... |
debug = true
playerImg = nil
player = {x = 0, y = 0, speed = 150, img = nil}
canShoot = true
canShootTimerMax = 0.2
canShootTimer = canShootTimerMax
bulletImg = nil
bullets = {}
createEnemyTimerMax = 0.4
createEnemyTimer = createEnemyTimerMax
enemyImg = nil
enemies = {}
isAlive = true
score = 0
function CheckCol... |
require('constants')
require('tower_student_common')
tower_student_common.chat(MAGICI_SHARD_ID, 3, "ether_potion", "ENCHANTMENTS_STUDENT_TRADE_SID", "TOWER_STUDENT_ACCEPT_SID", "TOWER_STUDENT_SHRUG_SID", "TOWER_STUDENT_DEFAULT_SID")
|
local strgsub = string.gsub
local tbinsert = table.insert
local tointeger = math.tointeger
local strfmt = string.format
local strrep = string.rep
local tsort = table.sort
local tbconcat = table.concat
local args = {...}
local console = require("console")
local excel = require("excel")
local fs = require("fs")
lo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.