content stringlengths 5 1.05M |
|---|
-- Menu state assets
Assets =
{
[0] =
{type = "texture", id = "hearts", file = "./Assets/ItemSprites/hearts_rupees.png"},
{type = "texture", id = "Link", file = "./Assets/PlayerSprites/link_sprite.png"},
{type = "texture", id = "Sword", file = "./Assets/ItemSprites/sword.png"},
{type = "texture", id ... |
--- @module fimbul.data_repository
local base = _G
local table = require("table")
local lfs = require("lfs")
local util = require("fimbul.util")
local data_repository = {}
function data_repository:open(blob)
if not blob.name and not blob.path then
base.error("A data repository should either have a name or ... |
--[[
© CloudSixteen.com do not share, re-distribute or modify
without permission of its author (kurozael@gmail.com).
Clockwork was created by Conna Wiles (also known as kurozael.)
http://cloudsixteen.com/license/clockwork.html
--]]
CW_SWEDISH = Clockwork.lang:GetTable("Swedish");
CW_SWEDISH["TakePhyscannon"] = "... |
local util = {}
local json
local baseDirectory = "/lib/util/"
local function getDir(moduleName)
return fs.combine(baseDirectory, moduleName) .. ".lua"
end
function util.loadModule(moduleName)
if fs.exists(getDir(moduleName)) then
return require("/" .. getDir(moduleName):sub(1, -5))
else
re... |
MinNpc = {
click = async(function(player, npc)
local t = {
graphic = convertGraphic(npc.look, "monster"),
color = npc.lookColor
}
player.npcGraphic = t.graphic
player.npcColor = t.color
player.dialogType = 0
player.lastClick = npc.ID
local options = {"Buy", "Sell", "Cooking Skills"}
local choic... |
--[[
TheNexusAvenger
Class for asserting errors are correct.
--]]
local NexusUnitTesting = require(script.Parent.Parent.Parent:WaitForChild("NexusUnitTestingProject"))
local NexusInstance = NexusUnitTesting:GetResource("NexusInstance.NexusInstance")
local ErrorAssertor = NexusInstance:Extend()
ErrorAssertor:SetClas... |
-- placeholder node for foreign unknown nodes
minetest.register_node("blockexchange:placeholder", {
description = "Blockexchange paceholder node",
groups = {
cracky=3,
oddly_breakable_by_hand=3,
not_in_creative_inventory=1
},
drop = "",
tiles = {
"unknown_node.png"
}
})
-- store the original meta... |
workspace "OpenBit"
startproject "Sandbox"
configurations { "Debug", "Release" }
architecture "x64"
flags {
"MultiProcessorCompile"
}
outputdir = "%{cfg.system}-%{cfg.architecture}-%{cfg.buildcfg}"
vendor = "%{wks.location}/OpenBit/vendor"
-- Include directories relative to root folder (solution directory)
In... |
local skynet = require "skynet"
local ini = require "utils.inifile"
local validator = require "utils.validator"
local basexx = require "utils.basexx"
local text = require("text").vpn
local log = require "log"
local sys = require "sys"
local api = require "api"
local svc = "vpn"
local interface = "wg0"
local ip_suffix ... |
local NetworkTestScene = game.createSceneClass("NetworkTestScene")
function NetworkTestScene:ctor()
self.requestCount = 0
self:prepare({
description = "Please check console output"
})
local items = {
"createHTTPRequest",
"createHTTPRequestBadDomain",
"send data to ser... |
--[[--
value = -- cookie value, or nil if not set
request.get_cookie{
name = name -- name of cookie
}
Gets a cookie value.
--]]--
function request.get_cookie(args)
return request._http_request.cookies[args.name]
end
--//--
|
//________________________________
//
// NS2 Single-Player Mod
// Made by JimWest, 2012
//
//________________________________
Script.Load("lua/FunctionContracts.lua")
Script.Load("lua/PathingUtility.lua")
NpcMarineMixin = CreateMixin( NpcMarineMixin )
NpcMarineMixin.type = "NpcMarine"
NpcMarineMixin.kAmmoUpd... |
-- ============================================================
-- GENERATORS
-- ============================================================
-- Tries to autodetect input type and uses the appropriate from method
function from(auto)
if (auto == nil) then
return fromNothing()
elseif (type(auto) == "function") then
... |
Clockwork.kernel:IncludePrefixed("cl_plugin.lua")
Clockwork.kernel:IncludePrefixed("sh_hooks.lua")
Clockwork.kernel:IncludePrefixed("sv_hooks.lua")
Clockwork.kernel:IncludePrefixed("sv_plugin.lua") |
--[[
Copyright (c) 2011-2014 chukong-inc.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
to use, copy, modify, merge, publish, di... |
-- Default Hilbish config
ansikit = require 'ansikit'
bait = require 'bait'
function doPrompt(fail)
prompt(ansikit.text(
'{blue}%u {cyan}%d ' .. (fail and '{red}' or '{green}') .. '∆{reset} '
))
end
doPrompt()
bait.catch('command.fail', function()
doPrompt(true)
end)
bait.catch('command.success', function()
d... |
require 'lexer'
require 'parser'
require 'util'
require 'gen'
args = {...}
if not args[1] then
error( "usage: cc file.cc" )
end
f = io.open( args[1], "r" )
s = f:read("a")
l = lex( s )
t, r = parse( l )
print( d( t ) )
print( d( r ) )
|
local pairs = pairs
local type = type
local tonumber = tonumber
local tostring = tostring
local setmetatable = setmetatable
local encode_args = ngx.encode_args
local tcp = ngx.socket.tcp
local concat = table.concat
local insert = table.insert
local upper = string.upper
local lower = string.lower
local sub ... |
local CM = ClickMorph
if CM.isClassic then return end
local f = CreateFrame("Frame")
local InvSlotsOrder = {
INVSLOT_HEAD, -- 1
INVSLOT_SHOULDER, -- 3
INVSLOT_BODY, -- 4
INVSLOT_CHEST, -- 5
INVSLOT_WAIST, -- 6
INVSLOT_LEGS, -- 7
INVSLOT_FEET, -- 8
INVSLOT_WRIST, -- 9
INVSLOT_HAND, -- 10
INVSLOT_BACK, -- 15
... |
local class = require 'lib.middleclass'
local Gamestate = require 'states.gamestate'
local Splash = class('Splash', Gamestate)
function Splash:initialize(name)
Gamestate.initialize(self, name)
self.forcewatch_time = 0.01
self.fade = 0.1
end
function Splash:enter()
print("enter splash")
System.audio:music_pl... |
if GetBot():IsInvulnerable() or not GetBot():IsHero() or not string.find(GetBot():GetUnitName(), "hero") or GetBot():IsIllusion() then
return;
end
local ability_item_usage_generic = dofile( GetScriptDirectory().."/ability_item_usage_shutnik" )
local utils = require(GetScriptDirectory() .. "/util")
local mutil = requ... |
local class = require 'lib.middleclass'
local Gamestate = require 'states.gamestate'
local Pause = class('Pause', Gamestate)
function Pause:initialize(name)
Gamestate.initialize(self, name)
end
function Pause:draw()
end
function Pause:exit()
end
function Pause:update(dt)
end
return Pause
|
local ScanCoolDown = 2 -- Time between scans.
local ResultTime = 3 -- Time to leave the result on screen
local HostileColor = Color( 255,0,0 )
local NonHostileColor = Color( 0,255,0 )
local Enum = {
NON_HOSTILE = 1,
HOSTILE = 2
}
local tableScanTargets = {
prop_physics = true,
prop_physics_multipl... |
local copas = require("copas")
local DEFAULT_TIMEOUT = 10
local semaphore = {}
semaphore.__index = semaphore
-- registry, semaphore indexed by the coroutines using them.
local registry = setmetatable({}, { __mode="kv" })
-- create a new semaphore
-- @param max maximum number of resources the semaphore can hold (t... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:28' 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... |
-- * _JOKER_VERSION: 0.0.1 ** Please do not modify this line.
--[[----------------------------------------------------------
Joker - Jokes, Riddles, Fun Facts, & Other Tomfoolery
----------------------------------------------------------
*
* ADDING YOUR OWN JOKES:
* Be aware that modifying this file incorrect... |
---
-- @module JumpButtonUtils
-- @author Quenty
local JumpButtonUtils = {}
function JumpButtonUtils.getJumpButtonPositionAndSize(screenGuiAbsSize)
local minAxis = math.min(screenGuiAbsSize.x, screenGuiAbsSize.y)
-- This is Roblox's logic for the jump button
local position, width
if minAxis <= 500 then
width =... |
--
-- Author: wangdi
-- Date: 2016-02-15 06:37:05
--
local BackgroundLayer = class("BackgroundLayer", function()
return display.newLayer()
end)
function BackgroundLayer:ctor()
local bg = display.newSprite("bg.png", display.cx, display.cy)
bg:setScaleX(64)
self:add(bg)
local groundClound = display.newSprite("c... |
local http = require 'http'
local opt = require 'http.middleware.opt'
local app = http.app.new {
option1 = 'A'
}
local function my_middleware(following, options)
local option1 = options.option1
return function(w, req)
w:write(option1)
return following(w, req)
end
end
app:use(opt(my_mi... |
PanelManager = PanelManager or BaseClass()
function PanelManager.GetInstance()
if PanelManager._instance == nil then
PanelManager._instance = PanelManager.New()
end
return PanelManager._instance
end
function PanelManager:__init()
self.uiRootTrans = GameObject.Find("Canvas").transform
self.... |
-------------------------------------------------------------------------------
-- ElvUI Chat Tweaks By Crackpot (US, Thrall)
-- Based on functionality provided by Prat and/or Chatter
-------------------------------------------------------------------------------
local Module = ElvUI_ChatTweaks:NewModule("Automatic Cha... |
--
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may ... |
print("-->Init config.lua use ", collectgarbage("count"), "kb")
require("HttpResult")
SDA_PIN = 23 -- sda pin, GPIO12
SCL_PIN = 22 -- scl pin, GPIO14
--
--bh1750 = require("bh1750")
--bh1750.init(SDA_PIN, SCL_PIN)
--print("init BH1750 finish.")
--
--bh1750_timer=tmr.create()
--
--function bh1750Callback()
--
-- l... |
-- credit to atom0s for help with decompiling
-- Decompiled using luadec 2.2 rev: for Lua 5.1 from https://github.com/viruscamp/luadec
return {
LevelCfg = {
{ Level = 1, LevelReward = {
{ 1001031, 1 },
}, UpExp = 50 },
{
Desc = "There's a legend on the Six Cats in Ho... |
local cruise = false
local timer = false
local speed = 0
function togCruise()
if (cruise) then
local veh = getPedOccupiedVehicle(localPlayer)
if (not veh or not isElement(veh)) then return false end
local v1,v2,v3 = getElementVelocity(veh)
local currspeed = (v1^2 + v2^2 + v3^2)^(0.5)
if (currspeed < speed) ... |
solution "demboyz"
basedir ".."
location (_ACTION)
targetdir "../bin"
startproject "demboyz"
configurations { "Debug", "Release" }
platforms "x32"
flags { "MultiProcessorCompile", "Symbols" }
defines "_CRT_SECURE_NO_WARNINGS"
configuration "Debug"
defines { "DEBUG" }
co... |
-- Right click menu
local menuFrame = CreateFrame("Frame", "BobMinimapRightClickMenu", UIParent, "UIDropDownMenuTemplate")
local menuList = {
{
text = "MicroMenu",
isTitle = true,
notCheckable = true,
},
{
text = "Character",
icon = 'Interface\\PaperDollInfo... |
local head = "Disabled the following songs:\n";
local s1 = "Rave It Out (Arcade)\\Bangarang\n";
local s2 = "Rave It Out (Arcade)\\Beauty And A Beat\n";
local s3 = "Rave It Out (Arcade)\\Blackout";
local foot = "\n\nReboot/Relaunch for changes to make effect.";
return Def.ActorFrame{
PREFSMAN:SetPreference("... |
--[[
file class.lua
Glenn Edgar
This file is used to create lua classes.
Code is taken from
http://lua-users.org/wiki/LuaClassesWithMetatable
--]]
function Class(members)
members = members or {}
local mt = {
__metatable = members;
__index = members;
}
local function new(... |
-- ================================================================================ --
-- EMA - ( Ebony's MultiBoxing Assistant ) --
-- Current Author: Jennifer Cally (Ebony) --
-- --
-- License: All Rights Reserved 2018-2022 Jennifer Calladine --
-- ... |
local COMMANDS_PATH = require './include/constants'.COMMANDS_PATH
local error = aerror
local commands = {}
-- If the commands are already loaded, just reload the Command object
if Commands then
commands = Commands; Commands = {}
end
local function get(self, property, index)
local values = {}
for k, v in... |
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
fx_version 'cerulean'
games { 'gta5' }
author 'nyyn'
description 'nyyn-bishops'
version '1.0.0'
client_scripts {
'@es_extended/locale.lua',
'config.lua',
'client.lua'
}
server_scripts {
'@es_extended/locale.lua',
'config.lua',
'server.lua'
... |
local L = LibStub("AceLocale-3.0"):NewLocale("Multishot", "esES")
if not L then return end
L["achievements"] = "achievements" -- Requires localization
L["arena"] = "arena win or draw" -- Requires localization
L["battleground"] = "battleground win" -- Requires localization
L["bosskillshots"] = "killing screenshots" -- ... |
-- Copyright (C) 2021 jerryk <jerrykuku@qq.com>
-- This is free software, licensed under the APACHE LICENSE, VERSION 2.0.
module("luci.controller.go-aliyundrive-webdav", package.seeall)
function index()
if not nixio.fs.access("/etc/config/go-aliyundrive-webdav") then
return
end
entry({"admin", "services", "go-al... |
describe("quaternion", function()
local cml = require("luacml")
local eps = 1e-5
describe("constructor", function()
describe("default", function()
it("quat()", function()
local input, expected = cml.quat(), {1,0,0,0}
assert.same(expected, input:totable()... |
--[[
ISC License
Copyright (c) 2019 Validark
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ... |
Config = {}
Config.Locale = 'fr'
Config.DoorList = {
--
-- Mission Row First Floor
--
-- Entrance Doors
{
textCoords = vector3(434.7, -982.0, 31.5),
authorizedJobs = { 'police' },
locked = false,
distance = 2.5,
doors = {
{
objName = 'v_ilev_ph_door01',
objYaw = -90.0,
objCoords = vecto... |
local Action = require(script.Parent.Action)
return Action("BrushObjectRotationSet", function(guid, mode)
return {
guid = guid,
mode = mode
}
end) |
local math = require "math"
local msrpc = require "msrpc"
local smb = require "smb"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
description = [[
Attempts to enumerate domains on a system, along with their policies. This generally requires
credentials, except against Wi... |
local Tunnel = module("vrp", "lib/Tunnel")
local Proxy = module("vrp", "lib/Proxy")
vRP = Proxy.getInterface("vRP")
vRPclient = Tunnel.getInterface("vRP","vRP_legacyfuel")
RegisterServerEvent('LegacyFuel:PayFuel')
AddEventHandler('LegacyFuel:PayFuel', function(price)
local user_id = vRP.getUserId({source})
local am... |
if Server then
function Spit:ProcessHit(targetHit, surface, normal, hitPoint)
if self:GetOwner() ~= targetHit then
self:DoDamage(Spit.kDamage, targetHit, hitPoint, normal, "none", false, false)
elseif self:GetOwner() == targetHit then
--a little hacky
... |
local M = {}
function M.init()
local nvim_set_keymap = vim.api.nvim_set_keymap
local default_opt = {noremap = true, silent = true}
-- Go over wrapped lines
nvim_set_keymap("n", "j", "gj", default_opt)
nvim_set_keymap("n", "k", "gk", default_opt)
-- Keep selection in visual mode when indenting... |
--[[----------------------------------------------------------------------------
This file is part of Friday Night Funkin' Rewritten by HTV04
------------------------------------------------------------------------------]]
-- NOTE: Pico's sprites are flipped horizontally as an enemy!
-- TODO: Maybe remove miss an... |
game:DefineFastFlag("AvatarExperienceNavigationFix", false)
return function()
return game:GetFastFlag("AvatarExperienceNavigationFix")
end |
--[[
BuchSchloss Lua builtins
]]--
local ActionNS_meta = {}
local ActionNS = {}
local new_data_ns
function ActionNS_meta.__index(tbl, key)
local val = ActionNS[key]
if val ~= nil then
return val
end
return new_data_ns(tbl.backend, (rawget(tbl, 'delegate') or {}), key)
end
function ActionNS_me... |
local util = require "util"
local shift_register = require "shift"
local ui = require "ui"
local lua_8080 = require "lua-8080"
local cpu = lua_8080.cpu
local bus = lua_8080.bus
local rom = lua_8080.rom
local ram = lua_8080.ram
local sounds = {previous_state = {0, 0}}
local cycles = 0
local interrupts = {1, 2}
function... |
fx_version 'cerulean'
games { 'gta5' }
author 'BillyD'
description 'Plugin de vote pour les serveurs Grand Theft Auto V sous FiveM'
version '1.0.0'
server_script 'server.js'
server_only 'yes'
|
--
-- Set key to a new state
-- only if state of the key is still pending
--
-- KEYS[1] - key
-- ARGV[1] - new state
local key = KEYS[1]
local newState = ARGV[1]
local state = redis.call('get', key)
if state == 'pending' then
return redis.call('set', key, newState)
end
return { err = "state was already upd... |
---------------------------------------------------
-- Sickle Slash
-- Deals critical damage. Chance of critical hit varies with TP.
---------------------------------------------------
require("scripts/globals/monstertpmoves")
require("scripts/globals/settings")
require("scripts/globals/status")
-----------------------... |
--[[----------------------------------------------------------------------------
AllMetadataTagset.lua
This tagset shows examples of displaying different types of metadata available within Lightroom
When in Lightroom choose "All Metadata" from the drop down menu in the Metadata panel.
--------------------------------... |
dofile(ModPath .. "infcore.lua")
local idstr_small_light_fire = Idstring("effects/particles/fire/small_light_fire")
local idstr_explosion_std = Idstring("explosion_std")
local empty_idstr = Idstring("")
local molotov_effect = "effects/payday2/particles/explosions/molotov_grenade"
local tmp_vec3 = Vector3()
-- For ref... |
kashyyyktwoleveloneteleporterScreenPlay = ScreenPlay:new {
numberOfActs = 1,
}
registerScreenPlay("kashyyyktwoleveloneteleporterScreenPlay", true)
function kashyyyktwoleveloneteleporterScreenPlay:start()
if (isZoneEnabled("kashyyyk")) then
self:spawnMobiles()
self:spawnSceneObjects()
end
end
function kashy... |
--***********************************************************
--** THE INDIE STONE **
--***********************************************************
require "ISUI/ISPanelJoypad"
local MainPanel = ISPanelJoypad:derive("GameSoundsMainPanel")
function MainPanel:prerender()
local dr... |
return {
{
effect_list = {
{
type = "BattleSkillFire",
casterAniEffect = "",
target_choise = "TargetNil",
targetAniEffect = "",
arg_list = {
weapon_id = 68391
}
},
{
type = "BattleSkillSonar",
casterAniEffect = "",
target_choise = "TargetSelf",
targetAniEffect = ... |
local Players = game:GetService("Players")
local Modules = Players.LocalPlayer.PlayerGui.AvatarEditorInGame.Modules
local Roact = require(Modules.Packages.Roact)
local RoactRodux = require(Modules.Packages.RoactRodux)
local UIBlox = require(Modules.Packages.UIBlox)
local AvatarEditorConstants = require(Modules.Avata... |
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')
include("STALKERNPCBaseVars.lua")
ENT.DieSoundEnabled = true
ENT.DieSound.name = "Stalker.Burer.Die"
ENT.DieSound.min = 1
ENT.DieSound.max = 1
ENT.MeleeSoundEnabled = true
ENT.MeleeSound.name = "Stalker.Burer.Melee"
ENT.MeleeSound.min =... |
--[[
first letter denotes variable type
f = function
t = table
i = number
s = string
b = boolean
v = changing or unknown variable
"next, var" is the same as "pairs(var)" but faster
]]
--localization--
local fInsert = table.insert
local fRemove = table.remove
local fConcat = table.concat
local fFloor = math.floor
loc... |
local function createMachine(version)
local cm = table.deepcopy(data.raw.item["assembling-machine-" .. version])
cm.name = "logistic-assembling-machine-" .. version
cm.icons = {
{ icon = data.raw.item["assembling-machine-" .. version].icon },
logistic_requester_chest_mask,
logistic_p... |
--------------------------------------------------------------------------------
-- Creates new code tree leaf
function HCOMP:NewLeaf(parentLeaf)
local leaf = {
Opcode = "INVALID", -- Opcode number in this leaf
Operands = {},
ParentLabel = self.CurrentParentLabel,
}
if parentLeaf then
leaf.C... |
lvim.builtin.which_key.mappings["c"] = {}
lvim.builtin.which_key.mappings["w"] = {}
-- lvim.keys.normal_mode["y"] = false
-- lvim.keys.normal_mode["<s-x>"] = false
lvim.builtin.which_key.mappings["c"] = {name = "Utils", w = {"<cmd>keeppatterns %substitute/\\s\\+$//e<CR>", "Whitespce remove"} }
local optsNormLocLeade... |
---------------------------------------------
-- Hypothermal Combustion
-- Self-destructs, releasing ice at nearby targets.
-- Type: Magical
-- Utsusemi/Blink absorb: Ignores shadows
-- Notes: Damage is based on remaining HP
---------------------------------------------
require("scripts/globals/monstertpmoves")
require... |
--***********************************************************
--** THE INDIE STONE **
--** Author: turbotutone **
--***********************************************************
require "ISUI/ISPanel"
---@class ZomboidRadioDebug : ISPanel
ZomboidRadioDebug = ISPanel:deri... |
-- Cashier
local ped = createPed(150, 2358.7563, 2361.6530, 2021.9191)
exports.pool:allocateElement(ped)
setPedRotation(ped, 90)
-- Guard.
local ped2 = createPed(71, 2345.7058, 2351.9014, 2022.8787)
exports.pool:allocateElement(ped2)
setPedRotation(ped2, 270)
-- Desk worker
local ped3 = createPed(141, 2340... |
return {
id = "WorldG181",
events = {
{
alpha = 0.3,
code = {
"clickBtn"
},
style = {
text = "点击打开储物仓。",
mode = 2,
posY = -229.8,
char = "1",
dir = 1,
posX = 491.03
},
ui = {
path = "OverlayCamera/Overlay/UIMain/top/adapt/right_stage/btn_list/dock/inventory_button",... |
-- Routine for NPC "Innkeeper"
velocity = 30
loadRoutine = function(R, W)
R:setTilePosition(18,9.8)
R:wait(5000)
R:goToTile(17,9.8)
R:wait(5000)
R:goToTile(19,9.8)
end |
local spell = {}
spell["element"] = [[Heal]]
spell["cost"] = 20
spell["desc"] = [[Full heal for one ally]]
spell["target"] = [[One Ally]]
spell["status"] = [[None]]
spell["numericalvalue"] = 100
spell["costtype"] = [[SP]]
function spell.activate(free)
if not free then state.context.cost(spell.costtype, spell.cost)... |
kata = {}
function kata.firstLua(a, b, c)
str = a .. " " .. a * b
if b < c then
return str .. " Codewars"
end
return str .. " Lua"
end
return kata |
local canRoll=true
local levelXP={0,300,900,2700,6500,14000,23000,34000,48000,64000,85000,100000,120000,140000,165000,195000,225000,265000,305000,355000}
function relache(player,touche)
end
function appuye(player,touche)
-- print(" "..player.name.." appuye sur touche "..touche)
if touche == "ability_... |
function on_activate(parent, ability)
local targets = parent:targets():friendly():visible_within(ability:range())
local targeter = parent:create_targeter(ability)
targeter:set_selection_radius(ability:range())
targeter:add_all_selectable(targets)
targeter:add_all_effectable(targets)
targeter:activ... |
function debug_out(data)
if DEBUG then
-- print to console
if type(data) == "table" then
print(serpent.block(data))
else
print(data)
end
-- print to screen
if game and game.players and game.players[1] then
if type(data) == "table" then
game.players[1].print(serpent.bl... |
--Check Environment
if GetConvar('txAdminServerMode', 'false') ~= 'true' then
return
end
-- Holds map containing source players original routing
-- bucket so we can use it on end spectate.
local ORIGINAL_SPEC_BUCKET = {}
RegisterNetEvent('txAdmin:menu:spectatePlayer', function(id)
local src = source
-- Sanity a... |
--[[
- PLAIN FRAMEWORK ( https://github.com/viticm/plain )
- $Id login.lua
- @link https://github.com/viticm/plain for the canonical source repository
- @copyright Copyright (c) 2014- viticm( viticm.ti@gmail.com )
- @license
- @user viticm<viticm.ti@gmail.com>
- @date 2018/12/27 19:00
- @uses The login module.
... |
local PanelMenuBar = require("ui.panel_menu_bar")
local Separator = require("ui.widgets.separator")
local Text = require("ui.widgets.text")
local MenuItem = require("ui.widgets.menu_item")
local MenuList = require("ui.widgets.menu_list")
local GenerateEntityCreationMenu = require("editor.panels.hierarchy_panel.entity_c... |
local config = {}
-- lsp
function config:configLSP()
local util = require("lspconfig/util")
local servers = {
"jsonls",
"clangd",
"pyright",
"vimls",
"html",
"cssls"
}
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionIte... |
-- block interface
-- allows creation of block device objects
-- which are an abstraction on files
local block = {}
function block.new(image, blocksize)
local bd = {}
bd.image = image
bd.bs = blocksize
bd.file = io.open(image, "rb+")
if not bd.file then return false end
bd.size = bd.file:seek("end")
bd.... |
local S
if minetest.get_modpath("intllib") then
S = intllib.Getter()
else
S = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end
end
advtrains.register_wagon("engine_japan", {
mesh="advtrains_engine_japan.b3d",
textures = {"advtrains_engine_japan.png"},
drives_on={defau... |
--
-- created with TexturePacker (http://www.codeandweb.com/texturepacker)
--
-- $TexturePacker:SmartUpdate:91e53f07b46d1bcf241058a09ae89e68:0fa02cc3818a124800a8802be7968c88:cf8ab4992190eb44f97f06311ef326d7$
--
-- local sheetInfo = require("mysheet")
-- local myImageSheet = graphics.newImageSheet( "mysheet.png", sheetI... |
-- require "cmake"
include "OpiumDeps.lua"
workspace "Opium"
architecture "x86_64"
startproject "Opium_Editor"
configurations
{
"Debug",
"Release",
"Dist"
}
flags
{
"MultiProcessorCompile"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architectur... |
require'rb.plugins'
require'rb.utils'
require'rb.settings'.setup()
require'rb.mappings'.setup()
require'rb.autocmd'.setup()
require'rb.colors'
require'rb.plugins.init' |
local M = {}
local function getMatFile(path, str)
return paths.dirname(path) .. '/' .. paths.basename(path, 'mp4') .. str .. '.mat'
end
-- Number of frames
local function getDuration(path) -- can get it with OpenCV instead cap:get{propId=7} --CV_CAP_PROP_FRAME_COUNT
local zrot, nFrames
if pcall(function() zr... |
TOOL.AddToMenu = false
TOOL.ClientConVar[ "type" ] = "0"
TOOL.ClientConVar[ "name" ] = "0"
TOOL.ClientConVar[ "arg" ] = "0"
if ( CLIENT ) then
language.Add( "Tool_creator_name", "Creator" )
language.Add( "Tool_creator_desc", "Spawn an entity from the spawnmenu" )
language.Add( "Tool_creator_0", "Click anywhere t... |
-- TODO
--
local Runner = require "nvim-test.runner"
local cargotest = Runner:init({ command = "cargo", args = { "test" }, package = false }, {
rust = [[
(
(
mod_item name: (identifier) @test-name
(#match? @test-name "[Tt]est")
)
@scope-root)
(
(
... |
local heli = nil
function updateRotor()
if not getVehicleEngineState( heli ) and getHelicopterRotorSpeed( heli ) > 0 then
local new = getHelicopterRotorSpeed( heli ) - 0.0012
setHelicopterRotorSpeed( heli, math.max( 0, new ) )
end
end
function disableRotorUpdate()
if heli then
heli = nil
remove... |
-----------------------------------------
-- Opacus Cell
-- 5374
-- Unlocks job abilities, weapon skills
-----------------------------------------
require("scripts/globals/status")
-----------------------------------------
function onItemCheck(target)
if target:hasStatusEffect(tpz.effect.IMPAIRMENT) then
r... |
local moon = require("moon")
local mysql = require("moon.db.mysql")
moon.async(function()
local db, err = mysql.connect({
host="127.0.0.1",
port=3306,
database="mysql",
user="root",
password="123456",
timeout= 1000,--连接超时ms
max_packet_size = 1024 * 1024,... |
function test(name)
print("testing"..name)
return 10
end
if test("myname") == 20 then
print("20")
end
local list = { "A", "B", "C", "D" }
local table = { a = "A", b = "B", c = "C", d = "D" }
for k, v in pairs(table) do
print("k: "..k.." v: "..v)
end
|
local reaper = reaper
-- Set package path to search within directory containing current script.
local path = ({reaper.get_action_context()})[2]:match('^.+[\\//]')
package.path = string.format('%s?.lua;%s?/init.lua', path, path)
local Gui = require("gui")
local function main()
-- Calls gui window
reaper.defer... |
-- Copyright © 2016 g0ld <g0ld@tuta.io>
-- This work is free. You can redistribute it and/or modify it under the
-- terms of the Do What The Fuck You Want To Public License, Version 2,
-- as published by Sam Hocevar. See the COPYING file for more details.
-- Quest: @WiWi__33[NetPapa]
local sys = require "Libs/sysl... |
Button = {}
Button.__index = Button
Button.new = function (queue, x, y, width, height, texture)
local self = {}
self.widget = Widget.new(queue)
self.widget:setPosition2D(x, y)
self.widget:setScale2D(width, height)
self.widget:setTexture(texture)
self.widget:setOffset2D(0.5, 0.5)
self.pos = Vector2D.new(x, y)
... |
local args = {...}
local import_prefix = args[1]
if import_prefix then import_prefix = import_prefix:match("^(.-)states%.[^%.]+$") end
if not import_prefix then import_prefix = "" end
local errormodule = require(import_prefix .. "error")
local utilmodule = load_module(import_prefix .. "util", true)
local classmodule ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.