content
stringlengths
5
1.05M
Debug = { SendServerState = true } GameSettings = { Gamemode = "deathmatch", MapFile = "beta_map.bmap", TickRate = 33, } Resources = { AssetDirectory = "assets", ScriptDirectory = "scripts" }
-- Settings item_repair_settings = {} -- Do we log that items were produced? (Great for debugging issues but not so good on a long running production server) item_repair_settings.log_production = false -- Do we log deep into the bowels of the repairs? item_repair_settings.log_deep = false -- The amount repaired per...
local a = require 'plenary.async_lib' local wrap = a.wrap local function trim_newlines(s) return (string.gsub(s, "^(.-)\n*$", "%1")) end local function spawn(options, cb) assert(options ~= nil, 'Options parameter must be given') assert(options.cmd, 'A command needs to be given!') local return_code, output, e...
local config = { savePlayer = true, healPlayerOnLevel = true } function onAdvance(cid, skill, oldLevel, newLevel) if(skill == SKILL__EXPERIENCE) then return true end if(skill == SKILL__LEVEL and config.healPlayerOnLevel) then doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid)) doCr...
return { { effect_list = { { type = "BattleSkillAddBuff", casterAniEffect = "", target_choise = "TargetHarmRandomByWeight", targetAniEffect = "", arg_list = { buff_id = 105134 } }, { type = "BattleSkillFire", casterAniEffect = "", targetAniEffect = "", target_cho...
scripts:invokeSync("default.lua") intValue2 = 102
if (chi_location_id == 0) then print("############################################### LuaTest") end --dofile(CHI_LIBRARY) --############################################### Setup mesh chiMeshHandlerCreate() newSurfMesh = chiSurfaceMeshCreate(); chiSurfaceMeshImportFromOBJFile(newSurfMesh, "ChiResources/T...
local M = {} -- Hide ugly toolbar hs.console.toolbar(nil) -- Disable window movment animations hs.window.animationDuration = 0 -- key used as my "super" key. This key combination is mapped with karabiner -- elements from the capslock key. M.super = { "cmd", "ctrl", "shift", "alt" } return M
AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" ) include('shared.lua') local soundx=Sound("Canals.d1_canals_01_chargeloop") function ENT:Initialize() self.Entity:SetModel("models/Items/combine_rifle_ammo01.mdl") self.Entity:PhysicsInit( SOLID_VPHYSICS ) self.Entity:SetMoveType( MOVETYPE_VPHYSICS ) self...
local _timer = require('timer') local function timers() local scene = {} scene.list = {} function scene:add(trigger, func) local timer = _timer:new(trigger, func) local size = #self.list timer.index = size + 1 self.list[timer.index] = timer return timer end function scene:update(delay...
--Generated By msgid-gen-lua Do not Edit local config = { [10001] = "login.req_login", [10002] = "login.rsp_login", [11001] = "login.ntf_logout", [30001] = "user.req_create_user", [30002] = "user.rsp_create_user", [30003] = "user.req_change_name", [30004] = "user.rsp_change_name", [30001] = "room.req_join_match...
local processid = KEYS[1] local cat = KEYS[2] local message = KEYS[3] local logkey = "logs:data:"..processid local idkey = "logs:id:"..processid local channelkey = "logs:channel:"..processid local t = redis.call('TIME')[1] local id = redis.call("INCR",idkey) if id>1000 then redis.call("hdel", logkey, id-1000) ...
local ServerScriptService = game:GetService("ServerScriptService") local ServerStorage = game:GetService("ServerStorage") local Workspace = game:GetService("Workspace") local findersFolder = ServerScriptService:WaitForChild("Finders", 2) local DomainFinder = require(findersFolder:WaitForChild("DomainFinder", 2)) local...
local class = require 'middleclass' local base = class('freeioe.logger.client.base') function base:initialize(logger, format) assert(format) self._logger = logger self._format = format end function base:publish_log(...) return self:send(self._format.log(...)) end function base:publish_comm(...) return self:sen...
function OnSpellStart(keys) --redirect to real tether local caster = keys.caster local dummy = MUtil:FindByUnitNameNearest("npc_tree_dummy", keys.target:GetOrigin(), 100.0) --depends on tree dummies being the only thing of this class around, can do this samrter some other time caster:RemoveModifierByName("trolls...
BehaviorTree = { type = "sequence", children = { { type = "priority", children = { { type = "random", children = { { type = "concurrent", child...
--!strict local FAST_SPAWN_BINDABLE = Instance.new('BindableFunction') local FAST_SPAWN_CALLER = function(cb: () -> ()) cb() end :: any local LOCK_IS_INVOKING = false FAST_SPAWN_BINDABLE.OnInvoke = FAST_SPAWN_CALLER local function FastSpawn(func: () -> (), ...: any) local args = { ... } local funcWithArgsBound = f...
local allowCountdown = false function onStartCountdown() if not allowCountdown and isStoryMode and not seenCutscene then --Block the first countdown startVideo('loafcutscene'); allowCountdown = true; return Function_Stop; end return Function_Continue; end function onTimerCompleted(tag, loops, loopsLeft) if ta...
--[[ desc:桌子 auth:Carol Luo ]] local class = require("class") local gameCompetition = require("game.competition") ---@class chessTable:gameCompetition @桌子 local competition = class(gameCompetition) ---构造函数 function competition:ctor() end return competition
---------------------------------------------------------------------------------------------------- -- -- Copyright (c) Contributors to the Open 3D Engine Project. -- For complete copyright and license terms please see the LICENSE at the root of this distribution. -- -- SPDX-License-Identifier: Apache-2.0 OR MIT -- --...
local Vec2 = struct { x = 0, y = 0 }; Vec2.type = "Vec2"; function Vec2:ctor(x,y) self.x = x; self.y = y; end function Vec2:__add(other) return Vec2(self.x + other.x, self.y + other.y); end function Vec2:Print() for k,v in pairs(self) do print(k.." = "..v); end end local v1 = Ve...
local S = mobs.intllib local hairball = minetest.settings:get("mobs_hairball") -- Kitten by Jordach / BFD mobs:register_mob(":mobs:kitten", { stepheight = 0.6, type = "animal", specific_attack = {"mobs:rat"}, damage = 1, attack_type = "dogfight", attack_animals = true, -- so it can attack rat attack_players = false...
if SERVER then util.AddNetworkString( "GetContents" ) util.AddNetworkString( "SendContents" ) util.AddNetworkString( "WriteQuery" ) util.AddNetworkString( "sendUpdate" ) if not file.Exists( "notepad", "DATA" ) then file.CreateDir( "notepad" ) end if not file.Exists( "notepad/note.txt", "DATA" ) then fil...
----------------------------------- --- Discord ACE Perms by Badger --- ----------------------------------- fx_version 'cerulean' game 'gta5' server_script "config.lua" server_script "server.lua"
local font = { } love = { graphics = { getWidth = function() return 1600 end, getHeight = function() return 900 end, rectangle = function(mode, x, y, w, h) end, setColor = function() end, setScissor = function() end, newFont = function() return font end }, fil...
local set = vim.opt_local set.tabstop = 4 set.softtabstop = 4 set.shiftwidth = 4
local function Filter1D(Array, Condition) local Result = {} for Key, Value in pairs(Array) do if (Condition(Value, Key)) then Result[Key] = Value end end return Result end return Filter1D
-- Copyright 2020 Rohit Goswami (HaoZeke) <rog32[at]hi.is> -- -- 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 ...
-- Copyright (c) 2019 Trevor Redfern -- -- This software is released under the MIT License. -- https://opensource.org/licenses/MIT function love.conf(t) t.window.title = "Cello RPG" t.window.height = 600 t.window.width = 800 t.window.vsync = 1 t.window.fullscreen = false package.path = package...
local skynet = require "skynet" local socket = require "socket" local cjson = require "cjson" local md5 = require "md5" local json = cjson.new() math.randomseed(os.time()) function printtable( t ,s) s=s..s for k,v in pairs(t) do print(s,k,v) if type(v)=="table" then printtable(v,s) end end end skynet.st...
function onEvent(name,value1,value2) if name == 'Hide_HealthBar' then setProperty('healthBarBG.visible', false) setProperty('healthBar.visible', false) setProperty('scoreTxt.visible', false) setProperty('iconP1.visible', false) setProperty('iconP2.visible', false) end if value1...
--This is a rank table --There could be multiple tables to generate spawns from local Clockwork_Ranks_01 = { ["Underlings"] = { "Sprocket_Mini","Sprocket_00", "Sprocket_01", "Sprocket_02", }, ["Minions"] = { "Sprocket_09", "Sprocket_091", "Sprocket_092", ...
local function StringTrim(input, chars, sides) if not chars then chars = "%s" end if #chars == 0 then return input end if not sides then sides = { left = true, right = true, } end local trimmed = input if sides.left then local start = string.find(trimmed, "[^" .. chars .. "]") if not start th...
--[[-------------------------------------------------------------------- Grid Compact party and raid unit frames. Copyright (c) 2006-2009 Kyle Smith (Pastamancer) Copyright (c) 2009-2016 Phanx <addons@phanx.net> All rights reserved. See the accompanying LICENSE file for details. https://github.com/Phanx/Grid htt...
bobmods.lib.recipe.add_ingredient("sc-unit", {"plastic-bar", 9})
return require((("."..assert(...,"Needs module path.")):gsub("%.init$","")..".css"):sub(2))
--[=[ @class PlayerProductManagerBase ]=] local require = require(script.Parent.loader).load(script) local BaseObject = require("BaseObject") local GameConfigAssetTypes = require("GameConfigAssetTypes") local MarketplaceUtils = require("MarketplaceUtils") local Promise = require("Promise") local Rx = require("Rx") l...
Flow() Flow{{}} Flow{""} Flow("abc") Flow{" ab"} Flow{";ab"} Flow{":ab"} Flow{",ab"} Packet() Packet{} Packet.abc() Packet.abc("abc") Packet.abc = "abc" Packet[{}]("abc") Packet[{}]{} ip(12) ip{} ip"" ip"abc" ip"10.1..." mac(12) mac{} mac"" mac"abc" mac"10:::::"
AddCSLuaFile("cl_init.lua") AddCSLuaFile("shared.lua") include("shared.lua") function ENT:Initialize() self.timer = CurTime() + 25 self:SetModel( "models/press-plates/plate.mdl" ) self:PhysicsInit( SOLID_VPHYSICS ) self:SetMoveType( MOVETYPE_VPHYSICS ) self:SetSolid( SOLID_VPHYSICS ) self:Set...
local Maybe = require 'luafp.Maybe' local Just = Maybe.Just local Nothing = Maybe.Nothing describe("luafp/Maybe.lua", function() describe('Just', function() local just1 = Just(1) it('should exist', function() assert.not_nil(just1) end) it('should have value of 1', functi...
require("core/dict"); Dict.setDictNamePrefix = function(prefix) Dict.s_dictNamePrefix = prefix; end Dict.getDictNamePrefix = function() return Dict.s_dictNamePrefix or ""; end Dict.ctor = function(self, dictName) self.m_name = Dict.getDictNamePrefix() .. dictName; end
-- Created by Elfansoer --[[ Ability checklist (erase if done/checked): - Scepter Upgrade - Break behavior - Linken/Reflect behavior - Spell Immune/Invulnerable/Invisible behavior - Illusion behavior - Stolen behavior ]] -------------------------------------------------------------------------------- modifier_timbersaw...
-- // FileName: Speaker.lua -- // Written by: Xsitsu -- // Description: A representation of one entity that can chat in different ChatChannels. local module = {} local RunService = game:GetService("RunService") local Chat = game:GetService("Chat") local ReplicatedModules = Chat:WaitForChild("ClientChatModules") local...
local jautils = require("mods").requireFromPlugin("libraries.jautils") local lightBeamHelper = require("helpers.light_beam") local coloredLightbeam = { name = "FrostHelper/ColoredLightbeam", depth = -9998, sprite = lightBeamHelper.getSprites, selection = lightBeamHelper.getSelection } jautils.createPl...
-- npm install -g graphql-language-service-cli require'lspconfig'.graphql.setup{}
--[[ Testing Enables automated testing and benchmarking. SYNOPSIS local runner = Testing.Runner({ Modules = { game.ServerScriptService.ModuleScript, }, Scan = { game.ReplicatedStorage.Modules, }, Output = print, Yield = wait, }) local testResults = runner:Test() print(testResults) local bench...
local PANEL = {} function PANEL:Init() self.Mixer = vgui.Create( "DColorMixer", self ) self.Mixer:Dock( FILL ) self:SetTall( 245 ) end function PANEL:PerformLayout( x, y ) -- Magic number, the target width for self.Mixer -- Number picked to that Palette would not have a gap, at button size 17...
dofile'../../include.lua' os.execute('clear') try_torch = true if try_torch then T = require'libTransform' else T = require'Transform' end q = require'quaternion' v = require'vector' util = require'util' -- Dipole components --local r22 = math.sqrt(2)/2 x = v.new{ .3, 0, .1 } tri = v.new{ .3, .1, .2 } -- form t...
--- Checks uses of undeclared global variables. -- All global variables must be 'declared' through a regular assignment -- (even assigning `nil` will do) in a main chunk before being used -- anywhere or assigned to inside a function. Existing metatables `__newindex` and `__index` -- metamethods are respected. -- -- Yo...
-- --.-----------------------------------------------------------------------.-- -- Hx@2017-08-10: simple functional programing part -- --'-----------------------------------------------------------------------'-- --module('tool', package.seeall) function id(t) return t end function any(t, f, ...) f...
ITEM.name = "FAMAS" ITEM.desc = "A Weapon." ITEM.model = "models/weapons/w_rif_famas.mdl" ITEM.class = "nut_cs_famas" ITEM.weaponCategory = "primary" ITEM.width = 4 ITEM.height = 2 ITEM.price = 2500 ITEM.iconCam = { ang = Angle(-1.4573881626129, 270.6755065918, 0), fov = 12.796572802781, pos = Vector(3.5, 200, 1) } ...
local Path = require ("Quadtastic.Path") -- test toString do local tests = { "/", "/dev/null", "/foo/bar/file.c", "C:/windows/path", } for _,test in ipairs(tests) do assert(tostring(Path(test)) == test, "Serialization of " .. test .. "did not match") end end -- test concatenatio...
--[[ The MIT License (MIT) Copyright (c) 2012 Toby Jennings 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, modify, mer...
lesser_spend_mana_regenerate_health = class({}) function lesser_spend_mana_regenerate_health:OnCreated( data ) -- ### VALUES START ### -- self.health_refund = 400 self.duration = 8 -- ### VALUES END ### -- if not IsServer() then return end self:StartIntervalThink(0.06) end ...
local tprint = require('related_files.util').tprint local rf = require('related_files.related_files') local rf_info = require('related_files.info') local path = require('related_files.util.path') local print_error = require('related_files.util').print_error local print_warning = require('related_files.util').print_warn...
-- aacore.lua - Main stuffs -- This file is under copyright, and is bound to the agreement stated in the EULA. -- Any 3rd party content has been used as either public domain or with permission. -- © Copyright 2016-2017 Aritz Beobide-Cardinal All rights reserved. ARCSlots.LogFileWritten = false ARCSlots.LogFile...
local t = Def.ActorFrame{}; t[#t+1] = Def.Quad{ InitCommand=cmd(FullScreen;diffuse,color("1,0,0,0");blend,Blend.Multiply); OnCommand=cmd(decelerate,1.25;diffuse,color("0.75,0,0,0.75");linear,7;diffuse,color("0,0,0,1");sleep,1.25;linear,1;diffuse,color("1,0,0,1");decelerate,2;diffuse,color("0,0,0,1")); }; t[#...
require'nvim-treesitter.configs'.setup { ensure_installed = "maintained", sync_install = false, highlight = { enable = true, }, matchup = { enable = true, }, }
-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf/protobuf" local PKRESULTTYPE_PB = require("PkResultType_pb") local PVPROLEBRIEF_PB = require("PvpRoleBrief_pb") module('PkOneRec_pb') PKONEREC = protobuf.Descriptor(); local PKONEREC_RET_FIELD = protobuf.FieldDescriptor(); local PKONEREC_MY...
minetest.register_node("factory:smoke_tube", { drawtype = "nodebox", tiles = {"factory_machine_brick_1.png"}, paramtype = "light", description = "Smoke Tube", groups = {cracky=3}, node_box = { type = "fixed", fixed = { {-0.125,-0.5,0.3125,0.125,0.5,0.375}, {-0.125,-0.5,-0.375,0.125,0.5,-0.3125}, {0....
local info = { version = 1.002, comment = "prototype textadept runner for context/metafun", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files", } -- This is an adapted version of the run code by m...
function love.conf(t) -- Cette ligne permet d'afficher des traces dans la console pendant l'éxécution if arg[#arg] == "-debug" then t.console = true end end
--[[ GD50 Angry Birds Author: Colton Ogden cogden@cs50.harvard.edu ]] Level = Class{} function Level:init() -- create a new "world" (where physics take place), with no x gravity -- and 30 units of Y gravity (for downward force) self.world = love.physics.newWorld(0, 300) -- bodies we...
local View = {}; function View:Start(data) self.view = SGK.UIReference.Setup(self.gameObject) end return View;
FRAMEWORK_INITED = false if not FRAMEWORK_INITED then require ("Framework/Function") require ("Framework/Define") require ("Framework/Utility") require ("Framework/MsgDispatcher") require ("Framework/FSM") -- require ("Framework/Logic/Command/ICommand") -- 暂时先不处理消息 require ("Framework/LuaBehaviour") ...
function playgame(player) local car = math.random(3) local pchoice = player.choice() local function neither(a, b) --slow, but it works local el = math.random(3) return (el ~= a and el ~= b) and el or neither(a, b) end local el = neither(car, pchoice) if(player.switch) then pchoice = neithe...
local TARGET_BOOKING_KEY = KEYS[1] local TARGET_PID = KEYS[2] local PAIR_INGAME_TTL = tonumber(KEYS[3]) local ABSOLUTE_GAMEPLAY_TTL = tonumber(KEYS[4]) local NOW = tonumber(KEYS[5]) local pair_index = redis.call('hmget', 'pinx:' .. TARGET_BOOKING_KEY, 'prid', 'pid') if pair_index[1] == false then return nil else ...
local MessageView = {} function MessageView:initialize() end -- local text = " 新世界正式上线!热烈庆祝新世界正式上线运营。新世界游戏团队倾力打造又一斗牛精品,原汁原味地道斗牛经验。各种特色玩法,够麻辣够吃惊!新品上线,诚邀各路伙伴合作共赢,有兴趣的朋友可以联系我们。\n 官方代理咨询及技术问题反馈官方微信号:18819207102 " local text1 = "亲爱的玩家:\n\n".."抵制不良游戏,拒绝盗版游戏,".."注意自我保护,谨防上当受骗。\n".."适度游戏益脑,沉迷游戏伤身,".."合理安排时间,享受健康生活...
object_mobile_dressed_npe_sequencer_cantina6 = object_mobile_shared_dressed_npe_sequencer_cantina6:new { } ObjectTemplates:addTemplate(object_mobile_dressed_npe_sequencer_cantina6, "object/mobile/dressed_npe_sequencer_cantina6.iff")
local Signal = {} Signal.__index = Signal function Signal:Connect(listener) return self.Bind.Event:connect(function (key) listener(unpack(self.Cache[key])) end) end function Signal:Wait() return unpack(self.Cache[self.Bind.Event:wait()]) end function Signal:Fire(...) local key = tick() self.Cache[key] = {...}...
-- -- Created by IntelliJ IDEA. -- User: nander -- Date: 22-10-17 -- Time: 18:03 -- To change this template use File | Settings | File Templates. -- local COMMANDS = require 'scripts.helpers.command' local CLA =require 'scripts.modules.context.actions' local CTX = {} CTX[#CTX + 1] = { COMMANDS.numberCommand(), CLA.ru...
local t = LoadFont("Common normal")..{ InitCommand=function(self) self:x(30):zoom(0.3):rotationz(90) end } return t
function foo() local a = 1 local b = 2 local c = 3 end function bar() local a = 1 local b = 2 local c = 3 end
local hooked_onShowWindow = SmugglersMarket.onShowWindow function SmugglersMarket.onShowWindow() hooked_onShowWindow() local ship = buyer.craft -- read cargos and sort local cargos = {} for good, amount in pairs(ship:getCargos()) do table.insert(cargos, {good = good, amount = amount}) ...
data:extend({ { type = "recipe", name = "void-pipe", energy_required = 4, enabled = true, ingredients = {{"pipe", 5}}, result = "void-pipe", result_count = 1 }, })
--mapping STR_FMT = string.format CC_WINSIZE = cc.Director:getInstance():getWinSize() CC_VISIBLESIZE = cc.Director:getInstance():getOpenGLView():getVisibleSize(); scheduler = cc.Director:getInstance():getScheduler() CCSPR_FR_CACHE = cc.SpriteFrameCache:getInstance() CC_TEXTURE_CHE = cc.Director:getInstance():getTextur...
local SPEC = { TERM = {}, BEGIN = {}, } SPEC[SPEC.TERM] = 'TERM' SPEC[SPEC.BEGIN] = 'BEGIN' --[[if arg[1] == '--debug' then local peak = 0 debug.sethook(function() local m = collectgarbage'count' if m > peak then print( m ) peak = m end end, '', 1) end--]] local chain = {} local function add( prev, n...
ITEM.name = "Typhoon 12" ITEM.description= "A semi-automatic drum-fed shotgun. Fires 12 gauge." ITEM.model = "models/weapons/typhoon12/w_typhoon12.mdl" ITEM.class = "cw_kk_ins2_typhoon12" ITEM.weaponCategory = "primary" ITEM.width = 4 ITEM.height = 2 ITEM.price = 24000 ITEM.weight = 8
local super = require("Framework.display.DisplayObject") ---@class Framework.display.InterActiveObject:Framework.display.DisplayObject ---@field EventClick Framework.event.Delegate ---@field EventDown Framework.event.Delegate ---@field EventUp Framework.event.Delegate ---@field EventDragEnter Framework.event.Delegate -...
-- BizHawk MultiTrack script (beta) local PCKeyState = require "bizhawk-pckeystate" require "bizhawk-pretty-print" local MultiTrackLight = {} MultiTrackLight.__index = MultiTrackLight -- Class(...) works as same as Class.new(...) setmetatable(MultiTrackLight, { __call = function (klass, ...) return klass.new(....
ITEM.name = "Hax-Orthlack Creed-9 Pattern Receiver" ITEM.description = "A receiver for a Hax-Orthlack Creed-9 Pattern Autogun." ITEM.model = "models/props_lab/box01a.mdl" ITEM.price = 25 ITEM.weight = .4 ITEM.exRender = true
SpecialLogic = SpecialLogic or BaseClass(BaseHotUpdate) function SpecialLogic:__init(c_speciallogic) self.c_speciallogic = c_speciallogic end function SpecialLogic:__delete() self.c_speciallogic = nil end function SpecialLogic:Update(interval, now_second) end function SpecialLogic:OnAddObj(c_obj) -- body end ...
--[[ Which of the following are valid numerals? What are their values? ]]-- -- .0e12 .e12 0.0e 0x12 0xABFG 0xA FFFF 0xFFFFFFFF 0x 0x1P10 0.1e1 0x0.1p1 -- Ans: The following are valid numbers print(type(.0e12)) --print(type(.e12)) --print(type(0.0e)) print(type(0x12)) --print(type(0xABFG)) print(type(0xA)) print(type(FF...
local t = { 100, 200, 300 } for k,v in t do print("A",k,v) end for k,v in pairs(t) do print("B",k,v) end
local mod = DBM:NewMod(832, "DBM-ThroneofThunder", nil, 362) local L = mod:GetLocalizedStrings() -- BH ADD local sndWOP = mod:SoundMM("SoundWOP") mod:SetRevision(("$Revision: 11365 $"):sub(12, -3)) mod:SetCreatureID(68397)--Diffusion Chain Conduit 68696, Static Shock Conduit 68398, Bouncing Bolt conduit 68698,...
local Observable = require("envel.stream.observable") local Subscriber = require("envel.stream.subscription").Subscriber function Observable:filter(handler) return self:lift(function(sink, source) local child = Subscriber.create(sink) local next = child.next child.next = function(sub, ...) ...
local skynet = require "skynet" require "Common.Util.util" local Task = {} function Task.Task_GetInfoList(user_info, req_data) local ackData = { taskList = { { taskID = 1, subTaskList = { typeID = 1, state = 1, curNum = 0 }, }, }, } return ackData end return Task
-- main Factorio data.raw file local count = 0 for i, v in pairs (data.lua) do count = count + 1 end log ('count = ' .. count)
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local fs = require "nixio.fs" local tpl = require "luci.template" local ntm = require "luci.model.network".init() local fwm = require "luci.model.firewall".ini...
-- _ _ -- ___| (_)_ __ ___ ___ -- / __| | | '_ ` _ \ / _ \ -- \__ \ | | | | | | | __/ -- |___/_|_|_| |_| |_|\___| -- -- SLIME is a point-and-click adventure game library for LÖVE. local slime = { _VERSION = 'slime v0.1', _DESCRIPTION = 'A point-and-click adventure game library for LÖVE', _...
-- Base.lua -- @Author : Dencer (tdaddon@163.com) -- @Link : https://dengsir.github.io -- @Date : 8/30/2019, 11:42:31 PM ---@type ns local ns = select(2, ...) ---@class Base: Object local Base = ns.Addon:NewClass('Base') function Base:SetParent(parent) self.parent = parent end function Base:GetParent() ...
function getInfo() return { onNoUnits = RUNNING, -- instant success tooltip = "Ends game.", parameterDefs = {} } end -- get madatory module operators VFS.Include("modules.lua") -- modules table VFS.Include(modules.attach.data.path .. modules.attach.data.head) -- attach lib module -- get other madatory depende...
-- @Author:pandayu -- @Version:1.0 -- @DateTime:2018-09-09 -- @Project:pandaCardServer CardGame -- @Contact: QQ:815099602 local gm_check = require "game.handler.gm.gm_check" local _M = function(role,data) data.id = tonumber(data.id) data.num = data.num or 1 data.num = tonumber(data.num) local mr = gm_check(role,da...
--Written by AstralKingdoms, this module is unfinished --this code is bad in general, expect a rewrite local RunService = game:GetService("RunService") local ContentProvider = game:GetService("ContentProvider") local HTTPService = game:GetService("HttpService") local IsServer = RunService:IsServer() local IsClient ...
-- this file saved with utf-16 le for test purpose add_rules("mode.debug", "mode.release") target("程序") set_kind("binary") add_files("源文件🎆/*.c") add_includedirs("头文件✨") before_build(function() print("开始编译😊") end) after_build(function() print("结束编译🎉") end)
Config = {} Config.Enabled = true -- Enable / disable -- Text Options Config.Font = 4 -- Font family (https://gtaforums.com/topic/794014-fonts-list/) Config.Scale = 0.38 -- Font size -- Box Dimensions Config.Width = 0.145 -- Box width Config.Spacing ...
local ngx_worker_pid = ngx.worker.pid local ngx_timer_at = ngx.timer.at local ngx_log = ngx.log local ngx_ERR = ngx.ERR local ngx_WARN = ngx.WARN local ngx_DEBUG = ngx.DEBUG local ngx_var = ngx.var local str_lower = string.lower local str_format = string.format local str_sub = string.sub local tostring = tostring local...
local M = {} local lvl = 3 local onError = function(msg) print(tmr.time() .. " <error> " .. msg) end local onInfo = function(msg) print(msg) end local onDebug = function(msg) print(tmr.time() .. " <debug> " .. msg) end function M.setLevel(level) if(level == "error") then lvl = 1 elseif (level == "info") then ...
return { death_by = { chara = { death_cause = function(_1) return ("%sに殺された。") :format(basename(_1)) end, destroyed = { active = "破壊した。", passive = function(_1) return ("%sは破壊された。") :format(name(_1)) end }, killed = { active = "殺した。", passive = funct...
greater_rune_sword = class({}) function greater_rune_sword:OnCreated( data ) -- ### VALUES START ### -- self.attack_damage = 12 self.spell_damage = 12 self.lifesteal = 3 self.effectiveness_defensive = 20.0 self.effectiveness_supportive = 30.0 -- ##...