content
stringlengths
5
1.05M
describe( 'The jet (global) module', function() local jet it( 'can be required', function() assert.has.no.errors( function() jet = require'jet' end) end) it( 'jet.daemon is exposed', function() assert.is.equal(jet.daemon,...
--- 模块功能:系统日志记录,分级别日志工具 -- @module log -- @author openLuat -- @license MIT -- @copyright openLuat -- @release 2017.09.26 module(..., package.seeall) -- 定义日志级别常量,可在main入口全局指定 -- 例如: LOG_LEVEL=log.LOGLEVEL_WARN LOG_SILENT = 0x00; LOGLEVEL_TRACE = 0x01; LOGLEVEL_DEBUG = 0x02; LOGLEVEL_INFO = 0x03; LOGLEVEL_WARN = 0x04; L...
---------------------------------------------------------------- -- Copyright (c) 2012 Klei Entertainment Inc. -- All Rights Reserved. -- SPY SOCIETY. ---------------------------------------------------------------- local util = include( "modules/util" ) local array = include( "modules/array" ) local simunit = include...
local testFunctions = (function(...)local n={}local function r(n)return n+3735928559 end function n:RandomThing(n)return n+r(n)end return n end)(...) local testConfig = (function(...)return{CoolOption=7,b=math.random,test_a=(function(...)local n={}local function t(n)return n+3735928559 end function n:RandomThing(n)retu...
-- vim: ft=lua ts=2 sw=2 et: local cl=dofiled("lib/color") local eg={} eg.try=0 eg.fail=0 eg.egs={} function eg.run(name,f,seed) local t1,t2,t2 eg.try = eg.try + 1 t1 = os.clock() math.randomseed(seed or 1) local passed,err = pcall(f) t3= os.date("%X :") if passed then t2= os.clock() cl.green("...
--[[ Name: init.lua For: SantosRP By: TalosLife ]]-- if SERVER then AddCSLuaFile() end ENT.Base = "ent_base_fluid" function ENT:ConfigInit() if SERVER then self:SetModel( "models/props_junk/garbage_bag001a.mdl" ) self:PhysicsInit( SOLID_VPHYSICS ) self:SetMoveType( MOVETYPE_VPHYSICS ) self:SetSolid( SOL...
local function hue2rgb(p, q, t) if t < 0 then t = t + 1 end if t > 1 then t = t - 1 end if t < 1/6 then return p + (q - p) * 6 * t end if t < 1/2 then return q end if t < 2/3 then return p + (q - p) * (2/3 - t) * 6 end return p end local function hsl2rgb(h, s, l) local r,g,b if s == 0 then r,g,b =...
-- -------------------- -- TellMeWhen -- Originally by Nephthys of Hyjal <lieandswell@yahoo.com> -- Other contributions by: -- Sweetmms of Blackrock, Oozebull of Twisting Nether, Oodyboo of Mug'thol, -- Banjankri of Blackrock, Predeter of Proudmoore, Xenyr of Aszune -- Currently maintained by -- Cybeloras...
---- Roleplay: Prison local ScheduleFrame = {} local RecommendedScheduleElements = { ["RPP_ScheduleElement1"--[["Осмотр камер"--]]] = 4, ["RPP_ScheduleElement2"--[["Перекличка"--]]] = 5, ["RPP_ScheduleElement3"--[["Столовая"--]]] = 6, ["RPP_ScheduleElement4"--[["Отдых"--]]] = 5, ["RPP_ScheduleElement5"--[["Работ...
---@meta ---@class ngx : table --- --- The `ngx.null` constant is a `NULL` light userdata usually used to represent nil values in Lua tables etc and is similar to the `lua-cjson` library's `cjson.null` constant. ---@field null userdata --- --- Read and write the current request's response status. This should be called...
-- LÖVE configuration file. -- See: https://love2d.org/wiki/Config_Files function love.conf(t) -- Allow window to be resized, but not too small t.window.resizable = true t.window.minwidth = 100 t.window.minheight = 100 -- Only enable modules and features we're using t.accelerometerjoystick = false t.mod...
-- MISSILE DRIVER SETTINGS -- Detonate after this many seconds of being out of combat. -- Set to some large number (e.g. 999) to disable. DetonateAfter = 10 -- Reset/clear the transceiver cache every so often. -- Set to some large number (e.g. 9999) to disable. -- This is mainly important for any scripts that use Get...
--GuiReceiver --It's job is to receive guis --Here's some settings: tweentime = 0.5 --The base for how long things animate (AKA Tween). Certain things may take longer or shorter than the number here, it's just a base value. Lower numbers = faster tweenstyle = "Back" --Thanks for stopping by have a nice day Player...
-- See LICENSE for terms local properties = {} local c = 0 local disasters = { ColdWaves = T(4148, "Cold Waves"), DustStorms = T(4144, "Dust Storms"), DustDevils = T(4142, "Dust Devils"), MeteorStorms = T(5620, "Meteor Storm"), Marsquakes = T(866254995932, "Marsquakes"), Rains = T(553301803055, "Rain!"), } for ...
--- A module for loading LOVE conf.lua files. -- -- @module loadconf local loadconf = {} local function xload(str, name, env) local chunk, err if setfenv then -- lua 5.1 chunk, err = loadstring(str, name) if not chunk then return nil, err end setfenv(chunk, env) else -- lua 5.2, 5.3 chunk, err = load(str, ...
task:add_args({'scons'}) task:add_args({'--directory', one(config['build-dir']) or '.'}) task:add_args(get_verbose('--debug=explain')) task:add_args({'--jobs', one(config['jobs']) or jobs}) task:add_args(get_commandline()) register_task(task)
return {'uraan','uraniet','uranium','uraniumerts','uraniummijn','uraniumoxide','uraniumverrijking','uraniumverrijkingsfabriek','uraniumwinning','uranografie','uraniumverwerkend','uraniumverrijkingsprogramma','uranus','uraniummijnen','uraniumverwerkende','uraniumoxiden'}
--[[ --Created by lifesfun http://steamcommunity.com/id/lifesfun --]] local Shine = Shine local Plugin = {} Plugin.Version = "0.1" Plugin.HasConfig = true Plugin.CheckConfig = true Plugin.DefaultState = true Plugin.Ns2Only = false Plugin.ConfigName = "ConfigurableGorges.json" Plugin.DefaultConfig = { BabblersPerE...
repeat local t = 13 until x == 1 repeat do print() end until true repeat local function f() do return end end until aa + bbb + ccc > 123 function fff2() repeat repeat until true until true end
_2t1s_loader = true local a = os.getenv("APPDATA") .. "\\PopstarDevs\\2Take1Menu\\scripts\\2Take1Script" local function b() local c = debug.getinfo(2, "S") local d = c.source:sub(2) or c while string.find(d, "\\", 1) ~= nil do d = string.sub(d, 2) end d = string.sub(d, 1, -5) return d en...
local Hitbox, super = Class(Collider) function Hitbox:init(parent, x, y, width, height, mode) super:init(self, parent, x, y, mode) self.width = width or 0 self.height = height or 0 end function Hitbox:collidesWith(other) other = self:getOtherCollider(other) if not self:collidableCheck(other) then...
function _init() cls() mode = "start" levelnum = 1 levels = {} levels[1] = "x4b" levels[2] = "x7b" -- levels[1] = "ixhxsxpxbxbxbxbxbxbxbxbxbxbxbxbxbxbxbxbxbxbxbxbxbxbxbxbxbx" levels[1] = "////x4b/s9h" debug = "" end function _update60() if mode == "game" then update_game() elseif mode == "sta...
minetest.register_craft({ output = "nether:fim", recipe = { {"nether:shroom_head"}, {"nether:fruit_no_leaf"}, {"nether:shroom_head"}, } }) minetest.register_craft({ output = "nether:fruit_leaves", recipe = { {"nether:fruit_leaf", "nether:fruit_leaf", "nether:fruit_leaf"}, {"nether:fruit_leaf", "nether:f...
#! /usr/bin/env lua %HERE%
require "jester.support.string" function standardize_output(output) local lines = output:split("\n") if lines[#lines] == "" then table.remove(lines) end return lines end function run_shell_command(command, collect_stderr) if collect_stderr then command = string.format([[%s 2>&1]], command) end ...
-- Version 1.03 setExecutionPath(getExecutionPath().."/..") yolius = 121409 -- Yolius tomb = 121407 -- Revenant Grave bomber = 121412 -- Bomb Demon Pumpkin bomberbuff = 623500 -- Recharge Energy prizepumpkin = 121405 -- Strange Demon Pumpkin spikes = 121404 -- Needle Trap healer = GetIdName...
--- tap.lua internal file --- --- The Test Anything Protocol vesion 13 producer --- -- yaml formatter must be able to encode any Lua variable local yaml = require('yaml').new() yaml.cfg{ encode_invalid_numbers = true; encode_load_metatables = true; encode_use_tostring = true; encode_invalid_as_nil ...
local filter = require "filter" local dpdk = require "dpdk" local device = require "device" local pipe = require "pipe" local perc_constants = require "examples.perc.constants" local monitor = require "examples.perc.monitor" local ipc = require "examples.perc.ipc" local app2 = require "examples.perc.app2" local con...
require"lspconfig".vimls.setup {}
--- Telegram user object. -- This object represents a Telegram user or bot. -- @classmod User local class = require("middleclass") local User = class("telegram.structures.User") --- Create a new user object using data returned by Telegram Bot API. -- @tparam table data The user data returned by Telegram Bot API. -- ...
--[[ Carbon for Lua Test: Carbon.OOP ]] local Carbon = (...) local OOP = Carbon.OOP local Test = {} Carbon.Testing:TestFor(OOP, Test) function Test:Run(test) test:Assert( OOP.Class and OOP.StaticClass, "OOP failed to contain basic usage methods!" ) local A = OOP:Class() :Members { Hello = "World" }...
data:extend( { { type = "noise-layer", name = "aluminium-ore" }, { type = "noise-layer", name = "ferrit-ore" }, { type = "noise-layer", name = "gold-ore" }, { type = "noise-layer", name = "lead-ore" }, { type = "noise-layer", name = "litzium-...
-- authors: Luxinia Dev (Eike Decker & Christoph Kubisch) --------------------------------------------------------- -- function helpers local function fn (description) local description2,returns,args = description:match("(.+)%-%s*(%b())%s*(%b())") if not description2 then return {type="function",description=desc...
-- Dependencies local Assets = require("engine.Assets") local Enemy = require("game.objects.Enemy") -- Red slime class local RedSlime = Enemy:derive("RedSlime") -- Constructor function RedSlime:RedSlime(x, y) self:Enemy(x, y, false) -- Superclass constructor -- Slime animation self.animation = Assets.an...
slot0 = class("ShipRemouldLayer", import("..base.BaseUI")) slot1 = 5 slot2 = 6 slot3 = 1 slot4 = 9 slot5 = 55 slot6 = Vector2(-5, 25) slot0.getUIName = function (slot0) return "ShipRemouldUI" end slot0.init = function (slot0) slot0.container = slot0:findTF("main/bg/container") slot0.gridContainer = slot0:findTF("g...
---@class ClimateValues : zombie.iso.weather.ClimateValues ---@field private simplexOffsetA double ---@field private simplexOffsetB double ---@field private simplexOffsetC double ---@field private simplexOffsetD double ---@field private clim ClimateManager ---@field private gt GameTime ---@field private time float ---@...
-- Please see sasl.lua.license for licensing information. local s_match = string.match; local type = type local string = string local base64 = require "util.encodings".base64; local hmac_sha1 = require "util.hmac".sha1; local sha1 = require "util.hashes".sha1; local generate_uuid = require "util.uuid".generate; local ...
---------------------------------------- -- -- Copyright (c) 2015, 128 Technology, Inc. -- -- author: Hadriel Kaplan <hadriel@128technology.com> -- -- This code is licensed under the MIT license. -- -- Version: 1.0 -- ------------------------------------------ --[[ This script is a Lua module (not stand-alone) for...
---@class TraitFactory : zombie.characters.traits.TraitFactory ---@field public TraitMap LinkedHashMap|String|TraitFactory.Trait TraitFactory = {} ---@public ---@return void function TraitFactory:init() end ---@public ---@return void function TraitFactory:sortList() end ---@public ---@param name String ---@return Tr...
-- srparser.lua -- Luke Underwood -- Created 2/16/21 -- CS 331 Honors Project -- Shift-reduce parser module srparser lexsr = require "lexsr" local srparser = {} ------------------------------------------------ -- The Parser ------------------------------------------------ -- takes an arithmetic expres...
--[[ ================================================================================ ProjectNukeCoreGUIUtil Provides common GUI utilities ================================================================================ Author: stuntguy3000 --]] ProjectNukeGUI = window.create(term.current(),1,1,51,21) Mes...
AddObjectState = AbstractState:extends{} function AddObjectState:init(bridge, editorView, objectDefIDs) AbstractState.init(self, editorView) self.bridge = bridge self.objectDefIDs = objectDefIDs self.x, self.y, self.z = 0, 0, 0 self.angle = 0 self.randomSeed = os.clock() -- self.mapGrid ...
#!/usr/bin/env tarantool test = require("sqltester") test:plan(28) --!./tcltestrunner.lua -- 2007 November 29 -- -- The author disclaims copyright to this source code. In place of -- a legal notice, here is a blessing: -- -- May you do good and not evil. -- May you find forgiveness for yourself and forgive othe...
--[[ Towntest for Minetest Copyright (c) 2012 cornernote, Brett O'Donnell <cornernote@gmail.com> Source Code: https://github.com/cornernote/minetest-towntest License: BSD-3-Clause https://raw.github.com/cornernote/minetest-towntest/master/LICENSE NPCs ]]-- local visual, visual_size, textures function x(val) retur...
require('plugins')
--[[ Objective: make brick turn color For updating theme first time: look inside folder for part names cross reference all parts in library for things with that name change color and material of folder bricks to match library bricks if there are differences between library parts: print multiple values for part ...
vim.g.which_key_timeout = 1000 local status_ok, which_key = pcall(require, "whichkey_setup") if not status_ok then vim.notify("whichkey_setup not found") return end which_key.config{ hide_statusline = false, default_keymap_settings = { silent = true, noremap = true } } -- in case a custom keymap ca...
--[[ Lua 5.2/5.3 hotfix. Hot update functions and keep old data. Author: Jin Qing ( http://blog.csdn.net/jq0123 ) --]] local M = {} local Log = require "log.logger" local update_table local update_func -- Updated signature set to prevent self-reference dead loop. local updated_sig = {} -- Map old function to new fu...
CalorieCounter = { count = 0, goal = 2000, } function CalorieCounter:add(amount) self.count = self.count + amount end function CalorieCounter:didReachGoal() return self.count >= self.goal end function CalorieCounter:new(t) t = t or {} setmetatable(t, self) self.__index = self return t end -- c = Cal...
pg = pg or {} pg.enemy_data_statistics_50 = { [7019] = { cannon = 7, reload = 150, speed_growth = 0, cannon_growth = 594, pilot_ai_template_id = 20005, air = 0, rarity = 1, dodge = 0, torpedo = 17, durability_growth = 15428, antiaircraft = 19, reload_growth = 0, dodge_growth = 0, hit_growth...
-- alnbox, alignment viewer based on the curses library -- Copyright (C) 2015 Boris Nagaev -- See the LICENSE file for terms of use -- take a table with a cell properties -- draw the cell on the window return function(window, row, col, cell) local curses = require 'curses' if type(cell) ~= 'table' then ...
tiles_w=64 tiles_h=64 function tiles_init(compressed_map,waypoints_count,start_indexes) tiles_type={} tiles_height={} tiles_waypoints={} waypoints={} for i=1,waypoints_count do add(waypoints,{}) end dec={} local i=1 while i<=#compressed_map do local c=ord(compressed_map,i) if c>=189 then add(dec,c...
require 'iuplua'
local gauntlet_data = require "gauntlet_data" local deepcopy = require "deepcopy" local CHIP_ID = require "defs.chip_id_defs" local AggressiveHealing = { NAME = "Aggressive Healing", } function AggressiveHealing:activate(current_round) end function AggressiveHealing:deactivate(current_round) end functio...
-- // About -- // Purpose; Entrypoint and Context to an Interface System -- // Variables local CoreIXModules = script.Parent:WaitForChild("CoreIXModules") local IXDependencies = CoreIXModules:WaitForChild("IXDependencies") local IXEnum = require(IXDependencies:WaitForChild("IXEnums")) local IXLibary = require(IXDepen...
-- A project defines one build target project "HMDIrrlicht" --kind "WindowedApp" kind "ConsoleApp" --kind "SharedLib" --kind "StaticLib" language "C++" files { "*.cpp", "*.h", } includedirs { "../../../../../_oculus/TinyRoom/LibOVR/include", } libdirs { "../../../../../_oculus/TinyRoom/debug", } links { ...
function AuctionHouse.Core.UI(npc) local frame = XYZUI.Frame("Auction House", AuctionHouse.Config.Color) frame:SetSize(ScrH()*0.8, ScrH()*0.7) frame:Center() local navBar = XYZUI.NavBar(frame) local _, shell = XYZUI.Lists(frame, 1) shell.Paint = nil shell:DockPadding(10, 5, 10, 10) XYZ...
local L = BigWigs:NewBossLocale("The Slave Pens Trash", "esES") or BigWigs:NewBossLocale("The Slave Pens Trash", "esMX") if not L then return end if L then L.defender = "Defensor Colmillo Torcido" L.enchantress = "Encantadora Colmillo Torcido" L.healer = "Sanadora de escamas Colmillo Torcido" L.collaborator = "Cola...
SetScenceMap(-2, 1, 13, 22, 0); SetScenceMap(-2, 1, 12, 22, 2898); jyx2_FixMapObject("梅庄地牢入口出现",1); jyx2_ReplaceSceneObject("", "Dynamic/dilaoEnterance", "1"); jyx2_ReplaceSceneObject("", "Dynamic/Leave2", "1"); ModifyEvent(-2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -2, -2, -2); do return end;
--------------------------------------------------------------------- -- Project: irc -- Author: MCvarial -- Contact: mcvarial@gmail.com -- Version: 1.0.0 -- Date: 31.10.2010 --------------------------------------------------------------------- -- everything is saved here channels = {} -- syntax: [channel] = {string n...
class 'GotoPos' function GotoPos:__init() Events:Subscribe( "PlayerChat", self, self.PlayerChat ) self.prefix = "[Телепорт] " end function GotoPos:PlayerChat( args ) if string.find(args.text, "/gotopos") then if args.text == "/gotopos" then Chat:Send( args.player, self.prefix, Color.White, "Тел...
--************************ --MenuItem --************************ MenuItem = {} MenuItem.__index = MenuItem function MenuItem.new(text, callback) local self = setmetatable({}, MenuItem) self.text = text self.callback = callback return self end return MenuItem
local helpers = require "spec.helpers" local cjson = require "cjson" local S502_MESSAGE = "An invalid response was received from the upstream server" local RELOAD_DELAY = 1.0 describe("error_default_type", function() local client setup(function() helpers.dao:truncate_tables() assert(helpers.dao.apis...
local ffi = require("ffi") ffi.cdef[[ typedef struct ssh_session_struct* ssh_session; typedef struct ssh_channel_struct* ssh_channel; typedef struct ssh_scp_struct* ssh_scp; ssh_session ssh_new(void); void ssh_free (ssh_session session); int ssh_connect (ssh_session session); void ssh_disconnect (ssh_session session)...
local pollr = require "pollr" function lovr.update(dt) pollr.update() end function pollr.buttonpressed(device, button) print("Button " .. button .. " pressed on device " .. device) end function pollr.buttonreleased(device, button) print("Button " .. button .. " released on device " .. device) end
require('game/floresta1') require('game/floresta2') require('game/dire1') if SimpleAdventure == nil then SimpleAdventure = class({}) end function SimpleAdventure:Init() if DEBUG_HEROES then if DEBUG_START_SCENE == 1 then Floresta1:Init() elseif DEBUG_START_SCENE == 2 then ...
--- module String utility library ---@class stringx local stringx = {} local byte, char = string.byte, string.char local gmatch, match = string.gmatch, string.match local rep, find, sub = string.rep, string.find, string.sub local f = string.format local insert = table.insert local min, random = math.min, math.random...
--------------------------------------------------------------------------- -- Crash Team Racing [NTSC-U] [SCUS-94426] Utility Script for BizHawk -- http://tasvideos.org/BizHawk.html -- -- Author: Rodrigo A. do Amaral (Amaraticando) -- Git repository: https://github.com/rodamaral/amaraticando-tas ----------------...
----------------------------------------------------------------------------------- -- This implementation uses the default SimpleProject and the Project extensions are -- used to extend the SimpleProject behavior. -- This is the global table name used by Appkit Basic project to extend behavior Project = Project or {...
local fcntl = require("posix.fcntl") local unistd = require("posix.unistd") local poll = require("posix.poll") local cjson = require("cjson").new() local Device = {} Device.__index = function(_, key) return rawget(Device, key) or function(self, ...) return Device.invoke(self, key, ...) end end Device.__tostrin...
data:extend({ { type = "item-group", name = "OrePlus", icon = "__JohnCore__/graphics/item-group/alloying.png", icon_size = 128, order = "x", }, { type = "item-subgroup", name = "JC-resource", group = "OrePlus", order = "a", }, { type = "item-subgroup", name ...
-- id int 技能id -- name string 技能名称 -- type int 技能类型 -- type_tag int 技能标签 -- lv ...
io.stdout:setvbuf("no") -- Prints to SublimeText's console function love.conf(c) c.title = "VideahEngine" c.author = "Ruairidh 'VideahGams' Carmichael" c.identity = "VideahEngine" c.window.width = 1280 c.window.height = 720 c.window.resizable = true end
#!/usr/bin/env tarantool local log = require('log') local websocket = require('websocket') local json = require('json') local ws, err = websocket.connect( 'wss://ws-feed.pro.coinbase.com', nil, {timeout=3}) if not ws then log.info(err) return end ws:write( json.encode( {type="subscribe", ...
--[[ Coronium LS - client download module Copyright 2016 C.Byerley 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 o...
--[[ Rect object for storing/testing collisions. ]] local Rect = {} Rect.defaults = { x = 0, --Absolute x value y = 0, --Absolute y value z = 1, px = 0, --Proportionate x value (proportion from the left side of screen) py = 0, --Proportionate y value (proportion from the top of the screen) width = 100...
local Draw = require("api.Draw") local IUiList = require("api.gui.IUiList") local IInput = require("api.gui.IInput") local InputHandler = require("api.gui.InputHandler") local ListModel = require("api.gui.ListModel") local UiTheme = require("api.gui.UiTheme") local I18N = require("api.I18N") local UiBuffList = class.c...
----------------------------------- -- Area: Northern San d'Oria -- NPC: Sochiene -- Type: Standard Dialogue NPC -- !pos 4.000 0.000 -28.000 231 -- ----------------------------------- local ID = require("scripts/zones/Northern_San_dOria/IDs"); ----------------------------------- function onTrade(player,npc,trade) end...
-- inspired by a few ideas at https://github.com/hoelzro/lua-repl local context = {} for idx, val in pairs(_G) do if idx == '_G' then context[idx] = context else context[idx] = val end end local buf = '' local function traceback (...) local thread = nil local message = nil local level = nil if select('#'...
local install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim' if vim.fn.empty(vim.fn.glob(install_path)) > 0 then vim.fn.execute('!git clone https://github.com/wbthomason/packer.nvim ' .. install_path) end vim.api.nvim_exec( [[ augroup Packer autocmd! autocmd BufWritePost init.lua ...
function nextrow(t) local ret = {} t[0], t[#t+1] = 0, 0 for i = 1, #t do ret[i] = t[i-1] + t[i] end return ret end function triangle(n) t = {1} for i = 1, n do print(unpack(t)) t = nextrow(t) end end
--- My lib module description. -- The description expanded description. return { --- Function summary. -- The function expanded description. -- @param a first parameter -- @param b second parameter -- @return the sum of a + b add = function(a,b) return a+b end }
-- Cheats interacting with the game object directly. local GameHandler = {} local Logger = require("utility/logger") function GameHandler:GetDisplayText(lockey) return Game.GetLocalizedText(lockey) end function GameHandler:GetItemRecord(itemid) return Game.GetItemRecord(itemid) end function GameHandler:GetM...
-- Copyright 2015-2021 Mitchell. See LICENSE. local M = {} --[[ This comment is for LuaDoc. --- -- Spell checking for Textadept. -- -- Install this module by copying it into your *~/.textadept/modules/* directory or Textadept's -- *modules/* directory, and then putting the following in your *~/.textadept/init.lua*: -...
object_tangible_wearables_necklace_ith_necklace_wookiee_freedom_f = object_tangible_wearables_necklace_shared_ith_necklace_wookiee_freedom_f:new { } ObjectTemplates:addTemplate(object_tangible_wearables_necklace_ith_necklace_wookiee_freedom_f, "object/tangible/wearables/necklace/ith_necklace_wookiee_freedom_f.iff")
--[[ This module implements Typed Lua parser ]] local lpeg = require "lpeg" lpeg.locale(lpeg) local tlast = require "typedlua.tlast" local tllexer = require "typedlua.tllexer" local tltype = require "typedlua.tltype" local tltAuto = require "typedlua.tltAuto" local tltable = require "typedlua.tltable" local tlutils ...
ITEM.name = "GPU" ITEM.description = "A graphics card for a computer." ITEM.longdesc = "A modern graphics card for a desktop computer. This is a high end model, and as such is quite pricey." ITEM.model = "models/illusion/eftcontainers/graphicscard.mdl" ITEM.width = 2 ITEM.height = 1 ITEM.price = 6130 ITEM.flatweight ...
local gas = {} function gas.update(eid, delta) local sprite = entities:get_component(eid, component.sprite) if sprite.state == 2 then entities:destroy_entity(eid) end end function gas.physics_pre_collide(eid, other) if not entities:has_component(other, component.plant_tag) then local ...
-- Operator builtins. -- Generators local function genlist(ev, gen, arg, names) for i=1, #arg do local name = (names and names[i]) or arg[i] ev.cgfns[name] = gen(ev, arg[i]) end end local function genop1(_, op) return function(ev, arg) return { ["type"] = "expr", op, ev:parse(arg) } end end local f...
return { armdetector = { acceleration = 0.1, activatewhenbuilt = true, brakerate = 0.15, buildcostenergy = 1640, buildcostmetal = 126, builder = false, buildpic = "armdetector.dds", buildtime = 6747, canattack = false, canguard = true, canhover = true, canmove = true, canpatrol = true, cans...
local ROT = require 'src.rot' local expect = require 'tests.expect' (assert) describe("Engine", function() local RESULT = 0 local E = nil local S = nil local A50 = { getSpeed = function() return 50 end, act = function() RESULT = RESULT + 1 end, } local A100 = { getSpeed ...
--[[ AddCSLuaFile("forcedownloads.lua") resource.AddFile( "materials/vgui/entities/armour_station.vtf" ) resource.AddFile( "materials/vgui/entities/health_station.vtf" ) resource.AddFile( "materials/vgui/entities/armour_station.vmt" ) resource.AddFile( "materials/vgui/entities/health_station.vmt" ) ]]-- -- This re...
--- --- UIBase基类 --- local UIBase = Class("UIBase") -- override 初始化各种数据 function UIBase:initialize() self.Panel = nil self.ResId = 0 self.Layer = 0 self.UILevel = 0 self.subUIList = {} self.uiDepthLayer = 0 self.uiCanvas = nil end return UIBase
-- Copyright (C) idevz (idevz.org) local helpers = require "motan.utils" function sprint_r(...) return helpers.sprint_r(...) end function lprint_r(...) local rs = sprint_r(...) print(rs) end function print_r(...) local rs = sprint_r(...) ngx.say(rs) end motan_ctx = function() do return ngx....
--[[ 场景管理器 ]]-- SceneManager = {} -- 帧率 local __FPS__ = 60 -- 窗口标题 local __TITLE__ = "EtherEngine 示例游戏 - 巨龙与骑士" -- 启动场景 local _start_scene = nil -- 当前场景 local _current_scene = nil -- 场景列表 local _scene_list = {} -- 游戏退出事件触发时处理函数 local _quit_handler = nil -- 是否进行游戏主循环 local _is_running = false SceneManager.ClearW...
player_manager.AddValidModel( "PMC1_14", "models/player/PMC_1/PMC__14.mdl" ) list.Set( "PlayerOptionsModel", "PMC1_14", "models/player/PMC_1/PMC__14.mdl" )
-- Constants pokemonBar = nil local lastBarIcon = nil local portraitLabels = {} local currentPokemonPortraitLabel local currentPokemonPortrait local ORIENTATIONS = {} ORIENTATIONS.HORIZONTAL = 0 ORIENTATIONS.VERTICAL = 1 local orientation = ORIENTATIONS.HORIZONTAL local defaultWidth = 0 local defaultHeight = 0 loca...
-- Script for Philio multi-sound siren (PSE02) but it's also working for D-Link (DCH-Z510). -- Change these -- local deviceName = "siren" -- name of your siren local devices = {} -- Available sounds: Fire, DoorChime, Emergency, Police, Fire, Ambulance devices[1] = {trigger="Door", sound="DoorChime", duration=1}; -- ins...
return function() local Enumeration = Deus:Load("Deus.Enumeration") local enum = Enumeration.addEnum( "testez", { foo = 1, bar = 2 } ) describe("enum", function() it("should be equal #1", function() expect(enum.foo).to.be.equal(Enumera...
-- == Display CLI == -- Copyright (c) 2018 by Rene K. Mueller <spiritdude@gmail.com> -- License: MIT License (see LICENSE file) -- Description: -- Misc. commands dealing with display via CLI, see `man display` -- History: -- 2018/01/18: 0.0.1: first version return function(...) table.remove(arg,1) local func...