content
stringlengths
5
1.05M
local metric = monitoring.counter("protection_violation_count", "number of protection violations") minetest.register_on_protection_violation(function() metric.inc() end)
local Ground = {} -- optimization local love = love local Game_component = require("generics.game-component") local Vec2 = require("generics.vec2") -- add to noise parameter to randomize the noise results between games local NOISE_ORIGIN = (love.math.random() -0.5) * 3000 local NOISE_SCALE = 0.005 local BUMP_SCALE =...
-- @Author:pandayu -- @Version:1.0 -- @DateTime:2018-09-09 -- @Project:pandaCardServer CardGame -- @Contact: QQ:815099602 local _M = function(role,data) if not data.pos or type(data.pos) ~= "number" then return 2 end if data.pos < 1 or data.pos > 10 then return 700 end if not role.army:can_fill("companion",data.po...
baseclass.get = baseclass.Get baseclass.set = baseclass.Set cleanup.get_table = cleanup.GetTable cleanup.register = cleanup.Register cookie.delete = cookie.Delete cookie.get_number = cookie.GetNumber cookie.get_string = cookie.GetString cookie.set = cookie.Set cvars.add_change_callback = cvars.AddChangeCallback cvar...
-- Copyright 2017 Pilosa Corp. -- -- 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 disclaime...
require 'gnuplot' torch.setdefaulttensortype('torch.FloatTensor') local cmd = torch.CmdLine() cmd:text() cmd:text('PSNR / Loss plot comparison tool') cmd:text() cmd:text('Options:') cmd:option('-display', 'false', 'Display the plot immediately') cmd:option('-plotList', '', 'Plots to compare (Delimi...
require "Window" local IconGroup = {} IconGroup .__index = IconGroup setmetatable(IconGroup, { __call = function (cls, ...) return cls.new(...) end, }) function IconGroup.new() local self = setmetatable({}, IconGroup) self.id = '00000000-0000-0000-0000-000000000000' self.name = "" return self end ...
slot0 = class("MetaCharacterTacticsMediator", import("...base.ContextMediator")) slot0.GO_TASK = "MetaCharacterTacticsMediator:GO_TASK" slot0.ON_SUBMIT = "MetaCharacterTacticsMediator:ON_SUBMIT" slot0.ON_TRIGGER = "MetaCharacterTacticsMediator:ON_TRIGGER" slot0.ON_SKILL = "MetaCharacterTacticsMediator:ON_SKILL" slot0....
package.path = 'D:/Program Files (x86)/HTTPD/htdocs/TrainMobileFile/LuaCode/lib/?.lua;D:/Program Files (x86)/HTTPD/htdocs/TrainMobileFile/LuaCode/namepipe/?.lua' --luanch a namepipeserver from os command. --tasklist | find /i "httpd.exe" && echo found. || echo not found. --fs_namepipe_server_cmd.php?cmd=check --cmd: --...
-- Contains all informations for a Level cLevel = {} cLevel.__index = cLevel function cLevel.new(a_File) local self = setmetatable({}, cLevel) self.m_Challenges = {} self:Load(a_File) return self end function cLevel:Load(a_File) local levelIni = cIniFile() levelIni:ReadFile(PLUGIN:GetLocalFolder() .. "/chal...
coraline_dynes_missions = { { missionType = "escort", primarySpawns = { { npcTemplate = "lith_kalis", npcName = "Lith K'alis" } }, secondarySpawns = { { npcTemplate = "thug", npcName = "a thug" }, }, itemSpawns = {}, rewards = { { rewardType = "credits", amount = 350 } } ...
local tab = require "toy.table" local bug = require "toy.debug" local function init_integer_device() local maker = require("toy.math.bignum").new_int() local int_f = function(str) return maker:make(str) end return int_f end local int = init_integer_device() local meta_of_int = {} --[[ local function create...
local Saver = {} local sourceName = "save" local saveTable = {} local function saveFile(args) local sourceNameArg = args["sourceName"] local tableToSave = args["tableToSave"] saveTable[sourceNameArg] = tableToSave table.save(getMudletHomeDir().."/dartmudlet.txt", saveTable) end local function sendData(args)...
--Coord Command RegisterCommand('coords', function(source, args, rawCommand) local coords = GetEntityCoords(PlayerPedId()) local heading = GetEntityHeading(PlayerPedId()) TriggerEvent('DoLongHudText', 'Vos coordonné et votre direction on été ajouté à votre presse-papier.', 1) SendNUIMessage({ coords = ""...
----------------------------------------- ------ Elevators ----- ----------------------------------------- ElevatorShaft = { Main = { { name = 'Penthouse', entryPos = vector3(980.7, 56.5, 116.2), exitPos = vector3(978.5, 57.9, 116.2), exitHe...
--- Vector3Instance -- local t = require(script.Parent.t) local ObjectValueUtil = require(script.Parent.ObjectValueUtil) local IsModelWithPrimaryPart = require(script.Parent.IsModelWithPrimaryPart) local Vector3Instance = {} local isValidVector3Instance = t.union( t.instanceIsA("Vector3Value"), t.instanceIsA("CFra...
--[[ Set of util methods for meta class methods. Allows modules to define their own custom classes. Ironically, the returned table is not indeed a class. Calling the returned table as a function will call the ._init(...) method, so override this method in your class to use it as a constructor. Or don't. I'm a comment,...
return function() local Navigation = script.Parent local App = Navigation.Parent local UIBloxRoot = App.Parent local Packages = UIBloxRoot.Parent local Roact = require(Packages.Roact) local Cryo = require(Packages.Cryo) local InteractableList = require(script.Parent.InteractableList) local SelectionMode = requ...
require 'ext_table' active_record = require 'active_record' ------------------------------------------ -- dijkstra -- -- Implementation of dijkstra algorithm -- to find shortest path between 2 nodes. -- Used to get joins between 2 tables ------------------------------------------ local dijkstra = {} -----------------...
--[[------------------------------------------------------------------------- This file is used to calculate chances and generate a list of random items ---------------------------------------------------------------------------]] BU3.Chances = {} --Flush random seed math.randomseed(os.time()) math.random() math.rand...
--Reset the timer function startRound() Debug.log("Starting round") global.round_time = round_length * 60 global.current_round = global.current_round + 1 end --Cleanup after the fight round is finished -- @param winner teamName of the winner (if available) function endRound(winner) if winner then local playerNam...
local UA_Locale= { ["Names"] = { [1] = "Unbekanntes Holz I", [2] = "Unbekanntes Holz II", [3] = "Unbekanntes Holz III", [4] = "Unbekanntes Holz IV", [5] = "Unbekanntes Holz V", [6] = "Unbekanntes Holz VI", [7] = "Unbekanntes Holz VII", [8] = "Unbekanntes Holz VIII", [9] = "Unbekanntes Holz IX", [1...
data:extend( { { type = "technology", name = "battery", icon = "__base__/graphics/technology/battery.png", prerequisites = {"sulfur-processing"}, unit = { count = 30, ingredients = { {"science-pack-1", 1}, }, time = 25 }, effects = { { ...
local icu = require("justenoughicu") local uppercase = function (input, extraArgs) if not extraArgs then extraArgs = {} end if not extraArgs.options then extraArgs.options = {} end local lang = extraArgs.options.language or SILE.settings:get("document.language") return icu.case(input, lang, "upper") end local...
function ws2812seq1(tmrid, pin, speed) index = 0 tmr.stop(tmrid) tmr.alarm(tmrid, speed, 1, function() if index == 0 then ws2812.writergb(pin, string.char(0, 0, 255)) elseif index ==1 then ws2812.writergb(pin, string.char(0, 255, 0)) elseif index == 2 then ...
menu = {} function menu.init() earth = Earth() player = Player() player_move_vertical = false player_move_down = false asteroids = {} asteroidSpawnTimer = 0.5 asteroidSpawnInterval = 0.5 planets = {} planetSpawnTimer = 6 planetSpawnInterval = 9 stars = {} starSpawnTimer = 1.5 ...
xgui.prepareDataType( "URSRestrictions" ) xgui.prepareDataType( "URSLimits" ) xgui.prepareDataType( "URSLoadouts" ) urs = {} urs.removers = {} urs.weapons2 = {"weapon_para","weapon_crowbar","weapon_stunstick","weapon_physcannon","weapon_physgun","weapon_pistol","weapon_357","weapon_smg1","weapon_ar2","weapon_shotgun",...
function onCreate() --Iterate over all notes for i = 0, getProperty('unspawnNotes.length')-1 do --Check if the note is an Instakill Note if getPropertyFromGroup('unspawnNotes', i, 'noteType') == 'flashbang_note' then setPropertyFromGroup('unspawnNotes', i, 'texture', 'flashbang_note'); --Change texture setP...
-- Starts a fire: xyz: Location of fire maxChildren: The max amount of times a fire can spread to other objects. Must be 25 or less, or the function will do nothing. isGasFire: Whether or not the fire is powered by gasoline. -- @module native -- @submodule fire -- @see START_SCRIPT_FIRE -- @usage int START_SCRIPT_...
--[[ MIT License Copyright (c) 2018 - 2021 CDAGaming (cstack2011@yahoo.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, including without limitation the rights to use, co...
-- Includes local valua = require "valua" local access = require "sailor.access" local credentials = require "conf.credentials" -- Set credentials access.settings({default_login = credentials.username, default_password = credentials.password}) local admin = {} function admin.index(page) if access.is_guest() then ...
--[[ NOTICE Copyright (c) 2019 Andrew Bereza Provided for public use in educational, recreational or commercial purposes under the Apache 2 License. This script was created under a contract originally for exclusive use for this project and the author, Locard. Please include this copyright & permission notice in all cop...
local scene = { isScene = true, name = "home", art = "dragon_burning_home", anims = function (self) self.anim:add("eye", 2) self.anim:add("charge", 3) self.anim:add("stopped", 4) self.anim:add("Edbur", 5) self.anim:add("dragon", 6) self.anim:add("dragon_burning", 1) end, scenes = { { anim = "drag...
local fithree = require("Source") local usage = "usage: luajit FiThree.lua <Lua53BytecodeFile>" if #arg < 1 then print(usage) return end local file = io.open(arg[1], "rb") if not file then print("error: file not found") return end local bytecode = file:read("*a") file:close() fithree.luaF_dispatch(bytecode, g...
return Command('say', (function(message, _, args) message:delete() message:reply(table.concat(args, ' ')) end), "say", nil, { "botOwner" })
project "cereal" kind "StaticLib" language "C++" cppdialect "C++17" staticruntime "On" files { "include/**.h", "include/**.hpp", } includedirs { "include", } sysincludedirs { "include", } filter "configurations:Debug" runtime "Debug" symbols "on" ...
--[[ Welcome, this is a simple to use linked list module made by onedar/Pintoe. Credit is appreciated but not needed. Basic Usage : local LinkedListModule = require(path) local NewLinked = LinkedListModule.New("This is the head node value") -- Creates a new linked list, if the value is given, it is a head n...
local AddonName, AddonTable = ... AddonTable.engineering = { -- Materials (Crafted) 60224, -- Crafted 67494, -- Recipe's 16044, }
return { foot = {x=1, y=1}, power = {area = {x=5, y=5}, reach = 7.5}, tiles = {{'s'}}, }
--[[ 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...
object_tangible_furniture_ep3_rewards_ritual_fire_pit = object_tangible_furniture_ep3_rewards_shared_ritual_fire_pit:new { } ObjectTemplates:addTemplate(object_tangible_furniture_ep3_rewards_ritual_fire_pit, "object/tangible/furniture/ep3_rewards/ritual_fire_pit.iff")
function levent.load() myfont = ldoom.text.loadFont("hud.txt") mytext = myfont:newText[[When you use Meteor you ARE using Node.js. Biggie Smalls was here. $@F05Yo Hombre.]] mytext:setWidth(1800) fpstext = myfont:newText("fps: 0") fpstext:setPosition(400,500) end function levent.keyboard(key...
-------------------------------- -- @module cc -------------------------------------------------------- -- the cc Physics3DShape -- @field [parent=#cc] Physics3DShape#Physics3DShape Physics3DShape preloaded module -------------------------------------------------------- -- the cc Physics3DObject -- @field [parent=#c...
local ffi = require("ffi") local bit = require("bit") local lshift, rshift, band, bor = bit.lshift, bit.rshift, bit.band, bit.bor local libc = require("tinylibc") ffi.cdef[[ /* * Ring Buffer * Our PTY helper buffers outgoing data so the caller can rely on write * operations to always succeed (except for OOM). To bu...
package("freetype") set_homepage("https://www.freetype.org") set_description("A freely available software library to render fonts.") set_urls("https://downloads.sourceforge.net/project/freetype/freetype2/$(version)/freetype-$(version).tar.gz", "https://download.savannah.gnu.org/releases/freet...
return {'coifferen','coiffeur','coiffeuse','coiffure','cointreau','coincident','coincidenten','coincidentie','coincideren','coitaal','coiteren','coitus','coiffeerde','coiffeert','coiffeurs','coiffeuses','coincideert','coincidenties','coincideerde','coiteerde','coiffures','coiffeuseje','coiffeusetje','coitale'}
local IDrawable = require("api.gui.IDrawable") local Draw = require("api.Draw") local UiTheme = require("api.gui.UiTheme") local NefiaCompletionDrawable = class.class("NefiaCompletionDrawable", IDrawable) function NefiaCompletionDrawable:init(state) local coords = Draw.get_coords() local tw, th = coords:get_siz...
a = mpz("1000000000000000000000000000") b = mpz(10) c = mpz(10) print(a/3) print(b == c) print(a < b) print(b < a) print(b == mpz(10)) print(mpz(10) < b) print(mpz(10) <= b) print(a) print(b)
LinkLuaModifier( "modifier_item_postactive_regen", "items/reflex/postactive_regen.lua", LUA_MODIFIER_MOTION_NONE ) LinkLuaModifier("modifier_generic_bonus", "modifiers/modifier_generic_bonus.lua", LUA_MODIFIER_MOTION_NONE) item_postactive_3c = class(ItemBaseClass) function item_postactive_3c:GetIntrinsicModifierName(...
local robot_id = 0 -- NAMESPACES local ROBOT = "robot" local AUTORUN = "autorun" local COLOR = "color" local LASER = "laser" local LED_RING = "led_ring" local AHSM = "ahsm" local OMNI = "omni" local PROXIMITY = "proximity" local WIFI = "wfi" -- PARAMETERS nvs.write(ROBOT,"id", robot_id) nvs.write(AUTORUN,"runonce", n...
-- See http://lua-users.org/wiki/ObjectOrientationTutorial require("constants"); function led_description(dev_id,mygpio) return "Led "..dev_id.." on GPIO"..mygpio; end function led_to_html(dev_id,mygpio) return "<p>"..led_description(dev_id,mygpio).."<a href=\"?dev=led"..dev_id.."&cmd=ON\"><button>ON</button></a>...
--[[--ldoc desc @module DialogCtr @author FuYao Date 2018-10-25 ]] local ViewCtr = import("framework.scenes").ViewCtr; local BehaviorExtend = import("framework.behavior").BehaviorExtend; local DialogCtr = class("DialogCtr",ViewCtr); BehaviorExtend(DialogCtr); ---配置事件监听函数 DialogCtr.eventFuncMap = { } function Dial...
PAM_EXTENSION.name = "gamemode_icons" PAM_EXTENSION.enabled = true function PAM_EXTENSION:GetIconMaterial(option) if PAM.vote_type ~= "gamemode" then return end if option.is_special then return end local gamemode_name = option.name if file.Exists("gamemodes/" .. gamemode_name .. "/icon24.png", "GAME") then ret...
require 'torch' require 'nn' if opt.type == 'cuda' then require 'cunn' end ---------------------------------------------------------------------- print(sys.COLORS.red .. '==> construct CNN') -- Raw training set -- This gets around 70.6 % on test starting around epoc 115 -- 73.6 % on training --...
game_info = { --grid cells = {0, 0, 0, 0, 0, 0, 0, 0, 0}, --logic stuff client_turn = false, client_img_id = 0, client_move_image = 0, --client move vars move_possible = false, move_image = img_o } -- methods function game_info:new(obj) obj = obj or {} setmetatable(obj, se...
--AutoFixArg if mcbPacker then --mcbPacker.ignore mcbPacker.require("s5CommunityLib/comfort/math/GetDistance") mcbPacker.require("s5CommunityLib/comfort/other/LuaObject") mcbPacker.require("s5CommunityLib/comfort/pos/IsValidPosition") mcbPacker.require("s5CommunityLib/fixes/TriggerFix") end --mcbPacker.ignore ...
--- Tests of basic forma pattern functions local lu = require('luaunit') local pattern = require("forma.pattern") local primitives = require("forma.primitives") local neighbourhood = require("forma.neighbourhood") testPattern = {} function testPattern:setUp() self.pattern_1 = pattern.new() self.patte...
------------------------------------------------------------------------------------------------------------------------ --ORIENTATION PROJECT(FLappy JET) by ze BANAANIS --Copyright (c) 2014 RgB_211 -- _ -- //\ -- V \ -- \ \ -- \,'.`-. -- |\ `. `. -- ( \ `. `-. ...
local API_SE = require(script:GetCustomProperty("APIStatusEffects")) local API_NPC = require(script:GetCustomProperty("API_NPC")) local API_ID = require(script:GetCustomProperty("API_ID")) local API_S = require(script:GetCustomProperty("APIStats")) local API_DS = require(script:GetCustomProperty("APIDifficultySystem"))...
local tbTable = GameMain:GetMod("MagicHelper") local tbMagic = tbTable:GetMagic("YTS_TYDT") function tbMagic:Init() end function tbMagic:EnableCheck(npc) return true end function tbMagic:TargetCheck(key, t) if t.ThingType == CS.XiaWorld.g_emThingType.Npc then return true else return fals...
function create() local lui = {} local button = require "lui.button" local slider = require "lui.slider" local checkbox = require "lui.checkbox" local progress = require "lui.progress" local radio = require "lui.radio" local colour = require "lui.colour" local mouse = require "lui.mouse" local screenWidth, ...
AddCSLuaFile() DEFINE_BASECLASS("player_zm") local PLAYER = {} function PLAYER:Spawn() BaseClass.Spawn(self) self.Player:Flashlight(false) self.Player:CrosshairDisable() self.Player:RemoveEffects(EF_DIMLIGHT) end function PLAYER:SetupMove(mv, cmd) if cmd:GetMouseWheel() ~= 0 then mv:SetOrigin(mv:GetOrigin()...
local sig = require 'signal' local csv = require 'csvigo' local glb = require 'globtopattern' local img = require 'image' local tnt = require 'torchnet' local xlua = require 'xlua' -- opts parser, progress bar require 'common' local function parse_args(args) local op = xlua.OptionParser("dataset_creator.lua ...
local dialog = require("dialog") local KeyboardActions = require("components.lsdj.actions") local lsdj = require("liblsdj.liblsdj") local fs = require("fs") local pathutil = require("pathutil") local ROM_FILTER = { "LSDj Rom Files", { "*.gb", "*.zip" } } local ROM_FILTER_NO_ZIP = { "LSDj Rom Files", { "*.gb" } } local...
local _M = {} _M._VERSION = '0.01' local mt = { __index = _M } _M.female_first_name = { "Mary", "Patricia", "Linda", "Barbara", "Elizabeth", "Jennifer", "Maria", "Susan", "Margaret", "Dorothy", "Lisa", "Nancy", "Karen", "Betty", "Helen", "Sandra", "Donna", "Carol", "Ruth", "Sharon", "Michelle", "...
if script.Parent.className~="HopperBin" then ma=Instance.new("HopperBin") ma.Name="Laser " --ma.Parent=game.Lighting ma.Parent=game.Players.kash5.Backpack script.Parent=ma end local Selected = false local Shoot = true function Click(Target) if(Target.Target.Parent:findFirstChild("Humanoid")~=nil)then Target.Target.Pa...
--[[Copyright © 2014-2015, trv 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 followin...
-- Common Localizations - Hungarian -- Localizations are licensed under the MIT License, from http://goo.gl/fhnw1t lang_dict = {} lang_dict["app"] = {} lang_dict["app"]["button"] = "Gomb" lang_dict["app"]["button.abort"] = "Megszakítás" lang_dict["app"]["button.accept"] = "Elfogadás" lang_dict["app"]["button.back"] = "...
object_draft_schematic_instrument_instrument_flanged_jessoon = object_draft_schematic_instrument_shared_instrument_flanged_jessoon:new { } ObjectTemplates:addTemplate(object_draft_schematic_instrument_instrument_flanged_jessoon, "object/draft_schematic/instrument/instrument_flanged_jessoon.iff")
--!A cross-platform build utility based on Lua -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law...
function hton(h) return tonumber(h, 16) end function bton(b) return tonumber(b, 2) end function ntoh(n) return ("%x"):format(n) end function btoh(b) --return ntoh(bton(b)) return ("%x"):format(tonumber(b, 2)) end function htob(h) return ntob(hton(h)) end function ntob(n) local size = ma...
-- Copyright 2021 The Mumble Developers. All rights reserved. -- Use of this source code is governed by a BSD-style license -- that can be found in the LICENSE file at the root of the -- Mumble source tree or at <https://www.mumble.info/LICENSE>. local xmlutils = require "xmlutils" local musage = {} function musage....
-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf" module('BseGuildShopping_pb', package.seeall) local BSEGUILDSHOPPING = protobuf.Descriptor(); local BSEGUILDSHOPPING_STATUS_FIELD = protobuf.FieldDescriptor(); local BSEGUILDSHOPPING_MESSAGE_FIELD = protobuf.FieldDescriptor(); local BSEGUI...
PAM.extension_handler = {} PAM.extensions = {} function PAM.ReloadExtensions() for _, extension in ipairs(PAM.extensions) do PAM.DisableExtension(extension.id) end table.Empty(PAM.extensions) print("[PAM] Registering extensions!") hook.Run("PAM_Register_Client_Extensions") end function PAM.RegisterExtension(e...
--[[ File: console.lua Author: Daniel "lytedev" Flanagan Website: http://dmf.me A console system for LOVE2D games. ]]-- local Console = Class{} local os = require("os") function Console:init(font, height) self:setFont(font, height) self.shouldDraw = false self.stealInput = false self.po...
local sum = 0 for i = 1, 999 do if i % 3 == 0 or i % 5 == 0 then sum = sum + i end end print(sum)
----------------------------------------- -- ID: 5669 -- Item: Bowl of Loach Slop -- Food Effect: 3 Hrs, All Races ----------------------------------------- -- TODO: Make Group Effect -- Accuracy 7% Cap 15 -- Ranged Accuracy 7% Cap 15 -- HP 7% Cap 15 -- Evasion 3 ----------------------------------------- require("scrip...
--[[ cel is licensed under the terms of the MIT license Copyright (C) 2011 by Matthew W. Burk 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...
--TAX tax = 15 -- percent function randomizeTax() tax = math.random(5, 30) end setTimer(randomizeTax, 3600000, 0) randomizeTax() function getTaxAmount() return (tax/100) end --INCOME TAX tax = 10 -- percent function randomizeIncomeTax() tax = math.random(1, 25) end setTimer(randomizeIncomeTa...
local AddonName, AddonTable = ... -- WoW Cooking AddonTable.cooking = { -- Food 1017, 2679, 2681, 2888, 6888, 13933, 13934, 13935, 18254, 20452, 30816, 33004, -- Ingredients 723, 769, 1015, 1468, 2672, 2673, 2674, 2675, 2677, ...
local new_defensive_plant = require('archetypes.defensivePlant') local new_valuable_plant = require('archetypes.valuablePlant') local new_gas = require('archetypes.gas') local new_balloon_box = require('archetypes.balloon_box') local player = {} function player.update(eid, delta) local controller = entities:get_c...
local pn = GAMESTATE:GetEnabledPlayers()[1] local profile = PROFILEMAN:GetProfile(pn) local level = getLevel(getProfileExp(pn)) local currentExp = getProfileExp(pn) - getLvExp(level) local nextExp = getNextLvExp(level) local barHeight = 10 local barWidth = 190 local t = Def.ActorFrame{} t[#t+1] = LoadFont("Common...
-- ================================================ -- Ultraviolet awesome theme by Peter Hillerström -- based on Zenburn theme by Adrian C. (anrxc) -- ------------------------------------------------ -- {{{ Main local config_dir = require("gears.filesystem").get_configuration_dir() local dpi = require("beautiful....
#!/usr/bin/env lua -- MoonFLTK example: arc.lua -- -- Derived from the FLTK test/arc.cxx example (http://www.fltk.org) -- fl = require("moonfltk") y = 300 name = { "X", "Y", "R", "start", "end", "rotate" } args = { 140, 140, 50, 0, 360, 0 } function drawing(x, y, w, h) local wid = fl.widget_sub(x, y, w, h) wid...
--[[ LICENSE HEADER MIT Licensing Copyright © 2017 Jordan Irwin (AntumDeluge) See: LICENSE.txt --]] -- *** LOGGING *** -- Logs message output with header function aminerals.log(message) if minetest.settings:get_bool('log_mods') then minetest.log('action', '[' .. aminerals.modname .. '] ' .. message...
function setFont(fontID, fontName, fontSize, topSymbol, bottomSymbol) -- load font preferences for fontID local fontPrefs = finale.FCFontPrefs() fontPrefs:Load(fontID) local fontInfo = fontPrefs:CreateFontInfo() -- set name / size fontInfo:SetName(fontName) fontInfo:SetSize(fontSize) -- save it back fontPref...
LinkLuaModifier('modifier_bottle_counter', 'modifiers/modifier_bottle_counter.lua', LUA_MODIFIER_MOTION_NONE) if BottleCounter == nil then -- Debug:EnableDebugging() DebugPrint('Creating new BottleCounter object') BottleCounter = class({}) end function BottleCounter:Init() self.moduleName = "BottleCounter" ...
local exitFreeGameView= { name="exitFreeGameView",type=0,typeName="View",time=0,x=0,y=0,width=0,height=0,visible=1,fillParentWidth=1,fillParentHeight=1,nodeAlign=kAlignTopLeft, { name="shiled",type=0,typeName="Image",time=102527257,x=145,y=268,width=1,height=1,nodeAlign=kAlignTopLeft,visible=1,fillParentWidth=1,fil...
Goal = setmetatable({}, { __index = PhysicalEntity }) function Goal.new(cell, opts, x, y) local self = setmetatable( PhysicalEntity.new(cell), { __index = Goal }) local body = self:createBody_(MOAIBox2DBody.STATIC) local fixture = body:addCircle(0, 0, opts.activate_radius) body:setTransform(x, y) self...
return { {name = "hours", qtype = "F4"}, {name = "pass", qtype = "I4"}, }
----------------------------------- -- -- Zone: Windurst_Waters (238) -- ----------------------------------- local ID = require("scripts/zones/Windurst_Waters/IDs"); require("scripts/globals/events/harvest_festivals"); require("scripts/globals/conquest"); require("scripts/globals/missions"); require("scripts/globals/se...
--[[ Inception modules from inception v4. Source: https://arxiv.org/pdf/1602.07261v2.pdf ]] local conv = nn.SpatialConvolution local batchnorm = nn.SpatialBatchNormalization local relu = nn.ReLU -- round to the nearest multiplier of 16 local function nearest16(input) if input >=16 then local rest = i...
local _, ns = ... ---------------------------------------------------------------------------------------- -- Misc Settings for DarkUI Option GUI ---------------------------------------------------------------------------------------- ns.Categories[13] = L_CATEGORIES_MISC -- optType, group, key, name, horizon, data,...
local notificationCount = 0 local create = vgui.Create local sW = ScrW() function CreateNotification(content) chat.PlaySound() local numberButtons = #content.Buttons local window = CreateWindowFrame() window:SetSize(300, 150) window:SetPos(sW + 10, 40 + notificationCount * 155) window:SetTitle(content.Titl...
if GetBot():IsInvulnerable() or not GetBot():IsHero() or not string.find(GetBot():GetUnitName(), "hero") or GetBot():IsIllusion() then return; end local ability_item_usage_generic = dofile( GetScriptDirectory().."/ability_item_usage_generic" ) local utils = require(GetScriptDirectory() .. "/util") local mutil = req...
local Parser = require "prailude.util.parser" local Server = require "prailude.server" local msg_types = { invalid = 0, not_a_type = 1, keepalive = 2, publish = 3, confirm_req = 4, confirm_ack = 5, bulk_pull = 6, bulk_push = 7, frontier_req = 8, bulk_pull_blocks = 9,...
--[[ Author: Noya Date: 16.01.2015. Shows tornado particles on a target and destroys later ]] function TornadoParticle(event) local target = event.target target.tornado = ParticleManager:CreateParticle("particles/neutral_fx/tornado_ambient.vpcf", PATTACH_WORLDORIGIN, event.caster) ParticleManager:SetParticleContr...
return function(uid, peer, event) game.teams[game.entities[uid].player.team].players = game.teams[game.entities[uid].player.team].players - 1 game.entities[uid] = nil game.world:remove(uid) game.queueReliable[#game.queueReliable + 1] = {type = 'despawn', uid = uid} print("disconnected: ", ...
class = require ('class') MagicBallSpell = class() MagicBallSpell.quad = love.graphics.newQuad(0, 0, 24, 24, 24, 24) MagicBallSpell.collision_width = 16 MagicBallSpell.collision_height = 16 MagicBallSpell.draw_width = 24 MagicBallSpell.draw_height = 24 MagicBallSpell.total_cast_time = 1 MagicBallSpell.speed = 200 ...
-- Luagit2's Diff Module Tests local fixer = require("Fixtures.fix_repo") describe(" Diff Methods Tests ", function() local luagit2 = require("luagit2") local repo_path = "Fixtures/WORKON_REPO" local diff_options, repo_index setup(function() luagit2.init() end) before_each(functi...