content
stringlengths
5
1.05M
-------------- COPYRIGHT AND CONFIDENTIALITY INFORMATION NOTICE ------------- -- Copyright (c) [2019] – [Technicolor Delivery Technologies, SAS] - -- All Rights Reserved - -- The source code form of this Open Source Project components - -- is su...
-- ============================= -- -- Copyright 2018 FiatAccompli -- -- ============================= -- -- A very simple example of using mod setting provided by the Mod Settings Manager mod. -- All this does is print out the values of the declared settings when they are changed. include("mod_settings"); include("...
local Knit = require(game:GetService("ReplicatedStorage").Test.Knit) local MyService = Knit.CreateService { Name = "MyService"; Client = { TestEvent = Knit.CreateSignal(); }; } MyService.Client.TestEvent:Connect(function(player, msg) print("Got message from client event:", player, msg) MyService.Client.TestEve...
data:extend({ -- Item { type = "item", name = "5d-furnace", icon = "__5dim_resources__/graphics/icon/icon_5d_steel-furnace_3_.png", flags = {"goes-to-quickbar"}, icon_size = 32, subgroup = "furnace-coal", order = "c", place_result = "5d-furnace", stack_size = 50 }, --Recipe { ...
wait(.2) lp=game.Players.LocalPlayer pl=lp.Character tor=pl.Torso mouse=lp:GetMouse() rw2=tor['Right Hip'] lw2=tor['Left Hip'] mo=Instance.new("Model",pl) dednum=math.huge pi=math.pi Key={} sec=5 cleanup=sec*10 a=false deb=false hitdeb=false isblocking=false swing=1 equi=false smode='knife' rad=math.rad ca=CFrame.A...
----------------------------------------- -- ID: 4666 -- Scroll of Paralyze -- Teaches the white magic Paralyze ----------------------------------------- function onItemCheck(target) return target:canLearnSpell(58) end function onItemUse(target) target:addSpell(58) end
local dap = require('dap') dap.adapters.node2 = { type = 'executable', command = 'node', args = {os.getenv('HOME') .. '.local/share/dap/vscode-node-debug2/out/src/nodeDebug.js'} } dap.configurations.javascript = { { type = 'node2', request = 'launch', program = '${workspaceFolder}/${file}', cw...
local cf = require "cf" local cf_fork = cf.fork local cf_sleep = cf.sleep local wbproto = require "protocol.websocket.protocol" local _recv_frame = wbproto.recv_frame local _send_frame = wbproto.send_frame local Log = require "logging":new { dump = true, path = 'protocol-websocket-server'} local type = type local pc...
print("Better Trade Screen loaded") -- =========================================================================== -- SETTINGS -- =========================================================================== local alignTradeYields = true local showNoBenefitsString = false local showSortOrdersPermanently = false local h...
--[[ Made by Megumu#8008 <3 ]] local f=string.byte;local i=string.char;local c=string.sub;local C=table.concat;local u=math.ldexp;local E=getfenv or function()return _ENV end;local l=setmetatable;local r=select;local t=unpack;local h=tonumber;local function s(t)local e,o,n="","",{}local a=256;local d={}for l=0,a-1 d...
local assign = import("../assign") local RenderSettings = import("./settings/RenderSettings") local Settings = {} setmetatable(Settings, { __tostring = function() return "Settings" end, }) local prototype = {} function prototype:GetFFlag(name) return self.settings[name] or false end local metatable = {} metat...
object_draft_schematic_dance_prop_prop_double_ribbon_magic_r_s04 = object_draft_schematic_dance_prop_shared_prop_double_ribbon_magic_r_s04:new { } ObjectTemplates:addTemplate(object_draft_schematic_dance_prop_prop_double_ribbon_magic_r_s04, "object/draft_schematic/dance_prop/prop_double_ribbon_magic_r_s04.iff")
local sw, sh = ScrW(), ScrH() local w, h = 400, 600 local x, y = sw/2 - w/2, sh/2 - h/2 local entSounds = { ["Exit"] = { "vo/npc/female01/answer25.wav", "vo/npc/female01/answer32.wav", "vo/npc/female01/answer34.wav", "vo/npc/female01/answer36.wav", "vo/npc/female01/answer38.wav", "vo/npc/female01/fantasti...
local m = require 'lpeg' return m.R('\1\8', '\11\12', '\14\31') + '\127'
local settings = { header = { type = "text", oldfiles_directory = false, align = "center", fold_section = false, title = "Header", content = { " ⣀⣀⣀⣀ ", " ⣀⣤⣤⣤⡄⢀⠰⠿⣿⣿⣿⠿⠛⣂⡀⢴⣶⣦⣤⣀ ...
--Check for diabling global if gDisableUWEBalance then return end GBM_version = 201806151 --year month day versionofday if AddModPanel then local panel = PrecacheAsset("materials/ghoulsbalancemod/panel.material") AddModPanel(panel, "https://ghoulofgsg9.github.io/Ghouls-Balance-Mod/") end
require('lovestates') require('startstate') require('gamestate') require('gameoverstate') states = { start_state = build_start_state(), game_state = build_game_state(), gameover_state = build_gameover_state() } -- LOVE 2D WRAPPERS function love.load() love.window.setTitle( 'K-Type - Defender of the ...
-- ui.lua (currently includes Button class with labels, font selection and optional event model) -- Version 1.5 (works with multitouch, adds setText() method to buttons) -- -- Copyright (C) 2010 ANSCA Inc. All Rights Reserved. -- -- Permission is hereby granted, free of charge, to any person obtaining a copy of -- th...
local mod = ... local str = mod.require('mod/utils/str') local Quality = mod.require('mod/enums/Quality') local SimpleDb = mod.require('mod/helpers/SimpleDb') local TweakDb = {} TweakDb.__index = TweakDb setmetatable(TweakDb, { __index = SimpleDb }) local searchSchema = { { field = 'name', weight = 1 }, { field = ...
-- SPDX-License-Identifier: MIT -- Copyright (c) 2019 oO (https://github.com/oocytanb) ---@type cytanb @See `cytanb_annotations.lua` local cytanb = require('cytanb')(_ENV) local vciLoaded = false local UpdateCw; UpdateCw = cytanb.CreateUpdateRoutine( function (deltaTime, unscaledDeltaTime) if deltaTime <=...
-- $Id: testes/files.lua $ -- See Copyright Notice in file all.lua local debug = require "debug" local maxint = math.maxinteger assert(type(os.getenv"PATH") == "string") assert(io.input(io.stdin) == io.stdin) assert(not pcall(io.input, "non-existent-file")) assert(io.output(io.stdout) == io.stdout) local function...
local filename = ... local file = io.open(filename, 'r') local sum = nil while true do local num1, num2 = file:read("*n","*n") if num1 or num2 then if not sum then sum = 0 end if num1 then sum = sum + num1 end if num2 then sum = sum + num2 end else break end end i...
local Collection = {} function Collection:new ( type ) return { type = type, } end return Collection
local load_module = require('utils.helpers').load_module local diffview = load_module 'diffview' if diffview == nil then return false end local nvim = require 'neovim' local get_mapping = require('neovim.mappings').get_mapping local cb = require('diffview.config').diffview_callback local has_devicons = load_mo...
-- -- Copyright (c) 2017, Jesse Freeman. All rights reserved. -- -- Licensed under the Microsoft Public License (MS-PL) License. -- See LICENSE file in the project root for full license information. -- -- Contributors -- -------------------------------------------------------- -- This is the official list of Pixel Visi...
 module(..., package.seeall) --;=========================================================== --; LOAD DATA --;=========================================================== -- Data loading from data_sav.lua local file = io.open("script/data_sav.lua","r") s_dataLUA = file:read("*all") file:close() -- Data loading from co...
slot0 = class("ShipModLayer", import("..base.BaseUI")) slot1 = 12 slot0.IGNORE_ID = 4 slot0.getUIName = function (slot0) return "ShipModUI" end slot0.setShipVOs = function (slot0, slot1) slot0.shipVOs = slot1 end slot0.init = function (slot0) slot0.blurPanelTF = slot0:findTF("blur_panel") slot0.mainPanel = slot0...
resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' files { 'vehicles.meta', 'carvariations.meta', 'carcols.meta', 'handling.meta', 'vehiclelayouts.meta' } data_file 'HANDLING_FILE' 'handling.meta' data_file 'VEHICLE_METADATA_FILE' 'vehicles.meta' data_file 'CARCOLS_FI...
return { init_effect = "", name = "最终阶段", time = 0, picture = "", desc = "最终阶段开始", stack = 1, id = 100005, icon = 100005, last_effect = "", effect_list = { { type = "BattleBuffNewWeapon", trigger = { "onAttach" }, arg_list = { weapon_id = 311079 } }, { type = "BattleBuffNewWeap...
CloneClass(MenuSceneManager) local ids_unit = Idstring("unit") local sky_orientation_data_key = Idstring("sky_orientation/rotation"):key() function MenuSceneManager:_setup_bg() local yaw = 180 self._bg_unit = World:spawn_unit(Idstring("units/menu/menu_scene/menu_cylinder"), Vector3(0, 0, 0), Rotation(yaw, 0,...
local debug = require("tw-debug")("devtool:ui:ConsoleComponent") local devtool = require("devtool/devtool") local removeComponent = require("devtool/utils/ui/removeComponent") local positionComponentRelativeTo = require("devtool/utils/ui/positionComponentRelativeTo") local resizeComponent = require("devtool/utils/ui/r...
local class = require 'libs.middleclass' local Ship = class('Ship') function Ship:initialize(x, y ,w, h) self.x = x self.y = y self.w = w self.h = h end function Ship:Move(dt) if love.keyboard.isDown("d") then self.x = self.x + 200 * dt elseif love.keyboard.isDown("a") then se...
---@class CS.UnityEngine.SliderJoint2D : CS.UnityEngine.AnchoredJoint2D ---@field public autoConfigureAngle boolean ---@field public angle number ---@field public useMotor boolean ---@field public useLimits boolean ---@field public motor CS.UnityEngine.JointMotor2D ---@field public limits CS.UnityEngine.JointTranslatio...
------------------------------------------------------------------------------ -- Val class ------------------------------------------------------------------------------ local ctrl = { nick = "val", parent = WIDGET, creation = "s", callback = { mousemove_cb = "d", button_press_cb = "d", ...
local Selection = game:GetService("Selection") local Plugin = script.Parent.Parent local Constants = require(Plugin.Constants) local Layers = require(Plugin.Layers) local Roact = require(Plugin.Vendor.Roact) local StudioComponents = require(Plugin.Vendor.StudioComponents) local Button = StudioComponents.Button local...
Auctionator.Constants = { History = { NUMBER_OF_LINES = 20 }, RESULTS_DISPLAY_LIMIT = 100, AdvancedSearchDivider = ';', PET_CAGE_ID = 82800, WOW_TOKEN_ID = 122270, SCAN_DAY_0 = time({year=2020, month=1, day=1, hour=0}), SORT = { ASCENDING = 1, DESCENDING = 0 }, ITEM_TYPES = { ITE...
--[[ 包管理器 ]] local THIS_MODULE = ... local C_LOGTAG = "PackManager" local utils = cc.safe_require("utils") local PackLoader = import(".PackLoader") local PackManager = class("PackManager") -- 获得单例对象 local instance = nil function PackManager:getInstance() if instance == nil then instance = PackManager:crea...
local PLUGIN = PLUGIN ix.chat.Register("consulcast", { format = "PA system broadcasts \"%s\"", color = Color(175, 54, 45), CanSay = function(_, speaker) return not IsValid(speaker) end, OnChatAdd = function(self, _, text) chat.AddText(self.color, string.format(self.format, text)) end })
-- -- (C) 2013 Kriss@XIXs.com -- local coroutine,package,string,table,math,io,os,debug,assert,dofile,error,_G,getfenv,getmetatable,ipairs,Gload,loadfile,loadstring,next,pairs,pcall,print,rawequal,rawget,rawset,select,setfenv,setmetatable,tonumber,tostring,type,unpack,_VERSION,xpcall,module,require=coroutine,package,str...
-- ========================== -- LSP-STATUS MESSAGES BUBBLE -- ========================== -- Created by kuznetsss <github.com/kuznetsss> local settings = { color = vim.g.bubbly_colors, style = vim.g.bubbly_styles, timing = vim.g.bubbly_timing, filter = vim.g.bubbly_filter, } ---@type fun(settings: table, modu...
--↔ local obj = { __gc = true } setmetatable(obj, obj) obj.__gc = function(t) t:endPresentation() end -- Metadata obj.name = "BCSPresentation" obj.version = "1.0" obj.author = "Chris Jones <cmsj@tenshu.net>" obj.homepage = "https://github.com/Hammerspoon/presentation" obj.license = "MIT - https://opensource.org/li...
-------- LIBRARY ------------------------------------------------------------------------------------ local cairo = require("lgi").cairo local module = {} function module:custom_shape(cr, width, height) cr:move_to(0,0) cr:line_to(width,0) cr:line_to(width,height - height/4) cr:li...
kill_spikes = { wood_durability_index = 0.7, iron_durability_index = 0.95, dia_durability_index = 256 } -- add damage to any object. kill_spikes.do_damage = function(obj, durability_index) if obj == nil then return end if obj:is_player() or (obj:get_luaentity() ~= nil and obj:get_luaentity().name ~= "__buil...
local tcheck = require 'tcheck' local token = require 'tulip.pkg.token.token' local xerror = require 'tulip.xerror' local xtable = require 'tulip.xtable' local function make_token(cfg) local lookup_types if cfg.allowed_types then lookup_types = xtable.toset(cfg.allowed_types) end return function(app, t, c...
local tools = require('Utils.ToolSet') GGraph = class('GGraph', GObject) local getters = GGraph.getters local setters = GGraph.setters function GGraph:ctor() GGraph.super.ctor(self) self._type = 0 end function getters:color() return self._fillColor or 0 end function setters:color(value) if...
-- Copyright 2014 Aedan Renner <chipdankly@gmail.com> -- Copyright 2018 Florian Eckert <fe@dev.tdt.de> -- Licensed to the public under the GNU General Public License v2. local dsp = require "luci.dispatcher" local m, s, o m = Map("mwan3", translate("MWAN - Members")) s = m:section(TypedSection, "member", nil, tran...
fx_version "adamant" game "gta5" client_scripts {"utk.lua", "client.lua"} server_scripts {"utk.lua", "server.lua"}
require "/scripts/util.lua" function tileAnchors(grid, pos) pos = copy(pos) pos[1] = pos[1] < 0 and pos[1] + grid.size[1] or pos[1] pos[1] = pos[1] >= grid.size[1] and pos[1] - grid.size[1] or pos[1] return grid.tiles[tostring(pos[1])][tostring(pos[2])] end function claimTile(grid, pos, anchors) pos = copy(...
temp = {} cifre = {}; out = {}; order = {} max = 8 for i = 1,10 do temp[i] = i - 1 end out = lib.math.random_shuffle(temp) for i = 1,max do cifre[i] = out[i] end order = lib.math.argsort(cifre) numb = cifre[order[max]...
Common_UnitConsumeActPoint(attacker, 1); if Common_Break_Skill(attacker, _Skill) then return end local info = ... -- [[ if attacker[30081] > 0 then if not info.SingSkill then Common_ChangeEp(attacker, -_Skill.skill_consume_ep) Common_UnitConsumeActPoint(attacker, 1); Common_Sleep(attacker, 0.3) Common_UnitAddB...
-- -- Please see the license.html file included with this distribution for -- attribution and copyright information. -- function onDeliverMessage(messagedata, mode) if super and super.onDeliverMessage then local messagedata = super.onDeliverMessage(messagedata, mode); if messagedata then ChatManagerCL.resolv...
if 1 ~= vim.fn.has "nvim-0.7.0" then vim.api.nvim_err_writeln "Telescope.nvim requires at least nvim-0.7.0. See `:h telescope.changelog-1851`" return end if vim.g.loaded_telescope == 1 then return end vim.g.loaded_telescope = 1 local highlights = { -- Sets the highlight for selected items within the picker. ...
globals("grammar") local lpeg = require "lpeg" local P = lpeg.P local V = lpeg.V local C = lpeg.C local R = lpeg.R local S = lpeg.S local Ct = lpeg.Ct local Cc = lpeg.Cc local ESCAPES = { ["\\"] = "\\", a="\x07", n="\n", t="\t", r="\r", } grammar = P{ "loc"; loc = V"label" * (V"instruction" + V...
function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerskin = getPedSkin ( source ) setAccountData ( playeraccount, "skin", playerskin ) end end function onPlayerJoin ( ) local playeraccount = getPlayer...
termID = nil local function startTurtle(width, length, startx, starty) while turtle.detect() do end --if the turtle needs fuel, get it if turtle.getFuelLevel() < 100 and turtle.getItemCount(2) > 0 then turtle.select(2) turtle.placeUp() turtle.suckUp() turtle.refuel() turtle.digUp() tur...
require('settings.options')
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ========== PlaceObj('PopupNotificationPreset', { group = "Default", id = "AllMilestonesCompleted", text = T(676455960275, --[[PopupNotificationPreset AllMilestonesCompleted text]] "Through the devotion and self-sacrifice of our Colonists and your vision and lea...
do local keys = {} for i=1,100 do keys[i] = "foo" end keys[95] = "__index" local function fidx(t, k) return 12345 end local mt = { foo = 1, __index = "" } local t = setmetatable({ 1 }, mt) t[1] = nil mt.__index = nil local x = nil for i=1,100 do mt[keys[i]] = fidx if t[1] then if not ...
gavyn_sykes_missions = { { missionType = "assassinate", primarySpawns = { { npcTemplate = "zim_zam_blattis", npcName = "Zim Zam Blattis" } }, secondarySpawns = {}, itemSpawns = {}, rewards = { { rewardType = "credits", amount = 50 } } }, { missionType = "assassinate", pri...
gg_rct_Spawn0 = nil gg_rct_Spawn1 = nil gg_rct_Check0 = nil gg_rct_Check1 = nil gg_rct_Check2 = nil gg_rct_Check3 = nil gg_rct_Check4 = nil gg_rct_Check5 = nil gg_rct_PlayArea = nil gg_rct_Spawn2 = nil gg_rct_Spawn3 = nil gg_rct_ClassSelection = nil gg_rct_ModShops = nil gg_trg_Untitled_Trigger_001 = nil gg_trg_Untitle...
iggungan = Creature:new { customName = "Gungan", socialGroup = "mercenary", faction = "", level = 300, chanceHit = 25.00, damageMin = 100, damageMax = 200, baseXp = 100000, baseHAM = 100000, baseHAMmax = 110000, armor = 0, resists = {40,40,40,40,40,40,40,40,40}, meatType = "", meatAmount = 0, hideType = ...
local g = vim.g g.gruvbox_contrast_dark = 'hard' g.gruvbox_invert_selection = false g.tokyonight_italic_functions = true g.tokyonight_style = 'night'
--[[ FiveM Scripts Copyright C 2018 Sighmir This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or at your option any later version. ...
require("rrpg.lua"); local __o_rrpgObjs = require("rrpgObjs.lua"); require("rrpgGUI.lua"); require("rrpgDialogs.lua"); require("rrpgLFM.lua"); require("ndb.lua"); function newfrmBase() __o_rrpgObjs.beginObjectsLoading(); local obj = gui.fromHandle(_obj_newObject("form")); local self = obj; local sheet...
--[[ Desc: Drawable base (high-layer) Author: SerDing Since: 2020-02-09 Alter: 2020-02-09 ]] local _Vector3 = require("utils.vector3") local _Vector2 = require("utils.vector2") local _Event = require("core.event") local _GRAPHICS = require("engine.graphics") local _Blendmode = require("engine.graphics.config.blen...
-- -- _Control = { scene = { -- -- Escape ESC = function() Gamestate.current():onQuit() end, -- Direction - Analog AL = function(...) Gamestate.current():on('axis', ...) end, -- Direction - Up U = { on = function() Gamestate.current():on('axis', { y = -1 }) end, off = function() Gamestate.cu...
------------------------------------------------------------------------------- -- A test suite for Leg -- -- Author: Humberto Anjos -- Copyright (c) 2007 Leg -- -- $Id: test.lua,v 1.4 2007/12/07 14:23:56 hanjos Exp $ -- ------------------------------------------------------------------------------- print '==========...
function HealingWave( keys ) local caster = keys.caster local caster_location = caster:GetAbsOrigin() local target = keys.target local target_location = target:GetAbsOrigin() local ability = keys.ability local ability_level = ability:GetLevel() - 1 -- Ability variables local bounce_rad...
-- Copyright (c) 2019 Redfern, Trevor <trevorredfern@gmail.com> -- -- This software is released under the MIT License. -- https://opensource.org/licenses/MIT describe("Node", function() local MockLove = require "moonpie.test_helpers.mock_love" local Node = require "moonpie.ui.node" local Styles = require "moonpi...
--<<<WRATH OF THE LAMB>>>-- OLD VERSION (REPLACED BY SLIGHTLY BETTER WORKING VERSION) function Exodus:wotlUpdate() local player = Isaac.GetPlayer(0) local level = game:GetLevel() local room = game:GetRoom() if ItemVariables.WRATH_OF_THE_LAMB.FrameCount ~= nil and player:HasCollectible(ItemId.WRATH_...
local settings = require('settings') -- Return a name that doesn't appear in any of the provided tables' keys local function getUniqueName(name, ...) local function exists(key) local match = nil for i,tbl in ipairs(arg) do match = match or tbl[key] end return match ~= n...
--[[ © 2020 TERRANOVA do not share, re-distribute or modify without permission of its author. --]] local PANEL = {} -- Called when the panel is first initialized. function PANEL:Init() self:Dock(FILL) self:SetDrawBackground(false) self.backHeader = self:Add(ix.gui.record:AddBackHeader(function() ix.gui.recor...
local lunit, RUN = lunit do RUN = lunit and function()end or function () local res = lunit.run() if res.errors + res.failed > 0 then os.exit(-1) end return os.exit(0) end lunit = require "lunit" end local _,luacov = pcall(require, "luacov") local TEST_CASE = assert(lunit.TEST_CASE) local ...
serial_version = 1.0 TILE = {} TILE.initializeEnt = function (self,ent, x, y) if ent.max_anims <= 1 then ent.anim_type = "" ent.variants = false else ent.anim_type = math.floor((global_run_time + math.random() * 1000) % ent.max_anims) end end TILE.executeAI = function (self,ent) local pl = getPlayer() ...
-- Niblib -- Biblioteca de API utilitária para o Nibble -- https://github.com/pongboy/nibble -- Apaga variáveis globais desnecessárias time = os.clock os = nil dprint = print -- Cria esqueleto de funções function init() end function update(dt) end function draw() end -- Importa implementação das funções local gpu...
local Assert = require('util.assert') local ItemChestTransport = {} function ItemChestTransport.update(portal) Assert.Portal(portal) local source_inv = portal.from_entity.get_inventory(portal.type_params.source_inventory_type or defines.inventory.chest) local target_inv = portal.to_entity.get_inventory(port...
if not nyagos then print("This is a script for nyagos not lua.exe") os.exit() end share.maincmds = {} -- git local githelp=io.popen("git help -a 2>nul","r") if githelp then local gitcmds={} for line in githelp:lines() do if string.match(line,"^ %S") then for word in s...
object_tangible_container_drum_shared_nonopening_treasure_drum = SharedTangibleObjectTemplate:new { clientTemplateFileName = "object/tangible/container/drum/shared_nonopening_treasure_drum.iff" } ObjectTemplates:addClientTemplate(object_tangible_container_drum_shared_nonopening_treasure_drum, "object/tangible/contain...
slot0 = class("FushunAdventureGameConst") slot0.BGM_NAME = "main-chunjie2" slot0.GAME_BGM_NAME = "bgm-cccp3" slot0.A_BTN_VOICE = "event:/ui/quanji" slot0.B_BTN_VOICE = "event:/ui/tiji" slot0.COUNT_DOWN_VOICE = "event:/ui/ddldaoshu2" slot0.ENTER_EX_VOICE = "event:/ui/baoqi" slot0.EX_TIP_TIME = 3 slot0.EX_TIME = 10 slot0...
local condition = Condition(CONDITION_DROWN) condition:setParameter(CONDITION_PARAM_PERIODICDAMAGE, -20) condition:setParameter(CONDITION_PARAM_TICKS, -1) condition:setParameter(CONDITION_PARAM_TICKINTERVAL, 2000) function onStepIn(creature, item, position, fromPosition) if creature:isPlayer() then if math.random(1...
-- -- tests/actions/vstudio/vc200x/test_assembly_refs.lua -- Validate managed assembly references in Visual Studio 2010 C/C++ projects. -- Copyright (c) 2013 Jason Perkins and the Premake project -- local p = premake local suite = test.declare("vs200x_assembly_refs") local vc200x = p.vstudio.vc200x -- -- Setup --...
local Format do local lpeg = require "lpeg" local P, C, Cs, Ct, Cp, S = lpeg.P, lpeg.C, lpeg.Cs, lpeg.Ct, lpeg.Cp, lpeg.S local any = P(1) local sym = any-S':}' local esc = P'%%' / '%%' local var = P'%{' * C(sym^1) * '}' local fmt = P'%{' * C(sym^1) * ':' * C(sym^1) * '}' local function LpegFormat(str, context) ...
Citizen.CreateThread(function() local cachedIndex = nil for index, data in ipairs(Config.Zones) do if (data.type == "yellow") then cachedIndex = index break end end while true do for _,vehicle in ipairs(GetAllVehicles()) do for index, bubble in ipairs(Config.Zones[cachedIndex].bu...
EditorAlertTrigger = EditorAlertTrigger or class(MissionScriptEditor) function EditorAlertTrigger:create_element() self.super.create_element(self) self._element.class = "ElementAlertTrigger" self._element.values.filter = "0" self._element.values.alert_types = {} end function EditorAlertTrigger:_build_panel() sel...
local common = {} function common.is_utf8_cont(char) local byte = char:byte() return byte >= 0x80 and byte < 0xc0 end function common.utf8_chars(text) return text:gmatch("[%z\001-\127\194-\244][\128-\191]*") end function common.clamp(n, lo, hi) return math.max(math.min(n, hi), lo) end function common.ro...
resource.AddWorkshop("403587498")
local util = require ('gluon.util') local math_polygon = require('math-polygon') local json = require ('jsonc') local uci = require('simple-uci').cursor() local site = require ('gluon.site') local M = {} function M.get_domains() local list = {} for _, domain_path in ipairs(util.glob('/lib/gluon/domains/*.json')) do ...
function render() newView(this, "imgui", "default") setPass(this, "MAIN") clear(this, CLEAR_COLOR | CLEAR_DEPTH, 0x303030ff) setViewMode(this, VIEW_MODE_SEQUENTIAL) end
-- Tests for alpha_beta_pruning.lua local negamax = require 'negamax' local total, pass = 0, 0 local function dec(str, len) return #str < len and str .. (('.'):rep(len-#str)) or str:sub(1,len) end local function run(message, f) total = total + 1 local ok, err = pcall(f) if ok then pass = pass + 1 ...
---@type Plugin local plugin = ... plugin.name = 'Whitelist' plugin.author = 'jdb' plugin.description = 'Only let in certain players.' plugin.defaultConfig = { -- How many people can be let in regardless of if they're whitelisted maxPublicSlots = 0 } local json = require 'main.json' local whitelistPath = 'whitelis...
return { version = "1.1", luaversion = "5.1", orientation = "orthogonal", width = 30, height = 30, tilewidth = 32, tileheight = 32, properties = { ["blockx"] = "32", ["blocky"] = "32", ["format"] = ".png", ["numx"] = "8", ["numy"] = "8" }, tilesets = { { name = "tmw_desert_spacing", firstgid = 1, tilewidth = 32, tilehe...
---------------------------------------------------------------------------------------------------- -- -- Copyright (c) Contributors to the Open 3D Engine Project. -- For complete copyright and license terms please see the LICENSE at the root of this distribution. -- -- SPDX-License-Identifier: Apache-2.0 OR MIT -- --...
local http = require "http" local os = require "os" local shortport = require "shortport" local stdnse = require "stdnse" local string = require "string" local vulns = require "vulns" local openssl = stdnse.silent_require "openssl" description = [[ Tests for the CVE-2011-3368 (Reverse Proxy Bypass) vulnerability in A...
local default_dmg = DamageType("default") skill_manager.RegisterDamageType( default_dmg )
--- Gather informations from the CLI -- @module args -- @usage args(project) local argparse = require 'argparse' local class = require 'middleclass' local utils = require 'love-release.utils' local Args = class('Args') Args.pre = true Args.args = nil function Args:initialize() self.pre = Args.pre local parse...
--this = SceneNode() function create() local towerList = {} towerList[0] = "WallTower" towerList[1] = "MinigunTower" towerList[2] = "ArrowTower" towerList[3] = "SwarmTower" towerList[4] = "ElectricTower" towerList[5] = "BladeTower" towerList[6] = "missileTower" local towerListSize = 1 local island ...
local af = Def.ActorFrame{} -- --------------------------------------------- -- setup involving optional arguments that might have been passed in via a key/value table local args = ... -- a player object, indexed by "Player"; default to GAMESTATE's MasterPlayer if none is provided local player = args.Player ...
local Assert = require("api.test.Assert") local TestUtil = require("api.test.TestUtil") function test_ICharaSkills_init__prototype_default_skills() local chara = TestUtil.stripped_chara("elona.zeome") Assert.eq(true, chara:has_skill("elona.spell_cure_of_jure")) Assert.eq(1, chara:skill_level("elona.spell_cur...
require("prototypes.itemgroup.data") require("prototypes.item.data") require("prototypes.entity.data") require("prototypes.resource.data") require("prototypes.science.data") require("prototypes.recipe.data") require("prototypes.technology.data")
local t -- standard constructor t = {"a", 1, true} assert(t[1] == "a") assert(t[2] == 1) assert(t[3] == true) local function a() return 2, 3 end -- constructor with multiple return values from a function t = {1, a()} assert(t[1] == 1) assert(t[2] == 2) assert(t[3] == 3) -- constructor with more than 50 elements ...