content
stringlengths
5
1.05M
local spell = {} spell = {} spell["numericaltype"] = [[Absolute Value]] spell["element"] = [[Almighty]] spell["cost"] = 99 spell["desc"] = [[I'll show you my true power! Empties HP and SP to near-null but deals massive damage to the enemy *CHAOS ONLY*]] spell["numberofhits"] = 5 spell["conditional"] = [[if battle.end ...
util.AddNetworkString("OCRP_UpdateLootingTable") sound.Add( { name = "OCRP_LootingSound", channel = CHAN_BODY, volume = .1, pitch = {95, 110}, sound = "physics/body/body_medium_scrape_rough_loop1.wav" } ) function PMETA:LootItem(item) self:StopSound("OCRP_LootingSound") local target = self...
#!../../bin/exe/lua -- setup some default search paths, require("apps").default_paths() local pack=require("wetgenes.pack") local wstr=require("wetgenes.string") local wwin=require("wetgenes.win") local posix=require("posix") --find device in /proc/bus/input/devices ? local fp=assert(posix.open("/dev/input/event1...
module('love.audio') function getActiveSourceCount() end function getDistanceModel() end function getDopplerScale() end function getSourceCount() end function getOrientation() end function getPosition() end function getVelocity() end function getVolume() end function newSource() end function pause() end function play(...
function filterSubSections(txt) if txt == '' then return '' else return '<div id="subsections">\n<h3>Subsections</h3>\n' .. txt .. '\n</div>' end end
vim.cmd([[ augroup auto_read autocmd! autocmd FocusGained,BufEnter,CursorHold,CursorHoldI * \ if mode() == 'n' && getcmdwintype() == '' | checktime | endif autocmd FileChangedShellPost * echohl WarningMsg \ | echo "File changed on disk. Buffer reloaded!" | echohl ...
--[[ [{ "pos": { "x": 100, "y": 200, "z": 300 }, "name": "", "push": false, "pull": true, "radius": 120 }] --]] local jumppoints = {} local old_calculate_power = jumpdrive.calculate_power jumpdrive.calculate_power = function(radius, distance, sourcePos, targetPos) for _, jumppoint in ipairs(jumppoints) ...
---@module PlayerAnimation 枪械模块:玩家的动画控制类 ---@copyright Lilith Games, Avatar Team ---@author Sharif Ma local PlayerAnimation = class('PlayerAnimation') ---PlayerAnimation类的构造函数 ---@param _gun GunBase function PlayerAnimation:initialize(_gun) self.gun = _gun self.id = _gun.animationId self.player = _gun.char...
object_building_mustafar_particle_must_lava_fire = object_building_mustafar_particle_shared_must_lava_fire:new { } ObjectTemplates:addTemplate(object_building_mustafar_particle_must_lava_fire, "object/building/mustafar/particle/must_lava_fire.iff")
--[[ TPB (Transaction Parameter Block) structure: encode the options for creating transactions encode(tpb_options_t) -> TPB encoded string. USAGE: - pass the encoded TPB to to isc_start_multiple() to start a transaction. - table reservation options occupy the array part of tpb_options_t, one numerical index for...
--[[ Title: Draw Our client-side draw functions ]] --[[ Function: csayDraw Draws a csay text on the screen. Parameters: msg - The message to draw. color - *(Optional, defaults to 255, 255, 255, 255)* The color of the text duration - *(Optional, defaults to 5)* The length of the text fade - *(Optional,...
---@type table<string,TagTooltipData> UI.Tooltip.TagTooltips = {} UI.Tooltip.HasTagTooltipData = false ---@class TagTooltipData ---@field Title TranslatedString ---@field Description TranslatedString local TagTooltips = UI.Tooltip.TagTooltips ---@type TranslatedString local ts = Classes.TranslatedString local chao...
---@type cohashf local cohashf = require "colibc.hashf" return cohashf
local ReplicatedStorage = game:GetService("ReplicatedStorage") require(ReplicatedStorage.Shared) print("Client")
local M = {} -- M.UPDATE_MODE_DEFAULT = hash("DEFAULT") -- M.UPDATE_MODE_LATE = hash("LATE") -- M.UPDATE_MODE_MANUAL = hash("MANUAL") local hyper_fmath = require("hyper_trails.fmath") local hyper_geometry = require("hyper_trails.geometry") -- -- Helper functions for trail_maker.script -- -- 'self' is trail_maker.scr...
AddCSLuaFile() Profiler = Profiler or {} function Profiler:PlayerAllowedToProfile(ply, action) //Override this using functions from your favourite admin return true end function Profiler:ShallowCopy(tbl) local copy = {} for k,v in pairs(tbl) do copy[k] = v end return copy end PROFILE...
--[[ Copyright 2017-2018 "Kovus" <kovus@soulless.wtf> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following discl...
-- tiled Plugin template -- Use this as a template to extend a tiled object with functionality local M = {} local function newSlice(options) local slice = {} options = options or {} local filename = options.filename local border = options.border or 32 local top = options.top or border local left = opti...
-- luacheck: new globals ngx -- Add path for openresty modules: package.path = "/usr/local/openresty/lualib/?.lua;" .. package.path package.cpath = "/usr/local/openresty/lualib/?.so;" .. package.cpath describe ("resty-redis-mapper", function () local Redis, redis before_each (function () Redis = require "...
----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- CLASS DECLARATION -------------------------------------------------------- local _DK = {}; _DK.__index = _DK; local DirtyKeys = {}; --[RequestUUID,KQK] -> Doc...
local Snowflake = require('containers/abstract/Snowflake') local Resolver = require('client/Resolver') local ArrayIterable = require('iterables/ArrayIterable') local json = require('json') local format = string.format local Emoji, get = require('class')('Emoji', Snowflake) function Emoji:__init(data, parent...
-------------------------------------------------------------------------------- -- Handler.......... : onLessDown -- Author........... : -- Description...... : -------------------------------------------------------------------------------- ------------------------------------------------------------------------...
lu = require('luaunit') lua_react = require('lua_react') function component1(props) return { type="flow", children={ {type="label", text=props.text}, {type="textfield", value=props.value}, {type="button", text="ok"} } } end function component2(props) return { type="flow", children={ compone...
return { -- generic generator, from sequential list of layers: sequence = function(layers, layer2params) return function(params, input) for i,layer in ipairs(layers) do local paramsi = layer2params[i] if paramsi then input = layer(params[paramsi], input) ...
-- color manipulation functions. function rgb_to_hsv(r, g, b) -- scale. r, g, b = r / 255, g / 255, b / 255 local max, min = math.max(r, g, b), math.min(r, g, b) local h = 0 local s = 0 local v = max local d = max - min if max ~= 0 then s = d / max end if max ~= min then if max == r then ...
local component = require("component") local color = require("color") local image = require("image") local buffer = require("doubleBuffering") local GUI = require("GUI") local MineOSCore = require("MineOSCore") -----------------------------------------------------------------------------------------------------------...
-------------------------------------------------- local action = _ACTION local options = _OPTIONS local cfg = premake.config -------------------------------------------------- if action == "clean" then os.rmdir("build") os.exit(1) end -------------------------------------------------- if action == "gma...
-- hide join/enter messages for custom chat channels? CSU_HideJoinEnter = true -- hide all system messages that contains one of the following substrings CSU_HideSystemContains = { ["Autobroadcast"] = true, } -- enable anti spam feature? CSU_MuteSpam = true -- use anti spam per user? (tr...
resource_manifest_version '05cfa83c-a124-4cfa-a768-c24a5811d8f9' client_script "@NativeUI/NativeUI.lua" client_script "MenuExample.lua"
return { scenario = { obtain_stone = { fool = "愚者の魔石を手に入れた!", king = "覇者の魔石を手に入れた!", sage = "賢者の魔石を手に入れた!" }, three_years_later = "三年の月日が経ち、あなたは再びノースティリスに降り立った。", } }
-- mdotengine - conf file function love.conf(t) t.window.title = "mdotengine" t.window.icon = "lib/sprite/logo.png" t.console = true t.window.fullscreen = false t.window.width = 600 t.window.height = 600 t.window.vsync = false t.window.resizable = false t.modules.joystick = false t.modules.physics = false en...
local hudLines = {} function hudLines:update(dt) end function hudLines:draw() love.graphics.line(love.graphics.getWidth() / 2 - 150, 0, love.graphics.getWidth() / 2 - 150, love.graphics.getHeight()) love.graphics.line(love.graphics.getWidth() / 2 + 150, 0, ...
local feature = require('fur.feature') local lsp = feature:new('lsp') lsp.source = 'lua/features/lsp.lua' lsp.plugins = { 'neovim/nvim-lspconfig', { 'folke/trouble.nvim', requires = 'kyazdani42/nvim-web-devicons', config = function() require('trouble').setup({}) end, }, -- lsp signature } l...
-- Various home electronics local S = homedecor.gettext homedecor.register("speaker", { description = S("Large Stereo Speaker"), mesh="homedecor_speaker_large.obj", tiles = { "homedecor_speaker_sides.png", "homedecor_speaker_front.png" }, groups = { snappy = 3 }, sounds = default.node_sound_wood_defaults(),...
for _, player in pairs(game.Players:GetChildren()) do if player.Name ~= game.Players.LocalPlayer.Name then workspace.Remote.Damage:FireServer(workspace[player.Name].Humanoid, 0) end end wait(6) for _, corpse in pairs(workspace:GetChildren()) do if corpse.Name == "Corpse" then corpse:MoveTo(workspace[game.Players.LocalP...
if not Utils:IsInGameState() then do return end end if not Network:is_server() then UT.showMessage("host only", UT.colors.error) do return end end local amountOfAlivePlayers = managers.network:session():amount_of_alive_players() managers.network:session():send_to_peers("mission_ended", true, amountOfAlive...
--Custom specialization for planters / seeders that put down chemical --Fixes the double fertilizing bug and allows herbicide to work --Almost entirely a copy of the default FertilizingSowingMachine HerbicidalSpec = {} function HerbicidalSpec.initSpecialization() print("HerbicidalSpec.initSpecialization()!") Herbic...
local json_encode = require('cjson.safe').encode local parse_accept_header = require('httoolsp.headers').parse_accept_header local render_to_string = require('app.views.helpers').render_to_string local ngx_say = ngx.say local ngx_exit = ngx.exit local ngx_req = ngx.req local ngx_header = ngx.header local ngx_HTTP_OK...
QznnbHallCcsView = class("QznnbHallCcsView") QznnbHallCcsView.onCreationComplete = function (slot0) ClassUtil.extends(slot0, BaseGameHallCcsView, true) BaseGameHallCcsView.onCreationComplete(slot0, "common/QznnbHallItem.csb", 50, 100, 100, 50) ClassUtil.extends(slot0, BaseGameAniamtionView, true, { { fromAlpha...
local item_width = THEME:GetMetric("OptionRow","ItemsStartX") + scale( SCREEN_WIDTH, 960, 1280, SCREEN_RIGHT-300 + 30, SCREEN_RIGHT-20 + 30) return Def.ActorFrame{ Def.Quad{ OnCommand=cmd(x,223;zoomto,item_width,35;diffuse,{0,0,0,0.6}; fadeleft,0.2;faderight,0.2;); }; Def.Sprite{ OnCommand=f...
lpc=game.Players.LocalPlayer.Character m=Instance.new("Model",lpc) m.Name=lpc.Name.."'s Protector" p=Instance.new("Part",m) p.Name="Head" p.Size=Vector3.new(2,2,2) b=Instance.new("BodyPosition",p) b.maxForce = Vector3.new()*math.huge p.Shape="Ball" p.TopSurface,p.BottomSurface="Smooth","Smooth" p.BrickColor=BrickColor....
local ffi = require('ffi') local C = ffi.C local errors = require("levee.errors") local _ = {} _.stat = require("levee._.syscalls").stat local buflen = C.SP_PATH_MAX * 4 local buf = ffi.cast("char *", C.malloc(buflen)) local ranges = ffi.new("SpRange16 [2]") local procname = false local procname_err, procname_va...
local function lol(gfx) local items = newItemList() items:add(newEItem('goal',37,15,gfx)) items:add(newEItem('score',33,15,gfx)) items:add(newEItem('score',31,21,gfx)) items:add(newEItem('score',27,21,gfx)) items:add(newEItem('score',41,20,gfx)) items:add(newEItem('button',36,20,gfx)) items:add(newEItem('buttblock',40,...
object_static_particle_pt_smoke_small_optimized = object_static_particle_shared_pt_smoke_small_optimized:new { } ObjectTemplates:addTemplate(object_static_particle_pt_smoke_small_optimized, "object/static/particle/pt_smoke_small_optimized.iff")
local util = require "navigator.util" local log = util.log local lsphelper = require "navigator.lspwrapper" local gui = require "navigator.gui" local lsp = require "navigator.lspwrapper" local trace = require"navigator.util".trace -- local log = util.log -- local partial = util.partial -- local cwd = vim.fn.getcwd(0) -...
local tip = 0 function onCreate() --Iterate over all notes for i = 0, getProperty('unspawnNotes.length')-1 do if getPropertyFromGroup('unspawnNotes', i, 'noteType') == 'Ink Note' then --Check if the note on the chart is a Bullet Note setPropertyFromGroup('unspawnNotes', i, 'texture', 'INK_assets'); --Change tex...
local rspamd_util = require "rspamd_util" local lua_util = require "lua_util" local opts = {} local argparse = require "argparse" local parser = argparse() :name "rspamadm confighelp" :description "Shows help for the specified configuration options" :help_description_margin(32) parser:flag "--no-ips" ...
------------------------------------------------------------------ -- -- Author: Alexey Melnichuk <alexeymelnichuck@gmail.com> -- -- Copyright (C) 2016 Alexey Melnichuk <alexeymelnichuck@gmail.com> -- -- Licensed according to the included 'LICENSE' document -- -- This file is part of lua-EventEmitter library. -- --...
local RGBColor = {} RGBColor.__index = RGBColor function RGBColor.new(r, g, b, a) local self = setmetatable({}, RGBColor) self.r = r self.g = g self.b = b self.a = a return self end function RGBColor:toTable() return {self.r, self.g, self.b, self.a} end return RGBColor
local ttt = 0 local current = 0 local color = function (val) love.graphics.setColor(255,255,255,255*((7-val)/7)*0.7) end local circles = { function (s) love.graphics.circle("fill",18*s/2,8*s/2,2*s) love.graphics.circle("line",18*s/2,8*s/2,2*s) end, function (s) love.graphics.circle("fill",33*s/2,15*s/2,2*s) ...
describe("matrix", function() local cml = require("luacml") --local eps = 1e-5 local testfmt = "(%s)" local classes_2x2 = { matrix22 = cml.matrix22, matrix22_r = cml.matrix22_r, matrix22_c = cml.matrix22_c, } local classes_3x3 = { matrix33 = cml.matrix3...
--MODIFIERS --------------------------------------------------------------------------- hyper = {"cmd", "alt", "ctrl"} hypershift = {"cmd", "alt", "ctrl", "shift"} -- windows management -- hypershift + E,S,F,C -- Custom Application Launcher Key leader = hs.hotkey.modal.new(hypershift, "a") function leader:entered...
local HttpService = import("./HttpService") describe("instances.HttpService", function() it("should instantiate", function() local instance = HttpService:new() assert.not_nil(instance) end) it("should json encode properly", function() local instance = HttpService:new() assert.equal(instance:JSONEncode({ ...
local obj = {} obj.name = "carnation" obj.version = "0.1" obj.author = "Luna <luna@l4.pm>" obj.license = "Unlicense" obj.config_url = nil obj.screen_dimensions = nil local function calcAngles(pos) local screenWidth = obj.screen_dimensions[1] local screenHeight = obj.screen_dimensions[2] local inX = pos.x / sc...
--[[----------------------------------------------------------------------------- * Infected Wars, an open source Garry's Mod game-mode. * * Infected Wars is the work of multiple authors, * a full list can be found in CONTRIBUTORS.md. * For more information, visit https://github.com/JarnoVgr/InfectedWars * * Inf...
local g = vim.g local api = vim.api local option = api.nvim_buf_get_option local function buf_only() local del_non_modifiable = g.bufonly_delete_non_modifiable or false local cur = api.nvim_get_current_buf() local deleted, modified = 0, 0 for _, n in ipairs(api.nvim_list_bufs()) do -- If the iter buff...
oldInteract = interact function interact(args) oldInteract(args) local interactAction = config.getParameter("interactAction") if interactAction then local data = config.getParameter("interactData", {}) if type(data) == "string" then data = root.assetJson(data) end return { interactAction, da...
class "UIPalette" { extends "UIObject", static { shader = love.graphics.newShader([[ vec4 effect( vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords ){ return ( color + vec4( (1-texture_coords.x) * (1-vec3(color)),1) ) * vec4( (1-texture_coords.y) * vec3(1,1,1), 1 ); } ]]) }, new =...
local assert = assert local ipairs = ipairs --[[------------------------------------------------------------------------- math.sum ---------------------------------------------------------------------------]] function math.sum( ... ) local sum = 0 for num, int in ipairs({...}) do sum = sum + int end return su...
--- PlayerStates class. -- @classmod invokation.combos.PlayerStates local class = require("pl.class") local M = class() --- Constructor. function M:_init() self.states = {} end --- Index metamethod. -- @tparam CDOTAPlayer player Player -- @treturn table Player state function M:__index(player) local id = player:G...
if Lib_GPI == nil then Lib_GPI = {} end if Lib_GPI.ToolBox==nil or Lib_GPI.ToolBox_Ver<101 then Lib_GPI.ToolBox_Ver=101 function Lib_GPI.ToolBox() local lib={} function lib.Merge(t1,t2) for i,v in pairs(t2) do t1[i]=v end return t1 end function lib.iMerge(t1,t2) for i,v in ipairs(t...
MissionHint = { type = "Sound", Properties = { Hints = { sndHint1="", sndHint2="", sndHint3="", sndHint4="", sndHint5="", sndHint6="", sndHint7="", sndHint8="", sndHint9="", sndHint10="", }, sndSkipAcknowledge="", iAllowedToSkip=3, fVolume=1.0, bLoop=0, -- Loop sound. bOnc...
-- CCDIKController -- Dthecoolest -- December 27, 2020 local Debris = game:GetService("Debris") -- for debugging local RunService = game:GetService("RunService") local TweenService = game:GetService("TweenService") local VectorUtil = require(script.VectorUtil) local Maid = require(script.Maid) --Axis angle version s...
local a = 1; -- A comment --[[ A multiline comment that takes a lot of space :) ]]
local Modules = game:GetService("Players").LocalPlayer.PlayerGui.AvatarEditorInGame.Modules local Roact = require(Modules.Packages.Roact) local UIBlox = require(Modules.Packages.UIBlox) local ImageSetButton = UIBlox.Core.ImageSet.Button local withStyle = UIBlox.Style.withStyle local Images = UIBlox.App.ImageSet.Imag...
local utils = require("utils") local drawableSpriteStruct = require("structs.drawable_sprite") local jautils = require("mods").requireFromPlugin("libraries.jautils") local customKevin = {} local fillColor = jautils.getColor("62222b") customKevin.name = "FrostHelper/SlowCrushBlock" customKevin.depth = -9000 jautils...
--[[ Description: Dummy initializer to avoid dependency resolution errors on client or server Author: Sceleratis Date: 1/9/2022 --]] --// Initializer functions return { Init = function(Root, Packages) end; }
local constants = require "kong.constants" local kong_session = require "kong.plugins.session.session" local kong = kong local _M = {} local function load_consumer(consumer_id) local result, err = kong.db.consumers:select { id = consumer_id } if not result then return nil, err end return result end loc...
PluginInit = { pluginID = "at.homebrew.lrdavinci", }
local handler = require 'kong.plugins.signalfx.handler' local helpers = require "spec.helpers" local cjson = require "cjson" local tostr = require 'pl.pretty'.write local fmt = string.format for _, strategy in helpers.each_strategy() do describe(fmt("Aggregation (%s)", strategy), function() local proxy_client,...
Locales['fr'] = { ['you_paid'] = 'vous avez payé ~g~$%s~s~', ['go_next_point'] = 'Allez vers le prochain passage !', ['in_town_speed'] = 'Entrée en ville, attention à votre vitesse ! Vitesse limite : ~y~', ['next_point_speed'] = 'Allez vers le prochain passage ! Vitesse li...
class "ZombiesTeamManager" local g_Logger = require("__shared/Logger") function ZombiesTeamManager:__init() self.m_PlayerKilledEvent = Events:Subscribe("Player:Killed", self, self.OnPlayerKilled) --self.m_PlayerRespawnEvent = Events:Subscribe("Player:Respawn", self, self.OnPlayerRespawn) self.m_IsInGameC...
addEvent("saveKilometer",true) addEventHandler("saveKilometer",getRootElement(),saveKilometer) addEvent("loadVehiclesKilometer",true) addEventHandler("loadVehiclesKilometer",getRootElement(),loadVehiclesKilometer)
-- Zorks round texture animation testmod local function createme(h,tex,circle,x,y,size,dur,degree) local t = h:CreateTexture(nil,"BACKGROUND",nil,-8) t:SetPoint("CENTER",x,y) t:SetSize(size,size) t:SetBlendMode("ADD") if circle then SetPortraitToTexture(t, ...
object_tangible_loot_creature_loot_collections_broken_lightsaber_hilt_003 = object_tangible_loot_creature_loot_collections_shared_broken_lightsaber_hilt_003:new { } ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_broken_lightsaber_hilt_003, "object/tangible/loot/creature/loot/collections/br...
local replicatedStorage = game:GetService("ReplicatedStorage") local Events = replicatedStorage.Events local eventModule = require(script.EventModule) Events.playerEvent.OnServerEvent:Connect(function(player, Type) if Type == "Archway" then eventModule.Archway(player) end if Type == "VoidSphere" then eventModu...
local npcConfig = require "config.npcConfig" local ItemModule = require "module.ItemModule" local IconFrameHelper = require "utils.IconFrameHelper" local playerModule = require "module.playerModule" local QuestModule = require "module.QuestModule" local NpcChatMoudle = require "module.NpcChatMoudle" local UserDefault =...
addEventHandler("onClientResourceStart",resourceRoot, function () triggerServerEvent("removeText",localPlayer) end )
---------------------------------------------------------------- -- Copyright (c) 2012 Klei Entertainment Inc. -- All Rights Reserved. -- SPY SOCIETY. ---------------------------------------------------------------- local array = include( "modules/array" ) local util = include( "modules/util" ) local simdefs = include...
-- ===== ===== ===== ===== ===== -- Copyright (c) 2017 Lukas Grünwald -- License MIT License -- ===== ===== ===== ===== ===== require( "pgbase" ) require( "pgdebug" ) require( "pgevents" ) require( "pgcommands" ) require( "pgbasedefinitions" ) require( "pgstatemachine" ) require( "pgstorymode" ) require( "pgspaw...
-- stable sorting of string keys -- keys corresponding to optional values are sorted first -- after this, keys are sorted alphabetically local function stableKeys(data) local keys = {} for key in pairs(data) do table.insert(keys, key) end table.sort(keys, function(key0, key1) local opt0 = data[key0].default ~...
local iconwidth = 25; local dragging = false; local typename = "dice"; local sourcenode = nil; local entries = {}; local descriptionwidget = nil; local shadowwidget = nil; local dieboxidentity = nil; function onInit() DieBoxManager.registerControl(self); registerMenuItem("Clear dice", "erase", 4); end ...
CMD.name = 'SetFaction' CMD.description = 'command.setfaction.description' CMD.syntax = 'command.setfaction.syntax' CMD.permission = 'assistant' CMD.category = 'permission.categories.character_management' CMD.arguments = 2 CMD.player_arg = 1 CMD.aliases = { 'plytransfer', 'charsetfaction', 'chartransfer' } function CM...
local item = require("../item") local image = require("../image") return { name = "Get more rats", amount = 5, weight = 0.5, condition = function (state) return state.coins >= 5 and state.ratLevel >= 1 end, description = "The sketchy trenchcoat man returns. For only $5, you may get 4 more rats to sell....
local t = require( "taptest" ) local ltrim = require( "ltrim" ) t( ltrim( "" ), "" ) t( ltrim( " " ), "" ) t( ltrim( " " ), "" ) t( ltrim( "a" ), "a" ) t( ltrim( " a" ), "a" ) t( ltrim( "a " ), "a " ) t( ltrim( " a " ), "a " ) t( ltrim( " a " ), "a " ) t( ltrim( " ab cd " ), "ab cd " ) t( ltrim( " \t\r\n\f\va\00b ...
--[[ This is the module system - see README.md for discussion. ]] local Module = {} --[[ Creates a module of the given name. Arguments: * `name` - string; the full name of the module. Returns: a new Module object; the created module. Example: local M = classic.module(...) M:class("ClassA") M:class("...
{ color0=0x113077, color1=0xaaaaaa, color2=0, name="F2", faction=8, blueprints={ {data={name="F2_0",author="F2_0_0",color0=0x113077,color1=0xaaaaaa, wgroup={0, 0, 2, 0}}, blocks={ {800,{0,0},0}, {834,{4.9992,15},1.5708}, {834,{4.9992,-15},-1.5708}, {855,{18.7492,10},-1.5708}, {855,{18.7492,-10},1.5708}, {815,{21.6658,2...
local util = require("spec.util") describe("config type checking", function() it("should error out when config.include is not a {string}", function() util.run_mock_project(finally, { dir_structure = { ["tlconfig.lua"] = [[return { include = "*.tl" }]], ["foo.tl"] = [[print "a"...
-- -- It looks just like AE2's Molecular Assembler, and has the same function too. -- local cluster_devices = assert(yatm.cluster.devices) local cluster_energy = assert(yatm.cluster.energy) local Energy = assert(yatm.energy) local assembler_yatm_network = { kind = "machine", groups = { dscs_assembler_module = ...
local PANEL = {} AccessorFunc( PANEL, "m_Material", "Material" ) AccessorFunc( PANEL, "m_Color", "Color" ) AccessorFunc( PANEL, "m_Rotation", "Rotation" ) AccessorFunc( PANEL, "m_Handle", "Handle" ) function PANEL:Init() self:SetColor( Color( 255, 255, 255, 255 ) ) self:SetRotation( 0 ) self:SetHandl...
local source = ... if _VERSION == "Lua 5.1" then load = loadstring end assert(load("return " .. source, '=(EVAL)'))
function exporttable(t) local s = "table =\n{\n" for row, r in ipairs(t) do s = s .. "\t{" for column, v in ipairs(r) do s = s .. v .. "," end s = s .. "},\n" end s = s .. "}" return s end function savetable(f) love.filesystem.write("save" .. f .. ".bly", exporttable(table)) end function loadtable(f)...
local ICloneable = require("api.ICloneable") local I18N = require("api.I18N") --- @classmod DateTime local DateTime = class.class("DateTime", ICloneable) --- @function DateTime:new --- @tparam[opt] int year --- @tparam[opt] int month --- @tparam[opt] int day --- @tparam[opt] int hour --- @tparam[opt] int minute --- @...
return { summary = 'Attach attributes from another Mesh onto this one.', description = [[ Attaches attributes from another Mesh onto this one. This can be used to share vertex data across multiple meshes without duplicating the data, and can also be used for instanced rendering by using the `divisor` p...
-- this bit of code modifies the default chests and furnaces to be compatible -- with pipeworks. minetest.override_item("default:furnace", { tiles = { "default_furnace_top.png^pipeworks_tube_connection_stony.png", "default_furnace_bottom.png^pipeworks_tube_connection_stony.png", "default_furnace_side.png^pipewo...
-- Here is an example of the most common used configuration functions -- For more in-depth use of premake, refer to the online documentation: -- https://github.com/premake/premake-core/wiki -- Add additional defines: -- defines { "DEFINE1", "DEFINE2" } -- Remove existing defines: -- undefines { "DEFINE1", "DEFINE2"...
kode = kode or {} local encode, decode local ok if ENVIRONMENT__ == "product" then ok = pcall(function() local cjson = require "cjson" encode = cjson.encode decode = cjson.decode end) end if not ok then local simplejson = require "kode.helpers.simplejson" encode = simplejson.encode decode = simplejson.dec...
-- bot.lua -- Use this with `bin/telegram-cli -s bot.lua` -- 2 seconds between commands (say, `!ping`) should be enough to avoid botloops -- Of course the other bot could wait 2 seconds between pings, but... TIMEOUT = 2 -- We shouldn't reply as much if we are busy. BUSY_TIMEOUT = 10 BUSY_REPLIES = { ["Question"] =...
local pnode = cat.require"module/game/scene/node/position_node" local image = cat.class("image",pnode){ assets_name = nil, } function image:__init__(path,x,y,r,sx,sy) pnode.__init__(self,x,y) self.assets_name = path self.r = r or 0 self.sx = sx or 1 self.sy = sy or 1 end function image:draw()...
-- init.lua -- -- Global Variables (Modify for your network) ssid = "strawberrybush" pass = "" -- Configure Wireless Internet wifi.setmode(wifi.STATION) -- print('set mode=STATION (mode='..wifi.getmode()..')\n') -- print('MAC Address: ',wifi.sta.getmac()) -- print('Chip ID: ',node.chipid()) -- print('Heap Size: ',no...