content stringlengths 5 1.05M |
|---|
--[[
Title: Messages
Handles messaging like logging, debug, etc.
]]
--[[
Function: tsay
Prints a message in talk say as well as in the user's consoles.
Parameters:
ply - The player to print to, set to nil to send to everyone. (Ignores this param if called on client)
msg - The message to print.
wait - *... |
-- PRAISE FLOATS
local vec = Vector(12, 12, 0)
local ang = Angle()
print(vec:Angle()) -- Fucked up
vec = Vector(12, 12, 0.001)
print(vec:Angle()) -- Now correct
vec = Vector(65.001, 0.001, 199.001)
ang = vec:Angle()
ang:Normalize()
print(ang)
|
window = {}
do
local w = {}
window.open = function(p, id, ...)
if p and id and w[id] and not window.isOpened(p, id) then
w[id].player[p] = w[id].player[p] or {fixed={}, dynamic={}, var={}}
local fixed = w[id].player[p].fixed
fixed.txt, fixed.img = w[id].open(p, w[id].player[p].var, ...)
if w[id].update ... |
--- Additional lua globals
-- @module globals
-- luacheck: globals prequire rawtostring inline_if serpent inspect semver traceback
-- luacheck: globals _STDLIB_NO_STRING _STDLIB_NO_TABLE _STDLIB_NO_MATH _STDLIB_NO_DEFINES_COLOR _STDLIB_NO_DEFINES_TIME
local _TESTING = true
-- Mutate lua built ins
_STDLIB_NO_STRING =... |
-- Copyright (C) 2017 josephzeng <josephzeng36@gmail.com>
--
-- Distributed under terms of the MIT license.
--
local utils = require "utils"
local skynet = require "skynet"
local packet = require "packet"
local msg = require "msg"
local M = {}
function M:create(fd, cmd, sessionid, param)
end
function M:join(fd, cmd... |
-- Demo guidance module
-- The MissileDriver module does all the magic: target locking, target
-- re-acquisition, self-destruction.
-- The only thing a guidance module has to worry about is what to aim
-- a missile at.
-- Every update (or 4th update or whatever) that enemies and your
-- missiles are active will resul... |
object_tangible_furniture_decorative_tanning_hide_s02 = object_tangible_furniture_decorative_shared_tanning_hide_s02:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_decorative_tanning_hide_s02, "object/tangible/furniture/decorative/tanning_hide_s02.iff")
|
---- -*- Mode: Lua; -*-
----
---- grep.lua a preview of what RPL macros will be able to do
----
---- © Copyright IBM Corporation 2016.
---- LICENSE: MIT License (https://opensource.org/licenses/mit-license.html)
---- AUTHOR: Jamie A. Jennings... |
local PANEL = {}
local paintFunctions = {}
paintFunctions[0] = function(this, w, h)
surface.SetDrawColor(0, 0, 0, 50)
surface.DrawRect(0, 0, w, h)
end
paintFunctions[1] = function(this, w, h)
end
function PANEL:Init()
if (IsValid(nut.gui.classes)) then
nut.gui.classes:R... |
--Game
local flux = require "flux"
--TODO Fixa en funktion som kolla collision mot objekt som kommer.
function love.load()
width, height = love.graphics.getDimensions()
mapsize = height/15
rowcounter = 1
mapmoveobjects = {}
life = {
x = width/2-mapsize,
y = height/2-mapsize,
... |
object_mobile_hawk_bat = object_mobile_shared_hawk_bat:new {
}
ObjectTemplates:addTemplate(object_mobile_hawk_bat, "object/mobile/hawk_bat.iff")
|
------------------- PropsItemView --------------------------
--[Comment]
--道具图标
local PropsItemView = class(CommonGameLayer, false);
PropsItemView.s_controls = {
btnProp = 1,
imgProp = 2,
txtPropNum = 3,
btnTop = 4,
imgFrame = 5,
}
--[Comment]
--道具图标构造函数
PropsItemView.ctor = function(self, ... |
print("This is the modded ChooseTradeUnitNewHome from 'UI - Trade Route Enhancements'")
-------------------------------------------------
-- Choose Trade Unit Home City Popup
-------------------------------------------------
include( "IconSupport" );
include( "InstanceManager" );
-- Used for Piano Keys
loc... |
local PLUGIN = PLUGIN
PLUGIN.name = "Custom Languages"
PLUGIN.author = "Usuariozombie"
PLUGIN.description = "A simple way to add custom languages by editing this file."
function AddLanguage(langName, langFlag)
ix.flag.Add(
langFlag,
langName,
function(client, bGiven)
end
)
ix.command.Add(
langName:sub(1,... |
return {
init_effect = "",
name = "白龙剧情战 触发龙宫机关-回复技能 buff4:回血效果",
time = 999,
color = "yellow",
picture = "",
desc = "",
stack = 1,
id = 9293,
icon = 9293,
last_effect = "Health",
effect_list = {
{
type = "BattleBuffHOT",
trigger = {
"onUpdate"
},
arg_list = {
time = 3,
maxHPRatio =... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:26' using the latest game version.
NOTE: This file should only be used as IDE support; it should NOT be distributed with addons!
****************************************************************************
CONTENTS OF THIS FILE IS COPYRI... |
hook.Add("Initialize", "stormfox_realtime", function()
if not StormFox then return end
StormFox.SetTime(os.date("%H:%M"))
RunConsoleCommand("sf_timespeed", 1 / 60)
end)
|
-- helpers.lua
--
-- This file contains some miscellaneous helper functions
function split(input, seperators)
-- Return table of words in input string seperated by the characters
-- in seperators
local pattern = "[^"..seperators.."]+"
local t = {}
for word in input:gmatch(pattern) do
table.insert(t, word... |
-- Start Gameplay Thread
if (GameplayConfig.UsePosse) then
Helpers.StartGameplay(Posse)
end
-- Packet Handlers
Helpers.PacketHandler('posse:OpenCreate', function(data)
if (Posse.PosseInfo ~= nil) then
return
end
Helpers.MessageUI('posse', 'showCreate', nil)
Helpers.SetUIFocus(t... |
workspace "RLGameGui"
configurations { "Debug","Debug.DLL", "Release", "Release.DLL" }
platforms { "x64"}
defaultplatform "x64"
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Debug.DLL"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines ... |
include "FolderStructure.lua"
workspace (solutionname)
language "C++"
cppdialect "C++17"
architecture "x64"
systemversion "latest"
characterset "MBCS"
startproject (appname)
configurations
{
"Debug",
"Profiling",
"Release"
}
outputdir =... |
local code = [[display
Hello World!
]]
--[[
==QUICK REFERENCE==
display
<text>
prints text in the console
setInstance
<name of instance>
<value>
creates a variable or sets it
destroyInstance
<instance>
destroys instance, only recommended for temporary instances
... |
-- Copyright 2014 by Ida Bruhns
--
-- This file may be distributed and/or modified
--
-- 1. under the LaTeX Project Public License and/or
-- 2. under the GNU Public License
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- This is a subclass of ForceTemplate, which is used to implement force... |
local function setCaretStyle(self, editor) editor:SetCaretStyle(wxstc.wxSTC_CARETSTYLE_BLOCK) end
return {
name = "Block cursor",
description = "Switches cursor to a block cursor.",
author = "Paul Kulchenko",
version = 0.21,
onEditorLoad = setCaretStyle,
onEditorNew = setCaretStyle,
}
|
-- SORTED LISTS with EXPIRE by member
-- ZLDELXP key
local ZSET_SCORE_KEY = KEYS[1]..".SCORE"
local ZSET_EXPIREAT_KEY = KEYS[1]..".EXPIREAT"
redis.call('DEL', KEYS[1])
redis.call('DEL', ZSET_SCORE_KEY)
redis.call('DEL', ZSET_EXPIREAT_KEY)
return true
|
--[[
Author: csqrl
ContainerService (Client):
Provides events and methods for interacting with replicated instances.
Public API:
Properties:
* Service.RootContainer: ScreenGui?
* Service.Containers: Dictionary<string, Folder>
Methods:
* Service.GetRootContainer... |
local item_manager = {}
local replicatedStorage = game:GetService("ReplicatedStorage")
local modules = require(replicatedStorage:WaitForChild("modules"))
local detection = modules.load("detection")
local network = modules.load("network")
local mapping = modules.load("mapping")
local itemDataLookup = require(replicat... |
pg = pg or {}
pg.enemy_data_statistics_359 = {
[909006] = {
cannon = 145,
armor = 0,
air = 0,
cannon_growth = 0,
hit_growth = 0,
reload = 150,
speed_growth = 0,
dodge = 0,
torpedo = 0,
speed = 15,
luck = 0,
reload_growth = 0,
dodge_growth = 0,
luck_growth = 0,
star = 2,
hit = 600,
ant... |
local Class = require('charon.oop.Class')
local test = {}
test.should_execute_prepare = function()
local MyClass = Class.new("MyClass")
assert(type(MyClass.myMethod) == 'nil')
MyClass.mixin('util.oop.MyMethods')
assert(type(MyClass.myMethod) == 'function')
end
test.should_remove_mixin_methods_in_redefine_cla... |
ITEM.name = "M60"
ITEM.desc = "Боеприпасы 5.56х45"
ITEM.price = 66112
ITEM.class = "weapon_cop_m60"
ITEM.weaponCategory = "1"
ITEM.category = "Оружие"
ITEM.exRender = false
ITEM.weight = 5.13
ITEM.model = "models/weapons/wick/stcopwep/m60_model_world.mdl"
ITEM.width = 5
ITEM.height = 2
ITEM.iconCam = {
p... |
AddCSLuaFile()
--[[
Expression 2 for Garry's Mod
Andreas "Syranide" Svensson, me@syranide.com
]]
wire_expression2_delta = 0.0000001000000
delta = wire_expression2_delta
-- functions to type-check function return values.
local wire_expression2_debug = CreateConVar("wire_expression2_debug", 0, 0)
if SERVER then
... |
-- pac freqgraph.lua
--[[
an interactive histogram-ish frequency graph
used in "spectral filter" and "pitch distort"
usage :
local Freqgraph = require "include/gui-extras/freqgraph"
local fg = Freqgraph {
-- required paramters :
-- an array (Lua or C) containing the values to be read and modified by the intera... |
---@type Framework.UI.Prefab
local super = require("Framework.UI.Prefab")
---@class CustomGame.UI.TestUI:Framework.UI.Prefab
---@field m_Text UnityEngine.UI.Text
---@field m_Button Framework.UI.Button
---@field m2_Text UnityEngine.UI.Text
TestUI = class("CustomGame.UI.TestUI", super)
function TestUI:GetAssetPath()
... |
local SluaTestCase=import('SluaTestCase');
local t=SluaTestCase();
local TestCount = 1000000
local start = os.clock()
for i=1,TestCount do
t:EmptyFunc(t)
end
print("1m call EmptyFunc, take time",os.clock()-start)
local start = os.clock()
for i=1,TestCount do
t:ReturnInt()
end
print("1m call ReturnInt, take ... |
local string = require "string"
local function compare(a, b)
if a:sub(1, 1) == 'v' then a = a:sub(2) end
if b:sub(1, 1) == 'v' then b = b:sub(2) end
local aiter = string.gmatch(a, "%w+")
local biter = string.gmatch(b, "%w+")
while true do
local aitem = aiter()
local bitem = biter()
... |
-- Copyright (c) 2021 Trevor Redfern
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
return {
actions = {
centerOnPlayer = require "game.ui.camera.actions.center_on_player",
setDimensions = require "game.ui.camera.actions.set_dimensions",
setPosition... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:27' using the latest game version.
NOTE: This file should only be used as IDE support; it should NOT be distributed with addons!
****************************************************************************
CONTENTS OF THIS FILE IS COPYRI... |
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
if player:getStorageValue(Storage.secretService.AVINMission03) == 1 then
player:setStorageValue(Storage.secretService.AVINMission03, 2)
Game.createMonster('amazon', Position(32326,... |
local Event=require("__stdlib__/stdlib/event/event")
Event.register(defines.events.on_gui_opened, function(e)
if (e.entity or {}).name == "anvil" then
game.players[e.player_index].opened = nil
game.players[e.player_index].print{"messages.anvil-cannot-be-opened"}
end
end)
local last_hammer_tick = {}
local min_ha... |
-- Copyright 2014-2020 stef@ailleurs.land. See License.txt.
-- Plain Texinfo version 5.2 LPeg lexer
-- Freely inspired from Mitchell work and valuable help from him too !
-- Directives are processed (more or less) in the Reference Card Texinfo order
-- Reference Card page for each directive group is in comment for ref... |
local endpoints = require "kong.api.endpoints"
local kong = kong
local jwt_secrets_schema = kong.db.jwt_secrets.schema
local consumers_schema = kong.db.consumers.schema
return {
["/consumers/:consumers/jwt/"] = {
schema = jwt_secrets_schema,
methods = {
GET = endpoints.get_collection_endpoint(jwt_... |
-- loads spoons using SpoonInstall
-- see https://www.hammerspoon.org/Spoons/SpoonInstall.html
local SpoonInstall = hs.loadSpoon("SpoonInstall")
-- SpoonInstall:andUse("",
-- {
-- config = {
-- },
-- hotkeys = {
-- },
-- disable = true,
-- start = true
-- }
-- )
SpoonInstall:andUse("Rel... |
local Logger = require "logger"
local BasePlugin = require "kong.plugins.base_plugin"
local InitWorker = require "kong.plugins.header-based-request-termination.init_worker"
local Access = require "kong.plugins.header-based-request-termination.access"
local kong = kong
local ngx = ngx
local HeaderBasedRequestTerminati... |
ForceField = {}
ForceField.positions = {}
ForceField.lifeTime = {}
ForceField.spawnTime = {}
function ForceField.create(node, radius, offset)
--node = SceneNode()
--radius = number()
--offset = Vec3()
local mesh = NodeMesh()
mesh:setVertexType(VertexType.position3, VertexType.color4, VertexType.uvcoord, VertexTyp... |
local view = require("bible.view")
local M = {}
M.defaults = {}
M.options = M.defaults -- not necessary, but better code completion
-- display the verse in an ephemeral window
function M.display_verse(lines, options)
local options = vim.tbl_extend("force", M.options, options)
view.ephemeral_entry(lines, options... |
---------
-- Lua library for Gentoo-style versioning format
--
-- **Examples:**
-- local ver = require "gversion"
--
-- -- Parse version
-- local pkgver = ver.parse("2.1_rc3-r1")
-- local pkgver = ver"2.1_rc3-r1"
--
-- -- Access version components
-- pkgver[1] --> "2"
-- pkgver.major --... |
SELECTED_CARS = {}
SELECTED_TRACK_INDICES = {}
BLIPS = {}
CHECKPOINT_MARKERS = {}
PLAYER_SELECTIONS = {}
PLAYER_FAILSAFETIMERS = {}
PLAYER_FAILSAFETIMERCOUNTERS = {}
COLORS = {
{math.random(0, 255), math.random(0, 255), math.random(0, 255)},
{math.random(0, 255), math.random(0, 255), math.random(0, 255)},
{math.r... |
-- 5 sec. delay before running main program to be able to reflash in case of hung/reboot loops
-- SDK 2.2.1 minimum !
function startup()
dofile('main.lua')
end
print ("Init.lua started : 5 sec. delay before running main program")
tmr.create():alarm(5000, tmr.ALARM_SINGLE, startup) |
--[[
Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com>
This code is licensed under the MIT. See LICENSE for details.
]]
local delsticker = {}
local mattata = require('mattata')
function delsticker:init()
delsticker.commands = mattata.commands(self.info.username):command('delsticker').table
d... |
class 'roto_disk'
function roto_disk:initProps()
-- Animation properties
--self.radius = 4*32-self.npc_obj.width/2-16
self.radius = 4*32-32
self.direction = self.npc_obj.direction
self.center_x = self.def_initX
if(self.direction<0) then
self.iteration=2.75
self.angle = 90
... |
require "ui.basicwidget"
NZLuaBaseViewClass = Inherit(BasicWidget)
function NewUILuaClass(str)
str = str or "NZLuaBaseViewClass"
return Inherit(_G[str])
end
function NZLuaBaseViewClass:Ctor()
self.m_MessageHandles = {}
end
function NZLuaBaseViewClass:Destroy( )
for i, v in ipairs(self.m_MessageHandles) do
v:Re... |
--[[
// a passthrough stream.
// basically just the most minimal sort of Transform stream.
// Every written chunk gets output as-is.
--]]
local Transform = require('./stream_transform').Transform
local core = require('core')
local PassThrough = Transform:extend()
function PassThrough:initialize(options)
--[[
if ... |
return function()
local debug = require(script.Parent.debug)
local getRefLabel = debug.getRefLabel
local trimErrMsgLineNum = debug.trimErrMsgLineNum
describe("getRefLabel", function()
describe("success", function()
describe("function return value", function()
it("should return 'nil' w... |
#!/usr/bin/env tarantool
local test = require("sqltester")
test:plan(93)
--!./tcltestrunner.lua
-- 2007 May 14
--
-- The author disclaims copyright to this source code. In place of
-- a legal notice, here is a blessing:
--
-- May you do good and not evil.
-- May you find forgiveness for yourself and forgive oth... |
-- Project configuration via premake, download at https://premake.github.io/download/
workspace "MemoizeCPP"
configurations { "Debug", "Release" }
project "memoizeTests"
kind "ConsoleApp"
language "C++"
files { "tests/**.cpp", "tests/**.h" }
includedirs { "./include" }
filter "configurations:Debug"
define... |
local loader = function(loader, ...)
local cqueues = require"cqueues"
local resolver = require"_cqueues.dns.resolver"
local config = require"cqueues.dns.config"
local record = require"cqueues.dns.record"
local errno = require"cqueues.errno"
local EAGAIN = errno.EAGAIN
local ETIMEDOUT = errno.ETIMEDOUT
local mon... |
-- Use of this source code is governed by the Apache 2.0 license; see COPYING.
-- Application to connect to a virtio-net driver implementation
--
-- Copyright (c) 2015 Virtual Open Systems
--
module(..., package.seeall)
local debug = _G.developer_debug
local ffi = require("ffi")
local C = ffi.C
local ... |
--Copyright (C) 2009 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
... |
function love.load()
CALL_ABOUT = false
TITLE = "Boy's Platformer"
sprites = {
playerSheet = love.graphics.newImage("sprites/playerSheet.png"),
enemySheet = love.graphics.newImage("sprites/enemySheet.png"),
background = love.graphics.newImage("sprites/background.png"),
arro... |
local playsession = {
{"Dimava", {1203}},
{"MrJSelig", {36221}},
{"Taylor3", {1291}},
{"mxo", {989}},
{"Flashbacks", {1012143}},
{"PoTaToo", {44070}},
{"AurelienG", {208073}},
{"kokol789", {2312}},
{"nicko412", {599}},
{"Krono", {992595}},
{"akrause", {28217}},
{"hwangtamu", {585551}},
{"hasannuh", {4966}}... |
-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
-- Copyright 2013 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
local map, section, net = ...
local peeraddr, ip6addr
local tunlink, defaultroute, metric, ttl, mtu
maptype = section:taboption("general", ListValue, "type"... |
local function StringSplit(input, separator, limit)
if #input == 0 then
if string.find(input, separator) then
return {}
else
return {""}
end
end
if not limit then
limit = -1
end
if limit == 1 then
return {input}
end
if not separator then
separator = "%s+"
end
local start, stop = string.find(... |
#!/usr/bin/env lua5.1
local errors =
mtrequire("com.github.thetaepsilon.minetest.libmthelpers.errors")
local expect_error = errors.expect_error
local handler_lut =
mtrequire("com.github.thetaepsilon.minetest.libmthelpers.datastructs.handler_lut")
local testing =
mtrequire("com.github.thetaepsilon.minetest.libmthelp... |
return {
{
effect_list = {
{
type = "BattleBuffAddAttr",
trigger = {
"onAttach"
},
arg_list = {
attr = "oxyMax",
number = -150
}
}
}
},
{
effect_list = {
{
type = "BattleBuffAddAttr",
trigger = {
"onAttach"
},
arg_list = {
attr = "oxyMax",
... |
local function foo()
print('test')
end
foo()
|
uiOpen = false
ESX = nil
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
end)
Citizen.CreateThread(function()
if Config.UseCommand then
RegisterCommand('shop', function()
OpenShop... |
local player = ...
local pn = ToEnumShortString(player)
local mods = SL[pn].ActiveModifiers
local IsUltraWide = (GetScreenAspectRatio() > 21/9)
local NumPlayers = #GAMESTATE:GetHumanPlayers()
-- -----------------------------------------------------------------------
-- first, check for conditions where we might not dr... |
local WIDGET, VERSION = 'NumericBox', 2
local GUI = LibStub('NetEaseGUI-2.0')
local NumericBox = GUI:NewClass(WIDGET, GUI:GetClass('InputBox'), VERSION)
if not NumericBox then
return
end
local function ButtonOnClick(self)
-- local parent = self:GetParent()
-- parent:SetNumber(parent:GetNumber() + self.de... |
--@name External file inclusion
-- if you wish to execute code contained in an external file instead,
-- use the require-directive, e.g.:
require 'myExternalFile'
-- Above will look for <V-REP executable path>/myExternalFile.lua or
-- <V-REP executable path>/lua/myExternalFile.lua
-- (the file can be opened in this e... |
vim.opt_local.tabstop = 2
vim.opt_local.softtabstop = 2
vim.opt_local.shiftwidth = 2
vim.opt_local.expandtab = true
vim.opt_local.autoindent = true
vim.opt_local.fileformat = "unix"
vim.api.nvim_buf_set_keymap(
vim.api.nvim_get_current_buf(),
"n",
"<leader>lf",
[[<CMD>lua require("stylua-nvim").format_file()<C... |
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--
local fActivatePowerOriginal;
function onInit()
fActivatePowerOriginal = super.activatePower;
super.activatePower = activatePower;
if super and super.onInit then
super.onInit()
end
end
functio... |
local Gamestate = require 'vendor/gamestate'
local window = require 'window'
local fonts = require 'fonts'
local camera = require 'camera'
local sound = require 'vendor/TEsound'
local state = Gamestate.new()
function state:init()
end
function state:enter(previous)
fonts.set( 'big' )
love.graphics.setBackgroun... |
--[[
Author: kritth
Date: 5.1.2015.
Order the explosion in clockwise direction
]]
function freezing_field_order_explosion(keys)
Timers:CreateTimer(0.0, function()
keys.ability:ApplyDataDrivenModifier(keys.caster, keys.caster, "modifier_freezing_field_northwest_thinker_datadriven", {})
re... |
local errutils = {}
function errutils.wrong_arg_msg(func_name, arg_no, msg)
return "bad argument #"..arg_no.." to '"..func_name.."' ("..msg..")"
end
function errutils.wrong_argtype_msg(func_name, arg_no, real_type, expected_type, ...)
local types = {...}
if next(types) then
expected_type =... |
CHARMS = {
addr = 0x7E2261,
--BYTE 1
[0] = {
--["unused_1"] = 0x01,
--["unused_2"] = 0x02,
--["unused_3"] = 0x04,
--["unused_4"] = 0x08,
--["unused_5"] = 0x10,
["armor_polish"] = 0x20,
["chocobo_egg"] = 0x40,
["insect_incense"] = 0x80,
},
... |
--[[
Connects to MarketplaceService's callback for completing a native purchase, so that we can
retry after an upsell purchase was processed
]]
local Root = script.Parent.Parent.Parent
local MarketplaceService = game:GetService("MarketplaceService")
local CorePackages = game:GetService("CorePackages")
local Purchas... |
-- This file is automatically generated, do not edit!
-- Path of Building
--
-- Active Intelligence skill gems
-- Skill data (c) Grinding Gear Games
--
local skills, mod, flag, skill = ...
skills["Arc"] = {
name = "Arc",
color = 3,
baseEffectiveness = 1.9680000543594,
incrementalEffectiveness = 0.032299999147654,
... |
return function()
local tiny = require "tiny"
local cpml = require "cpml"
return tiny.processingSystem {
filter = tiny.requireAny("position", "orientation", "scale"),
process = function(_, entity, _)
-- update matrices for rendering and collision point updates
local model = cpml.mat4()
if enti... |
--[[
-- added by wsh @ 2018-03-02
--]]
local function Run()
local stack = UIManager:GetInstance().__window_stack
print(table.dump(stack))
end
return {
Run = Run
} |
slot0 = {
ModifyMesh = function ()
return function (slot0, slot1)
if not ReflectionHelp.RefCallMethod(typeof("VerticalText"), "IsActive", slot0) then
return
end
slot2 = GetComponent(ReflectionHelp.RefGetProperty(typeof("VerticalText"), "gameObject", slot0), typeof(Text))
ReflectionHelp.RefSetField(... |
local playsession = {
{"ZeroBeta", {71910}},
{"svjatosha", {71902}},
{"tyssa", {71303}},
{"xYoMomx", {2170}},
{"kubek", {41329}},
{"tyce1234", {15068}}
}
return playsession |
DEFINE_BASECLASS("ma2_proj_warhammer_lvl1")
AddCSLuaFile()
ENT.Base = "ma2_proj_warhammer_lvl1"
ENT.Damage = 600
ENT.BlastRadius = 712
ENT.ParticleAttach = "gm_MA2_hammer_lvl2"
ENT.ParticleImpact = "gm_MA2_explosion_hammer_lvl2"
ENT.FireSound = Sound("MA2_Weapon.Hammer2")
PrecacheParticleSys... |
local Object = require 'objectlua.Object'
local Class = require 'objectlua.Class'
TestObjectImplementation = {}
function TestObjectImplementation:testObjectModel()
assertEquals(debug.getmetatable(Class), Class.class.__prototype__)
assertEquals(debug.getmetatable(Class.class.__prototype__), Object.class.__pro... |
local function rot8r(n)
local a,b,c,d,e,f,g,h=1,2,3,4,5,6,7,8
for x=1,n do
a,b,c,d,e,f,g,h=h,a,b,c,d,e,f,g
end
return table.concat{a,b,c,d,e,f,g,h}
end
local function rot8l(n)
local a,b,c,d,e,f,g,h=1,2,3,4,5,6,7,8
for x=1,n do
a,b,c,d,e,f,g,h=b,c,d,e,f,g,h,a
end
return table.concat{a,b,c,d,e,f,... |
local GroupEvent = {ADDED = 1, REMOVED = 2, ADDED_OR_REMOVED = 3}
return GroupEvent |
local has_xban2_mod = minetest.get_modpath("xban2")
-- auth request from webmail
function mail.handlers.auth(auth)
local handler = minetest.get_auth_handler()
minetest.log("action", "[webmail] auth: " .. auth.name)
local success = false
local banned = false
local message = ""
if mail.webmail.disallow_banned_pl... |
local Event = require('event')
local Socket = require('socket')
local Util = require('util')
local function vncHost(socket)
local methods = { 'blit', 'clear', 'clearLine', 'setCursorPos', 'write',
'setTextColor', 'setTextColour', 'setBackgroundColor',
'setBackgroundColour',... |
local Cosmetic_API = require(script:GetCustomProperty("Cosmetic_API"))
local DataFolder = script:GetCustomProperty("DataFolder"):WaitForObject()
AssignedTable= {}
local function FindEmptySlot()
for i = 1, 16 do
if AssignedTable[i] == nil or not AssignedTable[i]:IsA("Player") then
return i
... |
-- Creates an Illusion, making use of the built in modifier_illusion
function ConjureImage( event )
print("Conjure Image")
local caster = event.caster
local player = caster:GetPlayerID()
local ability = event.ability
local unit_name = caster:GetUnitName()
local origin = caster:GetAbsOrigin() + RandomVector(100)
... |
Key = Engine:EntityClass('Key')
function Key:setup(data)
self.renderDepth = RenderingDepth.Key
self.image = Engine:getAsset('art/golden-key.png')
self.kind = data.kind -- 'golden' or 'silver'
BasicEntSetup(self, data)
end
function Key:render()
love.graphics.setColor(1, 1, 1, 1)
DrawSimpleEnt... |
--
-- Created by IntelliJ IDEA. Copyright (C) 2017 Hanks
-- User: hanks
-- Date: 2017/5/26
-- qiqu
--
require "import"
import "android.widget.*"
import "android.content.*"
import "android.support.v4.view.ViewPager"
import "androlua.adapter.LuaPagerAdapter"
import "androlua.LuaImageLoader"
import "android.app.DownloadM... |
local keywords = {
"auto",
"double",
"int",
"struct",
"break",
"else",
"long",
"switch",
"case",
"enum",
"register",
"typedef",
"char",
"extern",
"return",
"union",
"const",
"float",
"short",
"unsigned",
"continue",
"for",
"sign... |
local rect = display.newRect(300, 500, 100, 100);
local rect2 = display.newRect(300, 700, 100, 100);
local rect3 = display.newRect(300, 300, 100, 100);
function move()
transition.to( rect, { time=500, y = (rect.y + 100) % display.contentHeight } )
end
function alpha()
transition.to( rect2, { time=500, alpha = (re... |
-- ------------------------------------------------------------------------------
workspace ("gen_metacast_" .. _ACTION)
configurations { "Debug", "Release" }
platforms { "x86" }
filter "platforms:x86"
architecture "x86"
system "windows"
defines {
"WI... |
local config = require "config"
local exports = {}
function exports.index(req, res)
local tab = req.query.tab
local item = req.query.item
res.set_layout(nil)
return res.render('system/index', {
cur_tab = tab,
cur_item = item,
})
end
return exports
|
---------------------------------------------------------------------------
--- Taglist widget module for awful.
--
-- Here is a more advanced example of how to extent the `taglist`. It provides:
--
-- * mouse "hover" color
-- * an extra index field
-- * a powerline look and feel
--
--
--
--
end
local _now = function()
return os.clock()
end
-- when available, it uses openresty env
if ngx t... |
#!/usr/bin/env lua
USER=os.getenv("U")
PASSWORD=os.getenv("P")
function run(l, n, t, s, f, o)
local cmd, status = string.format("wget -c --timeout=%d ", t), nil
if #l > 0 then
cmd = cmd .. string.format("--limit-rate=%s ", l)
end
if #n > 0 then
cmd = cmd .. string.format("-O \"%s\" "... |
local wielding_only = minetest.settings:get_bool("walking_light.wielding_only", false)
local players = {}
minetest.register_on_joinplayer(function(mt_player)
local name = mt_player:get_player_name()
players[name] = {name=name,pos={x=0,y=32000,z=0},wielding=0,mt_player=mt_player}
end)
minetest.register_on_leaveplay... |
local propFireDashVFX = script:GetCustomProperty("FireDashVFX")
local propDashStrength = script:GetCustomProperty("DashStrength")
local ability = script:GetCustomProperty("DashAbility"):WaitForObject()
function OnAbilityCast(ability)
local vfxSpawnPos = ability.owner:GetWorldPosition() - Vector3.New(ability.o... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.