content stringlengths 5 1.05M |
|---|
print("initialized textures")
--[[
The Mineclone 2 Unofficial Official Texture Pack is located here https://forum.minetest.net/viewtopic.php?f=4&t=18559.
Creative Commons Attribution-ShareAlike 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the t... |
local M = {}
function M.setup(opts)
local schemastore_status_ok, schemastore = pcall(require, "schemastore")
if schemastore_status_ok then
opts["settings"] = {
json = {
schemas = schemastore.json.schemas(),
},
}
-- require("svim.utils").print_tabl... |
local module = {async = true}
local probability = require(game:GetService('ReplicatedStorage').Common.Probability)
local alignments = {
{item = 'masculine', chance = 66.6},
{item = 'feminine', chance = 33.4},
}
function module.Random(info)
return probability.Choose(alignments, info.seed)
end
function module.... |
CloneClass( ECMJammerBase )
|
TatooineAnchorheadScreenPlay = ScreenPlay:new {
numberOfActs = 1,
screenplayName = "TatooineAnchorheadScreenPlay"
}
registerScreenPlay("TatooineAnchorheadScreenPlay", true)
function TatooineAnchorheadScreenPlay:start()
if (isZoneEnabled("tatooine")) then
self:spawnMobiles()
self:spawnSceneObjects()
end
end
... |
local wrap, yield = coroutine.wrap, coroutine.yield
local Iterable = require('iterables/Iterable')
local ArrayIterable, get = require('class')('ArrayIterable', Iterable)
function ArrayIterable:__init(array, map)
self._array = array
self._map = map
end
function ArrayIterable:__len()
local array = self._array
if ... |
package("libjpeg")
set_homepage("http://ijg.org/")
set_description("A widely used C library for reading and writing JPEG image files.")
set_urls("http://www.ijg.org/files/jpegsrc.$(version).tar.gz")
add_versions("v9c", "650250979303a649e21f87b5ccd02672af1ea6954b911342ea491f351ceb7122")
add_versio... |
local button = require "skyla.gui.button"
local util = {}
function util.create_test_button(text, callback)
return button.new {
normal = "#ui_button_tiny.png",
text = text,
font = "fonts/animated_32_ffffff.fnt",
callbac... |
--[[
Show what's in the next room, by predicting its seed
based on the current seed and RNG offset.
Features that are useful for routing are prioritized.
Currently shows:
- Room rewards, including Boon options.
- Charon's shop offerings, if the next room is a shop.
- Well shop contents.
- Enemy types and wave count.
... |
local Herbie = LibStub("AceAddon-3.0"):GetAddon("Herbie")
local acr = LibStub("AceConfigRegistry-3.0")
local acd = LibStub("AceConfigDialog-3.0")
local function getHerbieProfileProfessionsOption(item)
return Herbie.dbAce.profile.professions[item.arg]
end
local function setHerbieProfileProfessionsOption(item, va... |
local formattingutil = require("util/formattingutil")
return function(self, chips, el)
-- If the header isn't enabled, don't add any indentation in each line.
local offset = self.config.header_style.enabled and 1 or 0
local header =
formattingutil.create_osd_section_header(formattingutil.get_format(self, "heade... |
local ffi = require("ffi") -- LuaJIT Extension
local user32 = ffi.load("user32") -- LuaJIT User32 DLL Handler Function
ffi.cdef([[
enum{
MB_OK = 0x00000000L,
MB_OKCANCEL = 0x00000001L,
MB_ABORTRETRYIGNORE = 0x00000002L,
MB_YESNOCANCEL = 0x00000003L,
MB_YESNO = 0x00000004L,
MB_RETRYCANCEL = 0x00... |
APEX:SetBPM(120)
-- Item Scroller setup
local container = nil
local scroller = nil
local current_entry = nil
local current_sort = "Difficulty"
local t = Def.ActorFrame {
InitCommand = function(this)
container = this
end,
}
local ITEM_HEIGHT = 54
local ITEM_MARGIN = 2
local ITEM_WIDTH = 751
local DIFFICULTY_BO... |
object_tangible_painting_painting_clone_trooper_01 = object_tangible_painting_shared_painting_clone_trooper_01:new {
}
ObjectTemplates:addTemplate(object_tangible_painting_painting_clone_trooper_01, "object/tangible/painting/painting_clone_trooper_01.iff")
|
local utils = {}
function utils.MSRinit(model)
for k,v in pairs(model:findModules('nn.SpatialConvolution')) do
local n = v.kW*v.kH*v.nInputPlane
v.weight:normal(0,math.sqrt(2/n))
if v.bias then v.bias:zero() end
end
end
function utils.FCinit(model)
for k,v in pairs(model:findModules'nn.Line... |
local ffi = require("ffi")
ffi.cdef[[
void hello();
int64_t add(int64_t, int64_t);
int64_t length(const char *);
char *duplicate(int64_t, const char *);
void release(char *);
typedef struct {
int32_t x, y;
} point_t;
void add_points(
const point_t *,
const poin... |
local api = vim.api
local chezmoi_bin = ''
local function chezmoi(cmd)
local fcmd = string.format('%s %s 2>&1', chezmoi_bin, cmd)
local out = vim.fn.system(fcmd)
if vim.v.shell_error ~= 0 then
-- api.nvim_err_writeln(string.format("chezmoi error: %s: %s", fcmd, out))
-- return ''
end
return out
end
... |
local FindService = require('apicast.policy.find_service')
local HostBasedFinder = require('apicast.policy.find_service.host_based_finder')
local PathBasedFinder = require('apicast.policy.find_service.path_based_finder')
local ConfigurationStore = require('apicast.configuration_store')
describe('find_service', functio... |
FishTdSoundController = class("FishTdSoundController")
slot1 = {
["Net0.mp3"] = {
occupationTime = 0,
time = 0.1,
priority = ({
BUTTON = 8,
Fish = 6,
ACCOUNT = 5,
WAVE = 7,
ATHER = 2,
ATHER_II = 3,
HIT = 0,
GOLD = 4,
DEAD = 9
})["HIT"]
},
["Net1.mp3"] = {
occupationTime = 0,
ti... |
local Enemies = {}
Enemies.enemy = {}
local numEnemies = 3
for i =1, numEnemies do
Enemies.enemy[i] = require "enemy"
Enemies.enemy[i] = Enemy:new()
Enemies.enemy[i]:init()
end
Enemies.projectiles = require "projectiles"
Enemies.projectiles = Projectiles:new()
local minXSpacing = 450
local maxXSpacing = 1200
lo... |
bankConfig = {};
bankConfig.bank = {
Vector( -779.466736, 1220.188843, -200.307022),
Vector(-1155.516113, 1353.531982, -52.040535)
} // Where is the bank located.
bankConfig.vault = {
Vector(-1154.817139, 1401.917480, -25.699097),
Vector(-1372.119385, 1135.647217, -200.667740)
}
bankConfig.bannerPos... |
if os.get() == "windows" then
os.mkdir("build");
os.mkdir("build/bin_x86");
os.mkdir("build/bin_x64");
-- Copy the SDL2 dlls to the build directory.
os.copyfile("examples/sdl/lib/x86/SDL2.dll", "build/bin_x86/SDL2.dll");
os.copyfile("examples/sdl/lib/x64/SDL2.dll", "build/bin_x64/SDL2.dll");
end
---------------... |
local socket = require("socket.core")
local json = require("json")
function connect(address, port, laddress, lport)
local sock, err = socket.tcp()
if not sock then return nil, err end
if laddress then
local res, err = sock:bind(laddress, lport, -1)
if not res then return nil, err end
en... |
--[[
Copyright 2020 The Defold Foundation Authors & Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicabl... |
local call_table
call_table = function(value)
if value == 0 then
return "inc"
elseif value == 1 then
return "dec"
elseif value == 2 then
return "next"
elseif value == 3 then
return "prev"
elseif value == 4 then
return "loop"
elseif value == 5 then
return "endloop"
elseif value == 6... |
SKILL.name = "Sigmars Blessing"
SKILL.LevelReq = 5
SKILL.SkillPointCost = 2
SKILL.Incompatible = {
}
SKILL.RequiredSkills = {
}
SKILL.icon = "vgui/skills/Spell_holy_surgeoflight.png"
SKILL.category = "Followers of Sigmar"-- Common Passives, Warrior, Stealth, Lore of Light, Dark Magic
SKILL.slot = "AOE" -- ULT, RANG... |
-- Demonstration Command
return {
run = function(arg, msg)
msg:reply('Pong!')
end,
description = 'Ping Pong',
group = 'utility',
aliases = {'pong'}
}
|
---------------------------------------------------------------------
-- Project: irc
-- Author: MCvarial
-- Contact: mcvarial@gmail.com
-- Version: 1.0.0
-- Date: 31.10.2010
---------------------------------------------------------------------
-- everything is saved here
servers = {} -- syntax: [server] = {element so... |
---@meta
resty_websocket_client={}
function resty_websocket_client.send_text(self, data) end
function resty_websocket_client.new(self, opts) end
function resty_websocket_client.send_ping(self, data) end
function resty_websocket_client.connect(self, uri, opts) end
function resty_websocket_client.set_timeout(self, time) ... |
--[[
ItemSystems.RollLootManager
================
Description: Creates rolled loot objects that clients will listen for.
]]
local ROLLENTRY_TEMPLATE = script:GetCustomProperty("RollEntryTemplate")
local ROLLER_TEMPLATE = script:GetCustomProperty("RollerTemplate")
local ROLL_EXPIRETIME = script:GetCustomP... |
require 'setup/setup'
local dummy = { dummy = "dummy" } -- we fulfill or reject with this when we don't intend to test against it
describe("2.3.1: If `promise` and `x` refer to the same object, reject `promise` with a `TypeError' as the reason.", function()
specify("via return from a fulfilled promise", function(... |
-- Node definitions
minetest.register_node("bitchange:minecoinblock", {
description = "MineCoin Block",
tiles = { "bitchange_minecoinblock.png" },
groups = {cracky=2},
sounds = default.node_sound_stone_defaults(),
stack_max = 30000,
})
minetest.register_craftitem("bitchange:minecoin", {
description = "MineCoin",... |
function Wall(x1, y1, x2, y2, thickness)
local wall = {
name = 'wall',
x1 = NormalizeToWindowWidth(x1),
y1 = NormalizeToWindowHeight(y1),
x2 = NormalizeToWindowWidth(x2),
y2 = NormalizeToWindowHeight(y2),
thickness = thickness,
}
wall.collide = func... |
PLUGIN.stalkernames = {
"Alex",
"Alexander",
"Alexei",
"Anatoly",
"Andrei",
"Andryuha",
"Anton",
"Arkasha",
"Arthur",
"Artyom",
"Bodya",
"Bogdan",
"Borka",
"Borya",
"Boryan",
"Danila",
"Danko",
"Danya",
"Denis",
"Dima",
"Dimka",
"Dimon",
"Dimuha",
"Dmitro",
"Dmitry",
"Edik",
"Egor",
"Egorka... |
package.loaded.layouts = nil
local layouts = require "layouts"
package.loaded.utils = nil
local utils = require "utils"
local readIntBE = utils.readIntBE
local subclass = utils.subclass
local CompoundElement = layouts.CompoundElement
local SimpleElement = layouts.SimpleElement
-- Display a memory value us... |
--[[
Sine-Cosine Wave
Auther: Ahmed Dawoud
adawoud1000@hotmail.com
Animation Shows Sine And Cosine waves and the relation
to the unit vector.
]]
local Timer = require "knife.timer"
local Easing = require 'easing'
local suit = require 'suit'
function love.load()
-- Load Suit ... |
module("UITask", package.seeall)
setmetatable(UITask, {__index=UIWidget})
UT_EXECTASK = "UT_EXECTASK"
UT_GIVEUP = "UT_GIVEUP"
function new(go)
local obj = {
}
setmetatable(obj, {__index=UITask})
obj:Init(go)
return obj
end
function Init(self, go)
UIWidget.Init(self, go)
end
function Aw... |
local tabnine = require('cmp_tabnine.config')
tabnine:setup{
max_lines = 1000,
max_num_results = 20,
sort = true,
run_on_every_keystroke = true,
snippet_placeholder = '..'
}
|
return function(pos1, pos2, pos1_load, pos2_load)
local manip1 = minetest.get_voxel_manip()
local e1, e2 = manip1:read_from_map(pos1, pos2)
local area1 = VoxelArea:new({MinEdge=e1, MaxEdge=e2})
local manip2 = minetest.get_voxel_manip()
e1, e2 = manip2:read_from_map(pos1_load, pos2_load)
local area2 = V... |
--[[
--=====================================================================================================--
Script Name: Give Passenger Weapon, for SAPP (PC & CE)
Description: Assigns a custom wepaon when someone enters the passengers seat of a vehicle
~ requested by mdc81 on opencarnage.net
- note, this mod doesn'... |
-- Copyright 2022 SmartThings
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in ... |
function reverse_table(t)
for _, v in pairs(t) do print(v) end
local size = #t
local result = {}
for i,e in pairs(t) do
result[size-i+1] = e
end
return result
end
function rotate_array(array)
print('rotating array')
print('vals')
for k, v in pairs(array) do print(v) end
... |
local IO = require "kong.tools.io"
local Object = require "classic"
-- Migrations
local Migrations = Object:extend()
function Migrations:new(dao, migrations_path)
local path = migrations_path and migrations_path or "."
self.dao = dao
self.options = { keyspace = dao._properties.keyspace }
self.migrations_path... |
local apps = { 93, 9, 175, 22, 15 }
function pl_corshift_001(obj)
local app = math.random(#apps)
obj:SetAppearanceType(apps[app])
end
|
local class = require 'ext.class'
local Function = require 'symmath.Function'
local atanh = class(Function)
atanh.name = 'atanh'
-- domain: (-1, 1)
function atanh.func(x)
return .5 * math.log((1 + x) / (1 - x))
end
-- domain: (-1, 1)
function atanh:evaluateDerivative(deriv, ...)
local x = table.unpack(x)
return d... |
local MemObj = require "memobj"
local print_r = require "print_r"
local skynet = require "skynet"
local MemAdmin = class("MemAdmin")
function MemAdmin:ctor(table_name, pk)
self._table_name = table_name
self._pk = pk
local tmp_pks = string.split(pk, ",")
if #tmp_pks > 1 then
self._is_multi_pk = true
else
self.... |
-- Usage: nvim -u test/manual/minimal_init.lua
-- Add the current working directory to the runtime path.
-- This way the termmaker plugin can be used without installing it.
vim.cmd("set rtp+=.")
-- Set hidden ... otherwise toggling terminals will not work.
vim.o.hidden = true
require("termmaker").setup()
|
local ing = {
{
{"pipe", 20},
{"stone-brick", 100}
},
{
{"facility-mk1", 1},
{"advanced-circuit", 30},
{"concrete", 100}
},
{
{"facility-mk2", 1},
{"refined-concrete", 100}
},
}
if bobmods and bobmods.plates then
table.insert(ing[2], {"brass-pipe", 100})
table.insert(ing[3], ... |
--aliases (helper variables)
lg = love.graphics
la = love.audio
lfs = love.filesystem
li = love.image
lm = love.math
lmo = love.mouse
lf = love.font
lk = love.keyboard
lt = love.timer
lw = love.window
lj = love.joystick
-- lw.setMode()
sw = love.window.getWidth()
sh = love.window.getHeight()
math.randomseed(os.time... |
registerNpc(251, {
walk_speed = 150,
run_speed = 350,
scale = 90,
r_weapon = 1076,
l_weapon = 0,
level = 48,
hp = 22,
attack = 195,
hit = 126,
def = 97,
res = 168,
avoid ... |
parseColor = require("api.parse_color")
function addScienceFluid(name,base_color,flow_color,icon)
data:extend({
{
type = "fluid",
name = name,
default_temperature = 0,
max_temperature = 0,
heat_capacity = "0KJ",
base_color = parseColor(base_color),
flow_color = parseColo... |
do
local function It(a) return { __tag = "It", a } end
local function Mk(a) return { __tag = "Mk", a } end
local function Foo(gk) return gk end
(nil)(Foo)
(nil)(function(gl) return gl end)
(nil)(It)
(nil)(Mk)
end
|
-- test_binlib.lua
local bin = require("bin")
local h = ""
h = h..bin.pack("A", "hello world")
print(h) |
Common_UnitConsumeActPoint(attacker, 1);
Common_Sleep(attacker, 0.3)
|
--[[
Copyright 2021 - Sebastian S. Cocioba - Binomica Labs
Inspired by a Tweet from @JacobPhD (Dr. Jacob A Tennessen)
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, includin... |
Ball = {}
Ball.__index = Ball
local ballFilter = function(ball, other)
if other.isBlock then
return 'bounce'
else
return nil
end
-- else return nil
end
function Ball:create(x, y, r, world)
local ball = {}
ball.x, ball.y = x, y
ball.rad = r
ball.speed = ... |
--New
object_static_worldbuilding_vehicles_shared_barc_speeder_static_destroyed = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/static/worldbuilding/vehicles/shared_barc_speeder_static_destroyed.iff"
}
ObjectTemplates:addClientTemplate(object_static_worldbuilding_vehicles_shared_barc_speeder_static... |
cc.FileUtils:getInstance():addSearchPath("src")
cc.FileUtils:getInstance():addSearchPath("res")
-- CC_USE_DEPRECATED_API = true
require "cocos.init"
-- cclog
cclog = function(...)
print(string.format(...))
end
-- for CCLuaEngine traceback
function __G__TRACKBACK__(msg)
cclog("---------------------------------... |
migration_0_17_57 = {}
function migration_0_17_57.global()
end
function migration_0_17_57.player_table(player, player_table)
end
function migration_0_17_57.subfactory(player, subfactory)
for _, floor in pairs(Subfactory.get_in_order(subfactory, "Floor")) do
for _, line in pairs(Floor.get_in_order(floor, ... |
object_tangible_furniture_tatooine_uber_basket_shallow = object_tangible_furniture_tatooine_shared_uber_basket_shallow:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_tatooine_uber_basket_shallow, "object/tangible/furniture/tatooine/uber_basket_shallow.iff")
|
local function sendErrorParse( client, sendString, okayMsg )
connected, err = client:send( sendString )
if connected ~= nil then
print( okayMsg )
else
print( connected )
print( "Error: " )
print( err )
end
end
local socket = require( "src.socket" )
local timer = require( "love.timer" )
local... |
local M = {}
-- table information begin
local tableName = "pathHistory"
-- table information end
local Util = require "sora.util"
function M.new(o,isSingleton)
local ins
local SoraModelMysql = require 'sora.model.mysql'
if isSingleton then
setmetatable(M, { __index = SoraModelMysql:new() })
ins = { tableName ... |
ifile = im.FileNew("1frame.avi", "AVI")
ifile:SetInfo("CUSTOM")
ifile:SetAttribute("FPS", im.FLOAT, {15}) -- Frames per second
ifile:SetAttribute("AVIQuality", im.INT, {10000}) -- Default Quality
new_image = im.ImageCreate(320, 240, im.RGB, im.BYTE)
err = ifile:SaveImage(new_image)
if (err ~= im.ERR_NONE) then
ifil... |
function momoTweak.finalFixes.ElectronicsCategory()
for _, e in pairs(momoTweak.electronics) do
momoIRTweak.recipe.SetCategory(e, "electronics")
end
for _, c in pairs(momoTweak.components) do
momoIRTweak.recipe.SetCategory(c, "electronics")
end
local recipes = {momoTweak.board.grey, "circuit-grey-board-alt... |
--- Provides various cipher functions, such as a Caesar cipher, and Viginere cipher.
-- @module[kind=misc] cipher
-- Setup local functions
local expect = require("cc.expect").expect -- Ensure that fields are correct.
local function cut(str,len,pad) -- Shorten viginere keys.
pad = pad or " "
return str:sub(1,len) ... |
local template = require "resty.template"
local auth_header = ngx.var.http_authorization
local _, _, token_string = string.find(auth_header, "Basic%s+(.+)")
local user_json = ngx.decode_base64(token_string)
local user = cjson.decode(user_json)
local routes = {};
local route_keys = ngx.shared.api_routes:get_keys(100)
f... |
if Holo:ShouldModify("HUD", "TopHUD") then
Holo:Post(HUDHeistTimer, "init", function(self)
self._bg_box = HUDBGBox_create(self._heist_timer_panel)
self:UpdateHolo()
Holo:AddUpdateFunc(callback(self, self, "UpdateHolo"))
end)
Holo:Post(HUDHeistTimer, "set_time", function(self, ...)
... |
local fmt, write=string.format,io.write
local hof=coroutine.wrap(function()
local yield=coroutine.yield
local a={1,1}
yield(a[1], 1)
yield(a[2], 2)
local n=a[#a]
repeat
n=a[n]+a[1+#a-n]
a[#a+1]=n
yield(n, #a)
until false
end)
local mallows, mdiv=0,0
for p=1,20 do
local max, div, num, last, fdiv=0,0,0,0,0... |
local m = {}
tigris.magic = m
tigris.include("mana.lua")
tigris.include("essences.lua")
tigris.include("spells.lua")
tigris.include("potions.lua")
tigris.include("jewelry.lua")
tigris.include("portals.lua")
|
--[[
Bizhawk Shuffler 2 by authorblues
inspired by Brossentia's Bizhawk Shuffler, based on slowbeef's original project
tested on Bizhawk v2.6.2 - http://tasvideos.org/BizHawk/ReleaseHistory.html
released under MIT License
--]]
config = {}
total_time_limit = 0
running = true
plugins = {}
-- determine operating sys... |
local function capture()
local img = image(CAMERA)
for i = 1, img.width, 10 do
for j = 1, img.height, 10 do
table.insert(pixels,{x=i/2,y=j/2,w=5,h=5,c=color(img:get(i,j))})
end
end
captured = true
end
function setup()
parameter.action("Capture",capture)
parameter.num... |
Hyper = {"ctrl", "cmd", "shift"}
AssetsDir = hs.configdir .. "assets/"
-- hs.logger.defaultLogLevel = 'debug'
ConfigLogger = hs.logger.new('config','debug') |
--[[
Copyright 2017 YANG Huan (sy.yanghuan@gmail.com).
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to i... |
local M = { }
M.defaultFont = jd.Font.request(jd.conf.misc.defaultFont)
M.defaultLayer = jd.drawService:layer(3)
function M.create(s, p, layer, font)
if type(font) == 'string' then
font = jd.Font.request(font)
else
font = font or M.defaultFont
end
layer = layer or M.defaultLayer.group
... |
SoundLayerEditor = SoundLayerEditor or class(EnvironmentLayerEditor)
local SndLayer = SoundLayerEditor
function SndLayer:init(parent)
self:init_basic(parent, "SoundLayerEditor")
self._menu = parent._holder
MenuUtils:new(self)
self._created_units = {}
self._environment_unit = "core/units/sound_environment/sound_env... |
--Color Class (table)
Color = {R = 0 ,G = 0,B = 0,A = 0 , className = "Color"}
--Color Class Metatable
Color.mt = {}
--Creation by Constructor simulation
Color.mt.__call = function(caller,r,g,b,a)
R = r or 0
G = g or 0
B = b or 0
A = a or 0
p = {}
setmetatable(p,Color)
Color.__index = Color
p.R = r
p.G = g
p.B = b
p... |
local setmetatable = setmetatable
local ipairs = ipairs
local error = error
local _guardian = function()
local guard = { __when = {} }
guard.when = function(filter, f)
guard.__when[#guard.__when + 1] = { filter = filter, f = f }
return guard
end
guard.any = function(f)
guard.__any = f
return guard
end
... |
for i, v in pairs(tfm.get.room.playerList) do
eventNewPlayer(i)
end
for i, v in pairs(BOT) do
PLAYER[i] = instanceData()
PLAYER[i].skinEquiped = v.chair
end
local temp = roomOwner()
addFunctionTimer(function()
for i, v in pairs(tfm.get.room.playerList) do
if nickHashtag(i) == temp then
OWNER = i
colorNick(... |
-- converted from https://github.com/joaquimserafim/base64-url
local Buffer = require('buffer').Buffer
local function unescape (str)
local len = 4 - #str % 4
local newstr = {}
str:gsub("%S+", function(c) table.insert(newstr, c) end)
for i = 1, len do
table.insert(newstr, "")
end
newstr = table.concat(n... |
--===========================================================================--
-- --
-- Attribute for Validator --
-- --
... |
local _0_0 = nil
do
local name_0_ = "conjure.fs"
local loaded_0_ = package.loaded[name_0_]
local module_0_ = nil
if ("table" == type(loaded_0_)) then
module_0_ = loaded_0_
else
module_0_ = {}
end
module_0_["aniseed/module"] = name_0_
module_0_["aniseed/locals"] = (module_0_["aniseed/locals"] or ... |
local sha2 = require('opus.crypto.sha2')
local Krist = { }
local function sha256(key)
return sha2.digest(key):toHex()
end
local function makeaddressbyte(byte)
byte = 48 + math.floor(byte / 7)
return string.char(byte + 39 > 122 and 101 or byte > 57 and byte + 39 or byte)
end
function Krist.makev2address(key)
loc... |
--[[-------------------------------------------------------------------------
This file handles most of the server side atm stuff, such as setting and getting bank values
Creating and destroying group accounts.
---------------------------------------------------------------------------]]
include("batm_config.lua")
AddC... |
--[[
author:{JanRoid}
time:2019-4-26
Description: 保存本地数据
]]
local DataKey = {
-- clientSocket
CS_USER = "clent_server_user"
}
return DataKey |
pausebutton = class:new()
function pausebutton:init(x, y, text, func)
self.x = x-1
self.y = y
self.text = text
self.func = func
self.value = 0
self.textwidth = levelselectfont:getWidth(self.text)
self.active = false
self.height = 23
self.width = 218
end
function pausebutton:changetext(t)
self.text = t
se... |
--[[
Simplistic base panel that has basic colors, fields and methods commonly used throughout Flux Framework.
Do not use it directly, base your own panels off of it instead.
--]]
local PANEL = {}
PANEL.draw_background = true
PANEL.background_color = Color(0, 0, 0)
PANEL.text_color = Color(255, 255, 255)
PANEL.main... |
local funny_text_combo = ui.new_combobox("MISC", "Miscellaneous", "Funny Text", "-", "autism", "monospace", "bold", "bold italic")
client.set_event_callback("string_cmd", function(e)
local text = e.text
local cmd, msg = text:match("^(.-) (.*)$")
if ((cmd == "say" or cmd == "say_team") and msg ~= nil and msg ~= "")... |
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf"
module('BceLeaveMessage_pb', package.seeall)
local BCELEAVEMESSAGE = protobuf.Descriptor();
local BCELEAVEMESSAGE_UID_FIELD = protobuf.FieldDescriptor();
local BCELEAVEMESSAGE_CONTEXT_FIELD = protobuf.FieldDescriptor();
local BCELEAVEMESSA... |
local settings = require('settings')
local ui = require('core.ui')
local state = require('pv.state')
local defaults = {
visible = false,
x = 0,
y = 0,
width = 360,
height = 500,
}
local display = settings.load(defaults, 'dashboard', true)
local pairs = pairs
local save = settings... |
--- Load in custom levels with static level gen.
-- @module CustomLevels
local custom_level_params = {
hide_entrance = true,
}
local custom_level_state = {
active = false,
file_name = nil,
width = nil,
height = nil,
room_generation_callback = nil,
procedural_spawn_callback = nil,
embed... |
return {
a = '\a';
b = '\b';
f = '\f';
n = '\n';
r = '\r';
t = '\t';
v = '\v';
}
|
--!A cross-platform build utility based on Lua
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law... |
-- User-changeable variables
local pumpkin_colour = {["r"] = 0xf, ["g"] = 0x2, ["b"] = 0x0}
--
local Timer = require('base.timer')
function effect()
Lighting.SetFlashingSpeed(0)
Lighting.SetBreathingModeEnabled(true)
for i = 1, 8 do
Lighting.SetColour(i, pumpkin_colour.r, pumpkin_colour.g, pu... |
local OnsetRP = ImportPackage("onsetrp")
local currentNpc
local cinematicUIWeb = CreateWebUI(0, 0, 0, 0, 2, 60)
SetWebVisibility(cinematicUIWeb, WEB_HIDDEN)
SetWebAlignment(cinematicUIWeb, 0, 0)
SetWebAnchors(cinematicUIWeb, 0, 0, 1, 1)
SetWebURL(cinematicUIWeb, "http://asset/cinematicui/ui.html")
AddEvent("CUIClose"... |
target("udns")
set_kind("static")
add_includedirs("../src/udns", {public=true})
add_files("../src/udns/*.c") |
-- authors: Luxinia Dev (Eike Decker & Christoph Kubisch)
---------------------------------------------------------
-- put bin/ and lualibs/ first to avoid conflicts with included modules
-- that may have other versions present somewhere else in path/cpath.
local iswindows = os.getenv('WINDIR') or (os.getenv('OS') or ... |
-- Closures and anonymous functions are ok:
function adder(x)
-- The returned function is created when adder is
-- called, and remembers the value of x:
return function (y) return x + y end
end
a1 = adder(9)
a2 = adder(36)
print(a1(16)) --> 25
print(a2(64)) --> 100
|
function start(keys)
local caster = keys.caster
local target = keys.target
local ability = keys.ability
local ability_crit = caster:FindAbilityByName("gustavo_crit")
local level = (ability:GetLevel()-1)
local level_crit = (ability_crit:GetLevel()-1)
local damage = ability:GetLevelSpecialValueFor("damage", level... |
local chooseMagic = love.filesystem.load("utils/grid.lua")()
local skills = {}
for skill, value in pairs(character.active_skills) do
table.insert(skills, {
id = skill,
title = character:normalizeTitle(skill),
comment = "LV: "..character:getSkillLevel(skill).." MP: "..character:getSkillLevel(skill)
})
end
choo... |
-- Put your computer's address here! localhost will work locally, but you'll
-- need an actual IP address to deploy to a device (iOS/Android).
local baseURL = 'http://localhost:2000'
--local baseURL = 'http://mycomputer.local:2000'
--local baseURL = 'http://10.0.0.10:2000'
local http = require('socket.http')
love.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.