content stringlengths 5 1.05M |
|---|
if not modules then modules = { } end modules ['type-ini'] = {
version = 1.001,
comment = "companion to type-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files"
}
local gsub = string.gsu... |
local TeleportService = game:GetService("TeleportService")
return function(context, players, placeId, jobId)
players = players or { context.Executor}
if placeId <= 0 then
return "Invalid place ID"
elseif jobId == "-" then
return "Invalid job ID"
end
context:Reply("Commencing teleport...")
if jobId then
... |
ENT.Type = "anim"
ENT.Base = "base_wire_entity"
ENT.PrintName = "Touch Plate"
ENT.Author = "Asphid_Jackal"
ENT.Contact = "nullonentry"
ENT.Purpose = ""
ENT.Instructions = ""
ENT.Category = "Other"
ENT.Spawnable = false
ENT.AdminSpawnable = false
if not CLIENT then return end
-- get rid of outline
functi... |
local drystal = require 'drystal'
local Part = {
name=nil,
sprite=nil,
futuresprite=nil,
x=0,
y=0,
angle=0,
timer=nil,
radius=1.5,
dist=10,
name=nil,
swapwith=nil,
}
Part.__index = Part
function Part.new(sprite)
local p = setmetatable({}, Part)
p.sprite = sprite
p.w = sprite.w
p.h = sprite.h
p.x = 0... |
if SERVER then
ENT.Base = "lambda_trigger"
ENT.Type = "brush"
DEFINE_BASECLASS( "lambda_trigger" )
function ENT:Initialize()
--DbgPrint(self, "trigger_multiple:Initialize")
BaseClass.Initialize(self)
BaseClass.SetWaitTime(self, 0.2)
end
end
|
function love.load()
looky = require("looky")
looky:registerFont( "space", love.graphics.newFont( "fonts/Roboto-Bold.ttf", 30 ))
looky:registerStyledLayout("new.text", "text", { font = "space", gravity = { "center", "center" }, textColor = { 180, 180, 60, 255 } })
looky:registerFont( "small", love.graphics... |
--
-- Copyright (c) 2016, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--
require 'torch'
... |
local commands = {
commands = {},
game_commands = {},
object_name = 'command'
}
local game_commands_list = {'h', 'help', 'permissions', 'color', 'clear', 'evolution', 'seed', 'time', 'version'}
local function game_commands(_, k)
for _, command in pairs(game_commands_list) do
if k == command the... |
---@class CS.FairyGUI.TextField.LineCharInfo : CS.System.ValueType
---@field public width number
---@field public height number
---@field public baseline number
---@type CS.FairyGUI.TextField.LineCharInfo
CS.FairyGUI.TextField.LineCharInfo = { }
|
--[[
simple kernel for async tasks running in the background
can "stall" a task by yielding the string "stall"
this will suspend the coroutine until the rest of
the queue has been processed or stalled
and can early-out update_for_time
todo:
multiple types of callbacks
finish, error, step
getting a r... |
-- Copyright 2020, Sjors van Gelderen
require("area")
require("input")
require("vector2")
local graphics = love.graphics
local image = love.image
local mouse = love.mouse
Metatiler = {}
-- TODO:
-- Allow creation of metasprites
function Metatiler.new()
local self = {}
local pq_pixel_size = unit * 2
local ... |
--[[
Name: "sh_book_cos.lua".
Product: "HL2 RP".
--]]
local ITEM = {};
-- Set some information.
ITEM.base = "book_base";
ITEM.name = "Chapter One - Sorrow";
ITEM.model = "models/props_lab/bindergreenlabel.mdl";
ITEM.uniqueID = "book_cos";
ITEM.description = "A green, tattered diary-like book.";
ITEM.bookInformation =... |
-- All the net messages defined here
util.AddNetworkString("EventSystem:UI:Admin")
util.AddNetworkString("EventSystem:UI:Admin:CreateEvent")
util.AddNetworkString("EventSystem:UI:Admin:CreateEvent:Start")
util.AddNetworkString("EventSystem:UI:Admin:RequestData")
util.AddNetworkString("EventSystem:UI:Admin:SendAction")
... |
-- Generate a series of "cp" commands to install the equates files into a
-- checkout of the muforth repo.
for i,a in ipairs(arg) do
if i == 1 then
installdir = a .. "/mu/target/ARM/stm32/"
else
src = a
dest = a:gsub("x(.)%.mu4", "_%1-equates.mu4")
:gsub("^stm32", "")
... |
import "../crowdsale.lua"
---------------------------------------
-- timed crowdsale object definition
-- @see https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/crowdsale/validation/TimedCrowdsale.sol
---------------------------------------
state.var {
OpeningTime = state.value(),
Closin... |
function split(s, delimiter)
result = {}
for match in (s..delimiter):gmatch("(.-)"..delimiter) do
table.insert(result, match)
end
return result
end
function qhash(str)
local hash = 5381
local wrap = 2^32
for i=1,#str do
hash = (hash * 33 + str:byte(i)) % wrap
end
return hash
end
... |
if !se_game_state then
se_game_state = {
State = SE_STATE_NONE,
Ship_Type = SE_SHIP_EXPLORER,
terrain_seed = 0,
Game_Map = {}
}
end
include("map.lua")
|
-- Autogenerated from KST: please remove this line if doing any edits by hand!
local luaunit = require("luaunit")
require("switch_manual_enum_invalid")
TestSwitchManualEnumInvalid = {}
function TestSwitchManualEnumInvalid:test_switch_manual_enum_invalid()
local r = SwitchManualEnumInvalid:from_file("src/enum_ne... |
local Csv = require("mod.extlibs.api.Csv")
local Compat = require("mod.elona_sys.api.Compat")
local CodeGenerator = require("api.CodeGenerator")
local Hash = require("mod.elona_sys.api.Hash")
local TEXTS = {
txtAggro = "base.aggro",
-- txtBye = "base.bye",
txtCalm = "base.calm",
txtDead = "base.dead",
t... |
-- ****************************************************************************
-- Play file with pcm module.
--
-- Upload jump_8k.u8 to spiffs before running this script.
--
-- ****************************************************************************
local function cb_drained()
print("drained "..node.heap())
... |
return {
extension = {
["md"] = "telekasten",
},
}
|
local t = class("gene")
-- 基因的定义(基因链中存有问题的解,
-- 这个解得好坏用updateFitness()和fitness来衡量和存储)
local gb = _G.gb
local util = gb.util
--
function t:ctor(population) -- length:geneBitCount
-- 群组
self.population = population
local geneBitCount = population.geneBitCount
local generateGeneBitFunc = population.generateGeneBitFu... |
--[[
Given a list of sounds, this plays one at random.
This is useful for dialog, where we have multiple sounds that we want to
choose between for each letter that pops up.
]]
local SoundService = game:GetService("SoundService")
local t = require(script.Parent.Parent.lib.t)
local chooseRandom = require(script.Par... |
local playsession = {
{"_hash", {334049}},
{"evaldusia", {42677}},
{"qwerin", {359053}},
{"rlidwka", {347900}},
{"HYPPS", {353494}},
{"Jardee", {356931}},
{"floxys", {4260}},
{"dazonker", {337877}},
{"Dammpi", {329006}},
{"625dennis", {321162}},
{"sharpshot2566", {304357}},
{"Kamyk", {288113}},
{"Bete1geus... |
function isPlayerAllowedToDoEditorAction(player,action)
if isElement(player) and getElementType(player)=="player" and action and type(action)=="string" then
-- return hasObjectPermissionTo(player,"resource.editor."..action,false)
return hasObjectPermissionTo(player,"resource.editor."..action)
end
return false
en... |
local shell = require("shell")
local filesystem = require("filesystem")
local args, opts = shell.parse(...)
if #args < 1 then
io.stderr:write("Usage: type <file>")
return
end
local file = shell.resolve(args[1])
if not file then
io.stderr:write("No such file: " .. file)
return
end
local stream = io.open(file, "r... |
-- Rifle ammo override
AddCSLuaFile()
ENT.Type = "anim"
ENT.Base = "base_ammo_ttt"
ENT.AmmoType = "357"
ENT.AmmoAmount = 10
ENT.AmmoMax = 20
ENT.Model = Model("models/items/357ammo.mdl")
ENT.AutoSpawnable = true
|
_, Protected_by_MoonSecV2, Discord = 'discord.gg/gQEH2uZxUk'
,nil,nil;(function() _msec=(function(P,K,M)local R=K[(-#'everybody needs salvation'+(0x248f/191))];local E=M[P[(-#[[cock in my ass]]+(1457-0x2fe))]][P[(84366/0x6d)]];local D=(-#{",",28;'}',{};",",(function()return#{('mPLFKM'):find("\76")}>0 and 1 or 0 end);... |
RegisterNetEvent("raid_clothes:outfits")
AddEventHandler("raid_clothes:outfits", function(pAction, pId, pName)
TriggerEvent("attachedItems:block", true)
Wait(50)
if pAction == 1 then
TriggerServerEvent("raid_clothes:set_outfit", pId, pName, GetCurrentPed())
elseif pAction == 2 then
Tri... |
local ui = require "tek.ui"
return {
register_window = function(app, window)
ui.Application.connect(window)
app:addMember(window)
end,
show_window = function(self, app, id)
local _, _, x, y = self.Window.Drawable:getAttrs()
-- Archor to the main window position
local window = app:getById(id... |
local M = {}
local parts_config = v.config
local nodes = {}
local last_node = 1
local nodes_per_frame = 64
local node_pos_thresh = (32 * 32)
local function kissInit()
for _, node in pairs(v.data.nodes) do
local mass = obj:getNodeMass(node.cid)
table.insert(
nodes,
{
node.cid,
vec... |
--[[
Copyright 2017 YANG Huan (sy.yanghuan@gmail.com).
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to i... |
setenv("BEN_VERSION",myModuleVersion())
|
package.path = package.path .. ";../../src/?.lua"
require "Point"
require "Perceptron"
function love.load(arg)
math.randomseed( os.time() )
p = Perceptron(3)
points = {}
for i=1,100 do
points[i] = Point(love.graphics.getWidth(),love.graphics.getHeight())
end
for i,point in ipairs(points) do
point:guessed(p... |
-- Clay gatherer by Makazi
-- You need to have camera F8F8 zoomed all the way in,
-- You also need a WH nearby, and water where you start.
-- Start with empty jugs, pin the WH menu and select direction to walk.
-- It always walks in the direction mentioned first on the button.
-- Walking pattern may drift due to l... |
--フルール・ド・シュヴァリエ
function c45037489.initial_effect(c)
aux.AddMaterialCodeList(c,19642774)
--synchro summon
aux.AddSynchroProcedure(c,c45037489.tfilter,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(45037489,0))
e1:SetCategory(CATEGORY_N... |
data:extend {
{
type = 'bool-setting',
name = 'picker-signals-extra-numbers',
setting_type = 'startup',
default_value = true,
order = '[picker-signals]-a-extras-0'
},
{
type = 'bool-setting',
name = 'picker-signals-extra-letters',
setting_type ... |
local helpers = require "spec.helpers"
local cjson = require "cjson"
local md5 = ngx.md5
for _, strategy in helpers.each_strategy() do
describe("Buffered Proxying [#" .. strategy .. "]", function()
-- TODO: http2 / grpc does not currently work with
-- ngx.location.capture that buffered proxying uses
... |
function table.val_to_str ( v )
if "string" == type( v ) then
v = string.gsub( v, "\n", "\\n" )
if string.match( string.gsub(v,"[^'\"]",""), '^"+$' ) then
return "'" .. v .. "'"
end
return '"' .. string.gsub(v,'"', '\\"' ) .. '"'
else
return "table" == type( v ) and table.tostring( v ) or
... |
-- CONFIG FOR OPTIC SIEGE PREMAKE
ROOT = "%{wks.location}/" -- This directory style works on all platforms, not just unix
vendorLoc = "OpticSiege/vendors/" -- Localized vendor dir (used only if you have root ./)
VendorDir = ROOT .. vendorLoc -- Non localized vendor dir. Used if you're inside a project or workspace
O... |
return Def.ActorFrame {
Def.Quad{
InitCommand=function(self) self:FullScreen():diffuse(Color.Black):diffusealpha(0) end,
StartTransitioningCommand=function(self) self:sleep(2):linear(1):diffusealpha(1) end,
},
Def.ActorFrame {
Condition=not GAMESTATE:IsDemonstration(),
LoadActor(THEME... |
local ffi = require("ffi")
function split(str, delim)
delim = delim or "%s"
local t = {}; i = 1
for s in string.gmatch(str, "([^"..delim.."]+)") do
t[i] = s
i = i + 1
end
return t
end
function load_api(file)
local apif = io.open(file, "rb")
local api = apif:read("*all")
... |
function love.load()
-- This function configures game window and performs additional setup
require("source/startup/startup")
startup()
-- Debug value, comment out for final game
debug = 0
debug2 = 0
-- Temporary, used for drawing Explosion radius before particles
expX = 0
expY = 0
-- Temporary, ... |
-------------------------------------------------------------------
-- ____ _ _
-- / ___|___ _ __ ___ _ __ | | ___| |_
-- | | / _ \| '_ ` _ \| '_ \| |/ _ \ __|
-- | |__| (_) | | | | | | |_) | | __/ |_
-- \____\___/|_| |_| |_| .__/|_|\___|\__|
-- ... |
function info_fox(title,year,logo)
local userAgent = "Mozilla/5.0 (Windows NT 10.0; rv:85.0) Gecko/20100101 Firefox/85.0"
local session = m_simpleTV.Http.New(userAgent)
if not session then return end
m_simpleTV.Http.SetTimeout(session, 8000)
local function xren(s)
if not s then
return ''
end
s = s:low... |
-- // Variables
local SignalLibary = { Name = "Signal" }
local SignalObject = { Name = "Signal" } SignalObject.__index = SignalObject
local ConnectionObject = { Name = "Connection" } ConnectionObject.__index = ConnectionObject
SignalLibary.Enabled = newproxy()
SignalLibary.Disabled = newproxy()
-- // Connection Metho... |
named_events = {events = {}}
local checkpl = {}
function named_events:subscribe(name, func, pl,...)
--prerror("subscribe ev",name,pl.name,pl)
checkpl[pl] = checkpl[pl] or {}
if checkpl[pl][name] then error("already set") end
checkpl[pl][name]=true
self.events[name] = self.events[name] or {}
table.insert(self.ev... |
local Controller = require 'arken.Controller'
local test = {}
test.should_return_http_status_500 = function()
local c = Controller.new()
local status, headers, body = c:rescue("error...")
assert( status == 500 )
end
test.should_return_empty_headers = function()
local c = Controller.new()
local status, heade... |
--New boss for Black Magic
it=Instance.new
vt=Vector3.new
cf=CFrame.new
euler=CFrame.fromEulerAnglesXYZ
angles=CFrame.Angles
if workspace:findFirstChild("Vanta",true) ~= nil then
workspace:findFirstChild("Vanta",true).Parent = nil
end
function NoOutline(Part)
Part.TopSurface,Part.BottomSurface,Part.LeftSurface,P... |
local class = require 'class'
local base = require 'fsp.learner.learner'
local actions_learner = class('AvgActionsLearner', 'Learner')
function actions_learner:__init(params)
base.Learner.__init(self, params)
self.output_err = torch.FloatTensor()
self.epsilon = params.epsilon or 1e-8
self.gpu = params.gpu
end... |
#! /usr/bin/lua5.3
-- Converts from a YAML file to a DESC file.
-- Usage:
-- cat in.yaml | ./desc-encoder.lua > out.desc
--
local lyaml = require('lyaml')
local msgpack = require('MessagePack')
local data = lyaml.load(io.read('*all'))
msgpack.set_number('double')
msgpack.set_string('string')
print(msgpack.pack(data)... |
return {
LrSdkVersion = 3.0,
LrSdkMinimumVersion = 2.0,
LrToolkitIdentifier = 'at.homebrew.lrkomoot',
LrPluginName = LOC "$$$/Komoot/PluginName=Komoot",
-- Add the Metadata Definition File
LrMetadataProvider = 'KomootMetadataDefinition.lua',
-- Add the Metadata Tagset File
LrMetadataTagsetFactory = {
'Ko... |
------------------------------------------------------------------
-- PlotConfig.lua
-- Author : ChenJM
-- Version : 1.15
-- Date :
-- Description: 副本配置,8-17更新1.2数据
------------------------------------------------------------------
module("PlotConfig", package.seeall)
PLOTINFO={}
function g... |
--Runs with no error. Still no actual script running--
wait(3)
script.Parent = nil
Character = game.Players.localPlayer.Character
Humanoid = Character.Humanoid
if Humanoid:findFirstChild("Animate") then
Humanoid:findFirstChild("Animate"):Destroy()
end
TagService = require(game:GetService("ReplicatedStorage"):WaitFor... |
local modname = ...
local M = {}
_G[modname] = M
package.loaded[modname] = M
setmetatable(M, {__index=_G})
setfenv(1, M)
--local print = print
function f1()
print("f1")
end
function f2()
print("f2")
f1()
end
local function f3()
print("f3")
f2()
end
function f4()
print("f4")
f3()
end
req... |
world = love.physics.newWorld(0, 0)
PhysicsBody = Class {
--parent containing, initial x pos, initial y pos, type of body (static, kinematic, dynamic), shape, width/radius, height
init = function(self, parent, init_x, init_y, bodytype, shape, wr, h)
self.body = love.physics.newBody(world, init_x, init_y, bodytype)... |
local vim = vim
local _M = {}
_M.load = function (use)
use {
'tpope/vim-fugitive',
'lewis6991/gitsigns.nvim',
requires = {
'nvim-lua/plenary.nvim'
},
}
end
_M.run = function ()
require('gitsigns').setup({
current_line_blame = true
})
vim.cmd [[
... |
local utils = require "luacheck.utils"
local multithreading = require "luacheck.multithreading"
local helper = require "spec.helper"
local luacheck_cmd = helper.luacheck_command()
local function get_output(command, wd, color)
if color then
if package.config:sub(1, 1) == "\\" and not os.getenv("ANSICON") then
... |
forge.clear()
position = {0, 0, 0}
rotation = {0, 90, 0}
direction = {1, 0, 0}
courseLength = math.random(10, 20)
for s = 0, courseLength do
previousDirection = direction
position = {position[1] + direction[1], position[2] + direction[2], position[3] + direction[3]}
if s == courseLength then
randomGoa... |
includeFile("custom_content/tangible/holiday/love_day/rewards_10/love_day_2010_hearts.lua")
includeFile("custom_content/tangible/holiday/love_day/rewards_10/love_day_2010_painting.lua")
includeFile("custom_content/tangible/holiday/love_day/rewards_10/love_day_prop_2010_flowers.lua")
|
--
-- Created by IntelliJ IDEA.
-- User: nander
-- Date: 01/03/2019
-- Time: 21:56
-- To change this template use File | Settings | File Templates.
--
return function()
return {
draw = function()
-- draw map background etc.
CAM:draw(function(l, t, w, h)
-- draw came... |
local utils = {}
-- A new inheritsFrom() function
--
function utils:inheritsFrom( baseClass )
local new_class = {}
local class_mt = { __index = new_class }
function new_class:create()
local newinst = {}
setmetatable( newinst, class_mt )
return newinst
end
if nil ~= baseCl... |
return function()
local validateMotor = require(script.Parent.validateMotor)
local createSpy = require(script.Parent.createSpy)
local createGroupMotor = require(script.Parent.createGroupMotor)
-- test motion object that completes after step has been called numSteps times
local function createStepper(numSteps)
... |
local RPX = nil
Citizen.CreateThread(function()
Citizen.Wait(1)
exports["Library"]:AddHook(GetCurrentResourceName(), function(library)
RPX = library
if RPX.IsLoaded then
PlayerLoaded()
end
end)
end)
RegisterNetEvent("rpx:playerLoaded")
AddEventHandler("rpx:playerLoade... |
object_tangible_item_entertainer_console_stage_generated_backdrop_02 = object_tangible_item_entertainer_console_shared_stage_generated_backdrop_02:new {
}
ObjectTemplates:addTemplate(object_tangible_item_entertainer_console_stage_generated_backdrop_02, "object/tangible/item/entertainer_console/stage_generated_backdro... |
local M = {
omit_excess_refrence = true
}
-- see snapshot.c:L16
local REF_TYPE_TABLE_VALUE = 1
local REF_TYPE_TABLE_KEY = 2
local REF_TYPE_LOCAL = 3
local REF_TYPE_UPVALUE = 4
local REF_TYPE_META = 5
function M.objtypename(objtype)
if type(objtype) == "string" then
return objtype
end
if objtyp... |
---@type Config
local Config = ECSLoader:ImportModule("Config")
local _Config = Config.private
---@type Stats
local Stats = ECSLoader:ImportModule("Stats")
---@type i18n
local i18n = ECSLoader:ImportModule("i18n")
function _Config:LoadManaSection()
return {
type = "group",
order = 5,
inlin... |
function SWEP:NWAlpha(alpha)
umsg.Start("NWAlpha")
umsg.Entity(self)
umsg.Short(alpha)
umsg.End()
end
local can, att, wep, CT, dtint3, t, num
function RequestPimp(ply)
wep = ply:GetActiveWeapon()
if not wep.IsCSTMWeapon then
return
end
if wep.ReloadTime then
return
end
CT = CurTime()
if C... |
local TestLayer = require("graphic.test.TestLayer")
local TestCombineMeshesLayer = class("TestCombineMeshesLayer", TestLayer)
function TestCombineMeshesLayer:ctor()
TestLayer.ctor(self)
end
function TestCombineMeshesLayer:init()
TestLayer.init(self)
self:customLayout()
end
function TestCombineMeshesLayer... |
-- lsp dianostic
local vim,api,lsp,util = vim,vim.api,vim.lsp,vim.lsp.util
local window = require 'lspsaga.window'
local libs = require('lspsaga.libs')
local wrap = require 'lspsaga.wrap'
local config = require('lspsaga').config_values
local if_nil = vim.F.if_nil
local hover = require('lspsaga.hover')
local M = {}
loc... |
MODULE.Name = "Core"
MODULE.Excludable = false -- Excluding the core makes no sense as everything relies on it
MODULE.Files = { -- Other files will be automatically added
"../include/Nazara/Prerequisites.hpp",
"../include/Nazara/Math/**.hpp",
"../include/Nazara/Math/**.inl",
}
MODULE.OsFiles.Windows = {
"../src/N... |
-- _.dropRightWhile.lua
--
-- Creates a slice of array excluding elements dropped from the end.
-- Elements are dropped until predicate returns falsey.
-- @usage _.print(_.dropRightWhile({1, 5, 2, 3, 4, 5, 4, 4}, function(n)
-- return n > 3
-- end))
-- --> {1, 5, 2, 3}
--
-- @param array The array to query.
-- @par... |
-- calculation.lua
function makeDeck()
local deck = {}
for suite = 1,4,1 do
for rank = 1,13,1 do
local card = { suite = suite, rank = rank }
table.insert(deck, card)
end
end
end
function shuffleDeck(deck)
while #deck > 0 do
-- pick a random card from the deck
-- add it to another deck
... |
object_tangible_item_treasure_map_relic_buff_s01 = object_tangible_item_treasure_map_shared_relic_buff_s01:new {
}
ObjectTemplates:addTemplate(object_tangible_item_treasure_map_relic_buff_s01, "object/tangible/item/treasure_map/relic_buff_s01.iff")
|
local lfs = require "lfs";
local st = require "util.stanza";
local parse_xml = require "util.xml".parse;
local os_getenv = os.getenv;
local io_open = io.open;
local assert = assert;
local ipairs = ipairs;
local coroutine = coroutine;
local print = print;
module "jabberd14"
local function is_dir(path) return lfs.attr... |
local M = {}
------ Configuration (should make it possible to pass it in) ------
-- If true, then convert alt-x or meta-x into ESC x (NCURSES only). This means
-- that you can no longer use alt-key bindings, but means that you can quickly
-- type ESC followed by vi commands without waiting for the ESC to time out.
M.... |
return {
id = 7,
count = 10,
} |
function love.conf(t)
t.version = "11.1"
t.identity = ".cosvent"
local w = t.window
w.title = "CosVent"
w.icon = "assets/gfx/favicon.png"
w.width,w.height = 800,480
w.vsync = 1
w.centered = true
local m = t.modules
m.audio = true
m.data = true
m.event = true
m.font = true
m.graphics = true
m.image ... |
---
--- PopView是Lua中,用于在lua的window上,弹出各种toast、progress、loadding、dialog的基础组件。
--- Created by zhang.ke
--- DateTime: 2020-04-20 17:43
---
local _class = {}
_class._type = 'ui'
_class._version = '1.0'
_class._classname = 'PopView'
_class.__argoui_autoadd = false --argoui ui{}中,不自动添加到window开关。
function PopView(o)
ret... |
local npsname = "main_as_apache"
return npsname |
project "lua_freetype"
language "C"
includedirs { "../lib_freetype/freetype/include/" , "." }
files { "code/**.cpp" , "code/**.c" , "code/**.h" , "all.h" }
links { "lib_lua" }
KIND{kind="lua",dir="wetgenes/freetype",name="core",luaname="wetgenes.freetype.core",luaopen="wetgenes_freetype_core"}
|
local combat = Combat()
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1)
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISONARROW)
combat:setFormula(COMBAT_FORMULA_SKILL, 1, 0, 1, 0)
local condition = Condition(CONDITION_POISON)
condition:setParam... |
local rect = require('bump').rect
describe('bump.rect', function()
describe('detectCollision', function()
local detect = rect.detectCollision
describe('when item is static', function()
describe('when itemRect does not intersect otherRect', function()
it('returns nil', function()
loc... |
STARTING_PLAYER = 1
PLAYER_WIDTH = 12
PLAYER_HEIGHT = 90
PLAYER_MOVE_SPEED = 10
PLAYER_MARGIN = 10
BALL_RADIUS = 8
BALL_VELOCITY = 12.5
PLAYER_HIT_SHAKE_DURATION = 0.3
PLAYER_HIT_SHAKE_MAGNITUDE= 5
RESTART_TIME = 2.0
players = {}
ball = {
x = 0,
y = 0,
vx = 0,
vy = 0,
held_by = nil
}
screen_shake =... |
local C = require('erde.constants')
-- -----------------------------------------------------------------------------
-- Parse
-- -----------------------------------------------------------------------------
describe('Name.parse', function()
spec('name', function()
assert.are.equal('x', parse.Name('x').value)
... |
local Plugin = Plugin
local Shine = Shine
local SGUI = Shine.GUI
local CaptainMenu = {}
local Players = {}
local TeamNames = {"Marines", "Aliens"}
local IsReady = false
local MyTurn = false
local Team1IsMarines = true
function Plugin:OnFirstThink()
self:CallModuleEvent("OnFirstThink")
end
function CaptainMenu:Creat... |
ruwan_tokai = Creature:new {
objectName = "@mob/creature_names:sergeant_ruwan_tokai",
socialGroup = "imperial",
faction = "imperial",
level = 100,
chanceHit = 1.000000,
damageMin = 645,
damageMax = 1000,
baseXp = 9336,
baseHAM = 24000,
baseHAMmax = 30000,
armor = 0,
resists = {0,0,0,0,0,0,0,0,-1... |
---------------------------------------------------------------------------------------------------
---reimu.lua
---date: 2021.4.18
---desc: Defines the Reimu player
---------------------------------------------------------------------------------------------------
local Prefab = require("core.prefab")
local PlayerBas... |
local meta = FindMetaTable("Player")
function meta:CanCast()
return self:GetNWBool("CanCast", true)
end
function meta:CanDraw()
return self:GetNWBool("CanDraw", true)
end
if SERVER
then
function meta:SetCanCast(bool)
self:SetNWBool("CanCast", bool)
end
function meta:SetCanDraw(bool)
... |
TreasurePortalNpc = {
click = function(block, npc)
if block.blType == BL_MOB then
return
end
block:msg(
0,
"You step into a mysterious portal. Where could it lead?",
block.ID
)
npc:delete()
end,
action = function(npc)
npc:sendAnimationXY(358, npc.x, npc.y)
end,
endAction = function(npc)... |
-- YouTube hook with masks - slightly improved standard (built-in) ytdl_hook.lua
--
-- Usefull for iPTV when redundant probing of the stream url can cause blocking
--
-- Only the config options 'masks' has been added. It holds space separated
-- patterns to match against stream url. Even the partial URL match to any pa... |
-- Variables that are used on both client and server
SWEP.Gun = ("stalker_knife") -- must be the name of your swep but NO CAPITALS!
SWEP.Category = "S.T.A.L.K.E.R"
SWEP.Author = ""
SWEP.Contact = ""
SWEP.Purpose = ""
SWEP.Instructions = ("Left click to slash")
SWEP.PrintName = "Trench knife" -... |
return {
'crypto_hash_BYTES',
'crypto_hash_sha256_BYTES',
'crypto_hash_sha512_BYTES',
}
|
local _, ns = ...
local tags = oUF.Tags.Methods
local events = oUF.Tags.Events
local timer = {}
tags["status:raid"] = function(unit)
local name = UnitName(unit) or UNKNOWN
if UnitIsAFK(unit) or not UnitIsConnected(unit) then
if not timer[name] then
timer[name] = GetTime()
end
... |
require("config")
-- Composite Entity
remote.call( "k-composite-entities", "register", {
base_entity = "composite-entity",
destroy_origional = false,
component_entities = {
{ entity_name = "invisible-label-1x1", offset = { x=0, y=0 }, operable=false, lable="Composite Entity" }
}
})
-- Static ... |
--------------------------------------------------------------
-- LeagueSplash.lua
-- Author: Anton Strenger
-- DateCreated: 2/22/2013
--
-- Splash screen for when the World Congress is first
-- established in the game.
--------------------------------------------------------------
include("BRDLib");
---------------... |
Talk(0, "奇怪,头怎么这么重..莫非...", "talkname0", 0);
PlayAnimation(-1, 5994, 6012);
jyx2_PlayTimeline("[Timeline]ka20_阎基居_中悲酥清风", 1, true);
DarkScence();
jyx2_StopTimeline("[Timeline]ka20_阎基居_中悲酥清风");
ZeroAllMP();
ModifyEvent(-2, -2, 0, -1, -1, -1, -1, -1, -1, -1, -1, -2, -2);
ModifyEvent(-2, 1, 1, -2, 21, -1, -1, 5168, 5168, ... |
-- This library is a trivial implementation of raycasting point lights for love2d/LÖVE.
-- It is heavily based on mattdesl's libGDX implementation, described here:
-- https://github.com/mattdesl/lwjgl-basics/wiki/2D-Pixel-Perfect-Shadows
-- The light data is stored here.
local lightInfos = {}
----------------
-- PU... |
local request_script_audio_bank = RequestScriptAudioBank
local has_sound_finished = HasSoundFinished
local stop_sound = StopSound
local cancel_music_event = CancelMusicEvent
local play_sound_frontend = PlaySoundFrontend
Citizen.CreateThread(
function()
Wait(0)
SetAudioFlag("LoadMPData", true)
request_scr... |
-- @file validation.lua
-- @author Théo Brigitte <theo.brigitte@gmail.com>
-- @contributor Henrique Silva <hensansi@gmail.com>
-- @date Thu May 28 16:05:15 2015
--
-- @brief Lua schema validation library.
--
-- Validation is achieved by matching data against a schema.
--
-- A schema is a repres... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.