content stringlengths 5 1.05M |
|---|
--[[ Netherstorm -- Ever-Core the Punisher.lua
This script was written and is protected
by the GPL v2. This script was released
by BlackHer0 of the BLUA Scripting
Project. Please give proper accredidations
when re-releasing or sharing this script
with others in the emulation community.
~~End of License Agreement
-- B... |
--[[
Project: SA-MP-API
Author: Tim4ukys
My url: vk.com/tim4ukys
]]
local sys = require 'SA-MP API.kernel'
sys.ffi.cdef[[
struct stInputBox {
void *pUnknown;
unsigned char bIsChatboxOpen;
unsigned char bIsMouseInChatbox;
unsigned char bMouseClick_related;
unsigned char unk;
unsigned int dwPosChatInpu... |
minetest.register_node("yatm_decor:mesh_dense", {
description = "Dense Mesh",
groups = {cracky = 1},
sounds = yatm.node_sounds:build("metal"),
tiles = {
"yatm_meshes_border.png",
"yatm_meshes_dense_mesh.png",
},
drawtype = "glasslike_framed",
place_param2 = 0,
paramtype = "light",
paramtype... |
local CorePackages = game:GetService("CorePackages")
local CoreGui = game:GetService("CoreGui")
local Roact = require(CorePackages.Roact)
local RoactRodux = require(CorePackages.RoactRodux)
local t = require(CorePackages.Packages.t)
local UIBlox = require(CorePackages.UIBlox)
local InteractiveAlert = UIBlox.App.Dialo... |
LinkLuaModifier("modifier_hide_healthbar_when_damaged", "modifier_scripts/modifier_hide_healthbar_when_damaged.lua", LUA_MODIFIER_MOTION_NONE)
modifier_hide_healthbar_when_damaged = class({})
function modifier_hide_healthbar_when_damaged:CheckState()
if not IsServer() then return end
local state = { [MODIFIER... |
---- Nano Guard v1.0.0
-- Check Password
function checkPassword()
term.setCursorPos(1,2)
textutils.slowPrint("Password:")
print(">")
term.setCursorPos(3,3)
term.setTextColor(colors.gray)
local input = read("#")
term.setTextColor(colors.white)
if input == "Lifeline" then
return true
... |
#!/usr/bin/env tarantool
local fio = require('fio')
package.path = fio.abspath(debug.getinfo(1).source:match("@?(.*/)")
:gsub('/./', '/'):gsub('/+$', '')) .. '/../../?.lua' .. ';' .. package.path
local tap = require('tap')
local yaml = require('yaml')
local json = require('json')
local http = require('http.clien... |
----- INI-FILE -----
--------------------
VBU3 = {}
VBU3.name = "VBU3"
VBU3.Vane = "RTSI"
VBU3.enabled = false
VBU3.market = false
VBU3.brake=0.3
VBU3.trade_volume=2
VBU3.stop_steps=15
VBU3.maxloss=100
--------------------
SRU3 = {}
SRU3.name = "SRU3"
SRU3.Vane = "RTSI"
SRU3.enabled = false
SRU3.market = false
SRU3.bra... |
ys = ys or {}
slot1 = ys.Battle.BattleDataFunction
slot2 = class("BattleSkillFireSupport", ys.Battle.BattleSkillEffect)
ys.Battle.BattleSkillFireSupport = slot2
slot2.__name = "BattleSkillFireSupport"
slot2.Ctor = function (slot0, slot1)
slot0.super.Ctor(slot0, slot1, lv)
slot0._weaponID = slot0._tempData.arg_list.... |
--*****************************************************************************
--* _______ __
--* |_ _| |--.----.---.-.--.--.--.-----.-----.
--* | | | | _| _ | | | | |__ --|
--* |___| |__|__|__| |___._|________|__|__|_____|
--* ______
--* | __ \.-----.--.--.-----.-----.-----.-... |
AntibodiesShared = {}
AntibodiesShared.__index = AntibodiesShared
-----------------------------------------------------
--CONST----------------------------------------------
-----------------------------------------------------
AntibodiesShared.version = "1.142"
AntibodiesShared.author = "lonegamedev.com"
AntibodiesS... |
--[[
author: Aussiemon
-----
Copyright 2019 Aussiemon
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, mer... |
object_intangible_pet_nerf_hue = object_intangible_pet_shared_nerf_hue:new {
}
ObjectTemplates:addTemplate(object_intangible_pet_nerf_hue, "object/intangible/pet/nerf_hue.iff")
|
local Com = require "meiru.com.com"
local Cookie = require "meiru.util.cookie"
----------------------------------------------
--ComCookie
----------------------------------------------
local ComCookie = class("ComCookie", Com)
function ComCookie:ctor()
end
function ComCookie:match(req, res)
if not req.cookies then
... |
--[[
Carbon for Lua
#class Logging
#description {
Provides logging facilities.
}
]]
local Carbon = (...)
local Graphene = Carbon:GetGraphene()
local out = io.stdout
local eol = "\n"
if (Carbon.Support.windows) then
eol = "\r\n"
end
--[[
#property public @unumber ReportingLevel {
The level of messages to ... |
--[[
__ __ _______ __ __ __ __ ________
/ \ / / / _____/ \ \ / / \ \ \ \ \ _____\
/ /\ \ / / / /____ \ \/ / \ \ \ \ \ \_____
/ / \ \ / / / _____/ / /\ \ \ \ \ \ \_____ \
/ / \ \/ / / /____ / / \ \ \ \__\ \ ____\ \
/_/ \__/ /______/ /... |
-- This software is copyright Kong Inc. and its licensors.
-- Use of the software is subject to the agreement between your organization
-- and Kong Inc. If there is no such agreement, use is governed by and
-- subject to the terms of the Kong Master Software License Agreement found
-- at https://konghq.com/enterpriseso... |
local M = { }
M.main = function()
return "m2"
end
return M
|
return function(...)
dofile("shell/cat.lua")(unpack(arg)) -- later when user interaction (hitting space) is available this code changes
end
|
--Copyright 2019 Control4 Corporation. All rights reserved.
--MERGE
function OnDriverInit ()
PASSTHROUGH_PROXY = 5001 -- set this to the proxy ID that should handle all passthrough commands from minidrivers
SWITCHER_PROXY = 5999 -- set this to the proxy ID of the SET_INPUT capable device that has the RF_MINI... |
local L = Tetromino:extend()
function L:new(x, y)
L.super.new(self)
self.block_one = Block(x, y)
self.block_two = Block(x + block_size, y)
self.block_three = Block(x + (block_size * 2), y)
self.block_four = Block(x, y + block_size)
end
function L:up()
local success = L:rotateClockwise(L.block_two, L.block_one,... |
name = ""
description = ""
author = ""
version = ""
forumthread = ""
api_version = 10
dst_compatible = true
dont_starve_compatible = false
reign_of_giants_compatible = false
all_clients_require_mod = true
icon_atlas = "<NAME>.xml"
icon = "<NAME>_modicon.tex"
server_filter_tags =
{
"character",
}
configuration... |
local path = ({reaper.get_action_context()})[2]:match('^.+[\\//]')
package.path = package.path .. ';' .. path .. '?.lua'
package.path = package.path .. ';' .. path .. 'ReaWrap/models/?.lua'
require('ReaWrap.models')
|
object_tangible_loot_mustafar_trophey_blistmok_skin = object_tangible_loot_mustafar_shared_trophey_blistmok_skin:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_mustafar_trophey_blistmok_skin, "object/tangible/loot/mustafar/trophey_blistmok_skin.iff")
|
--
-- Created by IntelliJ IDEA.
-- User: ouyanyu
-- Date: 2016-04-14
-- Time: 17:58
-- To change this template use File | Settings | File Templates.
--
local lor = require("lor.index")
local dict_model = require("app.model.dict")
local dict_router = lor:Router()
local function save_new(arr,parent_value)
... |
-- _.flattenDeep.lua
--
-- Recursively flattens a nested array.
-- @usage _.print(_.flattenDeep({1, 2, {3, 4, {5, 6}}}))
-- --> {1, 2, 3, 4, 5, 6}
--
-- @param array The array to flatten.
-- @return Returns the new flattened array.
_.flattenDeep = function (array)
return _.flatten(array, true)
end
|
ys = ys or {}
ys.Battle.BattleBuffDeath = class("BattleBuffDeath", ys.Battle.BattleBuffEffect)
ys.Battle.BattleBuffDeath.__name = "BattleBuffDeath"
ys.Battle.BattleBuffDeath.Ctor = function (slot0, slot1)
slot0.super.Ctor(slot0, slot1)
end
ys.Battle.BattleBuffDeath.SetArgs = function (slot0, slot1, slot2)
if slot0.... |
function nested_loops(n)
local x = 0;
local a = 0
while a<n do
local b = 0
while b<n do
local c = 0
while c<n do
local d = 0
while d<n do
local e = 0
while e<n do
local f = 0
while f<n do
x = x + 1
f = f + 1
end
e = e + 1
end
... |
---------------------------------------------------------------------------------
--
-- @type TransformProxy
--
---------------------------------------------------------------------------------
local TransformProxy = Class( "TransformProxy" )
function TransformProxy:init()
self.proxy = MOAITransform.new()
end
----... |
num_enemies = 1
boss_fight = false
experience=310
gold=150
function start()
addEnemy("Efreet", 40, 100)
end
function get_speech()
return nil
end
function get_item()
if (randint(2) == 0) then
return ITEM_ELIXIR
else
return -1
end
end
|
-- Script pour la gestion de l'émetteur IR à 38kHz (LED, infrared, infrarouge)
-- permet l'envoi d'un code (4bits seulement) avec le protocole zIR, protocole de mon invention ;-)
-- exprès pas standard afin de ne pas être parasité par les autres sources IR !
-- ATTENTION, on utilise ici l'astuce du gpio.serout pour fai... |
local tag = "AFK"
afk = afk or {}
afk.AFKTime = CreateConVar("sv_afktimeout", "120", {FCVAR_ARCHIVE, FCVAR_REPLICATED, FCVAR_NOTIFY}, "Tempo pra ativar a HUD AFK de um jogador..")
local PLAYER = FindMetaTable("Player")
function PLAYER:IsAFK()
return GAMEMODE.Player:GetSharedGameVar(self, "afk", false) or self:GetNWB... |
name = "Redfriday"
version = 1
me = { like = "football", gender = "male", single = "true" }
function add(a,b)
return a+b, true
end
|
-- This software is released under the MIT License. See LICENSE.txt for details.
--T-Bone Class version 0.2
local class = {}
class.__index=class
class._bobbyTables={}
function class:init() end
function class:_init() self:init() end
function class:newInstance()
local o = {}
setmetatable(o,self)
if self._bobbyTable... |
---
-- @class PANEL
-- @section DColoredTextBoxTTT2
local PANEL = {}
---
-- @ignore
function PANEL:Init()
self:SetText("")
self.contents = {
title = "",
title_font = "DermaTTT2Text",
opacity = 1.0,
align = TEXT_ALIGN_CENTER,
color = COLOR_WHITE,
flashcolor = false,
icon = nil,
parent = nil,
shift... |
local mqttRegex = require "mqttRegex"
local Router = {}
Router.__index = Router
setmetatable(Router, {
__call = function (cls, ...)
return cls.new(...)
end,
})
function Router.new()
local self = setmetatable({}, Router)
self.listeners = {}
return self
end
function Router:emit(topic, data)
for patt... |
local gloveboxData = nil
RegisterNetEvent("InitInventaire:openGloveboxInventory")
AddEventHandler(
"InitInventaire:openGloveboxInventory",
function(data, blackMoney, inventory, weapons)
setGloveboxInventoryData(data, blackMoney, inventory, weapons)
openGloveboxInventory()
end
)
RegisterNet... |
-- This is a profile_sharing policy.
local policy = require('apicast.policy')
local _M = policy.new('profile_sharing')
local setmetatable = setmetatable
local concat = table.concat
local insert = table.insert
local len = string.len
local format = string.format
local pairs = pairs
local sub = string.sub
local ts = re... |
local CELL_SIZE = 60
local SpatialHash = class {
init = function(self, size)
self.elements = {}
self.size = size or CELL_SIZE
end,
add = function(self, obj)
local x = Math.ceil(obj.x / self.size) * self.size
local y = Math.ceil(obj.y / self.size) * self.size
local key = x .. ',' .. y
if not self.eleme... |
local premio = {
[1] = {item = 2160, count = 30},
}
local configs = {
hours = 1, -- quantas em quantas horas, vai acontecer.
winners = 3 -- qntos players podem ganhar.
}
function onThink(interval, lastExecution)
local p = getPlayersOnline()
local winners = configs.winners
if #p < winners then
winners... |
local setmetatable = setmetatable
local io = io
local ipairs = ipairs
local loadstring = loadstring
local print = print
local tonumber = tonumber
local beautiful = require( "beautiful" )
local button = require( "awful.button" )
local widget2 = require( "aw... |
-- Define global variables.
state.var {
Name = state.value(),
My_map = state.map()
}
-- Initialize a name in this contract.
function constructor()
-- a constructor is called at a deployment, only one times
-- set initial name
Name:set("world")
My_map["key"] = "value"
end
-- Update a name... |
local M = {}
M.make_result_table = function(current, latest, line_number)
return {
current = current,
latest = latest,
line_number = line_number,
}
end
return M
|
local lamda = {}
function lamda.flip(fn)
return function(a, b, ...)
return fn(b, a, ...)
end
end
function lamda.append(elem, tbl)
local copy = {table.unpack(tbl)}
table.insert(copy, elem)
return copy
end
function lamda.reduce(fn, acc, tbl)
return #tbl == 0 and acc or lamda.reduce(fn, fn(acc, tbl[1]... |
object_mobile_tcg_familiar_hutt_fighter = object_mobile_shared_tcg_familiar_hutt_fighter:new {
}
ObjectTemplates:addTemplate(object_mobile_tcg_familiar_hutt_fighter, "object/mobile/tcg_familiar_hutt_fighter.iff")
|
local core = require 'core.reference'
local files = require 'files'
local function catch_target(script)
local list = {}
local cur = 1
while true do
local start, finish = script:find('<[!?].-[!?]>', cur)
if not start then
break
end
list[#list+1] = { start + 2, fi... |
return {'email','emailleeroven','emaillen','emailleren','emanatie','emancipatie','emancipatiebeleid','emancipatiebeweging','emancipatiegolf','emancipatieproces','emancipatieraad','emancipatiestrijd','emancipatiezaken','emancipatoir','emancipator','emancipatorisch','emanciperen','emaneren','emancipatiegedachte','emancip... |
#!/usr/bin/env lua5.3
-- Forth style reverse polish calculator impletation in lua
function string:split(delimiter)
local sep, fields = delimiter or " ", {}
local pattern = string.format("([^%s]+)", sep)
self:gsub(pattern, function(c) fields[#fields+1] = c end)
return fields
end
local function calc(stack, ele... |
ESX = ESX
if Config.UseOldESX then
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj)
ESX = obj
end)
end
RegisterNetEvent('mb_blackout:triggerblackout')
AddEventHandler('mb_blackout:triggerblackout', function()
BlackoutOn()
Wait(Config.BlackoutDuration *1000)
BlackoutOff()
end... |
local ltml = require("ltml")
local utils = require("ltml.utils")
local files = {...}
for _, v in pairs(files) do
local template = utils.readAll(v..".ltml.lua")
local htmlTree = ltml.execute(template)
local htmlSource = ltml.render(htmlTree)
utils.writeAll(v..".html", htmlSource)
end |
local ns, queue, id, message, timestamp = ARGV[1], ARGV[2], ARGV[3], ARGV[4], ARGV[5]
redis.call('SADD', ns..':queues', queue)
redis.call('HSET', ns..':'..queue..':messages', id, message)
redis.call('SREM', ns..':'..queue..':queued_ids', id)
redis.call('LREM', ns..':'..queue..':queue', 1, id)
local joined = queue..'... |
-- unit-test.lua
-- Helper functions for doing unit tests.
require "table-helpers"
unit_test = unit_test or {}
function get_printable(val)
if val == nil then
return "nil"
end
if type(val) == "boolean" then
if val then
return "true"
else
return "false"
end
en... |
-- CONFIGURATION:
-- tweak these variables however you like.
-- let me know if you need any more.
lmn = lmn or {}
lmn.config = {
-- whether or not you should start with the perk
spawn_perk_at_new_game = false,
-- whether or not the perk should add the vanilla leg attack
enable_leg_attacks = false,
-- not s... |
g_Settings = {}
addEventHandler("onClientResourceStart", resourceRoot,
function ()
triggerServerEvent("onClientResourceStart", localPlayer)
end,
false)
addEvent("ipb.syncSettings", true)
addEventHandler("ipb.syncSettings", localPlayer,
function (settings)
g_Settings = settings
end,
fa... |
local cutorch = require "cutorch"
local cunn = require "cunn"
local nn = require "nn"
local nngraph = require "nngraph"
local argparse = require "argparse"
-- get command line arguments
local parser = argparse()
parser:flag("--gates", "whether to concatenate the gate for input to the model")
parser:option("--test", "w... |
-- utility for lua 5.2
local setfenv = setfenv or
function(fn, env)
local i = 1
while true do
local name = debug.getupvalue(fn, i)
if name == "_ENV" then
debug.upvaluejoin(fn, i, (function()
return env
... |
Locales['es'] = {
['press_collect_coke'] = 'Presiona ~INPUT_CONTEXT~ para cosechar la Coca',
['press_process_coke'] = 'Presiona ~INPUT_CONTEXT~ para tratar la Coca',
['press_sell_coke'] = 'Presiona ~INPUT_CONTEXT~ para vender la Coca',
['press_collect_meth'] = 'Presiona ~INPUT_CONTEXT~ para recoger ing... |
Locales['es'] = {
-- Errores
['ERROR'] = "Ocurrio un error, vuelve a intentarlo. Si esto vuelve a ocurrir contacta con un administrador.",
['NOT_ENOUGH_MONEY'] = "~r~No~w~ tienes suficiente dinero.",
['PLAYER_IN_VEHICLE'] = "No puedes hacer abrir este menu en un vehiculo.",
['NOT_OWNED_VEHICLES'] = ... |
local Font_raceMessageText = {}
Font_raceMessageText.font = "Mister Belvedere"
Font_raceMessageText.size = ScreenScale(40)
Font_raceMessageText.weight = 400
Font_raceMessageText.blursize = 0
Font_raceMessageText.scanlines = 0
Font_raceMessageText.antialias = true
Font_raceMessageText.additive = false
Font_raceMessageTe... |
-- create our global container object
local shippingCo = {
configConstants = {
MAX_ITEMS_PER_ORDER = 3,
SCALE_FACTOR = 0.2,
SHIPPING_CO_STARTING_LEVEL = 1
},
objectiveItems = {
"factory-shipping-package",
"oil-shipping-package",
"rail-shipping-package",
... |
part_type{
name1 : int,
whatsup : int32,
test_bool : bool,
interactions : uint32,
}
sym_pairwise_kernel test_kernel(part1, part2, r2)
part1.interactions = part1.interactions + 1
part2.interactions = part2.interactions + 1
local x = 3 + 2
end
kernel name_kernel( part1, config)
if part1.core_part_spac... |
local conf_login = {}
conf_login.c2s = [[
.package {
type 0 : integer
session 1 : integer
}
handshake 1 {
request {
ckey 0 : string
openid 1 : string
}
response {
skey 0 : string
challenge 1 : string
}
}
auth 2 {
request {
hchallenge 0 : string
etoken ... |
local test = {}
local stream = require 'stream'
function test.new()
local x = 0
local function tail()
x = x + 1
return stream.new(x, tail)
end
local s0 = stream.new(x, tail)
local s1 = s0.tail
local s2 = s1.tail
assert(s0.head == 0)
assert(s1.head == 1)
assert(s2.head == 2)
assert(s2 == s0.tail.tail)
end... |
return LoadActor( THEME:GetPathS("", "_prompt") ) .. {
StartTransitioningCommand=cmd(play);
};
|
-------------------------------------------------------------------------------
--
-- tek.ui.class.handle
-- Written by Timm S. Mueller <tmueller at schulze-mueller.de>
-- See copyright notice in COPYRIGHT
--
-- OVERVIEW::
-- [[#ClassOverview]] :
-- [[#tek.class : Class]] /
-- [[#tek.class.object : Object]] /
-- [[... |
module("resty.sha", package.seeall)
_VERSION = '0.06'
local ffi = require "ffi"
ffi.cdef[[
typedef unsigned long SHA_LONG;
typedef unsigned long long SHA_LONG64;
enum {
SHA_LBLOCK = 16
};
]];
|
#!/Scr/scr-test-steven/local/bin/lua
-----------------------------------------
---- Tidy Up the NAMD run directory ----
-----------------------------------------
---- Author: Yuhang Wang ----------------
----
---- Date: 06/12/2015 -------------------
----
---- Update:
---- 06/16/2015 ~ clean up & redesign
----
---... |
include("shared.lua");
AddCSLuaFile("cl_init.lua");
AddCSLuaFile("shared.lua");
-- Called when the entity initializes.
function ENT:Initialize()
self:SetModel("models/props_junk/rock001a.mdl") ;
self:PhysicsInit(SOLID_VPHYSICS);
self:SetMoveType(MOVETYPE_VPHYSICS);
self:SetSolid(SOLID_VPHYSICS);
self:SetMaterial... |
local cobras = {
createObject (8397, 2986.353515625, 2110.4641113281, -24.1),
createObject ( 4242, 1657.09998, -4614.7998, -6.7 ),
createObject ( 896, 1555.1, -4426.7002, -74.1, 4.23, 252.488, 62.331 ),
createObject ( 4242, 3312.188, 2075.0918, 1.90003, 0, 0, 94 ),
createObject ( 4242, 3312.188, 2075.0918, -6.89998, 0,... |
local state = {}
state._NAME = ...
require'hcm'
local vector = require'vector'
local util = require'util'
local movearm = require'movearm'
local libArmPlan = require 'libArmPlan'
local arm_planner = libArmPlan.new_planner()
local stage
local plan_valid = true
function check_override()
local override = hcm.get_s... |
Image = {}
function Image.create(properties)
if type(properties) ~= "table" then
properties = {}
end
local widget = Widget.create(properties)
widget.texture = properties.texture
function widget:draw()
if self.texture then
Drawing.image(self.x, self.y, self.width, self.height, self.texture)
end
end
ret... |
function test.index_name()
for _, k in ipairs(df.units_other_id) do
expect.eq(df.global.world.units.other[k]._kind, 'container')
end
end
function test.index_name_bad()
expect.error_match('not found.$', function()
expect.eq(df.global.world.units.other.SOME_FAKE_NAME, 'container')
end)
en... |
remote = require 'net.box'
fiber = require 'fiber'
test_run = require('test_run').new()
test_run:cmd("push filter ".."'\\.lua.*:[0-9]+: ' to '.lua...\"]:<line>: '")
test_run:cmd("setopt delimiter ';'")
function x_select(cn, space_id, index_id, iterator, offset, limit, key, opts)
local ret = cn:_request(remote._met... |
local preview = {}
-- whether to fade out the default background
preview.hide_background = false
function preview:init(mod, button, menu)
-- code here gets called when the mods are loaded
self.particles = {}
self.particle_timer = 0
button.color = {1, 1, 0.7}
self.menu = menu
end
function previe... |
--------------------------------------------------------------------------------
-- Module Declaration
--
local mod, CL = BigWigs:NewBoss("Fetid Devourer", 1861, 2146)
if not mod then return end
mod:RegisterEnableMob(133298)
mod.engageId = 2128
mod.respawnTime = 31
---------------------------------------------------... |
-- Wifi
-- Notify on wifi changes
-----------------------------------------------
local m = {}
local alert = require('hs.alert').show
local wifi = require('hs.wifi')
-- keep track of the previously connected network
local lastNetwork = wifi.currentNetwork()
-- Open Hotspot Dashboard once connected to WiFi network a... |
local M = {}
function M.attach_node()
local dap = require 'dap'
print 'attaching'
dap.run {
type = 'node2',
request = 'attach',
cwd = vim.fn.getcwd(),
sourceMaps = true,
protocol = 'inspector',
skipFiles = { '<node_internals>/**/*.js' },
}
end
return M
|
local ArrayT = require('restructure.Array')
local NumberT = require('restructure.Number').Number
local utils = require('restructure.utils')
local LazyArray = {}
LazyArray.__index = LazyArray
local LazyArrayT = {}
LazyArrayT.__index = LazyArrayT
setmetatable(LazyArrayT, ArrayT)
function LazyArrayT.new(...)
local a ... |
--[[
# ClassModel Class
refs: http://lua-users.org/wiki/ObjectOrientationTutorial
author: Alysson Bruno <alyssonbruno@gmail.com>
This model of class for lua is make with function. One class can be a Child.
]]
MAKE_CLASS = function(dad, child)
local this = {
self={},
public={ Class=child},
instan... |
--utility.lua
local otime = os.time
local odate = os.date
local log_err = logger.err
local tunpack = table.unpack
local dsethook = debug.sethook
local dtraceback = debug.traceback
local ssplit = string_ext.split
local KernCode = enum("KernCode")
local PeriodTime = enu... |
object_static_structure_dathomir_decal_smear_03 = object_static_structure_dathomir_shared_decal_smear_03:new {
}
ObjectTemplates:addTemplate(object_static_structure_dathomir_decal_smear_03, "object/static/structure/dathomir/decal_smear_03.iff")
|
-- 原作:ShestakUI 的一个通告组件
-- 原作者:Shestak (http://www.wowinterface.com/downloads/info19033-ShestakUI.html)
-- 修改:houshuu
-------------------
-- 主要修改条目:
-- 模块化
-- 职业染色
-- 修改函数判定参数
-- 修正宠物打断不通告问题
-- 添加嘲讽模块
-- 增减了部分光环通告
-- 汉化使其更加适合中文语法
-- 频道检测更加多样化
-- 添加了一些可设置项
local E, L, V, P, G = unpack(ElvUI)
local WT = E:GetModule("Win... |
local SceneTemplate = {}
-- this kills performance, but is good for lining things up
local RELOAD = true
-- called when this loads
function SceneTemplate:load()
end
-- called when some othe rscene is chosen
function SceneTemplate:unload()
end
-- called to update logic
function SceneTemplate:update(dt, totaltime)
en... |
local float = class()
function float:new(e, body, float_acceleration)
self.body = body
self.e = e
self.in_water = nil
self.old_acc = self.body.acc:copy()
self.float_acceleration = float_acceleration
self.splash_limit = timer(0.1)
end
function float:update(dt)
self.splash_limit:update(dt)
if self.in_water ~= s... |
--[[
Copyright (C) 2014 HarpyWar (harpywar@gmail.com)
This file is a part of the PvPGN Project http://pvpgn.pro
Licensed under the same terms as Lua itself.
]]--
-- Config table can be extended here with your own variables
-- values are preloaded from bnetd.conf
config = {
-- Path to "var" directory (with slash... |
--[[
@author Sebastian "CrosRoad95" Jura <sebajura1234@gmail.com>
@copyright 2011-2021 Sebastian Jura <sebajura1234@gmail.com>
@license MIT
]]--
addEventHandler("onMarkerHit", resourceRoot, function(el,md)
if getElementType(el)~="player" or not md then return end
if getElementInterior(el)~=getElementInterior(source)... |
local gui = require("__flib__.gui")
local table = require("__flib__.table")
local constants = require("constants")
local formatter = require("scripts.formatter")
local recipe_book = require("scripts.recipe-book")
local shared = require("scripts.shared")
local util = require("scripts.util")
local components = {
lis... |
---------------------------------------------
-- Regeneration
--
-- Description: Adds a Regen tpz.effect.
-- Type: Enhancing
-- Utsusemi/Blink absorb: N/A
-- Range: Self
---------------------------------------------
require("scripts/globals/monstertpmoves")
require("scripts/globals/settings")
require("scripts/globals/s... |
object_mobile_dressed_myyydril_treesh = object_mobile_shared_dressed_myyydril_treesh:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_myyydril_treesh, "object/mobile/dressed_myyydril_treesh.iff")
|
slot0 = class("PlayerResChangeCommand", pm.SimpleCommand)
slot0.execute = function (slot0, slot1)
slot3 = slot1:getBody().oldPlayer
slot4 = slot1.getBody().newPlayer
slot5 = false
for slot10 = #pg.player_resource.all, 11, -1 do
if slot3:getResource(slot11) ~= slot4:getResource(slot6[slot10]) then
slot5 = tru... |
local class = require('middleclass')
local Controller = require('mvc.Controller')
local HasSignals = require('HasSignals')
local ApplyController = class("ApplyController", Controller):include(HasSignals)
local tools = require('app.helpers.tools')
function ApplyController:initialize(desk)
Controller.initialize(... |
--[=[
@class RxLinkUtility
]=]
local Brio = require(script.Parent.Brio)
local Janitor = require(script.Parent.Parent.Parent.Parent.Janitor)
local Observable = require(script.Parent.Observable)
local Rx = require(script.Parent.Rx)
local RxBrioUtility = require(script.Parent.RxBrioUtility)
local RxInstanceUtility = req... |
local function dual_delayer_get_input_rules(node)
local rules = {{x=1, y=0, z=0}}
for _ = 0, node.param2 do
rules = mesecon.rotate_rules_left(rules)
end
return rules
end
local function dual_delayer_get_output_rules(node)
local rules = {{x=0, y=0, z=1}, {x=0, y=0, z=-1}}
for _ = 0, node.param2 do
rules = mese... |
---------------------------
-- Default awesome theme --
---------------------------
theme = {}
theme.font = "Droid Serif 11"
theme.bg_normal = "#222222"
theme.bg_focus = "#535d6c"
theme.bg_urgent = "#ff0000"
theme.bg_minimize = "#444444"
theme.fg_normal = "#aaaaaa"
theme.fg... |
package.cpath = package.cpath ..";G:/program/lua/lua_mysql_catch/?.dll";
package.path = package.path..";G:/tool/Lua/5.1/lua/?.lua";
require("luasql.mysql");
local socket = require("socket");
rs_tip = {"select:", "insert:", "delete:", "update:"};
cfg = {dbname="phone_monster",dbuser="root", dbpwd="zuzhang202", dbip="1... |
-- サイズを持ったQueue
-- Queueのwrapperだけど、それぞれ適切な名前があるやも・・・
Array = {}
Array.new = function(size)
if size == nil or size <= 0 then
return
end
local this = {}
this.maxSize = size
this.list = Queue.new()
-- リストのサイズ
this.size = function(self)
return self.list:size()
end
-- すでに満杯以上か?
this.isOver = ... |
-- [[
-- Created on 2022-01-04
-- Marcus Grant (https://github.com/marcus-grant)
-- GPLv3
--
-- Appearance based configs, should be loaded fairly early
-- ]]
-- print('Module Loaded: Appearance')
-- Setup color scheme plugins
-- require('newpaper').setup()
-- Default to gruvbox (for now)
-- vim.o.background = 'dark'... |
local MOUDLE_COMMENT_NAME = "// 内置触摸按键参数配置 //"
local comment_begin = cfg:i32("lp touch key注释开始", 0);
local lp_touch_comment_begin_htext = module_output_comment(comment_begin, MOUDLE_COMMENT_NAME);
local TOUCH_KEY_SENSITY_TABLE = cfg:enumMap("触摸按键电容检测... |
----------------------------------------------------------------------------------------------------------------------------------------
-- create polls for players to vote on
-- by MewMew -- with some help from RedLabel, Klonan, Morcup, BrainClot
---------------------------------------... |
local request = require 'http.functional.request'
local writer = require 'http.functional.response'
local describe, it, assert = describe, it, assert
local function test_cases(app)
assert.not_nil(app)
it('responds with absolute url for user', function()
local paths = {'/en/user/123', '/de/user/234'}
for _, path... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.