content stringlengths 5 1.05M |
|---|
LoveUI.require("LoveUIActionCell.lua")
LoveUI.ButtonCell=LoveUI.ActionCell:new()
function LoveUI.ButtonCell:init(view, image, ...)
-- e.g local o=LoveUI.Object:alloc():init();
LoveUI.ActionCell.init(self, view, ...);
self.image=image
self.mouse_is_down=false
self.key_is_down=false
self.alternateImage=self.image;... |
--[[ =========== Start:: Large_Drone_Station:: Add Entities ========== --]]
local mod_name = "Large_Drone_Station"
local steamID = "1771215962"
-- local author = "RustyDios, ChoGGi"
-- local version ="3"
--[[ =========== Start:: Add Entities ========== --]]
-- list of entities we're going to be adding
loca... |
local Color1 = color(Var "Color1");
local t = Def.ActorFrame {
LoadActor(Var "File1") .. {
OnCommand=function(self)
self:xy(SCREEN_CENTER_X,SCREEN_CENTER_Y)
self:scale_or_crop_background()
self:diffuse(Color1)
-- The playback rate in the simfile is used to set the update rate
-- on the ActorFrame, bu... |
-------------------------------------
-- NeoLua Client for ComputerCraft --
-- --
-- version 1.0 by Twometer --
-------------------------------------
args = {...}
if args[1] == nil then
print("Usage: neolua <script_name>")
return
end
serverUrl = "https://your-server-u... |
ITEM.name = "Panzerfaust 3 Rocket"
ITEM.model = "models/weapons/w_panzerfaust3_sandstorm_projectile.mdl"
ITEM.ammo = "PanzerFaust3 Rocket" -- type of the ammo
ITEM.ammoAmount = 1 -- amount of the ammo
ITEM.width = 2
ITEM.description = "panzerfaustammoDesc"
-- ITEM.iconCam = {
-- ang = Angle(-0.70499622821808, 268.2543... |
return {
name = "curie6-0",
properties={
wall={
{code = "00014", coord_x = 15, coord_y = 24},
{code = "00014", coord_x = 16, coord_y = 24},
{code = "00014", coord_x = 17, coord_y = 24},
{code = "00014", coord_x = 22, coord_y = 24},
{code = "00... |
local format = string.format
function printf(fstring, ...)
print(format(fstring, unpack({...})))
end
|
local objects =
{
--Maxime
createObject ( 2183, 2148.74023, -1413.93457, 292.73016, 0, 0, 0, 2 ),
createObject ( 2309, 2149.37207, -1414.49121, 292.73016, 0, 0, 347.476, 2 ),
createObject ( 2182, 2139.86523, -1429.43164, 292.73016 ,0,0,0, 2 ),
createObject ( 1808, 2148.44531, -1418.06934, 292.73016, 0, 0, 90 , 2 ... |
-- 添加搜索路径
package.path = package.path .. ";../?.lua"
-- 加载
local t = require "Config"
-- 直接访问原始数据
print(t.Sample[1].Name)
-- 通过索引访问
print(t.SampleByID[103].ID)
print(t.SampleByName["黑猫警长"].ID) |
-- number samples in lieu of automatic testing PUBLIC DOMAIN 2008
-- note: not comprehensive!
-- note: negative numbers are really two tokens, but are included
-- here for convenience
--
return{
-- simple numbers
0,
1,
-1,
-- hexadecimal
0,
16,
65536,
3735928559,
4294967295,
68719476735,
16,
4095,
-- integers
123... |
-- I change a bit now is support krnl and script-ware dumbass! yaya hooo
--added bool value to the gui and simple gui tween with clickdepents()
--added divider!
--config comming soon dumb ass
-- uwuware orginal ui lib by Jans
local library = {flags = {}, windows = {}, open = true}
--Services
local runService = game:Ge... |
return {
tllbagger = {
acceleration = 0,
brakerate = 0,
buildangle = 29090,
buildcostenergy = 3064366,
buildcostmetal = 660533,
builder = false,
buildpic = "tllbagger.dds",
buildtime = 4100000,
canattack = true,
canstop = 1,
category = "ALL SURFACE",
corpse = "dead",
defaultmissiontype = "... |
#!/usr/bin/env tarantool
local test = require("sqltester")
test:plan(30)
--!./tcltestrunner.lua
-- 2009-02-24
--
-- The author disclaims copyright to this source code. In place of
-- a legal notice, here is a blessing:
--
-- May you do good and not evil.
-- May you find forgiveness for yourself and forgive othe... |
nadmin:RegisterPerm({
title = "Health Regeneration",
id = nadmin.hpRegen.perm
})
hook.Add("Think", "nadmin_hp_regen", function()
local now = os.time()
for i, ply in ipairs(player.GetAll()) do
if not ply:Alive() then continue end
local can = ply:HasPerm(nadmin.hpRegen.perm)
... |
local attributes = {
name = true,
fg = true,
bg = true,
font = true,
sp = true,
['fg#'] = true,
['bg#'] = true,
bold = true,
italic = true,
reverse = true,
inverse = true,
standout = true,
underline = true,
undercurl = true,
}
local __vim_element_mt = {
__index = function(self, key)
... |
return {
name = "Rust",
language_server = {
name = "rust_analyzer",
},
}
|
local _, Addon = ...
local DEFAULTS = {
visible = true,
scale = 1,
opacity = 1,
clickThrough = false,
showWithOverrideUI = false,
showWithPetBattleUI = false,
-- positioning
point = "CENTER",
x = 0,
y = 0
-- anchor = "barID"
}
local function setVisible(bar, visible)
... |
local op = {}
function op.Add(a, b)
local v = {out=0, a=a, b=b}
local function tick()
v.out = v.a.out + v.b.out
end
return setmetatable(v, {__call=tick})
end
function op.Mul(a, b)
local v = {out=0, a=a, b=b}
local function tick()
v.out = v.a.out * v.b.out
end
return set... |
--##NoSimplerr##
--[[
© 2021 Tony Ferguson, do not share, re-distribute or modify
without permission of its author ( devultj@gmail.com - Tony Ferguson, http://www.tferguson.co.uk/ )
]]
function dHeists.teamsFromNames( tbl )
if not tbl then return end
local newTbl = {}
local jobList = dHeists.gamemodes... |
-- premake5.lua
dofile "tools/build/gmake2_deps.lua"
dofile "tools/build/android_studio.lua"
dofile "tools/build/emscripten.lua"
dofile "tools/build/vscode.lua"
workspace "HamSandwich"
location "build"
configurations { "debug", "release", "debug64", "release64" }
filter { "action:android-studio" }
location "buil... |
-- RGB LED attached to D1-D3 with R, G and B respectively.
local modname = ...
package.loaded[modname] = nil
if pwm then
function led(r,g,b)
local red = ( r == true ) and 255 or r
local green = ( g == true ) and 255 or g
local blue = ( b == true ) and 255 or b
pwm.setduty(1, red or 0)
pwm.setduty(2, green... |
-- This is a part of uJIT's testing suite.
-- Copyright (C) 2020-2021 LuaVela Authors. See Copyright Notice in COPYRIGHT
-- Copyright (C) 2015-2020 IPONWEB Ltd. See Copyright Notice in COPYRIGHT
local jit_on = jit.status()
assert(jit_on, "JIT must be on for this test")
jit.opt.start("hotloop=3", "hotexit=3")
-- Numb... |
object_tangible_collection_rebel_assault_helmet = object_tangible_collection_shared_rebel_assault_helmet:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_rebel_assault_helmet, "object/tangible/collection/rebel_assault_helmet.iff") |
local lush = require "lush"
local hsl = lush.hsl
local c = require("kobol.colors").colors
local ch = require("kobol.colors").hsl_colors
local base = require "kobol.base_theme"
---@diagnostic disable: undefined-global
local plugins = lush(function()
return {
-- gitsigns: https://github.com/lewis6991/gitsig... |
-- This script works only with luasyslog properly installed
local syslog = require 'logging.syslog'
-- Generate some log with the default facility
local logger = syslog('luasyslog1')
logger:debug('Debug message')
logger:info('Info message')
-- Generate some log with a specific facility
local lsyslog = require 'lsyslo... |
-- Dialogue for NPC "npc_yasha"
loadDialogue = function(DL)
if (not DL:isConditionFulfilled("npc_yasha", "talked")) then
DL:setRoot(1)
elseif (not DL:isConditionFulfilled("npc_yasha", "attacked") and not (DL:isConditionFulfilled("npc_yasha", "unfriendly") or DL:isConditionFulfilled("npc_yasha", "friendly"))) th... |
---@class Duration
---@field parts table
---@field minutes number
local Duration = {}
local hour_minute_pattern = '(%d+):(%d+)$'
local parse_hours_minutes = function(str, on_end)
local pattern = hour_minute_pattern
if not on_end then
pattern = '^' .. pattern
end
local hh, mm = str:match(pattern)
if not h... |
net.Receive("addText_POM", function()
local tab = net.ReadTable()
chat.AddText(unpack(tab))
end) |
return {'move','moven','moveren','moveer','moveerde','moveerden','moveert','moverende','movede','moves','movet'} |
local ffi = require 'ffi'
local torch = require 'torch'
local pcl = require 'pcl.PointTypes'
local utils = require 'pcl.utils'
local OpenNI2Stream = torch.class('pcl.OpenNI2Stream', pcl)
local func_by_type = {}
local function init()
local OpenNI2Stream_method_names = { 'new', 'delete', 'start', 'stop', 'read', 're... |
if SERVER then
AddCSLuaFile("shared.lua")
end
if CLIENT then
SWEP.PrintName = "Deathly Deagle"
SWEP.Author = "Darkspider"
SWEP.Slot = 1
SWEP.SlotPos = 1
end
SWEP.Base = "darkland_base"
SWEP.Spawnable = true
SWEP.HoldType = "pistol"
SWEP.AdminSpawnable = true
SWEP.ViewModel = "models/weapons/v_pist_deagl... |
local PLUGIN = PLUGIN
netstream.Hook("try_combine", function(client, data)
for _, v in pairs(ents.GetAll()) do
if (v:GetClass() == "nut_vendor") then
if v:getNetVar("name") == data then
local items = {}
--v:addItem("aksu", "selling")
for k, t in pairs(v.items) do
if (table.Count(t)... |
local pig_assets =
{
Asset("ANIM", "anim/pig_head.zip")
}
local merm_assets =
{
Asset("ANIM", "anim/merm_head.zip")
}
local pig_prefabs =
{
"flies",
"pigskin",
"twigs",
}
local merm_prefabs =
{
"flies",
"spoiled_food",
"twigs",
}
local function OnFinish(inst)
SpawnPrefab("collapse_small").Transform:SetPos... |
Player = Object:extend()
Player:implement(GameObject)
Player:implement(Physics)
Player:implement(Unit)
function Player:init(args)
self:init_game_object(args)
self:init_unit()
if self.passives then for k, v in pairs(self.passives) do self[v.passive] = v.level end end
self.color = character_colors[self.characte... |
-- test2.lua 文件末尾注释1
-- test2.lua 文件末尾注释2
-- test2.lua 文件末尾注释3
|
return function()
local BaseTile = script.Parent
local TileRoot = BaseTile.Parent
local App = TileRoot.Parent
local UIBlox = App.Parent
local Packages = UIBlox.Parent
local Roact = require(Packages.Roact)
local mockStyleComponent = require(UIBlox.Utility.mockStyleComponent)
local SaveTile = require(script.Pare... |
onEvent("PlayerDataLoaded", function(name, data)
if name == 'Sharpiebot#0000' then
return syncGameData(data, name)
end
if table.contains(room.bannedPlayers, name) then
return TFM.chatMessage('You can not play #mycity anymore.', name)
end
if #data > 1500 then return TFM.chatMessage('You have reached your data ... |
_G.pipeworks = {}
_G.pipeworks.button_label = ""
_G.pipeworks.fs_helpers = {}
_G.pipeworks.fs_helpers.cycling_button = function(...) return "" end
|
-----------------------------------
-- Area: East Sarutabaruta
-- NPC: Taby Canatahey
-- !pos -119.119 -4.106 -524.347 116
-----------------------------------
local ID = require("scripts/zones/East_Sarutabaruta/IDs");
-----------------------------------
function onTrade(player,npc,trade)
end;
function onTrigger(play... |
--[[1]]
foo = {}
foo.key = 'value'
--[[2]]
mt = {__index = foo}
-- setmetatable возвращает первый переданный в неё аргумент
--[[3]]
bar = setmetatable({}, mt)
bar.key2 = 'value2'
-- Тестирование:
--[[4]]
print('bar.key2', bar.key2) --> 'value2'
--[[5]]
print('bar.key', bar.key) --> 'value'
--[[6]]
bar.key = '... |
-- Draws polygonal shapes to the screen
local renderer =
Concord.system(
{_components.transform, _components.polygon},
{_components.control, _components.transform, _components.sprite, "PLAYER"}
)
function renderer:init()
self.current_phase = nil
self.colours = {
["RED"] = {220 / 255, 20 / 255, 60 / 255},... |
local super= Notifier
---@class SimpleCommand:Notifier
SimpleCommand = class("puremvc.patterns.command.SimpleCommand", super)
function SimpleCommand:ctor()
super.ctor(self)
end
---execute
---@param notification Notification
function SimpleCommand:execute(notification)
end
return SimpleCommand |
local tableUtils = require("lib/utils/table")
describe("tableUtils", function()
describe("#matches", function()
local matches = tableUtils.matches
it("returns true when two tables match", function()
assert.are.equals(
true,
matches({'cmd'}, {'cmd'})
)
end)
it("returns tr... |
local _, ns = ...
local B, C, L, DB, P = unpack(ns)
local S = P:GetModule("Skins")
local Bar = B:GetModule("Actionbar")
local _G = getfenv(0)
local pairs = pairs
local function setBorder(button)
local border = button.Border
if not border then return end
border.__textureFile = DB.textures.pushed
border:SetTexture... |
--CLEAN THIS
WorldDataEditor = WorldDataEditor or class(EditorPart)
local WData = WorldDataEditor
function WData:init(parent, menu)
if Global.current_custom_level then
self._assets_manager = AssetsManagerDialog:new(BeardLibEditor._dialogs_opt)
self._objectives_manager = ObjectivesManagerDialog:new(... |
base_build = nil
base_build =
{
--Fighters---------------
{
Type = Ship,
ThingToBuild = "Tai_Scout_hyp0",
RequiredResearch = "",
RequiredShipSubSystems = "",
DisplayPriority = 10,
DisplayedName = "$11000",
Description = "$11001",
},
{
Type = Ship,
ThingToBuild = "Tai_Scout_hyp1"... |
local Class = require 'lib.hump.class'
local Frame = getClass 'wyx.ui.Frame'
local setColor = love.graphics.setColor
local setFont = love.graphics.setFont
local gprint = love.graphics.print
local rectangle = love.graphics.rectangle
local math_floor = math.floor
local string_sub = string.sub
local string_gmatch = stri... |
local Observable = require 'observable'
--- Returns an Observable that produces the nth element produced by the source Observable.
-- @arg {number} index - The index of the item, with an index of 1 representing the first.
-- @returns {Observable}
function Observable:elementAt(index)
if not index or type(index) ~= 'n... |
local Plugin = script.Parent.Parent
local Libs = Plugin.Libs
local Cryo = require(Libs.Cryo)
local Roact = require(Libs.Roact)
local Rodux = require(Libs.Rodux)
local Constants = require(Plugin.Core.Util.Constants)
local BrushtoolTheme = require(Plugin.Core.Util.BrushtoolTheme)
local ExternalServicesWrapper = require... |
MODULE.Name = "Physics2D"
MODULE.Defines = {"CP_USE_CGTYPES=0", "TARGET_OS_IPHONE=0", "TARGET_OS_MAC=0"}
MODULE.Libraries = {
"NazaraCore",
"chipmunk"
}
|
local ObjectManager = require("managers.object.object_manager")
tutorialMissionGiverConvoHandler = conv_handler:new {}
function tutorialMissionGiverConvoHandler:runScreenHandlers(pConvTemplate, pPlayer, pNpc, selectedOption, pConvScreen)
local screen = LuaConversationScreen(pConvScreen)
local screenID = screen:getS... |
mp=RE.motionPanel()
mot=mp:currMotion()
discontinuity=boolN(mot:numFrames())
for i=0,mot:numFrames()-1 do
discontinuity:set(i, mot:isConstraint(i, FootstepDetection.IS_DISCONTINUOUS))
end
mp:scrollPanel():addPanel(discontinuity:bit(), CPixelRGB8(255,255,0))
fn=Fltk.chooseFile("Choose con", "../Resource/motion/... |
function onCreate()
makeLuaText('watermark', "Port by Fang", 0, 550, 640);
setTextSize('watermark', 20);
addLuaText('watermark');
end
if botPlay then
setProperty('score.visible', false)
setProperty('rating.visible', false)
setProperty('misses.visible', false)
setProperty('healthbarBG.vi... |
local _M = {}
function _M.handler(event)
local v = event.kv.get_global('my_key')
if v then
return {status = 200, body = v}
else
return {status = 404}
end
end
return _M |
--[[
Name: gui/init.lua
Description: Load and program the GUI
Author: misrepresenting
]]
local onClick, parentGui, dragGui, setAllTransparent, tweenAllTransparentToObject, tweenAllTransparent do
local helpers = import('helpers')
onClick, parentGui, dragGui, setAllTransparent, tweenAllTransparentToO... |
local hi
do
local _accum_0 = { }
local _len_0 = 1
for _, x in ipairs({
1,
2,
3,
4
}) do
_accum_0[_len_0] = x * 2
_len_0 = _len_0 + 1
end
hi = _accum_0
end
local items = {
1,
2,
3,
4,
5,
6
}
for z in ipairs(items) do
if z > 4 then
local _ = z
end
end
local rad
do
... |
-- Copyright (c) 2017-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the 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.
--
--[[
--
-- CAddTable that ... |
local networkVarsOverride = {
--Original Vars
linked = "boolean",
phase = "boolean",
deployed = "boolean",
destLocationId = "entityid",
targetYaw = "float (-3.14159265 to 3.14159265 by 0.003)",
destinationEndpoint = "position",
phaseChannel = "integer (0 to 1)"
}
-- From Original NS2 P... |
SimpleTesting = {}
SimpleTesting.__index = SimpleTesting
local format = format or string.format
local debugprofilestop = debugprofilestop or os.clock
function SimpleTesting:New(addonName, gameExpansion)
assert(type(addonName) == "string")
local acnt = {}
setmetatable(acnt, SimpleTesting)
acnt.addonNa... |
local serialize = {}
-- Write text data into memory, starting at addr_start
-- Format: [string][\0]
-- String characters are written byte by byte.
-- \0 is a terminating character as in C, and allows to us to know the string ends here.
-- Optional addr_exclusive_limit will make sure we assert (return if not #assert)
-... |
#!/usr/bin/env tarantool
local test = require("sqltester")
test:plan(5)
-- Make sure DECIMAL is not truncated when used in an index.
test:do_execsql_test(
"gh-6485-1",
[[
CREATE TABLE t(i INTEGER PRIMARY KEY);
INSERT INTO t VALUES(1), (2);
SELECT i FROM t WHERE i IN (CAST(1.1 AS DECIMAL... |
--[[
存档管理器
--]]
local THIS_MODULE = ...
-- 事件点块位数
local C_EPOINT_BLOCK = 32
-- 存档插槽
local C_ARCHIVE_SLOT = "slot_"
-- 存档信息
local C_ARCHIVE_INFO = "info.json"
-- 存档数据
local C_ARCHIVE_DATA = "data.json"
-- 插槽前缀长度
local C_SLOT_PRELEN = #C_ARCHIVE_SLOT
local ArchiveManager = class("ArchiveManager")
-- 获得单例对象
local ... |
local turfRadarArea = {}
local turfColArea = {}
local turfingTimersStart = {}
local turfingTimersAttack = {}
local turfProvocationTimer = {}
local turfAttackGroup = {}
local turfGroups = {}
local turfData = {}
local antiSpam = {}
local paying = {}
local dontgive = false
local dickHead = {}
local crimdontgive = {}
local... |
local telnet = {
protocol = "telnet",
}
autoload(telnet, "net.telnet", "Client", "Server")
return telnet
|
require ("lib.lclass")
class "EventManager"
function EventManager:EventManager ()
self.events = {}
self.subscriber = {}
end
function EventManager:push (event)
table.insert (self.events, event)
end
function EventManager:subscribe (typeName, handler)
self.subscriber[typeName] = self.subscriber[typeName] or {}
ta... |
game.StarterGui:SetCoreGuiEnabled(3, false)
script:Destroy() |
-- The bouncing bullets attack from the documentation example.
spawntimer = 0
bullets = {}
colors = {"regular", "regular", "regular", "green"}
function Update()
spawntimer = spawntimer + 1
if spawntimer%15 == 0 then
local posx = 30 - math.random(60)
local posy = Arena.height/2
local bulletTyp... |
local SegmentTree = loadfile('./segment_tree.lua')()
local function arrayToString(arr)
local str = 'Len=' .. #arr .. ' ['
for i, v in ipairs(arr) do
if i == 1 then str = str .. v
else str = str .. ',' .. v
end
end
str = str .. ']'
return str
end
local width, height = 5, 5
local st = SegmentTree:new(nil, ... |
modifier_spectre_special_attack_debuff = class({})
LinkLuaModifier("modifier_spectre_special_attack_thinker", "abilities/heroes/spectre/spectre_special_attack/modifier_spectre_special_attack_thinker", LUA_MODIFIER_MOTION_NONE)
function modifier_spectre_special_attack_debuff:OnCreated(kv)
if IsServer() then
self:Sta... |
local K, C, L = unpack(KkthnxUI)
local Module = K:GetModule("Announcements")
local _G = _G
local CombatLogGetCurrentEventInfo = _G.CombatLogGetCurrentEventInfo
local SendChatMessage = _G.SendChatMessage
local UNKNOWN = _G.UNKNOWN
local function SetupSaySapped()
local _, event, _, _, sourceName, _, _, _, destName, _... |
data:extend({
{ --------- ramp entity -------------
type = "rail-signal",
name = "RTTrainRamp",
icon = "__RenaiTransportation__/graphics/TrainRamp/icon.png",
icon_size = 64,
flags = {"placeable-neutral", "player-creation", "filter-directions", "fast-replaceable-no-build-while-moving"},
minable = {min... |
local _tostring = tostring
--VALIDATION
if(not KEYS[1] or not _tostring(KEYS[1])) then return redis.error_reply('NO SESSION KEY') end
--========================================================================
-- UTILITY Functions
--========================================================================
local checkSe... |
-----------------------------------
-- Area: La Theine Plateau
-- NPC: Telepoint
-- !pos 420.000 19.104 20.000 102
-----------------------------------
local ID = require("scripts/zones/La_Theine_Plateau/IDs")
require("scripts/globals/keyitems")
require("scripts/globals/npc_util")
-----------------------------------
f... |
local MyModule = {}
-- Prevent the framework from invoking the 'Start' method:
MyModule.__aeroPreventStart = true
function MyModule:Start()
-- Won't be invoked by the framework
end
function MyModule:Init()
-- Still will be invoked by the framework
end
return MyModule |
-- main.lua
--[[
Snake, in Lua, using the Löve engine
Author: Owen Jones
Contact: owen@owenjones.net
Released under an Apache V2 License
TODO: * Add control/help dialogues
--]]
-- Globals
local Game = require('game')
local timer = 0
-- LÖVE FUNCTIONS
function love.load()
game = Game.new()
game... |
print(math.sqrt( (8-4)^2 + (10-6)^2 ) ) |
--[[Check https://github.com/mtsmtsmts/Iot-home-controlfanlight]]--
user_SetTime=nil --not local, used in dataparse()
function CounterLight(what)
local GPIOLightOnOff = 12 --see init for pin defs
local EnableRelay = 1
local nEnableRelay = 0
local FAST=30 --blink period in ms
local SLOW=140 --blink ... |
--- Common functions and constants.
-- @module buffet
local table_concat = table.concat
local _M = {
--- A version of the library.
_VERSION = '0.2.0',
_DESCRIPTION = 'Socket-like buffer objects for Lua',
_URL = 'https://github.com/un-def/lua-buffet',
_LICENSE = 'MIT',
}
--- Check whether a buffet ... |
-- Copyright (c) Jérémie N'gadi
--
-- All rights reserved.
--
-- Even if 'All rights reserved' is very clear :
--
-- You shall not use any piece of this software in a commercial product / service
-- You shall not resell this software
-- You shall not provide any facility to install this particular software in a c... |
LoadPDM = {}
setmetatable(LoadPDM, {__index = HiveBaseModule})
LoadPDM.new = function (varname)
local this = HiveBaseModule.new(varname);
this.loader = LoadModule('PdmLoader')
setmetatable(this, {__index=LoadPDM})
return this
end
function LoadPDM:Do()
self:UpdateValue()
if self.value.filepath ~= ... |
-------------------------------------------------------------------------------
-- advanced spawning mod
--
--@license WTFP
--@copyright Sapier
--@author Sapier
--@date 2013-12-05
--
-------------------------------------------------------------------------------
local version = "0.0.13"
if adv_spawning ~= nil then
c... |
local floaty_projectile = require('archetypes.floaty_projectile')
local seed = require('archetypes.seed')
local defensivePlant = {}
function defensivePlant.shoot(eid)
local xform = entities:get_component(eid, component.transform)
local body = entities:get_component(eid, component.body)
floaty_projectile(... |
local reverse_defines = require("__flib__.reverse-defines")
local dash_gui = require("scripts.gui.dash")
local player_data = {}
function player_data.init(player_index, player)
-- Disable the vanilla alerts GUI
player.game_view_settings.show_alert_gui = false
-- Create player data table
global.players[player... |
local ffi = require('ffi')
local C = ffi.C
local lib = ffi.ijson
c('bool and null', function()
t('null parses correctly', function()
local doc = ffi.gc(ffi.new('struct ijson_document'),
lib.ijson_doc_release)
lib.ijson_doc_init(doc, 8)
lib.ijson_doc_data(doc, 4, '... |
-----------------------------------
-- Area: Beadeaux (254)
-- NM: Ge'Dha Evileye
-- !pos -238 1 -202 254
-----------------------------------
mixins = {require("scripts/mixins/job_special")}
require("scripts/globals/hunts")
-----------------------------------
function onMobDeath(mob, player, isKiller)
tpz.hunts.... |
--[[
@license
MIT License
Copyright (c) 2020 Alexis Munsayac
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... |
function onStepHit()
if curStep == 276 then
triggerEvent('Play Animation', 'hey', 'BF');
end
if curStep == 146 then
triggerEvent('Play Animation', 'howdy', 'Dad');
end
if curStep == 178 then
triggerEvent('Play Animation', 'howyadoin', 'Dad');
end
if curStep == 619 then
triggerEvent('P... |
function love.load()
listOfRectangles = {}
end
function createARectangle()
rect = {}
rect.width = 30
rect.height = 30
rect.x = 70
rect.y = math.random(100, 300)
-- rectangles speed
rect.speed = 2000
-- each time you execute this function insert
-- a new rectangle into the list
table.insert(listOf... |
local addonName, addonTable = ...
_G[addonName] = LibStub("AceAddon-3.0"):NewAddon(addonName, "AceEvent-3.0")
local Addon = _G[addonName]
local S = LibStub:GetLibrary("ShockahUtils")
local LibDualSpec = LibStub("LibDualSpec-1.0", true)
local LibButtonGlow = LibStub("LibButtonGlow-1.0", true)
Addon.defaultTrackerConfi... |
local ga = gajosframework
ga.MainMenuModel = classExtends(Model, function(controller, user)
self.controller = controller
self.user = user
self.background = false
self.nav_items = false
self.pages = false
function self:setBackground(path)
self.background = TImage.LoadGUIImage(path, 425... |
-- init.lua
-- Called when engine starts up the Lua system.
io.write("Lua Machine ",_VERSION," was successfully created!\n")
-- Set environment path
package.path = package.path .. ";.res-0/lua/?" .. ";.res-0/lua/?.lua" .. ";.res-0/lua/?/init.lua" .. ";.res-0/lua/?/lua.lua";
--package.path = package.path .. ";addons/?/... |
local function hexDump(raw)
local out = {}
for i = 1, #raw do
out[i] = string.format("%02x", raw:byte(i))
end
return "<" .. table.concat(out, " ") .. ">"
end
return hexDump
|
function Re2cBegin()
print(" ".."/*!re2c")
end
function Re2cEnd()
print(" ".."*/")
end
function PrintLBL(lblName)
print ("lbl_" .. lblName .. ":")
end
function PrintRule(rule,var,value)
local r= rule
local b1="{ *var_"..var.."="..value..";"
local b2="goto lbl_"..var..";"
local b3="}"
print("... |
TEST_TIMEOUT = 10
function assert_loop(cq, timeout)
local ok, err, _, thd = cq:loop(timeout)
if not ok then
if thd then
err = debug.traceback(thd, err)
end
error(err, 2)
end
end
-- Solves https://github.com/keplerproject/luacov/issues/38
local cqueues = require "cqueues"
local luacov_runner = require "lua... |
-- Path of Building
--
-- Class: PassiveMasteryControl
-- Specialized UI element for selecting passive masteries
--
local ipairs = ipairs
local m_min = math.min
local m_max = math.max
local m_floor = math.floor
--constructor
local PassiveMasteryControlClass = newClass("PassiveMasteryControl", "ListControl", function(... |
local emcc = require 'compiler.gcc'
function emcc.update_ldflags(context, ldflags, attribute)
ldflags[#ldflags+1] = '-s'
ldflags[#ldflags+1] = 'WASM=1'
end
function emcc.rule_dll(w, name, ldflags)
w:rule('link_'..name, ([[$cc $in -o $out -s SIDE_MODULE=1 %s]])
:format(ldflags),
{
descripti... |
--Quick to use empty sprite
local Prototype = {}
--Quick to use empty sprite
Prototype.empty_sprite ={
filename = "__core__/graphics/empty.png",
priority = "extra-high",
width = 1,
height = 1
}
--Quick to use empty animation
Prototype.empty_animation = {
filename = Prototype.empty_sprite.filename,
width = ... |
local Sun = { name = "Link" };
function hi()
print("hi "..Sun.name);
end
function Sun.hello()
print("hello "..Sun.name);
end
return Sun;
|
--- Component to handle swipe gestures on node.
-- Swipe will be triggered, if swipe was started and
-- ended on one node
-- @module Swipe
-- @within BaseComponent
-- @alias druid.swipe
--- Swipe node
-- @tparam node node
--- Restriction zone
-- @tparam[opt] node click_zone
--- Trigger on swipe event(self, swipe_sid... |
local _M = {}
_M.ILLEGAL_FUNCION = 0x01
_M.ILLEGAL_DATA_ADDR = 0x02
_M.ILLEGAL_DATA_VAL = 0x03
_M.SRV_DEV_FAIL = 0x04
_M.ACKNOWLEDGE = 0x05
_M.SRV_DEV_BUSY = 0x06
_M.MEM_PARITY_ERR = 0x07
_M.GW_PATH_UNAVAIL = 0x0A
_M.GW_TARGET_DEV_FAIL_TO_RESP = 0x0B
_M.to_string = function(ec)
for k, v in pairs(_M) do
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.