content stringlengths 5 1.05M |
|---|
---
-- @section Inventory
ttt_include("sh_inventory")
---
-- Cleans the Inventory and sends a message to a @{Player}
-- @param Player ply
-- @realm server
function CleanupInventoryAndNotifyClient(ply)
CleanupInventory(ply)
net.Start("TTT2CleanupInventory")
net.Send(ply)
end
---
-- Adds a @{Weapon} into the Inven... |
function model.enableRagnarVision()
--[[
if not realCamera_initialCameraTransform then
realCamera_initialCameraTransform=sim.getObjectMatrix(sensor,model.handle)
local data={}
data.id=model.handle
data.imageProcessingParameters=imgProcessingParams
simBWF.query('ragnarVision_c... |
local kernel = {}
kernel.language = "glsl"
kernel.category = "filter"
kernel.name = "duotone"
kernel.uniformData =
{
{
name = "darkColor",
default = { 0.0, 0.0, 0.5, 1.0 },
type = "vec4",
index = 0, -- u_UserData0
},
{
name = "lightColor",
default = { 1.0, 0.0, 0.0, 1.0 },
type = "vec4",
index = ... |
-- Gemeinschaft 5 module: acd class
-- (c) AMOOMA GmbH 2012-2013
--
module(...,package.seeall)
AutomaticCallDistributor = {}
local DEFAULT_AGENT_TIMEOUT = 20;
local DEFAULT_TIME_RES = 5;
local DEFAULT_WAIT_TIMEOUT = 360;
local DEFAULT_RETRY_TIME = 2;
local DEFAULT_MUSIC_ON_WAIT = 'tone_stream://%(2000,4000,440.0,48... |
local myname, ns = ...
ns.defaults = {}
function ns.InitDB()
_G[myname.."DB"] = setmetatable(_G[myname.."DB"] or {}, {__index = ns.defaults})
ns.db = _G[myname.."DB"]
end
function ns.FlushDB()
for i,v in pairs(ns.defaults) do if ns.db[i] == v then ns.db[i] = nil end end
end
|
local cached
local function bitness()
if cached then return cached end
local dump = string.dump(function() end)
local size
-- check signature
if dump:sub(2, 4) == "Lua" then
local version = dump:sub(5,5):byte()
if version == 0x51 or version == 0x52 then
size = dump:s... |
local TextOperation = require 'ot.text-operation'
require 'test/helpers'
local testJsonId = repeatTest(function()
local doc = randomString()
local operation = randomOperation(doc)
local operation2 = TextOperation.fromJSON(operation:toJSON())
assert(operation == operation2)
end)
local function testAppend()
o... |
--
-- SHA-1 secure hash computation, and HMAC-SHA1 signature computation,
-- in pure Lua (tested on Lua 5.1)
--
-- Latest version always at: http://regex.info/blog/lua/sha1
--
-- Copyright 2009 Jeffrey Friedl
-- jfriedl@yahoo.com
-- http://regex.info/blog/
--
--
-- Version 1 [May 28, 2009]
--
--
-- Lua is a pathetic, ... |
local InspectAndBuyFolder = script.Parent.Parent
local Thunk = require(InspectAndBuyFolder.Thunk)
local Analytics = require(InspectAndBuyFolder.Services.Analytics)
local UtilityFunctions = require(InspectAndBuyFolder.UtilityFunctions)
local requiredServices = {
Analytics,
}
local BUNDLE = "Bundle"
local ASSET = "Ass... |
-- Skip if ALE is not loaded
if not vim.g.loaded_ale then
return
end
-- Redefine representation of warnings and errors
vim.g.ale_sign_error = "โ"
vim.g.ale_sign_warning = "โ"
vim.highlight.create("ALEError", { cterm = "underline", ctermfg = 01 })
vim.highlight.create("ALEWarning", { cterm = "underline", ctermfg = 01... |
function __is_kind_of(c,T)
local __baseclass = getmetatable(c)
while __baseclass do
if __baseclass.__classname == T.__classname then
return true
end
__baseclass = __baseclass.__baseclass
end
return false
end
function __is_class(c, T)
return (c.__classname == T.__classname)
end
function class(name)
loca... |
function directives.error(env, err)
return false, err
end |
-- Copyright 2013 by Till Tantau
--
-- This file may be distributed an/or modified
--
-- 1. under the LaTeX Project Public License and/or
-- 2. under the GNU Public License
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
-- @release $Header$
local key = require 'pgf.gd.doc'.key
loc... |
workspace "MathLib"
architecture "x64"
startproject "MathLibTest"
configurations {"Debug", "Release"}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
project "MathLib"
location "MathLib"
kind "StaticLib"
language "C++"
targetdir("bin/" .. outputdir .. "/%{prj.name}")
objdir("obj/" .. outputdi... |
class 'Springboard'
function Springboard:playSeq(tickTime)
if(self.sequ_is_idle)then
return
end
self.ani_passed = self.ani_passed+tickTime
if(self.ani_passed>self.ani_delay)then
self.ani_passed = self.ani_passed-self.ani_delay
if(self.is_forward)then
self... |
client = nil
service = nil
return function(data)
local color = data.Color or Color3.new(1, 1, 1)
local red,green,blue = color.r,color.g,color.b
local redSlider,greenSlider,blueSlider
local redBox,greenBox,blueBox
local ySize = 25
local returnColor
local gTable
local window = client.UI.Make("Window",{
Name... |
local memory = require("memory")
local zce = {}
function zce.isZce()
return memory.gameid == "PZLE01" or memory.gameid == "PZLJ01"
end
function zce.isOot()
return memory.oot.ucode == 74 -- "J" is the ucode version for oot
end
function zce.isMajora()
return memory.mm.ucode == 73 -- "I" is the ucode versi... |
num_enemies = 2
boss_fight = false
experience=70
gold=60
function start()
addEnemy("Cub", 65, 80)
addEnemy("Chomper", 40, 105)
end
function get_speech()
return nil
end
function get_item()
n = getRandomNumber(20)
if (n == 0) then
return ITEM_CURE2
elseif (n == 1) then
return ITEM_HEAL
... |
--[=[
text
-----
]=]--
local text = {
x = 0,
y = 0,
background = {255,255,255},
foreground = {12,12,12},
align = "left",
text = "Hello World!",
visible = true,
substate = "Main",
}
text.__index = text
function text:new(data, parent)
local data = data or { }
local self = copy3(text)
self = setmetatable(... |
-- https://github.com/ImagicTheCat/ljuv
-- MIT license (see LICENSE or src/ljuv.lua)
local ffi = require("ffi")
ffi.cdef[[
typedef struct ljuv_object ljuv_object;
typedef struct ljuv_shared_flag ljuv_shared_flag;
typedef struct ljuv_channel ljuv_channel;
typedef struct ljuv_thread ljuv_thread;
void ljuv_object_retain... |
-----------------------------------
-- Area: Castle Oztroja (151)
-- NM: Yagudo Avatar
-- Note: PH for Tzee Xicu the Manifest
-- TODO: messages should be zone-wide
-----------------------------------
mixins = {require("scripts/mixins/job_special")}
local ID = require("scripts/zones/Castle_Oztroja/IDs")
require("scrip... |
local function commonfn(inv, slot, name)
local inst = CreateEntity()
inst.inv = inv
inst.slot = slot
inst.name = "copper_"..name
function inst:to_string()
return self.name
end
return inst
end
local function chestplate(inv, slot)
local inst = commonfn(inv, slot, "chestplate")
inst:AddComponent("armor"):Init(... |
local get_transformation=dfhack.script_environment('dragonball/transformation').get_transformation
function get_god_training(unit)
local persist=dfhack.persistent.save{key='DRAGONBALL/GOD_TRAINING/'..unit.id}
for i=1,7 do
if persist.ints[i]<0 then persist.ints[i]=0 end
end
--ints[1] is blue tra... |
local commands = {}
onEvent("ChatCommand", function(player, message)
local cmd, args, counter = "", {}, 0
for slice in string.gmatch(message, "%S+") do
if counter == 0 then
cmd = string.lower(slice)
else
args[counter] = slice
end
counter = counter + 1
end
if commands[cmd] then
return commands[cmd]... |
--Documentation:
--[[
A wrapper that makes a Collidable run a function before the Calculate method.
---
Update.onUpdated -> Function; function that is supplied with the wrapped Collidable and ran before the Calculate method
---
Update.apply(Collidable|Wrapper collidable, Function onUpdated) --> Wrapper; ... |
---
-- gameplay_frame.lua
local class = require "middleclass"
local Camera = require "Camera"
local BaseFrame = require "frames.base_frame"
local TileDrawer = require "frames.gameplay_frame.tile_drawer"
local UpdateMapCanvasCommand = require "frames.gameplay_frame.commands.update_map_canvas_command"
local UpdateMo... |
print("Someone entered script area!") |
local sound = require 'vendor/TEsound'
return {
name = 'rubberspider',
die_sound = 'boing',
height = 24,
width = 24,
antigravity = true,
hp = 100000,
vulnerabilities = {'blunt'},
damage = 0,
knockback = 0,
dyingdelay = 0.1,
peaceful = true,
tokens = 3,
tokenTypes = { -- p is probability ceil... |
--// WebPanel module uploaded as a group model due to there being multiple maintainers
--// Module source available at https://www.roblox.com/library/6289861017/WebPanel-Module
return function(Vargs)
local server = Vargs.Server;
local service = Vargs.Service;
local settings = server.Settings;
--[[
settings.Web... |
๏ปฟ--[[
/////// //////////////////
/////// PROJECT: MTA iLife - German Fun Reallife Gamemode
/////// VERSION: 1.7.2
/////// DEVELOPERS: See DEVELOPERS.md in the top folder
/////// LICENSE: See LICENSE.md in the top folder
/////// /////////////////
]]
TradeGuiSelectedItem = nil
TradeGui = {
["Window"] = fals... |
-- Extensible Application Framework controller command list.
-- It will be printed after using 'xaf list' command.
-- Every new command added to XAF in next updates will be also added here.
local arguments, options = ...
local listPage = tonumber(table.remove(arguments, 1))
local listTable = {}
local maxListPages = 1
... |
--------------------------------------------------------------------------
-- Fixme
-- @classmod Pkg
require("strict")
--------------------------------------------------------------------------
-- Lmod License
--------------------------------------------------------------------------
--
-- Lmod is licensed under the... |
modifier_earth_spirit_magnetize_lua = class({})
--------------------------------------------------------------------------------
-- Classifications
function modifier_earth_spirit_magnetize_lua:IsHidden()
return false
end
function modifier_earth_spirit_magnetize_lua:IsDebuff()
return true
end
function modifier_eart... |
-- A Monte Carlo Tree Search player with Upper Confidence Bounds for Trees player.
math.randomseed(os.time())
require "mcts/node"
require "contest/conteststate"
function MCTS(rootstate, itermax, rootplayer, verbose, parallel)
-- Set the rootplayer to be the first to play. (The order in which the moves are chosen i... |
--mod:dofile("scripts/mods/Disc of Tzeentch/utils/disc_buff")
local mod = get_mod("Disc of Tzeentch")
mod:dofile("scripts/mods/Disc of Tzeentch/hooks")
mod:dofile("scripts/mods/Disc of Tzeentch/utils/unit")
--mod:dofile("scripts/mods/Disc of Tzeentch/utils/strManip")
mod:dofile("scripts/mods/Disc of Tzeentch/utils/Inpu... |
--[[
๏ฟฝ CloudSixteen.com do not share, re-distribute or modify
without permission of its author (kurozael@gmail.com).
--]]
local CLASS = Clockwork.class:New("Elite Metropolice");
CLASS.color = Color(50, 100, 150, 255);
CLASS.wages = 30;
CLASS.factions = {FACTION_MPF};
CLASS.wagesName = "Supplies";
CLASS.descript... |
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
local __SCRIPT_NAME = "ME5_ObjectiveOneFlagCTF";
local debug = true
local function PrintLog(...)
if debug == true then
print("["..__SCRIPT_NAME.."]", unpack(arg));
end
end
PrintLog("Entered")
ScriptCB_DoFile("ME5_Objective")
... |
function round(num, numDecimalPlaces)
return tonumber(string.format("%.".. numDecimalPlaces .. "f", num))
end
function roundVec(vec, numDecimalPlaces)
return vector3(round(vec.x, numDecimalPlaces), round(vec.y, numDecimalPlaces), round(vec.z, numDecimalPlaces))
end
function printoutHeader(name)
return "-- Name:... |
project "Assimp"
kind "StaticLib"
language "C++"
cppdialect "c++17"
staticruntime "on"
targetdir (libdir .. "/%{prj.name}")
objdir (libdir .. "/%{prj.name}/int")
includedirs
{
"Build/include",
"Build/",
"include/",
"code",
"./",
"contrib/zlib",
"Build/contrib/zlib",
"contrib/rapidjson/inclu... |
-- DrawMarker funktion original from: https://forum.fivem.net/t/release-vrp-scrap-system/167010
-- The unlock funktion: Made by RedYodaDK
vRP = Proxy.getInterface("vRP")
-- CAN BE CHANGES
local key = 38 -- E (Unlock BUTTON >> https://docs.fivem.net/game-references/controls/)
-- SCRAP LOCATIONS
Unlockpoints = {
{1... |
local M = {}
local check_backspace = function()
local col = vim.fn.col "." - 1
return col == 0 or vim.fn.getline("."):sub(col, col):match "%s"
end
local function T(str)
return vim.api.nvim_replace_termcodes(str, true, true, true)
end
local is_emmet_active = function()
local clients = vim.lsp.buf_get_clients(... |
-------------------------------------------------------------------------------
-- Copyright (C) Hispidence 2013-2021
--
--
-- jlEvent.lua
--
-- Events
-------------------------------------------------------------------------------
local jlEvent = {}
jlEvent.__index = jlEvent
setmetatable(jlEvent,
{__call = functi... |
--่็ฉบไนๆธ
local m=14012019
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(... |
local C = {}
function C:init(unit)
self.unit = unit
end
function C:setup(params)
self.direction = Vec2(randomFloat(-1,1), randomFloat(-1,1)):getNormalized()
end
function C:onUpdate()
if not self.unit.root then return end
if self.unit.root.rect.x + self.unit.root.rect.width > gfx.videoWidth then... |
require 'nn'
require 'image'
require 'inn'
require 'xlua'
nnf = {}
torch.include('nnf','DataSetPascal.lua')
torch.include('nnf','BatchProvider.lua')
torch.include('nnf','SPP.lua')
torch.include('nnf','RCNN.lua')
torch.include('nnf','Trainer.lua')
torch.include('nnf','Tester.lua')
torch.include('nnf','SVMTrainer.lu... |
-----------------------------------------------------------------------------------------
--
-- main.lua
--
-----------------------------------------------------------------------------------------
-- Your code here
display.setStatusBar( display.HiddenStatusBar ) -- hide the status bar on iOS devices
local composer =... |
local RepStorage = game:GetService("ReplicatedStorage")
local TS = game:GetService("TweenService")
local TweenModule = RepStorage:WaitForChild("TweenService")
local TweenRemote = TweenModule:WaitForChild("Tween")
local TweenModelRemote = TweenModule:WaitForChild("TweenModel")
local ModelTweens = {}
local function D... |
return {
[ "tutorial" ] = {
handicap = 0.7,
map = "m1",
name = "tutorial"
},
[ "1" ] = {
handicap = 0.8,
map = "m2",
name = "1"
},
[ "2" ] = {
handicap = 1,
map = "m3",
name = "2"
},
[ "3" ] = {
handicap = 1,
map = "m4",
name = "3"
}
} |
local ceiling_lights = { --color , Description
{ "white" , "White"},
{ "yellow" , "Yellow"},
{ "blue" , "Blue"},
}
for i in ipairs(ceiling_lights) do
local color = ceiling_lights[i][1]
local desc = ceiling_lights[i][2]
local item = ceiling_lights[i][3]
minetest.register_node("mylights:ceiling_light_30_"..co... |
data:extend(
{
-- ORDER
{
type = "bool-setting",
name = "ick-oil-order",
setting_type = "startup",
default_value = true
},
{
type = "bool-setting",
name = "ick-misc-order",
setting_type = "startup",
default_value = true
},
-- SIGNALS
{
type = "bool-setting",
name = "ick-signals",
setting_ty... |
if Config.CreateTableInDatabase then
MySQL.ready(function()
local sqlTasks = {}
table.insert(sqlTasks, function(callback)
MySQL.Async.execute([[
CREATE TABLE IF NOT EXISTS `mp_houses` (
`userIdentifier` varchar(50) NOT NULL,
`houseId` bigint(20) NOT N... |
Talk(1, "ๅฐๅ
ๅผ๏ผๅๆฌก้ ่ฎฟ๏ผๆฏๅฆ็ปๅฐฑไบๆด้ซๆทฑ็ๆญฆๅ่กๆๅๆ๏ผ", "talkname1", 0);
if AskBattle() == true then goto label0 end;
do return end;
::label0::
Talk(0, "ๆ่พๆ่ๅๅ่พ่ฎจๆ่ฎจๆ๏ผ", "talkname0", 1);
if TryBattle(0) == false then goto label1 end;
LightScence();
Talk(0, "ๅ้ปๅคฉไธ็่กๅฎถๅๆณ๏ผไบฆไธ่ฟๅฐๅฐ๏ผๆฑๆนไธๆไผ ๏ผๆๆ่จ่ฟๅ
ถๅฎไบ๏ผ", "talkname0", 1);
... |
--[[
Swaggy Jenkins
Jenkins API clients generated from Swagger / Open API specification
OpenAPI spec version: 1.0.1
Contact: blah@cliffano.com
Generated by: https://openapi-generator.tech
]]
--[[
Unit tests for openapi-client.model.free_style_project
Automatically generated by openapi-generator (https://... |
local input = {}
local path = ... .. '.'
input.mouse = require(path .. 'mouse')
function input.update(dt)
input.mouse.update(dt)
end
function input.mousepressed(x, y, button)
input.mouse.mousepressed(x, y, button)
end
input.test = true
return input |
-- See LICENSE for terms
local mod_EnableMod
-- fired when settings are changed/init
local function ModOptions()
mod_EnableMod = CurrentModOptions:GetProperty("EnableMod")
end
-- load default/saved settings
OnMsg.ModsReloaded = ModOptions
-- fired when option is changed
function OnMsg.ApplyModOptions(id)
if id ==... |
--!A cross-platform build utility based on Lua
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law... |
plyr="Cobalt1164"
player=game.Players[plyr]
char=player.Character
down=false
mode="Charge"
set=1
anime=true
set1="Charge"
set2="Charge"
parts={ }
parts_2={ }
clones={ }
clone_s={ }
debounce=false
dodgedeb=false
coffin=false
rasengan=false
mud=false
number=0
numb=0
Chakra=100
function re... |
for i,v in ipairs({
{966,2004.3,-1350.2,23,0,0,0},
{968,2004.26,-1350.188,23.7,0,0,0},
{1215,2019,-1408.4,16.6,0,0,0},
{1215,2038.2,-1401.7,16.9,0,0,0},
{1215,2043.8,-1408.4,16.7,0,0,0},
{967,2003.5,-1352.7,23,0,0,90},
{1215,2043.6,-1426.2,16.7,0,0,0},
{1364,2043.4,-1411.3,17,0,0,270},
... |
CustomizableWeaponry:addFireSound("FMG_FIRE", {"weapons/FMG9/tmp-1.wav"}, 1, 125, CHAN_STATIC)
CustomizableWeaponry:addReloadSound("FMG_DRAW", "weapons/FMG9/deploy_stockup.wav")
CustomizableWeaponry:addReloadSound("FMG_CLOTH", "weapons/FMG9/cloth.wav")
CustomizableWeaponry:addReloadSound("FMG_CLOTH1", "weapons/FMG9/cl... |
if not mods["Krastorio2"] then
data:extend({
{
type = "damage-type",
name = "radioactive" -- Probably need to add a localization entry for this, but... meh.
}
})
end
data.raw["artillery-projectile"]["artillery-projectile"].action.action_delivery.target_effects[1].action.action_delivery... |
object_tangible_furniture_flooring_wood_frn_flooring_wood_s01 = object_tangible_furniture_flooring_wood_shared_frn_flooring_wood_s01:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_flooring_wood_frn_flooring_wood_s01, "object/tangible/furniture/flooring/wood/frn_flooring_wood_s01.iff")
|
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf/protobuf"
module('ReviveType_pb')
local REVIVETYPE = protobuf.EnumDescriptor();
local REVIVETYPE_REVIVENONE_ENUM = protobuf.EnumValueDescriptor();
local REVIVETYPE_REVIVEFREE_ENUM = protobuf.EnumValueDescriptor();
local REVIVETYPE_REVIVEITE... |
local _tonumber = tonumber
local _unpack = unpack
local rk = {
tickSessions = "tick|sessions",
session = "sessions|"..KEYS[1],
}
local sessionId = KEYS[1]
local currentTime = _tonumber(redis.call('get', 'serverTime'))
if(not currentTime) then
return redis.error_re... |
----------------------------- Utils {{{
local util = { }
local scopes = {o = vim.o, b = vim.bo, w = vim.wo}
function util.opt(scope, key, value)
scopes[scope][key] = value
if scope ~= 'o' then scopes['o'][key] = value end
end
function util.map(mode, lhs, rhs, opts)
local options = {noremap = true}
if opt... |
-- โโโโ
-- โโโโโ
-- โโโโโโโโ โโโโโโ โโโโ โโโโโ โโโโ โโโโโโ
-- โโโโโโโโโโ โโโโโโโโ โโโโ โโโโโ โโโโ โโโโโโโโ
-- โโโโ โโโ โโโโ โโโ โโโโ โโโโ โโโโ โโโโโโโ
-- โโโโ โโโโ โโโ โโโโ โโโโ โโโโ โโโโโโ... |
๏ปฟlocal tty
local name = 'shell.nib'
local prompt = "~"
local prompt_color = 9
sh = {
path = {
"apps/system/utilities/",
"apps/user/demos/",
"apps/user/creator/",
"apps/user/",
}
}
function shprint(str, bg)
kernel.send(tty, { print = str, background = bg})
end
function pri... |
object_tangible_component_cybernetic_cybernetic_module_cold_resistance_one_core = object_tangible_component_cybernetic_shared_cybernetic_module_cold_resistance_one_core:new {
}
ObjectTemplates:addTemplate(object_tangible_component_cybernetic_cybernetic_module_cold_resistance_one_core, "object/tangible/component/cyber... |
-----------------------
--- Module including many miscellaneous utility functions
--
-- @module types
--------------------------------------------------------------------------
--- Sleep for n seconds.
-- @param n Time to hold in seconds.
function sleep(n) -- seconds
local clock = os.clock
local t0 = clock()
w... |
local AddonName, AddonTable = ...
-- MoP Junk
AddonTable.junk = {
81194, -- Sharp Fangs
81195, -- Crocolisk Tear
81197, -- Enormous Tooth
81200, -- Vial of Swirling Mist
81201, -- Turtle Shell
81202, -- Inert Elemental Sphere
81203, -- Soft Down Feather
81205, -- Funereal Ashes
8121... |
return Def.Actor {} |
function Auctionator.Selling.ComposeAuctionPostedMessage(auctionInfo)
local stacksText
if auctionInfo.numStacks == 1 then
stacksText = AUCTIONATOR_L_X_STACK_OF_X:format(auctionInfo.numStacks, auctionInfo.stackSize)
else
stacksText = AUCTIONATOR_L_X_STACKS_OF_X:format(auctionInfo.numStacks, auctionInfo.sta... |
local periodicStuff = createLinkedList()
---@param item BusMgrOrderParams
function requestItem(item)
rmessage("Requesting " .. item.count .. " " .. item.name .. " from " .. item.bus)
scriptInfo.network:send(scriptInfo.addresses.BusMgr, 100, "order", "json", json.encode(item))
end
---@param factory CraftUni... |
-- Base16 {{ scheme-name }} color
-- Author: {{ scheme-author }}
-- to be use in your theme.lua
-- symlink or copy to config folder `local color = require('color')`
local M = {}
M.base00 = "#f4f3ec" -- ----
M.base01 = "#e7e6df" -- ---
M.base02 = "#929181" -- --
M.base03 = "#878573" -- -
M.base04 = "#6c6b5a" -- +
M.b... |
--warfare
--gun
if data.raw["item"]["pistol"] then data.raw["item"]["pistol"].icon = "__morebobs_shiny__/graphics/icons/warfare/pistol.png" end
if data.raw["item"]["pistol"] then data.raw["item"]["pistol"].icon_size = 32 end
if data.raw["item"]["submachine-gun"] then data.raw["item"]["submachine-gun"].icon = "__m... |
ScriptExample = Behavior:Extend("ScriptExample")
function ScriptExample:Constructor()
self.imgIndex = 0
end
function ScriptExample:OnInit()
self:SubscribeForMessages(StrId("ACT_BUTTON_CLICKED"))
end
function ScriptExample:OnMessage(msg)
if (msg:HasAction(StrId("ACT_BUTTON_CLICKED")))
then
self.imgIndex = ... |
function cleanAll (player)
for index, player in ipairs ( getElementsByType ( "player" ) ) do
unbindKey ( player, "O", "down", showPanel )
end
end
addEventHandler ( "onResourceStop", getResourceRootElement ( getThisResource() ), cleanAll)
function adminText()
if ( hasObjectPermissio... |
--[[
configuration "Release"
targetdir("../../build/lib/" .. os.get() .. "/release")
configuration "Debug"
targetdir("../../build/lib/" .. os.get() .. "/debug")
]]
configuration {}
include "BulletCollision"
include "BulletDynamics"
include "BulletMultiThreaded"
include "BulletSoftBody"
include "LinearMath"
|
global = {}
require("keymappings")
require("autocommands")
require("plugins")
require("settings")
require("lsp")
|
--[[
Copyright 2016 Roelof Roos (SirQuack)
Part of Particle Maker Garry's Mod Tool
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 app... |
local addonName, addonTable = ...
local Addon = _G[addonName]
local S = LibStub:GetLibrary("ShockahUtils")
local Class = {
prototype = {
priority = 0,
},
}
Addon.TrackerFactory = Class
local Instance = Class.prototype
local factories = {}
local modifierFactories = {}
Instance.registeredEvents = {}
function Cla... |
local file = fs.open(tostring(arg[1]), "r")
local content = file.readAll()
file.close()
print(content)
|
--[[
subtable:
{
entityID = EntityID
owner = Player
}
]]
GM.MapButtons = {}
GM.TableMap = {}
-- Updates the ownership status for buttons
net.Receive("DeathRun_UpdateButtons", function (length)
local id, owner, tblID
for i=1, net.ReadUInt(8) do
id = net.ReadUInt(16)
owner = net.ReadEntity()
if owner:IsWo... |
/*----------------------\
| Created by Viomi |
| viomi@openmailbox.org |
\----------------------*/
local CLASS = Clockwork.class:New("Dispatch")
CLASS.color = Color(50, 100, 150, 255)
CLASS.wages = 80
CLASS.factions = {FACTION_MPF}
CLASS.wagesName = "Supplies"
CLASS.description = "Dispatch Unit."
CLASS.defa... |
--[[
Executor module
The executor module is used to execute system commands,
such as running a C compiler or external applications.
]]
local tabler = require 'nelua.utils.tabler'
local pegger = require 'nelua.utils.pegger'
local platform = require 'nelua.utils.platform'
local fs = require 'nelua.utils.fs'
-- luacov:... |
----------------------------------------------------------------------------------------------------
-- It is a debug utility class.
--
-- @author Makoto
-- @release V3.0.0
----------------------------------------------------------------------------------------------------
-- import
local Logger = require "flower.Logg... |
local M = {}
local win_states = {}
local function peek(winnr, linenr)
local bufnr = vim.api.nvim_win_get_buf(winnr)
local n_buf_lines = vim.api.nvim_buf_line_count(bufnr)
linenr = math.min(linenr, n_buf_lines)
linenr = math.max(linenr, 1)
-- Saving window state if this is a first call of peek()
if not wi... |
local ignoredAbilities = {
zuus_cloud = true,
monkey_king_boundless_strike = true,
dazzle_shallow_grave = true,
saitama_push_ups = true,
saitama_squats = true,
saitama_sit_ups = true,
}
function RefreshAbility(keys)
local caster = keys.caster
local event_ability = keys.event_ability
if event_ability and
not... |
-- provides helper functions for generating and filter readline completions
-- using external oracles (e.g. find -maxdepth 1 -type d):
--
-- set_scanner(path, closure):
-- runs 'path' in a new process (str or argtbl), collects lines (\n strip)
-- into an n-indexed table and calls [closure](table).
--
-- ... |
return {
include = function()
includedirs { "../vendor/citizen_util/include/" }
end,
run = function()
targetname 'citizen_util'
language 'C++'
kind 'StaticLib'
add_dependencies("vendor:xenium")
files_project "../vendor/citizen_util/src/" {
"*.cpp"
}
end
} |
local env = require("tangerine.utils.env")
local win = require("tangerine.utils.window")
local dp = {}
local function escape_quotes(str)
_G.assert((nil ~= str), "Missing argument str on fnl/tangerine/output/display.fnl:14")
local qt = "\""
local esc = "\\\""
return (qt .. str:gsub(qt, esc) .. qt)
end
local func... |
#!/usr/bin/env lua
require 'Test.Assertion'
plan(12)
if not require_ok 'Spore.Middleware.Auth.Basic' then
skip_rest "no Spore.Middleware.Auth.Basic"
os.exit()
end
local mw = require 'Spore.Middleware.Auth.Basic'
local req = require 'Spore.Request'.new({ spore = {} })
is_table( req, "Spore.Request.new" )
is_... |
--[[
Project: SA Memory (Available from https://blast.hk/)
Developers: LUCHARE, FYP
Special thanks:
plugin-sdk (https://github.com/DK22Pac/plugin-sdk) for the structures and addresses.
Copyright (c) 2018 BlastHack.
]]
local shared = require 'SAMemory.shared'
shared.ffi.cdef[[
typedef struct CColourSet
{
f... |
local Exports = {}
Exports[0] = function() end
return {
Exports = Exports
}
|
return Def.ActorFrame{
OnCommand=cmd(diffusealpha,0; linear,0.2; diffusealpha,1),
OffCommand=cmd(linear,0.2; diffusealpha,0),
Def.Quad{
Name="ExplanationBackground",
InitCommand=cmd(diffuse, color("0,0,0,0.8"); xy, _screen.cx, _screen.h-57 ),
OnCommand=cmd(zoomto, _screen.w*0.935, _screen.h*0.08 ),
}
} |
sign = {"+", "-"}
ind = math.random(2)
imenilac = math.random(9) + 1;
broj1 = math.random(imenilac -1);
broj2 = math.random(imenilac -1);
if (ind == 1) then
value = broj1 + broj2
else
if (broj1 < broj2) then
temp = broj2
broj2 = broj1
broj1 = temp
end
value = broj1 - broj2
end
|
local Panel = require "panel"
local ContextPanel = require "panels.context"
local Vector = require "vector"
local Bresenham = require "bresenham"
local function bresenhamCallback(x, y)
return game.level:getCellPass(x, y)
end
local function blink(period)
local t = 0
return function(dt)
t = t + dt
if t < ... |
local basePath = (...):gsub('[^%.]+$', '')
local defaultTheme = require(basePath .. "defaultTheme")
local baseWidgetPath = basePath .. "base widgets."
local widgetClasses = {
Button = require(baseWidgetPath .. "Button"),
ToggleButton = require(baseWidgetPath .. "ToggleButton"),
RadioButton = require(base... |
local ok, socket = pcall(function()
return require("socket")
end)
if ok then
math.randomseed(socket.gettime() * 1000)
else
math.randomseed(os.time())
end
math.random()
math.random()
math.random()
math.random()
if type(DEBUG) ~= "number" then DEBUG = 1 end
local CURRENT_MODULE_NAME = ...
cc = cc or {}
cc... |
id = 'yourid' --Device ID
ssid = 'yourSSID' --WiFi Name
ssidpwd = 'WiFiPassword' --view on http://www.mcunode.com/proxy/<yourid>/<anystring> like:http://www.mcunode.com/proxy/4567/index.html
ip="yourServerIpOrHostName" --Eg๏ผ"192.168.1.105" orโwww.mcunode.comโ
function ls()
local l = file.list()
for k,v in pairs(l... |
--- ๆจกๅๅ่ฝ๏ผ็ฝ็ปๆ็คบ็ฏๆจกๅ
-- @module netLed
-- @author openLuat
-- @license MIT
-- @copyright openLuat
-- @release 2018.03.14
module(..., package.seeall)
require "pins"
require "sim"
--SIMๅก็ถๆ๏ผtrueไธบๅผๅธธ๏ผfalseๆ่
nilไธบๆญฃๅธธ
local simError
--ๆฏๅฆๅคไบ้ฃ่กๆจกๅผ๏ผtrueไธบๆฏ๏ผfalseๆ่
nilไธบๅฆ
local flyMode
--ๆฏๅฆๆณจๅไธGSM็ฝ็ป๏ผtrueไธบๆฏ๏ผfalseๆ่
nilไธบๅฆ
local gsmRegistered
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.