content stringlengths 5 1.05M |
|---|
-- Copyright 2015-2019, Björn Ståhl
-- License: 3-Clause BSD
-- Reference: http://durden.arcan-fe.com
--
-- Description: Global / Persistent configuration management.
-- Deals with key lookup, update hooks and so on. For actual default
-- configuration values, see config.lua
--
local log, fmt = suppl_add_logfn("config... |
-- Created by Elfansoer
--[[
Ability checklist (erase if done/checked):
- Scepter Upgrade
- Break behavior
- Linken/Reflect behavior
- Spell Immune/Invulnerable/Invisible behavior
- Illusion behavior
- Stolen behavior
]]
--------------------------------------------------------------------------------
modifier_slark_pou... |
vim.opt.fileencodings = { "utf-8", "iso-2022-jp", "euc-jp", "sjis" }
vim.opt.fileformats = { "unix", "dos", "mac" }
vim.opt.wildmode = { "longest", "full" }
vim.opt.nrformats = { "bin", "hex" }
vim.opt.autochdir = true
vim.opt.breakindent = true
vim.opt.confirm = true
vim.opt.expandtab = true
vim.opt.hidden = true
vim.... |
str = "Hello world"
length = #str
|
local export = {}
local conv = {
--consonants without nukta
["ਸ"] = "s",
["ਹ"] = "h",
["ਕ"] = "k", ["ਖ"] = "kh", ["ਗ"] = "g", ["ਘ"] = "gh", ["ਙ"] = "ṅ",
["ਚ"] = "c", ["ਛ"] = "ch", ["ਜ"] = "j", ["ਝ"] = "jh", ["ਞ"] = "ñ",
["ਟ"] = "ṭ", ["ਠ"] = "ṭh", ["ਡ"] = "ḍ", ["ਢ"] = "ḍh", ["ਣ"] = "ṇ",
["ਤ"] = "t", ["ਥ"] = "th"... |
l = sexpr(1, 2, 3)
print(l)
assert(is_sexpr(l))
assert(is_sexpr(sexpr(10)))
assert(not is_sexpr(10))
assert(not is_sexpr({}))
|
--[[
Created by DidVaitel (http://steamcommunity.com/profiles/76561198108670811)
]]
gDuel.vgui = gDuel.vgui or {}
surface.CreateFont( 'gDuelFont100', {
font = 'Roboto',
size = 100,
weight = 500
} )
surface.CreateFont( 'gDuelFont20', {
font = 'Roboto',
size = 20,
weight = 500
} )
surface.CreateFont( 'gDuelFon... |
#!/usr/bin/env lua
require 'Test.Assertion'
plan(12)
local doc = [[
{
"title": "api",
"version": "v1",
"description": "api for unit test",
"basePath": "/restapi/",
"documentationLink": "http://developers.google.com/discovery",
"resources": {
"test": {
"methods": {
"get": {
"id... |
Weapon.PrettyName = "Remington 870"
Weapon.WeaponID = "m9k_remington870"
Weapon.DamageMultiplier = 1.0
Weapon.WeaponType = WEAPON_PRIMARY |
local style = data.raw['gui-style'].default
style.filterfill_requests = {
type = 'table_style',
parent = 'picker_table'
}
style.filterfill_filters = {
type = 'table_style',
parent = 'picker_table'
}
data:extend {
{
type = 'sprite',
name = 'picker-request-bp',
filename = '__P... |
-- flexdash_ui_button.lua
local white = {1, 1, 1, 1}
local MOUSE_OFF = 1
local MOUSE_HOVER = 2
local MOUSE_DOWN = 3
local mouse_status = MOUSE_OFF
flexdash_lib.num_click_spots = flexdash_lib.num_click_spots + 1
local is_me = flexdash_lib.num_click_spots
defineProperty("button_name", "fd_big_button_down")
defineProp... |
local BitStruct = {
_width = 1, -- Prototype default width for each field we create
_base = 0, -- Prototype default bit number for each field we create
}
function BitStruct:new(o)
o = o or {}
local newFields = {
_base = o._base or 0,
_width = o._width or 1,
_fi... |
--
-- Xbox One XDK tests
-- Copyright Blizzard Entertainment, Inc
--
local p = premake
local suite = test.declare("durango_globals")
local vc2010 = p.vstudio.vc2010
--
-- Setup
--
local wks, prj
function suite.setup()
p.action.set("vs2017")
wks, prj = test.createWorkspace()
end
local function prepare()... |
-----------------------------------------------------------------------------------------
-- Decorators
-- Filter
-- Filters the access of it's child node either a specific number of times, or every
-- specific amount of time. By default the node is 'Treated as Inactive' to it's parent
-- when child is Filtered. Un... |
--------------------------------------------------------------------------------
-- State............ : Debug
-- Author........... :
-- Description...... :
--------------------------------------------------------------------------------
-----------------------------------------------------------------------------... |
-- This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild
--
-- This file is compatible with Lua 5.3
local class = require("class")
require("kaitaistruct")
local str_decode = require("string_decode")
OpaqueExternalType02Child = class.class(KaitaiStruct)
function OpaqueExtern... |
object_tangible_collection_reward_buddy_painting_01 = object_tangible_collection_reward_shared_buddy_painting_01:new {
}
ObjectTemplates:addTemplate(object_tangible_collection_reward_buddy_painting_01, "object/tangible/collection/reward/buddy_painting_01.iff")
|
local socket = require("socket.core")
local cjson = require("cjson")
local other_port = 8080
local ip = '127.0.0.1'
print('Starting socket')
udp = socket.udp()
udp:setsockname("*", 8088)
local cmd = {command='init', args={num_inputs=2, num_outputs=2, num_genomes=100, allow_recurrent=true}}
udp:sendto(cjson.encode(cm... |
do class "BasicClassA"
{
m_bBool = false,
m_strString = "Hello World",
m_nNumber = 1,
}
getter "Bool->m_bBool"
getter "String->m_strString"
getter "Number->m_nNumber"
function Initialize( self )
end
function __GC( self )
self.m_bBool = false
end
end |
--[[
Author: Noya
Date: 16.01.2015.
After the passive is upgraded, it checks all player controled units for the modifiers to update the buff.
Note: To actually apply a synergy buff on every summoned unit as soon they are spawned, you'll need to run a thinker that globally checks your controlled units and applies m... |
MDIR = "patch/meta/"
print("Loading execfg.lua...")
dofile(MDIR .. "execfg.lua") -- sets ORIGINAL_EXE and BUILD_PATH
print("Opening database...")
img_open(":memory:")
print("Populating database tables...")
sql_file(MDIR .. "tables.sql")
print("Loading original EXE...")
img_loadexe(ORIGINAL_EXE, true, true, true, false)... |
local Class = require('./utils/class')
local logger = require('./utils/logger')
local queue_to_vkscript = require('./utils/queue_to_vkscript')
local set_interval = require('timer').setInterval
local Queue = Class()
--- Create Queue object
-- @param vk (table) - vk object
-- @return Queue object
function Queu... |
--[[
Name: toyota.lua
For: TalosLife
By: TalosLife
]]--
local Car = {}
Car.Make = "Toyota"
Car.Name = "MR2 GT"
Car.UID = "toyota_mr2gt"
Car.Desc = "A drivable Toyota MR2 GT by TheDanishMaster"
Car.Model = "models/tdmcars/toy_mr2gt.mdl"
Car.Script = "scripts/vehicles/TDMCars/mr2gt.txt"
Car.Price = 3000
Car.FuellTank... |
slot0 = class("GuildBossMissionFleet", import("...BaseVO"))
slot0.Ctor = function (slot0, slot1)
slot0.id = slot1.fleet_id
slot0.userShips = {}
slot0.commanders = {}
slot0.invaildShips = {}
slot0.invaildCommanders = {}
if slot1.ships then
slot0:Flush(slot1)
end
end
slot0.Flush = function (slot0, slot1)
slo... |
require'lualine'.setup()
|
onWin = function(W)
W:setMap("res/map/meadows/meadows.tmx", 1060, 1025)
W:addConditionProgress("boss", "BossZeff")
W:unlockAchievement("ACH_KILL_ZEFF")
if (W:isQuestState("zeffs_curse", "started")) then
W:changeQuestState("zeffs_curse", "failed")
end
if (W:isQuestState("hungry_wolf", "started")) then
W:ch... |
object_tangible_loot_creature_loot_collections_fried_icecream_components_naboo_phraig = object_tangible_loot_creature_loot_collections_fried_icecream_components_naboo_shared_phraig:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_fried_icecream_components_naboo_phraig, "object/tangib... |
local ffi = require 'ffi'
local Scalar = require 'libsclr'
local qconsts = require "Q/UTILS/lua/qconsts"
local basetypes = { "I1", "I2", "I4", "I8", "F4", "F8" }
local is_basetype = {}
for _, basetype in ipairs(basetypes) do
is_basetype[basetype] = true
end
local inttypes = { "I1", "I2", "I4", "I8" }
local... |
slot0 = class("ShipDialog")
slot1 = 0.3
slot2 = 2
slot0.Ctor = function (slot0, slot1, slot2)
slot0.dialog = slot1
slot0.label = slot0.dialog.gameObject:GetComponentInChildren(typeof(Text))
slot0.content = slot2
slot0.started = false
end
slot0.loop = function (slot0, slot1, slot2, slot3)
slot0.timer = Timer.New(... |
---------------------------------------------------------------------------------------------------
---replay_menu_page.lua
---author: Karl
---date: 2021.5.11
---desc: implements replay player and replay saver
---------------------------------------------------------------------------------------------------
local Men... |
function foo(x)
local bar = function(a, b, c)
return a + b + c
end
return bar(
x,
1,
2)
end
|
local es = class(LevelLoadingScreenGuiScript)
LevelLoadingScreenGuiScript = es
function es:init(gui, res, p, layer)
self._gui = gui
if arg.load_level_data.level_data.editor_load then
self._is_editor = true
else
es.super.init(self, gui, res, p, layer)
end
end
function es:update(...)
if self._is_editor then
s... |
for i,v in ipairs({
{841,2338.1001,-705.90002,130.89999,1.99811,357.49847,0.08728},
{841,2339.8999,-706.09998,130.89999,4.98779,355.98477,0.34961},
{843,2338.69995,-707.70001,131.5,0,356.75,0},
{839,2334.8999,-706.20001,132.10001,0,0,0},
{833,2338.30005,-704.5,131.3,0,0,46},
... |
-- Lexer tokens
local tokens = {
"and", "break", "do", "else", "elseif", "end", "false";
"for", "function", "goto", "if", "in", "local", "nil", "not", "or";
"repeat", "return", "then", "true", "until", "while";
"concat", "dots", "eq", "ge", "le", "ne";
"label", "number", "name", "string";
"eof";
"plus", "minus",... |
--------------- 选房及私人房指令开始 -------------------------
CREATE_PRIVATE_ROOM_REQUEST = 0x114; --用户创建私人房,回复0x1007或者0x1005
ENTER_PRIVATE_ROOM_REQUEST = 0x115; --用户进入私人房,回复0x1007或者0x1005
ROOM_BROADCAST_ROOM_INFO = 0x212; --server向客户端发送房间信息
SEARCH_PRIVATE_ROOM_REQUEST = 0x10e; --用户搜索私人房 --回复0x208
PRIVATE_ROOM_LI... |
PlazaMainRightCcsView = class("PlazaMainRightCcsView")
PlazaMainRightCcsView.onCreationComplete = function (slot0)
slot1 = {
[5] = {
cc.p(1282, 602),
cc.p(1282, 500),
cc.p(1282, 396),
cc.p(1282, 295),
cc.p(1282, 193)
},
[4] = {
cc.p(1282, 585),
cc.p(1282, 457),
cc.p(1282, 334),
cc.p(1... |
-------
-- @module bad
local bad = {}
--------
-- inference fails! Have to explicitly
-- declare the function and its arguments
bad['entry'] = function(one)
end
return bad
|
require('stdlib/string')
local Color = require('util/Colors')
local tools = {}
tools.MAX_INT32 = 2147483647
function tools.sortByValue(t)
local keys = {}
for key, _ in pairs(t) do table.insert(keys, key) end
table.sort(keys, function(keyLhs, keyRhs) return t[keyLhs] < t[keyRhs] end)
local r = {}
... |
local UIManager =
{
Name = "UI",
Type = "System",
Namespace = "C_UI",
Functions =
{
{
Name = "Reload",
Type = "Function",
},
},
Events =
{
{
Name = "UiScaleChanged",
Type = "Event",
LiteralName = "UI_SCALE_CHANGED",
},
},
Tables =
{
},
};
APIDocumentation:AddDocumentationTable(UIM... |
require('core.LGML')({
entry = 'src.Game',
debug = true
}) |
--[[
-- Created by Tyler Berry, Aug 14 2017
-- Copyright (c) Firaxis Games
--]]
-- ===========================================================================
-- Base File
-- ===========================================================================
include("WorldTracker");
include("AllianceResearchSupport");
-- ====... |
resource_manifest_version "44febabe-d386-4d18-afbe-5e627f4af937"
this_is_a_map 'yes'
|
--[[
module:Color
author:DylanYang
time:2021-02-18 16:26:05
]]
local _M = Class("Color")
_M.public.r = nil
_M.public.g = nil
_M.public.b = nil
function _M:ctor(r, g, b)
self.r = r or 0
self.g = g or 0
self.b = b or 0
end
function static:ToString()
return string.format("Color(r: %s, g: %s,... |
-- Copyright (c) 2010-2012 by Robert G. Jakabosky <bobby@sharedrealm.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
--... |
---------------------------------------------------------------------------------------------------
-- RC common module
---------------------------------------------------------------------------------------------------
--[[ General configuration parameters ]]
config.mobileHost = "127.0.0.1"
config.defaultProtocolVersi... |
local register_globalstep = minetest.register_globalstep
local get_connected_players = minetest.get_connected_players
local close_formspec = minetest.close_formspec
--[[
this is a combination of https://forum.minetest.net/viewtopic.php?t=24572 and rubenwardy's recommendation
this is an extreme hack, which disables th... |
local function intervalOrder(x,y)
if x[1] == y[1] then return x[2] < y[2] end
return x[1] < y[1]
end
local function tryMerge(x,y)
if x[2] >= y[1] then
return {x[1], math.max(x[2], y[2])}
else
return nil
end
end
local function intervalMerge(intervals)
table.sort(intervals, intervalOrder)
local i=... |
--[[----------------------------------------------------------------------------
MIT License
Copyright (c) 2018 David F. Burns
This file is part of LrSlide.
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 t... |
-- Blitwizard style checker
-- modified by Roberto Perpuly
-- *----------------------*
-- Some style check options:
c_indent_spaces = 4
c_bracket_on_separate_line = false
c_allow_for_loops = false
lua_indent_spaces = 4
lua_use_semicolon = false
-- End of options.
luakeywords = { "function", "do", "end", "for", "wh... |
--Copyright (C) 2009 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
... |
mrequire "game/costumes/costumes" |
local M = {}
M.config = function()
local status_ok, colorizer = pcall(require, "colorizer")
if not status_ok then
return
end
-- https://github.com/norcalli/nvim-colorizer.lua#customization
local files = { "*" }
local options = {
RGB = true,
RRGGBB = true,
RRGGBBAA = true,
rgb_fn = true,
hsl_fn = tr... |
require("libosgLua")
function showInfo(instance)
local c = osgLua.getTypeInfo(instance)
if c then
print("name = ",c.name)
for i,v in ipairs(c.constructors) do
print(string.format("\tconstructor(%2d) %s",i,v))
end
for i,v in ipairs(c.methods) do
print(string.format("\tmethod(%2d) %s",i,v))
end
... |
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include('shared.lua')
function ENT:Initialize()
self.BaseClass.Initialize(self)
self:PhysicsInit(SOLID_NONE)
self:SetMoveType(MOVETYPE_NONE)
self:SetSolid(SOLID_NONE)
self.sbenvironment.temperature2 = 0
self.sbenvironment.temperature3 = 0
... |
local mod = get_mod("rwaon_talents")
-- Hagbane Bow
------------------------------------------------------------------------------
for _, weapon in ipairs{
"shortbow_hagbane_template_1",
} do
local weapon_template = Weapons[weapon]
local action_one = weapon_template.actions.action_one
local action_two... |
Minigolf.HideDefaultHUDElements = {
CHudHealth = true,
CHudBattery = true,
CHudAmmo = true,
CHudDamageIndicator = true,
CHudWeaponSelection = true,
CHudCrosshair = true
};
hook.Add("HUDShouldDraw", "Minigolf.HideDefaultHUD", function(name)
if(Minigolf.HideDefaultHUDElements[name]) then
return false
end
end);... |
local M = {}
local random = math.random
-- Tile bitmask references.
-- NB! Tiles with more than one variant are listed in tables.
local frame = {
[0] = 1,
[1] = 1,
[2] = 35,
[3] = 35,
[4] = 1,
[5] = 1,
[6] = 35,
[7] = 35,
[8] = 47,
[9] = 47,
[10] = 33,
[11] = 49,
[1... |
--------------------------------
-- @module AssetsManagerEx
-- @extend Ref
-- @parent_module cc
---@class cc.AssetsManagerEx:cc.Ref
local AssetsManagerEx = {}
cc.AssetsManagerEx = AssetsManagerEx
--------------------------------
--- @brief Gets the current update state.
---@return number
function AssetsManagerEx:ge... |
local fn = vim.fn
local execute = vim.api.nvim_command
local function packer_init()
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
execute("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)
end
v... |
local PersonInfo = class('PersonInfo', TextPanel)
return PersonInfo
|
--[[
This script has only been used by me to make JCR6
able to package all different kind of Bubble engines
into a JCR6 file that the Bubble_Builder can use to
tie the correct engine to the Bubble projects
Please note that some variables may need to be changed
if you intend to use this your... |
LIBRARY.Name = "Notifications"
LIBRARY.Author = "IZED"
local rpc = import("libs/rpc")
local utils = import("libs/utils")
local event = import("libs/event")
local cfg = import("config/notifications")
local counter = 0
local delayedCounter = 0
local list = {}
local yPos = 0
local function ThrowHint( options )
if not ... |
-- only alter this file if it's named "custom.recipes.lua"
-- alter the recipes as you please and delete / comment out
-- the recipes you don't want to be available in the game
-- the original versions are in "default/recipes.lua"
return {
["tpad:tpad"] = {
{'group:wood', 'default:bronze_ingot', 'group:wo... |
test = require 'u-test'
common = require 'common'
local function VerifySuccess(hr)
SetCheckHR(1)
if hr ~= 0 then
test.equal(hr, 0)
print("Failure. hr=" .. hr)
test.stopTest()
end
return true
end
function AchievementsManager_Handler()
print("AchievementsManager_Handler")
... |
raceRoot = Element("race-root", "raceRoot")
local races = {}
local raceDimension = 0
-- Возможные состояния гонки
local RaceState = {
waiting = "waiting",
running = "running",
ended = "ended"
}
setTimer(function ()
for id, race in pairs(races) do
local racePlayers = race:getPlayers()
if not racePlayers ... |
AddCSLuaFile()
ENT.Base = "bw_base_explosive"
ENT.PrintName = "C4 Explosive"
ENT.Model = "models/weapons/w_c4_planted.mdl"
ENT.ExplodeTime = 20
ENT.ExplodeRadius = 200
ENT.DefuseTime = 10
ENT.ShowTimer = true
ENT.OnlyPlantWorld = false
ENT.UsePlant = false
|
-- https://github.com/premake/premake-core/issues/1559
premake.override(premake.vstudio.vc2010, "targetFramework", function(oldfn, prj)
if prj.clr == "NetCore" then
local action = premake.action.current()
local tools = string.format(' ToolsVersion="%s"', action.vstudio.toolsVersion)
local framework = prj... |
local MAJOR, MINOR = "Olivine:Luassert:Stub-1.0", 1
-- Get a reference to the package information if any
local APkg = Apollo.GetPackage(MAJOR)
-- If there was an older version loaded we need to see if this is newer
if APkg and (APkg.nVersion or 0) >= MINOR then
return
end
------------------------------------------... |
#!/usr/local/bin/lua
---------------------------------------------------------------------
-- LuaSOAP test file.
-- $Id: test.lua,v 1.3 2004/03/24 19:27:38 tomas Exp $
---------------------------------------------------------------------
require"lxp/lom"
require"soap"
function table.equal (t1, t2)
assert (type(t1) =... |
local function giveExercise()
local num1 = math.random(0, 100)
local num2 = math.random(0, 100)
io.write(string.format("%d + %d = ", num1, num2))
local userNum = io.read("n")
if userNum == (num1 + num2) and type(userNum) == "number" then
print("Spravne")
elseif userNum ~= (num1 + num2)... |
local firePlaces = {
{-1817.96, 142.17, 15.1},
{-1817.96, 142.17, 15.1},
{-2885.11, 460.5, 4.91},
{-1985.94, 369.42, 35.21},
{-1756.07, 931.96, 24.74},
{-1575.65, 1207.31, 7.59},
{-1552.45, 386.15, 7.18},
{-1527.6357421875,-404.1904296875,7.078125},
{-1738.0205078125,103.244140625,3.5546875},
{-1984.551... |
AddCommand("p-spawn", function(player)
if DISABLE_COMMANDE then return end
local x,y,z = GetPlayerLocation(player)
Spawn(x,y,z)
end)
AddCommand("p-fly", function(player)
if DISABLE_COMMANDE then return end
local x,y,z = GetPlayerLocation(player)
SetPlayerLocation(player, x, y, z + 40... |
add_subdirs("deps/malog/src")
add_subdirs("src")
add_subdirs("examples")
|
local base_util = require("__core__/lualib/util")
local small_ruins = {require("ruins/small-fluid-burner"), require("ruins/small-reinforced-windturbines"), require("ruins/small-sentinel-outpost")}
local medium_ruins = {require("ruins/medium-creep-biomass"), require("ruins/medium-fuel-plant"), require("ruins/medium-tre... |
game:service("TeleportService"):Teleport(IDHERE) |
local Prop = {}
Prop.Name = "Book Store"
Prop.Government = true
Prop.Doors = {
Vector( 2236.000000, 2798.000000, -13355.687500 ),
Vector( 2236.000000, 2706.000000, -13355.687500 ),
}
GM.Property:Register( Prop ) |
-----------------------------------
-- Area: Wajaom Woodlands
-- ZNM: Gotoh Zha the Redolent
-----------------------------------
mixins =
{
require("scripts/mixins/job_special"),
require("scripts/mixins/rage")
}
require("scripts/globals/status")
-----------------------------------
-- Detailed Notes & Todos
-- ... |
local strnew = CS.ZX.Core.StringNew
local M = setmetatable({
}, {__index = function(t, k)
local id = strnew(k)
t[k] = id
return id
end})
return M
|
--[[
LuiExtended
License: The MIT License (MIT)
--]]
local zo_strformat = zo_strformat
local changelogMessages = {
"|cFFA500LuiExtended Version 6.2.2|r",
"",
"|cFFFF00Known Issues:|r",
"[*] Due to API changes with Major/Minor effects the Bar Highlight component of Combat Info may ha... |
data:extend(
{
{
type = "item",
name = "plutonium-239",
icon = "__Clowns-Nuclear__/graphics/icons/plutonium-239.png",
icon_size = 32,
subgroup = "clowns-nuclear-isotopes",
order = "c",
stack_size = 50
},
{
type = "ammo",
name = "thermonuclear-bomb",
icon = "__Clowns-Nuclear__/graphics/icons... |
-- NOTE: This needs update acccording to potions.lua!
local config = {
removeOnUse = "no",
usableOnTarget = "yes", -- can be used on target? (fe. healing friend)
range = -1,
realAnimation = "no", -- make text effect visible only for players in range 1x1
flask = 7636,
splash = 41
}
config.removeOnUse = getBoolean... |
S1 = State()
S2 = State()
code = [[
id = ...
for i = 1, 10000 do
print("id: " .. id .. ", val: " .. i)
end
]]
T1 = thread(S1, code, 1)
T2 = thread(S2, code, 2)
T1:wait()
T2:wait()
|
g = love.graphics --so instead of typing love.graphics.blahblahblah every time,
k = love.keyboard --you can simply write g.blahblahblah! Yay!
function love.load()
-- frame size declaration
width = g.getWidth()
height = g.getHeight()
-- ball properties
ballx, bally = width/2 , height/2
ballxvel... |
function PlayerEquipment:use_trip_mine_mx()
local ray = self:valid_look_at_placement()
if ray then
managers.statistics:use_trip_mine()
local sensor_upgrade = managers.player:has_category_upgrade("trip_mine", "sensor_toggle")
-- if Network:is_client() then
-- managers.network:session():send_to_host("place_... |
login_autoVerifyFailed_title=[[手机号自动验证未成功]]
login_autoVerifyFailed_reasonText=[[]]
login_autoVerifyFailed_tryAgainBtnText=[[再试一次]]
login_autoVerifyFailed_fillByHandBtnText=[[手动填写]]
|
-- import
local PhysicsShape = require 'candy.physics.2D.PhysicsShape'
local ComponentModule = require 'candy.Component'
local Component = ComponentModule.Component
-- module
local PhysicsTriggerModule = {}
local function _triggerCollisionHandler ( phase, fixA, fixB, arb )
local bodyA = fixA:getBody ()
local ownerA... |
local _M = require 'resty.resolver.http'
describe('resty.resolver.http', function()
describe('.new', function()
it('initializes client', function()
local client = _M.new()
assert.truthy(client)
end)
end)
describe(':connect', function()
it('resolves localhost', function()
local cl... |
local plainLayouter = {}
plainLayouter.__mt = {__index = plainLayouter}
function plainLayouter:new(space)
local self = setmetatable({},self.__mt)
return self
end
function plainLayouter:begin()
self.drawQueue = {}
end
function plainLayouter:finish(draw)
if draw then
for i=#self.drawQueue,1,-1 ... |
require('plugins.sniprun.settings')
|
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 Model = require("lib.model")
local UserLog = Model:new('user_logs')
return UserLog
|
local snap = require('snap')
local config = require('snap.config')
local file = config.file:with({ reverse = true, suffix = ' »', layout = snap.get('layout').center })
local vimgrep = config.vimgrep:with({ limit = 50000, suffix = ' »' })
-- local args = {"--hidden", "--iglob", "!**/.git/*", "--iglob", "!**/.baks/*", "-... |
--
-- Copyright (c) 2007, Trent Gamblin
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
-- -- Redistributions of source code must retain the above copyright
-- notice, this list of co... |
--- 物品基类
--- @module ItemBase
-- @copyright Lilith Games, Avatar Team
-- @author Dead Ratman
local ItemBase = class('ItemBase')
function ItemBase:initialize(_baseData, _derivedData)
----print('ItemBase:initialize()')
self.baseData = _baseData
self.typeConfig = Config.ItemType[_baseData.Type]
self.deriv... |
-- Run: lua example.lua
require "lunit-globalized"
local simple = lunit.create_testcase( "simple" )
function simple.test_success()
assert_true( true, "This test never fails.")
end
function simple.test_failure()
assert_true( "Hello World!", "This test always fails!")
end
local enhanced = lunit.create_testcase(... |
local json = require('json')
local timer = require('timer')
local miniz = require('miniz')
local websocket = require('coro-websocket')
local Emitter = require('utils/Emitter')
local Mutex = require('utils/Mutex')
local Stopwatch = require('utils/Stopwatch')
local EventHandler = require('client/EventHandler')
... |
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
description '[Grievance] Loading Screen'
version '1.3.0'
loadscreen 'ui/index.html'
files {
'ui/index.html',
'ui/normalize.min.css',
'ui/main.css',
'ui/main.js',
'ui/bg.jpg',
'ui/logo.png',
-- Theme: Autumn
-- 'ui/main... |
--this is incredibly hacky
local CollectionService = game:GetService("CollectionService")
return function(Sunshine, entity)
local water = entity.water
local model = entity.model
local transform = entity.transform
local collider = entity.collider
if water and collider and model and transform then
... |
return
{
HOOK_PLAYER_RIGHT_CLICKING_ENTITY =
{
CalledWhen = "A player has right-clicked an entity. Plugins may override / refuse.",
DefaultFnName = "OnPlayerRightClickingEntity", -- also used as pagename
Desc = [[
This hook is called when the {{cPlayer|player}} right-clicks an {{cEntity|entity}}. Plugins ma... |
--[[
Copyright © 2013-2015, Giuliano Riccio
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the follo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.