content
stringlengths
5
1.05M
-------------------------------- -- @module PhysicsShapeCircle -- @extend PhysicsShape -------------------------------- -- @function [parent=#PhysicsShapeCircle] getRadius -- @param self -- @return float#float ret (return value: float) -------------------------------- -- @function [parent=#PhysicsShapeCircl...
------------------------------------------------------------------------[[ Top-level menu support ------------------------------------------------------------------------]] mono.menu = mono.menu or { top = nil, -- top-level menu item selectImage = nil, -- 'Select Image' for mono only search = nil, -- 'Search' f...
local M = {} M.setup = function (servers) local clangd_ok, clangd = require("nvim-lsp-installer.servers").get_server("clangd") if not clangd_ok then servers["clangd"] = {optional = true} return end -- Setup server servers["clangd"] = { cmd = { clangd._def...
--- === hs.webview === --- --- Display web content in a window from Hammerspoon --- --- This module uses Apple's WebKit WKWebView class to provide web content display with JavaScript injection support. The objective is to provide a functional interface to the WKWebView and WKUserContentController classes. --- --- This...
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg)...
local surroundings = { { '{', '}' }, { '[', ']' }, { '(', ')' }, '"', '\'', '`', '´' } local function left(a) for _,i in pairs(surroundings) do if type(i) == 'table' then if i[1] == a then return a elseif i[2] == a then ret...
--[[ -- player.lua -- Contains all things player-like -- It's pretty wild in here. Some day. -- ]] local Input = require ("game.input.input") local Colors = require ("game.display.colors") Player = {} Player.__index = Player -- Player Gameplay variables -- Player.__width = 32 Player.__height = 64 Player.__walkSpeedC...
local lpeg = require"lpeglj" local re = require"re" local m = lpeg local function checkeq(x, y, p) if p then print(x, y) end if type(x) ~= "table" then assert(x == y) else for k, v in pairs(x) do checkeq(v, y[k], p) end for k, v in pairs(y) do checkeq(v, x[k], p) end end end print"Tes...
workspace "GinX" architecture "x64" startproject "Sandbox" configurations { "Debug", "Release", "Dist" } outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}" IncludeDir = {} IncludeDir["GLFW"] = "GinX/vendor/GLFW/include" IncludeDir["Glad"] = "GinX/vendor/Glad/include" IncludeDir["ImGui"] = "Gi...
function onUse(player, item, fromPosition, target, toPosition, isHotkey) local player= player if item.itemid == 6898 then if player:getStorageValue(Storage.RookgaardTutorialIsland.ZirellaNpcGreetStorage) > 7 then item:transform(item.itemid + 1) player:teleportTo(toPosition, true) else player:sendTextMess...
string.rep(s,n)
local imagefont = {} function imagefont.load() return love.graphics.newImageFont('imagefont/font.png', ' abcdefghijklmnopqrstuvwxyz' .. 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0' .. '123456789.,!?-+/():;%&`\'*#=[]"') end return imagefont
-- Get redirect urls from redis -- see: -- https://agileweboperations.com/2014/10/13/supporting-millions-of-pretty-url-rewrites-in-nginx-with-lua-and-redis/ -- https://github.com/openresty/lua-nginx-module -- https://github.com/openresty/lua-resty-redis local redis = require "resty.redis" local red = redis:ne...
Locales ['en'] = { ['buy_license'] = 'Køb våben license?', ['yes'] = '%s', ['no'] = 'Nej', ['weapon_bought'] = 'Købte for $%s', ['not_enough_black'] = 'Du har ikke nok sorte penge', ['not_enough'] = 'Du har ikke nok penge', ['already_owned'] = 'Du ejer allerede dette våben!', ['shop_menu_title'] = 'Våbe...
--//////////////////////////////////////// --Smoke for the Cooling Towers --//////////////////////////////////////// local lwr_nuclear_smoke = util.table.deepcopy(data.raw["trivial-smoke"]["turbine-smoke"]); lwr_nuclear_smoke.name = "lwr-cooling-tower-smoke"; lwr_nuclear_smoke.start_scale = 7 lwr_nuclear_smoke.end_scal...
--My first code for SWGEmu! --Coded By: NickWill86 EndorEwokTreeVillage01ScreenPlay = ScreenPlay:new { numberOfActs = 1, } registerScreenPlay("EndorEwokTreeVillage01ScreenPlay", true) function EndorEwokTreeVillage01ScreenPlay:start() if (isZoneEnabled("endor")) then self:spawnMobiles() end end function EndorE...
require("utils") local function Emulate(luavm) local winSize = cc.Director:getInstance():getVisibleSize() local scene = nil local fs_position={ 왼쪽상단=function(i) i:setAnchorPoint(cc.p(0,1)); i:setPosition(0,winSize.height) end, 오른쪽상단=function(i) i:setAnchorPoint(cc.p(1,1)); i:setPosition(winSize...
local aliases = {} function Gvue.alias(id, real_panel) aliases[id] = real_panel end function Gvue.get_panel_name(id) local resolved = aliases[id] while aliases[id] do resolved = aliases[id] id = resolved end return resolved end function Gvue.spawn_panel(id, parent) local pane = vgui.Create(Gvue...
---------------------------------------------------------------- -- Copyright (c) 2012 Klei Entertainment Inc. -- All Rights Reserved. -- SPY SOCIETY. ---------------------------------------------------------------- local resources = include( "resources" ) local util = include( "client_util" ) local cdefs = include( "...
TOOL.Category = "Aperture Science" TOOL.Name = "#tool.aperture_science_fizzler.name" TOOL.ClientConVar[ "model" ] = "models/props/fizzler_dynamic.mdl" TOOL.ClientConVar[ "maxrad" ] = "20" TOOL.ClientConVar[ "startenabled" ] = "0" if ( CLIENT ) then language.Add( "aperture_science_fizzler", "Fizzler" ) language.Add...
if not _G.C_ArtifactUI then return end local Addon = select(2, ...) local Dominos = _G.Dominos local ArtifactBar = Dominos:CreateClass('Frame', Addon.ProgressBar) local IsEquippedArtifactDisabled if C_ArtifactUI.IsEquippedArtifactDisabled ~= nil then IsEquippedArtifactDisabled = C_ArtifactUI.IsEquippedArtifactDis...
local playsession = { {"mewmew", {1272684}}, {"Jaskarox", {436776}}, {"Malorie_sXy", {1299176}}, {"nik12111", {20629}}, {"Reyand", {1021837}}, {"corbin9228", {358883}}, {"Erikost3", {351833}}, {"XaLpHa1989", {713059}}, {"minipini55", {521014}}, {"robertkruijt", {835743}}, {"ballbuster", {194052}}, {"banakeg...
---根据系统时间初始化随机数种子,让后续的 math.random() 返回更随机的值 function math.newrandomseed(seed) local seed = tostring(os.time()):reverse():sub(1, 7) math.randomseed(seed) math.random() math.random() math.random() math.random() return seed; end --- ---对数值进行四舍五入,如果不是数值则返回 0 -- @param value 输入值 -- @return number...
class("FetchVoteInfoCommand", pm.SimpleCommand).execute = function (slot0, slot1) pg.ConnectionMgr.GetInstance():Send(17203, { type = slot1:getBody().voteId }, 17204, function (slot0) slot0:callback() end) end return class("FetchVoteInfoCommand", pm.SimpleCommand)
include("names") r = math.random(#musko_ime_nom) ime = musko_ime_nom[r] bank = math.random(289000) + 851000 car = math.random(199999) + 600001 value = bank - car diff = 30010 + math.random(value - 30010) value1 = value + diff value2 = value - diff
--[[ Provides an API for acquiring a reference to a reified object. This API is designed to mimic React 16.3's createRef API. See: * https://reactjs.org/docs/refs-and-the-dom.html * https://reactjs.org/blog/2018/03/29/react-v-16-3.html#createref-api ]] local refMetatable = { __tostring = function(self) return...
-- ============================================================= -- Copyright Roaming Gamer, LLC. 2008-2018 (All Rights Reserved) -- ============================================================= local fnn = _G.fnn or function( ... ) for i = 1, #arg do local theArg = arg[i] if(theArg ~= nil)...
object_mobile_som_treasure_hunter_guard = object_mobile_som_shared_treasure_hunter_guard:new { } ObjectTemplates:addTemplate(object_mobile_som_treasure_hunter_guard, "object/mobile/som/treasure_hunter_guard.iff")
--------- [ Element Data returns ] --------- local function getData( theElement, key ) local key = tostring(key) if isElement(theElement) and (key) then return exports['[ars]anticheat-system']:callData( theElement, tostring(key) ) else return false end end function findPlayer( thePlayer, partialName ) loca...
__source 'lua/api_extras_connect.cpp' require('./ac_struct_item') local _sizes = {} local _fficdef = ffi.cdef ---Creates a new shared structure to quickly exchange data between different Lua scripts within a session. Example: ---``` ---local sharedData = ac.connect{ --- ac.StructItem.key('myChannel'), -- opt...
------------------------------------------------------------------ -- Modules ------------------------------------------------------------------ ---@class Profile local Profile = ECSLoader:CreateModule("Profile") ---@type Utils local Utils = ECSLoader:ImportModule("Utils") function Profile:GetProfileVersion() re...
--- === Break Time === --- --- Break Time reminder --- local obj = {} obj.__index = obj -- Metadata obj.name = "BreakTime" obj.version = "0.1" obj.author = "IronFeet <ironfeet@hotmail.com>" obj.homepage = "https://github.com/ironfeet/hammerspoonConfig" obj.license = "MIT - https://opensource.org/licenses/MIT" --- Br...
-- This library is used internally by Garry's Mod to help keep track of -- achievement progress and unlock the appropriate achievements once a certain -- number is reached. -- @library achievements -- @clientside -- Adds one to the count of balloons burst. Once this count reaches 1000, -- the 'Popper' achievement is ...
object_tangible_collection_seven_years_02 = object_tangible_collection_shared_seven_years_02:new { gameObjectType = 8211,} ObjectTemplates:addTemplate(object_tangible_collection_seven_years_02, "object/tangible/collection/seven_years_02.iff")
local timer = libs.timer local server = libs.server local data = libs.data local json = nil local properties = nil local remotePositionChange = false local remotePosition = 0 local remoteVolumeChange = false local remoteVolume = 0 local lastVolume = 0 local fdmp, fdin, fdout, fderr = nil local fdoutIterator = nil loca...
local parent, ns = ... ns.Compat.Private = nil -- well, it is private!
minetest.register_node("geominer:glow_drop", { description = "glow_drop", drawtype = "airlike", paramtype = "light", sunlight_propagates = true, walkable = false, climbable = false, pointable = false, is_ground_content = false, groups = {choppy = 2, oddly_breakable_by_hand = 3, flammable = 2, not_in_creat...
workspace "Caxi" location "build" architecture "x86_64" startproject "Game" configurations { "Debug", "Release", "Dist" } PremakeDir = {} PremakeDir["root"] = "%{wks.location}/.." PremakeDir["output"] = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}" PremakeDir["ven...
local m = {} local log = require("common.log") function m.reg_fun(eventType, fun) local funs = m[eventType] if not funs then funs = {} m[eventType] = funs end table.insert(funs, fun) end function m.unreg_fun(eventType, fun) local funs = m[eventType] if not funs then return end for i, f in ipairs(funs) do...
local ns = select(2, ...); local LohAutoRunner = ns.LohAutoRunner; local GetNumQuestLogEntries = C_QuestLog.GetNumQuestLogEntries local GetQuestLogTile local f = CreateFrame("frame"); f:RegisterEvent("QUEST_ACCEPTED"); f:RegisterEvent("QUEST_REMOVED"); f:RegisterEvent("PLAYER_ENTERING_WORLD"); local LohQuests = { [...
local _,L = ... local rematch = Rematch local card = RematchAbilityCard rematch:InitModule(function() local font,size,flag = card.Name:GetFont() card.Name:SetFont(font,size+2,flag) card.Hints.StrongVs:SetText(L["Vs"]) card.Hints.WeakVs:SetText(L["Vs"]) end) -- instead of duplicating all the tables and parsing to ...
translations.en = setmetatable({ cant_search = "<r>Can't make a search yet. Wait until the current one is fully loaded.", scheduled = "<j>Your search was added to the queue.", now_searching = "<j>Searching <d>%s</d>. Requested by <d>%s</d>", failure_searching = "<r>Something happened with the systems. Please try to...
function getModule(gui) local Window = gui.internal.class(gui.widgets.Base) function Window:init(params) self.type = "Window" self.position = {0, 0} self.width = 100 self.height = 100 self.text = "Window" self.closeable = true self.resizable = true ...
DevMode(false) local options = { rgb = {255, 0, 0}, } Citizen.CreateThread(function() for marker_id,v in pairs(Config.RedZone) do options.scale = vector3(v.Size, v.Size, 150.0) CreateMarker(marker_id, v.Coords, v.Size + 50.0, 0.0, options) if v.Blip.Active then ...
-- MAIN GAME LOOP function love.load() -- runtime variables paused = false -- color definitions terminal = {0, 255, 0, 250} -- green virus = {255, 0, 0, 255} -- red heal = {255, 0, 255, 255} -- magenta special = {0, 255, 255, 255} -- cyan -- bullet table bullets = { template = { ...
data:extend({ { icons = { { icon = "__base__/graphics/icons/laser-turret.png", tint = {r= .8, g = .1, b = 0, a = 1}, icon_mipmaps = 4, icon_size = 64, } }, name = "pulse-laser", order = "b[turret]-b[pulse-laser]", place_result = "pulse-laser", stack_size = 50, subgroup = "defensi...
love.graphics.setBackgroundColor(0.2, 0.2, 0.2) love.window.setTitle("MineTracker Player") love.window.setMode(600,1) path = love.filesystem.getSource() love.filesystem.setIdentity("loveplayer") trackdata = {} tool = {} function tool.deserialize(str, safe) if type(str) ~= "string" then return false end local ...
-- -- Simple global event pub-sub hub. -- local registry = {} return { emit = (function(eventName) local callbacks = registry[eventName] if callbacks == nil then return end for _, callback in ipairs(callbacks) do callback() end end), subscribe = (function(eventName, callback) ...
do -- Define the needed constants local fov = math.rad(90) local znear, zfar = 0.1, 1000 function coordTrans(x, y, z) -- Calculate temporary values to simplify the final coord manipulation local w, h = love.graphics.getDimensions() local a = w / h local f = 1 / math.tan(fov/2) local q = z...
function conky_printf( format, value ) return string.format( format , conky_parse( value ) ) end
local socket = require("socket") local finalizer_called local func = socket.protect(function(err, ...) local try = socket.newtry(function() finalizer_called = true end) if err then return error(err, 0) else return try(...) end end) local ret1, ret2, ret3 = func(false, 1, ...
local START_HUNGER_TIME = survival.conf_getnum("hunger.damage_start_time", 720); local HUNGER_TIME = survival.conf_getnum("hunger.damage_interval", 30); local HUNGER_DAMAGE = survival.conf_getnum("hunger.damage", 4); -- Boilerplate to support localized strings if intllib mod is installed. local S; if (minetest.get_mo...
vim.opt_local.modeline = false vim.opt_local.completeopt:remove("preview") vim.opt_local.tabstop = 2 vim.opt_local.softtabstop = 2 vim.opt_local.expandtab = true require("notomo.lsp.mapping").setup() require("notomo.lsp.autocmd").setup() require("notomo.npm").mapping()
if Has_Module('lspconfig') then local nvim_lsp = require('lspconfig') --local servers = { 'pyright', 'rust_analyzer', 'tsserver' } local servers = {'dockerls', 'gopls', 'pyright', 'terraformls', 'yamlls'} for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup { on_attach = on_attach, flags = { ...
local function scale_noise(noise,scale) noise = table.copy(noise) local s = noise.spread s.x = s.x / scale.x s.z = s.z / scale.z if (noise.dims and noise.dims == 2) then s.y = s.y / scale.z else s.y = s.y / scale.y end if (dims == 2 and noise.mgmini_scale_values ~= false) or (dims == 3 and noise.mgmini_s...
local M = {} M.setup = function() local surround_ok, surround = pcall(require, "mini.surround") if not surround_ok then return end surround.setup({ -- Number of lines within which surrounding is searched n_lines = 20, -- Duration (in ms) of highlight when calling `MiniSurround.highlight()` highlight_dur...
ITEM.name = "Book" ITEM.model = "models/props_lab/binderblue.mdl" ITEM.width = 1 ITEM.height = 1 ITEM.desc = "This is something you can write a doodle on." ITEM.price = 100 ITEM.isURL = false ITEM.content = [[]] // On player uneqipped the item, Removes a weapon from the player and keep the ammo in the item. ITEM.func...
local Router = {} function Router:new(request) local instance = {routes = request} setmetatable(instance,{__index = self}) return instance end function Router:peek() print(self.routes.name) end return Router
---@class v4f local v4f = { ---@type number x = 0, ---@type number y = 0, ---@type number z = 0, ---@type number w = 0 } ---@overload fun(): v4f ---@overload fun(v: number): v4f ---@overload fun(x: number, y: number, z: number, w: number): v4f ---@overload fun(v: v2f, z: number, w: n...
if not script.active_mods["EditorExtensions"] then error("Editor Extensions must be active for this scenario to function.") end local callbacks = require("__EditorExtensions__.scripts.scenarios.testing") --[[ MOD DEVELOPERS: To create a custom mod testing scenario, navigate to map editor -> new scenario and cho...
-- -- Dressing Room Functions - Allows undress and target model for dressing room -- Copyright (C) 2018 Rachael Alexanderson -- -- Redistribution and use in source and binary forms, with or without modification, are permitted provided -- that the following conditions are met: -- -- 1. Redistributions of source ...
local tHex = { [ colors.white ] = "0", [ colors.orange ] = "1", [ colors.magenta ] = "2", [ colors.lightBlue ] = "3", [ colors.yellow ] = "4", [ colors.lime ] = "5", [ colors.pink ] = "6", [ colors.gray ] = "7", [ colors.lightGray ] = "8", [ colors.cyan ] = "9", [ colors.pur...
-- Returns the length of a given file. function length_of_file(filename) local fh = assert(io.open(filename, "rb")) local len = assert(fh:seek("end")) fh:close() return len end -- Returns true if file exists and is readable. function file_exists(path) local file = io.open(path, "rb") if file then file:clos...
ardour { ["type"] = "EditorAction", name = "add loop end", license = "MIT", author = "David Healey", description = [[Insert loop end location marker]] } function factory () return function () function round(n) return n + 0.5 - (n + 0.5) % 1 end --Main local sel = Editor:get_...
TextTimerBar = setmetatable({}, TextTimerBar) TextTimerBar.__index = TextTimerBar TextTimerBar.__call = function() return "TimerBarBase", "TextTimerBar" end function TextTimerBar.New(label, text, captionColor) if captionColor == nil then captionColor = {R = 240, G = 240, B = 240, A = 255} end local _data =...
local function get_reg(reg, context) if context.reg_label_lut[reg] then return context.reg_label_lut[reg] end local id = context.next_reg_id context.next_reg_id = id + 1 local function make_label(prefix, name) local label = prefix.."("..id..(name and ("|"..name) or "")..")" context.reg_label_lut[...
-- Constants local font_header = draw.CreateFont("Tahoma", 16, 16) local font_main = draw.CreateFont("Small Fonts", 15, 15) local font_tiny = draw.CreateFont("Small Fonts", 11, 11) local mmcolors = { [-1] = {"Grey", {200, 200, 200, 255}}, [0] = {"Yellow", {255, 255, 0, 255}}, [1] = {"Purple", {110, 0, 255...
local fn = vim.fn local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) end require('packer').startup(function(use) use 'wbt...
object_static_structure_general_trash_pile_no_flora_15m = object_static_structure_general_shared_trash_pile_no_flora_15m:new { } ObjectTemplates:addTemplate(object_static_structure_general_trash_pile_no_flora_15m, "object/static/structure/general/trash_pile_no_flora_15m.iff")
-- Created by Elfansoer --[[ - Check False/True piercing projectile - Projectile Events Launch: Projectile launched Think: Projectile in flight Hit: Projectile hits target - pierce procs multiple times - nonpierce procs once or none if disjointed End: Piercing ended, Non-piercing hits target (same with ProjHit)...
-- TomPoints.lua -- Parses chat channels for X,Y coordinate locations to create TomTom waypoints. -- Heavily patterned off the ClickLinks addon. local addonName, addon = ... local PATTERNS = { "((%d+(%.?%d*))%s*,+%s*(%d+(%.?%d*)))", -- has a comma "((%d+(%.?%d*))%s+(%d+(%.?%d*)))", -- no comma, just at l...
-- I createda wait function because lua doesn't have one built in function wait(seconds)-- you can name this function --what ever you want, it doesnt matter local start = os.time() repeat until os.time() > start + seconds end -- this is a wait functionin lua you use it like this print"this terminal will close in...
PLUGIN.name = "Stamina" PLUGIN.author = "Chessnut" PLUGIN.description = "Adds a stamina system to limit running." -- luacheck: push ignore 631 ix.config.Add("staminaDrain", 1, "How much stamina to drain per tick (every quarter second). This is calculated before attribute reduction.", nil, { data = {min = 0, max = 10,...
function package.preload.my_module() local mod = {} function mod.my_operation() return 42 end return mod end m = require 'my_module' print (m.my_operation())
function test_splitenv_win(t) if not is_host("windows") then return t:skip("wrong host platform") end t:are_equal(path.splitenv(""), {}) t:are_equal(path.splitenv("a"), {'a'}) t:are_equal(path.splitenv("a;b"), {'a','b'}) t:are_equal(path.splitenv(";;a;;b;"), {'a','b'}) t:are_equal(pa...
-- Util lib for Socket.lua and Card.lua local Socket = require "common/Socket" -- Reads a 2-digit positive decimal number. -- returns the number and the unparsed string function Socket:get_num(str) local n1, n2 n1,str = self:get_digit(str) n2,str = self:get_digit(str) if self.error == nil then ...
{ { Name = "General", Type = "group", Action = function() Settings.Objects=Parse.render(Settings.Objects[Settings.y-1].children,Settings.env) end, Children = { {Name = "General", Type = "header", Value = function() return "< Back" end, Action = function() Settings.Objects=nil Settings.Objects=Pa...
--gets called when leaf decay timer ends function leafdecay_on_timer(pos) if minetest.find_node_near(pos, 2, "nodes:tree") then return false end local node = minetest.get_node(pos) local drops = minetest.get_node_drops(node.name) --local droppy = drops[1] for _, item in ipairs(drops) do if math.random() ...
local a=require("cc.shell.completion")local b=require(settings.get("ghu.base").."core/apis/ghu")local c=string.sub(b.p.ext.."AngellusMortis/am-cc/mine/programs/turtle/",2)shell.setCompletionFunction(c.."quarry.lua",a.build({a.choice,{"true","false"},true},nil,nil,nil,nil,nil,nil,{a.choice,{"left","right","front","back"...
-- Tycoon Module --[[ NOTICE Copyright (c) 2019 Andrew Bereza Provided for public use in educational, recreational or commercial purposes under the Apache 2 License. Please include this copyright & permission notice in all copies or substantial portions of Miner's Haven source code ]] local module = {} function mod...
function getSelectedVerticalList(current,minVal,maxVal) was=current if (btnp(3)) current+=1 if (btnp(2)) current-=1 if (current<minVal) current=maxVal if (current>maxVal) current=minVal if (was!=current) sfx(27) return current end function drawHudRect(hudRect) minX=hudRect.min.x...
------------------------------------------------------ -- xmlhttp.lua -- -- Standard XML HTTP requests. -- -- More -- XML Http -- -- Conceptual Details -- *Planning -- This module needs to be as close to pure Lua as -- possible to reduce code negotiation when setting up -- new instances. Adding Javascript to the mix...
local M = {} local function get_hl_attr(hl_group_name, attr) local id = vim.api.nvim_get_hl_id_by_name(hl_group_name) if not id then return end local value = vim.fn.synIDattr(id, attr) if not value or value == "" then return end return value end local function get_fg(hl_group_name) return get_hl_attr(hl...
--[=[ See https://gist.github.com/Fraktality/4e394945c865263144263250d5a78f79 @class CompiledBoundingBoxUtils ]=] -- local CompiledBoundingBoxUtils = {} --[=[ Compiles a bounding box into a CFrame rotation matrix for easy usage. @param cframe CFrame @param size Vector3 @return CFrame ]=] function CompiledBou...
--[[ Credit https://www.se7ensins.com/forums/threads/988584 Model Name = hex,uint32,int32 (description) ------------------------------------ adder = 0xB779A091,3078201489,-1216765807 airbus = 0x4C80EB0E,1283517198,1283517198 (Airport Bus) airtug = 0x5D0AAC8F,1560980623,1560980623 akuma = 0x63ABADE7,1672195559,167219555...
----------------------------------------------------- -- Actor funcs function CreateActor(amx, model, x, y, z, rotation) local actor = createPed(model, x, y, z, rotation, false) setElementData(actor, 'amx.actorped', true) return addElem(g_Actors, actor) end function DestroyActor(amx, actor) for i,playerdata in pai...
return { tag = 'graphicsState', summary = 'Set or disable the active shader.', description = 'Sets or disables the Shader used for drawing.', arguments = { shader = { type = 'Shader', description = 'The shader to use.' } }, returns = {}, variants = { { arguments = { 'shader' ...
-- $Id: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/GameObject/UM11_ForceAdeptOne.lua#4 $ --///////////////////////////////////////////////////////////////////////////////////////////////// -- -- (C) Petroglyph Games, Inc. -- -- -- ***** ** * * -- * ** ...
Config = {} Config.Presstext = "Aperte" Config.Talktext = "para falar com" Config.NPCTitle = "PROCURADO : Pagamos boas recompensas!" Config.Debug = false -- true/false Debug Mode Config.Info = "A encomenda foi marcada no mapa" Config.Info1 = "Volte para o sheriff com o corpo para receber seu dinheiro" Config.S...
return { { effect_list = { { type = "BattleBuffAddAttrRatio", trigger = { "onAttach" }, arg_list = { attr = "airPower", number = 800 } }, { type = "BattleBuffAddAttr", trigger = { "onAttach", "onRemove" }, arg_list = { attr = "injureRatio", ...
-- -- Menu Bar Responder -- --- Triggers an appropriate response to different menu item trigger events. Responder = {} Responder.__index = Responder --- Create a new responder function Responder.new(...) local self = setmetatable({}, Responder) self:setup(...) return self end function Responder:setup(controll...
local ffi = require "ffi" local C = ffi.C local bit = require "bit" local format_error = require("resty.openssl.err").format_error local BORINGSSL = require("resty.openssl.version").BORINGSSL require "resty.openssl.include.ssl" ffi.cdef [[ typedef struct ssl_method_st SSL_METHOD; const SSL_METHOD *TLS_method(void)...
--- Canvas LMS in Lua: Assignments -- @submodule canvas local binser = require("binser") local dump = require("pl.pretty").dump local date = require("pl.date") local path = require("pl.path") local markdown = require("markdown") local canvas = {} --- Get assignments -- Data stored in `.assignments` table, indexe...
------------------------------------------------------------------------------ -- transient state data ------------------------------------------------------------------------------ splashState = {} splashState.titleText = "Space Game" splashState.hintText = "Press START to begin" splashState.titleTextLength = st...
local _G = getfenv(0) local InCombatLockdown = _G.InCombatLockdown local StanceBar = _G.ModernActionBar:GetModule('StanceBar') function StanceBar:OnInitialize() _G.UIPARENT_MANAGED_FRAME_POSITIONS['StanceBarFrame'] = nil self.frame = _G.StanceBarFrame self.frame:SetScript('OnShow', nil) self.frame:S...
--------------------------------------------------------------------------------------------------- -- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0273-webengine-projection-mode.md -- -- Description: -- Check that App will be disallowed to register with HMI type collection {"MEDIA",...
-- DEF -- def.lua local unpack = table.unpack or unpack local settings = require('settings') local Eval = require('eval') local Error = require('error') local RE = require('re') local Def = {} local D = {} local DD = {} -- definition function D.predef(_, predef, _) local res = {} for k,v in pairs(predef)...
local function initDB() am.db = ezdb.create(am.config.MySQL) print("Attempting connection to db...") function am.db:onConnected() print("Connected to db!") print("Creating default tables...") // TODO: insert default ranks and servers --schema for database! self:create("ranks") :create("id", "INTE...
local capture = require "test_helpers".capture describe("metis.argparse", function() local argparse = require "metis.argparse" it("displays usage", function() local spec = argparse.create() spec:add({ "--test", "-t" }, { doc = "Does something" }) spec:add("another") local result = capture(stub, p...
local M = {} function M.setup(opts) if not opts then return end if type(opts) ~= "table" then print("WARNING program.nvim - setup.filetypes") print("Expected a table value for 'filetypes") return end local run = require('program.run_program') for filetype, v in pairs(opts) do if type(v) ~= 'table' then ...