content stringlengths 5 1.05M |
|---|
local input = require "input"
local morse = require "morse"
local class = require "libs.middleclass"
local dahThreshold = 0.3
local letterThreshold = 0.6
local multiThreshold = 0.7
local MorseReader = class("MorseReader")
function MorseReader:initialize()
self:reset()
end
function MorseReader:reset()
self.... |
workspace "Razor"
architecture "x64"
startproject "Sandbox"
configurations
{
"Debug",
"Release",
"Dist"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
IncludeDir = {}
IncludeDir["GLFW"] = "Razor/vendor/GLFW/include"
IncludeDir["Glad"] = "Razor/vendor/Glad/include"
IncludeDir["ImGui"] = ... |
--@name Setpos methods
--@author Neatro
--@server
if not hasPermission( "entities.setPos", owner() ) then
throw( "You need Entities permission to see this example code! Enable permission entities.setpos" )
end
--[[
This example code shows how smooth Setpos is achieved.
You may have tried to directly setPos() an ... |
--[[
Copyright 2018 H8UL
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, sublice... |
---- importing ----
if string.sub(_VERSION,1,7)=='Lua 5.0' then
-- lua5.0 doesnt have a nice way to do this
lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example')
assert(lib)()
else
-- lua 5.1 does
require('example')
end
-- Call our gcd() function
x = 42
y = 105
g = example.gcd(x,... |
--------------------------------------------------------------------------------
-- 0130-priority_queue.lua: tests for priority queue
-- This file is a part of lua-nucleo library
-- Copyright (c) lua-nucleo authors (see file `COPYRIGHT` for the license)
------------------------------------------------------------------... |
--- Created By : TheOfficialSouthern
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsPedInAnyVehicle(GetPlayerPed(-1), false)
then if GetPedInVehicleSeat(GetVehiclePedIsIn(GetPlayerPed(-1), false), 0) == GetPlayerPed(-1)
then if GetIsTaskActive(GetPlayerPed(-1), 165)
t... |
local crt = ...
return {
include = function()
includedirs "../vendor/breakpad/src/"
configuration "linux"
includedirs { "vendor/breakpad/src/" }
configuration {}
end,
run = function()
language "C++"
kind "StaticLib"
if _OPTIONS['game'] ~= 'server' and crt then
staticruntime 'O... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:26' 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... |
MINIGAME.Time = 60
---------------------------------------------------------
--
---------------------------------------------------------
function MINIGAME:Initialize()
self.players = {}
self.spawnPoints = {}
local spawnPoints = ents.FindByClass("info_player_spawn")
for k, entity in pairs(spawnPoints) do
if... |
--[[---------------------------------------------------------
Name: Variables
-----------------------------------------------------------]]
local PANEL = {}
--[[---------------------------------------------------------
Name: Init
-----------------------------------------------------------]]
function PANEL:... |
local lang = {
common = {
welcome = "Bienvenue. Utilise les touches du téléphone pour les menus.~n~dernière connexion: {1}",
no_player_near = "~r~Pas de joueur à proximité.",
invalid_value = "~r~Valeur incorrecte.",
invalid_name = "~r~Nom incorrect.",
not_found = "~r~Non trouvé.",
request_re... |
-- alnbox, alignment viewer based on the curses library
-- Copyright (C) 2015 Boris Nagaev
-- See the LICENSE file for terms of use
return function(foreground, background)
return background * 8 + 7 - foreground
end
|
local Player = Rect:extend()
local function setPointsOnGround(self, shapeList)
for i = 1, #self.points do
self.points[i].isOnGround = self:isPointOnGroundWithShapeList(i, shapeList)
end
end
local function setSfx(self)
for i = 1, #self.points do
if self:isPointOnGround(i) then
if not self.points[i].isSfxPlay... |
-- erhalte die letzte Summe
local sum = Command:getData()
-- Wenn bisher keine daten gesetzt sind, setze sie auf 0
if not tonumber(sum) then
sum = 0
end
-- Erhöhe die Summe im 1
sum = sum + 1
-- speichere Summe
Command:setData(sum)
-- Gebe die Summe aus
Chat:output("Der Befehl wurde " .. sum .. " mal ausgeführt... |
---
-- @classmod StatsStorage
local middleclass = require("middleclass")
local flatdb = require("flatdb")
local types = require("luaplot.types")
local Stats = require("models.stats")
local StatsStorage = middleclass("StatsStorage")
---
-- @table instance
-- @tfield FlatDB _db
---
-- @function new
-- @tparam string ... |
-- A few constants
OSROOT = "/PaulCC"
-- Let's wrap the APIs needed
-- (Note: certain APIs need to remain alive)
-- I cannot disable coroutines, as they are heavily used. Maybe disable the commands except yield in the user processes?
-- os.pullEventRaw is required to be wrapped; maybe os.pullEvent too.
-- We should ha... |
local typedefs = require "kong.db.schema.typedefs"
return {
name = "vaults_beta",
primary_key = { "id" },
cache_key = { "prefix" },
endpoint_key = "prefix",
workspaceable = true,
subschema_key = "name",
subschema_error = "vault '%s' is not installed",
admin_api_name = "vaults-beta",
dao = "kong.db.d... |
-- protocol naming
p4_lr_msg_type = Proto('p4_lr_msg_type','P4_LR_MSG_TYPEProtocol')
-- protocol fields
local p4_lr_msg_type_msg_type = ProtoField.string('p4_lr_msg_type.msg_type','msg_type')
p4_lr_msg_type.fields = {p4_lr_msg_type_msg_type}
-- protocol dissector function
function p4_lr_msg_type.dissector(buffer,pin... |
-- Copyright (C) Miracle
-- Copyright (C) OpenWAF
local _M = {
_VERSION = "1.0.0"
}
local twaf_func = require "lib.twaf.inc.twaf_func"
local arr_index = "arr_tonumber"
_M.api = {}
_M.help = {}
_M.api.config = {}
-- get config, e.g: GET /api/config/{policy}/{module}/{key}
_M.api.config.get = function(_tw... |
deathspeaker_xunra_rune_of_roots_penalty_modifier = class({})
function deathspeaker_xunra_rune_of_roots_penalty_modifier:OnCreated( kv )
self.roots_move_speed_percentage = self:GetAbility():GetSpecialValueFor("roots_move_speed_percentage")
self.roots_damage = self:GetAbility():GetSpecialValueFor("ro... |
--------------------------------
-- @module DisplayManager
-- @extend Ref
-- @parent_module ccs
--------------------------------
--
-- @function [parent=#DisplayManager] getDisplayRenderNode
-- @param self
-- @return Node#Node ret (return value: cc.Node)
--------------------------------
--
-- @function [p... |
local get_input = require("refactoring.get_input")
local M = {}
function M.from_input(refactor)
local file_name = get_input("106: File Name > ", vim.fn.expand("%:h"))
-- OPTIONS? We should probably configure this
-- extract on second method added
vim.cmd(":vnew")
vim.cmd(string.format(":set filety... |
--lns/tags/Inq.lns
local _moduleObj = {}
local __mod__ = '@lns.@tags.@Inq'
local _lune = {}
if _lune6 then
_lune = _lune6
end
function _lune.loadModule( mod )
if __luneScript then
return __luneScript:loadModule( mod )
end
return require( mod )
end
function _lune.__isInstanceOf( obj, class )
while... |
nut.dialogue = nut.dialogue or {}
nut.dialogue.list = nut.dialogue.list or {}
function nut.dialogue.loadFromDir(directory)
for k, v in ipairs(file.Find(directory.."/*.lua", "LUA")) do
local niceName = v:sub(4, -5)
DIALOGUE = nut.dialogue.list[niceName] or {}
if (PLUGIN) then
DIALOGUE.plugin = PLU... |
-- Third Party Libs
local stringy = require "stringy"
local multipart = require "multipart"
local cjson = require "cjson"
-- Openresty Based Libs
local string_find = string.find
local string_len = string.len
local table_maxn = table.maxn
local req_clear_header = ngx.req.clear_header
local req_set_header = ngx.req.set_... |
--[[------------------------------------------------------------------------------------------------
| EDIT CODE BELOW AT YOUR OWN RISK |
------------------------------------
]]--
--[[
CONSTANTS
]]--
DISCORD = DISCORD or {}
DISCORD.State = DISCORD.State or "Default"
local CLIENT_ID = DISCORD.Client_ID
loc... |
function opponentNoteHit()
triggerEvent('Screen Shake', '0.1, 0.01', '0.1, 0.01');
health = getProperty('health')
setProperty('health', health- 0.005);
end
function onUpdate(elapsed)
if bfName == 'bf' or 'bf-3d' or 'bf-winner' or 'tunnel-bf' or 'bandu night' then --replace the name for your character name... |
-- https://github.com/denoland/deno
local root_pattern = require("lspconfig/util").root_pattern
return {
-- cmd = { "deno", "lsp" },
filetypes = {
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
},
init_options = { enable = true, lint = true, unstable =... |
-- Adapted from https://github.com/malkia/ufo/blob/master/ffi/OpenCL.lua
local ffi = require( "ffi" )
local name, path = "af", os.getenv("AF_PATH") .. "/"
local is_32_bit = ffi.abi("32bit") -- used to typedef dim_t
if ArrayFireMode == "cl" or ArrayFireMode == "cuda" or ArrayFireMode == "cpu" then
name = name .. Ar... |
require "ircmess"
for i=1, 50000 do
s = ircmess.parse(":cyka.yolo-swag.com 001 Xena :Welcome to IRC!\r\n")
assert(s.verb == "001")
assert(s.source == "cyka.yolo-swag.com")
assert(#s.argv == 2)
assert(s.argv[1] == "Xena")
s = ircmess.parse("PING :cyka.yolo-swag.com")
assert(s.source == "")
assert(s.v... |
Spectator = {
}
function Spectator:OnInit()
System.Log("spectator init");
end
function Spectator:OnShutDown()
end
function Spectator:OnUpdate( DeltaTime )
end
function Spectator:OnContact( Entity )
end
function Spectator:OnEvent( EventId, Params )
end
function Spectator:OnSave( props )
end
function Spectator:O... |
--[[
Reportamus.lua
--]]
local Reportamus, dbg, dbgf = Object:newClass{ className = "Reportamus", register = true }
--- Constructor for extending class.
--
function Reportamus:newClass( t )
return Object.newClass( self, t )
end
--- Constructor for new instance.
--
function Reportamus:new( t )
loc... |
-- Copyright (C) 2019 Igara Studio S.A.
--
-- This file is released under the terms of the MIT license.
-- Read LICENSE.txt for more information.
local fs = app.fs
local sep = fs.pathSeparator
assert('' == fs.filePath('first.png'))
assert('path' == fs.filePath('path/second.png'))
assert('C:\\path' == fs.filePath('C:... |
return {
["quiet"] = true,
["compress"] = "bz2"
} |
local cfg = {}
-- define market types like garages and weapons
-- _config: blipid, blipcolor, permissions (optional, only users with the permission will have access to the market)
cfg.market_types = {
["Mercado"] = {
_config = {blipid=52, blipcolor=2},
-- list itemid => price
-- Drinks
["milk"] = ... |
function on_activate(parent, ability)
local targets = parent:targets():hostile():visible()
local targeter = parent:create_targeter(ability)
targeter:set_selection_visible()
targeter:add_all_selectable(targets)
targeter:add_all_effectable(targets)
targeter:activate()
end
function on_target_sele... |
object_tangible_meatlump_event_meatlump_weapon_palette_01_03 = object_tangible_meatlump_event_shared_meatlump_weapon_palette_01_03:new {
}
ObjectTemplates:addTemplate(object_tangible_meatlump_event_meatlump_weapon_palette_01_03, "object/tangible/meatlump/event/meatlump_weapon_palette_01_03.iff")
|
-- fixparse.lua
--
-- Uses BitMaul to handle FIX ASCII
--
local FixFields = require'fixtypes'
-- The dissector ; tells PDURecord about message boundaries.
--
local FixDissector = {
-- how to get the next record
-- 1st we get message length 9=??
-- 2nd we determine PDU ends at message_length from above
... |
-- This file is subject to copyright - contact swampservers@gmail.com for more information.
-- INSTALL: CINEMA
-- weapon_vape_american.lua
-- Defines a vape which emits red, white, and blue clouds and plays Donald Trump sounds
-- Vape SWEP by Swamp Onions - http://steamcommunity.com/id/swamponions/
if CLIENT then
... |
return function()
local CoreGui = game:GetService("CoreGui")
local CorePackages = game:GetService("CorePackages")
local InGameMenuDependencies = require(CorePackages.InGameMenuDependencies)
local Roact = InGameMenuDependencies.Roact
local Rodux = InGameMenuDependencies.Rodux
local RoactRodux = InGameMenuDepende... |
-- craft ui
-- global CraftList
local entity_name=Pow.currentFile()
local _=BaseEntity.new(entity_name,true)
local _craftables=nil
--_.drawUnscaledUi=function()
-- love.graphics.print(entity_name.."unscaled")
--end
_.draw_ui=function()
-- overlay
love.graphics.setColor(0, 0.2, 0.2, 0.8)
local w... |
require "helper"
function AmielF2()
activateWin(AmielWin)
delay(100)
pressFx(AmielWin,2)
-- if getWindowCount()>2 then
-- activateWin(AmielWin)
-- delay(100)
-- pressFx(AmielWin,2)
--end
activateWin(MainWin)
end;
function AmielMana()
activateWin(AmielWin)
delay(100)
pressFx(Am... |
test_run = require('test_run').new()
engine = test_run:get_cfg('engine')
_ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
-- Forbid multistatement queries.
box.execute('select 1;')
box.execute('select 1; select 2;')
box.execute('create table t1 (id INT primary key); select 100;')
box.sp... |
-- Script Description
fx_version 'cerulean'
games { 'gta5' }
author 'lowheartrate & Slyforn'
description 'Street Label by lowheartrate'
version '1.1.0'
-- Client Scripts
client_scripts {
'configuration.lua',
'client.lua'
}
ui_page('html/index.html')
files({
'html/index.html',
'html/listener.js',
'html/styles.c... |
local image = require 'image'
local path = require 'path'
local function newwriter()
return {
bytes = {},
write8 = function( self, x )
self.bytes[ #self.bytes + 1 ] = string.char( x & 255 )
end,
write16 = function( self, x )
self.bytes[ #self.bytes + 1 ] = string.char( ( x >> 8 ) & 255, x... |
return {
fadeOut = 1.5,
mode = 2,
id = "HUAPOHAIKONGZHIYI1",
once = true,
fadeType = 2,
fadein = 1.5,
scripts = {
{
say = "塞潘岛西侧海域 午后",
side = 2,
bgName = "bg_map_maliyana",
dir = 1,
bgmDelay = 1,
bgm = "level",
flashin = {
delay = 0.5,
dur = 0.5,
black = true,
alpha = {
... |
--[[
© 2020 TERRANOVA do not share, re-distribute or modify
without permission of its author.
--]]
local PANEL = {}
local PLUGIN = PLUGIN
function PANEL:Init()
local parent = self
self.updateButton = self:Add("ixNewButton")
self.updateButton:Dock(BOTTOM)
self.updateButton:SetTall(64)
self.u... |
-- Casts given buff on target
function cast_buff(icon, spellName)
if GetSpellCooldownByName(spellName) ~= 0 then return end
if not is_in_buff_range() then return end
if UnitIsDead("target") then return end
if hasBuff("target", icon) then return end
CastSpellByName(spellName)
end
-- Casts given buff on player
fun... |
att.PrintName = "H3 Styled Counter Colored"
att.Icon = Material("snowysnowtime/2k/ico/h3/smg_sil.png")
att.Description = "Halo 3 inspired ammunition counter. Colorable."
att.Desc_Pros = {
}
att.Desc_Cons = {
}
att.SortOrder = 995
att.Slot = "hivk_counter"
att.AttachSound = "attch/snow/halo/h3/x_button.wav"
att.DetachS... |
local Rand = require("api.Rand")
local Chara = require("api.Chara")
local Ui = require("api.Ui")
local I18N = require("api.I18N")
local Quest = require("mod.elona_sys.api.Quest")
local QuestMap = require("mod.elona.api.QuestMap")
local Map = require("api.Map")
local Calc = require("mod.elona.api.Calc")
local Enum = req... |
-- Copyright 2020-2022 The Defold Foundation
-- Copyright 2014-2020 King
-- Copyright 2009-2014 Ragnar Svensson, Christian Murray
-- Licensed under the Defold License version 1.0 (the "License"); you may not use
-- this file except in compliance with the License.
--
-- You may obtain a copy of the License, together wi... |
--[[
Copyright (c) 2016, Cristian Cardellino.
This work is licensed under the "New BSD License".
See LICENSE for more information.
]]--
local SparseDataset = torch.class('mltools.SparseDataset')
function SparseDataset:__init(fname_or_indices, zero_based_or_values, target, shape)
if type(fname_or_indices) == 's... |
--[[
Copyright (c) 2013 Romain Meynet
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, ... |
-- Logging utilities for command line output.
local Logger = {}
function Logger:Format(raw, simple)
local module = self.module
if simple then
module = "Bartmoss | " .. module
end
return self.template:format(module, tostring(raw))
end
function Logger:Info(raw)
if self.writer then
se... |
local scheduler = {}
local sharedScheduler = CCDirector:sharedDirector():getScheduler()
function scheduler.scheduleUpdateGlobal(listener)
return sharedScheduler:scheduleScriptFunc(listener, 0, false)
end
function scheduler.scheduleGlobal(listener, interval)
return sharedScheduler:scheduleScriptFunc(listener... |
local dht_pin = 4
local bat_ratio = 10.37
local wifi_retries = 25
local mqtt_retries = 5
local push_retries = 10
adc.force_init_mode(adc.INIT_ADC)
local w = require('wifimodule')
local m = require('mqttmodule')
tmr.create():alarm(300, tmr.ALARM_AUTO, function(t)
if w.isConnected() then
tmr.unregister(t)
m... |
RageUI.PanelColour = {
HairCut = {
{ 28, 31, 33 }, -- 0
{ 39, 42, 44 }, -- 1
{ 49, 46, 44 }, -- 2
{ 53, 38, 28 }, -- 3
{ 75, 50, 31 }, -- 4
{ 92, 59, 36 }, -- 5
{ 109, 76, 53 }, -- 6
{ 107, 80, 59 }, -- 7
{ 118, 92, 69 }, -- 8
... |
--- `ds.Vector` class.
-- A factory class that generates specific vector object under user's request.
-- Currently, `ds.DoubleVector` and `ds.LuaVector` are implemented.
-- @classmod Vector
local DoubleVector = require "ds.DoubleVector"
local LuaVector = require "ds.LuaVector"
local Vector = {}
package.loaded['Vector'... |
--
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may ... |
local Bd_Log = require('lua.bdlib.BdLog')
local str_format = string.format
WRITE_LOG = Bd_Log.write_log
local ActionBase = {}
function ActionBase:init()
local logId, logId_r = nil, nil
if self.logId then logId = self.logId end
if self.logId_r then logId_r = self.logId_r end
ngx.log(ngx.DEBUG, str_form... |
class 'RacingClient'
local debug = false
function RacingClient:__init()
print('Initializing client module')
self.lastCheckpoint = nil
self.nextCheckpoint = nil
self.track = nil
Events:Subscribe('Level:Loaded', self, self.OnLoad)
Events:Subscribe('Level:Destroy', self, self.OnDestroy)
Ev... |
--[[------------------------------------------------------------------
TEXT
Map characters from a texture and render text
]]--------------------------------------------------------------------
if CLIENT then
local FILE_W, FILE_H = 256, 128;
local CHARACTERS = {
["!"] = {x = 7, y = 1, w = 6, h = 10},
[... |
local client = require "resty.websocket.client"
local wb, err = client:new()
local uri = "ws://127.0.0.1:8000/l"
local ok, err = wb:connect(uri)
if not ok then
ngx.say("failed to connect: " .. err)
return
end
local data = "test ok!"
local bytes, err = wb:send_text("copy: " .. data)
if not bytes then
ngx.s... |
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf"
module('BseBossTakeReward_pb', package.seeall)
local BSEBOSSTAKEREWARD = protobuf.Descriptor();
local BSEBOSSTAKEREWARD_SUCCESS_FIELD = protobuf.FieldDescriptor();
local BSEBOSSTAKEREWARD_DESC_FIELD = protobuf.FieldDescriptor();
BSEBOSSTA... |
local _ = require('bzst17') |
--[[
Attach this script to an Actor to allow it to stretch and compress itself to
adapt to viewport size. Generally it should be used on panel backgrounds.
The script requires the Actor to have any combination of these properties:
* "Left" & "LeftEnd"
* "Right" & "RightEnd"
* "Up" & "UpEnd"
* "Down" & "Down... |
local function loadfilefrompath(cad)
-- TODO win32,linux,mac?
cad = string.gsub(cad, "%.",path_sep) --"/")
------------------------------------
local paths = stsplit(package.path,";")
for i, path in ipairs(paths) do
local file=string.gsub(path,"?",cad)
local exist = io.open(file)
if exist then
exist:cl... |
local Host = require 'autoswagger.host'
local API = require 'autoswagger.api'
describe('API', function()
local host
before_each(function()
host = Host:new('foo', nil, nil, nil, 'host_guid')
end)
it('can be created', function()
local api = API:new(host, '/foo/bar', 'api_guid')
assert.equal(api.host... |
hosted_init()
--if CONFIG.auto_resolution then
gl.setup(NATIVE_WIDTH, NATIVE_HEIGHT)
--else
--gl.setup(CONFIG.width, CONFIG.height)
--end
--util.no_globals()
local on = false
local font = resource.load_font "silkscreen.ttf"
util.data_mapper{
state = function(state)
on = state == '1'
end,
}
n... |
-----------------------------------------
-- ID: 5588
-- Item: serving_of_karni_yarik
-- Food Effect: 30Min, All Races
-----------------------------------------
-- Agility 3
-- Vitality -1
-- Attack % 20 (cap 65)
-- Ranged Attack % 20 (cap 65)
-- Evasion +6
-----------------------------------------
require("scripts/glo... |
AddCSLuaFile()
ENT.Type = "anim"
ENT.PrintName = "Garbage"
ENT.Author = "Black Tea"
ENT.Category = "NutScript - CityRP"
ENT.Spawnable = true
ENT.AdminOnly = false
ENT.RenderGroup = RENDERGROUP_BOTH
ENT.modelTable = {
"models/props_junk/PopCan01a.mdl",
"models/props_junk/plasticbucket001a.mdl",
"models/props_junk/me... |
if path == nil then path = {} end
---[[
function path:find_path(unit, path_corners)
unit.next_corner_num = 1
Timers:CreateTimer(0.1, function()
local i = tonumber(unit.next_corner_num)
local path_corner = path_corners[i]
if path_corner then
local next_corner = Entities:FindBy... |
--ELF·远古森林巨龙
function c1190103.initial_effect(c)
--
aux.AddSynchroProcedure(c,c1190103.syfilter1,c1190103.syfilter2,1)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:S... |
function engineBreak()
local health = getElementHealth(source)
local driver = getVehicleController(source)
local vehID = getElementData(source, "dbid")
if (driver) then
if (health<=300) then
local rand = math.random(1, 2)
if (rand==1) then -- 50% chance
setVehicleEngineState(source, false)
export... |
function GM.PlayerBindPressPERP2 ( Player, Bind, Press )
if (string.find(string.lower(Bind), "voicerecord") && !Player:Alive()) then return true; end
if (string.find(string.lower(Bind), "zoom")) then return true; end
if (PERP_SpectatingEntity && Press) then
if (string.find(string.lower(Bind), "+jump")) then
... |
local monitor = peripheral.wrap("top")
local terminal = term.redirect(monitor)
local door = true
local spawner = true
local file = "state.txt"
if fs.exists(file) then
local openFile = assert(fs.open(file, "r"))
if openFile.readLine() == "false" then
door = false
end
if openFile.readLine() == "false" then
spawn... |
local PLUGIN = PLUGIN
function PLUGIN:LoadData()
SH_SZ.SafeZones = self:GetData() or {}
for _, sz in pairs(SH_SZ.SafeZones) do
local shape = SH_SZ.ShapesIndex[sz.shape]
if (!shape) then
return end
SH_SZ:CreateSafeZone(sz, shape)
end
end
function PLUGIN:SaveData()
self:SetData(SH_SZ.SafeZones)
end
func... |
local path = "hall/num_gold_pin.png"
local num_gold_pin_map = {
["wan.png"] = {
file=path,
x=2,y=2,
width=42,height=41,
rotated=true
},
["yi.png"] = {
file=path,
x=46,y=2,
width=42,height=39,
rotated=true
},
["%.png"] = {
file=path,
x=90,y=2,
width=29,height=42,
rotated=false
},
["-.p... |
outbreak_prisoner = Creature:new {
customName = "Afflicted Prisoner",
--objectName = "",
--randomNameType = NAME_GENERIC_TAG,
socialGroup = "outbreak_townsperson",
faction = "",
level = 100,
chanceHit = 0.5,
damageMin = 200,
damageMax = 600,
baseXp = 1400,
baseHAM = 7000,
baseHAMmax = 8000,
armor = 0,
re... |
local ls = require("luasnip")
local s = ls.snippet
local sn = ls.snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local d = ls.dynamic_node
ls.config.set_config({
history = true,
updateevents = "TextChanged,TextChangedI",
})
require("luasnip/loaders/... |
local math_floor = math.floor
local string_find = string.find
local string_sub = string.sub
local string_gsub = string.gsub
local table_insert = table.insert
p = 'C:/jlabenski/development/wx/wx/wxWidgets/wxWidgets-trunk/docs/doxygen/out/xml/'
--p = "/home/jlabenski/wx/wx-svn/wx/wxWidgets/wxWidgets-trunk/docs/do... |
--[[----------------------------------------------------------------------------
Interface for accessing the Common Objects in COntext (COCO) dataset.
For an overview of the API please see http://mscoco.org/dataset/#download.
CocoApi.lua (this file) is modeled after the Matlab CocoApi.m:
https://github.com/pd... |
local L = BigWigs:NewBossLocale("Atal'Dazar Trash", "zhCN")
if not L then return end
if L then
L.skyscreamer = "飨宴的啸天龙"
L.tlonja = "特隆加"
L.shieldbearer = "祖尔的持盾卫士"
L.witchdoctor = "赞枢利巫医"
L.kisho = "恐龙首领吉什奥"
L.priestess = "鎏金女祭司"
L.stalker = "影刃追猎者"
L.confessor = "达萨莱神官"
L.augur = "达萨莱占卜师"
end
|
local mods = minetest.get_mod_storage()
local modname = minetest.get_current_modname()
mapgen.structures = minetest.deserialize(mods:get_string("structures") ~= "" or "{}") or {}
function mapgen.register_structure(name, def)
mapgen.structures[name] = {}
mapgen.registered_structures[name] = def
minetest.register_... |
--[[
Construct the commands using the 'prepare', 'make' & 'post' branches of the recipe
Patch branch:
prepare:
patches:
# a) get patch from URL, check its integrity and save to the source cache:
- url : http://example.com/patch
sha256: hash
# b) use patch defined in the 'files' branch, don't need to ... |
local INJECTED_SCRIPTS = {}
function injectScript ( script )
if exports.global:isPlayerScripter( getLocalPlayer( ) ) and type(script) == "string" and #script > 0 then
script = script:lower()
if INJECTED_SCRIPTS[script] then
outputChatBox("Script '" .. script .. "' already loaded.", 255, 0, 0)
return ... |
local LIBFRAMEFADE_VERSION = 4;
if LibFrameFade and (LibFrameFade.VERSION or 0) >= LIBFRAMEFADE_VERSION then
return;
end
local function RehashTable(tbl)
local strkey = "LibFrameFade_RehashKey";
local numkey = 2^32;
tbl[strkey] = nil;
repeat
if tbl[numkey] == nil then
tbl[numk... |
require("gmake2")
local p = premake
local m = p.modules.gmake2
local cpp = m.cpp
if _ACTION == "gmake2" then
rule("asm")
fileExtension({ ".asm" })
buildoutputs({ "$(OBJDIR)/%{file.objname}.o" })
buildmessage("$(notdir $<)")
buildcommands({ "nasm %{premake.modules.gmake2.cpp.asmFileFlags(cfg, file)} -o \"$@\"... |
solution "steamworks4j"
configurations { "release" }
platforms { "x64" }
buildoptions {
"-std=c++11",
"-Wall"
}
includedirs {
"../java-wrapper/src/main/native/include/jni",
"../java-wrapper/src/main/native/include/jni/linux",
"../sdk/public/steam"
}
defines {
"NDEBUG",
"LINUX"
}
flags {
"Op... |
events.trigger{
collision = function(self, event)
local im = jvgslua.InputManager_getInstance()
im:sendQuitEvent()
end
}
|
--[[ DataElement.lua | Copyright Notice
INC Game Framework - OS Game Framework for Roblox
Copyright (C) 2022 Inctus (Haashim-Ali Hussain)
Full notice in IGF.lua ]]--
local DataElement = {}
export type DataElement = typeof(DataElement)
return DataElement
|
local modpath = minetest.get_modpath("murk")
minetest.register_abm({
nodenames = {"murk:dirt"},
neighbors = {"murk:dirt_with_grass"},
interval = 8,
chance = 40,
catch_up = false,
action = function(pos, node)
if (minetest.get_node_light({x = pos.x, y = pos.y + 1, z = pos.z}) or 0) > 13 then
minetest.swap_nod... |
cc.FileUtils:getInstance():setPopupNotify(false)
cc.FileUtils:getInstance():addSearchPath("src/",true)
cc.FileUtils:getInstance():addSearchPath("res/",true)
print("main.lua load Billiards alone")
require("gameBilliards.app.utils.Tools")
require("gameBilliards.app.utils.Help")
g_myGameName = "gameBilliards"
local fu... |
PLUGIN.name = "Looting"
PLUGIN.author = "orc, thadah, hikka (fix), kek1ch"
PLUGIN.desc = "A plugin for dropping player inventory on death."
PLUGIN.ignored = PLUGIN.ignored or {}
PLUGIN.ignored = PLUGIN.equip or {}
nut.util.include("sh_ignored.lua")
nut.util.include("sv_plugin.lua")
nut.config.add("lootTime... |
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf/protobuf"
local CAMPTASKINFO_PB = require("CampTaskInfo_pb")
module('CampTaskInfo2DB_pb')
CAMPTASKINFO2DB = protobuf.Descriptor();
local CAMPTASKINFO2DB_RESETTIME_FIELD = protobuf.FieldDescriptor();
local CAMPTASKINFO2DB_INFOS_FIELD = proto... |
---@class CS.FairyGUI.UIObjectFactory
---@type CS.FairyGUI.UIObjectFactory
CS.FairyGUI.UIObjectFactory = { }
---@return CS.FairyGUI.UIObjectFactory
function CS.FairyGUI.UIObjectFactory.New() end
---@overload fun(url:string, t:string): void
---@param url string
---@param creator (fun():CS.FairyGUI.GComponent)
function ... |
local json = require 'json'
local diagDefault = require 'constant.DiagnosticDefaultSeverity'
local VERSION = "0.14.2"
local package = {
name = "lua",
displayName = "Lua",
description = "Lua Language Server coded by Lua",
author = "sumneko",
icon = "images/logo.png",
license = "MIT",
reposi... |
--
-- FUEL
--
crafting.register("fuel", {
input = {
["crystal:red"] = 1,
},
output = {
["crystal:empty"] = 1,
},
burntime = 50.0,
})
crafting.register("fuel", {
input = {
["crystal:blue"] = 1,
},
output = {
["crystal:empty"] = 1,
},
burntime = 35.0,
})
crafting.register("fuel", {
input = {
["cry... |
local M = {}
local function hex (hex)
local redColor,greenColor,blueColor=hex:match('(..)(..)(..)')
redColor, greenColor, blueColor = tonumber(redColor, 16)/255, tonumber(greenColor, 16)/255, tonumber(blueColor, 16)/255
redColor, greenColor, blueColor = math.floor(redColor*100)/100, math.floor(greenColor*100)/100,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.