content
stringlengths
5
1.05M
Config = {} Config.DrawDistance = 10.0 -- How close do you need to be for the markers to be drawn (in GTA units). Config.MarkerType = {Cloakrooms = 20, Armories = 21, Vehicles = 36, Helicopters = 34, BossActions = 22, Elevator = 1} Config.MarkerSize = {x = 1.5, y = 1.5, z ...
CheckFileMenu = CheckFileMenu or class() function CheckFileMenu:init(data) data = data or {} self:Load(data) local EMenu = BeardLibEditor.Menu self._menu = EMenu:make_page("Check file", nil, {scrollbar = false, align_method = "centered_grid"}) ItemExt:add_funcs(self, self._menu) self:lbl("Havin...
local log = require("structlog") local NvimNotify = log.sinks.NvimNotify local stub = require("luassert.stub") describe("NvimNotify", function() local impl = {} stub(impl, "execute") local adapter = function(...) impl.execute(...) end it("should write a string message to the stub impl", function() ...
return (function(self, event) -- unit1, unit2 -- TODO actually do unit filtering u(self).registeredEvents[string.lower(event)] = true end)(...)
slot0 = class("ActivityLevelConst") slot0.getExtraChapterSocre = function (slot0, slot1, slot2, slot3) if not slot3 or slot3:isEnd() then return 0, 0 end slot5 = 0 slot6 = 0 if slot3:getConfig("config_data") then slot5 = math.max((slot4[2] / math.pow(slot1 + slot4[3], slot4[4]) - math.pow(slot2, slot4[5])) ...
for index, force in pairs(game.forces) do if force.technologies["logistic-train-network"] ~= nil and force.technologies["logistic-train-network"].researched then force.recipes["ltn-combinator"].enabled = true end end
return {'qtje','qtjes'}
-- See LICENSE for terms local table = table local IsKindOf = IsKindOf local IsValid = IsValid local WaitMsg = WaitMsg local CreateGameTimeThread = CreateGameTimeThread local DeleteThread = DeleteThread local GetMapSector = GetMapSector local SetPathMarkersGameTime = ChoGGi.ComFuncs.SetPathMarkersGameTime local Pathin...
ITEM.name = "Cup of dice" ITEM.description = "A cup of dice" ITEM.longdesc = "A plastic container with a blue lid on the top that contains a total of 6 dices inside. The dices appear to have circles representing numbers on each face of an individual die. Many STALKERS tend to keep a cup of dice on them just in case the...
local wibox = require("wibox") -- opacity for helper text and dark theme -- https://material.io/design/color/dark-theme.html#ui-application local function widget_text(font, text, align) local align = align or 'center' return wibox.widget { align = align, valign = 'center', font = font, text = tex...
--Converts true color images for Oric platforms. --Press "c" while clicking "Run" for AIC mode. --v1.2 - 2020 - by Samuel "__sam__" DEVULDER ------------------------------------------------------------------------------- -- -- (c) by Samuel DEVULDER (aka __sam__), 2019-2020 -- -- To be run in GrafX2 or on cmd-line. -- ...
lesser_receiving_damage_heal = class({}) function lesser_receiving_damage_heal:OnCreated( data ) -- ### VALUES START ### -- self.damage_received_of_max_health = 10 self.heal = 30 self.duration = 2 self.trigger_cd = 2 self.effectiveness_offensive ...
Citizen.CreateThread(function() while true do TriggerServerEvent("GetID:server") Citizen.Wait(1000) end end) RegisterNetEvent("GetID:client") AddEventHandler("GetID:client", function(id) local spillere = #GetActivePlayers() SendNUIMessage({ id = id, spillere = spillere, }...
local action, id_string, flavor, query, now = unpack(ARGV) local ids = {} if string.len(flavor) > 0 then if flavor == 'current' then ids = redis.call('ZRANGE', Keys.queue(query), 0, -1) elseif flavor == 'future' then ids = redis.call('ZRANGE', Keys.future_queue(query), 0, -1) elseif flavor == 'strand' t...
---@class CS.UnityEngine.CullingGroupEvent : CS.System.ValueType ---@field public index number ---@field public isVisible boolean ---@field public wasVisible boolean ---@field public hasBecomeVisible boolean ---@field public hasBecomeInvisible boolean ---@field public currentDistance number ---@field public previousDis...
object_building_general_cave_morag = object_building_general_shared_cave_morag:new { } ObjectTemplates:addTemplate(object_building_general_cave_morag, "object/building/general/cave_morag.iff")
local function OnPackageStart() blackjackui = CreateWebUI(0.0, 0.0, 0.0, 0.0, 5, 16) LoadWebFile(blackjackui, "http://asset/onsetrp/blackjack/ui/index.html") local x, y = GetScreenSize() SetWebSize(blackjackui, x, y) SetWebAlignment(blackjackui, 0.5, 0.5) SetWebAnchors(blackjackui, 0.5, 0.5, 0....
prometheus = require("prometheus").init("prometheus_metrics", {sync_interval=0.2}) metric_requests = prometheus:counter("requests_total", "Number of HTTP requests", {"host", "xlocation"}) metric_requests_status = prometheus:counter("requests_status", "Number of HTTP requeset Status"...
PlayState = Class{__includes = BaseState} --Initilize the playState function PlayState:enter(params) --Get Score From Previous State self.score = params.score --Get Player From Previous State self.player = params.player --Declare a Zombie table self.zombs = {} --Set the Current Level se...
--// Services local ReplicatedStorage = game:GetService("ReplicatedStorage") --// Modules local Knit = require(game:GetService("ReplicatedStorage").Packages.Knit) local Component = require(ReplicatedStorage.Packages.Component) local Trove = require(ReplicatedStorage.Packages.Trove) local Tween = require(Knit.Modules.T...
-- htaccess for nginx -- Version: 1.2.1 -- Copyright (c) 2017-2021 by Gerald Schittenhelm, Roadfamily LLC -- MIT License -- Compilation: luajit -b htaccess.lua htaccess-bytecode.lua -- TODO: Sometimes code is executed 4 times for each request due to the way nginx handles requests. Make sure it is cached accordingly. ...
ITEM.name = "Redline Extreme, 240ml" ITEM.description = "A small plastic bottle with an energy drink inside." ITEM.longdesc = "Redline Xtreme is one of the most powerful and fast-acting, ready-to-drink energy products on the market. Redline Xtreme is a unique blend that will boost energy and intensity for whatever your...
local nvim = require'nvim' local echoerr = require'tools'.messages.echoerr local echowarn = require'tools'.messages.echowarn local clear_lst = require'tools'.tables.clear_lst local dump_to_qf = require'tools'.helpers.dump_to_qf -- local split = require'tools'.strings.split if not nvim.has('nvim-0.5') ...
-- send the rspec commands to a tmux pane so we can see the output -- without leaving neovim vim.g.rspec_command = [[ call Send_to_Tmux("rspec {spec}\n") ]] -- set the keymaps for rspec using builtin mapper but register them -- with which-key so they show up there local keymap = vim.keymap local mappings = { r = { nam...
local lsp = require('lspconfig') local config = require('lang') lsp.clangd.setup({ cmd = { 'clangd', '--background-index', '--suggest-missing-includes', '--clang-tidy', '--header-insertion=iwyu' }, on_attach = config.on_attach, capabilities = config.capabilities }) -- lsp.ccls.setup({ -- on_attach =...
local skynet = require "skynet" local socket = require "socket" local function login( source, fd ) socket.start(fd) local str = socket.read(fd, 4) if str then -- local r = str -- local b, p, t = string.char(r:byte(1)),string.char(r:byte(2)),string.char(r:byte(3)) -- local header_len = r:byte(4) -- local bod...
--[[ PLAYER SPAWN POINT LIST revive_point(<map_id>, <x_pos>, <y_pos>); start_point(<map_id>, <x_pos>, <y_pos>); respawn_point(<map_id>, <x_pos>, <y_pos>); --]] respawn_point(26, 5283.775, 5161.853); start_point(26, 5063.095, 5494.253); respawn_point(26, 5251.585, 5554.698); respawn_point(26, 5443.628, 5293.251); respaw...
measure1 = {"m", "kg" , "h", "km", "l"} measure2 = {"cm", "g", "min.", "m", "cl"} rel = {100, 1000, 60, 1000, 100} denom = {2,4,5,10} index = math.random(4) imenilac = denom[index] brojilac = math.random(imenilac-1) result = (rel[ITEM] * brojilac) / imenilac
local metric = monitoring.counter("find_nodes_in_area_calls", "number of find_nodes_in_area calls") local metric_time = monitoring.counter( "find_nodes_in_area_time", "time usage in microseconds for find_nodes_in_area calls" ) minetest.find_nodes_in_area = metric.wrap(metric_time.wraptime(minetest.find_nodes_in_area...
local _, core = ...; local MonDKP = core.MonDKP; core.BossList = { MC = { "Lucifron", "Magmadar", "Gehennas", "Garr", "Baron Geddon", "Shazzrah", "Sulfuron Harbinger", "Golemagg the Incinerator", "Majordomo Executus", "Ragnaros" }, BWL = { "Razorgore the Untamed", "Vaelastrasz the Corrupt", "Bro...
CusomerServiceHelper = class() CusomerServiceHelper.Delegate = { onCustomerServiceCallBack = "onCustomerServiceCallBack", } CusomerServiceHelper.getInstance = function(DataInterfaceBase) if not CusomerServiceHelper.s_instance then CusomerServiceHelper.s_instance = new(CusomerServiceHelper)...
local _={} _.name="Grass" _.new=function(options) local result=BaseEntity.new(options) local isProto=false if options then isProto = options.isProto or false end local spriteName=Lume.randomchoice({"grass","grass2","grass3"}) Entity.setSprite(result,spriteName) result.x=0 result.y=0 result.isDrawable=...
local canvas_demo = {} local CANVAS_WIDTH = 200 local CANVAS_HEIGHT = 150 function canvas_demo.demo() local rect_dsc = lvgl.draw_rect_dsc_t(); lvgl.draw_rect_dsc_init(rect_dsc); rect_dsc.radius = 10; rect_dsc.bg_opa = lvgl.OPA_COVER; rect_dsc.bg_grad_dir = lvgl.GRAD_DIR_HOR; rect_d...
module('love.window') function close() end function fromPixels() end function getDPIScale() end function getDisplayName() end function getDisplayOrientation() end function getFullscreen() end function getFullscreenModes() end function getIcon() end function getMode() end function getPosition() end...
local skeleton = require 'nvim_lsp/skeleton' local util = require 'nvim_lsp/util' local lsp = vim.lsp skeleton.ccls = { default_config = util.utf8_config { cmd = {"ccls"}; filetypes = {"c", "cpp", "objc", "objcpp"}; root_dir = util.root_pattern("compile_commands.json", "compile_flags.txt", ".git"); l...
-- Created by Elfansoer --[[ Ability checklist (erase if done/checked): - Scepter Upgrade - Break behavior - Linken/Reflect behavior - Spell Immune/Invulnerable/Invisible behavior - Illusion behavior - Stolen behavior ]] -------------------------------------------------------------------------------- modifier_bane_nigh...
require 'logroll' local _ = require 'moses' local classic = require 'classic' local cjson = require 'cjson' local Setup = classic.class('Setup') -- Performs global setup function Setup:_init(arg) -- Create log10 for Lua 5.2 if not math.log10 then math.log10 = function(x) return math.log(x, 10) end ...
local GSE = GSE local AceGUI = LibStub("AceGUI-3.0") local L = GSE.L local libS = LibStub:GetLibrary("AceSerializer-3.0") local libC = LibStub:GetLibrary("LibCompress") local libCE = libC:GetAddonEncodeTable() local recordframe = AceGUI:Create("Frame") recordframe:Hide() GSE.GUIRecordFrame = recordframe local recbutt...
local lu = require 'luaunit' local testing = require 'tests.testing' local fn = require 'fn' local M = {} function M.test_id() local pp = fn.pipe(function(...) return ... end) local v1, v2, v3 = pp(1, 'a', true) lu.assertEquals(v1, 1) lu.assertEquals(v2, 'a') lu.assertEquals(v3, true) end function M.test_f...
local module = ... local mqtt = require('mqtt_ws') local settings = require('settings') local device_id = wifi.sta.getmac():lower():gsub(':','') local c = mqtt.Client(settings.aws) local topics = settings.aws.topics local sendTimer = tmr.create() local timeout = tmr.create() local mqttTimeout = tmr.create() local hea...
RegisterClientCallback('__classes:vehicle:get:props:mods', function(netId) local localid = NetworkGetEntityFromNetworkId(netId) local vehicle = Vehicle(false, localid) return vehicle:GetMods() end) RegisterClientCallback('__classes:vehicle:get:props', function(netId) local localid = NetworkGetEntityFromNetworkId(...
local present, tree_c = pcall(require, "nvim-tree.config") if not present then return end local map = require "utils".map local tree_cb = tree_c.nvim_tree_callback local g = vim.g vim.o.termguicolors = true local bindings = { {key = {"<CR>", "o", "<2-LeftMouse>"}, cb = tree_cb "edit"}, {key = {"<2-RightMouse>"...
-- Autogenerated from KST: please remove this line if doing any edits by hand! local luaunit = require("luaunit") require("nested_types") TestNestedTypes = {} function TestNestedTypes:test_nested_types() local r = NestedTypes:from_file("src/fixed_struct.bin") luaunit.assertEquals(r.one.typed_at_root.value_...
local type, setmetatable = type, setmetatable local ngx = ngx local string_char, string_find = string.char, string.find local table_concat = table.concat local band, rshift = bit.band, bit.rshift local random = require "resty.random" local random_bytes = random.bytes local protocol = require "trochilus.common.util.web...
-- rLib: core -- zork, 2016 ----------------------------- -- Variables ----------------------------- local A, L = ... L.addonName = A ----------------------------- -- rLib Global ----------------------------- rLib = {} rLib.addonName = A ----------------------------- -- Functions ----------------------------- --...
local function loadAPI(path,name) local handle = fs.open(path,"r") local content = handle.readAll() handle.close() local f = loadstring(content) local env = {} setmetatable(env,{__index=_G}) setfenv(f,env) f() _G[name] = env end loadAPI("helium/api/utils.lua","utils") loadAPI("helium/api/filesystem.lua","fil...
-- set the `rhythm` which also sets the `converted` property --local convert = require('src/measures/convert') --print("convert method location: ", tostring(AlgoRhythms.measures.convert)) return function (self, t) local pre_offset = AlgoRhythms.globals.PROGRAMMERS_NOTATION_OFFSET for i=1,#t do t[i] = t[i] - pre_...
-- This file is subject to copyright - contact swampservers@gmail.com for more information. -- INSTALL: CINEMA include("shared.lua") AddCSLuaFile("cl_init.lua") AddCSLuaFile("shared.lua") function SWEP:OwnerChanged() end
-- This script should be loaded securely. assert(issecure()); local function pack(...) return { n = select("#", ...), ... }; end function securecall_checked(func, ...) local err; local errorhandler = function(e) err = e; end; seterrorhandler(errorhandler); local results = pack(securecall(func, ...)); i...
--[[ This file is part of halimede. It is subject to the licence terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/pallene/halimede/master/COPYRIGHT. No part of halimede, including this file, may be copied, modified, propagated, or distributed exc...
-------------------------------- -- @module Physics3DConstraint -- @extend Ref -- @parent_module cc -------------------------------- -- set enable or not -- @function [parent=#Physics3DConstraint] setEnabled -- @param self -- @param #bool enabled -- @return Physics3DConstraint#Physics3DConstraint self (return value:...
-- -- look_at util. -- -- todo: construct transformation matrix? -- function look_at(from, to) local forward = (to - from):normalize() local right = vec3.cross(vec3.new(0,1,0), forward) local up = vec3.cross(forward, right) return { x = right, y = up, z = forward, } end
function mapMany(array, f) local result = {}; for _, vs in pairs(array) do for _, v in pairs(f(vs)) do table.insert(result, v); end end return result; end function tintPictures(pictures, tint) for _, picture in pairs(pictures) do picture.tint = tint; if picture.hr_version then picture.hr_version.tin...
-- Made by szymczakovv#1937 ESX = nil local holdingup = false local hackholdingup = false local cayooo = "" local saved = {} local secondsRemaining = 0 CreateThread(function() while ESX == nil do TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) Citizen.Wait(0) end Citizen.Wait(5000) PlayerD...
-------------------------------------------------------------------------------- -- -- gameloop.lua -- -------------------------------------------------------------------------------- local enemy = require("enemymanager"); local gameloop = {} local AudioManager = require("AudioManager") local globals = require("globals...
local _, Addon = ... ------------------------------------------------------- -- Pinyin lib -- -- Copy from https://github.com/MissinA/pinyin -- ------------------------------------------------------- local data = { a = "阿啊呵腌嗄锕錒", ai = "爱唉挨碍哀矮埃哎艾癌隘蔼嗳皑霭捱暧瑷娭砹锿嫒薆䔽㤅鴱㗨藹㕌磑...
local arr = require('src.lua-cor.arr') local ass = require('src.lua-cor.ass') -- Test arr local a = arr() local b = arr(1, 2, 3) -- basic manipulations a:push(8) a:push(9) a:unshift(7) ass.eq(a:pop(), 9) ass.eq(a:shift(), 7) ass.eq(a:length(), 1) a:clear() ass.eq(a:length(), 0) ass(a:is_empty()) --...
-- See LICENSE for terms local type = type local MsgPopup = ChoGGi.ComFuncs.MsgPopup local Translate = ChoGGi.ComFuncs.Translate local TableConcat = ChoGGi.ComFuncs.TableConcat local Strings = ChoGGi.Strings local blacklist = ChoGGi.blacklist function ChoGGi.MenuFuncs.SetDisasterOccurrence_Toggle(action) local sett...
local schema_def = require "kong.plugins.response-ratelimiting.schema" local v = require("spec.helpers").validate_plugin_config_schema describe("Plugin: response-rate-limiting (schema)", function() it("proper config validates", function() local config = {limits = {video = {second = 1}}} local ok, err = v(co...
--[[ rules.lua Rulesets settings menu --]] local CONFIG, Config = ... if not Config.supportRules then return end local L = LibStub('AceLocale-3.0'):GetLocale(CONFIG) local ADDON, Addon = CONFIG:match('[^_]+'), _G[CONFIG:match('[^_]+')] local Rules = Addon.GeneralOptions:New('RuleOptions', CreateAtlasMarkup('None')...
--[[ © 2020 TERRANOVA do not share, re-distribute or modify without permission of its author (zacharyenriquee@gmail.com). --]] PLUGIN.name = "Faction Models"; PLUGIN.description = "Replaces old faction models with new ones from the TERRANOVA collection."; PLUGIN.author = "Adolphus";
local QBCore = nil CreateThread(function() while QBCore == nil do TriggerEvent('QBCore:GetObject', function(obj) QBCore = obj end) Wait(100) end end) -- https://www.youtube.com/watch?v=hI0Q7IPWjOk Funny innit local isitonornot = false local curRadius = 0.5 local whodarespass = false ...
-------------------------------------------------------------------------------- -- ActionButtonMixin -- Additional methods we define on action buttons -------------------------------------------------------------------------------- local _, Addon = ... local ActionButtonMixin = {} function ActionButtonMixin:SetAction...
--- -- @module HumanoidAnimatorUtils local HumanoidAnimatorUtils = {} function HumanoidAnimatorUtils.getOrCreateAnimator(humanoid) local animator = humanoid:FindFirstChildOfClass("Animator") if not animator then animator = Instance.new("Animator") animator.Name = "Animator" animator.Parent = humanoid end r...
-- CLIENTSIDE local max = math.max local sqrt = math.sqrt local abs = math.abs local sin = math.sin local cos = math.cos local log = math.log local b = {} local zMax = 950 local W = 1024 local H = W local setdrawcolor = surface.SetDrawColor local drawrect = surface.DrawRect local t = 0 local X,Y = ScrW()/2-W/2,...
return { SIM_DT = 1/60.0, screenShakeFreq = 10.0, }
local player = nil local cruisedSpeed = 0 Citizen.CreateThread(function() while true do Citizen.Wait(8); if IsPedInAnyVehicle(GetPlayerPed(-1), false) then SetTextFont(2) SetTextFont(0) SetTextScale(0.4, 0.4) if cruisedSpeed < 1 then...
require "busted.runner"() describe("CheckboxOption", function() -- setup local match -- before_each initialization local options, submenu local CheckboxOption, checkboxoption setup(function() match = require "luassert.match" end) before_each(function() -- initializati...
local version = require("tmux.version") local log = require("tmux.log") local M = {} function M.options(tmux_version, options) local current = version.new(tmux_version) if options.copy_sync.enable and options.copy_sync.redirect_to_clipboard then local valid_version = version.new("3.2") local co...
if GetLocale() ~= "deDE" then return end -- Translate the strings here CSC_DEFENSE = DEFENSE; CSC_WEAPON_SKILLS_HEADER = "Waffenfertigkeiten"; CSC_HIT_BIZNICKS_TXT = HIT;
--[[ NPC SPAWN LIST npc(<npc_lua_file>, <npc_id>, <map_id>, <x_pos>, <y_pos>, <z_pos>, <angle>); --]] npc("307", 1203, 40, 5254.64, 5216.39, 1.5, 314.999991690201);
local function Pad3Zero(v) local wrk = ""..v..""; if (string.len(wrk) == 1) then wrk = "00"..v..""; elseif (string.len(wrk) == 2) then wrk = "0"..v..""; end return ""..wrk..""; end function UMMPopUpDialogTemplate_OnLoad(this) this.priv_Actions = {}; this.priv_Lines = {}; this.priv_Money ...
local path, pid, luaapi = ... local function dofile(filename, ...) local f = assert(io.open(filename)) local str = f:read "a" f:close() local func = assert(load(str, "=(BOOTSTRAP)")) return func(...) end local dbg = dofile(path.."/script/debugger.lua","windows",path,luaapi) dbg:start(("@%s/runtime...
function Initialize() Running = false Location = SKIN:GetVariable("@").."Scripts" Script = SKIN:GetVariable("@").."Scripts\\presence.js" end function Update() local gameProc = SKIN:GetMeasure('GameProcess'):GetValue() local clientProc = SKIN:GetMeasure('ClientProcess'):GetValue() if gameProc =...
-- Artisanal Reskins: Angel's Mods seablock.set_setting_default_value('bool-setting', 'reskins-angels-use-item-variations', false)
--[[ Antimony Admin An administration script by LewisTehMinerz. --]] local Antimony = {} Antimony.config = require(script.Parent.Config) Antimony.premiumGamepass = 5961614 Antimony.level = { info = "✅", warn = "⚠️", error = "❌", debug = "🐛" } Antimony.commands = {} Antimony.permissions = {} Antimony.group...
local awful = require("awful") local gears = require("gears") local beautiful = require("beautiful") local wibox = require("wibox") local lain = require("lain") local markup = lain.util.markup local redshift_text = wibox.widget { align = "center", widget = wibox.widget.textbox, } local redshift_cb = wibox....
if not faketorio then faketorio = {} end faketorio.features = {} faketorio.errors = {} faketorio.listener = nil function faketorio.run() if (faketorio.listener) then faketorio.listener.init() end local feature_count = faketorio.count(faketorio.features) local current_feature = 0 for feat...
--- Point. -- Is converted to a [JUCE Point](http://www.juce.com/api/classPoint.html) -- @classmod juce.Point --- Constuctor -- @param x -- @param y -- @within Constructors -- @constructor -- @function Point --- Constuctor -- @param args -- @param args.x -- @param args.y -- @within Constructors -- @constructor -- @fu...
--------------------------------------------------------------- local db = ConsolePort:GetData() --------------------------------------------------------------- local _, ab = ... --------------------------------------------------------------- local cfg local Bar = CreateFrame('Frame', _, UIParent, 'SecureHandlerStateT...
#!/usr/bin/env -S luajit -- example environment that will forward any received zigbee packet -- to an MQTT broker -- -- you may want to adapt this to extract the information (and packets) -- you are really interested in... require"lib.ctx"(require"config", function(ctx) local U = require"lib.util" local json = require"...
-- -- Author: zhong -- Date: 2016-11-11 09:59:23 -- local ExternalFun = appdf.req(appdf.EXTERNAL_SRC .. "ExternalFun") local ClipText = appdf.req(appdf.EXTERNAL_SRC .. "ClipText") local module_pre = "game.qipai.land.src" local cmd = appdf.req(module_pre .. ".models.CMD_Game") local GameResultLayer = class("GameResult...
describe("MAP to TMX conversion", function() local map2tmx = require("ticmap2tmx.map2tmx") local xml2lua = require("xml2lua") -- load test files that should not be modified by tests local mapfile = assert(io.open("./spec/assets/test.map", "rb")) local mapdata = mapfile:read("*a") mapfile:close() ...
#!/usr/bin/env tarantool local fio = require('fio') -- require in-repo version of graphql/ sources despite current working directory package.path = fio.abspath(debug.getinfo(1).source:match("@?(.*/)") :gsub('/./', '/'):gsub('/+$', '')) .. '/../../?.lua' .. ';' .. package.path local tap = require('tap') local...
Mirror = BaseObject:extend() function Mirror:new(x, y, mirrorType, direction) Mirror.super.new(self, x, y, false, false) self.type = mirrorType or 0 self.direction = direction if not self.direction then self.direction = 0 end self.image = love.graphics.newImage("images/MIRROR.png") end function Mirror...
#!/usr/bin/env lua5.1 local input = require("lua-input") local time = require("time") local codes = input.linux.input_event_codes -- translation table for events from the kbd. -- key is code on the kbd value is code on the mouse. local key_translate = { [codes.KEY_VOLUMEDOWN] = codes.BTN_LEFT, [codes.KEY_VOLUMEUP] =...
AddCSLuaFile("cl_init.lua") AddCSLuaFile("shared.lua") include("shared.lua") function ENT:Initialize() self:SetModel("models/props_c17/utilityconnecter006c.mdl") self.VMF = self.VMF or {} self:SetUseType(SIMPLE_USE) self:PhysicsInit(SOLID_VPHYSICS) self:SetMoveType(MOVETYPE_VPHYSICS) self:SetSolid(SOLI...
local bind = require("keymap.bind") local map_cr = bind.map_cr local map_cu = bind.map_cu local map_cmd = bind.map_cmd -- default map local def_map = { -- Vim map ["n|<C-x>k"] = map_cr("bdelete"):with_noremap():with_silent(), ["n|<C-s>"] = map_cu("write"):with_noremap(), ["n|Y"] = map_cmd("y$"), -- ["n|]w"] = map...
--[[ This file is part of 'Masque', an add-on for World of Warcraft. For license information, please see the included License.txt file or visit https://github.com/StormFX/Masque. * File...: Core\Regions\SpellAlert.lua * Author.: StormFX 'SpellAlert' Region * TODO: Improve the textures. ]] -- GLOBALS: hookse...
local composer = require( "composer" ) local scene = composer.newScene() -- ----------------------------------------------------------------------------------- -- Code outside of the scene event functions below will only be executed ONCE unless -- the scene is removed entirely (not recycled) via "composer.rem...
local Node = class("Node") function Node:ctor(name, meiru) self.name = assert(name) if meiru then assert(typeof(meiru) == 'Meiru') self._meiru = meiru end end function Node:set_method(method) self._method = method:lower() end function Node:set_path(path) self._path = path or "/" ...
dofile('menu.lua'); Look = function(s) if not s.exam then return 'Ничего особенного...'; end return call(s,'exam'); end Open = function(s) if not s.open then return 'Это нельзя открыть...'; end if s.Opened then return 'Уже открыто...'; end local r,v = call(s,'open'); if v ~= false then s.Opened = tru...
local class = require "lib.middleclass" local Dockerfile = class('Dockerfile') function Dockerfile:initialize() self.content = '' end function Dockerfile:command(cmdName, args) self.content = self.content .. cmdName if args ~= nil then if type(args) == 'table' then for _, v in ipa...
local m = {} function m.to_decimal(str) local decimal = 0 for i = #str, 1, -1 do local next_char = str:sub(i, i) local digit = tonumber(next_char) if not digit or digit >= 8 then return 0 end decimal = decimal + digit * (8 ^ (#str - i)) end return decimal end local fun = function(st...
function onUpdateDatabase() print("> Updating database to version 5 (black skull & guild wars)") db.query("ALTER TABLE `players` CHANGE `redskull` `skull` TINYINT(1) NOT NULL DEFAULT '0', CHANGE `redskulltime` `skulltime` INT(11) NOT NULL DEFAULT '0'") db.query("CREATE TABLE IF NOT EXISTS `guild_wars` ( `id` int(11)...
--[[ Loads necessary libraries and files for the train script. ]] local function convert_model_backend(model, opt, is_gpu) assert(model) assert(opt) assert(is_gpu ~= nil) if opt.GPU >= 1 and is_gpu then print('Running on GPU: num_gpus = [' .. opt.nGPU .. ']') require 'cutorch' ...
arc_path = 'libs/arc/' require(arc_path .. 'arc') _navi = require(arc_path .. 'navi') require('txt/intro') local state = require 'libs/stateswitcher' -- shortcuts for love stuff le = love.event lg = love.graphics lg.setDefaultFilter("nearest", "nearest", 0) -- load variables -- colors col = { white = {255,255,255...
local fakeTilesHelper = require("helpers.fake_tiles") local coverupWall = {} coverupWall.name = "coverupWall" coverupWall.depth = -13000 coverupWall.placements = { name = "coverup_wall", data = { tiletype = "3", width = 8, height = 8 } } coverupWall.sprite = fakeTilesHelper.getEnt...
----------------------------------- -- Area: East Sarutabaruta (116) -- NM: Sharp-Eared Ropipi ----------------------------------- function onMobDeath(mob, player, isKiller) end;
cc = CardCollect() for i=1,10 do for j=1,4 do cc:Add(Card(i,j)) end end