content stringlengths 5 1.05M |
|---|
-- Test for a lot of variations of the 'fileformats' option
local helpers = require('test.functional.helpers')(after_each)
local feed, clear, command = helpers.feed, helpers.clear, helpers.command
local eq, write_file = helpers.eq, helpers.write_file
local poke_eventloop = helpers.poke_eventloop
describe('fileformats... |
DefineClass.CityObject = {
__parents = { "Object", "Modifiable" },
city = false,
}
function CityObject:Init()
local map_id = self:GetMapID()
if not self.city then
self.city = Cities[map_id] or UICity
end
assert(self.city.map_id == map_id)
end
function CityObject:Random(...)
local city = self.city
if not cit... |
-- * Technology *
data:extend(
{
{
type = "technology",
name = "black-module-1",
icon = "__BlackModule__/graphics/black-module-tech.png",
icon_size = 128,
effects = {
{
type = "unlock-recipe",
recipe = "black-module-1"
},
{
type = "unlock-recipe",
... |
-- ==============
-- DIALOG MANAGER
-- ==============
---@class DialogVar
---@field dialogVar string DialogVariable
---@field dialogVal string|function DialogVariable's value or Resolver function
---@field dialogType string DialogVariable's type
---@class Dialog
---@field Name string DialogName
---@field isAutomat... |
--[[
---------------------------------------------------------
Geierwallys dynamic telemetry screen library for DC/DS 24 transmitters
Makes flexible display adjustments possible. Users can create her own screenfiles
2 telemetry pages adjustable by user over data files provided.
------------------------------------... |
--[[
desc: Stay, a state of Duelist.
author: Musoucrow
since: 2018-8-19
alter: 2018-8-7
]]--
local _CONFIG = require("config")
local _STATE = require("actor.service.state")
local _INPUT = require("actor.service.input")
local _Base = require("actor.state.base")
---@class Actor.State.Duelist.Stay:Actor.State
local... |
-- a machine to copy books
local S
if minetest.get_modpath( "intllib" ) and intllib then
S = intllib.Getter()
else
S = function(s) return s end
end
local prepare_formspec = function(channel)
local c = ''
if channel then
c = channel
end
local formspec = "size[8,9]"..
"label[0,0;"..S("Paper:").."]"... |
require("import") -- the import fn
import("disown") -- import code
-- catch "undefined" global variables
local env = _ENV -- Lua 5.2
if not env then env = getfenv () end -- Lua 5.1
setmetatable(env, {__index=function (t,i) error("undefined global variable `"..i.."'",2) end})
for x=0,100 do
a=disown.A()
b=diso... |
local discordia = require('discordia')
local client = discordia.Client()
local embed = require('./internal/embed.lua')
return {
name = "Sum",
info = "Sums up the two numbers indicated.",
usage = "sum [number] [number]",
fn = function(msg)
local num1, num2 = msg.cleanContent:match("%S+%s+(%d+)%s... |
object_static_worldbuilding_art_must_jedi_relic_statue_pink = object_static_worldbuilding_art_shared_must_jedi_relic_statue_pink:new {
}
ObjectTemplates:addTemplate(object_static_worldbuilding_art_must_jedi_relic_statue_pink, "object/static/worldbuilding/art/must_jedi_relic_statue_pink.iff") |
project "gtkgraph"
kind "StaticLib"
targetdir "../lib"
configuration {}
includedirs {
"./",
}
libdirs {
}
links{
"glib-2.0",
"gtk-win32-2.0",
"gdk-win32-2.0",
"gobject-2.0",
"gdk_pixbuf-2.0",
"gthread-2.0",
"gmodule-2.0",
"pango-1.0",
"atk-1.0",
"zdll",
}
files {
"**.cpp",
"**.cc",
"**... |
local PredatorBrain={};
PredatorBrain.__index = PredatorBrain;
function PredatorBrain.create(agent)
local brain = {}; -- our new object
setmetatable(brain,PredatorBrain); -- make GameAgent handle lookup
brain.owner=agent;
brain.owner:setLife(100);
brain.owner:setSenseRange(200);
brain.owner:setWal... |
local Settings = {
speed = 80,
gravity = 80,
jumpAcceleration = 1000,
jumpMaxSpeed = 80,
yVelocity = 0,
isJumping = false,
isGrounded = false,
hasReachedMax = false
}
return Settings |
local highlight = require('palenightfall.internal').highlight
local M = {}
---@alias PalenightfallHighlightConfig table<string, PalenightfallHighlight>
---Color definitions.
---
---@type table<string, string>
M.colors = {
background = '#252837',
foreground = '#a6accd',
background_darker = '#232534',
highlig... |
return {
init_effect = "",
name = "苏俄冰锥减速",
time = 4,
picture = "",
desc = "4s减速",
stack = 1,
id = 323,
icon = 323,
last_effect = "Darkness",
effect_list = {
{
type = "BattleBuffFixVelocity",
trigger = {
"onAttach",
"onStack",
"onRemove"
},
arg_list = {
add = 0,
mul = -4000
... |
--[[
desc:状态机
auth:Carol Luo
]]
local class = require("class")
local pokerStatus = require("poker.status")
---@class bullStatus:gameStatus
local status = class(pokerStatus)
---构造
function status:ctor()
end
return status |
local ffi = require('ffi')
local json = require('json')
--
-- Error messages description.
-- * name -- Key by which an error code can be retrieved from
-- the expoted by the module `code` dictionary.
-- * msg -- Error message which can use `args` using
-- `string.format` notation.
-- * args -- Names of arguments p... |
--[[
Mod Xpro para Minetest
Copyright (C) 2018 BrunoMine (https://github.com/BrunoMine)
Recebeste uma cópia da GNU Lesser General
Public License junto com esse software,
se não, veja em <http://www.gnu.org/licenses/>.
Hud de XP e nivel
]]
local S = xpro.S
-- Mod Hudbars
if minetest.get_modpath("hudbars")... |
SCHEMA.disabledPlugins = SCHEMA.disabledPlugins or {}
--Disable plugins
function SCHEMA:DisablePlugin(uniqueID)
self.disabledPlugins[uniqueID] = true
end
function SCHEMA:PluginShouldLoad(uniqueID)
return ( !self.disabledPlugins[uniqueID] )
end
--Override default config
function SCHEMA:OverrideConfig(ke... |
local syntax = require "luasyntax"
local args = {...}
local running = true
local history = {}
local mt = {__index = _G}
if args[1] == "-G" or args[1] == "--global" then
mt = {__index = _G, __newindex = _G}
end
local env = setmetatable( {exit = function() running = false end}, mt )
print( "Call exit() to... |
local plugin = require "plugins.base_plugin"
local cors = require "plugins.cors.service"
local CorsService = cors:new()
local CorsHandler = plugin:extend()
function CorsHandler:new()
CorsHandler.super.new(self, "cors")
end
-- 响应数据收集阶段
function CorsHandler:header_filter(ctx)
-- 改写header头
... |
local Fluid = require("lib.fluid")
local Grounded = Fluid.component(function(e, surface)
e.surface = surface
end)
return Grounded
|
hs.loadSpoon("PushToTalk")
spoon.PushToTalk.detect_on_start = true
spoon.PushToTalk.app_switcher = {
['zoom.us'] ='push-to-talk'
}
spoon.PushToTalk:start()
|
GM.Name = "Mission Games"
GM.Author = "N/A"
GM.Email = "N/A"
GM.Website = "N/A"
function GM:Initialize()
if SERVER then
util.AddNetworkString( "Spawn_Menu" )
util.AddNetworkString( "player_spawn_class" )
util.AddNetworkString( "player_death" )
end
if CLIENT then
surface.CreateFon... |
minetest.register_craft({
output = "pollution:pchest",
recipe = {
{"default:stick","default:stick","default:stick"},
{"default:stick","default:chest_locked", "default:stick"},
{"default:stick","default:stick","default:stick"},
}
})
minetest.register_craft({
output = "pollution:yrifle",
recipe = {... |
local config=require("GameConfig");
local conn=nil;
local function redis_connect_to_center()
if conn then
return;
end
local host = config.center_redis.host;
local port = config.center_redis.port;
local index = config.center_redis.db_index;
Redis.Connect(host,port,
function( err,redisConn )
--链接错误,重连
... |
SetupProject("Tut_15_Many_Images", "ManyImages.cpp",
"data/PT.vert",
"data/Tex.frag")
|
object_mobile_dressed_meatlump_male_09 = object_mobile_shared_dressed_meatlump_male_09:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_meatlump_male_09, "object/mobile/dressed_meatlump_male_09.iff")
|
SILE.hyphenator.languages["no"] = {};
SILE.hyphenator.languages["no"].patterns =
{
".a4",
".aa4",
".ab4ba",
".ab7be",
".ab6s5t",
".ac6tin",
".adel4s",
".ad8la.",
".ad6le.",
".ad2r",
".ad1s2",
".af7f",
".af5t4",
".af5f8u",
".ag6na.",
".ag6ne.",
".ag4r",
".ai2",
".a6k",
".ak6ka.",
".ak6ke.",
".ak3kl",
".ak3kr",
".ak6n... |
object_tangible_loot_creature_loot_collections_fish_rare_laa = object_tangible_loot_creature_loot_collections_shared_fish_rare_laa:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_fish_rare_laa, "object/tangible/loot/creature/loot/collections/fish_rare_laa.iff")
|
function ssidChangedCallback()
ssid = hs.wifi.currentNetwork()
if (ssid ~= nil) then
print("ssid = "..(ssid))
hs.notify.new({title="Wifi event", informativeText=ssid}):send()
end
end
wifiWatcher = hs.wifi.watcher.new(ssidChangedCallback)
wifiWatcher:start()
|
local LrView = import 'LrView'
local LrDialogs = import 'LrDialogs'
local LrFunctionContext = import 'LrFunctionContext'
local LrColor = import 'LrColor'
dialogs = {}
-- Global login settings. Updated by the observer set up in startDialogs
function dialogs.sectionsForTopOfDialog( f, propertyTable )
local bind = ... |
local _G = GLOBAL
local require = _G.require
local TheInput = _G.TheInput
local ACTIONS = _G.ACTIONS
local BufferedAction = _G.BufferedAction
local action_prefix = "MOD_ENVIRONMENT_PINGER_"
local ping_ground_name = action_prefix.."PING"
local ping_item_name = action_prefix.."PING_ITEM"
local ping_structure_name = ac... |
include("terms")
rect_style =
{["off_color"] = "6f6",
["on_color"] = "6f6",
["line_color"] = "000",
["line_width"] = "1"};
line_style = {["off_color"] = "none",
["on_color"] = "none",
["line_color"] = "000",
["line_width"] = "0.2"};
text_style = {["font_size"] =... |
local L = LANG.GetLanguageTableReference("en")
L["tttc_vendetta_ability_activated"] = "Vendetta ability enabled! You will be soon revived."
L["tttc_vendetta_ability_activated_error"] = "Enabling Vendetta ability failed since you are reviving right now."
L["tttc_vendetta_revival_nick"] = "You were killed by {name}. Use... |
return {'uysal'} |
local _G = _G
local AtlasLoot = _G.AtlasLoot
local Tooltip = {}
AtlasLoot.Tooltip = Tooltip
local AL = AtlasLoot.Locales
local STANDART_TOOLTIP = "AtlasLootTooltip"
_G["AtlasLootTooltip"].shoppingTooltips = {ShoppingTooltip1, ShoppingTooltip2, ShoppingTooltip3}
local TooltipList = {
"GameTooltip",
"AtlasLootToolti... |
return _csharp_getType("net.LuaCredentialCache"); |
-- Copyright (c) 2017-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'
requ... |
Weapon.PrettyName = "Kriss Vector"
Weapon.WeaponID = "m9k_vector"
Weapon.DamageMultiplier = 0.75
Weapon.WeaponType = WEAPON_PRIMARY |
--See Copyright Notice in ../LICENSE.txt
--usage: genclangpaths.lua output /path/to/clang [addition args to parse]
local outputfile,clang = unpack(arg)
local handle = assert(io.popen(clang .. " -v src/dummy.c -o build/dummy.o 2>&1", "r"))
local theline
for s in handle:lines() do
if s:find("-cc1") then
thel... |
local _M = {}
local bit = require("bit")
local ffi = require("ffi")
local base = require("resty.core.base")
local table_new = require("table.new")
local table_clear = require("table.clear")
local lib = ffi.load("/home/datong.sun/code/dndx/lua-resty-lmdb/lmdbffi/target/debug/liblmdbffi.so")
ffi.cdef([[
typedef enum ... |
--; ============================================================
--; Lua Color (Gaming)
--; ============================================================
colorSelect = {
["Mask"] = {
colorCode = "ExecuteBatch 1"
},
["Gradient 1"] = {
colorCode = "ExecuteBatch 2"
},
["Gradient 2"] = {
colorCode = ... |
local time = require "socket".gettime;
local base64_decode = require "util.encodings".base64.decode;
local max_seconds = module:get_option_number("log_slow_events_threshold", 0.5);
function event_wrapper(handlers, event_name, event_data)
local start = time();
local ret = handlers(event_name, event_data);
local dur... |
local _, ns = ...
local maxRunes = 6
local function PostUpdateRunes(runes, runemap)
if not runes.OnUpdate then
return
end
local readyCount = 0
for i = 1, maxRunes do
local rune = runes[i]
local cur = rune:GetValue()
local _, max = rune:GetMinMaxValues()
if cur... |
class("GuildActiveEventCommand", import(".GuildEventBaseCommand")).execute = function (slot0, slot1)
slot3 = getProxy(GuildProxy)
if not slot0:ExistEvent(slot1:getBody().eventId) then
return
end
if not slot0:NotExistActiveEvent() then
return
end
if not slot0:IsAnim() then
return
end
slot6 = slot3:getD... |
local img_paddle = utils.loadImage("assets/paddle.png", 1)
local SPEED = 480
local Paddle = {}
function Paddle.new(x, facing)
local paddle = Sprite.new(x, 0, img_paddle)
function paddle:randomize()
self.targetY = 16 + math.random()*(208-self.h);
if self.targetY < self.y then
self.vy = -SPEED
... |
--Aura Armor
function c911001889.initial_effect(c)
--end battle phase
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(18964575,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c911001889.condition)... |
local MAP_CONSTANTS = require('map.constants')
local N, S, E, W, NEC, SEC, SWC, NWC = unpack(MAP_CONSTANTS.DIRECTIONS)
local findDeadEnds = require('map.find_dead_ends')
local buildNodeGraph = require('map.build_node_graph')
local findPath = require('map.find_path')
local function findLongestPath(grid)
local node_gr... |
--
-- tests/actions/make/test_default_config.lua
-- Validate generation of default configuration block for makefiles.
-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
--
local suite = test.declare("make_default_config")
local p = premake
--
-- Setup/teardown
--
local wks, prj
function suite.se... |
return {
{
content = "刷屏:大量无意义表情符号或字符"
},
{
content = "虚假中奖、抽奖、欺骗、钓鱼信息"
},
{
content = "谩骂、人身攻击信息"
},
{
content = "滥发广告/连接"
},
{
content = "不恰当的游戏昵称"
},
{
content = "其他"
}
}
|
local BlockedExplosions = {1, 2, 4, 5, 25, 32, 33, 35, 36, 37, 38}
AddEventHandler(
"explosionEvent",
function(sender, ev)
for _, v in ipairs(BlockedExplosions) do
if ev.explosionType == v then
CancelEvent()
-- ban the creator or so but be careful. always check owner id in some other ways... |
function uniq(s)
for i = 2, #s do
if s[i] == s[1] then return false end
end
return true
end
for line in io.lines(arg[1]) do
local s = {}
for i in line:gmatch("%S+") do s[#s + 1] = i end
while #s > 1 and uniq(s) do
table.remove(s, 1)
end
if #s == 1 then
print()
else
local t = {s[1]}
... |
--获取key 以及一些参数值
--获取红包 key
local key = KEYS[1]
--获取剩余金额的key
local remainderkey = KEYS[2]
--获取账户hash 后的队列key
--local accListKey = KEYS[3]
--抢红包的金额
local amt = tonumber(ARGV[1])
--账户merchantid:username
--local accInfo = ARGV[2]
--获取redis中hash结构内的 红包剩余金额
local remainder = redis.call('HGET',key,remainderkey)
--if... |
dofile("common.inc");
dofile("settings.inc");
gatherCounter = 0
fuelList = {"Coal", "Charcoal", "Petroleum"};
local stashList = {
insect = {"Insect.", "All Insect"},
wood = {"Limestone ("},
medium = {"Soda ("},
cuttable = {"Dirt ("},
};
items = {
--strength
{"",
... |
local drawableSprite = require("structs.drawable_sprite")
local drawableLine = require("structs.drawable_line")
local drawableNinePatch = require("structs.drawable_nine_patch")
local drawableRectangle = require("structs.drawable_rectangle")
local utils = require("utils")
local swapBlock = {}
local themeTextures = {
... |
local Package = game:GetService("ReplicatedStorage").Fusion
local Value = require(Package.State.Value)
local Computed = require(Package.State.Computed)
local waitForGC = require(script.Parent.Parent.Utility.waitForGC)
return function()
it("should construct a Value object", function()
local value = Value()
expec... |
local Constants = {
DeviceType = {
Android = "Android",
IOS = "iOS",
Other = "Other"
},
NavigationDirection = {
IS_LEFT = "IS_LEFT",
IS_RIGHT = "IS_RIGHT",
Left = "Left",
Right = "Right",
},
-- Location of the HumanoidRootPart of the default rig in Mobile.rbxl
DefaultRigPosition = Vector3.new(11.... |
-- KEYS[1] spo or some combo of it
-- KEYS[2] spo or some combo of it
-- KEYS[3-5] subject/predicate/object
local result = redis.call('zscore', KEYS[1].."||"..KEYS[2].."||"..KEYS[3].."||"..KEYS[4])
return result and result == 0
|
--------------------------------
-- Humanoid arm state
-- (c) 2013 Stephen McGill, Seung-Joon Yi
--------------------------------
local state = {}
state._NAME = ...
local Body = require'Body'
local vector = require'vector'
local movearm = require'movearm'
local t_entry, t_update, t_finish
local timeout = 30.0
-- l... |
strings = {
main_menu = "Text",
fight_result = "Text",
start_film = "Text",
login = "Text",
new_card = "ohmhygo2"
} |
-- Did you add any files to this directory? Add their names to the table below.
-- If your file is named "lttp.lua", put it in the table like "modes.lttp".
modes = {
require "modes.lttp",
require "modes.lttp_randomizer",
require "modes.super_metroid",
require "modes.tloz_basic",
require "modes.tloz_progre... |
local DurstenfeldShuffle = {}
DurstenfeldShuffle.__index = DurstenfeldShuffle
function DurstenfeldShuffle.new(self)
local newInstance = setmetatable({}, self)
newInstance.__init__()
return newInstance
end
function DurstenfeldShuffle.__init__(self)
end
---@param tableInput table
---@return table tableCopy
---Re... |
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setArea(createCombatArea(AREA_SQUARE1X1))
function onTargetCreature(creature, target)
return doChallengeCreature(creature, target)
end
combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature")
function onCastSpe... |
--[[
// FileName: AvatarContextMenu.lua
// Written by: TheGamer101
// Description: A context menu to allow users to click on avatars and then interact with that user.
]]
-- OPTIONS
local DEBUG_MODE = game:GetService("RunService"):IsStudio() -- use this to run as a guest/use in games that don't have AvatarContextMen... |
pg = pg or {}
pg.activity_7_day_sign = {
{
id = 1,
front_drops = {
{
2,
15003,
3
},
{
4,
103071,
1
},
{
2,
20001,
3
},
{
1,
4,
150
},
{
2,
54033,
3
},
{
2,
50005,
5
},
{
2,
54034,
2
}
}
... |
local udp = require "udp"
local time = require "time"
local hash = require "hash"
local json = require "cjson"
local assert = assert
local type = type
local protocol = {}
local logger = log.getLogger("miio.protocol")
local priv = {
pcbs = {}
}
---
--- Message format
---
--- 0 1 ... |
require("scripts.utility")
return function(data)
local upgrade = data.mod_changes['homeworld-reloaded']
if upgrade ~= nil and upgrade.old_version:sub(1, 3) == '0.1' then
local player_hw = global.homeworld
global.homeworld = {player = player_hw}
print('Homeworld upgraded from ' .. upgrad... |
LuaIntWorkMethods = {
Add = function(self, numberOne, numberTwo)
return numberOne + numberTwo
end,
Subtract = function(self, numberOne, numberTwo)
return numberOne - numberTwo
end,
Multiply = function(self, numberOne, numberTwo)
return numberOne * numberTwo
end,
Divide = function(self, numberOne, numberTw... |
local misc = {}
---Create once callback
---@param callback function
---@return function
misc.once = function(callback)
local done = false
return function()
if done then
return
end
done = true
callback()
end
end
---Return concatenated list
---@param list1 any[]
---@param list2 any[]
---@ret... |
local bit = require('bit')
local helpers = require('test.unit.helpers')(after_each)
local eval_helpers = require('test.unit.eval.helpers')
local global_helpers = require('test.helpers')
local itp = helpers.gen_itp(it)
local OK = helpers.OK
local eq = helpers.eq
local neq = helpers.neq
local ffi = helpers.ffi
local FA... |
local base = require('resty.openssl.base')
local BIO = require('resty.openssl.bio')
local X509_NAME = require('resty.openssl.x509.name')
local EVP_MD = require('resty.openssl.evp')
local resty_str = require('resty.string')
local ffi = require('ffi')
local re_gsub = ngx.re.gsub
ffi.cdef([[
int OPENSSL_sk_num(const OPEN... |
return {'oelama','oelema','oelewapper','oelpan','oelegem','oele','oelen','oelemas','oelewappers','oelamas'} |
local Module = {}
function Module:Message(msg)
print("[GAME]: "..msg)
self.Event:Fire("message", msg)
end
--[[
_ _____
___| |__ __ _|___ /
/ __| '_ \ / _` | |_ \
\__ | | | | (_| |___) |
|___|_| |_|\__,_|____/
--- Template for game loop ---
--- Made by sha3 (1003129349)... |
--閃刀術式-ジャミングウェーブ
--Brandish Skill Jamming Wave
--Script by nekrozar
function c100408032.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c100408032.co... |
fx_version "cerulean"
games { "gta5" }
ui_page "nui/ui.html"
files {
"nui/ui.html",
"nui/pricedown.ttf",
"nui/default.png",
"nui/background.png",
"nui/weight-hanging-solid.png",
"nui/hand-holding-solid.png",
"nui/search-solid.png",
"nui/invbg.png",
"nui/styles.css",
"nui/script... |
local drawer = require("drawer")
local nomadbsd_logo = {
" \027[37;1m_======__\027[m",
" \027[37;1m(===============\\\027[m",
" \027[37;1m(===================\\\027[m",
" \027[37;1m_ _---__\027[m",
" \027[37;1m(= ====-\027[m",
" \027[37;1m(= =... |
-----------------------------------
-- Area: Upper Jeuno
-- NPC: Deadly Minnow
-- Standard Merchant NPC
-- Involved in Quest: Borghertz's Hands (1st quest only)
-- !pos -5 1 48 244
-----------------------------------
local ID = require("scripts/zones/Upper_Jeuno/IDs")
require("scripts/globals/shop")
function onTrade(... |
local function CorrectBeam(a, b)
if(!IsValid(a) or !IsValid(b)) then
return
end
local v1, v2 = a:GetPos(), b:GetPos()
local trace = util.TraceLine({start=v1, endpos=v2})
if trace.StartSolid then
local npos = v1 + ((v2 - v1) * (trace.FractionLeftSolid + 0.005) )
a:SetPos(npos)
end
end
local function Cor... |
local RunService = game:GetService("RunService")
local typesToValuesMap = {
string = "StringValue",
boolean = "BoolValue",
number = "NumberValue",
integer = "IntValue",
Instance = "ObjectValue",
Color3 = "Color3Value",
Vector3 = "Vector3Value"
}
local RemoteProperty = {}
RemoteProperty.__i... |
local base = require("gruvpack.base")
local plugins = require("gruvpack.plugins.highlights")
local languages = require("gruvpack.languages")
local utils = require("gruvpack.utils")
local specs = { base, languages, plugins }
local spec = utils.merge(specs)
local M = {}
M.load = function()
utils.highlights(spec)
end
... |
local gm = require('graphicsmagick')
local readfile = function(fn)
local f = io.open(fn,"rb")
if not f then return nil end
local data = f:read("*all")
f:close()
return data
end
local ok
-- load a corrupted JPEG created with zzuf:
-- zzuf -r 0.01 -s 1234 < city.jpg > city-corrupt.jpg
ok = pcall(gm.Image... |
solution("qorpse")
configurations {"Debug", "Release"}
targetdir("bin")
configuration "Debug"
defines { "DEBUG" }
--optimize "debug"
flags { "Symbols" }
configuration "Release"
defines { "NDEBUG" }
--optimize "speed"
flags { "OptimizeSpeed", "FloatFast" }... |
function buid_combinator( uid )
local deployer = global.recursive.deployers[ uid ]
if not global.recursive.to_be_mined[ uid ] then
if global.recursive.outputs[ uid ] then global.recursive.outputs.destroy() end
if global.recursive.chests[ uid ] then global.recursive.chests.destroy() end
local output = ... |
-- Make the modifiers keys smarter:
-- Tap ctrl -> esc.
-- Tap shift -> switch input method.
local module = {}
-- Whether ctrl and shift is being pressed alone.
module.ctrlPressed = false
module.shiftPressed = false
module.prevModifiers = {}
module.log = hs.logger.new('smart_modifier_keys','debug')
module.modifier... |
return function ()
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local line = require(ReplicatedStorage.Nature2D.Utilities.Line)
local canvas = game.Players.LocalPlayer.PlayerGui:WaitForChild("Tests").Canvas
describe("Draw Line", function ()
it("should draw a line given two points on the screen... |
local status_ok, null_ls = pcall(require, "null-ls")
if not status_ok then
return
end
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
local formatting = null_ls.builtins.formatting
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/dia... |
// Wildfire Ranked Challenges
// File description: Script to initialize the HECU gun trigger.
// Copyright (c) 2022 KiwifruitDev
// Licensed under the MIT License.
//*********************************************************************************************
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY... |
-- MIT License
--
-- Copyright (c) 2016 Florian Zwoch
--
-- 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, modif... |
--[[
落木特效
--]]
local THIS_MODULE = ...
local FallwoodEffect = class("FallwoodEffect", cc.Node, require("app.main.modules.effect.EffectBase"))
-- 类构造函数
function FallwoodEffect:clsctor(econfig)
self:setup(econfig)
self:setupEffect()
end
-- 类析构函数
function FallwoodEffect:clsdtor()
self:deleteEffect()
self:delete()
... |
UtilsBase = UtilsBase or {}
UtilsBase.INT32_MAX = 2147483647
UtilsBase.INT32_MIN = -2147483648
local _pairs = pairs
local _type = type
local _tostring = tostring
local _string_format = string.format
function UtilsBase.ReleaseField(object, name)
if type(name) ~= "string" then
pError("ReleaseField 传入参数不为字符... |
local AI = {}
local hash2 = {"right","down","left","up","up_right","down_right",
"down_left", "up_left"}
local hash_opposite = {"left","up","right","down","down_left","up_left",
"up_right", "down_right"}
local hash3 = {"up", "left", "down", "right","up_right", "up_left", "down_left", "down_right"}
fun... |
require "stdlib"
local user = peripheral.find("cyclic:user")
local waterSide = "bottom"
local stirSide = "left"
local crafterSide = "right"
local recipes = {
[1]={
{
{count=1, name="eidolon:zombie_heart"},
{count=1, name="minecraft:rotten_flesh"},
"wait",
"wait",
"wait",
"wait",
... |
require'cmp'.setup.cmdline(':', {
sources = {
{ name = 'cmdline' }
}
})
require'cmp'.setup.cmdline('/', {
sources = {
{ name = 'buffer' }
}
})
|
local frame = CreateFrame("Frame", "ShowSlots")
local BACKPACK_FREESLOTS_FORMAT = "(%s)"
local function ShowSlots_UpdateCount()
local totalFree = CalculateTotalNumberOfFreeBagSlots()
if MainMenuBarBackpackButtonCount then
MainMenuBarBackpackButtonCount:SetText(string.format(BACKPACK_FREESLOTS_FORMAT, to... |
--====================================================================--
-- dmc_ui/core/style_help.lua
--
-- Documentation: http://docs.davidmccuskey.com/
--====================================================================--
--[[
The MIT License (MIT)
Copyright (c) 2015 David McCuskey
Permission is hereby grante... |
local Tunnel = module('_core', 'lib/Tunnel')
local Proxy = module('_core', 'lib/Proxy')
API = Proxy.getInterface('API')
cAPI = Tunnel.getInterface('API')
local blip
local Banditos = {}
local wagon
local FinishedSpawn = false
local CoordsInitial = vector3(0,0,0)
local CoordsDestiny = vector3(0,0,0)
local FinishedDe... |
--[[
=============================================================================
VideoCore OS Abstraction Layer - platform-specific types and defines
=============================================================================
--]]
--[[
#include <inttypes.h> /* for PRId64, PRIi64, etc */
#include <stdint.h>
#def... |
--------------------------
--这是一个工厂类
-- @author 郑灶生 zss9309@qq.com
-- Creation 2014-12-16
local baseLayer=import(".baseLayer")
local baseScene=import(".baseScene")
---------------------------
--创建一个图层
--@param name string 图层的名字
--@return Layer
function newLayer(name,...)
local layer = class(name , baseLayer... |
-----------------------------------
-- Area: Aht Urhgan Whitegate
-- NPC: Baya Hiramayuh
-- Standard Info NPC
-----------------------------------
function onTrade(player,npc,trade)
end
function onTrigger(player,npc)
-- Based on scripts/zones/Mhaura/Dieh_Yamilsiah.lua
local timer = 1152 - ((os.time() - 100981... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.