content
stringlengths
5
1.05M
-- Copyright (c) 2010 by Robert G. Jakabosky <bobby@neoawareness.com> -- -- 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 ...
local Movement = require("movement/movement") local Board = require("board/board") local Tetromino = require("tetromino/tetromino") local properties = require("tetromino/properties") local Point = require("point/point") local Square = require("square/square") local colors = require("colors/colors") local twistTests = r...
-- internorns v1.2.0 -- live-coding all norns -- -- llllllll.co/t/internorns -- -- -- -- ▼ instructions below ▼ -- -- open maiden and edit -- dust/data/internorns/ -- getting-started.lua local shift=false local arplatch=0 -- internorns stuff -- this order matters include("internorns/lib/utils") music=inc...
local collision = {} function collision.new(ent, x, y, width, height, filter) ent.pos = Vector(x,y) ent.vel = Vector(0,0) ent.collision = {} ent.collision.width = width ent.collision.height = height ent.collision.filter = filter ent.collision.cols = {} ent.collision.num_cols = 0 ent.apply_gravity = t...
-- Stamina system using non-networked, predicted Move hook conditioning -- Both client and server check the sprint key and note the CurTime() down, using -- that to determine the stamina at any point -- It works by, at any given time a call to PLAYER:GetStamina() is run, it looks at the last "turning point" (i.e. whe...
local Queue = {} local Array = require "array" local Common = require "internal.common" local is_number = Common.is_number local is_integer = Common.is_integer local is_positive_integer = Common.is_positive_integer local is_within_bounds = Common.is_within_bounds local mt = { __newindex = function(t, key, v) ...
------------------------------------------------------------------ -- Copyright 2021 Deviap (https://deviap.com/) -- ------------------------------------------------------------------ -- Made available under the MIT License: -- -- https://github.com/deviap/deviap-samples/blob/mas...
-- File : someip_tp.lua -- Who : x-Felix-x -- What : SOME/IP-TP dissector -- bitwise ops helpers local band, bor = bit.band,bit.bor local lshift, rshift = bit.lshift,bit.rshift local tohex = bit.tohex -- SOME/IP-TP Header SOME_IP_TP_HEADER_LEN = 4 -- SOME/IP-TP protocol p_someip_tp = Proto("someip_tp","SOME/IP-TP")...
local PLUGIN = PLUGIN PLUGIN.name = "Whitelist" PLUGIN.author = "wildflowericecoffee" PLUGIN.description = "Adds a server whitelist" PLUGIN.readme = [[ This plugin adds a configurable server whitelist, letting only the players you allow to connect to your server. The whitelist is disabled by default, to turn it...
--- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by rosenth. --- DateTime: 11.07.21 19:16 --- function send_error(msg) server.print(msg) server.log(msg, server.loglevel.LOG_ERR) server.sendStatus(500) return false end local filesize local origname local mimetype local consistency lo...
--[[ ORIGINALT SCRIPT AF XANDER1998 MODIFICERET OG FORBEDRET AF KAFFEMANDXXL **DU SKAL IKKE ÆNDRE NOGET HERINDE** --]] resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' server_script "server.lua" client_script "client.lua"
-- Assertions expect = {} function expect.argument_to_be_in_table(argument, to_be_in) assert( hs.fnutils.contains(to_be_in, argument), 'Expected "'.. hs.inspect(argument) ..'" to be one of '.. hs.inspect(to_be_in) ) end function expect.argument_to_be_in_table_or_nil(argument, to_be_in) assert( hs.fnutils.co...
local uv = require 'couv' local TEST_PORT = 9123 coroutine.wrap(function() local handle = uv.Tcp.new() handle:bind(uv.SockAddrV4.new('0.0.0.0', TEST_PORT)) handle:listen(128, function(server) coroutine.wrap(function() local stream = uv.Tcp.new() server:accept(stream) stream:startRead() ...
local Particle = {}; function Particle.new(element) local self = {}; self.element = element; self.position = Vector2.new(0,0); self.velocity = Vector2.new(0,0); self.age = 0; self.ticks = 0; self.maxAge = 1; self.isDead = false; return setmetatable(self, {__index = Particle}); end function Particle:Update(d...
--鱼和破进 local m=14010122 local cm=_G["c"..m] function cm.initial_effect(c) --activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(cm.tg) e1:SetOperation(cm.op) c:RegisterEffect(e1) end function cm....
local vector = FindMetaTable("Vector") local function shadeColor(color) return Color(color.r*(.5), color.g*(.5), color.b*(.5), color.a) end local usermat = Material("icon16/user.png") local icontb = {} local function headui() local ply = LocalPlayer() for k, v in pairs(player.GetAll()) do if not v:Alive() ...
-- Generated by CSharp.lua Compiler local System = System local DCETModel = CS.DCET.Model local GoogleProtobuf = CS.Google.Protobuf local UnityEngine = UnityEngine System.namespace("DCET.Hotfix", function (namespace) namespace.class("Dumper", function (namespace) local _text, AppendIndent, DoDump, DumpAsString, s...
-- Libraries used by ASFBot socket = require "socket" -- Lua Socket http = require "socket.http" -- Lua Socket HTTP Library ltn12 = require "ltn12" -- LTN12 Sink ssl = require "ssl" -- SSL Library JSON = require "JSON" -- JSON: http://regex.info/code/JSON.lua config = require "config" -...
local c = require("component") local computer = require("computer") local event = require("event") local ecs = require("ECSAPI") local colors = require("colors") local sides = require("sides") local config = require("config") local fs = require("filesystem") local rs = c.redstone local gpu = c.gpu local modem = c.modem...
resourceRoot = getResourceRootElement( getThisResource( ) ) localPlayer = getLocalPlayer() local s = {guiGetScreenSize()} local screenX,screenY = guiGetScreenSize () local font = dxCreateFont("arquivos/font.ttf", 14) local fontg = guiCreateFont("arquivos/font.ttf", 12) local font2 = dxCreateFont("arquivos/font.ttf", 18...
RegisterRecipe({ name = "Fries", duration = 15000, stations = { "Fryer" }, input = { { name = "Potato Cuts", quantity = 1 }, { name = "Vegetable Oil", durability = 0.2 }, }, output = { { name = "Fries", quantity = 1 }, }, }) RegisterRecipe({ name = "Chicken Nuggets", duration = 15000, stations = { "Fry...
local ansi = require 'encoder.ansi' local utf16 = require 'encoder.utf16' local utf16le = utf16('le', utf8.codepoint '�') local utf16be = utf16('be', utf8.codepoint '�') ---@alias encoder.encoding '"utf8"'|'"utf16"'|'"utf16le"'|'"utf16be"' ---@alias encoder.bom '"no"'|'"yes"'|'"auto"' local m = {} ---@param en...
-- 网格表示类,同时向寻路器提供寻路数据 local KC = require 'klib/container/container' local Config = require 'pda/pathfinder/config' local Bump = require 'klib/ds/bump' local Seeder = require 'pda/pathfinder/pasfv/seeder' local Grower = require 'pda/pathfinder/pasfv/grower' local Display = require 'pda/pathfinder/display' local Area = ...
package.path = package.path .. ";tests/?.lua" local testlib = require("testlib") function bigdb(dbname) local db = couch.open(dbname, true) db:truncate(5 * 1024 * 1024 * 1024) db:close() db = couch.open(dbname) testlib.assert_no_doc(db, "k") db:save("k", "a value", 1) db:commit() db:close() ...
--[[------------------------------------------------------------------- Lightsaber Dual Wielding: One in each hand. Powered by _ _ _ ___ ____ __ _(_) | |_ / _ \/ ___| \ \ /\ / / | | __| | | \___ \ \ V V /| | | |_| |_| |___) | \_/\_/ |_|_|\__|\___/|____/ ___...
--gist:254968e481fe50b2106b local bitstore = {} local function bsindex(t, k) -- Only handle numerical indices if type(k) ~= "number" then return rawget(t.table, k) end -- Calculate our "real" index local index = math.ceil((k * t.bitSize) / 32) -- Return nil if real index is out of bou...
local NodeEntityState = require "njli.statemachine.nodeentitystate" local Grab = {} Grab.__index = Grab local json = require('json') setmetatable(Grab, { __index = NodeEntityState, __call = function (cls, ...) local self = setmetatable({}, cls) self:create(...) return self end, }) fu...
-- Here you can modify or add yourself the translates of the addon :D -- Be careful about the bad modifications. This place is reserved to experienced users ! -- Don't edit the [""] of the left, only the [""] after the = :) mrobbery.language["FR"] = { ["security_comp_text"] = "Ce bouton vous permet d'activer ou de d...
local name, addon = ... local options = addon:NewModule('Options') -- Localise global variables local _G = _G local gsub, lower = _G.string.gsub, _G.string.lower local db local defaultOptions = { clock = { mode = 24, showSeconds = true, showLocalTime = true, showRealmTime = false, showUniversalTime = fals...
local M = {} local cmd = vim.cmd function M.setup() vim.g.background = "dark" vim.g.gruvbox_material_background = "hard" vim.g.gruvbox_material_sign_column_background = "none" vim.g.gruvbox_material_menu_selection_background = "aqua" -- vim.g.gruvbox_material_diagnostic_text_highlight = 1 vim.g.gruvbox_mat...
project "HighLo-Unit" kind "SharedLib" language "C++" cppdialect "C++17" staticruntime "on" targetdir ("bin/" .. outputdir .. "/%{prj.name}") objdir ("bin-obj/" .. outputdir .. "/%{prj.name}") files { "src/**.h", "src/**.cpp" } defines { "_CRT_SECURE_NO_WARNINGS"...
dofilepath("data:leveldata/campaign/FX_Path/ai/FXP_AI.lua") setLevelOfDifficulty(2) g_LOD = 2 -- 0 = easy, 1 = standard, 2 = hard ( 0 is default ) function FXP_AIInit() end
-------------------------------------------------------------------------------- -- File: AoUMeterInit.lua -- Desc: Initialize the addon -------------------------------------------------------------------------------- onMyEvent [ "EVENT_UNKNOWN_SLASH_COMMAND" ] = function( params ) if userMods.FromWString(params.text...
start=7 local techdamage local techspeed for i = start,13 do techdamage = util.table.deepcopy(data.raw["technology"]["laser-turret-damage-6"]) techdamage.name = "laser-turret-damage-"..i techdamage.prerequisites = {"laser-turret-damage-"..(i-1)} techdamage.unit.count = techdamage.unit.count + ((i - start + 1) ...
local M = require('dotfiles.autoload')('dotfiles.lsp.utils') local lsp = require('vim.lsp') local vim_uri = require('vim.uri') local lsp_global_settings = require('dotfiles.lsp.global_settings') local utils = require('dotfiles.utils') local utils_vim = require('dotfiles.utils.vim') local lsp_sync_available, lsp_sync =...
function __TS__StringReplace(source, searchValue, replaceValue) searchValue = string.gsub(searchValue, "[%%%(%)%.%+%-%*%?%[%^%$]", "%%%1") if type(replaceValue) == "string" then replaceValue = string.gsub(replaceValue, "[%%%(%)%.%+%-%*%?%[%^%$]", "%%%1") local result = string.gsub(source, search...
id = 'V-38672' severity = 'low' weight = 10.0 title = 'The netconsole service must be disabled unless required.' description = 'The "netconsole" service is not necessary unless there is a need to debug kernel panics, which is not common.' fixtext = [=[The "netconsole" service is responsible for loading the netconsole k...
local _, ns = ... local L = ns.L local LUI = LolzenUI.L local f = CreateFrame("Frame") f:RegisterEvent("ADDON_LOADED") f:SetScript("OnEvent", function(self, event, addon) if addon == "LolzenUI_Options" and LolzenUIcfg.modules["unitframes"] == true then -- function to change scrollable content size on demand loca...
__itemstoautomate = { "dungeon_alcove", "temple_alcove", "prison_alcove", "altar", "torch_holder" } for _, item in ipairs(__itemstoautomate) do cloneObject({name = "auto_" .. item, baseObject = item }) end defineObject{ name = "auto_printer", class = "Item", uiName = "", model = "assets/models/items/scroll.fbx...
-- Wed Aug 7 20:43:04 2019 -- (c) Alexander Veledzimovich -- ph PHOTON -- lua<5.3 local utf8 = require('utf8') local unpack = table.unpack or unpack local imd = require('lib/lovimd') local set = require('editor/set') local PH = {} PH.count = 0 PH.forms = {'circle','ellipse', 'triangle','rectangle','pent...
--[[ Purpose: A library to specify which animations should be used by which models and contains tables that provide the appropriate act or sequence that is to be used. --]] nut.anim = nut.anim or {} nut.anim.classes = nut.anim.classes or {} --[[ Purpose: Adds a new model to a class. If the class does not exist, a ...
--oo/controls/checkbox: checkbox control --Written by Cosmin Apreutesei. Public Domain. setfenv(1, require'winapi') require'winapi.basebuttonclass' CheckBox = subclass({ __style_bitmask = bitmask{ box_align = { left = 0, right = BS_LEFTTEXT, }, pushlike = BS_PUSHLIKE, type = { --TODO: make two orthogo...
return {'deen','deens','deense','deed','deeg','deegbal','deegbodem','deeghaak','deegklomp','deegrol','deegroller','deegsoort','deegwaar','deegwaren','deejay','deel','deelachtig','deelakkoord','deelarbeid','deelaspect','deelauto','deelbaar','deelbaarheid','deelbegroting','deelbehandeling','deelbelang','deelbeleid','deel...
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -- CloneTrooper1019, 2020 -- FPS Camera --------------------------------------------------------------------------------------------...
local ffi = require "ffi" local prototype = require "libssh2.prototype" ffi.cdef[[ typedef void (*libssh2_trace_handler_func)(LIBSSH2_SESSION *session, void* context, const char *data, size_t length); int libssh2_trace_sethandler(LIBSSH2_SESSION *session, void* context, libssh2_trace_handler_func callback); void libs...
--[[ Copyright (c) 2009-2017, Hendrik "Nevcairiel" Leppkes < h.leppkes at gmail dot com > All rights reserved. ]] --[[ Pet Button template ]] local _, Bartender4 = ... local PetButtonPrototype = CreateFrame("CheckButton") local PetButton_MT = {__index = PetButtonPrototype} local Masque = LibStub("Masque", true) loc...
local NomsuCode NomsuCode = require("code_obj").NomsuCode local find, sub, match do local _obj_0 = string find, sub, match = _obj_0.find, _obj_0.sub, _obj_0.match end local R, P, S do local _obj_0 = require('lpeg') R, P, S = _obj_0.R, _obj_0.P, _obj_0.S end local re = require('re') local pretty_error = require(...
local K, C = unpack(select(2, ...)) local Module = K:GetModule("Blizzard") -- Sourced: NDui (siweia) local _G = _G local string_format = _G.string.format local C_CurrencyInfo_GetCurrencyInfo = _G.C_CurrencyInfo.GetCurrencyInfo local C_Garrison_GetClassSpecCategoryInfo = _G.C_Garrison.GetClassSpecCategoryInfo local C...
ITEM.name = "Бинокль" ITEM.desc = "Стандартный украинский армейский бинокль с максимальной кратностью увеличения х6.0. Позволяет детально рассматривать местность и строения с большого расстояния. Имеет очень прочный корпус." ITEM.price = 1688 ITEM.class = "weapon_cop_binoculars" ITEM.weaponCategory = "5" ITEM.cat...
Require("ProjectDir","../../Common/ColorHelper.lua"); Require("ProjectDir","../../Common/IngenHDR.lua"); Require("ProjectDir","../../Common/IngenUtils.lua"); Require("ProjectDir","Metronome.lua"); --function CreateSkyCube() -- local vtx = { -- {-1,-1,-1}, {-1, 1,-1}, { 1,-1,-1}, { 1, 1,-1}, -- {-1,-1, 1}, {-1,-1,-1...
--[[Main input object]]-- -- Makes itself an object -- local input = {} -- Initializer function -- function input.initialize() local joysticks = nil -- Key press variables -- press = 0 input.pressed = false input.toggled = false end function input.getJoystick() joysticks = love.joystick.getJo...
local moon = require("moon") local mysql = require("mysql") moon.start(function() local db = mysql.create() local ret,errmsg = db:connect("127.0.0.1", 3306, "root", "4321", "mysql",0) print(ret,errmsg) local result,errmsg = db:query("select * from article_detail;") if not result then print...
import 'libraries/noble/Noble' import 'utilities/Utilities' import 'scenes/ExampleScene' import 'scenes/ExampleScene2' Noble.Settings.setup({ Difficulty = "Medium" }) Noble.GameData.setup({ Score = 0 }) Noble.showFPS = true Noble.new(ExampleScene, 1.5, Noble.TransitionType.CROSS_DISSOLVE)
-- Copyright (c) 2021, Eisa AlAwadhi -- License: BSD 2-Clause License -- Creator: Eisa AlAwadhi -- Project: SmartCopyPaste -- Version: 3.0 local o = { ---------------------------USER CUSTOMIZATION SETTINGS--------------------------- --These settings are for users to manually change some options. --Changes are recommen...
local Peripherial = {} function Peripherial.Register(name, offset, size, access, desc) local reg = { name = name or error("requires name!"), offset = tonumber(offset) or error("requires offset!"), size = tonumber(size) or error("requires size!"), access = tostring(access) or error("requires access"),...
local structures = {} local ores = {} local TIMER = 10 local function determine_structure(controller, player) local below1 = vector.add(controller, {x=0,y=-1,z=0}) local below2 = vector.add(below1, {x=0,y=-1,z=0}) local miners = 0 local nodes = {} local cpos = minetest.pos_to_string(controller) if ele.helper...
include("shared.lua"); AddCSLuaFile("cl_init.lua"); AddCSLuaFile("shared.lua"); function ENT:Initialize() self:SetModel("models/hunter/blocks/cube075x075x075.mdl"); self:PhysicsInit(SOLID_VPHYSICS); self:SetMoveType(MOVETYPE_NONE); self:SetSolid(SOLID_NONE); self:SetUseType(SIMPLE_USE); self:SetRenderMode(REN...
local thirst = 0 local hunger = 0 Citizen.CreateThread(function() while true do Citizen.Wait(100) TriggerServerEvent("vRP_HealthUI:getData") SendNUIMessage({ show = IsPauseMenuActive(), health = GetEntityHealth(GetPlayerPed(-1)) - 100, armor = GetPedArmo...
gamecontinueflag = false ---@class THlib.ext ---@field replay THlib.ext.Replay ---@field mask_color lstg.Color ---@field mask_alph table ---@field mask_x table ---@field pause_menu_text table ext = { replay = {} } ext.mask_color = Color(0, 255, 255, 255) ext.mask_alph = { 0, 0, 0 } ext.mask_x = { 0, 0, 0 } ext.pause_...
local addonName, addonScope = ... local data = addonScope.data local AL = addonScope.AL local ALIL = addonScope.ALIL local NORMAL_DIFF = addonScope.NORMAL_DIFF local ALLIANCE_DIFF = addonScope.ALLIANCE_DIFF local HORDE_DIFF = addonScope.HORDE_DIFF local LOAD_DIFF = addonScope.LOAD_DIFF local NORMAL_ITTYPE = addonScope....
-- Copyright (C) 2018 DBot -- 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 to in writing,...
do class "BasicClassC" : extends "BasicClassB" { m_strString = "I'm class C!", } function Initialize( self ) end function MyMethodFromC( self ) end end
Ambi.SQL = Ambi.SQL or {} -- ------------------------------------------------------------------------------------- local Gen = Ambi.General local sql, isstring, ipairs, unpack, Format, setmetatable = sql, isstring, ipairs, unpack, Format, setmetatable local TableExists, Query, QueryValue, SQLStr = sql.TableExists, sql...
object_tangible_collection_flower_08 = object_tangible_collection_shared_flower_08:new { gameObjectType = 8211,} ObjectTemplates:addTemplate(object_tangible_collection_flower_08, "object/tangible/collection/flower_08.iff")
local waitTime = ... -- default to 1 second if parameter is missing if not waitTime then waitTime = 1 end return Def.Actor{ OnCommand=cmd(sleep,waitTime); };
local suit = require("lib.suit") local Keys = require("mod.keys") local help = require("mod.helpers") local pauseState = require("mod.states.pause") local widgets = require("mod.widgets") local audio = require("mod.audio") audio.load() local introText = "Welcome to Valis!" local gui = suit.new() local overworldSta...
--[[ tsukuyomi.lua Created by Masatoshi Teruya on 13/11/15. Copyright 2013 Masatoshi Teruya. All rights reserved. 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 ...
-- PERFORMANCE local Q = require 'Q' local Vector = require 'libvec' require 'Q/UTILS/lua/strict' local qc = require 'Q/UTILS/lua/q_core' local utils = require 'Q/UTILS/lua/utils' local tests = {} tests.t1 = function( num_iters ) local start_time = qc.RDTSC() local n = 16*1048576 -- number of rows local m =...
-- enemy AI -- init tables of enemy class properties, -- which double as enemy lists function enemy_init() diamonds = { -- points for killing this (not pre-shifted by 16) points = 50, -- color of sparks when one dies death_color = 12, -- todo: retire this -- collision radius with bullets bullet_r = 4, ...
AddCSLuaFile() AddCSLuaFile("sh_sounds.lua") include("sh_sounds.lua") if CLIENT then SWEP.DrawCrosshair = false SWEP.PrintName = "Sterling" SWEP.CSMuzzleFlashes = false SWEP.ViewModelMovementScale = 1.15 SWEP.IconLetter = "x" killicon.AddFont("cw_mp5", "CW_KillIcons", SWEP.IconLetter, Color(255, 80, 0, 150)) ...
-- ITS - In The Shadows -- Copyright (C) 2015, 2016, 2017 James Niemira -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later ve...
#!/usr/bin/env lua -- lua consider both the Boolean false and nil as false -- and anything else as true. -- and -- first operand is false, result is first operand -- otherwise, result is second operand print(4 and 5) -- 5 print(nil and 13) -- nil print(false and 13) -- false -- or -- first operand is true, result ...
description 'early init for game script' client_script 'init.lua' server_script 'server.lua'
local colors = require("onedarkpro").get_colors("onedarkpro") require("bufferline").setup({ options = { offsets = { { filetype = "NvimTree", text = "" } }, max_name_length = 30, show_buffer_icons = false, show_buffer_close_icons = false, separator_style = "slant", a...
-- PRIVATE -- PUBLIC
-- This file is automatically generated, do not edit! -- Path of Building -- -- Intelligence support gems -- Skill data (c) Grinding Gear Games -- local skills, mod, flag, skill = ... skills["SupportAddedChaosDamage"] = { name = "Added Chaos Damage", description = "Supports any skill that hits enemies.", color = 3,...
local sqrt=math.sqrt local a for n=1,1000000 do --for n=1,10000 do a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9) a=sqrt(9...
AucAdvancedConfig = { ["users.纳克萨玛斯.诗雨筱零"] = "Default", ["profile.Default"] = { ["core"] = { ["matcher"] = { ["matcherlist"] = { "BeanCount", -- [1] "Undercut", -- [2] }, }, }, ["util"] = { ["automagic"] = { ["ammailguix"] = 160, ["SavedMailButtons"] = { }, }, ["app...
--/***************** BEGIN FILE HRADER BLOCK ********************************* --* --* --* Copyright (C) 2017-2019 YY.Inc --* All rights reserved. --* --* This library is free software; you can redistribute it and/or modify it --* under the terms of the GNU Lesser General Public License as published by --* th...
local createEnum = import("../createEnum") return createEnum("Font", { Legacy = 0, Arial = 1, ArialBold = 2, SourceSans = 3, SourceSansBold = 4, SourceSansLight = 5, SourceSansItalic = 6, Bodoni = 7, Garamond = 8, Cartoon = 9, Code = 10, Highway = 11, Scifi = 12, Arcade = 13, Fantasy = 14, Antique = 15...
local cur = dfhack.gui.getSelectedJob() function desc(job) return ('Job %i: %s'):format(job.id, dfhack.job.getName(job)) end if cur then job = cur print('set to ' .. desc(job)) elseif job then print(desc(job)) else qerror('no job selected') end function findJob(j) local link = df.global.world.j...
local function Input(name) -- Input local base = Object(name) local objectType = "Input" local inputType = "text" local inputLimit = 0 base:setZIndex(5) base:setValue("") base.width = 10 base.height = 1 base.bgColor = theme.InputBG base.fgColor = theme.InputFG local tex...
local _C = require("clua") -- Length in C array defined automatically by function ;) local c_array = _C.array("int", 100, 200, 300, 400, 500) for ca in _C.ipairs(c_array, ca) do _C.print("%d", _C.int(c_array[ca])) end
local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = true, require('compat53.module'); if p then _tl_compat = m end end; local ipairs = _tl_compat and _tl_compat.ipairs or ipairs; local load = _tl_compat and _tl_compat.load or load; local package = _tl_compat and _tl_compat.pa...
object_static_structure_content_meatlump_meatlump_lump_currency = object_static_structure_content_meatlump_shared_meatlump_lump_currency:new { } ObjectTemplates:addTemplate(object_static_structure_content_meatlump_meatlump_lump_currency, "object/static/structure/content/meatlump/meatlump_lump_currency.iff")
-------------------------------------------------------------------------------- -- Rail network handling and ARS simulation -------------------------------------------------------------------------------- if not Metrostroi.Paths then -- Definition of paths used in runtime Metrostroi.Paths = {} -- Spatial l...
--Table nextmapState = {} --New function nextmapState:new() local gs = {} gs = setmetatable(gs, self) self.__index = self _gs = gs return gs end --Load function nextmapState:load() end --Close function nextmapState:close() end --Enable function nextmapState:enable() local dungeon=dun...
return PlaceObj("ModDef", { "dependencies", { PlaceObj("ModDependency", { "id", "ChoGGi_Library", "title", "ChoGGi's Library", "version_major", 10, "version_minor", 3, }), }, "title", "Building Placement Orientation", "version", 9, "version_major", 0, "version_minor", 9, "image", "Preview.png", ...
local ffi = require 'ffi' local ffi_gc = ffi.gc local ffi_new = ffi.new local bson = require 'mongoc.bson' local mongoc_client = require 'mongoc.mongoc_client' local mongo_wrap = {} local mongo_wrap_meta = { __index = function(self, key) return rawget(mongo_wrap, key) or self:getDB(key) end, __tost...
Basic = { pos = vec2.new{x = 0, y = 0}, vel = vec2.new{x = 0, y = 0}, radius = 10, } function Basic:new(o) o = o or {} setmetatable(o, self) self.__index = self regShotCollision(self) return o end
----------------------------------- -- Area: Temenos Central Floor -- Mob: Iruci ----------------------------------- local ID = require("scripts/zones/Temenos/IDs") function onMobEngaged(mob, target) if GetMobByID(ID.mob.TEMENOS_C_MOB[1]+3):isDead() then mob:addStatusEffect(tpz.effect.REGAIN, 7, 3, 0) ...
minetest.register_biome({ name = "snow_biome_default", node_top = "default:dirt_with_snow", depth_top = 1, node_filler = "default:dirt", depth_filler = 2, height_min = snow.min_height, height_max = snow.min_height+60, heat_point = 10.0, humidity_point = 40.0, }) minetes...
local eachframe = require('libs.eachframe') local _M = {} _M.axes = { x = {type = 'motion', name = 'x'}, y = {type = 'motion', name = 'y'}, hatX = {type = 'motion', name = 'x'}, hatY = {type = 'motion', name = 'y'}, leftX = {type = 'motion', name = 'x'}, leftY = {type = 'motion', name = 'y'}, ...
client = nil service = nil cPcall = nil Pcall = nil Routine = nil GetEnv = nil origEnv = nil logError = nil --// Special Variables return function() local _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall,...
-- This is a deprecated module, use skynet.queue instead. local skynet = require "skynet" local c = require "skynet.core" local mqueue = {} local init_once local thread_id local message_queue = {} skynet.register_protocol { name = "queue", -- please read skynet.h for magic number 8 id = 8, pack = s...
local OUR_NAME, profiler = ... local CreateFrame = profilingmonitor(_G.CreateFrame) function profiler.isFirstAddonLoaded() -- Are any other addons loaded? for i=1,GetNumAddOns() do if IsAddOnLoaded(i) then local name = GetAddOnInfo(i) if not name=="!Profiler" then ...
local Text = require('modules/Text') local UI = class('UI') function UI:initialize( ) self.actions = { 'move', 'inspect', 'talk', 'take', 'use' } self.space_x = 10 self.space_y = 10 self.ui = {} self.current_ui = nil self.font = love.graphics.newI...
-- alias can help create new vim command. -- @param cmd The user command -- @param repl The actual command or function -- @param force force create command? boolean local alias = function(cmd, repl, force) local command if force then command = "command! " .. cmd .. " " .. repl else command = "command " .....
local pairs = { ['('] = ')', ['['] = ']', ['{'] = '}' } local closers = { [')'] = '(', [']'] = '[', ['}'] = '{' } function SearchPair() vim.api.nvim_command(':call searchpair(\'[\',\'\',\']\',\'b\')') end
mail_head_db = { id0 = { source = "Commander Ralesh", drop_rate = "0.0", name = "Kaldorei Archer's Hood", category_territory = "", territory = "War Zone", id = "0", expansion = "", location = "Darkshore" }, id1 = { source = "Grimhorn", drop_rate = "0.0", name = "Blightguard's Helmet", categor...