content
stringlengths
5
1.05M
--[[ 网络错误 ]] local NetError = { SHAKE_PACK_FLAG = 1, -- 握手包标识 PROTOCOL_VERSION = 2, -- 协议版本号 RSA_ENCRYPT = 3, -- rsa加密 RSA_DECRYPT = 4, -- rsa解密 DATA_SEND = 5, -- 数据发送 UNK_DATA_ENCRYPT = 6, -- 未知数据加密算法 UNK_DATA_DECRYPT = 7, -- 未知数据解密算法 NOT_DATA_ENCKEY = 8, -- 无数据加密密钥 NOT_DATA_DECKEY ...
local m, s, o if luci.sys.call("pgrep haproxy-tcp >/dev/null") == 0 then m = Map("haproxy-tcp", translate("HAProxy-TCP"), "%s - %s" %{translate("HAProxy-TCP"), translate("RUNNING")}) else m = Map("haproxy-tcp", translate("HAProxy-TCP"), "%s - %s" %{translate("HAProxy-TCP"), translate("NOT RUNNING")}) end s = m:sect...
local cjson = require('cjson.safe') local jencode = cjson.encode local cache = require "apps.resty.cache" local system_conf = require "config.init" local redis_conf = system_conf.redisConf local request = require "apps.lib.request" local args,method = request:get() local i...
-- Copyright (c) 2021 Trevor Redfern -- -- This software is released under the MIT License. -- https://opensource.org/licenses/MIT local components = require "moonpie.ui.components" local connect = require "moonpie.redux.connect" local player = require "game.rules.player" local LabelPair = require "game.ui.wid...
--ZFUNC-splice-v1 local function splice( tab, idx, n, ... ) --> removed local values = { ... } local init_tab_size = #tab local removed = {} if n > 0 then for i = idx, ( idx + n - 1 ) do table.insert( removed, tab[ i ] ) tab[ i ] = nil end end local tail = {} for i =...
--[[ MIT License Copyright (c) 2019-2021 Marco Lizza 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, publ...
data:extend({ { --nuclear furnace type = "item", name = "nuclear-furnace", icon = "__GnosticTest__/graphics/item/nuclear-furnace-icon.png", icon_size = 64, icon_mipmaps = 4, subgroup = "smelting-machine", place_result = "nuclear-furnace", stack_size = 50, ...
local package = { plugin='modal', platform='html5', appName='ModalDemo', appVersion='1.0', dstPath="/Users/daddyjam/Documents/Projects/Plugins-HTML5/corona-html5-modal-plugin/output_html5", projectPath="/Users/daddyjam/Documents/Projects/Plugins-HTML5/corona-html5-modal-plugin/corona_project/ModalDemo", i...
--if tonumber(GetCVar'modUnitFrame') == 0 then return end local _, class = UnitClass'player' if class ~= 'DRUID' then return end local TEXTURE = [[Interface\AddOns\UnitFramesImproved_TBC\Textures\sb.tga]] local BACKDROP = {bgFile = [[Interface\Tooltips\UI-Tooltip-Background]],...
------------------------------------------------------------------------------- -- ElvUI Chat Tweaks By Crackpotx (US, Lightbringer) -- Based on functionality provided by Prat and/or Chatter ------------------------------------------------------------------------------- -- thanks to NinjaFish for the 5.51 fixes! :-) lo...
--------------------------------------------- -- Provoke --------------------------------------------- require("scripts/globals/automatonweaponskills") require("scripts/globals/settings") require("scripts/globals/status") require("scripts/globals/msg") --------------------------------------------- function onMobSkillC...
local _local_1_ = require("paperplanes.util.providers") local set_field = _local_1_["set-field"] local function make(content_arg, meta) local args do local _2_ = {} table.insert(_2_, "--data-binary") table.insert(_2_, content_arg) table.insert(_2_, "https://paste.rs") args = _2_ end local fu...
local ffi = require 'ffi' local uni = require 'ffi.unicode' ffi.cdef[[ int GetModuleHandleW(const wchar_t* libname); ]] return function(name) local wpath = uni.u2w(name) return ffi.C.GetModuleHandleW(wpath) end
return { short_music_name = "song03", bpm = 720, offset_time = 0, music_name = "bgm-song03", left_track = { { begin_time = "1.583333", key_flag = "K_LEFT", end_time = "1.583333" }, { begin_time = "2.25", key_flag = "K_LEFT", end_time = "2.25" }, { begin_time = "2.916667", key_flag...
return Component.create("Health", {"remaining"}, {remaining = MAX_HEALTH})
/* * @package : rlib * @module : calc * @author : Richard [http://steamcommunity.com/profiles/76561198135875727] * @copyright : (C) 2018 - 2020 * @since : 1.0.0 * @website : https://rlib.io * @docs : https://docs.rlib.io * * MIT License * * THE SO...
local M = {} M.LEFT=1 M.RIGHT=2 function M.play_animation(self,anim,facing) if facing and facing ~= self.current_facing then self.current_facing=facing if facing==M.LEFT then sprite.set_hflip("#sprite", true) else sprite.set_hflip("#sprite", false) end end if anim==nil or anim == self.current_anim th...
require "export-compile-commands" DIR = path.getabsolute("..") print(DIR) THIRDPARTYDIR = path.join(DIR, "3rdparty") BUILDDIR = path.join(DIR, "build") TESTDIR = path.join(DIR, "tests") workspace "Gabibits" configurations { "Debug", "Release" } platforms { "Android-Arm", "Win32", "Win64", "Linux32", "Linux64...
local iter = require("plenary.iterators").iter local utils = require("neo-tree.utils") -- File nesting a la JetBrains (#117). local M = {} M.config = {} --- Checks if file-nesting module is enabled by config ---@return boolean function M.is_enabled() return next(M.config) ~= nil end --- Returns `item` nesting pare...
local button_table = require 'input.button_table' local gamepad = {} function gamepad.new() return setmetatable({ connected = true, leftx = 0, lefty = 0, rightx = 0, righty = 0, triggerleft = 0, triggerright = 0, }, gamepad) end gamepad.pressed = button...
-- vim: filetype=markdown: --[[ © 2022 Tim Menzies, Jamie Jennings ## Inexact, yet Reasonable Algorithms make choices. Choices have consequences. Many choices are ethical but not choosing is unethical and irrational. Algorithms, once written, have to be wrangled. Do you know how to reason with your algorithm...
local K, C = unpack(select(2, ...)) local Module = K:NewModule("Cooldowns") local _G = _G local math_floor = _G.math.floor local pairs = _G.pairs local select = _G.select local string_find = _G.string.find local CreateFrame = _G.CreateFrame local GetActionCooldown = _G.GetActionCooldown local getmetatable = _G.getmet...
local Pipeline = {} local Pobj = {} function Pipeline.output(self, list, flg) if flg == 0 then return end for k,v in pairs(list) do print(k,v) end end function Pipeline.new(self, elements) self.element_list = elements self:output(elements, 0) return PObj end function Pi...
local L = Grid2Options.L Grid2Options:RegisterStatusOptions("ready-check", "misc", function(self, status, options, optionParams) self:MakeStatusColorOptions(status, options, optionParams) self:MakeStatusThresholdOptions(status, options, optionParams, 1, 20, 1, false) end, { color1 = L["Waiting color"], colorDesc1 ...
local musicChannel = g_sounds.getChannel(1) -- Public functions function init() connect(g_game, 'onTextMessage', getParams) connect(g_game, { onGameEnd = terminate} ) end function getParams(mode, text) if not g_game.isOnline() then return end if mode == MessageModes.Failure then if string.sub(text, 1,...
modifier_pango_mobility_displacement = class({}) function modifier_pango_mobility_displacement:DeclareFunctions() return { MODIFIER_PROPERTY_OVERRIDE_ANIMATION, MODIFIER_PROPERTY_OVERRIDE_ANIMATION_RATE, } end function modifier_pango_mobility_displacement:GetOverrideAnimation() return ACT_DOTA_FLAIL end funct...
tigris.magic.register_spell("tigris_magic:snuff", { description = "Snuff", longdesc = "Launches a projectile that puts out fire with water.", cost = {mana = 30}, emblem = "defense", color = "#70F", on_use = function(itemstack, player, pointed_thing) tigris.create_projectile("tigris_magic...
object_tangible_item_beast_converted_blurrg_decoration = object_tangible_item_beast_shared_converted_blurrg_decoration:new { } ObjectTemplates:addTemplate(object_tangible_item_beast_converted_blurrg_decoration, "object/tangible/item/beast/converted_blurrg_decoration.iff")
local bit32 = require("bit") local lshift = bit32.lshift local rshift = bit32.rshift local band = bit32.band function apply(opcodes, opcode_cycles, z80, memory) -- ld r, r opcodes[0x40] = function(self, reg, flags, mem) reg[4] = reg[4] end opcodes[0x41] = function(self, reg, flags, mem) reg[4] = reg[5] end op...
 -- Place this file into your %FARPROFILE%\Macros\scripts -- Switch visibility of ConEmu Panel Views -- You may customize Panel Views display in ConEmu Settings -> Views local ConEmuTh = "bd454d48-448e-46cc-909d-b6cf789c2d65" Macro { area="Shell"; key="CtrlShiftF1"; flags=""; description="ConEmu: Switch Th...
class("DoneNumbersDisabled").extends() function DoneNumbersDisabled:init(puzzle) self.left = table.create(puzzle.height, 0) for y = 1, puzzle.height do self.left[y] = {} end self.top = table.create(puzzle.width, 0) for x = 1, puzzle.width do self.top[x] = {} end end function DoneNumbersDisabled:updatePositi...
#!/usr/bin/env lua -- -- Reads data from a streaming API method. -- local cfg = require "_config"() local twitter = require "luatwit" local util = require "luatwit.util" local pretty = require "pl.pretty" -- initialize the twitter client local oauth_params = util.load_keys(cfg.app_keys, cfg.user_keys) local client = t...
-- Pretty much everything here is dangerous. Possibly life-threatening. local FIXED local function FixAllErrors() if FIXED then return end local NIL = getmetatable(nil) or {} local NUMBER = getmetatable(0) or {} local STRING = getmetatable("") local VECTOR = FindMetaTable("Vector") local NULL_META = getmetata...
--[[ This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:29' 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...
local Widget = require "widgets/widget" local UIAnim = require "widgets/uianim" local Text = require "widgets/text" local SavingIndicator = Class(Widget, function(self, owner) self.owner = owner Widget._ctor(self, "Saving") self.anim = self:AddChild(UIAnim()) self.anim:GetAnimState():SetBank("saving"...
-- local a = vim.api ----------------------------- -- Export ----------------------------- ---@class lir_utils local utils = {} ---@param msg string function utils.error(msg) vim.cmd([[redraw]]) vim.cmd([[echohl Error]]) vim.cmd(string.format([[echomsg '%s']], msg)) vim.cmd([[echohl None]]) end return utils...
object_mobile_azure_cabal_mystril_slicer_02 = object_mobile_shared_azure_cabal_mystril_slicer_02:new { } ObjectTemplates:addTemplate(object_mobile_azure_cabal_mystril_slicer_02, "object/mobile/azure_cabal_mystril_slicer_02.iff")
rule("c++.reflection") after_load(function (target, opt) import("gen_refl") local headerfiles = {} local files = target:extraconf("rules", "c++.reflection", "files") for _, file in ipairs(files) do local p = path.join(target:scriptdir(), file) for __, filepath...
technic.register_tier("MV", "Medium Voltage") local path = technic.modpath.."/machines/MV" -- Wiring stuff dofile(path.."/cables.lua") dofile(path.."/battery_box.lua") -- Generators if technic.config:get_bool("enable_wind_mill") then dofile(path.."/wind_mill.lua") end dofile(path.."/generator.lua") dofile(path.."/...
-- mod-version:2 -- lite-xl 2.0 local style = require "core.style" local config = require "core.config" local DocView = require "core.docview" -- TODO: replace with `doc:get_indent_info()` when 2.1 releases local function get_indent_info(doc) if doc.get_indent_info then return doc:get_indent_info() end retu...
local sourcelessvalue = false; function setState(state) local datavalue = 1; if state == nil or state == false or state == 0 then datavalue = 0; end if source and not source.isStatic() then source.setValue(datavalue); else if datavalue == 0 then sourcelessvalue = false; else sourc...
local setmetatable = setmetatable local ipairs = ipairs local math = math local base = require('wibox.widget.base') local color = require("gears.color") local beautiful = require("beautiful") local lgi = require("lgi") local cairo = lgi.cairo local Pango = lgi.Pango local assault = { mt = {} } local data = setmetatab...
Config = {} Config.EnableBlips = true Config.EnableJerryCans = true Config.EnableBuyableJerryCans = true -- Coming soon, currently useless Config.VehicleFailure = 10 -- At what fuel-percentage should the engine stop functioning properly? (Defualt: 10) Config.ShouldDisplayHud =...
local formatters = require("lvim.lsp.null-ls.formatters") formatters.setup({ { command = "isort", filetypes = { "python" } }, { command = "black", filetypes = { "python" } }, { command = "stylua", filetypes = { "lua" } }, { command = "shfmt", extra_args = { "-i", "2", "-ci" } }, { command = "prettier", filetypes =...
require 'inv_manager' require 'inv_common' require 'craft_manager' local config_path = shell.dir().."/server.json" local file = io.open(config_path,"r") local data = file:read("*all") local config = textutils.unserialiseJSON(data) file:close() file = io.open(shell.dir().."/recipes/minecraft.json","r") data = file:rea...
local Class = require("lib.Class") local CC = Class:derive("CircleCollider") function CC:new(radius) self.r = radius end function CC:on_start() assert(self.entity.Transform ~=nil, "CircleCollider component requires a Transform component to exist in the attached entity!") self.tr = self.entity.Transform e...
local utf8 = require("utf8") -- NOTE (rinqu): this is a basic implementation function utf8.sub(s, i, j) assert(type(s) == "number" or type(s) == "string", string.format("bad argument #1 to 'sub' (string expected, got %s)", type(s) ~= "nil" and type(s) or "no value")) assert(type(i) == "number" or type(tonumber(i)) =...
return (function(self) local s = m(self, 'GetEffectiveScale') local b, l, w, h = m(self, 'GetRect') return b * s, l * s, w * s, h * s end)(...)
room_menu_toolbar= { name="room_menu_toolbar",type=0,typeName="View",time=0,report=0,x=0,y=0,width=1280,height=720,visible=1,fillParentWidth=1,fillParentHeight=1,nodeAlign=kAlignTopLeft, { name="shield",type=1,typeName="Image",time=92557376,report=0,x=0,y=0,width=2,height=2,visible=1,fillParentWidth=1,fillParentHei...
---------------------------------- -- Add your custom functions here: ---------------------------------- function AuxiliaryConsoleClose(...) debugFunc("AuxiliaryConsoleClose",...) local consoleHandle=... return sim.auxiliaryConsoleClose(consoleHandle) end function AuxiliaryConsoleOpen(...) debugFunc("...
Ambi.UI = Ambi.UI or {} Ambi.UI.Draw = Ambi.UI.Draw or {} -- ------------------------------------------------------------------------------------- local C = Ambi.General.Global.Colors local W, H = ScrW(), ScrH() local surface, draw, math, string, Material, FrameTime, Matrix, SysTime, ipairs = surface, draw, math, stri...
return function (stream, name) if name == "ANONYMOUS" then return function () return coroutine.yield() == "success"; end, 0; end end
------------------------------------------------------------------------------- -- AdiBags - Korthian Relics By Crackpot (US, Arthas) ------------------------------------------------------------------------------- local addonName, addon = ... local AdiBags = LibStub("AceAddon-3.0"):GetAddon("AdiBags") local tonumber ...
function route93outpost.destroyHelicopters() env.info("route93outpost.destroyHelicopters") for _, u in pairs(mist.getUnitsInZones(mist.makeUnitTable({'[red][helicopter]'}), {route93outpost.triggerZone})) do local unitID = tonumber(u:getID()) trigger.action.explosion(u:getPosition().p, 100) ...
ZPClass.Name = "HumanSuicidalClassName" ZPClass.Description = "HumanSuicidalClassDescription" ZPClass.MaxHealth = 50 ZPClass.PModel = "models/player/guerilla.mdl" ZPClass.Speed = 220 ZPClass.RunSpeed = 100 ZPClass.CrouchSpeed = 0.5 ZPClass.Gravity = 0.9 ZPClass.Breath = 50 local ActivationAction = function(ply) ply:S...
-- Idea: look at the structure of the official luac compiler and construct a pattern grammar based on that local utils = require 'luainlua.common.utils' local undump = require 'luainlua.bytecode.undump' local cfg = require 'luainlua.cfg.cfg' local decompiler = {} local ast = {} function ast:set(key, val) ...
yGather.matdb = {}; -- make globals available local dofile = dofile; local pcall = pcall; local pairs = pairs; local ipairs = ipairs; local table = table; local TEXT = TEXT; local logger = yGather.logger; local translate = yGather.i18n.translate; setfenv(1, yGather.matdb); local idDB = {}; local nameDB = {}; local ...
require 'Util' require 'Constants' -- INITIALIZE GRAPHICAL DATA icon_texture = love.graphics.newImage('graphics/icons.png') icons = getSpriteQuads( { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 , 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 }, icon_texture, 22, 22, 0 ) status_icons = getSpriteQuads({0, 1, 2, 3}, icon_t...
------------------------------------------------------------------ -- -- Author: Alexey Melnichuk <alexeymelnichuck@gmail.com> -- -- Copyright (C) 2016 Alexey Melnichuk <alexeymelnichuck@gmail.com> -- -- Licensed according to the included 'LICENSE' document -- -- This file is part of lua-websockets-extensions libra...
local function TOOL_MENU(Panel) Panel:AddControl("Slider", { ["Label"] = "#bgn.settings.optimization.bgn_disable_logic_radius", ["Command"] = "bgn_disable_logic_radius", ["Type"] = "Float", ["Min"] = "0", ["Max"] = "1000" }); Panel:AddControl('Label', { Text = '#bgn.settings.optimization.bgn_disable_logic...
-- json encode/decode -- by Qige -- 2017.01.06 json = {} function json.encode(_data) local _response = {} _response = json.table2string(_data) if (_response == nil or _response == '') then _response = {} end return _response end -- if 'key' is 'string', save 'key' -- if 'string', return _data -- if '...
Core = {}; -- Core Lib Scenes = {}; Debug = {}; __ENV_ID = "[Global Environment]"; function LuaCore.Exists(path) local pathToTest = load("return " .. path); local noError, noNil = pcall(pathToTest); if not noError or noNil == nil then return false; end return true; end LuaCore.libList = {...
local hogs = {} local spawncrate = 0 function mapM_(func, tbl) for i,v in pairs(tbl) do func(v) end end function map(func, tbl) local newtbl = {} for i,v in pairs(tbl) do newtbl[i] = func(v) end return newtbl end function filter(func, tbl) local newtbl = {} for i,v i...
local PLUGIN = PLUGIN PLUGIN.CommandTemplate = function(client, arguments, minArgCount, doWork, isTraceEntity) if(doWork == nil) then return; end; if (#arguments < minArgCount) then if (isTraceEntity) then local entity = AdvNut.util.GetPlayerTraceEntity(client); if (entity and entity:IsPlayer()) the...
local KUI, E, L, V, P, G = unpack(select(2, ...)) local KS = KUI:GetModule("KuiSkins") local S = E:GetModule("Skins") --Cache global variables --Lua functions local _G = _G local select = select --WoW API / Variables --Global variables that we don't cache, list them here for the mikk's Find Globals script -- GLOBALS:...
local cloud = {} function cloud:new() local public = {} local private = {} private.x = W*1.1 private.y = RandomGenerator:random(0,H) private.w = RandomGenerator:random(W*0.02,W*0.05) private.h = RandomGenerator:random(H*0.02,H*0.05) function cloud:draw() love.graphics.setColor(RandomGenerator...
local defineRegistration = require(script.Parent.defineRegistration) local System = require(script.Parent.System) return function() describe("interval", function() it("should create stepper definitions", function() local TestSystem = System:extend("TestSystem") expect(defineRegistr...
--[[Author: Pizzalol, kritth Date: 12.07.2015. Provides vision along the way of the projectile]] function WaveOfTerrorVision( keys ) local caster = keys.caster local caster_location = caster:GetAbsOrigin() local ability = keys.ability local target_point = keys.target_points[1] local forwardVec = (target_point - ...
local ffi = require "ffi" local ffi_new = ffi.new local ffi_typeof = ffi.typeof local ffi_cdef = ffi.cdef local ffi_str = ffi.string local ceil = math.ceil local assert = assert local setmetatable = setmetatable local nettle = require "resty.nettle" ffi_cdef[[ typedef struc...
local headBaseLayout = require("view/kScreen_1280_800/games/common2/headBaseLayout"); require("games/common2/module/invite2/data/inviteConfig"); require("games/common2/module/layerShowTypeData"); local viewBase = Import("games/common2/module/viewBase"); local HeadViewBaseNew = class(viewBase,false); HeadView...
local module = {} local dark = require('prospector.theme_dark') function module.terminal(base) return dark.terminal(base) end function module.palette(base) return dark.palette(base) end function module.load(base, config) local t = require('prospector.util').tweak_color local p = module.palette(base) ...
local MSQ = LibStub("Masque", true) if not MSQ then return end --Masque_Ryver MSQ:AddSkin("Masque_Ryver", { Author = "Kendian", Version = "1", Shape = "Square", Masque_Version = 50100, Normal = { Width = 36, Height = 36, Texture = [[Interface\AddOns\Masque_Ryver...
function love.conf(t) t.title = 'Pong (Atari)' t.console = true t.width = 858 t.height = 525 end
--[[ Copyright [2021] [Julien Wetzel] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed t...
module:depends("http"); local prosody = prosody; local hosts = prosody.hosts; local my_host = module:get_host(); local strchar = string.char; local strformat = string.format; local split_jid = require "util.jid".split; local config_get = require "core.configmanager".get; local urldecode = require "net.http".urldecode;...
object_tangible_theme_park_nym_shuttle_control_terminal = object_tangible_theme_park_nym_shared_shuttle_control_terminal:new { } ObjectTemplates:addTemplate(object_tangible_theme_park_nym_shuttle_control_terminal, "object/tangible/theme_park/nym/shuttle_control_terminal.iff")
Instance.new("ColorCorrectionEffect", game.Lighting).Saturation = 99999998430674944.42069
greenCode.config:Add( "session_timeout", 10*60, false, false, false ); greenCode.config:Add( "session_noname", "Unknown", false, false, false ); greenCode.config:Add( "character_save_interval", 5, false, false, false ); greenCode.config:Add( "crouched_speed", 0.2, false, false, false ); greenCode.config:Add( "j...
local oakrouting = require("resty.oakrouting") local match_count = 100000 local table_insert = table.insert local match_router local routers = {} for i = 1, match_count do table_insert(routers, { path = "/bench/" .. ngx.md5(i), method = "GET", handler = function() end }) if i == ...
--[[ Copyright (c) 2022 npc_strider, ickputzdirwech * Original mod by npc_strider. * For direct use of code or graphics, credit is appreciated and encouraged. See LICENSE.txt for more information. * This mod may contain modified code sourced from base/core Factorio. * This mod has been modified by ickputzdirwech. ]...
-- This file is part of the SAMP.Lua project. -- Licensed under the MIT License. -- Copyright (c) 2016, FYP @ BlastHack Team <blast.hk> -- https://github.com/THE-FYP/SAMP.Lua local raknet = require 'lib.samp.raknet' local events = require 'lib.samp.eve...
-- Made with 🖤 By Bad -- https://github.com/Bad57/ragP AddEvent("OnPlayerStartExitVehicle", function(vehicle) local currentspeed = GetVehicleForwardSpeed(vehicle) CallRemoteEvent("RagdollPlayer", currentspeed,vehicle) end)
return { corvaliant = { acceleration = 0.009, activatewhenbuilt = true, airhoverfactor = 0, airstrafe = false, autoheal = 5, bankscale = 1, blocking = false, brakerate = 0.375, buildcostenergy = 1513318, buildcostmetal = 128316, builder = true, buildpic = "corvaliant.dds", build...
-- -- Various pretty printing functions to make life easier -- -- (C) 2010-2013 Markus Klotzbuecher <markus.klotzbuecher@mech.kuleuven.be> -- (C) 2014-2020 Markus Klotzbuecher <mk@mkio.de> -- -- SPDX-License-Identifier: BSD-3-Clause -- require("ansicolors") require("utils") require("rfsm") local unpack, print, type, ...
venom_filled_arachne = Creature:new { objectName = "@mob/creature_names:venom_filled_arachne", socialGroup = "arachne", faction = "", level = 36, chanceHit = 0.4, damageMin = 300, damageMax = 310, baseXp = 3642, baseHAM = 8500, baseHAMmax = 10300, armor = 0, resists = {145,145,20,165,165,20,165,-1,-1}, mea...
local refresh_rate = 60 local gui_refresh_rate = 10 local types = { ["storage-tank"] = true, ["boiler"] = true, ["pipe"] = true, ["pipe-to-ground"] = true, ["generator"] = true, } local look_offset = 0.5 local look_distance = 1 local tank_surroundings_check_distance = 5 local function get_tank(entity) local pos...
local tArgs = {...} function refuel(secs, repl) if repl == "replace" then fs.move("refuelSA.lua", "refuel.lua") term.clear() term.setCursorPos(1,1) print("Replaced standard 'refuel' script. Delete 'refuel' to revert it!") else if secs == nil then secs = 120 end print("Max fuel level: "..turtle.getFu...
-- Transitions Demo: Kim -- -- Copyright (c) 2010-present Bifrost Entertainment AS and Tommy Nguyen -- Distributed under the MIT License. -- (See accompanying file LICENSE or copy at http://opensource.org/licenses/MIT) local Math = require("Math") local Transition = require("Transition") Kim = {} Kim.__index = Kim f...
require "config" local function createImprovedDrillTechnology() data:extend( { { type = "technology", name = "fusion-minidrill", icon = "__fupower__/graphics/icons/fusion-minidrill.png", prerequisites = {"alien-technology"}, effects = {{type = "unlock-recipe", recipe = "fusion-min...
local skynet = require "skynet" local s = require "service" local balls={}--[playerid]=ball local playerCount = 0 --玩家数量 local playerIndex = 0 --玩家加入顺序 local randomX = {} local randomZ = {} function ball( )--每个玩家控制一个ball local m = { playerid=nil, node=nil, agent=nil, x=0, z=0, health=0, rotY=0 } re...
function event_addon_command(...) term = table.concat({...}, ' ') send_ipc_message(term) end function event_load() send_command('alias ipc lua c ipc') end function event_unload() send_command('unalias ipc') end function event_ipc_message(msg) add_to_chat(5, msg) end
#include "game.lua" #include "options.lua" #include "score.lua" #include "map.lua" #include "about.lua" function DebugMenuUI() local val = GetInt("options.gfx.debug") local is_mission = false local mode = " " local map = " " -- Thx to Rubikow#0098 -- local maxDist = 500 local plyTransfor...
require('bufferline').setup({ options = { numbers = 'buffer_id', indicator_icon = '▎',buffer_close_icon = '',modified_icon = '●', close_icon = '',left_trunc_marker = '',right_trunc_marker = '', max_name_length = 20,max_prefix_length = 15, tab_size = 25,diagnostics = 'nvim_lsp', diagnostics_indicator = function(_, _...
-- Copyright (c) 2021 Trevor Redfern -- -- This software is released under the MIT License. -- https://opensource.org/licenses/MIT describe("game.rules.inventory.actions", function() local actions = require "game.rules.inventory.actions" it("ACTION: addItem", function() local item = {} local ent...
-- -- test_tokens.lua -- Generate a NuGet packages.config file. -- Copyright (c) Jason Perkins and the Premake project -- local p = premake local suite = test.declare("vstudio_vs2010_tokens") local vc2010 = p.vstudio.vc2010 -- -- Setup -- local wks, prj function suite.setup() p.action.set("vs2010") wks...
package.path = "..\\src\\?.lua;" .. package.path local uv = require "lluv" local ut = require "lluv.utils" local pg = require "lluv.pg" local EventEmitter = require "EventEmitter".EventEmitter local ENOTCONN = uv.error('LIBUV', uv.ENOTCONN) -- Pool does not track any query activity -- it just do round robin for mul...
if Mods.LeaderLib then local VersionInt = Ext.GetModInfo("543d653f-446c-43d8-8916-54670ce24dd9_7e737d2f-31d2-4751-963f-be6ccc59cd0c").Version local major = (VersionInt >> 28); local minor = (VersionInt >> 24) & 0x0F; local revision = (VersionInt >> 16) & 0xFF; local build = (VersionInt & 0xFFFF); local ts = Mods....
-- connect to wifi wifi.sta.config("name","password") wifi.sta.connect() tmr.delay(1000000) -- trying get request sk=net.createConnection(net.TCP, 0) sk:on("receive", function(sck, c) print(c) end ) sk:connect(3000,"52.138.39.36") sk:send("GET /ws\r\nConnection: keep-alive\r\nAccept: /\r\n\r\n") -- trying single quot...
admins = { "lars@<DOMAINNAME>" } modules_enabled = { -- Generally required "roster"; -- Allow users to have a roster. Recommended ;) "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in. "tls"; -- Add support for secure TLS on c2s/s2s connections "dialback"; -- s2s...
import("SampleAssembly") -- Import the 'Sample' component's assembly (SampleAssembly) function run() Restart() Log("Starting 'Value' test") local sampleManager = GetGameObjectFromPath("SampleManager") sample = GetComponent(sampleManager, Sample) -- Get the 'Sample' component on the SampleManager GameObject Wa...