content stringlengths 5 1.05M |
|---|
local lib = nil
if (love ~= nil) then
lib = love
elseif (lutro ~= nil) then
lib = lutro
end
-- Configuration
function lib.conf(t)
-- Application metadata
t.title = 'Lutris'
t.author = 'Rob Loach'
t.version = '11.0'
t.identity = 'lutro-lutris'
t.description = "Lutris game launcher for RetroArch/Love2D"
t.wid... |
local g = vim.g
g.onedark_style = 'dark'
g.onedark_toggle_style_keymap = '<nop>'
g.onedark_italic_comment = false
g.onedark_darker_diagnostics = false
require'onedark'.setup()
vim.cmd'colorscheme onedark'
local colors = require'onedark.colors'
local hl = require'highlight'
hl.add{'Pmenu', guibg=colors.bg3}
hl.add{'Tab... |
util.AddNetworkString("ixTradeInvite")
util.AddNetworkString("ixTradeMenu")
util.AddNetworkString("ixTradeMenuAbort")
util.AddNetworkString("ixTradeSendItem")
util.AddNetworkString("ixTradeTakeItem")
util.AddNetworkString("ixTradeSyncItems")
util.AddNetworkString("ixTradeCancel")
util.AddNetworkString("ixTradeConfirm")... |
return PlaceObj("ModDef", {
"dependencies", {
PlaceObj("ModDependency", {
"id", "ChoGGi_Library",
"title", "ChoGGi's Library",
"version_major", 10,
"version_minor", 5,
}),
},
"title", "Remove Unwanted Colonists",
"id", "ChoGGi_RemoveUnwantedColonists",
"steam_id", "1594867237",
"pops_any_uuid", "f... |
local core = require 'graphics.core'
local sprite2d = require "sprite2d.core"
local texmgr = require "kite.manager.texture"
local fontmgr = require "kite.manager.font"
local program = (require "kite.manager.program").get_sprite_program()
local rotate = require "kite.util".rotate
local M = {}
------------------------... |
-----------------------
-- script/init.lua --
-----------------------
dofile "script/cforms.lua"
dofile "script/itypes.lua"
dofile "script/iforms.lua"
dofile "script/rforms.lua"
dofile "script/recipe.lua"
player {
name = "you";
max_health = 10;
attack = 3;
sight = 30;
}
|
return {
parse = require('esearch/vim/parse').parse,
render = require('esearch/vim/render').render,
util = require('esearch/shared/util'),
extract_headings = require('esearch/shared/outline').extract_headings,
}
|
ITEM.name = "Tactical Weapons Box (Standard)"
ITEM.class = {
"tactical"
}
ITEM.model = "models/Items/hevsuit.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.desc = "An Loot Box dropping standard issue items."
ITEM.category = "Loot Boxes"
ITEM.boxType = "Standard" // Standard, Superior, Mastercrafted, Relic, Mastercrafted Rel... |
--
-- Objeto com as funções principais do jogo
--
ForcaGame = {
letra = "", tam = 0, dica = "", palavra = {},
fase=0, ERRO = {}, ACERTOS = {},
WORD = {}, acertos = 0, letraspreenchidas = 0
}
function ForcaGame:new(forca) -- Instanciação do Objeto
forca = forca or {}
setmetatable(forca, self)
self.__... |
--[[ MOB SPAWN LIST
mob(<mob_spawner_alias>, <mob_id>, <mob_count>, <spawner_limit>, <spawn_interval>, <spawner_range>, <map_id>, <x_pos>, <y_pos>, <z_pos>);
--]]
mob("", 133, 1, 2, 15, 15, 26, 5094.42, 5554.02, 35.18);
mob("", 132, 2, 2, 15, 15, 26, 5094.42, 5554.02, 35.18);
mob("", 133, 1, 2, 14, 20, 26, 5167.97, 5... |
local serialization = require "util.serialization";
describe("util.serialization", function ()
describe("serialize", function ()
it("makes a string", function ()
assert.is_string(serialization.serialize({}));
assert.is_string(serialization.serialize(nil));
assert.is_string(serialization.serialize(1));
a... |
return [[Stormfox English
#StormFox
sf_description.newversion = You're running a beta version of SF
sf_description.oldversion = You're running an old version of SF
#Tool
sf_tool.menu = Menu
sf_tool.maptexture = Map Texture
sf_tool.maptexture.helpm1 = Press Mouse 1 to add material
sf_tool.maptexture.helpm2 = ... |
return {
"T10101",
"T10102",
"T10201",
"T10202",
"T10301",
"T10302",
"T10401",
"T10402",
"T20201",
"T20301",
"T30101",
"T30102",
"T30103",
"T30201",
"T30202",
"T30301",
"T30401",
"T30402",
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,... |
local policy = require('apicast.policy')
local _M = policy.new('keycloak_Authorizer', '1.0.0')
local resty_url = require('resty.url')
local MappingRule = require('apicast.mapping_rule')
local TemplateString = require('apicast.template_string')
local default_error_message = "Request blocked due to keycloak authorizatio... |
local viewportHandler = require("viewport_handler")
local tasks = require("task")
local mapcoder = require("mapcoder")
local celesteRender = require("celeste_render")
local sceneHandler = require("scene_handler")
local filesystem = require("filesystem")
local fileLocations = require("file_locations")
local sideStruct ... |
local autocrafterCache = {} -- caches some recipe data to avoid to call the slow function minetest.get_craft_result() every second
local craft_time = 1
local function count_index(invlist)
local index = {}
for _, stack in pairs(invlist) do
if not stack:is_empty() then
local stack_name = stack:get_name()
ind... |
local function help_topic(topic)
if topic == "clean" then
return [==[Usage:
grab clean
Clean package cache.]==]
elseif topic == "update" then
return [==[Usage:
grab update
Update package cache.]==]
elseif topic == "install" then
return [==[Usage:
grab install <PackageName... |
local T, C, L = Tukui:unpack()
local UnitFrames = T.UnitFrames
local Class = select(2, UnitClass("player"))
----------------------------------------------------------------
-- DeathKnight Class Resources
----------------------------------------------------------------
if (Class ~= "DEATHKNIGHT") then return end
local... |
return {
tcg = {
action = {
block = "UP: Block.",
declare_attack = "UP: Declare an attack.",
no_action_available = "There is no action available.",
put = "UP: Put the card.",
sacrifice = "Down: Sacrifice the card.",
surrender = "Surrender",
use_skill = "ENTER: Use the ski... |
return {'gander','gang','gangbaar','gangbaarheid','gangbangen','gangboord','gangdeur','gangenstelsel','gangetje','gangkast','gangklok','ganglia','ganglicht','ganglion','gangloper','gangmaker','gangmat','gangpad','gangreen','gangspil','gangstarapper','gangster','gangsterbaas','gangsterbende','gangsterfilm','gangsterrap'... |
object_ship_nova_orion_smuggler_heavy_tier6 = object_ship_shared_nova_orion_smuggler_heavy_tier6:new {
}
ObjectTemplates:addTemplate(object_ship_nova_orion_smuggler_heavy_tier6, "object/ship/nova_orion_smuggler_heavy_tier6.iff")
|
-- Called OnSpellStart
function ManaTransferStart(event)
local target = event.target
local caster = event.caster
local ability = event.ability
-- Talent that applies leash
local has_talent = false
local talent = caster:FindAbilityByName("special_bonus_unique_blood_mage_3")
if talent and talent:GetLevel() > 0 t... |
local h = require("null-ls.helpers")
local methods = require("null-ls.methods")
local DIAGNOSTICS = methods.internal.DIAGNOSTICS
return h.make_builtin({
method = DIAGNOSTICS,
filetypes = { "dockerfile" },
generator_opts = {
command = "hadolint",
format = "json",
args = { "--no-fail... |
cjson = require 'cjson'
local utils = {}
function utils.right_align(sequences, lengths)
local aligned = sequences:clone():fill(0)
local n = sequences:size(1) -- number of rows
local m = sequences:size(2) -- maximum length
for i = 1, n do
if lengths[i] > 0 then
aligned[i][{{m - le... |
local storyboard = {}
--http://www.elecbyte.com/mugendocs/storyboard.html
storyboard.t_storyboard = {} --stores all parsed storyboards (we parse each of them only once)
local function f_reset(t)
for k, v in pairs(t.scene) do
if t.scene[k].bg_name ~= '' then
bgReset(t.scene[k].bg)
end
for k2, v2 in pair... |
local array = require "util.array";
local utf8 = rawget(_G, "utf8") or require"util.encodings".utf8;
local len = utf8.len or function(s)
local _, count = s:gsub("[%z\001-\127\194-\253][\128-\191]*", "");
return count;
end;
local function getchar(n)
local stty_ret = os.execute("stty raw -echo 2>/dev/null");
local o... |
kBLACK=0
kDBLUE=1
kMAROON=2
kDGREEN=3
kBROWN=4
kDGRAY=5
kLGRAY=6
kWHITE=7
kRED=8
kORANGE=9
kYELLOW=10
kGREEN=11
kLBLUE=12
kSLATE=13
kPINK=14
kFLESH=15
function draw_grid()
for I = 0, 128,8 do
for J = 0, 128, 4 do
pset(I,J,kWHITE)
end
end
for J = 0, 128,8 do
for I = 0, 128, 4 do
pset(I,J... |
-- =========================================
-- ================ Engine =================
-- =========================================
project "Engine"
kind "StaticLib"
targetdir "%{wks.location}/bin/%{cfg.buildcfg}"
objdir "%{wks.location}/bin/%{cfg.buildcfg}"
location "%{wks.location}/"
... |
--[[
-- Copyright (c) 2006 Keith Howe <nezroy@luaforge.net>
--
-- 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,... |
Talk(70, "阿弥陀佛,施主请留步.", "talkname70", 0);
DarkScence();
jyx2_ReplaceSceneObject("", "NPC/xuanci", "");--玄慈追出山门
jyx2_ReplaceSceneObject("", "NPC/xuanci1", "1");--玄慈在山门
jyx2_ReplaceSceneObject("", "NPC/murongfu1", "1");--慕容复在山门
ModifyEvent(-2, 3, 1, 1, 515, -1, -1, 5372, 5372, 5372, -2, -2, -2);--by fanyu 启动脚本515,改变贴图 场景... |
return Device {
strManufacturer = "TeenyUSB",
strProduct = "TeenyUSB CDC5 DEMO",
strSerial = "TUSB123456",
idVendor = 0x0483,
idProduct = 0x0011,
prefix = "CDC_ACM5",
Config {
CDC_ACM{
EndPoint(IN(8), Interrupt, 16),
EndPoint(IN(1), BulkDouble, 32),
... |
function love.conf(t)
t.window.title = "Moonpie Template"
t.window.height = 768
t.window.width = 1024
t.window.vsync = 1
t.window.fullscreen = false
t.console = true
end
|
return {
{
desc = "主力舰队中战列、战巡只存在自己一艘时(可以有其他类型舰船)伤害提升10.0%",
addition = {
"10.0%(+2.2%)"
}
},
{
desc = "主力舰队中战列、战巡只存在自己一艘时(可以有其他类型舰船)伤害提升12.2%",
addition = {
"12.2%(+2.2%)"
}
},
{
desc = "主力舰队中战列、战巡只存在自己一艘时(可以有其他类型舰船)伤害提升14.4%",
addition = {
"14.4%(+2.2%)"
}
},
{
desc = "主力舰队中战列、战巡只存在... |
// Generated by github.com/davyxu/tabtoy
// Version: 2.8.10
module table {
export var TexasRoom : table.ITexasRoomDefine[] = [
{ Id : 1001, Desc : "初级", Type : 1, SBlind : 10, BBlind : 20, SBuyin : 0, BBuyin : 0, Tax : 0, Seat : 0, Pattern : 0, Cd : 0, ClientCd : 0, WaitingTime : 0 },
{ Id : 1002, Desc : "初级", Ty... |
local Const = require("api.Const")
local Gui = require("api.Gui")
local Event = require("api.Event")
local function play_hunger_sound(chara, params, result)
if not chara:is_player() then
return result
end
local nutrition = chara:calc("nutrition")
if nutrition < Const.HUNGER_THRESHOLD_HUNGRY then
... |
local ffi = require("ffi")
ffi.cdef([[
/*******************************************************************************************
*
* raygui v3.0 - A simple and easy-to-use immediate-mode gui library
*
* DESCRIPTION:
*
* raygui is a tools-dev-focused immediate-mode-gui library based on raylib but also... |
require "whetstone/whetstone"
WhetstoneBenchmark = class(BenchmarkBase, function(a, writer, printToConsole)
BenchmarkBase.init(a, writer, printToConsole)
a.name = "WhetstoneBenchmark"
a.ratio = 1
a.whetstone = Whetstone(printToConsole)
end)
function WhetstoneBenchmark:benchImplementation()
return ... |
local ptg_icon = data.raw.item["pipe-to-ground"].icon
local make_item = function(info)
local item = table.deepcopy(info.base)
item.name = info.name
item.place_result = info.name
item.icons = {{icon=info.base.icon, tint=info.tint}}
item.order = "a[" .. info.name .. "]"
return item
end
local flui... |
local Col = Color(20,20,20,220)
local Col2 = Color(20,50,20,250)
local x,y = ScrW()/2,ScrH()/2
local w = 700
function GM:ScoreboardShow()
self.ShowSB = true
end
function GM:ScoreboardHide()
self.ShowSB = false
end
function GM:HUDDrawScoreBoard()
if (!self.ShowSB) then return end
local NPly = #player.GetAl... |
m = Map("Network Overview", translate("Network Overview"))
m.pageaction = false
s = m:section(NamedSection, "__networkoverview__")
function s.render(self, sid)
local tpl = require "luci.template"
local json = require "luci.json"
local utl = require "luci.util"
tpl.render_string([[
<table class="table" style="bo... |
local fio = require('fio')
local tap = require('tap')
local test = tap.test('gh-5602')
local status, err = pcall(box.cfg, {background = false, vinyl_timeout = 70.1})
local listen_sock = fio.pathjoin(fio.cwd(), 'listen.sock')
local repl1_sock = fio.pathjoin(fio.cwd(), 'repl1.sock')
local repl2_sock = fio.pathjoin(fio... |
object_tangible_wearables_necklace_ith_necklace_ace_pilot_rebel_m = object_tangible_wearables_necklace_shared_ith_necklace_ace_pilot_rebel_m:new {
}
ObjectTemplates:addTemplate(object_tangible_wearables_necklace_ith_necklace_ace_pilot_rebel_m, "object/tangible/wearables/necklace/ith_necklace_ace_pilot_rebel_m.iff")
|
--[[ File
@description:
The functions included in this file are for ploting curves.
@version: V0.10
@author: Fangyi Zhang email:gzzhangfangyi@gmail.com
@acknowledgement:
ARC Centre of Excellence for Robotic Vision (ACRV)
Queensland Univsersity of Technology (QUT)
@history:
V0.00 23/06/2015 develope... |
--[[
More Blocks: Stairs+
Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
-- Nodes will be called <modname>:{stair,slab,panel,micro,slope}_<subname>
local modpath = minetest.get_modpath("moreblocks").. "/stairsplus"
stairsplus = {}
sta... |
--[[----------------------------------------------------------------------------
The Hopefully EMergent LIfeform (HEMLI) Project
Hemli.lua
------------------------------------------------------------------------------]]
local Hemli = {}
return Hemli |
function fib(n)
if n == 0 then
return 0
elseif n == 1 then
return 1
end
return fib(n-1) + fib(n-2)
end
function test_args(n)
res, err = sync_go_method('test_sum', 1,2,3,4,5,6,n)
if err == nil then
return res, nil
else
return n, err
end
end
function test... |
--
local M = {}
local default_size = cc.size(75, 25)
local font_size = 13
if require('cocos.framework.device').isMobile then
font_size = 30
end
---@param btn ccui.Button
------@param size size_table
local function set_size(btn, size)
btn:setContentSize(size)
require('cc.ui.helper').fixButtonLabel(btn)
end
... |
require 'nn'
local withCuda = pcall(require, 'cutorch')
require 'libvolstn'
if withCuda then
require 'libcuvolstn'
end
require('volstn.VolumetricGridGenerator')
require('volstn.BilinearSamplerVolumetric')
return nn
|
local R = require "rigel"
local SOC = require "generators.soc"
local C = require "generators.examplescommon"
local harness = require "generators.harnessSOC"
local G = require "generators.core"
local RS = require "rigelSimple"
local types = require "types"
local RM = require "generators.modules"
local SDF = require "sdf... |
require 'src.ship.ship_room'
require 'src.utils'
Ship = {}
function Ship:new()
local object = {
rooms = {},
items = {},
speed = 1,
fuelLevel = 100,
engineLeftBreak = false,
engineRightBreak = false,
}
setmetatable(object, { __index = Ship })
return objec... |
module( "event", package.seeall )
local Events = {}
function Register( tbl )
table.insert( Events, tbl )
end
function GetRandom()
return table.Random( Events )
end
|
local FunctionQueue = wickerrequire 'gadgets.functionqueue'
local postconstructs = setmetatable({}, {__mode = "k"})
TheMod:AddPrefabPostInitAny(function(inst)
local ps = postconstructs[inst]
if ps ~= nil then
postconstructs[inst] = nil
return ps(inst)
end
end)
local function AddPrefabPostConstruct(inst, fn... |
local i2cTest = {}
local tag = "i2cTest"
local i2cId
if MOD_TYPE == "air101" or MOD_TYPE == "air103" or MOD_TYPE == "air105" or
MOD_TYPE == "ESP32C3" then i2cId = 0 end
function i2cTest.test()
if i2c == nil then
log.error(tag, "this fireware is not support i2c")
return
end
-- AHT10
... |
require('carcassia_common')
require('constants')
require('fn')
require('map_events')
local map_id = "carcassia_c2"
local population = {"urchin", "_commoner", "drunk", "_farmer", "_noble"}
local function setup_special_features(map_id)
map_set_tile_property(map_id, 9, 47, "TILE_PROPERTY_ALLOWED_CREATURE_IDS"... |
local BadgeService = game:GetService('BadgeService')
local badges = {
welcome = 2124572597;
}
local Badge = {}
local cache = {}
function Badge.has(userId, badgeName)
assert(userId, 'Badge.award - Missing user id')
assert(badgeName, 'Badge.award - Missing badge name')
if not badges[badgeName] then
warn('"' ..... |
local gears = require("gears")
local awful = require("awful")
local wibox = require("wibox")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local taglist = {}
local taglist_padding = 22
local taglist_buttons = gears.table.join(
--awful.button({ }, 1, function(t) t:view_only()... |
require'nvim-treesitter.configs'.setup {
ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages
highlight = {
enable = true,
disable = {}
-- custom_captures = {["new_import"] = "CustomImportName"}
},
incremental_selection... |
function deep_print(t, indent)
if not indent then indent = 0 end
local indentString = ""
for i = 1, indent do
indentString = indentString .. " "
end
for k,v in orderedPairs(t) do
if type(v) == "table" then
print(indentString..k)
deep_print(v, indent + 1)
else
print(indentStrin... |
local K = unpack(select(2, ...))
local Module = K:NewModule("Blizzard")
function Module:OnEnable()
self:CreateUIWidgets()
self:CreateMirrorBars()
self:CreateAlertFrames()
self:CreateColorPicker()
self:CreateMirrorBars()
self:CreateNoBlizzardTutorials()
self:CreateRaidUtility()
end |
--[[
Copyright 2019 Manticore Games, Inc.
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, distrib... |
-- Automatically generated file: Jobs
return {
[0] = {id=0,en="None",ja="なし",ens="NON",jas=""},
[1] = {id=1,en="Warrior",ja="戦士",ens="WAR",jas="戦"},
[2] = {id=2,en="Monk",ja="モンク",ens="MNK",jas="モ"},
[3] = {id=3,en="White Mage",ja="白魔道士",ens="WHM",jas="白"},
[4] = {id=4,en="Black Mage",ja="黒魔... |
-- Local Vars/Funcs -----------------------------
local StringFind = string.find
local TimerCreate = timer.Create
local TimerSimple = timer.Simple
local Baddies = {gmod_ghost = true, acf_debris = true, prop_ragdoll = true, gmod_wire_hologram = true} -- Ignored by ACF
local function GetAncestor(Ent)
if not IsValid... |
--check alloys exist before adding them
if data.raw.item["bronze-alloy"] and data.raw.item["angels-plate-nickel"] then
data:extend(
{
{
type = "recipe",
name = "nickel-piercing-rounds-magazine",
enabled = false,
energy_required = 3,
ingredients =
{
{type = "item", nam... |
local obs = obslua
source_name = ''
boolean = true
function htk_1_cb(pressed)
if pressed then
toggle_source()
end
end
function toggle_source()
scenes = obs.obs_frontend_get_scenes()
for _,scene in pairs(scenes) do
scene_source = obs.obs_scene_from_source(scene)
items = obs.obs_scene... |
local params = {...}
local Dataframe = params[1]
local argcheck = require "argcheck"
local doc = require "argcheck.doc"
doc[[
## Row functions
]]
Dataframe.get_row = argcheck{
doc = [[
<a name="Dataframe.get_row">
### Dataframe.get_row(@ARGP)
Gets a single row from the Dataframe
@ARGT
_Return value_: A table ... |
local birdPath = {}
birdPath.name = "birdPath"
birdPath.depth = 0
birdPath.nodeLineRenderType = "line"
birdPath.texture = "characters/bird/flyup00"
birdPath.nodeLimits = {0, -1}
birdPath.placements = {
name = "bird_path",
data = {
only_once = false,
onlyIfLeft = false,
speedMult = 1.0
... |
local Clock = {}
Clock.__index = Clock
function Clock.os()
local self = setmetatable({}, Clock)
self.now = function (self)
return os.time()
end
self.diff_seconds = function (self, t2, t1)
return os.difftime(t2, t1)
end
return self
end
function Clock.virtual()
local self = setmetatable({}, Clock)
self.cu... |
--[[
Carbon for Lua
#class Math.ColorRGBA
#inherits Math.Color, Math.Vector<4>
#description {
Provides an RGB color class with alpha.
The loose form of a @ColorRGBA, `@loose<@ColorRGBA>` is of the form `(r, g, b, a)`.
}
]]
local Carbon = (...)
local Color = Carbon.Math.Color
local Vector4 = Carbon.Math.Vec... |
#!/usr/bin/env luajit
package.path = "../?.lua;../?/init.lua;" .. package.path
local gl = require 'glua'
local gui = require 'glua.gui'
gl.utInitDisplayString('rgba double depth>=16 samples~8')
gl.utInitWindowSize(400, 300)
gl.utInitWindowPosition(100, 100)
local window = gl.utCreateWindow("Simple")
gl.ClearColor... |
// Currency name
GM.CurrencyName = "Bone"
// BLOOD BLOOD BLOOD BLOOD
GM.BloodName = "BLOOD"
// Shop name and description - obsolete?
GM.ShopName = "UNCLE VIKTOR'S RUSSKI WEAPON SHOPPE"
GM.ShopDesc = "A HAPPY CUSTOMER IS A DEAD ONE!"
// Team names
GM.ArmyTeamName = "Unit 9"
GM.ZombieTeamName = "The Undead"
//... |
module(...,package.seeall)
--by nirenr
local function ps(str)
str = str:gsub("%b\"\"",""):gsub("%b\'\'","")
local _,f= str:gsub ('%f[%w]function%f[%W]',"")
local _,t= str:gsub ('%f[%w]then%f[%W]',"")
local _,i= str:gsub ('%f[%w]elseif%f[%W]',"")
local _,d= str:gsub ('%f[%w]do%f[%W]',"")
... |
--[[
--MIT License
--
--Copyright (c) 2019 manilarome
--Copyright (c) 2020 Tom Meyers
--
--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 ... |
GM.Jail = {}
GM.Jail.m_intLastTick = 0
function GM.Jail:PlayerSpawn( pPlayer )
if not pPlayer.m_bGamemodeDataLoaded or not GAMEMODE.Char:GetPlayerCharacter( pPlayer ) then return end --This player hasn't loaded in yet.
if self:IsPlayerInJail( pPlayer ) then
if self:GetJailTimeLeft( pPlayer ) > 0 then --throw them... |
--[[
# Element: Power Bar
Handles the updating of a status bar that displays the unit's power.
## Widget
Power - A `StatusBar` used to represent the unit's power.
## Sub-Widgets
.bg - A `Texture` used as a background. It will inherit the color of the main StatusBar.
## Notes
A default texture will be applied if ... |
--[[Main options from menu]]--
-- Makes itself an object --
local options = {}
-- Initializer function --
function options.initialize(loaderObj, screenObj, inputObj)
-- Loads called objects --
loader = loaderObj
screen = screenObj
input = inputObj
mainParse()
end
-- Fullscreen toggle --
function toggleFull... |
local fillerStruct = {}
fillerStruct.recommendedMinimumWidth = 8
fillerStruct.recommendedMinimumHeight = 8
function fillerStruct.decode(data)
local filler = {
_type = "filler"
}
filler.x = data.x or 0
filler.y = data.y or 0
filler.width = data.w or 0
filler.height = data.h or 0
... |
function show(grid)
local out = ""
for y = 1, #grid do
for x = 1, #grid[y] do
if grid[y][x] == 1 then
out = out .. "██"
else
out = out .. " "
end
end
out = out .. "\n"
end
os.execute("clear")
print(out)
end
function step(grid)
local next = {}
for y, line ... |
package("libspectre")
set_homepage("https://www.freedesktop.org/wiki/Software/libspectre/")
set_description("libspectre is a small library for rendering Postscript documents.")
set_license("GPL-2.0")
add_urls("http://libspectre.freedesktop.org/releases/libspectre-$(version).tar.gz")
add_versions("... |
-- Lua script of enemy fireball.
-- This script is executed every time an enemy with this model is created.
-- Feel free to modify the code below.
-- You can add more events and remove the ones you don't need.
-- See the Solarus Lua API documentation for the full specification
-- of types, events and methods:
-- http... |
local config = require"lspinstall/util".extract_config("zls")
config.default_config.cmd[1] = "./zls/zls"
return vim.tbl_extend('error', config, {
install_script = [[
os=$(uname -s | tr "[:upper:]" "[:lower:]")
case $os in
darwin)
platform="macos"
;;
linux)
platform="linux"
;;
... |
project "SoLoud"
kind "StaticLib"
language "C++"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("build/" .. outputdir .. "/%{prj.name}")
files
{
"src/audiosource/**.c*",
"src/filter/**.c*",
"src/core/**.c*",
"src/backend/null/**.c*",
"src/backend/winmm/**.c*"
}
includedirs
... |
-- incredible-gmod.ru
-- https://github.com/Be1zebub/Love2D-Libs/blob/main/file.lua
-- file.FindRecursive & compress_type in file.Write/file.Read not tested yet ;d
local file = {}
local lfs = love.filesystem
local decode, encode = love.data.decode, love.data.encode
file.Append = lfs.append
file.CreateDir = lfs.mkdi... |
local M = {}
local function get_local_require(prefix)
return function(module)
return require(prefix..'.'..module)
end
end
M.get_local_require = get_local_require
return M
|
require("deepcore/std/class")
---@class DeepCoreTimedTransitionPolicy : DeepCoreTransitionPolicy
DeepCoreTimedTransitionPolicy = class()
---@param time_until_transition number
---@param transition_function fun(state_context: table<string, any>)
function DeepCoreTimedTransitionPolicy:new(time_until_transition, transit... |
AddCSLuaFile()
DEFINE_BASECLASS("weapon_zm_base")
if CLIENT then
SWEP.PrintName = "Pistol"
SWEP.ViewModelFlip = false
SWEP.ViewModelFOV = 60
SWEP.WeaponSelectIconLetter = "d"
end
SWEP.Author = "Mka0207 & Forrest Mark X"
SWEP.Slot ... |
local default_mime_types = {
{"html", 4, "text/html" },
{"htm", 3, "text/html" },
{"txt", 3, "text/plain" },
{"css", 3, "text/css" },
{"ico", 3, "image/x-icon" },
{"gif", 3, "image/gif" },
{"jpg", 3, "image/jpeg" },
{"jpeg", 4, "image/jpeg" },
{"png", 3, "image/png" },
{"svg", 3, "i... |
object_tangible_gcw_battlefield_beacon = object_tangible_gcw_shared_battlefield_beacon:new {
}
ObjectTemplates:addTemplate(object_tangible_gcw_battlefield_beacon, "object/tangible/gcw/battlefield_beacon.iff")
|
local responses = require "kong.tools.responses"
local cache = require "kong.tools.database_cache"
-- Create a table of functions per cache type
local caches
do
local cache_names = {}
caches = setmetatable({
lua = function(action, ...)
if action == "get" then
return cache.get(...)
elseif ac... |
local config = require"lspinstall/util".extract_config("dockerls")
config.default_config.cmd[1] = "./node_modules/.bin/docker-langserver"
return vim.tbl_extend('error', config, {
install_script = [[
! test -f package.json && npm init -y --scope=lspinstall || true
npm install dockerfile-language-server-nodejs@lat... |
-- commands don't behave if this isn't wrapped in a frame
return Def.ActorFrame {
Def.Sprite {
Texture = NOTESKIN:GetPath('_mine', ''),
InitCommand = NOTESKIN:GetMetricA("Mine", "InitCommand")
}
}
|
return {
gok_emstor = {
buildangle = 8192,
buildcostenergy = 36891,
buildcostmetal = 4189,
builder = false,
buildpic = "gok_emstor.dds",
buildtime = 30000,
category = "ALL SURFACE",
corpse = "dead",
collisionvolumeoffsets = "0 0 0",
collisionvolumescales = "90 115 90",
collisionvolume... |
local prompts = {}
function API.prompt(source,title,default_text)
local r = async()
prompts[source] = r
cAPI._prompt(source,title,default_text)
return r:wait()
end
function cAPI.promptResult(text)
if text == nil then
text = ""
end
local prompt = prompts[source]
if prompt ~= nil then
prompts[source] = n... |
local lcm = require('lcm')
-- this might be necessary depending on platform and LUA_PATH
package.path = './?/init.lua;' .. package.path
local exlcm = require('exlcm')
local lc = lcm.lcm.new()
local msg = exlcm.example_t:new()
msg.timestamp = os.time() -- time in seconds
msg.position = {1, 2, 3}
msg.orientation = {... |
----------------------------------------
--
-- Copyright (c) 2015, Hadriel Kaplan
--
-- author: Hadriel Kaplan <hadrielk@yahoo.com>
--
-- This code is licensed under the MIT license.
--
-- Version: 1.0
--
------------------------------------------
-- prevent wireshark loading this file as a plugin
if not _G['pcapng_te... |
local cmp = require('cmp')
local luv = require('luv')
local debug = require('cmp.utils.debug')
local M = {}
M.new = function()
local self = setmetatable({}, { __index = M })
return self
end
local trim = function(str)
return string.gsub(str, '^%s*(.-)%s*$', '%1')
end
local line = function(str)
local s, e, ca... |
-------------------------------------------------------------------------------
-- ElvUI Fog of War By Crackpot (US, Arthas)
-- Rewritten for BFA By Klix (EU, Twisting Nether)
-- Added Shadowlands support Sugarfoot (US, Borean Tundra)
-------------------------------------------------------------------------------
... |
local _M = {}
function _M.execute(conf)
local host = ""
for i, key in ipairs(conf.host_fields) do
if string.find(key, "%$") then
key = key:gsub('[%$]', '')
key = ngx.var.request_uri:match(key):gsub("/%S+","")
end
host = host .. key
end
ngx.req.set_header("host", host)
ngx.var.upstre... |
local cls = class("chat")
function cls:ctor(context, ... )
-- body
assert(self)
end
function cls:set_agent_systems(systems, ... )
-- body
self.agentSystems = systems
end
function cls:on_data_init(dbData)
-- body
assert(dbData ~= nil)
assert(dbData.db_users ~= nil)
assert(#dbData.db_users == 1)
return true
... |
local editor = {}
editor.autopairs = function()
require("nvim-autopairs").setup {}
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
local cmp = require("cmp")
cmp.event:on("confirm_done",
cmp_autopairs.on_confirm_done({ map_char = { tex = "" } }))
end
editor.cursorword = function... |
object_mobile_som_obi_wan_ghost = object_mobile_som_shared_obi_wan_ghost:new {
}
ObjectTemplates:addTemplate(object_mobile_som_obi_wan_ghost, "object/mobile/som/obi_wan_ghost.iff")
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.