content stringlengths 5 1.05M |
|---|
function HUDBGBox_recreate(panel, config)
if not alive(panel) then
log(debug.traceback())
return
end
panel:configure({
x = config.x,
y = config.y,
w = config.w,
h = config.h,
})
if config.name then
config.alpha = Holo.Options:GetValue("HUDAlpha") or 0.25
config.frame_style = Holo:GetFrameStyle(conf... |
script.Parent.Fixer.Touched:connect(function(Hit)
if Hit.Parent:FindFirstChild("Humanoid") then
local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
Hit.Parent.Humanoid:UnequipTools()
if Player then
Player.Backpack:ClearAllChildren()
end
Hit.Parent.Humanoid.WalkSpeed = 16
Hit.Parent.Humanoid.J... |
--property.lua
--[[
local Object = class()
prop = property(Object)
prop:reader("id", 0)
prop:accessor("name", "")
--]]
local WRITER = 1
local READER = 2
local ACCESSOR = 3
local pack = function(...)
return {n = select('#',...), ...}
end
local function unequal(a, b)
if type(a) ~= "table" then
return a ~= b... |
--[[--
Tree container prototype.
Note that Functions listed below are only available from the Tree
prototype returned by requiring this module, because Container objects
cannot have object methods.
Prototype Chain
---------------
table
`-> Object
`-> Container
`-> Tree... |
---------------------------------------------------------------
-- A doubly linked list Node
--
-- @classmod LNode
-- @author jose@josellausas.com
---------------------------------------------------------------
local LNode = {}
LNode.__index = LNode
---------------------------------------------------------------
-- ... |
local drawableSpriteStruct = require("structs.drawable_sprite")
local colors = require("consts.xna_colors")
local utils = require("utils")
local introCar = {}
local barrierTexture = "scenery/car/barrier"
local bodyTexture = "scenery/car/body"
local pavementTexture = "scenery/car/pavement"
local wheelsTexture = "scene... |
local function main()
-- Varitables
local w, h = term.getSize()
local lang = multishell.getLanguage()
local theme = multishell.loadTheme()
local peripheralList = peripheral.getNames()
local formattedPeripheralList = {}
local menu = 0
local selectedId = 0
local selected = 0
loca... |
print("guard")
local a
do
local b
print("guard")
b = f()
a = b
end
return a
|
description 'GTA V Blips'
client_script 'blips.lua' |
local Permissions = require(game.ReplicatedStorage.Helpers.Permissions)
return function (registry)
registry:RegisterHook("BeforeRun", function(context)
if context.Group == "Admin" and not Permissions:IsAdmin(context.Executor.UserId) then
return "You can't run this command."
end
end)
end |
FFI = require("ffi")
FFI.type = {}
FFI.type.VOID = 0
FFI.type.UINT8 = 1
FFI.type.SINT8 = 2
FFI.type.UINT16 = 3
FFI.type.SINT16 = 4
FFI.type.UINT32 = 5
FFI.type.SINT32 = 6
FFI.type.UINT64 = 7
FFI.type.SINT64 = 8
FFI.type.FLOAT = 9
FFI.type.DOUBLE = 10
FFI.type.UCHAR ... |
class 'AgentCore'
function AgentCore:__init( args )
-- Bare minimum intiialization here
self.position = args.position
self.angle = args.angle or Angle()
self.debug = {}
self.timer = Timer()
self.time = 250
self.vehicle = args.vehicle
self.fov = AddTriangle( self.position, 10 )
self.flagged_for_deletion = fals... |
--[[--------------------------------------------------------------------------
*
* Mello Trainer
* (C) Michael Goodwin 2017
* http://github.com/thestonedturtle/mellotrainer/releases
*
* This menu used the Scorpion Trainer as a framework to build off of.
* https://github.com/pongo1231/ScorpionTrainer
* (C) Emre ... |
--[[
Perspective v2.0.2
A library for easily and smoothly integrating a virtual camera into your game.
Based on modified version of the Dusk camera system.
v2.0.2 adds a more stable tracking system and re-implements scrollX and scrollY
--]]
local lib_perspective = {}
-----------------------------------------------... |
local M = {
__prefix = 'app',
__fetched_methods = {'name'},
__parse_methods = {'author'},
}
M.version = function(self)
local version = self:parse('app.version')
if version == '' then
version = self:numerify(self:fetch('app.version'))
end
return version
end
local Base = require "fak... |
Schema.name = "Metro 2030 Roleplay"
Schema.author = "Dunkersplay"
Schema.description = "Welcome to the Underground."
ix.currency.model = "models/ninja/signalvariance/weapons/akm_mag.mdl"
ix.container.Register("models/devcon/mrp/props/cabinet_closed.mdl", {
name = "Storage Locker",
description = "A rusted metallic s... |
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('StoryBit', {
ActivationEffects = {
PlaceObj('PauseExpedition', nil),
},
Category = "PlanetaryAnomaly",
Effects = {},
Enabled = true,
Image = "UI/Messages/Events/24_dome_in_ruins.tga",
Prerequisites = {
PlaceObj('SupplyMissionsEnable... |
include("sv_capturetheflag.lua")
util.AddNetworkString("FlagCaptured")
util.AddNetworkString("FlagDropped")
util.AddNetworkString("FlagTaken")
local function HandleFlagDropped(len, ply)
chat.AddText(unpack(net.ReadTable()))
if (teamid == 1) then
usflagTaken = false
elseif (teamid == 2) then
tflagTaken = false
... |
object_tangible_collection_deathtrooper_epsilon_locator_beacon_01 = object_tangible_collection_shared_deathtrooper_epsilon_locator_beacon_01:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_deathtrooper_epsilon_locator_beacon_01, "object/tangible/collection/deathtrooper_epsilon_loc... |
local game = {}
local skynet = require "skynet"
local conf = require "config"
local clusterid = tonumber(skynet.getenv("clusterid"))
local config = conf[clusterid]
-- 百人的逻辑都差不多 其实可以写在一起的 如果人少 放在一起没什么关系 人多需要分开的时候方便拆开
-- 游戏初始化
function game.on_init()
local gamename = config.subrooms[game.super._subroomid].gamename... |
GameListSubtitles["OnlineOfflineCapabilitiesFlag"] = function(Content)
return string.format("Online Flag: %08X, Offline Flag: %08X%08X", Content.CapabilitiesOnline, Content.CapabilitiesOffline.HighPart, Content.CapabilitiesOffline.LowPart)
end
GameListSubtitles["OnlineCapabilities"] = function(Content)
minmulti... |
--[[
© 2018 Thriving Ventures AB do not share, re-distribute or modify
without permission of its author (gustaf@thrivingventures.com).
_______ _ _ _ _____
|__ __(_) | | | |_ _|
| | _ __ _ ___ _ __ | | | | | |
| | | |/ _` |/ _ \ '__| | | | | | |
... |
local NilCommand = require('command/nil')
local EntityFactory = require('model/entity/factory')
local DialogueFactory = require('model/dialogue/factory')
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
loc... |
player_manager.AddValidModel( "papyrus", "models/player/antitoxic/papyrus_pm/papyrus_pm.mdl" );
list.Set( "PlayerOptionsModel", "papyrus", "models/player/antitoxic/papyrus_pm/papyrus_pm.mdl" ); |
local helpers = require "spec.helpers"
-- Note: remove the below hack when https://github.com/Kong/kong/pull/6952 is merged
local stream_available, _ = pcall(require, "kong.tools.stream_api")
local spec_path = debug.getinfo(1).source:match("@?(.*/)")
local nginx_conf
if stream_available then
nginx_conf = spec_path... |
-- get the set of video encoder friendly output sizes from suppl.lua
local keys = {
size = function(cell, val, opts)
local lut = suppl_size_lut(true, true)
if lut[val] then
opts.width = lut[val][1]
opts.height = lut[val][2]
return true
end
cell:set_error(string.format(
"No matching preset to %s fo... |
-- taken from http://luaforge.net/projects/luacairo/
local cairo = require"lcairo"
local CAIRO = cairo
print(cairo.version_string())
print("CAIRO.HAS_IMAGE_SURFACE: ", CAIRO.HAS_IMAGE_SURFACE)
local w = 320
local h = 240
local outfile = 'cairo_test1.png'
local cslud = cairo.image_surface_create(CAIRO.FORMAT_RGB24, w... |
-- example config for teamviewer sandbox.
-- for teamviewer 12 and earlier:
-- you need to use i386-based debian chroot downloaded with download-debian-chroot.sh script and prepared with debian-setup.cfg.lua config.
-- using debian-sandbox.cfg.lua config file as base
-- if using x86_64 host env you must also use i386 ... |
local g, cmd = vim.g, vim.cmd
g.ascii = {
" ",
" ",
" ",
" ... |
local skynet = require "skynet"
skynet.start(function()
skynet.dispatch("lua", function(src, session, cmd, ...)
local f = CMD[cmd]
assert(f, "can't find dispatch handler cmd = "..cmd)
if session > 0 then
return skynet.ret(skynet.pack(f(...)))
else
f(...)
... |
require("reactivity/src")
require("@vue/shared")
describe('reactivity/computed', function()
mockWarn()
it('should return updated value', function()
local value = reactive({})
local cValue = computed(function()
value.foo
end
)
expect(cValue.value):toBe(undefined)
value.foo = 1
expe... |
Talk(0, "好啊!成昆,原来你躲在这里,怎么,几个坏蛋聚在这里,是不是又在一起商量什么坏勾当?", "talkname0", 1);
Talk(18, "哼!上次的事全被你坏了,我这次饶不了你.", "talkname18", 0);
Talk(0, "手下败将还说大话,这次得小心一点,可别再让你跑了.", "talkname0", 1);
if TryBattle(13) == true then goto label0 end;
Dead();
do return end;
::label0::
ModifyEvent(-2, 0, 0, 0, -1, -1, -1, -1, -1, -1, -2,... |
package.path = debug.getinfo(1,"S").source:match[[^@?(.*[\/])[^\/]-$]] .."?.lua;".. package.path
trackFinder = require("libs.trackFinder")
trackDecorator = require('libs.trackDecorator')
-- setup the track color for the new track
-- add a postfader send to the snare bus track
function main()
trackDecorator.prepar... |
local tab = {}
tab.deepcopy = function(t)
local ttype,d = type(t),tab.deepcopy
local copy
if ttype == 'table' then
copy = {}
for k,v in next,t,nil do copy[d(k)]=d(v) end
setmetatable(copy,getmetatable(t))
else copy = t
end
return copy
end
tab.protocopy = function(t,p)
local... |
local ObjectManager = require("managers.object.object_manager")
victorQuestpHospitalConvoHandler = conv_handler:new {}
function victorQuestpHospitalConvoHandler:getInitialScreen(pPlayer, pNpc, pConvTemplate)
local convoTemplate = LuaConversationTemplate(pConvTemplate)
local curPhase = BestineElection:getCurrentPhas... |
--[[===========================================================================
| Copyright (c) 2018
|
| ItemListItem:
========================================================================--]]
local AddonName, Addon = ...
local L = Addon:GetLocale()
local Package = select(2, ...);
local ItemListItem... |
-- x86 Assembly
return {
name = "Assembly x86",
lexer = 34,
extensions = "asm",
keywords = {
[0] = {
name = "CPU Instructions",
keywords =
[[aaa aad aam aas adc add and call cbw clc cld cli cmc
cmp cmps cmpsb cmpsw cwd daa das dec div esc hlt idiv
imul in inc int into ire... |
--
-- Code by Piotr Machowski <piotr@machowski.co>
--
local Growl = {}
Growl.__n = 'GrowlNotifications'
Growl.set = {}
Growl.isAnimating = false
--global config
Growl.SHOW_TIME = 5000
Growl.FONT_SIZE = 8
Growl.NOTIFICATION_WIDTH = display.contentWidth*.25
--private functions
function Growl:_removeNotification( _n )
... |
--深海のミンストレル
--Scripted by nekrozar
function c101012015.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012015,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101012015)
e1:SetCost(c101012015.rmcost)
... |
local thisDir = __DIR__()
local systemIO = require 'systemIO'
local cIO = require 'cIO'
local path = require 'path'
local list = require 'list'
local lfsu = require 'lfsu'
local process = require 'process'
local function mkLuaPath(dirs)
local luaPath = '?.lua'
if type(dirs) == 'table' then
l... |
return {
member = function (obj, mem)
return function (...)
obj[mem](obj, ...)
end
end,
-- 正向追加参数
make = function (fn, obj)
return function (...)
fn(obj, ...)
end
end,
-- 逆向追加参数
rmake = function (fn, obj)
return function (.... |
local f = Const("f")
local a = Const("a")
print(mk_explicit(f)(a))
assert(is_explicit(mk_explicit(f)))
assert(not is_explicit(f))
assert(get_explicit_arg(mk_explicit(f)) == f)
check_error(function() get_explicit_arg(f) end)
|
local function getRange(start, finish, lines)
local start_row, start_col = lines:rowcol(start)
local finish_row, finish_col = lines:rowcol(finish)
return {
start = {
line = start_row - 1,
character = start_col - 1,
},
['end'] = {
line = finish_ro... |
require("test/bustedhelper_game")
local fight_state = require("fight/fight_state")
require("engine/application/constants")
local gamestate = require("engine/application/gamestate")
local wit_fighter_app = require("application/wit_fighter_app")
local dialogue_manager = require("dialogue/dialogue_manager")
describe('f... |
--- A double queue.
-- Taken from ***Programming in Lua*** [Queues and Double Queues](http://www.lua.org/pil/11.4.html)
-- and modified to not allow nil values, and returns nil if @{pop_first} or @{pop_last} is used when the queue is empty.
-- @module Queue
-- @usage local Queue = require('stdlib/lists/queue')
local Q... |
-- See LICENSE for terms
if not g_AvailableDlc.picard then
print("Underground Cheats: B&B DLC is missing!")
return
end
--~ local RetMapType = ChoGGi.ComFuncs.RetMapType
local function RetMapType()
local UIColony = UIColony
if not UIColony then
return
end
local map_id = UICity.map_id
if map_id == UIColony.un... |
fx_version 'cerulean'
game 'gta5'
author 'THC'
description 'Redzone Hud'
ui_page 'html/index.html'
files {
'html/index.html',
'html/style.css',
'html/script.js'
}
client_script {
'client/client.lua'
}
|
f = f or {}
f.mt = f.mt or {}
f.mt.list = f.mt.list or {}
f.list = function (t)
t = t or {}
local list = { array = {} }
setmetatable (list, f.mt.list)
for i = 1, #t do
list [i] = t [i]
end
return list
end
f.map = function (mapF, r, ...) mapF = f.toFunction (mapF) if mapF ... |
local g = vim.g
--nord
g.nord_style = "nord"
g.nord_borders = false
g.nord_contrast = false
g.nord_cursorline_transparent = true
-- Load the colorscheme
local present, nord = pcall(require, "nord")
if present then
nord.set()
end
vim.cmd([[
syntax on
filetype on
filetype plugin indent on
]])
|
local _M = {}
local http = require "kong.tools.http"
local json = require "cjson"
local log = ngx.log
local ERR = ngx.ERR
local WARN = ngx.WARN
local INFO = ngx.INFO
local ngx_time = ngx.time
local ngx_timer_at = ngx.timer.at
local ngx_worker_id = ngx.worker.id
local ngx_worker_exiting = ngx.worker.exiting
local ngx_... |
local ffi = require 'ffi'
local ctype = require 'uv/util/ctype'
local libuv = require 'uv/libuv'
local libuv2 = require 'uv/libuv2'
local libc = require 'uv/libc'
--------------------------------------------------------------------------------
-- uv_write_t
-------------------------------------------------------------... |
local compose_utils = require 'utils.compose_utils'
local nninit = require 'nninit'
--
-- WeightedAddition composition model
--
--
local WeightedAddition, parent = torch.class('torch.WeightedAddition', 'torch.CompositionModel')
function WeightedAddition:__init(inputs, outputs)
parent.__init(self)
self.inputs = inp... |
// ============================================================================================ //
/*
* Wildfire Servers - Portal RP - Base Addon
* File description: Location trigger serverside script file
* Copyright (C) 2022 KiwifruitDev
* Licensed under the MIT License.
*/
// ==================================... |
local Each = { static = {} }
local function clone(t)
local result = {}
for k,v in pairs(t) do result[k] = v end
return result
end
local function add(klass, instance)
if klass ~= Object then
add(klass.super, instance)
klass._instances = klass._instances or {}
klass._instances[instance] = 1
end
en... |
local Api = require 'telegram.api'
Api = Api.Init("213210238:AAEP1XgZOXjIiAqDJvUEDBzBHmLqAzO3Rug")
local update_id = 0
local function script()
local function updates(tab, err)
for i, updates in pairs(tab.result) do
local msg = updates.message
if msg.text then
local ca... |
----------------------------------------------------------------
-- KiwiHUD: Manage SavedVariables Database
----------------------------------------------------------------
local addon = KiwiHUD
local rootDB = { global = {}, profiles = {}, profileChars = {} }
local GetNumSpecializations = not addon.isClassic and Get... |
local FileToString
FileToString = function(path)
local file = io.open(path)
local s = file:read("*all")
file:close()
return s
end
return {
FileToString = FileToString
}
|
local class = require "class"
local BootScreen = class:derive("BootScreen")
function BootScreen:new()
-- make the boot screen font bigger
love.graphics.setFont(love.graphics.newFont(18))
-- github url link
self.url = "https://github.com/jakubg1/opensmce"
self.urlHovered = false
end
function BootScreen... |
local opts = { noremap = true, silent = true }
vim.api.nvim_buf_set_keymap(0, 'n', 'j', 'gj', opts)
vim.api.nvim_buf_set_keymap(0, 'n', 'k', 'gk', opts)
|
local reqVersion = "11.3"
assert(love.isVersionCompatible(reqVersion), "Ent requires Love version " .. reqVersion .. " or greater.")
local ent = {}
local insert, concat = table.insert, table.concat
local format = string.format
local getTime = love.timer.getTime
local osDate = os.date
---------------------------------... |
----------------------------------------------------
-- Walk controller based on ZMP preview control
----------------------------------------------------
local walk = {}
walk._NAME = ...
local Body = require'Body'
local vector = require'vector'
local util = require'util'
local moveleg = require'moveleg'
local li... |
--- === cp.apple.finalcutpro.import.MediaImport ===
---
--- Media Import
local require = require
local axutils = require("cp.ui.axutils")
local just = require("cp.just")
local prop = require("cp.prop")
local strings = requir... |
local remotePeripherals = (...)
return {
width = 60,
height = 100,
add = function(name, window)
local fillBar = advancedTiles.addSimpleFluidBar(window, 10, 80, 0, 60, 40, "water", 1)
fillBar:SetRotation(270)
fillBar:GetBackground():SetClickable(false)
local expansionWindow = guiTiles.newBasicWindow(windo... |
Config = {}
Config.OpenMenu = 51 -- Key: E
Config.RequiredPermission = "police.service"
Config.AntiSpamCooldown = 2
Config.Locations = {
{name = "Loadout", x = 458.9700012207, y = -979.73553466797, z = 30.689664840698},
{name = "Loadout", x = 1711.6817626953, y = 2575.6123046875, z = -69.432777404785}
}
Config... |
local Codegen = require("kotaro.parser.codegen")
local quotes = {
lucia = "「死ね死ね変態変態、不潔不潔不潔!」",
shizuru = "「むぅ」",
akane = "「ツチノコは手品」",
}
local add_table_fields = {}
function add_table_fields:new(source_field, target_field, items)
return setmetatable({source_field = source_field, target_field = target_fie... |
--
require("/lib/stardust/playerext.lua")
function init()
--self.energyCost = config.getParameter("energyCost", 10)
--self.initialEnergyCost = config.getParameter("initialEnergyCost", self.energyCost)
--self.drainBoost = 0
self.surfaceEnergyCost = config.getParameter("surfaceEnergyCost", 1)
self.zer... |
local playsession = {
{"exabyte", {29869}},
{"tykak", {552141}},
{"Krono", {437402}},
{"TheLemur", {493752}},
{"HYPPS", {923580}},
{"RainSolid", {310400}},
{"Dammpi", {919157}},
{"Kamyk", {142565}},
{"chaoticoz", {3820}},
{"adam1285", {885798}},
{"kovacspepe", {3657}},
{"yottahawk", {72556}},
{"Aero182218"... |
local mock = require("luassert.mock")
local stub = require("luassert.stub")
local lsputil = require("lspconfig.util")
local scandir = require("plenary.scandir")
local options = require("nvim-lsp-ts-utils.options")
local utils = require("nvim-lsp-ts-utils.utils")
local rename_file = require("nvim-lsp-ts-utils.rename-f... |
surefoot_brackaset = Creature:new {
objectName = "@mob/creature_names:surefoot_brackaset",
socialGroup = "brackaset",
faction = "",
level = 46,
chanceHit = 0.44,
damageMin = 340,
damageMax = 390,
baseXp = 4461,
baseHAM = 10000,
baseHAMmax = 12200,
armor = 0,
resists = {160,155,160,30,30,-1,-1,180,-1},
meat... |
isLoggedIn = false
inJail = false
jailTime = 0
currentJob = "electrician"
CellsBlip = nil
TimeBlip = nil
ShopBlip = nil
PlayerJob = {}
RegisterNetEvent('QBCore:Client:OnPlayerLoaded')
AddEventHandler('QBCore:Client:OnPlayerLoaded', function()
isLoggedIn = true
QBCore.Functions.GetPlayerData(function(PlayerData)
if... |
local config = require 'config'
local u = require 'utilities'
local api = require 'methods'
local HTTP = require('socket.http')
local URL = require('socket.url')
local plugin = {}
function plugin.onTextMessage(msg, blocks)
if blocks[1] == 'cat' or blocks[1] == 'cats' then
api.sendChatAction(msg.chat.id, "upload_ph... |
data.raw["gui-style"]["default"]["cc-scroll-pane"] =
{
type = "scroll_pane_style",
maximal_height = 300,
maximal_width = 400
} |
local gears = require('gears')
local beautiful = require('beautiful')
local filesystem = gears.filesystem
local dpi = beautiful.xresources.apply_dpi
local gtk_variable = beautiful.gtk.get_theme_variables
local theme_dir = filesystem.get_configuration_dir() .. '/theme'
local titlebar_theme = 'stoplight'
local titlebar... |
local wezterm = require "wezterm"
-- Link for checking mapping keys:
-- https://wezfurlong.org/wezterm/config/keys.html
-- Example configuration for wezterm.lua:
-- https://github.com/bew/dotfiles/blob/main/gui/wezterm/wezterm.lua
-- Example wezterm lua configurations:
-- https://github.com/wez/wezterm/discussions/6... |
ENT.Base = "base_anim"
ENT.PrintName = "Cassette Player"
ENT.Author = "Thermadyle"
ENT.data = {
insert_delay = 1,
click_delay = 0.5,
buttons = {
{
text = "PREV",
GetPos = function(self, width, height, display)
return
display.btn_padding,
display.height - display.btn_padding -... |
--[[ A basic ternary function!
Usage:
local ternary = require 'me.strangepan.libs.util.v1.ternary'
function foo(bar)
print(ternary(bar == nil, 'unset', bar))
end
]]
return function(condition, if_true, if_false)
if condition then return if_true else return if_false end
end
|
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--
-- A Trigger consists of one or more Events and one or more Actions.
-- When any of the events fire all of the Actions will be executed.
-- An Event consists of zero or more Conditions.
-- All of an... |
--地葬星カイザ
--
--Script by Trishula9
function c101107022.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101107022... |
local scene = storyboard.newScene()
local app = require('lib.app')
local api = app.api
local vec3 = require('lib.vec3')
local s = 250
local function position3d(v)
return s * v.x / v.z + _CX, s * v.y / v.z + _CY
end
local function dot(group, pos, color)
local c = display.newCircle(group, 0, 0, 3)
if color ... |
-- Definition of the Graph class.
local Object = require "lib/classic"
local GraphNode = require "engine/pathfinding/graphnode"
local GraphEdge = require "engine/pathfinding/graphedge"
local Graph = Object:extend()
--------------------------------------------------------------------------------
-- Instantiate a new ... |
local utils = {}
-- Check http://www.lua.org/pil/12.1.1.html
-- for more information
function utils.serialize(o)
-- TODO: We should make an optimistic tostring call
-- and check if it errors, instead of just giving
-- an error anyways
if type(o) == "number" then
return string.format("%d", o), n... |
loot_crates = {}
loot_crates.ent = {}
-- Inventory --
minetest.register_on_player_receive_fields(function(player, formname, fields)
if formname == "loot_crates:loot_crate_common" then
local name = player:get_player_name()
local ent = loot_crates.ent[name]
if ent
and ent:g... |
local packer
local function init()
if packer == nil then
packer = require('packer')
packer.init({
compile_path = vim.fn.stdpath('config') .. '/lua/packer_compiled.lua',
disable_commands = true,
display = {
open_fn = require('packer.util').float,
... |
-- rocket.lua
require "rocket/tank"
require "rocket/engine"
local anim8 = require "liberies/anim8"
-- Properties
-- Static
-- image => the rocket image
-- dynamic
-- x,y => cords
-- xyvel = 0
Rocket = {}
Rocket.__index = Rocket
local ANGACCEL = 4
setmetatable(Rocket, {
__call = function (cls, ...)
local s... |
--
-- Copyright (c) 2017 Milos Tosic. All rights reserved.
-- License: http://www.opensource.org/licenses/BSD-2-Clause
--
function projectDependencies_rqt()
return { "rdebug", "rbase" }
end
function projectAdd_rqt()
addProject_qt("rqt", true)
end
|
-- Simple script for testing porpuses of "librs232-luajit"
-- read from the port
local rs232 = require("mod_librs232")
port = rs232.new()
-- Arguments:
-- Device name, Baud rate, Timeout in micro-seconds
port:open("/dev/ttyUSB0", 115200, 10000)
count, data = port:read()
print(data)
port:close()
-- write to port
local... |
--radio.lua
local Widget = require("euler.widget")
local Radio = class(Widget)
local prop = property(Radio)
prop:accessor("group", nil)
prop:accessor("value", nil)
prop:accessor("checked", true, true)
function Radio:__init(id, checked)
self.checked = checked
self.root = gui.get_node(id .. "/radio")
self.label = gu... |
local charWidth = 40
local alphabet_character_mt = {
__index = {
create_actors = function(self, name)
self.name=name
local af = Def.ActorFrame{
Name=name,
InitCommand=function(subself)
self.container = subself
subself:diffusealpha(0)
subself:MaskDest()
end,
OnCommand=function(s... |
local sexfeel_cds = {}
gpay.boosters = {
["HP250"] = function(ply)
ply:SetHealth(250)
end,
["AR228"] = function(ply)
ply:SetArmor(250)
end,
["DJUMP"] = function(ply)
ply:SetJumpPower(ply:GetJumpPower()*2)
end,
["FEEL"] = function(ply)
if sexfeel_cd... |
--[[
MIT License
Copyright (c) 2019-2021 Marco Lizza
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, publ... |
object_tangible_tcg_series1_consumable_nuna_ball_advertisement = object_tangible_tcg_series1_shared_consumable_nuna_ball_advertisement:new {
}
ObjectTemplates:addTemplate(object_tangible_tcg_series1_consumable_nuna_ball_advertisement, "object/tangible/tcg/series1/consumable_nuna_ball_advertisement.iff") |
local Event = require 'utils.event'
local table = require 'utils.table'
local Gui = require 'utils.gui'
local Model = require 'utils.debug.model'
local format = string.format
local insert = table.insert
local events = defines.events
-- Constants
local events_to_keep = 10
-- Local vars
local Public = {
name = 'E... |
local curl = require "lcurl.safe"
local json = require "cjson.safe"
script_info = {
["title"] = "怡萱动漫",
["description"] = "http://www.yxdm.tv/",
["version"] = "0.0.1",
}
function request(url)
local r = ""
local c = curl.easy{
url = url,
httpheader = {
"User-Agent: Mozilla/5.0 (Windows NT 10... |
----------------------------------------
-- ioc.lua --
-- desc : io control --
-- rev : 1.0 --
-- date : 04/25/2021 --
-- author : tuan nguyen (pdxtigre) --
-- email : info@codesmiths.org --
-- website: https://codesm... |
local _2afile_2a = "fnl/conjure/mapping.fnl"
local _2amodule_name_2a = "conjure.mapping"
local _2amodule_2a
do
package.loaded[_2amodule_name_2a] = {}
_2amodule_2a = package.loaded[_2amodule_name_2a]
end
local _2amodule_locals_2a
do
_2amodule_2a["aniseed/locals"] = {}
_2amodule_locals_2a = (_2amodule_2a)["anisee... |
local NumColumns = GAMESTATE:GetCurrentStyle():ColumnsPerPlayer()
local player = ...
local pn = ToEnumShortString(player)
local mods = SL[pn].ActiveModifiers
local columns = {}
local style = GAMESTATE:GetCurrentStyle(player)
local width = style:GetWidth(player)
if mods.ColumnFlashOnMiss then
local y_offset = SL.Glob... |
local present1, autopairs = pcall(require, 'nvim-autopairs')
if not (present1 or present2) then
return
end
autopairs.setup({ check_ts = true })
-- autopairs_completion.setup({
-- map_cr = true, -- map <CR> on insert mode
-- map_complete = true, -- it will auto insert `(` after select function or method item
-... |
local widget = require("widget")
local selectBox = {}
selectBox.__index = selectBox
setmetatable(selectBox, widget)
function selectBox.new(app, x, y, content, drop)
local self = {}
setmetatable(self, selectBox)
selectBox.init(self, app, x, y, content, drop)
return self
end
function selectBox.init(self, app, ... |
-- SilentsReplacement
-- init
-- August 12, 2021
local RunService = game:GetService("RunService")
if RunService:IsClient() then
return require(script.Client)
else
return require(script.Server)
end |
items=
{
[1] =
{
["item_name"] = "红宝石",
["item_detail"] = "攻击力加3",
["item_func"] = function()
local hero_propertys = get_hero_property()
hero_propertys["attack"] = hero_propertys["attack"] + 3
set_hero_property(hero_propertys)
end
},
[2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.