content stringlengths 5 1.05M |
|---|
local skynet = require "skynet"
local runconf = require(skynet.getenv("runconfig"))
local prototype = runconf.prototype
local protopack = runconf.protopack
return require("libsocket_"..prototype) |
Cutscene.text("* These [color:yellow]bananas[color:reset] are [color:yellow]Pissing[color:reset] me\noff...")
Cutscene.text("* I'm the original [color:yellow]Starwalker[color:reset]") |
local function LoadBackgrounds(directoryName)
Backgrounds = {
NONE = {}
}
local files = love.filesystem.getDirectoryItems(directoryName)
local lambdas = {}
for index, background in ipairs(files) do
lambdas[index] = function()
if string.match(background, ".png") then
... |
------------------------------------------------------------------------------------------------------------------------
-- Proposal:
-- https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0192-button_subscription_response_from_hmi.md
------------------------------------------------------------------... |
local util = script.Parent.Parent.Util
local import = require(util.Import)
local class = import("../Util/Class")
local themeManager = import("../Util/ThemeManager")
local windowHeader = import("./WindowHeader")
local component = class(script.Name)
function component:__init(properties)
self.object = script.Comp:C... |
return {
id = "louie",
name = "Louie",
description = "What a cool guy",
type = "hat",
rarity = 1,
hidden = false,
}
|
local cx,cy = display.contentCenterX,display.contentCenterY
local ch,cw = display.contentHeight, display.contentWidth
local widget = require "widget"
-- requires
local composer = require "composer"
local function gotoGame()
composer.removeScene( "game" )
openChest:play()
composer.gotoScene("game", { time = 200... |
-- =======================================================================
-- ====================== FSAC EXTRA REGISTRATIONS ======================
-- =======================================================================
FSACExtra = {}
FSACExtra.registrations = {}
FSACExtra.run_registrations = function(admin)
... |
{{Tale_Action_WaitType_RealTime_Start}}Sleep({{Tale_Action_WaitAmount}}{{Tale_Action_WaitUnit_Seconds_Start}} * 1000{{Tale_Action_WaitUnit_Seconds_End}}{{Tale_Action_WaitUnit_Minutes_Start}} * 1000 * 60{{Tale_Action_WaitUnit_Minutes_End}}){{Tale_Action_WaitType_RealTime_End}}{{Tale_Action_WaitType_GameTime_Start}}SetGa... |
-- P37 - [1.3.1 过程作为参数]
function sum_integers(a, b)
if a > b then
return 0
else
return a + sum_integers(a + 1, b)
end
end
function cube(x)
return x * x * x
end
function sum_cubes(a, b)
if a > b then
return 0
else
return cube(a) + sum_cubes(a + 1, b)
en... |
--------------------------------------------------------------------------------
-- Function......... : easeInOutQuint
-- Author........... :
-- Description...... :
--------------------------------------------------------------------------------
--------------------------------------------------------------------... |
-- Gruvbox-material
vim.g.gruvbox_material_enable_italic = 0
vim.g.gruvbox_material_disable_italic_comment = 1
vim.g.gruvbox_material_background = 'medium' -- Avalible 'soft', 'medium', 'hard'
vim.g.gruvbox_material_enable_bold = 1
vim.g.gruvbox_material_transparent_background = 0
vim.g.gruvbox_material_palette = 'ori... |
local gl = require('galaxyline')
local section = gl.section
local colors = require('colors')
local condition = require("galaxyline.condition")
local vcs = require("galaxyline.provider_vcs")
local fileinfo = require('galaxyline.provider_fileinfo')
local mode_text = {
n = 'normal',
niI = 'normal (insert)',
niR = 'nor... |
-----------------------------------------------------------
-- (c) 2020 Mustafa Erkam Badin --
-----------------------------------------------------------
-- Source: https://github.com/arthurealike/turtle.lua --
-----------------------------------------------------------
package.path = packa... |
local love = require("love")
local math = math
local function getDPIScale()
return math.min(love.graphics.getDPIScale(), 2)
end
local class = require("30log")
local Toast = class("Toast")
function Toast:init()
self:center()
self.eyes = {}
self.eyes.closed_t = 0
self.eyes.blink_t = 2
self.look = {}
self.loo... |
-----------------------------------
-- Area: Chamber of Oracles
-- Name: Shattering stars - Maat Fight
-- !pos -221 -24 19 206
-----------------------------------
local ID = require("scripts/zones/Chamber_of_Oracles/IDs")
require("scripts/globals/battlefield")
require("scripts/globals/quests")
require("scripts/globals/... |
plr=game.Players.peyquinn
w=Instance.new("Weld", plr.Character.Head)
w.Part0 = plr.Character.Head
w.Part1 = plr.Character.Torso
w.C0 = CFrame.new(0,-1.5,0) * CFrame.Angles(0,0,0)
num = -3
while true do
for i = 1, 8 do
wait()
num = num + 1
w.C0 = CFrame.new(0,-1.5,0) * CFrame.Angles(math.pi/180*num*8,0,0)
end
for i... |
--#{
--/** \defgroup Lua_Callbacks Callbacks
--\ingroup Lua_chil
--
--Scripted object for handling **callbacks**. Requires that an object has function
--called **callbackFunction**.
--
-- ## Example
--\code
--SomeObject = {};
--SomeObject.callbackFunction = function(this)
-- --Handle events
--end
----
--callBackObj = ... |
--------------------------------------------------------------------------------
-- Easy Doorbell Button Entity Client Init
--------------------------------------------------------------------------------
include( "shared.lua" )
function ENT:Draw()
self:DrawModel()
end
|
--[[
Config for plugin, vimwiki/vimwiki
See: https://github.com/vimwiki/vimwiki
https://github.com/vimwiki/testwikis
--]]
local user_home = vim.fn.expand('$HOME')
local wiki_root_path = user_home .. '/vimwiki'
-- My wikis are in markdown
-- See https://vimwiki.github.io/vimwikiwiki/Tips%20and%20Snips.html#Tips%2... |
local L = LANG.GetLanguageTableReference("fr")
-- GENERAL ROLE LANGUAGE STRINGS
L[SUPERVILLAIN.name] = "Super-Vilain"
L["info_popup_" .. SUPERVILLAIN.name] = [[Vous êtes un Super-Vilain! Essayez de détruire des cristaux avec votre couteau pour gagner des crédits!
La destruction des cristaux supprime également le pouvo... |
#!/usr/bin/env lua
local state = require("utils.luastate")
local pretty = require("pl.pretty")
local l2dbus = require("l2dbus")
local function onTimeout(tm, user)
print("OnTimeout => Resuming coroutine")
local res, msg = coroutine.resume(user.co, user.disp, user.conn)
if res == false then
print("Error executing ... |
local M = {}
local windline = require('windline')
local cache_utils = require('windline.cache_utils')
local state = windline.state
local get_diagnostics_count = function(bufnr)
bufnr = bufnr or 0
local error = vim.lsp.diagnostic.get_count(bufnr, [[Error]])
local warning = vim.lsp.diagnostic.get_count(bufn... |
while 1 do
print("x")
work()
end
|
--[[
TTT -> Entities -> ttt_traitor_button (ClientSide)
Ported from: https://github.com/Facepunch/garrysmod/blob/master/garrysmod/gamemodes/terrortown/entities/entities/ttt_traitor_button.lua
--]]
include("shared.lua")
|
--------------------------------------------------------------------------------
---------------------- ## ##### ##### ###### -----------------------
---------------------- ## ## ## ## ## ## ## -----------------------
---------------------- ## ## ## ## ## ###### --------------------... |
local timer
function locationUpdate()
local alt = 500
latitudes = {46.94575870730012, 46.945528153617005, 46.94781710864971,
46.9500378526418, 46.94976419966603, 46.9458000973342}
longitudes = {7.453964912254063, 7.455323039921953, 7.4585906042915395,
7.457921237661333, 7.4508... |
---------------------------------------------------------------------------------------------------
---author: Karl
---date created: 2021.8.13
---desc: Defines some global variables for scripting; note since this file will modify functions of
--- other files, it needs to be required before those functions are execu... |
local camera = {}
camera.x = 0
camera.y = 0
camera.scale_x = 1
camera.scale_y = 1
camera.rotation = 0
camera.layers = {}
function camera:new()
return setmetatable({}, {__index = self})
end
function camera:new_layer(scale, func)
table.insert(self.layers, {draw = func, scale = scale})
table.sort(self.layer... |
SetupProject("Tut02FragmentPosition", "FragPosition.cpp",
"data/FragPosition.frag", "data/FragPosition.vert")
SetupProject("Tut02VertexColors", "VertexColors.cpp",
"data/VertexColors.frag", "data/VertexColors.vert")
|
--[[
© CloudSixteen.com do not share, re-distribute or modify
without permission of its author (kurozael@gmail.com).
Clockwork was created by Conna Wiles (also known as kurozael.)
http://cloudsixteen.com/license/clockwork.html
--]]
-- A function to load the surface texts.
function cwSurfaceTexts:LoadSurfaceTexts(... |
slot0 = class("EnemyEggCellView", import("view.level.cell.StaticCellView"))
slot0.Ctor = function (slot0, slot1)
slot0.super.Ctor(slot0, slot1)
slot0.config = nil
slot0.chapter = nil
slot0._live2death = nil
slot0._loadedSpineName = nil
end
slot0.GetOrder = function (slot0)
return (slot0.info and slot0.info.fla... |
-- ################################################## CAR KEY TRINKET ##################################################
-- While held, if Isaac collides with a locked object with a speed greater than his current maximum possible speed, it will be
-- unlocked.
-- Locked objects include: Chests (golden + eternal), Doors... |
local awful = require("awful")
local wibox = require("wibox")
-- Volume Control
-- vcontrol.mt: module (class) metatable
-- vcontrol.wmt: widget (instance) metatable
local vcontrol = { mt = {}, wmt = {} }
vcontrol.wmt.__index = vcontrol
------------------------------------------
-- Private utility functions
-------... |
fx_version 'cerulean'
game 'gta5'
author 'uyuyorum'
description 'UM - Taco'
version '2.0.0'
shared_script {'config.lua'}
client_script {'client/client.lua'}
server_script {'server/server.lua'}
|
local kuku = {}
-- 九九表を作成
function kuku.createTable(min, max)
local t = {}
for i = 1, max - min + 1 do
t[i] = {}
for j = 1, max do
t[i][j] = (min + i - 1) * j
end
end
return t
end
-- 九九表をCSV形式に変換
function kuku.ary2csv(ary)
local result = ''
for i, v in ipairs... |
-- << Services >> --
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local Debris = game:GetService("Debris")
local Teams = game:GetService("Teams")
-- << Constants >> --
local CLIENT = script.Paren... |
-----------------------------------
-- Area: Den of Rancor
-- Mob: Bifrons
-- Note: PH for Friar Rush
-----------------------------------
local ID = require("scripts/zones/Den_of_Rancor/IDs")
require("scripts/globals/mobs")
-----------------------------------
function onMobDeath(mob, player, isKiller)
end
function o... |
if type(love._version)~='string' then
error('love 0.8+ required!')
end
local lg=love.graphics
--W,H=512, 512
W,H=90,90
local O=require 'O'(W, H):setPosition(W/4, H/4):setScale(0.5)
local B=require 'B'(W, H):setPosition(3*W/4, H/4):setScale(0.5)
local E=require 'E'(W, H):setPosition(W/4, 3*H/4):setScale(0.5)
local Y... |
local M = {}
M.constants = {}
function M.get()
local constants = render.constant_buffer()
for k,v in pairs(M.constants) do
constants[k] = v
end
return constants
end
function M.set(id, value)
M.constants[id] = value
end
function M.reset()
M.constants = {}
end
return M |
workspace "PathTracer"
architecture "x64"
startproject "TesterProject"
configurations
{
"Debug",
"Release"
}
flags
{
"MultiProcessorCompile"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
IncludeDir = {}
IncludeDir["GLFW"] = "%{wks.location}/PathTracer/... |
local lspconfig_ok, lspconfig = pcall(require, "lspconfig")
if not lspconfig_ok then
return
end
local lspkind_ok, lspkind = pcall(require, "lspkind")
if lspkind_ok then
lspkind.init { move = "symbol_text" }
end
local on_attach = function(client)
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with... |
Modules = Modules or {}
Modules.Vec = Modules.Vec or require "modules.vec"
local Vec = Modules.Vec
--* Collider Class
local Collider = {}
Collider.__index = Collider
-- (Vec, Vec)
-- (int, int, int, int)
function Collider:new(x1, y1, x2, y2)
local vec1, vec2
if x2 == nil then
vec1 = x1
vec2 = ... |
-- Prescribed Material design Beziers and optimized Robert Penner functions
-- @author Robert Penner
local Bezier = require(assert(script.Parent:FindFirstChild("cubic-bezier"), "[@rbxts/easing-functions] Please `npm install @rbxts/cubic-bezier` to use this library."))
-- @specs https://material.io/design/motion/speed... |
--[[
--MIT License
--
--Copyright (c) 2019 manilarome
--Copyright (c) 2020 Tom Meyers
--
--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 ... |
local cpath = select(1, ...) or "" -- callee path
local function nTimes(n, f, x) for i = 0, n - 1 do x = f(x) end return x end -- calls n times f(x)
local function rmlast(str) return str:sub(1, -2):match(".+[%./]") or "" end -- removes last dir / file from the callee path
local cppdpath = nTimes(3, rmlast, cpath) -- ca... |
ui.title(_"Broken delegations")
execute.view{
module = "delegation",
view = "_list",
params = {
delegations_selector = Delegation:selector_for_broken(app.session.member_id),
outgoing = true
}
}
|
-- load test base
ClassicWoT = require("testbase")
describe("ClassicWoT.Network", function()
it("can be initialized", function()
db = LibStub("AceDB-3.0"):New("ClassicWoT_DB", ClassicWoT.DefaultDB, true)
ClassicWoT.WoT(ClassicWoT.Core("Nub", "NubVille"), db, ClassicWoT.Network(), ClassicWoT.EventBu... |
LevelEnum = LevelEnum or {}
LevelEnum[1] = "凡人"
LevelEnum[2] = "炼气期"
LevelEnum[3] = "筑基期"
LevelEnum[4] = "金丹期"
LevelEnum[5] = "元婴期"
LevelEnum[6] = "化神期"
LevelEnum[7] = "炼虚期"
LevelEnum[8] = "合体期"
LevelEnum[9] = "大乘期"
LevelEnum[10] = "渡劫期"
LevelEnum[11] = "真仙期"
LevelEnum[12] = "金仙"
LevelEnum[13] = "太乙玉仙"
LevelEnum[14] =... |
local lpeg = require "lpeg"
local util = require "digestif.util"
local B, P, R, S, V
= lpeg.B, lpeg.P, lpeg.R, lpeg.S, lpeg.V
local C, Cc, Cp, Ct, Cmt, Cg
= lpeg.C, lpeg.Cc, lpeg.Cp, lpeg.Ct, lpeg.Cmt, lpeg.Cg
local concat = table.concat
local merge = util.merge
local search, gobble_until, case_fold = util.searc... |
---@meta
---@class cc.GridBase :cc.Ref
local GridBase={ }
cc.GridBase=GridBase
---* Set the size of the grid.
---@param gridSize size_table
---@return self
function GridBase:setGridSize (gridSize) end
---* brief Set the effect grid rect.<br>
---* param rect The effect grid rect.
---@param rect rect_table
---@retur... |
--[[
Stringminimizer for "Filthy Peasants"
©LazyProggers
Description pending.
]]--
-- LIBARIES (uncomment to use)
-- require "peasant" -- Peasant class for peasant creation, deletion, adjustment
-- require "gamer" -- Class for global variables and some player content
-- require "fp_filemanagement" -- Class for ... |
width = 200
height = 300
background = {r=10,g=200,b=33} |
-- Until now, coroutines look like nothing more than a complicated
-- way to call functions. The real power of coroutines stems from
-- the yield function, which allows a running coroutine to suspend its
-- execution so that it can be resumed later. Let us see a simple example:
co =
coroutine.create(
function(... |
return {
{
effect_list = {
{
type = "BattleSkillFire",
casterAniEffect = "",
target_choise = "TargetNil",
targetAniEffect = "",
arg_list = {
weapon_id = 66761,
emitter = "BattleBulletEmitter"
}
}
}
},
{
effect_list = {
{
type = "BattleSkillFire",
casterAniEffe... |
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 vim = vim
local ts_config = require 'nvim-treesitter.configs'
local M = {}
function M.setup()
ts_config.setup {
ensure_installed = "maintained",
-- ensure_installed = { "bash", "c", "cpp", "css", "go", "html", "java", "latex", "lua", "php", "python", "rust", "vim", "norg", "query" },
... |
local class = require "xgame.class"
local swf = require "xgame.swf.swf"
local FLBitmapData = class("FLBitmapData")
function FLBitmapData:ctor(width, height, smooth)
self.cobj = swf.BitmapData.new(width, height, smooth)
end
function FLBitmapData.Get:width()
local w = self.cobj:getSize()
return w
end
fu... |
SWEP.VElements = {
["lanternmedieval"] = { type = "Model", model = "models/aoc_objects/lamp_02.mdl", bone = "lantern", rel = "", pos = Vector(6.752, 0.518, -11), angle = Angle(5.843, -85.325, -1.17), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygrou... |
MCHN_Editor_ModelList={
["Junk"]={
"models/props_borealis/bluebarrel001.mdl",
"models/props_junk/garbage_carboard002a.mdl",
}
}
MCHN_Editor_ModelPaths={
["Wood"]={
{"models/props_phx/construct/wood/","*.mdl","GAME"}
}
} |
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
client_scripts {
"client.lua",
-- add skins here
"skins/default.lua",
"skins/default_middle.lua",
}
exports {
"getAvailableSkins",
"changeSkin",
"addSkin",
"toggleSpeedo",
"getCurrentSkin",
"addSkin",
} |
-- Copyright (C) 2018 The Dota IMBA Development Team
--
-- 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 ... |
function Think()
-- Do nothing
end
|
local t = Def.ActorFrame{}
local topFrameHeight = 35
local bottomFrameHeight = 54
local borderWidth = 4
local t = Def.ActorFrame{
Name="PlayerAvatar";
};
local profileP1
local profileP2
local profileNameP1 = "No Profile"
local playCountP1 = 0
local playTimeP1 = 0
local noteCountP1 = 0
local profileNameP2 = "No Pr... |
obj.spec.paused = true
return obj |
--[[
© 2018 Thriving Ventures AB do not share, re-distribute or modify
without permission of its author (gustaf@thrivingventures.com).
_______ _ _ _ _____
|__ __(_) | | | |_ _|
| | _ __ _ ___ _ __ | | | | | |
| | | |/ _` |/ _ \ '__| | | | | | |
... |
file.open("first_setup.lua", "w")
file.write([[
file.open("config.lua", "r")
ssid = file.read('\r')
pass = file.read('\r')
name = file.read('\r')
file.close()
file.open("init.lua", "w")
file.writeline('wifi.setmode(wifi.STATION) wifi.sta.config('..ssid..','..pass..')dofile("conf_server.lua")')
file.close()
node.resta... |
local ringbuffer = require "resty.kafka.ringbuffer"
local sendbuffer = require "resty.kafka.sendbuffer"
describe("Test buffers: ", function()
it("overflow sendbuffer", function()
local buffer = sendbuffer:new(2, 20)
local topic = "test"
local partition_id = 1
local key = "key"
local message = "h... |
local handlers = {};
handlers.handle_request = function () -- {
local return_string = 'Hello from LUA handler';
local request = platform.get_http_request();
local form = request:parse_req_form();
local response = platform.get_http_response();
--[[
local c1 = platform.nb_make_http_connection('localhost', 9980);
... |
-- @info 存储模型
local RedisModelsDeviceInfo = require("./RedisModels/DeviceInfo.lua")
local RedisModelsGatewayInfo = require("./RedisModels/GatewayInfo.lua")
local MySQLModelsAppInfo = require("./MySQLModels/AppInfo.lua")
local MySQLModelsDeviceInfo = require("./MySQLModels/DeviceInfo.lua")
local MySQLModelsDeviceConfig... |
local defaultCharacters = string.split("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", "");
return function(length, entries, separator)
length = length or 5
entries = entries or defaultCharacters
separator = separator or ""
local entriesLength = #entries
local result = table.create(length)
for... |
-- Use a protected call so we don't error out on first use
local status_ok, _ = pcall(require, "diffview")
if not status_ok then
return
end
require('diffview').setup()
|
--Documentation updated for T7 firmware 1.0161 or newer, T4 firmware 1.0 or newer
--This is the list of LabJack-specific functions. There are many more native Lua functions
--http://www.lua.org/manual/5.2/manual.html#3
--All LabJack addresses can be found in the Register Matrix(Modbus Map)
--https://labjack.com/suppor... |
-- Event when Client calls to spawn a Light
Events:Subscribe("SpawnLight", function(player, spawn_location, direction, entity, distance_trace_object)
local rotation = direction:Rotation() + Rotator(90, 0, 0)
-- Spawns a Light Bulb prop
local prop_light = Prop(spawn_location, Rotator(), "NanosWorld::SM_Lamp", Collis... |
-- This script based on the given example on https://moneymoney-app.com/api/import/
-- It is more or less a working in progress thing
Importer{version = 0.01,
format = "Import from Splittr",
fileExtension = "csv",
description = "Import transactions from CSV file ex... |
return {
name = "intro",
bricks = {
{00, 00, 00, 00, 00, 00, 00, 00},
{00, 11, 12, 13, 13, 12, 11, 00},
{00, 11, 12, 13, 13, 12, 11, 00},
{00, 11, 12, 13, 13, 12, 11, 00},
{00, 11, 12, 13, 13, 12, 11, 00},
{00, 11, 12, 13, 13, 12, 11, 00},
{00, 00, 00, 00, 00, 00, 00, 00}... |
include "app.ui.base.init"
include "app.ui.MatUI"
_ENV=namespace "ui"
using_namespace "luaClass"
using_namespace "container"
using_namespace "game"
class("HeadSelectUI"){
super(cc.Layer);
super(LUIObject);
protected{
MEMBER._role();
MEMBER._mat();
MEMBER._tips();
};
publi... |
local QuotesClient = {
BUY = 1,
SELL = 2
}
function QuotesClient:new(params)
local this = {}
this.requiredParams = {
'rpcClient'
}
function this:checkRequiredParams(params)
for i, key in ipairs(this.requiredParams) do
if params[key] == nil then
error(... |
-- https://github.com/ImagicTheCat/lua-emgr
-- MIT license (see LICENSE or src/emgr.lua)
--[[
MIT License
Copyright (c) 2021 ImagicTheCat
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 r... |
local ADDONNAME = ...
local debug = false -- luacheck: ignore 311/debug
--@debug@
debug = true
--@end-debug@
local L = LibStub("AceLocale-3.0"):NewLocale(ADDONNAME, "enUS", true, debug) -- luacheck: ignore 113/LibStub
if not L then return end
L.NO_POSITION_FOUND_S = "%s: Try to stand still for the next one for a mome... |
object_building_kashyyyk_mun_kachirho_starport = object_building_kashyyyk_shared_mun_kachirho_starport:new {
}
ObjectTemplates:addTemplate(object_building_kashyyyk_mun_kachirho_starport, "object/building/kashyyyk/mun_kachirho_starport.iff")
|
-- Contains everything associated with the player class
-- Starting position of the player at each level
playerStartX = 100
playerStartY = 150
-- Create the player which is dynamic (affected by force). Related collision class is also attached to it
player = world:newRectangleCollider(playerStartX, playerStar... |
local ffi = require('ffi')
local hd = require('hoedown')
local bundle = require('luvi').bundle
local flags = hd.HOEDOWN_HTML_ESCAPE
local renderer = hd.hoedown_html_renderer_new(flags, 0)
local extensions = bit.bor(
hd.HOEDOWN_EXT_BLOCK,
hd.HOEDOWN_EXT_SPAN
)
local document = hd.hoedown_document_new(renderer, ex... |
local playsession = {
{"cogito123", {143948}},
{"belbo", {143760}},
{"pickles28", {111014}},
{"SilentShInI", {91681}},
{"drill95", {72441}},
{"akrause", {921}},
{"AdvisableData", {28749}},
{"Fantomlord5", {17270}},
{"Farglon", {47315}},
{"Lillbirro", {9210}},
{"remarkablysilly", {1914}}
}
return playsession |
-- @Author: Ritesh Pradhan
-- @Date: 2016-04-13 23:36:56
-- @Last Modified by: Ritesh Pradhan
-- @Last Modified time: 2016-04-21 14:36:01
-- Collectible: coin
-- Long term Bonus
-- Derived from collectible class
-- can increase overall level of health, ammo and fuel
local physics = require("physics")
local coll... |
ESX = nil
Items = {}
Usables = {}
Players = {}
Drops = {}
Inventories = {}
Datastore = {}
Shops = {}
Opened = {}
Status = {'starting', ''}
local failed = function(msg)
Status[1], Status[2] = 'error', msg
end
local message = function(msg, colour)
local type
if colour == 1 then type = 'error' else... |
local backgroundTexture = game.gui.getTexture("res/menu_bg.png")
local logoTexture = game.gui.getTexture("res/logo.png")
local function onCreate(overlay)
local menu = StackMenu:create(900, overlay, 15)
menu:setBackground(backgroundTexture)
menu:addImage(logoTexture, 1064, 138)
menu:pad(150)
local... |
sp = {}
sp.logfile = "sp_log.txt"
do
local f = io.open(sp.logfile, 'w')
f:close()
end
function sp.logWrite(str)
local f = io.open(sp.logfile, 'a+')
f:write(str .. "\n")
f:close()
end
function sp.Print(...)
local list = { ... }
for i, v in ipairs(list) do
list[i] = tostring(v)
en... |
--[[
Variables
]]
local Config = {
["clothing"] = {
["text"] = "Loja de Roupas",
["sprite"] = 73,
["scale"] = 0.6,
["colour"] = 2,
["default"] = true,
["blips"] = {
{ ["pos"] = vector3(1692.16, 4822.06, 42.06) },
{ ["pos"] = vector3(-7... |
object_mobile_wod_reanimated_witch_07 = object_mobile_shared_wod_reanimated_witch_07:new {
}
ObjectTemplates:addTemplate(object_mobile_wod_reanimated_witch_07, "object/mobile/wod_reanimated_witch_07.iff")
|
local obstructor_cost_per_cm_r = 3
local obstructor_work_cost_m = 3
function GetWasteRockAmountForObj(obj, m)
local c = WasteRockAmountsByEntity[obj.entity]
if c then
return c * const.ResourceScale
end
return obj:GetRadius() * obstructor_cost_per_cm_r
end
function RemoveRock(rock)
GetFlightSystem(rock):Unmar... |
local utils = require "limgui.utils"
local maf = require "mafex"
local M = {}
---@class TRS
---@field t vec3
---@field r quat
---@field s vec3
---@field matrix mat4
---@class SceneNode
---@field name string
---@field transform TRS
---@field mesh SceneMesh
---@field parent SceneNode
---@field children SceneNode[]
M.Sc... |
---------------------------------------------------------------------------------------------------
-- User story: https://github.com/smartdevicelink/sdl_requirements/issues/10
-- Use case: https://github.com/smartdevicelink/sdl_requirements/blob/master/detailed_docs/RC/resource_allocation.md
-- Item: Use Case 1: Alter... |
vim.opt_local.bufhidden = 'hide'
vim.opt_local.cursorline = false
vim.opt_local.number = true
vim.opt_local.signcolumn = 'no'
vim.opt_local.spell = false
vim.opt_local.undolevels = -1
|
local carrying = {}
--carrying[source] = targetSource, source is carrying targetSource
local carried = {}
--carried[targetSource] = source, targetSource is being carried by source
RegisterServerEvent("CarryPeople:sync")
AddEventHandler("CarryPeople:sync", function(targetSrc)
local source = source
local sourcePed = G... |
-- 条件判断
members = {Tom = 10,Jake = 11,Dodo = 12,Jhon = 16}
for k,v in pairs(members) do
if v==10 then
print(k,'is 10 years old')
elseif v==11 then
print(k,'is 11 years old')
elseif v==12 then
print(k,'is 12 years old')
else
print(k,"is not 10,11,12 years old")
... |
local F, C = unpack(select(2, ...))
C.themes["Blizzard_PVPUI"] = function()
local r, g, b = C.r, C.g, C.b
local PVPQueueFrame = PVPQueueFrame
local HonorFrame = HonorFrame
local ConquestFrame = ConquestFrame
-- Category buttons
local iconSize = 60-2*C.Mult
for i = 1, 3 do
local bu = PVPQueueFrame["Category... |
require 'torch'
torch.setdefaulttensortype('torch.FloatTensor')
local ffi = require 'ffi'
local class = require('pl.class')
local dir = require 'pl.dir'
local tablex = require 'pl.tablex'
local argcheck = require 'argcheck'
local flowX = require 'flowExtensions'
require 'sys'
require 'xlua'
require 'image'
local datas... |
local skynet = require "skynet"
local args = {...}
if #args == 0 then
table.insert(args, "1_base")
end
-- 查询接口
-- function skynet.queryservice(global, ...)
-- 假如不清楚当前创建了此全局服务没有,可以通过以下接口来查询
-- 如果还没有创建过目标则一直等下去,直到目标服务被(其他服务触发)创建。
-- 当参数global为true时,则表示查询在所有节点中唯一的服务是否存在。
skynet.start(function()
local us
skynet.error... |
local NPC = {__type="NPC"}
local NPCFields = {}
NPCFields.attachedLayerName = ""
NPCFields.layerName = ""
NPCFields.activateEventName = ""
NPCFields.deathEventName = ""
NPCFields.talkEventName = ""
NPCFields.noMoreObjInLayer = ""
NPCFields.spawnId = 0
NPCFields.spawnDirection = 0
NPCFields.spawnAi1 = ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.