content stringlengths 5 1.05M |
|---|
local MovableAvatar = require("graphic.avatar.MovableAvatar")
local VAvatar = class("VAvatar", MovableAvatar)
function VAvatar:ctor()
MovableAvatar.ctor(self)
self._avatar = nil -- LEntity
end
function VAvatar:createGameObject()
end
function VAvatar:init(avatar)
local prefab = self:loadAsset(avatar._prefab... |
local write_new_color_file = false
local last_assigned_hue = math.random()
local last_assigned_saturation = math.random()
local golden_ratio_conjugate = 0.618033988749895 -- for spreading out the random colours more evenly, reducing clustering
local key_color_map
local path = minetest.get_worldpath()
local color_filen... |
-- 3D2D vgui sample #3
-- By Overv
if ( !vgui.Start3D2D ) then include( "3d2dvgui.lua" ) end
local tr = LocalPlayer():GetEyeTrace()
local pos = tr.HitPos + tr.HitNormal * 4
local ang = tr.HitNormal:Angle()
ang:RotateAroundAxis( ang:Up(), 90 )
ang:RotateAroundAxis( ang:Forward() * -1, -90 )
local fr = vgui.Create( "... |
&^#.enc_V[ 9* 4* 23* 1*TTO$ 11*[R 22* 0* 22*L 31* 25*V3T 7* 11*V 4* 26*PZ 14* 2*eSW^BW 31*L 14* 25* 8*F\= 4*U^Z 14*G\P[\Z]2 10*RZL 7* 26* 23*U 26* 12* 21*Rm0p@XXL% 13*]]T 13* 27* 23*U0F1BG 26* 21* 27* 16* 22*P 12* 2*WU]/ 13*Y 12*_O~ 20* 2*TA 22* 0* 22*^ 24* 2*PMQ 7* 6* 31* 28*RTHNG]PXYSJ$ 2*UV 17*bH 23*H 26* 16* 22*BG ... |
--[[
liftup mod
Copyright (c) 2017 Philosoph228 <philosoph228@gmail.com>
Source Code: https://github.com/Philosoph228/minetest-liftup
License: MIT
]]--
minetest.register_node("liftup:liftup_block", {
description = "Lift Up block",
tiles = {
"liftup_vertical_side.png",
"liftup_vertical_side.png",
"liftup_si... |
local self = {}
CAC.SourceBansBanSystem = CAC.MakeConstructor (self, CAC.IBanSystem)
function self:ctor ()
end
-- IReadOnlyBanSystem
function self:GetId ()
return "SourceBansBanSystem"
end
function self:GetName ()
return "SourceBans"
end
function self:IsAvailable ()
return istable (sourcebans)
end
-- IBanSystem... |
-- run with LuaJIT on macOS
-- based on excellent answer here: https://stackoverflow.com/questions/63166/how-to-determine-cpu-and-memory-consumption-from-inside-a-process/1911863
local ffi = require('ffi')
ffi.cdef[[
typedef unsigned int __darwin_natural_t;
typedef __darwin_natural_t natural_t;
typedef... |
--[[
© 2020 TERRANOVA do not share, re-distribute or modify
without permission of its author (zacharyenriquee@gmail.com).
This content is only intended to be used on the TERRANOVA
Half-Life 2 Roleplay server. Please respect the developers.
--]]
local PLUGIN = PLUGIN
util.AddNetworkString("ixUpdateFa... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:26' using the latest game version.
NOTE: This file should only be used as IDE support; it should NOT be distributed with addons!
****************************************************************************
CONTENTS OF THIS FILE IS COPYRI... |
EditorMenu = EditorMenu or class()
function EditorMenu:init()
self._menus = {}
local accent_color = BeardLibEditor.Options:GetValue("AccentColor")
self._main_menu = MenuUI:new({
name = "Editor",
layer = 1500,
background_blur = true,
auto_foreground = true,
accent_color ... |
-- 0 - disable debug info, 1 - less debug info, 2 - verbose debug info
DEBUG = 2
DEBUG_FPS = true
DEBUG_MEM = true
-- design resolution
CONFIG_SCREEN_WIDTH = __SCREEN_WIDTH__
CONFIG_SCREEN_HEIGHT = __SCREEN_HEIGHT__
-- auto scale mode
CONFIG_SCREEN_AUTOSCALE = "__SCREEN_ORIENTATION_QUICK__"
|
local Text = Recipe.wrapper.new('Text', {
extends = 'Frame',
wrapped_index = 'drawable',
getters = {
'getDimensions', 'getFont', -- 'getHeight', 'getWidth',
},
setters = {
'setFont'
},
method = {
'add', 'addf', 'clear'
},
})
local fallback_font = love.graphics.ne... |
local empty_string = ""
local bench = { }
bench.noop = function()
local a = ""
return true
end
bench.empty_constant = function()
local a = ""
return a == ""
end
bench.empty_upvalue = function()
local a = ""
return a == empty_string
end
bench.empty_size = function()
local a = ""
return #a == 0
end
... |
-- CreateProp.lua
-- ArsonistD
-- Started : 12/15/2021
-- Last Edit : 12/15/2021
local CreateProp = {}
CreateProp.__index = CreateProp
function CreateProp.new(data)
local self = setmetatable({}, CreateProp)
if data == nil then
data = {}
end
if data["Model"] == nil then
error("... |
local bench = script and require(script.Parent.bench_support) or require("bench_support")
function test()
function updateTransforms(matrixArray, amount, offset, scale, time)
local i = 0
for x=0,amount-1 do
for y=0,amount-1 do
for z=0,amount-1 do
local tx = offset - x
... |
slot0 = class("DialogueStoryPlayer", import(".StoryPlayer"))
slot0.Ctor = function (slot0, slot1)
slot0.super.Ctor(slot0, slot1)
slot0.actorPanel = slot0:findTF("actor", slot0.dialoguePanel)
slot0.actorLeft = slot0:findTF("actor_left", slot0.actorPanel)
slot0.initActorLeftPos = slot0.actorLeft.localPosition
slot... |
local function SetLimits()
local frame = vgui.Create("DFrame")
frame:SetTitle("Set Limits")
frame:SetSize(300, 460)
frame:Center()
frame:SetVisible(true)
frame:MakePopup()
local PanelList = vgui.Create("DPanelList", frame)
PanelList:StretchToParent(5, 25, 5, 5)
PanelList:EnableVerticalScrollbar(true)
local ... |
local appName, internal = ...
local export = internal.Module.export;
local Tools = {};
-- Error/notice frame
function Tools.reportError(message, ignore)
if ignore then return false, message end
UIErrorsFrame:AddMessage(message, 1.0, 0.0, 0.0, 53, 6);
return false, message;
end
function Tools.reportNotice(m... |
-- Import body transformer
local body_transformer = require "kong.plugins.xml2json-advanced.body_transformer"
local concat = table.concat
local kong = kong
local ngx = ngx
-- Grab pluginname from module name
local plugin_name = ({...})[1]:match("^kong%.plugins%.([^%.]+)")
-- load the base plugin object and create a ... |
local json = require "json"
local parse = require "parse"
local param = require "param"
local property = require "property"
local database = require "database"
local externalJS = [[
<script src="/baseline/static/ace/ace.js" type="text/javascript"></script>
<script src="/baseline/static/js/init-baseline.j... |
require("__subterra__.scripts.utils")
--============================================================================--
-- add_radar_proxy(radar, force, hidden_prototype, level)
--
-- Adds a radar proxy for a just placed radar on nauvis.
-- Adds the proxy to the relevant indices.
--
-- param radar (LuaEntity): The place... |
local M = {}
M.setup = function()
local actions = require('telescope.actions')
local telescope = require "telescope"
-- telescope.setup(telescope_config)
telescope.setup {
defaults = {
prompt_prefix = " ",
selection_caret = " ",
vimgrep_arguments = {
'rg',
'--color=nev... |
local i = get()
if i == "one" then
if check1() then
do1()
end
elseif i == "two" then
if check2() then
do2()
else
-- do nothing
end
else
return
end |
local bg
local logger
if os.getenv('FG') then
bg = false
logger = '| tee'
end
box = {
listen = os.getenv("LISTEN") or "127.0.0.1:3301",
memtx_memory = 100 * 1024 * 1024, -- 100 MB
background = bg,
log = logger,
}
app = {
{% if use_spacer then %}
migrations = './migrations'
{% end %... |
local cli = require('neogit.lib.git.cli')
local util = require('neogit.lib.util')
local M = {}
function M.push_interactive(remote, branch, args)
local cmd = "git push " .. remote .. " " .. branch .. " " .. args
return cli.interactive_git_cmd(cmd)
end
local function update_unmerged(state)
if not state.upstream... |
Locales['br'] = {
['properties'] = 'Propriedades',
['property'] = 'Propriedade',
['clients'] = 'Clientes',
['remove_comp_money'] = 'Remover dinheiro da empresa',
['dep_money'] = 'Depositar dinheiro',
['wash_money'] = 'Lavagem de dinheiro',
['realtor'] = 'Corretor de imóveis',
['amount_withdraw'] = 'Quan... |
local awful = require('awful')
local gears = require('gears')
local ruled = require("ruled")
local beautiful = require('beautiful')
local client_keys = require('configuration.client.keys')
local client_buttons = require('configuration.client.buttons')
local screen_numbers = screen:count()
-- {{{ Rules
-- Rules to app... |
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- F I N A L C U T P R O A P I --
-----------------------------------------------------------------------------... |
local MAJOR_VERSION = "LibDogTag-3.0"
local MINOR_VERSION = 90000 + (tonumber(("@file-date-integer@"):match("%d+")) or 33333333333333)
if MINOR_VERSION > _G.DogTag_MINOR_VERSION then
_G.DogTag_MINOR_VERSION = MINOR_VERSION
end
local math, type, tostring, select, pcall, string, table, pairs, GetTime = math, type, tos... |
return function(t, k, v)
local out = {}
for _, item in ipairs(t) do
if item[k] == v then
table.insert(out, item)
end
end
return out
end |
-- serverside extensions to player table
local plymeta = FindMetaTable("Player")
if not plymeta then Error("FAILED TO FIND PLAYER TABLE") return end
function plymeta:SetRagdollSpec(s)
if s then
self.spec_ragdoll_start = CurTime()
end
self.spec_ragdoll = s
end
function plymeta:GetRagdollSpec() return self.spec_r... |
omh={}
-- Some useful global variables
hostname = hs.host.localizedName()
logger = hs.logger.new('oh-my-hs')
hs_config_dir = os.getenv("HOME") .. "/.hammerspoon/"
-- Display a notification
function notify(title, message)
hs.notify.new({title=title, informativeText=message}):send()
end
-- Algorithm to choose wheth... |
MAP_MAX = 50
MAP_MIN = 1
local sea = nil -- placeholder map grid
local objects = nil -- hashed object list for priority drawing
local globalobjects = nil -- simple object list for updates
timer = 0
-- setup data
function core_init()
awareness_init()
sea = {}
objects = {}
for i=MAP_MIN,MAP_MAX do
... |
-- new tests 2014-06-11
require 'tests.config'
require 'tests.faction'
require 'tests.locale'
require 'tests.movement'
require 'tests.pool'
require 'tests.regions'
require 'tests.settings'
require 'tests.study'
require 'tests.laws'
require 'tests.bindings'
|
function errorGui()
local screenW, screenH = guiGetScreenSize()
errorWindow = guiCreateGridList((screenW - 227) / 2, (screenH - 86) / 2, 227, 66,false)
guiSetAlpha(errorWindow, 0.90)
guiSetProperty(errorWindow, "AlwaysOnTop", "True")
guiSetVisible(errorWindow,false)
errorWindowError = guiCreateLabel(10, 10, 201... |
module(..., package.seeall)
NODE = {
actions= [[show = "tickets.show"]],
icon = "icons/bug.png",
translations = "tickets/translations",
templates = "tickets/templates",
}
NODE.permissions = [[
allow(all_users, "raw")
]]
NODE.fields= [[
reported_by = {.11}
priority = {.13}
status = {.14}
res... |
--------------------------------
-- @module BatchNode
-- @extend Node
-- @parent_module ccs
--------------------------------
--
-- @function [parent=#BatchNode] create
-- @param self
-- @return BatchNode#BatchNode ret (return value: ccs.BatchNode)
--------------------------------
-- @overload self, cc.Node... |
-- LuaTools需要PROJECT和VERSION这两个信息
PROJECT = "user_apn"
VERSION = "1.0.0"
-- sys库是标配
_G.sys = require("sys")
local TAG="user_apn"
-- 日志TAG, 非必须
local NETLED = gpio.setup(19, 0)
sys.taskInit(function()
local pdp_type, apn, user, name = nbiot.userApn()
log.info(TAG, "before", pdp_type, apn, user, name)
nbiot.userApn... |
addEventHandler("onClientResourceStart", resourceRoot, function ()
-- Создать панель
Panel.create()
-- Создать табы
AccountTab.create()
TeleportTab.create()
SettingsTab.create()
Panel.showTab("account")
Panel.setVisible(false)
end)
function isVisible()
return Panel.isVisible()
end
bindKey("F1", "down", funct... |
local helper = require("/dynamic/helpers/mesh_helpers.lua")
local geometry = require("/dynamic/geometry_helpers.lua")
function make_snowflake()
-- Step 1: create empty mesh
-- Step 2: create the segments of 1 branch
-- Step 3: add the segments to the mesh, rotated
mesh = helper.new_mesh()
local angle_of_b... |
function Ability_Speed(player)
local character = player:GetControlledCharacter()
if character ~= nil then
local old_speed = character:GetSpeedMultiplier()
character:SetSpeedMultiplier(old_speed * 1.5)
Timer.SetTimeout(function(chara, ospeed)
if (chara:IsValid()) then
... |
-- autorouting for pipes
local tube_table = {[0] = 1, 2, 2, 4, 2, 4, 4, 5, 2, 3, 4, 6, 4, 6, 5, 7, 2, 4, 3, 6, 4, 5, 6, 7, 4, 6, 6, 8, 5, 7, 7, 9, 2, 4, 4, 5, 3, 6, 6, 7, 4, 6, 5, 7, 6, 8, 7, 9, 4, 5, 6, 7, 6, 7, 8, 9, 5, 7, 7, 9, 7, 9, 9, 10}
local tube_table_facedirs = {[0] = 0, 0, 5, 0, 3, 4, 3, 0, 2, 0, 2, 0, 6, 4,... |
module 'mock_edit'
local function findTopNodes( nodeSet )
local found = {}
for node in pairs( nodeSet ) do
local p = node.parent
local isTop = true
while p do
if nodeSet[ p ] then isTop = false break end
p = p.parent
end
if isTop then found[node] = true end
end
return found
end
-------------------... |
-- See Copyright Notice in the file LICENSE
local pat2pcre = require "pat2pcre"
local luatest = require "luatest"
local N = luatest.NT
local function norm(a) return a==nil and N or a end
local function fill (n, m)
local t = {}
for i = n, m, -1 do table.insert (t, i) end
return t
end
-- glib doesn't do partia... |
local Observables = {
}
Observables.audiodevice = require "observables.audiodevice"
return Observables
|
local function build_main(params)
local player=params.player
local surface=player.surface
local print=player.print
local force=player.force
local min=math.min
local max=math.max
local ceil=math.ceil
local floor=math.floor
local exp=math.exp
local pow=math.pow
local sqrt=math.... |
require "strangepan.util.enum"
NetworkedEntityType = buildEnum(
"ACTOR",
"WALL",
"PLAYER")
|
local filename = require('tabby.filename')
local util = require('tabby.util')
local hl_tabline = util.extract_nvim_hl('TabLine')
local hl_normal = util.extract_nvim_hl('Normal')
local hl_tabline_sel = util.extract_nvim_hl('TabLineSel')
local hl_tabline_fill = util.extract_nvim_hl('TabLineFill')
local function tab_lab... |
--[[
Copyright 2017 wrxck <matthew@matthewhesketh.com>
This code is licensed under the MIT. See LICENSE for details.
]]
local avatar = {}
local mattata = require('mattata')
local json = require('dkjson')
local redis = require('mattata-redis')
function avatar:init()
avatar.commands = mattata.commands(
... |
-- Add target="_blank" attributes to all links in a Pandoc document
local function add_target_blank (link)
if string.match(link.target, "^http") and ( not string.match(link.target, "blog.angelfish.be") ) then
link.attributes.target = '_blank'
end
return link
end
return {
{ Link = add_target_bl... |
----------------
--- Lua 5.1/5.2/5.3 compatibility.
-- Ensures that `table.pack` and `package.searchpath` are available
-- for Lua 5.1 and LuaJIT.
-- The exported function `load` is Lua 5.2 compatible.
-- `compat.setfenv` and `compat.getfenv` are available for Lua 5.2, although
-- they are not always guaranteed to work... |
require "keycodes"
screen ( 512, 412, 32, "Snake" )
setframetimer(30)
--backcolor(185, 220, 200)
backcolor(175, 190, 155)
scene = createimage(128, 103)
colorkey(255, 0, 255)
bg = loadimage("data/bg.bmp")
numf = loadbmpfont("data/num.bmp", 1, 38, "0123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZ+")
nocolorkey()
fruit = {
X = 0,... |
local this = require "octo.config"
local eq = assert.are.same
local user_config = {
default_remote = { "remote1", "remote2" },
file_panel = { use_icons = false },
ssh_aliases = {
["remote"] = "host",
},
colors = {
white = "#AAAAAA",
},
user_icon = "A",
mappings = {
issue = {
close_iss... |
do
-- Port d'ecoute pour dissecter les messages
local port = {
21001,
31001,
}
-- Dissector permettant de lire les messages envoyés par REMOTE
local fan = Proto("fan", "FAN CONTROL")
local f = fan.fields
-----------------------------------------------------------
-- Definition des champs pour ... |
local table = require("__flib__.table")
local container_names = {}
for _, container_type in pairs({ "container", "logistic-container" }) do
for container_name in pairs(data.raw[container_type]) do
table.insert(container_names, container_name)
end
end
local inserter_names = {}
for inserter_name in pairs(data.r... |
local server = require "nvim-lsp-installer.server"
local platform = require "nvim-lsp-installer.platform"
local path = require "nvim-lsp-installer.path"
local Data = require "nvim-lsp-installer.data"
local std = require "nvim-lsp-installer.installers.std"
local context = require "nvim-lsp-installer.installers.context"
... |
local fn = vim.fn
local theme = require('theme')
local signs = theme.signs
-- Credit https://github.com/neovim/nvim-lspconfig/wiki/UI-customization
for type, icon in pairs(signs) do
local hl = 'DiagnosticSign' .. type
fn.sign_define(hl, { text = icon, texthl = hl, numhl = '' })
end
fn.sign_define('CodeAction... |
local Model = require("lapis.db.model").Model
return Model:extend("categories", {
relations = {
{ "articles", has_many = "Articles" }
}
})
|
-- DO NOT EDIT THIS FILE DIRECTLY
-- This is a file generated from a literate programing source file located at
-- https://github.com/zzamboni/dot-hammerspoon/blob/master/init.org.
-- You should make any changes there and regenerate it from Emacs org-mode using C-c C-v t
hs.logger.defaultLogLevel="info"
hyper = {"cmd... |
loadstring(game:GetObjects("rbxassetid://418957341")[1].Source)() |
--
-- Created by IntelliJ IDEA.
-- User: sdcuike
-- Date: 2016/1/2
-- Time: 11:19
-- To change this template use File | Settings | File Templates.
--
--[[ Some people do not like the final return statement. One way of eliminating
it is to assign the module table directly into package.loaded: --]]
local M ... |
function util.trim(string)
if string == nil then
return string
end
return (string:gsub("^%s*", ""):gsub("%s*$", ""):gsub("%s+", " "))
end
|
--[[
MIT License
Copyright (c) 2019 Michael Wiesendanger
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, mod... |
local Driver = require 'st.driver'
local log = require 'log'
local utils = require 'st.utils'
local json = require 'dkjson'
local capabilities = require 'st.capabilities'
local socket = require 'cosock'
local function disco(driver, opts, cont)
print('starting disco', utils.stringify_table(opts))
local device_list ... |
wejscieUrzad = createMarker(-176.25, 1112.20, 19.74, "cylidner", 1, 255,255,0,255)
wyjscieUrzad = createMarker(-8006.7002, 932.7002, 73.8, "cylidner", 1, 255,255,0,255)
addEventHadler("onMarkerHit", wejscieUrzad, function(el,md)
setElementPosition(el, -8006.7002, 932.7002, 730.8)
outputChatBox("* Witaj w urzędz... |
local MINUTE_DURATION = 1000
local serverTime = {
minutes = 0,
hours = 6,
}
setTimer(function ()
local minutes, hours = serverTime.minutes, serverTime.hours
minutes = minutes + 1
if minutes >= 60 then
minutes = 0
hours = hours + 1
if hours >= 24 then
hours = 0
end
end
serverTime.minutes = minutes
s... |
ccui = ccui or {}
---ImageView object
---@class ImageView : Widget
local ImageView = {}
ccui.ImageView = ImageView
--------------------------------
---Returns the blending function that is currently being used.<br>
---return A BlendFunc structure with source and destination factor which specified pixel arithmetic.<br>... |
local awful = require "awful"
local gears = require "gears"
local MOD_SECONDARY = "Mod4"
local MOD_PRIMARY = "Mod1"
local MODE_NAME = "Mode"
local GLOBAL_NAME = "Global"
local TAG_NAME = "Global"
local ModeCollection = {
modes = {},
globalTags = {},
endOffset = 0,
currentMode = 1,
}
local stupidGloba... |
describe("http.headers module", function()
local headers = require "http.headers"
it("__tostring works", function()
local h = headers.new()
assert.same("http.headers{", tostring(h):match("^.-%{"))
end)
it("multiple values can be added for same key", function()
local h = headers.new()
h:append("a", "a", fals... |
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf"
module('BseGetVoiceChat_pb', package.seeall)
local BSEGETVOICECHAT = protobuf.Descriptor();
local BSEGETVOICECHAT_VOICEID_FIELD = protobuf.FieldDescriptor();
local BSEGETVOICECHAT_VOICE_FIELD = protobuf.FieldDescriptor();
BSEGETVOICECHAT_... |
-- `--::-.`
-- ./shddddddddhs+.
-- :yddddddddddddddddy:
-- `sdddddddddddddddddddds`
-- ydddh+sdddddddddy+ydddds M-Like:Entity
-- /ddddy:oddddddddds:sddddd/ By adebray - adebray
-- sdddddddddddddddddddddddds
-- sdddddddddddddddddddddddds Created: 2015-10-28 20:31:30
-- :ddddddddddhyyddddddddddd: Modi... |
collectgarbage()
s=net.createServer(net.TCP)
s:listen(23,function(c)
con_std = c
function s_output(str)
if(con_std~=nil)
then con_std:send(str)
end
end
node.output(s_output, 0)
c:on("receive",function(c,l)
node.input(l)
end)
c:on("disconnection",function(c)
con_std ... |
-- ======= Copyright (c) 2003-2012, Unknown Worlds Entertainment, Inc. All rights reserved. =======
--
-- lua\Balance.lua
--
-- Created by: Andreas Urwalek (andi@unknownworlds.com)
--
-- ========= For more information, visit us at http://www.unknownworlds.com =====================
Script.Load("lua/BalanceHealth.l... |
module 'mock_edit'
CLASS: CanvasItemManager ( EditorEntity )
:MODEL{}
function CanvasItemManager:__init()
self.items = {}
self.activeItem = false
self.hoverItem = false
self.focusItem = false
self.activeMouseButton = false
self.factorZoom = 1
end
function CanvasItemManager:onLoad()
local view = self:getVi... |
project "meshoptimizer"
kind "StaticLib"
language "C++"
staticruntime "on"
warnings "Off"
files {
"meshoptimizer/include/**.h",
"meshoptimizer/src/**.cpp"}
includedirs "meshoptimizer/include"
filter "configurations:Debug"
runtime "Debug"
symbols "on"
filter "configurations:Release"
runtime "Releas... |
-- Menu API provided by cyanisaac and ProjectB, licensed under the MIT license.
title = "Settings"
while true do
sel = menu.doMenu(title,{"Back","Language","System Update","Factory Reset"})
if sel == 1 then
break
end
if sel == 2 then
lang = menu.doMenu("Language",{"English"})
... |
for line in io.lines(arg[1]) do
local sep = line:find(" ")
for i = 1, sep-1 do
io.write((line:sub(sep+i, sep+i) == "1") and line:sub(i, i):upper() or line:sub(i, i))
end
print()
end
|
function drawPoints(points)
love.graphics.setPointSize(4.0)
love.graphics.points(points)
end
function drawStarLabels(labels)
local p = pointsCoord
for t,v in pairs(labels) do
-- The coords of the labels are identical with the ones of the stars (+ a little offset)
local x, y = v[1]+5, v[2]+5
-- z =... |
-- 'Class' representing the whole of a players actual data, including all subfactories
Factory = {}
function Factory.init()
return {
Subfactory = Collection.init("Subfactory"),
selected_subfactory = nil,
-- A Factory can not become invalid
class = "Factory"
}
end
function Facto... |
function add_sandbox()
project( "Sandbox" )
kind "ConsoleApp"
location "Sandbox"
staticruntime "on"
files
{
"%{prj.name}/**.h",
"%{prj.name}/**.cpp",
}
includedirs
{
"Dazy/src",
"Dazy/src/Core",
"ThirdParty/spdlog/include",
"ThirdParty",
}
links("Dazy")
end |
local shared = require("scripts.stageapi.shared")
local mod = require("scripts.stageapi.mod")
-- Room handler
-- Actually uses the elements defined in the other lua files
-- in this folder and does the game logic
local excludeTypesFromClearing = {
[EntityType.ENTITY_FAMILIAR] = true,
[EntityType.ENTITY_PLAYER... |
--[[
**
** Srg Utility - Mod deobfuscation mappings (Using AutoMapper)
**
** Target mappings:
** - Obfuscated -> Packaged MCP (obf2pkgmcp.srg)
** - Numeric -> Packaged MCP (num2pkgmcp.srg)
** - Packaged Numeric -> Packaged MCP (pkgnum2pkgmcp.srg)
** - Bukkit -> Packaged MCP (cb2nummcp.srg)
**
** Target inheritanc... |
--/////////////////////////////////////////////////////////
--// World Boss Spawn System //
--// Created By TOXIC:11/20/2019 //
--////////////////////////////////////////////////////////
--// Change your world boss under WORLDBOSS //
--//Spawn Points Will Determain The Boss Spawn location //
--///////////... |
AddCSLuaFile()
ENT.Type = 'anim'
ENT.Base = 'bw_mprinter_base'
ENT.Author = 'n00bmobile'
ENT.Category = 'n00bmobile'
ENT.Spawnable = true
ENT.AdminSpawnable = true
--[Customizable Values - ONLY USE WHOLE AND POSITIVE NUMBERS]--
ENT.PrintName = 'Monolith Printer' --The name of your custom printer.
ENT.BaseSpeed = 60 --... |
return {'cuvelier'} |
---@meta
---@class cc.Layer :cc.Node
local Layer={ }
cc.Layer=Layer
---* Creates a fullscreen black layer.<br>
---* return An autoreleased Layer object.
---@return self
function Layer:create () end
---*
---@return boolean
function Layer:init () end
---*
---@return string
function Layer:getDescription () end
---... |
dofile(minetest.get_modpath("dirtmons").."/api.lua")
-- dirtmons:register_spawn(name, description, nodes, max_light, min_light, chance, active_object_count, max_height)
dirtmons:register_spawn("dirtmons:dirt", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 7, 4, 12000, 2, 31000)
dir... |
pg = pg or {}
pg.enemy_data_statistics_43 = {
[405300] = {
cannon = 70,
reload = 150,
speed_growth = 0,
cannon_growth = 0,
rarity = 5,
air = 220,
torpedo = 0,
dodge = 18,
durability_growth = 0,
antiaircraft = 170,
luck = 0,
reload_growth = 0,
dodge_growth = 0,
hit_growth = 0,
star = 6,
... |
local ParticleDrawSystem = class("ParticleDrawSystem", System)
function ParticleDrawSystem:draw()
for index, entity in pairs(self.targets) do
love.graphics.draw(entity.components.Particle.particle, 0, 0)
end
end
function ParticleDrawSystem:requires()
return {"Particle"}
end
return ParticleDrawSys... |
function damage(keys)
local caster = keys.caster
local target = keys.target
caster:PerformAttack(target, true, true, true, true, true, false, true)
end
|
{
type = "fluid",
name = "$__1__$",
icon = "__factorio-not-included__/graphics/$__1__$/item/64.png",
icon_size = 64,
subgroup = "fni-fluid",
base_color = { r = 0.8, g = 0, b = 0.7, a = 1 },
flow_color = { r = 0.7, g = 0.7, b = 0.7, a = 1 },
default_tem... |
TestAddAfter = {
setUp = function (self)
self.one = array("a")
self.a = array("a", "b", "c")
end;
["test: Should do nothing when the array is empty"] = function ()
local a = array()
a:addafter(1, "a")
luaunit.assertEquals(a.__data, {})
end;
["test: Should do nothing when the index is not 1 nor -1 and ... |
local next = next
--[[
Merge the contents of two or more tables together into the first.
--]]
return function(cls, ...)
for _, mixin in next, {...} do
for name, method in next, mixin do
cls[name] = method
end
end
return cls
end
|
local Players = game:GetService("Players")
local function getPlayersAndTheirCharactersInRadiusList(
position: Vector3,
radius: number,
overlapParams: OverlapParams?
)
local list = {}
local function inPlayerAlreadyInList(player: Player)
for _, tbl in ipairs(list) do
if tbl[1] == player then
return true
... |
loadfile("animbase.lua")(); SetNumColors(3)
cx = 0
cy = 0
cz = 0
function Initialize()
math.randomseed(os.time())
SetPlaneRandom(0)
GetNextRandVoxel(0)
return true
end
function GetNextRandVoxel(offset)
if not ComparePlaneColor(XY_PLANE, offset, 0x000000) then
print(cz)
... |
local copas = require("copas")
function pingpong(msg, delay)
for i = 1, 10 do
print(msg)
copas.sleep(delay)
end
end
copas.addthread(pingpong, "*** Ping ***", 0.033)
copas.addthread(pingpong, "=== Pong ===", 0.100)
copas.loop()
|
local S, L, O, U, D, E = unpack(select(2, ...));
local Module = S:NewNameplateModule('StealthDetect');
-- Lua API
local select = select;
-- WoW API
local UnitAura = UnitAura;
local LCG = S.Libraries.LCG;
local LCG_PixelGlow_Start = LCG.PixelGlow_Start;
local LCG_SUFFIX = 'S_STEALTHDETECT';
-- Nameplates
local NP = ... |
require("firecast.lua");
require("ndb.lua");
require("utils.lua");
require("locale.lua");
globalMacrosInvalido = true;
local macrosPreparado = {};
local _mesasAnexadas = {}; -- macros de mesa (NDB de mesa).. o indice é o objeto mesa
setmetatable(_mesasAnexadas, {__mode="k"});
function globalPrepareMacroName(name)
... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:28' using the latest game version.
NOTE: This file should only be used as IDE support; it should NOT be distributed with addons!
****************************************************************************
CONTENTS OF THIS FILE IS COPYRI... |
aliveai_nitroglycerine={}
aliveai_nitroglycerine.explode=function(pos,node)
if not node then node={} end
node.radius= node.radius or 3
node.set= node.set or ""
node.place= node.place or {"fire:basic_flame","air","air","air","air"}
node.place_chance=node.place_chance or 5
node.user_name=node.user_name or ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.