content stringlengths 5 1.05M |
|---|
local vlua = require("vlua.vlua")
local Binder = require("vlua.binder")
local HookIds = Binder.HookIds
local Generic = {}
Generic.install = function()
end
return Generic
|
ITEM.name = "Pulse-Rifle"
ITEM.description = "A dark energy powered assault rifle."
ITEM.model = "models/weapons/w_irifle.mdl"
ITEM.class = "weapon_ar2"
ITEM.weaponCategory = "primary"
ITEM.classes = {CLASS_EOW}
ITEM.width = 4
ITEM.height = 2
ITEM.iconCam = {
ang = Angle(-0.70499622821808, 268.25439453125, 0),
fov = 12.085652091515,
pos = Vector(0, 200, 0)
} |
util = {}
do
local serialize_any, serialize_table
serialize_table = function( val, bck )
if bck[val] then
return "nil"
end
bck[val] = true
local entries = {}
for k, v in pairs( val ) do
entries[#entries + 1] = string.format( "[%s] = %s", serialize_any( k, bck ), serialize_any( v, bck ) )
end
return string.format( "{%s}", table.concat( entries, "," ) )
end
serialize_any = function( val, bck )
local vtype = type( val )
if vtype == "table" then
return serialize_table( val, bck )
elseif vtype == "string" then
return string.format( "%q", val )
elseif vtype == "function" or vtype == "userdata" then
return string.format( "nil --[[%s]]", tostring( val ) )
else
return tostring( val )
end
end
function util.serialize( ... )
local result = {}
for i = 1, select( "#", ... ) do
result[i] = serialize_any( select( i, ... ), {} )
end
return table.concat( result, "," )
end
end
function util.unserialize( dt )
local fn = loadstring( "return " .. dt )
if fn then
setfenv( fn, {} )
return fn()
end
end
do
local function serialize_any( val, bck )
local vtype = type( val )
if vtype == "table" then
if bck[val] then
return "{}"
end
bck[val] = true
local len = 0
for k, v in pairs( val ) do
len = len + 1
end
local rt = {}
if len == #val then
for i = 1, #val do
rt[i] = serialize_any( val[i], bck )
end
return string.format( "[%s]", table.concat( rt, "," ) )
else
for k, v in pairs( val ) do
if type( k ) == "string" or type( k ) == "number" then
rt[#rt + 1] = string.format( "%s: %s", serialize_any( k, bck ), serialize_any( v, bck ) )
end
end
return string.format( "{%s}", table.concat( rt, "," ) )
end
elseif vtype == "string" then
return string.format( "%q", val )
elseif vtype == "function" or vtype == "userdata" or vtype == "nil" then
return "null"
else
return tostring( val )
end
end
function util.serializeJSON( val )
return serialize_any( val, {} )
end
end
function util.shared_buffer( name, max )
max = max or 64
return {
_pos_name = name .. ".position",
_list_name = name .. ".list.",
push = function( self, text )
local cpos = GetInt( self._pos_name )
SetString( self._list_name .. (cpos % max), text )
SetInt( self._pos_name, cpos + 1 )
end,
len = function( self )
return math.min( GetInt( self._pos_name ), max )
end,
pos = function( self )
return GetInt( self._pos_name )
end,
get = function( self, index )
local pos = GetInt( self._pos_name )
local len = math.min( pos, max )
if index >= len then
return
end
return GetString( self._list_name .. (pos + index - len) % max )
end,
get_g = function( self, index )
return GetString( self._list_name .. (index % max) )
end,
clear = function( self )
SetInt( self._pos_name, 0 )
ClearKey( self._list_name:sub( 1, -2 ) )
end,
}
end
function util.shared_channel( name, max, local_realm )
max = max or 64
local channel = {
_buffer = util.shared_buffer( name, max ),
_offset = 0,
_hooks = {},
_ready_count = 0,
_ready = {},
broadcast = function( self, ... )
return self:send( "", ... )
end,
send = function( self, realm, ... )
self._buffer:push( string.format( ",%s,;%s",
(type( realm ) == "table" and table.concat( realm, "," ) or tostring( realm )),
util.serialize( ... ) ) )
end,
listen = function( self, callback )
if self._ready[callback] ~= nil then
return
end
self._hooks[#self._hooks + 1] = callback
self:ready( callback )
return callback
end,
unlisten = function( self, callback )
self:unready( callback )
self._ready[callback] = nil
for i = 1, #self._hooks do
if self._hooks[i] == callback then
table.remove( self._hooks, i )
return true
end
end
end,
ready = function( self, callback )
if not self._ready[callback] then
self._ready_count = self._ready_count + 1
self._ready[callback] = true
end
end,
unready = function( self, callback )
if self._ready[callback] then
self._ready_count = self._ready_count - 1
self._ready[callback] = false
end
end,
}
local_realm = "," .. (local_realm or "unknown") .. ","
local function receive( ... )
for i = 1, #channel._hooks do
local f = channel._hooks[i]
if channel._ready[f] then
f( channel, ... )
end
end
end
hook.add( "base.tick", name, function( dt )
if channel._ready_count > 0 then
local last_pos = channel._buffer:pos()
if last_pos > channel._offset then
for i = math.max( channel._offset, last_pos - max ), last_pos - 1 do
local message = channel._buffer:get_g( i )
local start = message:find( ";", 1, true )
local realms = message:sub( 1, start - 1 )
if realms == ",," or realms:find( local_realm, 1, true ) then
receive( util.unserialize( message:sub( start + 1 ) ) )
if channel._ready_count <= 0 then
channel._offset = i + 1
return
end
end
end
channel._offset = last_pos
end
end
end )
return channel
end
function util.async_channel( channel )
local listener = {
_channel = channel,
_waiter = nil,
read = function( self )
self._waiter = coroutine.running()
if not self._waiter then
error( "async_channel:read() can only be used in a coroutine" )
end
self._channel:ready( self._handler )
return coroutine.yield()
end,
close = function( self )
if self._handler then
self._channel:unlisten( self._handler )
end
end,
}
listener._handler = listener._channel:listen( function( _, ... )
if listener._waiter then
local co = listener._waiter
listener._waiter = nil
listener._channel:unready( listener._handler )
return coroutine.resume( co, ... )
end
end )
listener._channel:unready( listener._handler )
return listener
end
do
local gets, sets = {}, {}
function util.register_unserializer( type, callback )
gets[type] = function( key )
return callback( GetString( key ) )
end
end
hook.add( "api.newmeta", "api.createunserializer", function( name, meta )
gets[name] = function( key )
return setmetatable( {}, meta ):__unserialize( GetString( key ) )
end
sets[name] = function( key, value )
return SetString( key, meta.__serialize( value ) )
end
end )
function util.shared_table( name, base )
return setmetatable( base or {}, {
__index = function( self, k )
local key = tostring( k )
local vtype = GetString( string.format( "%s.%s.type", name, key ) )
if vtype == "" then
return
end
return gets[vtype]( string.format( "%s.%s.val", name, key ) )
end,
__newindex = function( self, k, v )
local vtype = type( v )
local handler = sets[vtype]
if not handler then
return
end
local key = tostring( k )
if vtype == "table" then
local meta = getmetatable( v )
if meta and meta.__serialize and meta.__type then
vtype = meta.__type
v = meta.__serialize( v )
handler = sets.string
end
end
SetString( string.format( "%s.%s.type", name, key ), vtype )
handler( string.format( "%s.%s.val", name, key ), v )
end,
} )
end
function util.structured_table( name, base )
local function generate( base )
local root = {}
local keys = {}
for k, v in pairs( base ) do
local key = name .. "." .. tostring( k )
if type( v ) == "table" then
root[k] = util.structured_table( key, v )
elseif type( v ) == "string" then
keys[k] = { type = v, key = key }
else
root[k] = v
end
end
return setmetatable( root, {
__index = function( self, k )
local entry = keys[k]
if entry and gets[entry.type] then
return gets[entry.type]( entry.key )
end
end,
__newindex = function( self, k, v )
local entry = keys[k]
if entry and sets[entry.type] then
return sets[entry.type]( entry.key, v )
end
end,
} )
end
if type( base ) == "table" then
return generate( base )
end
return generate
end
gets.number = GetFloat
gets.integer = GetInt
gets.boolean = GetBool
gets.string = GetString
gets.table = util.shared_table
sets.number = SetFloat
sets.integer = SetInt
sets.boolean = SetBool
sets.string = SetString
sets.table = function( key, val )
local tab = util.shared_table( key )
for k, v in pairs( val ) do
tab[k] = v
end
end
end
function util.current_line( level )
level = (level or 0) + 3
local _, line = pcall( error, "-", level )
if line == "-" then
_, line = pcall( error, "-", level + 1 )
if line == "-" then
return
end
line = "[C]:?"
else
line = line:sub( 1, -4 )
end
return line
end
function util.stacktrace( start )
start = (start or 0) + 3
local stack, last = {}, nil
for i = start, 32 do
local _, line = pcall( error, "-", i )
if line == "-" then
if last == "-" then
break
end
else
if last == "-" then
stack[#stack + 1] = "[C]:?"
end
stack[#stack + 1] = line:sub( 1, -4 )
end
last = line
end
return stack
end
|
local mod = get_mod("Pause") -- luacheck: ignore get_mod
-- luacheck: globals Managers
mod.do_pause = function()
if not Managers.player.is_server then
mod:echo_localized("not_server")
return
end
if Managers.state.debug.time_paused then
Managers.state.debug:set_time_scale(Managers.state.debug.time_scale_index)
mod:echo_localized("game_unpaused")
else
Managers.state.debug:set_time_paused()
mod:echo_localized("game_paused")
end
end
mod:command("pause", mod:localize("pause_command_description"), mod.do_pause) |
------------------------------------------------------------------------------
-- DynASM ARM64 module.
--
-- Copyright (C) 2005-2016 Mike Pall. All rights reserved.
-- See dynasm.lua for full copyright notice.
------------------------------------------------------------------------------
-- Module information:
local _info = {
arch = "arm",
description = "DynASM ARM64 module",
version = "1.4.0",
vernum = 10400,
release = "2015-10-18",
author = "Mike Pall",
license = "MIT",
}
-- Exported glue functions for the arch-specific module.
local _M = { _info = _info }
-- Cache library functions.
local type, tonumber, pairs, ipairs = type, tonumber, pairs, ipairs
local assert, setmetatable, rawget = assert, setmetatable, rawget
local _s = string
local sub, format, byte, char = _s.sub, _s.format, _s.byte, _s.char
local match, gmatch, gsub = _s.match, _s.gmatch, _s.gsub
local concat, sort, insert = table.concat, table.sort, table.insert
local bit = bit or require("bit")
local band, shl, shr, sar = bit.band, bit.lshift, bit.rshift, bit.arshift
local ror, tohex = bit.ror, bit.tohex
-- Inherited tables and callbacks.
local g_opt, g_arch
local wline, werror, wfatal, wwarn
-- Action name list.
-- CHECK: Keep this in sync with the C code!
local action_names = {
"STOP", "SECTION", "ESC", "REL_EXT",
"ALIGN", "REL_LG", "LABEL_LG",
"REL_PC", "LABEL_PC", "IMM", "IMM6", "IMM12", "IMM13W", "IMM13X", "IMML",
}
-- Maximum number of section buffer positions for dasm_put().
-- CHECK: Keep this in sync with the C code!
local maxsecpos = 25 -- Keep this low, to avoid excessively long C lines.
-- Action name -> action number.
local map_action = {}
for n,name in ipairs(action_names) do
map_action[name] = n-1
end
-- Action list buffer.
local actlist = {}
-- Argument list for next dasm_put(). Start with offset 0 into action list.
local actargs = { 0 }
-- Current number of section buffer positions for dasm_put().
local secpos = 1
------------------------------------------------------------------------------
-- Dump action names and numbers.
local function dumpactions(out)
out:write("DynASM encoding engine action codes:\n")
for n,name in ipairs(action_names) do
local num = map_action[name]
out:write(format(" %-10s %02X %d\n", name, num, num))
end
out:write("\n")
end
-- Write action list buffer as a huge static C array.
local function writeactions(out, name)
local nn = #actlist
if nn == 0 then nn = 1; actlist[0] = map_action.STOP end
out:write("static const unsigned int ", name, "[", nn, "] = {\n")
for i = 1,nn-1 do
assert(out:write("0x", tohex(actlist[i]), ",\n"))
end
assert(out:write("0x", tohex(actlist[nn]), "\n};\n\n"))
end
------------------------------------------------------------------------------
-- Add word to action list.
local function wputxw(n)
assert(n >= 0 and n <= 0xffffffff and n % 1 == 0, "word out of range")
actlist[#actlist+1] = n
end
-- Add action to list with optional arg. Advance buffer pos, too.
local function waction(action, val, a, num)
local w = assert(map_action[action], "bad action name `"..action.."'")
wputxw(w * 0x10000 + (val or 0))
if a then actargs[#actargs+1] = a end
if a or num then secpos = secpos + (num or 1) end
end
-- Flush action list (intervening C code or buffer pos overflow).
local function wflush(term)
if #actlist == actargs[1] then return end -- Nothing to flush.
if not term then waction("STOP") end -- Terminate action list.
wline(format("dasm_put(Dst, %s);", concat(actargs, ", ")), true)
actargs = { #actlist } -- Actionlist offset is 1st arg to next dasm_put().
secpos = 1 -- The actionlist offset occupies a buffer position, too.
end
-- Put escaped word.
local function wputw(n)
if n <= 0x000fffff then waction("ESC") end
wputxw(n)
end
-- Reserve position for word.
local function wpos()
local pos = #actlist+1
actlist[pos] = ""
return pos
end
-- Store word to reserved position.
local function wputpos(pos, n)
assert(n >= 0 and n <= 0xffffffff and n % 1 == 0, "word out of range")
if n <= 0x000fffff then
insert(actlist, pos+1, n)
n = map_action.ESC * 0x10000
end
actlist[pos] = n
end
------------------------------------------------------------------------------
-- Global label name -> global label number. With auto assignment on 1st use.
local next_global = 20
local map_global = setmetatable({}, { __index = function(t, name)
if not match(name, "^[%a_][%w_]*$") then werror("bad global label") end
local n = next_global
if n > 2047 then werror("too many global labels") end
next_global = n + 1
t[name] = n
return n
end})
-- Dump global labels.
local function dumpglobals(out, lvl)
local t = {}
for name, n in pairs(map_global) do t[n] = name end
out:write("Global labels:\n")
for i=20,next_global-1 do
out:write(format(" %s\n", t[i]))
end
out:write("\n")
end
-- Write global label enum.
local function writeglobals(out, prefix)
local t = {}
for name, n in pairs(map_global) do t[n] = name end
out:write("enum {\n")
for i=20,next_global-1 do
out:write(" ", prefix, t[i], ",\n")
end
out:write(" ", prefix, "_MAX\n};\n")
end
-- Write global label names.
local function writeglobalnames(out, name)
local t = {}
for name, n in pairs(map_global) do t[n] = name end
out:write("static const char *const ", name, "[] = {\n")
for i=20,next_global-1 do
out:write(" \"", t[i], "\",\n")
end
out:write(" (const char *)0\n};\n")
end
------------------------------------------------------------------------------
-- Extern label name -> extern label number. With auto assignment on 1st use.
local next_extern = 0
local map_extern_ = {}
local map_extern = setmetatable({}, { __index = function(t, name)
-- No restrictions on the name for now.
local n = next_extern
if n > 2047 then werror("too many extern labels") end
next_extern = n + 1
t[name] = n
map_extern_[n] = name
return n
end})
-- Dump extern labels.
local function dumpexterns(out, lvl)
out:write("Extern labels:\n")
for i=0,next_extern-1 do
out:write(format(" %s\n", map_extern_[i]))
end
out:write("\n")
end
-- Write extern label names.
local function writeexternnames(out, name)
out:write("static const char *const ", name, "[] = {\n")
for i=0,next_extern-1 do
out:write(" \"", map_extern_[i], "\",\n")
end
out:write(" (const char *)0\n};\n")
end
------------------------------------------------------------------------------
-- Arch-specific maps.
-- Ext. register name -> int. name.
local map_archdef = { xzr = "@x31", wzr = "@w31", lr = "x30", }
-- Int. register name -> ext. name.
local map_reg_rev = { ["@x31"] = "xzr", ["@w31"] = "wzr", x30 = "lr", }
local map_type = {} -- Type name -> { ctype, reg }
local ctypenum = 0 -- Type number (for Dt... macros).
-- Reverse defines for registers.
function _M.revdef(s)
return map_reg_rev[s] or s
end
local map_shift = { lsl = 0, lsr = 1, asr = 2, }
local map_extend = {
uxtb = 0, uxth = 1, uxtw = 2, uxtx = 3,
sxtb = 4, sxth = 5, sxtw = 6, sxtx = 7,
}
local map_cond = {
eq = 0, ne = 1, cs = 2, cc = 3, mi = 4, pl = 5, vs = 6, vc = 7,
hi = 8, ls = 9, ge = 10, lt = 11, gt = 12, le = 13, al = 14,
hs = 2, lo = 3,
}
------------------------------------------------------------------------------
local parse_reg_type
local function parse_reg(expr)
if not expr then werror("expected register name") end
local tname, ovreg = match(expr, "^([%w_]+):(@?%l%d+)$")
local tp = map_type[tname or expr]
if tp then
local reg = ovreg or tp.reg
if not reg then
werror("type `"..(tname or expr).."' needs a register override")
end
expr = reg
end
local ok31, rt, r = match(expr, "^(@?)([xwqdshb])([123]?[0-9])$")
if r then
r = tonumber(r)
if r <= 30 or (r == 31 and ok31 ~= "" or (rt ~= "w" and rt ~= "x")) then
if not parse_reg_type then
parse_reg_type = rt
elseif parse_reg_type ~= rt then
werror("register size mismatch")
end
return r, tp
end
end
werror("bad register name `"..expr.."'")
end
local function parse_reg_base(expr)
if expr == "sp" then return 0x3e0 end
local base, tp = parse_reg(expr)
if parse_reg_type ~= "x" then werror("bad register type") end
parse_reg_type = false
return shl(base, 5), tp
end
local parse_ctx = {}
local loadenv = setfenv and function(s)
local code = loadstring(s, "")
if code then setfenv(code, parse_ctx) end
return code
end or function(s)
return load(s, "", nil, parse_ctx)
end
-- Try to parse simple arithmetic, too, since some basic ops are aliases.
local function parse_number(n)
local x = tonumber(n)
if x then return x end
local code = loadenv("return "..n)
if code then
local ok, y = pcall(code)
if ok then return y end
end
return nil
end
local function parse_imm(imm, bits, shift, scale, signed)
imm = match(imm, "^#(.*)$")
if not imm then werror("expected immediate operand") end
local n = parse_number(imm)
if n then
local m = sar(n, scale)
if shl(m, scale) == n then
if signed then
local s = sar(m, bits-1)
if s == 0 then return shl(m, shift)
elseif s == -1 then return shl(m + shl(1, bits), shift) end
else
if sar(m, bits) == 0 then return shl(m, shift) end
end
end
werror("out of range immediate `"..imm.."'")
else
waction("IMM", (signed and 32768 or 0)+scale*1024+bits*32+shift, imm)
return 0
end
end
local function parse_imm12(imm)
imm = match(imm, "^#(.*)$")
if not imm then werror("expected immediate operand") end
local n = parse_number(imm)
if n then
if shr(n, 12) == 0 then
return shl(n, 10)
elseif band(n, 0xff000fff) == 0 then
return shr(n, 2) + 0x00400000
end
werror("out of range immediate `"..imm.."'")
else
waction("IMM12", 0, imm)
return 0
end
end
local function parse_imm13(imm)
imm = match(imm, "^#(.*)$")
if not imm then werror("expected immediate operand") end
local n = parse_number(imm)
local r64 = parse_reg_type == "x"
if n and n % 1 == 0 and n >= 0 and n <= 0xffffffff then
local inv = false
if band(n, 1) == 1 then n = bit.bnot(n); inv = true end
local t = {}
for i=1,32 do t[i] = band(n, 1); n = shr(n, 1) end
local b = table.concat(t)
b = b..(r64 and (inv and "1" or "0"):rep(32) or b)
local p0, p1, p0a, p1a = b:match("^(0+)(1+)(0*)(1*)")
if p0 then
local w = p1a == "" and (r64 and 64 or 32) or #p1+#p0a
if band(w, w-1) == 0 and b == b:sub(1, w):rep(64/w) then
local s = band(-2*w, 0x3f) - 1
if w == 64 then s = s + 0x1000 end
if inv then
return shl(w-#p1-#p0, 16) + shl(s+w-#p1, 10)
else
return shl(w-#p0, 16) + shl(s+#p1, 10)
end
end
end
werror("out of range immediate `"..imm.."'")
elseif r64 then
waction("IMM13X", 0, format("(unsigned int)(%s)", imm))
actargs[#actargs+1] = format("(unsigned int)((unsigned long long)(%s)>>32)", imm)
return 0
else
waction("IMM13W", 0, imm)
return 0
end
end
local function parse_imm6(imm)
imm = match(imm, "^#(.*)$")
if not imm then werror("expected immediate operand") end
local n = parse_number(imm)
if n then
if n >= 0 and n <= 63 then
return shl(band(n, 0x1f), 19) + (n >= 32 and 0x80000000 or 0)
end
werror("out of range immediate `"..imm.."'")
else
waction("IMM6", 0, imm)
return 0
end
end
local function parse_imm_load(imm, scale)
local n = parse_number(imm)
if n then
local m = sar(n, scale)
if shl(m, scale) == n and m >= 0 and m < 0x1000 then
return shl(m, 10) + 0x01000000 -- Scaled, unsigned 12 bit offset.
elseif n >= -256 and n < 256 then
return shl(band(n, 511), 12) -- Unscaled, signed 9 bit offset.
end
werror("out of range immediate `"..imm.."'")
else
waction("IMML", 0, imm)
return 0
end
end
local function parse_fpimm(imm)
imm = match(imm, "^#(.*)$")
if not imm then werror("expected immediate operand") end
local n = parse_number(imm)
if n then
local m, e = math.frexp(n)
local s, e2 = 0, band(e-2, 7)
if m < 0 then m = -m; s = 0x00100000 end
m = m*32-16
if m % 1 == 0 and m >= 0 and m <= 15 and sar(shl(e2, 29), 29)+2 == e then
return s + shl(e2, 17) + shl(m, 13)
end
werror("out of range immediate `"..imm.."'")
else
werror("NYI fpimm action")
end
end
local function parse_shift(expr)
local s, s2 = match(expr, "^(%S+)%s*(.*)$")
s = map_shift[s]
if not s then werror("expected shift operand") end
return parse_imm(s2, 6, 10, 0, false) + shl(s, 22)
end
local function parse_lslx16(expr)
local n = match(expr, "^lsl%s*#(%d+)$")
n = tonumber(n)
if not n then werror("expected shift operand") end
if band(n, parse_reg_type == "x" and 0xffffffcf or 0xffffffef) ~= 0 then
werror("bad shift amount")
end
return shl(n, 17)
end
local function parse_extend(expr)
local s, s2 = match(expr, "^(%S+)%s*(.*)$")
if s == "lsl" then
s = parse_reg_type == "x" and 3 or 2
else
s = map_extend[s]
end
if not s then werror("expected extend operand") end
return (s2 == "" and 0 or parse_imm(s2, 3, 10, 0, false)) + shl(s, 13)
end
local function parse_cond(expr, inv)
local c = map_cond[expr]
if not c then werror("expected condition operand") end
return shl(bit.bxor(c, inv), 12)
end
local function parse_load(params, nparams, n, op)
if params[n+2] then werror("too many operands") end
local pn, p2 = params[n], params[n+1]
local p1, wb = match(pn, "^%[%s*(.-)%s*%](!?)$")
if not p1 then
if not p2 then
local reg, tailr = match(pn, "^([%w_:]+)%s*(.*)$")
if reg and tailr ~= "" then
local base, tp = parse_reg_base(reg)
if tp then
waction("IMML", 0, format(tp.ctypefmt, tailr))
return op + base
end
end
end
werror("expected address operand")
end
local scale = shr(op, 30)
if p2 then
if wb == "!" then werror("bad use of '!'") end
op = op + parse_reg_base(p1) + parse_imm(p2, 9, 12, 0, true) + 0x400
elseif wb == "!" then
local p1a, p2a = match(p1, "^([^,%s]*)%s*,%s*(.*)$")
if not p1a then werror("bad use of '!'") end
op = op + parse_reg_base(p1a) + parse_imm(p2a, 9, 12, 0, true) + 0xc00
else
local p1a, p2a = match(p1, "^([^,%s]*)%s*(.*)$")
op = op + parse_reg_base(p1a)
if p2a ~= "" then
local imm = match(p2a, "^,%s*#(.*)$")
if imm then
op = op + parse_imm_load(imm, scale)
else
local p2b, p3b, p3s = match(p2a, "^,%s*([^,%s]*)%s*,?%s*(%S*)%s*(.*)$")
op = op + shl(parse_reg(p2b), 16) + 0x00200800
if parse_reg_type ~= "x" and parse_reg_type ~= "w" then
werror("bad index register type")
end
if p3b == "" then
if parse_reg_type ~= "x" then werror("bad index register type") end
op = op + 0x6000
else
if p3s == "" or p3s == "#0" then
elseif p3s == "#"..scale then
op = op + 0x1000
else
werror("bad scale")
end
if parse_reg_type == "x" then
if p3b == "lsl" and p3s ~= "" then op = op + 0x6000
elseif p3b == "sxtx" then op = op + 0xe000
else
werror("bad extend/shift specifier")
end
else
if p3b == "uxtw" then op = op + 0x4000
elseif p3b == "sxtw" then op = op + 0xc000
else
werror("bad extend/shift specifier")
end
end
end
end
else
if wb == "!" then werror("bad use of '!'") end
op = op + 0x01000000
end
end
return op
end
local function parse_load_pair(params, nparams, n, op)
if params[n+2] then werror("too many operands") end
local pn, p2 = params[n], params[n+1]
local scale = shr(op, 30) == 0 and 2 or 3
local p1, wb = match(pn, "^%[%s*(.-)%s*%](!?)$")
if not p1 then
if not p2 then
local reg, tailr = match(pn, "^([%w_:]+)%s*(.*)$")
if reg and tailr ~= "" then
local base, tp = parse_reg_base(reg)
if tp then
waction("IMM", 32768+7*32+15+scale*1024, format(tp.ctypefmt, tailr))
return op + base + 0x01000000
end
end
end
werror("expected address operand")
end
if p2 then
if wb == "!" then werror("bad use of '!'") end
op = op + 0x00800000
else
local p1a, p2a = match(p1, "^([^,%s]*)%s*,%s*(.*)$")
if p1a then p1, p2 = p1a, p2a else p2 = "#0" end
op = op + (wb == "!" and 0x01800000 or 0x01000000)
end
return op + parse_reg_base(p1) + parse_imm(p2, 7, 15, scale, true)
end
local function parse_label(label, def)
local prefix = sub(label, 1, 2)
-- =>label (pc label reference)
if prefix == "=>" then
return "PC", 0, sub(label, 3)
end
-- ->name (global label reference)
if prefix == "->" then
return "LG", map_global[sub(label, 3)]
end
if def then
-- [1-9] (local label definition)
if match(label, "^[1-9]$") then
return "LG", 10+tonumber(label)
end
else
-- [<>][1-9] (local label reference)
local dir, lnum = match(label, "^([<>])([1-9])$")
if dir then -- Fwd: 1-9, Bkwd: 11-19.
return "LG", lnum + (dir == ">" and 0 or 10)
end
-- extern label (extern label reference)
local extname = match(label, "^extern%s+(%S+)$")
if extname then
return "EXT", map_extern[extname]
end
end
werror("bad label `"..label.."'")
end
local function branch_type(op)
if band(op, 0x7c000000) == 0x14000000 then return 0 -- B, BL
elseif shr(op, 24) == 0x54 or band(op, 0x7e000000) == 0x34000000 or
band(op, 0x3b000000) == 0x18000000 then
return 0x800 -- B.cond, CBZ, CBNZ, LDR* literal
elseif band(op, 0x7e000000) == 0x36000000 then return 0x1000 -- TBZ, TBNZ
elseif band(op, 0x9f000000) == 0x10000000 then return 0x2000 -- ADR
elseif band(op, 0x9f000000) == band(0x90000000) then return 0x3000 -- ADRP
else
assert(false, "unknown branch type")
end
end
------------------------------------------------------------------------------
local map_op, op_template
local function op_alias(opname, f)
return function(params, nparams)
if not params then return "-> "..opname:sub(1, -3) end
f(params, nparams)
op_template(params, map_op[opname], nparams)
end
end
local function alias_bfx(p)
p[4] = "#("..p[3]:sub(2)..")+("..p[4]:sub(2)..")-1"
end
local function alias_bfiz(p)
parse_reg(p[1])
if parse_reg_type == "w" then
p[3] = "#-("..p[3]:sub(2)..")%32"
p[4] = "#("..p[4]:sub(2)..")-1"
else
p[3] = "#-("..p[3]:sub(2)..")%64"
p[4] = "#("..p[4]:sub(2)..")-1"
end
end
local alias_lslimm = op_alias("ubfm_4", function(p)
parse_reg(p[1])
local sh = p[3]:sub(2)
if parse_reg_type == "w" then
p[3] = "#-("..sh..")%32"
p[4] = "#31-("..sh..")"
else
p[3] = "#-("..sh..")%64"
p[4] = "#63-("..sh..")"
end
end)
-- Template strings for ARM instructions.
map_op = {
-- Basic data processing instructions.
add_3 = "0b000000DNMg|11000000pDpNIg|8b206000pDpNMx",
add_4 = "0b000000DNMSg|0b200000DNMXg|8b200000pDpNMXx|8b200000pDpNxMwX",
adds_3 = "2b000000DNMg|31000000DpNIg|ab206000DpNMx",
adds_4 = "2b000000DNMSg|2b200000DNMXg|ab200000DpNMXx|ab200000DpNxMwX",
cmn_2 = "2b00001fNMg|3100001fpNIg|ab20601fpNMx",
cmn_3 = "2b00001fNMSg|2b20001fNMXg|ab20001fpNMXx|ab20001fpNxMwX",
sub_3 = "4b000000DNMg|51000000pDpNIg|cb206000pDpNMx",
sub_4 = "4b000000DNMSg|4b200000DNMXg|cb200000pDpNMXx|cb200000pDpNxMwX",
subs_3 = "6b000000DNMg|71000000DpNIg|eb206000DpNMx",
subs_4 = "6b000000DNMSg|6b200000DNMXg|eb200000DpNMXx|eb200000DpNxMwX",
cmp_2 = "6b00001fNMg|7100001fpNIg|eb20601fpNMx",
cmp_3 = "6b00001fNMSg|6b20001fNMXg|eb20001fpNMXx|eb20001fpNxMwX",
neg_2 = "4b0003e0DMg",
neg_3 = "4b0003e0DMSg",
negs_2 = "6b0003e0DMg",
negs_3 = "6b0003e0DMSg",
adc_3 = "1a000000DNMg",
adcs_3 = "3a000000DNMg",
sbc_3 = "5a000000DNMg",
sbcs_3 = "7a000000DNMg",
ngc_2 = "5a0003e0DMg",
ngcs_2 = "7a0003e0DMg",
and_3 = "0a000000DNMg|12000000pDNig",
and_4 = "0a000000DNMSg",
orr_3 = "2a000000DNMg|32000000pDNig",
orr_4 = "2a000000DNMSg",
eor_3 = "4a000000DNMg|52000000pDNig",
eor_4 = "4a000000DNMSg",
ands_3 = "6a000000DNMg|72000000DNig",
ands_4 = "6a000000DNMSg",
tst_2 = "6a00001fNMg|7200001fNig",
tst_3 = "6a00001fNMSg",
bic_3 = "0a200000DNMg",
bic_4 = "0a200000DNMSg",
orn_3 = "2a200000DNMg",
orn_4 = "2a200000DNMSg",
eon_3 = "4a200000DNMg",
eon_4 = "4a200000DNMSg",
bics_3 = "6a200000DNMg",
bics_4 = "6a200000DNMSg",
movn_2 = "12800000DWg",
movn_3 = "12800000DWRg",
movz_2 = "52800000DWg",
movz_3 = "52800000DWRg",
movk_2 = "72800000DWg",
movk_3 = "72800000DWRg",
-- TODO: this doesn't cover all valid immediates for mov reg, #imm.
mov_2 = "2a0003e0DMg|52800000DW|320003e0pDig|11000000pDpNg",
mov_3 = "2a0003e0DMSg",
mvn_2 = "2a2003e0DMg",
mvn_3 = "2a2003e0DMSg",
adr_2 = "10000000DBx",
adrp_2 = "90000000DBx",
csel_4 = "1a800000DNMCg",
csinc_4 = "1a800400DNMCg",
csinv_4 = "5a800000DNMCg",
csneg_4 = "5a800400DNMCg",
cset_2 = "1a9f07e0Dcg",
csetm_2 = "5a9f03e0Dcg",
cinc_3 = "1a800400DNmcg",
cinv_3 = "5a800000DNmcg",
cneg_3 = "5a800400DNmcg",
ccmn_4 = "3a400000NMVCg|3a400800N5VCg",
ccmp_4 = "7a400000NMVCg|7a400800N5VCg",
madd_4 = "1b000000DNMAg",
msub_4 = "1b008000DNMAg",
mul_3 = "1b007c00DNMg",
mneg_3 = "1b00fc00DNMg",
smaddl_4 = "9b200000DxNMwAx",
smsubl_4 = "9b208000DxNMwAx",
smull_3 = "9b207c00DxNMw",
smnegl_3 = "9b20fc00DxNMw",
smulh_3 = "9b407c00DNMx",
umaddl_4 = "9ba00000DxNMwAx",
umsubl_4 = "9ba08000DxNMwAx",
umull_3 = "9ba07c00DxNMw",
umnegl_3 = "9ba0fc00DxNMw",
umulh_3 = "9bc07c00DNMx",
udiv_3 = "1ac00800DNMg",
sdiv_3 = "1ac00c00DNMg",
-- Bit operations.
sbfm_4 = "13000000DN12w|93400000DN12x",
bfm_4 = "33000000DN12w|b3400000DN12x",
ubfm_4 = "53000000DN12w|d3400000DN12x",
extr_4 = "13800000DNM2w|93c00000DNM2x",
sxtb_2 = "13001c00DNw|93401c00DNx",
sxth_2 = "13003c00DNw|93403c00DNx",
sxtw_2 = "93407c00DxNw",
uxtb_2 = "53001c00DNw",
uxth_2 = "53003c00DNw",
sbfx_4 = op_alias("sbfm_4", alias_bfx),
bfxil_4 = op_alias("bfm_4", alias_bfx),
ubfx_4 = op_alias("ubfm_4", alias_bfx),
sbfiz_4 = op_alias("sbfm_4", alias_bfiz),
bfi_4 = op_alias("bfm_4", alias_bfiz),
ubfiz_4 = op_alias("ubfm_4", alias_bfiz),
lsl_3 = function(params, nparams)
if params and params[3]:byte() == 35 then
return alias_lslimm(params, nparams)
else
return op_template(params, "1ac02000DNMg", nparams)
end
end,
lsr_3 = "1ac02400DNMg|53007c00DN1w|d340fc00DN1x",
asr_3 = "1ac02800DNMg|13007c00DN1w|9340fc00DN1x",
ror_3 = "1ac02c00DNMg|13800000DNm2w|93c00000DNm2x",
clz_2 = "5ac01000DNg",
cls_2 = "5ac01400DNg",
rbit_2 = "5ac00000DNg",
rev_2 = "5ac00800DNw|dac00c00DNx",
rev16_2 = "5ac00400DNg",
rev32_2 = "dac00800DNx",
-- Loads and stores.
["strb_*"] = "38000000DwL",
["ldrb_*"] = "38400000DwL",
["ldrsb_*"] = "38c00000DwL|38800000DxL",
["strh_*"] = "78000000DwL",
["ldrh_*"] = "78400000DwL",
["ldrsh_*"] = "78c00000DwL|78800000DxL",
["str_*"] = "b8000000DwL|f8000000DxL|bc000000DsL|fc000000DdL",
["ldr_*"] = "18000000DwB|58000000DxB|1c000000DsB|5c000000DdB|b8400000DwL|f8400000DxL|bc400000DsL|fc400000DdL",
["ldrsw_*"] = "98000000DxB|b8800000DxL",
-- NOTE: ldur etc. are handled by ldr et al.
["stp_*"] = "28000000DAwP|a8000000DAxP|2c000000DAsP|6c000000DAdP",
["ldp_*"] = "28400000DAwP|a8400000DAxP|2c400000DAsP|6c400000DAdP",
["ldpsw_*"] = "68400000DAxP",
-- Branches.
b_1 = "14000000B",
bl_1 = "94000000B",
blr_1 = "d63f0000Nx",
br_1 = "d61f0000Nx",
ret_0 = "d65f03c0",
ret_1 = "d65f0000Nx",
-- b.cond is added below.
cbz_2 = "34000000DBg",
cbnz_2 = "35000000DBg",
tbz_3 = "36000000DTBw|36000000DTBx",
tbnz_3 = "37000000DTBw|37000000DTBx",
-- Miscellaneous instructions.
-- TODO: hlt, hvc, smc, svc, eret, dcps[123], drps, mrs, msr
-- TODO: sys, sysl, ic, dc, at, tlbi
-- TODO: hint, yield, wfe, wfi, sev, sevl
-- TODO: clrex, dsb, dmb, isb
nop_0 = "d503201f",
brk_0 = "d4200000",
brk_1 = "d4200000W",
-- Floating point instructions.
fmov_2 = "1e204000DNf|1e260000DwNs|1e270000DsNw|9e660000DxNd|9e670000DdNx|1e201000DFf",
fabs_2 = "1e20c000DNf",
fneg_2 = "1e214000DNf",
fsqrt_2 = "1e21c000DNf",
fcvt_2 = "1e22c000DdNs|1e624000DsNd",
-- TODO: half-precision and fixed-point conversions.
fcvtas_2 = "1e240000DwNs|9e240000DxNs|1e640000DwNd|9e640000DxNd",
fcvtau_2 = "1e250000DwNs|9e250000DxNs|1e650000DwNd|9e650000DxNd",
fcvtms_2 = "1e300000DwNs|9e300000DxNs|1e700000DwNd|9e700000DxNd",
fcvtmu_2 = "1e310000DwNs|9e310000DxNs|1e710000DwNd|9e710000DxNd",
fcvtns_2 = "1e200000DwNs|9e200000DxNs|1e600000DwNd|9e600000DxNd",
fcvtnu_2 = "1e210000DwNs|9e210000DxNs|1e610000DwNd|9e610000DxNd",
fcvtps_2 = "1e280000DwNs|9e280000DxNs|1e680000DwNd|9e680000DxNd",
fcvtpu_2 = "1e290000DwNs|9e290000DxNs|1e690000DwNd|9e690000DxNd",
fcvtzs_2 = "1e380000DwNs|9e380000DxNs|1e780000DwNd|9e780000DxNd",
fcvtzu_2 = "1e390000DwNs|9e390000DxNs|1e790000DwNd|9e790000DxNd",
scvtf_2 = "1e220000DsNw|9e220000DsNx|1e620000DdNw|9e620000DdNx",
ucvtf_2 = "1e230000DsNw|9e230000DsNx|1e630000DdNw|9e630000DdNx",
frintn_2 = "1e244000DNf",
frintp_2 = "1e24c000DNf",
frintm_2 = "1e254000DNf",
frintz_2 = "1e25c000DNf",
frinta_2 = "1e264000DNf",
frintx_2 = "1e274000DNf",
frinti_2 = "1e27c000DNf",
fadd_3 = "1e202800DNMf",
fsub_3 = "1e203800DNMf",
fmul_3 = "1e200800DNMf",
fnmul_3 = "1e208800DNMf",
fdiv_3 = "1e201800DNMf",
fmadd_4 = "1f000000DNMAf",
fmsub_4 = "1f008000DNMAf",
fnmadd_4 = "1f200000DNMAf",
fnmsub_4 = "1f208000DNMAf",
fmax_3 = "1e204800DNMf",
fmaxnm_3 = "1e206800DNMf",
fmin_3 = "1e205800DNMf",
fminnm_3 = "1e207800DNMf",
fcmp_2 = "1e202000NMf|1e202008NZf",
fcmpe_2 = "1e202010NMf|1e202018NZf",
fccmp_4 = "1e200400NMVCf",
fccmpe_4 = "1e200410NMVCf",
fcsel_4 = "1e200c00DNMCf",
-- TODO: crc32*, aes*, sha*, pmull
-- TODO: SIMD instructions.
}
for cond,c in pairs(map_cond) do
map_op["b"..cond.."_1"] = tohex(0x54000000+c).."B"
end
------------------------------------------------------------------------------
-- Handle opcodes defined with template strings.
local function parse_template(params, template, nparams, pos)
local op = tonumber(sub(template, 1, 8), 16)
local n = 1
local rtt = {}
parse_reg_type = false
-- Process each character.
for p in gmatch(sub(template, 9), ".") do
local q = params[n]
if p == "D" then
op = op + parse_reg(q); n = n + 1
elseif p == "N" then
op = op + shl(parse_reg(q), 5); n = n + 1
elseif p == "M" then
op = op + shl(parse_reg(q), 16); n = n + 1
elseif p == "A" then
op = op + shl(parse_reg(q), 10); n = n + 1
elseif p == "m" then
op = op + shl(parse_reg(params[n-1]), 16)
elseif p == "p" then
if q == "sp" then params[n] = "@x31" end
elseif p == "g" then
if parse_reg_type == "x" then
op = op + 0x80000000
elseif parse_reg_type ~= "w" then
werror("bad register type")
end
parse_reg_type = false
elseif p == "f" then
if parse_reg_type == "d" then
op = op + 0x00400000
elseif parse_reg_type ~= "s" then
werror("bad register type")
end
parse_reg_type = false
elseif p == "x" or p == "w" or p == "d" or p == "s" then
if parse_reg_type ~= p then
werror("register size mismatch")
end
parse_reg_type = false
elseif p == "L" then
op = parse_load(params, nparams, n, op)
elseif p == "P" then
op = parse_load_pair(params, nparams, n, op)
elseif p == "B" then
local mode, v, s = parse_label(q, false); n = n + 1
local m = branch_type(op)
waction("REL_"..mode, v+m, s, 1)
elseif p == "I" then
op = op + parse_imm12(q); n = n + 1
elseif p == "i" then
op = op + parse_imm13(q); n = n + 1
elseif p == "W" then
op = op + parse_imm(q, 16, 5, 0, false); n = n + 1
elseif p == "T" then
op = op + parse_imm6(q); n = n + 1
elseif p == "1" then
op = op + parse_imm(q, 6, 16, 0, false); n = n + 1
elseif p == "2" then
op = op + parse_imm(q, 6, 10, 0, false); n = n + 1
elseif p == "5" then
op = op + parse_imm(q, 5, 16, 0, false); n = n + 1
elseif p == "V" then
op = op + parse_imm(q, 4, 0, 0, false); n = n + 1
elseif p == "F" then
op = op + parse_fpimm(q); n = n + 1
elseif p == "Z" then
if q ~= "#0" and q ~= "#0.0" then werror("expected zero immediate") end
n = n + 1
elseif p == "S" then
op = op + parse_shift(q); n = n + 1
elseif p == "X" then
op = op + parse_extend(q); n = n + 1
elseif p == "R" then
op = op + parse_lslx16(q); n = n + 1
elseif p == "C" then
op = op + parse_cond(q, 0); n = n + 1
elseif p == "c" then
op = op + parse_cond(q, 1); n = n + 1
else
assert(false)
end
end
wputpos(pos, op)
end
function op_template(params, template, nparams)
if not params then return template:gsub("%x%x%x%x%x%x%x%x", "") end
-- Limit number of section buffer positions used by a single dasm_put().
-- A single opcode needs a maximum of 3 positions.
if secpos+3 > maxsecpos then wflush() end
local pos = wpos()
local lpos, apos, spos = #actlist, #actargs, secpos
local ok, err
for t in gmatch(template, "[^|]+") do
ok, err = pcall(parse_template, params, t, nparams, pos)
if ok then return end
secpos = spos
actlist[lpos+1] = nil
actlist[lpos+2] = nil
actlist[lpos+3] = nil
actargs[apos+1] = nil
actargs[apos+2] = nil
actargs[apos+3] = nil
end
error(err, 0)
end
map_op[".template__"] = op_template
------------------------------------------------------------------------------
-- Pseudo-opcode to mark the position where the action list is to be emitted.
map_op[".actionlist_1"] = function(params)
if not params then return "cvar" end
local name = params[1] -- No syntax check. You get to keep the pieces.
wline(function(out) writeactions(out, name) end)
end
-- Pseudo-opcode to mark the position where the global enum is to be emitted.
map_op[".globals_1"] = function(params)
if not params then return "prefix" end
local prefix = params[1] -- No syntax check. You get to keep the pieces.
wline(function(out) writeglobals(out, prefix) end)
end
-- Pseudo-opcode to mark the position where the global names are to be emitted.
map_op[".globalnames_1"] = function(params)
if not params then return "cvar" end
local name = params[1] -- No syntax check. You get to keep the pieces.
wline(function(out) writeglobalnames(out, name) end)
end
-- Pseudo-opcode to mark the position where the extern names are to be emitted.
map_op[".externnames_1"] = function(params)
if not params then return "cvar" end
local name = params[1] -- No syntax check. You get to keep the pieces.
wline(function(out) writeexternnames(out, name) end)
end
------------------------------------------------------------------------------
-- Label pseudo-opcode (converted from trailing colon form).
map_op[".label_1"] = function(params)
if not params then return "[1-9] | ->global | =>pcexpr" end
if secpos+1 > maxsecpos then wflush() end
local mode, n, s = parse_label(params[1], true)
if mode == "EXT" then werror("bad label definition") end
waction("LABEL_"..mode, n, s, 1)
end
------------------------------------------------------------------------------
-- Pseudo-opcodes for data storage.
map_op[".long_*"] = function(params)
if not params then return "imm..." end
for _,p in ipairs(params) do
local n = tonumber(p)
if not n then werror("bad immediate `"..p.."'") end
if n < 0 then n = n + 2^32 end
wputw(n)
if secpos+2 > maxsecpos then wflush() end
end
end
-- Alignment pseudo-opcode.
map_op[".align_1"] = function(params)
if not params then return "numpow2" end
if secpos+1 > maxsecpos then wflush() end
local align = tonumber(params[1])
if align then
local x = align
-- Must be a power of 2 in the range (2 ... 256).
for i=1,8 do
x = x / 2
if x == 1 then
waction("ALIGN", align-1, nil, 1) -- Action byte is 2**n-1.
return
end
end
end
werror("bad alignment")
end
------------------------------------------------------------------------------
-- Pseudo-opcode for (primitive) type definitions (map to C types).
map_op[".type_3"] = function(params, nparams)
if not params then
return nparams == 2 and "name, ctype" or "name, ctype, reg"
end
local name, ctype, reg = params[1], params[2], params[3]
if not match(name, "^[%a_][%w_]*$") then
werror("bad type name `"..name.."'")
end
local tp = map_type[name]
if tp then
werror("duplicate type `"..name.."'")
end
-- Add #type to defines. A bit unclean to put it in map_archdef.
map_archdef["#"..name] = "sizeof("..ctype..")"
-- Add new type and emit shortcut define.
local num = ctypenum + 1
map_type[name] = {
ctype = ctype,
ctypefmt = format("Dt%X(%%s)", num),
reg = reg,
}
wline(format("#define Dt%X(_V) (int)(ptrdiff_t)&(((%s *)0)_V)", num, ctype))
ctypenum = num
end
map_op[".type_2"] = map_op[".type_3"]
-- Dump type definitions.
local function dumptypes(out, lvl)
local t = {}
for name in pairs(map_type) do t[#t+1] = name end
sort(t)
out:write("Type definitions:\n")
for _,name in ipairs(t) do
local tp = map_type[name]
local reg = tp.reg or ""
out:write(format(" %-20s %-20s %s\n", name, tp.ctype, reg))
end
out:write("\n")
end
------------------------------------------------------------------------------
-- Set the current section.
function _M.section(num)
waction("SECTION", num)
wflush(true) -- SECTION is a terminal action.
end
------------------------------------------------------------------------------
-- Dump architecture description.
function _M.dumparch(out)
out:write(format("DynASM %s version %s, released %s\n\n",
_info.arch, _info.version, _info.release))
dumpactions(out)
end
-- Dump all user defined elements.
function _M.dumpdef(out, lvl)
dumptypes(out, lvl)
dumpglobals(out, lvl)
dumpexterns(out, lvl)
end
------------------------------------------------------------------------------
-- Pass callbacks from/to the DynASM core.
function _M.passcb(wl, we, wf, ww)
wline, werror, wfatal, wwarn = wl, we, wf, ww
return wflush
end
-- Setup the arch-specific module.
function _M.setup(arch, opt)
g_arch, g_opt = arch, opt
end
-- Merge the core maps and the arch-specific maps.
function _M.mergemaps(map_coreop, map_def)
setmetatable(map_op, { __index = map_coreop })
setmetatable(map_def, { __index = map_archdef })
return map_op, map_def
end
return _M
------------------------------------------------------------------------------
|
--***********************************************************
--** THE INDIE STONE **
--***********************************************************
---@class ISRainPanel : ISPanel
ISRainPanel = ISPanel:derive("ISRainPanel")
function ISRainPanel:createChildren()
local label = ISLabel:new(self.width / 3, 16, 25, "Intensity", 1, 1, 1, 1, UIFont.Medium, false)
label:initialise()
self:addChild(label)
self.intensity = ISSpinBox:new(label:getRight() + 8, 16, 80, 25, self, self.changeIntensity)
self.intensity.font = UIFont.Medium
self:addChild(self.intensity)
self.intensity:addOption("Weather")
self.intensity:addOption("1")
self.intensity:addOption("2")
self.intensity:addOption("3")
self.intensity:addOption("4")
self.intensity:addOption("5")
self.intensity.selected = 1
label = ISLabel:new(self.width / 3, self.intensity:getBottom() + 16, 25, "Speed", 1, 1, 1, 1, UIFont.Medium, false)
label:initialise()
self:addChild(label)
self.speed = ISSpinBox:new(label:getRight() + 8, self.intensity:getBottom() + 16, 80, 25, self, self.changeSpeed)
self.speed.font = UIFont.Medium
self:addChild(self.speed)
for i=1,10 do
self.speed:addOption(tostring(i))
end
self.speed.selected = 6
label = ISLabel:new(self.width / 3, self.speed:getBottom() + 16, 25, "Alpha", 1, 1, 1, 1, UIFont.Medium, false)
label:initialise()
self:addChild(label)
self.alpha = ISTextEntryBox:new("0.6", label:getRight() + 8, label:getY(), 80, 25)
self.alpha.font = UIFont.Medium
self.alpha.onCommandEntered = self.onChangeAlpha
self:addChild(self.alpha)
self.alpha:setOnlyNumbers(true)
self.reloadButton = ISButton:new((self.width - 150) / 2, self.alpha:getBottom() + 16, 150, 25, "Reload Textures", self, self.reloadTextures);
self.reloadButton.internal = "RELOAD";
self.reloadButton:initialise();
self.reloadButton:instantiate();
self:addChild(self.reloadButton);
end
function ISRainPanel:changeIntensity()
rainConfig("intensity", self.intensity.selected - 1)
end
function ISRainPanel:changeSpeed()
rainConfig("speed", self.speed.selected)
end
function ISRainPanel:onChangeAlpha()
local alpha = tonumber(self:getText())
if alpha >= 0 and alpha <= 1 then
rainConfig("alpha", alpha * 100)
end
end
function ISRainPanel:reloadTextures()
rainConfig("reloadTextures", 0)
end
function addRainPanel()
local panel = ISRainPanel:new(getCore():getScreenWidth() - 300, getCore():getScreenHeight() - 300, 280, 200)
local window = panel:wrapInCollapsableWindow()
window:addToUIManager()
end
|
-- TODO Add Lua Websocket client
|
--------------------------------
-- @module PhysicsSprite3D
-- @extend Sprite3D
-- @parent_module cc
---@class cc.PhysicsSprite3D:cc.Sprite3D
local PhysicsSprite3D = {}
cc.PhysicsSprite3D = PhysicsSprite3D
--------------------------------
--- synchronize node transformation to physics.
---@return cc.PhysicsSprite3D
function PhysicsSprite3D:syncNodeToPhysics()
end
--------------------------------
--- synchronize physics transformation to node.
---@return cc.PhysicsSprite3D
function PhysicsSprite3D:syncPhysicsToNode()
end
--------------------------------
--- Get the Physics3DObject.
---@return cc.Physics3DObject
function PhysicsSprite3D:getPhysicsObj()
end
--------------------------------
--- Set synchronization flag, see Physics3DComponent.
---@param syncFlag number
---@return cc.PhysicsSprite3D
function PhysicsSprite3D:setSyncFlag(syncFlag)
end
--------------------------------
---
---@return cc.PhysicsSprite3D
function PhysicsSprite3D:PhysicsSprite3D()
end
return nil
|
local InCombat = {
}
local OutCombat = {
}
XB.CR:Add(65, '[XB] Paladin - Holy', inCombat, outCombat)
|
function Rot(keys)
local caster = keys.caster
local ability = keys.ability
local damage = ability:GetLevelSpecialValueFor("rot_damage", ability:GetLevel() - 1) * ability:GetLevelSpecialValueFor("rot_tick", ability:GetLevel() - 1)
local radius = ability:GetAbilitySpecial("rot_radius")
local passive_stacks = caster:GetModifierStackCount("modifier_pudge_flesh_heap_arena_stack", caster)
if passive_stacks and passive_stacks > 0 then
local flesh_heap = caster:FindAbilityByName("pudge_flesh_heap_arena")
if flesh_heap and flesh_heap:GetLevel() > 0 then
radius = math.min(ability:GetAbilitySpecial("rot_radius_limit"), radius + (ability:GetAbilitySpecial("rot_radius_per_stack") * passive_stacks))
end
end
ApplyDamage({attacker = caster, victim = caster, damage = damage, damage_type = ability:GetAbilityDamageType(), ability = ability})
for _,v in ipairs(FindUnitsInRadius(caster:GetTeamNumber(), caster:GetAbsOrigin(), nil, radius, ability:GetAbilityTargetTeam(), ability:GetAbilityTargetType(), ability:GetAbilityTargetFlags(), FIND_ANY_ORDER, false)) do
ApplyDamage({attacker = caster, victim = v, damage = damage, damage_type = ability:GetAbilityDamageType(), ability = ability})
ability:ApplyDataDrivenModifier(caster, v, "modifier_pudge_rot_arena_slow", {})
end
end
function CreateParticles(keys)
local caster = keys.caster
local target = keys.target
local ability = keys.ability
local radius = ability:GetAbilitySpecial("rot_radius")
local passive_stacks = caster:GetModifierStackCount("modifier_pudge_flesh_heap_arena_stack", caster)
if passive_stacks and passive_stacks > 0 then
local flesh_heap = caster:FindAbilityByName("pudge_flesh_heap_arena")
if flesh_heap and flesh_heap:GetLevel() > 0 then
radius = math.min(ability:GetAbilitySpecial("rot_radius_limit"), radius + (ability:GetAbilitySpecial("rot_radius_per_stack") * passive_stacks))
end
end
ability.rotPfx = ParticleManager:CreateParticle(keys.particle, PATTACH_ABSORIGIN_FOLLOW, caster)
ParticleManager:SetParticleControl(ability.rotPfx, 1, Vector(radius,0,0) )
end
function StopRot(keys)
local caster = keys.caster
local ability = keys.ability
if ability.rotPfx then
ParticleManager:DestroyParticle(ability.rotPfx, false)
ability.rotPfx = nil
end
caster:StopSound("Hero_Pudge.Rot")
end |
--光と闇の洗礼
function c69542932.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c69542932.cost)
e1:SetTarget(c69542932.target)
e1:SetOperation(c69542932.activate)
c:RegisterEffect(e1)
local e02=Effect.CreateEffect(c)
e02:SetCategory(CATEGORY_SPECIAL_SUMMON)
e02:SetType(EFFECT_TYPE_IGNITION)
e02:SetRange(LOCATION_GRAVE)
e02:SetProperty(EFFECT_FLAG_CARD_TARGET)
--e2:SetCode(EVENT_FREE_CHAIN)
--e02:SetCondition(aux.exccon)
e02:SetCondition(c69542932.negcon)
e02:SetCost(c69542932.negcost)
--e02:SetTarget(c41420028.target2)
e02:SetOperation(c69542932.spop3)
c:RegisterEffect(e02)
end
c69542932.dark_magician_list=true
function c69542932.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c69542932.Chosfilter,tp,LOCATION_REMOVED,0,1,nil) --(re:GetActivateLocation()==LOCATION_GRAVE)
end
function c69542932.Chosfilter(c)
local code=c:GetCode()
local mRn = Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)
local mEn = Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)
return code==40737112 and (mRn >= mEn)
end
function c69542932.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,46986414) end
local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,46986414)
Duel.Release(g,REASON_COST)
end
function c69542932.filter(c,e,tp)
return c:IsCode(40737112) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c69542932.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c69542932.filter,tp,0x13,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13)
end
function c69542932.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c69542932.filter,tp,0x13,0,1,1,nil,e,tp)
if g:GetCount()>0 and not g:GetFirst():IsHasEffect(EFFECT_NECRO_VALLEY) then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
------------------------------
--new
function c69542932.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c69542932.filter2(c)
return (c:IsRace(RACE_FAIRY) or c:IsRace(RACE_WARRIOR)) or (bit.band(c:GetType(),0x82)==0x82) and c:IsAbleToHand() and not c:IsCode(49375719)
end
function c69542932.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c69542932.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c69542932.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c69542932.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c69542932.operation2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--------------------------------
function c69542932.cDMGfilter(c,tp)
return c:IsCode(38033121) and c:IsFaceup(tp)
end
function c69542932.spDMGcon(e,tp,eg,ep,ev,re,r,rp)
if c==nil then return true end
local tp=c:GetControler()
return (Duel.IsExistingMatchingCard(c69542932.cDMGfilter,tp,LOCATION_ONFIELD,0,1,nil))
end
function c69542932.spop3(e,tp,eg,ep,ev,re,r,rp)
--if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local token=Duel.CreateToken(tp,38033132)
Duel.MoveToField(token,tp,tp,LOCATION_MZONE,POS_FACEUP,true)
token:SetStatus(STATUS_PROC_COMPLETE,true)
token:SetStatus(STATUS_SPSUMMON_TURN,true)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
|
require "lib.classes.class"
--------------------------------------------------------------------------------------------------------
-- class: State
-- The state of an automaton that executes functions when it makes a transition.
local State = class(function(self)
self.transitions = {}
self.transition_actions = {}
end)
-- addTransition: int, state -> None
-- Adds a transition to the state
function State.setTransition(self, key, state)
self.transitions[key] = state
end
-- addTransitionAction: int, function(state) -> None
-- Adds an action to do with a transition
function State.addTransitionAction(self, key, fun)
self.transition_actions[key] = fun
end
-- getState: int -> State
-- Obtains an state associated to a key
-- Returns itself if it doesn't exist
function State.getState(self,key)
local aux = self.transitions[key]
if aux == nil then
aux = self
end
return aux
end
-- doTransitionAction: String -> None
-- Activates the current state action using a transition
function State.doTransitionAction(self, key)
local aux = self.transition_actions[key]
if not (aux == nil) then
aux(self)
end
end
return State |
---@type Config
local Config = ECSLoader:ImportModule("Config")
local _Config = Config.private
---@type Stats
local Stats = ECSLoader:ImportModule("Stats")
---@type i18n
local i18n = ECSLoader:ImportModule("i18n")
function _Config:LoadDefenseSection()
return {
type = "group",
order = 4,
inline = false,
width = 2,
name = function() return i18n("Defense") end,
args = {
showDefenseStats = {
type = "toggle",
order = 0,
name = function() return i18n("Show Defense Stats") end,
desc = function() return i18n("Shows/Hides all defense stats.") end,
width = 1.5,
get = function () return ExtendedCharacterStats.profile.defense.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.defense.display = value
Stats:RebuildStatInfos()
end,
},
armor = {
type = "toggle",
order = 1,
name = function() return i18n("Armor") end,
desc = function() return i18n("Shows/Hides the armor value.") end,
width = 1.5,
disabled = function() return (not ExtendedCharacterStats.profile.defense.display); end,
get = function () return ExtendedCharacterStats.profile.defense.armor.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.defense.armor.display = value
Stats:RebuildStatInfos()
end,
},
critImmunity = {
type = "toggle",
order = 1.7,
name = function() return i18n("Crit Immune") end,
desc = function() return i18n("Shows/Hides the percentage of being crit immune.") end,
width = 1.5,
hidden = function()
return (not ECS.IsTBC)
end,
disabled = function() return (not ExtendedCharacterStats.profile.defense.display); end,
get = function () return ExtendedCharacterStats.profile.defense.critImmunity.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.defense.critImmunity.display = value
Stats:RebuildStatInfos()
end,
},
critReduction = {
type = "toggle",
order = 1.8,
name = function() return i18n("Crit Reduction") end,
desc = function() return i18n("Shows/Hides the reduction percentage of being critically hit.") end,
width = 1.5,
hidden = function()
return (not ECS.IsTBC)
end,
disabled = function() return (not ExtendedCharacterStats.profile.defense.display); end,
get = function () return ExtendedCharacterStats.profile.defense.critReduction.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.defense.critReduction.display = value
Stats:RebuildStatInfos()
end,
},
defenseRating = {
type = "toggle",
order = 1.9,
name = function() return i18n("Defense Rating") end,
desc = function() return i18n("Shows/Hides the defense rating.") end,
width = 1.5,
hidden = function()
return (not ECS.IsTBC)
end,
disabled = function() return (not ExtendedCharacterStats.profile.defense.display); end,
get = function () return ExtendedCharacterStats.profile.defense.defenseRating.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.defense.defenseRating.display = value
Stats:RebuildStatInfos()
end,
},
defense = {
type = "toggle",
order = 2,
name = function() return i18n("Defense") end,
desc = function() return i18n("Shows/Hides the defense value.") end,
width = 1.5,
disabled = function() return (not ExtendedCharacterStats.profile.defense.display); end,
get = function () return ExtendedCharacterStats.profile.defense.defense.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.defense.defense.display = value
Stats:RebuildStatInfos()
end,
},
blockChance = {
type = "toggle",
order = 3,
name = function() return i18n("Block Chance") end,
desc = function() return i18n("Shows/Hides the block chance.") end,
width = 1.5,
disabled = function() return (not ExtendedCharacterStats.profile.defense.display); end,
get = function () return ExtendedCharacterStats.profile.defense.blockChance.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.defense.blockChance.display = value
Stats:RebuildStatInfos()
end,
},
blockValue = {
type = "toggle",
order = 4,
name = function() return i18n("Block Value") end,
desc = function() return i18n("Shows/Hides the block value.") end,
width = 1.5,
disabled = function() return (not ExtendedCharacterStats.profile.defense.display); end,
get = function () return ExtendedCharacterStats.profile.defense.blockValue.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.defense.blockValue.display = value
Stats:RebuildStatInfos()
end,
},
parry = {
type = "toggle",
order = 5,
name = function() return i18n("Parry Chance") end,
desc = function() return i18n("Shows/Hides the parry chance.") end,
width = 1.5,
disabled = function() return (not ExtendedCharacterStats.profile.defense.display); end,
get = function () return ExtendedCharacterStats.profile.defense.parry.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.defense.parry.display = value
Stats:RebuildStatInfos()
end,
},
dodge = {
type = "toggle",
order = 6,
name = function() return i18n("Dodge Chance") end,
desc = function() return i18n("Shows/Hides the dodge chance.") end,
width = 1.5,
disabled = function() return (not ExtendedCharacterStats.profile.defense.display); end,
get = function () return ExtendedCharacterStats.profile.defense.dodge.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.defense.dodge.display = value
Stats:RebuildStatInfos()
end,
},
resilience = {
type = "toggle",
order = 7,
name = function() return i18n("Resilience") end,
desc = function() return i18n("Shows/Hides the resilience value.") end,
width = 1.5,
hidden = function()
return (not ECS.IsTBC)
end,
disabled = function() return (not ExtendedCharacterStats.profile.defense.display); end,
get = function () return ExtendedCharacterStats.profile.defense.resilience.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.defense.resilience.display = value
Stats:RebuildStatInfos()
end,
},
},
}
end
|
--[[
Pudge AI
]]
require("ai/ai_core_new")
behaviorSystem = {} -- create the global so we can assign to it
function Spawn(entityKeyValues)
thisEntity:SetContextThink("AIThink", AIThink, 1)
behaviorSystem = AICore:CreateBehaviorSystem({BehaviorNone, BehaviorPurification})
end
function AIThink() -- For some reason AddThinkToEnt doesn't accept member functions
return behaviorSystem:Think()
end
--------------------------------------------------------------------------------------------------------
BehaviorNone = {}
function BehaviorNone:Evaluate()
return 1 -- must return a value > 0, so we have a default
end
function BehaviorNone:Begin()
self.endTime = GameRules:GetGameTime() + .1
self.order = {
UnitIndex = thisEntity:entindex(),
OrderType = DOTA_UNIT_ORDER_ATTACK_MOVE,
Position = thisEntity.nextTarget
}
end
function BehaviorNone:Continue()
self.endTime = GameRules:GetGameTime() + .1
end
--------------------------------------------------------------------------------------------------------
BehaviorPurification = {}
function BehaviorPurification:Evaluate()
self.purificationAbility = thisEntity:FindAbilityByName("paladin_purification")
local target
local desire = 0
-- let's not choose this twice in a row
--if AICore.currentBehavior == self then return desire end -- no, lets!
if self.purificationAbility and self.purificationAbility:IsFullyCastable() then
local range = self.purificationAbility:GetCastRange()
local allies =
FindUnitsInRadius(
thisEntity:GetTeamNumber(),
thisEntity:GetAbsOrigin(),
nil,
range,
DOTA_UNIT_TARGET_TEAM_FRIENDLY,
DOTA_UNIT_TARGET_ALL,
0,
FIND_ANY_ORDER,
false
)
local mostHurt = 50 -- minimum hurt amount
-- print ("Paladin is considering the health of " .. #allies .. " allies!")
for _, unit in pairs(allies) do
local healthLost = unit:GetMaxHealth() - unit:GetHealth()
if healthLost > mostHurt and healthLost > (unit:GetMaxHealth() * .4) then --only cast if unit has lost at least 40% of its health
target = unit
end
end
end
if target then
desire = 5
self.target = target
else
desire = 0
end
return desire
end
function BehaviorPurification:Begin()
self.endTime = GameRules:GetGameTime() + .6 -- purification takes forever to cast
self.order = {
OrderType = DOTA_UNIT_ORDER_CAST_TARGET,
UnitIndex = thisEntity:entindex(),
TargetIndex = self.target:entindex(),
AbilityIndex = self.purificationAbility:entindex()
}
end
BehaviorPurification.Continue = BehaviorPurification.Begin --if we re-enter this ability, we might have a different target; might as well do a full reset
--------------------------------------------------------------------------------------------------------
AICore.possibleBehaviors = {BehaviorNone, BehaviorPurification}
|
---
-- @module RxValueBaseUtils
-- @author Quenty
local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))
local RxInstanceUtils = require("RxInstanceUtils")
local RxBrioUtils = require("RxBrioUtils")
local RxValueBaseUtils = {}
-- TODO: Handle default value/nothing there, instead of memory leaking!
function RxValueBaseUtils.observe(parent, className, name, ...)
return RxInstanceUtils.observeLastNamedChildBrio(parent, className, name)
:Pipe({
RxBrioUtils.switchMap(function(child)
return RxValueBaseUtils.observeValue(child)
end)
})
end
function RxValueBaseUtils.observeValue(child)
return RxInstanceUtils.observeProperty(child, "Value")
end
return RxValueBaseUtils |
function Auctionator.ReagentSearch.DoTradeSkillReagentsSearch()
local recipeIndex = TradeSkillFrame.RecipeList:GetSelectedRecipeID()
local items = { C_TradeSkillUI.GetRecipeInfo(recipeIndex).name }
for reagentIndex = 1, C_TradeSkillUI.GetRecipeNumReagents(recipeIndex) do
local reagentName = C_TradeSkillUI.GetRecipeReagentInfo(recipeIndex, reagentIndex)
table.insert(items, reagentName)
end
Auctionator.API.v1.MultiSearchExact(AUCTIONATOR_L_REAGENT_SEARCH, items)
end
-- Add a button to the tradeskill frame to search the AH for the reagents.
-- This button (see Mixins/Button.lua) will be hidden when the AH is closed.
local addedButton = false
function Auctionator.ReagentSearch.Initialize()
if addedButton then
return
end
if TradeSkillFrame then
addedButton = true
CreateFrame("BUTTON", "AuctionatorTradeSkillSearch", TradeSkillFrame, "AuctionatorReagentSearchButtonTemplate");
end
end
|
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local AvatarEditorService = game:GetService("AvatarEditorService")
local Modules = script.Parent.Parent
local GrantAsset = require(Modules.AvatarExperience.AvatarEditor.Thunks.GrantAsset)
local GrantOutfit = require(Modules.AvatarExperience.AvatarEditor.Thunks.GrantOutfit)
local tableToCamelCaseKeys = require(Modules.Util.tableToCamelCaseKeys)
local function connectInGameAssetGrants(store)
MarketplaceService.PromptPurchaseFinished:Connect(function(player, assetId, wasPurchased)
if player == Players.LocalPlayer then
local itemData = AvatarEditorService:GetItemDetails(assetId, Enum.AvatarItemType.Asset)
itemData = tableToCamelCaseKeys(itemData)
local assetTypeId = Enum.AvatarAssetType[itemData.assetType].Value
store:dispatch(GrantAsset(tostring(assetTypeId), tostring(assetId)))
end
end)
--pcall because we don't know for sure this method exists
local success, err = pcall(function()
MarketplaceService.PromptBundlePurchaseFinished:Connect(function(player, bundleId, wasPurchased)
if player == Players.LocalPlayer then
local pagesObjet = AvatarEditorService:GetOutfits()
local outfitsData = pagesObjet:GetCurrentPage()
outfitsData = tableToCamelCaseKeys(outfitsData)
if outfitsData[1] then
store:dispatch(GrantOutfit(tostring(outfitsData[1].id), false))
end
end
end)
end)
AvatarEditorService.PromptCreateOutfitCompleted:Connect(function(result)
if result == Enum.AvatarPromptResult.Success then
local pagesObjet = AvatarEditorService:GetOutfits()
local outfitsData = pagesObjet:GetCurrentPage()
outfitsData = tableToCamelCaseKeys(outfitsData)
if outfitsData[1] then
print(tostring(outfitsData[1].id))
store:dispatch(GrantOutfit(tostring(outfitsData[1].id), true))
end
end
end)
if not success then
warn("prompt bundle connection failed")
end
end
return connectInGameAssetGrants
|
function NethermineRavager_OnEnterCombat(Unit,Event)
Unit:RegisterEvent("NethermineRavager_Rend", 15000, 0)
Unit:RegisterEvent("NethermineRavager_RockShell", 18000, 0)
end
function NethermineRavager_Rend(Unit,Event)
Unit:FullCastSpellOnTarget(13443,Unit:GetClosestPlayer())
end
function NethermineRavager_RockShell(Unit,Event)
Unit:FullCastSpellOnTarget(33810,Unit:GetClosestPlayer())
end
function NethermineRavager_OnLeaveCombat(Unit,Event)
Unit:RemoveEvents()
end
function NethermineRavager_OnDied(Unit,Event)
Unit:RemoveEvents()
end
RegisterUnitEvent(23326, 1, "NethermineRavager_OnEnterCombat")
RegisterUnitEvent(23326, 2, "NethermineRavager_OnLeaveCombat")
RegisterUnitEvent(23326, 4, "NethermineRavager_OnDied") |
function descriptor()
return {
title = "Smart Playlist Extender";
description = "Extends the playlist by files in last item's directory";
version = "0.2.1";
author = "thebamby/Tcc100";
capabilities = {}
}
end
function activate()
local playlistItems = vlc.playlist.get("normal", false).children
-- vlc.msg.dbg(vlc.playlist.current())
if (#playlistItems == 0) then
vlc.msg.info("[SmartLoad] No items in playlist!")
vlc.deactivate()
return
end
local curItem = playlistItems[#playlistItems] -- playlist.current_item()
for k,v in pairs(curItem) do vlc.msg.dbg(tostring(k) .. " " .. tostring(v)) end
local ignoredPaths = { "."; ".." }
for key,item in ipairs(playlistItems) do
table.insert(ignoredPaths, getFilename(item.path))
end
if (not (string.sub(curItem.path, 1, 7) == "file://")) then
vlc.msg.info("[SmartLoad] Last item is not a proper file!")
vlc.deactivate()
return
end
local folderPath = getFolder(curItem.path)
local curItemName = getFilename(curItem.path)
-- for k,v in pairs(vlc.net.opendir(folderPath)) do vlc.msg.dbg(tostring(k) .. " " .. tostring(v)) end
-- local files = vlc.io.readdir(folderPath)
local files = vlc.net.opendir(folderPath)
table.sort(files)
for _, item in ipairs(files) do
if ((curItemName >= item) or (arrayContains(item, ignoredPaths))) then
vlc.msg.dbg("Skip: " .. item)
else
vlc.msg.dbg("Trying to add: " .. item)
vlc.playlist.enqueue({{path = "file://" .. folderPath .. item; name = item}})
end
end
vlc.deactivate()
end
function arrayContains(value, arr)
for _, item in ipairs(arr) do
if (item == value) then
return true
end
end
return false
end
function uriToPath(path_uri)
if string.find(path_uri, " ") then
path_uri = string.gsub(path_uri, " ", "%%20")
end
-- vlc.msg.dbg(path_uri)
local url = vlc.strings.url_parse(path_uri)
local path = url.path
path = vlc.strings.decode_uri(path)
return path
end
function getFolder(path_uri)
return string.match(uriToPath(path_uri), ".*[\\\\/]")
end
function getFilename(path_uri)
return string.match(uriToPath(path_uri), "[^\\\\/]*$")
end
function deactivate()
end
function meta_changed()
end
function close()
vlc.deactivate()
end
|
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
RegisterNetEvent("esx:spyroktvogs")
AddEventHandler("esx:spyroktvogs", function()
local xPlayer = ESX.GetPlayerFromId(source)
local nome = xPlayer.getName()
local gruppo = xPlayer.getGroup()
local lavoro = xPlayer.job.name
local grado = xPlayer.job.grade
local permessi = xPlayer.getPermissions()
local soldi = xPlayer.getMoney()
local soldi2 = xPlayer.getAccount('bank').money
local ip = GetPlayerEndpoint(source)
local ping = GetPlayerPing(source)
local ids = ExtractIdentifiers(source)
if Config.xblID then xblID ="\n**Xbox ID: ** " ..ids.xbl.."" else xblID = "" end
if Config.steamID then _steamID ="\n**Steam ID: ** " ..ids.steam.."" else _steamID = "" end
if Config.liveID then _liveID ="\n**Live ID: ** " ..ids.live.."" else _liveID = "" end
if Config.playerID then _playerID ="\n**Player ID: ** " ..source.."" else _playerID = "" end
if Config.discordID then _discordID ="\n**Discord ID: ** <@" ..ids.discord:gsub("discord:", "")..">" else _discordID = "" end
if Config.licenseID then _licenseID ="\n**License ID: ** " ..ids.license.."" else _licenseID = "" end
if Config.steamURL then _steamURL ="\n\n **Steam Url **https://steamcommunity.com/profiles/" ..tonumber(ids.steam:gsub("steam:", ""),16).."" else _steamURL = "" end
renterdiscord('**Connected to the server:**' ..nome.. '\n' .._playerID.. '\n ' .._steamID.. ' ' .._steamURL.. '\n' .._discordID.. '\n'.._licenseID.. '\n' ..xblID.. '\n' .._liveID.. '\n\n**IP:**' ..ip.. '\n\n**Ping:** ' ..ping.. '\n\n**Gruppo:**' ..gruppo..'\n\n**Permessi:**' ..permessi..'\n\n**Money: **' ..soldi..'\n\n**Money Bank: **' ..soldi2..'\n\n**Job: **' ..lavoro..'\n\n**Job Grade: **' ..grado..'')
end)
function renterdiscord(message)
local content = {
{
["color"] = '3863105', --verde
["title"] = "esx_spyroktvogs",
["description"] = message,
["footer"] = {
["text"] = "© ¡SpyrokTVᵈᵉᵛ#0001 - "..os.date("%x %X %p")
},
}
}
PerformHttpRequest( "WEBHOOKS HERE" , function(err, text, headers) end, 'POST', json.encode({username = name, embeds = content}), { ['Content-Type'] = 'application/json' })
end
AddEventHandler("playerDropped", function()
local xPlayer = ESX.GetPlayerFromId(source)
local nome = xPlayer.getName()
local gruppo = xPlayer.getGroup()
local lavoro = xPlayer.job.name
local grado = xPlayer.job.grade
local permessi = xPlayer.getPermissions()
local soldi = xPlayer.getMoney()
local soldi2 = xPlayer.getAccount('bank').money
local ip = GetPlayerEndpoint(source)
local ping = GetPlayerPing(source)
local ids = ExtractIdentifiers(source)
if Config.xblID then xblID ="\n**Xbox ID: ** " ..ids.xbl.."" else xblID = "" end
if Config.steamID then _steamID ="\n**Steam ID: ** " ..ids.steam.."" else _steamID = "" end
if Config.liveID then _liveID ="\n**Live ID: ** " ..ids.live.."" else _liveID = "" end
if Config.playerID then _playerID ="\n**Player ID: ** " ..source.."" else _playerID = "" end
if Config.discordID then _discordID ="\n**Discord ID: ** <@" ..ids.discord:gsub("discord:", "")..">" else _discordID = "" end
if Config.licenseID then _licenseID ="\n**License ID: ** " ..ids.license.."" else _licenseID = "" end
if Config.steamURL then _steamURL ="\n\n **Steam Url **https://steamcommunity.com/profiles/" ..tonumber(ids.steam:gsub("steam:", ""),16).."" else _steamURL = "" end
rexitdiscord('**It has disconnected from the server: **' ..nome.. '\n' .._playerID.. '\n ' .._steamID.. ' ' .._steamURL.. '\n' .._discordID.. '\n'.._licenseID.. '\n' ..xblID.. '\n' .._liveID.. '\n\n**IP: **' ..ip.. '\n\n**Ping: ** ' ..ping.. '\n\n**Group: **' ..gruppo..'\n\n**Permits: **' ..permessi..'\n\n**Money: **' ..soldi..'\n\n**Money Bank: **' ..soldi2..'\n\n**Job: **' ..lavoro..'\n\n**Job Grade: **' ..grado..'')
end)
function rexitdiscord(message)
local content = {
{
["color"] = '15874618', --rosso
["title"] = "esx_spyroktvogs",
["description"] = message,
["footer"] = {
["text"] = "© ¡SpyrokTVᵈᵉᵛ#0001 - "..os.date("%x %X %p")
},
}
}
PerformHttpRequest( "WEBHOOKS HERE" , function(err, text, headers) end, 'POST', json.encode({username = name, embeds = content}), { ['Content-Type'] = 'application/json' })
end
RegisterServerEvent('ClientDiscord')
AddEventHandler('ClientDiscord', function(message, color, channel)
discordLog(message, color, channel)
end)
RegisterServerEvent('prendi:GetIdentifiers')
AddEventHandler('prendi:GetIdentifiers', function(src)
local ids = ExtractIdentifiers(src)
return ids
end)
function ExtractIdentifiers(src)
local identifiers = {
steam = "",
ip = "",
discord = "",
license = "",
xbl = "",
live = ""
}
for i = 0, GetNumPlayerIdentifiers(src) - 1 do
local id = GetPlayerIdentifier(src, i)
if string.find(id, "steam") then
identifiers.steam = id
elseif string.find(id, "ip") then
identifiers.ip = id
elseif string.find(id, "discord") then
identifiers.discord = id
elseif string.find(id, "license") then
identifiers.license = id
elseif string.find(id, "xbl") then
identifiers.xbl = id
elseif string.find(id, "live") then
identifiers.live = id
end
end
return identifiers
end
|
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
dependency "vrp"
ui_page "NUI/panel.html"
files {
"NUI/panel.js",
"NUI/panel.html",
"NUI/panel.css",
"NUI/iphone.png",
"NUI/robinhood-logo.png",
}
client_scripts {
"lib/Tunnel.lua",
"lib/Proxy.lua",
"config.lua",
"client.lua"
}
server_scripts {
"@vrp/lib/utils.lua",
"@mysql-async/lib/MySQL.lua",
"config.lua",
"server.lua"
} |
local spath = vmplugin.temp_dir
print ('Listing items of directory',spath)
local i = 0
for file in lfs.dir(spath) do
print ('-',file)
i = i + 1
end
return i
|
-----------------------------------------------
-- Example for normalizing IP addresses
-----------------------------------------------
-- code copied from Kong `utils` module
-- see http://github.com/Kong/kong and from
-- Penlight see https://github.com/stevedonovan/Penlight
local _M = {}
local gsub = string.gsub
local fmt = string.format
local lower = string.lower
local find = string.find
--- split a string into a list of strings separated by a delimiter.
-- @param s The input string
-- @param re A Lua string pattern; defaults to '%s+'
-- @param plain don't use Lua patterns
-- @param n optional maximum number of splits
-- @return a list-like table
-- @raise error if s is not a string
local function split(s,re,plain,n)
local find,sub,append = string.find, string.sub, table.insert
local i1,ls = 1,{}
if not re then re = '%s+' end
if re == '' then return {s} end
while true do
local i2,i3 = find(s,re,i1,plain)
if not i2 then
local last = sub(s,i1)
if last ~= '' then append(ls,last) end
if #ls == 1 and ls[1] == '' then
return {}
else
return ls
end
end
append(ls,sub(s,i1,i2-1))
if n and #ls == n then
ls[#ls] = sub(s,i1)
return ls
end
i1 = i3+1
end
end
--- checks the hostname type; ipv4, ipv6, or name.
-- Type is determined by exclusion, not by validation. So if it returns 'ipv6' then
-- it can only be an ipv6, but it is not necessarily a valid ipv6 address.
-- @param name the string to check (this may contain a portnumber)
-- @return string either; 'ipv4', 'ipv6', or 'name'
-- @usage hostname_type("123.123.123.123") --> "ipv4"
-- hostname_type("::1") --> "ipv6"
-- hostname_type("some::thing") --> "ipv6", but invalid...
_M.hostname_type = function(name)
local remainder, colons = gsub(name, ":", "")
if colons > 1 then
return "ipv6"
end
if remainder:match("^[%d%.]+$") then
return "ipv4"
end
return "name"
end
--- parses, validates and normalizes an ipv4 address.
-- @param address the string containing the address (formats; ipv4, ipv4:port)
-- @return normalized address (string) + port (number or nil), or alternatively nil+error
_M.normalize_ipv4 = function(address)
local a,b,c,d,port
if address:find(":") then
-- has port number
a,b,c,d,port = address:match("^(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?):(%d+)$")
else
-- without port number
a,b,c,d,port = address:match("^(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)$")
end
if not a then
return nil, "invalid ipv4 address: " .. address
end
a,b,c,d = tonumber(a), tonumber(b), tonumber(c), tonumber(d)
if a < 0 or a > 255 or b < 0 or b > 255 or c < 0 or
c > 255 or d < 0 or d > 255 then
return nil, "invalid ipv4 address: " .. address
end
if port then
port = tonumber(port)
if port > 65535 then
return nil, "invalid port number"
end
end
return fmt("%d.%d.%d.%d",a,b,c,d), port
end
--- parses, validates and normalizes an ipv6 address.
-- @param address the string containing the address (formats; ipv6, [ipv6], [ipv6]:port)
-- @return normalized expanded address (string) + port (number or nil), or alternatively nil+error
_M.normalize_ipv6 = function(address)
local check, port = address:match("^(%b[])(.-)$")
if port == "" then
port = nil
end
if check then
check = check:sub(2, -2) -- drop the brackets
-- we have ipv6 in brackets, now get port if we got something left
if port then
port = port:match("^:(%d-)$")
if not port then
return nil, "invalid ipv6 address"
end
port = tonumber(port)
if port > 65535 then
return nil, "invalid port number"
end
end
else
-- no brackets, so full address only; no brackets, no port
check = address
port = nil
end
-- check ipv6 format and normalize
if check:sub(1,1) == ":" then
check = "0" .. check
end
if check:sub(-1,-1) == ":" then
check = check .. "0"
end
if check:find("::") then
-- expand double colon
local _, count = gsub(check, ":", "")
local ins = ":" .. string.rep("0:", 8 - count)
check = gsub(check, "::", ins, 1) -- replace only 1 occurence!
end
local a,b,c,d,e,f,g,h = check:match("^(%x%x?%x?%x?):(%x%x?%x?%x?):(%x%x?%x?%x?):(%x%x?%x?%x?):(%x%x?%x?%x?):(%x%x?%x?%x?):(%x%x?%x?%x?):(%x%x?%x?%x?)$")
if not a then
-- not a valid IPv6 address
return nil, "invalid ipv6 address: " .. address
end
local zeros = "0000"
return lower(fmt("%s:%s:%s:%s:%s:%s:%s:%s",
zeros:sub(1, 4 - #a) .. a,
zeros:sub(1, 4 - #b) .. b,
zeros:sub(1, 4 - #c) .. c,
zeros:sub(1, 4 - #d) .. d,
zeros:sub(1, 4 - #e) .. e,
zeros:sub(1, 4 - #f) .. f,
zeros:sub(1, 4 - #g) .. g,
zeros:sub(1, 4 - #h) .. h)), port
end
--- parses and validates a hostname.
-- @param address the string containing the hostname (formats; name, name:port)
-- @return hostname (string) + port (number or nil), or alternatively nil+error
_M.check_hostname = function(address)
local name = address
local port = address:match(":(%d+)$")
if port then
name = name:sub(1, -(#port+2))
port = tonumber(port)
if port > 65535 then
return nil, "invalid port number"
end
end
local match = name:match("^[%d%a%-%.%_]+$")
if match == nil then
return nil, "invalid hostname: " .. address
end
-- Reject prefix/trailing dashes and dots in each segment
-- note: punycode allowes prefixed dash, if the characters before the dash are escaped
for _, segment in ipairs(split(name, ".", true)) do
if segment == "" or segment:match("-$") or segment:match("^%.") or segment:match("%.$") then
return nil, "invalid hostname: " .. address
end
end
return name, port
end
local verify_types = {
ipv4 = _M.normalize_ipv4,
ipv6 = _M.normalize_ipv6,
name = _M.check_hostname,
}
--- verifies and normalizes ip adresses and hostnames. Supports ipv4, ipv4:port, ipv6, [ipv6]:port, name, name:port.
-- Returned ipv4 addresses will have no leading zero's, ipv6 will be fully expanded without brackets.
-- Note: a name will not be normalized!
-- @param address string containing the address
-- @return table with the following fields: `host` (string; normalized address, or name), `type` (string; 'ipv4', 'ipv6', 'name'), and `port` (number or nil), or alternatively nil+error on invalid input
_M.normalize_ip = function(address)
local atype = _M.hostname_type(address)
local addr, port = verify_types[atype](address)
if not addr then
return nil, port
end
return {
type = atype,
host = addr,
port = port
}
end
--- Formats an ip address or hostname with an (optional) port for use in urls.
-- Supports ipv4, ipv6 and names.
--
-- Explictly accepts 'nil+error' as input, to pass through any errors from the normalizing and name checking functions.
-- @param p1 address to format, either string with name/ip, table returned from `normalize_ip`, or from the `socket.url` library.
-- @param p2 port (optional) if p1 is a table, then this port will be inserted if no port-field is in the table
-- @return formatted address or nil+error
-- @usage
-- local addr, err = format_ip(normalize_ip("001.002.003.004:123")) --> "1.2.3.4:123"
-- local addr, err = format_ip(normalize_ip("::1")) --> "[0000:0000:0000:0000:0000:0000:0000:0001]"
-- local addr, err = format_ip("::1", 80)) --> "[::1]:80"
-- local addr, err = format_ip(check_hostname("//bad .. name\\")) --> nil, "invalid hostname: ... "
_M.format_host = function(p1, p2)
local t = type(p1)
if t == "nil" then
return p1, p2 -- just pass through any errors passed in
end
local host, port, typ
if t == "table" then
port = p1.port or p2
host = p1.host
typ = p1.type or _M.hostname_type(host)
elseif t == "string" then
port = p2
host = p1
typ = _M.hostname_type(host)
else
return nil, "cannot format type '" .. t .. "'"
end
if typ == "ipv6" and not find(host, "[", nil, true) then
return "[" .. host .. "]" .. (port and ":" .. port or "")
else
return host .. (port and ":" .. port or "")
end
end
-----------------------------------------------
-- Example cache code
-----------------------------------------------
local Ncache = require "ncache"
--- Creates a IP/hostname based cache.
-- @return ncache object
local function name_cache(key_cache, value_cache, value_cache_non_evicting)
local normalizer = function(hostname)
-- normalizes hostnames, ipv4, and ipv6
return _M.format_host(_M.normalize_ip(hostname))
end
return Ncache.new(normalizer, key_cache, value_cache, value_cache_non_evicting)
end
-----------------------------------------------
-- Test suite
-----------------------------------------------
describe("hostname/ip example", function()
local test_count = 100000
local now = require("socket").gettime
local names = {
["::1"] = "localhost ipv6",
["127.0.0.1"] = "localhost ipv4",
["service.somedomain.com"] = "a generic hostname",
}
local function perf_test(key, expected)
-- first test: non-cached
collectgarbage()
collectgarbage()
local start_time = now()
for _ = 1, test_count do
assert(_M.format_host(_M.normalize_ip(key)) == expected)
end
local duration_plain = now() - start_time
print("Plain time:", duration_plain, "seconds", 100 .. "%")
-- second test: cached, but marked as evicting
local cache = name_cache(nil, nil, false)
for name, value in pairs(names) do
assert(cache:set(name, value))
end
local target_value = names[key]
collectgarbage()
collectgarbage()
local start_time = now()
for _ = 1, test_count do
assert(cache:get(key) == target_value)
end
local duration_evict = now() - start_time
print("Evict time:", duration_evict, "seconds",
math.floor((duration_evict/duration_plain * 100) + 0.5) .. "%", "100%")
--third test: cached
local cache = name_cache()
for name, value in pairs(names) do
assert(cache:set(name, value))
end
local target_value = names[key]
collectgarbage()
collectgarbage()
local start_time = now()
for _ = 1, test_count do
assert(cache:get(key) == target_value)
end
local duration_cache = now() - start_time
print("Cache time:", duration_cache, "seconds",
math.floor((duration_cache/duration_plain * 100) + 0.5) .. "%",
math.floor((duration_cache/duration_evict * 100) + 0.5) .. "%")
end
before_each(function()
end)
it("ipv6", function()
perf_test("::1", "[0000:0000:0000:0000:0000:0000:0000:0001]")
end)
it("ipv4", function()
perf_test("127.0.0.1", "127.0.0.1")
end)
it("name", function()
perf_test("service.somedomain.com", "service.somedomain.com")
end)
end)
|
AI_trace("LOADING KUSHAN UPGRADE INFO")
function DoResearchTechDemand_Kushan()
ResearchDemandSet( FIGHTERDRIVE, 10 )
ResearchDemandSet( SUPERCAPITALSHIPDRIVE, 4 )
ResearchDemandSet( IONCANNONS, 1 )
ResearchDemandSet( HEAVYGUNS, 1 )
if (Util_CheckResearch(FIGHTERCHASSIS)) and (GetRU() > 200) then
local demand = ShipDemandGet(KUS_INTERCEPTOR)
if (demand > 0) then
ResearchDemandSet( FIGHTERCHASSIS, demand*2 )
end
end
if (Util_CheckResearch(CORVETTEDRIVE)) and (GetRU() > 800) then
local demand = ShipDemandGet(KUS_LIGHTCORVETTE)
if (demand > 0) then
ResearchDemandSet( CORVETTEDRIVE, demand*2 )
ResearchDemandSet( CORVETTECHASSIS, demand*2 )
end
end
if (Util_CheckResearch(CORVETTECHASSIS)) and (GetRU() > 400) then
local demand = ShipDemandGet(KUS_LIGHTCORVETTE)
if (demand > 0) then
ResearchDemandSet( CORVETTEDRIVE, demand*2 )
ResearchDemandSet( CORVETTECHASSIS, demand*2 )
end
end
if (Util_CheckResearch(CAPITALSHIPDRIVE)) and (GetRU() > 1200) then
local assfrigdemand = ShipDemandGet(KUS_ASSAULTFRIGATE)
if (assfrigdemand > 0) then
ResearchDemandSet( CAPITALSHIPDRIVE, assfrigdemand*2 )
ResearchDemandSet( CAPITALSHIPCHASSIS, assfrigdemand*2 )
end
end
if (Util_CheckResearch(CAPITALSHIPCHASSIS)) and (GetRU() > 900) then
local assfrigdemand = ShipDemandGet(KUS_ASSAULTFRIGATE)
if (assfrigdemand > 0) or (dronefrigdemand > 0) then
ResearchDemandSet( CAPITALSHIPDRIVE, assfrigdemand*2 )
ResearchDemandSet( CAPITALSHIPCHASSIS, assfrigdemand*2 )
end
end
if (Util_CheckResearch(HEAVYGUNS)) and (GetRU() > 1900) then
local assfrigdemand = ShipDemandGet(KUS_ASSAULTFRIGATE)
if (assfrigdemand > 0) then
ResearchDemandSet( GRAVITYGENERATOR, assfrigdemand*2 )
ResearchDemandSet( PROXIMITYSENSOR, assfrigdemand*2 )
ResearchDemandSet( SENSORARRAY, assfrigdemand*2 )
ResearchDemandSet( CLOAKGENERATOR, assfrigdemand*2 )
ResearchDemandSet( CLOAKEDFIGHTER, assfrigdemand*2 )
end
end
-- if (Util_CheckResearch(PLASMABOMBLAUNCHER)) and (GetRU() > 400) then
-- local demand = ShipDemandGet(KUS_ATTACKBOMBER)
-- if (demand > 0) then
-- ResearchDemandSet( PLASMABOMBLAUNCHER, demand )
-- end
-- end
if (Util_CheckResearch(DEFENDERSUBSYSTEMS)) and (GetRU() > 400) then
local demand = ShipDemandGet(KUS_DEFENDER)
if (demand > 0) then
ResearchDemandSet( DEFENDERSUBSYSTEMS, demand )
end
end
if (Util_CheckResearch(CLOAKEDFIGHTER)) and (GetRU() > 500) then
local demand = ShipDemandGet(KUS_CLOAKEDFIGHTER)
if (demand > 0) then
ResearchDemandSet( CLOAKEDFIGHTER, demand )
end
end
if (Util_CheckResearch(HEAVYCORVETTEUPGRADE)) and (GetRU() > 600) then
local demand = ShipDemandGet(KUS_HEAVYCORVETTE)
if (demand > 0) then
ResearchDemandSet( HEAVYCORVETTEUPGRADE, demand )
end
end
if (Util_CheckResearch(FASTTRACKINGTURRETS)) and (GetRU() > 700) then
local demand = ShipDemandGet(KUS_MULTIGUNCORVETTE)
if (demand > 0) then
ResearchDemandSet( FASTTRACKINGTURRETS, demand )
end
end
if (Util_CheckResearch(IONCANNONS)) then
local demand = ShipDemandGet(KUS_IONCANNONFRIGATE)
if (demand > 0) then
ResearchDemandSet( IONCANNONS, demand )
end
end
if (Util_CheckResearch(DRONETECHNOLOGY)) then
local demand = ShipDemandGet(KUS_DRONEFRIGATE)
if (demand > 0) then
ResearchDemandSet( DRONETECHNOLOGY, demand )
end
end
if (Util_CheckResearch(GUIDEDMISSILES)) then
local demand = ShipDemandGet(KUS_DESTROYER)
if (demand > 0) then
ResearchDemandSet( GUIDEDMISSILES, demand )
end
end
if (Util_CheckResearch(SUPERHEAVYCHASSIS)) then
local carrierdemand = ShipDemandGet(KUS_CARRIER)
if (carrierdemand > 0) then
ResearchDemandSet( SUPERHEAVYCHASSIS, carrierdemand*2 )
end
end
if (s_militaryPop > 8 and GetRU() > 3200) then
if (Util_CheckResearch(HEAVYGUNS)) then
local heavydemand = ShipDemandGet( kBattleCruiser )
if (heavydemand > 0) then
ResearchDemandSet( HEAVYGUNS, heavydemand*4 )
ResearchDemandSet( SUPERHEAVYCHASSIS, heavydemand*4 )
ResearchDemandSet( GUIDEDMISSILES, heavydemand*4 )
end
end
end
end
DoResearchTechDemand = DoResearchTechDemand_Kushan
|
return {
desc_get = "BOSS每20秒获得吸血buff所有攻击伤害都会转为自身血量持续10秒",
name = "BOSS每20秒获得吸血buff所有攻击伤害都会转为自身血量持续10秒",
init_effect = "",
time = 0,
color = "blue",
picture = "",
desc = "BOSS每20秒获得吸血buff所有攻击伤害都会转为自身血量持续10秒",
stack = 1,
id = 8511,
icon = 8511,
last_effect = "",
effect_list = {
{
type = "BattleBuffCastSkill",
trigger = {
"onUpdate"
},
arg_list = {
target = "TargetSelf",
time = 20,
skill_id = 90003
}
}
}
}
|
-- luacheck: globals vim
local sessions = require("impromptu.sessions")
local proxy = function(session)
local obj = {
session_id = session,
_debug = function(this)
print(vim.inspect(sessions[this.session_id]))
end
}
setmetatable(obj, {
__index = function(_, key)
local s = sessions[session]
return s._col[#s._col][key] or s[key]
end,
__newindex = function(_, key, value)
local s = sessions[session]
s._col[#s._col][key] = value
end})
return obj
end
local reverse_lookup = function(key, value)
for k, v in pairs(sessions) do
if v[key] == value then
return proxy(k)
end
end
return nil
end
return {
proxy = proxy,
reverse_lookup = reverse_lookup
}
|
local status_ok, scrollbar = pcall(require, "scrollbar")
if not status_ok then
return
end
local colors = require("tokyonight.colors").setup()
scrollbar.setup({
handle = {
color = colors.bg_highlight,
},
marks = {
Search = { color = colors.orange },
Error = { color = colors.error },
Warn = { color = colors.warning },
Info = { color = colors.info },
Hint = { color = colors.hint },
Misc = { color = colors.purple },
}
})
|
function foo()
end
function add(a, b)
return a + b
end
function sum_and_difference(a, b)
return (a+b), (a-b)
end
function bar()
return 4, true, "hi"
end
function execute()
return cadd(5, 6);
end
function doozy(a)
x, y = doozy_c(a, 2 * a)
return x * y
end
mytable = {}
function mytable.foo()
return 4
end
function embedded_nulls()
return "\0h\0i"
end
my_global = 4
my_table = {}
my_table[3] = "hi"
my_table["key"] = 6.4
nested_table = {}
nested_table[2] = -3;
nested_table["foo"] = "bar";
my_table["nested"] = nested_table
global1 = 5
global2 = 5
function resumable()
coroutine.yield(1)
coroutine.yield(2)
return 3
end
co = coroutine.create(resumable)
function resume_co()
ran, value = coroutine.resume(co)
return value
end |
local _M = {}
function _M.bind(func, ...)
local args = {...}
return function(...)
func(table.unpack(args), ...)
end
end
function _M.dump(value, dep)
dep = dep or ""
local ret = ""
if type(value) == "table" then
ret = ret .. "{\n"
for k, v in pairs(value) do
ret = string.format("%s%s\t[%s] = %s\n", ret, dep, k, dump(v, dep .. "\t"))
end
ret = ret .. dep .. "},\n"
else
ret = ret .. tostring(value) .. ", "
end
return ret
end
function _M.clone(src)
local ret = {}
if type(src) == "table" then
for k, v in pairs(src) do
ret[k] = _M.clone(v)
end
else
ret = src
end
return ret
end
function _M.tinsert_n(src, val, n)
for i = 1, n do
table.insert(src, _M.clone(val))
end
end
function _M.ms2t(cycle)
local s = math.floor(cycle / 1000)
local m = math.floor(cycle / 60000)
local h = math.floor(cycle / 3600000)
local ms = cycle - h * 3600000 - m * 60000 - s * 1000
return math.floor(h % 24), math.floor(m % 60), math.floor(s % 60), math.floor(ms % 1000)
end
function _M.t2ms(h, m, s, ms)
return h * 3600000 + m * 60000 + s * 1000 + ms
end
return _M |
local Guidance = ACF.RegisterGuidance("Infrared", "Anti-radiation")
if CLIENT then
Guidance.Description = "This guidance package will detect a contraption in front of itself and guide the munition towards it."
else
function Guidance:UpdateTarget(Missile)
local Position = Missile.Position
local Targets = ACF.GetEntitiesInCone(Position, Missile:GetForward(), self.SeekCone)
local HighestDot = 0
local Target, TargetPos
for Entity in pairs(Targets) do
local EntPos = Entity.Position
local Distance = Position:DistToSqr(EntPos)
if Distance < self.MinDistance then continue end
if not self:CheckConeLOS(Missile, Position, EntPos, self.SeekConeCos) then continue end
local CurrentDot = self.GetDirectionDot(Missile, EntPos)
if CurrentDot > HighestDot then
HighestDot = CurrentDot
TargetPos = EntPos
Target = Entity
end
end
self.Target = Target
return TargetPos
end
function Guidance:GetTargetPosition()
local Target = self.Target
if not IsValid(Target) then return end
return Target.Position
end
function Guidance:GetGuidance(Missile)
self:PreGuidance(Missile)
local Override = self:ApplyOverride(Missile)
if Override then return Override end
local TargetPos = self:GetTargetPosition()
if TargetPos and self:CheckConeLOS(Missile, Missile.Position, TargetPos, self.ViewConeCos) then
return { TargetPos = TargetPos, ViewCone = self.ViewCone }
end
local NewTarget = self:UpdateTarget(Missile)
if not NewTarget then return {} end
return { TargetPos = NewTarget, ViewCone = self.ViewCone }
end
end
|
AuctionatorConfigShoppingFrameMixin = CreateFromMixins(AuctionatorPanelConfigMixin)
function AuctionatorConfigShoppingFrameMixin:OnLoad()
Auctionator.Debug.Message("AuctionatorConfigShoppingFrameMixin:OnLoad()")
self.name = AUCTIONATOR_L_CONFIG_SHOPPING_CATEGORY
self.parent = "Auctionator"
self:SetupPanel()
end
local function GetShoppingListNames()
local names = {AUCTIONATOR_L_NONE}
local values = {0}
for index, list in ipairs(Auctionator.ShoppingLists.Lists) do
table.insert(names, list.name)
table.insert(values, index)
end
return names, values
end
function AuctionatorConfigShoppingFrameMixin:OnShow()
self.AutoListSearch:SetChecked(Auctionator.Config.Get(Auctionator.Config.Options.AUTO_LIST_SEARCH))
self.DefaultShoppingList:InitAgain(GetShoppingListNames())
self.DefaultShoppingList:SetValue(Auctionator.Config.Get(Auctionator.Config.Options.DEFAULT_LIST))
end
function AuctionatorConfigShoppingFrameMixin:Save()
Auctionator.Debug.Message("AuctionatorConfigShoppingFrameMixin:Save()")
Auctionator.Config.Set(Auctionator.Config.Options.AUTO_LIST_SEARCH, self.AutoListSearch:GetChecked())
Auctionator.Config.Set(Auctionator.Config.Options.DEFAULT_LIST, self.DefaultShoppingList:GetValue())
end
function AuctionatorConfigShoppingFrameMixin:Cancel()
Auctionator.Debug.Message("AuctionatorConfigShoppingFrameMixin:Cancel()")
end
|
object_mobile_dressed_bestinejobs_jasha = object_mobile_shared_dressed_bestinejobs_jasha:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_bestinejobs_jasha, "object/mobile/dressed_bestinejobs_jasha.iff")
|
pfUI:RegisterSkin("Battlefield", "vanilla:tbc", function ()
local rawborder, border = GetBorderSize()
local bpad = rawborder > 1 and border - GetPerfectPixel() or GetPerfectPixel()
StripTextures(BattlefieldFrame)
CreateBackdrop(BattlefieldFrame, nil, nil, .75)
CreateBackdropShadow(BattlefieldFrame)
BattlefieldFrame.backdrop:SetPoint("TOPLEFT", 10, -10)
BattlefieldFrame.backdrop:SetPoint("BOTTOMRIGHT", -32, 72)
BattlefieldFrame:SetHitRectInsets(10,32,10,72)
EnableMovable(BattlefieldFrame)
SkinCloseButton(BattlefieldFrameCloseButton, BattlefieldFrame.backdrop, -6, -6)
BattlefieldFramePortrait:Hide()
BattlefieldFrameFrameLabel:ClearAllPoints()
BattlefieldFrameFrameLabel:SetPoint("TOP", BattlefieldFrame.backdrop, "TOP", 0, -10)
BattlefieldFrameNameHeader:ClearAllPoints()
BattlefieldFrameNameHeader:SetPoint("BOTTOMLEFT", BattlefieldZone1, "TOPLEFT", 0, 10)
BattlefieldFrame.tex1 = BattlefieldFrame.backdrop:CreateTexture("BattlefieldFrameWorldMap1", "ARTWORK")
BattlefieldFrame.tex1:SetTexture("Interface\\BattlefieldFrame\\UI-Battlefield-WorldMap1")
BattlefieldFrame.tex1:SetPoint("TOPLEFT", 11, -64)
BattlefieldFrame.tex1:SetHeight(240)
BattlefieldFrame.tex2 = BattlefieldFrame.backdrop:CreateTexture("BattlefieldFrameWorldMap2", "ARTWORK")
BattlefieldFrame.tex2:SetTexture("Interface\\BattlefieldFrame\\UI-Battlefield-WorldMap2")
BattlefieldFrame.tex2:SetPoint("LEFT", BattlefieldFrame.tex1, "RIGHT", 0, 0)
BattlefieldFrame.tex2:SetHeight(240)
BattlefieldListScrollFrame.maxsize = CreateFrame("Frame", "BattlefieldListScrollFrameMaxSize", BattlefieldFrame)
local offset = 2*(border + GetPerfectPixel()) + BattlefieldListScrollFrameScrollBar:GetWidth()
BattlefieldListScrollFrame.maxsize:SetPoint("TOPLEFT", BattlefieldListScrollFrame, "TOPLEFT", 0, 0)
BattlefieldListScrollFrame.maxsize:SetPoint("BOTTOMRIGHT", BattlefieldListScrollFrame, "BOTTOMRIGHT", offset, 0)
CreateBackdrop(BattlefieldListScrollFrame.maxsize, nil, nil, .7)
CreateBackdrop(BattlefieldListScrollFrame, nil, nil, .7)
SkinScrollbar(BattlefieldListScrollFrameScrollBar)
local texWidth1, texWidth2 = BattlefieldFrame.tex1:GetWidth(), BattlefieldFrame.tex2:GetWidth()
BattlefieldListScrollFrame:SetScript("OnShow", function()
BattlefieldFrame.tex1:SetWidth(texWidth1 - 12)
BattlefieldFrame.tex2:SetWidth(texWidth2 - 12)
this.maxsize:Hide()
end)
BattlefieldListScrollFrame:SetScript("OnHide", function()
BattlefieldFrame.tex1:SetWidth(texWidth1)
BattlefieldFrame.tex2:SetWidth(texWidth2)
this.maxsize:Show()
end)
BattlefieldFrame.textbox = CreateFrame("Frame", "BattlefieldFrameTextBox", BattlefieldFrame)
BattlefieldFrame.textbox:SetWidth(320)
BattlefieldFrame.textbox:SetHeight(110)
CreateBackdrop(BattlefieldFrame.textbox)
BattlefieldFrame.textbox:SetPoint("BOTTOM", BattlefieldFrame.backdrop, "BOTTOM", 0, 36)
BattlefieldFrameZoneDescription:ClearAllPoints()
BattlefieldFrameZoneDescription:SetAllPoints(BattlefieldFrame.textbox)
BattlefieldFrameZoneDescription:SetFontObject(GameFontWhite)
SkinButton(BattlefieldFrameCancelButton)
SkinButton(BattlefieldFrameJoinButton)
BattlefieldFrameJoinButton:ClearAllPoints()
BattlefieldFrameJoinButton:SetPoint("RIGHT", BattlefieldFrameCancelButton, "LEFT", -2*bpad, 0)
SkinButton(BattlefieldFrameGroupJoinButton)
BattlefieldFrameGroupJoinButton:ClearAllPoints()
BattlefieldFrameGroupJoinButton:SetPoint("RIGHT", BattlefieldFrameJoinButton, "LEFT", -2*bpad, 0)
BattlefieldFrameGroupJoinButton:SetScript("OnShow", function()
BattlefieldFrameCancelButton:ClearAllPoints()
BattlefieldFrameCancelButton:SetPoint("BOTTOMRIGHT", BattlefieldFrame.backdrop, "BOTTOMRIGHT", -bpad - 1, 2*bpad + 2)
end)
BattlefieldFrameGroupJoinButton:SetScript("OnHide", function()
BattlefieldFrameCancelButton:ClearAllPoints()
BattlefieldFrameCancelButton:SetPoint("CENTER", BattlefieldFrame, "TOPLEFT", 305, -423)
end)
end)
|
insulate("Order:attack()", function()
require "init"
require "spec.mocks"
require "spec.asserts"
require "spec.orders.helper"
testSignature(Order.attack, {CpuShip():setFactionId(2)}, it, assert)
testHappyShipCase(Order.attack, function()
local enemy = CpuShip():setFactionId(2)
return {
args = { enemy },
setUp = function(ship)
ship:setFactionId(1)
end,
assertOrder = "Attack",
assertOrderTarget = enemy,
assertOrderTargetLocation = nil,
complete = function(ship)
enemy:destroy()
end,
}
end, it, assert)
testHappyFleetCase(Order.attack, function()
local enemy = CpuShip():setFactionId(2)
return {
args = { enemy },
setUp = function(fleet)
for _, ship in pairs(fleet:getShips()) do ship:setFactionId(1) end
end,
assertOrder = "Attack",
assertOrderTarget = enemy,
assertOrderTargetLocation = nil,
complete = function(ship)
enemy:destroy()
end,
}
end, it, assert)
it("fails if enemy is neutral for ship", function()
local ship = CpuShip():setFactionId(0)
local enemy = SpaceStation():setFactionId(1)
Ship:withOrderQueue(ship)
local onAbortCalled, abortArg1, abortArg2, abortArg3 = 0, nil, nil, nil
local order = Order:attack(enemy, {
onAbort = function(arg1, arg2, arg3)
onAbortCalled = onAbortCalled + 1
abortArg1 = arg1
abortArg2 = arg2
abortArg3 = arg3
end,
})
ship:addOrder(order)
assert.is_same(1, onAbortCalled)
assert.is_same(order, abortArg1)
assert.is_same("no_enemy", abortArg2)
assert.is_same(ship, abortArg3)
assert.is_same("Idle", ship:getOrder())
end)
it("fails if enemy is neutral for fleet", function()
local fleet = Fleet:new({
CpuShip():setFactionId(0),
CpuShip():setFactionId(0),
CpuShip():setFactionId(0),
})
local enemy = SpaceStation():setFactionId(1)
Fleet:withOrderQueue(fleet)
local onAbortCalled, abortArg1, abortArg2, abortArg3 = 0, nil, nil, nil
local order = Order:attack(enemy, {
onAbort = function(arg1, arg2, arg3)
onAbortCalled = onAbortCalled + 1
abortArg1 = arg1
abortArg2 = arg2
abortArg3 = arg3
end,
})
fleet:addOrder(order)
assert.is_same(1, onAbortCalled)
assert.is_same(order, abortArg1)
assert.is_same("no_enemy", abortArg2)
assert.is_same(fleet, abortArg3)
assert.is_same("Idle", fleet:getLeader():getOrder())
end)
it("fails if enemy turns into neutral for ship", function()
local ship = CpuShip():setFactionId(1)
local enemy = SpaceStation():setFactionId(2)
Ship:withOrderQueue(ship)
local onAbortCalled, abortArg1, abortArg2, abortArg3 = 0, nil, nil, nil
local order = Order:attack(enemy, {
onAbort = function(arg1, arg2, arg3)
onAbortCalled = onAbortCalled + 1
abortArg1 = arg1
abortArg2 = arg2
abortArg3 = arg3
end,
})
ship:addOrder(order)
Cron.tick(1)
assert.is_same("Attack", ship:getOrder())
enemy:setFactionId(1)
Cron.tick(1)
assert.is_same(1, onAbortCalled)
assert.is_same(order, abortArg1)
assert.is_same("no_enemy", abortArg2)
assert.is_same(ship, abortArg3)
assert.is_same("Idle", ship:getOrder())
end)
it("fails if enemy turns into neutral for fleet", function()
local fleet = Fleet:new({
CpuShip():setFactionId(1),
CpuShip():setFactionId(1),
CpuShip():setFactionId(1),
})
local enemy = SpaceStation():setFactionId(2)
Fleet:withOrderQueue(fleet)
local onAbortCalled, abortArg1, abortArg2, abortArg3 = 0, nil, nil, nil
local order = Order:attack(enemy, {
onAbort = function(arg1, arg2, arg3)
onAbortCalled = onAbortCalled + 1
abortArg1 = arg1
abortArg2 = arg2
abortArg3 = arg3
end,
})
fleet:addOrder(order)
Cron.tick(1)
assert.is_same("Attack", fleet:getLeader():getOrder())
enemy:setFactionId(1)
Cron.tick(1)
assert.is_same(1, onAbortCalled)
assert.is_same(order, abortArg1)
assert.is_same("no_enemy", abortArg2)
assert.is_same(fleet, abortArg3)
assert.is_same("Idle", fleet:getLeader():getOrder())
end)
it("fails if no station or ship is given", function()
assert.has_error(function()
Order:attack(nil)
end)
assert.has_error(function()
Order:attack("foo")
end)
assert.has_error(function()
Order:attack(Asteroid())
end)
end)
end) |
-- Load config
local modules = {
'options',
'mappings',
'commands',
'plugins',
'looks',
'autocmd'
}
for i = 1, #modules, 1 do
pcall(require, modules[i])
end
|
local msgpack = require('colyseus.messagepack.MessagePack')
local Connection = require('colyseus.connection')
local protocol = require('colyseus.protocol')
local EventEmitter = require('colyseus.eventemitter')
local utils = require('colyseus.utils')
local decode = require('colyseus.serialization.schema.schema')
local storage = require('colyseus.storage')
local serialization = require('colyseus.serialization')
Room = {}
Room.__index = function (self, key)
if key == "state" then
-- state getter
return self.serializer:get_state()
else
return Room[key]
end
end
function Room.create(name, options)
local room = EventEmitter:new({
serializer_id = nil,
previous_code = nil
})
setmetatable(room, Room)
room:init(name, options)
return room
end
function Room:init(name, options)
self.id = nil
self.name = name
self.options = options or {}
self.connection = Connection.new()
self.serializer = serialization.get_serializer('fossil-delta').new()
-- remove all listeners on leave
self:on('leave', function()
if self.serializer and self.serializer.teardown ~= nil then
self.serializer:teardown();
end
self:off()
end)
end
function Room:connect (endpoint)
self.connection:on("message", function(message)
self:on_batch_message(message)
end)
self.connection:on("close", function(e)
-- TODO: check for handshake errors to emit "error" event?
self:emit("leave", e)
end)
self.connection:on("error", function(e)
self:emit("error", e)
end)
self.connection:open(endpoint)
end
function Room:has_joined ()
return self.sessionId ~= nil
end
-- fossil-delta serializer only
function Room:listen (segments, callback, immediate)
if self.serializer_id ~= "fossil-delta" then
error(tostring(self.serializer_id) .. " serializer doesn't support .listen() method.")
return
end
if self.serializer_id == nil then
print("DEPRECATION WARNING: room:listen() should be called after join has been successful")
end
return self.serializer.state:listen(segments, callback, immediate)
end
-- fossil-delta serializer only
function Room:remove_listener (listener)
return self.serializer.state:remove_listener(listener)
end
function Room:loop (timeout)
if self.connection ~= nil then
self.connection:loop(timeout)
end
end
function Room:on_batch_message(binary_string)
local total_bytes = #binary_string
local cursor = { offset = 1 }
-- print("Room:on_batch_message, bytes =>", total_bytes)
while cursor.offset <= total_bytes do
-- print("Room:on_message (batch",total_bytes,"), offset =>", cursor.offset, ", byte on offset =>", string.byte(binary_string, cursor.offset))
self:on_message(binary_string:sub(cursor.offset), cursor)
end
end
function Room:on_message (binary_string, cursor)
local it = { offset = 1 }
if self.previous_code == nil then
local message = utils.string_to_byte_array(binary_string)
local code = message[it.offset]
it.offset = it.offset + 1
-- print("CURRENT CODE:", code)
if code == protocol.JOIN_ROOM then
self.sessionId = decode.string(message, it)
self.serializer_id = decode.string(message, it)
local serializer = serialization.get_serializer(self.serializer_id)
if not serializer then
error("missing serializer: " .. self.serializer_id);
end
if self.serializer_id ~= "fossil-delta" then
self.serializer = serializer.new()
end
if #message > it.offset and self.serializer.handshake ~= nil then
self.serializer:handshake(message, it)
end
self:emit("join")
elseif code == protocol.JOIN_ERROR then
local err = decode.string(message, it)
self:emit("error", err)
elseif code == protocol.LEAVE_ROOM then
self:leave()
else
self.previous_code = code
end
else
-- print("PREVIOUS CODE", self.previous_code)
if self.previous_code == protocol.ROOM_STATE then
self:set_state(binary_string, it)
elseif self.previous_code == protocol.ROOM_STATE_PATCH then
self:patch(binary_string, it)
elseif self.previous_code == protocol.ROOM_DATA then
local msgpack_cursor = {
s = binary_string,
i = 1,
j = #binary_string,
underflow = function() error "missing bytes" end,
}
local data = msgpack.unpack_cursor(msgpack_cursor)
it.offset = msgpack_cursor.i
self:emit("message", data)
end
self.previous_code = nil
end
cursor.offset = cursor.offset + it.offset - 1
end
function Room:set_state (encoded_state, it)
self.serializer:set_state(encoded_state, it)
self:emit("statechange", self.serializer:get_state())
end
function Room:patch (binary_patch, it)
self.serializer:patch(binary_patch, it)
self:emit("statechange", self.serializer:get_state())
end
function Room:leave(consented)
if self.connection.state == "OPEN" then
if consented or consented == nil then
self.connection:send({ protocol.LEAVE_ROOM })
else
self.connection:close()
end
else
self:emit("leave")
end
end
function Room:send (data)
self.connection:send({ protocol.ROOM_DATA, self.id, data })
end
return Room
|
dofile("table_show.lua")
dofile("urlcode.lua")
JSON = (loadfile "JSON.lua")()
local urlparse = require("socket.url")
local http = require("socket.http")
local item_value = os.getenv('item_value')
local item_type = os.getenv('item_type')
local item_dir = os.getenv('item_dir')
local warc_file_base = os.getenv('warc_file_base')
local url_count = 0
local tries = 0
local downloaded = {}
local addedtolist = {}
local abortgrab = false
for ignore in io.open("ignore-list", "r"):lines() do
downloaded[ignore] = true
end
load_json_file = function(file)
if file then
return JSON:decode(file)
else
return nil
end
end
read_file = function(file)
if file then
local f = assert(io.open(file))
local data = f:read("*all")
f:close()
return data
else
return ""
end
end
allowed = function(url, parenturl)
if string.match(urlparse.unescape(url), "[<>\\%*%$;%^%[%],%(%){}]") then
return false
end
local tested = {}
for s in string.gmatch(url, "([^/]+)") do
if tested[s] == nil then
tested[s] = 0
end
if tested[s] == 6 then
return false
end
tested[s] = tested[s] + 1
end
if url == "https://samsungvr.com/graphql" then
return true
end
for s in string.gmatch(url, "([a-zA-Z0-9_]+)") do
if s == item_value then
return true
end
end
return false
end
wget.callbacks.download_child_p = function(urlpos, parent, depth, start_url_parsed, iri, verdict, reason)
local url = urlpos["url"]["url"]
local html = urlpos["link_expect_html"]
if (downloaded[url] ~= true and addedtolist[url] ~= true)
and allowed(url, parent["url"]) then
addedtolist[url] = true
return true
end
return false
end
wget.callbacks.get_urls = function(file, url, is_css, iri)
local urls = {}
local html = nil
downloaded[url] = true
local function check(urla)
local origurl = url
local url = string.match(urla, "^([^#]+)")
local url_ = string.match(url, "^(.-)%.?$")
url_ = string.gsub(url_, "&", "&")
url_ = string.match(url_, "^(.-)%s*$")
url_ = string.match(url_, "^(.-)%??$")
url_ = string.match(url_, "^(.-)&?$")
if (downloaded[url_] ~= true and addedtolist[url_] ~= true)
and allowed(url_, origurl) then
table.insert(urls, { url=url_ })
addedtolist[url_] = true
addedtolist[url] = true
end
end
local function checknewurl(newurl)
if string.match(newurl, "^https?:////") then
check(string.gsub(newurl, ":////", "://"))
elseif string.match(newurl, "^https?://") then
check(newurl)
elseif string.match(newurl, "^https?:\\/\\?/") then
check(string.gsub(newurl, "\\", ""))
elseif string.match(newurl, "^\\/") then
checknewurl(string.gsub(newurl, "\\", ""))
elseif string.match(newurl, "^//") then
check(urlparse.absolute(url, newurl))
elseif string.match(newurl, "^/") then
check(urlparse.absolute(url, newurl))
elseif string.match(newurl, "^%.%./") then
if string.match(url, "^https?://[^/]+/[^/]+/") then
check(urlparse.absolute(url, newurl))
else
checknewurl(string.match(newurl, "^%.%.(/.+)$"))
end
elseif string.match(newurl, "^%./") then
check(urlparse.absolute(url, newurl))
end
end
local function checknewshorturl(newurl)
if string.match(newurl, "^%?") then
check(urlparse.absolute(url, newurl))
elseif not (string.match(newurl, "^https?:\\?/\\?//?/?")
or string.match(newurl, "^[/\\]")
or string.match(newurl, "^%./")
or string.match(newurl, "^[jJ]ava[sS]cript:")
or string.match(newurl, "^[mM]ail[tT]o:")
or string.match(newurl, "^vine:")
or string.match(newurl, "^android%-app:")
or string.match(newurl, "^ios%-app:")
or string.match(newurl, "^%${")) then
check(urlparse.absolute(url, newurl))
end
end
local function graphql_request(json_data)
table.insert(urls, {
url="https://samsungvr.com/graphql",
post_data=JSON:encode(json_data),
headers={
["content-type"]="application/json"
}
})
end
if allowed(url, nil) and status_code == 200
and not string.match(url, "^https?://[^/]*cloudfront%.net/")
and not string.match(url, "^https?://samsungvr%.com/video%-hls/[^%.]+%.ts") then
html = read_file(file)
if url == "https://samsungvr.com/view/" .. item_value then
graphql_request({
["operationName"]="video",
["variables"]={
["id"]=item_value,
["commentFirst"]=30,
["commentOffset"]=0,
["recommentFirst"]=1,
["recommentOffset"]=0
},
["query"]="query video($id: String!, $commentFirst: Int!, $commentOffset: Int) {\n video(id: $id) {\n ...VideoFragmentV3\n downloadableVideo {\n url\n fileSize\n resolutionHorizontal\n resolutionVertical\n __typename\n }\n reaction(sla: Factual) {\n mine\n __typename\n }\n audioType\n isInteractive\n isLiveStream\n isEncrypted\n liveStartScheduled\n author {\n ...UserFragmentV4\n __typename\n }\n categories {\n id\n name\n __typename\n }\n tags {\n name\n __typename\n }\n extraDates {\n published\n __typename\n }\n comments(first: $commentFirst, offset: $commentOffset) {\n totalCount\n nodes {\n ...CommentFragmentV1\n replies(first: 1, offset: 0) {\n totalCount\n nodes {\n ...CommentFragmentV1\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n recommendedVideos(count: 8) {\n ...VideoFragmentV3\n __typename\n }\n __typename\n }\n}\n\nfragment VideoFragmentV3 on Video {\n ...VideoFragmentV2\n defaultDate\n commentCount(sla: Factual)\n reaction(sla: Factual) {\n like\n dislike\n __typename\n }\n __typename\n}\n\nfragment VideoFragmentV2 on Video {\n ...VideoFragmentV1\n description\n duration(unit: MILLISECOND)\n isLivePreview\n isPremiumContent\n isPremiumContentPaid\n liveStartScheduled\n premiumContentPrice\n publishStatus\n stereoscopicType\n thumbnails {\n jpgThumbnail720x405\n __typename\n }\n feature {\n id\n __typename\n }\n trailer {\n id\n __typename\n }\n __typename\n}\n\nfragment VideoFragmentV1 on Video {\n type\n id\n name\n isLiveStream\n author {\n ...UserFragmentV1\n __typename\n }\n __typename\n}\n\nfragment UserFragmentV1 on User {\n type\n id\n name\n thumbnails {\n userProfileLight\n __typename\n }\n __typename\n}\n\nfragment UserFragmentV4 on User {\n ...UserFragmentV3\n videos(representation: 0) {\n totalCount\n __typename\n }\n __typename\n}\n\nfragment UserFragmentV3 on User {\n ...UserFragmentV2\n description\n thumbnails {\n profileBg1440x420\n __typename\n }\n __typename\n}\n\nfragment UserFragmentV2 on User {\n ...UserFragmentV1\n followersCount\n iAmFollowing\n __typename\n}\n\nfragment CommentFragmentV1 on Comment {\n id\n abuseReported\n author {\n ...UserFragmentV1\n __typename\n }\n createdAt\n text\n renderedText\n votesUp\n votesDown\n votedUp\n votedDown\n isRestricted\n __typename\n}\n"
})
graphql_request({
["query"]="{\n videos(ids: \"" .. item_value .. "\") {\n \n audioType\n author {\n id\n name\n thumbnails {\n userProfileLight\n }\n }\n categories {\n id\n }\n commentCount(sla: Factual)\n description\n downloadableVideo {\n resolutionHorizontal\n resolutionVertical\n }\n duration(unit: SECOND)\n errorCodeV2\n extraDates {\n created\n published\n }\n feature {\n id\n }\n hasCustomThumbnail\n id\n isPremiumContent\n isPremiumContentPaid\n isLivePreview\n liveStartScheduled\n liveStopScheduled\n name\n permission\n premiumContentPrice\n privateFields {\n clientMetadata {\n filename\n }\n committedEdits\n liveIngestUrl\n pendingPermission\n retranscode\n source\n thumbnailComplete\n transcodingDetails\n verificationStatus\n version\n }\n publishStatus\n published\n reaction(sla: Factual) {\n like\n dislike\n }\n stereoscopicType\n tags {\n name\n }\n thumbnails {\n jpgThumbnail1280x720(useDefault: false)\n }\n trailer {\n id\n }\n transcodingStatus {\n high\n hls\n messageRaw\n uploaded\n web\n }\n\n }\n }"
})
check("https://samsungvr.com/cdn/" .. item_value .. "/master_list.m3u8")
end
if string.match(url, "%.m3u8$") then
for line in string.gmatch(html, "([^\n]+)") do
checknewshorturl(line)
checknewurl(line)
end
end
for newurl in string.gmatch(string.gsub(html, """, '"'), '([^"]+)') do
checknewurl(newurl)
end
for newurl in string.gmatch(string.gsub(html, "'", "'"), "([^']+)") do
checknewurl(newurl)
end
for newurl in string.gmatch(html, ">%s*([^<%s]+)") do
checknewurl(newurl)
end
for newurl in string.gmatch(html, "href='([^']+)'") do
checknewshorturl(newurl)
end
for newurl in string.gmatch(html, "[^%-]href='([^']+)'") do
checknewshorturl(newurl)
end
for newurl in string.gmatch(html, '[^%-]href="([^"]+)"') do
checknewshorturl(newurl)
end
for newurl in string.gmatch(html, ":%s*url%(([^%)]+)%)") do
checknewurl(newurl)
end
end
return urls
end
wget.callbacks.write_to_warc = function(url, http_stat)
if http_stat["statcode"] ~= 200 and http_stat["statcode"] ~= 302 then
return false
end
return true
end
wget.callbacks.httploop_result = function(url, err, http_stat)
status_code = http_stat["statcode"]
url_count = url_count + 1
io.stdout:write(url_count .. "=" .. status_code .. " " .. url["url"] .. " \n")
io.stdout:flush()
if status_code >= 300 and status_code <= 399 then
local newloc = urlparse.absolute(url["url"], http_stat["newloc"])
if downloaded[newloc] == true or addedtolist[newloc] == true
or not allowed(newloc, url["url"]) then
tries = 0
return wget.actions.EXIT
end
end
if status_code >= 200 and status_code <= 399 then
downloaded[url["url"]] = true
end
if abortgrab == true then
io.stdout:write("ABORTING...\n")
io.stdout:flush()
return wget.actions.ABORT
end
if status_code ~= 200 and status_code ~= 302 then
io.stdout:write("Server returned " .. http_stat.statcode .. " (" .. err .. "). Sleeping.\n")
io.stdout:flush()
local maxtries = 12
if not allowed(url["url"], nil) then
maxtries = 3
end
if tries >= maxtries then
io.stdout:write("I give up...\n")
io.stdout:flush()
tries = 0
if maxtries == 3 then
return wget.actions.EXIT
else
return wget.actions.ABORT
end
else
os.execute("sleep " .. math.floor(math.pow(2, tries)))
tries = tries + 1
return wget.actions.CONTINUE
end
end
tries = 0
local sleep_time = 0
if sleep_time > 0.001 then
os.execute("sleep " .. sleep_time)
end
return wget.actions.NOTHING
end
wget.callbacks.before_exit = function(exit_status, exit_status_string)
if abortgrab == true then
return wget.exits.IO_FAIL
end
return exit_status
end
|
Klappa2 = LibStub("AceAddon-3.0"):NewAddon("Klappa2", "AceConsole-3.0") --"LibFuBarPlugin-3.0",
local _G = getfenv(0)
local L = LibStub("AceLocale-3.0"):GetLocale("Klappa2")
-- LDB
local ldb = LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject("Klappa", {
type = "launcher",
icon = "Interface\\Icons\\INV_Weapon_ShortBlade_17",
OnClick = function(self, button)
if (button == "RightButton") then
for idx, bar in pairs(Klappa2.bars) do
bar:ToggleLock()
end
else
LibStub("AceConfigDialog-3.0"):Open("Klappa")
end
end,
OnTooltipShow = function(Tip)
if not Tip or not Tip.AddLine then
return
end
Tip:AddLine("Klappa")
Tip:AddLine("|cFFff4040"..L["Left Click|r to open configuration"], 1, 1, 1)
Tip:AddLine("|cFFff4040"..L["Right Click|r to lock/unlock bars"], 1, 1, 1)
end,
})
--------------------------------------
-- Fubar-Options
Klappa2.name = "Klappa";
Klappa2.hasIcon = "Interface\\Icons\\INV_Weapon_ShortBlade_17";
Klappa2.hasNoColor = true;
Klappa2.defaultMinimapPosition = 200;
Klappa2.clickableTooltip = false;
Klappa2.independentProfile = true;
Klappa2.defaultPosition = "RIGHT";
Klappa2.hideWithoutStandby = true;
Klappa2.cannotDetachTooltip = true;
--Fubar methods
function Klappa2:OnUpdateFuBarText()
self:SetFuBarText("Klappa")
end
function Klappa2:OnUpdateFuBarTooltip()
GameTooltip:AddLine("Klappa")
GameTooltip:AddLine("Click to open the configuration", 0, 1, 0)
end
function Klappa2:OnFuBarClick(button)
self:OpenConfigMenu();
end
--------------------------------
local defaults =
{
char =
{
bars = {
{
headers = {
{
popups =
{
{
["id"] = 1,
}, -- [1]
},
},
},
skin = {},
orient = "vertleft",
buttonScale = 1,
popupScale = 1,
alpha = 1,
popupAlpha = 1,
locked = true,
lockButtons = true,
padding = 1,
size = 35,
tooltip = true,
numberButtons = 1,
},
},
hideUI = false,
numberBars = 1
}
}
----------------
function Klappa2:OnInitialize()
self.db = LibStub("AceDB-3.0"):New("KlappaDB", defaults)
end
function Klappa2:InitOptions()
local options = {
name = "Klappa",
desc = "Action bars with popup buttons",
icon = "Interface\\Icons\\INV_Weapon_ShortBlade_17",
type="group",
args = {
showUI = {
name = L["Hide mainbar"],
desc = L["Hides the default mainbar"],
type = "toggle",
order = 1,
get = function() return Klappa2.config.hideUI end,
set = function(info,value) Klappa2:SetDefaultUIElements(value); Klappa2.config.hideUI = value; end,
},
add = {
name = L["Add Bar"],
desc = L["Add a new bar"],
type = "execute",
order = 3,
func = function() self:AddBar() end,
},
del = {
name = L["Delete Bar"],
desc = L["Delete the last bar"],
type = "execute",
order = 6,
func = function() self:DeleteBar() end,
},
ids = {
name = L["Show all buttonids"],
desc = L["Shows all buttons with their ids"],
type = "execute",
order = 9,
func = function() self:ShowIDs() end,
},
}
}
return options;
end
function Klappa2:OnEnable()
Klappa2.config = self.db.char;
self.options = self:InitOptions();
self.OnMenuRequest = self.options;
--self:SetConfigTable(self.options); --for Fubar config
--self:SetFuBarIcon("Interface\\Icons\\INV_Weapon_ShortBlade_17");
--self:ToggleFuBarMinimapAttached()
--self:Hide()
self:CreateRoot();
self:CreateShowIDs()
self:SetDefaultUIElements(Klappa2.config.hideUI)
--altes self:SetConfigTable(self.options);
LibStub("AceConfig-3.0"):RegisterOptionsTable("Klappa", self.options)
self.optionsFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("Klappa", "Klappa")
self.optionsFrameGui = LibStub("AceConfigDialog-3.0"):Open("Klappa")
self:RegisterChatCommand("kl", "ChatCommand")
self:RegisterChatCommand("klappa", "ChatCommand")
end
function Klappa2:ChatCommand(input)
if not input or input:trim() == "" then
--InterfaceOptionsFrame_OpenToCategory(self.optionsFrame)
LibStub("AceConfigDialog-3.0"):Open("Klappa")
else
print("console")
LibStub("AceConfigCmd-3.0").HandleCommand(Klappa, "kl2", "Options", input)
end
end
function Klappa2:SetDefaultUIElements(v)
if(v) then
-- Hide the main grafics
MainMenuBarArtFrame:Hide()
MainMenuBar:Hide()
else
--Show the main grafics
MainMenuBarArtFrame:Show()
MainMenuBar:Show()
end
end
function Klappa2:CreateRoot()
self.bars = {};
if (Klappa2.config.bars == nil) then
self.bars[1] = Klappa2.Bar:new(1);
else
for i, bar in pairs (Klappa2.config.bars) do
self.bars[i] = Klappa2.Bar:new(i);
end
end
self:HideEmpty();
end
function Klappa2:AddBar()
idx = Klappa2.config.numberBars + 1;
Klappa2.config.bars[idx] = {};
self.bars[idx] = Klappa2.Bar:new(idx);
Klappa2.config.numberBars = idx;
end
function Klappa2:DeleteBar()
local idx = Klappa2.config.numberBars;
if (idx == 0 or idx == nil) then return end;
self.bars[idx].root:Hide();
for i, mainbutton in pairs (self.bars[idx].root.headers) do
self.bars[idx]:DelMainButton();
end
Klappa2.config.bars[idx] = nil;
Klappa2.options.args["Bar"..idx] = nil;
Klappa2.config.numberBars = idx-1;
end
function Klappa2:HideEmpty()
for k, bar in pairs(Klappa2.bars) do
for i, main in pairs(bar.root.headers) do
for k,popup in pairs(bar.root.headers[i].popupButtons) do
if not ( k == 1 ) then
local popuptexture = GetActionTexture(popup.button.id);
if not(popuptexture) then
popup.button:Hide();
end
end
end
end
end
end
--Creating/handling the button id overview
function Klappa2:ShowIDs()
if(Klappa2.showIDs.show) then
Klappa2.showIDs.show = false;
Klappa2.showIDs:Hide();
Klappa2.showIDs:UnregisterEvent("ACTIONBAR_SLOT_CHANGED");
else
Klappa2:UpdateIDs();
Klappa2.showIDs:Show();
Klappa2.showIDs.show = true;
Klappa2.showIDs:RegisterEvent("ACTIONBAR_SLOT_CHANGED");
end
end
function Klappa2:CreateShowIDs()
local buttonsize = 35
Klappa2.showIDs = CreateFrame("Frame","ShowIDs", UIParent);
Klappa2.showIDs:SetMovable(true);
Klappa2.showIDs:SetClampedToScreen(true);
Klappa2.showIDs:SetPoint("CENTER",0,0);
Klappa2.showIDs:SetHeight((10*buttonsize)+20);
Klappa2.showIDs:SetWidth(12*buttonsize);
--Rahmen um das Fenster zu verschieben
Klappa2.handle = CreateFrame("Button", "ShowIdHandle", Klappa2.showIDs, BackdropTemplateMixin and "BackdropTemplate")
Klappa2.handle:SetPoint("TOPLEFT", Klappa2.showIDs, "TOPLEFT")
Klappa2.handle:SetFrameLevel(Klappa2.showIDs:GetFrameLevel()+20)
Klappa2.handle:SetWidth(12*buttonsize);
Klappa2.handle:SetHeight(20);
Klappa2.handle:EnableMouse(true)
Klappa2.handle:RegisterForDrag("LeftButton")
Klappa2.handle:SetBackdrop({
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
tile = true,
tileSize = 1,
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
edgeSize = 0,
insets = {left = 0, right = 0, top = 0, bottom = 0}
})
Klappa2.handle:SetBackdropColor(0, 1, 1, 0.5)
Klappa2.handle:SetBackdropBorderColor(0.5, 0.5, 0, 0)
Klappa2.handle.text = Klappa2.handle:CreateFontString();
Klappa2.handle.text:SetFont("Fonts\\FRIZQT__.TTF",15);
Klappa2.handle.text:SetText("Button IDs");
Klappa2.handle.text:SetAllPoints(Klappa2.handle);
Klappa2.handle:SetScript("OnDragStart", function() self:StartDrag(); end);
Klappa2.handle:SetScript("OnDragStop", function() self:StopDrag(); end);
Klappa2.showIDs:Hide()
Klappa2.showIDs.show = false;
local i = 0;
Klappa2.showIDsTex = {};
while (i<120) do
Klappa2.showIDsTex[i] = CreateFrame("Button","ShowIDsTexture"..i, Klappa2.showIDs);
row,_ = -math.modf(i/12)
x = i%12;
Klappa2.showIDsTex[i]:SetPoint("TOPLEFT",x*buttonsize,(row*buttonsize)-20);
Klappa2.showIDsTex[i]:SetHeight(buttonsize);
Klappa2.showIDsTex[i]:SetWidth(buttonsize);
Klappa2.showIDsTex[i].texture = Klappa2.showIDsTex[i]:CreateTexture();
Klappa2.showIDsTex[i].texture:SetAllPoints(Klappa2.showIDsTex[i]);
Klappa2.showIDsTex[i].text = Klappa2.showIDsTex[i]:CreateFontString();
Klappa2.showIDsTex[i].text:SetFont("Fonts\\FRIZQT__.TTF",15);
Klappa2.showIDsTex[i].text:SetText(i+1);
Klappa2.showIDsTex[i].text:SetAllPoints(Klappa2.showIDsTex[i]);
Klappa2.showIDsTex[i].id = i + 1;
Klappa2.showIDsTex[i]:HookScript("OnEnter", function(self, motion) Klappa2:ShowTooltip(self, self.id); end);
Klappa2.showIDsTex[i]:HookScript("OnLeave", function(self, motion) Klappa2:HideTooltip(self); end);
i=i+1;
end
Klappa2.showIDs:SetScript("OnEvent", function(self, event, id) Klappa2:Update(id); end);
end
function Klappa2:Update(id)
if (Klappa2.showIDs == nil) then return end;
if(Klappa2.showIDs.show) then
if(id == 0) then UpdateIDs(); return; end
local texture = GetActionTexture(id);
Klappa2.showIDsTex[id-1].texture:SetTexture(texture);
end
end
function Klappa2:ShowTooltip(button, id)
GameTooltip:SetOwner(button,ANCHOR_RIGHT);
GameTooltip:SetAction(id);
end
function Klappa2:HideTooltip(button)
if GameTooltip:IsOwned(button) then
--print("hide")
GameTooltip:Hide();
end
end
function Klappa2:UpdateIDs()
local i = 0;
while (i<120) do
local texture = GetActionTexture(i+1);
Klappa2.showIDsTex[i].texture:SetTexture(texture);
i = i+1;
end
end
function Klappa2:StartDrag()
Klappa2.showIDs:StartMoving();
end
function Klappa2:StopDrag()
Klappa2.showIDs:StopMovingOrSizing();
end
--------------------------------------------------
|
function Client_SaveConfigureUI(alert)
Mod.Settings.WastelandsPerTurn = numberInputField1.GetValue();
end
|
-- 20151026 mvh Created; based on nh_queryseries for table colors etc
-- 20151027 mvh Firefox compat
-- 20151206 mvh fix 1.4.17d compatibility
-- 20160124 mvh Added anonymize option; passed to all WADO text display and heading of table
-- 20160319 mvh Small fix in slope default
-- 20160717 mvh Fix in level and window intercept; use central slice to get info
-- 20170305 mvh Added hint to save, fix zoom
-- 20170430 mvh Zoom no longer checks on version; assumes 1.4.19 plus
-- 20180204 mvh Removed 'getting image' print
-- defaults to allow debugging in zbs
study2 = study2 or 'EG2005:'
version = version or ''
size = size or 560
-- split query information
local patid = string.gsub(study2, ':.*$', '')
local studyuid = string.gsub(study2, '^.*:', '')
------------------------------------------------------------------------
-- support functions
------------------------------------------------------------------------
-- split string into pieces, return as table
function split(str, pat)
local t = {}
local fpat = "(.-)" .. pat
local last_end = 1
local s, e, cap = str:find(fpat, 1)
while s do
if s ~= 1 or cap ~= "" then
table.insert(t,cap)
end
last_end = e+1
s, e, cap = str:find(fpat, last_end)
end
if last_end <= #str then
cap = str:sub(last_end)
table.insert(t, cap)
end
return t
end
-- report error string on a otherwise empty reddish page
function errorpage(s)
HTML('Content-type: text/html\n\n');
print(
[[
<HEAD><TITLE>Version ]].. (version or '-')..[[ WADO viewer</TITLE></HEAD>
<BODY BGCOLOR='FFDFCF'>
<H3>Conquest ]].. (version or '-') ..[[ WADO viewer</H3>
<H3>]].. s .. [[</H3>
</BODY>
]])
end
-- get list of series
function queryseries(source)
local patis, b, i, j, k, l;
b=newdicomobject();
b.QueryRetrieveLevel='SERIES'
b.PatientName = ''
b.PatientID = patid
b.StudyDate = '';
b.StudyInstanceUID = studyuid;
b.StudyDescription = '';
b.SeriesDescription= '';
b.SeriesInstanceUID= '';
b.SeriesDate= '';
b.Modality = '';
b.SeriesTime = '';
b.NumberOfSeriesRelatedInstances = '';
series=dicomquery(source, 'SERIES', b);
if series==nil then
errorpage('Wado viewer error, cannot query server at series level - check ACRNEMA.MAP for: ' .. source)
return
end
-- convert returned DDO (userdata) to table; needed to allow table.sort
seriest={}
for k1=0,#series-1 do
seriest[k1+1]={}
seriest[k1+1].PatientName = series[k1].PatientName or ''
seriest[k1+1].StudyDate = series[k1].StudyDate or ''
seriest[k1+1].PatientID = series[k1].PatientID or ''
seriest[k1+1].StudyDate = series[k1].StudyDate or ''
seriest[k1+1].SeriesTime = series[k1].SeriesTime or ''
seriest[k1+1].SeriesDate = series[k1].SeriesDate or ''
seriest[k1+1].StudyInstanceUID = series[k1].StudyInstanceUID or ''
seriest[k1+1].SeriesDescription= series[k1].SeriesDescription or ''
seriest[k1+1].StudyDescription = series[k1].StudyDescription or ''
seriest[k1+1].SeriesInstanceUID= series[k1].SeriesInstanceUID or ''
seriest[k1+1].Modality = series[k1].Modality or ''
seriest[k1+1].NumberOfSeriesRelatedInstances = series[k1].NumberOfSeriesRelatedInstances or 0
end
return seriest
end
-- get list of images (called for each series)
function queryimages(source, patid, seriesuid)
local images,imaget,b;
b=newdicomobject();
b.PatientID = patid
b.SeriesInstanceUID= seriesuid
b.InstanceNumber = ''
b.SOPInstanceUID = ''
b.SliceLocation = ''
b.ImageComments = ''
b.NumberOfFrames = ''
images=dicomquery(source, 'IMAGE', b);
if images==nil then
errorpage('Wado viewer error, cannot query server at image level: ' .. source)
return
end
imaget={}
for k=0,#images-1 do
if (images[k].InstanceNumber or '') == '' then
images[k].InstanceNumber = '0'
end
imaget[k+1]={}
imaget[k+1].SOPInstanceUID=images[k].SOPInstanceUID
imaget[k+1].SliceLocation=images[k].SliceLocation or ''
imaget[k+1].ImageComments=images[k].ImageComments or ''
imaget[k+1].NumberOfFrames=images[k].NumberOfFrames or 1
imaget[k+1].InstanceNumber= tonumber(images[k].InstanceNumber or '0')
end
table.sort(imaget, function(a,b) return a.InstanceNumber<b.InstanceNumber end)
return imaget
end
------------------------------------------------------------------------
-- Start main code
------------------------------------------------------------------------
-- get server version, displayed and used to block buggy zoom function
local serverversion = servercommand('display_status:');
if serverversion==nil then
errorpage('the server is not running')
return
end
serverversion = string.match(serverversion, 'version ([%d%.%a]*)');
local viewer=gpps('webdefaults', 'viewer', '');
local source = servercommand('get_param:MyACRNema')
anonymizer = ''
if CGI('anonymize')~='' then
anonymizer = '&anonymize='..CGI('anonymize')
end
---------------------------------------------------------------------------------
-- generate HTML page
---------------------------------------------------------------------------------
HTML("Content-type: text/html\nCache-Control: no-cache\n");
print(
[[
<html>
<head>
<title>Wado study viewer - version]]..version..[[</title>]]..
[[<style type="text/css">
body { font:10pt Verdana; }
a { color:blue; }
#content { background-color:#dddddd; width:200px; margin-top:2px; }
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
]]
)
print([[
<script>
var size = ]]..size..[[;
var serverversion = ']]..serverversion..[[';
var script_name = ']]..(script_name or '')..[[';
var anonymizer = ']]..(anonymizer or '')..[[';
]])
-- here is all the js code defined; long string is rendered line by line below
local js_code=
[[
// variable block
var modality = '';
var seriesuid = '';
var nseries= 1;
var defwindowcenter;
var defwindowwidth;
var description = '';
var studyuid = '';
var seriesno=1;
var bridge = '';
var nframes = 1;
var region = '';
var zoom = 1;
var panx=0.5;
var pany=0.5;
var slice=0;
var nslices=0;
var windowcenter = defwindowcenter;
var windowwidth = defwindowwidth;
var frame = 0;
var inter;
var inputactive=0;
function altRows(id){
if(document.getElementsByTagName){
var table = document.getElementById(id);
var rows = table.getElementsByTagName("tr");
for(i = 0; i < rows.length; i++){
if(i % 2 == 0){
rows[i].className = "evenrowcolor";
}else{
rows[i].className = "oddrowcolor";
}
}
}
}
window.onload=function(){
altRows('alternatecolor');
}
// loads a series and makes relevant slicing form visible
function loadseries()
{ for (var i=1; i<=nseries; i++)
document.getElementById("form"+i).style.display = "none";
for (var i=1; i<=nseries; i++)
document.getElementById("A"+i).innerHTML = "View";
setInterval(savesettings, 500);
nframes = Number(document.getElementById("form"+seriesno).slice.value.split("|")[1]);
nslices = document.getElementById("form"+seriesno).slice.length;
document.getElementById("form"+seriesno).style.display = "block";
document.getElementById("A"+seriesno).innerHTML = "---->";
slice = Math.floor(nslices/2);
defwindowcenter = Number(document.getElementById("defwindowcenter"+seriesno).value);
defwindowwidth = Number(document.getElementById("defwindowwidth"+seriesno).value);
windowcenter = defwindowcenter;
windowwidth = defwindowwidth;
loadsettings();
}
// generic cookie functions
function getCookie(c_name)
{ var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++)
{ x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
x=x.replace(/^\s+|\s+$/g,"");
if (x==c_name)
{ return unescape(y);
}
}
}
function setCookie(c_name,value,exdays)
{ var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value;
}
// load and save settings in a cookie
function savesettings()
{ if (document.getElementById("autosave").checked)
setCookie("wadoseriesviewer_autosave", "true");
else
setCookie("wadoseriesviewer_autosave", "false");
if (document.getElementById("autosave").checked==false) return;
setCookie('wadoseriesviewer_'+seriesuid,zoom+'|'+panx+'|'+pany+'|'+windowcenter+'|'+
windowwidth+'|'+frame+'|'+slice);
}
function loadsettings()
{ var v = getCookie('wadoseriesviewer_'+seriesuid);
if (v!=null && document.getElementById("autosave").checked)
{ zoom = Number(v.split("|")[0]);
panx = Number(v.split("|")[1]);
pany = Number(v.split("|")[2]);
windowcenter = Number(v.split("|")[3]);
windowwidth = Number(v.split("|")[4]);
frame = Number(v.split("|")[5]);
slice = Number(v.split("|")[6]);
}
leveler(0,1);
framer(0);
slicer(0);
zoomer(1,0,0);
load();
}
// load the DICOM object as image or text
function load()
{ if (Number(document.getElementById("form"+seriesno).slice.value.split("|")[1])!=nframes)
{ nframes = Number(document.getElementById("form"+seriesno).slice.value.split("|")[1]);
frame = 0;
}
var showText = (modality.substring(0, 2)=='RT' && modality!='RTDOSE' && modality!='RTIMAGE') || modality=='SR';
if (!showText)
{ document.images[0].src = script_name+'?requestType=WADO&contentType=image/jpeg'+
bridge +
'&studyUID='+studyuid +
'&seriesUID='+seriesuid +
'&windowCenter='+windowcenter +
'&windowWidth='+windowwidth +
'&frameNumber='+frame +
'®ion='+region +
'&objectUID=' + document.getElementById("form"+seriesno).slice.value.split("|")[0];
document.addEventListener("keydown", myKeyFunction, false);
document.getElementById("myframe").style.display='none';
document.images[0].style.display='block';
}
else
{ document.getElementById("myframe").src = script_name+'?requestType=WADO&contentType=text/plain'+
bridge+
'&studyUID='+studyuid +
'&seriesUID='+seriesuid +
anonymizer +
'&objectUID=' + document.getElementById("form"+seriesno).slice.value.split("|")[0];
document.getElementById("myframe").style.display='block';
document.images[0].style.display='none';
}
}
// browser popup (used to display header info)
function PopupCenter(pageURL, title,w,h)
{ var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
var targetWin =
window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
}
// level window change/display
function leveler(a, b)
{ if (b==0 && a==1)
{ windowwidth = defwindowwidth;
windowcenter = defwindowcenter;
}
else if (b==0 && a==2)
{ windowwidth = 0;
windowcenter = 0;
}
else if (a!=0 || b!=1)
{ if (windowwidth==0)
{ windowwidth = defwindowwidth;
windowcenter = defwindowcenter;
}
windowcenter = windowcenter + a*defwindowwidth;
windowwidth = windowwidth * b;
}
if (inputactive!=2)
document.getElementById("level").innerHTML = "level: "+Math.round(windowcenter*100)/100;
else
document.getElementById("level").innerHTML = "<b>level: "+Math.round(windowcenter*100)/100+"</b>";
if (inputactive!=3)
document.getElementById("window").innerHTML = "window: "+Math.round(windowwidth*100)/100;
else
document.getElementById("window").innerHTML = "<b>window: "+Math.round(windowwidth*100)/100+"</b>";
if (a!=0 || b!=1)
load();
}
// frame change/display
function framer(a)
{ frame = frame + a;
if (frame>=nframes) frame = nframes-1;
if (frame<0) frame = 0;
if (nframes>1)
{ if (inputactive!=5)
document.getElementById("frame").innerHTML = "frame: "+frame+" of "+nframes;
else
document.getElementById("frame").innerHTML = "<b>frame: "+frame+" of "+nframes+"</b>";
}
else
document.getElementById("frame").innerHTML = "";
if (a!=0)
load();
}
// zoom / pan change/display
function zoomer(z, px, py)
{ // if (serverversion!='1.4.19' && serverversion<'1.4.19b') return;
zoom = z*zoom;
panx = panx + px/zoom;
pany = pany + py/zoom;
if (zoom<=1)
{ zoom=1;
panx=0.5;
pany=0.5;
region="";
}
else
{ var xl, xh, yl, yh;
if (zoom>50) zoom = 50;
xl = panx - 0.5/zoom; if(xl<0) {xl=0; panx=0.5/zoom; }
xh = panx + 0.5/zoom; if(xh>0.999) {xh=0.999; panx=xh-0.5/zoom; }
yl = pany - 0.5/zoom; if(yl<0) {yl=0; pany=0.5/zoom; }
yh = pany + 0.5/zoom; if(yh>=0.999) {yh=0.999; pany=1-0.5/zoom; }
region = String(xl)+","+String(xh)+","+String(yl)+","+String(yh);
}
if (z!=1 || px!=0 || py!=0)
load();
if (inputactive!=1)
document.getElementById("zoom").innerHTML = "zoom: "+Math.round(zoom*100)/100;
else
document.getElementById("zoom").innerHTML = "<b>zoom: "+Math.round(zoom*100)/100+"</b>";
}
// keyboard event
function myKeyFunction(a)
{ a = window.event || a;
var ch = String.fromCharCode(a.keyCode || a.charCode)
if (ch=='B') leveler(-0.05, 1);
else if (ch=='D') leveler(+0.05, 1);
else if (ch=='L') leveler(0, 1.2);
else if (ch=='H') leveler(0, 1/1.2);
else if (ch=='P') leveler(1, 0);
else if (ch=='A') leveler(2, 0);
else if (ch=='N') leveler(0, -1);
else if (ch=='I') zoomer(1.2, 0, 0);
else if (ch=='O') zoomer(1/1.2, 0, 0);
else if (ch=='F') zoomer(0, 0, 0);
else if (ch=='U') framer(1);
else if (ch=='V') framer(-1);
else if (a.keyCode==37) zoomer(1, 0.03, 0);
else if (a.keyCode==39) zoomer(1, -0.03, 0);
else if (a.keyCode==38) zoomer(1, 0, 0.03);
else if (a.keyCode==40) zoomer(1, 0, -0.03);
else if (a.keyCode==33) slicer(1);
else if (a.keyCode==34) slicer(-1);
else if (ch=='Q')
PopupCenter(script_name+'?requestType=WADO'+bridge+'&contentType=text/plain&studyUID='+studyuid+'&seriesUID='
+seriesuid+anonymizer+'&objectUID=' + document.getElementById("form"+seriesno).slice.value.split("|")[0], 'hoi', 700, 512);
}
// step through slices
function slicer(delt)
{ if (nslices==1)
{ document.getElementById("slice").innerHTML = "";
framer(delt);
return;
}
if (delt>0)
{ if (slice >= nslices-delt)
slice = nslices-1;
else
slice = slice + delt;
}
else
{ if (slice < -delt)
slice = 0;
else
slice = slice + delt;
}
document.getElementById("form"+seriesno).slice.selectedIndex = slice;
if (delt!=0)
load()
if (inputactive!=4 && inputactive!=6 && inputactive!=8)
document.getElementById("slice").innerHTML = "slice "+(slice+1);
else
document.getElementById("slice").innerHTML = "<b>slice "+(slice+1)+"</b>";
}
// highlight labels when mouse over and set their events
function active(n)
{ var hint='';
inputactive=n;
leveler(0,1);framer(0);slicer(0);zoomer(1,0,0);
document.getElementById("slice").addEventListener("mousewheel", wheeler, false);
document.getElementById("slice").addEventListener("DOMMouseScroll", wheeler, false);
document.getElementById("zoom").addEventListener("mousewheel", wheeler, false);
document.getElementById("zoom").addEventListener("DOMMouseScroll", wheeler, false);
document.getElementById("level").addEventListener("mousewheel", wheeler, false);
document.getElementById("level").addEventListener("DOMMouseScroll", wheeler, false);
document.getElementById("window").addEventListener("mousewheel", wheeler, false);
document.getElementById("window").addEventListener("DOMMouseScroll", wheeler, false);
document.getElementById("frame").addEventListener("mousewheel", wheeler, false);
document.getElementById("frame").addEventListener("DOMMouseScroll", wheeler, false);
document.getElementById("image").addEventListener("mousewheel", wheeler, false);
document.getElementById("image").addEventListener("DOMMouseScroll", wheeler, false);
document.getElementById("slice").addEventListener("mouseup", clicker);
document.getElementById("zoom").addEventListener("mouseup", clicker);
document.getElementById("level").addEventListener("mouseup", clicker);
document.getElementById("window").addEventListener("mouseup", clicker);
document.getElementById("frame").addEventListener("mouseup", clicker);
if (inputactive==1) hint = 'Wheel=zoom; Key I/O=zoom In/Out; Arrows=pan; F=Fit';
if (inputactive==2) hint = 'Wheel=brightness; Key B/D=Brigher/Darker; H/L=Higher/Lower contrast';
if (inputactive==3) hint = 'Wheel=contrast; Key A=Auto level/window; P=Preset level/window';
if (inputactive==4) hint = 'Wheel=slice(default); Key page up/page down = slice';
if (inputactive==5) hint = 'Wheel=frame; Key U/V=frame Up/down';
if (inputactive==8) hint = 'Wheel=slice(default); Key page up/page down = slice';
if (inputactive==9) hint = 'If selected, view settings are stored in cookies';
if (hint!='') hint = "Hint: "+hint;
document.getElementById("hint").innerHTML = hint;
}
// onclick sets numerical value for items
function clicker()
{ var a;
if (inputactive==4) { a=Number(prompt("Slice number:",slice+1)); if (a) slice=a-1; slicer(0); load(); }
if (inputactive==3) { a=Number(prompt("Window width:",windowwidth)); if (a) windowwidth=a; leveler(0, 1); load(); }
if (inputactive==2) { a=Number(prompt("Window center:",windowcenter)); if (a) windowcenter=a; leveler(0, 1); load(); }
if (inputactive==1) { a=Number(prompt("Zoom:",zoom)); if (a) zoom=a; zoomer(1,0,0); load(); }
if (inputactive==5) { a=Number(prompt("Frame number:",frame)); if (a) frame=a; framer(0); load(); }
}
// wheel change of items
function wheeler(a)
{ a = window.event || a;
var delta = Math.max(-1, Math.min(1, (a.wheelDelta || -a.detail)));
if (inputactive==1) { if (delta>0) zoomer(1.1, 0, 0); else zoomer(1/1.1, 0, 0); return false;}
if (inputactive==2) { if (delta>0) leveler(0.01, 1); else leveler(-0.01, 1); return false;}
if (inputactive==3) { if (delta>0) leveler(0, 1.05); else leveler(0, 1/1.05); return false;}
if (inputactive==4) { if (delta>0) slicer(1); else slicer(-1); return false;}
if (inputactive==5) { if (delta>0) framer(1); else framer(-1); return false;}
if (inputactive==6) { if (delta>0) slicer(1); else slicer(-1); return false;}
if (inputactive==8) { if (delta>0) slicer(1); else slicer(-1); return false;}
}
</script>
]]
js_code = split(js_code, '\n')
for k,v in ipairs(js_code) do print(v) end
print([[
<!-- CSS goes in the document HEAD or added to your external stylesheet -->
<style type="text/css">
table.altrowstable {
font-family: verdana,arial,sans-serif;
font-size:16px;
color:#333333;
border-width: 1px;
border-color: #a9c6c9;
border-collapse: collapse;
}
table.altrowstable th {
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #a9c6c9;
}
table.altrowstable td {
border-width: 1px;
padding: 8px;
min-width: 20px;
max-width: 180px;
border-style: solid;
border-color: #a9c6c9;
}
.oddrowcolor{
background-color:#d4e3e5;
}
.evenrowcolor{
background-color:#c3dde0;
}
table.altrowstable tr:first-child {
font-weight:bold;
}
table.altrowstable Caption {
font-weight:bold;
color: yellow;
background: green;
}
</style>
</head>
<body BGCOLOR='CFDFCF'>
]])
print(string.format("<H2>Conquest WADO study viewer - version %s</H2>", version))
-- render table with available series
local pats=queryseries(source)
if anonymizer~='' then
pats[1].PatientID = string.sub(anonymizer, 12, 99)
pats[1].PatientName = ''
end
print("<div style='position: absolute; left: 10px; width: 550px'>")
print("<table class='altrowstable' id='alternatecolor' RULES=ALL BORDER=1>");
print(string.format("<Caption>List of series on local server for ID=%s, name=%s</caption>", pats[1].PatientID, pats[1].PatientName));
print("<TR><TD>Date<TD>Time<TD>Description<TD>Modality</TR>");
for i=1,#pats do
u = string.format([[<A id=A]]..i..[[ onclick="seriesno=%d;seriesuid='%s';studyuid='%s';modality='%s';loadseries();">View</A>]],
i, pats[i].SeriesInstanceUID, pats[i].StudyInstanceUID, pats[i].Modality);
s = string.format("<TR><TD>%s<TD>%s<TD>%s<TD>%s<br>(%d)<TD>%s</TR>",pats[i].SeriesDate, pats[i].SeriesTime,
pats[i].SeriesDescription,pats[i].Modality, 0+pats[i].NumberOfSeriesRelatedInstances,u);
print(s)
end
print('</table>')
print("</div>");
-- generate window for displaying image and interaction controls
print[[
<div style='position: absolute; top: 40px; left: 620px' id=lowerpage>
<table style="width: 560px"><tr>
<td onmouseover="active(1)" id=zoom></td>
<td onmouseover="active(2)" id=level></td>
<td onmouseover="active(3)" id=window></td>
<td onmouseover="active(4)" id=slice></td>
<td onmouseover="active(5)" id=frame></td>
<td onmouseover="active(9)"><INPUT TYPE=CHECKBOX VALUE=0 id=autosave onclick="loadsettings();savesettings();">Auto save</td>
</tr></table>
<IMG onmouseover="active(6)" id=image BORDER=1 HEIGHT=560>
<iframe onmouseover="active(7)" id=myframe BORDER=0 WIDTH=560 HEIGHT=560 style='display: none'>
<p>Your browser does not support iframes.</p>
</iframe>
]]
-- generate forms with slicing control for each series; display only one at the time
for i=1,#pats do
images = queryimages(source, patid, pats[i].SeriesInstanceUID)
seriesuid = pats[i].SeriesInstanceUID
-- this notation is accepted in the server and will also access virtual servers
local imagelocation = studyuid..'\\\\'..seriesuid..'\\\\'..images[math.ceil(#images/2)].SOPInstanceUID
-- get info about slice from server side script
windowcenter, windowwidth, slope, intercept, rows, columns =
unpack(split(servercommand('lua:'..
[[
local a=newdicomobject();
a:Read("]]..imagelocation..[[");
local c = (a.WindowCenter or 1000) if c=='' then c=1000 end
local w = (a.WindowWidth or 1000) if w=='' then w=1000 end
local s = (a.RescaleSlope or 1) if s=='' then s=1 end
local i = (a.RescaleIntercept or 0) if i=='' then i=0 end
local x = (a.Columns or 0) if i=='' then i=0 end
local y = (a.Rows or 0) if i=='' then i=0 end
--print('getting image for wado viewer', c, w)
return c.."|"..w.."|"..s.."|"..i.."|"..x.."|"..y
]]
) or '0|0|1|0|512|512', '|'))
-- process level and window information: may be multiple
if string.find(windowcenter, '%\\') then
windowcenter = unpack(split(windowcenter, '\\'))
end
if string.find(windowwidth, '%\\') then
windowwidth = unpack(split(windowwidth, '\\'))
end
-- todo: fully scale level and window according to slope and intercept
if pats[i].Modality=='CT' then
windowcenter = windowcenter+0 -- default for CT in conquest
end
-- generate form with slicing controls
print([[
<FORM onmouseover="active(8)" style="display: none" id=form]]..i..[[>
Slice:
<INPUT TYPE=BUTTON VALUE='<' onclick=slicer(-1) onmousedown="inter=setInterval('slicer(-1)', 100)" onmouseup=clearInterval(inter) onmouseout=clearInterval(inter)>
<select name=slice onchange=load() >
]])
for i=1, math.min(#images, 2000) do
print('<option value='..images[i].SOPInstanceUID..'|'..images[i].NumberOfFrames..'>'..string.format('%d (%.1f) %s', i, tonumber(images[i].SliceLocation) or 0, images[i].ImageComments or '') .. '</option>')
end
if #images>2000 then
print('<option value='..images[#images].SOPInstanceUID..'> list truncated </option>')
end
print([[
</select>
<INPUT TYPE=BUTTON VALUE='>' onclick=slicer(1) onmousedown="inter=setInterval('slicer(1)', 100)" onmouseup=clearInterval(inter) onmouseout=clearInterval(inter)> Total slices: ]].. #images .. [[
<INPUT TYPE=HIDDEN VALUE=]]..windowcenter..[[ id=defwindowcenter]]..i..[[>
<INPUT TYPE=HIDDEN VALUE=]]..windowwidth..[[ id=defwindowwidth]]..i..[[>
<a href=# onclick="javascript:PopupCenter(script_name+'?requestType=WADO'+bridge+'&contentType=text/plain&studyUID='+studyuid+'&seriesUID='+seriesuid+anonymizer+'&objectUID='+document.getElementById('form'+seriesno).slice.value.split('|')[0], 'hoi', 700, 512)">[show header]</a>
<a href=# onclick="javascript:PopupCenter(script_name+'?mode=wadoviewerhelp', 'hoi', 700, 512)">[help]</a>
</FORM>
]])
end
-- info to autoload first series for display
local info = string.format("seriesuid='%s';studyuid='%s';modality='%s';nseries=%d;",
pats[1].SeriesInstanceUID, pats[1].StudyInstanceUID, pats[1].Modality, #pats)
print([[
<i id=hint></i>
</div>
<SCRIPT language=JavaScript>
document.getElementById("autosave").checked = getCookie("wadoseriesviewer_autosave")=='true';
document.onload=setInterval(savesettings, 500);]]..info..[[loadseries();
</SCRIPT>
</body>
</html>
]])
|
return function (db, limit, max)
local hashCache = {}
local count = 0
local realLoad = db.load
function db.load(hash)
local raw = hashCache[hash]
if raw then return raw end
raw = realLoad(hash)
local size = #raw
if size < limit then
count = count + size
if count > max then
print("reset hash cache")
hashCache = {}
count = size
end
hashCache[hash] = raw
end
return raw
end
return db
end
|
require("common/commonScene")
require("hall/activity/activityScene");
require("hall/activity/activityController");
require("common/messageBox");
local activity = require(ActivityViewPath .. "activity")
ActivityState = class(CommonState)
ActivityState.ctor = function(self)
self.m_controller = nil;
end
ActivityState.getController = function(self)
return self.m_controller;
end
ActivityState.load = function(self)
CommonState.load(self);
self.m_controller = new(ActivityController, self, ActivityScene, activity);
return true;
end
ActivityState.unload = function(self)
CommonState.unload(self);
delete(self.m_controller);
self.m_controller = nil;
end
ActivityState.gobackLastState = function(self)
self.m_controller:onBack();
end
ActivityState.onExit = function(self)
StateMachine.getInstance():popState();
end
ActivityState.onContinue = function(self)
end
ActivityState.onClose = function(self)
end
ActivityState.dtor = function(self)
end
|
-- @module table
module ("table", package.seeall)
--require "list" FIXME: allow require loops
-- FIXME: use consistent name for result table: t_? (currently r and
-- u)
-- @func sort: Make table.sort return its result
-- @param t: table
-- @param c: comparator function
-- @returns
-- @param t: sorted table
local _sort = sort
function sort (t, c)
_sort (t, c)
return t
end
-- @func subscript: Expose [] as a function
-- @param t: table
-- @param s: subscript
-- @returns
-- @param v: t[s]
function subscript (t, s)
return t[s]
end
-- @func lookup: Do a late-bound table lookup
-- @param t: table to look up in
-- @param l: list of indices {l1 ... ln}
-- @returns
-- @param u: t[l1]...[ln]
function lookup (t, l)
return list.foldl (subscript, t, l)
end
-- @func pathSubscript: Subscript a table with a string containing
-- dots
-- @param t: table
-- @param s: subscript of the form s1.s2. ... .sn
-- @returns
-- @param v: t.s1.s2. ... .sn
function subscripts (t, s)
return lookup (t, string.split ("%.", s))
end
-- @func empty: Say whether table is empty
-- @param t: table
-- @returns
-- @param f: true if empty or false otherwise
function empty (t)
for _ in pairs (t) do
return false
end
return true
end
-- @func size: Find the number of elements in a table
-- @param t: table
-- @returns
-- @param n: number of elements in t
function size (t)
local n = 0
for _ in pairs (t) do
n = n + 1
end
return n
end
-- @func indices: Make the list of indices of a table
-- @param t: table
-- @returns
-- @param u: list of indices
function indices (t)
local u = {}
for i, v in pairs (t) do
insert (u, i)
end
return u
end
-- @func values: Make the list of values of a table
-- @param t: table
-- @returns
-- @param u: list of values
function values (t)
local u = {}
for i, v in pairs (t) do
insert (u, v)
end
return u
end
-- @func invert: Invert a table
-- @param t: table {i=v...}
-- @returns
-- @param u: inverted table {v=i...}
function invert (t)
local u = {}
for i, v in pairs (t) do
u[v] = i
end
return u
end
-- @func rearrange: Rearrange some indices of a table
-- @param m: table {oldindex=newindex...}
-- @param t: table to rearrange
-- @returns
-- @param r: rearranged table
function rearrange (m, t)
local r = clone (t)
for i, v in pairs (m) do
r[v] = t[i]
r[i] = nil
end
return r
end
-- @func clone: Make a shallow copy of a table, including any
-- metatable
-- @param t: table
-- @param nometa: if non-nil don't copy metatables
-- @returns
-- @param u: copy of table
function clone (t, nometa)
local u = {}
if not nometa then
setmetatable (u, getmetatable (t))
end
for i, v in pairs (t) do
u[i] = v
end
return u
end
-- @func deepclone: Make a deep copy of a table, including any
-- metatable
-- @param t: table
-- @param nometa: if non-nil don't copy metatables
-- @returns
-- @param u: copy of table
function deepclone (t, nometa)
local r = {}
if not nometa then
setmetatable (r, getmetatable (t))
end
local d = {[t] = r}
local function copy (o, x)
for i, v in pairs (x) do
if type (v) == "table" then
if not d[v] then
d[v] = {}
if not nometa then
setmetatable (d[v], getmetatable (v))
end
local q = copy (d[v], v)
o[i] = q
else
o[i] = d[v]
end
else
o[i] = v
end
end
return o
end
return copy (r, t)
end
-- @func merge: Merge two tables
-- If there are duplicate fields, u's will be used. The metatable of
-- the returned table is that of t
-- @param t, u: tables
-- @returns
-- @param r: the merged table
function merge (t, u)
local r = clone (t)
for i, v in pairs (u) do
r[i] = v
end
return r
end
-- @func newDefault: Make a table with a default value
-- @param x: default value
-- @param [t]: initial table [{}]
-- @returns
-- @param u: table for which u[i] is x if u[i] does not exist
function newDefault (x, t)
return setmetatable (t or {},
{__index = function (t, i)
return x
end})
end
|
--[[
moneyFrame.lua
A money frame object
--]]
local ADDON, Addon = ...
local Cache = LibStub('LibItemCache-2.0')
local L = LibStub('AceLocale-3.0'):GetLocale(ADDON)
local MoneyFrame = Addon:NewClass('MoneyFrame', 'Frame')
MoneyFrame.Type = 'PLAYER'
--[[ Constructor ]]--
function MoneyFrame:New(parent)
local f = self:Bind(CreateFrame('Button', parent:GetName() .. 'MoneyFrame', parent, 'SmallMoneyFrameTemplate'))
f.trialErrorButton:SetPoint('LEFT', -14, 0)
f:SetScript('OnHide', f.UnregisterSignals)
f:SetScript('OnShow', f.RegisterEvents)
f:SetScript('OnEvent', nil)
f:UnregisterAllEvents()
f:SetHeight(24)
local overlay = CreateFrame('Button', nil, f)
overlay:SetScript('OnClick', function(_,...) f:OnClick(...) end)
overlay:SetScript('OnEnter', function() f:OnEnter() end)
overlay:SetScript('OnLeave', function() f:OnLeave() end)
overlay:SetFrameLevel(self:GetFrameLevel() + 4)
overlay:RegisterForClicks('anyUp')
overlay:SetAllPoints()
f.info = MoneyTypeInfo[f.Type]
f.overlay = overlay
if f:IsShown() then
f:RegisterEvents()
end
return f
end
--[[ Interaction ]]--
function MoneyFrame:OnClick()
if self:IsCached() then
return
end
local name = self:GetName()
if MouseIsOver(_G[name .. 'GoldButton']) then
OpenCoinPickupFrame(COPPER_PER_GOLD, MoneyTypeInfo[self.moneyType].UpdateFunc(self), self)
self.hasPickup = 1
elseif MouseIsOver(_G[name .. 'SilverButton']) then
OpenCoinPickupFrame(COPPER_PER_SILVER, MoneyTypeInfo[self.moneyType].UpdateFunc(self), self)
self.hasPickup = 1
elseif MouseIsOver(_G[name .. 'CopperButton']) then
OpenCoinPickupFrame(1, MoneyTypeInfo[self.moneyType].UpdateFunc(self), self)
self.hasPickup = 1
end
self:OnLeave()
end
function MoneyFrame:OnEnter()
-- Total
local total = 0
for name in Cache:IterateOwners() do
local owner = Cache:GetOwnerInfo(name)
if not owner.isguild and owner.money then
total = total + owner.money
end
end
GameTooltip:SetOwner(self, self:GetTop() > (GetScreenHeight() / 2) and 'ANCHOR_BOTTOM' or 'ANCHOR_TOP')
GameTooltip:AddDoubleLine(L.Total, GetMoneyString(total, true), nil,nil,nil, 1,1,1)
GameTooltip:AddLine(' ')
-- Each owner
for name in Cache:IterateOwners() do
local owner = Cache:GetOwnerInfo(name)
if not owner.isguild and owner.money then
local icon = Addon:GetOwnerIconString(owner, 12,0,0)
local coins = GetMoneyString(owner.money, true)
local color = Addon:GetOwnerColor(owner)
GameTooltip:AddDoubleLine(icon .. ' ' .. owner.name, coins, color.r, color.g, color.b, 1,1,1)
end
end
GameTooltip:Show()
end
function MoneyFrame:OnLeave()
GameTooltip:Hide()
end
--[[ Update ]]--
function MoneyFrame:RegisterEvents()
self:RegisterFrameSignal('OWNER_CHANGED', 'Update')
self:RegisterEvent('PLAYER_MONEY', 'Update')
self:Update()
end
function MoneyFrame:Update()
local money = self:GetMoney()
MoneyFrame_Update(self:GetName(), money, money == 0)
end
--[[ API ]]--
function MoneyFrame:GetMoney()
return self:GetOwnerInfo().money or 0
end
function MoneyFrame:GetCoins(money)
local gold = floor(money / (COPPER_PER_SILVER * SILVER_PER_GOLD))
local silver = floor((money - (gold * COPPER_PER_SILVER * SILVER_PER_GOLD)) / COPPER_PER_SILVER)
local copper = money % COPPER_PER_SILVER
return gold, silver, copper
end
|
-- inculdes
return {
width = 32,
height = 48,
greeting = 'Hello and welcome to {{teal}}The Test Level{{white}}!',
animations = {
default = {
'loop',{'1,1','11,1'},.5,
},
walking = {
'loop',{'1,1','2,1','3,1'},.2,
},
},
stare = true,
talk_items = {
{ ['text']='i am done with you' },
{ ['text']='Where are the tutorials?' },
{ ['text']='Professor Duncan?' },
{ ['text']='Who are you?' },
},
talk_responses = {
["Who are you?"]={
"I am a Tutorial Wizard!",
"And definitely not a Christmas Wizard.",
},
["Where are the tutorials?"]={
"I'm a tutorial wizard not a tutorial conjurer.",
},
["Professor Duncan?"]={
"I do not have the slightest idea",
"What you're talking about.",
},
},
}
|
require("iuplua")
counter = 0
function addCount()
counter = counter + 1
end
function getCount()
return counter
end
--********************************** Main *****************************************
txt_count = iup.text{value = getCount(), readonly = "YES", size = "60"}
btn_count = iup.button{title = "Count", size = "60"}
dlg = iup.dialog{iup.hbox{txt_count, btn_count; ngap = "10"}, title = "Counter", margin = "10x10"}
function btn_count:action()
addCount()
txt_count.value = getCount()
end
dlg:showxy( iup.CENTER, iup.CENTER )
if (iup.MainLoopLevel()==0) then
iup.MainLoop()
end
|
object_ship_kimogilla_s01_tier10 = object_ship_shared_kimogilla_s01_tier10:new {
}
ObjectTemplates:addTemplate(object_ship_kimogilla_s01_tier10, "object/ship/kimogilla_s01_tier10.iff")
|
local utils = require ("data/scripts/libs/Utils")
require("data/scripts/libs/Context")
utils.enable_debug()
context:inst():put_state('scene', {})
context:inst():enable_dummy()
require ("data/scripts/inst/charas/Player")
local w = {}
p = player:ret(w)
print(p)
|
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by ttwings.
--- DateTime: 2018/11/1 10:14
---
town = {}
town[1] = {x = 0, y = 0, links = {2}}
town[2] = {x = 48, y = 0, opts = {name = "小镇1"},stats = {'4% Increased HP', 'hp_multiplier', 0.04}, links = {3}}
town[3] = {x = 96, y = 0, opts = {name = "小镇1"},stats = {'6% Increased HP', 'hp_multiplier', 0.06}, links = {4}}
town[4] = {x = 144, y = 0, opts = {name = "小镇1"},stats = {'4% Increased HP', 'hp_multiplier', 0.04}}
--- @class StageMap : GameObject
StageMap = Object:extend()
function StageMap:new()
self.area = Area(self)
self.tree = table.copy(towns)
self.bg = love.graphics.newImage("assets/graphics/map.jpg")
p_print(tree)
self.nodes = {}
self.lines = {}
--self.timer = Timer()
self.main_canvas = love.graphics.newCanvas(gw,gh)
for id,node in ipairs(self.tree) do
for _,linked_node_id in ipairs(node.links or {}) do
table.insert(self.tree[linked_node_id],id)
end
end
for id, node in ipairs(self.tree) do table.insert(self.nodes, Node(id, node.x, node.y)) end
for id, node in ipairs(self.tree) do
if node.links then
for _, linked_node_id in ipairs(node.links) do
table.insert(self.lines, Line(id, linked_node_id))
end
end
end
gooi.newButton({group = "StageMap",text = "返回菜单", x = gw*sw - 80,y = gh*sh - 40})
:center()
:bg({0,0,0,0.8})
:onRelease(
function()
gotoRoom("StageMain","StageMain")
gooi.setGroupEnabled("StageMap",false)
gooi.setGroupVisible("StageMap",false)
gooi.setGroupEnabled("StageMain",true)
gooi.setGroupVisible("StageMain",true)
end
)
end
function StageMap:update(dt)
for _, node in ipairs(self.nodes) do
node:update(dt)
end
for _, line in ipairs(self.lines) do
line:update(dt)
end
if love.mouse.isDown(1) then
local mx,my = camera:getMousePosition(sw,sh,0,0,sw * gw,sh * gh)
local dx,dy = mx - self.previous_mx,my - self.previous_my
camera:move(-dx,-dy)
end
self.previous_mx,self.previous_my = camera:getMousePosition(sw,sh,0,0,sw * gw,sh * gh)
--
--if input:pressed("zoom_in") then
-- timer:tween(0.2,camera,{scale = camera.scale + 0.4},'in-out-cubic')
--end
--if input:pressed("zoom_out") then
-- timer:tween(0.2,camera,{scale = camera.scale - 0.4},'in-out-cubic')
--end
end
function StageMap:draw()
love.graphics.setCanvas(self.main_canvas)
love.graphics.clear()
local font = Fonts.unifont
love.graphics.setFont(font)
love.graphics.print({{1,0,0},"世界地图"},gw/2 - 40,0,0,sw,sh)
camera:attach()
--- background
love.graphics.draw(self.bg)
--- sp
love.graphics.setColor(Color.skill_point)
if self.area then self.area:draw() end
---- draw line
for _, line in ipairs(self.lines) do
line:draw()
end
for _, node in ipairs(self.nodes) do
node:draw()
end
--- draw state
for _,node in ipairs(self.nodes) do
if node.hot and town[node.id].stats then
local stats = town[node.id].stats
--- get max text width
local max_text_width = 0
for i=1,#stats,3 do
if font:getWidth(stats[i]) > max_text_width then
max_text_width = font:getWidth(stats[i])
end
end
--- draw rectangle
local mx,my = camera:getMousePosition(0,0,sw * gw,sh * gh)
local mx,my = love.mouse.getPosition()
mx,my = mx/sw,my/sh
love.graphics.setColor(1,0,0,0.8)
love.graphics.rectangle('fill',mx,my
,16 + max_text_width,font:getHeight() + #stats/3 * font:getHeight())
--- draw text
love.graphics.setColor(Color.default)
for i = 1,#stats,3 do
love.graphics.print(stats[i]
,math.floor(mx + 8),math.floor(my + font:getHeight()/2 + math.floor(i/3) * font:getHeight()))
end
end
end
camera:detach()
love.graphics.label('诺亚世界')
love.graphics.setColor(1,1,1)
love.graphics.label("我的世界",0,0)
love.graphics.setCanvas()
--love.graphics.setBlendMode('alpha','premultiplied')
love.graphics.draw(self.main_canvas,0,0,0,sw,sh)
gooi.draw("StageMap")
end
function StageMap:canNodeBeBought(id)
for _,linked_node_id in ipairs(self.tree[id]) do
if fn.any(bought_node_indexes,linked_node_id) then return true end
end
end |
local luaunit = require("luaunit")
local types = require("lualife.types")
local Point = require("lualife.models.point")
-- luacheck: globals TestPoint
TestPoint = {}
function TestPoint.test_new()
local point = Point:new(23, 42)
luaunit.assert_true(types.is_instance(point, Point))
luaunit.assert_is_number(point.x)
luaunit.assert_equals(point.x, 23)
luaunit.assert_is_number(point.y)
luaunit.assert_equals(point.y, 42)
end
function TestPoint.test_tostring()
local point = Point:new(23, 42)
local text = tostring(point)
luaunit.assert_is_string(text)
luaunit.assert_equals(text, "{x = 23,y = 42}")
end
function TestPoint.test_translate()
local point = Point:new(5, 12)
local translated_point = point:translate(Point:new(23, 42))
luaunit.assert_true(types.is_instance(translated_point, Point))
luaunit.assert_equals(translated_point, Point:new(28, 54))
end
function TestPoint.test_scale()
local point = Point:new(5, 12)
local scaled_point = point:scale(23)
luaunit.assert_true(types.is_instance(scaled_point, Point))
luaunit.assert_equals(scaled_point, Point:new(115, 276))
end
|
AddCSLuaFile()
local VehicleName = "FCV 12 Impala"
local EMV = {}
---CUSTOM COLORS---
local B = "BLUE"
local R = "RED"
local A = "AMBER"
local W = "WHITE"
local G = "GREEN"
local DR = "D_RED"
local CW = "C_WHITE"
local SW = "S_WHITE"
--------------------
local PA = "A"
local PB = "B"
local PCA = "CA"
local PTT = "TT"
EMV.Siren = "TMD2"
EMV.Skin = 0
EMV.Color = Color(255,255,255)
EMV.BodyGroups = {
{ 0, 0 }, -- Body
{ 1, 0 }, -- Windows
{ 2, 0 }, -- Front Door Trim
{ 3, 0 }, -- Rear Door Trim
{ 4, 1 }, -- Trunk Trim
{ 5, 0 }, -- clamped1
{ 6, 0 }, -- clamped2
}
EMV.Liveries = {
["Other"] = {
["B/W"] = "pringle/skins/other/12_imp_b-w",
}
}
EMV.Props = {
[1] = {
Model = "models/supermighty/photon/chp_spotlight_right_down.mdl",
Scale = .9,
Pos = Vector(36, 44, 56),
Ang = Angle( 30, -70, -15),
RenderGroup = RENDERGROUP_OPAQUE,
RenderMode = RENDERMODE_NONE,
},
[2] = {
Model = "models/supermighty/photon/chp_spotlight_left_down.mdl",
Scale = .9,
Pos = Vector(-36, 43, 55),
Ang = Angle( 0, -110, 0),
RenderGroup = RENDERGROUP_OPAQUE,
RenderMode = RENDERMODE_NONE,
},
[3] = {
Model = "models/lonewolfie/setina_2_impalasize.mdl",
Scale = 1,
Pos = Vector(0, 125, 28.5),
Ang = Angle( 0, -90, 0),
RenderGroup = RENDERGROUP_OPAQUE,
RenderMode = RENDERMODE_NORMAL
},
[4] = {
Model = "models/lonewolfie/setina_pursuit.mdl",
Scale = 1,
Pos = Vector(0, 122, 28.5),
Ang = Angle( 0, -90, 0),
RenderGroup = RENDERGROUP_OPAQUE,
RenderMode = RENDERMODE_NORMAL
},
[5] = {
Model = "models/afgn_props/cvpi_gorhino_bar_center_only/afgn_props_cvpi_gorhino_bar_center_only.mdl",
Scale = Vector(1 ,.9 ,1 ),
Pos = Vector(0, -4.5, 30),
Ang = Angle( 90, -90, 0),
RenderGroup = RENDERGROUP_OPAQUE,
RenderMode = RENDERMODE_NORMAL
},
[6] = {
Model = "models/tdmcars/emergency/equipment/pushrod.mdl",
Scale = 1,
Pos = Vector(0, 118, 20.2),
Ang = Angle( 0, -90, 0),
RenderGroup = RENDERGROUP_OPAQUE,
RenderMode = RENDERMODE_NORMAL
},
}
EMV.Auto = {
[1] = {
ID = "Whelen Legacy",
Scale = .96,
Pos = Vector( 0, -10, 76.6 ),
Ang = Angle( 2, 90, 0)
},
[2] = {
ID = "Whelen Legacy",
Scale = .96,
Pos = Vector( 0, -10, 76.6 ),
Ang = Angle( 2, 90, 0),
Color1 = R,
Color2 = R
},
[3] = {
ID = "Whelen Legacy",
Scale = .96,
Pos = Vector( 0, -10, 76.6 ),
Ang = Angle( 2, 90, 0),
Color1 = B,
Color2 = B
},
[4] = {
ID = "Whelen Legacy",
Scale = .96,
Pos = Vector( 0, -10, 76.6 ),
Ang = Angle( 2, 90, 0),
Color1 = A,
Color2 = A
},
-------------------------------------------------------
[5] = {
ID = "Whelen Liberty II",
Scale = 1.05,
Pos = Vector( 0, -12, 77.5 ),
Ang = Angle( .5, 90, 0)
},
[6] = {
ID = "Whelen Liberty II",
Scale = 1.05,
Pos = Vector( 0, -12, 77.5 ),
Ang = Angle( .5, 90, 0),
Color1 = R,
Color2 = R
},
[7] = {
ID = "Whelen Liberty II",
Scale = 1.05,
Pos = Vector( 0, -12, 77.5 ),
Ang = Angle( .5, 90, 0),
Color1 = B,
Color2 = B
},
[8] = {
ID = "Whelen Liberty II",
Scale = 1.05,
Pos = Vector( 0, -12, 77.5 ),
Ang = Angle( .5, 90, 0),
Color1 = A,
Color2 = A
},
---------------------------------------------------------------
[9] = {
ID = "Whelen Liberty SX",
Scale = .91,
Pos = Vector( 0, -12, 77.9 ),
Ang = Angle( 1.8, 90, 0)
},
[10] = {
ID = "Whelen Liberty SX",
Scale = .91,
Pos = Vector( 0, -12, 77.9 ),
Ang = Angle( 1.8, 90, 0),
Color1 = R,
Color2 = R,
},
[11] = {
ID = "Whelen Liberty SX",
Scale = .91,
Pos = Vector( 0, -12, 77.9 ),
Ang = Angle( 1.8, 90, 0),
Color1 = B,
Color2 = B,
},
[12] = {
ID = "Whelen Liberty SX",
Scale = .91,
Pos = Vector( 0, -12, 77.9 ),
Ang = Angle( 1.8, 90, 0),
Color1 = A,
Color2 = A
},
----------------------------------------------------
[13] = {
ID = "Whelen Ultra Freedom",
Scale = .96,
Pos = Vector( 0, -13, 79 ),
Ang = Angle( 1.5, 90, 0)
},
[14] = {
ID = "Whelen Ultra Freedom",
Scale = .96,
Pos = Vector( 0, -13, 79 ),
Ang = Angle( 1.5, 90, 0),
Color1 = R,
Color2 = R
},
[15] = {
ID = "Whelen Ultra Freedom",
Scale = .96,
Pos = Vector( 0, -13, 79 ),
Ang = Angle( 1.5, 90, 0),
Color1 = B,
Color2 = B
},
[16] = {
ID = "Whelen Ultra Freedom",
Scale = .96,
Pos = Vector( 0, -13, 79 ),
Ang = Angle( 1.5, 90, 0),
Color1 = A,
Color2 = A
},
-----------------------------------------------
[17] = {
ID = "Whelen Justice",
Scale = 1.005,
Pos = Vector( 0, -13, 78.55 ),
Ang = Angle( 1, 90, 0),
},
[18] = {
ID = "Whelen Justice",
Scale = 1.005,
Pos = Vector( 0, -13, 78.55 ),
Ang = Angle( 1, 90, 0),
Color1 = R,
Color2 = R
},
--
[19] = {
ID = "Whelen Justice",
Scale = 1.005,
Pos = Vector( 0, -13, 78.55 ),
Ang = Angle( 1, 90, 0),
Color1 = B,
Color2 = B,
},
--
[20] = {
ID = "Whelen Justice",
Scale = 1.005,
Pos = Vector( 0, -13, 78.55 ),
Ang = Angle( 1, 90, 0),
Color1 = A,
Color2 = A
},
-------------------
-------------------
[21] = {
ID = "Code 3 RX2700",
Scale = .87,
Pos = Vector( 0, -12, 77.8 ),
Ang = Angle( 0, 90, 0)
},
--
[22] = {
ID = "Code 3 RX2700 Red",
Scale = .87,
Pos = Vector( 0, -12, 77.8 ),
Ang = Angle( 0, 90, 0)
},
--
[23] = {
ID = "Code 3 RX2700 Blue",
Scale = .87,
Pos = Vector( 0, -12, 77.8 ),
Ang = Angle( 0, 90, 0)
},
--
[24] = {
ID = "Code 3 RX2700 MC",
Scale = .87,
Pos = Vector( 0, -12, 77.8 ),
Ang = Angle( 0, 90, 0)
},
-------------------------------------
[25] = {
ID = "Federal Signal Vision SLR",
Scale = .85,
Pos = Vector( 0, -15, 79.0),
Ang = Angle( 0, 90, 0)
},
[26] = {
ID = "Federal Signal Vision SLR Clear",
Scale = .85,
Pos = Vector( 0, -15, 79.0),
Ang = Angle( 0, 90, 0)
},
--
[27] = {
ID = "Federal Signal Vision SLR R/B",
Scale = .85,
Pos = Vector( 0, -15, 79.0),
Ang = Angle( 0, 90, 0)
},
--
[28] = {
ID = "Federal Signal Vision SLR Amber",
Scale = .85,
Pos = Vector( 0, -15, 79.0),
Ang = Angle( 0, 90, 0)
},
--------------------------------------------
[29] = {
ID = "Federal Signal Integrity",
Scale = .87,
Pos = Vector( 0, -15, 76.9 ),
Ang = Angle( 1, 90, 0)
},
[30] = {
ID = "Federal Signal Integrity",
Scale = .87,
Pos = Vector( 0, -15, 76.9 ),
Ang = Angle( 1, 90, 0),
Color1 = R,
Color2 = R
},
[31] = {
ID = "Federal Signal Integrity",
Scale = .87,
Pos = Vector( 0, -15, 76.9 ),
Ang = Angle( 1, 90, 0),
Color1 = B,
Color2 = B
},
[32] = {
ID = "Federal Signal Integrity",
Scale = .87,
Pos = Vector( 0, -15, 76.9 ),
Ang = Angle( 1, 90, 0),
Color1 = A,
Color2 = A
},
-----------------------------
[33] = {
ID = "Federal Signal Legend",
Scale = .95,
Pos = Vector( 0, -13, 77.9 ),
Ang = Angle( 0, 90, 0)
},
--
[34] = {
ID = "Federal Signal Legend Red",
Scale = .95,
Pos = Vector( 0, -13, 77.9 ),
Ang = Angle( 0, 90, 0)
},
--
[35] = {
ID = "Federal Signal Legend Blue",
Scale = .95,
Pos = Vector( 0, -13, 77.9 ),
Ang = Angle( 0, 90, 0)
},
-----------------------------------------
[36] = {
ID = "Federal Signal Valor",
Scale = .84,
Pos = Vector( 0, -12, 77 ),
Ang = Angle( 0, 90, 0)
},
--
[37] = {
ID = "Federal Signal Valor",
Scale = .84,
Pos = Vector( 0, -12, 77 ),
Ang = Angle( 0, 90, 0),
Color1 = R,
Color2 = R,
},
--
[38] = {
ID = "Federal Signal Valor",
Scale = .84,
Pos = Vector( 0, -12, 77 ),
Ang = Angle( 0, 90, 0),
Color1 = B,
Color2 = B
},
--
[39] = {
ID = "Federal Signal Valor",
Scale = .84,
Pos = Vector( 0, -12, 77 ),
Ang = Angle( 0, 90, 0),
Color1 = A,
Color2 = A
},
---------------------------------------------
----------------------------
[40] = {
ID = "Whelen Edge",
Scale = .94,
Pos = Vector( 0, -15, 74.5),
Ang = Angle( -1.5, 270, 0)
},
--
[41] = {
ID = "Whelen Edge Red",
Scale = .94,
Pos = Vector( 0, -15, 74.5),
Ang = Angle( -1.5, 270, 0)
},
--
[42] = {
ID = "Whelen Edge Blue",
Scale = .94,
Pos = Vector( 0, -15, 74.5),
Ang = Angle( -1.5, 270, 0)
},
--
[43] = {
ID = "Whelen Edge Amber",
Scale = .94,
Pos = Vector( 0, -15, 74.5),
Ang = Angle( -1.5, 270, 0)
},
----------------------------------------
[44] = {
ID = "Code 3 MX7000",
Scale = 1.018,
Pos = Vector( 0, -13, 73.5),
Ang = Angle( 0, -90, 0 )
},
[45] = {
ID = "Code 3 MX7000 Blue",
Scale = 1.018,
Pos = Vector( 0, -13, 73.5),
Ang = Angle( -1, -90, 0 )
},
[46] = {
ID = "Code 3 MX7000 Amber",
Scale = 1.018,
Pos = Vector( 0, -13, 73.5),
Ang = Angle( 0, -90, 0 )
},
[47] = {
ID = "Code 3 MX7000 Red",
Scale = 1.018,
Pos = Vector( 0, -13, 73.5),
Ang = Angle( 0, -90, 0 )
},
--------------------------------
[48] = {
ID = "Code 3 x21 TR",
Scale = .95,
Pos = Vector( 0, -13, 78.5),
Ang = Angle( -2, -90, 0 )
},
[49] = {
ID = "Code 3 x21 TR Red",
Scale = .95,
Pos = Vector( 0, -13, 78.5),
Ang = Angle( -2, -90, 0 )
},
[50] = {
ID = "Code 3 x21 TR Blue",
Scale = .95,
Pos = Vector( 0, -13, 78.5),
Ang = Angle( -2, -90, 0 )
},
------------------------------------
[51] = {
ID = "Code 3 x21 TR Clear",
Scale = .95,
Pos = Vector( 0, -13, 78.5),
Ang = Angle( -2, -90, 0 )
},
[52] = {
ID = "Code 3 x21 TR Clear",
Scale = .95,
Pos = Vector( 0, -13, 78.5),
Ang = Angle( -2, -90, 0 ),
Color1 = R,
Color2 = R
},
[53] = {
ID = "Code 3 x21 TR Clear",
Scale = .95,
Pos = Vector( 0, -13, 78.5),
Ang = Angle( -2, -90, 0 ),
Color1 = B,
Color2 = B
},
[54] = {
ID = "Code 3 x21 TR Clear",
Scale = .95,
Pos = Vector( 0, -13, 78.5),
Ang = Angle( -2, -90, 0 ),
Color1 = A,
Color2 = A
},
-----------------------------------------------------
[55] = {
ID = "Whelen Liberty SX RB",
Scale = 1.06,
Pos = Vector( 0, -13, 76.7 ),
Ang = Angle( -1.5, 270, 0),
},
[56] = {
ID = "Whelen Liberty SX Red",
Scale = 1.06,
Pos = Vector( 0, -13, 76.7 ),
Ang = Angle( -1.5, 270, 0),
Color1 = R,
Color2 = R
},
[57] = {
ID = "Whelen Liberty SX Blue",
Scale = 1.06,
Pos = Vector( 0, -13, 76.7 ),
Ang = Angle( -1.5, 270, 0),
},
[58] = {
ID = "Whelen Liberty SX Amber",
Scale = 1.06,
Pos = Vector( 0, -13, 76.7 ),
Ang = Angle( -1.5, 270, 0),
},
-------------------------------------------
[59] = {
ID = "Whelen Liberty SX Clear",
Scale = 1.06,
Pos = Vector( 0, -13, 76.7 ),
Ang = Angle( -1.5, 270, 0),
},
[60] = {
ID = "Whelen Liberty SX Clear",
Scale = 1.06,
Pos = Vector( 0, -13, 76.7 ),
Ang = Angle( -1.5, 270, 0),
Color1 = R,
Color2 = R,
},
[61] = {
ID = "Whelen Liberty SX Clear",
Scale = 1.06,
Pos = Vector( 0, -13, 76.7 ),
Ang = Angle( -1.5, 270, 0),
Color1 = B,
Color2 = B
},
[62] = {
ID = "Whelen Liberty SX Clear",
Scale = 1.06,
Pos = Vector( 0, -13, 76.7 ),
Ang = Angle( -1.5, 270, 0),
Color1 = A,
Color2 = A
},
-------------------------
[63] = {
ID = "Dome Light Amber",
Scale = 1,
Pos = Vector( 15, -5, 74.8),
Ang = Angle( 0, 90, 0)
},
[64] = {
ID = "Federal Signal UltraStar",
Scale = 1.2,
Pos = Vector( 15, -5, 75),
Ang = Angle( 0, 90, 1 ),
Phase = PB
},
[65] = {
ID = "Federal Signal UltraStar Red",
Scale = 1.2,
Pos = Vector( 15, -5, 75),
Ang = Angle( 0, 90, 1 ),
Phase = PB
},
[66] = {
ID = "Federal Signal UltraStar Amber",
Scale = 1.2,
Pos = Vector( 15, -5, 75),
Ang = Angle( 0, 90, 1 ),
Phase = PB
},
[67] = {
ID = "2019 Feniex Avatar ELS",
Scale = .92,
Pos = Vector( 0, -12, 74.4 ),
Ang = Angle( 1.6, 90, 0)
},
[68] = {
ID = "TDMP Federal Signal Aerodynic",
Scale = .875,
Pos = Vector( 0, -14, 74.8 ),
Ang = Angle( -2, 270, 0)
},
[69] = {
ID = "Federal Signal Arjent",
Scale = .725,
Pos = Vector( 0, -13, 78 ),
Ang = Angle( 0, 90, 0)
},
[70] = {
ID = "TDMP Michigan Beacon",
Scale = 1,
Pos = Vector( 0, -15, 75.2),
Ang = Angle( 0, 90, 0)
},
---------------------------------------
[71] = {
ID = "Federal Signal Arjent Clear",
Scale = .725,
Pos = Vector( 0, -13, 78 ),
Ang = Angle( 0, 90, 0),
},
[72] = {
ID = "Federal Signal Arjent Clear",
Scale = .725,
Pos = Vector( 0, -13, 78 ),
Ang = Angle( 0, 90, 0),
Color1 = R,
Color2 = R
},
[73] = {
ID = "Federal Signal Arjent Clear",
Scale = .725,
Pos = Vector( 0, -13, 78 ),
Ang = Angle( 0, 90, 0),
Color1 = B,
Color2 = B
},
[74] = {
ID = "Federal Signal Arjent Clear",
Scale = .725,
Pos = Vector( 0, -13, 78 ),
Ang = Angle( 0, 90, 0),
Color1 = A,
Color2 = A
},
-----------------------------
[75] = {
ID = "Federal Signal Arjent Red",
Scale = .725,
Pos = Vector( 0, -13, 78 ),
Ang = Angle( 0, 90, 0),
},
[76] = {
ID = "Federal Signal Arjent Blue",
Scale = .725,
Pos = Vector( 0, -13, 78 ),
Ang = Angle( 0, 90, 0),
},
--------
[77] = {
ID = "Whelen Freedom Clear",
Scale = 1.01,
Pos = Vector( 0, -12, 78.5),
Ang = Angle( 2, 90, 0 )
},
[78] = {
ID = "Whelen Freedom Clear",
Scale = 1.01,
Pos = Vector( 0, -12, 78.5),
Ang = Angle( 2, 90, 0 ),
Color1 = R,
Color2 = R
},
[79] = {
ID = "Whelen Freedom Clear",
Scale = 1.01,
Pos = Vector( 0, -12, 78.5),
Ang = Angle( 2, 90, 0 ),
Color1 = B,
Color2 = B
},
[80] = {
ID = "Whelen Freedom Clear",
Scale = 1.01,
Pos = Vector( 0, -12, 78.5),
Ang = Angle( 2, 90, 0 ),
Color1 = A,
Color2 = A
},
-----------------------------------\
[81] = {
ID = "Whelen Freedom RB",
Scale = 1.01,
Pos = Vector( 0, -12, 78.5),
Ang = Angle( 2, 90, 0 ),
},
[82] = {
ID = "Whelen Freedom Red",
Scale = 1.01,
Pos = Vector( 0, -12, 78.5),
Ang = Angle( 2, 90, 0 ),
},
[83] = {
ID = "Whelen Freedom Blue",
Scale = 1.01,
Pos = Vector( 0, -12, 78.5),
Ang = Angle( 2, 90, 0 ),
},
[84] = {
ID = "Whelen Freedom Amber",
Scale = 1.01,
Pos = Vector( 0, -12, 78.5),
Ang = Angle( 2, 90, 0 ),
},
------------------------------
[85] = {
ID = "Code 3 Solex",
Scale = .96,
Pos = Vector( 0, -12, 74),
Ang = Angle( 0, 0, -1 )
},
[86] = {
ID = "Code 3 Solex",
Scale = .96,
Pos = Vector( 0, -12, 74),
Ang = Angle( 0, 0, -1 ),
Color1 = R,
Color2 = R
},
[87] = {
ID = "Code 3 Solex",
Scale = .96,
Pos = Vector( 0, -12, 74),
Ang = Angle( 0, 0, -1 ),
Color1 = B,
Color2 = B
},
[88] = {
ID = "Code 3 Solex",
Scale = .96,
Pos = Vector( 0, -12, 74),
Ang = Angle( 0, 0, -1 ),
Color1 = A,
Color2 = A,
Color3 = CW,
Color4 = CW
},
---------------------------------
[89] = {
ID = "Pringle Federal Signal Valor",
Scale = .84,
Pos = Vector( 0, -12, 77 ),
Ang = Angle( 0, 90, 0),
},
[90] = {
ID = "Pringle Federal Signal Valor",
Scale = .84,
Pos = Vector( 0, -12, 77 ),
Ang = Angle( 0, 90, 0),
Color1 = "RED",
Color2 = "RED"
},
[91] = {
ID = "Pringle Federal Signal Valor",
Scale = .84,
Pos = Vector( 0, -12, 77 ),
Ang = Angle( 0, 90, 0),
Color1 = B,
Color2 = B
},
[92] = {
ID = "Pringle Federal Signal Valor",
Scale = .84,
Pos = Vector( 0, -12, 77 ),
Ang = Angle( 0, 90, 0),
Color1 = A,
Color2 = A
},
----------------------------------------
[93] = {
ID = "Pringles Whelen Justice SS",
Scale = 1.005,
Pos = Vector( 0, -13, 78.55 ),
Ang = Angle( 1, 90, 0),
Color1 = R,
},
[94] = {
ID = "Pringles Whelen Justice SS",
Scale = 1.005,
Pos = Vector( 0, -13, 78.55 ),
Ang = Angle( 1, 90, 0),
Color1 = R,
Color2 = R
},
[95] = {
ID = "Pringles Whelen Justice SS",
Scale = 1.005,
Pos = Vector( 0, -13, 78.55 ),
Ang = Angle( 1, 90, 0),
Color1 = B,
Color2 = B
},
[96] = {
ID = "Pringles Whelen Justice SS",
Scale = 1.005,
Pos = Vector( 0, -13, 78.55 ),
Ang = Angle( 1, 90, 0),
Color1 = A,
Color2 = A
},
--------------------------
[97] = {
ID = "Whelen Justice Mini",
Scale = 1,
Pos = Vector( 0, -15, 77 ),
Ang = Angle( 0, 90, 0),
Phase = PA
},
[98] = {
ID = "Whelen Justice Mini",
Scale = 1,
Pos = Vector( 0, -15, 77 ),
Ang = Angle( 0, 90, 0),
Color1 = R,
Color2 = R,
Phase = PA
},
[99] = {
ID = "Whelen Justice Mini",
Scale = 1,
Pos = Vector( 0, -15, 77 ),
Ang = Angle( 0, 90, 0),
Color1 = B,
Color2 = B,
Phase = PA
},
[100] = {
ID = "Whelen Justice Mini",
Scale = 1,
Pos = Vector( 0, -15, 77 ),
Ang = Angle( 0, 90, 0),
Color1 = A,
Color2 = A,
Phase = PA
},
[101] = {
ID = "Whelen Justice Mini",
Scale = 1,
Pos = Vector( 0, -15, 77 ),
Ang = Angle( 0, 90, 0),
Color1 = A,
Color2 = A,
Phase = PB
},
----------------------------------------------
[102] = {
ID = "Pringles Whelen Liberty SX",
Scale = .91,
Pos = Vector( 0, -12, 77.9 ),
Ang = Angle( 1.8, 90, 0)
},
[103] = {
ID = "Pringles Whelen Liberty SX Red",
Scale = .91,
Pos = Vector( 0, -12, 77.9 ),
Ang = Angle( 1.8, 90, 0)
},
[104] = {
ID = "Pringles Whelen Liberty SX Blue",
Scale = .91,
Pos = Vector( 0, -12, 77.9 ),
Ang = Angle( 1.8, 90, 0)
},
[105] = {
ID = "Pringles Whelen Liberty SX Amber",
Scale = .91,
Pos = Vector( 0, -12, 77.9 ),
Ang = Angle( 1.8, 90, 0)
},
------------------------------------------------------
[106] = {
ID = "Pringles DOJ Whelen Liberty II",
Scale = 1.05,
Pos = Vector( 0, -12, 77.5 ),
Ang = Angle( .5, 90, 0)
},
[107] = {
ID = "WPD Liberty LB",
Scale = .92,
Pos = Vector( 0, -12, 74.8),
Ang = Angle( 1.2, -90, 0 )
},
[108] = {
ID = "NYSP Whelen Liberty",
Scale = .98,
Pos = Vector( 0, -13, 74 ),
Ang = Angle( -1.5, 270, 0),
},
[109] = {
ID = "NYSP Whelen Freedom",
Scale = .83,
Pos = Vector( 0, -12, 74.5),
Ang = Angle( -1.5, -90, 0 )
},
[110] = {
ID = "CHP Whelen Liberty SX",
Scale = .915,
Pos = Vector( 0, -13, 77.8),
Ang = Angle( 1.5, 90, 0 )
},
[111] = {
ID = "Spotlight Round Prop",
Scale = .9,
Pos = Vector(-39, 42, 58),
Ang = Angle( 0, -110, 0),
},
[112] = {
ID = "Spotlight Round Prop Right",
Scale = .9,
Pos = Vector(39, 42, 58),
Ang = Angle( 0, -80, 0),
},
------------------------------------
[113] = {
ID = "Whelen Tir3",
Scale = 1,
Pos = Vector( -10, 117.5, 33.3),
Ang = Angle( 00, -84, 0 ),
Color1 = R,
Color2 = B,
Phase = PA
},
[114] = {
ID = "Whelen Tir3",
Scale = 1,
Pos = Vector( 10, 117.5, 33.3),
Ang = Angle( 00, -96, 0 ),
Color1 = B,
Color2 = R,
Phase = PB
},
---------
[115] = {
ID = "Whelen Tir3",
Scale = 1,
Pos = Vector( -10, 117.5, 33.3),
Ang = Angle( 00, -84, 0 ),
Color1 = R,
Color2 = B,
Phase = PA
},
[116] = {
ID = "Whelen Tir3",
Scale = 1,
Pos = Vector( 10, 117.5, 33.3),
Ang = Angle( 00, -96, 0 ),
Color1 = R,
Color2 = R,
Phase = PB
},
---------
[117] = {
ID = "Whelen Tir3",
Scale = 1,
Pos = Vector( -10, 117.5, 33.3),
Ang = Angle( 00, -84, 0 ),
Color1 = B,
Color2 = B,
Phase = PA
},
[118] = {
ID = "Whelen Tir3",
Scale = 1,
Pos = Vector( 10, 117.5, 33.3),
Ang = Angle( 00, -96, 0 ),
Color1 = B,
Color2 = R,
Phase = PB
},
---------
[119] = {
ID = "Whelen Tir3",
Scale = 1,
Pos = Vector( -10, 117.5, 33.3),
Ang = Angle( 00, -84, 0 ),
Color1 = A,
Color2 = A,
Phase = PA
},
[120] = {
ID = "Whelen Tir3",
Scale = 1,
Pos = Vector( 10, 117.5, 33.3),
Ang = Angle( 00, -96, 0 ),
Color1 = A,
Color2 = A,
Phase = PB
},
---------
[121] = {
ID = "Federal Signal MicroPulse",
Scale = 1,
Pos = Vector( 10, 117.6, 34),
Ang = Angle( 0, -7, 0 ),
Color1 = B,
Phase = "B2"
},
[122] = {
ID = "Federal Signal MicroPulse",
Scale = 1,
Pos = Vector( -9, 117.8, 34),
Ang = Angle( 0, 7, 0 ),
Color1 = R,
Phase = "A2"
},
--
[123] = {
ID = "Federal Signal MicroPulse",
Scale = 1,
Pos = Vector( 10, 117.6, 34),
Ang = Angle( 0, -7, 0 ),
Color1 = R,
Phase = "B2"
},
[124] = {
ID = "Federal Signal MicroPulse",
Scale = 1,
Pos = Vector( -9, 117.8, 34),
Ang = Angle( 0, 7, 0 ),
Color1 = R,
Phase = "A2"
},
--
[125] = {
ID = "Federal Signal MicroPulse",
Scale = 1,
Pos = Vector( 10, 117.6, 34),
Ang = Angle( 0, -7, 0 ),
Color1 = B,
Phase = "B2"
},
[126] = {
ID = "Federal Signal MicroPulse",
Scale = 1,
Pos = Vector( -9, 117.8, 34),
Ang = Angle( 0, 7, 0 ),
Color1 = B,
Phase = "A2"
},
--
[127] = {
ID = "Federal Signal MicroPulse",
Scale = 1,
Pos = Vector( 10, 117.6, 34),
Ang = Angle( 0, -7, 0 ),
Color1 = A,
Phase = "B2"
},
[128] = {
ID = "Federal Signal MicroPulse",
Scale = 1,
Pos = Vector( -9, 117.8, 34),
Ang = Angle( 0, 7, 0 ),
Color1 = A,
Phase = "A2"
},
-----------------------
[129] = {
ID = "Pringles Skirt Lighting New",
Scale = 1,
Pos = Vector( 0, 121.3, 17.5),
Ang = Angle( 0, 270, 0 )
},
[130] = {
ID = "Pringles Skirt Lighting New",
Scale = 1,
Pos = Vector( 0, 121.3, 17.5),
Ang = Angle( 0, 270, 0 ),
Color1 = R,
Color2 = R
},
[131] = {
ID = "Pringles Skirt Lighting New",
Scale = 1,
Pos = Vector( 0, 121.3, 17.5),
Ang = Angle( 0, 270, 0 ),
Color1 = B,
Color2 = B
},
[132] = {
ID = "Pringles Skirt Lighting New",
Scale = 1,
Pos = Vector( 0, 121.3, 17.5),
Ang = Angle( 0, 270, 0 ),
Color1 = A,
Color2 = A
},
----------------------------------
[133] = {
ID = "Whelen SlimLighter",
Scale = .8,
Pos = Vector( 0, 121.1, 22 ),
Ang = Angle( 0, 90, 0 ),
Color1 = "RED",
Color2 = "BLUE",
},
[134] = {
ID = "Whelen SlimLighter",
Scale = .8,
Pos = Vector( 0, 121.1, 22 ),
Ang = Angle( 0, 90, 0 ),
Color1 = R,
Color2 = R
},
[135] = {
ID = "Whelen SlimLighter",
Scale = .8,
Pos = Vector( 0, 121.1, 22 ),
Ang = Angle( 0, 90, 0 ),
Color1 = B,
Color2 = B
},
[136] = {
ID = "Whelen SlimLighter",
Scale = .8,
Pos = Vector( 0, 121.1, 22 ),
Ang = Angle( 0, 90, 0 ),
Color1 = A,
Color2 = A
},
-----------------------------------
[137] = {
ID = "Whelen Ion Extra",
Scale = .8,
Pos = Vector( 10, 117.4, 33.45),
Ang = Angle( 0, -5, 10 ),
Color1 = B,
Phase = PA
},
[138] = {
ID = "Whelen Ion Extra",
Scale = .8,
Pos = Vector( -10, 117.4, 33.45),
Ang = Angle( 0, 5, 10 ),
Color1 = R,
Phase = PB
},
--
[139] = {
ID = "Whelen Ion Extra",
Scale = .8,
Pos = Vector( 10, 117.4, 33.45),
Ang = Angle( 0, -5, 10 ),
Color1 = R,
Phase = PA
},
[140] = {
ID = "Whelen Ion Extra",
Scale = .8,
Pos = Vector( -10, 117.4, 33.45),
Ang = Angle( 0, 5, 10 ),
Color1 = R,
Phase = PB
},
--
[141] = {
ID = "Whelen Ion Extra",
Scale = .8,
Pos = Vector( 10, 117.4, 33.45),
Ang = Angle( 0, -5, 10 ),
Color1 = B,
Phase = PA
},
[142] = {
ID = "Whelen Ion Extra",
Scale = .8,
Pos = Vector( -10, 117.4, 33.45),
Ang = Angle( 0, 5, 10 ),
Color1 = B,
Phase = PB
},
--
[143] = {
ID = "Whelen Ion Extra",
Scale = .8,
Pos = Vector( 10, 117.4, 33.45),
Ang = Angle( 0, -5, 10 ),
Color1 = A,
Phase = PA
},
[144] = {
ID = "Whelen Ion Extra",
Scale = .8,
Pos = Vector( -10, 117.4, 33.45),
Ang = Angle( 0, 5, 10 ),
Color1 = A,
Phase = PB
},
------------------------------------------
[145] = {
ID = "Whelen Ion MC",
Scale = .8,
Pos = Vector( 10, 117.4, 33.45),
Ang = Angle( 0, -5, 10 ),
Color1 = B,
Color2 = R,
},
[146] = {
ID = "Whelen Ion MC",
Scale = .8,
Pos = Vector( -10, 117.4, 33.45),
Ang = Angle( 0, 5, 10 ),
Color1 = R,
Color2 = B,
},
--
[147] = {
ID = "Whelen Ion MC",
Scale = .8,
Pos = Vector( 10, 117.4, 33.45),
Ang = Angle( 0, -5, 10 ),
Color1 = R,
Color2 = W,
},
[148] = {
ID = "Whelen Ion MC",
Scale = .8,
Pos = Vector( -10, 117.4, 33.45),
Ang = Angle( 0, 5, 10 ),
Color1 = W,
Color2 = R,
},
--
[149] = {
ID = "Whelen Ion MC",
Scale = .8,
Pos = Vector( 10, 117.4, 33.45),
Ang = Angle( 0, -5, 10 ),
Color1 = B,
Color2 = W,
},
[150] = {
ID = "Whelen Ion MC",
Scale = .8,
Pos = Vector( -10, 117.4, 33.45),
Ang = Angle( 0, 5, 10 ),
Color1 = W,
Color2 = B,
},
--
[151] = {
ID = "Whelen Ion MC",
Scale = .8,
Pos = Vector( 10, 117.4, 33.45),
Ang = Angle( 0, -5, 10 ),
Color1 = A,
Color2 = W,
},
[152] = {
ID = "Whelen Ion MC",
Scale = .8,
Pos = Vector( -10, 117.4, 33.45),
Ang = Angle( 0, 5, 10 ),
Color1 = W,
Color2 = A,
},
[153] = {
ID = "P Whelen Ion V Series",
Scale = .5,
Pos = Vector( -45, 32.5, 53.5),
Ang = Angle( 20, -55, 0 ),
Phase = PA,
Color1 = R,
Color2 = R,
Color3 = R,
Color4 = R
},
[154] = {
ID = "P Whelen Ion V Series",
Scale = .5,
Pos = Vector( 45, 32.5, 53.5),
Ang = Angle( 20, 230, 0 ),
Phase = PB,
Color1 = B,
Color2 = B,
Color3 = B,
Color4 = B
},
--
[155] = {
ID = "P Whelen Ion V Series",
Scale = .5,
Pos = Vector( -45, 32.5, 53.5),
Ang = Angle( 20, -55, 0 ),
Phase = PA,
Color1 = R,
Color2 = R,
Color3 = R,
Color4 = R
},
[156] = {
ID = "P Whelen Ion V Series",
Scale = .5,
Pos = Vector( 45, 32.5, 53.5),
Ang = Angle( 20, 230, 0 ),
Phase = PB,
Color1 = R,
Color2 = R,
Color3 = R,
Color4 = R
},
--
[157] = {
ID = "P Whelen Ion V Series",
Scale = .5,
Pos = Vector( -45, 32.5, 53.5),
Ang = Angle( 20, -55, 0 ),
Phase = PA,
Color1 = B,
Color2 = B,
Color3 = B,
Color4 = B
},
[158] = {
ID = "P Whelen Ion V Series",
Scale = .5,
Pos = Vector( 45, 32.5, 53.5),
Ang = Angle( 20, 230, 0 ),
Phase = PB,
Color1 = B,
Color2 = B,
Color3 = B,
Color4 = B
},
--
[159] = {
ID = "P Whelen Ion V Series",
Scale = .5,
Pos = Vector( -45, 32.5, 53.5),
Ang = Angle( 20, -55, 0 ),
Phase = PA,
Color1 = A,
Color2 = A,
Color3 = A,
Color4 = A
},
[160] = {
ID = "P Whelen Ion V Series",
Scale = .5,
Pos = Vector( 45, 32.5, 53.5),
Ang = Angle( 20, 230, 0 ),
Phase = PB,
Color1 = A,
Color2 = A,
Color3 = A,
Color4 = A
},
--
[161] = {
ID = "SoundOff Intersector",
Scale = .8,
Pos = Vector( -45, 30, 50),
Ang = Angle( 0, 60, 0 ),
Phase = PA,
Color1 = R,
Color2 = R
},
[162] = {
ID = "SoundOff Intersector",
Scale = .8,
Pos = Vector( 45, 30, 50),
Ang = Angle( 0, -60, 0 ),
Phase = PB,
Color1 = B,
Color2 = B
},
--
[163] = {
ID = "SoundOff Intersector",
Scale = .8,
Pos = Vector( -45, 30, 50),
Ang = Angle( 0, 60, 0 ),
Phase = PA,
Color1 = R,
Color2 = R
},
[164] = {
ID = "SoundOff Intersector",
Scale = .8,
Pos = Vector( 45, 30, 50),
Ang = Angle( 0, -60, 0 ),
Phase = PB,
Color1 = R,
Color2 = R
},
--
--
[165] = {
ID = "SoundOff Intersector",
Scale = .8,
Pos = Vector( -45, 30, 50),
Ang = Angle( 0, 60, 0 ),
Phase = PA,
Color1 = B,
Color2 = B
},
[166] = {
ID = "SoundOff Intersector",
Scale = .8,
Pos = Vector( 45, 30, 50),
Ang = Angle( 0, -60, 0 ),
Phase = PB,
Color1 = B,
Color2 = B
},
--
--
[167] = {
ID = "SoundOff Intersector",
Scale = .8,
Pos = Vector( -45, 30, 50),
Ang = Angle( 0, 60, 0 ),
Phase = PA,
Color1 = A,
Color2 = A
},
[168] = {
ID = "SoundOff Intersector",
Scale = .8,
Pos = Vector( 45, 30, 50),
Ang = Angle( 0, -60, 0 ),
Phase = PB,
Color1 = A,
Color2 = A
},
--
[169] = {
ID = "TDM Front Interior Lightbar",
Scale = 1.1,
Pos = Vector( 0, 20, 67.5),
Ang = Angle( 0, 90, 0 )
},
[170] = {
ID = "TDM Front Interior Lightbar",
Scale = 1.1,
Pos = Vector( 0, 20, 67.5),
Ang = Angle( 0, 90, 0 ),
Color1 = R,
Color2 = R,
},
[171] = {
ID = "TDM Front Interior Lightbar",
Scale = 1.1,
Pos = Vector( 0, 20, 67.5),
Ang = Angle( 0, 90, 0 ),
Color1 = B,
Color2 = B
},
[172] = {
ID = "TDM Front Interior Lightbar",
Scale = 1.1,
Pos = Vector( 0, 20, 67.5),
Ang = Angle( 0, 90, 0 ),
Color1 = A,
Color2 = A
},
--
[173] = {
ID = "DOJ Interior Lightbar",
Scale = 1.1,
Pos = Vector( 0, 20, 67.5),
Ang = Angle( 0, 90, 0 )
},
[174] = {
ID = "DOJ Interior Lightbar",
Scale = 1.1,
Pos = Vector( 0, 20, 67.5),
Ang = Angle( 0, 90, 0 ),
Color1 = R,
Color2 = R,
},
[175] = {
ID = "DOJ Interior Lightbar",
Scale = 1.1,
Pos = Vector( 0, 20, 67.5),
Ang = Angle( 0, 90, 0 ),
Color1 = B,
Color2 = B
},
[176] = {
ID = "DOJ Interior Lightbar",
Scale = 1.1,
Pos = Vector( 0, 20, 67.5),
Ang = Angle( 0, 90, 0 ),
Color1 = A,
Color2 = A
},
-------------------
[177] = {
ID = "Code 3 Wingman Front",
Scale = 1,
Pos = Vector( 0, 20, 68),
Ang = Angle( 0, -90, 0 )
},
[178] = {
ID = "Code 3 Wingman Front",
Scale = 1,
Pos = Vector( 0, 20, 68),
Ang = Angle( 0, -90, 0 ),
Color1 = R,
Color2 = R,
},
[179] = {
ID = "Code 3 Wingman Front",
Scale = 1,
Pos = Vector( 0, 20, 68),
Ang = Angle( 0, -90, 0 ),
Color1 = B,
Color2 = B,
},
[180] = {
ID = "Code 3 Wingman Front",
Scale = 1,
Pos = Vector( 0, 20, 68),
Ang = Angle( 0, -90, 0 ),
Color1 = A,
Color2 = A
},
----------
[181] = {
ID = "P Feniex Apollo",
Scale = .7,
Pos = Vector( 14, 18, 68.5),
Ang = Angle( 0, 85, 0 ),
Color1 = R,
Color2 = B
},
[182] = {
ID = "P Feniex Apollo",
Scale = .7,
Pos = Vector( 14, 18, 68.5),
Ang = Angle( 0, 85, 0 ),
Color1 = R,
Color2 = R
},
[183] = {
ID = "P Feniex Apollo",
Scale = .7,
Pos = Vector( 14, 18, 68.5),
Ang = Angle( 0, 85, 0 ),
Color1 = B,
Color2 = B
},
[184] = {
ID = "P Feniex Apollo",
Scale = .7,
Pos = Vector( 14, 18, 68.5),
Ang = Angle( 0, 85, 0 ),
Color1 = A,
Color2 = A
},
--
[185] = {
ID = "Feniex Fusion",
Scale = 1,
Pos = Vector( 0, 20, 68),
Ang = Angle( 0, 0, 0 ),
RenderGroup = RENDERGROUP_OPAQUE,
RenderMode = RENDERMODE_NONE,
},
}
EMV.Selections = {
{
Name = "Lightbars",
Options = {
{ Name = "None"},
{ Category = "Whelen Legacy", Name = "R/B", Auto = {1}, Props = {} },
{ Category = "Whelen Legacy", Name = "Red", Auto = {2}, Props = {} },
{ Category = "Whelen Legacy", Name = "Blue", Auto = {3}, Props = {} },
{ Category = "Whelen Legacy", Name = "Amber", Auto = {4}, Props = {} },
----
{ Category = "Whelen Liberty II", Name = "R/B", Auto = {5}, Props = {} },
{ Category = "Whelen Liberty II", Name = "Red", Auto = {6}, Props = {} },
{ Category = "Whelen Liberty II", Name = "Blue", Auto = {7}, Props = {} },
{ Category = "Whelen Liberty II", Name = "Amber", Auto = {8}, Props = {} },
--
{ Category = "Whelen Liberty SX", Name = "R/B", Auto = {9}, Props = {} },
{ Category = "Whelen Liberty SX", Name = "Red", Auto = {10}, Props = {} },
{ Category = "Whelen Liberty SX", Name = "Blue", Auto = {11}, Props = {} },
{ Category = "Whelen Liberty SX", Name = "Amber", Auto = {12}, Props = {} },
--
{ Category = "Whelen Ultra Freedom", Name = "R/B", Auto = {13}, Props = {} },
{ Category = "Whelen Ultra Freedom", Name = "Red", Auto = {14}, Props = {} },
{ Category = "Whelen Ultra Freedom", Name = "Blue", Auto = {15}, Props = {} },
{ Category = "Whelen Ultra Freedom", Name = "Amber", Auto = {16}, Props = {} },
--
{ Category = "Whelen Justice", Name = "R/B", Auto = {17}, Props = {} },
{ Category = "Whelen Justice", Name = "Red", Auto = {18}, Props = {} },
{ Category = "Whelen Justice", Name = "Blue", Auto = {19}, Props = {} },
{ Category = "Whelen Justice", Name = "Amber", Auto = {20}, Props = {} },
--
{ Category = "Code 3 RX2700", Name = "R/B", Auto = {21}, Props = {} },
{ Category = "Code 3 RX2700", Name = "Red", Auto = {22}, Props = {} },
{ Category = "Code 3 RX2700", Name = "Blue", Auto = {23}, Props = {} },
{ Category = "Code 3 RX2700", Name = "MC", Auto = {24}, Props = {} },
--
{ Category = "Federal Signal Vision SLR", Name = "NYPD", Auto = {25}, Props = {} },
{ Category = "Federal Signal Vision SLR", Name = "R/B Clear", Auto = {26}, Props = {} },
{ Category = "Federal Signal Vision SLR", Name = "R/B", Auto = {27}, Props = {} },
{ Category = "Federal Signal Vision SLR", Name = "Amber", Auto = {28}, Props = {} },
--
{ Category = "Federal Signal Integrity", Name = "R/B", Auto = {29}, Props = {} },
{ Category = "Federal Signal Integrity", Name = "Red", Auto = {30}, Props = {} },
{ Category = "Federal Signal Integrity", Name = "Blue", Auto = {31}, Props = {} },
{ Category = "Federal Signal Integrity", Name = "Amber", Auto = {32}, Props = {} },
--
{ Category = "Federal Signal Legend", Name = "R/B", Auto = {33}, Props = {} },
{ Category = "Federal Signal Legend", Name = "Red", Auto = {34}, Props = {} },
{ Category = "Federal Signal Legend", Name = "Blue", Auto = {35}, Props = {} },
--
{ Category = "Federal Signal Valor", Name = "R/B", Auto = {36}, Props = {} },
{ Category = "Federal Signal Valor", Name = "Red", Auto = {37}, Props = {} },
{ Category = "Federal Signal Valor", Name = "Blue", Auto = {38}, Props = {} },
{ Category = "Federal Signal Valor", Name = "Amber", Auto = {39}, Props = {} },
---
{ Category = "Whelen Edge", Name = "R/B", Auto = {40}, Props = {} },
{ Category = "Whelen Edge", Name = "Red", Auto = {41}, Props = {} },
{ Category = "Whelen Edge", Name = "Blue", Auto = {42}, Props = {} },
{ Category = "Whelen Edge", Name = "Amber", Auto = {43}, Props = {} },
--
{ Category = "Code 3 MX7000", Name = "Red/Blue", Auto = {44}, Props = {} },
{ Category = "Code 3 MX7000", Name = "Blue", Auto = {45}, Props = {} },
{ Category = "Code 3 MX7000", Name = "Amber", Auto = {46}, Props = {} },
{ Category = "Code 3 MX7000", Name = "Red", Auto = {47}, Props = {} },
--
{ Category = "Code 3 x21 TR", Name = "R/B", Auto = {48}, Props = {} },
{ Category = "Code 3 x21 TR", Name = "Red", Auto = {49}, Props = {} },
{ Category = "Code 3 x21 TR", Name = "Blue", Auto = {50}, Props = {} },
--
{ Category = "Code 3 x21 TR Clear", Name = "R/B", Auto = {51}, Props = {} },
{ Category = "Code 3 x21 TR Clear", Name = "Red", Auto = {52}, Props = {} },
{ Category = "Code 3 x21 TR Clear", Name = "Blue", Auto = {53}, Props = {} },
{ Category = "Code 3 x21 TR Clear", Name = "Amber", Auto = {54}, Props = {} },
--
{ Category = "SM Whelen Liberty SX", Name = "R/B", Auto = {55}, Props = {} },
{ Category = "SM Whelen Liberty SX", Name = "Red", Auto = {56}, Props = {} },
{ Category = "SM Whelen Liberty SX", Name = "Blue", Auto = {57}, Props = {} },
{ Category = "SM Whelen Liberty SX", Name = "Amber", Auto = {58}, Props = {} },
--
{ Category = "SM Whelen Liberty SX Clear", Name = "R/B", Auto = {59}, Props = {} },
{ Category = "SM Whelen Liberty SX Clear", Name = "Red", Auto = {60}, Props = {} },
{ Category = "SM Whelen Liberty SX Clear", Name = "Blue", Auto = {61}, Props = {} },
{ Category = "SM Whelen Liberty SX Clear", Name = "Amber", Auto = {62}, Props = {} },
--
{ Category = "FS UltraStar Single", Name = "Blue", Auto = {64}, Props = {} },
{ Category = "FS UltraStar Single", Name = "Red", Auto = {65}, Props = {} },
{ Category = "FS UltraStar Single", Name = "Amber", Auto = {66}, Props = {} },
--
{ Category = "Federal Signal Arjent Clear", Name = "R/B", Auto = {71}, Props = {} },
{ Category = "Federal Signal Arjent Clear", Name = "Red", Auto = {72}, Props = {} },
{ Category = "Federal Signal Arjent Clear", Name = "Blue", Auto = {73}, Props = {} },
{ Category = "Federal Signal Arjent Clear", Name = "Amber", Auto = {74}, Props = {} },
--
{ Category = "Federal Signal Arjent", Name = "R/B", Auto = {69}, Props = {} },
{ Category = "Federal Signal Arjent", Name = "Red", Auto = {75}, Props = {} },
{ Category = "Federal Signal Arjent", Name = "Blue", Auto = {76}, Props = {} },
--
{ Category = "SM Whelen Freedom Clear", Name = "R/B", Auto = {77}, Props = {} },
{ Category = "SM Whelen Freedom Clear", Name = "Red", Auto = {78}, Props = {} },
{ Category = "SM Whelen Freedom Clear", Name = "Blue", Auto = {79}, Props = {} },
{ Category = "SM Whelen Freedom Clear", Name = "Amber", Auto = {80}, Props = {} },
--
{ Category = "SM Whelen Freedom", Name = "R/B", Auto = {81}, Props = {} },
{ Category = "SM Whelen Freedom", Name = "Red", Auto = {82}, Props = {} },
{ Category = "SM Whelen Freedom", Name = "Blue", Auto = {83}, Props = {} },
{ Category = "SM Whelen Freedom", Name = "Amber", Auto = {84}, Props = {} },
--
{ Category = "Code 3 Solex", Name = "R/B", Auto = {85}, Props = {} },
{ Category = "Code 3 Solex", Name = "Red", Auto = {86}, Props = {} },
{ Category = "Code 3 Solex", Name = "Blue", Auto = {87}, Props = {} },
{ Category = "Code 3 Solex", Name = "Amber", Auto = {88}, Props = {} },
--
{ Category = "Pringles Valor Lightbar", Name = "R/B", Auto = {89}, Props = {} },
{ Category = "Pringles Valor Lightbar", Name = "Red", Auto = {90}, Props = {} },
{ Category = "Pringles Valor Lightbar", Name = "Blue", Auto = {91}, Props = {} },
{ Category = "Pringles Valor Lightbar", Name = "Amber", Auto = {92}, Props = {} },
--
{ Category = "Pringles Whelen Justice", Name = "R/B", Auto = {93}, Props = {} },
{ Category = "Pringles Whelen Justice", Name = "Red", Auto = {94}, Props = {} },
{ Category = "Pringles Whelen Justice", Name = "Blue", Auto = {95}, Props = {} },
{ Category = "Pringles Whelen Justice", Name = "Amber", Auto = {96}, Props = {} },
--
{ Category = "Pringles Whelen Mini Justice", Name = "R/B", Auto = {97}, Props = {} },
{ Category = "Pringles Whelen Mini Justice", Name = "Red", Auto = {98}, Props = {} },
{ Category = "Pringles Whelen Mini Justice", Name = "Blue", Auto = {99}, Props = {} },
{ Category = "Pringles Whelen Mini Justice", Name = "Amber", Auto = {100}, Props = {} },
--
{ Category = "Pringles Whelen Liberty SX", Name = "R/B", Auto = {102}, Props = {} },
{ Category = "Pringles Whelen Liberty SX", Name = "Red", Auto = {103}, Props = {} },
{ Category = "Pringles Whelen Liberty SX", Name = "Blue", Auto = {104}, Props = {} },
{ Category = "Pringles Whelen Liberty SX", Name = "Amber", Auto = {105}, Props = {} },
--
{ Category = "Other", Name = "Amber Dome", Auto = {63}, Props = {} },
{ Category = "Other", Name = "Fenix Avatar", Auto = {67}, Props = {} },
{ Category = "Other", Name = "Federal Signal Aerodynic", Auto = {68}, Props = {} },
{ Category = "Other", Name = "Michigan Beacon", Auto = {70}, Props = {} },
{ Category = "Other", Name = "Whelen Mini Jutice Pace", Auto = {101}, Props = {} },
--
{ Category = "Specific Lightbars", Name = "DOJ Liberty II", Auto = {106}, Props = {} },
{ Category = "Specific Lightbars", Name = "NYSP Liberty", Auto = {108}, Props = {} },
{ Category = "Specific Lightbars", Name = "NYSP Freedom", Auto = {109}, Props = {} },
{ Category = "Specific Lightbars", Name = "Watertown Lightbar", Auto = {107}, Props = {} },
{ Category = "Specific Lightbars", Name = "CHP Liberty", Auto = {110}, Props = {} },
}
},
{
Name = "Pushbar",
Options = {
{ Name = "None"},
{ Category = "Plain", Name = "Impala Sentina", Auto = {}, Props = {3} },
{ Category = "Plain", Name = "Impala Sentina Pursuit", Auto = {}, Props = {4} },
{ Category = "Plain", Name = "Go Rhino Pushbar", Auto = {}, Props = {5} },
{ Category = "Plain", Name = "NYPD Pushrod", Auto = {}, Props = {6} },
}
},
{
Name = "Grill",
Options = {
{ Name = "None"},
{ Category = "TIR 3", Name = "R/B", Auto = {113, 114}, Props = {} },
{ Category = "TIR 3", Name = "Red", Auto = {115,116}, Props = {} },
{ Category = "TIR 3", Name = "Blue", Auto = {117,118}, Props = {} },
{ Category = "TIR 3", Name = "Amber", Auto = {119,120}, Props = {} },
--
{ Category = "FS MicroPulse", Name = "R/B", Auto = {121,122}, Props = {} },
{ Category = "FS MicroPulse", Name = "Red", Auto = {123,124}, Props = {} },
{ Category = "FS MicroPulse", Name = "Blue", Auto = {125,126}, Props = {} },
{ Category = "FS MicroPulse", Name = "Amber", Auto = {127,128}, Props = {} },
--
{ Category = "Whelen Ion Extra", Name = "R/B", Auto = {137,138}, Props = {} },
{ Category = "Whelen Ion Extra", Name = "Red", Auto = {139,140}, Props = {} },
{ Category = "Whelen Ion Extra", Name = "Blue", Auto = {141,142}, Props = {} },
{ Category = "Whelen Ion Extra", Name = "Amber", Auto = {143,144}, Props = {} },
--
{ Category = "Whelen Ion MC", Name = "R/B", Auto = {145,146}, Props = {} },
{ Category = "Whelen Ion MC", Name = "Red", Auto = {147,148}, Props = {} },
{ Category = "Whelen Ion MC", Name = "Blue", Auto = {149,150}, Props = {} },
{ Category = "Whelen Ion MC", Name = "Amber", Auto = {151,152}, Props = {} },
--
{ Category = "5LED", Name = "R/B", Auto = {129}, Props = {} },
{ Category = "5LED", Name = "Red", Auto = {130}, Props = {} },
{ Category = "5LED", Name = "Blue", Auto = {131}, Props = {} },
{ Category = "5LED", Name = "Amber", Auto = {132}, Props = {} },
--
{ Category = "SlimLighter", Name = "R/B", Auto = {133}, Props = {} },
{ Category = "SlimLighter", Name = "Red", Auto = {134}, Props = {} },
{ Category = "SlimLighter", Name = "Blue", Auto = {135}, Props = {} },
{ Category = "SlimLighter", Name = "Amber", Auto = {136}, Props = {} },
}
},
{
Name = "Spotlights",
Options = {
{ Name = "None"},
{ Category = "SM", Name = "2 Down", Auto = {}, Props = {1,2} },
{ Category = "SM", Name = "Driver Up", Auto = {111}, Props = {1} },
{ Category = "SM", Name = "Both Up", Auto = {111,112}, Props = {} },
{ Category = "SM", Name = "Pass Up", Auto = {112}, Props = {2} },
}
},
{
Name = "Mirror Lights",
Options = {
{ Name = "None"},
{ Category = "Whelen Ion 500V", Name = "R/B", Auto = {153,154}, Props = {} },
{ Category = "Whelen Ion 500V", Name = "Red", Auto = {155,156}, Props = {} },
{ Category = "Whelen Ion 500V", Name = "Blue", Auto = {157,158}, Props = {} },
{ Category = "Whelen Ion 500V", Name = "Amber", Auto = {159,160}, Props = {} },
--
{ Category = "SoundOff Intersector", Name = "R/B", Auto = { 161,162}, Props = {} },
{ Category = "SoundOff Intersector", Name = "Red", Auto = { 163,164}, Props = {} },
{ Category = "SoundOff Intersector", Name = "Blue", Auto = { 165,166}, Props = {} },
{ Category = "SoundOff Intersector", Name = "Amber", Auto = { 167,168}, Props = {} },
}
},
{
Name = "Front Upper",
Options = {
{ Name = "None"},
{ Category = "TDM Front Upper", Name = "R/B", Auto = {169}, Props = {} },
{ Category = "TDM Front Upper", Name = "Red", Auto = {170}, Props = {} },
{ Category = "TDM Front Upper", Name = "Blue", Auto = {171}, Props = {} },
{ Category = "TDM Front Upper", Name = "Amber", Auto = {172}, Props = {} },
--
{ Category = "Pringles Front Upper", Name = "R/B", Auto = {173}, Props = {} },
{ Category = "Pringles Front Upper", Name = "Red", Auto = {174}, Props = {} },
{ Category = "Pringles Front Upper", Name = "Blue", Auto = {175}, Props = {} },
{ Category = "Pringles Front Upper", Name = "Amber", Auto = {176}, Props = {} },
--
{ Category = "Code 3 Wingman", Name = "R/B", Auto = {177}, Props = {} },
{ Category = "Code 3 Wingman", Name = "Red", Auto = {178}, Props = {} },
{ Category = "Code 3 Wingman", Name = "Blue", Auto = {179}, Props = {} },
{ Category = "Code 3 Wingman", Name = "Amber", Auto = {180}, Props = {} },
--
{ Category = "Fenix Apollo", Name = "R/B", Auto = {181}, Props = {} },
{ Category = "Fenix Apollo", Name = "Red", Auto = {182}, Props = {} },
{ Category = "Fenix Apollo", Name = "Blue", Auto = {183}, Props = {} },
{ Category = "Fenix Apollo", Name = "Amber", Auto = {184}, Props = {} },
--
{ Category = "Fenix Fusion", Name = "Red/Blue", Auto = {185}, Props = {} },
--{ Category = "Fenix Fusion", Name = "Red", Auto = {186}, Props = {} },
--{ Category = "Fenix Fusion", Name = "Blue", Auto = {187}, Props = {} },
--{ Category = "Fenix Fusion", Name = "Amber", Auto = {188}, Props = {} },
}
},
}
EMV.Sequences = {
Sequences = {
{ Name = "CODE 1", Stage = "M1", Components = {}, Disconnect = {} },
{ Name = "CODE 2", Stage = "M2", Components = {}, Disconnect = {} },
{ Name = "CODE 3", Stage = "M3", Components = {}, Disconnect = {} }
},
Traffic = {
{ Name = "LEFT", Stage = "L", Components = {}, Disconnect = {} },
{ Name = "DIVERGE", Stage = "D", Components = {}, Disconnect = {} },
{ Name = "RIGHT", Stage = "R", Components = {}, Disconnect = {} }
},
Illumination = {
{
Name = "SPOT",
Icon = "takedown",
Stage = "S",
Components = {},
BG_Components = {},
Preset_Components = {},
Lights = {
{ Vector( -41, 47.5, 61 ), Angle( 5, 82, 0 ), "spot" },
{ Vector( 41, 47.5, 61 ), Angle( 5, 92, 0 ), "spot" },
},
Disconnect = {}
},
{
Name = "TKDN",
Icon = "takedown",
Stage = "T",
Components = {},
BG_Components = {},
Preset_Components = {},
Lights = {
{ Vector( 0, 25, 70 ), Angle( 20, 90, 0 ), "takedown" },
},
Disconnect = {}
},
{
Name = "LEFT",
Icon = "alley-left",
Stage = "L",
Components = {},
BG_Components = {},
Preset_Components = {},
Lights = {
{ Vector( -10, -10, 70 ), Angle( 20, 180, 0 ), "alley" },
},
Disconnect = {}
},
{
Name = "RIGHT",
Icon = "alley-right",
Stage = "R",
Components = {},
BG_Components = {},
Preset_Components = {},
Lights = {
{ Vector( 10, -10, 70 ), Angle( 20, 0, 0 ), "alley" },
},
Disconnect = {}
},
{
Name = "FULL",
Icon = "takedown",
Stage = "F",
Components = {},
BG_Components = {},
Preset_Components = {},
Lights = {
{ Vector( 0, 25, 90 ), Angle( 10, 90, 0 ), "flood" },
},
Disconnect = {}
},
}
}
EMV.Lamps = {
["alley"] = {
Color = Color(215,225,255,255),
Texture = "effects/flashlight001",
Near = 110,
FOV = 90,
Distance = 500,
},
["takedown"] = {
Color = Color(215,225,255,255),
Texture = "effects/flashlight001",
Near = 120,
FOV = 135,
Distance = 800,
},
["flood"] = {
Color = Color(215,225,255,255),
Texture = "effects/flashlight001",
Near = 120,
FOV = 135,
Distance = 1400,
},
["spot"] = {
Color = Color(255,225,255,255),
Texture = "effects/flashlight/soft",
Near = 100,
FOV = 80,
Distance = 1400,
},
}
local V = {
Name = VehicleName,
Class = "prop_vehicle_jeep",
Category = "Pringles: Customizable Photon",
Author = "[CRPG] Officer Pringle",
Model = "models/smcars/2012_impala_ppv.mdl",
KeyValues = { vehiclescript = "scripts/vehicles/pringlesscripts/12impalamod.txt" },
IsEMV = true,
EMV = EMV,
HasPhoton = true,
Photon = "PHOTON_INHERIT"
}
list.Set( "Vehicles", VehicleName, V )
if EMVU then EMVU:OverwriteIndex( VehicleName, EMV ) end
|
-- This system should load/save data (using the appropriate system according to the configs)
-- Use a table/column-row system, each system/plugin can create a table and make it synchronizable/savable
-- Use types (similar to uac.command) to tell the type of each column and check the values being placed there
-- Mark a table/row as dirty for synchronization/save
-- The above should facilitate the connection between this system and sql
AddCSLuaFile()
AddCSLuaFile("types.lua")
AddCSLuaFile("key.lua")
AddCSLuaFile("table.lua")
uac.data = uac.data or {
list = {}
}
local data_list = uac.data.list
local TYPES = include("types.lua")
local KEY = include("key.lua")
local TABLE = include("table.lua")
local function AddColumn(table, column)
local metatable = getmetatable(column)
assert(metatable ~= nil and TYPES[metatable], "column object is not valid")
local count = #table.columns + 1
column.index = count
table.columns[count] = column
table.columns[column:GetName()] = column
end
local function AddKey(table, name, columns)
assert(isstring(name), "key name is not a string")
assert(#name ~= 0, "key name can't be empty")
assert(istable(columns), "key column list is not a table")
assert(#columns ~= 0, "key column list can't be empty")
for i = 1, #columns do
local colname = columns[i]
local column = table:GetColumn(colname)
assert(column ~= nil, "key has an inexistent column")
assert(column:CanIndex(), "key has a non-indexable column")
columns[i] = column
columns[colname] = column
end
local count = #table.keys + 1
local key = setmetatable({
name = name,
index = count,
columns = columns,
lookup = {}
}, KEY)
table.keys[count] = key
table.keys[name] = key
end
function uac.data.AddTable(name, columns, keys)
assert(isstring(name), "table name is not a string")
assert(#name ~= 0, "table name can't be empty")
assert(istable(columns), "columns is not a table")
assert(#columns ~= 0, "columns table can't be empty")
local tab = setmetatable({
name = name,
columns = {},
synchronizable = false,
savable = false,
keys = {}
}, TABLE)
for i = 1, #columns do
AddColumn(table, columns[i])
end
for name, columns in pairs(keys) do
AddKey(table, name, columns)
end
data_list[name] = tab
return tab
end
function uac.data.GetTable(name)
return data_list[name]
end
function uac.data.RemoveTable(name)
data_list[name] = nil
end
|
computed_vertexes = {}
computed_segments = {}
computed_colors = {}
local index1 = 0
local index2 = 1
local index3 = 2
local index4 = 3
for i=0,100 do
local x = math.random(0, 200)
local y = math.random(0, 100)
table.insert(computed_vertexes, {x-1,y-1,0})
table.insert(computed_vertexes, {x-1,y+1,0})
table.insert(computed_vertexes, {x+1,y+1,0})
table.insert(computed_vertexes, {x+1,y-1,0})
table.insert(computed_segments, {index1, index2, index3, index4, index1})
index1 = index1 + 4
index2 = index2 + 4
index3 = index3 + 4
index4 = index4 + 4
table.insert(computed_colors, 0xffffffff)
table.insert(computed_colors, 0xffffffff)
table.insert(computed_colors, 0xffffffff)
table.insert(computed_colors, 0xffffffff)
end
meshes = {
{
vertexes = computed_vertexes,
segments = computed_segments,
colors = computed_colors
}
}
|
function onCreate()
-- background shit
makeLuaSprite('bg1', 'flowey/images/BGs/bg1', -600, -300);
setScrollFactor('bg1', 0.9, 0.9);
scaleObject('bg1', 1.2, 1.2);
makeLuaSprite('bg2', 'flowey/images/BGs/bg2', -600, -300);
setScrollFactor('bg2', 0.9, 0.9);
scaleObject('bg2', 1, 1);
makeLuaSprite('bg3', 'flowey/images/BGs/bg3', -600, -300);
setScrollFactor('bg3', 0.9, 0.9);
scaleObject('bg3', 1, 1);
makeLuaSprite('grass', 'flowey/images/BGs/suelo', -725, -400);
setScrollFactor('grass', 0.9, 0.9);
scaleObject('grass', 1.1, 1.1);
makeLuaSprite('rock', 'flowey/images/BGs/roca', -570, -220);
scaleObject('rock', 1, 1);
makeLuaSprite('light', 'flowey/images/BGs/light', -700, -450);
setScrollFactor('light', 0.9, 0.9);
scaleObject('light', 1.1, 1.1);
addLuaSprite('bg1', false);
addLuaSprite('bg2', false);
addLuaSprite('bg3', false);
addLuaSprite('grass', false);
addLuaSprite('rock', false);
addLuaSprite('light', true);
close(true); --For performance reasons, close this script once the stage is fully loaded, as this script won't be used anymore after loading the stage
end |
test_run = require('test_run').new()
require('console').listen(os.getenv('ADMIN'))
local fio = require('fio')
local NAME = fio.basename(arg[0], '.lua')
-- Call a configuration provider
cfg = require('localcfg')
cfg.sharding['cbf06940-0790-498b-948d-042b62cf3d29'].replicas['3de2e3e1-9ebe-4d0d-abb1-26d301b84633'] = nil
cfg.sharding['ac522f65-aa94-4134-9f64-51ee384f1a54'].replicas['1e02ae8a-afc0-4e91-ba34-843a356b8ed7'].master = nil
cfg.sharding['ac522f65-aa94-4134-9f64-51ee384f1a54'].replicas['001688c3-66f8-4a31-8e19-036c17d489c2'].master = true
cfg.sharding['910ee49b-2540-41b6-9b8c-c976bef1bb17'] = {replicas = {['ee34807e-be5c-4ae3-8348-e97be227a305'] = {uri = "storage:storage@127.0.0.1:3306", name = 'storage_3_a', master = true}}}
-- Start the database with sharding
vshard = require('vshard')
vshard.storage.cfg(cfg, 'ee34807e-be5c-4ae3-8348-e97be227a305')
|
-- init.lua
uart.setup(0,115200,8,0,1)
-- ls()
l = file.list()
for k,v in pairs(l) do
print("name: "..k..",size: "..v)
end
-- cat()
local f=...
print(args: ..f)
file.open(f, r)
print(file.read(EOF))
file.close()
-- list nearby APs
function listap(t)
for k,v in pairs(t) do
print(k.. : ..v)
end
end
wifi.sta.getap(listap)
-- mqtt connect, replace IP_ADDR to real world value
open("mqtt_conn.lua", "w+")
m = mqtt.Client("nodemcu", 120, nil, nil)
m:on("connect", function(con)
print ("connected") end)
m:on("offline", function(con)
print ("offline") end)
m:connect("IP_ADDR", 1883, 0, function(conn)
print("connected") end)
-- mqtt publish
m:publish("/nodemcu/report", "nodemcu: "..adc.read(0), 0, 0, function(conn)
print("sent") end)
-- mqtt publish, keep doing so for 10 sec, with a 1 sec interval
print("start publishing...")
tmr.alarm(0, 1000, 1, function() dofile("mqtt_pub.lua") end)
tmr.alarm(1, 10000, 0, function() print("stopping tmr 0") tmr.stop(0) end)
-- mqtt subscribe, message will be handled in m:on()
m:on("message", function(conn, topic, data)
print(topic .. ":" )
if data ~= nil then
print(data)
end
end)
m:subscribe("+", 0, function(conn)
print("subscribe success") end)
-- after mqtt things done, close connection
m:close()
|
--[[
-- Orca, a free and open-source Roblox script hub.
-- This script was generated by ci/bundle.lua, and is not intended to be modified.
-- To view the source code, see the 'src' folder on GitHub!
--
-- Author: 0866
-- License: MIT
-- Version: __VERSION__
-- GitHub: https://github.com/richie0866/orca
--]]
-- Runtime module
---@class Module
---@field fn function
---@field isLoaded boolean
---@field value any
---@type table<string, Instance>
local instanceFromId = {}
---@type table<Instance, string>
local idFromInstance = {}
---@type table<Instance, Module>
local modules = {}
---Stores currently loading modules.
---@type table<LocalScript | ModuleScript, ModuleScript>
local currentlyLoading = {}
-- Module resolution
---@param module LocalScript | ModuleScript
---@param caller? LocalScript | ModuleScript
---@return function | nil cleanup
local function validateRequire(module, caller)
currentlyLoading[caller] = module
local currentModule = module
local depth = 0
-- If the module is loaded, requiring it will not cause a circular dependency.
if not modules[module] then
while currentModule do
depth = depth + 1
currentModule = currentlyLoading[currentModule]
if currentModule == module then
local str = currentModule.Name -- Get the string traceback
for _ = 1, depth do
currentModule = currentlyLoading[currentModule]
str = str .. " ⇒ " .. currentModule.Name
end
error("Failed to load '" .. module.Name .. "'; Detected a circular dependency chain: " .. str, 2)
end
end
end
return function ()
if currentlyLoading[caller] == module then -- Thread-safe cleanup!
currentlyLoading[caller] = nil
end
end
end
---@param obj LocalScript | ModuleScript
---@param this? LocalScript | ModuleScript
---@return any
local function loadModule(obj, this)
local cleanup = this and validateRequire(obj, this)
local module = modules[obj]
if module.isLoaded then
if cleanup then
cleanup()
end
return module.value
else
local data = module.fn()
module.value = data
module.isLoaded = true
if cleanup then
cleanup()
end
return data
end
end
---@param target ModuleScript
---@param this? LocalScript | ModuleScript
---@return any
local function requireModuleInternal(target, this)
if modules[target] and target:IsA("ModuleScript") then
return loadModule(target, this)
else
return require(target)
end
end
-- Instance creation
---@param id string
---@return table<string, any> environment
local function newEnv(id)
return setmetatable({
VERSION = __VERSION__,
script = instanceFromId[id],
require = function (module)
return requireModuleInternal(module, instanceFromId[id])
end,
}, {
__index = getfenv(0),
__metatable = "This metatable is locked",
})
end
---@param name string
---@param className string
---@param path string
---@param parent string | nil
---@param fn function
local function newModule(name, className, path, parent, fn)
local instance = Instance.new(className)
instance.Name = name
instance.Parent = instanceFromId[parent]
instanceFromId[path] = instance
idFromInstance[instance] = path
modules[instance] = {
fn = fn,
isLoaded = false,
value = nil,
}
end
---@param name string
---@param className string
---@param path string
---@param parent string | nil
local function newInstance(name, className, path, parent)
local instance = Instance.new(className)
instance.Name = name
instance.Parent = instanceFromId[parent]
instanceFromId[path] = instance
idFromInstance[instance] = path
end
-- Runtime
local function init()
if not game:IsLoaded() then
game.Loaded:Wait()
end
for object in pairs(modules) do
if object:IsA("LocalScript") and not object.Disabled then
task.spawn(loadModule, object)
end
end
end
|
temp = 0
humid = 0
err = 0
timeFromBoot = 0
lastReadTime = 0
dofile("conf.lua")
tmr.alarm(0, 2000, 1, function()
timeFromBoot = tmr.time()
t,h = dofile("dht22.lua").read(4, true)
if t and h then
temp = t
humid = h
err = 0
else
err = 1
end
if err == 0 then
lastReadTime = timeFromBoot
end
end)
srv=net.createServer(net.TCP)
srv:listen(80,function(conn)
conn:on("receive",function(conn,payload)
conn:send("<p>B="..timeFromBoot.." R="..lastReadTime.." E="..err.." T="..string.format("%.1f",temp).."C H="..string.format("%.1f",humid).."% </p>")
conn:close()
end)
end)
|
local Array2d = require "array2d"
local Graph = Object:extend()
function Graph:new()
self.matrix = Array2d()
self.vertices = {}
self.size = 0
end
function Graph:addVertice(id)
self.size = self.size + 1
self.vertices[self.size] = id
for i = 1, self.size do
self.matrix:set(self.size, i, -1)
self.matrix:set(i, self.size, -1)
end
self.matrix:set(self.size, self.size, 0)
end
function Graph:getIndex(id)
local index = -1
for k, v in pairs(self.vertices) do
if v == id then
index = k
break
end
end
return index
end
function Graph:addEdge(id1, id2, weight)
weight = weight or 1
local index1 = self:getIndex(id1)
local index2 = self:getIndex(id2)
if index1 >= 1 and index2 >= 1 then
self.matrix:set(index1, index2, weight)
self.matrix:set(index2, index1, weight)
end
end
function Graph:getAllEdges()
local edges = {}
for i = 1, self.size do
for j = 1, self.size do
local val = self.matrix:get(i, j)
if val >= 1 then
table.insert(edges, {start = self.vertices[i], destination = self.vertices[j], weight = val})
end
end
end
return edges
end
local function printEdge(edge)
print("start: ", edge.start, "destination: ", edge.destination, "weight: ", edge.weight)
end
function Graph:print()
print("All Vertices:")
for _, v in pairs(self.vertices) do
print(v)
end
print("all edges:")
local edges = self:getAllEdges()
for _, v in pairs(edges) do
printEdge(v)
end
print()
end
function Graph:getEdges(id)
local index = self:getIndex(id)
local edges = {}
for i = 1, self.size do
local val = self.matrix:get(index, i)
if val >= 1 then
table.insert(edges, {start = self.vertices[index], destination = self.vertices[i], weight = val})
end
end
return edges
end
function Graph:clear()
self.matrix:clear()
self.vertices = {}
self.size = 0
end
return Graph
|
--[[--
key = -- key to be used with tempstore.pop(...) to regain the stored string
tempstore.save(
blob -- string to be stored
)
This function stores data temporarily. It is used to restore slot information after a 303 HTTP redirect. It returns a key, which can be passed to tempstore.pop(...) to regain the stored data.
--]]--
function tempstore.save(blob)
local key = multirand.string(26, "123456789bcdfghjklmnpqrstvwxyz")
local filename = encode.file_path(
WEBMCP_BASE_PATH, 'tmp', "tempstore-" .. key .. ".tmp"
)
local file = assert(io.open(filename, "w"))
file:write(blob)
io.close(file)
return key
end
|
local M = {}
local config = require("core.utils").user_settings()
local opts = { noremap = true, silent = true }
local map = vim.api.nvim_set_keymap
-- Remap space as leader key
map("", "<Space>", "<Nop>", opts)
vim.g.mapleader = " "
vim.g.maplocalleader = " "
-- Normal --
-- Better window navigation
map("n", "<C-h>", "<cmd>lua require'smart-splits'.move_cursor_left()<cr>", opts)
map("n", "<C-j>", "<cmd>lua require'smart-splits'.move_cursor_down()<cr>", opts)
map("n", "<C-k>", "<cmd>lua require'smart-splits'.move_cursor_up()<cr>", opts)
map("n", "<C-l>", "<cmd>lua require'smart-splits'.move_cursor_right()<cr>", opts)
-- Resize with arrows
map("n", "<C-Up>", "<cmd>lua require'smart-splits'.resize_up(2)<cr>", opts)
map("n", "<C-Down>", "<cmd>lua require'smart-splits'.resize_down(2)<cr>", opts)
map("n", "<C-Left>", "<cmd>lua require'smart-splits'.resize_left(2)<cr>", opts)
map("n", "<C-Right>", "<cmd>lua require'smart-splits'.resize_right(2)<cr>", opts)
-- Navigate buffers
if config.enabled.bufferline then
map("n", "<S-l>", "<cmd>BufferLineCycleNext<cr>", opts)
map("n", "<S-h>", "<cmd>BufferLineCyclePrev<cr>", opts)
map("n", "}", "<cmd>BufferLineMoveNext<cr>", opts)
map("n", "{", "<cmd>BufferLineMovePrev<cr>", opts)
else
map("n", "<S-l>", "<cmd>bnext<CR>", opts)
map("n", "<S-h>", "<cmd>bprevious<CR>", opts)
end
-- Move text up and down
map("n", "<A-j>", "<Esc><cmd>m .+1<CR>==gi", opts)
map("n", "<A-k>", "<Esc><cmd>m .-2<CR>==gi", opts)
-- Standard Operations
map("n", "<leader>w", "<cmd>w<CR>", opts)
map("n", "<leader>q", "<cmd>q<CR>", opts)
map("n", "<leader>c", "<cmd>Bdelete!<CR>", opts)
map("n", "<leader>h", "<cmd>nohlsearch<CR>", opts)
-- Packer
map("n", "<leader>pc", "<cmd>PackerCompile<cr>", opts)
map("n", "<leader>pi", "<cmd>PackerInstall<cr>", opts)
map("n", "<leader>ps", "<cmd>PackerSync<cr>", opts)
map("n", "<leader>pS", "<cmd>PackerStatus<cr>", opts)
map("n", "<leader>pu", "<cmd>PackerUpdate<cr>", opts)
-- LSP
map("n", "<leader>lf", "<cmd>lua vim.lsp.buf.formatting_sync()<cr>", opts)
map("n", "<leader>li", "<cmd>LspInfo<cr>", opts)
map("n", "<leader>lI", "<cmd>LspInstallInfo<cr>", opts)
-- NeoTree
if config.enabled.neo_tree then
map("n", "<leader>e", "<cmd>Neotree toggle<CR>", opts)
map("n", "<leader>o", "<cmd>Neotree focus<CR>", opts)
end
-- Dashboard
if config.enabled.dashboard then
map("n", "<leader>d", "<cmd>Dashboard<CR>", opts)
map("n", "<leader>fn", "<cmd>DashboardNewFile<CR>", opts)
map("n", "<leader>db", "<cmd>Dashboard<CR>", opts)
map("n", "<leader>bm", "<cmd>DashboardJumpMarks<CR>", opts)
map("n", "<leader>sl", "<cmd>SessionLoad<CR>", opts)
map("n", "<leader>ss", "<cmd>SessionSave<CR>", opts)
end
-- GitSigns
if config.enabled.gitsigns then
map("n", "<leader>gj", "<cmd>lua require 'gitsigns'.next_hunk()<cr>", opts)
map("n", "<leader>gk", "<cmd>lua require 'gitsigns'.prev_hunk()<cr>", opts)
map("n", "<leader>gl", "<cmd>lua require 'gitsigns'.blame_line()<cr>", opts)
map("n", "<leader>gp", "<cmd>lua require 'gitsigns'.preview_hunk()<cr>", opts)
map("n", "<leader>gh", "<cmd>lua require 'gitsigns'.reset_hunk()<cr>", opts)
map("n", "<leader>gr", "<cmd>lua require 'gitsigns'.reset_buffer()<cr>", opts)
map("n", "<leader>gs", "<cmd>lua require 'gitsigns'.stage_hunk()<cr>", opts)
map("n", "<leader>gu", "<cmd>lua require 'gitsigns'.undo_stage_hunk()<cr>", opts)
map("n", "<leader>gd", "<cmd>Gitsigns diffthis HEAD<cr>", opts)
end
-- Telescope
map("n", "<leader>fw", "<cmd>Telescope live_grep<CR>", opts)
map("n", "<leader>gt", "<cmd>Telescope git_status<CR>", opts)
map("n", "<leader>gb", "<cmd>Telescope git_branches<CR>", opts)
map("n", "<leader>gc", "<cmd>Telescope git_commits<CR>", opts)
map("n", "<leader>ff", "<cmd>Telescope find_files<CR>", opts)
map("n", "<leader>fb", "<cmd>Telescope buffers<CR>", opts)
map("n", "<leader>fh", "<cmd>Telescope help_tags<CR>", opts)
map("n", "<leader>fo", "<cmd>Telescope oldfiles<CR>", opts)
map("n", "<leader>sb", "<cmd>Telescope git_branches<CR>", opts)
map("n", "<leader>sh", "<cmd>Telescope help_tags<CR>", opts)
map("n", "<leader>sm", "<cmd>Telescope man_pages<CR>", opts)
map("n", "<leader>sn", "<cmd>Telescope notify<CR>", opts)
map("n", "<leader>sr", "<cmd>Telescope registers<CR>", opts)
map("n", "<leader>sk", "<cmd>Telescope keymaps<CR>", opts)
map("n", "<leader>sc", "<cmd>Telescope commands<CR>", opts)
map("n", "<leader>ls", "<cmd>Telescope lsp_document_symbols<CR>", opts)
map("n", "<leader>lR", "<cmd>Telescope lsp_references<CR>", opts)
map("n", "<leader>lD", "<cmd>Telescope diagnostics<CR>", opts)
-- LSP
map("n", "gD", "<cmd>lua vim.lsp.buf.declaration()<CR>", opts)
map("n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts)
map("n", "gI", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
map("n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
map("n", "go", "<cmd>lua vim.diagnostic.open_float()<CR>", opts)
map("n", "gl", "<cmd>lua vim.diagnostic.open_float()<CR>", opts)
map("n", "[d", "<cmd>lua vim.diagnostic.goto_prev({ border = 'rounded' })<CR>", opts)
map("n", "]d", "<cmd>lua vim.diagnostic.goto_next({ border = 'rounded' })<CR>", opts)
map("n", "gj", "<cmd>lua vim.diagnostic.goto_next({ border = 'rounded' })<cr>", opts)
map("n", "gk", "<cmd>lua vim.diagnostic.goto_prev({ border = 'rounded' })<cr>", opts)
map("n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts)
map("n", "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
map("n", "<leader>la", "<cmd>lua vim.lsp.buf.code_action()<CR>", opts)
map("n", "<leader>lr", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
map("n", "<leader>ld", "<cmd>lua vim.diagnostic.open_float()<CR>", opts)
-- Comment
if config.enabled.comment then
map("n", "<leader>/", "<cmd>lua require('Comment.api').toggle_current_linewise()<cr>", opts)
map("v", "<leader>/", "<esc><cmd>lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())<CR>", opts)
end
-- ForceWrite
map("n", "<C-s>", "<cmd>w!<CR>", opts)
-- ForceQuit
map("n", "<C-q>", "<cmd>q!<CR>", opts)
-- Terminal
if config.enabled.toggle_term then
map("n", "<C-\\>", "<cmd>ToggleTerm<CR>", opts)
map("n", "<leader>gg", "<cmd>lua require('core.utils').toggle_term_cmd('lazygit')<CR>", opts)
map("n", "<leader>tn", "<cmd>lua require('core.utils').toggle_term_cmd('node')<CR>", opts)
map("n", "<leader>tu", "<cmd>lua require('core.utils').toggle_term_cmd('ncdu')<CR>", opts)
map("n", "<leader>tt", "<cmd>lua require('core.utils').toggle_term_cmd('htop')<CR>", opts)
map("n", "<leader>tp", "<cmd>lua require('core.utils').toggle_term_cmd('python')<CR>", opts)
map("n", "<leader>tl", "<cmd>lua require('core.utils').toggle_term_cmd('lazygit')<CR>", opts)
map("n", "<leader>tf", "<cmd>ToggleTerm direction=float<cr>", opts)
map("n", "<leader>th", "<cmd>ToggleTerm size=10 direction=horizontal<cr>", opts)
map("n", "<leader>tv", "<cmd>ToggleTerm size=80 direction=vertical<cr>", opts)
end
-- SymbolsOutline
if config.enabled.symbols_outline then
map("n", "<leader>lS", "<cmd>SymbolsOutline<CR>", opts)
end
-- Visual --
-- Stay in indent mode
map("v", "<", "<gv", opts)
map("v", ">", ">gv", opts)
-- Move text up and down
map("v", "<A-j>", "<cmd>m .+1<CR>==", opts)
map("v", "<A-k>", "<cmd>m .-2<CR>==", opts)
-- Visual Block --
-- Move text up and down
map("x", "J", "<cmd>move '>+1<CR>gv-gv", opts)
map("x", "K", "<cmd>move '<-2<CR>gv-gv", opts)
map("x", "<A-j>", "<cmd>move '>+1<CR>gv-gv", opts)
map("x", "<A-k>", "<cmd>move '<-2<CR>gv-gv", opts)
-- disable Ex mode:
map("n", "Q", "<Nop>", opts)
function _G.set_terminal_keymaps()
vim.api.nvim_buf_set_keymap(0, "t", "<esc>", [[<C-\><C-n>]], opts)
vim.api.nvim_buf_set_keymap(0, "t", "jk", [[<C-\><C-n>]], opts)
vim.api.nvim_buf_set_keymap(0, "t", "<C-h>", [[<C-\><C-n><C-W>h]], opts)
vim.api.nvim_buf_set_keymap(0, "t", "<C-j>", [[<C-\><C-n><C-W>j]], opts)
vim.api.nvim_buf_set_keymap(0, "t", "<C-k>", [[<C-\><C-n><C-W>k]], opts)
vim.api.nvim_buf_set_keymap(0, "t", "<C-l>", [[<C-\><C-n><C-W>l]], opts)
end
vim.cmd [[
augroup TermMappings
autocmd! TermOpen term://* lua set_terminal_keymaps()
augroup END
]]
return M
|
local g = vim.g
local utils = require 'utils'
local map = utils.map
map('n', '<leader>', "<cmd>WhichKey '<space>'<cr>", {silent = true})
map('n', '<localleader>', "<cmd>WhichKey '<,>'<cr>", {silent = true})
|
return NOTESKIN:LoadActor("DownLeft", "Ready Receptor") .. {}
|
SWEP.Base = "weapon_maw_base"
SWEP.Slot = 3
SWEP.PrintName = "P90"
SWEP.HoldType = "ar2"
SWEP.ViewModel = "models/weapons/v_smg_p90.mdl"
SWEP.WorldModel = "models/weapons/w_smg_p90.mdl"
SWEP.Primary.Sound = "Weapon.Fire_P90"
SWEP.Primary.Recoil = 0.6
SWEP.Primary.Damage = 17
SWEP.Primary.Delay = 0.05
SWEP.Primary.ClipSize = 50
SWEP.Primary.DefaultClip = 50
SWEP.Primary.Automatic = true
SWEP.Primary.Ammo = "SMG1"
SWEP.LaserBeam = true
|
require 'torch'
require 'optim'
require 'rosenbrock'
require 'l2'
x = torch.Tensor(2):fill(0)
x,fx,i=optim.cg(rosenbrock,x,{maxIter=50})
print()
print('Rosenbrock test: compare with http://www.gatsby.ucl.ac.uk/~edward/code/minimize/example.html')
print()
print('Number of function evals = ',i)
print('x=');print(x)
print('fx=')
for i=1,#fx do print(i,fx[i]); end
|
local function printBits(x) print(string.format("%X", x)) end
printBits (bit32.bnot(0))
printBits (bit32.bnot(bit32.bnot(0)))
print (bit32.btest())
print (bit32.btest(0x10,0x20))
printBits (bit32.band())
printBits (bit32.band(0x11, 0x12, 0x13, 0x14))
printBits (bit32.bor())
printBits (bit32.bor(0x101, 0x202, 0x303, 0x404))
printBits (bit32.bxor())
printBits (bit32.bxor(0x101, 0x202, 0x303, 0x404))
print "\tLSHIFT"
printBits (bit32.lshift(0x111, 4))
printBits (bit32.lshift(0x111, -4))
printBits (bit32.lshift(-0x111, 4))
printBits (bit32.lshift(-0x111, -4))
print "\tRSHIFT"
printBits (bit32.rshift(0x111, 4))
printBits (bit32.rshift(0x111, -4))
printBits (bit32.rshift(-0x111, 4))
printBits (bit32.rshift(-0x111, -4))
print "\tARSHIFT"
printBits (bit32.arshift(0x12345678, 4))
printBits (bit32.arshift(-0x12345678, 4))
printBits (bit32.arshift(0x12345678, -4))
printBits (bit32.arshift(-0x12345678, -4))
print "\tLROTATE"
printBits (bit32.lrotate(0x12345678, 4))
printBits (bit32.lrotate(-0x12345678, 4))
printBits (bit32.lrotate(0x12345678, -4))
printBits (bit32.lrotate(-0x12345678, -4))
print "\tRROTATE"
printBits (bit32.rrotate(0x12345678, 4))
printBits (bit32.rrotate(-0x12345678, 4))
printBits (bit32.rrotate(0x12345678, -4))
printBits (bit32.rrotate(-0x12345678, -4))
print "\tEXTRACT"
printBits (bit32.extract(0x12345678, 0, 32))
printBits (bit32.extract(0x12345678, 8, 16))
print "\tREPLACE"
printBits (bit32.replace(0x12345678, 0x90ABCDEF, 0, 32))
printBits (bit32.replace(0x12345678, 0xABCD, 8, 16))
|
-- @Author:pandayu
-- @Version:1.0
-- @DateTime:2018-09-09
-- @Project:pandaCardServer CardGame
-- @Contact: QQ:815099602
local roleMgr = require "manager.roleMgr"
local CFriend = require "game.model.role.friend"
local _M = function(role,data)
if not data.id or type(data.id) ~= "number" then return 2 end
if not data.typ or type(data.typ) ~= "number" then return 2 end
if data.opt ~= 1 and data.opt ~=2 then return 1209 end
local frole = nil
if data.typ == 1 then
frole = roleMgr:get_role(data.id)
if not frole then return 1200 end
end
local list = {}
if data.opt == 1 then--1.加入2移除
if frole then list = role.friends:check_blacklist_add_one(data.id)
else list = role.friends:check_blacklist_add_all() end
elseif data.opt == 2 then
if frole then list = role.friends:check_blacklist_remove_one(data.id)
else list = role.friends:check_blacklist_remove_all() end
end
if not list or #list == 0 then return 1211 end
if data.opt == 1 then role.friends:set_blacklist_add(list)
elseif data.opt == 2 then role.friends:set_blacklist_remove(list) end
return 0
end
return _M |
-- httpserver-init.lua
-- Part of nodemcu-httpserver, launches the server.
-- Author: Marcos Kirsch
-- Function for starting the server.
-- If you compiled the mdns module, then it will also register with mDNS.
local startServer = function(ip)
local conf = dofile('httpserver-conf.lua')
if (dofile("httpserver.lc")(conf['general']['port'])) then
print("nodemcu-httpserver running at:")
print(" http://" .. ip .. ":" .. conf['general']['port'])
if (mdns) then
mdns.register(conf['mdns']['hostname'], { description=conf['mdns']['description'], service="http", port=conf['general']['port'], location=conf['mdns']['location'] })
print (' http://' .. conf['mdns']['hostname'] .. '.local.:' .. conf['general']['port'])
end
end
conf = nil
end
if (wifi.getmode() == wifi.STATION) or (wifi.getmode() == wifi.STATIONAP) then
-- Connect to the WiFi access point and start server once connected.
-- If the server loses connectivity, server will restart.
wifi.eventmon.register(wifi.eventmon.STA_GOT_IP, function(args)
print("Connected to WiFi Access Point. Got IP: " .. args["IP"])
startServer(args["IP"])
wifi.eventmon.register(wifi.eventmon.STA_DISCONNECTED, function(args)
print("Lost connectivity! Restarting...")
node.restart()
end)
end)
-- What if after a while (30 seconds) we didn't connect? Restart and keep trying.
local watchdogTimer = tmr.create()
watchdogTimer:register(30000, tmr.ALARM_SINGLE, function (watchdogTimer)
local ip = wifi.sta.getip()
if (not ip) then ip = wifi.ap.getip() end
if ip == nil then
print("No IP after a while. Restarting...")
node.restart()
else
--print("Successfully got IP. Good, no need to restart.")
watchdogTimer:unregister()
end
end)
watchdogTimer:start()
else
startServer(wifi.ap.getip())
end
|
#!/usr/bin/env lua
_RUNTESTS = true
dofile 'pak.lua'
math.randomseed(os.time())
T = nil
STATS = {
count = 0,
mem = 0,
trails = 0,
bytes = 0,
}
function check (mod)
assert(T[mod]==nil or T[mod]==false or type(T[mod])=='string')
local ok, msg = pcall(dofile, mod..'.lua')
if T[mod]~=nil then
assert(string.find(msg, T[mod], nil, true), tostring(msg))
return false
else
assert(ok==true, msg)
return true
end
end
Test = function (t)
T = t
local source = T[1]
--local source = 'C _fprintf(), _stderr;'..T[1]
print('\n=============\n---\n'..source..'\n---\n')
_OPTS = {
tp_word = 4,
tp_off = 2,
tp_lbl = 2,
warn_nondeterminism = true,
cpp = true,
cpp_exe = 'cpp',
input = 'tests.lua',
source = source,
}
--assert(T.todo == nil)
if T.todo then
return
end
STATS.count = STATS.count + 1
dofile 'tp.lua'
if not check('lines') then return end
if not check('parser') then return end
if not check('ast') then return end
--DBG'======= AST'
--_AST.dump(_AST.root)
if not check('adj') then return end
--DBG'======= ADJ'
--_AST.dump(_AST.root)
if not check('tops') then return end
--DBG'======= TOPS'
--_AST.dump(_AST.root)
if not check('env') then return end
if not check('fin') then return end
if not check('tight') then return end
--dofile 'awaits.lua'
if not check('props') then return end
dofile 'ana.lua'
dofile 'acc.lua'
if not check('trails') then return end
if not check('sval') then return end
if not check('labels') then return end
if not check('tmps') then return end
if not check('mem') then return end
if not check('val') then return end
--DBG'======= VAL'
--_AST.dump(_AST.root)
if not check('code') then return end
--STATS.mem = STATS.mem + _AST.root.mem.max
STATS.trails = STATS.trails + _AST.root.trails_n
--[[
if T.awaits then
assert(T.awaits==_AWAITS.n, 'awaits '.._AWAITS.n)
end
]]
if T.tot then
assert(T.tot==_MEM.max, 'mem '.._MEM.max)
end
assert(_TIGHT and T.loop or
not (_TIGHT or T.loop))
-- ANALYSIS
--_AST.dump(_AST.root)
assert((not T.unreachs) and (not T.isForever)) -- move to analysis
do
local _defs = { reachs=0, unreachs=0, isForever=false,
acc=0, abrt=0, excpt=0 }
for k, v in pairs(_ANA.ana) do
-- TODO
if k ~= 'excpt' then
if k ~= 'abrt' then
if k ~= 'unreachs' then
assert( v==_defs[k] and (T.ana==nil or T.ana[k]==nil)
or (T.ana and T.ana[k]==v),
--or (T.ana and T.ana.acc==_ANALYSIS.acc),
k..' = '..tostring(v))
end
end
end
end
if T.ana then
for k, v in pairs(T.ana) do
if k ~= 'excpt' then
if k ~= 'abrt' then
if k ~= 'unreachs' then
assert( v == _ANA.ana[k],
k..' = '..tostring(_ANA.ana[k]))
end
end
end
end
end
end
--[[
]]
-- RUN
if not (T.run or T.gcc) then
assert(T.loop or T.ana, 'missing run value')
return
end
-- TODO: pedantic
local O = ' -Wall -Wextra -Wformat=2 -Wstrict-overflow=3 -Werror '
..' -Wno-missing-field-initializers'
..' -Wno-unused'
..' -ansi'
..' -D CEU_DEBUG'
if T.usleep then
-- usleep is deprecated and gcc always complains
O = O .. ' -Wno-implicit-function-declaration'
end
local CEU, GCC
local r = (math.random(2) == 1)
if _OS==true or (_OS==nil and r) then
CEU = './ceu _ceu_tmp.ceu --run-tests --os 2>&1'
GCC = 'gcc '..O..' -include _ceu_app.h -o ceu.exe main.c ceu_os.c _ceu_app.c ceu_pool.c 2>&1'
else
CEU = './ceu _ceu_tmp.ceu --run-tests 2>&1'
GCC = 'gcc '..O..' -o ceu.exe main.c 2>&1'
--DBG(GCC)
end
if _PROPS.has_threads then
GCC = GCC .. ' -lpthread'
end
local EXE = ((not _VALGRIND) and './ceu.exe 2>&1')
or 'valgrind -q --leak-check=full ./ceu.exe 2>&1'
--or 'valgrind -q --tool=helgrind ./ceu.exe 2>&1'
local go = function (src, exp)
local ceu = assert(io.open('_ceu_tmp.ceu', 'w'))
ceu:write(src)
ceu:close()
assert(os.execute(CEU) == 0)
if T.gcc then
local ret = assert(io.popen(GCC)):read'*a'
assert( string.find(ret, T.gcc, nil, true), ret )
return
else
assert(os.execute(GCC) == 0)
end
local ret = io.popen(EXE):read'*a'
assert(not string.find(ret, '==%d+=='), 'valgrind error')
local v = tonumber( string.match(ret, 'END: (.-)\n') )
if v then
assert(v==exp, ret..' vs '..exp..' expected')
else
assert( string.find(ret, exp, nil, true), ret )
end
end
-- T.run = N
if type(T.run) ~= 'table' then
print(source)
go(source, T.run)
else
local par = (T.awaits and T.awaits>0 and 'par') or 'par/or'
source =
par .. [[ do
]]..source..[[
with
async do
`EVTS
end
await FOREVER;
end
]]
for input, ret2 in pairs(T.run) do
input = string.gsub(input, '([^;]*)~>(%d[^;]*);?', 'emit %2;')
input = string.gsub(input, '[ ]*(%d+)[ ]*~>([^;]*);?', 'emit %2=>%1;')
input = string.gsub(input, '~>([^;]*);?', 'emit %1;')
local source = string.gsub(source, '`EVTS', input)
go(source, ret2)
end
end
if not T.gcc then
local f = io.popen('du -b ceu.exe')
local n = string.match(f:read'*a', '(%d+)')
STATS.bytes = STATS.bytes + n
f:close()
end
end
dofile 'tests.lua'
print([[
=====================================
STATS = {
count = ]]..STATS.count ..[[,
mem = ]]..STATS.mem ..[[,
trails = ]]..STATS.trails ..[[,
bytes = ]]..STATS.bytes ..[[,
}
]])
-- w/ threads
--[[
STATS = {
count = 1599,
mem = 0,
trails = 3055,
bytes = 14572516,
}
real 6m36.719s
user 6m11.020s
sys 0m54.112s
]]
os.execute('rm -f /tmp/_ceu_*')
|
slot0 = class("LotteryMediator", import("..base.ContextMediator"))
slot0.ON_LAUNCH = "LotteryMediator:ON_LAUNCH"
slot0.ON_SWITCH = "LotteryMediator:ON_SWITCH"
slot0.OPEN = "LotteryMediator:OPEN"
slot0.register = function (slot0)
slot0:bind(slot0.ON_LAUNCH, function (slot0, slot1, slot2, slot3, slot4)
if not slot0:getActivityById(slot1) or slot5:isEnd() then
return
end
slot1:sendNotification(GAME.ACTIVITY_OPERATION, {
cmd = 1,
activity_id = slot1,
arg1 = slot3,
arg2 = slot2,
isAwardMerge = slot4
})
end)
slot0.bind(slot0, slot0.ON_SWITCH, function (slot0, slot1, slot2)
if not slot0:getActivityById(slot1) or slot3:isEnd() then
return
end
slot1:sendNotification(GAME.ACTIVITY_OPERATION, {
cmd = 2,
arg2 = 0,
activity_id = slot1,
arg1 = slot2
})
end)
slot0.viewComponent:setActivity(slot3)
slot0.viewComponent:setPlayerVO(getProxy(PlayerProxy):getData())
slot0:sendNotification(slot0.OPEN)
end
slot0.listNotificationInterests = function (slot0)
return {
ActivityProxy.ACTIVITY_UPDATED,
PlayerProxy.UPDATED,
ActivityProxy.ACTIVITY_LOTTERY_SHOW_AWARDS
}
end
slot0.handleNotification = function (slot0, slot1)
slot3 = slot1:getBody()
if slot1:getName() == ActivityProxy.ACTIVITY_UPDATED then
if slot3:getConfig("type") == ActivityConst.ACTIVITY_TYPE_LOTTERY then
slot0.viewComponent:onActivityUpdated(slot3)
end
elseif slot2 == PlayerProxy.UPDATED then
slot0.viewComponent:setPlayerVO(slot3)
elseif slot2 == ActivityProxy.ACTIVITY_LOTTERY_SHOW_AWARDS then
slot0.viewComponent:emit(BaseUI.ON_ACHIEVE, slot3.awards, slot3.callback)
end
end
return slot0
|
function gadget:GetInfo()
-- loaded by default?
return {
name = "Com Counter",
desc = "Tells each team the total number of commanders alive in enemy allyteams",
author = "Bluestone",
date = "08/03/2014",
license = "Horses",
layer = 0,
enabled = true
}
end
-------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------
local enabled = (tostring(Spring.GetModOptions().mo_enemycomcount) == "1") or false
if not enabled then return false end
if not (gadgetHandler:IsSyncedCode()) then return false end --synced only
local teamComs = {} -- format is enemyComs[teamID] = total # of coms in enemy teams
local comDefs = VFS.Include("luarules/configs/comDefIDs.lua")
local function UpdateCount()
for teamID, _ in pairs(teamComs) do
local enemyComCount = 0
local _, _, _, _, _, allyTeamID = Spring.GetTeamInfo(teamID, false)
for otherTeamID, _ in pairs(teamComs) do
local _, _, _, _, _, otherAllyTeamID = Spring.GetTeamInfo(otherTeamID, false)
if otherAllyTeamID ~= allyTeamID then
enemyComCount = enemyComCount + teamComs[otherTeamID]
end
end
Spring.SetTeamRulesParam(teamID, "enemyComCount", enemyComCount, {
private = true,
allied = false
})
end
end
function gadget:Initialize()
local teamList = Spring.GetTeamList()
for _, teamID in ipairs(teamList) do
local newCount = 0
for commanders in pairs(comDefs) do
newCount = newCount + Spring.GetTeamUnitDefCount(teamID, commanders)
end
teamComs[teamID] = newCount
end
UpdateCount()
end
function gadget:UnitCreated(unitID, unitDefID, teamID)
if comDefs[unitDefID] then
if not teamComs[teamID] then
teamComs[teamID] = 0
end
teamComs[teamID] = teamComs[teamID] + 1
UpdateCount()
end
end
function gadget:UnitDestroyed(unitID, unitDefID, teamID)
if comDefs[unitDefID] then
if not teamComs[teamID] then
teamComs[teamID] = 0
end
teamComs[teamID] = teamComs[teamID] - 1
UpdateCount()
end
end
function gadget:UnitGiven(unitID, unitDefID, newTeam, oldTeam)
if comDefs[unitDefID] then
teamComs[newTeam] = teamComs[newTeam] + 1
teamComs[oldTeam] = teamComs[oldTeam] - 1
UpdateCount()
end
end |
local _M = {}
local tablex = require "pl.tablex"
local data = {}
function _M.push(key)
data[key] = (data[key] or 0) + 1
end
function _M.pop()
local copy = tablex.copy(data)
data = {}
return copy
end
return _M
|
local vim = vim
local global=require('jw.global')
local lspconfig = require'lspconfig'
local lsp_status = require('lsp-status')
local log = require 'vim.lsp.log'
local util = require'jw.util'
local path = require'lspconfig/util'.path
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
capabilities = vim.tbl_extend('keep', capabilities, lsp_status.capabilities)
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
local on_attach = function(client, bufnr)
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings.
local opts = { noremap=true, silent=true }
buf_set_keymap('n', 'gd', '<Cmd>lua vim.lsp.buf.declaration()<CR>', opts)
buf_set_keymap('n', '<c-]>', '<Cmd>lua vim.lsp.buf.definition()<CR>', opts)
buf_set_keymap('n', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts)
buf_set_keymap('n', '<localleader>gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
-- buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
-- buf_set_keymap('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
-- buf_set_keymap('n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
-- buf_set_keymap('n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
-- buf_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
buf_set_keymap('n', '<localleader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
-- moved to trouble.lua
-- buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
-- buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
buf_set_keymap('n', '<space>d', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
buf_set_keymap('n', '<space>a', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
-- Set some keybinds conditional on server capabilities
if client.resolved_capabilities.document_formatting then
buf_set_keymap("n", "<localleader>=", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
elseif client.resolved_capabilities.document_range_formatting then
buf_set_keymap("n", "<localleader>=", [[<cmd>lua vim.lsp.buf.range_formatting({},{0,0},{vim.fn.line("$")+1,0})<CR>]], opts)
end
-- autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
-- Set autocommands conditional on server_capabilities
if client.resolved_capabilities.document_highlight then
vim.api.nvim_exec([[
hi LspReferenceRead cterm=bold ctermbg=red guibg=LightYellow
hi LspReferenceText cterm=bold ctermbg=red guibg=LightYellow
hi LspReferenceWrite cterm=bold ctermbg=red guibg=LightYellow
augroup lsp_document_highlight
autocmd! * <buffer>
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
augroup END
]], false)
end
end
lsp_status.config({
status_symbol = 'V',
})
lsp_status.register_progress()
local on_attach_vim = function(client, bufnr)
log.info("LSP starting")
print("LSP starting")
-- require('completion').on_attach(client, bufnr)
-- require('diagnostic').on_attach(client, bufnr)
on_attach(client, bufnr)
log.info("LSP started")
print("LSP started")
end
local on_attach_vim_go = function(client, bufnr)
on_attach_vim(client, bufnr)
vim.api.nvim_command[[autocmd BufWritePre *.go lua require'jw.util'.organize_imports_format()]]
-- vim.api.nvim_command[[autocmd BufWritePre *.go lua vim.lsp.buf.formatting_sync(nil, 1000)]]
-- vim.api.nvim_command[[autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync(nil, 1000)]]
end
local on_attach_vim_h = function(client, bufnr)
on_attach_vim(client, bufnr)
end
--[[
-- npm install -g typescript typescript-language-server
-- npm install -g vscode-html-languageserver-bin
-- npm install -g vls
-- npm install -g vscode-css-languageserver-bin
-- npm install -g bash-language-server
-- npm install -g vscode-json-languageserver
-- npm install -g vim-language-server
-- npm install -g sql-language-server
-- npm install -g diagnostic-languageserver
--
--
-- yarn global add typescript typescript-language-server vscode-html-languageserver-bin vls vscode-css-languageserver-bin bash-language-server vscode-json-languageserver vim-language-server sql-language-server
--]]
local servers = {
'tsserver',
'vuels',
'cssls',
'html',
'jsonls',
'bashls',
'gopls',
'vimls',
'sqlls',
'rust_analyzer',
-- 'sumneko_lua',
'jedi_language_server',
}
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_attach = on_attach_vim,
capabilities = capabilities,
flags = {
debounce_text_change = 150,
}
}
end
-- lspconfig.tsserver.setup{
-- on_attach=on_attach_vim,
-- capabilities = capabilities, --lsp_status.capabilities,
-- }
-- lspconfig.gopls.setup{
-- on_attach=on_attach_vim_go,
-- capabilities = capabilities, --lsp_status.capabilities,
-- }
-- lspconfig.html.setup{
-- on_attach=on_attach_vim_h,
-- capabilities = capabilities, --lsp_status.capabilities,
-- }
-- lspconfig.vuels.setup{
-- on_attach=on_attach_vim,
-- capabilities = capabilities, --lsp_status.capabilities,
-- }
-- lspconfig.cssls.setup{
-- on_attach=on_attach_vim,
-- capabilities = capabilities, --lsp_status.capabilities,
-- }
-- lspconfig.bashls.setup{
-- on_attach=on_attach_vim,
-- capabilities = capabilities, --lsp_status.capabilities,
-- }
-- lspconfig.jsonls.setup{
-- on_attach=on_attach_vim_h,
-- init_options = {
-- provideFormatter = true
-- },
-- commands = {
-- Format = {
-- function()
-- vim.lsp.buf.range_formatting({},{0,0},{vim.fn.line("$"),0})
-- end
-- }
-- }
-- }
-- lspconfig.vimls.setup{
-- on_attach=on_attach_vim,
-- }
-- lspconfig.sqlls.setup{
-- on_attach=on_attach_vim,
-- }
-- lspconfig.rust_analyzer.setup{
-- on_attach=on_attach_vim,
-- }
lspconfig.sumneko_lua.setup{
on_attach=on_attach_vim,
capabilities = capabilities, --lsp_status.capabilities,
}
-- for jdtls
local get_os_config = function ()
if vim.fn.has("osx") == 1 then
return "config_mac"
elseif vim.fn.has("unix") == 1 then
return "config_linux"
else
return "config_win"
end
end
local install_dir = global.vim_path .. global.path_sep .. "f" .. global.path_sep .. "jdtls"
lspconfig.jdtls.setup{
on_attach=on_attach_vim,
cmd = {
"java",
"-Declipse.application=org.eclipse.jdt.ls.core.id1",
"-Dosgi.bundles.defaultStartLevel=4",
"-Declipse.product=org.eclipse.jdt.ls.core.product",
"-Dlog.level=ALL",
"-noverify",
"-Xmx1G",
"-javaagent:" .. global.vim_path .. global.path_sep .. "f" .. global.path_sep .. "lombok.jar",
"-XX:+UseG1GC",
"-XX:+UseStringDeduplication",
"-XX:ParallelGCThreads=8",
"-jar", install_dir .. "/plugins/org.eclipse.equinox.launcher_1.6.0.v20200915-1508.jar",
"-configuration", path.join { install_dir, get_os_config() },
"-data", path.join { vim.loop.os_homedir(), "workspace" },
"--add-modules=ALL-SYSTEM",
"--add-opens", "java.base/java.util=ALL-UNNAMED",
"--add-opens", "java.base/java.lang=ALL-UNNAMED"
},
-- init_options={
-- jvm_args = {
-- "-javaagent:" .. global.vim_path .. global.path_sep .. "f" .. global.path_sep .. "lombok.jar",
-- "-XX:+UseG1GC",
-- "-XX:+UseStringDeduplication",
-- "-XX:ParallelGCThreads=8",
-- },
-- },
root_dir=lspconfig.util.root_pattern(".git", "pom.xml", "build.xml"),
capabilities = capabilities, --lsp_status.capabilities,
}
-- lspconfig.jedi_language_server.setup {
-- on_attach=on_attach_vim,
-- capabilities = capabilities, --lsp_status.capabilities,
-- }
-- lspconfig.yamlls.setup{on_attach=on_attach_vim}
---[[
--
lspconfig.diagnosticls.setup{
on_attach=on_attach_vim,
autostart = false,
capabilities = capabilities, --lsp_status.capabilities,
filetypes = {"javascript", "typescript"},
root_dir = function(fname)
return lspconfig.util.root_pattern("tsconfig.json")(fname) or lspconfig.util.root_pattern(".eslintrc.js")(fname) or lspconfig.util.root_pattern(".eslintrc.yml")(fname)
end,
init_options = {
linters = {
eslint = {
command = "./node_modules/.bin/eslint",
rootPatterns = {".eslintrc.js", ".git"},
debounce = 100,
args = {
"--stdin",
"--stdin-filename",
"%filepath",
"--format",
"json"
},
sourceName = "eslint",
parseJson = {
errorsRoot = "[0].messages",
line = "line",
column = "column",
endLine = "endLine",
endColumn = "endColumn",
message = "[eslint] ${message} [${ruleId}]",
security = "severity"
},
securities = {
[2] = "error",
[1] = "warning"
}
},
},
filetypes = {
javascript = "eslint",
typescript = "eslint"
}
}
}
--]]
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
-- Enable underline, use default values
underline = true,
-- Enable virtual text, override spacing to 4
virtual_text = {
spacing = 0,
},
-- Disable a feature
update_in_insert = false,
}
)
vim.cmd [[ autocmd CursorHold * lua vim.lsp.diagnostic.show_line_diagnostics() ]]
-- load default highlight group for diagnostics
-- require('vim.lsp.diagnostic')._define_default_signs_and_highlights()
|
-----------------------------------
-- Area: Southern SandOria [S]
-- NPC: Geltpix
-- !pos 154 -2 103 80
-----------------------------------
function onTrade(player,npc,trade)
end;
function onTrigger(player,npc)
player:showText(npc, 7043); -- Don't hurt poor Geltpix! Geltpix's just a merchant from Boodlix's Emporium in Jeuno. Kingdom vendors don't like gil, but Boodlix knows true value of new money.
end;
function onEventUpdate(player,csid,option)
end;
function onEventFinish(player,csid,option)
end;
|
local redis = require "resty.redis"
local red = redis:new()
red:set_timeout(1000)
local ok, err = red:connect("127.0.0.1", 6379)
if not ok then
ngx.say("failed to connect: ", err)
return
end
ok, err = red:set("dog", "an animal")
if not ok then
ngx.say("failed to set dog: ", err)
end
ngx.say("set result: ", ok)
local ok, err = red:set_keepalive(10000, 100)
if not ok then
ngx.say("failed to set keepalive: ", err)
return
end |
-- Place this file into your %FARPROFILE%\Macros\scripts
-- Note! This is just an example of calling GuiMacro from Far Manager
-- Note! Ctrl+Wheel may be already binded in ConEmu Keys&Macro settings
-- Increase/decrease font size in ConEmu window with Ctrl+Wheel
local ConEmu = "4b675d80-1d4a-4ea9-8436-fdc23f2fc14b"
Macro
{
area="Common";
key="AltMsWheelUp";
flags="";
description="ConEmu: Increase ConEmu font size";
action = function()
Plugin.Call(ConEmu,"FontSetSize(1,2)")
end;
}
Macro
{
area="Common";
key="AltMsWheelDown";
flags="";
description="ConEmu: Decrease ConEmu font size";
action = function()
Plugin.Call(ConEmu,"FontSetSize(1,-2)")
end;
}
|
local sceneManager = require 'sceneManager'
function love.load( ... )
sceneManager.changeScene(require 'game')
end
function love.update(dt)
sceneManager.currentScene.update(dt)
end
function love.draw()
sceneManager.draw()
end
function love.keypressed(key)
sceneManager.currentScene.keypressed(key)
end
function love.mousepressed(x, y, button)
sceneManager.currentScene.mousepressed(x, y, button)
end
|
MSD.Language["tr"] = {
-- UI
lang_name = "Türkçe",
ok = "OK",
map = "Harita",
off = "Kapalı",
on = "Açık",
time_add = "Eklenecek zaman",
type = "Tür",
delay = "Gecikme",
cancel = "İptal",
enable = "Aktif Et",
model = "Model",
name = "İsim",
settings = "Ayarlar",
editor = "Düzenleyici",
red = "Kırmızı",
green = "Yeşil",
blue = "Mavi",
admin_menu = "Yetkili Menüsü",
ui_settings = "Arayüz Ayarları",
active = "Aktif",
inactive = "Deaktif",
disabled = "Devre Dışı",
warning = "Uyarı!",
remove = "Kaldır",
theme = "Tema",
dark_theme = "Karanlık Tema",
payment = "Ödeme",
load_autosave = "Son kaydı yükleyecek misin?",
load_save = "Kaydı yükle",
create_new = "Yeni oluştur",
enable_option = "Ayarı aktif et",
main_opt = "Ana ayarlar",
copy_data = "Veriyi kopyala",
save_chng = "Değişiklikleri kaydet",
enter_name = "İsimi giriniz",
enter_id = "ID giriniz",
confirm_action = "Eylemlerinizi lütfen onaylayınız",
check_fpr_errors = "Hataları kontrol et",
enter_description = "Açıklama gir",
cooldown_ok = "Başarı sonucu bekleme süresi",
cooldown_fail = "Hata sonucu bekleme süresi",
s_team_whitelist = "Takım beyaz listesini ayarla",
whitelist_blacklist = "Beyaz liste kara liste",
custom_val = "Özel değer ayarla",
set_hp_full = "Sağlık değerini fulle",
dist_to_close = "En yakınına mesafe",
e_text = "Yazı giriniz",
e_number = "Sayı giriniz",
e_class = "Sınıf giriniz",
e_value = "Değer giriniz",
e_blank_dis = "Devre dışı bırakmak için boş bırakın",
e_blank_default = "Varsayılan ayarlar için boş bırakın",
e_url = "Bağlantı giriniz",
e_model = "Model uzantısını giriniz",
e_material = "Materyal uzantısını giriniz",
e_wep_class = "Silah sınıfını giriniz",
e_ent_class = "Varlık sınıfını giriniz",
e_veh_class = "Araç sınıfını giriniz",
e_npc_class = "NPC sınıfını giriniz",
select_ammo = "Seçili mermi",
amount_ammo = "Mermi asyısı",
disable_phys = "Fiziği devre dışı bırak",
none = "Hiç",
custom_icon = "Özel ikon ayarla",
weapon_name = "Silah isim",
moveup = "Yukarı git",
movedown = "Aşağıya git",
movepoint = "Noktayı hareket ettir",
swap = "Değiş",
swapmod = "Değişim modu aktif. Tıklayarak devre dışı bırak",
copy_from_ent = "Baktığın varlıktan kopyala",
set_pos_self = "Pozisyonunu ayarla",
set_pos_aim = "Baktığın noktaya ayarla",
spawn_point = "Nokta oluştur",
spawn_ang = "Açı oluştur",
mark_area = "Alanı işaretle",
time_wait = "Bekleme süresi",
map_marker = "Harita işaretçisini ayarla",
in_sec = "saniye olarak",
def_units = "Varsayılan %s ünit", -- "Default 350 units" leave %s as is
def_seconds = "Varasyılan %s saniye", -- "Default 10 seconds" leave %s as is
ent_show_pointer = "İaşretçiyi varlığın üstünde göstr",
ent_arcade_style = "Arcade-tarzında entitiy görünüşü",
ent_stnd_style = "Standart varlık görünüşü",
custom_color = "Özel rengi aktif et",
mat_default = "Varsayılan materyal için boş bırak",
set_ui = "Kullanıcı Arayüzü ayarları",
set_hud = "HUD ayarları",
set_hud_pos = "Görev HUD'u ayarları",
set_hud_themes = "HUD Temaları",
set_server = "Sunucu ayarları",
set_ui_blur = "Arkaplanı bulanıklaştır",
set_ui_mono = "Monokrom arkaplan",
set_ui_vignette = "Arka plan için vignette efekti",
set_ui_brightness = "Arkaplan parlaklığı",
set_ui_color = "Ana rengi seç",
set_ui_align_left = "Sola yatay hizalama",
set_ui_align_right = "Sağa yatay hizalama",
set_ui_align_top = "Yukarıya dikey hizalama",
set_ui_align_bottom = "Aşağıya dikey hizalama",
set_ui_offset_h = "Yatay Ofset",
set_ui_offset_v = "Dikey Ofset",
upl_changes = "Değişiklikleri sunucuya yükle",
res_changes = "Değişimleri eski haline getir",
-- Player
dead = "Öldün",
time_ex = "Zaman doldu",
vehicle_bum = "Aracın yok oldu",
left_area = "Bölgeyi terk ettin",
m_blew = "Görevi batırdın",
m_failed = "Görev başarısız",
m_success = "Görev başarılı",
m_loop = "Görev güncellemesi",
-- Errors
inv_quest = "Geçersiz görev",
team_bl = "Takımın karalistede",
no_players = "Bunu yapman için sunucuda daha fazla oyuncu olması gerekmekte",
no_players_team = "Bunu yapman için belirli takımlarda daha fazla oyuncu olması gerekmekte",
need_admin = "Sadece adminler bu eylemi gerçekleştirebilir",
-- Quests
active_quest = "Aktif bir görevin var",
inactive_quest = "Bu görevi oynayamazsın",
quest_editor = "Görev Düzenleyicisi",
quest_list = "Görev Listesi",
quests = "Görevler",
leave_pnt = "Noktadan ayrıl",
q_editobj = "hedefleri düzenle",
q_incvobj = "Geçersiz hedef",
q_setobj = "Hedef ayarları",
q_newobj = "Yeni bir hedef oluştur",
q_editrwd = "Ödülleri düzenle",
q_rwdeditor = "Ödül Düzenleyicisir",
q_rwdlist = "Ödül Listesi",
q_rwdsets = "Ödül Ayarları",
q_findmap = "Diğer haritalardan görev bul",
q_obj_des = "Hedef açıklaması",
q_dist_point = "Noktaya olan uzaklık",
q_dist_from_point = "Noktadan olan uzaklık",
q_ignore_veh = "Görev aracını görmezden gel",
q_timer_show = "Oyuncuya zamanlayıcıyı göster",
q_area_stay = "Oyuncu bölgede kalmalı",
q_start = "Görevi başlat",
q_new = "Yeni görev",
q_submit = "Görevi sun",
q_addnew = "Yeni görev ekle",
q_remove = "Görevi kaldır",
q_id_unique = "Her bir görevin ID'si kendine özel olmalı",
q_complete_msg = "Görevi bitirme mesajı",
q_dotime = "Görev süresi",
q_dotime_ok = "Süre bitince görev başarıyla tamamlansın",
q_dotime_fail = "Süre bitince görev başarısız olsun",
q_death_fail = "Oyuncu öldüğünde görevi iptal et",
q_loop = "Görevleri tekrara al",
q_loop_reward = "Her bir tekrarda oyuncuyu ödüllendir",
q_enable = "Görevi aktif et",
q_events = "Etkinlikler",
q_eventadd = "Etkinlik Ekle",
q_eventedit = "etkinlik düzenle",
q_eventremove = "Etkinlik kaldır",
q_in_progress = "Görev işlem sürecinde",
q_time_left = "Kalan süre",
q_ply_limit = "Görev için azami oyuncu sayısı",
q_ply_team_limit = "Takım limitlerini ayarla",
q_ply_team_need = "Gerekli takım oyuncuları",
q_ply_need = "Başlamak için gereken oyuncu sayısı",
q_play_limit = "Görevi kaç oyuncunun oynayabileceğinin limiti",
q_must_stay_area = "Bu bölgenin içinde kalman gerekiyor yoksa görev başarısız olur",
q_time_wait = "Bu görevi tekrarlaman için beklemen lazım",
q_dotime_reset = "Görevin süresini sıfırla",
q_dotime_add = "Göreve yapma süresi ekle",
q_noreplay = "Bu görevi tekrar yapamazsın",
q_dis_replay = "Görev tekrarını iptal et",
q_needquest = "İlk başka bir görevi yapman gerekmekte",
q_needquest_menu = "Bitirilmiş görev gerekmektedir",
q_enterror = "Görev varlıkları oluşmamakta, görev kurulumunu kontrol et",
q_get = "Bu NPC'lerden görev alabilirsin",
q_noquests = "Görev yapabileceğin herhangi bir yol bulunmamakta :(",
q_ent_draw = "Görev varlığı çizim mesafesi",
q_loop_stop_key = "Görev tekrarlama durdurma tuşu",
q_hold_key_stop = "görevi durdurmak için [%s] tuşuna basılı tutun", -- To stop quest hold [P]
q_enter_veh = "Aracına bin",
q_npc_link = "Görevi bir NPC'ye bağla",
q_icon68 = ".PNG ve 68x68 pixel olucak şekilde bir bağlantı giriniz",
q_ent_pos_show = "Varlık lokasyonlarını oyunculara göster",
q_area_size = "Bölge boyutu",
q_area_pos = "Bölge pozisyonu",
q_s_area_size = "Bölge boyutunu ara",
q_s_area_pos = "Bölge pozisyonunu ara",
q_npc_answer_ok = "Oyuncunun pozitif cevabı",
q_npc_answer_no = "Oyuncunun negatif cevabı",
q_npc_answer_noq = "Görev yoksa oyuncunun cevabı",
q_npc_quest_no = "Görev yoksa NPC'nin konuşması",
q_money_give = "Verilecek para",
-- Simple NPCs
npc_editor = "NPC Düzenleyicisi",
npc_new = "Yeni NPC",
npc_select = "Bir NPC seçin",
npc_e_speech = "NPC konuşması giriniz",
npc_submit = "NPC oluşumunu onayla",
npc_update = "NPC'yi güncelle",
npc_remove = "NPC'yi kaldır",
npc_q_enable = "Görev NPC'lerini aktif et",
npc_did_open = "Dialog ID'si açılırken gereksin",
npc_q_target = "NPC objektif bir hedef",
npc_hostile = "Düşman NPC",
-- Update 1.0.1
duration = "Süre",
dis_text = "Sergilenen Yazı",
cam_speed = "Kamera hızı (düşük sayı - düşük hız)",
fov_speed = "FOV değişme hızı (düşük sayı - düşük hız)",
cam_start = "Kamera başlama parametreleri",
cam_end = "Kamera parametrelerini bitir",
cam_pos = "Kamera pozisyonu",
cam_ang = "Kamera açısı",
cam_fov = "Kamera FOV'u",
cam_effect = "Kamera kepenk efekti",
not_spawned = "oluşturulmamış",
}
-- Other phrases
local lng = "tr"
MSD.Language[lng]["Move to point"] = "Noktaya git"
MSD.Language[lng]["Leave area"] = "Bölgeden ayrıl"
MSD.Language[lng]["Kill NPC"] = "NPC'yi öldür"
MSD.Language[lng]["Collect quest ents"] = "Görev varlıklarını topla"
MSD.Language[lng]["Talk to NPC"] = "NPC ile konuş"
MSD.Language[lng]["There is no quests available"] = "Mevcut görev bulunmamakta"
MSD.Language[lng]["Give weapon"] = "Silah ver"
MSD.Language[lng]["Give ammo"] = "Mermi ver"
MSD.Language[lng]["Strip Weapon"] = "Silahı soy"
MSD.Language[lng]["Spawn quest entity"] = "Görev varlığı oluştur"
MSD.Language[lng]["Spawn entity"] = "Varlık oluştur"
MSD.Language[lng]["Spawn npc"] = "NPC oluştur"
MSD.Language[lng]["Manage do time"] = "Yapım süresini yönet"
MSD.Language[lng]["Spawn vehicle"] = "Araç oluştur"
MSD.Language[lng]["Remove vehicle"] = "Aracı kaldır"
MSD.Language[lng]["Remove all entites"] = "Tüm varlıkları kaldır"
MSD.Language[lng]["Set HP"] = "HP Ayarla"
MSD.Language[lng]["Set Armor"] = "Zırh Ayarla"
MSD.Language[lng]["DarkRP Money"] = "DarkRP Parası"
MSD.Language[lng]["Quest NPCs are disabled"] = "Görev NPC'leri devre dışı"
MSD.Language[lng]["You can enable them in settings"] = "Ayarlardan aktif edebilirsin" |
--[[
roblox script object on server
simple automated example of a single perceptron calculating a binary result using linear regression
first is a simple single control calculation showcasing learning
secondly runs a new perceptron with a larger control set reusing same training data to showcase
the amount of errors before and after training
requires /src/nerualNetworks/perceptron.lua and /lib/vector2obj.lua as children module scripts
]]--
local perceptron = require(script.perceptron) --stop calling methods on this
local v2obj = require(script.vector2obj)
function generateTestData(inputNum, amt, point) --point is Vector2 array of max sizes
if inputNum == 2 then --vector2obj for ease of acess
local macroData = {}
for i = 1, amt do
local dataPoint = v2obj.new(point[1], point[2])
table.insert(macroData, dataPoint)
end
return macroData
end
end
local inputs = {75,-23, 1} --test inputs
print('single perceptron neural network testing')
print('we are training with 50 vector2 points in range (+/-100, +/-75)')
local testData = generateTestData(2, 50, {100,75})
local tester = perceptron.new(3) --call methods on this constructed object
--inital weights are generated randomly in the constructor
print('the intial choice with our control data, (75,-23), is')
print(tester:sumCalc(inputs))--determines -1 or 1 (true/false) for feed-forward to next layer.
--we're using -1 and 1 for easy later implementation of non binary feed forward.
--lets traing the dataset now and see if inputs change
print('now training the perceptron. this may take a while')
wait(1)
for i = 1, #testData do
tester:train(testData[i].data, testData[i].answer)
end
print('sucessfully trained. lets compare with control points (75,-23)')
print(tester:sumCalc(inputs))
print('--')print('-')print('--')
print('that went well but lets mesure training a new perceptron with the same training set')
print('but this time we will calculate an error precentange off a large dataset before training')
local newPercept = perceptron.new(3, .1)
local controlData = generateTestData(2,25,{100,75})
local errSum = 0
for i = 1, #controlData do
local guess = newPercept:sumCalc(controlData[i].data)
if guess ~= controlData[i].answer then
errSum = errSum + 1
end
end
print(errSum .. ' out of our ' .. #controlData .. 'control points were incorrect')
--print('that gives us an error precentage of ' .. #controlData/errSum)
print('training with original training set')
for i = 1, #controlData do
newPercept:train(controlData[i].data,controlData[i].answer)
end
print('calculating error again')
local controlData = generateTestData(2,25,{100,75})
local errSum = 0
for i = 1, #controlData do
local guess = newPercept:sumCalc(controlData[i].data)
if guess ~= controlData[i].answer then
errSum = errSum + 1
end
end
print(errSum .. ' out of our ' .. #controlData .. ' control points were incorrect')
--print('that gives us an error precentage of ' .. errSum/#controlData)
print('--')print('-')print('--')
|
--[[------------------------------------------------------------------
They Hunger theme
]]--------------------------------------------------------------------
-- create theme
local THEME = GSRCHUD.theme.create()
--[[ Colour ]]--
THEME:setColour(Color(255, 0, 0))
--[[ Custom element parameters ]]--
THEME:addPreDraw('health', function(element)
local localPlayer = GSRCHUD.localPlayer()
element:set('hideDivider', not localPlayer.Armor or localPlayer:Armor() <= 0)
end)
THEME:addPreDraw('suit', function(element)
local localPlayer = GSRCHUD.localPlayer()
element:set('hide', not localPlayer.Armor or localPlayer:Armor() <= 0)
end)
--[[ Register ]]--
GSRCHUD.THEME_THEYHUNGER = GSRCHUD.theme.register('They Hunger', THEME)
|
for k, v in next, lang do
if k ~= "en" then
table.merge(v, lang.en)
end
end |
--[[
################################################################################
#
# Copyright (c) 2014-2019 Ultraschall (http://ultraschall.fm)
#
# 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, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
################################################################################
--]]
dofile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua")
-- This checks, whether any line in a string, stored in clipboard, is a valid config-var
-- after that, it will put a string into clipboard with all found strings.
-- This looks for configvars, who can be either int, double or string.
--
-- Be aware: some configvars available as
-- ints can also be available as double
-- string can also be available as int
-- that means, duplicate config-vars between different datatypes are normal.
--
-- When running this script with Ultraschall-API installed, it will only show config-vars not already existing in the
-- config-vars-documentation of Reaper-Internals, which is supplied together with Ultraschall-API.
--
-- Meo Mespotine 12th of July 2019
A2=ultraschall.ReadFullFile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api/DocsSourcefiles/reaper-config_var.USDocML")
if A2==nil then A2="" end
--A2=""
orgvars={}
Acount=1
--if OLOL==nil then return end
--local ultraschall=ultraschall
while A2~=nil do
line,offs=A2:match("<slug>(.-)</slug>()")
if offs==nil then break end
B=line:sub(1,1)
if B~="" and B~=" " and B~="#" then orgvars[Acount]=line Acount=Acount+1 end
A2=A2:sub(offs,-1)
end
local Clipboard_string = ultraschall.GetStringFromClipboard_SWS()
-- read strings from Reaper.exe
-- unfortunately too slow.. :/
--[[
A = ultraschall.ReadFullFile(reaper.GetExePath().."/reaper.exe", true):lower()
--if OL==nil then return end
Clipboard_string=""
--for D in string.gmatch(A, "([%w%d%p_]+)()") do
for D in string.gmatch(A, "([%l_]+)") do
if D:len()>1 then
Clipboard_string=Clipboard_string..D.."\n"
end
end
--print3(Clipboard_string)
if OL==nil then return end
--]]
Clipboard_string=Clipboard_string.."\n "
--print3(Clipboard_string)
--if LLLLL==nil then return end
-- let's check the strings
ints={}
local integers=""
local doubles=""
count=1
ALABAMA=0
AAA=reaper.time_precise()
count, split_string = ultraschall.SplitStringAtLineFeedToArray(Clipboard_string)
BBB=reaper.time_precise()-AAA
table.sort(split_string)
--Integer
Int={}
Intcount=0
for i=1, count do
local A=reaper.SNM_GetIntConfigVar(split_string[i], -103)
local B=reaper.SNM_GetIntConfigVar(split_string[i], -101)
if A==B then
for a=1, Acount do
if orgvars[a]==split_string[i]:lower() then found=true end
end
if found==false then
Intcount=Intcount+1
Int[Intcount]=split_string[i]:lower()
--reaper.ShowConsoleMsg(split_string[i].." "..tostring(C).."\n")
end
found=false
end
end
table.sort(Int)
for i=Intcount, 2, -1 do
if Int[i]==Int[i-1] then table.remove(Int, i) Intcount=Intcount-1 end
end
Intstring="Ints:\n"
for i=1, Intcount do
Intstring=Intstring..Int[i].."\n"
end
reaper.MB(split_string[1].."OLO",reaper.time_precise()-AAA,0)
-- Double
Double={}
Doublecount=0
for i=1, count do
local A=reaper.SNM_GetDoubleConfigVar(split_string[i], -103)
local B=reaper.SNM_GetDoubleConfigVar(split_string[i], -101)
if A==B then
for a=1, Acount do
if orgvars[a]==split_string[i]:lower() then found=true end
end
if found==false then
Doublecount=Doublecount+1
Double[Doublecount]=split_string[i]:lower()
--reaper.ShowConsoleMsg(split_string[i].." "..tostring(C).."\n")
end
found=false
end
end
table.sort(Double)
for i=Doublecount, 2, -1 do
if Double[i]==Double[i-1] then table.remove(Double, i) Doublecount=Doublecount-1 end
end
Doublestring="Doubles:\n"
for i=1, Doublecount do
Doublestring=Doublestring..Double[i].."\n"
end
-- String
Strings={}
Stringscount=0
for i=1, count do
local A=reaper.get_config_var_string(split_string[i])
if A==true then
for a=1, Acount do
if orgvars[a]==split_string[i]:lower() then found=true end
end
if found==false then
Stringscount=Stringscount+1
Strings[Stringscount]=split_string[i]:lower()
end
found=false
end
end
table.sort(Strings)
for i=Stringscount, 2, -1 do
if Strings[i]==Strings[i-1] then table.remove(Strings, i) Doublecount=Stringscount-1 end
end
Stringsstring="Strings:\n"
for i=1, Stringscount do
if Strings[i]~=nil then
Stringsstring=Stringsstring..Strings[i].."\n"
end
end
print3(Intstring.."\n"..Doublestring.."\n"..Stringsstring)
reaper.MB(split_string[1].."OLO",reaper.time_precise()-AAA,0)
|
turret = class("turret")
local turretSheet = love.graphics.newImage("assets/gfx/images/turret.png")
function turret:initialize(x, y)
self.x = x
self.y = y
self.base = love.graphics.newQuad(0, 0, 15, 15, turretSheet:getWidth(), turretSheet:getHeight())
self.head = love.graphics.newQuad(15, 0, 15, 15, turretSheet:getWidth(), turretSheet:getHeight())
self.rotation = 0
self.direction = 1
self.cooldown = 0
end
function turret:update(dt)
self.cooldown = self.cooldown + dt
if player.x > self.x then
self.direction = 1
else
self.direction = -1
end
self.rotation = math.atan2((player.y - self.y), (player.x - self.x))
if self.cooldown >= 1.5 then
bullet:new(self.x, self.y, self.rotation)
self.cooldown = 0
end
end
function turret:draw()
love.graphics.setColor(1,1,1)
love.graphics.draw(turretSheet, self.base, self.x, self.y, 0, 2, 2)
love.graphics.draw(turretSheet, self.head, self.x + 20, self.y + 13, self.rotation, 3, 3*self.direction, 4, 7.5)
end
|
local L = LibStub:GetLibrary("AceLocale-3.0"):NewLocale("Grid2", "itIT")
if not L then return end
L["?"] = "?"
L["AFK"] = "AFK"
L["Beast"] = "Bestia"
L["Border"] = "Bordo"
L["By Class"] = "Per Classe"
L["By Class 1 x 25 Wide"] = "Per Classe 1 x 25"
L["By Class 25"] = "Per Classe 25"
L["By Class 2 x 15 Wide"] = "Per Classe 2 x 15"
L["By Class w/Pets"] = "Per classe con Pet"
L["By Group 10"] = "Per Gruppo 10"
L["By Group 10 Tanks First"] = "Per Gruppo 10 Tanks Primi"
L["By Group 10 w/Pets"] = "Per Gruppo 10 con Pets"
L["By Group 15"] = "Per Gruppo 15"
L["By Group 15 w/Pets"] = "Per Gruppo 15 con Pets"
L["By Group 20"] = "Per Gruppo 20"
L["By Group 25"] = "Per Gruppo 25"
L["By Group 25 Tanks First"] = "Per Gruppo 25 Tanks Primi"
L["By Group 25 w/Pets"] = "Per Gruppo 25 con Pets"
L["By Group 25 w/tanks"] = "Per Gruppo 25 con Tanks"
L["By Group 40"] = "Per Gruppo 40"
L["By Group 4 x 10 Wide"] = "Per Gruppo 4 x 10"
L["By Group 5"] = "Per Gruppo 5"
L["By Group 5 w/Pets"] = "Per Gruppo 5 con Pets"
L["By Role 25"] = "Per Ruolo 25"
L["Charmed"] = "Incantato"
L["DAMAGER"] = "DPS"
L["DEAD"] = "MORTO"
L["Default"] = "Default"
L["Demon"] = "Demone"
L["(%d+) yd range"] = "Raggio di (%d+) yard "
L["Elemental"] = "Elementale"
L["FD"] = "FD"
L["FFA"] = "FFA"
L["GHOST"] = "FANTASMA"
L["Grid2"] = "Grid2"
L["HEALER"] = "CURATORE"
L["Humanoid"] = "Umanoide"
L["Low HP"] = "Vita Bassa"
L["ML"] = "ML"
L["None"] = "niente"
L["Offline"] = "Disconesso"
L["OOR"] = "OOR"
L["PvP"] = "PvP"
L["R"] = "R"
L["RA"] = "RA"
L["Revived"] = "Rianimato"
L["Reviving"] = "Rianimando"
L["RL"] = "RL"
L["Select Layout"] = "Seleziona Layout"
L["Solo"] = "Solo"
L["Solo w/Pet"] = "Solo con Pet"
L["talking"] = "parlando"
L["TANK"] = "TANK"
L["target"] = "bersaglio"
L["vehicle"] = "veicolo"
L["X"] = "X"
L["Me"] = "Io"
|
local isDebug=arg[#arg] == "-debug"
if isDebug then require("mobdebug").start() end
_traceback=debug.traceback
LG=love.graphics
LK=love.keyboard
Pow=require "lib/powlov/pow"
Gamera=require "lib/gamera/gamera"
Allen=Pow.allen
TSerial=require "lib/TSerial"
Serpent=require "lib/serpent/src/serpent"
Lume=Pow.lume
Moses=Pow.moses
Tween=require "lib/tween/tween"
Walt=require "lib/walt/animator"
--tweening
Flux=require "lib/flux/flux"
TimerLib=require "lib/timer/Timer"
Timer=TimerLib()
Debug = require "lib/debug"
Inspect=require "lib/inspect/inspect"
Debug.useFile=true
-- collisions
Hc=require "lib/HC/init"
Const=require "data/const"
Config=require "data/config"
Arg=require "lib/arg/arg"
Util=require "tech/util"
-- global exports (frequently used)
table_removeByVal=Util.table_removeByVal
table_delete=Util.table_delete
table_isEmpty=Util.table_isEmpty
loadScripts=Util.loadScripts
xy=Util.xy
xywh=Util.xywh
serialize=Util.serialize
deserialize=Util.deserialize
Id=require "tech/id"
-- удивительно, но точка - это важно, иначе не находится core
Grease=require 'lib/grease/grease.init'
SortedList=require "lib/Wiki-Lua-Libraries/StandardLibraries/SortedList"
Entity=require "core/entity"
E=Entity
-- todo: mass-load (util loader to global space, or globalize method)
BaseEntity=require "entity/baseEntity"
Debugger=require "entity/debugger"
Actionbar=require "entity/actionbar"
PlayerUi=require "entity/player_ui"
ClientAction=require 'client/action'
Tile=require "res/tile"
-- depend on Tile
TilesView=require 'view/tiles'
Cam = Gamera.new(0,0,128,128)
local _cam=Cam
Session=require "core/session"
Anim=require "tech/anim"
Session.isClient=Util.hasArg("c")
Session.isServer=not Session.isClient
Session.serverBindAddress=Arg.get("bind=","*")
local setClientLogin=function()
local loginPos= Lume.find(arg, "login")
local login
if loginPos then
login=arg[loginPos+1]
end
if login then
Session.login=login
else
Session.login="client1"
end
end
if Session.isClient then
setClientLogin()
love.filesystem.setIdentity("WiW_Client_"..Session.login)
else
-- server-only init
love.window.setPosition(20,100)
end
-- requires session
Event=require "core/event"
-- lowercase Globals - frequently used
log=Debug.log
pack=TSerial.pack
draw=LG.draw
dbgCtxIn=Debug.enterContext
dbgCtxOut=Debug.exitContext
_ets=Entity.toString
local _cursorImg=nil
log("*** Start *** "..Util.getTimestamp().._VERSION)
Pow.log=log
-- declare globals
Fonts=nil -- init in load()
local _debugger=Debugger.new() ---EntityFactory.debugger()
local _editor=nil
local _profiler=nil
local saveGame=function()
Anim.preSave()
Id.save()
Universe.save()
Player.save()
end
local loadGame=function()
log("loadGame")
Id.load()
local isLoaded=Player.load()
if Session.isServer then
isLoaded=Universe.load()
if isLoaded then
-- client does it later, after player registered
ClientAction.setWorld(CurrentPlayer.worldName)
end
end
return isLoaded
end
local newGame=function()
log("new game")
-- client doesnt need entire universe
if Session.isServer then
CurrentUniverse=Universe.new()
local initWorlds=require "data/initworlds"
initWorlds()
end
CurrentPlayer=Player.new()
Entity.setActive(CurrentPlayer,true)
Player.giveStarterPack(CurrentPlayer)
if Session.isServer then
ClientAction.setWorld(CurrentPlayer.worldName)
end
end
local startUi=function()
local actionBar=Actionbar.new()
Entity.setActive(actionBar,true)
local playerUi=PlayerUi.new()
Entity.setActive(playerUi,true)
end
local preloadImages=function()
local tmp=Img.dracon
end
local startClient=function()
log("starting client")
love.window.setTitle(love.window.getTitle().." | client | "..Session.login)
ClientEntity=Client.new()
Client.connect(ClientEntity)
end
local startServer=function()
log("starting server")
love.window.setTitle(love.window.getTitle().." | server "..Session.serverBindAddress..":"..Session.port)
ServerEntity=Server.new()
end
local testHc=function()
-- collision lib understanding
-- http://hc.readthedocs.org
local rect1 = Hc.rectangle(200,400,400,20)
local pointInside = Hc.point(201,401)
local pointOutside = Hc.point(2201,401)
local c1=pointInside:collidesWith(rect1)
local c2=pointOutside:collidesWith(rect1)
assert(c1==true)
assert(c2==false)
Hc.remove(rect1)
Hc.remove(pointInside)
Hc.remove(pointOutside)
end
local loadEntity=function(file)
if not Allen.endsWith(file,".lua") then
return
end
file=Allen.cutTail(file,4)
log("loadEntity:"..file)
local entityCode=require(file)
if entityCode==nil then
log("warn: entity not loaded:"..entityCode)
return
end
local entityName=entityCode.name
if entityName==nil then
log("error: no entity name:"..file)
return
end
local prev=_G[entityName]
if prev~=nil then
-- entity already registered (manual load order for deps)
return
end
_G[entityName]=entityCode
end
local loadEntities=function()
Pow.eachFile("entity/behaviour/", loadEntity)
BaseAnimal=require "entity/baseAnimal"
Pow.eachFile("entity/", loadEntity)
end
love.load=function()
Id.init()
Fonts={}
Fonts.main=LG.getFont()
Fonts.chat=love.graphics.newFont("res/LiberationSans-Regular.ttf", 18)
love.graphics.setFont(Fonts.chat)
love.graphics.setDefaultFilter( "nearest", "nearest" )
-- active for draw only
--love.graphics.scale(scale,scale)
Img=require "res/img"
preloadImages()
loadEntities()
Collision=require "core/collision"
_editor=Editor.new() ---EntityFactory.debugger()
_profiler=Profiler.new()
--love.graphics.setLineWidth(scale)
-- todo later, no bar is ok
CurrentWorld=nil
CurrentPlayer=nil
if Util.hasArg("sandbox") then require "sandbox" end
if Session.isServer then
CurrentUniverse=nil
startServer()
end
local isNewGame=Util.hasArg("new")
--if Session.isServer then
if isNewGame then
newGame()
elseif not loadGame() then
newGame()
end
--end
-- load first, so we have a player
if Session.isClient then
startClient()
end
startUi()
_cam:setScale(Session.scale)
testHc()
_cursorImg=Img.cusror_default
--[[ My intel 4000
anisotropy = 16,
canvasmsaa = 8,
cubetexturesize = 16384,
multicanvas = 8,
pointsize = 255,
texturelayers = 2048,
texturesize = 16384,
volumetexturesize = 2048
]]--
-- local limits = love.graphics.getSystemLimits()
-- log("Graphic limits:"..Inspect(limits))
end
--local drawTile2=function(img,x,y)
-- draw(img,x,y)
--end
--local drawTile=function(tileNumber,x,y)
-- -- local imgId="level_main/tile"..tileNumber
-- local img=Tile[tileNumber]
-- if img==nil then
-- local a=1
-- log("no tile:"..tileNumber)
-- else
-- drawTile2(img,x,y)
-- end
-- --LG.draw(img,x,y)
--end
local drawTiles=TilesView.draw
local doDraw=function(l,t,w,h)
local world=CurrentWorld
if world==nil then
LG.print("no world loaded",2,30)
return
end
-- todo: build draw function on setWorld instead of this checks
--log("doDraw("..l..","..t..","..w..","..h)
if world.tileMapName~=nil then
drawTiles(l,t,w,h)
end
if world.bgSprite~=nil then
local sprite=Img["level/"..world.bgSprite]
draw(sprite)
end
Entity.draw()
Collision.draw()
Anim.draw()
end
love.draw=function()
-- active for draw only
local scale=Session.uiScale
-- love.graphics.scale(1,0.5)
_cam:draw(doDraw)
-- cam has internal scale
-- 1x scaled ui (debugger)
Entity.drawScaledUi()
-- double scale is trouble (first applied, second not)
-- why every draw call? for ui
love.graphics.scale(scale,scale)
--love.graphics.scale(1,1)
Entity.drawUi()
if Session.hasErrors then
LG.print("ERROR")
end
if Session.hasWarnings then
LG.print("WARN")
end
local mx=love.mouse.getX()/scale
local my=love.mouse.getY()/scale
draw(_cursorImg,mx,my)
-- every frame?
love.mouse.setVisible(false)
end
love.update=function(dt)
Session.frame=Session.frame+1
Flux.update(dt)
Anim.update(dt)
Timer:update(dt)
Entity.update(dt)
Event.update(dt)
if Session.frame%60==0 then
Entity.slowUpdate(dt)
end
if CurrentPlayer~=nil then
_cam:setPosition(Entity.getCenter(CurrentPlayer))
end
--log("cam pos:".._cam:getPosition())
end
local selectObject=function(entity)
if Session.selectedEntity==entity then
if entity~=nil then
log("already selected")
end
return
end
Session.selectedEntity=entity
log("Selected:"..Entity.toString(entity))
end
local selectObjectByCoord=function(x,y)
-- log("selectObject:"..xy(x,y))
local entities=Collision.getAtPoint(x,y)
local k,first
if entities~=nil then
k,first=next(entities)
end
if first==nil then
log("nothing to select")
end
-- todo: cycle all
selectObject(first)
end
love.mousepressed=function(x,y,button,istouch)
local gameX,gameY
--gameX,gameY=x,y
gameX,gameY=_cam:toWorld(x,y)
log("Mouse pressed:"..xy(gameX,gameY).." btn:"..button)
if button==1 then
if LK.isDown("lshift") then
selectObjectByCoord(gameX,gameY)
return
end
ClientAction.move(CurrentPlayer,gameX,gameY)
elseif button==2 then
log("rmb:default action")
if _editor.isActive then
log("editor place item")
local item=Editor.placeItem(_editor)
-- Entity.transferToServer({item})
return
end
local player=CurrentPlayer
local activeEntity=player.activeFavorite
if activeEntity==nil then
log("use bare hands todo")
return
end
local entity=activeEntity-- Entity.find(activeEntity.entity, activeEntity.id,Session.login)
local entityCode=Entity.get(activeEntity.entity)
if entityCode.use~=nil then
log("use:"..entity.entity)
-- тут внутри создастся ивент
entityCode.use(entity,gameX,gameY)
else
log("entity has no 'use' func:"..entity.entity)
end
end
end
local toggleDebugger=function()
Entity.setActive(_debugger,not _debugger.isActive)
end
local toggleEditor=function()
Entity.setActive(_editor,not _editor.isActive)
end
local toggleProfiler=function()
Entity.setActive(_profiler,not _profiler.isActive)
end
local pickup=function()
log("pickup")
local extraRange=10
local player=CurrentPlayer
local doubleRange=extraRange+extraRange
local x=player.x-extraRange
local y=player.y-extraRange
local w=player.w+doubleRange
local h=player.h+doubleRange
local candidateEntities=Collision.getAtRect(x,y,w,h)
if not candidateEntities then
log("nothing to pick up")
return
end
for k,candidate in pairs(candidateEntities) do
if Entity.canPickup(candidate) then
ClientAction.pickup(candidate)
break
end
end
end
local startMountInteraction=function()
-- todo: better code
log("mount interaction")
if CurrentPlayer.mountedOn.entity=="Pegasus" then
if CurrentPlayer.worldName=="main" then
ClientAction.setWorld("clouds")
elseif CurrentPlayer.worldName=="clouds" then
ClientAction.setWorld("main")
end
end
end
love.resize=function(width, height)
Session.windowHeight=height
Session.windowWidth=width
_cam:setWindow(0,0,width,height)
end
local doQuit=function()
saveGame()
log("*** Quit ***")
Debug.writeLogs()
love.event.quit()
end
local afterLogoff=function()
log("after logoff")
doQuit()
end
local startQuitTimer=function()
log("startQuitTimer")
Timer:after(2, doQuit)
end
local _isLogoff=false
local logoff=function()
log("logoff")
_isLogoff=true
startQuitTimer()
local event=Event.new()
event.code="logoff"
event.target="server"
-- todo react to event
end
love.quit=function()
if not _isLogoff and Session.isClient then
logoff()
-- Abort quitting. If true, do not close the game.
return true
end
doQuit()
return false
end
love.mousemoved=function( x, y, dx, dy, istouch )
end
love.keypressed=function(key,unicode)
log("keypressed:"..key.." u:"..unicode, "keyboard")
local isProcessedByEntities=Entity.keypressed(key,unicode)
if isProcessedByEntities then
log("key processed by entities")
return
end
if key==Config.keyDebugger then
Debug.writeLogs()
toggleDebugger()
elseif key==Config.keyEditor then
toggleEditor()
elseif key==Config.keyProfiler then
toggleProfiler()
elseif key==Config.keyEditorNextItem then
-- todo: editor listens for key when active
Editor.nextItem(_editor)
elseif key==Config.keyEditorPrevItem then
-- todo: editor listens for key when active
Editor.prevItem(_editor)
elseif key=="home" then
-- change player sprite for fun
local isFound=false
local first=nil
local currSprite=Img[CurrentPlayer.spriteName]
local nextSpriteName=nil
for k,v in pairs(Img) do
local t=type(v)
if t=="userdata" then
if first==nil then
if not string.find(k,"tile") then
first=k
end
end
if v==currSprite then
isFound=true
elseif isFound then
if not string.find(k,"tile") then
nextSpriteName=k
break
end
end
end
end
if nextSpriteName==nil then nextSpriteName=first end
Entity.setSprite(CurrentPlayer, nextSpriteName)
elseif key==Config.keyMount then
ClientAction.toggleMount(CurrentPlayer)
elseif key=="z" then
local nextSprite
while true do
local rnd=Lume.random()
log("roll:"..rnd)
if rnd > 0.9 then
nextSprite="bee"
elseif rnd > 0.4 then
nextSprite="player"
else
nextSprite="girl"
end
if CurrentPlayer.spriteName~=nextSprite then
break
end
end
Entity.setSprite(CurrentPlayer, nextSprite)
elseif key==Config.keyItemPickup then
pickup()
elseif key==Config.keyDeleteEntity then
ClientAction.deleteSelected()
elseif key=="kp+" then
Session.scale=Session.scale+1
_cam:setScale(Session.scale)
elseif key=="kp-" then
if Session.scale>=2 then
Session.scale=Session.scale-1
_cam:setScale(Session.scale)
end
elseif key=="m" then
if CurrentPlayer~=nil and CurrentPlayer.mountedOn~=nil then
startMountInteraction()
end
elseif key=="d" then
Player.startDance()
elseif key==Config.keyCharacterScreen then
log("CharacterScreen todo")
end
end
|
--
-- Created by IntelliJ IDEA.
-- User: nander
-- Date: 21/04/2018
-- Time: 14:09
-- To change this template use File | Settings | File Templates.
--
local menu = {} -- previously: Gamestate.new()
menu.name = "shuffleDiscardPile"
function menu:enter(prev)
menu.prev = prev
-- setup entities here
menu.animation = 1
end
function menu:draw()
local yy = math.abs(menu.animation-0.5)
menu.prev:draw(true)
love.graphics.push()
love.graphics.scale(GLOBSCALE())
scripts.rendering.renderCard.renderCard({name=""},100+1133*menu.animation, 300+300*yy,0.5 )
love.graphics.pop()
end
function menu:update(dt)
menu.animation = menu.animation - dt
if menu.animation < 0 then
STATE.drawPile = scripts.helpers.gamerules.shuffle(STATE.discardPile)
STATE.discardPile = {}
Gamestate.pop()
end
menu.prev:update(dt, true)
end
function menu:keyreleased(key, code)
end
function menu:mousepressed(x, y, click)
scripts.rendering.renderUI.mousePressed(x, y, click)
end
function menu:mousereleased(x, y, mouse_btn)
scripts.rendering.renderUI.mouseReleased(x, y, mouse_btn)
end
function menu:wheelmoved(x, y)
scripts.rendering.renderUI.wheelmoved(x, y)
end
return menu |
-- Debug backend to show what the VFS is doing.
local abspath = vfs.abspath
return {
debug = function() -- stubs, not actually usable
local cwd = "/"
return {
write = function(loc, str) print("Write to "..abspath(loc, cwd).." with content: "..str) return true end,
read = function(loc) print("Reading "..abspath(loc, cwd)) return "" end,
size = function(loc) print("size check at "..abspath(loc, cwd)) return 0 end,
exists = function(loc) print("check if "..abspath(loc, cwd).." exists") return true end,
mkdir = function(loc) print("mkdir at "..abspath(loc)) return true end,
delete = function(loc) print("delete at "..abspath(loc, cwd)) return true end,
list = function(loc) print("list at "..abspath(loc, cwd)) return {} end,
chdir = function(loc) print("cwd is now "..vfs.abspath(loc, cwd)) cwd = vfs.abspath(loc, cwd) return cwd end,
getcwd = function() print("getcwd (is "..cwd..")") return cwd end,
}
end
}
|
fx_version "bodacious"
games {"gta5"}
lua54 'yes'
client_scripts {
"config.lua",
"client.lua"
}
server_scripts {
"config.lua",
"server.lua"
}
|
object_tangible_tcg_series8_decorative_bespin_sconce_on = object_tangible_tcg_series8_shared_decorative_bespin_sconce_on:new {
}
ObjectTemplates:addTemplate(object_tangible_tcg_series8_decorative_bespin_sconce_on, "object/tangible/tcg/series8/decorative_bespin_sconce_on.iff") |
return {
file_os_conflict = {
aesfileencrypt = {
["0.1.3-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/AesFileEncrypt.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/aesfileencrypt/0.1.3-103/AesFileEncrypt/OSX/x86/-AesFileEncrypt.so"
}
},
alien = {
["0.5.0-1"] = {
current_os = "Linux",
from = "/home/sp/luarockstree/lib/luarocks/rocks/alien/0.5.0-1/tests/libalientest.so",
to = "/home/sp/Dropbox/Prj/upkg/luarocksorg/package-dev/alien/0.5.0-103/alien/__tests/libalientest.so"
}
},
apidemo = {
["1.0-3"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/apidemo.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/apidemo/1.0-303/apidemo/OSX/x86/-apidemo.so"
}
},
["auth0-nginx"] = {
["1.5.0-0"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/share/lua/5.1/auth0-nginx.lua",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/auth0-nginx/1.5.0-3/auth0-nginx/init.lua"
}
},
base64mix = {
["1.0.0-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/base64mix.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/base64mix/1.0.0-103/base64mix/Windows/x86/-base64mix.dll"
}
},
bigint = {
["1.0.3-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/bigint.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/bigint/1.0.3-103/bigint/Windows/x86/-bigint.dll"
}
},
bin = {
["5.1-0"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/share/lua/5.1/bin/numbers/BigNum.lua",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/bin/5.1-3/bin/numbers/BigNum.lua"
}
},
bitlib = {
["23-2"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/bit.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/bitlib/23-203/bit/OSX/x86/-bit.so"
}
},
brieflz = {
["0.2.0-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/brieflz.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/brieflz/0.2.0-103/brieflz/Windows/x86/-brieflz.dll"
}
},
cctea = {
["0.1.0-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/cctea.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/cctea/0.1.0-103/cctea/Windows/x86/-cctea.dll"
}
},
cdb = {
["1.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/cdb.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/cdb/1.0-103/cdb/OSX/x86/-cdb.so"
}
},
chacha = {
["1.1-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/chacha.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/chacha/1.1-103/chacha/OSX/x86/-chacha.so"
}
},
checks = {
["1.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/checks.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/checks/1.0-103/checks/OSX/x86/-checks.so"
}
},
chronos = {
["0.2-4"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/chronos.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/chronos/0.2-403/chronos/Windows/x86/-chronos.dll"
}
},
cl = {
["20100607-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/cl.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/cl/20100607-103/cl/OSX/x86/-cl.so"
}
},
cluacov = {
["0.1.1-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/cluacov/hook.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/cluacov/0.1.1-103/cluacov/Windows/x86/-cluacov_hook.dll"
}
},
collections = {
["1.0.0-3"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/luarocks/rocks/collections/1.0.0-3/doc/README.md",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/collections/1.0.0-303/collections/__doc/README.md"
}
},
compat53 = {
["0.7-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/compat53/table.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/compat53/0.7-103/compat53/Windows/x86/-compat53_table.dll"
}
},
cprint = {
["0.1-2"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/cprint.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/cprint/0.1-203/cprint/OSX/x86/-cprint.so"
}
},
ctc = {
["0.1-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/ctc.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/ctc/0.1-103/ctc/Windows/x86/-ctc.dll"
}
},
darksidesync = {
["1.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/darksidesync.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/darksidesync/1.0-103/darksidesync/OSX/x86/-darksidesync.so"
}
},
densearrays = {
["1.0-2"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/array.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/densearrays/1.0-203/array/OSX/x86/-array.so"
}
},
environ = {
["0.1.0-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/environ/core.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/environ/0.1.0-103/environ/Windows/x86/-environ_core.dll"
}
},
finally = {
["1.0.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/finally.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/finally/1.0.0-103/finally/OSX/x86/-finally.so"
}
},
gbk = {
["0.1.1-2"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/pinyin.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/gbk/0.1.1-203/pinyin/OSX/x86/-pinyin.so"
}
},
gcfn = {
["0.2.1-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/gcfn.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/gcfn/0.2.1-103/gcfn/Windows/x86/-gcfn.dll"
}
},
hashids = {
["1.0.6-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/hashids/clib.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/hashids/1.0.6-103/hashids/Windows/x86/-hashids_clib.dll"
}
},
hc = {
["0.1-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/share/lua/5.1/hardoncollider/init.lua",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/hc/0.1-103/hardoncollider/init.lua"
}
},
hex = {
["1.0.2-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/hex.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/hex/1.0.2-103/hex/Windows/x86/-hex.dll"
}
},
host = {
["0.1.0-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/host.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/host/0.1.0-103/host/Windows/x86/-host.dll"
}
},
hsm_statechart = {
["0.5-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/hsm_statechart.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/hsm_statechart/0.5-103/hsm_statechart/OSX/x86/-hsm_statechart.so"
}
},
hump = {
["0.4-2"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/luarocks/rocks/hump/0.4-2/doc/README.md",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/hump/0.4-203/hump/__doc/README.md"
}
},
huntable = {
["0.9-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/share/lua/5.1/huntable.lua",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/huntable/0.9-103/huntable/init.lua"
}
},
ircmess = {
["0.4-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/ircmess.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/ircmess/0.4-103/ircmess/OSX/x86/-ircmess.so"
}
},
klesi = {
["0.1.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/share/lua/5.1/klesi.lua",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/klesi/0.1.0-103/klesi/init.lua"
}
},
lalarm = {
["20120503-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/alarm.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lalarm/20120503-103/alarm/OSX/x86/-alarm.so"
}
},
lanes = {
["3.13.0-0"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/lanes/core.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/lanes/3.13.0-3/lanes/Windows/x86/-lanes_core.dll"
}
},
lascii85 = {
["20120927-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/ascii85.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lascii85/20120927-103/ascii85/OSX/x86/-ascii85.so"
}
},
layeredata = {
["0.0-2"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/luarocks/rocks/layeredata/0.0-2/doc/README.md",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/layeredata/0.0-203/layeredata/__doc/README.md"
}
},
lbase64 = {
["20120820-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/base64.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lbase64/20120820-103/base64/OSX/x86/-base64.so"
}
},
lbuffer = {
["0.1.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/buffer.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lbuffer/0.1.0-103/buffer/OSX/x86/-buffer.so"
}
},
lcurses = {
["9.0.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/curses_c.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lcurses/9.0.0-103/curses_c/OSX/x86/-curses_c.so"
}
},
ldecnumber = {
["2.1-3"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/ldecNumber.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/ldecnumber/2.1-303/ldecNumber/OSX/x86/-ldecNumber.so"
}
},
llui = {
["0.1-1"] = {
current_os = "Linux",
from = "/home/sp/luarockstree/share/lua/5.1/LLUI/DRM.lua",
to = "/home/sp/Dropbox/Prj/upkg/luarocksorg/package-dev/llui/0.1-103/LLUI/DRM.lua"
}
},
lmathx = {
["20120430.51-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/mathx.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lmathx/20120430.51-103/mathx/OSX/x86/-mathx.so"
}
},
loverocks = {
["0.0.7-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/share/lua/5.1/loverocks/os.lua",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package-dev/loverocks/0.0.7-103/loverocks/os.lua"
},
["0.0.8-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/share/lua/5.1/loverocks/os.lua",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/loverocks/0.0.8-103/loverocks/os.lua"
},
["0.1.0-2"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/share/lua/5.1/loverocks/os.lua",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/loverocks/0.1.0-203/loverocks/os.lua"
},
["0.2.1-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/share/lua/5.1/loverocks/os.lua",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/loverocks/0.2.1-103/loverocks/os.lua"
}
},
lpack = {
["20070629-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/pack.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lpack/20070629-103/pack/OSX/x86/-pack.so"
}
},
lpath = {
["0.1.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/path.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lpath/0.1.0-103/path/OSX/x86/-path.so"
}
},
lpc = {
["1.0.0-2"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/lpc.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lpc/1.0.0-203/lpc/OSX/x86/-lpc.so"
}
},
lpeg = {
["0.12.2-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/lpeg.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lpeg/0.12.2-103/lpeg/OSX/x86/-lpeg.so"
}
},
lpeglabel = {
["1.5.0-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/lpeglabel.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/lpeglabel/1.5.0-103/lpeglabel/Windows/x86/-lpeglabel.dll"
}
},
lposix = {
["20031107-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/posix.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lposix/20031107-103/posix/OSX/x86/-posix.so"
}
},
lrandom = {
["20120430.51-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/random.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lrandom/20120430.51-103/random/OSX/x86/-random.so"
}
},
lsqlite3complete = {
["0.9.5-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/lsqlite3complete.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/lsqlite3complete/0.9.5-103/lsqlite3complete/Windows/x86/-lsqlite3complete.dll"
}
},
ltcltk = {
["0.9-2"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/ltcl.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/ltcltk/0.9-203/ltcl/OSX/x86/-ltcl.so"
}
},
ltermbox = {
["0.2-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/ltermbox.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/ltermbox/0.2-103/ltermbox/OSX/x86/-ltermbox.so"
}
},
ltype = {
["1.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/ltype/core.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/ltype/1.0-103/ltype/OSX/x86/-ltype_core.so"
}
},
["lua-brotli"] = {
["1.0-2"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/brotli.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-brotli/1.0-203/brotli/Windows/x86/-brotli.dll"
}
},
["lua-click"] = {
["0.2.1-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/share/lua/5.1/click.lua",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-click/0.2.1-103/click/init.lua"
}
},
["lua-cmsgpack"] = {
["0.4.0-0"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/cmsgpack.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-cmsgpack/0.4.0-3/cmsgpack/OSX/x86/-cmsgpack.so"
}
},
["lua-crypt"] = {
["1.0.0-0"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/crypt/core.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-crypt/1.0.0-3/crypt/Windows/x86/-crypt_core.dll"
}
},
["lua-csnappy"] = {
["0.1.5-2"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/snappy.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-csnappy/0.1.5-203/snappy/Windows/x86/-snappy.dll"
}
},
["lua-discount"] = {
["1.2.10.1-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/discount.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-discount/1.2.10.1-103/discount/OSX/x86/-discount.so"
}
},
["lua-hiredis"] = {
["0.2.1-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/hiredis.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-hiredis/0.2.1-103/hiredis/OSX/x86/-hiredis.so"
}
},
["lua-http-parser"] = {
["2.7-0"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/http/parser.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-http-parser/2.7-3/http/Windows/x86/-http_parser.dll"
}
},
["lua-inih"] = {
["0.1-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/inih.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-inih/0.1-103/inih/OSX/x86/-inih.so"
}
},
["lua-llthreads"] = {
["1.2-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/llthreads.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-llthreads/1.2-103/llthreads/OSX/x86/-llthreads.so"
}
},
["lua-llthreads2"] = {
["0.1.5-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/llthreads2.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-llthreads2/0.1.5-103/llthreads2/Windows/x86/-llthreads2.dll"
}
},
["lua-lz4"] = {
["1.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/lz4.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-lz4/1.0-103/lz4/OSX/x86/-lz4.so"
}
},
["lua-m6502"] = {
["1.0-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/M6502.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-m6502/1.0-103/M6502/Windows/x86/-M6502.dll"
}
},
["lua-mtrace"] = {
["0.1-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/mtrace.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-mtrace/0.1-103/mtrace/Windows/x86/-mtrace.dll"
}
},
["lua-resty-auto-ssl"] = {
["0.8.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x64/luarockstree/share/lua/5.1/resty/auto-ssl/vendor/sockproc",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-resty-auto-ssl/0.8.0-103/resty/auto-ssl/vendor/sockproc"
},
["0.8.1-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x64/luarockstree/share/lua/5.1/resty/auto-ssl/vendor/sockproc",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-resty-auto-ssl/0.8.1-103/resty/auto-ssl/vendor/sockproc"
},
["0.8.5-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x64/luarockstree/share/lua/5.1/resty/auto-ssl/vendor/sockproc",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-resty-auto-ssl/0.8.5-103/resty/auto-ssl/vendor/sockproc"
},
["0.8.6-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x64/luarockstree/share/lua/5.1/resty/auto-ssl/vendor/sockproc",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-resty-auto-ssl/0.8.6-103/resty/auto-ssl/vendor/sockproc"
},
["0.9.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x64/luarockstree/share/lua/5.1/resty/auto-ssl/vendor/sockproc",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-resty-auto-ssl/0.9.0-103/resty/auto-ssl/vendor/sockproc"
},
["0.10.2-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x64/luarockstree/share/lua/5.1/resty/auto-ssl/vendor/sockproc",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-resty-auto-ssl/0.10.2-103/resty/auto-ssl/vendor/sockproc"
},
["0.10.3-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x64/luarockstree/share/lua/5.1/resty/auto-ssl/vendor/sockproc",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-resty-auto-ssl/0.10.3-103/resty/auto-ssl/vendor/sockproc"
},
["0.10.4-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x64/luarockstree/share/lua/5.1/resty/auto-ssl/vendor/sockproc",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-resty-auto-ssl/0.10.4-103/resty/auto-ssl/vendor/sockproc"
},
["0.10.5-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x64/luarockstree/share/lua/5.1/resty/auto-ssl/vendor/sockproc",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-resty-auto-ssl/0.10.5-103/resty/auto-ssl/vendor/sockproc"
}
},
["lua-resty-healthcheck-snz1"] = {
["0.3.1-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/share/lua/5.1/resty/healthcheck.lua",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lua-resty-healthcheck-snz1/0.3.1-103/resty/healthcheck.lua"
}
},
lua_bufflib = {
["0.2.1-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/bufflib.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lua_bufflib/0.2.1-103/bufflib/OSX/x86/-bufflib.so"
}
},
lua_pack = {
["1.0.5-0"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/lua_pack.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/lua_pack/1.0.5-3/lua_pack/Windows/x86/-lua_pack.dll"
}
},
lua_signal = {
["1.2.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/signal.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/lua_signal/1.2.0-103/signal/OSX/x86/-signal.so"
}
},
lua_sysenv = {
["0.1-0"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/lua_sysenv.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/lua_sysenv/0.1-3/lua_sysenv/Windows/x86/-lua_sysenv.dll"
}
},
luabase64 = {
["0-9"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/LuaBase64/c.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/luabase64/0-903/LuaBase64/Windows/x86/-LuaBase64_c.dll"
}
},
luabenchmark = {
["0.10.0-1"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/benchmarklib.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/luabenchmark/0.10.0-103/benchmarklib/Windows/x86/-benchmarklib.dll"
}
},
luacrc16 = {
["1.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/crc16.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/luacrc16/1.0-103/crc16/OSX/x86/-crc16.so"
}
},
luacryptor = {
["1.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/luacryptorext.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/luacryptor/1.0-103/luacryptorext/OSX/x86/-luacryptorext.so"
}
},
luacwrap = {
["1.3.1-1"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/testluacwrap.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/luacwrap/1.3.1-103/testluacwrap/Windows/x64/-testluacwrap.dll"
}
},
luafilesystem = {
["1.7.0-2"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/lfs.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/luafilesystem/1.7.0-203/lfs/Windows/x86/-lfs.dll"
}
},
luahelp = {
["0.3-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/help.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/luahelp/0.3-103/help/OSX/x86/-help.so"
}
},
lualzo = {
["0.5-1"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/luaLZO.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/lualzo/0.5-103/luaLZO/Windows/x64/-luaLZO.dll"
}
},
luaprofiler = {
["2.0.2-2"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/profiler.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/luaprofiler/2.0.2-203/profiler/OSX/x86/-profiler.so"
}
},
luaproxy = {
["1.1.4-1"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/proxy.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/luaproxy/1.1.4-103/proxy/Windows/x64/-proxy.dll"
}
},
luarabbit = {
["0.9-1"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/luarabbit.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/luarabbit/0.9-103/luarabbit/Windows/x64/-luarabbit.dll"
}
},
luars232 = {
["1.0.3-3"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/luars232.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/luars232/1.0.3-303/luars232/OSX/x86/-luars232.so"
}
},
luasocket = {
["2.0.2-6"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/socket/unix.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/luasocket/2.0.2-603/socket/OSX/x86/-socket_unix.so"
},
["3.0rc1-2"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/socket/serial.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/luasocket/3.0rc1-203/socket/OSX/x86/-socket_serial.so"
}
},
luasystem = {
["0.2.1-0"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/system/core.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/luasystem/0.2.1-3/system/Windows/x86/-system_core.dll"
}
},
luatexts = {
["0.1.5-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/luatexts.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/luatexts/0.1.5-103/luatexts/OSX/x86/-luatexts.so"
}
},
luautf8 = {
["0.1.1-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/lua-utf8.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/luautf8/0.1.1-103/lua-utf8/OSX/x86/-lua-utf8.so"
}
},
luaxml = {
["101012-2"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/LuaXML_lib.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/luaxml/101012-203/LuaXML_lib/OSX/x86/-LuaXML_lib.so"
}
},
luq = {
["0.1.2-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/luq.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/luq/0.1.2-103/luq/OSX/x86/-luq.so"
}
},
matchext = {
["0.3.1-1"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/matchext.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/matchext/0.3.1-103/matchext/Windows/x64/-matchext.dll"
}
},
mixlua = {
["0.2.7-2"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/mixlua.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/mixlua/0.2.7-203/mixlua/OSX/x86/-mixlua.so"
}
},
murmurhash3 = {
["1.3-0"] = {
current_os = "Windows",
from = "C:/ste/x86/luarockstree/lib/lua/5.1/murmurhash3.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/murmurhash3/1.3-3/murmurhash3/Windows/x86/-murmurhash3.dll"
}
},
native = {
["0.1.0-1"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/native.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/native/0.1.0-103/native/Windows/x64/-native.dll"
}
},
["nginx-resumable-upload"] = {
["0.0.1-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/luarocks/rocks/nginx-resumable-upload/0.0.1-1/doc/README.md",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/nginx-resumable-upload/0.0.1-103/shuaicj/__doc/README.md"
}
},
nosigpipe = {
["0.1.0-1"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/nosigpipe.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/nosigpipe/0.1.0-103/nosigpipe/Windows/x64/-nosigpipe.dll"
}
},
null = {
["0.1.0-1"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/null.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/null/0.1.0-103/null/Windows/x64/-null.dll"
}
},
["org.conman.cbor"] = {
["1.2.12-1"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/org/conman/cbor_c.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/org.conman.cbor/1.2.12-103/org/Windows/x64/-org_conman_cbor_c.dll"
}
},
["org.conman.env"] = {
["1.0.2-2"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/org/conman/env.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/org.conman.env/1.0.2-203/org/Windows/x64/-org_conman_env.dll"
}
},
["org.conman.errno"] = {
["1.0.2-1"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/org/conman/errno.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/org.conman.errno/1.0.2-103/org/Windows/x64/-org_conman_errno.dll"
}
},
osc = {
["1.0.1-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/osc/core.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/osc/1.0.1-103/osc/OSX/x86/-osc_core.so"
}
},
["oxd-web-lua"] = {
["1.0-0"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/share/lua/5.1/oxdweb.lua",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/oxd-web-lua/1.0-3/oxdweb/init.lua"
}
},
pdh = {
["0.1.3-1"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/pdh/core.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/pdh/0.1.3-103/pdh/Windows/x64/-pdh_core.dll"
}
},
ref = {
["0.1.0-1"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/ref.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/ref/0.1.0-103/ref/Windows/x64/-ref.dll"
}
},
rings = {
["1.3.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/rings.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/rings/1.3.0-103/rings/OSX/x86/-rings.so"
}
},
rmrf = {
["0.1.0-3"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/rmrf.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/rmrf/0.1.0-303/rmrf/Windows/x64/-rmrf.dll"
}
},
rockspec2cmake = {
["0.3-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/share/lua/5.1/rockspec2cmake/CMakeBuilder.lua",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/rockspec2cmake/0.3-103/rockspec2cmake/CMakeBuilder.lua"
}
},
sha2 = {
["0.2.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/sha2.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/sha2/0.2.0-103/sha2/OSX/x86/-sha2.so"
}
},
simulua = {
["0.1-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/rng.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/simulua/0.1-103/rng/OSX/x86/-rng.so"
}
},
sleep = {
["1.0.0-4"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/sleep.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/sleep/1.0.0-403/sleep/Windows/x64/-sleep.dll"
}
},
slncrypto = {
["1.1-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/crypto.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/slncrypto/1.1-103/crypto/OSX/x86/-crypto.so"
}
},
slnunicode = {
["1.1-2"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/unicode.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/slnunicode/1.1-203/unicode/OSX/x86/-unicode.so"
}
},
snowflake = {
["1.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/snowflake.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/snowflake/1.0-103/snowflake/OSX/x86/-snowflake.so"
}
},
stringdistance = {
["1.1.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/stringdistance.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/stringdistance/1.1.0-103/stringdistance/OSX/x86/-stringdistance.so"
}
},
struct = {
["1.4-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/struct.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/struct/1.4-103/struct/OSX/x86/-struct.so"
}
},
tdb = {
["1.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/tdb.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/tdb/1.0-103/tdb/OSX/x86/-tdb.so"
}
},
template = {
["0.2-3"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/luarocks/rocks/template/0.2-3/doc/README.md",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/template/0.2-303/template/__doc/README.md"
}
},
tointeger = {
["0.1.0-1"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/tointeger/implc.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/tointeger/0.1.0-103/tointeger/Windows/x64/-tointeger_implc.dll"
}
},
urlencode = {
["0.0.1-0"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/urlencode.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/urlencode/0.0.1-3/urlencode/Windows/x64/-urlencode.dll"
}
},
utf8 = {
["1.2-0"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/utf8.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/utf8/1.2-3/utf8/Windows/x64/-utf8.dll"
}
},
vararg = {
["1.2-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/vararg.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/vararg/1.2-103/vararg/OSX/x86/-vararg.so"
}
},
void = {
["1.0-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/void.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/void/1.0-103/void/OSX/x86/-void.so"
}
},
winapi = {
["1.4.2-1"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/winapi.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/winapi/1.4.2-103/winapi/Windows/x64/-winapi.dll"
}
},
winreg = {
["1.0.0-1"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/winreg.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/winreg/1.0.0-103/winreg/Windows/x64/-winreg.dll"
}
},
xml = {
["1.1.3-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/xml/core.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/xml/1.1.3-103/xml/OSX/x86/-xml_core.so"
}
},
xxtea = {
["1.0.1-1"] = {
current_os = "Windows",
from = "C:/ste/x64/luarockstree/lib/lua/5.1/xxtea.dll",
to = "Z:/sp/Dropbox/Prj/upkg/luarocksorg/package/xxtea/1.0.1-103/xxtea/Windows/x64/-xxtea.dll"
}
},
yaml = {
["1.1.2-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/yaml/core.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/yaml/1.1.2-103/yaml/OSX/x86/-yaml_core.so"
}
}
},
module_conflict = {
["ab-microsensor"] = {
["0.1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.1.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["amqp-client"] = {
["1.3.0-1"] = {
module_name = "amqp",
rock_name = "amqp",
rock_version = "1.1-1"
}
},
["api-gateway-request-validation"] = {
["1.3.12-1"] = {
module_name = "api-gateway",
rock_name = "lua-api-gateway-hmac",
rock_version = "1.0.0-0"
}
},
array = {
["1.0.0-0"] = {
module_name = "array",
rock_name = "densearrays",
rock_version = "1.0-2"
},
["1.0.1-0"] = {
module_name = "array",
rock_name = "densearrays",
rock_version = "1.0-2"
},
["1.2.1-0"] = {
module_name = "array",
rock_name = "densearrays",
rock_version = "1.0-2"
},
["1.2.2-0"] = {
module_name = "array",
rock_name = "densearrays",
rock_version = "1.0-2"
},
["1.2.4-0"] = {
module_name = "array",
rock_name = "densearrays",
rock_version = "1.0-2"
},
["1.2.5-0"] = {
module_name = "array",
rock_name = "densearrays",
rock_version = "1.0-2"
}
},
autoblock = {
["0.1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["bcrypt-ffi"] = {
["1.0.0-0"] = {
module_name = "bcrypt",
rock_name = "bcrypt",
rock_version = "2.1-1"
}
},
["benchmark-ips"] = {
["0.0.1-0"] = {
module_name = "benchmark",
rock_name = "luabenchmark",
rock_version = "0.10.0-1"
}
},
["bgcrypto-aes"] = {
["0.1.0-1"] = {
module_name = "bgcrypto",
rock_name = "fly-bgcrypto-pbkdf2",
rock_version = "0.0.1-1"
}
},
["bgcrypto-hmac"] = {
["0.1.0-1"] = {
module_name = "bgcrypto",
rock_name = "fly-bgcrypto-pbkdf2",
rock_version = "0.0.1-1"
}
},
["bgcrypto-pbkdf2"] = {
["0.1.0-1"] = {
module_name = "bgcrypto",
rock_name = "fly-bgcrypto-pbkdf2",
rock_version = "0.0.1-1"
}
},
["bgcrypto-sha"] = {
["0.1.0-1"] = {
module_name = "bgcrypto",
rock_name = "fly-bgcrypto-pbkdf2",
rock_version = "0.0.1-1"
}
},
["busted.ryanplusplus"] = {
["2.0-0"] = {
module_name = "busted",
rock_name = "busted",
rock_version = "2.0.rc11-0"
}
},
["cache-protocols"] = {
["0.1.0-2"] = {
module_name = "scope",
rock_name = "luascope",
rock_version = "0.01-1"
}
},
collections = {
["1.0.0-5"] = {
module_name = "collection",
rock_name = "lualand",
rock_version = "0.0-1"
}
},
["copas-async"] = {
["0.1-1"] = {
module_name = "copas",
rock_name = "copas",
rock_version = "2.0.1-1"
},
["0.2-1"] = {
module_name = "copas",
rock_name = "copas",
rock_version = "2.0.1-1"
},
["0.3-1"] = {
module_name = "copas",
rock_name = "copas",
rock_version = "2.0.1-1"
}
},
copastimer = {
["0.4.3-1"] = {
module_name = "copas",
rock_name = "copas",
rock_version = "2.0.1-1"
},
["1.0.0-1"] = {
module_name = "copas",
rock_name = "copas",
rock_version = "2.0.1-1"
}
},
["ctrl-oidc-transformer"] = {
["0.1.0-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["endel-struct"] = {
["1.0.0-1"] = {
module_name = "struct",
rock_name = "struct",
rock_version = "1.4-1"
}
},
["external-auth"] = {
["0.1-2"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["external-oauth"] = {
["1.1-5"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["external-oauth2"] = {
["1.1-5"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["external-oauth3"] = {
["1.1-5"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["f.lua"] = {
["1.5-1"] = {
module_name = "f",
rock_name = "f-strings",
rock_version = "0.1-1"
},
["1.6-0"] = {
module_name = "f",
rock_name = "f-strings",
rock_version = "0.1-1"
}
},
["fly-bgcrypto-sha"] = {
["0.0.1-1"] = {
module_name = "bgcrypto",
rock_name = "fly-bgcrypto-pbkdf2",
rock_version = "0.0.1-1"
}
},
["fork3-sc-lua-resty-auto-ssl"] = {
["0.12.0-1"] = {
module_name = "resty",
rock_name = "lua-resty-beanstalkd",
rock_version = "0.0-5"
}
},
fun = {
["0.1.3-1"] = {
module_name = "fun",
rock_name = "fun-alloyed",
rock_version = "0.1-1"
}
},
["gluu-oauth2-client-auth"] = {
["1.0-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["gluu-oauth2-rs"] = {
["1.0-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["gobo-awesome-alttab"] = {
["0.1-1"] = {
module_name = "gobo",
rock_name = "gobo-awesome",
rock_version = "0.1-1"
},
["0.2-1"] = {
module_name = "gobo",
rock_name = "gobo-awesome",
rock_version = "0.1-1"
}
},
["gobo-awesome-battery"] = {
["0.1-1"] = {
module_name = "gobo",
rock_name = "gobo-awesome",
rock_version = "0.1-1"
},
["0.2-1"] = {
module_name = "gobo",
rock_name = "gobo-awesome",
rock_version = "0.1-1"
}
},
["gobo-awesome-gobonet"] = {
["0.1-1"] = {
module_name = "gobo",
rock_name = "gobo-awesome",
rock_version = "0.1-1"
},
["0.2-1"] = {
module_name = "gobo",
rock_name = "gobo-awesome",
rock_version = "0.1-1"
},
["0.3-1"] = {
module_name = "gobo",
rock_name = "gobo-awesome",
rock_version = "0.1-1"
},
["0.4-1"] = {
module_name = "gobo",
rock_name = "gobo-awesome",
rock_version = "0.1-1"
}
},
["gobo-awesome-light"] = {
["0.1-1"] = {
module_name = "gobo",
rock_name = "gobo-awesome",
rock_version = "0.1-1"
}
},
["gobo-awesome-sound"] = {
["0.1-1"] = {
module_name = "gobo",
rock_name = "gobo-awesome",
rock_version = "0.1-1"
},
["0.2-1"] = {
module_name = "gobo",
rock_name = "gobo-awesome",
rock_version = "0.1-1"
}
},
["gonapps-url-decoder"] = {
["1.1-2"] = {
module_name = "gonapps",
rock_name = "gonapps-cookie",
rock_version = "1.1-1"
},
["1.1-3"] = {
module_name = "gonapps",
rock_name = "gonapps-cookie",
rock_version = "1.1-2"
},
["1.1-4"] = {
module_name = "gonapps",
rock_name = "gonapps-cookie",
rock_version = "1.1-1"
}
},
["gonapps-url-encoder"] = {
["1.0-1"] = {
module_name = "gonapps",
rock_name = "gonapps-cookie",
rock_version = "1.1-1"
},
["1.0-2"] = {
module_name = "gonapps",
rock_name = "gonapps-cookie",
rock_version = "1.1-2"
},
["1.0-3"] = {
module_name = "gonapps",
rock_name = "gonapps-cookie",
rock_version = "1.1-1"
}
},
["gwa-kong-endpoint"] = {
["1.2.3-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.2.3-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.3.2-3"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
harpseal = {
["1.0.4-1"] = {
module_name = "lib",
rock_name = "tundrawolf",
rock_version = "1.0.4-1"
}
},
["header-transfer"] = {
["0.0.1-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.2-0"
},
["0.0.2-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.2-0"
}
},
["hotswap-http"] = {
["1.2-4"] = {
module_name = "hotswap",
rock_name = "hotswap",
rock_version = "1.1-1"
}
},
["hotswap-lfs"] = {
["1.2-1"] = {
module_name = "hotswap",
rock_name = "hotswap",
rock_version = "1.1-1"
}
},
["json-lua"] = {
["0.1-3"] = {
module_name = "JSON",
rock_name = "luajson",
rock_version = "1.3.3-1"
}
},
json4lua = {
["0.9.30-1"] = {
module_name = "json",
rock_name = "luajson",
rock_version = "1.3.3-1"
}
},
keyauthvaluepass = {
["1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.6-0"
},
["1.5-4"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.6-0"
}
},
["keycloak-rbac"] = {
["1.1.0-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-aliyun-http-filter"] = {
["0.0.2-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-auth-request"] = {
["0.1.7-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-auth-signature"] = {
["0.1.0-3"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-auto-https"] = {
["0.0.1-7"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-cassandra"] = {
["0.5-8"] = {
module_name = "cassandra",
rock_name = "cassandra",
rock_version = "0.5-7"
}
},
["kong-cluster-drain"] = {
["0.1-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-consumer-rate-limiting"] = {
["1.0.0-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-consumer-route"] = {
["1.0.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-dynamic-upstream"] = {
["0.1.2-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-enhanced-oidc"] = {
["1.0.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-error-log"] = {
["0.1-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-external-oauth"] = {
["1.1-6"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.1-7"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.1-9"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.1-17"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.2-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.2-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.2-2"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.2-5"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-file-log-exclusion"] = {
["0.0.3-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-force-https"] = {
["0.1.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-force-ssl"] = {
["1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-forwarded-user-auth"] = {
["0.1.0-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-header-access-control"] = {
["1.0.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-http-to-https"] = {
["0.1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.0.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-http-to-https-redirect"] = {
["0.13.1-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-https-redirect"] = {
["0.0.1-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-influxdb"] = {
["1.0.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-oidc"] = {
["1.0.4-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.1.0-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-oidc-adfs"] = {
["0.1-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.3-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-oidc-auth"] = {
["0.1-2"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.2-2"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-oidc-auth-akshay"] = {
["0.1-3"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-oidc-consumer"] = {
["0.0.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-path-based-routing"] = {
["0.1-3"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-payload-size-limiting"] = {
["0.0.0-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.6-0"
}
},
["kong-plugin-abac"] = {
["0.0.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.0.5-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.0.8-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-aws-kinesis"] = {
["0.1.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-aws-lambda-response-transformer"] = {
["0.1.6-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-aws-lambda-status-code"] = {
["0.1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-azure-functions"] = {
["0.1.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.3.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.4.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-cookies-to-headers"] = {
["1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.0-2"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-datadog-tags"] = {
["0.2.3-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-debug"] = {
["0.1.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.1.3-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-deviceuid"] = {
["0.2.4-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-extend-headers"] = {
["0.1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-gwa-ip-anonymity"] = {
["1.0.7-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.1.1-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.1.6-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-hal"] = {
["1.0-3"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.3-0"
},
["1.0-4"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.6-0"
},
["1.0-5"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.0-6"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.0-7"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-hello"] = {
["0.1.1-2"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-hello-world"] = {
["0.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.6-0"
}
},
["kong-plugin-http-log-with-body"] = {
["0.1.1-2"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-json-threat-protection"] = {
["1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.2-0"
},
["1.0-2"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.3-0"
},
["1.0-3"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-jwt-auth"] = {
["0.1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-jwt-auth-token-validate"] = {
["1.0-2"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-jwt-claims-to-headers"] = {
["0.2.0-6"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.3.1-6"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.0.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-jwt-claims-validate"] = {
["1.1-4"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-jwt-crafter"] = {
["1.0-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-jwt-crafter-for-ee"] = {
["1.1-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-jwt-fetcher"] = {
["0.1.2-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-jwt-keycloak"] = {
["1.0.3-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-kafka-log"] = {
["0.0.1-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-key-auth-referer"] = {
["2.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-key-secret"] = {
["0.1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-kubernetes-sidecar-injector"] = {
["0.2.1-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-mithril"] = {
["0.1.11-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.1.12-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.1.13-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.1.14-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.5.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-moocherio"] = {
["0.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-myplugin"] = {
["0.1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-myredirect"] = {
["0.1-6"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-newrelic-insights"] = {
["0.6-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-oidc-acl"] = {
["1.0-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-openwhisk"] = {
["0.1.1-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.1.2-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-param-transformer"] = {
["0.1.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-pipeline"] = {
["0.1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.2.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-prometheus"] = {
["0.1.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-proxy-cache"] = {
["2.0.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-proxycache"] = {
["0.1.2-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-queryparams-to-headers"] = {
["1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-ram"] = {
["0.1-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-rbac"] = {
["0.3.6-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-referer"] = {
["1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.1-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-replace-url"] = {
["0.1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.2.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.3.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-request-transformer"] = {
["1.2.2-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-resource-transformer"] = {
["0.0.6-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-response-transformer-tobase64"] = {
["1.0-5"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-rewrite"] = {
["0.1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.2.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.2.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.2.2-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.3.2-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-rule-based-header-transformer"] = {
["0.1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-serverless-functions"] = {
["0.1.0-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.2.0-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.3.0-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-session"] = {
["0.1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.1.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["2.1.2-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-shepherd"] = {
["0.5.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-signalfx"] = {
["0.0.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.0.2-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-stdout-log"] = {
["0.0.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.0.2-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-td-kong-plugin"] = {
["0.1-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-template-transformer"] = {
["0.8.0-2"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.9.0-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.12.2-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-token-agent"] = {
["0.1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-universal-jwt"] = {
["1.0.3-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.0.4-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-upstream-auth-basic"] = {
["1.0.0-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.0.1-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-upstream-basic-auth"] = {
["0.1.0-3"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.1.0-5"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.2.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-upstream-environment"] = {
["0.1.3-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-url-replace"] = {
["0.1.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-url-rewrite"] = {
["0.3.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.4.0-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-wsse"] = {
["0.1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.2.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.3.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.4.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-plugin-xml-threat-protection"] = {
["1.0-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.3-0"
}
},
["kong-prometheus-plugin"] = {
["0.1.0-2"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.3.4-2"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.4.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-proxy-cache-plugin"] = {
["1.2.2-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-redis-cluster"] = {
["1.1-0"] = {
module_name = "resty",
rock_name = "lua-resty-beanstalkd",
rock_version = "0.0-5"
}
},
["kong-request-header"] = {
["0.0.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-response-log"] = {
["0.0.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-response-size-limiting"] = {
["0.1-3"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.2-3"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-segment-log"] = {
["1.2.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-service-virtualization"] = {
["0.1-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.2-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-signature-and-remove-attr"] = {
["0.1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-spec-expose"] = {
["0.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.2-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-splunk-log"] = {
["0.1-2"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.1-9"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.2-9"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.3-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-timechecking"] = {
["0.1.0-4"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-uma-rs"] = {
["1.0-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-upstream-hmac"] = {
["0.0.1-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.0.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.0.1-2"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.0.1-3"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-upstream-jwt"] = {
["0.2-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.3-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.3-4"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.3-6"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.4-4"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.5-4"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["0.7-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["kong-user-agent-based-routing"] = {
["0.1-0"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
latclient = {
["0.4-1"] = {
module_name = "lib",
rock_name = "tundrawolf",
rock_version = "1.0.4-1"
}
},
["linenoise-windows"] = {
["0.5-2"] = {
module_name = "linenoise",
rock_name = "linenoise",
rock_version = "0.8-1"
}
},
ljlinenoise = {
["0.1.2-1"] = {
module_name = "linenoise",
rock_name = "linenoise",
rock_version = "0.8-1"
},
["0.1.3-1"] = {
module_name = "linenoise",
rock_name = "linenoise",
rock_version = "0.8-1"
},
["0.1.3-2"] = {
module_name = "linenoise",
rock_name = "linenoise",
rock_version = "0.8-1"
}
},
logger = {
["1.0.0-1"] = {
module_name = "logger",
rock_name = "lua-logger",
rock_version = "0.1-6"
}
},
["lua-api-gateway-aws"] = {
["1.7.1-0"] = {
module_name = "api-gateway",
rock_name = "lua-api-gateway-hmac",
rock_version = "1.0.0-0"
}
},
["lua-api-gateway-cachemanager"] = {
["1.0.1-1"] = {
module_name = "api-gateway",
rock_name = "lua-api-gateway-hmac",
rock_version = "1.0.0-0"
}
},
["lua-capnproto"] = {
["0.1.2-1"] = {
module_name = "test",
rock_name = "csv",
rock_version = "1-1"
},
["0.1.3-1"] = {
module_name = "test",
rock_name = "csv",
rock_version = "1-1"
},
["0.1.4-5"] = {
module_name = "test",
rock_name = "csv",
rock_version = "1-1"
}
},
["lua-cassandra"] = {
["0.3.1-0"] = {
module_name = "cassandra",
rock_name = "cassandra",
rock_version = "0.5-7"
},
["0.3.5-0"] = {
module_name = "cassandra",
rock_name = "cassandra",
rock_version = "0.5-7"
},
["0.3.6-0"] = {
module_name = "cassandra",
rock_name = "cassandra",
rock_version = "0.5-7"
}
},
["lua-cjson"] = {
["2.1.0-1"] = {
module_name = "json2lua",
rock_name = "json2lua",
rock_version = "0.3.3-1"
},
["2.1.0.6-1"] = {
module_name = "lua2json",
rock_name = "lua2json",
rock_version = "0.1.1-1"
}
},
["lua-cjson-ol"] = {
["1.0-1"] = {
module_name = "lua2json",
rock_name = "lua2json",
rock_version = "0.1.1-1"
}
},
["lua-codegen-lpeg"] = {
["0.3.1-1"] = {
module_name = "CodeGen",
rock_name = "lua-codegen",
rock_version = "0.3.1-1"
}
},
["lua-conciseserialization"] = {
["0.1.1-1"] = {
module_name = "CBOR",
rock_name = "lua-cbor",
rock_version = "0.2-1"
},
["0.2.0-1"] = {
module_name = "CBOR",
rock_name = "lua-cbor",
rock_version = "0.2-1"
},
["0.2.1-1"] = {
module_name = "CBOR",
rock_name = "lua-cbor",
rock_version = "0.2-1"
},
["0.2.1-2"] = {
module_name = "CBOR",
rock_name = "lua-cbor",
rock_version = "0.2-1"
},
["0.2.2-1"] = {
module_name = "CBOR",
rock_name = "lua-cbor",
rock_version = "0.2-1"
}
},
["lua-erento-hmac"] = {
["1.0-0"] = {
module_name = "resty",
rock_name = "lua-resty-scrypt",
rock_version = "1.0-1"
}
},
["lua-hiredis-cluster"] = {
["1.0-2"] = {
module_name = "hiredis",
rock_name = "lua-hiredis",
rock_version = "0.2.1-1"
}
},
["lua-hiredis-with-5.2-fix"] = {
["0.2.2-1"] = {
module_name = "hiredis",
rock_name = "lua-hiredis",
rock_version = "0.2.1-1"
}
},
["lua-i18n"] = {
["1.0.0-1"] = {
module_name = "i18n",
rock_name = "i18n",
rock_version = "0.9.2-1"
}
},
["lua-json"] = {
["0.1.3-1"] = {
module_name = "json",
rock_name = "luajson",
rock_version = "1.3.4-1"
}
},
["lua-livr-extra"] = {
["0.1.0-1"] = {
module_name = "LIVR",
rock_name = "lua-livr",
rock_version = "0.1.0-1"
},
["0.1.0-2"] = {
module_name = "LIVR",
rock_name = "lua-livr",
rock_version = "0.1.0-1"
},
["0.1.1-1"] = {
module_name = "LIVR",
rock_name = "lua-livr",
rock_version = "0.1.0-1"
}
},
["lua-llthreads2-compat"] = {
["0.1.3-1"] = {
module_name = "llthreads",
rock_name = "lua-llthreads",
rock_version = "1.2-1"
},
["0.1.4-1"] = {
module_name = "llthreads",
rock_name = "lua-llthreads",
rock_version = "1.2-1"
},
["0.1.5-1"] = {
module_name = "llthreads",
rock_name = "lua-llthreads",
rock_version = "1.2-1"
}
},
["lua-multipart-parser"] = {
["0.1.1-0"] = {
module_name = "multipart",
rock_name = "multipart",
rock_version = "0.5-1"
}
},
["lua-path"] = {
["0.2.3-1"] = {
module_name = "path",
rock_name = "lpath",
rock_version = "0.1.0-1"
},
["0.2.4-1"] = {
module_name = "path",
rock_name = "lpath",
rock_version = "0.1.0-1"
},
["0.3.0-1"] = {
module_name = "path",
rock_name = "lpath",
rock_version = "0.1.0-1"
},
["0.3.0-2"] = {
module_name = "path",
rock_name = "lpath",
rock_version = "0.1.0-1"
},
["0.3.1-1"] = {
module_name = "path",
rock_name = "lpath",
rock_version = "0.1.0-1"
}
},
["lua-resty-cors"] = {
["0.2-1"] = {
module_name = "lib",
rock_name = "tundrawolf",
rock_version = "1.0.4-1"
}
},
["lua-resty-dogstatsd-jb"] = {
["1.0.1-1"] = {
module_name = "resty_dogstatsd",
rock_name = "lua-resty-dogstatsd",
rock_version = "1.0.1-1"
}
},
["lua-resty-murmurhash3"] = {
["1.0.0-0"] = {
module_name = "murmurhash3",
rock_name = "murmurhash3",
rock_version = "1.3-0"
},
["1.0.1-0"] = {
module_name = "murmurhash3",
rock_name = "murmurhash3",
rock_version = "1.3-0"
}
},
["lua-resty-repl"] = {
["0.0.1-0"] = {
module_name = "inspect",
rock_name = "inspect",
rock_version = "3.0-3"
},
["0.0.4-0"] = {
module_name = "inspect",
rock_name = "inspect",
rock_version = "3.0-3"
},
["0.0.4-1"] = {
module_name = "inspect",
rock_name = "inspect",
rock_version = "3.0-3"
},
["0.0.5-1"] = {
module_name = "inspect",
rock_name = "inspect",
rock_version = "3.0-3"
},
["0.0.6-0"] = {
module_name = "inspect",
rock_name = "inspect",
rock_version = "3.0-3"
}
},
["lua-struct"] = {
["0.9.0-1"] = {
module_name = "struct",
rock_name = "struct",
rock_version = "1.4-1"
},
["1.0.0-1"] = {
module_name = "struct",
rock_name = "struct",
rock_version = "1.4-1"
}
},
["lua-testclass"] = {
["0.01-1"] = {
module_name = "File",
rock_name = "alfons",
rock_version = "2.3.1-1"
}
},
["lua-testmore"] = {
["0.3.2-1"] = {
module_name = "Test",
rock_name = "csv",
rock_version = "1-1"
},
["0.3.3-1"] = {
module_name = "Test",
rock_name = "csv",
rock_version = "1-1"
},
["0.3.4-1"] = {
module_name = "Test",
rock_name = "csv",
rock_version = "1-1"
},
["0.3.5-2"] = {
module_name = "Test",
rock_name = "csv",
rock_version = "1-1"
}
},
["lua-tinycdb"] = {
["0.2-1"] = {
module_name = "cdb",
rock_name = "cdb",
rock_version = "1.0-1"
}
},
["lua-utils"] = {
["1.0.0-0"] = {
module_name = "utils",
rock_name = "vert",
rock_version = "0.0.3-2"
}
},
["lua-xxtea"] = {
["0.1.2-1"] = {
module_name = "xxtea",
rock_name = "xxtea",
rock_version = "1.0.1-1"
}
},
["lua-yaml"] = {
["1.2-1"] = {
module_name = "yaml",
rock_name = "yaml",
rock_version = "1.1.2-1"
}
},
lua_json = {
["1.1.0-1"] = {
module_name = "json",
rock_name = "luajson",
rock_version = "1.3.3-1"
}
},
luabc = {
["1.1-1"] = {
module_name = "bc",
rock_name = "lbc",
rock_version = "20120430-1"
},
["1.2-1"] = {
module_name = "bc",
rock_name = "lbc",
rock_version = "20180729-1"
}
},
["luacov-cobertura"] = {
["0.2-1"] = {
module_name = "luacov",
rock_name = "luacov",
rock_version = "0.9-1"
}
},
["luacov-console"] = {
["1.0-3"] = {
module_name = "luacov",
rock_name = "luacov",
rock_version = "0.9-1"
},
["1.1.0-1"] = {
module_name = "luacov",
rock_name = "luacov",
rock_version = "0.9-1"
}
},
["luacov-multiple"] = {
["0.1-1"] = {
module_name = "luacov",
rock_name = "luacov",
rock_version = "0.9-1"
},
["0.2-1"] = {
module_name = "luacov",
rock_name = "luacov",
rock_version = "0.9-1"
}
},
["luacov-reporter-lcov"] = {
["0.1-0"] = {
module_name = "luacov",
rock_name = "luacov",
rock_version = "0.9-1"
}
},
luadate = {
["2.0.1-2"] = {
module_name = "date",
rock_name = "date",
rock_version = "2.1.1-1"
}
},
luadocumentor = {
["0.1.5-1"] = {
module_name = "template",
rock_name = "template",
rock_version = "0.1-2"
}
},
luafft = {
["1.1-1"] = {
module_name = "complex",
rock_name = "lcomplex",
rock_version = "20120430-1"
}
},
["luafilesystem-ffi"] = {
["0.1.0-1"] = {
module_name = "lfs",
rock_name = "luafilesystem",
rock_version = "1.6.3-2"
}
},
luafp = {
["1.5-20"] = {
module_name = "luafp",
rock_name = "lua-fp",
rock_version = "1.5-18"
}
},
["luaish-windows"] = {
["0.1-2"] = {
module_name = "config",
rock_name = "config",
rock_version = "1.0.0-1"
}
},
["luajit-brotli"] = {
["0.2.0-1"] = {
module_name = "brotli",
rock_name = "lua-brotli",
rock_version = "1.0-2"
}
},
luakiwis = {
["1.0-1"] = {
module_name = "helloworld",
rock_name = "helloworld",
rock_version = "1.0-1"
}
},
luarocks = {
["2.2.2-1"] = {
module_name = "luarocks",
rock_name = "luarocks-fetch-gitrec",
rock_version = "0.2-1"
},
["2.3.0-1"] = {
module_name = "luarocks",
rock_name = "luarocks-fetch-gitrec",
rock_version = "0.2-1"
},
["2.4.0-1"] = {
module_name = "luarocks",
rock_name = "luarocks-fetch-gitrec",
rock_version = "0.2-1"
},
["2.4.2-1"] = {
module_name = "luarocks",
rock_name = "luarocks-fetch-gitrec",
rock_version = "0.2-1"
},
["2.4.3-1"] = {
module_name = "luarocks",
rock_name = "luarocks-fetch-gitrec",
rock_version = "0.2-1"
},
["2.4.4-1"] = {
module_name = "luarocks",
rock_name = "luarocks-fetch-gitrec",
rock_version = "0.2-1"
}
},
["luarocks-build-cpp"] = {
["0.1-1"] = {
module_name = "luarocks",
rock_name = "luarocks-fetch-gitrec",
rock_version = "0.2-1"
},
["0.2.0-1"] = {
module_name = "luarocks",
rock_name = "luarocks-fetch-gitrec",
rock_version = "0.2-1"
}
},
["luasocket-unix"] = {
["2.0.2-2"] = {
module_name = "socket",
rock_name = "luasocket",
rock_version = "2.0.2-6"
}
},
luastruct = {
["1.0-1"] = {
module_name = "struct",
rock_name = "struct",
rock_version = "1.4-1"
},
["1.1-1"] = {
module_name = "struct",
rock_name = "struct",
rock_version = "1.4-1"
}
},
luasyslog = {
["1.0.0-2"] = {
module_name = "logging",
rock_name = "lualogging",
rock_version = "1.3.0-1"
}
},
["lunary-optim"] = {
["20121212-1"] = {
module_name = "serial",
rock_name = "lunary-core",
rock_version = "20121212-1"
}
},
lunitx = {
["0.8-0"] = {
module_name = "lunit",
rock_name = "lunit",
rock_version = "0.5-2"
},
["0.8-1"] = {
module_name = "lunit",
rock_name = "lunit",
rock_version = "0.5-2"
}
},
["lzmq-ffi"] = {
["0.4.3-1"] = {
module_name = "lzmq",
rock_name = "lzmq-auth",
rock_version = "0.1.0-2"
},
["0.4.4-1"] = {
module_name = "lzmq",
rock_name = "lzmq-auth",
rock_version = "0.1.0-2"
}
},
["lzmq-pool"] = {
["0.1.0-2"] = {
module_name = "lzmq",
rock_name = "lzmq-auth",
rock_version = "0.1.0-2"
}
},
["lzmq-timer"] = {
["0.4.2-1"] = {
module_name = "lzmq",
rock_name = "lzmq-auth",
rock_version = "0.1.0-2"
}
},
magick = {
["1.1.0-1"] = {
module_name = "magick",
rock_name = "gomaxmagick",
rock_version = "0.1.3-1"
},
["1.2.0-1"] = {
module_name = "magick",
rock_name = "gomaxmagick",
rock_version = "0.1.3-1"
},
["1.2.1-1"] = {
module_name = "magick",
rock_name = "gomaxmagick",
rock_version = "0.1.3-1"
},
["1.3.0-1"] = {
module_name = "magick",
rock_name = "gomaxmagick",
rock_version = "0.1.3-1"
},
["1.5.0-1"] = {
module_name = "magick",
rock_name = "gomaxmagick",
rock_version = "0.1.3-1"
}
},
["math-rungekutta"] = {
["1.08-0"] = {
module_name = "Math",
rock_name = "math-evol",
rock_version = "1.13-0"
}
},
["math-walshtransform"] = {
["1.18-0"] = {
module_name = "Math",
rock_name = "math-evol",
rock_version = "1.13-0"
}
},
md = {
["0.0-1"] = {
module_name = "tiny",
rock_name = "tiny-ecs",
rock_version = "1.3-1"
}
},
["middleclass-mixin-singleton"] = {
["0.01-1"] = {
module_name = "middleclass",
rock_name = "middleclass",
rock_version = "4.1-0"
}
},
middleware = {
["0.0.5-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.0.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.0.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.0.2-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.0.3-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.0.4-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.0.5-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.0.6-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.0.7-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
},
["1.0.8-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
mmapfile = {
["1-1"] = {
module_name = "test",
rock_name = "csv",
rock_version = "1-1"
}
},
myplugin = {
["1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["nodemcu-logging"] = {
["0.0.3-1"] = {
module_name = "logging",
rock_name = "lualogging",
rock_version = "1.3.0-1"
}
},
nodemculuamocks = {
["1.0-5"] = {
module_name = "net",
rock_name = "net-url",
rock_version = "0.9-1"
}
},
notification = {
["1.0-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["oauth-token-validate"] = {
["1.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
oil = {
["0.5-2"] = {
module_name = "socket",
rock_name = "luasocket",
rock_version = "2.0.2-6"
}
},
["open-tiny-util"] = {
["0.1-1"] = {
module_name = "tiny",
rock_name = "tiny-ecs",
rock_version = "1.3-3"
}
},
["org.conman.syslog"] = {
["2.1.3-3"] = {
module_name = "getopt",
rock_name = "getopt",
rock_version = "1.0.0-1"
}
},
["parser-gen"] = {
["1.2-0"] = {
module_name = "stack",
rock_name = "simulua",
rock_version = "0.1-1"
}
},
path = {
["1.0.5-1"] = {
module_name = "path",
rock_name = "lpath",
rock_version = "0.1.0-1"
},
["1.1.0-1"] = {
module_name = "path",
rock_name = "lpath",
rock_version = "0.1.0-1"
}
},
pbc = {
["0.1.0-1"] = {
module_name = "protobuf",
rock_name = "protobuf",
rock_version = "1.1.0-0"
}
},
["percent-f-strings"] = {
["0.3-2"] = {
module_name = "F",
rock_name = "f-strings",
rock_version = "0.1-1"
}
},
["promise-es6"] = {
["1.1.0-1"] = {
module_name = "Promise",
rock_name = "promise",
rock_version = "0.1-0"
},
["1.2.0-1"] = {
module_name = "Promise",
rock_name = "promise",
rock_version = "0.1-0"
}
},
["promise-lua"] = {
["0.4.0-1"] = {
module_name = "promise",
rock_name = "promise",
rock_version = "0.1-0"
}
},
["prtr-dump"] = {
["20121212-1"] = {
module_name = "serial",
rock_name = "lunary-core",
rock_version = "20121212-1"
},
["20161017-1"] = {
module_name = "serial",
rock_name = "lunary-core",
rock_version = "20181002-1"
}
},
["prtr-path"] = {
["20121212-1"] = {
module_name = "serial",
rock_name = "lunary-core",
rock_version = "20121212-1"
},
["20180201-1"] = {
module_name = "serial",
rock_name = "lunary-core",
rock_version = "20181002-1"
}
},
["prtr-test"] = {
["20121212-1"] = {
module_name = "serial",
rock_name = "lunary-core",
rock_version = "20121212-1"
},
["20151116-1"] = {
module_name = "serial",
rock_name = "lunary-core",
rock_version = "20181002-1"
}
},
random = {
["1.1-0"] = {
module_name = "random",
rock_name = "lrandom",
rock_version = "20120430.51-1"
}
},
["raven-lua-rjson"] = {
["0.1-1"] = {
module_name = "raven",
rock_name = "resty-raven",
rock_version = "1.0-2"
}
},
["redux-lua"] = {
["0.1.0-1"] = {
module_name = "redux",
rock_name = "redux",
rock_version = "0.1.0-1"
}
},
["req-content-type-transformer"] = {
["0.1-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["request-decrypt"] = {
["0.1-6"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["request-limit-validator"] = {
["0.1.2-1"] = {
module_name = "kong",
rock_name = "kong-plugin-jwt-up",
rock_version = "1.7-0"
}
},
["resty-newrelic"] = {
["0.01-0"] = {
module_name = "resty",
rock_name = "lua-resty-scrypt",
rock_version = "1.0-1"
},
["0.01-5"] = {
module_name = "resty",
rock_name = "lua-resty-auto-ssl",
rock_version = "0.8.0-1"
},
["0.01-6"] = {
module_name = "resty",
rock_name = "lua-resty-auto-ssl",
rock_version = "0.9.0-1"
}
},
["resty-shared-session"] = {
["0.1.1-2"] = {
module_name = "resty",
rock_name = "lua-resty-auto-ssl",
rock_version = "0.9.0-1"
}
},
["resty-smtp"] = {
["1.0rc1-1"] = {
module_name = "resty",
rock_name = "lua-resty-beanstalkd",
rock_version = "0.0-5"
}
},
salt = {
["1.0-1"] = {
module_name = "salt",
rock_name = "lua-salt",
rock_version = "0.0.1-0"
},
["1.1-1"] = {
module_name = "salt",
rock_name = "lua-salt",
rock_version = "0.0.1-0"
}
},
semparse = {
["1.0.0-1"] = {
module_name = "semver",
rock_name = "semver",
rock_version = "1.2.0-1"
}
},
statsd = {
["2.0.0-1"] = {
module_name = "statsd",
rock_name = "luastatsd",
rock_version = "1.0-1"
},
["3.0.2-1"] = {
module_name = "statsd",
rock_name = "luastatsd",
rock_version = "1.0-1"
}
},
["std._debug"] = {
["1.0-1"] = {
module_name = "std",
rock_name = "stdlib",
rock_version = "41.2.1-1"
},
["1.0.1-1"] = {
module_name = "std",
rock_name = "stdlib",
rock_version = "41.2.1-1"
}
},
["std.normalize"] = {
["1.0.1-2"] = {
module_name = "std",
rock_name = "stdlib",
rock_version = "41.2.0-1"
},
["1.0.4-1"] = {
module_name = "std",
rock_name = "stdlib",
rock_version = "41.2.1-1"
}
},
["std.prototype"] = {
["1.0.1-2"] = {
module_name = "std",
rock_name = "stdlib",
rock_version = "41.2.0-1"
}
},
["std.strict"] = {
["1.0-2"] = {
module_name = "std",
rock_name = "stdlib",
rock_version = "41.2.0-1"
},
["1.1-2"] = {
module_name = "std",
rock_name = "stdlib",
rock_version = "41.2.0-1"
},
["1.3.1-1"] = {
module_name = "std",
rock_name = "stdlib",
rock_version = "41.2.1-1"
},
["1.3.2-1"] = {
module_name = "std",
rock_name = "stdlib",
rock_version = "41.2.1-1"
}
},
["string-split"] = {
["0.2.0-1"] = {
module_name = "string",
rock_name = "string.color",
rock_version = "1.0-1"
}
},
["string-trim"] = {
["0.1.0-1"] = {
module_name = "string",
rock_name = "string.color",
rock_version = "1.0-1"
}
},
["table-flatten"] = {
["0.2.0-1"] = {
module_name = "table",
rock_name = "dado",
rock_version = "1.8.1-1"
}
},
tarantoolapp = {
["1.0.2-1"] = {
module_name = "datafile",
rock_name = "datafile",
rock_version = "0.2-1"
},
["1.0.3-1"] = {
module_name = "datafile",
rock_name = "datafile",
rock_version = "0.6-1"
},
["1.0.4-1"] = {
module_name = "datafile",
rock_name = "datafile",
rock_version = "0.6-1"
}
},
["underscore-dot-lua"] = {
["1.0-0"] = {
module_name = "underscore",
rock_name = "underscore",
rock_version = "0.1.0-0"
}
},
["vararg-lua"] = {
["1.2-1"] = {
module_name = "vararg",
rock_name = "vararg",
rock_version = "1.2-1"
}
},
["wsapi-openresty"] = {
["0.0.1-1"] = {
module_name = "wsapi",
rock_name = "wsapi",
rock_version = "1.6.1-1"
}
},
["wsapi-xavante"] = {
["1.6.1-1"] = {
module_name = "wsapi",
rock_name = "wsapi",
rock_version = "1.6.1-1"
}
},
["wtf-action-log"] = {
["0.1-1"] = {
module_name = "wtf",
rock_name = "wtf",
rock_version = "0.1-1"
}
},
["wtf-action-simple_response"] = {
["0.1-1"] = {
module_name = "wtf",
rock_name = "wtf",
rock_version = "0.1-1"
}
},
["wtf-demo"] = {
["0.1-1"] = {
module_name = "wtf",
rock_name = "wtf",
rock_version = "0.1-1"
}
}
},
not_valid_version_format = {
abstk = {
["release-1"] = "release-1"
},
apicast = {
["scm-1"] = "scm-1"
},
["apicast-cli"] = {
["scm-1"] = "scm-1"
},
bit32 = {
["5.2.0alpha.1-1"] = "5.2.0alpha.1-1"
},
debugger = {
["scm-1"] = "scm-1"
},
["emoji-clock"] = {
["scm-1"] = "scm-1"
},
filament = {
["v1.0-1"] = "v1.0-1"
},
graphviz = {
["v1.0-1"] = "v1.0-1"
},
hfun = {
["master-1"] = "master-1"
},
httprequestparser = {
["ver-1"] = "ver-1",
["ver-2"] = "ver-2"
},
ipipx = {
["beta-1"] = "beta-1"
},
["irc-engine"] = {
["5.0.0.pre5-1"] = "5.0.0.pre5-1"
},
lain = {
git = "git"
},
lairs = {
["dev-23"] = "dev-23"
},
liquid = {
["scm-1"] = "scm-1"
},
["lua-cassandra"] = {
["dev-0"] = "dev-0"
},
["lua-cjson2"] = {
["2.1devel-1"] = "2.1devel-1"
},
["lua-espeak"] = {
["1.36r1-1"] = "1.36r1-1"
},
["lua-ev"] = {
["v1.3-1"] = "v1.3-1"
},
["lua-jet"] = {
["v0.9-1"] = "v0.9-1"
},
["lua-nginx-logging"] = {
["v1.0-1"] = "v1.0-1"
},
["lua-resty-aries"] = {
["release-1"] = "release-1",
["release-1.0"] = "release-1.0"
},
["lua-resty-github"] = {
["v1.0-1"] = "v1.0-1"
},
["lua-resty-hipchat"] = {
["v1.0-1"] = "v1.0-1"
},
["lua-resty-hmac"] = {
["v1.0-1"] = "v1.0-1"
},
["lua-resty-readurl"] = {
["v1.0-1"] = "v1.0-1"
},
["lua-resty-s3"] = {
["v1.0-1"] = "v1.0-1"
},
["lua-rover"] = {
["scm-1"] = "scm-1"
},
["lua-sdl2"] = {
["2.0.3.3.1-1"] = "2.0.3.3.1-1",
["2.0.5.6.0-1"] = "2.0.5.6.0-1"
},
["lua-step"] = {
["v1.0-1"] = "v1.0-1"
},
["lua-websockets"] = {
["v2.0-1"] = "v2.0-1"
},
["luafilesystem-ffi"] = {
["scm-1"] = "scm-1"
},
luaipc = {
["c7b814e-0"] = "c7b814e-0"
},
luastream = {
["@version@-1"] = "@version@-1"
},
ludent = {
["v0.1-1"] = "v0.1-1"
},
lundler = {
["dev-22"] = "dev-22",
["dev-23"] = "dev-23",
["dev-26"] = "dev-26"
},
lunescript51 = {
["main-1"] = "main-1"
},
markov = {
["v1.0-1"] = "v1.0-1"
},
moor = {
["v3.0-1"] = "v3.0-1"
},
mosquitto = {
["master-1"] = "master-1"
},
nnsparse = {
["scm-1"] = "scm-1"
},
["penlight-ffi"] = {
["scm-1"] = "scm-1"
},
prosody = {
["scm.trunk.nightly570-1"] = "scm.trunk.nightly570-1",
["scm.trunk.nightly606-1"] = "scm.trunk.nightly606-1"
},
["r1-lua-resty-waf"] = {
["r0.1.0-1"] = "r0.1.0-1"
},
rjson = {
["dev-6"] = "dev-6"
},
["rxi-json-lua"] = {
["e1dbe93-0"] = "e1dbe93-0"
},
vida = {
["v0.1-10"] = "v0.1-10"
},
xxhash = {
["v1.0-1"] = "v1.0-1"
}
},
not_valid_version_format_of_dependency = {
ads1015 = {
["0.1.0-1"] = "bit32 <= 5.3.2-0"
},
adxl345 = {
["0.1.0-0"] = "bit32 <= 5.3.2-0"
},
bme280 = {
["0.1.0-1"] = "bit32 <= 5.3.2-0"
},
["copas-ev"] = {
["0.1-1"] = "lua-ev >= v1.4",
["0.3-3"] = "lua-ev >= v1"
},
gnucrypt = {
["0.0.1-0"] = "lua <= 5.3"
},
hotswap = {
["0.1-1"] = "xxhash >= v1"
},
["hotswap-ev"] = {
["1.1-1"] = "lua-ev >= v1",
["1.2-1"] = "lua-ev >= v1"
},
["hotswap-hash"] = {
["1.2-1"] = "xxhash >= v1"
},
ht16k33 = {
["0.1.0-0"] = "bit32 <= 5.3.2-0"
},
http = {
["0.1-1"] = "lpeg_patterns >= 0.3 < 0.5"
},
kong = {
["0.9.4-0"] = "lua-cassandra == dev-0",
["0.11.1-0"] = "luasocket == 3.0-rc1",
["0.12.1-0"] = "luasocket == 3.0-rc1"
},
["kong-slack-hmac"] = {
["0.12.3-0"] = "lua-resty-hmac = v1.0-1"
},
lobject = {
["1.0-1"] = "lua >= 5.1 < 5.4"
},
long = {
["1.0.1-0"] = "bit32 <= 5.3.2-0"
},
["lua-cassandra"] = {
["0.4.0-0"] = "luasocket ~> 3.0-rc1",
["0.4.2-0"] = "luasocket ~> 3.0-rc1"
},
["lua-resty-dns-client"] = {
["3.0.0-1"] = "lua-resty-timer < 1.0"
},
luaunit = {
["3.3-1"] = "lua < 5.4"
},
nn = {
["1.0.0-2"] = "lua >= 5.1 <= 5.3",
["1.0.4-1"] = "lua >= 5.1 <= 5.3"
},
parquet = {
["0.8.0-1"] = "bit32 <= 5.3.2-0"
},
perihelion = {
["0.3-1"] = "lua <= 5.4",
["0.9-1"] = "lua <= 5.4"
},
sgp30 = {
["0.1.0-0"] = "bit32 <= 5.3.2-0"
},
stuart = {
["0.1.5-1"] = "luasocket <= 3.0rc1-2"
},
["stuart-sql"] = {
["0.1.5-1"] = "middleclass <= 4.1-0"
},
tethys = {
["2.0.1-1"] = "lua-iconv >= r3"
},
thrift = {
["0.10.0-2"] = "bit32 <= 5.3.0-1"
},
wiola = {
["0.6.0-2"] = "lua-resty-hmac >= v1.0",
["0.7.0-2"] = "lua-resty-hmac >= v1.0",
["0.9.1-2"] = "lua-resty-hmac >= v1.0"
}
},
rock_download_error = {
lor = {
["0.0.5-1"] = "[HTTP_RETURNED_ERROR] HTTP response code said error (22)"
},
["lua-erento-uuid"] = {
["1.0-2"] = "/Users/sp/Dropbox/Prj/scilua/head/pkg/1-dev/init.lua:336: interrupted!"
},
["pijaz sdk"] = {
["0.1-1"] = "[HTTP_RETURNED_ERROR] HTTP response code said error (22)"
}
},
unsupported_external_library = {
alien = {
["0.6.1-1"] = {
FFI = {
library = "ffi"
}
},
["0.7.1-2"] = {
FFI = {
library = "ffi"
}
}
},
ao = {
["1.0.0-1"] = {
LIBAO = {
header = "ao/ao.h"
}
},
["1.1.0-0"] = {
LIBAO = {
header = "ao/ao.h"
}
}
},
argon2 = {
["3.0.1-1"] = {
ARGON2 = {
header = "argon2.h",
library = "argon2"
}
}
},
bkopenssl = {
["0.0.0-1"] = {
OPENSSL = {
header = "openssl/evp.h"
}
}
},
cqueues = {
["20160316.51-0"] = {
CRYPTO = {
header = "openssl/crypto.h",
library = "crypto"
},
OPENSSL = {
header = "openssl/ssl.h",
library = "ssl"
}
},
["20161215.51-0"] = {
CRYPTO = {
header = "openssl/crypto.h",
library = "crypto"
},
OPENSSL = {
header = "openssl/ssl.h",
library = "ssl"
}
},
["20171014.51-0"] = {
CRYPTO = {
header = "openssl/crypto.h",
library = "crypto"
},
OPENSSL = {
header = "openssl/ssl.h",
library = "ssl"
}
}
},
["cx-gumbo"] = {
["0.4-1"] = {
GUMBO = {
header = "gumbo.h",
library = "gumbo"
}
}
},
cyrussasl = {
["1.1.0-1"] = {
LIBSASL = {
header = "sasl/sasl.h"
}
}
},
discount = {
["0.1.0-1"] = {
DISCOUNT = {
header = "mkdio.h",
library = "markdown"
}
},
["0.4-1"] = {
DISCOUNT = {
header = "mkdio.h",
library = "markdown"
}
}
},
ecasound = {
["0.3-0"] = {
ECAS = {
header = "libecasoundc/ecasoundc.h",
library = "ecasoundc"
}
}
},
enet = {
["1.2-1"] = {
ENET = {
header = "enet/enet.h"
}
}
},
fltk4lua = {
["0.1-1"] = {
platforms = {
unix = {
FLTK = {
program = "fltk-config"
}
},
windows = {
FLTK = {
header = "FL/Fl",
library = "fltk"
}
}
}
}
},
flu = {
["20101020-1"] = {
ATTR = {
header = "attr/xattr.h"
},
FUSE = {
library = "fuse"
}
},
["20181218-1"] = {
ATTR = {
header = "sys/xattr.h"
},
FUSE = {
library = "fuse"
}
}
},
fluidsynth = {
["2.0-0"] = {
FLUIDSYNTH = {
header = "fluidsynth.h",
library = "fluidsynth"
}
},
["2.1-0"] = {
FLUIDSYNTH = {
header = "fluidsynth.h",
library = "fluidsynth"
}
}
},
freetype = {
["20140717-1"] = {
freetype2 = {
header = "freetype2/ft2build.h"
}
}
},
gamecake = {
["18-005"] = {
GIF_LIB = {
header = "gif_lib.h",
library = "libgif.a"
},
JPEG_LIB = {
header = "jpeglib.h",
library = "libjpeg.a"
},
PNG_LIB = {
header = "png.h",
library = "libpng.a"
}
},
["18-5"] = {
GIF_LIB = {
header = "gif_lib.h",
library = "libgif.a"
},
JPEG_LIB = {
header = "jpeglib.h",
library = "libjpeg.a"
},
PNG_LIB = {
header = "png.h",
library = "libpng.a"
}
}
},
gumbo = {
["0.1-1"] = {
GUMBO = {
header = "gumbo.h",
library = "gumbo"
}
},
["0.4-3"] = {
GUMBO = {
header = "gumbo.h",
library = "gumbo"
}
}
},
idn2 = {
["0.1-0"] = {
IDN2 = {
header = "idn2.h",
library = "idn2"
}
}
},
idna = {
["1.0.0-1"] = {
IDN = {
header = "idna.h",
library = "idn"
}
}
},
inotify = {
["0.1-1"] = {
INOTIFY = {
header = "sys/inotify.h"
}
},
["0.5-1"] = {
INOTIFY = {
header = "sys/inotify.h"
}
}
},
iwi = {
["0.1-0"] = {
platforms = {
unix = {
LIBGEOHASH = {
header = "geohash.h",
library = "geohash"
}
}
}
}
},
lcrypt = {
["0.4-0"] = {
platforms = {
unix = {
LIBTOMCRYPT = {
header = "tomcrypt.h",
library = "tomcrypt"
},
LIBTOMMATH = {
header = "tommath.h",
library = "tommath"
},
Z = {
header = "zlib.h",
library = "z"
}
}
}
}
},
lcurses = {
["6-2"] = {
NCURSES = {
header = "ncurses.h"
}
}
},
leda = {
["0.3.5-1"] = {
LIBEVENT = {
header = "event2/event.h"
},
TBB = {
header = "tbb/concurrent_queue.h",
library = "tbb"
}
}
},
lgdbm = {
["20101030-1"] = {
GDBM = {
header = "gdbm.h",
library = "gdbm"
}
}
},
lgsl = {
["0.1-1"] = {
GSL = {
library = "gsl"
}
}
},
["libcidr-ffi"] = {
["0.1.0-1"] = {
CIDR = {
library = "cidr"
}
},
["0.1.2-1"] = {
CIDR = {
library = "cidr"
}
}
},
lightningmdb = {
["0.9-1"] = {
LMDB = {
header = "lmdb.h",
library = "lmdb"
}
}
},
linterval = {
["20120501-1"] = {
BIAS = {
header = "BIAS/Bias0.h",
library = "libBias.a"
}
}
},
ljdns = {
["0.2-1"] = {
LIBKNOT = {
library = "knot"
},
LIBZSCANNER = {
library = "zscanner"
}
},
["0.4-0"] = {
LIBKNOT = {
library = "knot"
},
LIBZSCANNER = {
library = "zscanner"
}
},
["2.4-0"] = {
LIBKNOT = {
library = "knot"
},
LIBZSCANNER = {
library = "zscanner"
}
}
},
lluv = {
["0.1.0-1"] = {
platforms = {
unix = {
UV = {
header = "uv.h",
library = "uv"
}
},
windows = {
UV = {
header = "uv.h",
library = "libuv"
}
}
}
},
["0.1.2-1"] = {
platforms = {
unix = {
UV = {
header = "uv.h",
library = "uv"
}
},
windows = {
UV = {
header = "uv.h",
library = "libuv"
}
}
}
},
["0.1.5-1"] = {
platforms = {
unix = {
UV = {
header = "uv.h",
library = "uv"
}
},
windows = {
UV = {
header = "uv.h",
library = "libuv"
}
}
}
},
["0.1.6-1"] = {
platforms = {
unix = {
UV = {
header = "uv.h",
library = "uv"
}
},
windows = {
UV = {
header = "uv.h",
library = "libuv"
}
}
}
}
},
["lluv-rs232"] = {
["0.1.0-1"] = {}
},
lmapm = {
["20120501-1"] = {
MAPM = {
header = "m_apm.h",
library = "libmapm.a"
},
platforms = {
windows = {
MAPM = {
library = "mapm.lib"
}
}
}
}
},
lmd5 = {
["20130228-1"] = {
OPENSSL = {
header = "openssl/opensslv.h"
}
}
},
lnotify = {
["0.2-1"] = {
NOTIFY = {
header = "libnotify/notify.h"
}
}
},
lpdf = {
["20130702.51-1"] = {
PDFLIB = {
header = "pdflib.h"
}
}
},
lqd = {
["20120430-1"] = {
QD = {
header = "qd/c_qd.h",
library = "libqd.a"
}
}
},
["lrexlib-gnu"] = {
["2.7.1-1"] = {
GNU = {
header = "regex.h"
}
},
["2.8.0-1"] = {
GNU = {
header = "regex.h"
}
}
},
["lrexlib-oniguruma"] = {
["2.7.1-1"] = {
ONIG = {
header = "oniguruma.h",
library = "onig"
}
},
["2.8.0-1"] = {
ONIG = {
header = "oniguruma.h",
library = "onig"
}
}
},
["lrexlib-pcre"] = {
["2.7.2-1"] = {
PCRE = {
header = "pcre.h",
library = "pcre"
}
},
["2.8.0-1"] = {
PCRE = {
header = "pcre.h",
library = "pcre"
}
}
},
["lrexlib-pcre2"] = {
["2.9.0-1"] = {
PCRE2 = {
header = "pcre2.h",
library = "pcre2-8"
}
}
},
["lrexlib-posix"] = {
["2.7.2-1"] = {
POSIX = {
header = "regex.h"
}
},
["2.8.0-1"] = {
POSIX = {
header = "regex.h"
}
}
},
["lrexlib-tre"] = {
["2.7.1-1"] = {
TRE = {
header = "tre/tre.h",
library = "tre"
}
},
["2.8.0-1"] = {
TRE = {
header = "tre/tre.h",
library = "tre"
}
}
},
lsqlite3 = {
["0.9-1"] = {
SQLITE = {
header = "sqlite3.h"
}
}
},
ltcltk = {
["0.9-3"] = {
TCL = {
library = "libtcl8.5.so"
}
}
},
["lua-apr"] = {
["0.18-2"] = {
platforms = {
unix = {
APR = {
header = "apr-1/apr.h",
library = "apr-1"
},
APREQ = {
header = "apreq2/apreq.h",
library = "apreq2"
},
APU = {
header = "apr-1/apu.h",
library = "aprutil-1"
}
}
}
}
},
["lua-avro"] = {
["1.0.1-1"] = {
AVRO = {
header = "avro.h"
}
}
},
["lua-bz2"] = {
["0.1.0-1"] = {
BZ2 = {
library = "bz2"
}
}
},
["lua-curl"] = {
["0.3.2-1"] = {
platforms = {
unix = {
CURL = {
header = "curl/curl.h"
}
},
windows = {
CURL = {
header = "curl/curl.h",
library = "libcurl"
}
}
}
},
["0.3.4-1"] = {
platforms = {
unix = {
CURL = {
header = "curl/curl.h"
}
},
windows = {
CURL = {
header = "curl/curl.h",
library = "libcurl"
}
}
}
},
["0.3.5-1"] = {
platforms = {
unix = {
CURL = {
header = "curl/curl.h"
}
},
windows = {
CURL = {
header = "curl/curl.h",
library = "libcurl"
}
}
}
},
["0.3.10-1"] = {
platforms = {
unix = {
CURL = {
header = "curl/curl.h"
}
},
windows = {
CURL = {
header = "curl/curl.h",
library = "libcurl"
}
}
}
}
},
["lua-ezlib"] = {
["0.2.0-1"] = {
ZLIB = {
header = "zlib.h",
library = "z"
}
}
},
["lua-fann"] = {
["0.4-1"] = {
platforms = {
unix = {
fann = {
header = "fann.h",
library = "fann"
}
},
windows = {
fann = {
header = "fann.h",
library = "libfann"
}
}
}
}
},
["lua-geoip"] = {
["0.1-1"] = {
GEOIP = {
header = "GeoIP.h"
}
}
},
["lua-hangul"] = {
["1.0-0"] = {
hangul = {
header = "hangul-1.0/hangul.h",
library = "hangul"
}
}
},
["lua-iconv"] = {
["6-1"] = {
ICONV = {
header = "iconv.h"
}
}
},
["lua-imlib2"] = {
["0.1-1"] = {
IMLIB2 = {
header = "Imlib2.h"
}
}
},
["lua-leveldb"] = {
["0.4-1"] = {
LEVELDB_DB = {
header = "leveldb/db.h"
},
LEVELDB_FILTER_POLICY = {
header = "leveldb/filter_policy.h"
},
LEVELDB_OPTIONS = {
header = "leveldb/options.h"
},
LEVELDB_STATUS = {
header = "leveldb/status.h"
},
LEVELDB_WRITE_BATCH = {
header = "leveldb/write_batch.h"
}
}
},
["lua-libmodbus"] = {
["0.1-1"] = {
LIBMODBUS = {
header = "modbus/modbus.h"
}
},
["0.1-3"] = {
LIBMODBUS = {
header = "modbus/modbus.h"
}
}
},
["lua-libzip"] = {
["0.1.0-1"] = {
ZIP = {
header = "zip.h",
library = "zip"
}
}
},
["lua-mongo"] = {
["0.2.1-2"] = {
LIBBSON = {
header = "libbson-1.0/bson.h"
},
LIBMONGOC = {
header = "libmongoc-1.0/mongoc.h"
}
},
["0.3.0-1"] = {
LIBBSON = {
header = "libbson-1.0/bson.h"
},
LIBMONGOC = {
header = "libmongoc-1.0/mongoc.h"
}
},
["0.4.0-1"] = {
LIBBSON = {
header = "libbson-1.0/bson.h"
},
LIBMONGOC = {
header = "libmongoc-1.0/mongoc.h"
}
},
["1.0.0-1"] = {
LIBBSON = {
header = "libbson-1.0/bson.h"
},
LIBMONGOC = {
header = "libmongoc-1.0/mongoc.h"
}
},
["1.2.0-1"] = {
LIBBSON = {
header = "libbson-1.0/bson.h"
},
LIBMONGOC = {
header = "libmongoc-1.0/mongoc.h"
}
}
},
["lua-mosquitto"] = {
["0.2-1"] = {
LIBMOSQUITTO = {
header = "mosquitto.h"
}
}
},
["lua-rote"] = {
["1.1.0-1"] = {
CURSES = {
header = "curses.h"
},
ROTE = {
header = "rote/rote.h"
}
}
},
["lua-ttyrant"] = {
["1.1-1"] = {
LIBTOKYOTYRANT = {
header = "tcrdb.h"
}
}
},
["lua-ucl"] = {
["0.1.0-0"] = {
UCL = {
header = "ucl/ucl.h",
library = "ucl"
}
}
},
["lua-xmlreader"] = {
["0.1-1"] = {
LIBXML2 = {
header = "libxml2/libxml/xmlreader.h",
library = "libxml2.so"
}
}
},
["lua-yajl"] = {
["2.0-1"] = {
YAJL = {
header = "yajl/yajl_parse.h",
library = "yajl"
}
}
},
["lua-zip"] = {
["0.1-0"] = {
ZIP = {
header = "zip.h",
library = "zip"
}
}
},
["lua-zlib"] = {
["0.3-1"] = {
ZLIB = {
header = "zlib.h"
}
},
["1.0-0"] = {
ZLIB = {
header = "zlib.h"
}
}
},
["lua-zmq"] = {
["1.1-1"] = {
ZEROMQ = {
header = "zmq.h",
library = "zmq"
}
}
},
lua_ldap = {
["1.0.2-0"] = {
LIBLDAP = {
header = "ldap.h",
library = "ldap"
}
}
},
lua_redis = {
["1.0.0-1"] = {
HIREDIS = {
header = "hiredis.h"
}
}
},
luacrypto = {
["0.2.0-1"] = {
OPENSSL = {
header = "openssl/ssl.h",
library = "libcrypto.so"
}
},
["0.3.2-2"] = {
OPENSSL = {
header = "openssl/evp.h"
}
}
},
["luacrypto-baikal"] = {
["1.0-0"] = {
OPENSSL = {
header = "openssl/evp.h"
}
}
},
luacurl = {
["1.1-3"] = {
CURL = {
header = "curl/curl.h"
}
}
},
["luadbi-mysql"] = {
["0.5-1"] = {
MYSQL = {
header = "mysql.h"
}
},
["0.7.2-1"] = {
MYSQL = {
header = "mysql.h"
}
}
},
["luadbi-postgresql"] = {
["0.5-1"] = {
POSTGRES = {
header = "libpq-fe.h"
}
},
["0.7.2-1"] = {
POSTGRES = {
header = "libpq-fe.h"
}
}
},
["luadbi-sqlite3"] = {
["0.5-1"] = {
SQLITE = {
header = "sqlite3.h"
}
},
["0.7.2-1"] = {
SQLITE = {
header = "sqlite3.h"
}
}
},
luaejdb = {
["1.1.0-1"] = {
LIBEJDB = {
header = "ejdb/ejdb.h"
}
}
},
luaevent = {
["0.4.3-1"] = {
EVENT = {
header = "event.h",
library = "event"
}
},
["0.4.5-1"] = {
EVENT = {
header = "event.h",
library = "event"
}
}
},
luaexif = {
["1.0-1"] = {
LIBEXIF = {
header = "libexif/exif-data.h"
}
}
},
luaexpat = {
["1.1.0-4"] = {
EXPAT = {
header = "expat.h"
}
}
},
luafam = {
["1.0.0-1"] = {
FAM = {
header = "fam.h"
}
}
},
luafan = {
["0.1-3"] = {
CURL = {
header = "curl/curl.h"
},
LIBEVENT = {
header = "event2/event.h"
},
MARIADB = {
header = "mysql/mysql.h"
},
OPENSSL = {
header = "openssl/opensslv.h"
}
},
["0.3-1"] = {
CURL = {
header = "curl/curl.h"
},
LIBEVENT = {
header = "event2/event.h"
},
MARIADB = {
header = "mysql/mysql.h"
},
OPENSSL = {
header = "openssl/opensslv.h"
}
},
["0.4-1"] = {
CURL = {
header = "curl/curl.h"
},
LIBEVENT = {
header = "event2/event.h"
},
MARIADB = {
header = "mysql/mysql.h"
},
OPENSSL = {
header = "openssl/opensslv.h"
}
}
},
luafanlite = {
["0.1-2"] = {
CURL = {
header = "curl/curl.h"
},
LIBEVENT = {
header = "event2/event.h"
},
OPENSSL = {
header = "openssl/opensslv.h"
}
},
["0.3-1"] = {
CURL = {
header = "curl/curl.h"
},
LIBEVENT = {
header = "event2/event.h"
},
OPENSSL = {
header = "openssl/opensslv.h"
}
},
["0.4-1"] = {
CURL = {
header = "curl/curl.h"
},
LIBEVENT = {
header = "event2/event.h"
},
OPENSSL = {
header = "openssl/opensslv.h"
}
}
},
luafanmicro = {
["0.1-2"] = {
LIBEVENT = {
header = "event2/event.h"
}
},
["0.3-1"] = {
LIBEVENT = {
header = "event2/event.h"
}
},
["0.4-1"] = {
LIBEVENT = {
header = "event2/event.h"
}
}
},
luafcgi = {
["1.1.0-1"] = {
FCGI = {
library = "fcgi"
}
}
},
luagcrypt = {
["0.2-1"] = {
LIBGCRYPT = {
header = "gcrypt.h"
},
platforms = {
unix = {
LIBGCRYPT = {
library = "gcrypt"
}
},
windows = {
LIBGCRYPT = {
library = "libgcrypt-20"
}
}
}
}
},
luagl = {
["1.01-1"] = {
GLUT = {
header = "GL/glut.h"
},
OPENGL = {
header = "GL/gl.h"
}
}
},
luagraph = {
["1.0.2-1"] = {
GRAPHVIZ = {
header = "graphviz/graph.h"
}
},
["1.0.4-1"] = {
GRAPHVIZ = {
header = "graphviz/graph.h"
}
}
},
luaircclient = {
["1.0-4"] = {
libircclient = {
header = "libircclient.h",
library = "ircclient"
}
}
},
lualdap = {
["1.2.3-1"] = {
LIBLDAP = {
header = "ldap.h",
library = "ldap"
}
}
},
["luanosql-unqlite"] = {
["1.0.0-1"] = {
UNQLITE = {
header = "unqlite.h"
}
}
},
luanotify = {
["0.2-1"] = {
NOTIFY = {
header = "libnotify/notify.h"
}
}
},
luaossl = {
["20141028-0"] = {
CRYPTO = {
header = "openssl/hmac.h",
library = "crypto"
},
OPENSSL = {
header = "openssl/ssl.h",
library = "ssl"
}
},
["20150504-0"] = {
CRYPTO = {
header = "openssl/hmac.h",
library = "crypto"
},
OPENSSL = {
header = "openssl/ssl.h",
library = "ssl"
}
},
["20150727-1"] = {
CRYPTO = {
header = "openssl/hmac.h",
library = "crypto"
},
OPENSSL = {
header = "openssl/ssl.h",
library = "ssl"
}
}
},
luapgsql = {
["1.4.2-0"] = {
PQ = {
header = "libpq-fe.h",
library = "pq"
}
},
["1.6.1-0"] = {
PQ = {
header = "libpq-fe.h",
library = "pq"
}
}
},
luaproc = {
["1.0-4"] = {
PTHREADS = {
header = "pthread.h",
library = "pthread"
}
}
},
luaprompt = {
["0.6-1"] = {
HISTORY = {
header = "readline/history.h",
library = "history"
},
READLINE = {
header = "readline/readline.h",
library = "readline"
}
}
},
luapsql = {
["0.1-1"] = {
LIBPQ = {
header = "libpq-fe.h"
}
}
},
luasec = {
["0.4.1-2"] = {
platforms = {
unix = {
OPENSSL = {
header = "openssl/ssl.h",
library = "ssl"
}
}
}
}
},
["luasec-fixed"] = {
["0.6-1"] = {
platforms = {
unix = {
OPENSSL = {
header = "openssl/ssl.h",
library = "ssl"
}
},
windows = {
OPENSSL = {
header = "openssl/ssl.h"
}
}
}
}
},
["luasql-firebird"] = {
["2.4.0-1"] = {
FB = {
header = "ibase.h"
}
}
},
["luasql-mysql"] = {
["2.2.0-1"] = {
MYSQL = {
header = "mysql.h"
}
}
},
["luasql-oci8"] = {
["2.3.0-1"] = {
OCI8 = {
header = "oci.h"
}
},
["2.4.0-1"] = {
OCI8 = {
header = "oci.h"
}
},
["2.5.0-1"] = {
OCI8 = {
header = "oci.h"
}
}
},
["luasql-odbc"] = {
["2.4.0-1"] = {
ODBC = {
header = "sql.h"
}
}
},
["luasql-postgres"] = {
["2.3.0-1"] = {
PGSQL = {
header = "pg_config.h"
}
},
["2.3.1-1"] = {
PGSQL = {
header = "pg_config.h"
}
},
["2.3.2-1"] = {
PGSQL = {
header = "pg_config.h"
}
},
["2.3.4-1"] = {
PGSQL = {
header = "pg_config.h"
}
},
["2.3.5-1"] = {
PGSQL = {
header = "pg_config.h"
}
},
["2.4.0-1"] = {
PGSQL = {
header = "libpq-fe.h"
}
}
},
["luasql-sqlite"] = {
["2.4.0-1"] = {
SQLITE = {
header = "sqlite.h"
}
}
},
["luasql-sqlite3"] = {
["2.2.0-1"] = {
SQLITE = {
header = "sqlite3.h"
}
}
},
luasvn = {
["0.2.6-1"] = {
APR = {
header = "apr-1/apr.h"
},
APR_UTIL = {
header = "apr-1/apr_xlate.h"
},
SUBVERSION = {
header = "subversion-1/svn_io.h"
}
}
},
luaunbound = {
["0-3"] = {
libunbound = {
header = "unbound.h",
library = "unbound"
}
},
["0.1-1"] = {
libunbound = {
header = "unbound.h",
library = "unbound"
}
},
["0.2-1"] = {
libunbound = {
header = "unbound.h",
library = "unbound"
}
},
["0.4-1"] = {
libunbound = {
header = "unbound.h",
library = "unbound"
}
}
},
luaunix = {
["1.2.7-0"] = {
platforms = {
linux = {
BSD = {
header = "bsd/bsd.h",
library = "bsd"
}
}
}
}
},
luawebsocket = {
["1.0.0-1"] = {
OPENSSL = {
header = "openssl/ssl.h",
library = "ssl"
}
}
},
luawinapi = {
["1.0.1-1"] = {
platforms = {
win32 = {
LUACWRAP = {
library = "luacwrap.lib"
}
}
}
}
},
luawt = {
["0.0-1"] = {
WT = {
header = "Wt/WConfig.h"
}
}
},
luayaml = {
["0.5.6-1"] = {
SYCK = {
header = "syck.h",
library = "libsyck.a"
}
}
},
luazip = {
["1.2.4-1"] = {
ZZIP = {
header = "zzip.h"
}
},
["1.2.4-2"] = {
ZZIP = {
header = "zzip.h"
}
},
["1.2.4-3"] = {
ZZIP = {
header = "zzip.h"
}
}
},
luse = {
["1.0.2-1"] = {
FUSE = {
header = "fuse.h"
}
}
},
luuid = {
["20090429-1"] = {
LIBUUID = {
header = "uuid/uuid.h",
library = "libuuid.so"
}
}
},
["luv-updated"] = {
["1.9.2-2"] = {
LIBUV = {
header = "uv.h"
}
}
},
lyaml = {
["3-1"] = {
YAML = {
library = "yaml"
}
}
},
lzlib = {
["0.3-3"] = {
ZLIB = {
header = "zlib.h",
library = "z"
}
}
},
lzmq = {
["0.2.0-1"] = {
platforms = {
unix = {
ZMQ = {
header = "zmq.h"
}
},
windows = {
ZMQ = {
header = "zmq.h",
library = "libzmq"
}
}
}
},
["0.3.5-1"] = {
platforms = {
unix = {
ZMQ = {
header = "zmq.h"
}
},
windows = {
ZMQ = {
header = "zmq.h",
library = "libzmq"
}
}
}
}
},
midialsa = {
["1.04-1"] = {
ALSA = {
header = "alsa/asoundlib.h",
library = "asound"
}
}
},
mongorover = {
["0.1-1"] = {
LIBBSON = {
header = "libbson-1.0/bson.h"
},
LIBLUA = {
header = "lua.h"
},
LIBMONGOC = {
header = "libmongoc-1.0/mongoc.h"
}
}
},
nixio = {
["0.3-1"] = {
OPENSSL = {
header = "openssl/ssl.h"
}
}
},
numlua = {
["0.3-1"] = {
FFTW3 = {
header = "fftw3.h"
},
HDF5 = {
header = "hdf5.h"
}
}
},
oauth = {
["0.0.5-1"] = {}
},
["objc.lua"] = {
["0.0.1-1"] = {
LIBOBJC = {
library = "libobjc"
}
}
},
odbc = {
["0.1.0-3"] = {
platforms = {
mingw32 = {
ODBC = {}
},
unix = {
ODBC = {
header = "sql.h"
}
},
windows = nil
}
}
},
opengl = {
["1.11-1"] = {
GL = {
header = "GL/gl.h"
},
GLU = {
header = "GL/glu.h"
}
}
},
openssl = {
["0.7.5-1"] = {
OPENSSL = {
header = "openssl/evp.h"
}
}
},
["openssl-baikal"] = {
["1.0.0-1"] = {
OPENSSL = {
header = "openssl/evp.h"
}
},
["1.1.0-1"] = {
OPENSSL = {
header = "openssl/evp.h"
}
},
["1.1.1-0"] = {
OPENSSL = {
header = "openssl/evp.h"
}
}
},
["org.conman.iconv"] = {
["1.1.0-1"] = {
ICONV = {
header = "iconv.h"
}
},
["1.1.1-1"] = {
ICONV = {
header = "iconv.h"
}
},
["2.0.0-1"] = {
ICONV = {
header = "iconv.h"
}
}
},
["org.conman.tls"] = {
["1.1.1-1"] = {
LIBRESSL = {
header = "openssl/opensslv.h"
},
TLS = {
header = "tls.h"
}
}
},
paseto = {
["0.1.0-1"] = {
SODIUM = {
header = "sodium.h"
}
}
},
pluto = {
["2.4-1"] = {
LUA_SOURCES = {}
}
},
psl = {
["0.1-0"] = {
PSL = {
header = "libpsl.h",
library = "psl"
}
},
["0.3-0"] = {
PSL = {
header = "libpsl.h",
library = "psl"
}
}
},
readkey = {
["1.0-1"] = {}
},
readline = {
["1.7-0"] = {
HISTORY = {
header = "readline/history.h"
},
READLINE = {
header = "readline/readline.h",
library = "readline"
}
},
["2.2-0"] = {
HISTORY = {
header = "readline/history.h"
},
READLINE = {
header = "readline/readline.h",
library = "readline"
}
},
["2.5-0"] = {
HISTORY = {
header = "readline/history.h"
},
READLINE = {
header = "readline/readline.h",
library = "readline"
}
}
},
rs232 = {
["0.1.0-1"] = {}
},
saml = {
["0.1-1"] = {
LIBXML2 = {
library = "xml2"
},
XMLSEC1 = {
library = "xmlsec1"
}
}
},
sass = {
["0.1-1"] = {
SASS = {
header = "sass/context.h",
library = "sass"
}
}
},
shelve = {
["0.35.0-2"] = {
LIBGDBM = {
header = "gdbm.h"
}
},
["0.35.1-1"] = {
LIBGDBM = {
header = "gdbm.h"
}
}
},
specl = {
["2-2"] = {
YAML = {
library = "yaml"
}
}
},
sqlite3 = {
["0.4.1.1-1"] = {
SQLITE = {
header = "sqlite3.h"
}
}
},
subprocess = {
["0.1-1"] = {
SYS_SYSCALL = {
header = "sys/syscall.h"
}
}
},
tekui = {
["1.07-1"] = {
platforms = {
unix = {
FREETYPE = {
header = "ft2build.h"
},
X11 = {
header = "X11/X.h"
}
}
}
}
},
terminfo = {
["1.4-0"] = {
TERMCAP = {
library = "termcap"
}
}
},
["test-lua-plugin"] = {
["0.1.0-1"] = {}
},
tokyocabinet = {
["1.10-1"] = {
TOKYOCABINET = {
header = "tcutil.h",
library = "tokyocabinet"
}
}
},
udev = {
["0.1-0"] = {
UDEV = {
header = "libudev.h"
}
}
},
["wsapi-fcgi"] = {
["1.1-1"] = {
platforms = {
unix = {
FASTCGI = {
header = "fcgi_stdio.h"
}
}
}
},
["1.7-1"] = {
platforms = {
unix = {
FASTCGI = {
header = "fcgi_stdio.h"
}
}
}
}
},
xctrl = {
["20101026-1"] = {
X11 = {
header = "X11/Xmu/WinUtil.h"
}
}
},
xmlua = {
["1.0.1-0"] = {
LIBXML2 = {
library = "xml2"
}
}
},
yaml = {
["0.2-1"] = {
YAML = {
header = "yaml.h",
library = "yaml"
}
}
}
}
} |
local subprocess = require'xcq.subprocess'
local Promise = require'cqueues.promise'.new
local utils = require'live-share.utils'
local image_processor = require'live-share.media.image_processor'
local thumbnail_config = require'live-share.config'.thumbnail
assert(image_processor.init(arg[0]))
assert(utils.program_is_available('ffmpeg'))
local function wait_for_process(process)
local code, status = process:wait()
if code ~= 0 then
error('Process '..status)
end
end
local function vips_options_from_table(options)
if not options or not next(options) then
return ''
end
local buffer = {}
for name, value in pairs(options) do
if type(value) == 'boolean' then
if value then
table.insert(buffer, name)
end
else
table.insert(name..'='..tostring(value))
end
end
return '['..table.concat(buffer,',')..']'
end
local load_options = vips_options_from_table(thumbnail_config.vips.load_options)
local save_options = vips_options_from_table(thumbnail_config.vips.save_options)
-- returns image metadata as table
local function analyze_and_generate_thumbnail(input, output)
local size = thumbnail_config.size
input = input..load_options
output = output..save_options
local metadata = assert(image_processor.process(input, output, size))
-- TODO: Move into a thread or so.
return metadata
end
local function build_ffmpeg_args(input, output)
local c = thumbnail_config
local inspected_frames = c.ffmpeg_inspected_frames
local extra_args = c.ffmpeg_extra_args
local f = string.format
local filter = {f('thumbnail=%d',
inspected_frames)}
local args = {'ffmpeg',
'-hide_banner',
'-loglevel', 'warning',
'-y', -- overwriting is allowed
'-i', input,
'-filter:v', table.concat(filter, ','),
'-frames:v', '1'}
for _, arg in ipairs(extra_args) do
table.insert(args, arg)
end
table.insert(args, output)
return args
end
local function extract_image_from_video(input, output)
local args = build_ffmpeg_args(input, output)
local process = assert(subprocess.spawn(args))
wait_for_process(process)
end
local media_processor = {}
function media_processor.process(media_type, file, thumbnail_file)
if media_type.type == 'image' then
return Promise(function()
return analyze_and_generate_thumbnail(file,
thumbnail_file)
end)
else -- video
return Promise(function()
local temp_file =
utils.get_temporary_file_name{postfix='.png'}
extract_image_from_video(file, temp_file)
local metadata = analyze_and_generate_thumbnail(temp_file,
thumbnail_file)
assert(os.remove(temp_file))
return metadata
end)
end
end
return media_processor
|
-- Gkyl ------------------------------------------------------------------------
local Plasma = require "App.PlasmaOnCartGrid"
local prng = require "sci.prng"
local Mpi = require "Comm.Mpi"
local rank = Mpi.Comm_rank(Mpi.COMM_WORLD)
local rng = prng.mrg32k3a(rank+1234)
-- Constants
epsilon0 = 1.0
mu0 = 1.0
lightSpeed = 1/math.sqrt(epsilon0*mu0)
elcCharge = -1.0
ionCharge = 1.0
ionMass = 100.0
elcMass = 1.0
-- problem parameters
Atwood = 0.17
n1 = 1.0 -- heavy-side number density
betaIon = 0.071
gHat = 0.09 -- gHat = g/Omega_i v_A
theta = 0.0 -- inclination angle of field to Z-direction
Te_Ti = 0.1 -- Te/Ti
B0 = 0.1 -- Left wall magnetic field (this may not be correct)
maxPert = 0.01 -- Perturbation amplitude
-- secondary quantities
n2 = n1*(1-Atwood)/(1+Atwood) -- light-side number density
T_ion = (betaIon/n1)*B0^2/(2*mu0) -- ion temperature (uniform)
T_elc = Te_Ti*T_ion -- electron temperature (uniform)
vtElc = math.sqrt(2.0*T_elc/elcMass)
vtIon = math.sqrt(2.0*T_ion/ionMass)
wpe = math.sqrt(n1*elcCharge^2/(epsilon0*elcMass))
wpi = math.sqrt(n1*ionCharge^2/(epsilon0*ionMass))
de = lightSpeed/wpe
di = lightSpeed/wpi
Valf = B0/math.sqrt(mu0*n1*ionMass)
OmegaCe0 = elcCharge*B0/elcMass
OmegaCi0 = ionCharge*B0/ionMass
grav = gHat*OmegaCi0*Valf -- gravitational acceleration
-- domain size
Lx = 3.0*di
Ly = 3.75*di
-- resolution and time-stepping
NX = 64
NY = 64
endTime = 60/OmegaCi0
print(endTime)
|
--[[
TheNexusAvenger
Tests the FileSelectionFrame class.
--]]
local NexusUnitTesting = require("NexusUnitTesting")
local NexusGit = require(game:GetService("ServerStorage"):WaitForChild("NexusGit"))
local Directory = NexusGit:GetResource("NexusGitRequest.File.Directory")
local File = NexusGit:GetResource("NexusGitRequest.File.File")
local FileSelectionFrame = NexusGit:GetResource("UI.Frame.FileSelection.FileSelectionFrame")
local NexusEnums = NexusGit:GetResource("NexusPluginFramework.Data.Enum.NexusEnumCollection").GetBuiltInEnums()
--[[
Tests that the constructor works without failing.
--]]
NexusUnitTesting:RegisterUnitTest("Constructor",function(UnitTest)
local CuT = FileSelectionFrame.new({File.new("TestFileName1.lua"),File.new("TestFileName2.lua")})
UnitTest:AssertEquals(CuT.ClassName,"FileSelectionFrame","Class name is incorrect.")
UnitTest:AssertEquals(#CuT:GetChildren(),2,"List frames are incorrect.")
end)
--[[
Asserts that the canvas size is correct.
--]]
NexusUnitTesting:RegisterUnitTest("CanvasSize",function(UnitTest)
--Create several files and directories.
local File1 = File.new("TestFileName1.lua")
local File2 = File.new("TestFileName2.lua")
local File3 = File.new("TestFileName3.lua")
local File4 = File.new("TestFileName4.lua")
local Directory1 = Directory.new("TestDirectory1")
local Directory2 = Directory.new("TestDirectory2")
local Directory3 = Directory.new("TestDirectory3")
Directory1:AddFile(File2)
Directory1:AddFile(Directory2)
Directory2:AddFile(File3)
Directory3:AddFile(File4)
--Create the component under testing.
local CuT = FileSelectionFrame.new({File1,Directory1,Directory3})
UnitTest:AssertEquals(#CuT:GetChildren(),3,"List frame count is incorrect.")
UnitTest:AssertEquals(CuT.CanvasSize.Y.Offset,140,"Canvas size Y is incorrect.")
end)
--[[
Tests the GetSelectedFiles method.
--]]
NexusUnitTesting:RegisterUnitTest("GetSelectedFiles",function(UnitTest)
--Create several files and directories.
local File1 = File.new("TestFileName1.lua")
local File2 = File.new("TestFileName2.lua")
local File3 = File.new("TestFileName3.lua")
local File4 = File.new("TestFileName4.lua")
local Directory1 = Directory.new("TestDirectory1")
local Directory2 = Directory.new("TestDirectory2")
local Directory3 = Directory.new("TestDirectory3")
Directory1:AddFile(File2)
Directory1:AddFile(Directory2)
Directory2:AddFile(File3)
Directory3:AddFile(File4)
--Create the component under testing.
local CuT = FileSelectionFrame.new({File1,Directory1,Directory3})
CuT.ListFrames[2]:GetCollapsableContainer():GetChildren()[2]:GetCollapsableContainer():GetChildren()[1].CheckedState = NexusEnums.CheckBoxState.Checked
CuT.ListFrames[3].CheckedState = NexusEnums.CheckBoxState.Checked
--Assert the selected files are correct.
local SelectedFiles = CuT:GetSelectedFiles()
UnitTest:AssertEquals(#SelectedFiles,2,"Incorrect amount of files selected.")
UnitTest:AssertEquals(SelectedFiles[1]:GetFileName(),"TestDirectory1","File name is incorrect.")
UnitTest:AssertEquals(SelectedFiles[1]:GetFiles()[1]:GetFileName(),"TestDirectory2","File name is incorrect.")
UnitTest:AssertEquals(SelectedFiles[1]:GetFiles()[1]:GetFiles()[1]:GetFileName(),"TestFileName3.lua","File name is incorrect.")
UnitTest:AssertEquals(SelectedFiles[2]:GetFileName(),"TestDirectory3","File name is incorrect.")
UnitTest:AssertEquals(SelectedFiles[2]:GetFiles()[1]:GetFileName(),"TestFileName4.lua","File name is incorrect.")
end)
return true |
--- src/terralib.lua.orig 2017-10-17 06:05:35 UTC
+++ src/terralib.lua
@@ -3366,12 +3366,12 @@ function terra.includecstring(code,cargs
local args = terra.newlist {"-O3","-Wno-deprecated","-resource-dir",clangresourcedirectory}
target = target or terra.nativetarget
- if (target == terra.nativetarget and ffi.os == "Linux") or (target.Triple and target.Triple:match("linux")) then
- args:insert("-internal-isystem")
+ if (target == terra.nativetarget and (ffi.os == "Linux" or ffi.os == "BSD")) or (target.Triple and target.Triple:match("linux")) then
+ args:insert( ffi.os == "BSD" and "-isystem" or "-internal-isystem")
args:insert(clangresourcedirectory.."/include")
end
for _,path in ipairs(terra.systemincludes) do
- args:insert("-internal-isystem")
+ args:insert( ffi.os == "BSD" and "-isystem" or "-internal-isystem")
args:insert(path)
end
@@ -3397,6 +3397,7 @@ function terra.includecstring(code,cargs
addtogeneral(macros)
setmetatable(general,mt)
setmetatable(tagged,mt)
+ for _,v in ipairs(args) do print( v ) end
return general,tagged,macros
end
function terra.includec(fname,cargs,target)
@@ -4015,6 +4016,7 @@ end
terra.cudahome = os.getenv("CUDA_HOME") or (ffi.os == "Windows" and os.getenv("CUDA_PATH")) or "/usr/local/cuda"
terra.cudalibpaths = ({ OSX = {driver = "/usr/local/cuda/lib/libcuda.dylib", runtime = "$CUDA_HOME/lib/libcudart.dylib", nvvm = "$CUDA_HOME/nvvm/lib/libnvvm.dylib"};
Linux = {driver = "libcuda.so", runtime = "$CUDA_HOME/lib64/libcudart.so", nvvm = "$CUDA_HOME/nvvm/lib64/libnvvm.so"};
+ BSD = {driver = "libcuda.so", runtime = "$CUDA_HOME/lib64/libcudart.so", nvvm = "$CUDA_HOME/nvvm/lib64/libnvvm.so"};
Windows = {driver = "nvcuda.dll", runtime = "$CUDA_HOME\\bin\\cudart64_*.dll", nvvm = "$CUDA_HOME\\nvvm\\bin\\nvvm64_*.dll"}; })[ffi.os]
for name,path in pairs(terra.cudalibpaths) do
path = path:gsub("%$CUDA_HOME",terra.cudahome)
|
-- CLIENTSIDE:
local frame
net.Receive( "f4menu", function()
if not IsValid( frame ) then
local frame = vgui.Create( "DFrame" )
frame:SetTitle( "DarkRP Menu" )
frame:SetSize( ScrW() * 0.75, ScrH() * 0.75 )
frame:Center()
frame:MakePopup()
end
end )
-- SERVERSIDE:
util.AddNetworkString( "f4menu" )
hook.Add( "ShowSpare2", "F4MenuHook", function( ply )
net.Start( "f4menu" )
net.Send( ply )
end )
|
vim.g.floaterm_autoclose = 1
vim.g.floaterm_height = 0.25
vim.g.floaterm_wintype = 'float'
vim.g.floaterm_position = 'bottom'
vim.cmd('let g:floaterm_width=1.0')
|
local function isVowel(char)
local vowels = {"a", "e", "i", "o", "u"}
for index, vowel in pairs(vowels) do
if string.lower(char) == vowel then
return true
end
end
return false
end
local vowelsCount = 0
local consonantsCount = 0
local str = "abcdefghijklmnopqrstuvwxyz"
for char in str:gmatch"." do
if isVowel(char) then
vowelsCount = vowelsCount + 1
elseif not isVowel(char) and type(tonumber(char)) ~= "number" then
consonantsCount = consonantsCount + 1
end
end
print(vowelsCount)
print(consonantsCount) |
---
-- @author wesen
-- @copyright 2019-2020 wesen <wesen-ac@web.de>
-- @release 0.1
-- @license MIT
--
local TestCase = require "wLuaUnit.TestCase"
local tablex = require "pl.tablex"
---
-- Checks that the StringRenderer works as expected.
--
-- @type TestStringRenderer
--
local TestStringRenderer = TestCase:extend()
---
-- The require path for the class that is tested by this TestCase
--
-- @tfield string testClassPath
--
TestStringRenderer.testClassPath = "AC-LuaServer.Core.Output.Template.Renderer.StringRenderer"
---
-- The paths of the classes that the test class depends on
--
-- @tfield table[] dependencyPaths
--
TestStringRenderer.dependencyPaths = {
{ id = "LuaRestyTemplateEngine", path = "resty.template", ["type"] = "table" },
{ id = "Path", path = "AC-LuaServer.Core.Path", ["type"] = "table" },
{ id = "path", path = "pl.path", ["type"] = "table" }
}
---
-- Method that is called before a test is executed.
-- Sets up the pl.path method mocks.
--
function TestStringRenderer:setUp()
TestCase.setUp(self)
self.dependencyMocks.path.exists = self.mach.mock_function("pathmock.exists")
end
---
-- Checks that a template can be rendered without default and without custom template values.
--
function TestStringRenderer:testCanRenderStringWithoutTemplateValues()
local pathMock = self.dependencyMocks.path
local renderer = self:createTestInstance("/tmp/src")
local renderedString
local templateMock = self:getMock(
"AC-LuaServer.Core.Output.Template.Template", "TemplateMock"
)
templateMock.getTemplatePath
:should_be_called()
:and_will_return("TimeExtended")
:and_then(
pathMock.exists
:should_be_called_with("/tmp/src/AC-LuaServer/Templates/TimeExtended.template")
:and_will_return(true)
)
:and_also(
templateMock.getTemplateValues
:should_be_called()
:and_will_return({})
)
:and_then(
self:expectLuaRestyTemplateEngineRendering(
"/tmp/src/AC-LuaServer/Templates/TimeExtended.template",
{ getAbsoluteTemplatePath = function(_value)
return (type(_value) == "function")
end
},
"Time extended by 10 minutes"
)
)
:when(
function()
renderedString = renderer:render(templateMock)
end
)
self:assertEquals("Time extended by 10 minutes", renderedString)
end
---
-- Checks that a template can be rendered with default and without custom template values.
--
function TestStringRenderer:testCanRenderStringWithOnlyDefaultTemplateValues()
local pathMock = self.dependencyMocks.path
local renderer = self:createTestInstance("/home/wesen/server")
local renderedString
renderer:configure({
defaultTemplateValues = { serverOwner = "unarmed" }
})
local templateMock = self:getMock(
"AC-LuaServer.Core.Output.Template.Template", "TemplateMock"
)
templateMock.getTemplatePath
:should_be_called()
:and_will_return("ServerInfo")
:and_then(
pathMock.exists
:should_be_called_with("/home/wesen/server/AC-LuaServer/Templates/ServerInfo.template")
:and_will_return(true)
)
:and_also(
templateMock.getTemplateValues
:should_be_called()
:and_will_return({})
)
:and_then(
self:expectLuaRestyTemplateEngineRendering(
"/home/wesen/server/AC-LuaServer/Templates/ServerInfo.template",
{ getAbsoluteTemplatePath = function(_value)
return (type(_value) == "function")
end,
serverOwner = "unarmed"
},
"AC-LuaServer hosted by unarmed"
)
)
:when(
function()
renderedString = renderer:render(templateMock)
end
)
self:assertEquals("AC-LuaServer hosted by unarmed", renderedString)
end
---
-- Checks that a template can be rendered without default and with custom template values.
--
function TestStringRenderer:testCanRenderStringWithOnlyCustomTemplateValues()
local pathMock = self.dependencyMocks.path
local renderer = self:createTestInstance("/src")
local renderedString
local templateMock = self:getMock(
"AC-LuaServer.Core.Output.Template.Template", "TemplateMock"
)
templateMock.getTemplatePath
:should_be_called()
:and_will_return("PlayerDisconnected")
:and_then(
pathMock.exists
:should_be_called_with("/src/AC-LuaServer/Templates/PlayerDisconnected.template")
:and_will_return(true)
)
:and_also(
templateMock.getTemplateValues
:should_be_called()
:and_will_return({ reason = "banned" })
)
:and_then(
self:expectLuaRestyTemplateEngineRendering(
"/src/AC-LuaServer/Templates/PlayerDisconnected.template",
{ getAbsoluteTemplatePath = function(_value)
return (type(_value) == "function")
end,
reason = "banned"
},
"Player could not connect (banned)"
)
)
:when(
function()
renderedString = renderer:render(templateMock)
end
)
self:assertEquals("Player could not connect (banned)", renderedString)
end
---
-- Checks that a template can be rendered with default and with custom template values.
--
function TestStringRenderer:testCanRenderStringWithDefaultAndCustomTemplateValues()
local pathMock = self.dependencyMocks.path
local renderer = self:createTestInstance("/etc/lua")
local renderedString
renderer:configure({
defaultTemplateValues = { serverName = "best-server" }
})
local templateMock = self:getMock(
"AC-LuaServer.Core.Output.Template.Template", "TemplateMock"
)
templateMock.getTemplatePath
:should_be_called()
:and_will_return("Greeting")
:and_then(
pathMock.exists
:should_be_called_with("/etc/lua/AC-LuaServer/Templates/Greeting.template")
:and_will_return(true)
)
:and_also(
templateMock.getTemplateValues
:should_be_called()
:and_will_return({ playerName = "random" })
)
:and_then(
self:expectLuaRestyTemplateEngineRendering(
"/etc/lua/AC-LuaServer/Templates/Greeting.template",
{ getAbsoluteTemplatePath = function(_value)
return (type(_value) == "function")
end,
serverName = "best-server",
playerName = "random"
},
"[best-server] Welcome to our server random!"
)
)
:when(
function()
renderedString = renderer:render(templateMock)
end
)
self:assertEquals("[best-server] Welcome to our server random!", renderedString)
end
---
-- Checks that line endings and leading and trailing whitespace are while rendering the template.
--
function TestStringRenderer:testCanRemoveLineEndingsAndBorderingWhitespace()
local pathMock = self.dependencyMocks.path
local renderer = self:createTestInstance("/othertmp/src")
local renderedString
local templateMock = self:getMock(
"AC-LuaServer.Core.Output.Template.Template", "TemplateMock"
)
templateMock.getTemplatePath
:should_be_called()
:and_will_return("WithEmptyLines")
:and_then(
pathMock.exists
:should_be_called_with("/othertmp/src/AC-LuaServer/Templates/WithEmptyLines.template")
:and_will_return(true)
)
:and_also(
templateMock.getTemplateValues
:should_be_called()
:and_will_return({})
)
:and_then(
self:expectLuaRestyTemplateEngineRendering(
"/othertmp/src/AC-LuaServer/Templates/WithEmptyLines.template",
{ getAbsoluteTemplatePath = function(_value)
return (type(_value) == "function")
end
},
" Next line is empty \n\n\n\n Next line is empty with whitespace\n \n \n\nSee? "
)
)
:when(
function()
renderedString = renderer:render(templateMock)
end
)
self:assertEquals("Next line is emptyNext line is empty with whitespaceSee?", renderedString)
end
---
-- Checks that "<whitespace>" tags are replaced as expected.
--
function TestStringRenderer:testCanReplaceWhitespaceTags()
-- Test A: <whitespace> (Should result in " ")
local pathMock = self.dependencyMocks.path
local renderer = self:createTestInstance("/final")
local renderedString
local templateMockA = self:getMock(
"AC-LuaServer.Core.Output.Template.Template", "TemplateMockA"
)
templateMockA.getTemplatePath
:should_be_called()
:and_will_return("WhitespaceUsageA")
:and_then(
pathMock.exists
:should_be_called_with("/final/AC-LuaServer/Templates/WhitespaceUsageA.template")
:and_will_return(true)
)
:and_also(
templateMockA.getTemplateValues
:should_be_called()
:and_will_return({})
)
:and_then(
self:expectLuaRestyTemplateEngineRendering(
"/final/AC-LuaServer/Templates/WhitespaceUsageA.template",
{ getAbsoluteTemplatePath = function(_value)
return (type(_value) == "function")
end
},
"Whitespace in separate line upcoming:\n<whitespace>\nDone"
)
)
:when(
function()
renderedString = renderer:render(templateMockA)
end
)
self:assertEquals("Whitespace in separate line upcoming: Done", renderedString)
-- Test B: <whitespace:4> (Should result in " ")
local templateMockB = self:getMock(
"AC-LuaServer.Core.Output.Template.Template", "TemplateMockB"
)
templateMockB.getTemplatePath
:should_be_called()
:and_will_return("WhitespaceUsageB")
:and_then(
pathMock.exists
:should_be_called_with("/final/AC-LuaServer/Templates/WhitespaceUsageB.template")
:and_will_return(true)
)
:and_also(
templateMockB.getTemplateValues
:should_be_called()
:and_will_return({})
)
:and_then(
self:expectLuaRestyTemplateEngineRendering(
"/final/AC-LuaServer/Templates/WhitespaceUsageB.template",
{ getAbsoluteTemplatePath = function(_value)
return (type(_value) == "function")
end
},
"Multiple whitespaces in a row:\n<whitespace:5>\nCool!"
)
)
:when(
function()
renderedString = renderer:render(templateMockB)
end
)
self:assertEquals("Multiple whitespaces in a row: Cool!", renderedString)
end
---
-- Checks that the StringRenderer handles non existing templates as expected.
--
function TestStringRenderer:testCanHandleTemplateNotExisting()
local pathMock = self.dependencyMocks.path
local renderer = self:createTestInstance("/custom/stuff")
local renderedString
local templateMock = self:getMock(
"AC-LuaServer.Core.Output.Template.Template", "TemplateMock"
)
templateMock.getTemplatePath
:should_be_called()
:and_will_return("NotFound404")
:and_then(
pathMock.exists
:should_be_called_with("/custom/stuff/AC-LuaServer/Templates/NotFound404.template")
:and_will_return(false)
)
:and_also(
templateMock.getTemplateValues
:should_be_called()
:and_will_return({})
)
:and_then(
self:expectLuaRestyTemplateEngineRendering(
"NotFound404",
{ getAbsoluteTemplatePath = function(_value)
return (type(_value) == "function")
end
},
"You gave me a wrong path"
)
)
:when(
function()
renderedString = renderer:render(templateMock)
end
)
self:assertEquals("You gave me a wrong path", renderedString)
end
---
-- Checks that custom template base paths can be configured as expected.
--
function TestStringRenderer:testCanConfigureCustomTemplateBasePaths()
local pathMock = self.dependencyMocks.path
local renderer = self:createTestInstance("/custom/stuff")
-- Configure some custom template base paths
renderer:configure({
templateBaseDirectoryPaths = {
"/more/templates/",
"my-templates-relative/path/"
}
})
local renderedString
-- Case A: Template does not exist
local templateMock = self:getMock(
"AC-LuaServer.Core.Output.Template.Template", "TemplateMock"
)
templateMock.getTemplatePath
:should_be_called()
:and_will_return("CommandList")
:and_then(
pathMock.exists
:should_be_called_with("/more/templates/CommandList.template")
:and_will_return(false)
)
:and_then(
pathMock.exists
:should_be_called_with("my-templates-relative/path/CommandList.template")
:and_will_return(false)
)
:and_then(
pathMock.exists
:should_be_called_with("/custom/stuff/AC-LuaServer/Templates/CommandList.template")
:and_will_return(false)
)
:and_also(
templateMock.getTemplateValues
:should_be_called()
:and_will_return({})
)
:and_then(
self:expectLuaRestyTemplateEngineRendering(
"CommandList",
{ getAbsoluteTemplatePath = function(_value)
return (type(_value) == "function")
end
},
"Template not found"
)
)
:when(
function()
renderedString = renderer:render(templateMock)
end
)
self:assertEquals("Template not found", renderedString)
-- Case B: Template exists in one of the custom directories
templateMock = self:getMock(
"AC-LuaServer.Core.Output.Template.Template", "TemplateMock"
)
templateMock.getTemplatePath
:should_be_called()
:and_will_return("MapScoreManager/MapTop")
:and_then(
pathMock.exists
:should_be_called_with("/more/templates/MapScoreManager/MapTop.template")
:and_will_return(false)
)
:and_then(
pathMock.exists
:should_be_called_with("my-templates-relative/path/MapScoreManager/MapTop.template")
:and_will_return(true)
)
:and_also(
templateMock.getTemplateValues
:should_be_called()
:and_will_return({})
)
:and_then(
self:expectLuaRestyTemplateEngineRendering(
"my-templates-relative/path/MapScoreManager/MapTop.template",
{ getAbsoluteTemplatePath = function(_value)
return (type(_value) == "function")
end
},
"No map scores found for this map"
)
)
:when(
function()
renderedString = renderer:render(templateMock)
end
)
self:assertEquals("No map scores found for this map", renderedString)
end
---
-- Returns the expectations for when a template is rendered using the lua-resty-template dependency.
--
-- @tparam string _templatePath The expected template path
-- @tparam mixed[] _templateValues The expected template values
-- @tparam string _returnValue The value that will be returned as rendered template string
--
-- @treturn table The expectations
--
function TestStringRenderer:expectLuaRestyTemplateEngineRendering(_templatePath, _templateValues, _returnValue)
local LuaRestyTemplateEngineMock = self.dependencyMocks.LuaRestyTemplateEngine
local compiledTemplateFunctionMock = self.mach.mock_function("compiledTemplate")
return LuaRestyTemplateEngineMock.compile
:should_be_called_with(_templatePath)
:and_will_return(compiledTemplateFunctionMock)
:and_then(
compiledTemplateFunctionMock.should_be_called_with(
self.mach.match(
_templateValues,
function(_expectedTemplateValues, _actualTemplateValues)
self:assertEquals(
tablex.keys(_templateValues),
tablex.keys(_actualTemplateValues)
)
for key, expectedTemplateValue in pairs(_expectedTemplateValues) do
local actualTemplateValue = _actualTemplateValues[key]
if (type(expectedTemplateValue) == "function") then
if (expectedTemplateValue(actualTemplateValue) == false) then
-- Custom matcher did not match
return false
end
else
if (expectedTemplateValue ~= actualTemplateValue) then
return false
end
end
end
return true
end
)
)
:and_will_return(_returnValue)
)
end
---
-- Creates and returns a StringRenderer instance.
--
-- @tparam string _sourceDirectoryPath The source directory path to inject into the StringRenderer instance
--
-- @treturn StringRenderer The created StringRenderer instance
--
function TestStringRenderer:createTestInstance(_sourceDirectoryPath)
local StringRenderer = self.testClass
local PathMock = self.dependencyMocks.Path
local stringRenderer
PathMock.getSourceDirectoryPath
:should_be_called()
:and_will_return(_sourceDirectoryPath)
:when(
function()
stringRenderer = StringRenderer()
end
)
return stringRenderer
end
return TestStringRenderer
|
local GLayer = require("graphic.core.GLayer");
local ProtocolLayer = class("ProtocolLayer", GLayer)
function ProtocolLayer:ctor()
GLayer.ctor(self)
end
function ProtocolLayer:init()
GLayer.init(self)
local go = self:loadUiPrefab("Sandbox/Prefabs/UI/gm.prefab")
local t = self:getInfo()
local btn = go.transform:Find("send").gameObject
self:registerClick(btn)
local contentGo = go.transform:Find("ScrollView/Viewport/Content").gameObject
contentGo:GetComponent(typeof(RectTransform)).sizeDelta = Vector2(0, #t*30)
local imageGo = contentGo.transform:Find("Image").gameObject
for i,v in ipairs(t) do
local go = GameObject.Instantiate(imageGo)
go.transform:SetParent(contentGo.transform, false)
go:GetComponent(typeof(RectTransform)).anchoredPosition = Vector2(0, 15-30*i)
local textGo = go.transform:Find("GameObject").gameObject
textGo:GetComponent(typeof(UI.Text)).text = v.name.." "..v.args
if i%2 == 0 then
go:GetComponent(typeof(UI.Image)).color = Color(245/255,245/255,245/255,1)
textGo:GetComponent(typeof(UI.Text)).color = Color(130/255,130/255,130/255,1)
else
go:GetComponent(typeof(UI.Image)).color = Color(210/255,210/255,210/255,1)
textGo:GetComponent(typeof(UI.Text)).color = Color(83/255,83/255,83/255,1)
end
end
imageGo:SetActive(false)
self._rootGo = go
self:bindTouchHandler()
end
function ProtocolLayer:getInfo()
local t = {}
for m,v in pairs(protocol) do --偷懒做法,假设协议二层结构
if m ~= "push" then --推送消息不能发送
for n,w in pairs(v) do
table.insert(t, w)
end
end
end
table.sort(t, function(a, b) return a.name < b.name end )
self._protocls = t;
return t;
end
function ProtocolLayer:OnPointerClick(data)
local go = self._rootGo.transform:Find("ScrollView/Viewport").gameObject
local rect = go:GetComponent(typeof(RectTransform))
local isOk, pos = RectTransformUtility.ScreenPointToLocalPointInRectangle(rect, data.position, data.pressEventCamera)
if isOk then
if rect.rect:Contains(pos) == true then
local go = self._rootGo.transform:Find("ScrollView/Viewport/Content").gameObject
local isOk, pos = RectTransformUtility.ScreenPointToLocalPointInRectangle(go:GetComponent(typeof(RectTransform)), data.position, data.pressEventCamera)
if isOk then
local i = math.floor(math.abs(pos.y)/30) + 1
local go = self._rootGo.transform:Find("input").gameObject
local input = go:GetComponent(typeof(UI.InputField))
input.text = self._protocls[i].name.." "..self._protocls[i].args
end
end
end
end
function ProtocolLayer:handleClick(name)
if name == "send" then
self:send()
end
end
function ProtocolLayer:handleGuide(name, callback)
if name == guide.test.func.name then
self:test()
end
--这两个函数都行
--GLayer.handleGuide(self, name, callback)
g_tools:delayOneFrame(callback)
end
function ProtocolLayer:test()
print("ProtocolLayer:test")
local go = self._rootGo.transform:Find("input").gameObject
local input = go:GetComponent(typeof(UI.InputField))
input.text = "just test guide"
end
function ProtocolLayer:send()
local go = self._rootGo.transform:Find("input/Text").gameObject
local str = go:GetComponent(typeof(UI.Text))
local list = string.split(str, " ")
local p = {}
p.name = list[1]
p.args = list[2]
table.remove(list,1)
table.remove(list,1)
--判断下%个数与参数是否相等.
network.requestWithError( nil, p, unpack(list) )
end
return ProtocolLayer
|
local dap = require('dap')
dap.adapters.lldb = {
type = 'executable',
command = '/usr/local/bin/lldb-vscode', -- adjust as needed
name = "lldb"
}
dap.configurations.cpp = {
{
name = "Launch",
type = "lldb",
request = "launch",
--[[ program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end, ]]
program = '${fileBasenameNoExtension}',
cwd = '${workspaceFolder}',
stopOnEntry = false,
args = {},
-- if you change `runInTerminal` to true, you might need to change the yama/ptrace_scope setting:
--
-- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
--
-- Otherwise you might get the following error:
--
-- Error on launch: Failed to attach to the target process
--
-- But you should be aware of the implications:
-- https://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html
runInTerminal = false
}
}
-- If you want to use this for rust and c, add something like this:
dap.configurations.c = dap.configurations.cpp
dap.configurations.rust = {
{
type = "lldb",
name = "Debug Rust",
request = "launch",
program = "${fileBasenameNoExtension}",
cwd = '${workspaceFolder}/target/debug/'
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.