content stringlengths 5 1.05M |
|---|
------------------------------------------------------------------------------------------------------------------------
-- Date & Time Module
-- Author: Morticai (META) (https://www.coregames.com/user/d1073dbcc404405cbef8ce728e53d380)
-- Date: 2020/12/22
-- Version 0.1.4
----------------------------------------------... |
-----------------------------------
-- Area: Caedarva Mire
-- ZNM: Tyger
-- !pos -766 -12 632 79
-- Spawn with Singed Buffalo: !additem 2593
-----------------------------------
require("scripts/globals/status")
-----------------------------------
function onMobSpawn(mob)
mob:addMod(tpz.mod.SLEEPRES,30)
mob:ad... |
slot0 = class("XiaoTianChengPtPage", import(".TemplatePage.PtTemplatePage"))
slot0.OnInit = function (slot0)
slot0.super.OnInit(slot0)
slot0.hearts = UIItemList.New(slot0:findTF("AD/heart"), slot0:findTF("AD/heart/mark"))
slot0.helpBtn = slot0:findTF("AD/Image")
onButton(slot0, slot0.helpBtn, function ()
pg.Ms... |
local SPUtil = require(game.ReplicatedStorage.Shared.SPUtil)
local SPDict = require(game.ReplicatedStorage.Shared.SPDict)
local SPMultiDict = require(game.ReplicatedStorage.Shared.SPMultiDict)
local SPList = require(game.ReplicatedStorage.Shared.SPList)
local SPUISystem = require(game.ReplicatedStorage.Shared.SPUISyste... |
--[[
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... |
---@diagnostic disable-next-line: deprecated
local E, L, V, P, G, _ = unpack(ElvUI);
local NP = E:GetModule('NamePlates');
-- local EP = E.Libs.EP
local EP = LibStub('LibElvUIPlugin-1.0')
local DAN = E:NewModule('ElvUI_DmgAtPlates', 'AceTimer-3.0', 'AceHook-3.0', 'AceEvent-3.0')
local LibEasing = LibStub("LibEasing-1.0... |
---
--- math.lua by RayStudio9236
--- See https://github.com/RayStudio36/math.lua for usage documentation.
--- Licensed under MIT.
--- See https://opensource.org/licenses/MIT for details.
---
require("test.vector2_test")
|
-- test script for wslua Field/FieldInfo functions
-- use with dhcp.pcap in test/captures directory
------------- helper funcs ------------
local packet_count = 0
local function incPktCount(name)
packet_count = packet_count + 1
end
local function testing(...)
print("---- Testing "..tostring(...).." for packe... |
local ffi = require('ffi')
ffi.nullptr = ffi.cast('void*', 0)
function ffi.isnullptr(p)
return not (ffi.cast('void*', p) > nil)
end
local typeof = ffi.typeof
local cast = ffi.cast
local _ptr_t = typeof('void*')
function ffi.convert_ptr(userdata, cdata_ptr_t)
return cast(cdata_ptr_t or _ptr_t, userdata)
end
... |
-- urColors
-- Concept by: Devin Kerr
-- Related concept by: Eric Lapointe
-- Initial Hack by: Georg Essl 11/19/09
local num_colors = 8
colorscreens = {}
-- Scroll functions
-- Scroll action ended, check if we need to align
local function ColorScrollEnds(self)
local left = self:Left()
local div
div = left / (Scre... |
-- Copyright (C) 2014 Daurnimator
-- Released under MIT/X11 license
-- Uses https://github.com/daurnimator/lua-systemd
local sd = require "systemd.daemon"
local sj = require "systemd.journal"
module:set_global() -- Global module
local function ready()
sd.notifyt { READY = 1, STATUS = "running" };
end
module:hook("... |
require 'iuplua'
require 'iupluacontrols'
testbutton = iup.button{title = "push me to show item", fontsize = "20"}
content = iup.hbox{testbutton}
mainwindow = iup.dialog{content}
function testbutton:action()
print(iup.MainLoopLevel())
reallybutton = iup.button{title="push me to delete this item", fontsize="20"}
... |
Map = Object:extend()
function Map:new(world, map)
self.world = world
self.map = map
for i=1,#self.map do
local row = self.map[i]
for j=1, #row do
if row[j] == 2 then
local num = (i-1)*#self.map + j
local x, y = (j-1)*TILE_SIZE, (i-1)*TILE_SIZE
self.world:add(num, x, y, T... |
common_server = "127.0.0.1:30001" |
vim.env.FZF_DEFAULT_OPTS = "--reverse"
vim.cmd([[
nnoremap [fugitive] <Nop>
nmap <Leader>l [fugitive]
nnoremap [fugitive]s :G<CR>
nnoremap [fugitive]a :G add .<CR>
nnoremap [fugitive]t :GBranches<CR>
nnoremap [fugitive]p :G push --quiet<CR>
nnoremap [fugitive]l :G pull --quiet<CR>
nnoremap [fugitive]b :G blame<CR>
nn... |
style =
{["off_color"] = "cff",
["on_color"] = "cff",
["line_color"] = "000",
["line_width"] = "1"};
dot_style =
{["off_color"] = "fff",
["on_color"] = "fff",
["line_color"] = "000",
["line_width"] = "2",};
text_style = {["font_size"] = "16"}
x = {}
y = {}
mar... |
-----------------------------------------
-- ID: 5548
-- Item: Prime Beef Stewpot
-- Food Effect: 4 Hrs, All Races
-----------------------------------------
-- TODO: Group Effect
-- HP +10% Cap 75
-- MP +15
-- Strength +2
-- Agility +1
-- Mind +1
-- HP Recovered while healing +7
-- MP Recovered while healing +2
-- Atta... |
---
-- Output a list of merged PRs since last release in the CHANGES.txt format.
---
local usage = "Usage: premake5 --file=scripts/changes.lua --since=<rev> changes"
local sinceRev = _OPTIONS["since"]
if not sinceRev then
print(usage)
error("Missing `--since`", 0)
end
local function parsePullRequestId(line)
ret... |
local defaultConfig = {
title = {
BG_Left = "#161515",
BG_Right = "#222222",
Line_Left = "#b87cf0",
Line_Right = "#59307f"
},
main = {
highlight = "#614080",
frames = "#000111",
enabled = "#4CBB17",
disabled = "#666666",
negative = "#FF9999",
positive = "#9654FD"
},
leaderboard = {
background... |
local _ = require("src/underscore")
describe("_.range", function()
describe("when only passing a length", function()
it("should iterate from 1 to the length", function()
local result = _.range(3):to_array()
assert.are.same(result, {1, 2, 3})
end)
end)
describe("when only passing a start and ... |
local skynet = require "skynet"
local sock_mgr = require "sock_mgr"
local CMD = {}
function CMD.start(conf)
sock_mgr:start(conf)
end
skynet.start(function()
skynet.dispatch("lua", function(_, session, cmd, ...)
if cmd == "socket" then
local f = sock_mgr[subcmd]
f(sock_mgr, ...... |
--[[
TabItemButton.lua
@Author : DengSir (tdaddon@163.com)
@Link : https://dengsir.github.io
]]
local WIDGET, VERSION = 'TabItemButton', 1
local GUI = LibStub('NetEaseGUI-2.0')
local TabItemButton = GUI:NewClass(WIDGET, GUI:GetClass('ItemButton'), VERSION)
if not TabItemButton then
return
end
f... |
local floor = math.floor
local tmp = {}
local function merge(arr, l, m, r)
local i, j, k = l, m + 1, 1
while i <= m and j <= r do
if (arr[i] < arr[j]) then
tmp[k] = arr[i]
i = i + 1
else
tmp[k] = arr[j]
j = j + 1
end
k = k + 1
... |
if Server then
function Exosuit:OnUpdate(deltaTime)
ScriptActor.OnUpdate(self, deltaTime)
-- prevent exosuits from losing their owner
--if self.resetOwnerTime and self.resetOwnerTime < Shared.GetTime() then
-- self:SetOwner(nil)
-- self.resetOwnerTime = ... |
-- And maybe you'll be there, too.
local delay = 0.068
local song = "./and-maybe-you'll-be-there-too.ogg"
local body = { "So.\n\n", "Right NOW I've just got back from work. I'm lying in bed.\nIt's satisfying.\n\n", "I love that part before sleep where your mind just\nstretches and moans, waiting to fall apart.\n\nI pu... |
--- A really basic argument parser.
--
-- @module metis.argparse
--local expect = require "cc.expect".expect
local function errorf(msg, ...)
error(msg:format(...), 0)
end
local function setter(argument, result, value)
result[argument.name] = value or true
end
--- A collection of arguments, and a parser for them... |
require "util"
require "strings"
local Screen = require "widgets/screen"
local Button = require "widgets/button"
local AnimButton = require "widgets/animbutton"
local ImageButton = require "widgets/imagebutton"
local Grid = require "widgets/grid"
local Text = require "widgets/text"
local Image = require "widgets/image"... |
local core = require('vfiler/libs/core')
local a = require('vfiler/actions/directory')
local u = require('tests/utility')
local configs = {
options = u.vfiler.generate_options(),
}
describe('directory actions', function()
local vfiler = u.vfiler.start(configs)
it(u.vfiler.desc('close_tree_or_cd', vfiler), funct... |
---- Hard CCs rework ----
blockedStatuses = {
PhysicalArmor = {
KNOCKED_DOWN = true,
CHICKEN = true
},
MagicArmor = {
STUNNED = true,
FROZEN = true,
PETRIFIED = true,
MADNESS = true,
FEAR = true,
CHARMED = true,
SLEEPING = true
},
}
concernedTypes = {
KNOCKED_DOWN = true,
INCAPACITATED = true,
... |
-- Read documentation about each option by executing :h <option>
local g, o, fn, opt = vim.g, vim.o, vim.fn, vim.opt
local utils = require("utils")
-- Timings
----------
opt.updatetime = 300
opt.timeout = true
opt.timeoutlen = 500
opt.ttimeoutlen = 10
-- Splits and buffers
---------------------
--- TODO: remove this ... |
local S, L, O, U, D, E = unpack(select(2, ...));
local Module = S:NewModule('MythicPlus_QuestUnwatch');
-- Lua API
local ipairs, table_insert = ipairs, table.insert;
function Module:Watch()
local watchedQuests = #O.db.mythic_plus_questunwatch_data;
if not watchedQuests or watchedQuests == 0 then
retu... |
--[[---------------------------------------------------------
Initializes the effect. The data is a table of data
which was passed from the server.
-----------------------------------------------------------]]
function EFFECT:Init( data )
local vOffset = data:GetOrigin()
local NumParticles = 16
local e... |
-- Animation table format:
--
-- (!) Animation name should match catalog name
-- (!) Include comma at the end of the line inside brackets
-- (*) Order does not matter
-- animation_name = {
--
-- -- Size of animation frames:
--
-- frameWidth = number,
-- frameHeight = number,
--
-- -- Offset of origin:
-... |
local ccLog = {}
local function SaveCCLog()
Ext.SaveFile("Logs/CC_UI_EventLog.log", StringHelpers.Join("\n", ccLog))
end
---@param ui UIObject
Ext.RegisterListener("UICall", function(ui, event, state, ...)
if ui:GetTypeId() == Data.UIType.characterCreation then
ccLog[#ccLog+1] = string.format("[%s(call)] (%s)", e... |
---@meta
---@class cc.PhysicsContactPreSolve
local PhysicsContactPreSolve={ }
cc.PhysicsContactPreSolve=PhysicsContactPreSolve
---* Get friction between two bodies.
---@return float
function PhysicsContactPreSolve:getFriction () end
---* Get restitution between two bodies.
---@return float
function PhysicsConta... |
require("natives-1640181023")
util.keep_running()
local function v3(x,y,z)
return {x=x, y=y, z=z}
end
menu.action(menu.my_root(), "Bed Sound", {"bedsound", "earrape"}, "Plays massive earrape throughout the session.", function()
--{"Bed", "WastedSounds"}
local pos = v3()
local Audio_POS = {v3(-73... |
-- Toggle between loop-file=inf or loop-file=no.
-- Add hotkey to input.conf like that:
-- ctrl+t script-message-to toggle_loop toggle_loop
-- This is the property after the script is loaded.
local looped = mp.get_property_native("loop-file")
function toggle_loop()
local duration = mp.get_property_native("duratio... |
local _G = _G
local _, RE = ...
_G.REHack = RE
local COMM = LibStub('AceComm-3.0')
local select, pairs, ipairs, format, getglobal, loadstring, type, pcall, gsub, wipe, tonumber = _G.select, _G.pairs, _G.ipairs, _G.format, _G.getglobal, _G.loadstring, _G.type, _G.pcall, _G.gsub, _G.wipe, _G.tonumber
local strsplit, str... |
dokidoki_disable_debug = true
require 'dokidoki.module' [[]]
local kernel = require 'dokidoki.kernel'
local the_game = require 'the_game'
local args = {}
for _, a in ipairs(arg) do
args[a] = true
end
kernel.set_ratio(4/3)
if args['--windowed'] then
kernel.set_video_mode(1024, 768)
else
kernel.set_fullscreen(... |
aliveai_storm={time=tonumber(minetest.settings:get("item_entity_ttl")),hails=0,max_hails=20}
aliveai.create_bot({
description="Using its whirlwind based power to throw everything up in the sky",
drop_dead_body=0,
attack_players=1,
name="storm",
team="storm",
texture="aliveai_storm.png",
stealing... |
local Factory = require("support.factory")
Factory.define("dota_player", function(attributes)
return CDOTAPlayer(attributes)
end)
|
--[[
_____ .__ _____.__ .__ __
/ ___ \|__| ____ ________ ___/ ____\__| ____ |__| ____ _____/ |_ ____
/ / ._\ \ |/ \ / ___/ | \ __\| |/ ___\| |/ __ \ / \ __\/ __ \
< \_____/ | | \\___ \| | /| | | \ \___| \ ___/| | \ | ... |
--
-- tests/actions/vstudio/test_vs200x_vcproj_linker.lua
-- Automated tests for Visual Studio 2002-2008 C/C++ linker block.
-- Copyright (c) 2009-2011 Jason Perkins and the Premake project
--
T.vs200x_vcproj_linker = { }
local suite = T.vs200x_vcproj_linker
local vc200x = premake.vstudio.vc200x
--
-- Setup/Teard... |
AddCSLuaFile()
--SWEP.Base = "weapon_base"
SWEP.PrintName = "#rotgb.game_swep.name"
SWEP.Category = "#rotgb.category.rotgb"
SWEP.Author = "Piengineer12"
SWEP.Contact = "http://steamcommunity.com/id/Piengineer12/"
SWEP.Purpose = "#rotgb.game_swep.purpose"
SWEP.Instructions = "#rotgb.game_swep.instructions"
SWEP.WorldMo... |
-- See LICENSE for terms
local type, tostring = type, tostring
local MsgPopup = ChoGGi.ComFuncs.MsgPopup
local RetName = ChoGGi.ComFuncs.RetName
local RetTemplateOrClass = ChoGGi.ComFuncs.RetTemplateOrClass
local RetObjectCapAndGrid = ChoGGi.ComFuncs.RetObjectCapAndGrid
local Strings = ChoGGi.Strings
local Translate ... |
----------------------------------------------------------
-- Load RayUI Environment
----------------------------------------------------------
RayUI:LoadEnv("Chat")
local CH = _Chat
-------------------------------------------------------------------------------
-- By Lockslap (US, Bleeding Hollow)
-- <Borderline Am... |
local PEGParser = require 'nelua.pegparser'
local PEGBuilder = require 'nelua.pegbuilder'
local astbuilder = require 'nelua.astdefs'
local memoize = require 'nelua.utils.memoize'
local function get_parser()
--------------------------------------------------------------------------------
-- Lexer
----------------... |
WireToolSetup.setCategory( "Chips, Gates" )
WireToolSetup.open("expression2", "Expression 2", "gmod_wire_expression2", nil, "Expression2s")
if CLIENT then
language.Add("Tool.wire_expression2.name", "Expression 2 Tool (Wire)")
language.Add("Tool.wire_expression2.desc", "Spawns an Expression 2 chip for use with the wi... |
--[[
# Copyright 2001-2014 Cisco Systems, Inc. and/or its affiliates. All rights
# reserved.
#
# This file contains proprietary Detector Content created by Cisco Systems,
# Inc. or its affiliates ("Cisco") and is distributed under the GNU General
# Public License, v2 (the "GPL"). This file may also include Detector Co... |
-- Check that we at least have an input filename.
-- If not, print the help message and exit.
check_args(input_file ~= nil, "No input file given")
style = style or "simple"
-- Gather input
if input_format == "railml" then
model = load_railml {
-- Load a railml file.
filename = input_file,
... |
data:extend(
{
{
type = "fluid",
name = "lubricant",
default_temperature = 25,
heat_capacity = "1KJ",
base_color = {r=0.4, g=0.6, b=0.4},
flow_color = {r=0.5, g=0.5, b=0.5},
max_temperature = 100,
icon = "__base__/graphics/icons/fluid/lubricant.png",
pressure_to_speed_ratio = 0.4,
... |
local cjson = require "cjson"
local jwt = require "resty.jwt"
local cookiejar = require "resty.cookie"
local http = require "lib.resty.http"
local common = require "common"
local SECRET_KEY = nil
local errorpages_dir_path = os.getenv("AUTH_ERROR_PAGE_DIR_PATH")
if errorpages_dir_path == nil then
ngx.log(ngx.WARN... |
return require('lib.stdlib.oop._generated._triggercondition')
|
fbase_rebel_elite_heavy_trooper_extreme = Creature:new {
objectName = "@mob/creature_names:fbase_rebel_elite_heavy_trooper_extreme",
randomNameType = NAME_GENERIC,
randomNameTag = true,
socialGroup = "rebel",
faction = "rebel",
level = 270,
chanceHit = 18.0,
damageMin = 1495,
damageMax = 2700,
baseXp = 27000,... |
sfinv.register_page("bags:bags", {
title = "Bags",
get = function(self, player, context)
local bags_inv = ""
if context.bags_page == nil or context.bags_page == "bags" then
bags_inv = "button[0,2;2,0.5;bag1;Bag 1]"
.."button[2,2;2,0.5;bag2;Bag 2]"
.."button[4,2;2,0.5;bag3;Bag 3]"
.."button[6,... |
local AddonName, AddonTable = ...
AddonTable.fishing = {
173032, -- Lost Sole
173033, -- Iridescent Amberjack
173034, -- Silvergill Pike
173035, -- Pocked Bonefish
173036, -- Spinefin Piranha
}
|
local u = require("null-ls.utils")
local methods = require("null-ls.methods")
local M = {}
function M.setup()
-- code action batching is merged into master
if vim.fn.has("nvim-0.6.0") > 0 then
return
end
M.code_action_handler = M.combine(methods.lsp.CODE_ACTION)
end
-- this will override a h... |
--[[
-- komeetta - Vesa Marttila (vtmarttila@gmail.com)
--
-- Functional style list and functions. None of the functions alter the given
-- list. For example list:reverse() returns a new list and doesn't touch the
-- original one. The lists are currently accessible via other methods though
-- (e.g. list.foo = 100).
--
... |
local Player = require "player"
local playerw, playerh = Player:getDimensions()
local settings = require "settings"
local camera = {}
local padding = settings.camera.padding
local transx = 0
local transy = 0
local player
function camera:setPlayer(nPlayer)
player = nPlayer
end
function camera:update()
if pl... |
-- Based on https://github.com/minetest-mods/realchess
-- WTFPL by kilbith
local realchess = {}
local function index_to_xy(idx)
idx = idx - 1
local x = idx % 8
local y = (idx - x) / 8
return x, y
end
local function xy_to_index(x, y)
return x + y * 8 + 1
end
function realchess.move(data, pos, from_list, from_in... |
-- copy all globals into locals, some locals are prefixed with a G to reduce name clashes
local coroutine,package,string,table,math,io,os,debug,assert,dofile,error,_G,getfenv,getmetatable,ipairs,Gload,loadfile,loadstring,next,pairs,pcall,print,rawequal,rawget,rawset,select,setfenv,setmetatable,tonumber,tostring,type,un... |
-- Copyright (C) 2017-2018 by chrono
-- curl --http2 -k 'https://127.1:85/hello'
local ssl = require "ngx.ssl"
ngx.say("scheme: ", ngx.var.scheme)
ngx.say("http version: ", ngx.req.http_version())
local name, err = ssl.server_name()
ngx.say("sni: ", name)
local ver, err = ssl.get_tls1_version_str()
ngx.say("tls:"... |
local saved = {}
local report = {}
local dungeons = {}
-- local d1 = false
-- local d2 = false
--[[ local function isAttunedKingsRest()
-- id, name, points, completed, month, day, year, description, flags, icon, rewardText, isGuild, wasEarnedByMe, earnedBy = GetAchievementInfo(12479)
local _, _, _, achievemen... |
return {
{
effect_list = {
{
type = "BattleBuffAddProficiency",
trigger = {
"onAttach"
},
arg_list = {
number = 0.5,
label = {
"GangutMG"
}
}
}
}
},
{
effect_list = {
{
type = "BattleBuffAddProficiency",
trigger = {
"onAttach"
},
arg_l... |
local SB = 0
local SB = 1
local SB = 2
local SB = 3
local SB = 4
local SB = 5
local SB = 6
local SB = 7
local SB = 8
local SB = 9
function onEvent(name, value1, value2)
if name == 'Shadow Bonnie BG' then --whyrror
if value1 == '1' then
setProperty('sbb.visible', true)
els... |
local function equationIsTrue(x, y)
return (x*4) + 3 < (y*5) - 1
end
print(equationIsTrue(7,8)) |
modifier_old_storm_spirit_electric_rave = class({
IsPurgable = function(self) return false end,
IsHidden = function(self) return false end,
RemoveOnDeath = function(self) return true end,
})
local function FindTalent(hObject, sTalentName, i)
local sSpecialHandleName = 'hSpecial'
if i then
sSpecialHandleName = s... |
Bullet = {}
Bullet.__index = Bullet
setmetatable(Bullet, {
__call = function (cls, ...)
return cls.new(...)
end,
})
function Bullet.new(image, scale, speed, cooldown)
local self = setmetatable({}, Bullet)
image = image or 'assets/weapons/default.png'
self.image = love.graphics.newImage(image)
self.sca... |
local hide_self = true
local scanned = {}
local frameref = {}
local frames = {}
local data = {}
-- search as many frames as possible that are children or subtree elements of
-- the given parent frame. all found frames are saved in the `frames`-table
local function ScanFrames(parent, parentname)
-- find as many frame... |
--[[
Flappy Bird
v0.9.1 - Countdown update
* Procedural generation
* Animated characters (sprites)
* State Machines
* Mouse input
* Infinite Scrolling
]]
--push to handle resolution
push = require 'push'
-- classes library
Class = require 'class'
-- add bird class
require 'Bird'
-- import pipe cla... |
-- Hazel Dependencies
--VULKAN_SDK = os.getenv("VULKAN_SDK")
VULKAN_SDK = "%{wks.location}/Hazel/vendor/VulkanSDK"
IncludeDir = {}
IncludeDir["stb_image"] = "%{wks.location}/Hazel/vendor/stb_image"
IncludeDir["yaml_cpp"] = "%{wks.location}/Hazel/vendor/yaml-cpp/include"
IncludeDir["GLFW"] = "%{wks.location}/Hazel/ve... |
os.execute('mkdir ./../meanstd')
print('compute rgb meanstd: \n')
os.execute('mkdir ./../meanstd/RGB')
for trials = 1,10 do
print('trials' .. trials)
local dir = torch.load('./../dir/trial' .. trials .. '_trnDir.t7')
local img = torch.zeros(#dir, 3, 256, 256):float()
for Idx = 1,#dir do
local path = './../data... |
--[[Copyright © 2021, Arico
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following d... |
--
-- Gun class.
--
-- @filename LgGun.lua
-- @copyright Copyright (c) 2015 Yaukey/yaukeywang/WangYaoqi (yaukeywang@gmail.com) all rights reserved.
-- @license The MIT License (MIT)
-- @author Yaukey
-- @date 2015-09-03
--
local DLog = YwDebug.Log
local DLogWarn = YwDebug.LogWarning
local DLogError = YwDebu... |
ITEM.name = "GP5 Gasmask"
ITEM.description = "An old Soviet gasmask."
ITEM.longdesc = "Cheap rubber gas mask of soviet origin, paired with a modern non-asbestos filter. Due to odd shape, it doesn't fit with all types of helmets."
ITEM.model = "models/hardbass/stalker_skat9m_gasmask.mdl"
ITEM.price = 6000
--ITEM.busflag... |
---@class Stopwatch
---@field milliseconds number
local Stopwatch = {
-- [[Stopwatch Methods]] --
---Returns a new Time object that represents the currently elapsed time.
---This is useful for 'catching' the current time and comparing its many forms as required.
---@param self Stopwatch
---@return... |
--Copyright (c) 2007-2008 Neil Richardson (nrich@iinet.net.au)
--Copyright (c) 2011 Lance Li <lancelijade@gmail.com>
--
--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, ... |
PANEL = { };
function PANEL:Init()
self.ContentScroll = vgui.Create( "DScrollPanel", self );
self.ContentScroll:SetPos( 10, 40 );
self.ContentScroll:SetSize( GAMEMODE.ChatWidth - 20, cookie.GetNumber( "cc_chatheight", 300 ) - 80 );
function self.ContentScroll:Paint( w, h )
surface.SetDrawColor( 0, 0, 0, 70 ... |
project "ArcticFoxEditor"
kind "ConsoleApp"
language "C++"
cppdialect "C++17"
staticruntime "off"
targetdir ("../Build/bin/" .. outputdir .. "/%{prj.name}")
objdir ("../Build/bin-int/" .. outputdir .. "/%{prj.name}")
files {
"src/**.h",
"src/**.c",
"src/**.hpp",
"src/**.cpp"
}
includedirs {
"%{w... |
--[[
@author Sebastian "CrosRoad95" Jura <sebajura1234@gmail.com>
@copyright 2011-2021 Sebastian Jura <sebajura1234@gmail.com>
@license MIT
]]--
local czas = getTickCount()
function speeed(car)
local a1,b1,c1 = getElementVelocity(car)
local fast = ((a1^2+b1^2+c1^2)^(0.5) *180)
return fast
end
local code="Sweepers" --... |
require("common.common")
require("camera")
MainScene = ClassDefinition(MainScene);
function MainScene:ctor()
self.m_fps_camera = FPSCamera:new();
self.m_scene_scene = nil;
end
function MainScene:initialize()
end
function MainScene:onStart()
-- camera
local main_camera = Render.GetMainCamera();
self.m_fp... |
return function(properties)
if not properties.backgroundAlpha then
properties.backgroundAlpha = 0
end
properties.image = "devgit:assets/images/logo.png"
properties.imageColour = colour.black()
properties.imageAlpha = 0.2
local logoShadow = core.construct("guiImage", properties)
local logo = logoShadow:clon... |
--[[ Copyright (C) 2018 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope th... |
json = require "json"
function lobbyHostCli(lobbyObj, command, args)
io.write(string.format("lobbyhostcli: %s args: %s\n", command, args))
return 0
end
function lobbyClientCli(lobbyObj, command, args)
io.write(string.format("lobbyclientcli: %s args: %s\n", command, args))
return 0
end
function writeConfig()
io.... |
--[[
© 2013 GmodLive private project do not share
without permission of its author (Andrew Mensky vk.com/men232).
--]]
local PLUGIN = PLUGIN or greenCode.plugin:Loader();
local gc = gc;
local math = math;
gc.config:Add("stam_drain_scale", 0.2, true);
gc.config:Add("breathing_volume", 1, true);
gc.config:Add("stam_j... |
--------------------------------------------------------------------------------
--- Watch filesystem for changes
--
-- @usage
--
-- -- Watch directory for created files, every 5 seconds:
--
-- local dbg = require("gears.debug")
-- local iw = require("gears.filesystem.inotifywatch")
--
-- local function process_eve... |
local namedtuple = require 'lulz.collections.namedtuple'
local TestCase = require 'lulz.testcase'
local TestNamedTuple = TestCase:inherit 'Named Tuple'
function TestNamedTuple:test_empty_namedtuple_create()
local Tuple = namedtuple('tuple with name', {})
self:assert_equal(Tuple.__name__, 'tuple with name')
sel... |
local dir = (...):gsub('%.[^%.]+$', '')
local util = require(dir .. ".util")
local physics = love.physics
local graphics = love.graphics
local softbody = setmetatable({}, {
__call = function(self, world, x, y, r, s, t)
local new = util.copy(self);
new:init(world, x, y, r, s, t);
return setmetatable(new,... |
-- Copyright (c) 2017, United States Government, as represented by the
-- Administrator of the National Aeronautics and Space Administration.
--
-- All rights reserved.
--
-- The Astrobee platform is licensed under the Apache License, Version 2.0
-- (the "License"); you may not use this file except in compliance with t... |
#!../lua
math.randomseed(0)
collectgarbage("setstepmul", 180)
collectgarbage("setpause", 190)
--[=[
example of a long [comment],
[[spanning several [lines]]]
]=]
_print("current path:\n " .. string.gsub(package.path, ";", "\n "))
local msgs = {}
function Message (m)
_print(m)
msgs[#msgs+1] = string.su... |
-- Copyright 2019 Oath Inc.
-- Licensed under the terms of the Apache license. Please see LICENSE.md file distributed with this work for terms.
local misc = require 'lib.misc'
--- a module provides util functions for metricMaker config.
-- @module tableUtils
local M = {}
----------------------------------------------... |
local guide = require 'parser.guide'
return function (state)
---@param pos1 parser.position
---@param pos2 parser.position
---@return string
return function (pos1, pos2)
return state.lua:sub(
guide.positionToOffset(state, pos1),
guide.positionToOffset(state, pos2)
... |
local mod = get_mod("HideBuffs")
--- Starts disabled.
mod:hook("UIAnimation", "init", function(func, fun, table, table_index, from, to, ...) -- luacheck: no unused
return func(fun, table, table_index, mod.shields_from_opacity, mod.shields_to_opacity, ...)
end)
mod:hook(FatigueUI, "draw", function(func, self, dt)
--... |
require('luas\\gameutil')
local function _new(t)
local fLifeTime=5;
local getLifeTime = function() return fLifeTime; end
local setLifeTime = function(lt) fLifeTime=lt; end
local frameMove = function(timed)
fLifeTime=fLifeTime-timed
if (fLifeTime<=0) then --超过生存时间
return true;
end
... |
-- unit used to represent some in-game bonuses
local Bonus = {};
setmetatable(Bonus, require("game.unit.Unit"));
Bonus.__index = Bonus;
Bonus.icon= "keep";
function Bonus:new(r,u,map, treasure, context)
local newBonus =require("game.unit.Unit"):new("Bonus");
-- set meta tables so lookups will wo... |
object_mobile_outbreak_delivery_delta_mick_sickle = object_mobile_shared_outbreak_delivery_delta_mick_sickle:new {
}
ObjectTemplates:addTemplate(object_mobile_outbreak_delivery_delta_mick_sickle, "object/mobile/outbreak_delivery_delta_mick_sickle.iff")
|
-- JOVIAL
return {
name = "JOVIAL",
lexer = 109,
extensions = "jov,cpl",
keywords = {
[0] = {
name = "Keywords",
keywords =
[[if or abs and bit end for loc new not pos byte goto
item nent proc stop term with begin start table define
nwdsen return static update overlay wri... |
--
-- c_switch.lua
--
----------------------------------------------------------------
----------------------------------------------------------------
-- Effect switching on and off
--
-- To switch on:
-- triggerEvent( "switchDynamicSky", root, true )
--
-- To switch off:
-- triggerEvent( "switchDynamicSky", root... |
local processors = {}
processors.telegram = dofile(filepath.join(plugin:dir(), "telegram.lua"))
processors.pagerduty = dofile(filepath.join(plugin:dir(), "pagerduty.lua"))
local sql = read_file_in_plugin_dir("list_of_alerts.sql")
function process()
local result = storage:query("select name from host... |
local function revertKeeperstorage()
Game.setStorageValue(Storage.WrathoftheEmperor.Mission03, 0)
end
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if item.itemid == 12320 and target.actionid == 8026 then
if Game.getStorageValue(Storage.WrathoftheEmperor.Mission03) < 5 then
Game.setSt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.