content stringlengths 5 1.05M |
|---|
include("shared.lua")
function ENT:ShouldActivate()
return not mgn.HideCVar:GetBool() and (self:GetEnabled() or GetGlobalBool("mgn_alarms_enabled", false))
end
function ENT:Think()
if self:ShouldActivate() then
self.Sound = CreateSound(self, "alarm_citizen_loop1")
self.Sound:Play()
elseif self.Sound then
sel... |
package("nana")
set_homepage("http://nanapro.org")
set_description("A modern C++ GUI library.")
add_urls("https://github.com/cnjinhao/nana/archive/v$(version).tar.gz",
"https://github.com/cnjinhao/nana.git")
add_versions("1.6.2", "5f5cb791dff292e27bfa29d850b93f809a0d91d6044ea7e22ce7ae76a5... |
#!/usr/bin/env lua
SDL = require'SDL2'
require'SDL2.version'
major, minor, patch = SDL.GetVersion()
revision = SDL.GetRevision()
print(string.format('SDL %d.%d.%d %s', major, minor, patch, revision))
|
-- Copyright 2021 SmartThings
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in ... |
Citizen.CreateThread(function()
AddTextEntry('modelname', 'nametoadd')
end)
|
#!/usr/bin/env tarantool
local inspector = require('test_run').new()
print('create instance')
print(inspector:cmd("create server replica with rpl_master=default, script='box/box.lua'\n"))
print('start instance')
print(inspector:cmd('start server replica'))
inspector:cmd('stop server replica')
os.exit(0)
|
BottomBar = LCS.class{}
function BottomBar:init()
self.window = Window:New {
parent = screen0,
caption = "",
x = 0,
right = 500,
bottom = 0,
resizable = false,
draggable = false,
width = 400,
height = SB.conf.BOTTOM_BAR_HEIGHT,
padding... |
-- サウンドノベル風文字列描画基本
-- 文字のサイズ
local MOJI_SIZE = 24
local DrawPointX, DrawPointY -- 文字列描画の位置
local String =
" ゲームプログラムとは、いやプログラムとは" ..
"ある事柄を実現するプログラムの方法を説明されても理解できないことがある。B" ..
"@ なぜならそのプログラム技法も何かの基本的な技法の組み合わせで出来ているからだ。B" ..
"@ これはその他の学問も基本がわからないと応用が利かないということと同じ現象で、" ..
"別に特に珍しいことでもない。B" ..
"C しかしゲームプログラムとなると覚え... |
--[[
This module gives aliases for some common well known message ids.
The aliases are taken from `sd_messages.h`.
Information about these message ids can be found in the system catalog in /usr/lib/systemd/catalog/
]]
local id128 = require "systemd.id128"
local messages = {}
messages.JOURNAL_START = id128.f... |
return [[lapis = require "lapis"
class extends lapis.Application
"/": =>
"Welcome to Lapis #{require "lapis.version"}!"
]]
|
--- Functionality for manipulating textures and images.
--
module("vn.imagefx", package.seeall)
local function waitForTask(task)
local maxWaitFrames = 3600 -- 60 seconds @ 60 Hz
local frame = 0
while not task:isAvailable() and not task:isFailed() and frame < maxWaitFrames do
Log.debug("Waiting fo... |
newoption
{
trigger = "srcds-path",
value = "path",
description = "Path to your srcds installation. Used for debugging and binary deployment."
}
solution "SizzlingPlugins"
basedir ".."
location (_ACTION)
startproject "sizzlingstats"
platforms "x32"
vectorex... |
--
-- Simple OSD file browser and launcher plugin for mpv.
--
-- Source: https://github.com/fhlfibh/simple-loader
-- License: public domain
--
local utils = require 'mp.utils'
-- Here to change default top-level directory "/tmp" (no trailing slash):
local top_dir = mp.get_opt("top-dir") or "/tmp"
local current_dir =... |
local rules = require "scripts.rules"
local animations = require "character.animations"
local Character = require "character.character"
local ComeInnPatron = Character:new()
function ComeInnPatron:new(o, control)
o = o or Character:new(o, control)
setmetatable(o, self)
self.__index = self
return o
end
funct... |
select(2, ...) 'Shared.UTF8'
local casing = require 'Shared.UTF8.Casing'
local charsets = require 'Shared.UTF8.Charsets'
------------------------------------------
-- Locals
------------------------------------------
local maxAscii = 127
local function CodePoint(string, offset)
offset = offset or 1
local char ... |
---------------------------------------------
-- Abominable Belch
-- Description: inflicts all targets in an area of effect with silence, paralysis and plague.
-- Radial
-- Ignores Shadows
---------------------------------------------
require("scripts/globals/monstertpmoves")
require("scripts/globals/status")
---------... |
return {
version = "1.5",
luaversion = "5.1",
tiledversion = "1.7.2",
orientation = "orthogonal",
renderorder = "right-down",
width = 20,
height = 41,
tilewidth = 16,
tileheight = 16,
nextlayerid = 5,
nextobjectid = 75,
properties = {},
tilesets = {
{
name = "dungeon-tileset",
... |
local MLP={};
function MLP.transfer(x)
return 1/(math.exp(-x)+1);
end
function MLP.init(_learningRate)
MLP.learningRate=_learningRate;
MLP.layerCount=0;
end
function MLP.addLayer(_neuronCount)
local layerIndex=MLP.layerCount+1;
MLP[layerIndex]={};
MLP[layerIndex].neuronCount=_neuronCount;
for i=1, MLP[la... |
-- Copyright (C) Mashape, Inc.
local BaseController = require "kong.api.routes.base_controller"
local BasicAuthCredentials = BaseController:extend()
function BasicAuthCredentials:new()
BasicAuthCredentials.super.new(self, dao.basicauth_credentials, "basicauth_credentials")
end
return BasicAuthCredentials
|
--[[
Copyright © 2017-2018 Darius "DPlay" K.
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See the COPYING file for more details.
]]
return function(DBG)
-- If you want to use the DBG as an error-h... |
local T = {}
local function unique(x, y, optargs)
local expander = require 'Q/OPERATORS/UNIQUE/lua/expander_unique'
assert(x, "no arg x to unique")
assert(type(x) == "lVector", "x is not lVector")
if y then
assert(type(y) == "lVector", "y is not lVector")
assert(y:qtype() == "B1", "y is not of type B1")... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:28' using the latest game version.
NOTE: This file should only be used as IDE support; it should NOT be distributed with addons!
****************************************************************************
CONTENTS OF THIS FILE IS COPYRI... |
require "game.scene.Global"
local skynet = require "skynet"
local Ac = require "Action"
local ECS = require "ECS"
local BP = require "Blueprint"
local SceneConst = require "game.scene.SceneConst"
local SceneHelper = require "game.scene.SceneHelper"
RequireAllLuaFileInFolder("./game/scene/system")
local SceneMgr = Bas... |
if not modules then modules = { } end modules['s-math-ligatures'] = {
version = 1.001,
comment = "companion to s-math-ligatures.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files"
}
moduleda... |
local _, p1xelUI = ...
local m = p1xelUI:CreateModule("Misc")
local eventHandler = CreateFrame("Frame", nil, UIParent)
eventHandler:SetScript("OnEvent", function(self, event, ...)
return self[event](self, ...)
end)
function m:OnLoad()
self:Settings()
end
function m:Settings()
SetCVar("autoDismountFlying"... |
local kernel = {}
kernel.language = "glsl"
kernel.category = "filter"
kernel.name = "wobble"
kernel.isTimeDependent = true
kernel.vertexData =
{
{
name = "amplitude",
default = 10,
-- min ?
-- max ?
index = 0, -- a_UserData.x
},
}
kernel.vertex =
[[
P_POSITION vec2 VertexKernel( P_POSITION vec2 positi... |
local modname = ...
local M = {}
_G[modname] = M
local reverseBytes = {
0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe... |
-- This policy enables Web socket pass through on APIcast
local _M = require('apicast.policy').new('Websocket', 'builtin')
local new = _M.new
function _M.new(configuration)
local policy = new(configuration)
return policy
end
local function is_websocket_connection()
local headers = ngx.req.get_headers()
retu... |
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md
--
-- Description: Check that SDL correctly processes RPC after PTU via HMI was performed
--
-- Preconditions:
-... |
local awful = require("awful")
local naughty = require("naughty")
local beautiful = require("beautiful")
-- FUNCTIONS
-- ============================================================================
-- Hide notification
function ... |
function love.conf(win)
win.title = 'Steve Run'
win.window.width = 800
win.window.height = 400
-- win.window.borderless = true
-- win.window.fullscreen = true
end |
local main_dict = require 'metainfo'
local function apply_vars(str, dict)
local out = str:gsub("[$][{].-[}]", function(expr)
local var = expr:match("[{](.-)[}]")
return main_dict[var] or dict and dict[var]
end)
return out
end
local function get_theme_part(part)
local filepath = "_source/template/" ..... |
--[[
Simple, easy to use class system, single inheritance only.
Each class must be implemented in its own module
To create a _class_ (not an instance), call new_class( class_name, superclass_name )
To create an instance, call new_instance( class_name )
--]]
module( ..., package.seeall )
local sf = string.format
local... |
--[[
mysql - 1.0.3
A simple MySQL wrapper for Garry's Mod.
Alexander Grist-Hucker
http://www.alexgrist.com
The MIT License (MIT)
Copyright (c) 2014 Alex Grist-Hucker
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Softwa... |
local K, C = unpack(KkthnxUI)
local Module = K:GetModule("Unitframes")
local _G = _G
local select = select
local CreateFrame = _G.CreateFrame
function Module:CreateTarget()
self.mystyle = "target"
local targetWidth = C["Unitframe"].TargetHealthWidth
local targetHeight = C["Unitframe"].TargetHealthHeight
local t... |
--
-- ClassMods Options
--
ClassMods.Options = {}
ClassMods.Options.fontFlagTable = {}
local L = LibStub("AceLocale-3.0"):GetLocale("ClassMods")
function ClassMods.Options:SetupFontFlags(db, keyname, state)
local t = { strsplit(",", db[3]) }
if tContains(t, keyname) and (state == false) then
tremove(t, ClassMods.... |
foo = "bar"
_G.foo = "bar"
_G["foo"] = "bar"
value1 = 'x'
value2 = 'y'
value3 = 'z'
for i = 1,3 do
print ("value" .. i .. ": " .. _G["value" .. i])
end |
--[[ =================================================================
Description:
All strings (Russian) used by MailTips.
================================================================= --]]
-- Strings used within MailTips
if (GetLocale()=="ruRU") then
end;
|
local spec_helper = require "spec.spec_helpers"
local http_client = require "kong.tools.http_client"
local PROXY_URL = spec_helper.PROXY_URL
describe("CORS Plugin", function()
setup(function()
spec_helper.prepare_db()
spec_helper.insert_fixtures {
api = {
{ name = "tests cors 1", inbound_dns ... |
local IC
local TotalPoidsCr
local CoffreText
local lastvehicle
local PoidsCoffreMax = {}
PoidsCoffreMax[0] = 30.0
PoidsCoffreMax[1] = 60.0
PoidsCoffreMax[2] = 80.0
PoidsCoffreMax[3] = 50.0
PoidsCoffreMax[4] = 40.0
PoidsCoffreMax[5] = 20.0
PoidsCoffreMax[6] = 20.0
PoidsCoffreMax[7] = 10.0
PoidsCoffreMax[8] = 2.0
PoidsCo... |
-- require'nvim-lsp-installer'.on_server_ready(function(server)
-- local opts = {}
--
-- -- (optional) Customize the options passed to the server
-- -- if server.name == "tsserver" then
-- -- opts.root_dir = function() ... end
-- -- end
--
-- -- This setup() function is exactly the same as... |
local tty
local exec
local child
local shell
function init()
tty = tonumber(kernel.getenv("tty"))
exec = kernel.getenv("exec")
shell = tonumber(kernel.getenv("shell"))
child = kernel.exec(exec, {
tty = tostring(tty)
})
if child > 0 then
kernel.send(tty, {app_started=child, app... |
return {'yuri','yurt','yuris'} |
defines {
"rsc_FullName=\"SilentPatch for The Wonderful 101: Remastered\"",
"rsc_MinorVersion=0",
"rsc_RevisionID=2",
"rsc_BuildID=0",
"rsc_Copyright=\"2020\"",
"rsc_UpdateURL=\"https://github.com/CookiePLMonster/SilentPatchW101/releases\""
} |
local luaunit = require "luaunit"
package.path = package.path .. ";lua/?.lua"
local gltf = require "scene.gltf"
local sample_dir = os.getenv "GLTF_SAMPLE_MODELS"
function TestGltf()
local path = sample_dir .. "/2.0/Cube/glTF/Cube.gltf"
local loader = gltf.GltfLoader.from_path(path)
luaunit.assertEquals(#lo... |
function test_is_owner()
if (chainhelper:is_owner())
then
chainhelper:log("contract.caller == contract.owner")
else
chainhelper:log("contract.caller != contract.owner")
end
end |
local teleports = {
[2250] = Position(32915, 32263, 14),
[2251] = Position(32946, 32270, 13),
[2252] = Position(32976, 32270, 14),
[2253] = Position(32933, 32282, 13),
[2254] = Position(32753, 32344, 14),
[2255] = Position(32753, 32344, 14)
}
function onStepIn(creature, item, position, fromPosition)
local playe... |
local Join = require('./join')
local timer = require('timer')
local j
local pp = require('utils').prettyPrint
j = Join:new()
local printNum = function (i)
local printNow = function (cb)
cb(i, nil, 'cool')
end
local printLater = function (next)
timer.setTimeout(100, function ()
printNow(next)
... |
project "nativefiledialog"
kind "StaticLib"
language "C++"
shared.includedirs "nativefiledialog/src/include"
if os.target() == "windows" then
files {
"nativefiledialog/src/nfd_common.c",
"nativefiledialog/src/nfd_win.cpp"
}
elseif os.target() == "linux" then
files {
"nativefiledialog/... |
local _ = function(k, ...) return ImportPackage("i18n").t(GetPackageName(), k, ...) end
local CUI = ImportPackage("cinematicui")
local taxibossTableIds = {}
AddRemoteEvent("taxiboss:setup", function(taxibossObjects)
taxibossTableIds = taxibossObjects
end)
AddEvent("OnKeyPress", function(key)
if key... |
fx_version "cerulean"
game "gta5"
lua54 "yes"
dependency "chat"
client_script "races_client.lua"
server_scripts {
"races_server.lua",
"port.lua"
}
ui_page "html/index.html"
files {
"html/index.css",
"html/index.html",
"html/index.js",
"html/reset.css"
} |
-- reliable message
-- 可靠消息
local skynet = require "skynet"
local json = require "cjson.safe"
local factory = require "bw.orm.factory"
local log = require "bw.log"
local id_producer -- function create mid
local notify -- function notify
local broadcasts = {} -- mid: msg
local queues = {} ... |
----------------------------------------------------------------------------------------------------
--
-- Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
--
-- SPDX-License-Identifier: Apache-2.0 OR MIT
--
--
-... |
local spec_helper = require "spec.spec_helpers"
local http_client = require "kong.tools.http_client"
local PROXY_URL = spec_helper.PROXY_URL
describe("CORS Plugin", function()
setup(function()
spec_helper.prepare_db()
spec_helper.insert_fixtures {
api = {
{ name = "tests-cors-1", request_host... |
msg = {"nema","broja", "deljivog", "sa"}
|
function fusc(n)
n = math.floor(n)
if n == 0 or n == 1 then
return n
elseif n % 2 == 0 then
return fusc(n / 2)
else
return fusc((n - 1) / 2) + fusc((n + 1) / 2)
end
end
function numLen(n)
local sum = 1
while n > 9 do
n = math.floor(n / 10)
sum = sum +... |
local radio = require('radio')
local jigs = require('tests.jigs')
local buffer = require('tests.buffer')
SRC_TEST_VECTOR = "\x00\x00\x00\x0a\x93\xa3\x66\x6f\x6f\xa3\x62\x61\x72\x7b\x00\x00\x00\x04\x93\xc3\xc2\xc3\x00\x00\x00\x09\x92\x93\x01\x02\x03\xa3\x62\x61\x7a"
describe("RawFileSource", function ()
it("test v... |
--TODO: refactor this mess
t = Def.ActorFrame{}
local barXP1 = (capWideScale(get43size(384),384))-153
local barYP1 = 310+capWideScale(get43size(120),120)
local playerDistY = 95
local barXP2 = 157
local barYP2 = barYP1+playerDistY
local barWidth = capWideScale(get43size(333),333)-(barXP1-capWideScale(get43size(barX... |
-- Only add placement for the Everest memorial
-- Everest version allows custom dialog and sprite
local defaultMemorialTexture = "scenery/memorial/memorial"
local memorial = {}
memorial.name = "memorial"
memorial.depth = 100
memorial.texture = defaultMemorialTexture
memorial.justification = {0.5, 1.0}
local everest... |
local PANEL = {}
function PANEL:Init()
self.Label = vgui.Create( "DLabel", self )
self.Label:SetText( "" )
self.Label:SetDark( true )
end
function PANEL:SetConVar( cvar )
self.ConVarValue = cvar
end
function PANEL:ConVar()
return self.ConVarValue
end
function PANEL:ControlValues( kv )
... |
local targetPlatform = cc.Application:getInstance():getTargetPlatform()
local sceneID =
{
"AMTestScene1",
"AMTestScene2",
"AMTestScene3",
}
local sceneManifests =
{
"Manifests/AMTestScene1/project.manifest",
"Manifests/AMTestScene2/project.manifest",
"Manifests/AMTestScene3/project.manif... |
local clown = nil
function create( )
clown = createPed(264, 356.2978515625, 181.873046875, 1008.37)
setPedRotation(clown, 271.4609375)
setElementDimension(clown, 125)
setElementInterior(clown, 3)
setElementData( clown, "talk", 1 )
setElementData( clown, "name", "Mr. Clown" )
end
function destroy( )
... |
-- > Gradient functions
--- @title:
--- GNLib.DrawRectGradient: <function> Draw a rectangle gradient from multiple colors vertically or horizontally
--- @params:
--- x: <number> X position
--- y: <number> Y position
--- w: <number> Width
--- h: <number> Height
--- vertical: <bool> Whenever the gradie... |
require('src/test')
require('src/core')
require('src/builtins')
require('src/contextlib')
require('src/itertools')
require('src/logic')
require('src/objects')
require('src/string')
require('src/system')
describe('builtins',
it('all', function()
assert(all({true, true, true}), 'All - table of booleans')
ass... |
function love.conf(t)
t.window.width = 1920
t.window.height = 1080
t.window.title = "Outlook" -- The window title (string)
t.window.icon = nil -- Filepath to an image to use as the window's icon (string)
t.window.resizable = false -- Let the window be user-resizable (boolean)
... |
-- These are global, but when running in a tee'd vm they will only
-- be global to the game vm.
local tcpserve = require("app.dataserver")
local url = require("lua.url")
local json = require("lua.json")
local utils = require("lua.utils")
-- /game/leave?name={game_name}&uid={user_id}
api_gameLeav... |
-- @TODOUA: probably gut this or even rm it. May move some to utils
-- Based on johann2357/nvim-smartbufs: https://git.io/J6dTY - Updated using current 20-Oct-2021 Lua API
local M = {}
--- Checks whether the buffer is valid.
-- Checks if buffer is valid and listed.
-- @param buf_id buffer id to be checked.
-- @treturn... |
local tbTable = GameMain:GetMod("_SkillScript")
local tbSkill = tbTable:GetSkill("NXFX")
function tbSkill:FightBodyApply(skilldef, fightbody, from)
if is_WSJ and fightbody and fightbody.Npc then
fightbody.Npc:AddModifier("NXFX")
end
end |
return Def.ActorFrame {
Def.Quad {
InitCommand = function(self)
self
:diffuse(color("#000000"))
:stretchto(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM)
end,
StartCommand = function(self)
self
:diffusealpha(0)
:sleep(1)
:linear(0.5)
:diffusealpha(1)
end,
FinishCommand = ... |
Weapon.PrettyName = "Colt Python"
Weapon.WeaponID = "m9k_coltpython"
Weapon.DamageMultiplier = 4.1
Weapon.WeaponType = WEAPON_SECONDARY |
SceneControl = SimpleClass(BaseControl)
function SceneControl:__init(...)
end
function SceneControl:__init_self()
end
function SceneControl:initEvent()
EventMgr:addListener(Define.On_Scene_Load_Begin,Bind(self.onSceneLoadBegin,self))
EventMgr:addListener(Define.On_Scene_Load_Finish,Bind(self.onSceneLoadEnd,sel... |
local machine = {}
machine.__index = machine
local function create_transition(name, to, initial)
return function(self, ...)
if self:can(name) then
local from = self._current or initial
if self["onbefore" .. name] then
local cancel = self["onbefore" .. name](self, name, from, to, ...)
... |
memory.usememorydomain("WRAM")
function position()
camx = mainmemory.read_s16_le(0x0620)
camy = mainmemory.read_s16_le(0x0622)
p1posx = mainmemory.read_s16_le(0x1101)
p1posy = mainmemory.read_s16_le(0x1181)
p2posx = mainmemory.read_s16_le(0x1105)
p2posy = mainmemory.read_s16_le(0x1185)
end
local function hpdisp... |
local Panel = {}
function Panel:Init()
end
function Panel:PerformLayout( intW, intH )
gui.OpenURL("http://cosmicgaming.net")
end
vgui.Register( "srp_QMenu_Website", Panel, "EditablePanel" )
|
local class = require('opus.class')
local Terminal = require('opus.terminal')
local UI = require('opus.ui')
local colors = _G.colors
UI.Embedded = class(UI.Window)
UI.Embedded.defaults = {
UIElement = 'Embedded',
backgroundColor = colors.black,
textColor = colors.white,
maxScroll = 100,
accelerators = {... |
include( 'translate.lua' )
include( 'player_class/player_base.lua' )
include( 'player_class/player_zombie.lua' )
include( 'animations.lua' )
include( 'items.lua' )
include( 'shared.lua' )
include( 'enums.lua' )
include( 'moddable.lua' )
include( 'tables.lua' )
include( 'weather.lua' )
include( 'cl_notice.lua' )
includ... |
local _, ADDONSELF = ...
-- Create Mirai Raid Frame
ADDONSELF.createMiraiRaid = function()
if ADDONSELF.window ~= nil then
ADDONSELF.window:Show()
return
end
local window = CreateFrame("Frame", "MiraiRaidFrame", UIParent)
-- window:Hide()
window:SetFrameStrata("DIALOG")
window:SetWidth(500)
window:SetHeig... |
-- flexdash_ui_checkbox.lua
local white = {1, 1, 1, 1}
local MOUSE_OFF = 1
local MOUSE_HOVER = 2
local MOUSE_DOWN = 3
local DIMMED = 4
local mouse_status = MOUSE_OFF
local old_mouse_status
local IS_CHECKED = 1
local IS_UNCHECKED = 2
flexdash_lib.num_click_spots = flexdash_lib.num_click_spots + 1
local is_me = flexda... |
local Concord = require("lib.concord")
local function none(e, other, sepX, sepY) end -- luacheck: ignore
return Concord.component(function(e, shape, tag, isSolid, isFriendly, callback)
e.shape = shape
e.tag = tag
e.isSolid = isSolid
e.isFriendly = isFriendly
e.callback = callback or none
end)
|
-- https://github.com/tpope/vim-fugitive
local nvim_set_keymap = vim.api.nvim_set_keymap
local opts = {noremap = true, silent = true}
nvim_set_keymap('n', '<leader>gs', ':Git<CR>', opts)
nvim_set_keymap('n', '<leader>ga', ':Git add %<CR>', opts)
nvim_set_keymap('n', '<leader>gc', ':Git commit<CR>', opts)
|
local math = require "math"
local floor = math.floor
local string = require "string"
local format = string.format
local table = require "table"
local _G = _G
local assert = assert
local error = error
local getmetatable = getmetatable
local next = next
local rawlen = rawlen
local rawget = rawget
local rawset = rawset... |
--[[
TheNexusAvenger
Mirrors the API of Roblox's PluginButton class.
--]]
local CLASS_NAME = "NexusPluginButton"
local NexusPluginFramework = require(script.Parent.Parent:WaitForChild("NexusPluginFrameworkProject")):GetContext(script)
local NexusWrappedInstance = NexusPluginFramework:GetResource("Base.NexusWrapped... |
require("Global")
local Actor_AudioActor = {}
function Actor_AudioActor:ReceiveBeginPlay()
CommandMap:AddCommand("SetSelfAudioAndPlay", self, self.SetSelfAudioAndPlay)
end
function Actor_AudioActor:SetSelfAudioAndPlay(audioPath)
local audio = LoadObject("/Game/Audio/" .. audioPath)
self.StoryAudio:SetSou... |
local corunning = coroutine.running
local function makeCloser(socket)
local closer = {
read = false,
written = false,
errored = false,
}
local closed = false
local function close()
if closed then return end
closed = true
if not closer.readClosed then
... |
return Recipe.new('Node')
|
--[[
Copyright (c) 2016-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory.
]]--
local argc... |
local animeTitles = loadfile('libs/anidbtitles.lua')()
local lastReload = tonumber(os.date('%V'))
local scores = {
main = 1,
syn = .8,
short = .5,
official = 1,
}
local THRESHOLD = 100
local insert = function(tbl, aid, weight)
weight = math.floor(weight)
if(weight < THRESHOLD) then return end
local title = an... |
local data = {}
UIDATASTATE = {}
UIDATASTATE.GET = function(path)
if #path == 0 then return data end
local obj = data
for i=1, #path-1 do
obj[path[i]] = obj[path[i]] or {}
obj = obj[path[i]]
end
return obj[path[#path]]
end
UIDATASTATE.PUT = function (path, new_data)
if #path ... |
local StateManager = require("CoreLib.State.StateManager")
local PlayerHUD = StateManager:CreateAsyncState("PlayerHUD")
function PlayerHUD:Start()
end
function PlayerHUD:Stop()
end
return PlayerHUD
|
object_tangible_saga_system_rewards_pgc_monitorscreen = object_tangible_saga_system_rewards_shared_pgc_monitorscreen:new {
}
ObjectTemplates:addTemplate(object_tangible_saga_system_rewards_pgc_monitorscreen, "object/tangible/saga_system/rewards/pgc_monitorscreen.iff")
|
local session={}
function session.main()
local res=httpevent.response
--local req=httpevent.request
--local route_data=httpevent.ROUTE
--local config_data = httpevent.CONFIG
--local form_tool= httpevent.form_tool
--local cookie_tool= httpevent.cookie_tool
local session_tool = httpevent.session_tool
loc... |
local Brain = require('game.bt.Brain')
local strClassName = 'game.brains.monster_1_fool'
local monster_1_fool = lua_declare(strClassName, lua_class(strClassName, Brain))
function monster_1_fool:ctor(owner)
Brain.ctor(self, owner, 'monster_1_fool')
end
function monster_1_fool:OnStart()
self.bt = BehaviourTre... |
ESX = nil
local businesses = {}
local blips = {}
local visibleBusinesses = {}
local enteredMarker = false
local enteredBusiness = nil
local PlayerData = {}
local drawDistance = 20.0
local markerSize = {x = 1.25, y = 1.25, z = 1.25}
local markerColor = {r = 0, g = 128, b = 255}
Citizen.CreateThread(function()
while ES... |
local tr = aegisub.gettext
script_name = tr("Add k tags")
script_description = tr("Add k tags to selected lines")
script_author = "domo"
script_version = "1.2"
include("unicode.lua")
function add_k1(subtitles, selected_lines, active_line)
k_type = "k1"
add_k(k_type,subtitles, selected_lines, active_line)
... |
-- global
vim.o.encoding = 'utf-8'
vim.o.guicursor = ''
vim.o.hlsearch = false
vim.o.hidden = true
vim.o.ignorecase = true
vim.o.smartcase = true
vim.o.errorbells = false
vim.o.backup = false
vim.cmd('set undodir=~/.vim/undo-dir')
vim.o.incsearch = true
vim.o.termguicolors = true
vim.o.scrolloff = 8
vim.o.showmode = fa... |
if not term.isColor() then
colors.red = colors.lightGray
colors.green = colors.lightGray
colors.brown = colors.lightGray
colors.blue = colors.lightGray
colors.cyan = colors.lightGray
colors.pink = colors.white
colors.lime = colors.lightGray
colors.yellow = colors.white
colors.lightBl... |
local server = require('test.luatest_helpers.server')
local t = require('luatest')
local g = t.group()
g.before_all = function()
g.server = server:new{
alias = 'default',
box_cfg = {memtx_use_mvcc_engine = true}
}
g.server:start()
end
g.after_all = function()
g.server:drop()
end
g.... |
--[[ Copyright (C) 2018 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope th... |
local sep = ":";
local toAnalyze = KEYS[1]
local resourcesPrefix = ARGV[1]
local collectionsPrefix = ARGV[2]
local resourceCount = 0
local resourcesSize = 0
local function analyzeChildrenAndItself(path)
if redis.call('exists',resourcesPrefix..path) == 1 then
local res_size = redis.call('hget', res... |
local shop = {}
local textbox = require "action.textbox"
local input = require "util.input"
local memory = require "util.memory"
local menu = require "util.menu"
local player = require "util.player"
local inventory = require "storage.inventory"
function shop.transaction(options)
local item, itemMenu, m... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.