content stringlengths 5 1.05M |
|---|
require("sdurw_core")
require("sdurw")
using("sdurw_core")
require("sdurw_math")
using("sdurw_math")
if Quaternion == nil then
Quaternion = Quaternion_d
end
quat = Quaternion(math.sqrt(2)/2,math.sqrt(2)/2,0,0);
print("Quaternion: " .. tostring(quat))
rotationFromQuat = quat:toRotation3D();
print("Rotation from Qua... |
--[[
ItemSystems.LootFactoryAdapter
================
Replaces the drop function from StandardCombo's loot factory and in its place registers our loot drop function.
]]
_G["standardcombo.NPCKit.LootDropFactory"] = {}
-- Wait for the loot factory to register the drop function to the global table and replac... |
local pandoc=require("pandoc")
-- Only targets HTML for now.
if FORMAT:match "html" then
-- Converts a link text to a pandoc Link element.
--
-- The link text excludes the surrounding [[]]. Treats link text like
-- "foobar" as if it was `[foobar](foobar.html)`. Or
-- "foobar#fragment|description" as `[descr... |
-- Set Default Prefix.
-- Note: You can set a prefix per lsp server in the lv-globals.lua file
local M = {}
function M.setup()
local config = { -- your config
virtual_text = rvim.lsp.diagnostics.virtual_text,
signs = rvim.lsp.diagnostics.signs,
underline = rvim.lsp.diagnostics.underline,
update_in_in... |
-------------------------------------------------------------------------
-- Created by Adriano Spadoni
-- alte_br@hotmail.com
-- CoronaSDK was used for this game.
-------------------------------------------------------------------------
require( "core.utils" )
local testEnabled = true
-- run unittest before run the... |
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf/protobuf"
local LONGZHIGU_PB = require("longzhigu_pb")
local ROLETYPE_PB = require("RoleType_pb")
module('CreateRoleNew_pb')
CREATEROLENEWARG = protobuf.Descriptor();
local CREATEROLENEWARG_TYPE_FIELD = protobuf.FieldDescriptor();
local CRE... |
--[[
Copyright 2015 MongoDB, Inc.
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 in writing, software
... |
return {
id = "WorldG006",
events = {
{
alpha = 0.3,
code = {
"clickBtn"
},
style = {
text = "点击打开仓库",
mode = 2,
posY = -229.8,
dir = 1,
posX = 491.03
},
ui = {
path = "OverlayCamera/Overlay/UIMain/top/right_stage/dock/inventory_button",
pathIndex = -1,
triggerT... |
local BonusMediator = class("BonusMediator",BaseMediator)
local DailyUI = App.RequireHall("view.bonus.DailyUI")
local VipUI = App.RequireHall("view.bonus.VipUI")
local InviteUI = App.RequireHall("view.bonus.InviteUI")
local InviteDetailUI = App.RequireHall("view.bonus.InviteDetailUI")
function BonusMediator:OnRegister... |
-- Aggregate the output from ngrams.lua.
-- Get the data from all shards.
counts = {}
dofile("/tmp/lua-output")
-- Put the data into a sortable "array".
countArray = {}
for ngram, count in pairs(counts) do
table.insert(countArray, {count, ngram})
end
-- Sort the data.
function compare(a, b)
return a[1] > b[1]
en... |
slideParticle = entity:extend()
function slideParticle:new(x, y, side)
slideParticle.super.new(self)
self.transform.y = y
self.transform.x = x
self:setRectangleCollision(2, 8)
self.tex = loader.get("particles")
self.anim = anim8.newAnimation(loader.get("slide_particle_grid")("1-3",1), 1/10)
self... |
return {'jharap'} |
local yaml = require("yaml")
local fiber = require("fiber")
local log = require("log")
local _
local util = {}
-- token bucket rate limiter
function util.rate_limited(fn, rate, burst, initial_burst)
assert(rate > 0, "rate must be > 0")
assert(rate < 1000, "too high rate, this will not work well")
assert(b... |
-- language specific higlights
local lush = require("lush")
local base = require("apprentice.base")
local M = {}
M = lush(function()
return {
elixirDocString {base.Comment},
elixirStringDelimiter {base.ApprenticeGreen},
elixirInterpolationDelimiter {base.ApprenticeAqua},
elixirModuleDeclaration {bas... |
-- Node class abstraction
local class = require 'class'
local Node = class {distance = math.huge}
Node.__eq = function(a, b) return a:isEqualTo(b) end
Node.__lt = function(a, b) return a.distance < b.distance end
Node.__tostring = function(n) return n:toString() end
return Node
|
local ffi = require "ffi"
local ffi_new = ffi.new
local ffi_str = ffi.string
local ffi_load = ffi.load
local ffi_cdef = ffi.cdef
local C = ffi.C
local os = ffi.os
local tonumber = tonumber
local setmetatable = setmetatable
local package_searchpath = package.searchpath... |
require "Technology/Technology"
Technology_Unit_Warrior = Technology:new()
function Technology_Unit_Warrior:new(o)
o = o or {}
setmetatable(o, self)
self.__index = self
self.name = "Warrior"
self.cost_production = 4
self.cost_gold = 8
self.icon = image_ui_icon_unit_settler
return o
en... |
local obstacleFilter = {}
local util = require'util'
local mod_angle = util.mod_angle
require'wcm'
local function observation_ra(self, r1, a1, rErr, aErr)
local rErr = rErr
local aErr = aErr
local rvar1 = rErr^2
local avar1 = aErr^2
local dr = r1 - self.r
self.r = self.r + (self.rvar * dr)/(self.rvar +... |
--A・ジェネクス・トライアーム
function c17760003.initial_effect(c)
aux.AddMaterialCodeList(c,68505803)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,68505803),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--mat check
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetC... |
-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
-- Widget created by Yssaril
local AceGUI = LibStub("AceGUI-3.0")
local Media = LibStub("LibSharedMedia-3.0")
do
local min, max, floor = math.min, math.max, math.floor
local fixlevels = AceGUISharedMediaWidgets.fixlevels
local OnItemValue... |
return
{
"updates.early-logistics",
"updates.fragile-burners"
} |
Omen3DB = {
["profileKeys"] = {
["牛爹爹 - 屠魔山谷"] = "牛爹爹 - 屠魔山谷",
["雄奶奶 - 森金"] = "雄奶奶 - 森金",
["独孤牛儿 - 森金"] = "独孤牛儿 - 森金",
},
["profiles"] = {
["牛爹爹 - 屠魔山谷"] = {
["Shown"] = false,
["PositionY"] = 459,
["PositionX"] = 570.166687011719,
},
["雄奶奶 - 森金"] = {
["PositionY"] = 574.4999389648438,
["... |
require('niftyutil')
Data:Read('c:\\data\\t.dcm')
readdicom('c:\\data\\t.dcm')
--print(1)
a = DicomObject:new()
a:Read([[c:\users\marcel\DeskTop\1.dcm]])
function printdicom(a, level)
level = level or 1
local names,types,groups,elements = a:ListItems()
names = split(names, '|')
types = split(types, '|')
gr... |
--[Made by Jozeni00]--
print("Jozeni00\'s Data Serializer 2.0 loaded.")
--[[
[API]
----------------------------------------------------------------------------------
--[DataSerializer]--
PROPERTIES:
*dictionary* DataSerializer.DataStores
A dictionary list of DataStores in use.
METHODS:
*DataStore* DataSe... |
function launchApp(basicKey, object)
hs.hotkey.bind(basicKey, object.key, function()
hs.application.launchOrFocus(object.app)
local application = hs.application.get(object.app)
if application ~= nil then
local window = application:focusedWindow()
-- if window ~= nil t... |
DoReady.Priest.Discipline.MythicPlus.Tyrannical.Legendarys = {
[1] = 356395,
[2] = 336011,
[3] = 336897,
[4] = 356392,
[5] = 336067,
[6] = 356390,
[7] = 336133,
[8] = 339344,
[9] = 341804,
[10] = 356391,
}
DoReady.Priest.Discipline.MythicPlus.Tyrannical.Talents = {
[1] = 265259,
[2] = 121536,
[3] = 129250,
[4] = 204263... |
g_PluginInfo = {
Name = PLUGIN,
Date = "2016-11-17",
Description = "Simple Job plugin with Coin rewards.",
-- Information about plugin.
AdditionalInfo = {
{
Title = PLUGIN .. " Plugin",
Contents = "Get rewarded for playing!",
},
},
-- Plugin commands.
Commands = {
["/job"]... |
--[[
----------------------------------------------------------------------------------------------------
SUNCALC.LUA
raiguard
v2.0.2
This script is a form of 'SunCalc' by mourner, translated to LUA and adapted for Rainmeter
The original source code of SunCalc can be found at https://github.com... |
--[[
Copyright (c) 2010-2013 Matthias Richter
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
to use, copy, modify, merge, publish, dis... |
--[[
NUI
]]
RegisterNUICallback("accountInformation", function()
local _cid = exports["caue-base"]:getChar("id")
local _accountid = exports["caue-base"]:getChar("bankid")
local _phone = exports["caue-base"]:getChar("phone")
local _cash = RPC.execute("caue-financials:getCash")
local _bank = RP... |
--[[
Hyperion LUA Library
class.lua: see http://lua-users.org/wiki/SimpleLuaClasses
Compatible with Lua 5.1 (not 5.0).
--]]
function class(base,ctor)
local c = {} -- a new class instance
if not ctor and type(base) == 'function' then
ctor = base
base = nil
elseif type(base) == 'table' then
... |
local crypto = require('_crypto')
local fs = require('fs')
local path = require('path')
local message1 = 'This message '
local message2 = 'will be signed'
local message = message1 .. message2
local ca_path = path.join(__dirname, 'ca')
local RSA_PUBLIC_KEY = fs.readFileSync(path.join(ca_path, 'server.pub'))
local RSA_... |
SEEDS = {
addr = ITEMS_BASE_ADDR + 0x90,
checks = {
[0x00] = "water_seed",
[0x01] = "earth_seed",
[0x02] = "wind_seed",
[0x03] = "fire_seed",
[0x04] = "light_seed",
[0x05] = "dark_seed",
[0x06] = "moon_seed",
[0x07] = "tree_seed",
}
}
MAGIC = {... |
local ffi = require 'ffi'
local class = require 'ext.class'
local file = require 'ext.file'
local gl = require 'ffi.OpenGL'
local GLTex2D = require 'gl.tex2d'
local Draw = require 'hydro.draw.draw'
local DrawVectorLIC = class(Draw)
DrawVectorLIC.integralMaxIter = 10
--[[
the xmin/xmax/ymin/ymax passed as arguments ... |
-- Copyright (c) 2015-present, 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.
local List = requi... |
require 'objects/button'
require 'objects/mapList'
Songselect = {}
local bigFont, smallFont, smallestFont
local playButton, backButton, randomButton, modsButton
local modsHiddenButton, modsHalfSpeedButton, modsDoubleSpeedButton, modsHiddenButton, modsFlashlightButton, modsNoFailButton, modsAutoButton
function Song... |
local nlua_nvim_lsp = {}
--- Returns command to run the language server
-- @param lsp_path absolute path to the ls folder, defaults to the one used by `:LspInstall``
local sumneko_command = function(lsp_path)
if lsp_path and string.sub(lsp_path, 1, 1) == '~' then
lsp_path = vim.fn.expand(lsp_path)
end
lsp_p... |
---#if VERSION ~= 5.2 then DISABLE() end
---@meta
---@version 5.2
---#DES 'bit32'
---@class bit32lib
bit32 = {}
---#DES 'bit32.arshift'
---@param x integer
---@param disp integer
---@return integer
function bit32.arshift(x, disp) end
---#DES 'bit32.band'
---@return integer
function bit32.band(...) end
---#DES 'b... |
ITEM.name = "Shotgun Shells"
ITEM.model = "models/Items/BoxBuckshot.mdl"
ITEM.ammo = "buckshot" -- type of the ammo
ITEM.ammoAmount = 30 -- amount of the ammo
ITEM.description = "A Box of %s Shotgun Shells"
ITEM.chance = 37
|
-- Copyright 2019-2020 Kong Inc.
-- 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 in writ... |
local function get_script_name()
local token = '@@LUA_SCRIPT_FILENAME@@'
return string.match(token, '%[%[(.+)%]%]')
end
local script_name = get_script_name()
local root = resolve_filename('../', script_name)
package.path = root .. '/src/?.lua;' .. root .. '/src/?/init.lua'
local timer = require 'timer'
local ... |
#!/usr/local/bin/lua
--
--------------------------------------------------------------------------------
-- File: t_ex04.lua
--
-- Usage: src/t_ex04.lua
--
-- Description:
--
-- Options: ---
-- Requirements: ---
-- Bugs: ---
-- Notes: ---
-- Author: YOUR NAME (), <>
--... |
local match = {
x86 = 32,
x64 = 64
}
local detected_arch = require("bitness")()
print("Detected arch is "..tostring(detected_arch))
print("APPVEYOR?", os.getenv("APPVEYOR"))
print("TRAVIS?", os.getenv("TRAVIS"))
print("PLATFORM?", os.getenv("PLATFORM"))
if os.getenv("APPVEYOR") then
local os_arch = os.getenv("PLA... |
require('areas')
local eka = Area:new(4, 53)
eka:set_custom_map_id("eka")
eka:set_extra_description_sid("TILE_EXTRA_DESCRIPTION_EKA")
eka:insert()
|
return {'uli','uliga','ulijn'} |
module(..., package.seeall)
local _W = display.contentWidth
local _H = display.contentHeight
local widget = require 'widget'
local storyboard = require( "storyboard" )
local customText = require 'gameLogic.customText'
local scoreDictionary = {}
function new(soundEffect)
local group = display.newGroup()
local func... |
function util.RegisterEntity(class, callback, path)
ENT = {}
ENT.Base = "base_entity"
ENT.Type = "anim"
ENT.Author = "Beelzebub"
ENT.Contact = "beelzebub@incredible-gmod.ru"
ENT.Category = "incredible-gmod.ru"
callback(ENT)
pcall(AddCSLuaFile, path and path .."cl.lua" o... |
local json=require"dkjson"
local copas=require"copas"
local ws=require"ws"
local mplayer=require"mplayer"
local function choose(query, list)
while true do
for i=1,#list do print(i,list[i]) end
io.write(query..": ")
local at=tonumber(io.read())
if list[at] then return list[at] end
end
end
local app_n... |
function init()
object.setInteractive(true)
animator.setAnimationState("sway", "stop")
end
function onInteraction(args)
animator.setAnimationState("sway", "sway1")
end
|
markers =
{
-- Low End
{x = 2131.8516, y = -1149.7815, z = 24.2298, r = 0, t = "Low End", p = Vector3(2125.0593, -1136.9047, 25.3666), c = Vector3(2121.704, -1121.803, 29.597)}, -- Jefferson
{x = 1658.4023, y = 2199.8137, z = 10.8203, r = 270, t = "Low End", p = Vector3(1658.473, 2192.307, 10.616), c = Vector3(1651... |
-----------------------------------
-- Area: Windurst Waters
-- NPC: Shohrun-Tuhrun
-- Standard Merchant NPC
-- Confirmed shop stock, August 2013
-----------------------------------
require("scripts/globals/shop")
local ID = require("scripts/zones/Windurst_Waters/IDs")
-----------------------------------
function onT... |
-- -*- Mode: Lua; -*-
--
-- cli-match.lua Implements the cli commands 'match' and 'grep'
--
-- © Copyright IBM Corporation 2017.
-- LICENSE: MIT License (https://opensource.org/licenses/mit-license.html)
-- AUTHOR: Jamie A. Jennings
l... |
function Handler(func,target,para)
if para ~= nil then
return function(...)
return func(target,para,...)
end
else
return function(...)
return func(target, ...)
end
end
end
function removeAllChild(parent)
local tran = parent.transform
if tr... |
---@class ISPlayerData
ISPlayerData = {}
function getPlayerData(id)
return ISPlayerData[id+1];
end
function removeInventoryUI(id)
local data = getPlayerData(id);
if data == nil then return end;
if data.playerHotbar ~= nil then
data.playerHotbar:removeFromUIManager();
end
if data.playe... |
--
-- Copyright (c) 2020 Tim Winchester
--
-- 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 to
-- use, copy, modify, merge, publ... |
---
--- GlobalEvents.lua
---
--- Copyright (C) 2018 Xrysnow. All rights reserved.
---
local mbg = require('util.mbg.main')
---@class mbg.GlobalEvents
local GlobalEvents = {}
mbg.GlobalEvents = GlobalEvents
local function _GlobalEvents()
---@type mbg.GlobalEvents
local ret = {}
ret.Frame = 0
ret.JumpE... |
local Audio =
{
currentSlot = nil;
init = false;
Properties =
{
MasterVolume = {default = EntityId()},
GameSounds = {default = EntityId()},
Music = {default = EntityId()},
Voice = {default = EntityId()},
UnitSpeech = {default = EntityId()},
UnitSpeechOff = {default = EntityId()},
UnitSpeechEvents = {... |
require("prototypes.recipe.module")
local recipes = {}
-- Nuclear robots
local nuclear_flying_robot_frame = util.table.deepcopy(data.raw["recipe"]["flying-robot-frame"])
nuclear_flying_robot_frame.name = "nuclear-flying-robot-frame"
nuclear_flying_robot_frame.result = "nuclear-flying-robot-frame"
nuclear_flying_robot... |
local K, C, L = unpack(KkthnxUI)
local Module = K:GetModule("ActionBar")
local _G = _G
local math_min = _G.math.min
local math_ceil = _G.math.ceil
local table_insert = _G.table.insert
local cfg = C.Bars.Bar4
local margin, padding = C.Bars.BarMargin, C.Bars.BarPadding
function Module:SetupCustomBar(anchor)
local num... |
local m = {}
--I needed some bitwise operations, but I didn't want
--to add a dependency yet.
--https://web.archive.org/web/20171210075137/https://stackoverflow.com/questions/5977654/lua-bitwise-logical-operations/25594410
function m.bxor(a,b)--Bitwise xor
local p,c=1,0
while a>0 and b>0 do
local ra,r... |
object_tangible_food_generic_dish_travel_biscuits = object_tangible_food_generic_shared_dish_travel_biscuits:new {
}
ObjectTemplates:addTemplate(object_tangible_food_generic_dish_travel_biscuits, "object/tangible/food/generic/dish_travel_biscuits.iff")
|
local toggle = require ('util.toggle')
local pi = require ('util.panel_item')
local beautiful = require ('beautiful')
local dpi = beautiful.xresources.apply_dpi
local wibox = require ('wibox')
local gamer = toggle {
img = 'game.svg',
on_cmd = [[rfkill block $(rfkill | awk '// {if($2!="TYPE") print $2}') && notif... |
local VORPCore = {}
Citizen.CreateThread(function()
while not VORPCore do
TriggerEvent("getCore", function(core)
VORPCore = core
end)
Citizen.Await(200)
end
end)
RegisterNetEvent("vorp:SelectedCharacter") -- NPC loads after selecting character
AddEventHandler("vorp:... |
object_tangible_furniture_house_cleanup_cts_scylla_box_unrestricted = object_tangible_furniture_house_cleanup_shared_cts_scylla_box_unrestricted:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_house_cleanup_cts_scylla_box_unrestricted, "object/tangible/furniture/house_cleanup/cts_scylla_box_unrestricted... |
Ball=Class{}
function Ball:init(x,y,width,height)
self.x=x
self.y=y
self.width=width
self.height=height
self.dx=math.random(2)==1 and 100 or -100
self.dy=math.random(-50,50)
end
function Ball:collides(paddle)
if self.x > paddle.x+paddle.width or paddle.x > ball.x+ball.width then
re... |
local naughty = require('naughty')
local beautiful = require('beautiful')
local gears = require('gears')
local wibox = require('wibox')
local icons = require('theme.icons')
local awful = require('awful')
local dpi = require('beautiful').xresources.apply_dpi
-- Defaults
naughty.config.defaults.ontop = true
naughty.conf... |
local M = { _NAME = "uri.rtsp" }
local Util = require "uri._util"
local HttpURI = require "uri.http"
Util.subclass_of(M, HttpURI)
function M.default_port () return 554 end
return M
-- vi:ts=4 sw=4 expandtab
|
local Class = require'libs.hump.class'
local Timer = require'libs.hump.timer'
StPlayerAttacking = Class {
__includes = StBase
}
function StPlayerAttacking:init(obj)
self = StBase.init(self,obj)
self.name = 'attack'
return self
end
function StPlayerAttacking:enter()
local obj = self.obj
if not... |
return {'nylon','nylonkous','nylonweefsel','nylonkoord','nylongrondstof','nylondraad','nylonkousen','nylons','nylonweefsels','nylonkoorden','nylondraden','nylondraadje'} |
--proc/comdlg/filedialogs: standard open and save file dialogs.
setfenv(1, require'winapi')
require'winapi.comdlg'
OFN_READONLY = 0x00000001
OFN_OVERWRITEPROMPT = 0x00000002
OFN_HIDEREADONLY = 0x00000004
OFN_NOCHANGEDIR = 0x00000008
OFN_SHOWHELP = 0x000... |
-- exploding
function explode(div,str) -- credit: http://richard.warburton.it
if (div=='') then return false end
local pos,arr = 0,{}
-- for each divider found
for st,sp in function() return string.find(str,div,pos,true) end do
table.insert(arr,string.sub(str,pos,st-1)) -- Attach chars left of current divid... |
combatControlsButton = nil
combatControlsWindow = nil
fightOffensiveBox = nil
fightBalancedBox = nil
fightDefensiveBox = nil
chaseModeButton = nil
safeFightButton = nil
whiteDoveBox = nil
whiteHandBox = nil
yellowHandBox = nil
redFistBox = nil
mountButton = nil
pvpModesPanel = nil
fightModeRadioGroup = nil
pvpModeRadio... |
return {
commit = 'fd82038eabb5d4d2501fe77c29f78d149a0040fe',
date = 'Thu Feb 27 16:39:44 2020 +0800',
} |
local Hack = {
nId = 20161217,
strName = "Hide Trackers in Combat",
strDescription = "Hides all but the Public Event Tracker when you're in combat",
strXmlDocName = nil,
tSave = {},
}
function Hack:Initialize()
self.strEventTracker = Apollo.GetString("PublicEventTracker_PublicEvents")
self.addonObjective... |
#!/usr/bin/lua
-- Test for the logsvg module, which converts a list of time-stamped
-- logs to an SVG with proportional time display. For now this is
-- exposed as a web service to allow simpler incremental development.
local uv = require('lluv')
local webserver = require('lib.webserver')
local mixin = r... |
local awful = require('awful')
local wibox = require('wibox')
local gears = require('gears')
local beautiful = require('beautiful')
local dpi = beautiful.xresources.apply_dpi
local music_func = {}
screen.connect_signal('request::desktop_decoration', function(s)
-- Set music box geometry
local music_box_margin = dpi... |
local BaseDao = require "kong.dao.cassandra.base_dao"
local query_builder = require "kong.dao.cassandra.query_builder"
local consumers_schema = require "kong.dao.schemas.consumers"
local Consumers = BaseDao:extend()
function Consumers:new(properties)
self._table = "consumers"
self._schema = consumers_schema
Co... |
--------------------------------------------------------------------------------
-- TODO List:
-- - Check Fulminating and Succulent Lasher timers after the first sets
--------------------------------------------------------------------------------
-- Module Declaration
--
local mod, CL = BigWigs:NewBoss("Agronox", 1... |
--New Content
--Children folder includes
includeFile("custom_content/building/serverobjects.lua")
includeFile("custom_content/draft_schematic/serverobjects.lua")
includeFile("custom_content/installation/turret/serverobjects.lua")
includeFile("custom_content/intangible/serverobjects.lua")
includeFile("custom_content/m... |
s(1.5)
w ""
c "One at a time"
c "please!"
w ""
w "Sorry, we can only"
w "cope with one"
w "person"
c "$ex" |
local Modules = game:GetService("CorePackages").AppTempCommon
local Action = require(Modules.Common.Action)
return Action(script.Name, function(deviceLayout)
return {
deviceLayout = deviceLayout,
}
end) |
local Application = dofile(_G.spoonPath.."/application.lua")
return Application:new("Home")
|
local utils = require("user.plugins.config.telescope.utils")
local file_sorter = utils.file_sorter
local dropdown = utils.dropdown
-- Custom telescope pickers
local M = {}
-- List files in specified directories with pre-filtering
M.dir_nvim = function()
local opts = {
cwd = CONFIG_PATH,
prompt_tit... |
local function InitializeCreateDialog()
local function CreateList(self, listName)
listName = Auctionator.ShoppingLists.GetUnusedListName(listName)
Auctionator.ShoppingLists.Create(listName)
Auctionator.EventBus
:RegisterSource(self, "ShoppingLists.CreateDialog")
:Fire(
self,
... |
local radioMenu = false
local isLoggedIn = false
local onRadio = false
local RadioChannel = 0
RegisterNetEvent('QBCore:Client:OnPlayerLoaded')
AddEventHandler('QBCore:Client:OnPlayerLoaded', function()
isLoggedIn = true
end)
RegisterNetEvent('QBCore:Client:OnPlayerUnload')
AddEventHandler('QBCore:Client:OnPlayerU... |
--[[ ref: https://riptutorial.com/lua/topic/4475/variadic-arguments --]] |
--libspng LuaJIT binding.
--Written by Cosmin Apreutesei. Public Domain.
if not ... then require'libspng_demo'; return end
local bit = require'bit'
local ffi = require'ffi'
require'libspng_h'
local C = ffi.load'spng'
--given a row stride, return the next larger stride that is a multiple of 4.
local function pad_str... |
local PLUGIN = PLUGIN
PLUGIN.name = "Talking NPCs (Enhanced)"
PLUGIN.author = "Black Tea (NS 1.0), Neon (NS 1.1). Edited by Chancer."
PLUGIN.desc = "Adding talking NPCs."
PLUGIN.chatDelay = { min = .5, max = 1 }
PLUGIN.defaultDialogue = {
npc = {
["_start"] = "Hello.",
["how"] = "Same old, same old.",
["!quest"]... |
local Base = GMethod.loadScript("game.GameLogic.LogicTemplates.BaseTemplate")
-- 物品/属性通用模块
GMethod.loadScript("game.GameLogic.LogicTemplates.ItemImplements")
-- 花费/条件通用模块
GMethod.loadScript("game.GameLogic.LogicTemplates.CostImplements")
-- 时间滚动通用模块
GMethod.loadScript("game.GameLogic.LogicTemplates.TimeImplements")
--... |
--[[
Description: Manage observers
Author: M.Wan
Date: 04/14/2014
]]
local Observer = class("Observer")
function Observer:ctor(sender, callback, ...)
self._sender = sender
self._callback = callback
self._params = {...}
end
--[[ Seems that passing nil in "notify" function will cause exception. todo ]]
function ... |
local PlayerController = require "me.strangepan.games.mazerino.common.PlayerController"
local CommandMap = require "me.strangepan.games.mazerino.common.CommandMap"
local assert_that = require "me.strangepan.libs.truth.v1.assert_that"
local class = require "me.strangepan.libs.util.v1.class"
local CommandType = require "... |
RegisterClientScript()
function timer.Sleep(ms)
local co, main = coroutine.running()
assert(not main, "must be called from a coroutine")
timer.Create(ms, function () assert(coroutine.resume(co)) end)
coroutine.yield()
end
|
--
-- LEVEL 1 - Wood
-------------------------------------
crafting.register_recipe({
type = "inv",
output = "toolbench:lvl1",
items = { "group:wood 4", "group:stick 2", "gear:wood" },
level = 1,
always_known = true,
})
crafting.register_recipe({
type = "tools",
output = "pick:wood",
items = { "group:wo... |
vim.g.SignatureMap = {
Leader = 'm',
PlaceNextMark = '',
ToggleMarkAtLine = 'm.',
PurgeMarksAtLine = 'm-',
DeleteMark = 'dm',
PurgeMarks = 'm<Space>',
PurgeMarkers = 'm<BS>',
GotoNextLineAlpha = '',
GotoPrevLineAlpha = '',
GotoNextSpotAlpha = '',
GotoPrevSpotAlpha = '',
GotoNextLineByPos = '',
... |
local K, C = unpack(KkthnxUI)
local Module = K:GetModule("Skins")
function Module:ReskinSpy()
if not C["Skins"].Spy then
return
end
if not K.CheckAddOnState("Spy") then
return
end
if Spy_MainWindow.Background then
Spy_MainWindow.Background:StripTextures()
Spy_MainWindow.Background:CreateBorder()
Spy_M... |
local M = {}
-- Attributes and their validation rules
M.attributes = {
{id = "safe"},
{body = "safe"},
{author_id = "safe"},
{post_id = "safe"}
}
M.db = {
key = 'id',
table = 'comment'
}
M.relations = {
post = {relation = "BELONGS_TO", model = "post", attribute = "post_id"},
author = {relation = "BELONGS_TO"... |
---获取大小宽高,或者宽高的一半
--常用代码段,用于返回不需要处理的node , #if not node then return nil end#
--获取大小的方法对于gui也适用。
SIZE = function(node)
if not node then return nil end
local size = node:getContentSize()
if size.width == 0 and size.height == 0 then
local w,h = node:getLayoutSize()
return cc.size(w,h)
else
return size
end
... |
local composer = require( "composer" )
local scene = composer.newScene()
local widget = require( "widget" )
local utility = require( "utility" )
local params
local function handleButtonEvent( event )
if ( event.phase == "began" ) then
audio.play(buttonToggle, { channel = 7 } )
elseif ( event.phase ... |
object_tangible_furniture_ep3_rewards_wke_windchime = object_tangible_furniture_ep3_rewards_shared_wke_windchime:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_ep3_rewards_wke_windchime, "object/tangible/furniture/ep3_rewards/wke_windchime.iff")
|
----------------------------------
-- Area: Windurst Walls
-- NPC: Selulu
-- Type: Item Deliverer
-- !pos 58.027 -2.5 -60.548 239
--
-----------------------------------
local ID = require("scripts/zones/Windurst_Walls/IDs");
-----------------------------------
function onTrade(player,npc,trade)
end;
function onTrigg... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.