content
stringlengths
5
1.05M
--[==[ luawinapi - winapi wrapper for Lua Copyright (C) 2011 Klaus Oberhofer. See copyright notice in LICENSE file Simple test application for luawinapi --]==] winapi = require("luawinapi") -- debugging: define assertion callback for internal window proc function outputAssert(hwnd, msg, wParam, lParam, ex...
local mod = get_mod("Coord") mod.on_game_state_changed = function(status, state) -- Debug --mod:echo("on_game_state_changed = " .. tostring(status) .. " " .. tostring(state)) if status == "enter" and state == "StateIngame" then local game_mode_manager = Managers.state.game_mode if game_mode_manager the...
local metatables = require "eaw-abstraction-layer.core.metatables" local method = metatables.method local function faction(tab) local obj = setmetatable({ __eaw_type = "faction" }, { __tostring = function(_) return tab.name end }) obj.Enable_Advisor_Hints = method("...
local X = {} X["aegis-of-the-immortal"] = "item_aegis" X["animal-courier"] = "item_courier" X["band-of-elvenskin"] = "item_boots_of_elves" X["belt-of-strength"] = "item_belt_of_strength" X["blade-of-alacrity"] = "item_blade_of_alacrity" X["blades-of-attack"] = "item_blades_of_attack" X["blight-stone"] = "item_...
----------------------------------- -- Area: Windurst Walls -- NPC: Chomomo -- Type: Standard NPC -- !pos -1.262 -11 290.224 239 ----------------------------------- require("scripts/globals/quests") ----------------------------------- function onTrade(player, npc, trade) end function onTrigger(player, npc) loca...
local class = require "com/class" local UIWidgetLevel = class:derive("UIWidgetLevel") local DummyLevel = require("src/DummyLevel") function UIWidgetLevel:new(parent, path) self.type = "level" self.parent = parent self.level = DummyLevel(path) end function UIWidgetLevel:update(dt) if not sel...
modname = "hud_analog_clock" dofile(minetest.get_modpath(modname) .. DIR_DELIM .. "clock_hud.lua")
---------------------------------------------------------------------------------------------------- -- -- 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 -- -- -...
menup.options.addOption("noLoadingUrl", "url", 0) menup.options.addOption("noLoadingUrl", "steamid", 0) local oldGD = GameDetails function GameDetails(name, url, mapname, maxply, steamid, gamemode) local val = menup.options.getOption("noLoadingUrl", "url") if tonumber(val) == 1 then url = "http://loading.garrysmod...
local ztimer = require "lzmq.timer" local date = require "date" ------------------------------------------------------------------------------- -- Timers implementations ------------------------------------------------------------------------------- ------------------------------------------------------------------...
local Array = require('opus.array') local class = require('opus.class') local Config = require('opus.config') local Event = require('opus.event') local NFT = require('opus.nft') local Packages = require('opus.packages') local SHA = require('opus.crypto.sha2') local Tween = require('opus.ui.tween...
--- This file is generated by ava-x2l.exe, --- Don't change it manaully. --- @copyright Lilith Games, Project Da Vinci(Avatar Team) --- @see Official Website: https://www.projectdavinci.com/ --- @see Dev Framework: https://github.com/lilith-avatar/avatar-ava --- @see X2L Tool: https://github.com/lilith-avatar/avatar-av...
local F, C, L = unpack(select(2, ...)) local INFOBAR = F:GetModule('Infobar') local friendTable, bnetTable, updateRequest = {}, {} local wowString, bnetString = L['INFOBAR_WOW'], L['INFOBAR_BN'] local activeZone, inactiveZone = {r=.3, g=1, b=.3}, {r=.7, g=.7, b=.7} local AFKTex = '|T'..FRIENDS_TEXTURE_AFK..':14:14:0:...
--[[* @authors Centauri Soldier @copyright Public Domain @description <h2>Sim2D/h2> <h3>A gaming, graphics framework of UI Components for AutoPlay Media Studio.</h3> @email @features <h3>Allows game creation in a, largely, WYSIWYG environment.</h3> <p>Uses the Draw Action Plugin (by Immagine Programming), CoG and ...
-- This file is automatically generated, do not edit! -- Path of Building -- -- Other active skills -- Skill data (c) Grinding Gear Games -- local skills, mod, flag, skill = ... skills["Melee"] = { name = "默认攻击", hidden = true, color = 4, description = "对你的敌人无情痛击.", skillTypes = { [SkillType.Attack] = true, [Skill...
slot0 = class("ChargeCommodity", import(".BaseCommodity")) slot0.bindConfigTable = function (slot0) return pg.pay_data_display end slot0.isChargeType = function (slot0) return true end slot0.canPurchase = function (slot0) return slot0:getLimitCount() <= 0 or slot0.buyCount < slot1 end slot0.firstPayDouble = func...
local Masker, parent = torch.class('nn.Masker', 'nn.Module') function Masker:__init() parent.__init(self) self.gradInput = {} end function Masker:updateOutput(input) local x, mask = unpack(input) self.index_cpu = torch.range(1, mask:size()[1]) self.index = self.index or x.new() self.index:res...
local StableArray = require("plugin.StableArray").New local sa = StableArray() local i1 = sa:Insert("bob") local i2 = sa:Insert(-73) -- Integers (not ideal, but possible) local i3 = sa:Insert{} -- Table local i4 = sa:Insert(newproxy()) -- Userdata local i5 = sa:Insert(coroutine.create(function() end)) -- Coroutine lo...
local assertx = require 'Q/UTILS/lua/assertx' local compile = require 'Q/UTILS/lua/compile' local link = require 'Q/UTILS/lua/link' local compile_and_link = require 'Q/UTILS/lua/compile_and_link' local is_so_file = require 'Q/UTILS/lua/is_so_file' local ffi = require 'ffi' local gen_code = require 'Q/UTILS...
Ext.Require("Shared/_InitShared.lua")
local gameplaySettings = { } function getGameplaySetting(name) if not name then return end return gameplaySettings[name] end
return { "prototypes.lithia-water-autoplace", }
return PlaceObj("ModDef", { "title", "Amoral Applicants", "id", "ChoGGi_AmoralApplicants", "steam_id", "1765618288", "pops_any_uuid", "e2ea440f-f332-424f-882f-e85aadd3d97b", "version", 3, "version_major", 0, "version_minor", 3, "image", "Preview.jpg", "author", "ChoGGi", "lua_revision", 1007000, -- Picard "c...
local skynet = require 'skynet' local socket = require 'skynet.socket' local socket_driver = require 'skynet.socketdriver' local lsocket = require 'lsocket' local lfs = require 'lfs' local class = require 'middleclass' local ublob = require 'ubox.blob' local ublob_buf = require 'ubox.blob_buf' local ublob_msg = require...
require"iuplua" l = iup.label{title="There have been no clicks yet."} b = iup.button{title="Click me!"} clicks = 0 function b:button_cb() clicks = clicks + 1 l.title = "There have been " .. clicks/2 .. " clicks so far." --yes, this is correct. end dlg = iup.dialog{iup.vbox{l, b}, title="Simple Windowed Application"...
return { fadeOut = 0.5, mode = 1, id = "GUOQING1", once = true, fadeType = 1, occlusion = 2, scripts = { { sequence = { { "在无垠的轮回中,连时间也失去了意义", 2 }, { "由必然向概率的趋近", 3 }, { "由无形向有形的传承", 6 }, { " ", 7 }, { "如果没有那一次的选择", 8 ...
local Draw = require("api.Draw") local IUiElement = require("api.gui.IUiElement") local TopicWindow = require("api.gui.TopicWindow") local Log = require("api.Log") local ChangeAppearancePreview = class.class("ChangeAppearancePreview", IUiElement) function ChangeAppearancePreview:init(chara) self.width = 88 self...
--[[ LuiExtended License: The MIT License (MIT) --]] LUIE.CombatTextEventListener = ZO_Object:Subclass() local CTL = LUIE.CombatTextEventListener local callbackManager = CALLBACK_MANAGER local eventManager = EVENT_MANAGER local eventPostfix = 1 -- Used to create unique name when registering multip...
-- -- _vstudio.lua -- Define the Visual Studio 200x actions. -- Copyright (c) 2008-2012 Jason Perkins and the Premake project -- premake.vstudio = { } local vstudio = premake.vstudio local project = premake5.project local clean = premake.actions.clean -- -- The Visual Studio 2005 action, with support ...
LIBRARY.Name = "Notifications" LIBRARY.Author = "IZED" local rpc = import("libs/rpc") local createNotification = function(ply, options) options.color = options.color or Color(255,255,255) options.text = options.text or "Sample Text" options.delay = options.delay or 0 options.duration = options.duration or 4 opti...
local ajp = require "ajp" local http = require "http" local shortport = require "shortport" local stdnse = require "stdnse" local table = require "table" description = [[ Retrieves the authentication scheme and realm of an AJP service (Apache JServ Protocol) that requires authentication. ]] --- -- @usage -- nmap -p 8...
--- -- tests/actions/vstudio/vc2010/test_floatingpoint.lua -- Validate handling of vectorextensions() in VS 2010 C/C++ projects. -- -- Created 26 Mar 2015 by Jason Perkins -- Copyright (c) 2015 Jason Perkins and the Premake project --- local p = premake local suite = test.declare("vs2010_vc_floatingpoint") local m ...
require "lfs" local function GetProjectPath() local path = lfs.currentdir() path = string.gsub(path, "\\", "/") return path end local projectPath = GetProjectPath() ---需要导出的文件或路径 local filesPath = { "/Examples" } local savePath = projectPath.."/lua.json" local pattern = "function%s+(%w+)([%.:])(%w...
local M = {} local fmt = string.format local term_wrapper = function(command, file) vim.cmd 'new | resize 10' vim.cmd('term ' .. fmt(command, file)) vim.cmd 'setl nobuflisted nornu nonu nocursorline scrolloff=0 signcolumn=no laststatus=0' vim.cmd 'silent! file CompileAndRun' vim.cmd 'startinsert' vim.cmd '...
--[[ HTTPClient wrapper @author ikubicki ]] class 'HTTPClient' function HTTPClient:new(options) if not options then options = {} end self.options = options return self end function HTTPClient:get(url, success, error) local client = net.HTTPClient({timeout=10000}) client:request(self:u...
--[[ Description: Contains bytecode/loadstring-related functionality Author: Sceleratis Date: 12/11/2021 --]] local Root, Package, Utilities, Service local RemoteCommands = { RunBytecode = function(str, ...) Utilities.Events.RunningBytecode:Fire(str, ...) return Root.Bytecode:LoadBytecode(str, Utilities:Mer...
object_mobile_skeleton_bm_insect_mantis = object_mobile_skeleton_shared_bm_insect_mantis:new { } ObjectTemplates:addTemplate(object_mobile_skeleton_bm_insect_mantis, "object/mobile/skeleton/bm_insect_mantis.iff")
---@class TestObj1_ ---@field a int32 @a ---@field bs float[] @b ---@field v bool @v
include("shop_npc.lua") include("fractions_ui.lua") include("scoreboard.lua") include("lose_menu.lua") local spacesuit_glass = Material( "se_materials/spacesuit.png", "noclamp smooth" ) surface.CreateFont("se_ScoreboardFont", { size = 22, antialias = false, font = "Roboto Bold" } ); surface.CreateFont("se_NPCFont...
--[[ ################################################################################ # # Copyright (c) 2014-2019 Ultraschall (http://ultraschall.fm) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), t...
function overwrite_meta_function(tbl, func_name, new_func) local old_func_name = "_" .. func_name local meta_table = getmetatable(tbl) if not meta_table[func_name] then BLT:log(string.format("[ERROR] Function with name '%s' could not be found in the meta table!", func_name)) return end meta_table[ol...
object_tangible_quest_corellia_greck_dossier = object_tangible_quest_shared_corellia_greck_dossier:new { } ObjectTemplates:addTemplate(object_tangible_quest_corellia_greck_dossier, "object/tangible/quest/corellia_greck_dossier.iff")
-- $Id: unit_terraform.lua 3524 2008-12-23 13:21:12Z google frog $ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function gadget:GetInfo() return { name = "Prevent Lab Hax", desc ...
-- Local parameters local START_PROMPT_DISTANCE = 10.0 -- distance to prompt to start race local DRAW_TEXT_DISTANCE = 100.0 -- distance to start rendering the race name text local DRAW_SCORES_DISTANCE = 25.0 -- Distance to start rendering the race scores local DRAW_SCORES_C...
data.raw['logistic-container']['angels-warehouse-storage'].logistic_slots_count = 1; data:extend( { { type = "item", name = "angels-warehouse-buffer", icon = "__AngelsAddons-WarehouseSiloFix__/graphics/icons/warehouse-buffer.png", icon_size = 32, flags = {"goes-to-quickbar"}, subgroup = "angels-ware...
#!/usr/bin/env lua -- LPNG -- 0.2 -- PNG (lua) -- lpng.lua -- MIT License -- Copyright (c) 2020 Alexander Veledzimovich veledz@gmail.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 w...
e = game.Workspace.rigletto.Torso game.Players.CharacterAutoLoads = true d = game:GetService("Players").rigletto function Touchedz(hit) if game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) then owner = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) name = owner.Name scale = 1 animate = true...
local function wallpaper(fn) local wm = eval_scope.wm if type(fn) == "string" then local func = wm.cmdtree["/wallpaper/set"] if func then func(wm, fn) end end end return function(types) return { handler = wallpaper, args = {types.NIL, types.VARTYPE}, names = {}, argc = 1, help = "Change wallpape...
local Native = require('lib.native.native') ---@class Region : Agent local Region = class('Region', assert(require('lib.oop.agent'))) ---<static> create ---@return Region function Region:create() return Region:fromUd(Native.CreateRegion()) end ---remove ---@return void function Region:remove() return Native....
local files = require 'files' local furi = require 'file-uri' local core = require 'core.diagnostics' local config = require 'config' local platform = require 'bee.platform' local catch = require 'catch' config.get 'Lua.diagnostics.neededFileStatus'['deprecated'] = 'Any' config.get 'Lua.diagnostics.nee...
--[[ https://en.wikipedia.org/wiki/Normal_distribution ]] -- The Box–Muller method local function gaussian(mean, variance) local U = math.random() local V = math.random() return math.sqrt(-2.0 * variance * math.log(U)) * math.cos(2.0 * math.pi * V) + mean end local function mean(t) local sum = 0 loca...
--[[ This module implements Typed Lua tltype. ]] --local tlutils = require "typedlua.tlutils" --local seri = require "typedlua.seri" local tltype = {} local tltRelation = require "typedlua/tltRelation" -- TODO maybe no integer for 5.2 or 5.1 tltype.integer = true -- literal types --@ (boolean|number|string) -> aut...
local Util = require("common.Util") sp = require("common.Util").scriptPath function extractQiangda() wf = io.open("qiangdaDict.txt","w") for line in io.lines("qiangda.txt") do --[[ local t = {} for k, v in string.gmatch(line, "([%z\1-\127\194-\244][\128-\191]*)%s+(%w+)") do ...
----------------------------------- -- Ability: Benediction -- Restores a large amount of HP and removes (almost) all status ailments for party members within area of effect. -- Obtained: White Mage Level 1 -- Recast Time: 1:00:00 -- Duration: Instant ----------------------------------- function onAbilityCheck(player,...
AddCSLuaFile() local A = "AMBER" local R = "RED" local B = "BLUE" local W = "WHITE" local CW = "C_WHITE" local name = "Whelen Ultra Freedom" local COMPONENT = {} COMPONENT.Model = "models/schmal/whelen_freedom/freedom_lightbar.mdl" COMPONENT.Lightbar = true COMPONENT.Skin = 0 COMPONENT.Bodygroups = {} COMPONENT.Cat...
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)...
-------------------------------------------------------------------------------- -- Module declaration -- local mod, CL = BigWigs:NewBoss("Foe Reaper 5000", 36, 91) if not mod then return end mod:RegisterEnableMob(43778) -------------------------------------------------------------------------------- -- Initializati...
local _, ns = ... local _G = _G local addon = ns.MagnetButtons function addon.ResetButtons() MagnetButtons_ButtonData = nil; MagnetButtons_GlobalButtonData[addon.GetFullPlayerName()] = nil; end function addon.VerifyGlobalButtonSettings() if (MagnetButtons_GlobalButtonData[addon.GetFullPlayerName()] ~= ni...
local Regen = select(2, ...) local addon = LibStub("AceAddon-3.0"):NewAddon("FSRBar", "AceConsole-3.0", "AceTimer-3.0", "AceHook-3.0", "AceEvent-3.0") local candybar = LibStub("LibCandyBar-3.0") -- local L = Regen.L Regen.FSRBar = addon -- local regenBarName = "regenFiveSecBar" -- local regenBarIcon = "Interface\\A...
function getModule(module) assert(type(module) == "string", "string only") local path = "https://raw.githubusercontent.com/saucekid/sauceVR/main/modules/" local module = loadstring(game:HttpGetAsync(path.. module.. ".lua"))() return module end local Arc = getModule("Cameras/Visual/Arc") local Beacon ...
local addon, tbl = ... tbl.Search_ID = function(query) local itemsFound = 0 if tbl.Items[query] then if tbl.Items[query]["lootedBy"]["playerClass"] ~= nil and (tbl.Items[query]["itemLink"] ~= "" or tbl.Items[query]["itemLink"] ~= nil) then print(query .. ": " .. tbl.Items[query].itemLink .. ", " .. tb...
require('std') require('irc') debug = false ready = false play = false -- essid="newlucht-students"; psw="kabk@air" essid="AJJKT3"; psw="1012dl231"; dofile('net.lua') -- tmr 2 tmr.alarm(3, 20000, 1, function () if ready == true then if dead == true then connectPulsecode(4, 'ircoverload.lua') ...
-- v2.2.3
dragon_knight_elder_dragon_form_oaa = class(AbilityBaseClass) LinkLuaModifier( "modifier_dragon_knight_elder_dragon_form_oaa", "abilities/oaa_elder_dragon_form.lua", LUA_MODIFIER_MOTION_NONE ) LinkLuaModifier( "modifier_dragon_knight_max_level_oaa", "abilities/oaa_elder_dragon_form.lua", LUA_MODIFIER_MOTION_NONE ) Lin...
-- debugger.lua local debugger = {} debugger._Detouring = setmetatable({}, { __mode = "k" }) function debugger.detourMethod(o, f, detour) local detourInfo = {} detourInfo.Type = "method" detourInfo.Source = o detourInfo.Closure = type(f) == "string" and o[f] or f detourInfo.Hook = detour func...
local DEFAULT_TOUCH_PADDING = 20 ---@class UICommon local UICommon = CLASS: UICommon () :MODEL {} function UICommon.setDefaultTouchPadding ( pad ) DEFAULT_TOUCH_PADDING = pad or 20 end function UICommon.getDefaultTouchPadding () return DEFAULT_TOUCH_PADDING or 20 end return UICommon
-- Decorators local decorators = require "src.decorators" local use_db = decorators.use_db return use_db(function(db) local task_query = [[ SELECT p.name as project, t.id, t.start_time, t.end_time, t.description FROM task as t LEFT JOIN project p ON p.id = t.project_id WHERE t.end_t...
local API_SE = require(script:GetCustomProperty("APIStatusEffects")) local API_D = require(script:GetCustomProperty("APIDamage")) local DAMAGE = 23.0 local RADIUS = 400.0 function EffectTick(sourceCharacter, character, index) assert(not character:IsA("Player")) for _, player in pairs(Game.FindPlayersInSph...
--- The duplicator library allows you to specify what should be saved when someone attempts to duplicate your custom entity with the duplicator tool. It can also be used by 3rd party duplicator tools to make use of the built in system. _G.duplicator = {} --- Allow this entity to be duplicated --- @param classname s...
require 'spec.assert_contains' require 'spec.assert_difference' local spy = require 'luassert.spy' local env = require 'spec.env.env' local sandbox = require 'spec.sandbox' local http_utils = require 'spec.env.http_utils' local spec = {} ------------------------------ spec.request = function(req)...
return require('packer').startup(function() -- Packer can manage itself use 'wbthomason/packer.nvim' -- auto-pairs use 'jiangmiao/auto-pairs' -- Load on an autocommand event use {'andymass/vim-matchup', event = 'VimEnter'} -- nvim-tree use { 'kyazdani42/nvim-tree.lua', requires = { 'kyazda...
return function (a, b) assert(type(a) ~= "table" and type(a) ~= "table", "scmp only excepts strings or numbers") a = tostring(a) b = tostring(b) local len = #a if (len ~= #b) then return false end local result = 0 -- for (local i = 0 i < len ++i) { -- result |= a.charCodeAt(i) ^ b.charCodeAt(i) ...
--- -- @module GameOverScreen -- -- ------------------------------------------------ -- Required Modules -- ------------------------------------------------ local ScreenManager = require( 'lib.screenmanager.ScreenManager' ) local Screen = require( 'src.ui.screens.Screen' ) local Translator = require( 'src.util.Transl...
local World = require "world" local Lemming = require "lemming" local lemmings = {} local world = nil local world_bitmap = nil local count = 0 local max_tick_rate = 1 / 45 local tick_rate = 0 local paused = false local step = false local user_garbage = 0 function love.load() love.graphics.setBackgroundColor(0...
BloodRazerTransportScreenPlay = ScreenPlay:new { numberOfActs = 1, screenplayName = "BloodRazerTransportScreenPlay", lootContainers = { 568806, --toolchest 568951, --magseal 568948 --magseal }, lootLevel = 29, lootGroups = { { groups = { {group = "color_crystals", chance = 2500000}, {gro...
load("gcc") load("b") --#%# load("a")
-- BaseWars Menu for things and shit -- by Ghosty local me = LocalPlayer() local grayTop = Color(128, 128, 128, 250) local grayBottom = Color(96, 96, 96, 250) local nodePanelBg = Color(192, 192, 192, 250) local shadowColor = Color(0, 0, 0, 200) local bigFont = "BW.Menu.BigFont" local medFont = "BW.Menu.MedFont"...
require 'nn' local opts = require '__0_dcgan.script.opts' local gen = require '__0_dcgan.models.gen' local dis = require '__0_dcgan.models.dis' -- basic settings. torch.setdefaulttensortype('torch.FloatTensor') torch.setnumthreads(2) -- get opt ans set seed. local opt = opts.parse(arg) print(opt) if opt.seed == 0 t...
--------------------------------------------------------------------------------- -- -- Prat - A framework for World of Warcraft chat mods -- -- Copyright (C) 2006-2018 Prat Development Team -- -- This program is free software; you can redistribute it and/or -- modify it under the terms of the GNU General Public Licen...
-- LibGPU - A library help operating GPU. -- Author: Github/Kiritow local component=require("component") -- y is line, x is col local function GPUClear(t) local w,h=t.gpu.getResolution() t.gpu.fill(1,1,w,h," ") end local function GPUFill(t,x,y,w,h,char_str) if(string.len(char_str)>1) then char_...
-------------------------------------------------------------------------------- -- 007-assertions.lua: cookie assertion helpers work well -- This file is a part of lua-aplicado library -- Copyright (c) lua-nucleo authors (see file `COPYRIGHT` for the license) -----------------------------------------------------------...
-- The following is unnecessary, but it serves as a good reference for -- how to implement a locale, as well as being a list of all the -- localized strings used. local LS = ChatSuey.Locales["enUS"].Strings; LS["Copy the URL into your clipboard (Ctrl-C):"] = "Copy the URL into your clipboard (Ctrl-C):";
-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf/protobuf" module('GetDragonTopInfoArg_pb') GETDRAGONTOPINFOARG = protobuf.Descriptor(); GETDRAGONTOPINFOARG.name = "GetDragonTopInfoArg" GETDRAGONTOPINFOARG.full_name = ".KKSG.GetDragonTopInfoArg" GETDRAGONTOPINFOARG.nested_types = {} GETD...
--[[ desc: States, a component of state set. author: Musoucrow since: 2018-3-20 alter: 2019-7-29 ]]-- local _RESMGR = require("actor.resmgr") local _Caller = require("core.caller") ---@class Actor.Component.States ---@field public map table<string, Actor.State> ---@field public current Actor.State ---@field publ...
local IUiElement = require("api.gui.IUiElement") local TreemapCell = require("mod.treemap.api.gui.TreemapCell") local Color = require("mod.extlibs.api.Color") local Treemap = class.class("Treemap", IUiElement) function Treemap:init(t, depth) self.sizes = Treemap.calc_sizes(t, depth) self.depth = depth end loca...
object_building_general_sorosub = object_building_general_shared_sorosub:new { } ObjectTemplates:addTemplate(object_building_general_sorosub, "object/building/general/sorosub.iff")
require "specs.busted" require "specs.Cocos2d-x" require "lang.Signal" local SocialNetwork = require("social.Network") describe("social.Network", function() local subject local config before_each(function() config = {appkey="123", secret="secret"} subject = SocialNetwork("Twitter", config...
AddCSLuaFile() SWEP.Base = "weapon_maw_base" SWEP.PrintName = "P90" SWEP.Slot = 3 SWEP.HoldType = "ar2" SWEP.ViewModel = "models/weapons/v_smg_p90.mdl" SWEP.WorldModel = "models/weapons/w_smg_p90.mdl" SWEP.Primary.Sound = "weapons/p90/p90-1.wav" SWEP.Primary.Recoil = 0.6 SWEP.Primary.Dama...
require "nanovg" local vg = require "vg" local ui = require "ui" local data = {images={}} eventFunction("init",function() print("init..") fontIcons = vg.createFont("icons","fonts/entypo.ttf") fontNormal = vg.createFont("sans","fonts/Roboto-Regular.ttf") fontBold = vg.createFont("sans-bold","fonts/Roboto-Bold.ttf"...
object_static_structure_general_waypoint_personal_violet = object_static_structure_general_shared_waypoint_personal_violet:new { } ObjectTemplates:addTemplate(object_static_structure_general_waypoint_personal_violet, "object/static/structure/general/waypoint_personal_violet.iff")
MOAISim.openWindow("game", 1024, 768) viewport = MOAIViewport.new() viewport:setSize (1024, 768) viewport:setScale (1024, -768) layer = MOAILayer2D.new() layer:setViewport(viewport) MOAISim.pushRenderPass(layer) --Different textures tex = "dragon_idle.png" idleGfxQuad = MOAIGfxQuad2D.new() idleGfxQuad:setTexture(tex...
--Remove with isNewGamepadMenuEnabled local HttpRbxApiService = game:GetService("HttpRbxApiService") local InGameMenu = script.Parent.Parent local Constants = require(InGameMenu.Resources.Constants) local SetNames = require(InGameMenu.Actions.SetNames) local SetDescriptions = require(InGameMenu.Actions.SetDescripti...
local basexx = require("basexx") local M = {} setmetatable(M, { __call = function (cls, ...) return cls.tohex(...) end, }) function M.tohex(b) return string.lower(basexx.to_hex(b)) end return M
local Sprite = require 'src/sprite/sprite' local defaults = { pos = { x = 0, y = -8 }, targetPos = { x = 0, y = -8 }, speed = 10, money = 1000, } Player = Sprite:new() function Player:new(obj) obj = obj or defaults setmetatable(obj, self) self.__ind...
function is_tank_by_name(name) for i,tank in pairs(azs.nameList.tank) do if tank == name then return true end end return nil end -- 1 = Inspect, 9.9 yards -- 2 = Trade, 11.11 yards -- 3 = Duel, 9.9 yards -- 4 = Follow, 28 yards function is_in_trade_range() return CheckInteractDistance("target",2) end -- 1 = Ins...
function startWebSocketServer() -- WebSocketServer指定的监听目录 local server_dir = cc.FileUtils:getInstance():getWritablePath() -- WebSocketServer指定的IP,不填默认本机 local server_ip = '' -- WebSocketServer指定的端口,默认16999 local server_port = '8000' local server = cc.WsServer:create(server_dir, server_ip,...
--[=[ ------ ffi-enum.lua ------ [=[-- Syntactic sugar for enum-like FFI structs. Released under the MIT License (full text at the end of the file). enum = require"ffi-enum" e = enum[[ FOO, BAR, /* comments are */ BAZ = 7, // parsed properly QUX, QUUX = 0xc ]] assert...
require 'busted.runner'() local luakeys describe('LPeg Parser', function() setup(function() _G._TEST = true luakeys = require('luakeys') end) teardown(function() _G._TEST = nil end) local assert_value = function(actual, expected) local result = luakeys.parse_kv_string('key=' .. actual) ...
local rpc = require 'rpc' local workspace = require 'workspace' local function initAfterConfig(lsp) -- 必须动态注册的事件: rpc:request('client/registerCapability', { registrations = { -- 监视文件变化 { id = '0', method = 'workspace/didChangeWatchedFiles', ...
-- Copyright (c) 2021 Kirazy -- Part of Artisanal Reskins: Library -- -- See LICENSE.md in the project directory for license information. -- Make our function host if not reskins then reskins = {} end if not reskins.lib then reskins.lib = {} end -- Library directory reskins.lib.directory = "__reskins-library__" -- S...