content stringlengths 5 1.05M |
|---|
---
-- @classmod IKRigBase
-- @author Quenty
local require = require(script.Parent.loader).load(script)
local BaseObject = require("BaseObject")
local TorsoIKBase = require("TorsoIKBase")
local Promise = require("Promise")
local CharacterUtils = require("CharacterUtils")
local Signal = require("Signal")
local ArmIKBa... |
return {
Aspect = require('eccles.Aspect'),
EntitySystem = require('eccles.EntitySystem'),
IntervalEntitySystem = require('eccles.IntervalEntitySystem'),
IntervalSystem = require('eccles.IntervalSystem'),
System = require('eccles.System'),
World = require('eccles.World')
}
|
Camera = class(function(a)
a.scale = 1.0
a.pos = Vector2D(0.0, 0.0)
a.dragRefPos = nil
a.startDragPos = nil
end)
function Camera:transform(vector2D)
return Vector2D((self.scale * vector2D[1] + self.pos[1]), (self.scale * vector2D[2] + self.pos[2]))
end
function Camera:invTransform(vector2... |
function love.load()
-- inicia o jogador
birdX = 62
birdY = 200
end
function love.update( dt )
local gravity = 30 -- força que simula a gravidade no jogo
local jumpForce = 150 -- força do pulo ao aperta qualquer tecla
birdY = birdY + (gravity * dt)
if love.keyboard.isDown... |
function isPlayerAdmin(player)
local account = getPlayerAccount(player)
return isObjectInACLGroup("user." .. getAccountName(account), aclGetGroup("Admin"))
end
|
--
-- The server only runs this file so it can send it to the client
--
if ( SERVER ) then AddCSLuaFile( "utilities_menu.lua" ) return end
local function Undo( CPanel )
CPanel:AddControl( "Header", { Text = "#Undo" } )
-- The rest is added by the undo module dynamically
end
local function User_Cleanup( CPa... |
local table = table
local ipairs = ipairs
local pairs = pairs
local math = math
local _map
local _width
local _height
local function popOpenList(openList)
local min_idx = 0
local min_score = 0x1FFFFFFF
for idx, node in pairs(openList) do
if node.score < min_score then
min_idx = idx
... |
local M = {}
handleIt = require("handle")
function tryForward()
if turtle.getFuelLevel() == 0
then
return false
end
while not turtle.forward()
do
if not handle("front")
then
break
end
end
return true
end
function tryBackward()
if turtle.getFuelLevel() == 0
then
return false
end
while not... |
local spell = Spell("instant")
function spell.onCastSpell(creature, variant)
return creature:conjureItem(0, 25757, 100, CONST_ME_MAGIC_BLUE)
end
spell:group("support")
spell:id(192)
spell:name("Conjure Diamond Arrow")
spell:words("exevo gran con hur")
spell:cooldown(2 * 1000)
spell:groupCooldown(2 * 1000)
spell:leve... |
emu.speedmode("normal") -- Set the speed of the emulator
frameNumber = 0;
--load savestate
--https://stackoverflow.com/questions/5303174/how-to-get-list-of-directories-in-lua
function dirLookup(dir)
files = {}
local p = io.popen('find "'..dir..'" -type f') --Open directory look for files, save data in p. By givi... |
local Spell = { }
Spell.LearnTime = 360
Spell.ApplyFireDelay = 0.4
Spell.ShouldSay = false
Spell.Description = [[
Makes intense ear pain
by producing loud noise.
Works only on players.
]]
Spell.SpriteColor = Color(255, 0, 0)
Spell.NodeOffset = Vector(-515, -269, 0)
Spell.AccuracyDecreaseVal = 0.22
function Spell:... |
-- 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.
m = Map("coovachilli")
-- uam config
s1 = m:section(TypedSection, "uam")
s1.anonymous = true
s1:option( Value, "uamserver" )
s1:option( Value, "uamsecret" ).... |
local GUIEditor = {
progressbar = {},
label = {},
button = {},
window = {},
gridlist = {}
}
local authorname = ""
local introname = ""
function openGUI ()
local done = 0
local screenW, screenH = guiGetScreenSize()
GUIEditor.window[1] = guiCreateWindow((screenW - 913) / 2, (screenH - 414) / 2, 9... |
-- Natural Selection 2 Competitive Mod
-- Source located at - https://github.com/xToken/CompMod
-- lua\CompMod\Structures\Alien\Clog\shared.lua
-- - Dragon
function Clog:ModifyDamageTaken(damageTable, attacker, doer, damageType, hitPoint)
if doer and doer:isa("Flamethrower") then
damageTable.damage = damag... |
---------------------------------------------------------------------------------------------------
-- func: injectaction
-- desc: Injects an action packet with the specified action and animation id.
---------------------------------------------------------------------------------------------------
cmdprops =
{
pe... |
return {'worcestersaus','worden','wording','wordingsgeschiedenis','wordingsproces','worgen','worgengel','worging','worgpaal','workaholic','workflow','workshop','workshoppen','workshopvorm','workstation','worm','wormachtig','wormgat','wormig','wormkoekje','wormkruid','wormmiddel','wormschroef','wormsteek','wormstekig','... |
Config = {}
Config.Locale = 'es'
Config.EnableESXIdentity = true
Config.MaxSalary = 3500
|
if (SERVER) then
AddCSLuaFile( "shared.lua" )
SWEP.Weight = 5
SWEP.AutoSwitchTo = false
SWEP.AutoSwitchFrom = false
end
if ( CLIENT ) then
SWEP.DrawAmmo = true
SWEP.DrawCrosshair = false
SWEP.ViewModelFOV = 82
SWEP.ViewModelFlip = false
SWEP.CSMuzzleFlashes = false
SWEP.BounceWeaponIcon = false... |
local controller = {}
controller.ui = nil
controller.dockDictionary = {}
controller.bottomDock = {}
controller.rightDock = {}
local luaHelpers = require("tevgit:create/helpers.lua")
local lastUpdate = os.clock()
local pendingSave = false
local saveDocks = function()
if pendingSave then return end
pendingSave = true... |
--========== {$prefix}/lua/addition.lua
local args = ngx.req.get_uri_args()
ngx.say(args.a + args.b)
|
module(..., package.seeall)
local ffi = require('ffi');
local libhist = require "ffi_libcircllhist"
local writer = io.write
local function assert(cond)
if not cond then
error("Assertion Failed")
end
writer(".")
end
local function setup(scratch)
scratch.hist = libhist.hist_alloc();
end
local function t... |
ITEM.name = "Basic Weapons CPU"
ITEM.uniqueID = "comp_weapons_cpu_basic"
ITEM.model = "models/props/cs_office/computer_caseb_p5b.mdl"
ITEM.desc = "A makeshift weapons CPU for simple calculations."
ITEM.flag = "v"
ITEM.price = 10
ITEM.width = 1
ITEM.height = 1 |
ESX = nil
local SeatsTaken = {}
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
-- SEATS
RegisterServerEvent('esx_interact:takePlace')
AddEventHandler('esx_interact:takePlace', function(object)
table.insert(SeatsTaken, object)
end)
RegisterServerEvent('esx_interact:leavePlace')
AddEventHandler('es... |
-- 函数
function add(a,b)
return a+b
end
print('这两个数的和是:',add(12,4))
local _name = "Tinywan"
local man = {}
function man.GetName()
return _name
end
function man.SetName(name)
_name = name
end
return man |
-- drop in replacement for dgate built-in 'wado' mode for pure lua webservers
-- mvh 20180130
-- mvh 20180131 some more protection against missing elements
-- mvh 20180202 delete output file and gracefully fail if not created
-- mvh 20180203 Added local to f
-- mvh 20181111 Use wadorequest for all images to fix zoom er... |
--------------------------------------------------------------------------------
-- Module Declaration
--
local mod, CL = BigWigs:NewBoss("Conclave of the Chosen", 2070, 2330)
if not mod then return end
mod:RegisterEnableMob(144747, 144767, 144963, 144941) -- Pa'ku's Aspect, Gonk's Aspect, Kimbul's Aspect, Akunda's A... |
--[[
MIT License
Copyright (c) 2014 Quenty
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, merge, publish,... |
--
-- game info message
--
local pack = require(GetScriptDirectory() .. "/utils/pack")
local ParseLocation = require(GetScriptDirectory() .. "/utils/location")
local items = require(GetScriptDirectory() .. "/protocol/items")
-- returned module
local gameinfo = {}
-- public
gameinfo.sent = false
-- public
function ga... |
wrk.method = "POST"
wrk.body = ""
wrk.headers["Content-Type"] = "application/x-www-form-urlencoded"
wrk.headers["Connection"] = "keep-alive"
request = function()
local hexdict = {48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102}
local randstr = {}
for i=1, 32 do
randstr[i] = hexdict[math.random(1, 16)]
e... |
DRONES_REWRITE.Colors = { }
DRONES_REWRITE.Colors.Grey = Color(70, 70, 70, 255)
DRONES_REWRITE.Colors.DarkGrey = Color(32, 32, 32, 255)
DRONES_REWRITE.Colors.DarkGrey2 = Color(50, 50, 50, 255)
DRONES_REWRITE.Colors.DarkGrey3 = Color(80, 80, 80, 255)
DRONES_REWRITE.Colors.LightGrey = Color(200, 200, 200, 255)
DRONES_R... |
local kong_storage = require "kong.plugins.session.storage.kong"
local resty_session = require "resty.session"
local kong = kong
local ipairs = ipairs
local _M = {}
local function get_opts(conf)
local opts = {
name = conf.cookie_name,
secret = conf.secret,
storage = conf.storage,
cookie = ... |
--- Default starfall permission provider
-- start the provider table and set it to inherit from the default provider
local P = {}
P.__index = SF.Permissions.Provider
setmetatable( P, P )
-- localize the result set
local ALLOW = SF.Permissions.Result.ALLOW
local DENY = SF.Permissions.Result.DENY
local NEUTRAL = SF.Per... |
return PlaceObj("ModDef", {
"title", "Buildings Always Dusty",
"version", 4,
"version_major", 0,
"version_minor", 4,
"saved", 0,
"id", "ChoGGi_BuildingsAlwaysDusty",
"author", "ChoGGi",
"steam_id", "1411885355",
"pops_any_uuid", "cfc22b13-e9b3-4b06-8994-35344794cd73",
"code", {
"Code/Script.lua",
},
"imag... |
--[[
@file
ストーリーフラグ
]]
gzStoryFlag = {
InitStoryFlag = function()
-- ******************************************************************************************* --
-- エクストラミッション用フラグ
-- ******************************************************************************************* --
StoryFlags.RegisterFlag("gzProgre... |
local osmose = require 'osmose'
local et = osmose.Model 'HighTemperatureCooling'
----------
-- User parameters
----------
et.inputs = {
-- Cooling supply
HS_TIN = {default=75, unit='C'},
HS_TOUT = {default=90, unit='C'},
HS_QMAX = {default=1000, unit='kW'},
-- Cooling intake
HI_TI... |
--- Promises, but without error handling as this screws with stack traces, using Roblox signals
-- @module Promise
local function LoadCustomLibrary(Name)
return require(script.Parent[Name])
end
local MakeMaid = LoadCustomLibrary("Maid").MakeMaid
local function IsCallable(Value)
if type(Value) == "function" then
... |
local moon = require("moon")
local http_server = require("moon.http.server")
local httpc = require("moon.http.client")
local test_assert = require("test_assert")
-- http_server.header_max_len = 8192
-- http_server.content_max_len = 8192
http_server.error = function(fd, err)
print("http server fd",fd," disconnected... |
local policy = require('apicast.policy')
local _M = policy.new('Content Caching', 'builtin')
local tab_insert = table.insert
local tab_new = require('resty.core.base').new_tab
local Rule = require("rule")
local new = _M.new
function _M.new(config)
local self = new(config)
self.rules = tab_new(#config.rules, 0)... |
local PLUGIN = PLUGIN
PLUGIN.name = "NPC Spawner"
PLUGIN.author = "Black Tea (NS 1.0), Neon (NS 1.1); ported to helix by Cyanide"
PLUGIN.description = "NPC Spawner."
PLUGIN.spawnpoints = PLUGIN.spawnpoints or {}
PLUGIN.minplayers = 1
ix.config.Add("spawner_enabled", true, "Whether NPC spawners are on or not.", nil, {
... |
local colour = ImportPackage('colours')
local function cmd_asw(playerid, weatherid)
if (PlayerData[playerid].admin < 4) then
return AddPlayerChatError(playerid, "You don't have permission to use this command.")
end
if weatherid == nil then
return AddPlayerChatUsage(playerid, "/(as)et(w)eather <weather>")
end
... |
local Spell = { }
Spell.LearnTime = 90
Spell.Description = [[
Used to increase the size
of the target by inflating
it; once inflated beyond the
maximum capacity of its outer
size, the targeted creature
will explode into colourful
party balloons.
]]
Spell.ApplyDelay = 0.4
Spell.FlyEffect = "hpw_blue_main"
... |
object_tangible_component_weapon_new_weapon_enhancement_ranged_slot_one_s02 = object_tangible_component_weapon_new_weapon_shared_enhancement_ranged_slot_one_s02:new {
}
ObjectTemplates:addTemplate(object_tangible_component_weapon_new_weapon_enhancement_ranged_slot_one_s02, "object/tangible/component/weapon/new_weapon... |
glyph_sacred_bracing = class({})
function glyph_sacred_bracing:OnCreated( data )
-- ### VALUES START ### --
self.interval = 8
self.shield = 5
self.effectiveness_offensive = 2
self.effectiveness_shadow = -2.0
-- ### VALUES END ### --
if not IsServer() ... |
-- I use this function to remove an entire category from a table based on the category name.
function RemoveItemFromTable(tbl, keyname, keyvalue)
for i,v in ipairs(tbl) do
if (v[keyname] == keyvalue) then
-- If the current table category name is the one we are looking for then
-- remove the category from th... |
---------------------------------------------------------------------------------------------------
-- -= ObjectLayer =-
---------------------------------------------------------------------------------------------------
-- Setup
TILED_LOADER_PATH = TILED_LOADER_PATH or ({...})[1]:gsub("[%.\\/][Oo]bject[Ll]ayer$", "")... |
--------------------------------
-- @module Twirl
-- @extend Grid3DAction
-- @parent_module cc
--------------------------------
-- brief Set the ampliture rate of the effect.<br>
-- param amplitudeRate The value of amplitude rate will be set.
-- @function [parent=#Twirl] setAmplitudeRate
-- @param self
-- @param #fl... |
aliveai.crafttools=function(self,t)
if math.random(1,10)~=1 then return end
if type(self.tools)=="table" then return end
for name, s in pairs(aliveai.tools_handler) do
if s.try_to_craft and s.tools then
for i, name2 in pairs(s.tools) do
aliveai.crafting(self,name ..":" ..name2)
end
end
end
... |
local version = "0.6.4"
return version
|
--------------------------------------------------------------------------
-- Moonshine - a Lua virtual machine.
--
-- Email: moonshine@gamesys.co.uk
-- http://moonshinejs.org
--
-- Copyright (c) 2013-2015 Gamesys Limited. All rights reserved.
--
-- Permission is hereby granted, free of charge, to any person obtaining
... |
return require('lib.oop.generated.defeatcondition')
|
function start(song) -- do nothing
end
function update(elapsed)
if difficulty == 2 and curStep > 29 then
local currentBeat = (songPos / 1000)*(bpm/60)
for i=0,7 do
setActorX(_G['defaultStrum'..i..'X'] + 32 * math.sin((currentBeat + i*0.25) * math.pi), i)
setActorY(_G['defaultStrum'..i..'Y'] + 32 *... |
function CreateVectorModel(property)
local vm = VectorModel();
vm:Create(property.vector);
vm:SetTranslate(property.translate[1], property.translate[2], property.translate[3])
vm:SetRotate(property.rotate[1], property.rotate[2], property.rotate[3])
vm:SetScale(property.scale[1], property.scale[2], property.scale[3... |
bill = Instance.new("BillboardGui", game.Players.LocalPlayer.Character.Head)
bill.Size = UDim2.new(4, 0, 4.5, 0)
bill.AlwaysOnTop = true
bill2 = Instance.new('BillboardGui', game.Players.LocalPlayer.Character.Head)
bill2.Size = UDim2.new(0, 120, 0, 120)
bill2.AlwaysOnTop = true
face = Instance.new('ImageLabel', bill2)
... |
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
local job = nil
AddEventHandler('playerSpawned', function(spawn)
TriggerServerEvent('medSys:getJob')
end)
RegisterNetEvent('esx:setJob')
AddEventHandler('esx:setJob', function(job)
TriggerServerEvent('medSys:getJob')
end)
TriggerServerEv... |
-- Variables that are used on both client and server
SWEP.Author = "Kafouille"
SWEP.Contact = ""
SWEP.Purpose = "Making holes in various materials"
SWEP.Instructions = "ACF AMR"
SWEP.Spawnable = false
SWEP.AdminSpawnable = false
SWEP.ViewModel = "models/weapons/v_sniper.mdl"
SWEP.WorldModel = "models/wea... |
function add(s, p)
for i = 0, math.max(#p, #s) do
if p[i] == nil then
p[i] = 0
elseif s[i] == nil then
s[i] = 0
end
p[i] = s[i] + p[i]
end
end
function new(p)
for i = 1, #p do
p[i - 1] = p[i]
end
p[#p] = nil
return ... |
object_tangible_loot_creature_loot_collections_fish_tank_rear_panel = object_tangible_loot_creature_loot_collections_shared_fish_tank_rear_panel:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_fish_tank_rear_panel, "object/tangible/loot/creature/loot/collections/fish_tank_rear_panel... |
local colors = {
head = Color(13, 81, 22, 255),
back = Color(164, 18, 18, 180),
text = Color(255, 255, 255, 255),
btn = Color(52, 73, 94, 255),
btn_hover = Color(44, 62, 80, 255),
accept = Color(46, 204, 113, 255),
accept_hover = Color(39, 174, 96, 255),
c... |
--Blacklisted models that shouldn't be affected by Automod, such as trains or other vehicles that use prop_vehicle_jeep as their base
AM_Config_Blacklist = {
["models/nova/airboat_seat.mdl"] = true, --Default gmod seat models
["models/nova/chair_office01.mdl"] = true,
["models/nova/chair_office02.mdl"] = true,
["m... |
-- Colorspace setup
if vim.fn.has("termguicolors") == 1 then
vim.opt.termguicolors = true
end
-- https://github.com/EdenEast/nightfox.nvim
local fox = 'nordfox'
local colors = require('nightfox.colors').load(fox)
colors.custom = {
cursorline = '#39404c',
comment = '#918ba1'
}
local nightfox = require('nightf... |
require 'managers/soundManager'
require 'managers/saveManager'
require 'managers/scoreManager'
require 'managers/modManager'
require 'managers/mapManager'
require 'states/maingame/player'
gameManager = {}
function gameManager:getImageScaleForNewDimensions( image, newWidth, newHeight )
local currentWidth, currentHei... |
currentQuest = {}
finishedQuests = {}
-- we will store our progress in there, same structure as "finishrequirements", except that loot will get calculated once you actually get to the trader.
function ActivateQuest(id)
if Quests[id] and CanPlayerStartQuest(id) and not IsQuestFinished(id) and not currentQuest.active ... |
-- Item
local circuitPole = table.deepcopy(data.raw["item"]["small-electric-pole"])
overwriteContent(circuitPole, {
name = "circuit-pole",
icon = "__integratedCircuitry__/graphics/icons/circuit-pole.png",
icon_size = 32,
subgroup = "circuit-network",
order = "b[wires]-c[circuit-pole]",
place_result =... |
modifier_bakedanuki_tricksters_insight = class({})
--------------------------------------------------------------------------------
-- Classifications
function modifier_bakedanuki_tricksters_insight:IsHidden()
return false
end
function modifier_bakedanuki_tricksters_insight:IsDebuff()
return true
end
function modi... |
#!/usr/bin/lua
package.cpath = "../?.so;../?.dll;"..package.cpath
local sem = require( "ipc.sem" )
local socket_ok, socket = pcall( require, "socket" )
if socket_ok then
function sleep( secs )
socket.select( nil, nil, secs )
end
else
function sleep( secs )
local start = os.clock()
while os.clock()-s... |
local player = ...
return Def.ActorFrame{
Name="Pane1",
-- labels (like "FANTASTIC, MISS, holds, rolls, etc.")
LoadActor("./JudgmentLabels.lua", player),
-- DP score displayed as a percentage
LoadActor("./Percentage.lua", player),
-- numbers (how many Fantastics? How many misses? etc.)
LoadActor("./JudgmentN... |
drow_ranger_frost_arrows_lua = class({})
LinkLuaModifier( "modifier_drow_ranger_frost_arrows_lua", "lua_abilities/drow_ranger_frost_arrows_lua/modifier_drow_ranger_frost_arrows_lua", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_generic_orb_effect_lua", "lua_abilities/generic/modifier_generic_orb_effect_lua", L... |
-- 自定义函数指针
local type = type
local s_format = string.format
local u_object = require("app.utils.object")
local u_table = require("app.utils.table")
local r_kafka_procdure = require "resty.kafka.producer"
local s_buffer = require("app.store.buffer.base_buffer")
--------------------------------------------------------... |
local UpdateEvent = BP.BaseClass(BP.Node)
function UpdateEvent:Constructor( )
self.is_updatable_bp_node = true
self.typeName = "UpdateEvent"
end
function UpdateEvent:OnValidate( )
self.outNode = self.outSlots["out"]
assert(self.outNode, "empty out node!")
end
function UpdateEvent:Update( deltaTime )
self.outN... |
-- Copyright © 2016 g0ld <g0ld@tuta.io>
-- This work is free. You can redistribute it and/or modify it under the
-- terms of the Do What The Fuck You Want To Public License, Version 2,
-- as published by Sam Hocevar. See the COPYING file for more details.
-- Quest: @Rympex
local sys = require "Libs/syslib"
local g... |
--[[
Name: "sh_power_node.lua".
Product: "HL2 RP".
--]]
local ITEM = {};
-- Set some information.
ITEM.name = "Power Node";
ITEM.cost = 5;
ITEM.model = "models/items/battery.mdl";
ITEM.weight = 0.5;
ITEM.access = "i2";
ITEM.useText = "Install";
ITEM.business = true;
ITEM.vocations = {VOC_CPA_EPU, VOC_OTA_OWC};
ITEM.d... |
---------------------------------------------------------------------------------------------------
--
--filename: game.entities.ctrl.BuffController
--date:2019/10/15 10:27:37
--author:heguang
--desc:buff管理
--
---------------------------------------------------------------------------------------------------
local Buf... |
state_title = {}
function state_title:init()
end
function state_title:enter()
end
function state_title:update(dt)
end
function state_title:draw()
love.graphics.print("title")
end
function state_title:keypressed(key, isrepeat)
if key == "return" then
Gamestate.switch(state_ingame)
... |
-- define local variables as much as possible, so scope is local
-- see http://lua-users.org/wiki/ScopeTutorial
local em = GetEventManager()
local wm = GetWindowManager()
local _,tlw
local dx = 1/GetSetting(SETTING_TYPE_UI, UI_SETTING_CUSTOM_SCALE)
IDR = IDR or {}
local IDR = IDR
IDR.name = "ImprovedDeathRecap"
ID... |
require 'Q/UTILS/lua/strict'
local Q = require 'Q'
local ffi = require 'ffi'
local get_ptr = require 'Q/UTILS/lua/get_ptr'
local Scalar = require 'libsclr'
local qconsts = require 'Q/UTILS/lua/qconsts'
local plpath = require 'pl.path'
local plutils= require 'pl.utils'
local test_print = true -- turn false i... |
--[[
网络管理器
]]
require("CommonBus")
require("GlobalConstants")
net = {}
net.SocketTCP = require("SocketTCP")
local ByteArray = require("ByteArray")
local scheduler = require("scheduler")
NetworkMgr = class("NetworkMgr")
local _NET_DEBUG_ = true
local _instance = nil
local _allowInstance = false
function Netwo... |
platform = class("platform")
function platform:init(x, y, r, diroverride)
self.size = 2
self.dir = diroverride or "normal" --(normal, Justup, Justdown, justright(bonus stage), fall)
self.speed = platformjustspeed
self.xdistance = 0
self.ydistance = 0
--Input list
self.r = {unpack(r)}
table.remove(self.r, 1)
... |
dofile(ModPath .. "infcore.lua")
Hooks:Add("MenuManagerInitialize", "mmi_inf", function(menu_manager)
-- custom keybind
local mod
for _, m in pairs(BLT.Mods:Mods()) do
if m:GetName() == "Hold The Key" then
mod = m
break
end
end
if mod and mod:IsEnabled() then
HoldTheKe... |
--MCmobs v0.2
--maikerumine
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
--dofile(minetest.get_modpath("mobs").."/api.lua")
--###################
--################### CAVE SPIDER
--###################
--[[
mobs:register_mob("mobs_mc:38cavespider", {
type = "animal",
pa... |
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
--------------------------------------... |
ffi = require('ffi')
ffi.cdef[[
int shutdown(int, int);
]]
function self_close()
local SHUT_RDWR = 2
ffi.C.shutdown(box.session.fd(), SHUT_RDWR)
end
box.cfg{listen=3301}
|
---------------------------------------------------------------------------------------------------
-- User story: TBD
-- Use case: TBD
--
-- Requirement summary:
-- [SDL_RC] TBD
--
-- Description:
-- 1) RC app1 and app2 are registered
-- 2) AccessMode is ASK_DRIVER on HMI
-- 3) Module_1 is allocated by app1
-- 4) App2... |
minetest.register_node("sand:sand", {
description = "Sand",
tiles = {
"sand_sand_top.png",
{name = "sand_sand_side.png", tileable_vertical = false}
},
groups = {crumbly=3, falling_node=1, sand=1},
drops = "sand:sand",
sounds = sound.sand(),
})
minetest.register_node("sand:desert", {
description = "Desert Sa... |
object_building_general_monc_skyscraper_07 = object_building_general_shared_monc_skyscraper_07:new {
}
ObjectTemplates:addTemplate(object_building_general_monc_skyscraper_07, "object/building/general/monc_skyscraper_07.iff")
|
local str = {}
function str.to_bool(s)
if type(s) ~= 'string' then
return nil
end
if s == 'false' then
return false
elseif s == 'true' then
return true
else
return nil
end
end
function str.to_int(s)
local number = tonumber(s)
if number == nil then
return nil
end
return math.floor(number)
end
... |
//Trying something wierd here - Load original EventTester.lua file
//Well this sucks, need to include old EventTester file now because of B258 change.
if Server then
Script.Load("lua/base/server.lua")
elseif Client then
Script.Load("lua/base/client.lua")
elseif Predict then
Script.Load("lua/base/predict.lua")
end
... |
print(rawget(_ENV, "print")) -- function: 0000000068d17b70
print(_ENV.print) -- function: 0000000068d17b70
a = 10 -- 等价于_ENV.a
print(_ENV.a) -- 10
print(rawget(_ENV, "a")) -- 10
print(_ENV._G.a) -- 10
-- 可以看到Lua创建并初始化的_ENV包含了全局环境中的内容(不需要通过__index去_G全局环境中搜索)
-- 同时对_ENV的字段赋值会通过__newindex同步设置_G对应字段
_ENV = {_G = _G} -- ... |
--[[
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... |
local status = {}
status.current = "load"
function status.check(currentStatus)
if status.current == currentStatus then
return true
else
return false
end
end
function status.change(newStatus)
status.current = newStatus
end
return status
|
if not GAMESTATE:IsPlayerEnabled(PLAYER_2) then return end
local t = Def.ActorFrame{};
t[#t+1] = LoadActor("MeasureCounter.lua");
return t; |
require("sourcenet" )
concommand.Add("loadcodec", function(ply, cmd, args)
if not IsValid(ply) then return end
if not args[1] then return end
local buffer = CNetChan(ply:EntIndex()):GetReliableBuffer()
buffer:WriteUInt(svc_VoiceInit, NET_MESSAGE_BITS)
buffer:WriteString(args[1])
buffer:WriteByte(1)
end)
|
local gps = require("gps")
local action = require("action")
local database = require("database")
local scanner = require("scanner")
local posUtil = require("posUtil")
local config = require("config")
local lowestTier
local lowestTierSlot
local lowestStat
local lowestStatSlot
local function updateLowest()
lowestTi... |
function divide(parametro)
linha = {}
n = 0
-- parametro para espaço "*l"
for i in string.gmatch(io.read(parametro), "%S+") do
n = n + 1
linha[n] = i
end
return linha
end
function processamento(mes)
if mes==1 then
usagi="January"
elseif mes==2 then
usagi="February"
elseif mes==3 then... |
Enemy = Class{}
function Enemy:init()
self.width = 74
self.height = 74
-- Regulate the speed when the entity bounces off a wall (the borders of the window)
self.speed = 480
-- Change in speed wrt x and y axes.
self.dx = math.random(-480, 480)
self.dy = math.random(-480, 480)
-- Posit... |
ENT.Base = "base_anim"
ENT.Type = "anim"
ENT.PrintName = "Base Container"
ENT.Category = "ISAWC"
ENT.Author = "Piengineer"
ENT.Contact = "http://steamcommunity.com/id/Piengineer12/"
ENT.Purpose = "Base container for the Inventory System."
ENT.Instructions = "Link this container to something."
ENT.AutomaticFrameAdvance ... |
-- * Metronome IM *
--
-- This file is part of the Metronome XMPP server and is released under the
-- ISC License, please see the LICENSE file in this source package for more
-- information about copyright and licensing.
local st = require "util.stanza";
local ipairs, pairs = ipairs, pairs;
local services = module:ge... |
local function is_user_whitelisted(id)
local hash = 'whitelist:user#id'..id
local white = redis:get(hash) or false
return white
end
local function is_chat_whitelisted(id)
local hash = 'whitelist:chat#id'..id
local white = redis:get(hash) or false
return white
end
local function kick_user(user_id, chat_id,... |
------------------------------------------------------------------------
-- Copyright (c) 2020-2021 Daniele Bochicchio
-- License: MIT License
-- Source Code: https://github.com/dbochicchio/Vera-VirtualDevices
------------------------------------------------------------------------
-- DIANGOSTICS
-- Use this file to s... |
class "VertexBuffer"
function VertexBuffer:__index__(name)
if name == "verticesPerFace" then
return Polycore.VertexBuffer_get_verticesPerFace(self.__ptr)
elseif name == "meshType" then
return Polycore.VertexBuffer_get_meshType(self.__ptr)
end
end
function VertexBuffer:__set_callback(name,value)
if name == ... |
direction = {"лево", "горе", "десно", "доле"}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.