content stringlengths 5 1.05M |
|---|
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local theme = require('themes.common')
theme.xbackground = "#0e1112"
theme.xforeground = "#e0e0e0"
theme.xcolor0 = "#0e1112"
theme.xcolor1 = "#ed5f5c"
theme.xcolor2 = "#5ee26b"
theme.xcolor3 = "#f3b94c"
theme.xcolor4 ... |
padawan_kill_baz_nitch_01_convo_template = ConvoTemplate:new {
initialScreen = "",
templateType = "Lua",
luaClassHandler = "padawan_kill_baz_nitch_01_conv_handler",
screens = {}
}
intro = ConvoScreen:new {
id = "intro",
leftDialog = "@conversation/padawan_kill_baz_nitch_01:s_95db8861", -- Ah, perfect. You seem t... |
--通用护盾
function targetAfterCalc(target, buff, bullet)
if buff.cfg_property[4] then
if Hurt_Effect_judge(bullet) then
local per = buff.cfg_property[4] and buff.cfg_property[4]/10000 or 0
local value = math.min(per * bullet.hurt_final_value + buff.last_shield - target.shield, target.hp)
local _target = tar... |
return {'myeline'} |
behaviourtab = {}
Stage = {
update = 1,
render = 2,
}
for k, v in pairs(Stage) do
behaviourtab[v] = {}
end
local behavioursteps = {
'awake',
'update',
'enable',
'disable',
'destroy',
}
function resetbehaviours()
for _, stage in pairs(Stage) do
for _, b in pairs(behaviourtab[stage]) do
b:invalidatecach... |
--[[if print then
print("print exists")
print("game.player", game and game.print)
elseif io.stderr then
print = function(x) io.stderr:write(tostring(x).."\n") end
end
]]--
if log then
log("COOL log exists !")
end
local function modwarning(msg)
--local warning = warning or (game o... |
-- Copyright 2007-2021 Mitchell. See LICENSE.
local M = {}
--[[ This comment is for LuaDoc.
---
-- The python module for Textadept.
-- It provides utilities for editing Python code.
--
-- ### Key Bindings
--
-- + `Shift+Enter` (`⇧↩` | `S-Enter`)
-- Add ':' to the end of the current line and insert a newline.
module... |
ITEM.name = "Male Formal Suit"
ITEM.description = "itemSuitShirtTieDesc"
ITEM.model = "models/props_c17/SuitCase_Passenger_Physics.mdl"
ITEM.skin = 0
ITEM.width = 1
ITEM.height = 1
ITEM.price = 800
ITEM.outfitCategory = "outfit"
ITEM.replacements = {
{"tnb/citizens/aphelion", "suits"},
{"male_01", "male_01_shirt_tie"... |
---
-- php函数lua化
--
-- - 实现了php里实用的函数
-- - php里类似于gettype(获取变量类型)这种函数,lua本身就有type,所以就不写了
-- - 有些函数对原来的(php里的)函数进行了扩展,或者为了适应lua而写,会对相应的地方做说明
-- - 使用方式:`php = require('php')`,然后你就可以按照下面的方式调用所有的函数
-- - 调用方式:如array模块里的array_keys函数:`php.array:array_keys(table)`
-- - 当前模块说明,这里的函数并不一定是php里的函数,可能只是我写的一些常用代码块
--
-- @module php
... |
local perf = require("spec.helpers.perf")
local split = require("pl.stringx").split
local utils = require("spec.helpers.perf.utils")
perf.set_log_level(ngx.DEBUG)
--perf.set_retry_count(3)
local driver = os.getenv("PERF_TEST_DRIVER") or "local"
if driver == "terraform" then
perf.use_driver("terraform", {
provi... |
-- tolua: code class
-- Written by Waldemar Celes
-- TeCGraf/PUC-Rio
-- Jul 1999
-- $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,
-- enhancements, or ... |
local M = {}
function M.config()
local present, aerial = pcall(require, "aerial")
if present then
aerial.setup(require("core.utils").user_plugin_opts("plugins.aerial", {
close_behavior = "global",
backends = { "lsp", "treesitter", "markdown" },
min_width = 28,
show_guides = true,
... |
-- Copyright (c) 2015-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
require('torch')
l... |
--- === cp.apple.finalcutpro.main.MediaBrowser ===
---
--- Media Browser Module.
local require = require
-- local log = require("hs.logger").new("mediaBrowser")
local just = require("cp.just")
local prop = require("cp.prop")
local axutils = require("cp.ui.axutils")
local Table = re... |
Script.Load("lua/TechTreeConstants.lua")
-- Index used to retrieve the class name for some tech ids
kUpDataClassIndex = "class"
-- Index used to retrieve the team the upgrade is tied to
kUpDataTeamIndex = "team"
-- Index used to retrieve the rank required to unlock the upgrade
kUpDataRankIndex = "rank"
-- Index use... |
-- Thread
-- Stephen Leitnick
-- January 5, 2020
--[[
Thread.SpawnNow(func, ...)
Thread.Spawn(func, ...)
Thread.Delay(waitTime, func, ...)
Thread.DelayRepeat(waitTime, func, ...)
SpawnNow(Function func, Arguments...)
> Uses a BindableEvent to spawn a new thread
immediately. More performance-intensive than... |
--[[
ITEM PICKUP
]]
if CLIENT then
-- Parameters
local AMMO_SUFIX = "_ammo";
local AMMO_STR = "ammo_pickup";
local WEAPON_STR = "weapon_pickup";
local FLASH_COLOR = Color(255, 230, 75);
-- Item strings
Q1HUD.ItemStrings = {};
--[[
Adds an item string upon picking it up
@param {string} item... |
--[[---------------------------------------------------------------------------
-- Initial created by Simon Schoeters in 2011
--
-- 2021-05-29 Dieter Stockhausen. Add publishing functionality
-----------------------------------------------------------------------------]]--
local LrPathUtils = import 'LrPathUtils'
loca... |
--
-- Copyright (c) 2017, Jesse Freeman. All rights reserved.
--
-- Licensed under the Microsoft Public License (MS-PL) License.
-- See LICENSE file in the project root for full license information.
--
-- Contributors
-- --------------------------------------------------------
-- This is the official list of Pixel Visi... |
local ICharaSandBag = require("mod.elona.api.aspect.ICharaSandBag")
local CharaSandBagAspect = class.class("CharaSandBagAspect", ICharaSandBag)
function CharaSandBagAspect:init(chara, params)
self.is_hung_on_sand_bag = params.is_hung_on_sand_bag or false
if self.is_hung_on_sand_bag then
self:hang_on_sand... |
--[[
RuntimeContextDetection
Detects the context at runtime since script.isClient or script.isServer does not help us in certain
situations
]]
-- Crazy that there isn't a builtin way to do this...
return {
IsClientSide = function()
return World.FindObjectByName("___RUNTIME_CONTEXT_CLIENT") ~... |
local Vector = require 'vector'
a = Vector(1,0)
b = Vector(2,3)
print(a + b)
rect(a, b)
-- device = {}
-- return device;
|
local kp = require('kerplunk')
local sql = require('lsqlite3')
local ffi = require('ffi')
local bit = require('bit')
module = {}
function module.main(sgf_path, db_path)
-- open SGF game list
local file = nil
if sgf_path == nil or sgf_path == '-' then
file = io.stdin
else
file = io.ope... |
-- order.lua
-- @Author : Dencer (tdaddon@163.com)
-- @Link : https://dengsir.github.io
-- @Date : 7/4/2019, 3:25:54 AM
-- From https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/_wurst/assets/Orders.wurst
-- Credits Shadow Daemon for cj_order.j from cJass
local SpecialOrder = require('lib.stdlib.enum.... |
return require('log_body')
|
-- Morsk's /logi command: github.com/morsk/logi-command
-- A version of this code is available on github under a MIT license.
local M = {} -- object for this module
local LOGISTICS_DEFAULT_MAX = 4294967295 -- 0xFFFFFFFF
local MAX_LOGI_SLOT = 1000 -- Highest the game supports. Found by experimentation.
local function ... |
term.setBackgroundColor(sPhone.theme["backgroundColor"])
term.clear()
term.setCursorPos(1,1)
term.setTextColor(sPhone.theme["text"])
sPhone.header("RedNet Chat")
term.setBackgroundColor(sPhone.theme["backgroundColor"])
term.setTextColor(sPhone.theme["text"])
term.setCursorPos(2, 5)
if not peripheral.isPresent("back") o... |
#!/usr/bin/env lua
local env = setmetatable({}, {__index=_G})
if setfenv then setfenv(1, env) else _ENV = env end
require 'symmath.tests.unit.unit'(env, 'tests/unit/integral')
timer(nil, function()
env.a = var'a'
env.b = var'b'
env.x = var'x'
env.y = var'y'
env.xL = var'xL'
env.xR = var'xR'
env.r = var'r'
env.f = va... |
function love.load()
love.window.setMode(480, 480);
cursorIndex = 1;
randomNum1MaxDigits = 3;
randomNum2MaxDigits = 3;
randomNum1 = math.random(0, (10^(randomNum1MaxDigits)) );
randomNum2 = math.random(0, (10^(randomNum2MaxDigits)) );
maxCursorIndex = 3;
showAnswer = false;
equ... |
data:extend({
{
type = "selection-tool",
name = "muro-wall-builder",
icon = "__muro__/graphics/muro.png",
icon_size = 32,
stack_size = 1,
subgroup = "tool",
order = "c[automated-construction]-d[muro-wall-builder]",
flags = {"hidden", "only-in-cursor"},
selection_color =... |
require 'funcs'
local GameMode = require 'tetris.modes.gamemode'
local Piece = require 'tetris.components.piece'
local History6RollsRandomizer = require 'tetris.randomizers.history_6rolls'
local MarathonL1Game = GameMode:extend()
MarathonL1Game.name = "Line Attack"
MarathonL1Game.hash = "MarathonL1"
MarathonL1Game.... |
local skynet = require "skynet"
require "skynet.manager"
local sc = require "skynet.socketchannel"
local function dispatch(sock)
local r = sock:readline()
local session = tonumber(string.sub( r, 5 ))
return session, true, r
end
local channel = sc.channel({
host = "127.0.0.1",
port = 8001,
resp... |
---
-- This module is designed to parse the <code>PERF_DATA_BLOCK</code> structure, which is
-- stored in the registry under HKEY_PERFORMANCE_DATA. By querying this structure, you can
-- get a whole lot of information about what's going on.
--
-- To use this from a script, see <code>get_performance_data</code>, it is ... |
--
-- Copyright (c) 2015, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--
-- Author: Marc... |
--[[
Info.lua
--]]
return {
appName = "TextMeta",
author = "Rob Cole",
authorsWebsite = "www.robcole.com",
donateUrl = "http://www.robcole.com/Rob/Donate",
platforms = { 'Windows', 'Mac' },
pluginId = "com.robcole.lightroom.TextMeta",
xmlRpcUrl = "http://www.robcole.com/Rob/_common/... |
-- Set the terminal title
vim.opt.title = true
-- Use spaces instead of tabs
vim.opt.expandtab = true
vim.opt.smarttab = true
vim.opt.shiftwidth = 2
vim.opt.tabstop = 2
vim.opt.softtabstop = 2
-- Share the unnamed paste buffer with the system clipboard
vim.opt.clipboard = "unnamed"
-- Disable swapfiles
vim.opt.swapf... |
local luaunit = require("luaunit")
local mockagne = require("mockagne")
require("autopilot_job_status_polling")
test_autopilot_job_status_polling = {
job_status = 'job_status',
job_secondary_status = 'job_secondary_status',
query = [[SELECT ::schema."SME_AUTOPILOT_JOB_STATUS_POLLING_UDF"(
:job_name,
:... |
return {[1]={lang={English={[1]={limit={[1]={[1]=1,[2]="#"}},text="You and nearby allies gain {0}% increased Physical Damage"},[2]={[1]={k="negate",v=1},limit={[1]={[1]="#",[2]=-1}},text="You and nearby allies gain {0}% reduced Physical Damage"}}},name="physical_damage_incr",stats={[1]="physical_damage_+%"}},[2]={lang=... |
local store_key = '${ joinKey(keyPrefix, keyStore) }'
local processing_items_key = '${ joinKey(keyPrefix, keyProcessingItems) }'
local message_id = ARGV[1]
local t1 = redis.call('zrem', processing_items_key, message_id)
local t2 = redis.call('hdel', store_key, message_id)
return { t1, t2 }
|
function Test()
RunJam{ 'clean' }
local cleanFiles =
{
'appA.cpp',
'appB.cpp',
'Jamfile.jam',
}
TestFiles(cleanFiles)
if Platform == 'win32' and Compiler ~= 'mingw' then
local run1pattern =
{
'Building appA...',
'Building appB...',
'*** found 31 target(s)...',
'*** updating 6 target(s).... |
PlayerShootingState = Class {__includes = BaseState}
local animations = {
['shooting'] = Animation {
frames = {14, 15},
interval = 0.5
}
}
function PlayerShootingState:init(params)
self.player = params.player
self.rightFacing = true
end
function PlayerShootingState:enter(params)
self.player.speed =... |
--
-- Store the tags that are used in the markup
--
local redTag = TagColor:Create(RGB(255,99,71))
local goldTag = TagColor:Create(Vector.Create(0.972, 0.794, 0.102))
TagDB =
{
['red'] = function() return redTag end,
['pause'] = function() return TagPause:Create(0.5) end,
-- FOR ARTICLE
['keyword'] = ... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:29' 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... |
local cls_ui_demo = class("cls_ui_demo",cls_ui_base)
cls_ui_demo.s_ui_panel = 'uiprefab/demo_ui'
cls_ui_demo.s_ui_order = 12
function cls_ui_demo:ctor()
self.super.ctor(self)
end
function cls_ui_demo:OnStart()
log("cls_ui_demo OnStart")
-- UILabel组件
self.m_count = 333
local label_num =... |
talent_proto = {
[1] = { type = 1, class = 1, level = 1, exp = 100, per_exp = 10, cost = { {12, 10}, }, },
[2] = { type = 1, class = 1, level = 2, exp = 200, per_exp = 10, cost = { {13, 10}, }, },
[3] = { type = 1, class = 1, level = 3, exp = 300, per_exp = 10, cost = { {14, 10}, }, },
[4] = { type = 1, class = 2, leve... |
-----------------------------------
-- Area: Windurst Waters
-- NPC: Jack of Hearts
-- Adventurer's Assistant
-- Working 100%
-------------------------------------
require("scripts/globals/settings");
function onTrade(player,npc,trade)
if (trade:getItemCount() == 1 and trade:hasItemQty(536,1) == true) then
... |
require'nvim-treesitter.configs'.setup {
highlight = {
enable = true,
},
indent = {
enable = true,
-- TODO seems to be broken atm
disable = { "javascript", "javascriptreact", "typescript", "typescriptreact" },
},
autotag = {
enable = true,
},
context_commentstring = {
enable = true... |
local ast = require 'pallene.ast'
local driver = require 'pallene.driver'
local types = require 'pallene.types'
local util = require 'pallene.util'
local function run_checker(code)
assert(util.set_file_contents("test.pallene", code))
local prog_ast, errs = driver.test_ast("checker", "test.pallene")
return ... |
local version = 0.0
oldprint = _G.print
print = function (arg)
oldprint('<font color=\"#515151\">S1mple_Syndra</font><font color=\"#000000\"> - </font><font color=\"#cccccc\">'..arg..'</font>')
end
function OnLoad()
print("Loading S1mple_Chess Version "..tostring(version))
end |
local Encounter = require("mod.elona.api.Encounter")
local Chara = require("api.Chara")
local Weather = require("mod.elona.api.Weather")
local Gui = require("api.Gui")
local I18N = require("api.I18N")
local Input = require("api.Input")
local Rand = require("api.Rand")
local Calc = require("mod.elona.api.Calc")
local En... |
-- DAG definition: it is encoded as an array of stages.
Stages = {{ name="S1", tasks="2", distr={type="empirical", params={samples=solver.fileToArray("/home/biagio/repositories/OPT_Deadline/test/app_files/testP8/S1.txt")}}, pre={}, post={"S5","S6","S4"}},{ name="S0", tasks="2", distr={type="empirical", params={samples=... |
--
--
-- ----------------------------------------------------------
-- 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,
-- ... |
--====================================================================--
-- Themed Background
--
-- Shows themed use of the DMC Widget: Background
--
-- Sample code is MIT licensed, the same license which covers Lua itself
-- http://en.wikipedia.org/wiki/MIT_License
-- Copyright (C) 2015 David McCuskey. All Rights Rese... |
require "Common/LuaExtension"
require "Common/UIBase"
require "Extend/Table"
require("LuaPanda").start("127.0.0.1", 8818)
|
-- моё не первое lua app: hello.lua
print "hello Deniska"
print ("Привет Дениска")
|
-- scaffold geniefile for libiconv-genie-buildable
libiconv-genie-buildable_script = path.getabsolute(path.getdirectory(_SCRIPT))
libiconv-genie-buildable_root = path.join(libiconv-genie-buildable_script, "libiconv-genie-buildable")
libiconv-genie-buildable_includedirs = {
path.join(libiconv-genie-buildable_script, ... |
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local S = E:GetModule('Skins')
--Cache global variables
--Lua functions
local _G = _G
local gsub = gsub
local pairs = pairs
local select = select
local unpack = unpack
--WoW API / Variables
local GetMoney = GetMoney... |
require 'xlua'
require 'nn'
require 'unsup'
require 'image'
dofile('find_patch.lua')
--print('==> loading centroid')
--center = torch.load('centroid.t7b')
print('==> loading data')
raw_data = torch.load('stl-10/extra.t7b')
local MaxPooling = nn.SpatialMaxPooling
model = nn.Sequential()
model:add(nn.SpatialConvolution... |
require("game_updater")
-- CONSTANTS
local UPDATER_NAME = "panel" -- you should name the distributed auto updater zip the same as this
-- use a different name for the different versions of the updater
-- ex: "panel" for the release, "panel-beta" for the main beta, "panel-exmode" for testing the EX Mode
local MAX_REQ_S... |
local stat_scale = const.Scale.Stat
local max_stat = const.Scale.Stat * 100
local cutoff_time = 3
local wait_dome_turned_off = const.ColonistMaxWaitInDomeTurnedOff
DefineClass.Colonist =
{
__parents = { "Unit", "CityObject", "PinnableObject", "Shapeshifter", "InfopanelObj", "CycleMember" },
SelectionClass = "Colon... |
local key = KEYS[1]
local arg = ARGV[1]
return "hello world:" .. key .. " " .. arg |
local Utilities = require "Utilities"
local io = require "io"
local Logger = require "Logger"
local FileLogger = Logger:new()
function FileLogger:init(level, name, filePath)
Logger.init(self, level, name)
self.fileName = filePath .. os.date("%Y.%m.%d") .. " " .. name .. ".log"
self:openLogFile()
retur... |
--//================================================================
local theme_conf_default = {
BGBrightness = 100,
DefaultBG = false,
DisableBGA = false,
CenterPlayer = false,
MusicRate = 1.0,
FailType = "delayed",
FailMissCombo = true,
AllowW1 = true,
TimingDifficulty = 4,
L... |
ITEM.name = "Chain Axe"
ITEM.description = "Chainaxes are brutal hand-to-hand Chain Weapons crafted in the form of a great one or two-handed axe which incorporates a powered chainsaw edge."
ITEM.model = "models/joazzz/warhammer40k/weapons/chainaxe_curved.mdl"
ITEM.class = "tfa_zad_chainaxe"
ITEM.weaponCategory = "melee... |
local background = DisplayImage.new(Texture.new("background.png"))
stage:addChild(background)
local redbar = DisplayImage.new(Texture.new("red-bar.png"))
redbar:setPosition(91, 230)
stage:addChild(redbar)
local greenbar = DisplayImage.new(Texture.new("green-bar.png"))
greenbar:setPosition(91, 260)
stage:addChild(gree... |
return require 'mobdebug'
|
local Position = Component.create("Position")
function Position:initialize(x, y)
self.x = x
self.y = y
end
function Position:toVector()
return Vector(self.x, self.y)
end
function Position:setVector(vector)
self.x = vector.x
self.y = vector.y
end
|
function display_leaves(s)
if s:kind() == sexpr_kind.Cons then
local h, t = s:fields()
display_leaves(h)
display_leaves(t)
else
print(s)
assert(s:kind() == sexpr_kind.Nil or s:kind() == sexpr_kind.String or tostring(s:fields()) == tostring(s))
assert(s:kind() ~= sexpr_kind.Stri... |
object_mobile_azure_cabal_fillian = object_mobile_shared_azure_cabal_fillian:new {
}
ObjectTemplates:addTemplate(object_mobile_azure_cabal_fillian, "object/mobile/azure_cabal_fillian.iff")
|
local gauntlet_data = require "gauntlet_data"
local deepcopy = require "deepcopy"
local SpeedPlus = {
NAME = "Speed + 3",
}
function SpeedPlus:activate(current_round)
self.old_SpeedPlus = gauntlet_data.mega_SpeedPlus
gauntlet_data.mega_SpeedPlus = gauntlet_data.mega_SpeedPlus + 3
if gauntlet_d... |
local insert = table.insert
local fmt = string.format
local db = System.GetDatabase()
-- TODO - Fix
--[=[
function ta_update_kills(pc)
if string.find(pc:GetName(), '%[TEST%]') then return end
local s = [[INSERT INTO pwdata (tag, name, val)
VALUES (?, ?, ?)
ON DUPLICATE KEY UPDATE
... |
-----------------------------------
-- Area: Sacrarium
-- NPC: _0sw (Reliquiarium Gate)
-- !pos 23.447 -1.563 50.941 28
-----------------------------------
local ID = require("scripts/zones/Sacrarium/IDs")
-----------------------------------
function onTrigger(player, npc)
if (player:getZPos() < 52) then
... |
local propLimits = {}
propLimits["vip"] = 30
propLimits["elite"] = 40
propLimits["event"] = 80
propLimits["superadmin"] = 100
propLimits["developer"] = 100
hook.Add("PlayerSpawnProp", "xyz_prop_limit_check", function(ply, model)
local count = ply:GetCount("props") + 1
local limit = propLimits[ply:GetUserGroup()] or ... |
--[[
desc: ATTRIBUTE, a service for attribute.
author: Musoucrow
since: 2018-6-25
alter: 2019-7-22
]]--
local _SOUND = require("lib.sound")
local _RESMGR = require("actor.resmgr")
local _WORLD = require("actor.world")
local _FACTORY = require("actor.factory")
---@class Actor.Service.ATTRIBUTE
local _ATTRIBU... |
--package.path = "C:\\Users\\Thijs\\Dropbox\\Lua projects\\corowatch\\src\\?.lua;"..package.path
local corowatch = require("corowatch")
corowatch.export(_G)
local res = 1
local testfunc = function()
for n = 1,2000000 do
res=math.sin(n/1000)
end
end
local function test1()
collectgarbage()
collectgarbage(... |
local Component = require "component"
local physics = require "physics"
local C = {}
function C:new(right)
local new = Component:new("leg")
setmetatable(new, self)
self.__index = self
setmetatable(self, Component)
new.phase = math.random()*2
new.phaseShift = 0
new.right = right
--new.speed = math.random()*2... |
return {note={[48]={X=420;Y=836;Size=48;Sheet=3;};[36]={X=244;Y=924;Size=36;Sheet=1;};[72]={X=536;Y=612;Size=72;Sheet=10;};[96]={X=204;Y=904;Size=96;Sheet=17;};};
library_music={[72]={X=764;Y=156;Size=72;Sheet=8;};[36]={X=324;Y=124;Size=36;Sheet=1;};[96]={X=204;Y=404;Size=96;Sheet=18;};[48]={X=628;Y=160;Size=48;Sheet=3... |
-- Doesn't fully mimic the base skill as it doesn't hit "visible" invisible units, and true sight doesn't work based on aura
modifier_mutation_thundergods_wrath = class({})
function modifier_mutation_thundergods_wrath:IsHidden() return true end
function modifier_mutation_thundergods_wrath:IsDebuff() return true end
f... |
require 'config'
function write_fam(file)
for f in factions() do for u in f.units do if u.familiar then
file:write(u.id .. " " .. u.familiar.id .. "\n")
end end end
end
function read_fam(file)
m, f = file:read("*n", "*n")
while m and f do
mag = get_unit(m)
fam = get_unit(f)
... |
workspace "Citrine"
architecture "x64"
startproject "Sandbox"
configurations
{
"Debug",
"Release",
"Dist"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
-- Include directories relative to root folder (solution directory)
IncludeDir = {}
IncludeDir["GLFW"] = "Citrine/vendor/GLFW/include"... |
-------------------------------------------------------------------------------
-- Input library functions
-------------------------------------------------------------------------------
local input_lib = SF.Libraries.RegisterLocal("input")
local function getPdaObject(ply)
ply = SF.UnwrapObject(ply)
if not IsValid(... |
local platform = {}
local ffi = require("ffi")
local library = ffi.C
platform.library = library
platform.invalid_socket = -1
platform._SETSIZE = 1024
ffi.cdef([[
struct linger
{
int l_onoff;
int l_linger;
};
char *strerror( int errnum );
const char *gai_strerror( int ecode );
const char *hstrerror( int e... |
local GameScene = class("GameScene", function() return cc.Scene:create() end)
local GameLayer = require("GameLayer")
-- map 地图
-- level 级数
function GameScene.scene(map, level)
local scene = GameScene.new()
local layer = GameLayer.new()
layer:init(map, level)
scene:addChild(layer)
return scene
end
r... |
function UpdateUIInventory(player, inventoryId, item, quantity)
CallRemoteEvent(player, "UpdateUIInventory", inventoryId, item, quantity)
end |
return {
negative_op = 1,
not_op = 2,
length_op = 3,
}
|
-- egrep "^[0-9]" afres/*|wc
-- for i in txts/*; do echo $i ; lua dups.lua "$i"; done
local T=0,D,V
for l in io.lines(...) do
local ok = string.find(l,'%-%>') or string.find(l,'%<%-')
if ok then
local t,d,v = string.match(l, '(%d+)%s+(..)%s+(%d+)')
t = tonumber(t)
v = tonumber(v)
... |
function onCreate()
-- background shit
makeLuaSprite('theStage','the_mind',-600,-450)
addLuaSprite('theStage',false)
close(true); --For performance reasons, close this script once the stage is fully loaded, as this script won't be used anymore after loading the stage
end |
require("firecast.lua");
local __o_rrpgObjs = require("rrpgObjs.lua");
require("rrpgGUI.lua");
require("rrpgDialogs.lua");
require("rrpgLFM.lua");
require("ndb.lua");
require("locale.lua");
local __o_Utils = require("utils.lua");
local function constructNew_frmFichaMM3eAtaques_svg()
local obj = GUI.fromH... |
-- add modes: debug and release
add_rules("mode.debug", "mode.release")
-- includes
includes("qt_add_static_plugins.lua")
-- add target
target("${TARGETNAME}")
-- add rules
add_rules("qt.quickapp_static")
-- add headerfiles
add_headerfiles("src/*.h")
-- add files
add_files("src/*.cpp")
... |
--- Makes monolithic Factorio GUI events more manageable.
-- @module Event.Gui
-- @usage local Gui = require('__stdlib__/stdlib/event/gui')
local Event = require('__stdlib__/stdlib/event/event')
local Gui = {
__class = 'Gui'
}
setmetatable(Gui, require('__stdlib__/stdlib/core'))
local function matcher(event, patt... |
local tools = require('app.helpers.tools')
local FeedbackView = {}
function FeedbackView:initialize()
end
function FeedbackView:layout()
local MainPanel = self.ui:getChildByName('MainPanel')
MainPanel:setContentSize(cc.size(display.width,display.height))
MainPanel:setPosition(display.cx,display.cy)
se... |
local ass = require('src.lua-cor.ass')
local obj = require('src.lua-cor.obj')
ass.eq(tostring(obj), 'obj')
-- account extends obj
local account = obj:extend('account')
-- add account constructor
account.new = function(self, inst)
inst.balance = 0
return obj.new(self, inst)
end
-- add function deposit ... |
local function banPlay(msg,qq,g)
msg = CQ.Decode(msg)
if LuaEnvName == "private" then
return "私聊抽你🐎的奖呢"
end
local cards = XmlApi.Get("banCard",tostring(qq))
cards = cards == "" and 0 or tonumber(cards) or 0
if msg == "抽奖" then
if math.random() > 0.9 then
local banT... |
local RudeBusterBurst, super = Class(Sprite)
function RudeBusterBurst:init(red, x, y, angle, slow)
super:init(self, red and "effects/rudebuster/beam_red" or "effects/rudebuster/beam", x, y)
self:setOrigin(0.5, 0.5)
self:setScale(2)
self:fadeOutAndRemove()
self:play(1/15, true)
self.rotation ... |
-- This script is given to the public domain
-- It was originally intended as an april fool's joke in 2007, though it never really caught on.
-- You're encouraged to experiment with this if you have plenty of time.
-- Even if it's made as a joke, it does show that "anything is possible with ASS, although some things a... |
local Class = require("class")
local deepcopy = require("deepcopy")
local Array2D = Class.new()
function Array2D:init(rows, cols, val)
local val = val or 0
self.rows = rows
self.cols = cols
self._data = {}
for i = 1, self.rows do
local tempRow = {}
for j = 1, self.cols do
... |
-- afk - plugin for determining the client with which the connection is lost
local M = {}
local timer_module = require "core.timer"
local api
local last_sync = {
-- client = {
-- timer_id,
-- last_time
-- }
}
local afk_sec = 30
local function check_client(client)
if last_sync[client] and socket.gettime() - ... |
fx_version 'bodacious'
games { 'gta5' }
description "Loading Screen"
author "brefabu"
url "https://brefabu.ro"
version "1.0"
files {
'music/*',
'scss/*',
'config.js',
'music.js',
'tilt.js',
'index.html'
}
loadscreen 'index.html' |
------------------------------------------------------------------------------
-- hyper_paint.lua:
--
-- Functions for painting onto usage grids (for whole layouts and for
-- smaller code rooms).
--
-- TODO: Loads of this file is redundant with procedural primitives. Really
-- we just need some sensible mappings of pro... |
object_tangible_quest_legacy_valarian_pallet2_datapad = object_tangible_quest_shared_legacy_valarian_pallet2_datapad:new {
}
ObjectTemplates:addTemplate(object_tangible_quest_legacy_valarian_pallet2_datapad, "object/tangible/quest/legacy_valarian_pallet2_datapad.iff")
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.