content
stringlengths 5
1.05M
|
|---|
package("nanovg")
set_homepage("https://github.com/memononen/nanovg/")
set_description("Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.")
set_license("zlib")
add_urls("https://github.com/memononen/nanovg.git")
on_install("windows", "macosx", "linux", function (package)
io.writefile("xmake.lua", [[
add_rules("mode.debug", "mode.release")
target("nanovg")
set_kind("static")
add_files("src/*.c")
add_headerfiles("src/(*.h)")
]])
import("package.tools.xmake").install(package)
end)
on_test(function (package)
assert(package:has_cfuncs("nvgBeginFrame", {includes = "nanovg.h"}))
end)
|
--[[ 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 that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
]]
local tensor = require 'dmlab.system.tensor'
local api = {}
api._count = 0
api._observations = {
LOCATION = tensor.Tensor{10, 20, 30},
ORDER = tensor.ByteTensor(),
EPISODE = tensor.Tensor{0},
}
local models = {
cube = {
surfaces = {
cube_surface = {
vertices = tensor.FloatTensor{
{ -0.5, -0.5, -0.5, 0.0, 0.0, -1.0, 0.0, 0.0 },
{ 0.5, -0.5, -0.5, 0.0, 0.0, -1.0, 1.0, 0.0 },
{ 0.5, 0.5, -0.5, 0.0, 0.0, -1.0, 1.0, 1.0 },
{ -0.5, 0.5, -0.5, 0.0, 0.0, -1.0, 0.0, 1.0 },
{ 0.5, -0.5, -0.5, 1.0, 0.0, 0.0, 0.0, 0.0 },
{ 0.5, -0.5, 0.5, 1.0, 0.0, 0.0, 1.0, 0.0 },
{ 0.5, 0.5, 0.5, 1.0, 0.0, 0.0, 1.0, 1.0 },
{ 0.5, 0.5, -0.5, 1.0, 0.0, 0.0, 0.0, 1.0 },
{ 0.5, -0.5, 0.5, 0.0, 0.0, 1.0, 0.0, 0.0 },
{ -0.5, -0.5, 0.5, 0.0, 0.0, 1.0, 1.0, 0.0 },
{ -0.5, 0.5, 0.5, 0.0, 0.0, 1.0, 1.0, 1.0 },
{ 0.5, 0.5, 0.5, 0.0, 0.0, 1.0, 0.0, 1.0 },
{ -0.5, -0.5, 0.5, -1.0, 0.0, 0.0, 0.0, 0.0 },
{ -0.5, -0.5, -0.5, -1.0, 0.0, 0.0, 1.0, 0.0 },
{ -0.5, 0.5, -0.5, -1.0, 0.0, 0.0, 1.0, 1.0 },
{ -0.5, 0.5, 0.5, -1.0, 0.0, 0.0, 0.0, 1.0 },
{ -0.5, 0.5, -0.5, 0.0, 1.0, 0.0, 0.0, 0.0 },
{ 0.5, 0.5, -0.5, 0.0, 1.0, 0.0, 1.0, 0.0 },
{ 0.5, 0.5, 0.5, 0.0, 1.0, 0.0, 1.0, 1.0 },
{ -0.5, 0.5, 0.5, 0.0, 1.0, 0.0, 0.0, 1.0 },
{ 0.5, -0.5, -0.5, 0.0, -1.0, 0.0, 0.0, 0.0 },
{ -0.5, -0.5, -0.5, 0.0, -1.0, 0.0, 1.0, 0.0 },
{ -0.5, -0.5, 0.5, 0.0, -1.0, 0.0, 1.0, 1.0 },
{ 0.5, -0.5, 0.5, 0.0, -1.0, 0.0, 0.0, 1.0 }
},
indices = tensor.Int32Tensor{
{ 1, 2, 3 },
{ 1, 3, 4 },
{ 5, 6, 7 },
{ 5, 7, 8 },
{ 9, 10, 11 },
{ 9, 11, 12 },
{ 13, 14, 15 },
{ 13, 15, 16 },
{ 17, 18, 19 },
{ 17, 19, 20 },
{ 21, 22, 23 },
{ 21, 23, 24 }
},
shaderName = 'textures/model/beam'
}
}
}
}
function api:customObservationSpec()
return {
{name = 'LOCATION', type = 'Doubles', shape = {3}},
{name = 'ORDER', type = 'Bytes', shape = {0}},
{name = 'EPISODE', type = 'Doubles', shape = {1}},
}
end
function api:init(settings)
api._settings = settings
local order = settings.order or ''
api._observations.ORDER = tensor.ByteTensor{order:byte(1, -1)}
end
function api:customObservation(name)
return api._observations[name]
end
function api:start(episode, seed)
api._observations.EPISODE:val(episode)
end
function api:commandLine(oldCommandLine)
return oldCommandLine .. ' ' .. api._settings.command
end
function api:nextMap()
api._count = api._count + 1
return 'lt_chasm_' .. api._count
end
function api:createModel(modelName)
return models[modelName]
end
return api
|
object_tangible_storyteller_prop_pr_destroyed_transport_2 = object_tangible_storyteller_prop_shared_pr_destroyed_transport_2:new {
}
ObjectTemplates:addTemplate(object_tangible_storyteller_prop_pr_destroyed_transport_2, "object/tangible/storyteller/prop/pr_destroyed_transport_2.iff")
|
local cfg = {
applylistener = {}
}
cfg.config = {}
function cfg.select(key,value)
cfg.config[key] = value
end
function cfg.onApply(fn)
table.insert(cfg.applylistener,fn)
end
function cfg.winres (n)
local ww,wh = window.width(),window.height()
if (n) then
local r = {{640,480},{800,600},{1024,768},{1280,1024},{1600,1200}}
local w,h = unpack(r[n])
window.width(w)
window.height(h)
return
end
return cfg.config.winres or ({
[ww.."x"..wh] = 1,
["640x480"]=1,
["800x600"]=2,
["1024x768"]=3,
["1280x1024"]=4,
["1600x1200"]=5})[ww.."x"..wh]
end
function cfg.bpp(n)
if n then
window.bpp((n+1)*8)
return
end
return cfg.config.bpp or (window.bpp()/8-1)
end
function cfg.detail(n)
if n then return rendersystem.detail(n) end
return cfg.config.detail or rendersystem.detail()
end
function cfg.maxfps(n)
if n then return system.maxfps((n-1)*15) end
return cfg.config.maxfps or math.floor(system.maxfps()/15)+1
end
local function bool(name,fn)
assert(fn,"no valid function for: "..name)
cfg[name] = function (on)
if on ==nil then
if cfg.config[name]~=nil then
return cfg.config[name]
else
return fn()
end
end
fn(on)
end
end
function cfg.colordepth(n)
if not n then
return cfg.config.colordepth or
window.bpp()/8-1
else
window.bpp((n+1)*8)
end
end
function cfg.stencilbits(n)
if not n then
return cfg.config.stencilbits or
window.stencilbits()/8-1
else
window.stencilbits((n+1)*8)
end
end
function cfg.depthbits(n)
if not n then
return cfg.config.depthbits or
window.depthbits()/8-1
else
window.depthbits((n+1)*8)
end
end
function cfg.sounddevice(dev)
if not dev then
return cfg.config.sounddevice or sound.getdevicename()
else
cfg.config.sounddevice = sound.setdevice(dev)
end
end
function cfg.multisamples(n)
if not n then
local ms = window.multisamples()/2
return cfg.config.multisamples or (ms < 5 and ms+1 or 6)
else
window.multisamples( n < 6 and ((n-1)*2) or 16)
end
end
function cfg.vsynch(n)
if n==nil then
local ms = rendersystem.swapinterval() > 0
return cfg.config.vsynch or (ms)
else
rendersystem.swapinterval(n and 1 or 0)
end
end
bool("anisotropic",rendersystem.texanisotropic)
bool("fullscreen",window.fullscreen)
bool("texcompression",rendersystem.texcompression)
bool("usevbos",rendersystem.usevbos)
bool("nosound",system.nosound)
bool("nodefaultgpuprogs",rendersystem.nodefaultgpuprogs)
bool("noglextensions",rendersystem.noglextensions)
local function registerDraw(name)
assert(render["draw"..name],"no valid function found: "..name)
bool("draw"..name,render["draw"..name])
return registerDraw
end
registerDraw "all" "axis" "bonelimits" "bonenames" "lights" "camaxis"
"fps" "nogui" "stats" "normals" "projectors" "shadowvolumes" "stencilbuffer"
"wire"
function cfg.drawpgraph(n)
if (n==nil) then
local gs = {}
local ms = false
for name,v in pairs(pgraph) do
if (name:match("get(.+)")) then
if (v():draw()) then
ms = true
break
end
end
end
return cfg.config.drawpgraph or (ms)
else
pgraph.draw(n)
end
end
function cfg.apply()
saveprojecthistory()
for i,fn in ipairs(cfg.applylistener) do
fn()
end
for name,val in pairs(cfg.config) do
cfg[name](val)
end
--local x,y = window.pos()
window.update()
--window.pos(x,y)
MouseCursor.showMouse(true)
end
return cfg
|
FadeToBlack({{Tale_Action_FadeTime}})
|
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include( "shared.lua" )
function ENT:Initialize()
self.Entity:SetModel( "models/Items/grenadeAmmo.mdl" )
self.Entity:PhysicsInit( SOLID_VPHYSICS )
self.Entity:SetMoveType( MOVETYPE_VPHYSICS )
self.Entity:SetSolid( SOLID_VPHYSICS )
local phys = self.Entity:GetPhysicsObject()
if phys:IsValid() then
phys:Wake()
end
timer.Simple(2, function() self:Explode() end)
util.SpriteTrail(self, 0, team.GetColor(self.LastHolder:Team()), false, 4, 4, 0.5, 1, "trails/plasma.vmt")
self:SetCollisionGroup(COLLISION_GROUP_NONE)
end
function ENT:Explode()
if !self then return end
local attacker = self.LastHolder
if !IsValid(attacker) then
attacker = self
end
local height, entpos, dis;
local pos = self.Entity:GetPos()
local others = ents.FindInSphere( self.Entity:GetPos(), 175 )
for _, ent in pairs( others ) do
height = 0
if IsValid(ent) then
height = 50
width = 10
if ent:IsPlayer() then
entpos = ent:GetPos()+Vector(0,0,height)
else
entpos = ent:GetPos()
end
dis = entpos:Distance(pos)
local trace = { start = pos, endpos = entpos, filter = self.Entity }
local tr = util.TraceLine( trace )
if tr.Entity == ent and tr.Entity:IsPlayer() then
if self.LastHolder == tr.Entity then
if dis <= 175 and dis >= 35 then
ent:TakeDamage( 210-dis, self )
elseif dis < 35 then
ent:TakeDamage(175, self)
end
else
if dis <= (200+width) and dis >= (50+width) then
ent:TakeDamage( (250+width)-dis, attacker )
elseif dis < (50+width) then
ent:TakeDamage(200, attacker)
end
end
elseif tr.Entity == ent then
ent:TakeDamage( ((300-dis)/300)*275 , self.LastHolder )
end
end
end
local effectdata = EffectData()
effectdata:SetStart( pos )
effectdata:SetOrigin( pos )
effectdata:SetScale( 8 )
util.Effect( "Explosion", effectdata )
self:Remove()
end
function ENT:UpdateTransmitState()
return TRANSMIT_ALWAYS
end
function ENT:OnTakeDamage(dmginfo)
end
|
-- https://github.com/glepnir/lspsaga.nvim
require'lspsaga'.init_lsp_saga {
use_saga_diagnostic_sign = true,
error_sign = '',
warn_sign = '',
hint_sign = '',
infor_sign = '',
dianostic_header_icon = ' ',
code_action_icon = ' ',
code_action_prompt = {
enable = true,
sign = true,
sign_priority = 20,
virtual_text = true,
},
finder_definition_icon = ' ',
finder_reference_icon = ' ',
-- preview lines of lsp_finder and definition preview
max_preview_lines = 50,
finder_action_keys = {
open = 'o',
vsplit = 'v',
split = 's',
quit = 'q',
scroll_down = '<C-f>',
scroll_up = '<C-b>',
},
code_action_keys = {
quit = 'q',
exec = '<CR>',
},
rename_action_keys = {
quit = '<C-c>',
exec = '<CR>',
},
definition_preview_icon = ' ',
-- 'single' 'double' 'round' 'plus'
border_style = 'single',
rename_prompt_prefix = '➤',
}
local nvim_set_keymap = vim.api.nvim_set_keymap
local opts = {noremap = true, silent = true}
-- Async Lsp Finder
nvim_set_keymap('n', 'gh', ':Lspsaga lsp_finder<CR>', opts)
-- Code Action
nvim_set_keymap('n', '<leader>ca', ':Lspsaga code_action<CR>', opts)
nvim_set_keymap('v', '<leader>ca', ':<C-U>Lspsaga range_code_action<CR>', opts)
-- Hover Doc
nvim_set_keymap('n', 'K', ':Lspsaga hover_doc<CR>', opts)
-- Smart Scroll
nvim_set_keymap('n', '<C-f>', '<cmd>lua require(\'lspsaga.action\').smart_scroll_with_saga(1)<CR>', opts)
nvim_set_keymap('n', '<C-b>', '<cmd>lua require(\'lspsaga.action\').smart_scroll_with_saga(-1)<CR>', opts)
-- SignatureHelp
nvim_set_keymap('n', 'gs', ':Lspsaga signature_help<CR>', opts)
-- Jump Diagnostic and Show Diagnostics
nvim_set_keymap('n', '<leader>cd', ':Lspsaga show_line_diagnostics<CR>', opts)
nvim_set_keymap('n', '<leader>cc', '<cmd>lua require\'lspsaga.diagnostic\'.show_cursor_diagnostics()<CR>', opts)
nvim_set_keymap('n', '[d', ':Lspsaga diagnostic_jump_prev<CR>', opts)
nvim_set_keymap('n', ']d', ':Lspsaga diagnostic_jump_next<CR>', opts)
|
local cjson = require("cjson")
local M = {}
local function parseFilters(csvFilters)
local filters = {}
if (not (csvFilters == nil)) then
for pattern in string.gmatch(csvFilters, "[^,]+") do
table.insert(filters, pattern)
end
end
return filters
end
function M.get_options(config, ngx)
-- check to see if override is provided
local discovery = config.discovery
if type(config.discovery_override) == "table" and config.discovery_override.authorization_endpoint then
discovery = config.discovery_override
end
-- return TWO separate values as we don't want to pollute opts.session
return {
client_id = config.client_id,
client_secret = config.client_secret,
discovery = discovery,
introspection_endpoint = config.introspection_endpoint,
timeout = config.timeout,
introspection_endpoint_auth_method = config.introspection_endpoint_auth_method,
bearer_only = config.bearer_only,
realm = config.realm,
redirect_uri = config.redirect_uri,
redirect_uri_scheme = config.redirect_uri_scheme,
scope = config.scope,
prompt = config.prompt,
response_type = config.response_type,
ssl_verify = config.ssl_verify,
token_endpoint_auth_method = config.token_endpoint_auth_method,
recovery_page_path = config.recovery_page_path,
filters = parseFilters(config.filters),
logout_path = config.logout_path,
redirect_after_logout_uri = config.redirect_after_logout_uri,
}, config.session
end
function M.exit(httpStatusCode, message, ngxCode)
ngx.status = httpStatusCode
ngx.say(message)
ngx.exit(ngxCode)
end
function M.injectAccessToken(accessToken)
ngx.req.set_header("X-Access-Token", accessToken)
end
function M.injectIDToken(idToken)
local tokenStr = cjson.encode(idToken)
ngx.req.set_header("X-ID-Token", ngx.encode_base64(tokenStr))
end
function M.injectUser(user)
local tmp_user = user
tmp_user.id = user.sub
tmp_user.username = user.preferred_username
ngx.ctx.authenticated_credential = tmp_user
local userinfo = cjson.encode(user)
ngx.req.set_header("X-Userinfo", ngx.encode_base64(userinfo))
end
function M.has_bearer_access_token()
local header = ngx.req.get_headers()['Authorization']
if header and header:find(" ") then
local divider = header:find(' ')
if string.lower(header:sub(0, divider-1)) == string.lower("Bearer") then
return true
end
end
return false
end
return M
|
-- Skype mega-caller Hammerspoon.
local cac = {"cmd", "shift"}
-- hs.eventtap.keyStroke(cac, "r")
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "J", function ()
while (true)
do
hs.eventtap.keyStroke(cac, "r")
hs.eventtap.keyStroke(cac, "h")
end
end)
|
--[[
Cloud Manager API
This API allows access to Cloud Manager programs, pipelines, and environments by an authorized technical account created through the Adobe I/O Console. The base url for this API is https://cloudmanager.adobe.io, e.g. to get the list of programs for an organization, you would make a GET request to https://cloudmanager.adobe.io/api/programs (with the correct set of headers as described below). This swagger file can be downloaded from https://raw.githubusercontent.com/AdobeDocs/cloudmanager-api-docs/master/swagger-specs/api.yaml.
The version of the OpenAPI document: 1.0.0
Contact: opensource@shinesolutions.com
Generated by: https://openapi-generator.tech
]]
-- branch_list class
local branch_list = {}
local branch_list_mt = {
__name = "branch_list";
__index = branch_list;
}
local function cast_branch_list(t)
return setmetatable(t, branch_list_mt)
end
local function new_branch_list(_total_number_of_items, _embedded, _links)
return cast_branch_list({
["_totalNumberOfItems"] = _total_number_of_items;
["_embedded"] = _embedded;
["_links"] = _links;
})
end
return {
cast = cast_branch_list;
new = new_branch_list;
}
|
--[[
Gamepad Character Control - This module handles controlling your avatar using a game console-style controller
2018 PlayerScripts Update - AllYourBlox
--]]
local UserInputService = game:GetService("UserInputService")
local ContextActionService = game:GetService("ContextActionService")
--[[ Constants ]]--
local ZERO_VECTOR3 = Vector3.new(0,0,0)
local NONE = Enum.UserInputType.None
local thumbstickDeadzone = 0.2
--[[ The Module ]]--
local BaseCharacterController = require(script.Parent:WaitForChild("BaseCharacterController"))
local Gamepad = setmetatable({}, BaseCharacterController)
Gamepad.__index = Gamepad
local bindAtPriorityFlagExists, bindAtPriorityFlagEnabled = pcall(function()
return UserSettings():IsUserFeatureEnabled("UserPlayerScriptsBindAtPriority2")
end)
local FFlagPlayerScriptsBindAtPriority2 = bindAtPriorityFlagExists and bindAtPriorityFlagEnabled
function Gamepad.new(CONTROL_ACTION_PRIORITY)
local self = setmetatable(BaseCharacterController.new(), Gamepad)
self.CONTROL_ACTION_PRIORITY = CONTROL_ACTION_PRIORITY
self.forwardValue = 0
self.backwardValue = 0
self.leftValue = 0
self.rightValue = 0
self.activeGamepad = NONE -- Enum.UserInputType.Gamepad1, 2, 3...
self.gamepadConnectedConn = nil
self.gamepadDisconnectedConn = nil
return self
end
function Gamepad:Enable(enable)
if not UserInputService.GamepadEnabled then
return false
end
if enable == self.enabled then
-- Module is already in the state being requested. True is returned here since the module will be in the state
-- expected by the code that follows the Enable() call. This makes more sense than returning false to indicate
-- no action was necessary. False indicates failure to be in requested/expected state.
return true
end
self.forwardValue = 0
self.backwardValue = 0
self.leftValue = 0
self.rightValue = 0
self.moveVector = ZERO_VECTOR3
self.isJumping = false
if enable then
self.activeGamepad = self:GetHighestPriorityGamepad()
if self.activeGamepad ~= NONE then
self:BindContextActions()
self:ConnectGamepadConnectionListeners()
else
-- No connected gamepads, failure to enable
return false
end
else
self:UnbindContextActions()
self:DisconnectGamepadConnectionListeners()
self.activeGamepad = NONE
end
self.enabled = enable
return true
end
-- This function selects the lowest number gamepad from the currently-connected gamepad
-- and sets it as the active gamepad
function Gamepad:GetHighestPriorityGamepad()
local connectedGamepads = UserInputService:GetConnectedGamepads()
local bestGamepad = NONE -- Note that this value is higher than all valid gamepad values
for _, gamepad in pairs(connectedGamepads) do
if gamepad.Value < bestGamepad.Value then
bestGamepad = gamepad
end
end
return bestGamepad
end
function Gamepad:BindContextActions()
if self.activeGamepad == NONE then
-- There must be an active gamepad to set up bindings
return false
end
local updateMovement = function(inputState)
if inputState == Enum.UserInputState.Cancel then
self.moveVector = ZERO_VECTOR3
else
self.moveVector = Vector3.new(self.leftValue + self.rightValue, 0, self.forwardValue + self.backwardValue)
end
end
-- Note: In the previous version of this code, the movement values were not zeroed-out on UserInputState. Cancel, now they are,
-- which fixes them from getting stuck on.
local handleMoveForward = function(actionName, inputState, inputObject)
self.forwardValue = (inputState == Enum.UserInputState.Begin) and -1 or 0
updateMovement(inputState)
end
local handleMoveBackward = function(actionName, inputState, inputObject)
self.backwardValue = (inputState == Enum.UserInputState.Begin) and 1 or 0
updateMovement(inputState)
end
local handleMoveLeft = function(actionName, inputState, inputObject)
self.leftValue = (inputState == Enum.UserInputState.Begin) and -1 or 0
updateMovement(inputState)
end
local handleMoveRight = function(actionName, inputState, inputObject)
self.rightValue = (inputState == Enum.UserInputState.Begin) and 1 or 0
updateMovement(inputState)
end
local handleJumpAction = function(actionName, inputState, inputObject)
self.isJumping = (inputState == Enum.UserInputState.Begin)
if FFlagPlayerScriptsBindAtPriority2 then
return Enum.ContextActionResult.Sink
end
end
local handleThumbstickInput = function(actionName, inputState, inputObject)
if inputState == Enum.UserInputState.Cancel then
self.moveVector = ZERO_VECTOR3
return FFlagPlayerScriptsBindAtPriority2 and Enum.ContextActionResult.Sink or nil
end
if self.activeGamepad ~= inputObject.UserInputType then
return FFlagPlayerScriptsBindAtPriority2 and Enum.ContextActionResult.Pass or nil
end
if inputObject.KeyCode ~= Enum.KeyCode.Thumbstick1 then return end
if inputObject.Position.magnitude > thumbstickDeadzone then
self.moveVector = Vector3.new(inputObject.Position.X, 0, -inputObject.Position.Y)
else
self.moveVector = ZERO_VECTOR3
end
if FFlagPlayerScriptsBindAtPriority2 then
return Enum.ContextActionResult.Sink
end
end
ContextActionService:BindActivate(self.activeGamepad, Enum.KeyCode.ButtonR2)
if FFlagPlayerScriptsBindAtPriority2 then
ContextActionService:BindActionAtPriority("jumpAction", handleJumpAction, false,
self.CONTROL_ACTION_PRIORITY, Enum.KeyCode.ButtonA)
ContextActionService:BindActionAtPriority("moveThumbstick", handleThumbstickInput, false,
self.CONTROL_ACTION_PRIORITY, Enum.KeyCode.Thumbstick1)
else
ContextActionService:BindAction("jumpAction",handleJumpAction, false, Enum.KeyCode.ButtonA)
ContextActionService:BindAction("moveThumbstick",handleThumbstickInput, false, Enum.KeyCode.Thumbstick1)
end
return true
end
function Gamepad:UnbindContextActions()
if self.activeGamepad ~= NONE then
ContextActionService:UnbindActivate(self.activeGamepad, Enum.KeyCode.ButtonR2)
end
ContextActionService:UnbindAction("moveThumbstick")
ContextActionService:UnbindAction("jumpAction")
end
function Gamepad:OnNewGamepadConnected()
-- A new gamepad has been connected.
local bestGamepad = self:GetHighestPriorityGamepad()
if bestGamepad == self.activeGamepad then
-- A new gamepad was connected, but our active gamepad is not changing
return
end
if bestGamepad == NONE then
-- There should be an active gamepad when GamepadConnected fires, so this should not
-- normally be hit. If there is no active gamepad, unbind actions but leave
-- the module enabled and continue to listen for a new gamepad connection.
warn("Gamepad:OnNewGamepadConnected found no connected gamepads")
self:UnbindContextActions()
return
end
if self.activeGamepad ~= NONE then
-- Switching from one active gamepad to another
self:UnbindContextActions()
end
self.activeGamepad = bestGamepad
self:BindContextActions()
end
function Gamepad:OnCurrentGamepadDisconnected()
if self.activeGamepad ~= NONE then
ContextActionService:UnbindActivate(self.activeGamepad, Enum.KeyCode.ButtonR2)
end
local bestGamepad = self:GetHighestPriorityGamepad()
if self.activeGamepad ~= NONE and bestGamepad == self.activeGamepad then
warn("Gamepad:OnCurrentGamepadDisconnected found the supposedly disconnected gamepad in connectedGamepads.")
self:UnbindContextActions()
self.activeGamepad = NONE
return
end
if bestGamepad == NONE then
-- No active gamepad, unbinding actions but leaving gamepad connection listener active
self:UnbindContextActions()
self.activeGamepad = NONE
else
-- Set new gamepad as active and bind to tool activation
self.activeGamepad = bestGamepad
ContextActionService:BindActivate(self.activeGamepad, Enum.KeyCode.ButtonR2)
end
end
function Gamepad:ConnectGamepadConnectionListeners()
self.gamepadConnectedConn = UserInputService.GamepadConnected:Connect(function(gamepadEnum)
self:OnNewGamepadConnected()
end)
self.gamepadDisconnectedConn = UserInputService.GamepadDisconnected:Connect(function(gamepadEnum)
if self.activeGamepad == gamepadEnum then
self:OnCurrentGamepadDisconnected()
end
end)
end
function Gamepad:DisconnectGamepadConnectionListeners()
if self.gamepadConnectedConn then
self.gamepadConnectedConn:Disconnect()
self.gamepadConnectedConn = nil
end
if self.gamepadDisconnectedConn then
self.gamepadDisconnectedConn:Disconnect()
self.gamepadDisconnectedConn = nil
end
end
return Gamepad
|
-- Require Gui.lua from the same folder.
return require(((".".. ...):gsub("%.init$", "")..".Gui"):sub(2))
|
-- Config.lua
-- Implements the configuration for the plugin
--- The configuration object
g_Config = {}
--- Name of the config file
local CONFIG_FILE = "LastSeen.cfg"
--- Checks if a_Config has all the keys it needs, adds defaults for the missing ones
-- Returns the corrected configuration (but changes the one in the parameter as well)
local function VerifyConfig(a_Config)
-- Insert defaults:
a_Config.DefaultCfg = a_Config.DefaultCfg or "all"
return a_Config
end
--- Initializes the g_Config from the config file, if available
function InitConfig()
-- Check if the file exists
if not(cFile:IsFile(CONFIG_FILE)) then
-- Copy our example config file to the folder, to let the admin know the format:
local PluginFolder = cPluginManager:Get():GetCurrentPlugin():GetLocalFolder()
local ExampleFile = CONFIG_FILE:gsub(".cfg", ".example.cfg")
cFile:Copy(PluginFolder .. "/example.cfg", ExampleFile)
LOGWARNING(PLUGIN_PREFIX .. "The config file '" .. CONFIG_FILE .. "' doesn't exist. An example configuration file '"
.. ExampleFile .. "' has been created for you. Rename this file to " .. CONFIG_FILE .. " and edit it to your liking."
)
g_Config = VerifyConfig({})
return
end
-- Load and compile the config file:
local cfg, err = loadfile(CONFIG_FILE)
if not(cfg) then
LOGWARNING(PLUGIN_PREFIX .. "Cannot load config file '" .. CONFIG_FILE .. "': " .. err)
g_Config = VerifyConfig({})
return
end
-- Execute the loaded file in a sandbox:
-- This is Lua-5.1-specific and won't work in Lua 5.2!
local Sandbox = {}
setfenv(cfg, Sandbox)
cfg()
-- Retrieve the values we want from the sandbox:
local Config = Sandbox.Config
if not(Config) then
LOGWARNING(PLUGIN_PREFIX .. "Config not found in the config file '" .. CONFIG_FILE .. "'. Using defaults.")
Config = {} -- Defaults will be inserted by VerifyConfig()
end
g_Config = VerifyConfig(Config)
end
|
--[[-------------------------------------------------------------------------
CreateCollections.lua
Replicates keyword hierarchy under the `rootKeywordName` into set of
collections under `rootCollectionSetName`
---------------------------------------------------------------------------]]
-- Set the names of root keyword and root collection set - can be edited to taste
local rootCollectionSetName = '_Keyword Collections'
local rootKeywordName = "_Keywords To Become Collections"
-- Import the Lightroom SDK namespaces.
local LrApplication = import 'LrApplication'
local LrDialogs = import 'LrDialogs'
local LrLogger = import 'LrLogger'
local LrTasks = import 'LrTasks'
-- Set up the logger
local logger = LrLogger('AkrabatCollectionCreator')
logger:enable("print") -- set to "logfile" to write to ~/Documents/lrClassicLogs/AkrabatCollectionCreator.log
local log = logger:quickf('info')
--[[
Recursively process a set of keywords and add collections/collection sets as appropriate
For each keyword:
- if it has children, create a collection set and then recursively call this function with the
child keywords
- if it has no children, then create an collection and add all photos with this keyword to it
]]
local function processKeywords(parentSet, keywords, sprefix)
local catalog = LrApplication.activeCatalog()
for _,keyword in ipairs(keywords) do
local name = keyword:getName()
log(" %s>%s", sprefix, name)
local children = keyword:getChildren()
if #children > 0 then
-- we have children, so we need to create a collection set
log(" Creating collection set %q (if it doesn't exist)", name)
local collectionSet = catalog:createCollectionSet(name, parentSet, true)
-- recursively process the child keywords of this keyword
processKeywords(collectionSet, keyword:getChildren(), sprefix .. ">" .. name)
else
-- no children, so we need to create an album
log(" Creating collection %q (if it doesn't exist)", name)
local collection = catalog:createCollection(name, parentSet, true)
log(" Adding photos to collection %q", name)
collection:addPhotos(keyword:getPhotos())
end
end
end
--[[
This is the entry point function that's called when the Lightroom menu item is selected
]]
local function main ()
log(" Starting")
local catalog = LrApplication.activeCatalog()
local rootSet = nil
local rootKeyword = nil
-- Create the root collection set and root keyword if they don't exist
catalog:withWriteAccessDo("Create root collection set and keyword", function()
rootSet = catalog:createCollectionSet(rootCollectionSetName, nil, true)
log(" Created root collection set %q (if it didn't exist)", rootCollectionSetName)
rootKeyword = catalog:createKeyword(rootKeywordName, {}, false, nil, true)
log(" Created root keyword %q (if it didn't exist)", rootKeywordName)
end)
-- Create collections from child keywords of the root keyword
catalog:withWriteAccessDo("Create collections from keywords", function()
local childKeywords = rootKeyword:getChildren()
if #childKeywords >0 then
-- Process the child keywords (and their children) and create collections under rootSet
processKeywords(rootSet, rootKeyword:getChildren(), "")
LrDialogs.message("Collection Creator", "Collection sets and collections created", "info")
else
local msg = string.format("No keywords under %q to be converted to collections", rootKeywordName)
log(msg)
LrDialogs.message("Collection Creator", msg, "warning")
end
log(" Finished")
end)
end
-- Run main()
LrTasks.startAsyncTask(main)
|
Wifi = {};
function Wifi.connect(ssid, pass)
local sta_config = {
ssid = ssid,
pass = pass,
save = false,
};
wifi.setmode(wifi.STATION);
return wifi.sta.config(sta_config);
end
function Wifi.disconnect()
wifi.sta.disconnect();
end
return Wifi;
|
--[[
Pythagoras.lua
version: 18.01.11
Copyright (C) 2018 Jeroen P. Broks
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
]]
local function distancebyPythagoras(x1,y1,x2,y2)
local side1=math.abs(x1-x2)
local side2=math.abs(y1-y2)
local hypothenusa = (side1^2)+(side2^2)
return math.sqrt(hypothenusa)
end
return distancebyPythagoras
--[[ This routine uses the Pythogean Theorism. >> https://en.wikipedia.org/wiki/Pythagorean_theorem
The theorism was named after the Greek scientist and philosopher Pythagoras, who was very likely
the first one who delivered evidence the theorism worked.
And that's why I named this library Pythagoras in his honor. ;)
]]
|
-- bindings in this file are prioritized over the default bindings
-- if you need help, check out the documentation https://gwatcha.github.io/reaper-keys/configuration/bindings.html
-- check out the ./defaults directory to see examples
return {
global = {
timeline_motion = {},
timeline_operator = {},
timeline_selector = {},
visual_timeline_command = {},
command = {}
},
main = {
track_motion = {},
visual_track_command = {},
track_selector = {},
track_operator = {},
timeline_operator = {},
timeline_selector = {},
timeline_motion = {},
command = {},
},
midi = {
timeline_selector = {},
timeline_operator = {},
timeline_motion = {},
command = {},
},
}
|
--[[
Copyright (c) 2018, Vsevolod Stakhov <vsevolod@highsecure.ru>
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 or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
]]--
local argparse = require "argparse"
-- Define command line options
local parser = argparse()
:name "rspamadm grep"
:description "Search for patterns in rspamd logs"
:help_description_margin(30)
parser:mutex(
parser:option "-s --string"
:description('Plain string to search (case-insensitive)')
:argname "<str>",
parser:option "-p --pattern"
:description('Pattern to search for (regex)')
:argname "<re>"
)
parser:flag "-l --lua"
:description('Use Lua patterns in string search')
parser:argument "input":args "*"
:description('Process specified inputs')
:default("stdin")
parser:flag "-S --sensitive"
:description('Enable case-sensitivity in string search')
parser:flag "-o --orphans"
:description('Print orphaned logs')
parser:flag "-P --partial"
:description('Print partial logs')
local function handler(args)
local rspamd_regexp = require 'rspamd_regexp'
local res = parser:parse(args)
if not res['string'] and not res['pattern'] then
parser:error('string or pattern options must be specified')
end
if res['string'] and res['pattern'] then
parser:error('string and pattern options are mutually exclusive')
end
local buffer = {}
local matches = {}
local pattern = res['pattern']
local re
if pattern then
re = rspamd_regexp.create(pattern)
if not re then
io.stderr:write("Couldn't compile regex: " .. pattern .. '\n')
os.exit(1)
end
end
local plainm = true
if res['lua'] then
plainm = false
end
local orphans = res['orphans']
local search_str = res['string']
local sensitive = res['sensitive']
local partial = res['partial']
if search_str and not sensitive then
search_str = string.lower(search_str)
end
local inputs = res['input'] or {'stdin'}
for _, n in ipairs(inputs) do
local h, err
if string.match(n, '%.xz$') then
h, err = io.popen('xzcat ' .. n, 'r')
elseif string.match(n, '%.bz2$') then
h, err = io.popen('bzcat ' .. n, 'r')
elseif string.match(n, '%.gz$') then
h, err = io.popen('zcat ' .. n, 'r')
elseif n == 'stdin' then
h = io.input()
else
h, err = io.open(n, 'r')
end
if not h then
if err then
io.stderr:write("Couldn't open file (" .. n .. '): ' .. err .. '\n')
else
io.stderr:write("Couldn't open file (" .. n .. '): no error\n')
end
else
for line in h:lines() do
local hash = string.match(line, '<(%x+)>')
local already_matching = false
if hash then
if matches[hash] then
table.insert(matches[hash], line)
already_matching = true
else
if buffer[hash] then
table.insert(buffer[hash], line)
else
buffer[hash] = {line}
end
end
end
local ismatch = false
if re then
ismatch = re:match(line)
elseif sensitive and search_str then
ismatch = string.find(line, search_str, 1, plainm)
elseif search_str then
local lwr = string.lower(line)
ismatch = string.find(lwr, search_str, 1, plainm)
end
if ismatch then
if not hash then
if orphans then
print('*** orphaned ***')
print(line)
print()
end
elseif not already_matching then
matches[hash] = buffer[hash]
end
end
local is_end = string.match(line, '<%x+>; task; rspamd_protocol_http_reply:')
if is_end then
buffer[hash] = nil
if matches[hash] then
for _, v in ipairs(matches[hash]) do
print(v)
end
print()
matches[hash] = nil
end
end
end
if partial then
for k, v in pairs(matches) do
print('*** partial ***')
for _, vv in ipairs(v) do
print(vv)
end
print()
matches[k] = nil
end
else
matches = {}
end
end
end
end
return {
handler = handler,
description = parser._description,
name = 'grep'
}
|
local config = ...
if not config.delete then addToConfig('delete', nil, {}) end
local deleteTrigger = config.delete.trigger or addToConfig('delete', 'trigger', 'ой')
local deleteTriggerAll = config.delete.triggerAll or addToConfig('delete', 'triggerAll', '/delall')
local deleteEditTo = config.delete.editTo or addToConfig('delete', 'editTo', 'ᅠ')
local obj = {}
-- Main function
function obj.func(msg)
if(msg.out and (msg.body:lower():find('^' .. deleteTrigger ..'([%-0-9]*)$') or msg.body:lower():find('^' .. deleteTriggerAll ..'([%-0-9]*)$'))) then
local res, num, isEdit, i = vk.call('messages.getHistory', { peer_id = msg.peer_id, count = 150 }, true), nil, 'false', 1
if res.items == nil or res.count == 0 then return end
if msg.body:lower():find('^' .. deleteTriggerAll .. '([%-0-9]*)$') then num = 150
else num = msg.body:lower():match('^' .. deleteTrigger .. '([%-0-9]+)$') end
num = tonumber(num == '-' and -1 or num) or 1
if num < 0 then isEdit = 'true' num = num * -1 end
local idsToDel = {tonumber(msg.id)}
while(#idsToDel <= num + 1 and i <= #res.items) do
if res.items[i].out == 1 then table.insert(idsToDel, res.items[i].id) end
i = i + 1
end
idsToDel = table.concat(idsToDel, ',')
if isEdit == 'true' then
local code = [[ var arr = [%s], i = 1; while(i < arr.length) { if(arr[i] != %s) API.messages.edit({ peer_id: %s, message_id: arr[i], message: '%s' }); i = i + 1; } ]]
code = code:format(idsToDel, msg.id, msg.peer_id, deleteEditTo);
vk.call('execute', { code = code })
end
vk.call('messages.delete', { delete_for_all = '1', message_ids = idsToDel })
end
end
return obj
|
_AMD_SAMPLE_NAME = "HelloD3D12"
dofile ("../../premake/amd_premake_util.lua")
workspace (_AMD_SAMPLE_NAME)
configurations { "Debug", "Release" }
platforms { "x64" }
location "../build"
filename (_AMD_SAMPLE_NAME .. _AMD_VS_SUFFIX)
startproject (_AMD_SAMPLE_NAME)
filter "platforms:x64"
system "Windows"
architecture "x64"
project (_AMD_SAMPLE_NAME)
kind "WindowedApp"
language "C++"
location "../build"
filename (_AMD_SAMPLE_NAME .. _AMD_VS_SUFFIX)
uuid "3F3B938C-ABC6-0051-B4D7-834520E25C51"
targetdir "../bin"
objdir "../build/%{_AMD_SAMPLE_DIR_LAYOUT}"
warnings "Extra"
floatingpoint "Fast"
-- Specify WindowsTargetPlatformVersion here for VS2015
windowstarget (_AMD_WIN_SDK_VERSION)
files { "../src/**.h", "../src/**.cpp" }
links { "d3dcompiler", "dxguid", "d3d12", "dxgi" }
defines { "_CRT_SECURE_NO_WARNINGS" }
filter "configurations:Debug"
defines { "WIN32", "_DEBUG", "DEBUG", "_WINDOWS" }
flags { "Symbols", "FatalWarnings", "Unicode", "WinMain" }
targetsuffix ("_Debug" .. _AMD_VS_SUFFIX)
filter "configurations:Release"
defines { "WIN32", "NDEBUG", "PROFILE", "_WINDOWS" }
flags { "LinkTimeOptimization", "Symbols", "FatalWarnings", "Unicode", "WinMain" }
targetsuffix ("_Release" .. _AMD_VS_SUFFIX)
optimize "On"
|
------------------------------------------------------------------------------
-- GLBackgroundBox class
------------------------------------------------------------------------------
local ctrl = {
nick = "glbackgroundbox",
parent = iup.BOX,
include = "iupgl.h",
subdir = "ctrl",
creation = "I",
funcname = "GLBackgroundBox",
callback = {
action = "ff",
}
}
function ctrl.createElement(class, param)
return iup.GLBackgroundBox()
end
iup.RegisterWidget(ctrl)
iup.SetClass(ctrl, "iupWidget")
|
--[[
Title: DemoEntity
Author(s):
Date:
Desc:
use the lib:
------------------------------------------------------------
NPL.load("(gl)Mod/Test/DemoEntity.lua");
local DemoEntity = commonlib.gettable("Mod.Test.DemoEntity");
------------------------------------------------------------
]]
local DemoEntity = commonlib.inherit(nil,commonlib.gettable("Mod.Test.DemoEntity"));
function DemoEntity:ctor()
end
function DemoEntity:init()
LOG.std(nil, "info", "DemoEntity", "init");
end
|
--[[
desc: Fury, A buff.
author: SkyFvcker
since: 2018-9-18
alter: 2019-3-31
]]--
local _ATTRIBUTE = require("actor.service.attribute")
local _SOUND = require("lib.sound")
local _RESMGR = require("actor.resmgr")
local _Color = require("graphics.drawunit.color")
local _Tweener = require("util.gear.tweener")
local _Base = require("actor.buff.base")
---@class Actor.Buff.Fury : Actor.Buff
---@field protected _colorTime int
---@field protected _colorTweener Util.Gear.MockTweener
---@field protected _color Graphics.Drawunit.Color
---@field protected _soundData SoundData
---@field protected _rate number
local _Fury = require("core.class")(_Base)
function _Fury.HandleData(data)
data.soundData = _RESMGR.GetSoundData(data.sound)
end
---@param entity Actor.Entity
---@param data Actor.RESMGR.BuffData
---@return boolean
function _Fury.CanNew(entity, data)
return _Base.CanNew(entity, data) and entity.ais
end
function _Fury:Ctor(entity, data)
_Base.Ctor(self, entity, data)
self._colorTime = data.colorTime
self._soundData = data.soundData
self._color = _Color.New(data.color.red, data.color.green, data.color.blue, data.color.alpha)
self._colorTweener = _Tweener.New(entity.aspect.pureColor)
self._colorTweener:Enter(self._colorTime, self._color)
self._rate = data.value or 1
local useSkill = entity.ais and entity.ais.container:Get("useSkill") ---@type Actor.Ai.UseSkill
local searchMove = entity.ais and entity.ais.container:Get("searchMove") ---@type Actor.Ai.SearchMove
if (useSkill) then
useSkill.coolDownTimeSection.x = math.floor(useSkill.coolDownTimeSection.x * self._rate)
useSkill.coolDownTimeSection.y = math.floor(useSkill.coolDownTimeSection.y * self._rate)
useSkill.judgeTimeSection.x = math.floor(useSkill.judgeTimeSection.x * self._rate)
useSkill.judgeTimeSection.y = math.floor(useSkill.judgeTimeSection.y * self._rate)
end
if (searchMove) then
searchMove.intervalSection.x = math.floor(searchMove.intervalSection.x * self._rate)
searchMove.intervalSection.y = math.floor(searchMove.intervalSection.y * self._rate)
end
_SOUND.Play(self._soundData)
end
function _Fury:OnUpdate(dt)
if (not self._entity.identity.isPaused) then
self._colorTweener:Update(dt)
if (not self._colorTweener.isRunning) then
self._colorTweener:Enter(self._colorTime, self._color)
end
elseif (self._colorTweener.isRunning) then
self._colorTweener:Exit()
end
end
function _Fury:Exit()
if (_Base.Exit(self)) then
local useSkill = self._entity.ais and self._entity.ais.container:Get("useSkill") ---@type Actor.Ai.UseSkill
local searchMove = self._entity.ais and self._entity.ais.container:Get("searchMove") ---@type Actor.Ai.SearchMove
if (useSkill) then
useSkill.coolDownTimeSection.x = math.floor(useSkill.coolDownTimeSection.x / self._rate)
useSkill.coolDownTimeSection.y = math.floor(useSkill.coolDownTimeSection.y / self._rate)
useSkill.judgeTimeSection.x = math.floor(useSkill.judgeTimeSection.x / self._rate)
useSkill.judgeTimeSection.y = math.floor(useSkill.judgeTimeSection.y / self._rate)
end
if (searchMove) then
searchMove.intervalSection.x = math.floor(searchMove.intervalSection.x / self._rate)
searchMove.intervalSection.y = math.floor(searchMove.intervalSection.y / self._rate)
end
end
end
return _Fury
|
require('plugins.quick-scope.variables')
|
local Root = script.Parent.Parent
local PurchaseError = require(Root.Enums.PurchaseError)
local Promise = require(Root.Promise)
local GetFFlagNewEconomyDeveloperProductUrl = require(Root.Flags.GetFFlagNewEconomyDeveloperProductUrl)
local function performPurchase(network, infoType, productId, expectedPrice, requestId, isRobloxPurchase)
return network.performPurchase(infoType, productId, expectedPrice, requestId, isRobloxPurchase)
:andThen(function(result)
--[[
User might purchase the product through the web after having
opened the purchase prompt, so an AlreadyOwned status is
acceptable.
]]
--[[
Assets and Gamepasses use the new economy purchasing endpoint. Developer Products still use
the old marketplace/submitpurchase endpoint.
]]
if infoType == Enum.InfoType.Asset or infoType == Enum.InfoType.GamePass or infoType == Enum.InfoType.Bundle
or (GetFFlagNewEconomyDeveloperProductUrl() and infoType == Enum.InfoType.Product) then
if result.purchased or result.reason == "AlreadyOwned" then
return Promise.resolve(result)
elseif result.reason == "EconomyDisabled" then
return Promise.reject(PurchaseError.PurchaseDisabled)
else
return Promise.reject(PurchaseError.UnknownFailure)
end
elseif infoType == Enum.InfoType.Product then
if result.success or result.status == "AlreadyOwned" then
return Promise.resolve(result)
elseif not result.receipt then
return Promise.reject(PurchaseError.UnknownFailure)
else
if result.status == "EconomyDisabled" then
return Promise.reject(PurchaseError.PurchaseDisabled)
else
return Promise.reject(PurchaseError.UnknownFailure)
end
end
elseif infoType == Enum.InfoType.Subscription then
if result.success or result.reason == "AlreadyOwned" then
return Promise.resolve(result)
elseif result.reason == "EconomyDisabled" then
return Promise.reject(PurchaseError.PurchaseDisabled)
else
return Promise.reject(PurchaseError.UnknownFailure)
end
end
end, function(failure)
return Promise.reject(PurchaseError.UnknownFailure)
end)
end
return performPurchase
|
---------------------------------------------------------------------------
--- Math module for gears
--
-- @module gears.math
---------------------------------------------------------------------------
local rtable = table
local gmath = {}
local function subset_mask_apply(mask, set)
local ret = {}
for i = 1, #set do
if mask[i] then
rtable.insert(ret, set[i])
end
end
return ret
end
local function subset_next(mask)
local i = 1
while i <= #mask and mask[i] do
mask[i] = false
i = i + 1
end
if i <= #mask then
mask[i] = 1
return true
end
return false
end
--- Return all subsets of a specific set.
-- This function, giving a set, will return all subset it.
-- For example, if we consider a set with value { 10, 15, 34 },
-- it will return a table containing 2^n set:
-- { }, { 10 }, { 15 }, { 34 }, { 10, 15 }, { 10, 34 }, etc.
-- @class function
-- @name subsets
-- @param set A set.
-- @return A table with all subset.
function gmath.subsets(set)
local mask = {}
local ret = {}
for i = 1, #set do mask[i] = false end
-- Insert the empty one
rtable.insert(ret, {})
while subset_next(mask) do
rtable.insert(ret, subset_mask_apply(mask, set))
end
return ret
end
--- Make i cycle.
-- @class function
-- @name cycle
-- @param t A length. Must be greater than zero.
-- @param i An absolute index to fit into #t.
-- @return An integer in (1, t) or nil if t is less than or equal to zero.
function gmath.cycle(t, i)
if t < 1 then return end
i = i % t
if i == 0 then
i = t
end
return i
end
--- Round a number to an integer.
-- @class function
-- @name round
-- @tparam number x
-- @treturn integer
function gmath.round(x)
return math.floor(x + 0.5)
end
return gmath
|
local Native = require('lib.native.native')
---@class Ability : Agent
local Ability = class('Ability', assert(require('lib.oop.agent')))
---getBooleanField
---@param field AbilityBooleanField
---@return boolean
function Ability:getBooleanField(field)
return Native.BlzGetAbilityBooleanField(getUd(self), field)
end
---getIntegerField
---@param field AbilityIntegerField
---@return integer
function Ability:getIntegerField(field)
return Native.BlzGetAbilityIntegerField(getUd(self), field)
end
---getRealField
---@param field AbilityRealField
---@return float
function Ability:getRealField(field)
return Native.BlzGetAbilityRealField(getUd(self), field)
end
---getStringField
---@param field AbilityStringField
---@return string
function Ability:getStringField(field)
return Native.BlzGetAbilityStringField(getUd(self), field)
end
---getBooleanLevelField
---@param field AbilityBooleanLevelField
---@param level integer
---@return boolean
function Ability:getBooleanLevelField(field, level)
return Native.BlzGetAbilityBooleanLevelField(getUd(self), field, level)
end
---getIntegerLevelField
---@param field AbilityIntegerLevelField
---@param level integer
---@return integer
function Ability:getIntegerLevelField(field, level)
return Native.BlzGetAbilityIntegerLevelField(getUd(self), field, level)
end
---getRealLevelField
---@param field AbilityRealLevelField
---@param level integer
---@return float
function Ability:getRealLevelField(field, level)
return Native.BlzGetAbilityRealLevelField(getUd(self), field, level)
end
---getStringLevelField
---@param field AbilityStringLevelField
---@param level integer
---@return string
function Ability:getStringLevelField(field, level)
return Native.BlzGetAbilityStringLevelField(getUd(self), field, level)
end
---getBooleanLevelArrayField
---@param field AbilityBooleanLevelArrayField
---@param level integer
---@param index integer
---@return boolean
function Ability:getBooleanLevelArrayField(field, level, index)
return Native.BlzGetAbilityBooleanLevelArrayField(getUd(self), field, level, index)
end
---getIntegerLevelArrayField
---@param field AbilityIntegerLevelArrayField
---@param level integer
---@param index integer
---@return integer
function Ability:getIntegerLevelArrayField(field, level, index)
return Native.BlzGetAbilityIntegerLevelArrayField(getUd(self), field, level, index)
end
---getRealLevelArrayField
---@param field AbilityRealLevelArrayField
---@param level integer
---@param index integer
---@return float
function Ability:getRealLevelArrayField(field, level, index)
return Native.BlzGetAbilityRealLevelArrayField(getUd(self), field, level, index)
end
---getStringLevelArrayField
---@param field AbilityStringLevelArrayField
---@param level integer
---@param index integer
---@return string
function Ability:getStringLevelArrayField(field, level, index)
return Native.BlzGetAbilityStringLevelArrayField(getUd(self), field, level, index)
end
---setBooleanField
---@param field AbilityBooleanField
---@param value boolean
---@return boolean
function Ability:setBooleanField(field, value)
return Native.BlzSetAbilityBooleanField(getUd(self), field, value)
end
---setIntegerField
---@param field AbilityIntegerField
---@param value integer
---@return boolean
function Ability:setIntegerField(field, value)
return Native.BlzSetAbilityIntegerField(getUd(self), field, value)
end
---setRealField
---@param field AbilityRealField
---@param value float
---@return boolean
function Ability:setRealField(field, value)
return Native.BlzSetAbilityRealField(getUd(self), field, value)
end
---setStringField
---@param field AbilityStringField
---@param value string
---@return boolean
function Ability:setStringField(field, value)
return Native.BlzSetAbilityStringField(getUd(self), field, value)
end
---setBooleanLevelField
---@param field AbilityBooleanLevelField
---@param level integer
---@param value boolean
---@return boolean
function Ability:setBooleanLevelField(field, level, value)
return Native.BlzSetAbilityBooleanLevelField(getUd(self), field, level, value)
end
---setIntegerLevelField
---@param field AbilityIntegerLevelField
---@param level integer
---@param value integer
---@return boolean
function Ability:setIntegerLevelField(field, level, value)
return Native.BlzSetAbilityIntegerLevelField(getUd(self), field, level, value)
end
---setRealLevelField
---@param field AbilityRealLevelField
---@param level integer
---@param value float
---@return boolean
function Ability:setRealLevelField(field, level, value)
return Native.BlzSetAbilityRealLevelField(getUd(self), field, level, value)
end
---setStringLevelField
---@param field AbilityStringLevelField
---@param level integer
---@param value string
---@return boolean
function Ability:setStringLevelField(field, level, value)
return Native.BlzSetAbilityStringLevelField(getUd(self), field, level, value)
end
---setBooleanLevelArrayField
---@param field AbilityBooleanLevelArrayField
---@param level integer
---@param index integer
---@param value boolean
---@return boolean
function Ability:setBooleanLevelArrayField(field, level, index, value)
return Native.BlzSetAbilityBooleanLevelArrayField(getUd(self), field, level, index, value)
end
---setIntegerLevelArrayField
---@param field AbilityIntegerLevelArrayField
---@param level integer
---@param index integer
---@param value integer
---@return boolean
function Ability:setIntegerLevelArrayField(field, level, index, value)
return Native.BlzSetAbilityIntegerLevelArrayField(getUd(self), field, level, index, value)
end
---setRealLevelArrayField
---@param field AbilityRealLevelArrayField
---@param level integer
---@param index integer
---@param value float
---@return boolean
function Ability:setRealLevelArrayField(field, level, index, value)
return Native.BlzSetAbilityRealLevelArrayField(getUd(self), field, level, index, value)
end
---setStringLevelArrayField
---@param field AbilityStringLevelArrayField
---@param level integer
---@param index integer
---@param value string
---@return boolean
function Ability:setStringLevelArrayField(field, level, index, value)
return Native.BlzSetAbilityStringLevelArrayField(getUd(self), field, level, index, value)
end
---addBooleanLevelArrayField
---@param field AbilityBooleanLevelArrayField
---@param level integer
---@param value boolean
---@return boolean
function Ability:addBooleanLevelArrayField(field, level, value)
return Native.BlzAddAbilityBooleanLevelArrayField(getUd(self), field, level, value)
end
---addIntegerLevelArrayField
---@param field AbilityIntegerLevelArrayField
---@param level integer
---@param value integer
---@return boolean
function Ability:addIntegerLevelArrayField(field, level, value)
return Native.BlzAddAbilityIntegerLevelArrayField(getUd(self), field, level, value)
end
---addRealLevelArrayField
---@param field AbilityRealLevelArrayField
---@param level integer
---@param value float
---@return boolean
function Ability:addRealLevelArrayField(field, level, value)
return Native.BlzAddAbilityRealLevelArrayField(getUd(self), field, level, value)
end
---addStringLevelArrayField
---@param field AbilityStringLevelArrayField
---@param level integer
---@param value string
---@return boolean
function Ability:addStringLevelArrayField(field, level, value)
return Native.BlzAddAbilityStringLevelArrayField(getUd(self), field, level, value)
end
---removeBooleanLevelArrayField
---@param field AbilityBooleanLevelArrayField
---@param level integer
---@param value boolean
---@return boolean
function Ability:removeBooleanLevelArrayField(field, level, value)
return Native.BlzRemoveAbilityBooleanLevelArrayField(getUd(self), field, level, value)
end
---removeIntegerLevelArrayField
---@param field AbilityIntegerLevelArrayField
---@param level integer
---@param value integer
---@return boolean
function Ability:removeIntegerLevelArrayField(field, level, value)
return Native.BlzRemoveAbilityIntegerLevelArrayField(getUd(self), field, level, value)
end
---removeRealLevelArrayField
---@param field AbilityRealLevelArrayField
---@param level integer
---@param value float
---@return boolean
function Ability:removeRealLevelArrayField(field, level, value)
return Native.BlzRemoveAbilityRealLevelArrayField(getUd(self), field, level, value)
end
---removeStringLevelArrayField
---@param field AbilityStringLevelArrayField
---@param level integer
---@param value string
---@return boolean
function Ability:removeStringLevelArrayField(field, level, value)
return Native.BlzRemoveAbilityStringLevelArrayField(getUd(self), field, level, value)
end
return Ability
|
require("game.constants")
require("game.map_structures")
require("game.object_structures")
-- Function ctor_hero( l As char_type Ptr = 0 ) As char_type Ptr
function ctor_hero(l)
--
--NOTE: The ability of the function to factory a new hero
--object and return it was never used, so we do not port the logic here.
--all we do is set up the hero object that is passed in.
-- Dim As Integer pass
--
-- If l = 0 Then
-- l = CAllocate( Len( char_type ) )
-- pass = Not 0
--
-- End If
--
--
-- With *l
--
--
--
-- l->id = "data\object\lynn.xml"
l.id = "data/object/lynn.xml"
--
-- LLSystem_CopyNewObject( *l )
LLSystem_CopyNewObject(l)
--
-- l->dead_sound = sound_lynn_die
l.dead_sound = sound_lynn_die
--
-- .num = -1
l.num = -1
--
-- .hp = 6
l.hp = 6
-- .maxhp = 6
l.maxhp = 6
--
-- llg( hero_only ).weapon = -1
ll_global.hero_only.weapon = -1
-- llg( hero_only ).has_weapon = -1
ll_global.hero_only.has_weapon = -1
--
-- llg( hero_only ).hasCostume( 0 ) = -1
ll_global.hero_only.hasCostume[0] = -1
-- llg( hero ).fade_time = .003
ll_global.hero.fade_time = .003
--
-- End With
--
--NOTE: The ability of the function to factory a new hero
--object and return it was never used, so we do not port the logic here.
--all we do is set up the hero object that is passed in.
-- If pass <> 0 Then
-- Return l
--
-- End If
--
--
-- End Function
end
-- Sub seq_id( seqs As Integer, s As sequence_type Ptr, e As char_type Ptr )
function seq_id(seqs, s, e)
--
-- Dim As Integer grab_seq, loop_ents
local grab_seq, loop_ents = 0, 0
--
-- For grab_seq = 0 To seqs - 1
for grab_seq = 0, seqs - 1 do
--
-- For loop_ents = 0 To s[grab_seq].ents - 1
for loop_ents = 0, s[grab_seq].ents - 1 do
--
-- If s[grab_seq].ent_code[loop_ents] = -1 Then
if s[grab_seq].ent_code[loop_ents] == -1 then
--
-- s[grab_seq].ent[loop_ents] = @llg( hero )
s[grab_seq].ent[loop_ents] = ll_global.hero
--
-- Else
else
--
-- s[grab_seq].ent[loop_ents] = @e[s[grab_seq].ent_code[loop_ents]]
s[grab_seq].ent[loop_ents] = e[s[grab_seq].ent_code[loop_ents]]
--
-- End If
end
--
-- Next
end
--
-- Next
end
--
-- End Sub
end
--Loads a sequence from an already loaded map binary blob.
function load_seqV(mapBlob, numSeqs, seqs, seqType, seqIndex)
-- For 0 to seqs - 1 do
for grabSeq = 0, numSeqs - 1 do
local sequence = create_sequence_type()
sequence.seq_type = seqType
sequence.seq_index = seqIndex
-- Load .ents Integer
sequence.ents = readInt(mapBlob)
sequence.ent_code = {}
-- For loop_ents is 0 to ents - 1 do
for loopEnts = 0, sequence.ents - 1 do
-- Load ent_code[loop_ents] Integer
local ent_code = readInt(mapBlob)
sequence.ent_code[loopEnts] = ent_code
end
-- Load .commands Integer
sequence.commands = readInt(mapBlob)
sequence.Command = {}
-- For loop_commands is 0 to commands - 1 do
for loopCommands = 0, sequence.commands - 1 do
local command = create_command_type()
-- load .ents Integer
command.ents = readInt(mapBlob)
command.ent = {}
-- For loop_command_ents is 0 to ents - 1 do
for loopCommandEnts = 0, command.ents - 1 do
local commandData = create_command_data()
-- Load .active_ent (command_data type) Integer
commandData.active_ent = readInt(mapBlob)
-- Load .ent_state Integer
commandData.ent_state = readInt(mapBlob)
-- Set .hold_state to match .ent_state so commands can be reset
commandData.hold_state = commandData.ent_state
-- Load .text String
commandData.text = readString(mapBlob)
-- Load .walk_speed Double
commandData.walk_speed = readDouble(mapBlob)
-- Load .dest_y Short
commandData.dest_y_box_invis = readShort(mapBlob)
-- Load .dest_x Short
commandData.dest_x = readShort(mapBlob)
-- Load .abs_x Short
commandData.abs_x = readShort(mapBlob)
-- Load .abs_y Short
commandData.abs_y = readShort(mapBlob)
-- Load .mod_y Short
commandData.mod_y = readShort(mapBlob)
-- Load .mod_x Short
commandData.mod_x = readShort(mapBlob)
-- Load .to_map Integer
commandData.to_map = readString(mapBlob)
-- Load .to_entry Integer
commandData.to_entry = readInt(mapBlob)
-- Load .jump_count Integer
commandData.jump_count = readInt(mapBlob)
-- Load .water_align Integer
commandData.water_align_union_text_speed = readInt(mapBlob)
-- Load .chap Integer
commandData.chap = readInt(mapBlob)
-- Load .carries_all Integer
commandData.carries_all = readInt(mapBlob)
-- Load .nocam Integer
commandData.nocam = readInt(mapBlob)
-- Load .modify_direction Integer
commandData.modify_direction = readInt(mapBlob)
-- Load .seq_pause Integer
commandData.seq_pause = readInt(mapBlob)
-- Load .reserved_3 Integer
commandData.reserved_3 = readInt(mapBlob)
-- Load .reserved_4 Integer
commandData.reserved_4 = readInt(mapBlob)
-- Load .free_to_move Integer
commandData.free_to_move = readInt(mapBlob)
-- Load .display_hud Integer
commandData.display_hud = readInt(mapBlob)
-- Load .fadeTime Integer
commandData.fadeTime = readDouble(mapBlob)
-- 'Load .reserved_7 Integer COMMENTED OUT?
-- 'Load .reserved_8 Integer COMMENTED OUT?
-- Load .reserved_9 Integer
commandData.reserved9 = readInt(mapBlob)
-- Load .reserved_10 Integer
commandData.reserved10 = readInt(mapBlob)
command.ent[loopCommandEnts] = commandData
end
sequence.Command[loopCommands] = command
end
seqs[grabSeq] = sequence
end
end
function LLSystem_LoadMap(fileName)
local map = load_mapV(fileName)
return map
end
-- Sub load_entrypoint()
function load_entrypoint()
--
-- llg( start_map ) = "data\map\title.map"
ll_global.start_map = "data/map/title.map"
-- llg( start_entry ) = 0
ll_global.start_entry = 0
--
-- End Sub
end
--Loads a Lynn's Legacy .map file. Assumes it is an uncompressed .map file.
--The original set of files were zlib compressed. I ran them through the
--offzip utility to decompress them.
function load_mapV(fileName)
local map = create_map_type()
local mapBlob = loadBlob(fileName)
if mapBlob then
map.filename = readString(mapBlob)
-- If Instr( lmap->filename, "moenia" ) <> 0 Then
if map.filename:find("moenia") then
-- lmap->isDungeon = -1
map.isDungeon = -1
-- llg( dungeonName ) = "Moenia"
ll_global.dungeonName = "Moenia"
--
-- End If
end
--
-- If Instr( lmap->filename, "gelidus" ) <> 0 Then
if map.filename:find("gelidus") then
-- lmap->isDungeon = -1
map.isDungeon = -1
-- llg( dungeonName ) = "Gelidus"
ll_global.dungeonName = "Gelidus"
--
-- End If
end
--
-- If Instr( lmap->filename, "icefield" ) <> 0 Then
if map.filename:find("icefield") then
-- lmap->isDungeon = -1
map.isDungeon = -1
-- llg( dungeonName ) = "Ice Field"
ll_global.dungeonName = "Ice Field"
--
-- End If
end
--
-- If Instr( lmap->filename, "ignia" ) <> 0 Then
if map.filename:find("ignia") then
-- lmap->isDungeon = -1
map.isDungeon = -1
-- llg( dungeonName ) = "Ignia"
ll_global.dungeonName = "Ignia"
--
-- End If
end
--
-- If Instr( lmap->filename, "arx" ) <> 0 Then
if map.filename:find("arx") then
-- lmap->isDungeon = -1
map.isDungeon = -1
-- llg( dungeonName ) = "Arx"
ll_global.dungeonName = "Arx"
--
-- End If
end
--
-- If Instr( lmap->filename, "nerme" ) <> 0 Then
if map.filename:find("nerme") then
-- lmap->isDungeon = -1
map.isDungeon = -1
-- llg( dungeonName ) = "Nerme"
ll_global.dungeonName = "Nerme"
--
-- End If
end
--
-- If Instr( lmap->filename, "divius" ) <> 0 Then
if map.filename:find("divius") then
-- lmap->isDungeon = -1
map.isDungeon = -1
-- llg( dungeonName ) = "Divius"
ll_global.dungeonName = "Divius"
--
-- End If
end
--
-- '' add checks for all dungeons here
map.entries = readInt(mapBlob)
map.rooms = readInt(mapBlob)
--NOTE: Load the tileset and set up sprite batches for
--map specific 3 layer handling.
map.tileset_filename = readString(mapBlob)
map.tileset = getImageHeader(map.tileset_filename)
map.tileset.spriteBatches = {}
map.tileset.spriteBatches[0] = love.graphics.newSpriteBatch(map.tileset.image)
map.tileset.spriteBatches[1] = love.graphics.newSpriteBatch(map.tileset.image)
map.tileset.spriteBatches[2] = love.graphics.newSpriteBatch(map.tileset.image)
map.room = {}
for roomIndex = 0, map.rooms - 1 do
local room = create_room_type()
room.x = readInt(mapBlob)
room.y = readInt(mapBlob)
room.parallax = readInt(mapBlob)
if room.parallax ~= 0 then
room.para_filename = readString(mapBlob)
room.para_img = getImageHeader(room.para_filename)
end
room.dark = readInt(mapBlob)
room.teleports = readInt(mapBlob)
room.song = readInt(mapBlob)
room.song_changes = readInt(mapBlob)
room.changes_to = readInt(mapBlob)
room.reserved = readC(readInt, mapBlob, 18)
room.teleport = {}
for teleportIndex = 0, room.teleports - 1 do
local teleport = {}
teleport.x = readInt(mapBlob)
teleport.y = readInt(mapBlob)
teleport.w = readInt(mapBlob)
teleport.h = readInt(mapBlob)
teleport.to_room = readInt(mapBlob)
teleport.to_map = readString(mapBlob)
teleport.dx = readInt(mapBlob)
teleport.dy = readInt(mapBlob)
teleport.dd = readInt(mapBlob)
teleport.to_song = readInt(mapBlob)
teleport.reserved = readC(readInt, mapBlob, 20)
room.teleport[teleportIndex] = teleport
end
room.seq_here = readInt(mapBlob)
room.seq = room.seq_here > 0 and {} or nil
room.seqi = 0
load_seqV(mapBlob, room.seq_here, room.seq, "room", roomIndex)
room.enemies = readInt(mapBlob)
room.enemy = {}
for enemyIndex = 0, room.enemies - 1 do
local enemy = create_Object()
enemy.x_origin = readInt(mapBlob)
enemy.y_origin = readInt(mapBlob)
enemy.id = readString(mapBlob)
enemy.direction = readInt(mapBlob)
enemy.seq_here = readInt(mapBlob)
enemy.spawn_h = readShort(mapBlob)
enemy.is_h_set = readShort(mapBlob)
enemy.chap = readInt(mapBlob)
enemy.spawn_d = readInt(mapBlob)
enemy.is_d_set = readInt(mapBlob)
enemy.reserved_5 = readInt(mapBlob)
enemy.seq = enemy.seq_here > 0 and {} or nil
enemy.seqi = 0
load_seqV(mapBlob, enemy.seq_here, enemy.seq, "enemy", enemyIndex)
enemy.spawn_cond = readInt(mapBlob)
if enemy.spawn_cond ~= 0 then
enemy.spawn_info = create_LLObject_ConditionalSpawn()
enemy.spawn_info.wait_n = readInt(mapBlob)
enemy.spawn_info.wait_spawn = {}
for loopSpawns = 0, enemy.spawn_info.wait_n - 1 do
local spawn = {}
spawn.code_index = readShort(mapBlob)
spawn.code_state = readInt(mapBlob)
enemy.spawn_info.wait_spawn[loopSpawns] = spawn
end
enemy.spawn_info.kill_n = readInt(mapBlob)
enemy.spawn_info.kill_spawn = {}
for loopSpawns = 0, enemy.spawn_info.kill_n - 1 do
local spawn = {}
spawn.code_index = readShort(mapBlob)
spawn.code_state = readInt(mapBlob)
enemy.spawn_info.kill_spawn[loopSpawns] = spawn
end
enemy.spawn_info.active_n = readInt(mapBlob)
enemy.spawn_info.active_spawn = {}
for loopSpawns = 0, enemy.spawn_info.active_n - 1 do
local spawn = {}
spawn.code_index = readShort(mapBlob)
spawn.code_state = readInt(mapBlob)
enemy.spawn_info.active_spawn[loopSpawns] = spawn
end
end
enemy.coords = create_vector()
enemy.coords.x = enemy.x_origin
enemy.coords.y = enemy.y_origin
enemy.ori_dir = enemy.direction
room.enemy[enemyIndex] = enemy
end
room.layout = {}
--This calculation for the number of room elements represents the
--upper bound (ubound) of a buffer from the original source code.
--When declaring an array in FreeBASIC, you declare it with the
--upper bound, which means the actual number of elements is the
--upper bound plus one. To read the data correctly, we add one
--to this number of elements (see the readC call below).
room.room_elem = room.x * (room.y + 1) + 1
for getNCpy = 0, 2 do
local layer = readC(readShort, mapBlob, room.room_elem + 1)
room.layout[getNCpy] = layer
--function readC(readF, blob, count)
end
map.room[roomIndex] = room
end
map.entry = create_map_entry_type()
for loopEntries = 0, map.entries - 1 do
local entry = {}
entry.x = readInt(mapBlob)
entry.y = readInt(mapBlob)
entry.room = readInt(mapBlob)
entry.direction = readByte(mapBlob)
entry.seq_here = readInt(mapBlob)
entry.reserved = readStringL(mapBlob, 84)
entry.seq = entry.seq_here > 0 and {} or nil
entry.seqi = 0
load_seqV(mapBlob, entry.seq_here, entry.seq, "entry", loopEntries)
map.entry[loopEntries] = entry
end
-- For loop_rooms = 0 To lmap->rooms- 1
for loop_rooms = 0, map.rooms - 1 do
--
-- With lmap->room[loop_rooms]
local with0 = map.room[loop_rooms]
--
-- seq_id( .seq_here, _
-- .seq, _
-- .enemy )
seq_id(with0.seq_here, with0.seq, with0.enemy)
--
-- For loop_enemies = 0 To .enemies - 1
for loop_enemies = 0, with0.enemies - 1 do
--
-- With .enemy[loop_enemies]
local with1 = with0.enemy[loop_enemies]
--
-- seq_id( .seq_here, _
-- .seq, _
-- lmap->room[loop_rooms].enemy )
seq_id(with1.seq_here, with1.seq, map.room[loop_rooms].enemy)
--
-- End With
--
-- Next
end
--
-- End With
--
-- Next
end
--
-- For loop_entries = 0 To lmap->entries - 1
for loop_entries = 0, map.entries - 1 do
--
-- With lmap->entry[loop_entries]
local with0 = map.entry[loop_entries]
--
-- seq_id( .seq_here, _
-- .seq, _
-- lmap->room[.room].enemy )
seq_id(with0.seq_here, with0.seq, map.room[with0.room].enemy)
--
-- End With
--
-- Next
end
end
-- If lmap->isDungeon <> 0 Then
if map.isDungeon ~= 0 then
-- llg( minimap ) = LLMiniMap_LoadMiniMap( kfe( lmap->filename ) & ".mni", lmap->rooms )
--NOTE: Beware of case insensitivity. miniMap is spelled in camel case
--everywhere else!
ll_global.miniMap = LLMiniMap_LoadMiniMap(string.sub(map.filename, 1, #map.filename - 4)..".mni", map.rooms)
--
-- End If
end
return map
end
-- Sub load_status_images( t As load_savImage Ptr )
function load_status_images(t)
--
-- With *t
local with0 = t
--
-- .img( 0 ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\char\lynnstatus1.spr" ) )
with0.img[0] = getImageHeader("data/pictures/char/lynnstatus1.spr")
-- .img( 1 ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\char\lynnstatus2.spr" ) )
with0.img[1] = getImageHeader("data/pictures/char/lynnstatus2.spr")
-- .img( 2 ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\char\lynnstatus3.spr" ) )
with0.img[2] = getImageHeader("data/pictures/char/lynnstatus3.spr")
--
--
-- End With
--
-- End Sub
end
-- Sub load_menu()
function load_menu()
--
--
-- With llg( menu ).menuImages
local with0 = ll_global.menu.menuImages
-- .img( menu_blankspace ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\blankspace.spr" ) )
with0.img[menu_blankspace] = getImageHeader("data/pictures/menu/blankspace.spr")
-- .img( menu_bridge ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\bridge.spr" ) )
with0.img[menu_bridge] = getImageHeader("data/pictures/menu/bridge.spr")
-- .img( menu_bridge_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\bridge_select.spr" ) )
with0.img[menu_bridge_select] = getImageHeader("data/pictures/menu/bridge_select.spr")
-- .img( menu_bridge2 ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\bridge2.spr" ) )
with0.img[menu_bridge2] = getImageHeader("data/pictures/menu/bridge2.spr")
-- .img( menu_bridge2_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\bridge2_select.spr" ) )
with0.img[menu_bridge2_select] = getImageHeader("data/pictures/menu/bridge2_select.spr")
-- .img( menu_bridge3 ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\bridge3.spr" ) )
with0.img[menu_bridge3] = getImageHeader("data/pictures/menu/bridge3.spr")
-- .img( menu_bridge3_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\bridge3_select.spr" ) )
with0.img[menu_bridge3_select] = getImageHeader("data/pictures/menu/bridge3_select.spr")
-- .img( menu_blank ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\item_blank.spr" ) )
with0.img[menu_blank] = getImageHeader("data/pictures/menu/item_blank.spr")
-- .img( menu_blank_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\item_blank_select.spr" ) )
with0.img[menu_blank_select] = getImageHeader("data/pictures/menu/item_blank_select.spr")
-- .img( menu_flare ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\flare.spr" ) )
with0.img[menu_flare] = getImageHeader("data/pictures/menu/flare.spr")
-- .img( menu_flare_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\flare_select.spr" ) )
with0.img[menu_flare_select] = getImageHeader("data/pictures/menu/flare_select.spr")
-- .img( menu_full_background ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\full_background.spr" ) )
with0.img[menu_full_background] = getImageHeader("data/pictures/menu/full_background.spr")
-- .img( menu_heal ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\heal.spr" ) )
with0.img[menu_heal] = getImageHeader("data/pictures/menu/heal.spr")
-- .img( menu_heal_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\heal_select.spr" ) )
with0.img[menu_heal_select] = getImageHeader("data/pictures/menu/heal_select.spr")
-- .img( menu_ice ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\ice.spr" ) )
with0.img[menu_ice] = getImageHeader("data/pictures/menu/ice.spr")
-- .img( menu_ice_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\ice_select.spr" ) )
with0.img[menu_ice_select] = getImageHeader("data/pictures/menu/ice_select.spr")
-- .img( menu_idol ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\idol.spr" ) )
with0.img[menu_idol] = getImageHeader("data/pictures/menu/idol.spr")
-- .img( menu_idol_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\idol_select.spr" ) )
with0.img[menu_idol_select] = getImageHeader("data/pictures/menu/idol_select.spr")
-- .img( menu_mace ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\mace.spr" ) )
with0.img[menu_mace] = getImageHeader("data/pictures/menu/mace.spr")
-- .img( menu_mace_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\mace_select.spr" ) )
with0.img[menu_mace_select] = getImageHeader("data/pictures/menu/mace_select.spr")
-- .img( menu_menu_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\menu_select.spr" ) )
with0.img[menu_menu_select] = getImageHeader("data/pictures/menu/menu_select.spr")
-- .img( menu_regen ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\regen.spr" ) )
with0.img[menu_regen] = getImageHeader("data/pictures/menu/regen.spr")
-- .img( menu_regen_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\regen_select.spr" ) )
with0.img[menu_regen_select] = getImageHeader("data/pictures/menu/regen_select.spr")
-- .img( menu_resume_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\resume_select.spr" ) )
with0.img[menu_resume_select] = getImageHeader("data/pictures/menu/resume_select.spr")
-- .img( menu_sapling ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\sapling.spr" ) )
with0.img[menu_sapling] = getImageHeader("data/pictures/menu/sapling.spr")
-- .img( menu_sapling_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\sapling_select.spr" ) )
with0.img[menu_sapling_select] = getImageHeader("data/pictures/menu/sapling_select.spr")
-- .img( menu_square_cursor ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\square_cursor.spr" ) )
with0.img[menu_square_cursor] = getImageHeader("data/pictures/menu/square_cursor.spr")
-- .img( menu_star ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\star.spr" ) )
with0.img[menu_star] = getImageHeader("data/pictures/menu/star.spr")
-- .img( menu_star_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\menu\star_select.spr" ) )
with0.img[menu_star_select] = getImageHeader("data/pictures/menu/star_select.spr")
-- .img( menu_cougar ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\char\outfits\cougar\icon.spr" ) )
with0.img[menu_cougar] = getImageHeader("data/pictures/char/outfits/cougar/icon.spr")
-- .img( menu_lynnity ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\char\outfits\lynnity\icon.spr" ) )
with0.img[menu_lynnity] = getImageHeader("data/pictures/char/outfits/lynnity/icon.spr")
-- .img( menu_ninja ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\char\outfits\ninja\icon.spr" ) )
with0.img[menu_ninja] = getImageHeader("data/pictures/char/outfits/ninja/icon.spr")
-- .img( menu_standard ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\char\icon.spr" ) )
with0.img[menu_standard] = getImageHeader("data/pictures/char/icon.spr")
-- .img( menu_cougar_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\char\outfits\cougar\icon_select.spr" ) )
with0.img[menu_cougar_select] = getImageHeader("data/pictures/char/outfits/cougar/icon_select.spr")
-- .img( menu_lynnity_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\char\outfits\lynnity\icon_select.spr" ) )
with0.img[menu_lynnity_select] = getImageHeader("data/pictures/char/outfits/lynnity/icon_select.spr")
-- .img( menu_ninja_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\char\outfits\ninja\icon_select.spr" ) )
with0.img[menu_ninja_select] = getImageHeader("data/pictures/char/outfits/ninja/icon_select.spr")
-- .img( menu_standard_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\char\icon_select.spr" ) )
with0.img[menu_standard_select] = getImageHeader("data/pictures/char/icon_select.spr")
-- .img( menu_bikini ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\char\outfits\swimsuit\icon.spr" ) )
with0.img[menu_bikini] = getImageHeader("data/pictures/char/outfits/swimsuit/icon.spr")
-- .img( menu_bikini_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\char\outfits\swimsuit\icon_select.spr" ) )
with0.img[menu_bikini_select] = getImageHeader("data/pictures/char/outfits/swimsuit/icon_select.spr")
-- .img( menu_rknight ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\char\outfits\redknight\icon.spr" ) )
with0.img[menu_rknight] = getImageHeader("data/pictures/char/outfits/redknight/icon.spr")
-- .img( menu_rknight_select ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\char\outfits\redknight\icon_select.spr" ) )
with0.img[menu_rknight_select] = getImageHeader("data/pictures/char/outfits/redknight/icon_select.spr")
--
-- End With
--
-- With llg( menu )
with0 = ll_global.menu
--
-- .menuNames( menu_bridge_select ) = "Some old scraps."
with0.menuNames[menu_bridge_select] = "Some old scraps."
-- .menuNames( menu_flare_select ) = "Flare Powder."
with0.menuNames[menu_flare_select] = "Flare Powder."
-- .menuNames( menu_ice_select ) = "Ice Powder."
with0.menuNames[menu_ice_select] = "Ice Powder."
-- .menuNames( menu_idol_select ) = "An ancient treasure."
with0.menuNames[menu_idol_select] = "An ancient treasure."
-- .menuNames( menu_regen_select ) = "Adrenaline Booster."
with0.menuNames[menu_regen_select] = "Adrenaline Booster."
-- .menuNames( menu_heal_select ) = "Healing Symbol."
with0.menuNames[menu_heal_select] = "Healing Symbol."
--
-- .menuNames( menu_sapling_select ) = "A small sapling."
with0.menuNames[menu_sapling_select] = "A small sapling."
-- .menuNames( menu_mace_select ) = "My old mace."
with0.menuNames[menu_mace_select] = "My old mace."
-- .menuNames( menu_star_select ) = "Handcrafted 0wnage."
with0.menuNames[menu_star_select] = "Handcrafted 0wnage."
--
-- .menuNames( menu_standard_select ) = "Normal outfit."
with0.menuNames[menu_standard_select] = "Normal outfit."
-- .menuNames( menu_cougar_select ) = "Mew..."
with0.menuNames[menu_cougar_select] = "Mew..."
-- .menuNames( menu_lynnity_select ) = "Tight Leather."
with0.menuNames[menu_lynnity_select] = "Tight Leather."
-- .menuNames( menu_ninja_select ) = "..."
with0.menuNames[menu_ninja_select] = "..."
-- .menuNames( menu_bikini_select ) = "Not very practical..."
with0.menuNames[menu_bikini_select] = "Not very practical..."
-- .menuNames( menu_rknight_select ) = "Regenerative power."
with0.menuNames[menu_rknight_select] = "Regenerative power."
--
-- .menuNames( menu_menu_select ) = "Back to title screen."
with0.menuNames[menu_menu_select] = "Back to title screen."
-- .menuNames( menu_resume_select ) = "Back to the game."
with0.menuNames[menu_resume_select] = "Back to the game."
--
-- End With
--
--
--
-- End Sub
end
-- Sub load_hud( h As load_hudImage Ptr )
function load_hud(h)
--
-- With *h
--
-- .img( 0 ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\hud\HUD_health.spr" ) )
h.img[0] = getImageHeader("data/pictures/hud/hud_health.spr")
-- .img( 1 ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\hud\HUD_items.spr" ) )
h.img[1] = getImageHeader("data/pictures/hud/hud_items.spr")
-- .img( 2 ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\hud\cash.spr" ) )
h.img[2] = getImageHeader("data/pictures/hud/cash.spr")
-- .img( 3 ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\hud\cashnumbers.spr" ) )
h.img[3] = getImageHeader("data/pictures/hud/cashnumbers.spr")
-- .img( 4 ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\hud\fullbar.spr" ) )
h.img[4] = getImageHeader("data/pictures/hud/fullbar.spr")
-- .img( 5 ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\hud\key.spr" ) )
h.img[5] = getImageHeader("data/pictures/hud/key.spr")
-- .img( 6 ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\hud\key2.spr" ) )
h.img[6] = getImageHeader("data/pictures/hud/key2.spr")
--
-- .img( 7 ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\hud\materials2.spr" ) )
h.img[7] = getImageHeader("data/pictures/hud/materials2.spr")
-- .img( 8 ) = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\hud\materials3.spr" ) )
h.img[8] = getImageHeader("data/pictures/hud/materials3.spr")
--
-- End With
--
-- End Sub
end
-- Function make_box( txt As String, a_lock As Integer, clr As Short, invis As Short, auto As Double, x As Short, y As Short, spd As Integer ) As boxcontrol_type
function make_box(txt, a_lock, clr, invis, auto, x, y, spd)
--
-- Dim As boxcontrol_type box
local box = create_boxcontrol_type()
-- Dim As boxcontrol_type Ptr b = @box
local b = box
--
-- box.ptrs.box = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\textbox.spr" ) )
box.ptrs.box = getImageHeader("data/pictures/textbox.spr")
-- box.ptrs.Next = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\textdown.spr" ) )
box.ptrs.Next = getImageHeader("data/pictures/textdown.spr")
-- 'box.ptrs.mask = LLSystem_ImageDeref( LLSystem_ImageDerefName( "data\pictures\emptybox.spr" ) )
--
-- init_box( txt, b )
init_box(txt, b)
--
-- b->layout.speed = .021813
b.layout.speed = .021813
--
-- If a_lock = 0 Then
if a_lock == 0 then
--
-- llg( hero_only ).action_lock = -1
ll_global.hero_only.action_lock = -1
--
--
-- End If
end
--
-- b->internal.lastFG = llg( fontFG )
b.internal.lastFG = ll_global.fontFG
--
-- If clr <> 0 Then
if clr ~= 0 then
--
-- dim as integer shake
local shake = 0
-- shake = clr
shake = clr
-- __set_font_fg( cast( any ptr, shake ) )
--
-- End If
end
--
--
-- If invis <> 0 Then
if invis ~= 0 then
--
-- b->layout.invis = -1
b.layout.invis = -1
--
-- End If
end
--
-- If auto <> 0 Then
if auto ~= 0 then
--
-- b->internal.auto = -1
b.internal.auto = -1
-- b->internal.autosleep = auto
b.internal.autosleep = auto
--
-- End If
end
--
--
-- If x <> 0 Then
if x ~= 0 then
--
-- b->layout.x_loc = x
b.layout.x_loc = x
--
-- End If
end
--
-- If y <> 0 Then
if y ~= 0 then
--
-- b->layout.y_loc = y
b.layout.y_loc = y
--
-- End If
end
--
-- If spd <> 0 Then
if spd ~= 0 then
--
-- if spd = conf_Box then
if spd == conf_Box then
-- b->internal.confBox = TRUE
b.internal.confBox = TRUE
--
-- else
else
-- b->layout.speed = spd / 1000
b.layout.speed = spd / 1000
--
-- end if
end
--
-- End If
end
--
--
--
-- b->activated = TRUE
b.activated = 1
-- b->internal.state = TEXTBOX_REGULAR
b.internal.state = TEXTBOX_REGULAR
--
-- Return box
return box
--
-- End Function
end
-- private function parseText( textToParse as string ) as string
function parseText(textToParse)
--
-- dim as string res
local res = ""
-- dim as integer c
local c = 1
--
-- do
repeat
--
-- if textToParse[c] = asc( "{" ) then
if textToParse:sub(c, c) == '{' then
-- '' special token
-- dim as string tok
local tok = ""
-- dim as integer c2
local c2 = 0
--
-- do
repeat
--
-- tok += " "
--
-- tok[c2] = textToParse[c + c2]
local char = textToParse:sub(c + c2, c + c2)
tok = tok..char
--
-- c2 += 1
c2 = c2 + 1
-- if tok[c2-1] = asc( "}" ) then exit do
--
-- loop
until char == '}'
--
-- if ucase( tok ) = "{HEALTHPRICE}" then
if tok:upper() == "{HEALTHPRICE}" then
-- res += str( healthFormula )
res = res..healthFormula()
--
-- end if
end
--
-- if ucase( tok ) = "{HEALTHNOW}" then
if tok:upper() == "{HEALTHNOW}" then
-- res += str( llg( hero ).maxhp )
res = res..ll_global.hero.maxhp
--
-- end if
end
--
-- if ucase( tok ) = "{HEALTHUP}" then
if tok:upper() == "{HEALTHUP}" then
-- res += str( llg( hero ).maxhp + 1 )
res = res..(ll_global.hero.maxhp + 1)
--
-- end if
end
--
-- if ucase( tok ) = "{NEWLINE}" then
if tok:upper() == "{NEWLINE}" then
-- res += "{NEWLINE}"
res = res.."{NEWLINE}"
--
-- end if
end
--
-- c += c2
c = c + c2
--
-- end if
end
--
-- res += chr( textToParse[c] )
res = res..textToParse:sub(c, c)
-- c += 1
c = c + 1
--
-- if c = len( textToParse ) then exit do
if c == (#textToParse + 1) then break end
--
-- loop
until false
--
-- return res
return res
--
-- end function
end
-- Sub init_box( ByVal text As String, b As boxcontrol_type Ptr )
function init_box(text, b)
--
-- dim as string tempBuffer
local tempBuffer = ""
--
-- tempBuffer = parseText( text )
tempBuffer = parseText(text)
--
-- Redim As String words( 0 ), lines( 0 )
local words, lines = {}, {}
--
-- Scope
--
-- Dim As Integer word_num, parse_loc
local word_num, parse_loc = 0, 0
-- Dim As Integer p_char
local p_char = 0
--
-- For parse_loc = 0 To Len( tempBuffer ) - 1
for parse_loc = 1, #tempBuffer do
--
-- Redim Preserve words( word_num )
--
-- p_char = tempBuffer[parse_loc]
p_char = tempBuffer:sub(parse_loc, parse_loc)
--
-- words( word_num ) += Chr( p_char )
words[word_num] = (words[word_num] and words[word_num] or "")..p_char
-- If p_char = Asc( " " ) Then word_num += 1
if p_char == " " then word_num = word_num + 1 end
--
-- Next
end
--
-- End Scope
--
--
-- Scope
--
-- Dim As String msgline
local msgline = ""
-- Dim As Integer wordindex, lineindex
local wordindex, lineindex = 0, 0
-- Dim As Integer getoutflag
local getoutflag = 0
--
-- Do
repeat
--
-- If wordindex - 1 <> UBound( words ) Then
if wordindex - 1 ~= #words then
-- '' not past the last word
--
-- If ( Len( msgline ) + Len( words( wordindex ) ) < 36 ) and ( words( wordindex ) <> "{NEWLINE} " ) Then
if (#msgline + #words[wordindex] < 36) and (words[wordindex] ~= "{NEWLINE} ") then
-- '' the message length is less than 36 if we add this word
--
-- msgline += words( wordindex )
msgline = msgline..words[wordindex]
-- wordindex += 1
wordindex = wordindex + 1
--
-- Else
else
-- '' the message would exceed box width, start a new line
-- if words( wordindex ) = "{NEWLINE} " then
if words[wordindex] == "{NEWLINE} " then
-- wordindex += 1
wordindex = wordindex + 1
--
-- end if
end
--
-- Redim Preserve lines( lineindex )
--
-- lines( lineindex ) = msgline
lines[lineindex] = msgline
-- lineindex += 1
lineindex = lineindex + 1
--
-- msgline = ""
msgline = ""
--
-- End If
end
--
-- Else
else
-- '' past the last word... close it up.
--
-- Redim Preserve lines( lineindex )
--
-- lines( lineindex ) = msgline
lines[lineindex] = msgline
-- getoutflag = Not 0
getoutflag = -1
--
--
-- End If
end
--
-- Loop Until getoutflag
until getoutflag ~= 0
--
--
-- End Scope
--
--
-- b->internal.numoflines = UBound( lines ) + 1
b.internal.numoflines = #lines + 1
--
-- b->ptrs.row = CAllocate( ( b->internal.numoflines ) * Len( String ) )
b.ptrs.row = {}
--
--
-- Scope
--
-- Dim As Integer stuff_lines
local stuff_lines = 0
-- Dim As Integer leng, diff
local leng, diff = 0, 0
--
-- For stuff_lines = 0 To b->internal.numoflines - 1
for stuff_lines = 0, b.internal.numoflines - 1 do
--
-- leng = Len( lines( stuff_lines ) )
leng = #lines[stuff_lines]
-- diff = 38 - leng
diff = 38 - leng
--
--
-- Scope
--
-- Dim As uByte lin_msg( 36 )
local lin_msg = " "
-- MemSet( @lin_msg( 0 ), 0, 37 ) '' <---- ?? fb doesn't clear it...
--
-- Dim As Integer put_ch
local put_ch = 1
--
-- For put_ch = 0 To leng - 1
for put_ch = 1, leng do
--
-- lin_msg( put_ch + ( diff \ 2 ) ) = lines( stuff_lines )[put_ch]
lin_msg = replace_char(put_ch + math.floor(diff / 2), lin_msg, lines[stuff_lines]:sub(put_ch, put_ch))
--
-- Next
end
--
-- b->ptrs.row[stuff_lines] = cva( @lin_msg( 0 ), 37 )
b.ptrs.row[stuff_lines] = lin_msg
--
-- End Scope
--
-- Next
end
--
-- End Scope
--
--
-- End Sub
end
-- Function LLMiniMap_LoadMiniMap( fileName As String, rooms As Integer ) As LL_MiniMapType
function LLMiniMap_LoadMiniMap(fileName, rooms)
--
--
-- Dim As LL_MiniMapType res
local res = create_LL_MiniMapType()
--
-- Dim As Integer ff = FreeFile
local ff = 0
--
-- Dim As Integer i, j, k
local i, j, k = 0, 0, 0
--
-- Open fileName For Binary As #ff
--NOTE: icefield.mni does not exist for icefield.map. The
--original codebase doesn't seem to care because it opens
--the file for binary random access, which does not throw a
--runtime error for nonexistent files. Instead it reads all
--zeros from the nonexistent file. In our case, we have to not
--try to read a nonexistent file and just return the empty minimap,
--which in theory should be logically equivalent.
if love.filesystem.getInfo(fileName) then
ff = loadBlob(fileName)
--
-- With res
local with0 = res
--
-- .room = CAllocate( rooms * Len( LL_MiniMapRoomType ) )
-- For i = 0 To rooms - 1
for i = 0, rooms - 1 do
--
-- With .room[i]
with0.room[i] = create_LL_MiniMapRoomType()
local with1 = with0.room[i]
--
-- Get #ff, , .location.x
with1.location.x = readInt(ff)
-- Get #ff, , .location.y
with1.location.y = readInt(ff)
-- Get #ff, , .floor
with1.floor = readInt(ff)
--
-- Get #ff, , .doors
with1.doors = readInt(ff)
--
-- .door = CAllocate( .doors * Len( LL_MiniMapRoomDoorType ) )
with1.door = {}
-- For j = 0 To .doors - 1
for j = 0, with1.doors - 1 do
--
-- With .door[j]
with1.door[j] = create_LL_MiniMapRoomDoorType()
local with2 = with1.door[j]
--
-- Get #ff, , .location.x
with2.location.x = readInt(ff)
-- Get #ff, , .location.y
with2.location.y = readInt(ff)
-- Get #ff, , .codes
with2.codes = readInt(ff)
--
-- If .codes > 0 Then
if with2.codes > 0 then
--
-- .code = CAllocate( .codes * Len( Integer ) )
with2.code = {}
-- For k = 0 To .codes - 1
for k = 0, with2.codes - 1 do
-- Get #ff, , .code[k]
with2.code[k] = readInt(ff)
--
-- Next
end
--
-- End If
end
--
-- Get #ff, , .id
with2.id = readInt(ff)
--
-- End With
--
-- Next
end
--
-- End With
--
-- Next
end
end
--
-- End With
--
-- Close #ff
--
-- Return res
return res
--
-- End Function
end
|
local pm = require'jet.daemon.path_matcher'
describe(
'The jet.daemon.path_matcher module',
function()
describe('An exact path matcher',function()
local match
setup(function()
local path_matcher = pm.new({
path = {
equals = 'somepath'
}
})
match = path_matcher
end)
it('matches',function()
assert.is_truthy(match('somepath'))
end)
it('mismatches',function()
assert.is_falsy(match('somePath'))
assert.is_falsy(match('somepathsomepath'))
assert.is_falsy(match('some*path'))
assert.is_falsy(match('1somepath'))
assert.is_falsy(match('somepath3'))
end)
end)
describe('An case insensitive exact path matcher',function()
local match
setup(function()
local path_matcher = pm.new({
path = {
equals = 'somePATH',
caseInsensitive = true
},
})
match = function(path)
return path_matcher(path,path:lower())
end
end)
it('matches',function()
assert.is_truthy(match('somepath'))
assert.is_truthy(match('somePath'))
assert.is_truthy(match('somePATH'))
end)
it('mismatches',function()
assert.is_falsy(match('somepathsomepath'))
assert.is_falsy(match('some*path'))
end)
end)
describe('Multiple exact path matcher',function()
local match
setup(function()
match = pm.new({
path = {
equalsOneOf = {
'somepath',
'foobar',
}
}
})
end)
it('matches',function()
assert.is_truthy(match('somepath'))
assert.is_truthy(match('foobar'))
end)
it('mismatches',function()
assert.is_falsy(match('somePath'))
assert.is_falsy(match('somepathsomepath'))
assert.is_falsy(match('some*path'))
assert.is_falsy(match('^somepath'))
assert.is_falsy(match('^somepath$'))
end)
end)
describe('A partial path matcher',function()
local match
setup(function()
match = pm.new({
path = {
contains = 'somewhere'
}
})
end)
it('matches',function()
assert.is_truthy(match('somewhere'))
assert.is_truthy(match('somewhereA'))
assert.is_truthy(match('abcsomewhere123'))
assert.is_truthy(match('abcsomewhere'))
end)
it('mismatches',function()
assert.is_falsy(match('somePath'))
assert.is_falsy(match('someOOpath'))
assert.is_falsy(match('AAsomepath'))
assert.is_falsy(match('asomepathb'))
end)
end)
describe('A partial path matcher with exact unmatch',function()
local match
setup(function()
match = pm.new({
path = {
contains = 'somewhere',
equalsNot = 'abcsomewhere1234'
},
})
end)
it('matches',function()
assert.is_truthy(match('somewhere'))
assert.is_truthy(match('somewhereA'))
assert.is_truthy(match('abcsomewhere123'))
assert.is_truthy(match('abcsomewhere'))
end)
it('mismatches',function()
assert.is_falsy(match('abcsomewhere1234'))
assert.is_falsy(match('somePath'))
assert.is_falsy(match('someOOpath'))
assert.is_falsy(match('AAsomepath'))
assert.is_falsy(match('asomepathb'))
end)
end)
describe('A partial path matcher with partial unmatch',function()
local match
setup(function()
match = pm.new({
path = {
contains = 'somewhere',
containsNot = '1234'
}
})
end)
it('matches',function()
assert.is_truthy(match('somewhere'))
assert.is_truthy(match('somewhereA'))
assert.is_truthy(match('abcsomewhere123'))
assert.is_truthy(match('abcsomewhere'))
end)
it('mismatches',function()
assert.is_falsy(match('abcsomewhere1234'))
assert.is_falsy(match('1234somewhere'))
assert.is_falsy(match('somePath'))
assert.is_falsy(match('someOOpath'))
assert.is_falsy(match('AAsomepath'))
assert.is_falsy(match('asomepathb'))
end)
end)
describe('A left-bound partial path matcher',function()
local match
setup(function()
match = pm.new({
path = {
startsWith = 'somepath'
}
})
end)
it('matches',function()
assert.is_truthy(match('somepath'))
assert.is_truthy(match('somepathFoo'))
end)
it('mismatches',function()
assert.is_falsy(match('somePath'))
assert.is_falsy(match('someOOpath'))
assert.is_falsy(match('AAsomepath'))
assert.is_falsy(match('asomepathb'))
end)
end)
describe('Another left-bound partial path matcher',function()
local match
setup(function()
match = pm.new({
path = {
startsWith = 'bla/blub/a'
}
})
end)
it('matches',function()
assert.is_truthy(match('bla/blub/aha'))
assert.is_truthy(match('bla/blub/a'))
end)
it('mismatches',function()
assert.is_falsy(match('bla/blo'))
assert.is_falsy(match('abla/blub/aha'))
assert.is_falsy(match('bla/blub/'))
end)
end)
describe('A right-bound partial path matcher',function()
local match
setup(function()
match = pm.new({
path = {
endsWith = 'somepath'
}
})
end)
it('matches',function()
assert.is_truthy(match('somepath'))
assert.is_truthy(match('Foosomepath'))
end)
it('mismatches',function()
assert.is_falsy(match('somePath'))
assert.is_falsy(match('some*path'))
assert.is_falsy(match('somepathT'))
assert.is_falsy(match('asomepatho'))
end)
end)
end)
|
return {
menus = {
num_items = 2,
item_0 = {
title = "game",
num_items = 5,
item_0 = {
title = "menu_file",
num_items = 19,
item_0 = "menu_file_new",
item_1 = "menu_file_load",
item_2 = "menu_file_skip",
item_3 = "menu_file_previous",
item_4 = "menu_file_last_played",
item_5 = "__SEPARATOR__",
item_6 = "menu_file_open_data",
item_7 = "__SEPARATOR__",
item_8 = "menu_file_high_scores",
item_9 = "menu_file_global_high_scores",
item_10 = "__SEPARATOR__",
item_11 = "menu_file_enable_recording",
item_12 = "menu_file_save_recording",
item_13 = "menu_file_resume_recording",
item_14 = "menu_file_load_recording",
item_15 = "__SEPARATOR__",
item_16 = "menu_file_print",
item_17 = "__SEPARATOR__",
item_18 = "menu_file_exit"
},
item_1 = {
title = "menu_move",
num_items = 5,
item_0 = "menu_game_restart",
item_1 = "menu_game_undo",
item_2 = "menu_game_save_position",
item_3 = "menu_game_restore_position",
item_4 = "menu_game_replay"
},
item_2 = {
title = "menu_options",
num_items = 10,
item_0 = "menu_options_animation",
item_1 = "menu_options_sound",
item_2 = "menu_options_remember_last_level",
item_3 = "menu_options_skip_completed_levels",
item_4 = "menu_options_auto_record",
item_5 = "menu_options_disable_warnings",
item_6 = "__SEPARATOR__",
item_7 = "menu_options_size",
item_7_has_subitems = true,
item_7_subitems = {
num_items = 3,
item_0 = "menu_options_size_small",
item_1 = "menu_options_size_medium",
item_2 = "menu_options_size_large"
},
item_8 = "menu_options_difficulty",
item_9 = "menu_options_graphics"
},
item_3 = {
title = "menu_editor",
num_items = 0
},
item_4 = {
title = "menu_help",
num_items = 6,
item_0 = "menu_help_hint",
item_1 = "__SEPARATOR__",
item_2 = "menu_help_quick",
item_3 = "menu_help_index",
item_4 = "menu_help_changes",
item_5 = "menu_help_about"
}
},
item_1 = {
title = "editor",
num_items = 6,
item_0 = {
title = "editor_menu_editor",
num_items = 5,
item_0 = "editor_menu_editor_clear",
item_1 = "editor_menu_editor_load",
item_2 = "editor_menu_editor_save",
item_3 = "editor_menu_editor_save_as",
item_4 = "editor_menu_editor_exit"
},
item_1 = {
title = "editor_menu_hint",
num_items = 0
},
item_2 = {
title = "editor_menu_shift",
num_items = 4,
item_0 = "editor_menu_shift_right",
item_1 = "editor_menu_shift_left",
item_2 = "editor_menu_shift_up",
item_3 = "editor_menu_shift_down"
},
item_3 = {
title = "editor_menu_close",
num_items = 0
},
item_4 = {
title = "editor_menu_difficulty",
num_items = 5,
item_0 = "editor_menu_difficulty_kids",
item_1 = "editor_menu_difficulty_easy",
item_2 = "editor_menu_difficulty_medium",
item_3 = "editor_menu_difficulty_hard",
item_4 = "editor_menu_difficulty_deadly"
},
item_5 = {
title = "editor_menu_help",
num_items = 3,
item_0 = "editor_menu_help_editor",
item_1 = "editor_menu_help_creating_levels",
item_2 = "editor_menu_help_about"
}
}
}
}
|
local module = {
Name = "Toggle slock",
Description = "Toggles slock, player who is not admin will be kicked if slock is on",
Location = "Server",
}
local status = false
module.Execute = function(Client, Type, Attachment)
if Type == "command" then
status = not status
module.Remotes.Event:FireClient(Client, "newMessage", "", {From = "System; ServerLock", Content = "ServerLock status has been changed to " .. tostring(status)})
return true
elseif Type == "firstrun" then
module.API.registerPlayerAddedEvent(function(Client)
if not module.API.checkAdmin(Client.UserId) and status then
Client:Kick("\nThis server is server locked, consider join another server.")
end
end)
end
end
return module
|
PlayState = class{__includes = BaseState}
local PIPE_SPAWN_MAX_TIME = 2
function PlayState:init()
self.bird = Bird()
self.pipePairs = {}
self.pipeSpawnTimer = 0
self.score = 0
-- initialize last Y value for pipe gap placement
self.lastY = -PIPE_HEIGHT + math.random(80) + 20
end
function PlayState:update(dt)
self.pipeSpawnTimer = self.pipeSpawnTimer + dt
if self.pipeSpawnTimer >= PIPE_SPAWN_MAX_TIME then
-- Calculate Y of next PipePair based on lastY.
-- Y should be no higher than 10 pixels below the top edge of the screen,
-- and no lower than a gap length from the bottom.
local nextGapY = math.max(
-PIPE_HEIGHT + 10,
math.min(self.lastY + math.random(-20, 20), VIRTUAL_HEIGHT - PIPE_GAP_HEIGHT - PIPE_HEIGHT)
)
self.lastY = nextGapY
table.insert(self.pipePairs, PipePair(nextGapY))
self.pipeSpawnTimer = 0
end
for _, pair in pairs(self.pipePairs) do
if not pair.scored then
if pair.x + PIPE_WIDTH < self.bird.x then
self.score = self.score + 1
pair.scored = true
sounds["score"]:play()
end
end
pair:update(dt)
end
for k, pair in pairs(self.pipePairs) do
if pair.remove then
table.remove(self.pipePairs, k)
end
end
self.bird:update(dt)
for _, pair in pairs(self.pipePairs) do
for _, pipe in pairs(pair.pipes) do
if self.bird:collides(pipe) then
sounds["explosion"]:play()
sounds["hurt"]:play()
stateMachine:change("score", {score = self.score})
end
end
end
if self.bird.y > VIRTUAL_HEIGHT - 15 then
sounds["explosion"]:play()
sounds["hurt"]:play()
stateMachine:change("score", {score = self.score})
end
end
function PlayState:render()
for _, pair in pairs(self.pipePairs) do
pair:render()
end
love.graphics.setFont(flappyFont)
love.graphics.printf("Score: " .. tostring(self.score), 8, 8, VIRTUAL_WIDTH, "left")
self.bird:render()
end
|
local beautiful = require("beautiful")
local wibox = require("wibox")
local gears = require("gears")
local awful = require("awful")
local helpers = require("helpers")
local screen = screen.primary
local dpi = beautiful.xresources.apply_dpi
local centered = helpers.centered
local padded = helpers.padded
local eq_padded = helpers.equal_padded
-- Create a date widget using a format
local function date(format, fg_name, size)
local widget = {
format = helpers.markup_format(format, beautiful.font, size),
refresh = 1,
widget = wibox.widget.textclock
}
return helpers.themed(widget, nil, fg_name)
end
-- {{{ Text clock
local textclock_widget = padded(centered {
date("%I", "hour"),
date("%M", "minute"),
date('%S', "second"),
date('%p', "meridiem"),
spacing = dpi(5),
layout = wibox.layout.fixed.horizontal
}, 20, 20)
local textclock = helpers.themed(
textclock_widget, "bg", nil,
gears.shape.rounded_rect, beautiful.border_width)
-- }}}
-- {{{ Calendar
local calendar_widget = padded(
centered {
centered {
centered(date("%d", "day_number")),
centered(date("%b", "month_name", 12)),
spacing = dpi(5),
layout = wibox.layout.fixed.vertical
},
centered(date("%A", "day_name", 17)),
spacing = dpi(20),
layout = wibox.layout.fixed.horizontal
},
20, 20)
local calendar = helpers.themed(
calendar_widget, "bg", nil,
gears.shape.rounded_rect, beautiful.border_width)
-- }}}
-- Music widget {{{
local player_cover = wibox.widget {
image = beautiful.icon_path.."player/cover.png",
resize = true,
buttons = { -- Raise or spawn Spotify if clicked on the image
awful.button({}, 1, nil, function()
-- TODO implement it
end)
},
widget = wibox.widget.imagebox
}
local button_previous = helpers.create_button("玲",
helpers.spawner("playerctl previous"))
local button_next = helpers.create_button("怜",
helpers.spawner("playerctl next"))
local button_stop_play = helpers.create_button("契",
helpers.spawner("playerctl play-pause"))
local player_buttons = centered {
padded(button_previous),
padded(button_stop_play),
padded(button_next),
expand = "inside",
spacing = dpi(5),
layout = wibox.layout.fixed.horizontal
}
local player_text_widget = wibox.widget {
markup = helpers.markup_format("Not playing", beautiful.font, 9),
align = "center",
valign = "center",
ellipsize = "end",
forced_height = dpi(12),
widget = wibox.widget.textbox
}
local player_text = helpers.themed(player_text_widget, nil, "fg")
-- Text update
awesome.connect_signal("player_text_update", function(text)
player_text_widget:set_markup_silently(
helpers.markup_format(text, beautiful.font, 9))
end)
-- Cover update
awesome.connect_signal("player_cover_update", function(path)
player_cover.image = gears.surface.load_uncached(path)
end)
-- Stop pause update
awesome.connect_signal("player_status_update", function(status)
local symbol = status == "Playing" and "" or "契"
button_stop_play.icon:set_markup_silently(
helpers.markup_format(symbol, beautiful.icon_font, 20))
end)
local music_player_widget =
centered {
padded({
player_cover,
bg = beautiful.theme[theme_name].bg,
shape = gears.shape.rounded_rect,
widget = wibox.container.background,
border_width = 0
}, 20, 10, 20, 20),
padded(player_text, 0, 0),
padded(player_buttons),
spacing = dpi(5),
widget = wibox.layout.fixed.vertical
}
-- Final music player
local music_player = helpers.themed(
music_player_widget, "bg", nil,
gears.shape.rounded_rect, beautiful.border_width)
-- }}}
-- Weather {{{
local weather_text_widget = wibox.widget {
markup = helpers.markup_format("unknown", beautiful.font, 11),
align = "center",
valigin = "center",
widget = wibox.widget.textbox
}
local weather_text = helpers.themed(weather_text_widget, nil, "weather_cond")
local weather_temperature_widget = wibox.widget {
markup = helpers.markup_format("-", beautiful.font, 20)
..helpers.markup_format("°C", beautiful.font, 18),
align = "center",
valigin = "center",
widget = wibox.widget.textbox
}
local weather_temperature = helpers.themed(weather_temperature_widget, nil, "weather_temp")
local weather_icon_widget = wibox.widget {
markup = helpers.markup_format("", beautiful.icon_font, 20),
align = "center",
valigin = "center",
widget = wibox.widget.textbox
}
local weather_icon = helpers.themed(weather_icon_widget, nil, "fg")
-- Weather update
awesome.connect_signal("weather_update", function(text, temperature, emoji)
weather_text_widget:set_markup_silently(
helpers.markup_format(text, beautiful.font, 11))
weather_temperature_widget:set_markup_silently(
helpers.markup_format(temperature, beautiful.font, 20)
..helpers.markup_format("°C", beautiful.font, 18))
weather_icon.widget:set_markup_silently(
helpers.markup_format(emoji, beautiful.icon_font, 20))
end)
-- Update script
weather_script = [[
bash -c '
fallback=":unknown:-";
var=$(curl -s "wttr.in/grenoble?format=%c:%C:%t" 2>/dev/null);
case "$var" in
*HTML* | "" | *Unknown*)
var="$fallback"
;;
esac
echo "$var"
'
]]
-- Update function
local function fetch_weather()
awful.spawn.easy_async_with_shell(
weather_script,
function(stdout)
local out = stdout:gsub("[\r\n]", "")
local emoji, text, temp = out:match("(.+):(.+):(.+)")
temp = temp:gsub("°C", "") -- remove trailing degree
awesome.emit_signal("weather_update", text, temp, emoji)
end)
end
local weather_widget =
centered(padded({
centered {
weather_icon,
weather_temperature,
spacing = dpi(20),
layout = wibox.layout.fixed.horizontal
},
weather_text,
spacing = dpi(5),
layout = wibox.layout.fixed.vertical
}, 20, 20))
-- Final widget
local weather = helpers.themed(
weather_widget, "bg", nil,
gears.shape.rounded_rect, beautiful.border_width)
-- }}}
-- {{{ Button line
local monitor_popup = require("monitors")
local suspend = helpers.create_button_widget("鈴",
helpers.spawner("systemctl suspend"),
helpers.spawner(script_path.."lock"))
local theme = helpers.create_button_widget("",
helpers.spawner(script_path.."color"))
local monitors = helpers.create_button_widget("类",
function() monitor_popup:toggle() end)
-- Update theme button icon according to the current theme
local theme_icon = theme.icon
awesome.connect_signal("theme_change", function(theme)
local icon = theme == "day" and "" or ""
theme_icon:set_markup_silently(
helpers.markup_format(icon, beautiful.icon_font, 20))
end)
local button_line = {
suspend,
theme,
monitors,
spacing = dpi(5),
layout = wibox.layout.flex.horizontal
}
-- }}}
-- {{{ Final panel
local panel_width = dpi(250)
local panel_heigth = dpi(750)
local panel = wibox {
screen = screen,
x = 50, -- Junk values
y = 50, -- Will be set later mebbe
width = panel_width,
height = panel_heigth,
bg = "#00000000", -- for anti-aliasing
type = "popup_menu",
visible = false,
ontop = true
}
-- Setting up the anti-aliased widget
local panel_widget = wibox.widget {
eq_padded(textclock, dpi(2.5)),
eq_padded(music_player, dpi(2.5)),
eq_padded(calendar, dpi(2.5)),
eq_padded(weather, dpi(2.5)),
eq_padded(button_line, dpi(2.5)),
layout = wibox.layout.ratio.vertical
}
local panel_ratio = {0.15, 0.45, 0.15, 0.15, 0.1}
for i=1, 5 do
panel_widget:set_ratio(i, panel_ratio[i])
end
panel:setup {
panel_widget,
bg = beautiful.transparent,
widget = wibox.container.background(),
border_width = 0 -- we just want the compositor shadow
}
-- CLick actions
panel:connect_signal("mouse::leave",
function ()
panel.visible = false
end)
-- Toggling method
function panel:toggle()
-- show on the correct screen
local geometry = awful.screen.focused().geometry
panel:geometry {
x = geometry.x + 50,
y = geometry.y + geometry.height/2 - panel_heigth/2
}
-- Update metadata
fetch_weather()
-- Toggle it
panel.visible = not panel.visible
end
-- Hide when workspace switch
tag.connect_signal("property::selected", function(_)
panel.visible = false
end)
-- }}}
return panel
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
local K, C, L = unpack(select(2, ...))
if C.Unitframe.Enable ~= true then return end
local _, ns = ...
local config = ns.config
local oUF = ns.oUF or oUF
-- Lua API
local _G = _G
local pairs = pairs
local print = print
local select = select
local table_insert = table.insert
local unpack = unpack
-- Wow API
local CLASS_ICON_TCOORDS = _G.CLASS_ICON_TCOORDS
local CreateFrame = _G.CreateFrame
local ERR_NOT_IN_COMBAT = _G.ERR_NOT_IN_COMBAT
local GetThreatStatusColor = _G.GetThreatStatusColor
local GetTime = _G.GetTime
local InCombatLockdown = _G.InCombatLockdown
local MAX_BOSS_FRAMES = _G.MAX_BOSS_FRAMES
local UnitClass = _G.UnitClass
local UnitClassification = _G.UnitClassification
local UnitDetailedThreatSituation = _G.UnitDetailedThreatSituation
local UnitHasVehicleUI = _G.UnitHasVehicleUI
local UnitIsPlayer = _G.UnitIsPlayer
local UnitIsUnit = _G.UnitIsUnit
-- Global variables that we don"t cache, list them here for mikk"s FindGlobals script
-- GLOBALS: ComboPointPlayerFrame, math, UnitVehicleSkin, ComboFrame_Update, securecall
-- GLOBALS: TotemFrame, EclipseBarFrame, RuneFrame, PriestBarFrame, TotemFrame_Update
-- GLOBALS: EclipseBar_UpdateShown, PriestBarFrame_CheckAndShow, _ENV, UnitPowerBarAlt_Initialize
-- GLOBALS: SetPortraitTexture, oUF_KkthnxPet, SLASH_TEST_UF1
local textPath = "Interface\\AddOns\\KkthnxUI\\Media\\Unitframes\\"
local pathFat = textPath.."Fat\\"
local pathNormal = textPath.."Normal\\"
local Movers = K.Movers
-- Frame data
local DataNormal = {
targetTexture = {
elite = pathNormal .. "Target-Elite",
rareelite = pathNormal .. "Target-Rare-Elite",
rare = pathNormal .. "Target-Rare",
worldboss = pathNormal .. "Target-Elite",
normal = pathNormal .. "Target",
},
vehicle = {-- w = width, h = height, x offset, y offset, t=texture, j = justify, s = size, c=Texture Coordinates, p = point
siz = {w = 175, h = 42}, -- size
tex = {w = 240, h = 121, x = 0, y = -8, t = "Interface\\Vehicles\\UI-Vehicle-Frame", c = {0, 1, 0, 1}}, --texture
hpb = {w = 108, h = 9, x = 30, y = 1,}, --Healthbar
hpt = {x = 0, y = 1, j = "CENTER", s = 13}, -- Healthtext
mpb = {w = 108, h = 9, x = 0, y = 0,}, -- Mana bar
mpt = {x = 0, y = 0, j = "CENTER", s = 13}, -- Mana bar text
nam = {w = 110, h = 10, x = 0, y = 22, j = "CENTER", s = 12}, -- Name text
por = {w = 56, h = 56, x = -64, y = 10,}, -- Portrait
glo = {w = 242, h = 92, x = 13, y = 0, t = "Interface\\Vehicles\\UI-VEHICLE-FRAME-FLASH", c = {0, 1, 0, 1}}, -- Glow texture
},
vehicleorganic = {
siz = {w = 175, h = 42},
tex = {w = 240, h = 121, x = 0, y = -8, t = "Interface\\Vehicles\\UI-Vehicle-Frame-Organic", c = {0, 1, 0, 1}},
hpb = {w = 108, h = 9, x = 30, y = 1,},
hpt = {x = 0, y = 1, j = "CENTER", s = 13},
mpb = {w = 108, h = 9, x = 0, y = 0,},
mpt = {x = 0, y = 0, j = "CENTER", s = 13},
nam = {w = 110, h = 10, x = 0, y = 22, j = "CENTER", s = 12},
por = {w = 56, h = 56, x = -64, y = 10,},
glo = {w = 242, h = 92, x = 13, y = 0, t = "Interface\\Vehicles\\UI-VEHICLE-FRAME-ORGANIC-FLASH", c = {0, 1, 0, 1}},
},
player = {
siz = {w = 175, h = 42},
tex = {w = 232, h = 100, x = -20, y = -7, t = pathNormal.."Target", c = {1, 0.09375, 0, 0.78125}},
hpb = {w = 118, h = 19, x = 50, y = 16,},
hpt = {x = 0, y = 1, j = "CENTER", s = 13},
mpb = {w = 118, h = 20, x = 0, y = 0,},
mpt = {x = 0, y = 0, j = "CENTER", s = 13},
nam = {w = 110, h = 10, x = 0, y = 17, j = "CENTER", s = 12},
por = {w = 64, h = 64, x = -41, y = 6,},
glo = {w = 242, h = 92, x = 13, y = 0, t = pathNormal.."Target-Flash", c = {0.945, 0, 0, 0.182}},
},
target = {-- and focus
siz = {w = 175, h = 42},
tex = {w = 230, h = 100, x = 20, y = -7, t = pathNormal.."Target", c = {0.09375, 1, 0, 0.78125}},
hpb = {w = 118, h = 19, x = -50, y = 16,},
hpt = {x = 0, y = 1, j = "CENTER", s = 13},
mpb = {w = 118, h = 20, x = 0, y = 0,},
mpt = {x = 0, y = 0, j = "CENTER", s = 13},
nam = {w = 110, h = 10, x = 0, y = 17, j = "CENTER", s = 12},
por = {w = 64, h = 64, x = 41, y = 6,},
glo = {w = 239, h = 94, x = -24, y = 1, t = pathNormal.."Target-Flash", c = {0, 0.945, 0, 0.182}},
},
targettarget = {-- and focus target
siz = {w = 85, h = 20},
tex = {w = 128, h = 64, x = 16, y = -10, t = pathNormal.."TargetOfTarget", c = {0, 1, 0, 1}},
hpb = {w = 43, h = 6, x = 2, y = 14,},
hpt = {x = -2, y = 0, j = "CENTER", s = 10},
mpb = {w = 37, h = 7, x = -1, y = 0,},
nam = {w = 65, h = 10, x = 11, y = -18, j = "LEFT", s = 12},
por = {w = 40, h = 40, x = -40, y = 10,},
},
pet = {
siz = {w = 110, h = 37},
tex = {w = 128, h = 64, x = 4, y = -10, t = pathNormal.."Pet", c = {0, 1, 0, 1}},
hpb = {w = 69, h = 8, x = 16, y = 7,},
hpt = {x = 1, y = 1, j = "CENTER", s = 10},
mpb = {w = 69, h = 8, x = 0, y = 0,},
mpt = {x = 0, y = 0, j = "CENTER", s = 13},
--nam = {w = 110, h = 10, x = 20, y = 15, j = "LEFT", s = 14},
por = {w = 37, h = 37, x = -41, y = 10,},
glo = {w = 128, h = 64, x = -4, y = 12, t = pathNormal.."Party-Flash", c = {0, 1, 1, 0}},
},
party = {
siz = {w = 115, h = 35},
tex = {w = 128, h = 64, x = 2, y = -16, t = pathNormal.."Party", c = {0, 1, 0, 1}},
hpb = {w = 69, h = 7, x = 17, y = 17,},
hpt = {x = 1, y = 1, j = "CENTER", s = 10},
mpb = {w = 70, h = 7, x = 0, y = 0,},
mpt = {x = 0, y = -2, j = "CENTER", s = 12},
nam = {w = 110, h = 10, x = 0, y = 15, j = "CENTER", s = 12},
por = {w = 37, h = 37, x = -39, y = 7,},
glo = {w = 128, h = 63, x = -3, y = 4, t = pathNormal.."Party-Flash", c = {0, 1, 0, 1}},
},
boss = {
siz = {w = 132, h = 46},
tex = {w = 250, h = 129, x = 31, y = -24, t = pathNormal.."Boss", c = {0, 1, 0, 1}},
hpb = {w = 115, h = 9, x = -38, y = 17,},
hpt = {x = 0, y = 0, j = "CENTER", s = 13},
mpb = {w = 115, h = 8, x = 0, y = -3,},
mpt = {x = 0, y = 0, j = "CENTER", s = 13},
nam = {w = 110, h = 10, x = 0, y = 16, j = "CENTER", s = 12},
glo = {w = 241, h = 100, x = -2, y = 3, t = pathNormal.."Boss-Flash", c = {0.0, 0.945, 0.0, 0.73125}},
},
}
local DataFat = {
targetTexture = {
elite = pathFat .. "Target-Elite",
rareelite = pathFat .. "Target-Rare-Elite",
rare = pathFat .. "Target-Rare",
worldboss = pathFat .. "Target-Elite",
normal = pathFat .. "Target",
},
vehicle = DataNormal.vehicle,
vehicleorganic = DataNormal.vehicleorganic,
player = {
siz = {w = 176, h = 42},
tex = {w = 232, h = 100, x = -20, y = -7, t = pathFat.."Target", c = {1, 0.09375, 0, 0.78125}},
hpb = {w = 118, h = 26, x = 50, y = 13,},
hpt = {x = 0, y = 1, j = "CENTER", s = 13},
mpb = {w = 118, h = 14, x = 0, y = 0,},
mpt = {x = 0, y = 0, j = "CENTER", s = 13},
nam = {w = 110, h = 10, x = 50, y = 19, j = "CENTER", s = 12},
por = {w = 64, h = 64, x = -42, y = 7,},
glo = {w = 242, h = 92, x = 13, y = -1, t = pathFat.."Target-Flash", c = {0.945, 0, 0, 0.182}},
},
target = {
siz = {w = 176, h = 42},
tex = {w = 230, h = 100, x = 20, y = -7, t = pathFat.."Target", c = {0.09375, 1, 0, 0.78125}},
hpb = {w = 118, h = 26, x = -50, y = 13,},
hpt = {x = 0, y = 1, j = "CENTER", s = 13},
mpb = {w = 118, h = 14, x = 0, y = 0,},
mpt = {x = 0, y = 0, j = "CENTER", s = 13},
nam = {w = 110, h = 10, x = 0, y = 18, j = "CENTER", s = 12},
por = {w = 64, h = 64, x = 41, y = 6,},
glo = {w = 239, h = 94, x = -24, y = 1, t = pathNormal.."Target-Flash", c = {0, 0.945, 0, 0.182}},
},
targettarget = DataNormal.targettarget, --same for now
pet = {
siz = {w = 110, h = 37},
tex = {w = 128, h = 64, x = 4, y = -10, t = pathFat.."Pet", c = {0, 1, 0, 1}},
hpb = {w = 69, h = 12, x = 16, y = 9,},
hpt = {x = 1, y = 1, j = "CENTER", s = 13},
mpb = {w = 69, h = 8, x = 0, y = 0,},
mpt = {x = 0, y = 0, j = "CENTER", s = 13},
--nam = {w = 110, h = 10, x = 20, y = 15, j = "LEFT", s = 12},
por = {w = 37, h = 37, x = -41, y = 10,},
glo = {w = 128, h = 64, x = -4, y = 12, t = pathFat.."Party-Flash", c = {0, 1, 1, 0}},
},
party = {
siz = {w = 116, h = 35},
tex = {w = 128, h = 64, x = 2, y = -16, t = pathFat.."Party", c = {0, 1, 0, 1}},
hpb = {w = 69, h = 12, x = 17, y = 15,},
hpt = {x = 0, y = 1, j = "CENTER", s = 10},
mpb = {w = 70, h = 7, x = 0, y = 0,},
mpt = {x = 0, y = -1, j = "CENTER", s = 12},
nam = {w = 110, h = 10, x = 0, y = 15, j = "CENTER", s = 12},
por = {w = 37, h = 37, x = -39, y = 7,},
glo = {w = 128, h = 63, x = -3, y = 4, t = pathFat.."Party-Flash", c = {0, 1, 0, 1}},
},
boss = DataNormal.boss,
}
local function UpdateThreat(self)
local _, status, scaledPercent, _, _ = UnitDetailedThreatSituation("player", "target")
if (scaledPercent) then
local red, green, blue = GetThreatStatusColor(status)
self.NumericalThreat.bg:SetStatusBarColor(red, green, blue)
self.NumericalThreat.value:SetText(math.ceil(scaledPercent).."%")
if (not self.NumericalThreat:IsVisible()) then
self.NumericalThreat:Show()
end
else
if (self.NumericalThreat:IsVisible()) then
self.NumericalThreat:Hide()
end
end
end
local function GetDBUnit(MatchUnit)
if MatchUnit == "focus" then
return "target"
elseif MatchUnit == "focustarget" then
return "targettarget"
elseif MatchUnit == "player" then -- can player be vehicle? no it cant
if UnitHasVehicleUI("player") then
if (UnitVehicleSkin("player") == "Natural") then
return "vehicleorganic"
else
return "vehicle"
end
else
return "player"
end
end
return MatchUnit
end
local function GetData(MatchUnit)
local dbUnit = GetDBUnit(MatchUnit)
if (C.Unitframe.Style == "fat") then
return DataFat[dbUnit]
end
return DataNormal[dbUnit]
end
local function GetTargetTexture(MatchUnit, type)
local dbUnit = GetDBUnit(MatchUnit)
if dbUnit == "vehicle" or dbUnit == "vehicleorganic" then
return GetData(MatchUnit).tex.t
end
-- only "target", "focus" & "player" gets this far
local data = C.Unitframe.Style == "normal" and DataNormal.targetTexture or DataFat.targetTexture
if data[type] then
return data[type]
else
return data["normal"]
end
end
local function UpdatePlayerFrame(self, ...)
local data = GetData(self.MatchUnit)
local uconfig = ns.config[self.MatchUnit]
self.Texture:SetSize(data.tex.w, data.tex.h)
self.Texture:SetPoint("CENTER", self, data.tex.x, data.tex.y)
self.Texture:SetTexture(GetTargetTexture("player")) -- 1
self.Texture:SetTexCoord(unpack(data.tex.c))
self.Health:SetSize(data.hpb.w, data.hpb.h)
self.Health:SetPoint("CENTER", self.Texture, data.hpb.x, data.hpb.y)
self.Power:SetSize(data.mpb.w, data.mpb.h)
self.Power:SetPoint("TOPLEFT", self.Health, "BOTTOMLEFT", data.mpb.x, data.mpb.y)
self.Health.Value:SetPoint("CENTER", self.Health, data.hpt.x, data.hpt.y)
self.Power.Value:SetPoint("CENTER", self.Power, data.mpt.x, data.mpt.y)
self.Name:SetPoint("TOP", self.Health, data.nam.x, data.nam.y)
self.Name:SetSize(data.nam.w, data.nam.h)
self.Portrait:SetPoint("CENTER", self.Texture, data.por.x, data.por.y)
self.Portrait:SetSize(data.por.w, data.por.h)
if self.ThreatGlow then
self.ThreatGlow:SetSize(data.glo.w, data.glo.h)
self.ThreatGlow:SetPoint("TOPLEFT", self.Texture, data.glo.x, data.glo.y)
self.ThreatGlow:SetTexture(data.glo.t)
self.ThreatGlow:SetTexCoord(unpack(data.glo.c))
end
if (self.PvP) then
self.PvP:ClearAllPoints()
end
local inVehicle = UnitHasVehicleUI("player")
ComboFrame_Update(ComboPointPlayerFrame)
if inVehicle then
self.Name:Show()
self.Level:Hide()
self.LFDRole:SetAlpha(0)
self.PvP:SetPoint("TOPLEFT", self.Texture, 4, -28)
self.Leader:SetPoint("TOPLEFT", self.Texture, 23, -14)
self.MasterLooter:SetPoint("TOPLEFT", self.Texture, 74, -14)
self.RaidIcon:SetPoint("CENTER", self.Portrait, "TOP", 0, -5)
securecall("PlayerFrame_ShowVehicleTexture")
-- ComboPointPlayerFrame:Hide()
if (self.classPowerBar) then
self.classPowerBar:Hide()
end
TotemFrame:Hide()
if (K.Class == "SHAMAN") then
elseif (K.Class == "DRUID") then
EclipseBarFrame:Hide()
elseif (K.Class == "DEATHKNIGHT") then
RuneFrame:Hide()
elseif (K.Class == "PRIEST") then
PriestBarFrame:Hide()
end
else
self.Name:Hide()
self.Level:Show()
self.LFDRole:SetAlpha(1)
self.PvP:SetPoint("TOPLEFT", self.Texture, 23, -23)
self.Leader:SetPoint("TOPLEFT", self.Portrait, 3, 2)
self.MasterLooter:SetPoint("TOPRIGHT", self.Portrait, -3, 3)
self.RaidIcon:SetPoint("CENTER", self.Portrait, "TOP", 0, -1)
securecall("PlayerFrame_HideVehicleTexture")
-- ComboPointPlayerFrame:Show()
if (self.classPowerBar) then
self.classPowerBar:Setup()
end
TotemFrame_Update()
if (K.Class == "SHAMAN") then
elseif (K.Class == "DRUID") then
EclipseBar_UpdateShown(EclipseBarFrame)
elseif (K.Class == "DEATHKNIGHT") then
RuneFrame:Show()
elseif (K.Class == "PRIEST") then
PriestBarFrame_CheckAndShow()
end
end
end
local function UpdateUnitFrameLayout(frame)
local MatchUnit = frame.MatchUnit
local data = GetData(MatchUnit)
local uconfig = ns.config[MatchUnit]
-- Player frame, its special
if MatchUnit == "player" then
return UpdatePlayerFrame(frame)
elseif (not data) then
return
end
-- Frame Size
if not InCombatLockdown() and MatchUnit ~= "party" then
frame:SetSize(data.siz.w, data.siz.h)
frame:SetScale(C.Unitframe.Scale or 1)
end
-- Texture
frame.Texture:SetTexture(data.tex.t)
frame.Texture:SetSize(data.tex.w, data.tex.h)
frame.Texture:SetPoint("CENTER", frame, data.tex.x, data.tex.y)
frame.Texture:SetTexCoord(unpack(data.tex.c))
-- HealthBar
frame.Health:SetSize(data.hpb.w, data.hpb.h)
frame.Health:SetPoint("CENTER", frame.Texture, data.hpb.x, data.hpb.y)
-- ManaBar
frame.Power:SetSize(data.mpb.w, data.mpb.h)
frame.Power:SetPoint("TOPLEFT", frame.Health, "BOTTOMLEFT", data.mpb.x, data.mpb.y)
-- HealthText
frame.Health.Value:SetPoint("CENTER", frame.Health, data.hpt.x, data.hpt.y)
-- ManaText - not for tots
if frame.Power.Value then
frame.Power.Value:SetPoint("CENTER", frame.Power, data.mpt.x, data.mpt.y)
end
-- NameText
if frame.Name then
frame.Name:SetSize(data.nam.w, data.nam.h)
frame.Name:SetPoint("TOP", frame.Health, data.nam.x, data.nam.y)
end
-- Portrait
if frame.Portrait then
frame.Portrait:SetSize(data.por.w, data.por.h)
frame.Portrait:SetPoint("CENTER", frame.Texture, data.por.x, data.por.y)
end
-- Threat Glow -- if enabled
if frame.ThreatGlow then
frame.ThreatGlow:SetSize(data.glo.w, data.glo.h)
frame.ThreatGlow:SetPoint("TOPLEFT", frame.Texture, data.glo.x, data.glo.y)
frame.ThreatGlow:SetTexture(data.glo.t)
frame.ThreatGlow:SetTexCoord(unpack(data.glo.c))
end
end
function oUFKkthnx:UpdateBaseFrames(optUnit)
if InCombatLockdown() then return end
if optUnit and optUnit:find("%d") then
optUnit = optUnit:match("^.%a+")
end
for _, obj in pairs(oUF.objects) do
local unit = obj.MatchUnit
-- if obj.style == "oUF_Kkthnx" and unit and (not optUnit or optUnit == unit:match("^.%a+")) then
if unit and (not optUnit or optUnit == unit:match("^.%a+") or unit) then
UpdateUnitFrameLayout(obj)
end
end
end
local function CreateUnitLayout(self, unit)
self.MatchUnit = K.MatchUnit(unit)
self.IsMainFrame = K.MultiCheck(self.MatchUnit, "player", "target", "focus")
self.IsTargetFrame = K.MultiCheck(self.MatchUnit, "targettarget", "focustarget")
self.IsPartyFrame = self.MatchUnit:match("party")
self.IsBossFrame = self.MatchUnit:match("boss")
if (self.IsTargetFrame) then
self:SetFrameLevel(4)
end
-- Mouse Interraction
self:RegisterForClicks("AnyUp")
self:HookScript("OnEnter", K.UnitFrame_OnEnter)
self:HookScript("OnLeave", K.UnitFrame_OnLeave)
self.mouseovers = {}
if self.MatchUnit == "arena" then
return ns.createArenaLayout(self, unit)
end
local uconfig = ns.config[self.MatchUnit]
local data = GetData(self.MatchUnit)
-- Castbars
if C.Unitframe.Castbars then
if self.MatchUnit == "player" then
local CastBar = CreateFrame("StatusBar", "oUF_KkthnxPlayer_Castbar", self)
CastBar:SetFrameStrata(self:GetFrameStrata())
CastBar:SetStatusBarTexture(C.Media.Texture)
CastBar:SetFrameLevel(6)
CastBar:SetSize(C.Unitframe.CastbarWidth, C.Unitframe.CastbarHeight)
CastBar:SetPoint(unpack(C.Position.UnitFrames.PlayerCastbar))
K.CreateBorder(CastBar, -1)
CastBar.Background = CastBar:CreateTexture(nil, "BORDER")
CastBar.Background:SetAllPoints(CastBar)
CastBar.Background:SetTexture(C.Media.Blank)
CastBar.Background:SetVertexColor(C.Media.Backdrop_Color[1], C.Media.Backdrop_Color[2], C.Media.Backdrop_Color[3], C.Media.Backdrop_Color[4])
CastBar.Spark = CastBar:CreateTexture(nil, "OVERLAY")
CastBar.Spark:SetSize(C.Unitframe.CastbarHeight, C.Unitframe.CastbarHeight * 2)
CastBar.Spark:SetAlpha(0.6)
CastBar.Spark:SetBlendMode("ADD")
CastBar.Time = CastBar:CreateFontString(nil, "OVERLAY")
CastBar.Time:SetFont(C.Media.Font, C.Media.Font_Size)
CastBar.Time:SetShadowOffset(K.Mult, -K.Mult)
CastBar.Time:SetPoint("RIGHT", CastBar, "RIGHT", -4, 0)
CastBar.Time:SetHeight(C.Media.Font_Size)
CastBar.Time:SetTextColor(1, 1, 1)
CastBar.Time:SetJustifyH("RIGHT")
CastBar.Text = CastBar:CreateFontString(nil, "OVERLAY")
CastBar.Text:SetFont(C.Media.Font, C.Media.Font_Size)
CastBar.Text:SetShadowOffset(K.Mult, -K.Mult)
CastBar.Text:SetPoint("LEFT", CastBar, "LEFT", 2, 0)
CastBar.Text:SetPoint("RIGHT", CastBar.Time, "LEFT", -1, 0)
CastBar.Text:SetHeight(C.Media.Font_Size)
CastBar.Text:SetTextColor(1, 1, 1)
CastBar.Text:SetJustifyH("LEFT")
if (C.Unitframe.CastbarIcon) then
CastBar.Button = CreateFrame("Frame", nil, CastBar)
CastBar.Button:SetSize(26, 26)
K.CreateBorder(CastBar.Button, -1)
CastBar.Icon = CastBar.Button:CreateTexture(nil, "ARTWORK")
CastBar.Icon:SetPoint("RIGHT", CastBar, "LEFT", -8, 0)
CastBar.Icon:SetSize(CastBar:GetHeight(), CastBar:GetHeight())
CastBar.Icon:SetTexCoord(unpack(K.TexCoords))
CastBar.Button:SetAllPoints(CastBar.Icon)
end
if (C.Unitframe.CastbarLatency) then
CastBar.SafeZone = CastBar:CreateTexture(nil, "ARTWORK")
CastBar.SafeZone:SetTexture(C.Media.Texture)
CastBar.SafeZone:SetVertexColor(0.69, 0.31, 0.31, 0.75)
CastBar.Latency = K.SetFontString(CastBar, C.Media.Font, C.Media.Font_Size, "", "RIGHT")
CastBar.Latency:SetShadowOffset(K.Mult, -K.Mult)
CastBar.Latency:SetTextColor(1, 1, 1)
CastBar.Latency:SetPoint("TOPRIGHT", CastBar.Time, "BOTTOMRIGHT", 0, 0)
CastBar.Latency:SetJustifyH("RIGHT")
self:RegisterEvent("CURRENT_SPELL_CAST_CHANGED", function(self, event, caster)
if (caster == "player" or caster == "vehicle") then
CastBar.castSent = GetTime()
end
end)
end
CastBar.CustomDelayText = K.CustomDelayText
CastBar.CustomTimeText = K.CustomTimeText
CastBar.PostCastStart = K.PostCastStart
CastBar.PostChannelStart = K.PostCastStart
CastBar.PostCastStop = K.PostCastStop
CastBar.PostChannelStop = K.PostCastStop
CastBar.PostChannelUpdate = K.PostChannelUpdate
CastBar.PostCastInterruptible = K.PostCastInterruptible
CastBar.PostCastNotInterruptible = K.PostCastNotInterruptible
Movers:RegisterFrame(CastBar)
self.Castbar = CastBar
elseif self.MatchUnit == "target" then
local CastBar = CreateFrame("StatusBar", "oUF_KkthnxTarget_Castbar", self)
CastBar:SetFrameStrata(self:GetFrameStrata())
CastBar:SetStatusBarTexture(C.Media.Texture)
CastBar:SetFrameLevel(6)
CastBar:SetSize(C.Unitframe.CastbarWidth, C.Unitframe.CastbarHeight)
CastBar:SetPoint(unpack(C.Position.UnitFrames.TargetCastbar))
K.CreateBorder(CastBar, -1)
local Spark = CastBar:CreateTexture(nil, "OVERLAY")
Spark:SetSize(C.Unitframe.CastbarHeight, C.Unitframe.CastbarHeight * 2)
Spark:SetAlpha(0.6)
Spark:SetBlendMode("ADD")
CastBar.Spark = Spark
CastBar.Background = CastBar:CreateTexture(nil, "BORDER")
CastBar.Background:SetAllPoints(CastBar)
CastBar.Background:SetTexture(C.Media.Blank)
CastBar.Background:SetVertexColor(C.Media.Backdrop_Color[1], C.Media.Backdrop_Color[2], C.Media.Backdrop_Color[3], C.Media.Backdrop_Color[4])
CastBar.Shield = CastBar:CreateTexture(nil, "OVERLAY")
CastBar.Shield:SetTexture[[Interface\AddOns\KkthnxUI\Media\Textures\CastBorderShield]]
CastBar.Shield:SetPoint("LEFT", CastBar, "RIGHT", -4, 12)
CastBar.Time = CastBar:CreateFontString(nil, "OVERLAY")
CastBar.Time:SetFont(C.Media.Font, C.Media.Font_Size)
CastBar.Time:SetShadowOffset(K.Mult, -K.Mult)
CastBar.Time:SetPoint("RIGHT", CastBar, "RIGHT", -4, 0)
CastBar.Time:SetHeight(C.Media.Font_Size)
CastBar.Time:SetTextColor(1, 1, 1)
CastBar.Time:SetJustifyH("RIGHT")
CastBar.Text = CastBar:CreateFontString(nil, "OVERLAY")
CastBar.Text:SetFont(C.Media.Font, C.Media.Font_Size)
CastBar.Text:SetShadowOffset(K.Mult, -K.Mult)
CastBar.Text:SetPoint("LEFT", CastBar, "LEFT", 2, 0)
CastBar.Text:SetPoint("RIGHT", CastBar.Time, "LEFT", -1, 0)
CastBar.Text:SetHeight(C.Media.Font_Size)
CastBar.Text:SetTextColor(1, 1, 1)
CastBar.Text:SetJustifyH("LEFT")
if (C.Unitframe.CastbarIcon) then
CastBar.Button = CreateFrame("Frame", nil, CastBar)
CastBar.Button:SetSize(26, 26)
K.CreateBorder(CastBar.Button, -1)
CastBar.Icon = CastBar.Button:CreateTexture(nil, "ARTWORK")
CastBar.Icon:SetPoint("RIGHT", CastBar, "LEFT", -8, 0)
CastBar.Icon:SetSize(CastBar:GetHeight(), CastBar:GetHeight())
CastBar.Icon:SetTexCoord(unpack(K.TexCoords))
CastBar.Button:SetAllPoints(CastBar.Icon)
end
CastBar.CustomDelayText = K.CustomDelayText
CastBar.CustomTimeText = K.CustomTimeText
CastBar.PostCastStart = K.PostCastStart
CastBar.PostChannelStart = K.PostCastStart
CastBar.PostCastStop = K.PostCastStop
CastBar.PostChannelStop = K.PostCastStop
CastBar.PostChannelUpdate = K.PostChannelUpdate
CastBar.PostCastInterruptible = K.PostCastInterruptible
CastBar.PostCastNotInterruptible = K.PostCastNotInterruptible
Movers:RegisterFrame(CastBar)
self.Castbar = CastBar
elseif self.MatchUnit == "focus" then
local CastBar = CreateFrame("StatusBar", "oUF_KkthnxFocus_Castbar", self)
CastBar:SetPoint("LEFT", 0, 0)
CastBar:SetPoint("RIGHT", -20, 0)
CastBar:SetPoint("TOP", 0, 60)
CastBar:SetHeight(18)
CastBar:SetStatusBarTexture(C.Media.Texture)
CastBar:SetFrameLevel(6)
K.CreateBorder(CastBar, -1)
CastBar.Background = CastBar:CreateTexture(nil, "BORDER")
CastBar.Background:SetAllPoints(CastBar)
CastBar.Background:SetTexture(C.Media.Blank)
CastBar.Background:SetVertexColor(C.Media.Backdrop_Color[1], C.Media.Backdrop_Color[2], C.Media.Backdrop_Color[3], C.Media.Backdrop_Color[4])
CastBar.Time = CastBar:CreateFontString(nil, "OVERLAY")
CastBar.Time:SetFont(C.Media.Font, C.Media.Font_Size)
CastBar.Time:SetShadowOffset(K.Mult, -K.Mult)
CastBar.Time:SetPoint("RIGHT", CastBar, "RIGHT", -4, 0)
CastBar.Time:SetHeight(C.Media.Font_Size)
CastBar.Time:SetTextColor(1, 1, 1)
CastBar.Time:SetJustifyH("RIGHT")
CastBar.Text = CastBar:CreateFontString(nil, "OVERLAY")
CastBar.Text:SetFont(C.Media.Font, C.Media.Font_Size)
CastBar.Text:SetShadowOffset(K.Mult, -K.Mult)
CastBar.Text:SetPoint("LEFT", CastBar, "LEFT", 2, 0)
CastBar.Text:SetPoint("RIGHT", CastBar.Time, "LEFT", -1, 0)
CastBar.Text:SetHeight(C.Media.Font_Size)
CastBar.Text:SetTextColor(1, 1, 1)
CastBar.Text:SetJustifyH("LEFT")
CastBar.Button = CreateFrame("Frame", nil, CastBar)
CastBar.Button:SetSize(CastBar:GetHeight(), CastBar:GetHeight())
CastBar.Button:SetPoint("LEFT", CastBar, "RIGHT", 8, 0)
K.CreateBorder(CastBar.Button, -1)
CastBar.Icon = CastBar.Button:CreateTexture(nil, "ARTWORK")
CastBar.Icon:SetAllPoints()
CastBar.Icon:SetTexCoord(unpack(K.TexCoords))
CastBar.CustomDelayText = K.CustomDelayText
CastBar.CustomTimeText = K.CustomTimeText
CastBar.PostCastStart = K.PostCastStart
CastBar.PostChannelStart = K.PostCastStart
CastBar.PostCastStop = K.PostCastStop
CastBar.PostChannelStop = K.PostCastStop
CastBar.PostChannelUpdate = K.PostChannelUpdate
CastBar.PostCastInterruptible = K.PostCastInterruptible
CastBar.PostCastNotInterruptible = K.PostCastNotInterruptible
self.Castbar = CastBar
self.Castbar.Icon = CastBar.Icon
elseif self.IsBossFrame then
local CastBar = CreateFrame("StatusBar", "oUF_KkthnxBoss_Castbar", self)
CastBar:SetPoint("RIGHT", -138, 0)
CastBar:SetPoint("LEFT", 0, 10)
CastBar:SetPoint("LEFT", -138, 8)
CastBar:SetHeight(16)
CastBar:SetStatusBarTexture(C.Media.Texture)
CastBar:SetFrameLevel(6)
K.CreateBorder(CastBar, -1)
CastBar.Background = CastBar:CreateTexture(nil, "BORDER")
CastBar.Background:SetAllPoints(CastBar)
CastBar.Background:SetTexture(C.Media.Blank)
CastBar.Background:SetVertexColor(C.Media.Backdrop_Color[1], C.Media.Backdrop_Color[2], C.Media.Backdrop_Color[3], C.Media.Backdrop_Color[4])
CastBar.Time = CastBar:CreateFontString(nil, "OVERLAY")
CastBar.Time:SetFont(C.Media.Font, C.Media.Font_Size)
CastBar.Time:SetShadowOffset(K.Mult, -K.Mult)
CastBar.Time:SetPoint("RIGHT", CastBar, "RIGHT", -4, 0)
CastBar.Time:SetHeight(C.Media.Font_Size)
CastBar.Time:SetTextColor(1, 1, 1)
CastBar.Time:SetJustifyH("RIGHT")
CastBar.Text = CastBar:CreateFontString(nil, "OVERLAY")
CastBar.Text:SetFont(C.Media.Font, C.Media.Font_Size)
CastBar.Text:SetShadowOffset(K.Mult, -K.Mult)
CastBar.Text:SetPoint("LEFT", CastBar, "LEFT", 2, 0)
CastBar.Text:SetPoint("RIGHT", CastBar.Time, "LEFT", -1, 0)
CastBar.Text:SetHeight(C.Media.Font_Size)
CastBar.Text:SetTextColor(1, 1, 1)
CastBar.Text:SetJustifyH("LEFT")
CastBar.Button = CreateFrame("Frame", nil, CastBar)
CastBar.Button:SetSize(CastBar:GetHeight(), CastBar:GetHeight())
CastBar.Button:SetPoint("RIGHT", CastBar, "LEFT", -8, 0)
K.CreateBorder(CastBar.Button, -1)
CastBar.Icon = CastBar.Button:CreateTexture(nil, "ARTWORK")
CastBar.Icon:SetAllPoints()
CastBar.Icon:SetTexCoord(unpack(K.TexCoords))
CastBar.CustomDelayText = K.CustomDelayText
CastBar.CustomTimeText = K.CustomTimeText
CastBar.PostCastStart = K.PostCastStart
CastBar.PostChannelStart = K.PostCastStart
CastBar.PostCastStop = K.PostCastStop
CastBar.PostChannelStop = K.PostCastStop
CastBar.PostChannelUpdate = K.PostChannelUpdate
CastBar.PostCastInterruptible = K.PostCastInterruptible
CastBar.PostCastNotInterruptible = K.PostCastNotInterruptible
self.Castbar = CastBar
self.Castbar.Icon = CastBar.Icon
end
end
-- Textures
self.Texture = self:CreateTexture(nil, "BORDER")
if C.Blizzard.ColorTextures == true then
self.Texture:SetVertexColor(C.Blizzard.TexturesColor[1], C.Blizzard.TexturesColor[2], C.Blizzard.TexturesColor[3])
end
self.Texture:SetDrawLayer("BORDER", 3)
-- Healthbar
self.Health = K.CreateStatusBar(self, false)
self.Health:SetFrameLevel(self:GetFrameLevel() - 1)
table_insert(self.mouseovers, self.Health)
self.Health.PostUpdate = K.PostUpdateHealth
self.Health.frequentUpdates = true
if C.Unitframe.Smooth then
self.Health.Smooth = true
end
self.Health.colorTapping = true
self.Health.colorDisconnected = true
if C.Unitframe.ClassColor then
self.Health.colorClass = true
end
self.Health.colorReaction = true
-- Health text
if self.IsPartyFrame or self.IsTargetFrame then
self.Health.Value = K.SetFontString(self, C.Media.Font, 11, nil, "CENTER")
else
self.Health.Value = K.SetFontString(self, C.Media.Font, 13, nil, "CENTER")
end
-- Power bar
self.Power = K.CreateStatusBar(self, false)
self.Power:SetFrameLevel(self:GetFrameLevel() - 1)
table_insert(self.mouseovers, self.Power)
self.Power.frequentUpdates = self.MatchUnit == "player" or self.MatchUnit == "boss"
self.Power.PostUpdate = K.PostUpdatePower
self.Power.colorPower = true
if C.Unitframe.Smooth then
self.Power.Smooth = true
end
-- Power Text
if (data.mpt) then
if self.IsPartyFrame or self.IsTargetFrame then
self.Power.Value = K.SetFontString(self, C.Media.Font, 11, nil, "CENTER")
else
self.Power.Value = K.SetFontString(self, C.Media.Font, 13, nil, "CENTER")
end
end
-- Name Text
if data.nam then
self.Name = K.SetFontString(self, C.Media.Font, 13, nil, "CENTER")
self.Name:SetShadowOffset(K.Mult, -K.Mult)
self:Tag(self.Name, "[KkthnxUI:GetNameColor][KkthnxUI:NameMedium]")
end
-- Name Text Party
if data.nam and self.IsPartyFrame and C.Unitframe.Party == true then
self.Name = K.SetFontString(self, C.Media.Font, 13, nil, "CENTER")
self.Name:SetShadowOffset(K.Mult, -K.Mult)
self:Tag(self.Name, "[KkthnxUI:GetNameColor][KkthnxUI:NameShort]")
-- Name text targettarget
elseif data.nam and self.IsTargetFrame then
self.Name = K.SetFontString(self, C.Media.Font, 12, nil, "LEFT")
self.Name:SetShadowOffset(K.Mult, -K.Mult)
self:Tag(self.Name, "[KkthnxUI:GetNameColor][KkthnxUI:NameShort]")
elseif data.nam and self.IsBossFrame then
self.Name = K.SetFontString(self, C.Media.Font, 13, nil, "CENTER")
self.Name:SetShadowOffset(K.Mult, -K.Mult)
self:Tag(self.Name, "[KkthnxUI:NameMedium]")
end
-- Portrait
if data.por then
self.Portrait = self.Health:CreateTexture(nil, "BACKGROUND")
self.Portrait.Override = function(self, event, unit)
if (not unit or not UnitIsUnit(self.unit, unit)) then return end
local portrait = self.Portrait
local _, class = UnitClass(self.unit)
if C.Unitframe.ClassPortraits and UnitIsPlayer(unit) and class then
portrait:SetTexCoord(unpack(CLASS_ICON_TCOORDS[class]))
portrait:SetTexture[[Interface\TargetingFrame\UI-Classes-Circles]]
else
portrait:SetTexCoord(0, 1, 0, 1)
SetPortraitTexture(portrait, unit)
end
end
end
-- Threat glow
if (C.Unitframe.ThreatGlow) and (data.glo) then
self.ThreatGlow = self:CreateTexture(nil, "BACKGROUND", -1)
end
if (self.IsMainFrame) then
-- Level text
self.Level = self:CreateFontString(nil, "ARTWORK")
self.Level:SetFont(C.Media.Font, C.Media.Font_Size)
self.Level:SetShadowOffset(K.Mult, -K.Mult)
self.Level:SetPoint("CENTER", self.Texture, (self.MatchUnit == "player" and -63) or 63, -15.5)
self:Tag(self.Level, "[KkthnxUI:DifficultyColor][KkthnxUI:Level]")
-- PvP Icon
self.PvP = self:CreateTexture(nil, "OVERLAY")
self.PvP:SetSize(30, 30)
self.PvP:SetPoint("TOPRIGHT", self.Texture, -23, -23)
self.PvP.Prestige = self:CreateTexture(nil, "ARTWORK")
self.PvP.Prestige:SetSize(50, 52)
self.PvP.Prestige:SetPoint("CENTER", self.PvP, "CENTER")
local mhpb = self.Health:CreateTexture(nil, "ARTWORK")
mhpb:SetTexture(C.Media.Texture)
mhpb:SetVertexColor(0, 1, 0.5, 0.25)
mhpb:SetWidth(self.Health:GetWidth())
mhpb:Hide()
local ohpb = self.Health:CreateTexture(nil, "ARTWORK")
ohpb:SetTexture(C.Media.Texture)
ohpb:SetVertexColor(0, 1, 0, 0.25)
ohpb:SetWidth(self.Health:GetWidth())
ohpb:Hide()
local ahpb = self.Health:CreateTexture(nil, "ARTWORK")
ahpb:SetTexture(C.Media.Texture)
ahpb:SetVertexColor(1, 1, 0, 0.25)
ahpb:Hide()
self.HealPrediction = {
myBar = mhpb,
otherBar = ohpb,
absorbBar = ahpb,
maxOverflow = 1,
frequentUpdates = true
}
-- Combat CombatFeedbackText
if C.Unitframe.CombatText == true then
local CombatFeedbackText = self:CreateFontString(nil, "OVERLAY", 7)
CombatFeedbackText:SetFont(C.Media.Font, 16, "THINOUTLINE")
CombatFeedbackText:SetPoint("CENTER", self.Portrait)
CombatFeedbackText.colors = {
DAMAGE = {0.69, 0.31, 0.31},
CRUSHING = {0.69, 0.31, 0.31},
CRITICAL = {0.69, 0.31, 0.31},
GLANCING = {0.69, 0.31, 0.31},
STANDARD = {0.84, 0.75, 0.65},
IMMUNE = {0.84, 0.75, 0.65},
ABSORB = {0.84, 0.75, 0.65},
BLOCK = {0.84, 0.75, 0.65},
RESIST = {0.84, 0.75, 0.65},
MISS = {0.84, 0.75, 0.65},
HEAL = {0.33, 0.59, 0.33},
CRITHEAL = {0.33, 0.59, 0.33},
ENERGIZE = {0.31, 0.45, 0.63},
CRITENERGIZE = {0.31, 0.45, 0.63},
}
self.CombatFeedbackText = CombatFeedbackText
end
end
if (self.IsPartyFrame and C.Unitframe.Party == true) then
local mhpb = self.Health:CreateTexture(nil, "ARTWORK")
mhpb:SetTexture(C.Media.Texture)
mhpb:SetVertexColor(0, 1, 0.5, 0.6)
mhpb:SetWidth(self.Health:GetWidth())
local ohpb = self.Health:CreateTexture(nil, "ARTWORK")
ohpb:SetTexture(C.Media.Texture)
ohpb:SetVertexColor(0, 1, 0, 0.6)
ohpb:SetWidth(self.Health:GetWidth())
local ahpb = self.Health:CreateTexture(nil, "ARTWORK")
ahpb:SetTexture(C.Media.Texture)
ahpb:SetVertexColor(1, 1, 0, 0.6)
self.HealPrediction = {
myBar = mhpb,
otherBar = ohpb,
absorbBar = ahpb,
maxOverflow = 1,
frequentUpdates = true
}
end
-- Portrait Timer
if (C.Unitframe.PortraitTimer == true and self.Portrait) then
self.PortraitTimer = CreateFrame("Frame", nil, self.Health)
self.PortraitTimer.Icon = self.PortraitTimer:CreateTexture(nil, "BACKGROUND")
self.PortraitTimer.Icon:SetAllPoints(self.Portrait)
self.PortraitTimer.Remaining = K.SetFontString(self.PortraitTimer, C.Media.Font, data.por.w / 3, C.Media.Font_Style, "CENTER")
self.PortraitTimer.Remaining:SetShadowOffset(0, 0)
self.PortraitTimer.Remaining:SetPoint("CENTER", self.PortraitTimer.Icon)
self.PortraitTimer.Remaining:SetTextColor(1, 1, 1)
end
self.RaidIcon = self:CreateTexture(nil, "OVERLAY", self)
self.RaidIcon:SetTexture("Interface\\TargetingFrame\\UI-RaidTargetingIcons")
if self.MatchUnit == "boss" then
self.RaidIcon:SetPoint("CENTER", self, "TOPRIGHT", -9, -10)
self.RaidIcon:SetSize(26, 26)
self.Name.Bg = self.Health:CreateTexture(nil, "BACKGROUND")
self.Name.Bg:SetHeight(18)
self.Name.Bg:SetTexCoord(0.2, 0.8, 0.3, 0.85)
self.Name.Bg:SetPoint("BOTTOMRIGHT", self.Health, "TOPRIGHT")
self.Name.Bg:SetPoint("BOTTOMLEFT", self.Health, "TOPLEFT")
self.Name.Bg:SetTexture(C.Media.Texture)
-- Alt power bar
local altbar = _G["Boss"..unit:match("%d").."TargetFramePowerBarAlt"]
UnitPowerBarAlt_Initialize(altbar, unit, (1) * 0.5, "INSTANCE_ENCOUNTER_ENGAGE_UNIT")
altbar:SetParent(self)
altbar:ClearAllPoints()
altbar:SetPoint("TOPRIGHT", self, "TOPLEFT", 0, 5)
else
-- Icons
self.RaidIcon:SetPoint("CENTER", self.Portrait, "TOP", 0, -1)
self.RaidIcon:SetSize(data.por.w / 2.5, data.por.w / 2.5)
self.MasterLooter = self:CreateTexture(nil, "OVERLAY", self)
self.MasterLooter:SetSize(16, 16)
if (self.MatchUnit == "target" or self.MatchUnit == "focus") then
self.MasterLooter:SetPoint("TOPLEFT", self.Portrait, 3, 3)
elseif (self.IsTargetFrame) then
self.MasterLooter:SetPoint("CENTER", self.Portrait, "TOPLEFT", 3, -3)
elseif (self.IsPartyFrame) then
self.MasterLooter:SetSize(14, 14)
self.MasterLooter:SetPoint("TOPLEFT", self.Texture, 29, 0)
end
self.Leader = self:CreateTexture(nil, "OVERLAY", self)
self.Leader:SetSize(16, 16)
if (self.MatchUnit == "target" or self.MatchUnit == "focus") then
self.Leader:SetPoint("TOPRIGHT", self.Portrait, -3, 2)
elseif self.IsTargetFrame then
self.Leader:SetPoint("TOPLEFT", self.Portrait, -3, 4)
elseif self.IsPartyFrame then
self.Leader:SetSize(14, 14)
self.Leader:SetPoint("CENTER", self.Portrait, "TOPLEFT", 1, -1)
end
if self.IsMainFrame then
self.PhaseIcon = self:CreateTexture(nil, "OVERLAY")
self.PhaseIcon:SetPoint("CENTER", self.Portrait, "BOTTOM")
self.PhaseIcon:SetSize(26, 26)
end
self.OfflineIcon = self:CreateTexture(nil, "OVERLAY")
self.OfflineIcon:SetPoint("TOPRIGHT", self.Portrait, 7, 7)
self.OfflineIcon:SetPoint("BOTTOMLEFT", self.Portrait, -7, -7)
if (self.MatchUnit == "player" or self.IsPartyFrame) then
self.ReadyCheck = self:CreateTexture(nil, "OVERLAY")
self.ReadyCheck:SetPoint("TOPRIGHT", self.Portrait, -7, -7)
self.ReadyCheck:SetPoint("TOPRIGHT", self.Portrait, -7, -7)
self.ReadyCheck:SetPoint("BOTTOMLEFT", self.Portrait, 7, 7)
self.ReadyCheck.delayTime = 2
self.ReadyCheck.fadeTime = 0.7
end
if (self.IsPartyFrame or self.MatchUnit == "player" or self.MatchUnit == "target") then
self.LFDRole = self:CreateTexture(nil, "OVERLAY")
self.LFDRole:SetSize(20, 20)
if self.MatchUnit == "player" then
self.LFDRole:SetPoint("BOTTOMRIGHT", self.Portrait, -2, -3)
elseif unit == "target" then
self.LFDRole:SetPoint("TOPLEFT", self.Portrait, -10, -2)
else
self.LFDRole:SetPoint("BOTTOMLEFT", self.Portrait, -5, -5)
end
end
end
-- Update layout
UpdateUnitFrameLayout(self)
-- Player Frame
if self.MatchUnit == "player" then
self:SetSize(data.siz.w, data.siz.h)
self:SetScale(C.Unitframe.Scale or 1)
-- Combo Points
ComboPointPlayerFrame:ClearAllPoints()
ComboPointPlayerFrame:SetParent(self)
ComboPointPlayerFrame:SetPoint("TOP", self, "BOTTOM", 30, 2)
ComboPointPlayerFrame.SetPoint = K.Noop
if C.Blizzard.ColorTextures == true then
ComboPointPlayerFrame.Background:SetVertexColor(C.Blizzard.TexturesColor[1], C.Blizzard.TexturesColor[2], C.Blizzard.TexturesColor[3])
end
-- Totems
if C.UnitframePlugins.TotemsFrame == true and K.Class ~= "DEMONHUNTER" or K.Class ~= "PRIEST" or K.Class ~= "ROGUE" then
K.ClassModule:Totems(self)
end
-- Alternate Mana Bar
if C.UnitframePlugins.AdditionalPower and K.Class == "DRUID" or K.Class == "MONK" or K.Class == "PALADIN" or K.Class == "PRIEST" or K.Class == "SHAMAN" then
K.ClassModule:AlternatePowerBar(self)
end
-- Deathknight
if C.UnitframePlugins.RuneFrame and K.Class == "DEATHKNIGHT" then
K.ClassModule:RuneFrame(self)
end
-- Mage
if C.UnitframePlugins.ArcaneCharges and K.Class == "MAGE" then
K.ClassModule:ArcaneCharges(self)
end
-- Monk
if (C.UnitframePlugins.HarmonyBar or C.UnitframePlugins.StaggerBar) and K.Class == "MONK" then
K.ClassModule:StaggerBar(self)
end
-- Paladin
if C.UnitframePlugins.HolyPowerBar and K.Class == "PALADIN" then
K.ClassModule:HolyPowerBar(self)
end
-- Priest
if C.UnitframePlugins.InsanityBar and K.Class == "PRIEST" then
K.ClassModule:InsanityBar(self)
end
-- Warlock
if C.UnitframePlugins.ShardsBar and K.Class == "WARLOCK" then
K.ClassModule:ShardsBar(self)
end
-- Power Prediction Bar (Display estimated cost of spells when casting)
if C.Unitframe.PowerPredictionBar then
local mainBar, altBar
mainBar = CreateFrame("StatusBar", nil, self.Power)
mainBar:SetFrameLevel(self.Power:GetFrameLevel())
mainBar:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar-Glow]], "BORDER")
mainBar:GetStatusBarTexture():SetBlendMode("ADD")
mainBar:SetReverseFill(true)
mainBar:SetPoint"TOP"
mainBar:SetPoint"BOTTOM"
mainBar:SetPoint("RIGHT", self.Power:GetStatusBarTexture(), "RIGHT")
mainBar:SetWidth(self.Power:GetWidth())
mainBar:SetStatusBarColor(1, 1, 1, .3)
if self.AdditionalPower then
altBar = CreateFrame("StatusBar", nil, self.AdditionalPower)
altBar:SetFrameLevel(self.AdditionalPower:GetFrameLevel())
altBar:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar-Glow]], "BORDER")
altBar:GetStatusBarTexture():SetBlendMode("ADD")
altBar:SetReverseFill(true)
altBar:SetPoint"TOP"
altBar:SetPoint"BOTTOM"
altBar:SetPoint("RIGHT", self.AdditionalPower:GetStatusBarTexture(), "RIGHT")
altBar:SetWidth(self.AdditionalPower:GetWidth())
altBar:SetStatusBarColor(1, 1, 1, .3)
end
self.PowerPrediction = {
mainBar = mainBar,
altBar = altBar
}
end
-- PvP Timer
if (self.PvP) then
self.PvPTimer = K.SetFontString(self, C.Media.Font, 13, nil, "CENTER")
self.PvPTimer:SetShadowOffset(K.Mult, -K.Mult)
self.PvPTimer:SetTextColor(1, 0.819, 0)
self.PvPTimer:SetPoint("BOTTOM", self.PvP, "TOP", 0, 2)
self:Tag(self.PvPTimer, "[KkthnxUI:PvPTimer]")
end
-- GCD spark
if C.Unitframe.GCDBar == true and self.MatchUnit == "player" then
self.GCD = CreateFrame("Frame", self:GetName().."_GCD", self)
self.GCD:SetWidth(116)
self.GCD:SetHeight(3)
self.GCD:SetFrameStrata("HIGH")
self.GCD:SetPoint("BOTTOMLEFT", self.Health, "TOPLEFT", 0, 0)
self.GCD.Color = {1, 1, 1}
self.GCD.Height = K.Scale(4)
self.GCD.Width = K.Scale(8)
end
-- Swing bar
if C.Unitframe.SwingBar == true and self.MatchUnit == "player" then
self.Swing = CreateFrame("StatusBar", self:GetName().."_Swing", self)
self.Swing:CreateShadow()
self.Swing:SetPoint("TOPRIGHT", "oUF_KkthnxPlayer_Castbar", "BOTTOMRIGHT", 0, -4)
self.Swing:SetSize(C.Unitframe.CastbarWidth, 5)
self.Swing:SetStatusBarTexture(C.Media.Texture)
self.Swing:SetStatusBarColor(K.Color.r, K.Color.g, K.Color.b)
self.Swing.bg = self.Swing:CreateTexture(nil, "BORDER")
self.Swing.bg:SetAllPoints(self.Swing)
self.Swing.bg:SetTexture(C.Media.Blank)
self.Swing.bg:SetVertexColor(K.Color.r, K.Color.g, K.Color.b, 0.2)
self.Swing.Text = K.SetFontString(self.Swing, C.Media.Font, C.Media.Font_Size, C.Media.Font_Style, "CENTER")
self.Swing.Text:SetShadowOffset(0, 0)
self.Swing.Text:SetPoint("CENTER", 0, 0)
self.Swing.Text:SetTextColor(1, 1, 1)
Movers:RegisterFrame(self.Swing)
end
-- Combat icon
self.Combat = self:CreateTexture(nil, "OVERLAY")
self.Combat:SetPoint("CENTER", self.Level, 1, 0)
self.Combat:SetSize(31, 33)
-- Resting icon
self.Resting = self:CreateTexture(nil, "OVERLAY")
self.Resting:SetPoint("CENTER", self.Level, -0.5, 0)
self.Resting:SetSize(31, 34)
-- player frame vehicle/normal update
self:RegisterEvent("UNIT_ENTERED_VEHICLE", UpdatePlayerFrame)
self:RegisterEvent("UNIT_ENTERING_VEHICLE", UpdatePlayerFrame)
self:RegisterEvent("UNIT_EXITING_VEHICLE", UpdatePlayerFrame)
self:RegisterEvent("UNIT_EXITED_VEHICLE", UpdatePlayerFrame)
-- self:RegisterEvent("UPDATE_VEHICLE_ACTIONBAR", UpdatePlayerFrame)
end
-- </ Focus & Target Frame > --
if (self.MatchUnit == "target") then
-- Questmob Icon
self.QuestIcon = self:CreateTexture(nil, "OVERLAY")
self.QuestIcon:SetSize(22, 22)
self.QuestIcon:SetPoint("CENTER", self.Health, "TOPRIGHT", 2, 0)
table_insert(self.__elements, function(self, _, unit)
self.Texture:SetTexture(GetTargetTexture(self.MatchUnit, UnitClassification(unit)))
end)
end
if (self.MatchUnit == "player") then
if C.Unitframe.ThreatValue then
self.NumericalThreat = CreateFrame("Frame", nil, self)
self.NumericalThreat:SetSize(49, 18)
self.NumericalThreat:SetPoint("BOTTOM", self, "TOP", 0, 0)
self.NumericalThreat:Hide()
self.NumericalThreat.value = self.NumericalThreat:CreateFontString(nil, "OVERLAY", "GameFontHighlight")
self.NumericalThreat.value:SetPoint("TOP", 0, -4)
self.NumericalThreat.bg = CreateFrame("StatusBar", nil, self.NumericalThreat)
self.NumericalThreat.bg:SetStatusBarTexture(C.Media.Texture)
self.NumericalThreat.bg:SetFrameStrata("LOW")
self.NumericalThreat.bg:SetFrameLevel(2)
self.NumericalThreat.bg:SetPoint("TOP", 0, -3)
self.NumericalThreat.bg:SetSize(37, 14)
self.NumericalThreat.texture = self.NumericalThreat:CreateTexture(nil, "ARTWORK")
self.NumericalThreat.texture:SetPoint("TOP", 0, 0)
self.NumericalThreat.texture:SetTexture("Interface\\TargetingFrame\\NumericThreatBorder")
self.NumericalThreat.texture:SetTexCoord(0, 0.765625, 0, 0.5625)
self.NumericalThreat.texture:SetSize(49, 18)
self:RegisterEvent("UNIT_THREAT_LIST_UPDATE", UpdateThreat)
self:RegisterEvent("UNIT_THREAT_SITUATION_UPDATE", UpdateThreat)
self:RegisterEvent("PLAYER_REGEN_DISABLED", UpdateThreat)
self:RegisterEvent("PLAYER_REGEN_ENABLED", UpdateThreat)
self:RegisterEvent("PLAYER_TARGET_CHANGED", UpdateThreat)
end
end
-- Auras
if (self.MatchUnit == "focus") or (self.MatchUnit == "target") then
local isFocus = self.MatchUnit == "focus"
local function GetAuraData(mode)
local size, gap, columns, rows, initialAnchor, relAnchor, offX, offY
if (mode == "TOP") then
if isFocus then
columns, rows = 3, 3
else
columns, rows = 6, 3
end
initialAnchor, relAnchor, offX, offY = "BOTTOMLEFT", "TOPLEFT", -2, 24
elseif (mode == "BOTTOM") then
if isFocus then
columns, rows = 3, 3
else
columns, rows = 4, 3
end
initialAnchor, relAnchor, offX, offY = "TOPLEFT", "BOTTOMLEFT", -2, -8
elseif (mode == "LEFT") then
if isFocus then
columns, rows = 5, 3
else
columns, rows = 8, 3
end
initialAnchor, relAnchor, offX, offY = "TOPRIGHT", "TOPLEFT", -8, -2
end
size = isFocus and 26 or 20
gap = 4
return size, gap, columns, rows, initialAnchor, relAnchor, offX, offY
end
if (uconfig.buffPos == uconfig.debuffPos) and (uconfig.debuffPos ~= "NONE") then
local size, gap, columns, rows, initialAnchor, relAnchor, offX, offY = GetAuraData(uconfig.debuffPos)
self.Auras = K.AddAuras(self, initialAnchor, size, gap, columns, rows)
self.Auras:SetPoint(initialAnchor, self, relAnchor, offX, offY)
self.Auras.CustomFilter = K.CustomAuraFilters.target
else
if (uconfig.buffPos ~= "NONE") then
local size, gap, columns, rows, initialAnchor, relAnchor, offX, offY = GetAuraData(uconfig.buffPos)
self.Buffs = K.AddBuffs(self, initialAnchor, size, gap, columns, rows)
self.Buffs:SetPoint(initialAnchor, self, relAnchor, offX, offY)
self.Buffs.CustomFilter = K.CustomAuraFilters.target
end
if (uconfig.debuffPos ~= "NONE") then
local size, gap, columns, rows, initialAnchor, relAnchor, offX, offY = GetAuraData(uconfig.debuffPos)
self.Debuffs = K.AddDebuffs(self, initialAnchor, size, gap, columns, rows)
self.Debuffs:SetPoint(initialAnchor, self, relAnchor, offX, offY)
self.Debuffs.CustomFilter = K.CustomAuraFilters.target
end
end
elseif (self.IsTargetFrame and uconfig.enableAura) then
self.Debuffs = K.AddDebuffs(self, "TOPLEFT", 20, 4, 3, 2)
self.Debuffs:SetPoint("TOPLEFT", self.Health, "TOPRIGHT", 7, 10)
self.Debuffs.CustomFilter = K.CustomAuraFilters.target
elseif (self.MatchUnit == "pet") then
self.Debuffs = K.AddDebuffs(self, "TOPLEFT", 20, 4, 6, 1)
self.Debuffs:SetPoint("TOPLEFT", self.Power, "BOTTOMLEFT", 1, -2)
self.Debuffs.CustomFilter = K.CustomAuraFilters.pet
elseif (self.IsPartyFrame) then
self.Debuffs = K.AddDebuffs(self, "TOPLEFT", 20, 4, 4, 1)
self.Debuffs:SetPoint("TOPLEFT", self.Health, "TOPRIGHT", 5, 1)
self.Debuffs.CustomFilter = K.CustomAuraFilters.party
self.Buffs = K.AddBuffs(self, "TOPLEFT", 20, 4, 4, 1)
self.Buffs:SetPoint("TOPLEFT", self.Health, "BOTTOMLEFT", 2, -11)
self.Buffs.CustomFilter = K.CustomAuraFilters.party
elseif (self.MatchUnit == "boss") then
self.Buffs = K.AddBuffs(self, "TOPLEFT", 30, 4, 5, 1)
self.Buffs:SetPoint("TOPLEFT", self, "BOTTOMLEFT", 2, -6)
self.Debuffs = K.AddDebuffs(self, "TOPRIGHT", 30, 4, 7, 1)
self.Debuffs:SetPoint("TOPRIGHT", self, "BOTTOMLEFT", -34, 18)
self.Debuffs.CustomFilter = K.CustomAuraFilters.boss
end
-- Range Fader (We use oUF_SpellRange)
self.SpellRange = {
insideAlpha = 1,
outsideAlpha = C.UnitframePlugins.OORAlpha,
}
return self
end
local function FixPetUpdate(self, event, ...) -- Petframe doesnt always update correctly
oUF_KkthnxPet:GetScript("OnAttributeChanged")(oUF_KkthnxPet, "unit", "pet")
end
-- Spawn our frames.
oUF:RegisterStyle("oUF_Kkthnx", CreateUnitLayout)
oUF:SetActiveStyle("oUF_Kkthnx")
local player = oUF:Spawn("player", "oUF_KkthnxPlayer")
player:SetPoint(unpack(C.Position.UnitFrames.Player))
Movers:RegisterFrame(player)
local pet = oUF:Spawn("pet", "oUF_KkthnxPet")
pet:SetPoint(unpack(C.Position.UnitFrames.Pet))
Movers:RegisterFrame(pet)
player:RegisterEvent("UNIT_PET", FixPetUpdate)
local target = oUF:Spawn("target", "oUF_KkthnxTarget")
target:SetPoint(unpack(C.Position.UnitFrames.Target))
Movers:RegisterFrame(target)
local targettarget = oUF:Spawn("targettarget", "oUF_KkthnxTargetTarget")
targettarget:SetPoint(unpack(C.Position.UnitFrames.TargetTarget))
Movers:RegisterFrame(targettarget)
local focus = oUF:Spawn("focus", "oUF_KkthnxFocus")
focus:SetPoint(unpack(C.Position.UnitFrames.Focus))
Movers:RegisterFrame(focus)
local focustarget = oUF:Spawn("focustarget", "oUF_KkthnxFocusTarget")
focustarget:SetPoint(unpack(C.Position.UnitFrames.FocusTarget))
Movers:RegisterFrame(focustarget)
if (C.Unitframe.Party) then
local party = oUF:SpawnHeader("oUF_KkthnxParty", nil, (C.Raidframe.RaidAsParty and "custom [group:party][group:raid] hide;show") or "custom [@raid6, exists] hide; show",
"oUF-initialConfigFunction", [[
local header = self:GetParent()
self:SetWidth(header:GetAttribute("initial-width"))
self:SetHeight(header:GetAttribute("initial-height"))
]],
"initial-width", K.Scale(105),
"initial-height", K.Scale(30),
"showSolo", false,
"showParty", true,
"showRaid", false,
"groupFilter", "1, 2, 3, 4, 5, 6, 7, 8",
"groupingOrder", "1, 2, 3, 4, 5, 6, 7, 8",
"groupBy", "GROUP",
"showPlayer", C.Unitframe.ShowPlayer, -- Need to add this as an option.
"yOffset", K.Scale(-32)
)
party:SetPoint(unpack(C.Position.UnitFrames.Party))
Movers:RegisterFrame(party)
end
if C.Unitframe.ShowBoss then
local boss = {}
for i = 1, MAX_BOSS_FRAMES do
boss[i] = oUF:Spawn("boss"..i, "oUF_KkthnxBossFrame"..i)
if (i == 1) then
boss[i]:SetPoint(unpack(C.Position.UnitFrames.Boss))
else
boss[i]:SetPoint("TOPLEFT", boss[(i - 1)], "BOTTOMLEFT", 0, -45)
end
Movers:RegisterFrame(boss[i])
end
end
if C.Unitframe.ShowArena then
local arena = {}
for i = 1, 5 do
arena[i] = oUF:Spawn("arena"..i, "oUF_KkthnxArenaFrame"..i)
if (i == 1) then
arena[i]:SetPoint(unpack(C.Position.UnitFrames.Arena))
else
arena[i]:SetPoint("TOPLEFT", arena[i-1], "BOTTOMLEFT", 0, -40)
end
Movers:RegisterFrame(arena[i])
end
end
-- Test the unitframes :D
local moving = false
SlashCmdList.TEST_UF = function(msg)
if InCombatLockdown() then print("|cffffff00"..ERR_NOT_IN_COMBAT.."|r") return end
if not moving then
for _, frames in pairs({"oUF_KkthnxTarget", "oUF_KkthnxTargetTarget", "oUF_KkthnxPet", "oUF_KkthnxFocus", "oUF_KkthnxFocusTarget"}) do
_G[frames].oldunit = _G[frames].unit
_G[frames]:SetAttribute("unit", "player")
end
if C.Unitframe.ShowArena == true then
for i = 1, 5 do
_G["oUF_KkthnxArenaFrame"..i].oldunit = _G["oUF_KkthnxArenaFrame"..i].unit
_G["oUF_KkthnxArenaFrame"..i]:SetAttribute("unit", "player")
end
end
if C.Unitframe.ShowBoss == true then
for i = 1, MAX_BOSS_FRAMES do
_G["oUF_KkthnxBossFrame"..i].oldunit = _G["oUF_KkthnxBossFrame"..i].unit
_G["oUF_KkthnxBossFrame"..i]:SetAttribute("unit", "player")
end
end
moving = true
else
for _, frames in pairs({"oUF_KkthnxTarget", "oUF_KkthnxTargetTarget", "oUF_KkthnxPet", "oUF_KkthnxFocus", "oUF_KkthnxFocusTarget"}) do
_G[frames]:SetAttribute("unit", _G[frames].oldunit)
end
if C.Unitframe.ShowArena == true then
for i = 1, 5 do
_G["oUF_KkthnxArenaFrame"..i]:SetAttribute("unit", _G["oUF_KkthnxArenaFrame"..i].oldunit)
end
end
if C.Unitframe.ShowBoss == true then
for i = 1, MAX_BOSS_FRAMES do
_G["oUF_KkthnxBossFrame"..i]:SetAttribute("unit", _G["oUF_KkthnxBossFrame"..i].oldunit)
end
end
moving = false
end
end
_G.SLASH_TEST_UF1 = "/testuf"
|
return {
version = "1.1",
luaversion = "5.1",
tiledversion = "0.17.2",
orientation = "orthogonal",
renderorder = "right-down",
width = 32,
height = 32,
tilewidth = 16,
tileheight = 16,
nextobjectid = 18,
properties = {},
tilesets = {
{
name = "white-walls",
firstgid = 1,
tilewidth = 16,
tileheight = 16,
spacing = 0,
margin = 0,
image = "white-walls.png",
imagewidth = 80,
imageheight = 48,
tileoffset = {
x = 0,
y = 0
},
properties = {},
terrains = {},
tilecount = 15,
tiles = {
{
id = 0,
properties = {
["collidable"] = true
}
},
{
id = 1,
properties = {
["collidable"] = true
}
},
{
id = 2,
properties = {
["collidable"] = true
}
},
{
id = 3,
properties = {
["collidable"] = true
}
},
{
id = 4,
properties = {
["collidable"] = true
}
},
{
id = 5,
properties = {
["collidable"] = true
}
},
{
id = 6,
properties = {
["collidable"] = false
}
},
{
id = 7,
properties = {
["collidable"] = true
}
},
{
id = 8,
properties = {
["collidable"] = true
}
},
{
id = 9,
properties = {
["collidable"] = true
}
},
{
id = 10,
properties = {
["collidable"] = true
}
},
{
id = 11,
properties = {
["collidable"] = true
}
},
{
id = 12,
properties = {
["collidable"] = true
}
},
{
id = 13,
properties = {
["collidable"] = false
}
},
{
id = 14,
properties = {
["collidable"] = false
}
}
}
},
{
name = "holes",
firstgid = 16,
tilewidth = 16,
tileheight = 16,
spacing = 0,
margin = 0,
image = "the-pits.png",
imagewidth = 80,
imageheight = 48,
tileoffset = {
x = 0,
y = 0
},
properties = {},
terrains = {},
tilecount = 15,
tiles = {
{
id = 0,
properties = {
["collidable"] = true
}
},
{
id = 1,
properties = {
["collidable"] = true
}
},
{
id = 2,
properties = {
["collidable"] = true
}
},
{
id = 3,
properties = {
["collidable"] = true
}
},
{
id = 4,
properties = {
["collidable"] = true
}
},
{
id = 5,
properties = {
["collidable"] = true
}
},
{
id = 6,
properties = {
["collidable"] = true
}
},
{
id = 7,
properties = {
["collidable"] = true
}
},
{
id = 8,
properties = {
["collidable"] = true
}
},
{
id = 9,
properties = {
["collidable"] = true
}
},
{
id = 10,
properties = {
["collidable"] = true
}
},
{
id = 11,
properties = {
["collidable"] = true
}
},
{
id = 12,
properties = {
["collidable"] = true
}
},
{
id = 13,
properties = {
["collidable"] = true
}
},
{
id = 14,
properties = {
["collidable"] = true
}
}
}
}
},
layers = {
{
type = "tilelayer",
name = "Tile Layer 1",
x = 0,
y = 0,
width = 32,
height = 32,
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
properties = {},
encoding = "lua",
data = {
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3,
6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 6, 7, 7, 7, 7, 7, 7, 7, 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 7, 7, 7, 8, 6, 7, 7, 7, 7, 7, 8, 6, 26, 27, 27, 27, 28, 7, 7, 7, 7, 7, 7, 8,
6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 6, 7, 7, 7, 7, 7, 8, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8,
6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 6, 7, 7, 7, 7, 7, 8, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8,
6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 4, 7, 7, 7, 7, 7, 5, 4, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8,
6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 16, 18, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8,
6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 21, 20, 18, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8,
6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 21, 22, 23, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8,
6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 26, 27, 28, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8,
11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13
}
},
{
type = "objectgroup",
name = "game_elements",
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
draworder = "topdown",
properties = {},
objects = {
{
id = 1,
name = "",
type = "key",
shape = "rectangle",
x = 360,
y = 417,
width = 19,
height = 19,
rotation = 0,
visible = true,
properties = {
["start"] = "mansion",
["to"] = "mansion"
}
},
{
id = 3,
name = "",
type = "key",
shape = "rectangle",
x = 360,
y = 463,
width = 19,
height = 19,
rotation = 0,
visible = true,
properties = {
["start"] = "lab",
["to"] = "mansion"
}
},
{
id = 6,
name = "",
type = "anchor",
shape = "ellipse",
x = 325,
y = 328,
width = 194,
height = 194,
rotation = 0,
visible = true,
properties = {
["start"] = "lab"
}
},
{
id = 9,
name = "",
type = "anchor",
shape = "ellipse",
x = 347,
y = 236,
width = 192,
height = 192,
rotation = 0,
visible = true,
properties = {
["start"] = "mansion"
}
},
{
id = 10,
name = "",
type = "key",
shape = "rectangle",
x = 407,
y = 313,
width = 19,
height = 19,
rotation = 0,
visible = true,
properties = {
["start"] = "mansion",
["to"] = "volcano"
}
},
{
id = 11,
name = "",
type = "anchor",
shape = "ellipse",
x = 175,
y = 119,
width = 401,
height = 401,
rotation = 0,
visible = true,
properties = {
["start"] = "volcano"
}
},
{
id = 12,
name = "",
type = "anchor",
shape = "ellipse",
x = 416,
y = 151,
width = 105,
height = 105,
rotation = 0,
visible = true,
properties = {
["start"] = "mansion"
}
},
{
id = 13,
name = "",
type = "anchor",
shape = "ellipse",
x = -22,
y = -247,
width = 773,
height = 773,
rotation = 0,
visible = true,
properties = {
["start"] = "mansion"
}
},
{
id = 14,
name = "",
type = "key",
shape = "rectangle",
x = 440,
y = 42,
width = 19,
height = 19,
rotation = 0,
visible = true,
properties = {
["start"] = "mansion",
["to"] = "volcano"
}
},
{
id = 15,
name = "",
type = "anchor",
shape = "ellipse",
x = 66,
y = 307,
width = 192,
height = 192,
rotation = 0,
visible = true,
properties = {
["start"] = "volcano"
}
},
{
id = 16,
name = "",
type = "key",
shape = "rectangle",
x = 225,
y = 198,
width = 19,
height = 19,
rotation = 0,
visible = true,
properties = {
["start"] = "mansion",
["to"] = "gold"
}
},
{
id = 17,
name = "",
type = "anchor",
shape = "ellipse",
x = -59,
y = 112,
width = 310,
height = 310,
rotation = 0,
visible = true,
properties = {
["start"] = "volcano"
}
}
}
}
}
}
|
local Console = require 'debug/console'
--[[
This file registers all commands to the console
]]
function reloadPath(path)
package.loaded[path] = nil
require(path)
print(path .. " reloaded!")
end
Console.registerCommand('reload','hot-reloads a script file','reload <file>',function(args)
if #args < 2 then
return print("Please specify a file path to reload")
end
local path = args[2]
if package.loaded[path] then
reloadPath(path)
else
return print("That file does not exist")
end
end)
|
return require('packer').startup(function (use)
-- Package Manager
use 'wbthomason/packer.nvim'
-- Colors
use 'fnune/base16-vim'
use 'rktjmp/lush.nvim' -- TODO: Mess around with it
-- Visual
use 'folke/which-key.nvim'
use 'tversteeg/registers.nvim'
use {
'lukas-reineke/indent-blankline.nvim',
config = function ()
vim.g.indent_blankline_char_list = {'|'} -- ┆
vim.cmd('highlight IndentBlanklineChar guifg=#353535 gui=nocombine') -- TODO: Colorscheme
end,
}
use {
'norcalli/nvim-colorizer.lua',
config = function ()
require 'colorizer'.setup({
css = {css = true},
html = {css = true},
})
end
}
use { 'junegunn/goyo.vim', requires = {{'junegunn/limelight.vim' }}} -- Zen Mode
-- Misc
use 'akinsho/nvim-toggleterm.lua' -- Terminal
-- Git
use {
'lewis6991/gitsigns.nvim',
config = function () require('gitsigns').setup() end,
requires = {
'nvim-lua/plenary.nvim'
}
}
-- General Text Editing
use 'machakann/vim-sandwich'
use 'tpope/vim-commentary'
-- use 'jiangmiao/auto-pairs'
use {
'windwp/nvim-autopairs',
config = function()
require('nvim-autopairs').setup()
require('nvim-autopairs.completion.compe').setup {
map_cr = true, -- map <CR> on insert mode
map_complete = true -- it will auto insert `(` after select function or method item
}
end
}
-- Language
use 'Vimjas/vim-python-pep8-indent'
use 'iamcco/markdown-preview.nvim' -- Markdown Live Preview
use {
'nvim-treesitter/nvim-treesitter',
config = function()
require('nvim-treesitter.configs').setup({
ensure_installed = 'maintained',
highlight = { enable = true }
})
end
}
use 'simrat39/rust-tools.nvim'
use 'neovim/nvim-lspconfig'
use 'kabouzeid/nvim-lspinstall'
use {
'SirVer/ultisnips',
config = function ()
vim.g.UltiSnipsExpandTrigger = '<NUL>'
vim.g.UltiSnipsJumpForwardTrigger = '<NUL>'
vim.g.UltiSnipsJumpBackwardTrigger = '<NUL>'
end,
requires = {{'honza/vim-snippets'}}
}
use {
'lervag/vimtex',
config = function ()
vim.g.tex_flavor='latex'
vim.g.vimtex_view_method='zathura'
vim.g.vimtex_quickfix_mode=0
end,
}
-- Completion
use {
'hrsh7th/nvim-compe',
config = function ()
require'compe'.setup {
enabled = true;
source = {
path = true;
buffer = true;
calc = true;
nvim_lsp = true;
nvim_lua = true;
vsnip = false;
orgmode = true;
ultisnips = true;
luasnip = false;
};
}
end
}
use 'ahmedkhalf/lsp-rooter.nvim'
---- Org Mode
use {
'kristijanhusak/orgmode.nvim',
config = function()
require('orgmode').setup{}
end
}
use {
'nvim-telescope/telescope.nvim',
config = function ()
require('telescope').setup({
defaults = {
color_devicons = false,
},
extensions = {
project = {
base_dirs = {'~/main/src'},
max_depth = 4
},
}
})
require('telescope').load_extension('project')
require('telescope').load_extension('ultisnips')
end,
requires = {
{'nvim-lua/popup.nvim'},
{'nvim-lua/plenary.nvim'},
{'fhill2/telescope-ultisnips.nvim'},
{'nvim-telescope/telescope-project.nvim'},
}
}
end)
|
--[[ Copyright (C) 2019 The DMLab2D Authors.
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
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an 'AS IS' BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
]]
local class = require 'common.class'
local tile = require 'system.tile'
local random = require 'system.random'
local images = require 'images'
local maps = require 'maps'
local Simulation = class.Class()
function Simulation.defaultSettings()
return {
mapName = 'default',
-- Probability apple.possible becomes apple.
initialAppleProbability = 0.75,
-- Displays a color sprite associated with the probability of respawning.
-- Green is highest probability red it zero probability.
showRespawnProbability = false,
-- Base probability of an apple respawning each step.
appleRespawnProbabilities = setmetatable({0, 0.001, 0.005, 0.025}, {
__index = function(table, key)
local key = tonumber(key)
if key == nil then
return nil
end
table[key] = 0
return 0
end}),
-- Seeding radius.
seedRadius = 3
}
end
function Simulation:__init__(kwargs)
self._settings = kwargs.settings
end
local function interpColor(colors, fraction)
local place = fraction * (#colors - 1) + 1
local from = math.floor(place)
local frac = place - from
local to = math.min(#colors, from + 1)
local result = {}
for i = 1, # colors do
result[i] = math.floor(colors[from][i] * (1 - frac) + colors[to][i] * frac)
end
return result
end
function Simulation:addSprites(tileSet)
tileSet:addColor('OutOfBounds', {0, 0, 0})
tileSet:addColor('OutOfView', {80, 80, 80})
tileSet:addShape('Wall', images.wall())
tileSet:addShape('Apple', images.apple())
if self._settings.showRespawnProbability then
-- Use probability to color respawn tile.
local colors = {{255, 0, 0}, {255, 255, 0}, {0, 255, 0}}
local count = #self._settings.appleRespawnProbabilities
local maxP = 1e-3
for i, p in ipairs(self._settings.appleRespawnProbabilities) do
if p > maxP then
maxP = p
end
end
for i, p in ipairs(self._settings.appleRespawnProbabilities) do
local color = interpColor(colors, math.sqrt(p) / math.sqrt(maxP))
tileSet:addColor('apple.wait.' .. i, color)
end
end
end
function Simulation:worldConfig()
local settings = self._settings
local config = {
outOfBoundsSprite = 'OutOfBounds',
outOfViewSprite = 'OutOfView',
updateOrder = {'fruit'},
renderOrder = {'logic', 'pieces'},
customSprites = {},
hits = {},
states = {
wall = {
layer = 'pieces',
sprite = 'Wall',
},
['spawn.any'] = {groups = {'spawn.any'}},
apple = {
layer = 'logic',
sprite = 'Apple',
},
['apple.wait'] = {layer = 'waitCalc'},
['apple.possible'] = {},
}
}
local waitNames = {}
for i, prob in ipairs(settings.appleRespawnProbabilities) do
local name = 'apple.wait.' .. i
local spriteName = settings.showRespawnProbability and name or nil
waitNames[i] = name
table.insert(config.updateOrder, {name = name, func = 'respawn'})
local waiters = prob > 0 and 'waiter'
config.states['apple.wait.' .. i] = {
layer = 'wait',
groups = {name},
sprite = spriteName,
}
end
self._waitNames = waitNames
if settings.showRespawnProbability then
table.insert(config.renderOrder, 1, 'wait')
end
return config
end
function Simulation:textMap()
local map = maps[self._settings.mapName]
if not map then
error('missing map: ' .. self._settings.mapName)
end
return map
end
function Simulation:addObservations(tileSet, world, observations)
local worldLayerView = world:createView{layout = self:textMap().layout}
local worldView = tile.Scene{shape = worldLayerView:gridSize(), set = tileSet}
local spec = {
name = 'WORLD.RGB',
type = 'tensor.ByteTensor',
shape = worldView:shape(),
func = function(grid)
return worldView:render(worldLayerView:observation{grid = grid})
end
}
observations[#observations + 1] = spec
end
local function _getNumLiveNeighbors(grid, pos, radius)
local num = 0
for _ in pairs(grid:queryDiamond('logic', pos, radius)) do
num = num + 1
end
return num
end
-- avatars require reward in user state.
function Simulation:stateCallbacks(avatars)
local settings = self._settings
local radius = settings.seedRadius
local stateCallbacks = {}
stateCallbacks.wall = {onHit = true}
local apple = {}
function apple.onAdd(grid, apple)
local pos = grid:position(apple)
for piece in pairs(grid:queryDiamond('wait', pos, radius)) do
grid:setState(piece, 'apple.wait')
end
end
apple.onContact = {avatar = {}}
function apple.onContact.avatar.enter(grid, applePiece, avatarPiece)
local avatarState = grid:userState(avatarPiece)
local pos = grid:position(applePiece)
local numInRadius = _getNumLiveNeighbors(grid, pos, radius)
local rewardAmountModifier = 0
if numInRadius == 1 then
rewardAmountModifier = avatarState.rewardForEatingLastAppleInRadius
end
local rewardAmount = 1 + rewardAmountModifier
avatarState.reward = avatarState.reward + rewardAmount
grid:setState(applePiece, 'apple.wait')
for piece in pairs(grid:queryDiamond('wait', pos, radius)) do
grid:setState(piece, 'apple.wait')
end
end
local appleW = {}
function appleW.onAdd(grid, appleWait)
local pos = grid:position(appleWait)
local waitNames = self._waitNames
local count = 1
for piece in pairs(grid:queryDiamond('logic', pos, radius)) do
count = count + 1
if count == #waitNames then
break
end
end
grid:setState(appleWait, waitNames[count])
end
local appleWaitCallback = {onUpdate = {}}
appleWaitCallback.onUpdate.respawn = function(grid, piece)
grid:setState(piece, 'apple')
end
local applePossible = {}
local initialAppleProbability = settings.initialAppleProbability
function applePossible.onAdd(grid, piece)
if random:uniformReal(0, 1) <= initialAppleProbability then
grid:setState(piece, 'apple')
end
end
stateCallbacks.apple = apple
stateCallbacks['apple.wait'] = appleW
for i = 1, #self._settings.appleRespawnProbabilities do
stateCallbacks['apple.wait.' .. i] = appleWaitCallback
end
stateCallbacks['apple.possible'] = applePossible
return stateCallbacks
end
function Simulation:start(grid)
for i, prob in ipairs(self._settings.appleRespawnProbabilities) do
local name = 'apple.wait.' .. i
grid:setUpdater{update = name, group = name, probability = prob}
end
end
function Simulation:update(grid) end
return {Simulation = Simulation}
|
Config = {}
Config.ClosestVehicleRadius = 5.0
Config.Distance = 0.75
Config.disableShuffle = true
|
local M = {}
local enum = require("game/config.enum")
local dbBagTbl = require("game.db.dbBagTbl")
--local dbHeroTbl = require("game.db.dbHeroTbl")
local dbUserPlayerTbl = require("game.db.dbUserPlayerTbl")
local item = require("game.config.item")
local gift = item.gift
local lottery = item.lottery
local lotteryWeightSum = item.lotteryWeightSum
function M.init()
return gift,lottery,lotteryWeightSum
end
function M.addGift(pid,giftId,count)
local giftCfg = gift[giftId]
M.addOutResCfg(pid,giftCfg.out_res,count)
end
function M.addLottery(pid,lotteryId,count)
local lotteryCfgArr = lottery[lotteryId]
local sum = lotteryWeightSum[lotteryId]
if sum == nil or lotteryCfgArr == nil then return end
local randIdx = math.random(1,sum)
local t = 0
local lotteryCfg
for _,v in ipairs(lotteryCfgArr) do
t = t + v.weight
if t >= randIdx then
lotteryCfg = v
break
end
end
if lotteryCfg == nil then assert(false) end
M.addOutResCfg(pid,lotteryCfg.out_res,count)
end
function M.addOutResCfgFunc(pid,cfg_out_res,countFunc,cityTbl)
local playerInfo
local bagTblArr = {}
for _,v in ipairs(cfg_out_res) do
local loc,id,co = v[1],v[2],v[3]
co = countFunc(loc,id,co)
if loc == enum.LOC_BAG then
local bagTbl = dbBagTbl.getBagTbl(pid,id)
if bagTbl == nil then
bagTbl = dbBagTbl.newBagTbl(id,co)
else
bagTbl.count = bagTbl.count + co
end
bagTblArr[#bagTblArr+1] = bagTbl
elseif loc == enum.LOC_BASE_RES then
if playerInfo == nil then
playerInfo = dbUserPlayerTbl.getPlayerInfo(pid)
end
playerInfo.baseRes[id] = playerInfo.baseRes[id] + co
elseif loc == enum.LOC_GIFT then
M.addGift(pid,id,co)
elseif loc == enum.LOC_CITY then
assert(cityTbl)
cityTbl.res[id] = cityTbl.res[id] + co
elseif loc == enum.LOC_LOTTERY then
M.addLottery(pid,id,co)
end
end
if playerInfo then
dbUserPlayerTbl.setPlayerInfo(playerInfo)
end
for _,v in ipairs(bagTblArr) do
dbBagTbl.setBagTbl(pid,v)
end
end
function M.addOutResCfg(pid,cfg_out_res,count,cityTbl)
local function onlyCountFunc(co) return co * count end
M.addOutResCfgFunc(pid,cfg_out_res,onlyCountFunc,cityTbl)
end
function M.removeNeedResCfgFunc(pid,cfg_need_res,countFunc,cityTbl)
local playerInfo
local bagTblArr = {}
for _,v in ipairs(cfg_need_res) do
local loc,id,co = v[1],v[2],v[3]
co = countFunc(loc,id,co)
if loc == enum.LOC_BAG then
local bagTbl = dbBagTbl.getBagTbl(pid,id)
if bagTbl.count < co then
return loc
else
bagTbl.count = bagTbl.count - co
bagTblArr[#bagTblArr+1] = bagTbl
end
elseif loc == enum.LOC_CITY then
assert(cityTbl)
if cityTbl.res[id] < co then
return loc
else
cityTbl.res[id] = cityTbl.res[id] - co
end
elseif loc == enum.LOC_BASE_RES then
if playerInfo == nil then
playerInfo = dbUserPlayerTbl.getPlayerInfo(pid)
end
if playerInfo.baseRes[id]< co then
return loc
else
playerInfo.baseRes[id] = playerInfo.baseRes[id] - co
end
end
end
if playerInfo then
dbUserPlayerTbl.setPlayerInfo(playerInfo)
end
for _,v in ipairs(bagTblArr) do
dbBagTbl.setBagTbl(pid,v)
end
return 0,playerInfo
end
function M.removeNeedResCfg(pid,cfg_need_res,count,cityTbl)
local function onlyCountFunc(co) return co * count end
return M.removeNeedResCfgFunc(pid,cfg_need_res,onlyCountFunc,cityTbl)
end
return M
|
test = require 'u-test'
common = require 'common'
--Bug 35915673 Disabling websocket tests due to websocket.org no longer in service
test.skip = true
test.testWebsocketCloseHandleWhileConnected = function()
print("testWebsocketCloseHandleWhileConnected")
HCInitialize();
HCWebSocketCreate();
HCWebSocketConnectAsync();
end
function OnHCWebSocketConnectAsync()
print("OnHCWebSocketConnectAsync")
HCWebSocketCloseHandle();
test.stopTest();
end
|
--------------------------------
-- @module Speed
-- @extend Action
-- @parent_module cc
--------------------------------
--
-- @function [parent=#Speed] setInnerAction
-- @param self
-- @param #cc.ActionInterval action
-- @return Speed#Speed self (return value: cc.Speed)
--------------------------------
-- alter the speed of the inner function in runtime
-- @function [parent=#Speed] setSpeed
-- @param self
-- @param #float speed
-- @return Speed#Speed self (return value: cc.Speed)
--------------------------------
--
-- @function [parent=#Speed] getInnerAction
-- @param self
-- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval)
--------------------------------
--
-- @function [parent=#Speed] getSpeed
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- create the action
-- @function [parent=#Speed] create
-- @param self
-- @param #cc.ActionInterval action
-- @param #float speed
-- @return Speed#Speed ret (return value: cc.Speed)
--------------------------------
--
-- @function [parent=#Speed] startWithTarget
-- @param self
-- @param #cc.Node target
-- @return Speed#Speed self (return value: cc.Speed)
--------------------------------
--
-- @function [parent=#Speed] reverse
-- @param self
-- @return Speed#Speed ret (return value: cc.Speed)
--------------------------------
--
-- @function [parent=#Speed] clone
-- @param self
-- @return Speed#Speed ret (return value: cc.Speed)
--------------------------------
--
-- @function [parent=#Speed] stop
-- @param self
-- @return Speed#Speed self (return value: cc.Speed)
--------------------------------
-- param dt in seconds.
-- @function [parent=#Speed] step
-- @param self
-- @param #float dt
-- @return Speed#Speed self (return value: cc.Speed)
--------------------------------
--
-- @function [parent=#Speed] isDone
-- @param self
-- @return bool#bool ret (return value: bool)
return nil
|
vim.o.mouse = "a"
vim.o.cmdheight = 1
vim.o.showmode = false
vim.o.clipboard = "unnamedplus"
vim.o.conceallevel = 0
vim.o.showtabline = 2
vim.o.tabstop = 4
vim.o.softtabstop = 4
vim.o.shiftwidth = 4
vim.o.expandtab = true
vim.o.expandtab = true
vim.o.hidden = true
vim.o.termguicolors = true
vim.o.number = true
vim.bo.autoindent = true
vim.o.smarttab = true
vim.o.smartcase = true
vim.wo.wrap = false
vim.wo.relativenumber = false
--settings
vim.o.guifont = "FiraCode Nerd Font:h12"
vim.g.neovide_cursor_vfx_mode = "pixiedust"
|
net.Receive("f4menu", function()
--main window
local x = 1000/1768 * ScrW()
local y = 700/992 * ScrH()
local menu = vgui.Create("DFrame")
menu:SetSize(x, y)
menu:SetPos(ScrW()/2 - x/2, ScrH()/2 - y/2)
menu:SetTitle("Basewars Menu")
menu:SetDraggable(false)
menu:ShowCloseButton(true)
menu:MakePopup()
--
local navbarPanel = vgui.Create("DFrame", menu)
navbarPanel:SetSize(x * .2, y - 25)
navbarPanel:SetPos(0, 25)
navbarPanel:ShowCloseButton()
navbarPanel:SetTitle("")
local navbar = vgui.Create("DScrollPanel", navbarPanel)
navbar:Dock(FILL)
--shop
local shopCategory = navbar:Add("DCollapsibleCategory")
shopCategory:SetPos( 1, 0)
shopCategory:SetSize( navbarPanel:GetWide() - 2, 30 )
shopCategory:SetLabel( "Shop" )
local navbarArray = {}
for i=0, 5 do
navbarArray[i] = shopCategory:Add("DButton")
navbarArray[i]:SetColor(Color(255, 255, 255))
navbarArray[i]:SetText("button #" .. tostring(i + 1))
navbarArray[i]:SetPos( 10, 40 * i)
navbarArray[i]:SetSize(navbarPanel:GetWide() - 5, 30 )
end
--weapons button
navbarArray[0]:SetText("Weapons")
navbarArray[1]:SetText("Printers")
navbarArray[2]:SetText("Base")
navbarArray[3]:SetText("Entities")
navbarArray[4]:SetText("Vehicles")
navbarArray[5]:SetText("Fun")
end)
|
--allows potara earrings
local function saiyanCanGoSuperSaiyan(saiyan)
--15 is combathardness
for _,misc_trait in ipairs(saiyan.status.misc_traits) do
if misc_trait.id == 15 then
if misc_trait.value > 31 then return true end
end
end
return false
end
local function saiyanCanGoSuperSaiyan2(saiyan)
--15 is combathardness
for _,misc_trait in ipairs(saiyan.status.misc_traits) do
if misc_trait.id == 15 then
if misc_trait.value > 64 then return true end
end
end
return false
end
local function saiyanCanGoSuperSaiyan3(saiyan)
--15 is combathardness
for _,misc_trait in ipairs(saiyan.status.misc_traits) do
if misc_trait.id == 15 then
if misc_trait.value > 99 then return true end
end
end
return false
end
local function superSaiyanGodSyndrome()
for syn_id,syndrome in ipairs(df.global.world.raws.syndromes.all) do
if syndrome.syn_name == "Super Saiyan God" then return syn_id end
end
qerror("Super saiyan god syndrome not found.")
end
local function getPowerLevel(unit)
local speed = 1000/dfhack.units.computeMovementSpeed(unit)
local strength = unit.body.physical_attrs.STRENGTH.value/3550
local endurance = unit.body.physical_attrs.ENDURANCE.value/1000
local toughness = unit.body.physical_attrs.TOUGHNESS.value/2250
local spatialsense = unit.status.current_soul.mental_attrs.SPATIAL_SENSE.value/1500
local kinestheticsense = unit.status.current_soul.mental_attrs.KINESTHETIC_SENSE.value/1000
local willpower = unit.status.current_soul.mental_attrs.WILLPOWER.value/1000
local bodysize = (unit.body.blood_count/100)^2
local powerlevel = bodysize*speed*((strength*endurance*toughness*spatialsense*kinestheticsense*willpower)^(1/6))
if saiyanCanGoSuperSaiyan(unit) then powerlevel = powerlevel * 50 end
if saiyanCanGoSuperSaiyan2(unit) then powerlevel = powerlevel * 2 end
if saiyanCanGoSuperSaiyan3(unit) then powerlevel = powerlevel * 4 end
return powerlevel
end
local function getSuperSaiyanCount()
local superSaiyanCount = 0
local saiyan = df.global.ui.race_id
for _,unit in ipairs(df.global.world.units.active) do
if unit.race==saiyan then
if saiyanCanGoSuperSaiyan(unit) then
superSaiyanCount = superSaiyanCount + 1
end
end
end
return superSaiyanCount
end
local function unitWithHighestPowerLevel()
local highestUnit = nil
local highestPowerLevel = 0
for _,unit in ipairs(df.global.world.units.active) do
if getPowerLevel(unit) > highestPowerLevel and unit.race==df.global.ui.race_id then highestUnit = unit end
end
return highestUnit
end
local function combinedSaiyanPowerLevel()
local totalPowerLevel=0
local saiyan = df.global.ui.race_id
for _,unit in ipairs(df.global.world.units.active) do
if unit.race == saiyan then totalPowerLevel = totalPowerLevel + getPowerLevel(unit) end
end
return totalPowerLevel
end
local function assignSyndrome(target,syn_id) --taken straight from here, but edited so I can understand it better: https://gist.github.com/warmist/4061959/
if target==nil then
qerror("Not a valid target") --this probably won't happen :V
end
local newSyndrome=df.unit_syndrome:new()
local target_syndrome=df.syndrome.find(syn_id)
newSyndrome.type=target_syndrome.id
--newSyndrome.year=
--newSyndrome.year_time=
newSyndrome.ticks=1
newSyndrome.unk1=1
for k,v in ipairs(target_syndrome.ce) do
local sympt=df.unit_syndrome.T_symptoms:new()
sympt.ticks=1
sympt.flags=2
newSyndrome.symptoms:insert("#",sympt)
end
target.syndromes.active:insert("#",newSyndrome)
end
local function applySuperSaiyanGodSyndrome()
local superSaiyanCount = getSuperSaiyanCount()
local superSaiyanGod = unitWithHighestPowerLevel()
if getPowerLevel(superSaiyanGod) > 1000000 and superSaiyanCount > 5 then assignSyndrome(superSaiyanGod,superSaiyanGodSyndrome()) end
end
local function stopMegabeastAttacks()
local removedMegaBeastAttack = false
for eventid,event in ipairs(df.global.timed_events) do
if event.type == df.timed_event_type.Megabeast then
table.remove(df.global.timed_events,eventid)
removedMegaBeastAttack = true
end
end
return removedMegaBeastAttack
end
local function causeMegaBeastAttack()
df.global.timed_events:insert('#', { new = df.timed_event, type = df.timed_event_type.Megabeast, season = df.global.cur_season, season_ticks = df.global.cur_season_tick } )
end
local function checkForMegabeastAttack()
if combinedSaiyanPowerLevel() > 4000000 and stopMegabeastAttacks() then causeMegaBeastAttack() end
end
function monthlyCheck()
applySuperSaiyanGodSyndrome()
checkForMegabeastAttack()
dfhack.timeout(1,'months',monthlyCheck)
end
local function getInorganic(item)
local decode = dfhack.matinfo.decode(item)
if not decode.inorganic then return nil else return decode.inorganic end
end
local function giveName(unitName,nameCopy)
unitName.first_name = nameCopy.first_name
unitName.nickname = nameCopy.nickname
unitName.language = nameCopy.language
unitName.unknown = nameCopy.unknown
for i=1,7 do
unitName.words[i-1] = nameCopy.words[i]
unitName.parts_of_speech[i-1] = nameCopy.parts_of_speech[i]
end
end
local function fuseTwoNames(name1,name2) --name1 will be changed directly in this function
newName = {}
newName.first_name = string.sub(name1.first_name,1,math.floor(#name1.first_name/2)) .. string.sub(name2.first_name,-math.floor(#name2.first_name/2))
newName.nickname = ""
newName.language = name1.language
newName.unknown = name1.unknown
newName.words = {}
newName.parts_of_speech = {}
for i = 1, 7 do
if i%2==1 then
newName.words[i] = name2.words[i-1]
newName.parts_of_speech[i] = name1.parts_of_speech[i-1]
else
newName.words[i] = name1.words[i-1]
newName.parts_of_speech[i] = name2.parts_of_speech[i-1]
end
end
printall(newName.words)
printall(name1.words)
giveName(name1,newName)
end
local function insertSkill(unit,skill)
unit.status.current_soul.skills:insert('#',
{
new = df.unit_skill,
id = skill.id,
rating = skill.rating,
experience = skill.experience,
unused_counter = skill.unused_counter,
rusty = skill.rusty,
rust_counter = skill.rust_counter,
demotion_counter = skill.demotion_counter,
unk_1c = skill.unk_1c
}
)
end
local function combineSoul(unit1,unit2)
local firstUnitSoul = unit1.status.current_soul
local secondUnitSoul= unit2.status.current_soul
for k,attribute in ipairs(firstUnitSoul.mental_attrs) do
attribute.value = attribute.value + secondUnitSoul.mental_attrs[k].value
attribute.max_value = attribute.max_value + secondUnitSoul.mental_attrs[k].max_value
if attribute.value < 0 or attribute.value > 2^31-1 then attribute.value = 2^30 end
if attribute.max_value < 0 or attribute.max_value > 2^31-1 then attribute.max_value = 2^31-1 end
end
for _,skill2 in ipairs(secondUnitSoul.skills) do
local skillFound = false
for _,skill1 in ipairs(firstUnitSoul.skills) do
if skill2.id == skill1.id then
skillFound = true
skill1.rating = skill1.rating + skill2.rating
end
end
if not skillFound then
insertSkill(unit1,skill2)
end
end
--preferences are too much trouble for their worth
for k,trait1 in ipairs(firstUnitSoul.traits) do
local trait2 = secondUnitSoul.traits[k]
trait1 = math.floor((trait1+trait2)/2)
end
--unk5 and unk6 are... unknown to me, so...
end
local function combineBody(unit1,unit2)
firstBody = unit1.body
firstAppearance = unit1.appearance
secondBody = unit2.body
secondAppearance = unit2.appearance
firstBody.blood_max = firstBody.blood_max + secondBody.blood_max
firstBody.blood_count = firstBody.blood_max
for k,attribute in ipairs(firstBody.physical_attrs) do
attribute.value = attribute.value + secondBody.physical_attrs[k].value
attribute.max_value = attribute.max_value * secondBody.physical_attrs[k].max_value
if attribute.value < 0 or attribute.value > 2^31-1 then attribute.value = 2^30 end
if attribute.max_value < 0 or attribute.max_value > 2^31-1 then attribute.max_value = 2^31-1 end
end
for k,tissue in ipairs(firstBody.physical_attr_tissues) do
tissue = tissue + secondBody.physical_attr_tissues[k]
end
for k,modifier in ipairs(firstAppearance.body_modifiers) do
modifier = math.floor((modifier+secondAppearance.body_modifiers[k])/2)
end
for k,modifier in ipairs(firstAppearance.bp_modifiers) do
modifier = math.floor((modifier+secondAppearance.bp_modifiers[k])/2)
end
for k,length1 in ipairs(firstAppearance.tissue_length) do
local length2 = secondAppearance.tissue_length[k]
length1 = math.floor((length1+length2)/2)
end
end
local function combineCounters(unit1,unit2)
local traits1 = unit1.status.misc_traits
local traits2 = unit2.status.misc_traits
for _,trait1 in ipairs(traits1) do
if trait1.id==15 then
for _,trait2 in ipairs(traits2) do
if trait2.id==15 then
trait1.value = trait1.value+trait2.value
if trait1.value>100 then trait1.value = 100 end
end
end
end
end
end
local function fuseUnits(unit1,unit2)
if unit1.race~=unit2.race then
return nil
end
fuseTwoNames(unit1.name,unit2.name)
combineSoul(unit1,unit2)
combineBody(unit1,unit2)
combineCounters(unit1,unit2)
unit2.animal.vanish_countdown = 2
end
local function findPotara()
local potaraNumber = 0
local unitsWithPotara = {}
for _uid,unit in ipairs(df.global.world.units.active) do
for itemid,item_inv in ipairs(unit.inventory) do
local item = item_inv.item
local material = getInorganic(item)
if material then
if material.id == "POTARA_DB" then
table.insert(unitsWithPotara,unit)
potaraNumber=potaraNumber+1
end
end
end
end
if potaraNumber == 2 and #unitsWithPotara == 2 then
fuseUnits(unitsWithPotara[1],unitsWithPotara[2])
end
end
local args = {...}
if args[1] == "force" then
fuseUnits(df.global.world.units.all[tonumber(args[2])],df.global.world.units.all[tonumber(args[3])])
end
function potara()
findPotara()
dfhack.timeout(200,'ticks',potara)
end
potara()
|
local _, config = ...
-- Shitlist Settings Listed Players
-- Make a child panel
ShitlistSettings.listedPlayersPanel = CreateFrame( "Frame", "ShitlistSettingsListedPlayers", ShitlistSettings.panel)
ShitlistSettings.listedPlayersPanel.name = "Listed Players" -- Add localization
-- Specify childness of this panel (this puts it under the little red [+], instead of giving it a normal AddOn category)
ShitlistSettings.listedPlayersPanel.parent = ShitlistSettings.panel.name
-- Add the child to the Interface Options
InterfaceOptions_AddCategory(ShitlistSettings.listedPlayersPanel)
-- Listed Players tabb
local TabbListedPlayersTitle = ShitlistSettings.listedPlayersPanel:CreateFontString("SettingsTabbListedPlayersTitle", "OVERLAY", "GameFontNormal")
TabbListedPlayersTitle:SetPoint("TOPLEFT", ShitlistSettings.listedPlayersPanel, 10, -10)
TabbListedPlayersTitle:SetFont(config.Font, 18)
TabbListedPlayersTitle:SetTextColor(getConfigColors("Gold"))
TabbListedPlayersTitle:SetText("Shitlist - Listed Players") -- Add localization
-- Listed Players settings
local ListedPlayersFrame = CreateFrame("Frame", "SettingsListedPlayersFrame", ShitlistSettings.listedPlayersPanel, BackdropTemplateMixin and "BackdropTemplate")
ListedPlayersFrame:SetPoint("TOPLEFT", ShitlistSettings.listedPlayersPanel, 10, -35)
ListedPlayersFrame:SetSize(250, 380)
ListedPlayersFrame:SetBackdrop(config.Backdrop)
ListedPlayersFrame:SetBackdropBorderColor(getConfigColors("Black"))
-- Title
local ListedPlayerTitle = ListedPlayersFrame:CreateFontString("SettingsListedPlayerTitle", "OVERLAY", "GameFontNormal")
ListedPlayerTitle:SetPoint("TOPLEFT", ListedPlayersFrame, 10, -10)
ListedPlayerTitle:SetFont(config.Font, 14)
ListedPlayerTitle:SetText("Listed Players") -- Add localization
-- Info
local ListedPlayerInfo = ListedPlayersFrame:CreateFontString("SettingsListedPlayerInfo", "OVERLAY", "GameFontWhite")
ListedPlayerInfo:SetPoint("TOPLEFT", ListedPlayersFrame, 30, -30)
ListedPlayerInfo:SetTextColor(getConfigColors("White"))
ListedPlayerInfo:SetText("Edit or Remove a player") -- Add localization
-- Listed player
local ListedPlayerDropDown = CreateFrame("Button", "SettingsListedPlayerDropDown", ListedPlayersFrame, "UIDropDownMenuTemplate")
ListedPlayerDropDown:SetPoint("TOPLEFT", ListedPlayersFrame, 15, -50)
--ListedPlayerDropDown:info.hasArrow = false;
local function OnClick(self)
UIDropDownMenu_SetSelectedID(ListedPlayerDropDown, self:GetID())
SettingsListedPlayerEditBox:SetText(self:GetText())
SettingsListedPlayerDescriptionEditBox:SetText(config.ListedPlayers[self:GetText()][2])
local index={}
for k,v in pairs(config.Reasons) do
index[v]=k
end
local a = config.ListedPlayers[self:GetText()][1]
UIDropDownMenu_Initialize(SettingsListedPlayerReasonDropDown, initializeReason)
UIDropDownMenu_SetSelectedID(SettingsListedPlayerReasonDropDown, index[a])
end
function initializePlayer(self)
local info = UIDropDownMenu_CreateInfo()
for k,v in pairs(config.ListedPlayers) do
info = UIDropDownMenu_CreateInfo()
info.text = k
info.value = v
info.func = OnClick
UIDropDownMenu_AddButton(info)
end
end
UIDropDownMenu_Initialize(ListedPlayerDropDown, initializePlayer)
UIDropDownMenu_SetWidth(ListedPlayerDropDown, 170)
UIDropDownMenu_SetButtonWidth(ListedPlayerDropDown, 195)
UIDropDownMenu_SetSelectedID(ListedPlayerDropDown, 1)
UIDropDownMenu_JustifyText(ListedPlayerDropDown, "LEFT")
-- Player
local ListedPlayerEditBox = CreateFrame("EditBox", "SettingsListedPlayerEditBox", ListedPlayersFrame, BackdropTemplateMixin and "BackdropTemplate")
ListedPlayerEditBox:SetPoint("TOPLEFT", ListedPlayersFrame, 25, -85)
ListedPlayerEditBox:SetSize(200, 30)
ListedPlayerEditBox:SetTextInsets(10, 0, 0, 0)
ListedPlayerEditBox:SetBackdrop(config.Backdrop)
ListedPlayerEditBox:SetBackdropBorderColor(getConfigColors("White"))
ListedPlayerEditBox:SetMultiLine(false)
ListedPlayerEditBox:SetMaxLetters(255)
ListedPlayerEditBox:SetAutoFocus(false) -- dont automatically focus
ListedPlayerEditBox:SetFontObject(GameFontWhite)
ListedPlayerEditBox:SetScript("OnEscapePressed", function(self)
self:ClearFocus()
end)
ListedPlayerEditBox:SetScript("OnEnterPressed", function(self)
self:ClearFocus()
end)
-- Title Reason
local ListedPlayerReasonDropDownTitle = ListedPlayersFrame:CreateFontString("SettingsListedPlayerReasonDropDownTitle", "OVERLAY", "GameFontNormal")
ListedPlayerReasonDropDownTitle:SetPoint("TOPLEFT", ListedPlayersFrame, 35, -125)
ListedPlayerReasonDropDownTitle:SetFont(config.Font, 14)
ListedPlayerReasonDropDownTitle:SetText("Reason") -- Add localization
-- Reason
local ListedPlayerReasonDropDown = CreateFrame("Button", "SettingsListedPlayerReasonDropDown", ListedPlayersFrame, "UIDropDownMenuTemplate")
ListedPlayerReasonDropDown:SetPoint("TOPLEFT", ListedPlayersFrame, 15, -140)
local function OnClick(self)
UIDropDownMenu_SetSelectedID(ListedPlayerReasonDropDown, self:GetID())
end
function initializeReason(self)
local info = UIDropDownMenu_CreateInfo()
for k,v in pairs(config.Reasons) do
info = UIDropDownMenu_CreateInfo()
info.text = v
info.value = v
info.func = OnClick
UIDropDownMenu_AddButton(info)
end
end
UIDropDownMenu_Initialize(ListedPlayerReasonDropDown, initializeReason)
UIDropDownMenu_SetWidth(ListedPlayerReasonDropDown, 170)
UIDropDownMenu_SetButtonWidth(ListedPlayerReasonDropDown, 195)
UIDropDownMenu_SetSelectedID(ListedPlayerReasonDropDown, 1)
UIDropDownMenu_JustifyText(ListedPlayerReasonDropDown, "LEFT")
-- Title
local ListedPlayerEditBoxTitle = ListedPlayersFrame:CreateFontString("SettingsListedPlayerEditBoxTitle", "OVERLAY", "GameFontNormal")
ListedPlayerEditBoxTitle:SetPoint("TOPLEFT", ListedPlayersFrame, 35, -180)
ListedPlayerEditBoxTitle:SetFont(config.Font, 14)
ListedPlayerEditBoxTitle:SetText("Description") -- Add localization
-- Info
local ListedPlayerEditBoxInfo = ListedPlayersFrame:CreateFontString("SettingsListedPlayerEditBoxInfo", "OVERLAY", "GameFontWhite")
ListedPlayerEditBoxInfo:SetPoint("TOPLEFT", ListedPlayersFrame, 170, -180)
ListedPlayerEditBoxInfo:SetFont(config.Font, 11)
ListedPlayerEditBoxInfo:SetText("Optional") -- Add localization
-- Player Description EditBox
local ListedPlayerDescriptionEditBoxFrame = CreateFrame("Frame", "SettingsListedPlayerDescriptionEditBoxFrame", ListedPlayersFrame)
ListedPlayerDescriptionEditBoxFrame:SetPoint("TOPLEFT", ListedPlayersFrame, 25, -195)
ListedPlayerDescriptionEditBoxFrame:SetSize(200, 120)
local ListedPlayerDescriptionEditBox = CreateFrame("EditBox", "SettingsListedPlayerDescriptionEditBox", ListedPlayerDescriptionEditBoxFrame, BackdropTemplateMixin and "BackdropTemplate")
ListedPlayerDescriptionEditBox:SetBackdrop(config.Backdrop)
ListedPlayerDescriptionEditBox:SetBackdropBorderColor(getConfigColors("White"))
ListedPlayerDescriptionEditBox:SetTextInsets(10, 10, 10, 10)
ListedPlayerDescriptionEditBox:SetMaxLetters(255)
ListedPlayerDescriptionEditBox:SetMultiLine(true)
ListedPlayerDescriptionEditBox:SetAutoFocus(false)
ListedPlayerDescriptionEditBox:SetFontObject(GameFontWhite)
ListedPlayerDescriptionEditBox:SetAllPoints()
ListedPlayerDescriptionEditBox:SetScript("OnEscapePressed", function(self)
self:ClearFocus()
end)
ListedPlayerDescriptionEditBox:SetScript("OnEnterPressed", function(self)
self:ClearFocus()
end)
-- Button save player data
local ListedPlayerSaveBtn = CreateFrame("Button", "SettingsListedPlayerSaveBtn", ListedPlayersFrame, "OptionsButtonTemplate")
ListedPlayerSaveBtn:SetPoint("BOTTOMLEFT", ListedPlayersFrame, 40, 15)
ListedPlayerSaveBtn:SetSize(80, 30)
ListedPlayerSaveBtn:SetText("Save") -- Add localization
ListedPlayerSaveBtn:SetNormalFontObject(GameFontNormal)
ListedPlayerSaveBtn:SetHighlightFontObject(GameFontHighlight)
ListedPlayerSaveBtn:SetScript("OnMouseDown", function(self, button)
if button == "LeftButton" and SettingsListedPlayerEditBox:GetText() ~= "" then
if config.ListedPlayers[SettingsListedPlayerEditBox:GetText()] then
config.ListedPlayers[SettingsListedPlayerEditBox:GetText()] = {SettingsListedPlayerReasonDropDown.Text:GetText(), SettingsListedPlayerDescriptionEditBox:GetText()}
print("Added player: " .. SettingsListedPlayerEditBox:GetText()) -- Add localization
else
config.ListedPlayers[SettingsListedPlayerDropDown.Text:GetText()] = {SettingsListedPlayerReasonDropDown.Text:GetText() or "", SettingsListedPlayerDescriptionEditBox:GetText() or ""}
end
SettingsListedPlayerEditBox:SetText("")
SettingsListedPlayerDescriptionEditBox:SetText("")
UIDropDownMenu_Initialize(SettingsListedPlayerDropDown, initializePlayer)
UIDropDownMenu_SetSelectedID(SettingsListedPlayerDropDown, 1)
UIDropDownMenu_Initialize(SettingsListedPlayerReasonDropDown, initializeReason)
UIDropDownMenu_SetSelectedID(SettingsListedPlayerReasonDropDown, 1)
end
end)
-- Button remove player
local ListedPlayerRemoveBtn = CreateFrame("Button", "SettingsListedPlayerRemoveBtn", ListedPlayersFrame, "OptionsButtonTemplate")
ListedPlayerRemoveBtn:SetPoint("BOTTOMLEFT", ListedPlayersFrame, 130, 15)
ListedPlayerRemoveBtn:SetSize(80, 30)
ListedPlayerRemoveBtn:SetText("Remove") -- Add localization
ListedPlayerRemoveBtn:SetNormalFontObject(GameFontNormal)
ListedPlayerRemoveBtn:SetHighlightFontObject(GameFontHighlight)
ListedPlayerRemoveBtn:SetScript("OnMouseDown", function(self, button)
if button == "LeftButton" then
for k,v in pairs(config.ListedPlayers) do
if SettingsListedPlayerDropDown.Text:GetText() == k then
config.ListedPlayers[k] = nil
print("Removed player: " .. k) -- Add localization
UIDropDownMenu_Initialize(SettingsListedPlayerDropDown, initializePlayer)
UIDropDownMenu_SetSelectedID(SettingsListedPlayerDropDown, 1)
UIDropDownMenu_Initialize(SettingsListedPlayerReasonDropDown, initializeReason)
UIDropDownMenu_SetSelectedID(SettingsListedPlayerReasonDropDown, 1)
SettingsListedPlayerEditBox:SetText("")
SettingsListedPlayerDescriptionEditBox:SetText("")
break
end
end
end
end)
|
-----------------------------------
-- Area: Windurst_Woods
-----------------------------------
require("scripts/globals/zone")
-----------------------------------
zones = zones or {}
zones[tpz.zone.WINDURST_WOODS] =
{
text =
{
CONQUEST_BASE = 0, -- Tallying conquest results...
ITEM_CANNOT_BE_OBTAINED = 6541, -- You cannot obtain the <item>. Come back after sorting your inventory.
ITEM_OBTAINED = 6547, -- Obtained: <item>.
GIL_OBTAINED = 6548, -- Obtained <number> gil.
KEYITEM_OBTAINED = 6550, -- Obtained key item: <keyitem>.
KEYITEM_LOST = 6551, -- Lost key item: <keyitem>.
NOT_HAVE_ENOUGH_GIL = 6552, -- You do not have enough gil.
HOMEPOINT_SET = 6638, -- Home point set!
YOU_ACCEPT_THE_MISSION = 6731, -- You have accepted the mission.
PEW_SAHBARAEF_DIALOG = 6827, -- We can deliver goods to your residence or to the residences of your friends.
ITEM_DELIVERY_DIALOG = 6827, -- We can deliver goods to your residence or to the residences of your friends.
JU_KAMJA_DIALOG = 6827, -- We can deliver goods to your residence or to the residences of your friends.
MOG_LOCKER_OFFSET = 6998, -- Your Mog Locker lease is valid until <timestamp>, kupo.
FISHING_MESSAGE_OFFSET = 7096, -- You can't fish here.
IMAGE_SUPPORT = 7200, -- Your [fishing/woodworking/smithing/goldsmithing/clothcraft/leatherworking/bonecraft/alchemy/cooking] skills went up [a little/ever so slightly/ever so slightly].
GUILD_TERMINATE_CONTRACT = 7214, -- You have terminated your trading contract with the [Fishermen's/Carpenters'/Blacksmiths'/Goldsmiths'/Weavers'/Tanners'/Boneworkers'/Alchemists'/Culinarians'] Guild and formed a new one with the [Fishermen's/Carpenters'/Blacksmiths'/Goldsmiths'/Weavers'/Tanners'/Boneworkers'/Alchemists'/Culinarians'] Guild.
GUILD_NEW_CONTRACT = 7222, -- You have formed a new trading contract with the [Fishermen's/Carpenters'/Blacksmiths'/Goldsmiths'/Weavers'/Tanners'/Boneworkers'/Alchemists'/Culinarians'] Guild.
NO_MORE_GP_ELIGIBLE = 7229, -- You are not eligible to receive guild points at this time.
GP_OBTAINED = 7234, -- Obtained: <number> guild points.
NOT_HAVE_ENOUGH_GP = 7235, -- You do not have enough guild points.
VALERIANO_SHOP_DIALOG = 7545, -- Halfling philosophers and heroine beauties, welcome to the Troupe Valeriano show! And how gorgeous and green this fair town is!
RAKOHBUUMA_OPEN_DIALOG = 7642, -- To expel those who would subvert the law and order of Windurst Woods... To protect the Mithra populace from all manner of threats and dangers... That is the job of us guards.
RETTO_MARUTTO_DIALOG = 7958, -- Allo-allo! If you're after boneworking materials, then make sure you buy them herey in Windurst! We're the cheapest in the whole wide worldy!
SHIH_TAYUUN_DIALOG = 7960, -- Oh, that Retto-Marutto... If he keeps carrying on while speaking to the customers, he'll get in trouble with the guildmaster again!
KUZAH_HPIROHPON_DIALOG = 7969, -- Sew...I mean...So, want to get your paws on the top-quality materials as used in the Weaverrrs' Guild?
MERIRI_DIALOG = 7971, -- If you're interested in buying some works of art from our Weavers' Guild, then you've come to the right placey-wacey.
PERIH_VASHAI_DIALOG = 8257, -- You can now become a ranger!
QUESSE_SHOP_DIALOG = 8511, -- Welcome to the Windurst Chocobo Stables.
MONONCHAA_SHOP_DIALOG = 8512, -- Huh...? If you be wanting anything therrre, [mister/missy], then hurry up and decide, then get the heck out of herrre!
MANYNY_SHOP_DIALOG = 8513, -- Are you in urgent needy-weedy of anything? I have a variety of thingy-wingies you may be interested in.
WIJETIREN_SHOP_DIALOG = 8518, -- From humble Mithran cold medicines to the legendary Windurstian ambrrrosia of immortality, we have it all...
NHOBI_ZALKIA_OPEN_DIALOG = 8521, -- Psst... Interested in some rrreal hot property? From lucky chocobo digs to bargain goods that fell off the back of an airship...all my stuff is a rrreal steal!
NHOBI_ZALKIA_CLOSED_DIALOG = 8522, -- You're interested in some cheap shopping, rrright? I'm real sorry. I'm not doing business rrright now.
NYALABICCIO_OPEN_DIALOG = 8523, -- Ladies and gentlemen, kittens and cubs! Do we have the sale that you've been waiting forrr!
NYALABICCIO_CLOSED_DIALOG = 8524, -- Sorry, but our shop is closed rrright now. Why don't you go to Gustaberg and help the situation out therrre?
BIN_STEJIHNA_OPEN_DIALOG = 8525, -- Why don't you buy something from me? You won't regrrret it! I've got all sorts of goods from the Zulkheim region!
BIN_STEJIHNA_CLOSED_DIALOG = 8526, -- I'm taking a brrreak from the saleswoman gig to give dirrrections. So...through this arrrch is the residential area.
TARAIHIPERUNHI_OPEN_DIALOG = 8527, -- Ooh...do I have some great merchandise for you! Man...these are once-in-a-lifetime offers, so get them while you can.
TARAIHIPERUNHI_CLOSED_DIALOG = 8528, -- <pant> I am but a poor merchant. Mate, but you just wait! Strife...one day I'll live the high life. Hey, that's my dream, anyway...
CATALIA_DIALOG = 8559, -- While we cannot break our promise to the Windurstians, to ensure justice is served, we would secretly like you to take two shields off of the Yagudo who you meet en route.
FORINE_DIALOG = 8560, -- Act according to our convictions while fulfilling our promise with the Tarutaru. This is indeed a fitting course for us, the people of glorious San d'Oria.
CONQUEST = 8928, -- You've earned conquest points!
APURURU_DIALOG = 9491, -- There's no way Semih Lafihna will just hand it over for no good reason. Maybe if you try talking with Kupipi...
EMPYREAL_ARROW_LEARNED = 9725, -- You have learned the weapon skill Empyreal Arrow!
TRICK_OR_TREAT = 9736, -- Trick or treat...
THANK_YOU_TREAT = 9737, -- Thank you... And now for your treat...
HERE_TAKE_THIS = 9738, -- Here, take this...
IF_YOU_WEAR_THIS = 9739, -- If you put this on and walk around, something...unexpected might happen...
THANK_YOU = 9740, -- Thank you...
NOKKHI_BAD_COUNT = 9758, -- What kinda smart-alecky baloney is this!? I told you to bring me the same kinda ammunition in complete sets. And don't forget the flowers, neither.
NOKKHI_GOOD_TRADE = 9760, -- And here you go! Come back soon, and bring your friends!
NOKKHI_BAD_ITEM = 9761, -- I'm real sorry, but there's nothing I can do with those.
MILLEROVIEUNET_OPEN_DIALOG = 9979, -- Please have a look at these wonderful products from Qufim Island! You won't regret it!
MILLEROVIEUNET_CLOSED_DIALOG = 9980, -- Now that I've finally learned the language here, I'd like to start my own business. If I could only find a supplier...
CLOUD_BAD_COUNT = 10105, -- Well, don't just stand there like an idiot! I can't do any bundlin' until you fork over a set of 99 tools and <item>! And I ain't doin' no more than seven sets at one time, so don't even try it!
CLOUD_GOOD_TRADE = 10109, -- Here, take 'em and scram. And don't say I ain't never did nothin' for you!
CLOUD_BAD_ITEM = 10110, -- What the hell is this junk!? Why don't you try bringin' what I asked for before I shove one of my sandals up your...nose!
CHOCOBO_DIALOG = 10404, -- Kweh!
},
mob =
{
},
npc =
{
HALLOWEEN_SKINS =
{
[17764400] = 55, -- Meriri
[17764401] = 54, -- Kuzah Hpirohpon
[17764462] = 58, -- Taraihi-Perunhi
[17764464] = 56, -- Nhobi Zalkia
[17764465] = 57, -- Millerovieunet
},
},
}
return zones[tpz.zone.WINDURST_WOODS]
|
local Ans = select(2, ...);
local TUJ = {};
TUJ.__index = TUJ;
Ans.Database.TUJ = TUJ;
local temp = {};
function TUJ.GetPrice(id, key)
TUJMarketInfo(id, temp);
return temp[key];
end
|
return "3.11.0"
|
vim.cmd("hi clear")
vim.opt.termguicolors = true
local onedark = require("onedark")
onedark.load()
onedark.setup({
-- Main options --
style = "dark", -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
transparent = false, -- Show/hide background
term_colors = true, -- Change terminal color as per the selected theme style
ending_tildes = false, -- Show the end-of-buffer tildes. By default they are hidden
-- toggle theme style ---
toggle_style_key = "<leader>ts", -- Default keybinding to toggle
toggle_style_list = { "dark", "darker", "cool", "deep", "warm", "warmer", "light" }, -- List of styles to toggle between
-- Change code style ---
-- Options are italic, bold, underline, none
-- You can configure multiple style with comma seperated, For e.g., keywords = 'italic,bold'
code_style = {
comments = "italic",
keywords = "none",
functions = "none",
strings = "none",
variables = "none",
},
-- Custom Highlights --
colors = {}, -- Override default colors
highlights = {}, -- Override highlight groups
-- Plugins Config --
diagnostics = {
darker = true, -- darker colors for diagnostic
undercurl = true, -- use undercurl instead of underline for diagnostics
background = true, -- use background color for virtual text
},
})
colors = {
fg = "#abb2bf",
comment = "#5c6370",
-- bg = "#4b5263",
bg = "#3A3F4B",
violet = "#c678dd",
dark_blue = "#61afef",
border = "#4b5263",
orange = "#d19a66",
-- orange = "#be5046",
red = "#e06c75",
green = "#98c379",
yellow = "#e5c07b",
blue = "#61afef",
magenta = "#c678dd",
cyan = "#56b6c2",
}
--[[
#282c34
#abb2bf
#e06c75
#be5046
#98c379
#e5c07b
#d19a66
#61afef
#c678dd
#56b6c2
#4b5263
#5c6370
]]
vim.cmd("hi! link juliaSymbol Number")
vim.cmd("hi! link juliaSymbolS Number")
vim.cmd("hi! link juliaFunction Function")
vim.cmd("hi! link juliaFunctionDefinition Function")
vim.cmd("hi! link juliaFunctionDef Function")
vim.cmd("hi! link juliaFunctionCall Function")
vim.cmd("hi! link juliaMacro Function")
-- vim.cmd("hi juliaMacro guifg=" .. colors.green)
--
-- vim.cmd("hi juliaParDelim guifg=" .. colors.yellow)
-- vim.cmd("hi juliaSemicolon guifg=" .. colors.yellow)
-- vim.cmd("hi juliaColon guifg=" .. colors.yellow)
-- vim.cmd("hi juliaComma guifg=" .. colors.yellow)
-- vim.cmd("hi TabLineFill guibg=" .. colors.bg .. " guifg=" .. colors.bg)
-- vim.cmd("hi BufferLineFill guibg=" .. colors.bg .. " guifg=" .. colors.bg)
-- vim.cmd("hi StatusLine guibg=" .. colors.bg .. " guifg=" .. colors.bg)
-- vim.cmd("hi StatusLineNC guibg=" .. colors.bg .. " guifg=" .. colors.bg)
-- vim.cmd("hi WinSeparator guibg=NONE")
vim.cmd("hi WinSeparator guibg=NONE guifg=" .. colors.bg)
-- vim.cmd("hi WinSeparator guibg=NONE guifg=" .. colors.comment)
-- vim.cmd("hi TelescopeBorder guifg=" .. colors.border)
-- vim.cmd("hi TelescopePromptBorder guifg=" .. colors.cyan)
-- vim.cmd("hi TelescopeResultsBorder guifg=" .. colors.cyan)
-- vim.cmd("hi TelescopePreviewBorder guifg=" .. colors.cyan)
-- Enable transparency
-- vim.cmd("hi TelescopeNormal guibg=NONE ctermbg=NONE")
-- vim.cmd("hi SignColumn guibg=NONE ctermbg=NONE")
-- vim.cmd("hi LineNr guibg=NONE ctermbg=NONE")
-- vim.cmd("hi Number guibg=NONE ctermbg=NONE")
-- vim.cmd("hi Normal guibg=NONE ctermbg=NONE")
-- vim.cmd("hi Normal guibg=#2E3440 ctermbg=NONE")
-- vim.cmd("hi NonText guibg=NONE ctermbg=NONE")
vim.cmd("hi EndOfBuffer guibg=NONE ctermbg=NONE")
-- Enable transparency
-- vim.cmd("hi Normal guibg=NONE ctermbg=NONE")
-- vim.cmd("hi NonText guibg=NONE ctermbg=NONE")
-- vim.cmd("hi LineNr guibg=NONE ctermbg=NONE")
-- vim.cmd("hi EndOfBuffer guibg=NONE ctermbg=2")
|
do local _={[20000001]={out_res={{1,10010001,100}},gift_id=20000001}};return _;end
|
local urutora = require('lib.urutora')
local inspect = require('lib.inspect')
local Timer = require('lib.timer')
local wave = require "lib.wave"
local u
local bgColor = urutora.utils.toRGB('#343a40')
local canvas
local backup_dir = ""
local backup_list = {}
-- audio stuff
local recDev = nil
local foundRecordingSettings = nil
local audioSource = nil
local devicesString
local recordingFreq, recordingChan, recordingBitDepth
local soundDataTable = {}
local soundDataLen = 0
local startedRecording = faflse
local saveRecording = false
-- Possible combination testing
local sampleFmts = {48000, 44100, 32000, 22050, 16000, 8000}
local chanStereo = {2, 1}
local bitDepths = {16, 8}
-- sintructions
local overlay_image = nil
function CreateRandomString(length)
local uuid = ""
local chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
for i = 1, length do
local l = math.random(1, #chars)
uuid = uuid .. string.sub(chars, l, l)
end
return uuid
end
function love.load()
math.randomseed( os.time() )
width, height, flags = love.window.getMode( )
u = urutora:new()
make_save_dir()
function love.mousepressed(x, y, button) u:pressed(x, y) end
function love.mousemoved(x, y, dx, dy) u:moved(x, y, dx, dy) end
function love.mousereleased(x, y, button) u:released(x, y) end
function love.textinput(text) u:textinput(text) end
function love.wheelmoved(x, y) u:wheelmoved(x, y) end
function love.keypressed(k, scancode, isrepeat)
u:keypressed(k, scancode, isrepeat)
if k == 'escape' then
love.event.quit()
end
end
-- find recording settings
setup_recording_device()
-- yeah ?
find_best_recording_settings ()
local w, h = love.window.getMode()
-- Fixme: i dont know how to caculate this but without it
-- the notification bar covers the buttons.
local tab_button_height = h / 8.0
local widget_padding = 5
canvas = love.graphics.newCanvas(w, h)
canvas:setFilter('nearest', 'nearest')
local pixelscale = love.window.getDPIScale()
print ("PX SCALE:".. pixelscale)
local DefaultFont = love.graphics.newFont('fonts/block.ttf',20)
local FontSmall = love.graphics.newFont('fonts/block.ttf',12)
u.setDefaultFont(DefaultFont)
u.setResolution(canvas:getWidth(), canvas:getHeight())
local RecordTabButton = urutora.button({
text = '[ Recording ]',
x = widget_padding,
y = 2,
w = (width / 2.0 ) - widget_padding,
h = tab_button_height,
tag = 'RecordTabButton'
})
local BackupListTabButton = urutora.button({
text = 'Backups',
x = (width / 2.0 ) + widget_padding,
y = 2,
w = (width / 2.0 ) - widget_padding,
h = tab_button_height,
tag = 'BackupListTabButton'
})
RecordTabContents= u.panel({ rows = 6,
cols = 2,
x = widget_padding,
y = tab_button_height + ( widget_padding * 4),
w = w - (widget_padding * 2),
h = h - tab_button_height,
tag = 'RecordTabContents' })
RecordingLabel = u.label({ text = 'Press Record button' }):setStyle({ font = FontSmall })
RecordingLabel2 = u.label({ text = 'below to start recording' }):setStyle({ font = FontSmall })
RecordingImage = u.image({ image = love.graphics.newImage('img/microphone-icon.png'),
keep_aspect_ratio = true })
ButtonState = {
Recording = 1,
Stopped = 2,
Processing = 3
}
RecordingButton = u.button({ text = "Record" , state = ButtonState.Stopped })
RecordingButton:setStyle({padding = 15})
RecordingButton:action(function(e)
-- dumb way of managing button state, this is still broken
if (RecordingButton.state == ButtonState.Stopped) then
RecordingButton.text = "Stop"
RecordingButton.state = ButtonState.Recording
set_overlay()
Timer.after(3, function() start_recording () end)
elseif (RecordingButton.state == ButtonState.Recording) then
stop_recording ()
RecordingButton.text = "Record"
RecordingButton.state = ButtonState.Stopped
save_recording ()
end
end)
RecordTabContents
:colspanAt(1, 1, 2)
:colspanAt(2, 1, 2)
:colspanAt(3, 1, 2)
:colspanAt(5, 1, 2)
:addAt(1, 1, RecordingLabel)
:addAt(2, 1, RecordingLabel2)
:addAt(3, 1, RecordingImage)
:addAt(5, 1, RecordingButton)
RecordTabContents.outline = true
BackupListTabContents = u.panel( { rows = 12,
cols = 1,
csy = 150,
x = widget_padding,
y = tab_button_height + (widget_padding * 4) ,
w = w - (widget_padding * 2),
h = h - tab_button_height,
tag = 'BackupListTabContents'})
BackupListTabContents.outline = true
update_backup_panel(BackupListTabContents)
u:add(RecordTabButton)
u:add(BackupListTabButton)
u:add(RecordTabContents)
u:add(BackupListTabContents)
-- start off with the recording tab infront.
u:deactivateByTag('BackupListTabContents')
RecordTabButton:action(function(e)
print("Showing Recording interface")
RecordTabButton.text = "[ Recording ]"
BackupListTabButton.text = "Backups"
u:deactivateByTag('BackupListTabContents')
u:activateByTag('RecordTabContents')
end)
BackupListTabButton:action(function(e)
print("Listing Backups")
RecordTabButton.text = "Recording"
BackupListTabButton.text = "[ Backups ]"
update_backup_panel(BackupListTabContents)
u:deactivateByTag('RecordTabContents')
u:activateByTag('BackupListTabContents')
end)
end
function love.update(dt)
u:update(dt)
Timer.update(dt)
if recDev:isRecording () then
local data = recDev:getData()
if data then
soundDataLen = soundDataLen + data:getSampleCount()
soundDataTable[#soundDataTable + 1] = data
print("Current sound data len: ", #soundDataTable)
end
end
end
function love.draw()
love.graphics.setCanvas(canvas)
love.graphics.clear(bgColor)
u:draw()
love.graphics.setCanvas()
x, y, w, h = love.window.getSafeArea()
love.graphics.draw(canvas, x, y, 0,
love.graphics.getWidth() / canvas:getWidth(),
love.graphics.getHeight() / canvas:getHeight()
)
if overlay_image then
image_height = overlay_image:getHeight()
image_width = overlay_image:getWidth()
love.graphics.draw(overlay_image,
(w / 2.0) - (image_width / 2.0), (h / 2.0) - (image_height / 2.0))
end
end
function make_save_dir()
-- maybe ?
love.filesystem.setIdentity("po-backup")
-- on android this will be the path on
base_dir = love.filesystem.getSaveDirectory()
backup_dir = base_dir .. "/backups"
-- this needs to be tested better.
success = love.filesystem.createDirectory( "backups" )
end
function update_backup_panel (Panel)
backup_list = update_backup_list()
-- first disable everything in the panel.
Panel:forEach (function (e)
e:deactivate()
end)
for k,wavfile in ipairs(backup_list) do
local SongButton = u.button({ text = "Track " .. wavfile ,
h = 20,
song = wavfile
})
SongButton:action (function (e)
backup_path = "backups/" .. wavfile
print ("loading from backup path" .. backup_path)
music = love.audio.newSource(backup_path, "stream")
music:play()
end)
Panel:addAt(k,1,SongButton)
end
end
function update_backup_list()
print("Updating backup list")
local filtered_list = {}
local files = love.filesystem.getDirectoryItems ("backups")
for i, v in ipairs(files) do
if string.find(v, "wav") then
table.insert (filtered_list,v)
end
end
print (inspect(filtered_list))
print("Update completed")
return filtered_list
end
function find_best_recording_settings ()
print ("Finding best recording settings...")
backup_list = update_backup_list()
local success = false
for _, sampleFmt in ipairs(sampleFmts) do
for _, bitDepth in ipairs(bitDepths) do
for _, stereo in ipairs(chanStereo) do
success = recDev:start(16384, sampleFmt, bitDepth, stereo)
recDev:stop() -- not sure if this s a good idea to do on failure.
if success then
recordingFreq = sampleFmt
recordingBitDepth = bitDepth
recordingChan = stereo
foundRecordingSettings = true
print("Found good recording settings", sampleFmt, bitDepth, stereo)
return
end
print("Coudlnt find a recording format, this app wont work otherwise")
end
end
end
end
function set_overlay ()
print ("Setting overlay")
overlay_image = love.graphics.newImage('img/po-record-plug.png')
print (overlay_image)
end
function start_recording ()
print ("started recording" , recordingFreq, recordingBitDepth, recordingChan)
recDev:start(16384, recordingFreq, recordingBitDepth, recordingChan)
end
function stop_recording ()
print ("Stopped recording")
recDev:stop()
end
function save_recording ()
print ("Saving file")
local soundDataIdx = 0
-- this is where we were recording but not now.
local soundData = love.sound.newSoundData(soundDataLen,
recordingFreq,
recordingBitDepth,
recordingChan)
for _, v in ipairs(soundDataTable) do
for i = 0, v:getSampleCount() - 1 do
for j = 1, recordingChan do
local m = v:getSample (i,j)
soundData:setSample(soundDataIdx, j, m)
end
soundDataIdx = soundDataIdx + 1
end
v:release()
end
soundDataTable = {}
randomName = "backups/".. CreateRandomString(8) .. ".wav"
print ("Saving as " .. randomName)
ret = wave.save { filename = randomName,
sound = soundData,
overwrite = true,
callback = false}
print ("Done saving file")
end
function setup_recording_device ()
-- get a list of devices ( https://love2d.org/forums/viewtopic.php?t=88151&p=231722 )
local devices = love.audio.getRecordingDevices()
assert(#devices > 0, "no recording devices found")
--this may not be right, maybe set this as a preference
recDev = devices[1]
end
|
return {
version = "1.1",
luaversion = "5.1",
tiledversion = "1.1.6",
orientation = "orthogonal",
renderorder = "right-down",
width = 100,
height = 100,
tilewidth = 32,
tileheight = 32,
nextobjectid = 20,
properties = {},
tilesets = {
{
name = "tilesetB",
firstgid = 1,
filename = "tilesetB.tsx",
tilewidth = 32,
tileheight = 32,
spacing = 0,
margin = 0,
image = "Tileset.png",
imagewidth = 512,
imageheight = 256,
tileoffset = {
x = 0,
y = 0
},
grid = {
orientation = "orthogonal",
width = 32,
height = 32
},
properties = {},
terrains = {},
tilecount = 128,
tiles = {}
},
{
name = "tilesetA",
firstgid = 129,
filename = "tilesetA.tsx",
tilewidth = 32,
tileheight = 32,
spacing = 0,
margin = 0,
image = "Tiles.png",
imagewidth = 256,
imageheight = 256,
tileoffset = {
x = 0,
y = 0
},
grid = {
orientation = "orthogonal",
width = 32,
height = 32
},
properties = {},
terrains = {},
tilecount = 64,
tiles = {
{
id = 0,
objectGroup = {
type = "objectgroup",
name = "",
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
draworder = "index",
properties = {},
objects = {
{
id = 1,
name = "",
type = "",
shape = "rectangle",
x = 2.10079,
y = 1.63395,
width = 24.2758,
height = 30.3448,
rotation = 0,
visible = true,
properties = {}
}
}
}
},
{
id = 1,
objectGroup = {
type = "objectgroup",
name = "",
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
draworder = "index",
properties = {},
objects = {
{
id = 4,
name = "",
type = "",
shape = "polyline",
x = 5.91398,
y = 7.16846,
width = 0,
height = 0,
rotation = 0,
visible = true,
polyline = {
{ x = 0, y = 0 },
{ x = 26.1649, y = 0 },
{ x = 26.3441, y = 24.7312 },
{ x = 2.87448, y = 24.7312 },
{ x = 2.86738, y = 16.129 },
{ x = -3.22581, y = 16.129 },
{ x = -3.31364, y = 12.8997 },
{ x = 0, y = 12.9032 },
{ x = -0.179211, y = 8.88178e-16 }
},
properties = {}
}
}
}
},
{
id = 2,
objectGroup = {
type = "objectgroup",
name = "",
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
draworder = "index",
properties = {},
objects = {
{
id = 3,
name = "",
type = "",
shape = "rectangle",
x = -0.0518998,
y = 6.77659,
width = 29.6445,
height = 25.2095,
rotation = 0,
visible = true,
properties = {}
}
}
}
},
{
id = 3,
objectGroup = {
type = "objectgroup",
name = "",
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
draworder = "index",
properties = {},
objects = {
{
id = 1,
name = "",
type = "",
shape = "rectangle",
x = 6.5358,
y = 0.466843,
width = 19.374,
height = 31.5119,
rotation = 0,
visible = true,
properties = {}
}
}
}
},
{
id = 4,
objectGroup = {
type = "objectgroup",
name = "",
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
draworder = "index",
properties = {},
objects = {
{
id = 1,
name = "",
type = "",
shape = "rectangle",
x = -0.233421,
y = 13.5384,
width = 31.7453,
height = 18.6737,
rotation = 0,
visible = true,
properties = {}
}
}
}
}
}
}
},
layers = {
{
type = "tilelayer",
name = "Background",
x = 0,
y = 0,
width = 100,
height = 100,
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
properties = {},
encoding = "lua",
data = {
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 50, 51, 51, 50, 51, 51, 51, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 50, 50, 51, 51, 51, 51, 51, 51, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 49, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 49, 49, 49, 49, 49, 49, 50, 50, 50, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 49, 49, 49, 49, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 49, 50, 49, 49, 49, 49, 49, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 49, 49, 49, 49, 49, 49, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50
}
},
{
type = "objectgroup",
name = "Keystone",
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
draworder = "topdown",
properties = {},
objects = {
{
id = 19,
name = "Keystone",
type = "",
shape = "rectangle",
x = 2933.61,
y = 3122.89,
width = 51.3069,
height = 45.2067,
rotation = 0,
visible = true,
properties = {}
}
}
},
{
type = "objectgroup",
name = "Player",
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
draworder = "topdown",
properties = {},
objects = {
{
id = 4,
name = "Player",
type = "",
shape = "rectangle",
x = 103.333,
y = 223.333,
width = 31.3333,
height = 64,
rotation = 0,
visible = true,
properties = {}
}
}
},
{
type = "objectgroup",
name = "Enemy",
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
draworder = "topdown",
properties = {},
objects = {
{
id = 9,
name = "Monkey",
type = "",
shape = "rectangle",
x = 3099.33,
y = 3128,
width = 58,
height = 38,
rotation = 0,
visible = true,
properties = {}
}
}
},
{
type = "tilelayer",
name = "Collision",
x = 0,
y = 0,
width = 100,
height = 100,
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
properties = {
["collidable"] = true
},
encoding = "lua",
data = {
98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 15, 16, 0, 0, 0, 0, 0, 0, 15, 16, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 31, 32, 0, 0, 0, 0, 0, 0, 31, 32, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, 0, 0, 0, 0, 0, 0, 0, 15, 16, 0, 0, 0, 0, 0, 0, 0, 15, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 31, 32, 0, 0, 0, 0, 0, 0, 0, 31, 32, 0, 0, 0, 0, 0, 0, 0, 31, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 122, 0, 0, 0, 0, 0, 0, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51
}
}
}
}
|
test_run = require('test_run').new()
--
-- Setting bloom_fpr to 1 disables bloom filter.
--
s = box.schema.space.create('test', {engine = 'vinyl'})
_ = s:create_index('pk', {bloom_fpr = 1})
for i = 1, 10, 2 do s:insert{i} end
box.snapshot()
for i = 1, 10 do s:get{i} end
stat = s.index.pk:info()
stat.disk.bloom_size -- 0
stat.disk.iterator.bloom.hit -- 0
stat.disk.iterator.bloom.miss -- 0
s:drop()
s = box.schema.space.create('test', {engine = 'vinyl'})
_ = s:create_index('pk')
reflects = 0
function cur_reflects() return box.space.test.index.pk:info().disk.iterator.bloom.hit end
function new_reflects() local o = reflects reflects = cur_reflects() return reflects - o end
seeks = 0
function cur_seeks() return box.space.test.index.pk:info().disk.iterator.lookup end
function new_seeks() local o = seeks seeks = cur_seeks() return seeks - o end
for i = 1,1000 do s:replace{i} end
box.snapshot()
_ = new_reflects()
_ = new_seeks()
for i = 1,1000 do s:select{i} end
new_reflects() == 0
new_seeks() == 1000
for i = 1001,2000 do s:select{i} end
new_reflects() > 980
new_seeks() < 20
test_run:cmd('restart server default')
s = box.space.test
reflects = 0
function cur_reflects() return box.space.test.index.pk:info().disk.iterator.bloom.hit end
function new_reflects() local o = reflects reflects = cur_reflects() return reflects - o end
seeks = 0
function cur_seeks() return box.space.test.index.pk:info().disk.iterator.lookup end
function new_seeks() local o = seeks seeks = cur_seeks() return seeks - o end
_ = new_reflects()
_ = new_seeks()
for i = 1,1000 do s:select{i} end
new_reflects() == 0
new_seeks() == 1000
for i = 1001,2000 do s:select{i} end
new_reflects() > 980
new_seeks() < 20
s:drop()
|
pg = pg or {}
pg.enemy_data_statistics_321 = {
[14600203] = {
cannon = 30,
hit_growth = 210,
bubble_fx = "",
speed_growth = 0,
pilot_ai_template_id = 10001,
air = 0,
luck = 0,
dodge = 14,
cannon_growth = 1600,
speed = 20,
reload = 150,
reload_growth = 0,
dodge_growth = 198,
antisub = 0,
torpedo = 50,
hit = 14,
antisub_growth = 0,
air_growth = 0,
durability_growth = 123200,
base = 249,
durability = 1260,
armor_growth = 0,
torpedo_growth = 2000,
luck_growth = 0,
battle_unit_type = 90,
armor = 0,
antiaircraft = 115,
antiaircraft_growth = 3600,
id = 14600203,
world_enhancement = {
0,
0,
0,
0,
0,
0,
0
},
specific_fx_scale = {},
appear_fx = {
"appearQ"
},
equipment_list = {
1000680,
1000685,
1000690,
1000695,
1000700
},
buff_list = {}
},
[14600301] = {
cannon = 68,
hit_growth = 210,
bubble_fx = "",
speed_growth = 0,
pilot_ai_template_id = 10001,
air = 0,
speed = 18,
dodge = 14,
id = 14600301,
cannon_growth = 0,
rarity = 4,
reload_growth = 0,
dodge_growth = 198,
luck = 0,
star = 4,
hit = 14,
antisub_growth = 0,
air_growth = 0,
reload = 150,
base = 250,
durability = 2480,
armor_growth = 0,
torpedo_growth = 0,
luck_growth = 0,
antiaircraft_growth = 0,
armor = 0,
torpedo = 52,
durability_growth = 0,
antisub = 0,
antiaircraft = 85,
scale = 144,
battle_unit_type = 95,
world_enhancement = {
0,
0,
0,
0,
0,
0,
0
},
specific_fx_scale = {},
appear_fx = {
"bossguangxiao",
"appearQ"
},
equipment_list = {
770001,
770002,
770003,
770004,
770005,
770006
},
buff_list = {}
},
[14600302] = {
cannon = 150,
hit_growth = 210,
bubble_fx = "",
speed_growth = 0,
pilot_ai_template_id = 10001,
air = 0,
speed = 20,
dodge = 11,
id = 14600302,
cannon_growth = 0,
rarity = 3,
reload_growth = 0,
dodge_growth = 156,
luck = 0,
star = 4,
hit = 14,
antisub_growth = 0,
air_growth = 0,
reload = 150,
base = 251,
durability = 8900,
armor_growth = 0,
torpedo_growth = 0,
luck_growth = 0,
antiaircraft_growth = 0,
armor = 0,
torpedo = 0,
durability_growth = 0,
antisub = 0,
antiaircraft = 115,
scale = 144,
battle_unit_type = 95,
world_enhancement = {
0,
0,
0,
0,
0,
0,
0
},
specific_fx_scale = {},
appear_fx = {
"bossguangxiao",
"appearQ"
},
equipment_list = {
770101,
770102,
770103,
770104,
770105,
770106
},
buff_list = {
{
ID = 50500,
LV = 1
}
}
},
[14600303] = {
cannon = 55,
hit_growth = 210,
bubble_fx = "",
speed_growth = 0,
pilot_ai_template_id = 10001,
air = 85,
speed = 18,
dodge = 11,
id = 14600303,
cannon_growth = 0,
rarity = 3,
reload_growth = 0,
dodge_growth = 156,
luck = 0,
star = 4,
hit = 14,
antisub_growth = 0,
air_growth = 0,
reload = 150,
base = 252,
durability = 7800,
armor_growth = 0,
torpedo_growth = 0,
luck_growth = 0,
antiaircraft_growth = 0,
armor = 0,
torpedo = 0,
durability_growth = 0,
antisub = 0,
antiaircraft = 125,
scale = 144,
battle_unit_type = 95,
world_enhancement = {
0,
0,
0,
0,
0,
0,
0
},
specific_fx_scale = {},
appear_fx = {
"bossguangxiao",
"appearQ"
},
equipment_list = {
770201,
770202,
770203,
770204,
770209,
770210,
770211
},
buff_list = {}
},
[14601001] = {
cannon = 5,
battle_unit_type = 25,
bubble_fx = "",
speed_growth = 0,
pilot_ai_template_id = 20005,
air = 0,
speed = 15,
dodge = 0,
id = 14601001,
cannon_growth = 300,
rarity = 2,
reload_growth = 0,
dodge_growth = 0,
luck = 0,
star = 2,
hit = 10,
antisub_growth = 0,
air_growth = 0,
reload = 150,
base = 458,
durability = 105,
armor_growth = 0,
torpedo_growth = 3000,
luck_growth = 0,
hit_growth = 144,
armor = 0,
torpedo = 27,
durability_growth = 4000,
antisub = 0,
antiaircraft = 25,
antiaircraft_growth = 800,
world_enhancement = {
0,
0,
0,
0,
0,
0,
0
},
specific_fx_scale = {},
equipment_list = {
1003002,
1003007,
1003012
},
buff_list = {}
},
[14601002] = {
cannon = 10,
battle_unit_type = 30,
bubble_fx = "",
speed_growth = 0,
pilot_ai_template_id = 20005,
air = 0,
speed = 15,
dodge = 0,
id = 14601002,
cannon_growth = 800,
rarity = 2,
reload_growth = 0,
dodge_growth = 0,
luck = 0,
star = 2,
hit = 10,
antisub_growth = 0,
air_growth = 0,
reload = 150,
base = 459,
durability = 180,
armor_growth = 0,
torpedo_growth = 2000,
luck_growth = 0,
hit_growth = 144,
armor = 0,
torpedo = 22,
durability_growth = 5920,
antisub = 0,
antiaircraft = 45,
antiaircraft_growth = 1600,
world_enhancement = {
0,
0,
0,
0,
0,
0,
0
},
specific_fx_scale = {},
equipment_list = {
1003017,
1003022
},
buff_list = {}
},
[14601003] = {
cannon = 12,
battle_unit_type = 35,
bubble_fx = "",
speed_growth = 0,
pilot_ai_template_id = 20004,
air = 0,
speed = 15,
dodge = 0,
id = 14601003,
cannon_growth = 1500,
rarity = 2,
reload_growth = 0,
dodge_growth = 0,
luck = 0,
star = 2,
hit = 10,
antisub_growth = 0,
air_growth = 0,
reload = 150,
base = 460,
durability = 270,
armor_growth = 0,
torpedo_growth = 1200,
luck_growth = 0,
hit_growth = 144,
armor = 0,
torpedo = 15,
durability_growth = 16000,
antisub = 0,
antiaircraft = 35,
antiaircraft_growth = 1000,
world_enhancement = {
0,
0,
0,
0,
0,
0,
0
},
specific_fx_scale = {},
equipment_list = {
1003027,
1003032,
1003037
},
buff_list = {}
},
[14601004] = {
cannon = 35,
battle_unit_type = 60,
bubble_fx = "",
speed_growth = 0,
pilot_ai_template_id = 20004,
air = 0,
speed = 15,
dodge = 0,
id = 14601004,
cannon_growth = 2000,
rarity = 2,
reload_growth = 0,
dodge_growth = 0,
luck = 0,
star = 2,
hit = 10,
antisub_growth = 0,
air_growth = 0,
reload = 150,
base = 461,
durability = 650,
armor_growth = 0,
torpedo_growth = 0,
luck_growth = 0,
hit_growth = 144,
armor = 0,
torpedo = 0,
durability_growth = 33600,
antisub = 0,
antiaircraft = 40,
antiaircraft_growth = 1200,
world_enhancement = {
0,
0,
0,
0,
0,
0,
0
},
specific_fx_scale = {},
equipment_list = {
1003042,
1003047,
1003052
},
buff_list = {}
},
[14601005] = {
cannon = 0,
antiaircraft_growth = 1200,
bubble_fx = "",
speed_growth = 0,
pilot_ai_template_id = 20004,
air = 35,
speed = 15,
dodge = 0,
id = 14601005,
cannon_growth = 0,
rarity = 2,
reload_growth = 0,
dodge_growth = 0,
luck = 0,
star = 2,
hit = 10,
antisub_growth = 0,
air_growth = 1800,
reload = 150,
base = 462,
durability = 560,
armor_growth = 0,
torpedo_growth = 0,
luck_growth = 0,
hit_growth = 144,
armor = 0,
torpedo = 0,
durability_growth = 27200,
antisub = 0,
antiaircraft = 40,
battle_unit_type = 65,
world_enhancement = {
0,
0,
0,
0,
0,
0,
0
},
bound_bone = {
cannon = {
{
1.8,
1.14,
0
}
},
torpedo = {
{
1.07,
0.24,
0
}
},
antiaircraft = {
{
1.8,
1.14,
0
}
},
plane = {
{
1.8,
1.14,
0
}
}
},
specific_fx_scale = {},
equipment_list = {
1003057,
1003062,
1003067,
1003072
},
buff_list = {}
},
[14601006] = {
cannon = 45,
hit_growth = 1200,
bubble_fx = "",
speed_growth = 0,
pilot_ai_template_id = 80000,
air = 0,
speed = 30,
dodge = 0,
id = 14601006,
cannon_growth = 0,
rarity = 1,
reload_growth = 0,
dodge_growth = 0,
luck = 0,
star = 1,
hit = 81,
antisub_growth = 0,
air_growth = 0,
reload = 150,
base = 464,
durability = 60,
armor_growth = 0,
torpedo_growth = 900,
luck_growth = 0,
antiaircraft_growth = 0,
armor = 0,
torpedo = 85,
durability_growth = 2550,
antisub = 0,
antiaircraft = 0,
battle_unit_type = 15,
world_enhancement = {
0,
0,
0,
0,
0,
0,
0
},
specific_fx_scale = {},
appear_fx = {
"appearsmall"
},
equipment_list = {
1000866,
1000901
},
buff_list = {}
},
[14601007] = {
cannon = 8,
reload = 150,
speed_growth = 0,
cannon_growth = 310,
pilot_ai_template_id = 10002,
air = 0,
base = 463,
dodge = 0,
durability_growth = 2000,
antiaircraft = 0,
speed = 10,
reload_growth = 0,
dodge_growth = 0,
luck = 0,
battle_unit_type = 65,
hit = 8,
antisub_growth = 0,
air_growth = 0,
antiaircraft_growth = 0,
torpedo = 30,
durability = 60,
armor_growth = 0,
torpedo_growth = 2300,
luck_growth = 0,
hit_growth = 120,
armor = 0,
id = 14601007,
antisub = 0,
world_enhancement = {
0,
0,
0,
0,
0,
0,
0
},
specific_fx_scale = {},
equipment_list = {
1003092,
1003097
},
buff_list = {}
},
[14601008] = {
cannon = 16,
reload = 150,
speed_growth = 0,
cannon_growth = 1000,
pilot_ai_template_id = 70140,
air = 0,
base = 520,
dodge = 0,
durability_growth = 10000,
antiaircraft = 0,
speed = 60,
reload_growth = 0,
dodge_growth = 0,
luck = 0,
battle_unit_type = 40,
hit = 35,
antisub_growth = 0,
air_growth = 0,
antiaircraft_growth = 1000,
torpedo = 0,
durability = 250,
armor_growth = 0,
torpedo_growth = 0,
luck_growth = 0,
hit_growth = 144,
armor = 0,
id = 14601008,
bubble_fx = "",
antisub = 0,
world_enhancement = {
0,
0,
0,
0,
0,
0,
0
},
equipment_list = {
771301,
771302
},
buff_list = {}
},
[14601009] = {
cannon = 16,
reload = 150,
speed_growth = 0,
cannon_growth = 1000,
pilot_ai_template_id = 70141,
air = 0,
base = 520,
dodge = 0,
durability_growth = 10000,
antiaircraft = 0,
speed = 60,
reload_growth = 0,
dodge_growth = 0,
luck = 0,
battle_unit_type = 40,
hit = 35,
antisub_growth = 0,
air_growth = 0,
antiaircraft_growth = 1000,
torpedo = 0,
durability = 250,
armor_growth = 0,
torpedo_growth = 0,
luck_growth = 0,
hit_growth = 144,
armor = 0,
id = 14601009,
bubble_fx = "",
antisub = 0,
world_enhancement = {
0,
0,
0,
0,
0,
0,
0
},
equipment_list = {
771303,
771304
},
buff_list = {}
},
[14601010] = {
cannon = 16,
reload = 150,
speed_growth = 0,
cannon_growth = 1000,
pilot_ai_template_id = 70142,
air = 0,
base = 520,
dodge = 0,
durability_growth = 10000,
antiaircraft = 0,
speed = 60,
reload_growth = 0,
dodge_growth = 0,
luck = 0,
battle_unit_type = 40,
hit = 35,
antisub_growth = 0,
air_growth = 0,
antiaircraft_growth = 1000,
torpedo = 0,
durability = 250,
armor_growth = 0,
torpedo_growth = 0,
luck_growth = 0,
hit_growth = 144,
armor = 0,
id = 14601010,
bubble_fx = "",
antisub = 0,
world_enhancement = {
0,
0,
0,
0,
0,
0,
0
},
equipment_list = {
771303,
771304
},
buff_list = {}
},
[14601011] = {
cannon = 16,
reload = 150,
speed_growth = 0,
cannon_growth = 1000,
pilot_ai_template_id = 70143,
air = 0,
base = 520,
dodge = 0,
durability_growth = 10000,
antiaircraft = 0,
speed = 60,
reload_growth = 0,
dodge_growth = 0,
luck = 0,
battle_unit_type = 40,
hit = 35,
antisub_growth = 0,
air_growth = 0,
antiaircraft_growth = 1000,
torpedo = 0,
durability = 250,
armor_growth = 0,
torpedo_growth = 0,
luck_growth = 0,
hit_growth = 144,
armor = 0,
id = 14601011,
bubble_fx = "",
antisub = 0,
world_enhancement = {
0,
0,
0,
0,
0,
0,
0
},
equipment_list = {
771301,
771302
},
buff_list = {}
},
[14601101] = {
cannon = 6,
hit_growth = 210,
bubble_fx = "",
speed_growth = 0,
pilot_ai_template_id = 10001,
air = 0,
speed = 32,
dodge = 15,
id = 14601101,
cannon_growth = 468,
rarity = 4,
reload_growth = 0,
dodge_growth = 222,
luck = 0,
star = 4,
hit = 14,
antisub_growth = 0,
air_growth = 0,
reload = 150,
base = 465,
durability = 640,
armor_growth = 0,
torpedo_growth = 4491,
luck_growth = 0,
antiaircraft_growth = 1638,
armor = 0,
torpedo = 54,
durability_growth = 20080,
antisub = 0,
antiaircraft = 20,
battle_unit_type = 50,
world_enhancement = {
0,
0,
0,
0,
0,
0,
0
},
specific_fx_scale = {},
appear_fx = {
"appearQ"
},
equipment_list = {
1003102,
1003107,
1003112
},
buff_list = {}
}
}
return
|
onJob = 0
isSignedIn = false
RegisterNetEvent("npc-jobmanager:playerBecameJob")
AddEventHandler("npc-jobmanager:playerBecameJob", function(job, name, notify)
if job == "ems" then
isSignedIn = true
else
isSignedIn = false
--StopJob()
end
end)
RegisterNetEvent("nowUnemployed")
AddEventHandler("nowUnemployed", function()
onJob = 0
end)
|
-- window management
local application = require "hs.application"
local hotkey = require "hs.hotkey"
local window = require "hs.window"
local layout = require "hs.layout"
local grid = require "hs.grid"
local hints = require "hs.hints"
local screen = require "hs.screen"
local alert = require "hs.alert"
local fnutils = require "hs.fnutils"
local geometry = require "hs.geometry"
local mouse = require "hs.mouse"
-- default 0.2
window.animationDuration = 0
switcher = hs.window.switcher.new(
hs.window.filter.new()
:setCurrentSpace(true):setDefaultFilter{}, -- make emacs window show in switcher list
{
showTitles = false, -- don't show window title
thumbnailSize = 200, -- window thumbnail size
showSelectedThumbnail = false, -- don't show bigger thumbnail
backgroundColor = {0, 0, 0, 0.8}, -- background color
highlightColor = {0.3, 0.3, 0.3, 0.8}, -- selected color
}
)
-- left half
hotkey.bind(hyper, "Left", function()
if window.focusedWindow() then
window.focusedWindow():moveToUnit(layout.left50)
else
alert.show("No active window")
end
end)
-- right half
hotkey.bind(hyper, "Right", function()
window.focusedWindow():moveToUnit(layout.right50)
end)
-- top half
hotkey.bind(hyper, "Up", function()
window.focusedWindow():moveToUnit '[0,0,100,50]'
end)
-- bottom half
hotkey.bind(hyper, "Down", function()
window.focusedWindow():moveToUnit '[0,50,100,100]'
end)
-- left top quarter
hotkey.bind(hyperAlt, "Left", function()
window.focusedWindow():moveToUnit '[0,0,50,50]'
end)
-- right bottom quarter
hotkey.bind(hyperAlt, "Right", function()
window.focusedWindow():moveToUnit '[50,50,100,100]'
end)
-- right top quarter
hotkey.bind(hyperAlt, "Up", function()
window.focusedWindow():moveToUnit '[50,0,100,50]'
end)
-- left bottom quarter
hotkey.bind(hyperAlt, "Down", function()
window.focusedWindow():moveToUnit '[0,50,50,100]'
end)
-- full screen
hotkey.bind(hyper, 'F', function()
window.focusedWindow():toggleFullScreen()
end)
-- center window
hotkey.bind(hyper, 'C', function()
window.focusedWindow():centerOnScreen()
end)
-- maximize window
hotkey.bind(hyper, 'M', function()
toggle_maximize()
end)
-- defines for window maximize toggler
local frameCache = {}
-- toggle a window between its normal size, and being maximized
function toggle_maximize()
local win = window.focusedWindow()
if frameCache[win:id()] then
win:setFrame(frameCache[win:id()])
frameCache[win:id()] = nil
else
frameCache[win:id()] = win:frame()
win:maximize()
end
end
-- move active window to previous monitor
hotkey.bind(hyperShift, "Left", function()
window.focusedWindow():moveOneScreenWest()
end)
-- move active window to next monitor
hotkey.bind(hyperShift, "Right", function()
window.focusedWindow():moveOneScreenEast()
end)
-- move cursor to previous monitor
hotkey.bind(hyperCtrl, "Left", function()
focusScreen(window.focusedWindow():screen():previous())
end)
-- move cursor to next monitor
hotkey.bind(hyperCtrl, "Right", function()
focusScreen(window.focusedWindow():screen():next())
end)
-- Predicate that checks if a window belongs to a screen
function isInScreen(screen, win)
return win:screen() == screen
end
function focusScreen(screen)
-- Get windows within screen, ordered from front to back.
-- If no windows exist, bring focus to desktop. Otherwise, set focus on
-- front-most application window.
local windows = fnutils.filter(window.orderedWindows(), fnutils.partial(isInScreen, screen))
local windowToFocus = #windows > 0 and windows[1] or window.desktop()
windowToFocus:focus()
-- move cursor to center of screen
local pt = geometry.rectMidPoint(screen:fullFrame())
mouse.setAbsolutePosition(pt)
end
-- maximized active window and move to selected monitor
moveto = function(win, n)
local screens = screen.allScreens()
if n > #screens then
alert.show("Only " .. #screens .. " monitors ")
else
local toWin = screen.allScreens()[n]:name()
alert.show("Move " .. win:application():name() .. " to " .. toWin)
layout.apply({{nil, win:title(), toWin, layout.maximized, nil, nil}})
end
end
-- move cursor to monitor 1 and maximize the window
hotkey.bind(hyperShift, "1", function()
local win = window.focusedWindow()
moveto(win, 1)
end)
hotkey.bind(hyperShift, "2", function()
local win = window.focusedWindow()
moveto(win, 2)
end)
hotkey.bind(hyperShift, "3", function()
local win = window.focusedWindow()
moveto(win, 3)
end)
hs.hotkey.bind(hyperShift, "K", function()
local app = hs.application.frontmostApplication() -- local windows = app:allWindows()
local windows = app:allWindows()
local nextWin = nil
-- Finder somehow has one more invisible window, so don't take it into account
-- (only tested on Yosemite 10.10.1)
if app:bundleID() == "com.apple.finder" then
nextWin = windows[#windows - 1]
else
nextWin = windows[#windows]
end
if nextWin:isMinimized() == true then
nextWin:unminimize()
else
nextWin:focus()
end
end)
hs.hotkey.bind(hyperShift, "J", function()
local app = hs.application.frontmostApplication()
local windows = app:allWindows()
local previousWin = nil
-- Finder somehow has one more invisible window, so don't take it into account
-- (only tested on Yosemite 10.10.1)
if app:bundleID() == "com.apple.finder" then
previousWin = windows[#windows - 1]
else
previousWin = windows[#windows - 1]
end
if previousWin:isMinimized() == true then
previousWin:unminimize()
else
previousWin:focus()
end
end)
_fuzzyChoices = nil
_fuzzyChooser = nil
_fuzzyLastWindow = nil
function fuzzyQuery(s, m)
s_index = 1
m_index = 1
match_start = nil
while true do
if s_index > s:len() or m_index > m:len() then
return -1
end
s_char = s:sub(s_index, s_index)
m_char = m:sub(m_index, m_index)
if s_char == m_char then
if match_start == nil then
match_start = s_index
end
s_index = s_index + 1
m_index = m_index + 1
if m_index > m:len() then
match_end = s_index
s_match_length = match_end - match_start
score = m:len() / s_match_length
return score
end
else
s_index = s_index + 1
end
end
end
function _fuzzyFilterChoices(query)
if query:len() == 0 then
_fuzzyChooser:choices(_fuzzyChoices)
return
end
pickedChoices = {}
for i, j in pairs(_fuzzyChoices) do
fullText = (j["text"] .. " " .. j["subText"]):lower()
score = fuzzyQuery(fullText, query:lower())
if score > 0 then
j["fzf_score"] = score
table.insert(pickedChoices, j)
end
end
local sort_func = function(a, b)
return a["fzf_score"] > b["fzf_score"]
end
table.sort(pickedChoices, sort_func)
_fuzzyChooser:choices(pickedChoices)
end
function _fuzzyPickWindow(item)
if item == nil then
if _fuzzyLastWindow then
-- Workaround so last focused window stays focused after dismissing
_fuzzyLastWindow:focus()
_fuzzyLastWindow = nil
end
return
end
id = item["windowID"]
window = hs.window.get(id)
window:focus()
end
function windowFuzzySearch()
windows = hs.window.filter.default:getWindows(hs.window.filter.sortByFocusedLast)
-- windows = hs.window.orderedWindows()
_fuzzyChoices = {}
for i, w in pairs(windows) do
title = w:title()
app = w:application():name()
item = {
["text"] = app,
["subText"] = title,
-- ["image"] = w:snapshot(),
["windowID"] = w:id()
}
-- Handle special cases as necessary
-- if app == "Safari" and title == "" then
-- skip, it's a weird empty window that shows up sometimes for some reason
-- else
table.insert(_fuzzyChoices, item)
-- end
end
_fuzzyLastWindow = hs.window.focusedWindow()
_fuzzyChooser = hs.chooser.new(_fuzzyPickWindow):choices(_fuzzyChoices):searchSubText(true)
_fuzzyChooser:queryChangedCallback(_fuzzyFilterChoices) -- Enable true fuzzy find
_fuzzyChooser:show()
end
-- fuzzy search
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "J", function()
windowFuzzySearch()
end)
function doubleLeftClick(point)
local clickState = hs.eventtap.event.properties.mouseEventClickState
hs.eventtap.event.newMouseEvent(hs.eventtap.event.types["leftMouseDown"], point):setProperty(clickState, 1):post()
hs.eventtap.event.newMouseEvent(hs.eventtap.event.types["leftMouseUp"], point):setProperty(clickState, 1):post()
hs.timer.usleep(1000)
hs.eventtap.event.newMouseEvent(hs.eventtap.event.types["leftMouseDown"], point):setProperty(clickState, 2):post()
hs.eventtap.event.newMouseEvent(hs.eventtap.event.types["leftMouseUp"], point):setProperty(clickState, 2):post()
end
-- double click
hotkey.bind(hyperShift, "F", function()
doubleLeftClick(hs.mouse.absolutePosition())
end)
-- kill window
hotkey.bind(hyperCtrl, "K", function()
window.focusedWindow():application():kill()
end)
function brightness0()
screens = hs.screen.allScreens()
for i,s in pairs(screens) do
print(s:name())
s:setBrightness(0)
end
end
function brightness60()
screens = hs.screen.allScreens()
for i,s in pairs(screens) do
s:setBrightness(0.6)
end
end
function brightnesstest()
end
hotkey.bind(hyper, ";", function()
brightness0()
end)
hotkey.bind(hyper, "'", function()
brightness60()
end)
hotkey.bind(hyper, "0", function()
brightnesstest()
end)
|
local triangle = {}
function triangle.kind(a, b, c)
end
return triangle
|
#!/usr/bin/env luajit
local caesar=require"caesar_fast"
local encrypt, decrypt = caesar.encrypt, caesar.decrypt
local text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
text=text:rep(1e6)
require "shuffle"
local start=os.clock()
t=encrypt(text, 13)
print(os.clock()-start)
if #arg < 1 then
print(string.format("usage: %s <key> [decrypt]", arg[0]))
os.exit(0)
end
local key=tonumber(arg[1]) or 13
local operate=arg[2]=="decrypt" and decrypt or encrypt
local text=io.read("*a")
local output=operate(text, key)
print("Text", text)
print("Output", output)
print("Inverse", operate==encrypt and decrypt(output, key) or encrypt(output, key))
|
puny_gackle_bat = Creature:new {
objectName = "@mob/creature_names:puny_gackle_bat",
socialGroup = "gacklebat",
faction = "",
level = 6,
chanceHit = 0.25,
damageMin = 50,
damageMax = 55,
baseXp = 147,
baseHAM = 180,
baseHAMmax = 220,
armor = 0,
resists = {0,0,0,0,0,0,0,-1,-1},
meatType = "meat_carnivore",
meatAmount = 2,
hideType = "hide_bristley",
hideAmount = 1,
boneType = "bone_mammal",
boneAmount = 1,
milk = 0,
tamingChance = 0.25,
ferocity = 0,
pvpBitmask = AGGRESSIVE + ATTACKABLE + ENEMY,
creatureBitmask = PACK,
optionsBitmask = AIENABLED,
diet = CARNIVORE,
templates = {"object/mobile/puny_gackle_bat.iff"},
hues = { 24, 25, 26, 27, 28, 29, 30, 31 },
scale = 0.6,
lootGroups = {},
weapons = {},
conversationTemplate = "",
attacks = {
{"",""},
{"stunattack",""}
}
}
CreatureTemplates:addCreatureTemplate(puny_gackle_bat, "puny_gackle_bat")
|
object_tangible_quest_som_tulrus_marker_02 = object_tangible_quest_shared_som_tulrus_marker_02:new {
}
ObjectTemplates:addTemplate(object_tangible_quest_som_tulrus_marker_02, "object/tangible/quest/som_tulrus_marker_02.iff")
|
function matrix_muliply(a, b)
local c = {}
for i = 1, #a do
local resultline = {}
for k, va in pairs(a[i]) do
for j, vb in pairs(b[k]) do
local res = (resultline[j] or 0) + va * vb
resultline[j] = (res ~= 0) and res or nil
end
end
end
end
|
--[[
Project: SA-MP-API
Author: Tim4ukys
My url: vk.com/tim4ukys
]]
local sys = require 'SA-MP API.kernel'
sys.ffi.cdef[[
struct stPickup {
int iModelID;
int iType;
float fPosition[3];
}__attribute__ ((packed));
]]
|
#!/usr/bin/lua
--[[ Allows control of power outlets. ]]--
local CONFIG_FILE = "/etc/homeautomation/client_devices.conf"
local outlets = {}
function outlets:new(o)
log("outlets.new()")
o = o or {}
setmetatable(o, self)
self.__index = self
if info.io == nil then
info.io = {}
end
if info.io.lighting == nil then
info.io.lighting = {}
end
-- Keep a copy of everything entered into info.io by this class so future iterations
-- know what they should be updating.
self.io_local_copy = {}
return o
end
-- Test if an outlet has been previously assigned by this class.
function outlets:_is_local(role, address)
for role_local in next, self.io_local_copy do
if role == role_local then
for address_local in next, self.io_local_copy[role_local] do
if address == address_local then
return true
end
end
end
end
end
-- Called periodically.
function outlets:update()
self:read_config()
self:delayed_actions()
end
function outlets:delayed_actions()
for role in next, info.io do
for address in next, info.io[role] do
if info.io[role][address].command ~= nil and
info.io[role][address].timer_trigger ~= nil and
info.io[role][address].timer_action ~= nil and
info.io[role][address].timer_duration ~= nil and
tonumber(info.io[role][address].timer_countdown) > 0 then
info.io[role][address].timer_countdown = tonumber(info.io[role][address].timer_countdown) - tonumber(info.config.update_delay)
if info.io[role][address].timer_countdown <= 0 then
log('Auto switch off after timeout:', role, address)
info.io[role][address].timer_countdown = 0
self:operate_one(role, address, info.io[role][address].timer_action)
end
end
end
end
end
function outlets:read_config()
if not is_file_or_dir(CONFIG_FILE) then
if info.io.lighting.ERROR == nil then
log(CONFIG_FILE .. " does not exist. No client configuration.")
end
info.io.lighting.ERROR = CONFIG_FILE .. " does not exist. No client configuration."
return
end
info.io.lighting.ERROR = nil
-- Only need to read if file has been modified since last read.
local file_mod_time_string = file_mod_time(CONFIG_FILE)
if file_mod_time_string == info.io.lighting.file_update_time then
return
end
log("Reading: " .. CONFIG_FILE)
local file_handle = io.open(CONFIG_FILE, "r")
if file_handle then
-- Mark all nodes with a role in self.valid_io as potentially_invalid so they will
-- get deleted later if not updated.
for role in next, info.io do
for address in next, info.io[role] do
if self:_is_local(role, address) then
info.io[role][address].potentially_invalid = true
end
end
end
info.io.lighting.file_update_time = file_mod_time_string
local key, value, address, role, command, timer_trigger, timer_duration, timer_action
for line in file_handle:lines() do
key, value = string.match(line, "^%s*client\.device\.(.+)%s*:%s*(.+)%s*$")
if key == "address" and address == nil then
address = sanitize_topic(value)
elseif key == "role" and role == nil then
role = sanitize_topic_atom(value)
elseif key == "command" and command == nil then
command = sanitize_filename(value)
elseif key == "timer_trigger" and timer_trigger == nil then
timer_trigger = sanitize_text(value)
elseif key == "timer_duration" and timer_duration == nil then
timer_duration = sanitize_digits(value)
elseif key == "timer_action" and timer_action == nil then
timer_action = sanitize_text(value)
elseif key == nil then
-- pass
else
log("Error in " .. CONFIG_FILE .. " at \"" .. key .. " : " .. value .. "\"")
file_handle:close()
return
end
if (address ~= nil) and (role ~= nil) and (command ~= nil) and
(timer_trigger ~= nil) and (timer_duration ~= nil) and (timer_action ~= nil) then
log("Storing: ", address, role, command, timer_trigger, timer_duration, timer_action)
if info.io[role] == nil then
info.io[role] = {}
end
-- Set to low value for timer_countdown we get
-- to 0 soon and
-- transition to timer_action state.
-- THis ensures defined behaviour when daemon
-- is restarted.
info.io[role][address] = {command = command,
timer_trigger = timer_trigger,
timer_duration = timer_duration,
timer_action = timer_action,
timer_countdown = 1,
potentially_invalid = nil}
if self.io_local_copy[role] == nil then
self.io_local_copy[role] = {}
end
self.io_local_copy[role][address] = true
address = nil
role = nil
command = nil
timer_trigger = nil
timer_duration = nil
timer_action = nil
end
end
file_handle:close()
end
-- Clean up any that have expired.
-- TODO Move this to a cleanup function so it can be shared between all info.io elements.
for role in next, info.io do
for address in next, info.io[role] do
if info.io[role][address].potentially_invalid then
info.io[role][address] = nil
self.io_local_copy[role][address] = nil
end
end
end
-- Now disconnect from pubsub broker so it will re-connect with the right subscrptions for the new config.
mqtt_instance:disconnect()
end
-- Called when MQTT connects and returns a list of topics this module should subscribe to.
function outlets:subscribe()
local subscritions = {}
for role, things in pairs(self.io_local_copy) do
if type(things) == 'table' then
for address, thing in pairs(things) do
subscritions[#subscritions +1] = {role = role, address = address}
end
end
end
return subscritions
end
-- Publishes topics this module knows about.
function outlets:announce()
for address, device in pairs(info.io.lighting) do
if type(device) == 'table' then
device_announce("lighting", address, device.command)
end
end
end
-- This gets called whenever a topic this module is subscribed to appears on the bus.
function outlets:callback(path, incoming_data)
log("outlets:callback(", path, incoming_data, ")")
path = var_to_path(path)
local role, address = path:match('(.-)/(.+)')
if role == '_all' then
role = 'lighting'
end
-- "address" might contain "_all" keyword rather than full path so we need to compare
-- against every known device.
for light_address, _ in pairs(info.io.lighting) do
if light_address ~= 'file_update_time' then
if match_paths(role .. '/' .. address, role .. '/' .. light_address, true) then
self:operate_one(role, light_address, incoming_data._command)
end
end
end
end
function outlets:operate_one(role, address, command)
log(" outlets:operate_one(", role, address, incoming_data, ")")
if self.io_local_copy[role] and self.io_local_copy[role][address] then
local power_script = info.io[role][address].command
if command == "on" then
device_set_on(role, address, power_script)
elseif command == "off" then
device_set_off(role, address, power_script)
elseif command == "solicit" then
device_announce(role, address, power_script)
end
-- Set future action if it was configured.
-- eg. switch a light off again after a delay.
if info.io[role][address].timer_trigger == command then
info.io[role][address].timer_countdown = tonumber(info.io[role][address].timer_duration)
end
end
end
-- Get the value a particular device is set to. eg. "on" or "off".
-- Works by calling a bash program that contains the necessary code to perform the operation.
-- The name of this bash program can be set in the main configuration file.
function device_get_value(role, address, command)
-- TODO limit executable code in device.command.query to shell scripts in a limited directory.
local device_tmp_filename = string.gsub(address, "/", "__")
local handle = io.popen(POWER_SCRIPT_DIR .. command .. " " .. device_tmp_filename .. " query")
if not handle then
return nil
end
local ret_val = handle:read("*all")
handle:close()
return ret_val:match "^%s*(.-)%s*$"
end
-- Set a power management device to the "on" state.
-- Works by calling a bash program that contains the necessary code to perform the operation.
-- The name of this bash program can be set in the main configuration file.
function device_set_on(role, address, command)
log("device_set_on: " .. address)
local device_tmp_filename = string.gsub(address, "/", "__")
local ret_val = os.execute(POWER_SCRIPT_DIR .. command .. " " .. device_tmp_filename .. " on")
device_announce(role, address, command)
return ret_val
end
-- Set a power management device to the "off" state.
-- Works by calling a bash program that contains the necessary code to perform the operation.
-- The name of this bash program can be set in the main configuration file.
function device_set_off(role, address, command)
log("device_set_off: " .. address)
local device_tmp_filename = string.gsub(address, "/", "__")
local ret_val = os.execute(POWER_SCRIPT_DIR .. command .. " " .. device_tmp_filename .. " off")
device_announce(role, address, command)
return ret_val
end
-- Advertise the existence of a device over the message bus.
function device_announce(role, address, command)
local value = device_get_value(role, address, command)
local topic = "homeautomation/0/" .. role .. "/_announce"
local data = "_subject : " .. role .. "/" .. address .. " , _state : " .. value
log("Announcing: " .. topic, data)
mqtt_instance:publish(topic, data)
if DEBUG then
local found_match
for k, v in pairs(info.mqtt.last_announced) do
if string.match(info.mqtt.last_announced[k], address .. " : ") then
found_match = true
info.mqtt.last_announced[k] = role .. "/" .. address .. " : " .. os.time()
end
end
if not found_match then
table.insert(info.mqtt.last_announced, role .. "/" .. address .. " : " .. os.time())
end
end
end
return outlets
|
-- FIXME: if merged this branch, change to original repository
vim.fn["dein#add"]("Nanai10a/indent-guides.nvim", {
rev = "feat/support-cterm-hightlightning",
})
|
return {
version = "1.1",
luaversion = "5.1",
tiledversion = "0.15.0",
orientation = "orthogonal",
renderorder = "right-down",
width = 256,
height = 32,
tilewidth = 16,
tileheight = 16,
nextobjectid = 43,
properties = {},
tilesets = {
{
name = "tiles",
firstgid = 1,
tilewidth = 16,
tileheight = 16,
spacing = 0,
margin = 0,
image = "../images/tiles.png",
imagewidth = 512,
imageheight = 16,
tileoffset = {
x = 0,
y = 0
},
properties = {},
terrains = {},
tilecount = 32,
tiles = {}
}
},
layers = {
{
type = "imagelayer",
name = "BG",
visible = true,
opacity = 1,
offsetx = 0,
offsety = 1,
image = "../images/bg.png",
properties = {}
},
{
type = "tilelayer",
name = "Ground",
x = 0,
y = 0,
width = 256,
height = 32,
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
properties = {},
encoding = "lua",
data = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
}
},
{
type = "objectgroup",
name = "Enemies",
visible = false,
opacity = 1,
offsetx = 0,
offsety = 0,
properties = {},
objects = {
{
id = 29,
name = "Enemy1",
type = "",
shape = "rectangle",
x = 151,
y = 201,
width = 35,
height = 31,
rotation = 0,
visible = true,
properties = {}
},
{
id = 30,
name = "Enemy1",
type = "",
shape = "rectangle",
x = 324,
y = 352,
width = 41,
height = 38,
rotation = 0,
visible = true,
properties = {}
},
{
id = 31,
name = "Enemy1",
type = "",
shape = "rectangle",
x = 490,
y = 133,
width = 34,
height = 36,
rotation = 0,
visible = true,
properties = {}
},
{
id = 32,
name = "Enemy1",
type = "",
shape = "rectangle",
x = 3972,
y = 112,
width = 45,
height = 40,
rotation = 0,
visible = true,
properties = {}
},
{
id = 33,
name = "Enemy1",
type = "",
shape = "rectangle",
x = 3613,
y = 411,
width = 38,
height = 42,
rotation = 0,
visible = true,
properties = {}
},
{
id = 34,
name = "Enemy1",
type = "",
shape = "rectangle",
x = 3503,
y = 131,
width = 40,
height = 46,
rotation = 0,
visible = true,
properties = {}
},
{
id = 35,
name = "Enemy1",
type = "",
shape = "rectangle",
x = 1155,
y = 314,
width = 29,
height = 30,
rotation = 0,
visible = true,
properties = {}
},
{
id = 36,
name = "Enemy1",
type = "",
shape = "rectangle",
x = 961,
y = 30,
width = 35,
height = 25,
rotation = 0,
visible = true,
properties = {}
},
{
id = 37,
name = "Enemy1",
type = "",
shape = "rectangle",
x = 2937,
y = 284,
width = 36,
height = 39,
rotation = 0,
visible = true,
properties = {}
},
{
id = 38,
name = "Enemy1",
type = "",
shape = "rectangle",
x = 2709,
y = 168,
width = 34,
height = 33,
rotation = 0,
visible = true,
properties = {}
},
{
id = 39,
name = "Enemy1",
type = "",
shape = "rectangle",
x = 1477,
y = 88,
width = 38,
height = 39,
rotation = 0,
visible = true,
properties = {}
},
{
id = 40,
name = "Enemy1",
type = "",
shape = "rectangle",
x = 2851,
y = 413,
width = 34,
height = 33,
rotation = 0,
visible = true,
properties = {}
},
{
id = 41,
name = "Enemy1",
type = "",
shape = "rectangle",
x = 3287,
y = 350,
width = 33,
height = 32,
rotation = 0,
visible = true,
properties = {}
},
{
id = 42,
name = "Enemy1",
type = "",
shape = "rectangle",
x = 726,
y = 298,
width = 31,
height = 35,
rotation = 0,
visible = true,
properties = {}
}
}
}
}
}
|
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf"
module('BseUserEnterRoom_pb', package.seeall)
local BSEUSERENTERROOM = protobuf.Descriptor();
local BSEUSERENTERROOM_ROOMID_FIELD = protobuf.FieldDescriptor();
local BSEUSERENTERROOM_ROLE_FIELD = protobuf.FieldDescriptor();
local BSEUSERENTERROOM_AUTOMODE_FIELD = protobuf.FieldDescriptor();
BSEUSERENTERROOM_ROOMID_FIELD.name = "roomId"
BSEUSERENTERROOM_ROOMID_FIELD.full_name = ".com.xinqihd.sns.gameserver.proto.BseUserEnterRoom.roomId"
BSEUSERENTERROOM_ROOMID_FIELD.number = 1
BSEUSERENTERROOM_ROOMID_FIELD.index = 0
BSEUSERENTERROOM_ROOMID_FIELD.label = 2
BSEUSERENTERROOM_ROOMID_FIELD.has_default_value = false
BSEUSERENTERROOM_ROOMID_FIELD.default_value = ""
BSEUSERENTERROOM_ROOMID_FIELD.type = 9
BSEUSERENTERROOM_ROOMID_FIELD.cpp_type = 9
BSEUSERENTERROOM_ROLE_FIELD.name = "role"
BSEUSERENTERROOM_ROLE_FIELD.full_name = ".com.xinqihd.sns.gameserver.proto.BseUserEnterRoom.role"
BSEUSERENTERROOM_ROLE_FIELD.number = 2
BSEUSERENTERROOM_ROLE_FIELD.index = 1
BSEUSERENTERROOM_ROLE_FIELD.label = 2
BSEUSERENTERROOM_ROLE_FIELD.has_default_value = false
BSEUSERENTERROOM_ROLE_FIELD.default_value = nil
BSEUSERENTERROOM_ROLE_FIELD.message_type = ROLEINFO_PB_ROLEINFO
BSEUSERENTERROOM_ROLE_FIELD.type = 11
BSEUSERENTERROOM_ROLE_FIELD.cpp_type = 10
BSEUSERENTERROOM_AUTOMODE_FIELD.name = "automode"
BSEUSERENTERROOM_AUTOMODE_FIELD.full_name = ".com.xinqihd.sns.gameserver.proto.BseUserEnterRoom.automode"
BSEUSERENTERROOM_AUTOMODE_FIELD.number = 3
BSEUSERENTERROOM_AUTOMODE_FIELD.index = 2
BSEUSERENTERROOM_AUTOMODE_FIELD.label = 1
BSEUSERENTERROOM_AUTOMODE_FIELD.has_default_value = false
BSEUSERENTERROOM_AUTOMODE_FIELD.default_value = false
BSEUSERENTERROOM_AUTOMODE_FIELD.type = 8
BSEUSERENTERROOM_AUTOMODE_FIELD.cpp_type = 7
BSEUSERENTERROOM.name = "BseUserEnterRoom"
BSEUSERENTERROOM.full_name = ".com.xinqihd.sns.gameserver.proto.BseUserEnterRoom"
BSEUSERENTERROOM.nested_types = {}
BSEUSERENTERROOM.enum_types = {}
BSEUSERENTERROOM.fields = {BSEUSERENTERROOM_ROOMID_FIELD, BSEUSERENTERROOM_ROLE_FIELD, BSEUSERENTERROOM_AUTOMODE_FIELD}
BSEUSERENTERROOM.is_extendable = false
BSEUSERENTERROOM.extensions = {}
BseUserEnterRoom = protobuf.Message(BSEUSERENTERROOM)
_G.BSEUSERENTERROOM_PB_BSEUSERENTERROOM = BSEUSERENTERROOM
|
-- Peer DHT searching logic
--
-- Requests consecutively peers to find the WAN IP address of a searched peer.
--
-- Search have 3 modes:
-- * 'lookup': when a route for the searched peer is found, stop the search. The
-- route might go through a relay. No peer-to-peer communication is
-- initialized.
--
-- * 'ping': like 'lookup', but send a PING to the searched peer to check if
-- it is reachable/online. No peer-to-peer communication is
-- initialized.
--
-- * 'p2p': like 'ping', but initialize a peer-to-peer communication with UDP
-- hole punching, if necessary.
--
local peer = require('peer')
local packet = require('packet')
local M = {}
local function explain(n, s, fmt, ...)
if s.probe_cb then s:probe_cb{
action='explain',
what=string.format(fmt, ...),
} end
return n:explain("search %s", fmt, n:key(s.k), ...)
end
function M._extend(n, s, closest, src)
s.states[src.k] = {retry=0, rep=true}
local set = {}
for _, c in ipairs(s.closest) do
local p = c[2]
set[p:pack()] = true
end
for _, c in ipairs(closest) do
local dist = c[1]
local p = c[2]
local st = s.states[p.k]
if (
-- if peer has address
p.addr and
-- if peer already answered, skip,
(st == nil or not st.rep) and
-- ignore doublons
not set[p:pack()]
) then
--printf('extend $(cyan)%s', p)
p = n:add(p):acquire(s)
s.closest[#s.closest+1] = {dist, p}
set[p:pack()] = true
if s.cb and (s.return_all or p.k == s.k) then
cpcall(s.cb, s, p, src)
end
if s.probe_cb then s:probe_cb{
action="extend",
p=p,
st=st,
} end
end
end
-- XXX maybe give a preference to trusted peers, or peers which are public
-- or geographically close
table.sort(s.closest, function(a, b) return a[1] < b[1] end)
if s.probe_cb then s:probe_cb{
action="closest",
closest=s.closest,
states=s.states,
} end
end
function M.search(n, k, opts, cb)
-- opts might be a string being the search mode
-- or a table having the following fields:
-- * mode: 'ping' (default), 'lookup', 'p2p'
-- * timeout: search timeout. By default, wh.SEARCH_TIMEOUT
-- * count: search result count. By default, wh.KADEMILIA_K
-- * return_all: if true, returns all intermediary peers pointing to the
-- destination. by default, nil.
-- * probe_cb: function called to follow search steps. For debug purposes.
-- by default, nil.
assert(k)
if type(opts) == 'string' then
opts = {mode=opts}
end
if opts.mode == nil then opts.mode = 'ping' end
if opts.mode ~= 'lookup' and
opts.mode ~= 'p2p' and
opts.mode ~= 'ping' then
error("arg #3 must be 'p2p', 'lookup' or 'ping'")
end
if opts.count == nil then opts.count = wh.SEARCH_COUNT end
if timeout == nil then opts.timeout = wh.SEARCH_TIMEOUT end
local s = setmetatable({
cb=cb,
closest={},
count=opts.count,
deadline=now+opts.timeout,
k=k,
may_offline=true,
mode=opts.mode,
probe_cb=opts.probe_cb,
return_all=opts.return_all,
running=true,
states={},
uid1=wh.randombytes(8),
uid2=wh.randombytes(8),
}, {
__index = S
})
n.searches[s] = true
if s.probe_cb then s:probe_cb{
action="start",
from=n.p,
to=s.k,
mode=s.mode,
} end
-- bootstrap
local closest = n.kad:kclosest(k, wh.KADEMILIA_K, function(p)
return p.k == k or p:state() == 'direct'
end)
n:_extend(s, closest, n.kad.root)
return s
end
function M.stop_search(n, s)
if s.running then
s.running = false
--printf('stop search $(cyan)%s', n:key(s))
if s.probe_cb then s:probe_cb{
action='stop',
} end
n.searches[s] = nil
if s.cb then
cpcall(s.cb, s, nil)
end
for i, c in ipairs(s.closest) do
local p = c[2]
p:release(s)
end
s.closest = {}
end
end
function M.connect(n, dst_k, opts, cb)
local count = 1
local p_relay
local cbed = false
opts = opts or {}
opts.mode = 'p2p'
opts.count = 1
return n:search(dst_k, opts, function(s, p, via)
if cbed then return end
if p and not p.relay and p.addr then
cbed = true
return cb(s, p, true, p.addr)
elseif p and p.relay then
p_relay = p
elseif n.lo and p_relay then
local tunnel = n.lo:touch_tunnel(p_relay)
cbed = true
return cb(s, p_relay, false, tunnel.lo_addr)
else
cbed = true
return cb(s)
end
end)
end
function M.update(n, s, deadlines)
local to_remove = {}
if s.deadline ~= nil then
-- if search timeout, remove search
if now >= s.deadline then
explain(n, s, "stop")
n:stop_search(s)
return
end
deadlines[#deadlines+1] = s.deadline
end
for i, c in ipairs(s.closest) do
local p = c[2]
local deadline
local st = s.states[p.k] or {retry=0, rep=false}
if p.k == s.k then
if s.mode == 'ping' then
deadline = (st.req_ts or 0)+st.retry+1
if now >= deadline then
explain(n, s, "check if peer %s is alive", n:key(p))
n:_sendto{dst=p, m=packet.ping('normal', s.uid1)}
st.retry = st.retry + 1
st.req_ts = now
st.last_seen = now
deadline = st.req_ts+st.retry+1
end
elseif s.mode == 'p2p' then
if st.is_punched then
deadline = st.req_ts + st.retry + 1
elseif st.is_online then
deadline = st.req_ts + wh.MAX_PUNCH_TIMEOUT
else
deadline = (st.req_ts or 0) + st.retry + 1
end
if now >= deadline and st.is_punched then
if st.retry < wh.PING_RETRY then
explain(n, s, "is %s alive?", n:key(p))
assert(not p.relay, dump{p=p, st=st})
n:_sendto{dst=p, m=packet.ping('normal', s.uid2)}
st.req_ts = now
st.retry = st.retry + 1
deadline = st.req_ts + st.retry + 1
end
elseif now >= deadline then
if st.retry > wh.MAX_PUNCH_RETRY then
explain(n, s, "maximum tentative of punch with %s. abort!", n:key(p))
n:stop_search(s)
return
end
explain(n, s, "try to punch to %s", n:key(p))
local p_direct = peer{k=p.k, addr=p.addr}
n:_sendto{dst=p_direct, m=packet.ping('normal', s.uid2)}
n:_sendto{dst=p, m=packet.ping('normal', s.uid1)}
n:_sendto{dst=p, m=packet.ping('direct', s.uid2)}
st.retry = st.retry + 1
st.req_ts = now
if st.is_online then
deadline = st.req_ts + wh.MAX_PUNCH_TIMEOUT
else
deadline = (st.req_ts or 0) + st.retry + 1
end
end
end
-- do not send packet to self
elseif p.k == n.k then
-- keep deadline to nil
-- remove if search has too many nodes
elseif i > s.count then
-- keep deadline to nil
-- ignore if node does not have any address
elseif not p.addr then
-- keep deadline to nil
-- no response and not enough retry, send a find and wait retry sec
elseif not st.rep and st.retry <= wh.PING_RETRY then
deadline = (st.req_ts or 0)+st.retry+1
if now >= deadline then
n:_sendto{dst=p, m=packet.search(s.k)}
st.retry = st.retry + 1
st.req_ts = now
st.rep = false
deadline = st.req_ts+st.retry+1
if s.probe_cb then s:probe_cb{
action='request',
p=p,
st=st,
} end
end
end
-- save state
s.states[p.k] = st
if deadline ~= nil then
deadlines[#deadlines+1] = deadline
else
p:release(s)
to_remove[#to_remove+1] = i
end
end
for i = #to_remove, 1, -1 do
table.remove(s.closest, to_remove[i])
end
if s.probe_cb then s:probe_cb{
action="closest",
closest=s.closest,
states=states,
} end
if #s.closest == 0 then
n:stop_search(s)
end
end
function M.on_pong(n, body, src)
for s in pairs(n.searches) do
if s.k == src.k then
local st = s.states[src.k]
if s.mode == 'ping' then
if s.uid1 == body then
explain(n, s, "%s is alive!", n:key(src))
cpcall(s.cb, s, src, src)
n:stop_search(s)
end
elseif s.mode == 'p2p' then
if s.uid1 == body then
explain(n, s, "%s is alive!", n:key(src))
st.is_online = true
elseif s.uid2 == body and st.is_punched then
explain(n, s, "UDP hole punching is stable with %s!", n:key(src))
cpcall(s.cb, s, src, src)
n:stop_search(s)
elseif not src.relay and s.uid2 == body then
explain(n, s, "punched to %s!", n:key(src))
st.is_punched = true
st.retry = 0
s.uid2 = wh.randombytes(8)
end
end
break
end
end
end
function M.on_result(n, pks, closest, src)
for s in pairs(n.searches) do
if pks == s.k then
local st = s.states[src.k]
if st then
st.rep = true
local s_closest = {}
for i, p in ipairs(closest) do
s_closest[i] = {wh.xor(s.k, p.k), p}
end
if s.probe_cb then s:probe_cb{
action='response',
src=src,
closest=s_closest,
} end
n:_extend(s, s_closest, src)
else
-- XXX RESULT sent without SEARCH. Might be bug, stopped search race, malicious, ...
end
end
end
end
return M
|
--- @module DataHandler.DataSet
-- Provides definition for the DataSet class.
require 'torch'
local DataSet = {}
local function GetFormat(path)
local reverse_format = string.match(string.reverse(path), '%a+%.')
if 'txt.' == reverse_format then
return 'plain'
else
return 'torch'
end
end
function DataSet.Load(path, options)
-- default sentence length 12
local sentence_size = options['sentence_size'] or 12
-- format can be either 'torch' or 'plain'
local format = options['format'] or GetFormat(path)
local buffer = {}
if 'plain' == format then
-- In case it is reading plain sentences, we need the dictionary
-- to encode/translate the words.
assert(options['dictionary'])
local input_file = assert(torch.DiskFile(path, 'r'))
local sentence_count = 0
local text = nil
if not pcall(function() text = input_file:readString('*l') end) then
-- Set text to nil on eof.
text = nil
end
while text do
sentence_count = sentence_count + 1
if 0 == sentence_size % 100 then
collectgarbage()
end
local words = string.split(text, ' ')
if #words > sentence_size then
-- Print warning when the number of words in this
-- sentence is greater than sentence length, since we
-- are going to truncate it.
-- print(string.format('[WARNING] Sentence length %d > %d, truncated.',
-- #words, sentence_size))
end
-- Build up word indices. Apply zero-padding when the
-- sentence is not long enough, and truncate it if it is
-- too long.
local word_indices = {}
for j = 1, sentence_size do
if j <= #words then
word_indices[j] = options['dictionary']:IndexOfWord(words[j])
if not word_indices[j] then word_indices[j] = 0 end
else
word_indices[j] = 0
end
end
buffer[sentence_count] = word_indices
if not pcall(function() text = input_file:readString('*l') end) then
-- Set text to nil on eof.
text = nil
end
end -- end while text do
input_file:close()
local result = torch.Tensor(sentence_count, sentence_size)
for i = 1, sentence_count do
if 0 == i % 1000 then
xlua.progress(i, sentence_count)
collectgarbage()
end
for j = 1, sentence_size do
result[i][j] = buffer[i][j]
end
end
return result
else
local result = torch.load(path)
return result
end -- end if 'plain' == format
end
function DataSet.GenNegative(count, options)
local sentence_size = options.sentence_size or 12
local upper_bound = options.dictionary:size()
local result = torch.Tensor(count, sentence_size)
for i = 1, count do
-- The non-zero part of word indices in the sentence to be
-- generated.
local actual_length = torch.ceil(torch.uniform(0, sentence_size))
for j = 1, sentence_size do
if j <= actual_length then
result[i][j] = torch.ceil(torch.uniform(0, upper_bound))
else
result[i][j] = 0
end
end -- end for j
end -- end for i
return result
end
function DataSet.BatchIterator(options)
assert(options.training_set)
options.batch_size = options.batch_size or 1000
local dictionary = options.training_set.dictionary
local input = options.training_set.input
local iterator = {}
iterator.num_of_batches = torch.ceil(input:size()[1] / options.batch_size)
iterator.current_batch = 1
function iterator:fetch()
-- If we pass the end of batches, return nil
if self.current_batch > self.num_of_batches then
return nil
end
local start = (self.current_batch - 1) * options.batch_size + 1
-- It is possible that the last batch is smaller than usual.
local actual_batch_size = options.batch_size
if start + actual_batch_size - 1 > input:size()[1] then
actual_batch_size = input:size()[1] - start + 1
end
local result = torch.Tensor(actual_batch_size,
input:size()[2],
dictionary.dimension)
for i = start, start + actual_batch_size - 1 do
for j = 1, input:size()[2] do
if 0 < input[i][j] then
result[i - start + 1][j] = dictionary.vectors[input[i][j]]
else
-- zero padding if the sentence is not long enough
result[i - start + 1][j]:fill(0)
end
end -- end for j
end -- end for i
return result
end -- end function iterator:fetch
function iterator:next()
self.current_batch = self.current_batch + 1
end
return iterator
end
-- For nn.StochasticGradient
function DataSet.BatchIterator1(options)
assert(options.training_set)
options.batch_size = options.batch_size or 1000
local dictionary = options.training_set.dictionary
local input = options.training_set.input
local target = options.training_set.target
local iterator = {}
iterator.num_of_batches = torch.ceil(input:size()[1] / options.batch_size)
iterator.current_batch = 1
function iterator:fetch()
-- If we pass the end of batches, return nil
if self.current_batch > self.num_of_batches then
return nil
end
collectgarbage()
local start = (self.current_batch - 1) * options.batch_size + 1
-- It is possible that the last batch is smaller than usual.
local actual_batch_size = options.batch_size
if start + actual_batch_size - 1 > input:size()[1] then
actual_batch_size = input:size()[1] - start + 1
end
local result = {}
for i = start, start + actual_batch_size - 1 do
result[i - start + 1] = {}
result[i - start + 1][1] =
torch.Tensor(input:size()[2], dictionary.dimension)
result[i - start + 1][2] = target[i]
for j = 1, input:size()[2] do
if 0 < input[i][j] then
result[i - start + 1][1][j] = dictionary.vectors[input[i][j]]
else
-- zero padding if the sentence is not long enough
result[i - start + 1][1][j]:fill(0)
end
end -- end for j
end -- end for i
function result:size()
return actual_batch_size
end
return result
end -- end function iterator:fetch
function iterator:next()
self.current_batch = self.current_batch + 1
end
return iterator
end
return DataSet
|
require "nn"
require "torch"
require "optim"
require "cunn"
require "cutorch"
require "loadCharDataset.lua"
torch.manualSeed(1)
numClasses = 2
cmd = torch:CmdLine()
cmd:text()
cmd:option("-batchSize","10","Batchsize")
cmd:option("-coefL1", "0", "l1 coefficient")
cmd:option("-coefL2", "0", "l2 coefficient")
cmd:option("-numepochs", "10", "number of epochs")
--parse input params
params = cmd:parse(arg)
model = nn.Sequential()
model:add(nn.SpatialConvolutionMM(1, 96, 8, 8):cuda())
model:add(nn.ReLU())
model:add(nn.SpatialAveragePooling(5, 5, 5, 5 ))
model:add(nn.SpatialConvolutionMM(96, 256, 2, 2))
model:add(nn.ReLU())
model:add(nn.SpatialAveragePooling(2, 2, 2, 2))
model:add(nn.View(2*2*256))
model:add(nn.Linear(2*2*256, numClasses))
model:add(nn.LogSoftMax())
model = model:cuda()
criterion = nn.ClassNLLCriterion()
criterion = criterion:cuda()
traindata = train
testdata = test
parameters, gradParameters = model:getParameters()
local sum = function(t)
--sum the errors
s = 0
for i, v in ipairs(t) do
s = s + v
end
return s
end
for i = 1, params.numepochs do
print(string.format("Running %d epoch", i))
print("Starting to shuffle input data")
local shuffle = torch.randperm(traindata:size())
local shuff_inputs = torch.Tensor(traindata.data:size()):cuda()
local shuff_labels = torch.Tensor(traindata.labels:size()):cuda()
for idx = 1, traindata.data:size(1) do
shuff_inputs[idx] = traindata.data[shuffle[idx]]
shuff_labels[idx] = traindata.labels[shuffle[idx]]
end
print("Completed shuffling")
criterionTable={}
for j = 1, traindata:size(),params.batchSize do
local end_j = math.min(j + params.batchSize, traindata:size())
local inputs = shuff_inputs[{{j, end_j}}]
local labels = shuff_labels[{{j, end_j}}]
local feval = function(x)
--get new parameters
if x ~= parameters then
parameters:copy(x)
end
--reset gradients
gradParameters:zero()
--evaluate function for minibatch
local outputs = model:forward(inputs)
--print(outputs)
--print(labels)
local f = criterion:forward(outputs, labels) + params.coefL1 * torch.norm(parameters,1) + params.coefL2 * torch.norm(parameters, 2)^2/2
table.insert(criterionTable, f)
--estimate df/dw
local df_dw = criterion:backward(outputs, labels)
model:backward(inputs, df_dw)
gradParameters:add(torch.sign(parameters):mul(params.coefL1) + parameters:clone():mul(params.coefL2))
gradParameters:mul(1/inputs:size(1))
--print(gradParameters)
--print("Train loss:"..f.." , grad:"..gradParameters:norm())
return f, gradParameters
end
sgdState = {
learningRate = 0.1,
momentum = 0.5,
learningRateDecay = 5e-7,
dampening = 1.01
}
optim.sgd(feval, parameters, sgdState)
xlua.progress(j, traindata:size())
end
print("Error after this epoch: "..sum(criterionTable))
end
--with the trained model predict for testdataset
--output = model:forward(testdata.data)
--get the maximum probability label
classes = {'1','2'}
confusion = optim.ConfusionMatrix(classes)
outputs = model:forward(testdata.data:cuda())
for i=1, testdata:size() do
confusion:add(outputs[i], testdata.labels[i])
end
print(confusion)
print("Saving log likelihoods...")
nll = {}
nll.outputs = outputs
nll.labels = testdata.labels
torch.save("nll.t7", nll)
model = model:clearState()
floatmodel = model:float()
torch.save("charDetectionModel.t7", model)
|
-- Function to skip actors that have no initiative
-- Modified code from 5e Ruleset, manager_combat.lua : nextActor
function onInit()
CombatManager.nextActor = nextActor;
end
function nextActor(bSkipBell, bNoRoundAdvance)
if not User.isHost() then
return;
end
local nodeActive = CombatManager.getActiveCT();
local nIndexActive = 0;
-- Check the skip hidden NPC option
local bSkipHidden = OptionsManager.isOption("CTSH", "on");
-- Check the ship for actors that haven't rolled initiative
local bSkipNonInitiativedActors = OptionsManager.isOption("CE_SNIA", "on");
-- Determine the next actor
local nodeNext = nil;
local aEntries = CombatManager.getSortedCombatantList();
if #aEntries > 0 then
if nodeActive then
for i = 1,#aEntries do
if aEntries[i] == nodeActive then
nIndexActive = i;
break;
end
end
end
if bSkipHidden or bSkipNonInitiativedActors then
local nIndexNext = 0;
for i = nIndexActive + 1, #aEntries do
--if DB.getValue(aEntries[i], "friendfoe", "") == "friend" then <-- Original Code: Won't skip if actor is friendly
if DB.getValue(aEntries[i], "friendfoe", "") == "SKIP THIS SECTION JUMP RIGHT TO THE ELSE BELOW" then
nIndexNext = i;
-- check if initiative is 0 value (default in db if no entry). if so set index to 1 (first actor) and exit function, as all non-iniatived actors will be piled at the bottom of the CT
local initiative = DB.getValue(aEntries[i], 'initresult');
if initiative == 0 then
nIndexActive = 0;
Debug.console('CT actor has no rolled initiative');
end
break;
else
if not CombatManager.isCTHidden(aEntries[i]) then
nIndexNext = i;
-- check if initiative is 0 value (default in db if no entry). if so set index to 1 (first actor) and exit function, as all non-iniatived actors will be piled at the bottom of the CT
local initiative = DB.getValue(aEntries[i], 'initresult');
if initiative == 0 then
nIndexNext = 0;
Debug.console('CT actor has no rolled initiative');
end
break;
end
end
end
if nIndexNext > nIndexActive then
nodeNext = aEntries[nIndexNext];
for i = nIndexActive + 1, nIndexNext - 1 do
CombatManager.showTurnMessage(aEntries[i], false);
end
end
else
nodeNext = aEntries[nIndexActive + 1];
end
-- if nodeActive then
-- for i = 1,#aEntries do
-- if aEntries[i] == nodeActive then
-- nodeNext = aEntries[i+1];
-- end
-- end
-- else
-- nodeNext = aEntries[1];
-- end
end
-- If next actor available, advance effects, activate and start turn
if nodeNext then
-- End turn for current actor
CombatManager.onTurnEndEvent(nodeActive);
-- Process effects in between current and next actors
if nodeActive then
CombatManager.onInitChangeEvent(nodeActive, nodeNext);
else
CombatManager.onInitChangeEvent(nil, nodeNext);
end
-- Start turn for next actor
CombatManager.requestActivation(nodeNext, bSkipBell);
CombatManager.onTurnStartEvent(nodeNext);
elseif not bNoRoundAdvance then
if bSkipHidden or bSkipNonInitiativedActors then
for i = nIndexActive + 1, #aEntries do
CombatManager.showTurnMessage(aEntries[i], false);
end
end
CombatManager.nextRound(1);
end
end
|
local rotatorRNN = {}
function rotatorRNN.create(opt)
local encoder = rotatorRNN.create_encoder(opt)
local actor = rotatorRNN.create_actor(opt)
local mixer = rotatorRNN.create_mixer(opt)
local decoder_msk = rotatorRNN.create_decoder_msk(opt)
local decoder_im = rotatorRNN.create_decoder_im(opt)
return encoder, actor, mixer, decoder_msk, decoder_im
end
function rotatorRNN.create_encoder(opt)
local encoder = nn.Sequential()
-- 64 x 64 x 3 --> 32 x 32 x 64
encoder:add(nn.SpatialConvolution(3, 64, 5, 5, 2, 2, 2, 2))
encoder:add(nn.ReLU())
-- 32 x 32 x 64 --> 16 x 16 x 128
encoder:add(nn.SpatialConvolution(64, 128, 5, 5, 2, 2, 2, 2))
encoder:add(nn.ReLU())
-- 16 x 16 x 128 --> 8 x 8 x 256
encoder:add(nn.SpatialConvolution(128, 256, 5, 5, 2, 2, 2, 2))
encoder:add(nn.ReLU())
-- 8 x 8 x 256 --> 1024
encoder:add(nn.Reshape(8*8*256))
encoder:add(nn.Linear(8*8*256, 1024))
encoder:add(nn.ReLU())
-- 1024 --> 1024
encoder:add(nn.Linear(1024, 1024))
encoder:add(nn.ReLU())
-- identity unit
local eid = nn.Sequential()
eid:add(nn.Linear(1024, opt.nz))
eid:add(nn.ReLU())
-- viewpoint unit
local erot = nn.Sequential()
erot:add(nn.Linear(1024, opt.nz))
erot:add(nn.ReLU())
encoder:add(nn.ConcatTable():add(eid):add(erot))
return encoder
end
function rotatorRNN.create_actor(opt)
-- h1, a --> h2
local actor = nn.Sequential()
actor:add(nn.Bilinear(opt.nz, opt.na, opt.nz))
actor:add(nn.ReLU())
return actor
end
function rotatorRNN.create_mixer(opt)
local mixer = nn.Sequential()
mixer:add(nn.JoinTable(2))
mixer:add(nn.Linear(opt.nz*2, 1024))
mixer:add(nn.ReLU())
mixer:add(nn.Linear(1024, 1024))
mixer:add(nn.ReLU())
return mixer
end
function rotatorRNN.create_decoder_msk(opt)
local decoderM = nn.Sequential()
-- 1024 --> 8 x 8 x 128
decoderM:add(nn.Linear(1024, 8*8*128))
decoderM:add(nn.ReLU())
decoderM:add(nn.Reshape(128, 8, 8))
-- 8 x 8 x 128 --> 16 x 16 x 64
decoderM:add(nn.SpatialUpSamplingNearest(2))
decoderM:add(nn.SpatialConvolution(128, 64, 5, 5, 1, 1, 2, 2))
decoderM:add(nn.ReLU())
-- 16 x 16 x 64 --> 32 x 32 x 32
decoderM:add(nn.SpatialUpSamplingNearest(2))
decoderM:add(nn.SpatialConvolution(64, 32, 5, 5, 1, 1, 2, 2))
decoderM:add(nn.ReLU())
-- 32 x 32 x 32 --> 64 x 64 x 1
decoderM:add(nn.SpatialUpSamplingNearest(2))
decoderM:add(nn.SpatialConvolution(32, 1, 5, 5, 1, 1, 2, 2))
decoderM:add(nn.Sigmoid())
return decoderM
end
function rotatorRNN.create_decoder_im(opt)
local decoderI = nn.Sequential()
-- 1024 --> 8 x 8 x 256
decoderI:add(nn.Linear(1024, 8*8*256))
decoderI:add(nn.ReLU())
decoderI:add(nn.Reshape(256, 8, 8))
-- 8 x 8 x 256 --> 16 x 16 x 128
decoderI:add(nn.SpatialUpSamplingNearest(2))
decoderI:add(nn.SpatialConvolution(256, 128, 5, 5, 1, 1, 2, 2))
decoderI:add(nn.ReLU())
-- 16 x 16 x 128 --> 32 x 32 x 64
decoderI:add(nn.SpatialUpSamplingNearest(2))
decoderI:add(nn.SpatialConvolution(128, 64, 5, 5, 1, 1, 2, 2))
decoderI:add(nn.ReLU())
-- 32 x 32 x 64 --> 64 x 64 x 3
decoderI:add(nn.SpatialUpSamplingNearest(2))
decoderI:add(nn.SpatialConvolution(64, 3, 5, 5, 1, 1, 2, 2))
decoderI:add(nn.Tanh())
return decoderI
end
return rotatorRNN
|
local ADDON, MinArch = ...
MinArch.DigsiteLocales.esMX = {
["Ironband's Excavation Site"] = "Excavación de Vetaferro",
["Ironbeard's Tomb"] = "Tumba de Barbaférrea",
["Whelgar's Excavation Site"] = "Excavación de Whelgar",
["Greenwarden's Fossil Bank"] = "Banco de fósiles del Guardaverde",
["Thoradin's Wall"] = "Muralla de Thoradin",
["Witherbark Digsite"] = "Excavación Secacorteza",
["Thandol Span"] = "Puente Thandol",
["Dun Garok Digsite"] = "Excavación de Dun Garok",
["Southshore Fossil Field"] = "Campo de fósiles de Costasur",
["Aerie Peak Digsite"] = "Excavación de Pico Nidal",
["Shadra'Alor Digsite"] = "Excavación de Shadra'Alor",
["Altar of Zul Digsite"] = "Excavación de El Altar de Zul",
["Jintha'Alor Lower City Digsite"] = "Excavación de la parte baja de Jintha'Alor",
["Jintha'Alor Upper City Digsite"] = "Excavación de la parte alta de Jintha'Alor",
["Agol'watha Digsite"] = "Excavación de Agol'watha",
["Hammertoe's Digsite"] = "Excavación de Piemartillo",
["Tomb of the Watchers Digsite"] = "Excavación de la Tumba de los Vigías",
["Uldaman Entrance Digsite"] = "Excavación de la Entrada de Uldaman",
["Sunken Temple Digsite"] = "Excavación del Templo Sumergido",
["Misty Reed Fossil Bank"] = "Banco de fósiles de Juncobruma",
["Twilight Grove Digsite"] = "Excavación de la Arboleda del Crepúsculo",
["Vul'Gol Fossil Bank"] = "Banco de fósiles de Vul'Gol",
["Nazj'vel Digsite"] = "Excavación de Nazj'vel",
["Zoram Strand Digsite"] = "Excavación de La Ensenada de Zoram",
["Ruins of Ordil'Aran"] = "Las Ruinas de Ordil'Aran",
["Ruins of Stardust"] = "Las Ruinas del Polvo Estelar",
["Forest Song Digsite"] = "Excavación de la Canción del Bosque",
["Stonetalon Peak"] = "Cima del Espolón",
["Ruins of Eldre'Thar"] = "Ruinas de Eldre'thar",
["Unearthed Grounds"] = "Campos Desenterrados",
["Bael Modan Digsite"] = "Excavación de Bael Modan",
["Ruins of Eldarath"] = "Ruinas de Eldarath",
["Ruins of Arkkoran"] = "Ruinas de Arkkoran",
["Lakeridge Highway Fossil Bank"] = "Banco de fósiles del Camino del Lago",
["Slitherblade Shore Digsite"] = "Excavación de la Costa Filozante",
["Ethel Rethor Digsite"] = "Excavación de Ethel Rethor",
["Valley of Bones"] = "Valle de los Huesos",
["Mannoroc Coven Digsite"] = "Excavación del Aquelarre Mannoroc",
["Kodo Graveyard"] = "Cementerio de Kodos",
["Sargeron Digsite"] = "Excavación de Sargeron",
["Red Reaches Fossil Bank"] = "Banco de fósiles de Las Costas Rojas",
["Dreadmaul Fossil Field"] = "Campo de fósiles Machacamiedo",
["Grimsilt Digsite"] = "Excavación de Limugre",
["Pyrox Flats Digsite"] = "Excavación de Llanos de Pirox",
["Western Ruins of Thaurissan"] = "Ruinas de Thaurissan del Oeste",
["Eastern Ruins of Thaurissan"] = "Ruinas de Thaurissan del Este",
["Terror Wing Fossil Field"] = "Campo de fósiles del Ala del Terror",
["Zul'Mashar Digsite"] = "Excavación de Zul'Mashar",
["Quel'Lithien Lodge Digsite"] = "Excavación del Refugio Quel'Lithien",
["Infectis Scar Fossil Field"] = "Campo de fósiles de La Cicatriz Purulenta",
["Eastern Zul'Kunda Digsite"] = "Excavación de Zul'Kunda del Este",
["Western Zul'Kunda Digsite"] = "Excavación de Zul'Kunda del Oeste",
["Bal'lal Ruins Digsite"] = "Excavación de la Ruina de Bal'lal",
["Balia'mah Digsite"] = "Excavación de Balia'mah",
["Ziata'jai Digsite"] = "Excavación de Ziata'jai",
["Eastern Zul'Mamwe Digsite"] = "Excavación de Zul'Mamwe del Este",
["Western Zul'Mamwe Digsite"] = "Excavación de Zul'Mamwe del Oeste",
["Savage Coast Raptor Fields"] = "Campos de raptores de La Costa Salvaje",
["Ruins of Aboraz"] = "Ruinas de Aboraz",
["Ruins of Jubuwal"] = "Ruinas de Jubuwal",
["Gurubashi Arena Digsite"] = "Excavación de la Arena Gurubashi",
["Nek'mani Wellspring Digsite"] = "Excavación del Manantial Nek'mani",
["Felstone Fossil Field"] = "Campo de fósiles Piedramácula",
["Northridge Fossil Field"] = "Campo de fósiles Crestanorte",
["Andorhal Fossil Bank"] = "Banco de fósiles de Andorhal",
["Wyrmbog Fossil Field"] = "Campo de fósiles de Ciénaga de Fuego",
["Quagmire Fossil Field"] = "Campo de fósiles de El Lodazal",
["Dire Maul Digsite"] = "Excavación de La Masacre",
["Broken Commons Digsite"] = "Excavación de la Ágora",
["Ravenwind Digsite"] = "Excavación de las Ruinas de Viento Azabache",
["Oneiros Digsite"] = "Excavación de Oneiros",
["Solarsal Digsite"] = "Excavación de Solarsal",
["Darkmist Digsite"] = "Excavación de Niebla Negra",
["South Isildien Digsite"] = "Excavación de Isildien sur",
["North Isildien Digsite"] = "Excavación de Isildien norte",
["Constellas Digsite"] = "Excavación de Constellas",
["Morlos'Aran Digsite"] = "Excavación de Morlos'Aran",
["Jaedenar Digsite"] = "Excavación de Jaedenar",
["Ironwood Digsite"] = "Excavación de maderaférrea",
["Lake Kel'Theril Digsite"] = "Excavación del Lago Kel'Theril",
["Owl Wing Thicket Digsite"] = "Excavación del Matorral del Ala del Búho",
["Frostwhisper Gorge Digsite"] = "Excavación del Cañón Levescarcha",
["Fields of Blood Fossil Bank"] = "Banco de fósiles de los Campos de Sangre",
["Nightmare Scar Digsite"] = "Excavación del Paraje Pesadilla",
["Zul'Farrak Digsite"] = "Excavación de Zul'Farrak",
["Broken Pillar Digsite"] = "Excavación del Pilar Partido",
["Eastmoon Ruins Digsite"] = "Excavación de las Ruinas de Lunaeste",
["Southmoon Ruins Digsite"] = "Excavación de las Ruinas de Lunasur",
["Dunemaul Fossil Ridge"] = "Cresta de fósiles de Machacaduna",
["Abyssal Sands Fossil Ridge"] = "Cresta de fósiles de las Arenas Abisales",
["Lower Lakkari Tar Pits"] = "Fosas de Alquitrán inferiores",
["Upper Lakkari Tar Pits"] = "Fosas de Alquitrán superiores",
["Terror Run Fossil Field"] = "Campo de fósiles del Camino del Terror",
["Screaming Reaches Fossil Field"] = "Campo de fósiles de la Cuenca de los Gritos",
["Marshlands Fossil Bank"] = "Banco de fósiles de Los Pantanales",
["Southwind Village Digsite"] = "Excavación de la Aldea del Viento del Sur",
["Gor'gaz Outpost Digsite"] = "Excavación de la Avanzada Gor'gaz",
["Zeth'Gor Digsite"] = "Excavación de Zeth'Gor",
["Hellfire Basin Digsite"] = "Excavación de la Cuenca del Fuego Infernal",
["Hellfire Citadel Digsite"] = "Excavación de la Ciudadela del Fuego Infernal",
["Sha'naar Digsite"] = "Excavación de Sha'naar",
["Boha'mu Ruins Digsite"] = "Excavación de las Ruinas Boha'mu",
["Twin Spire Ruins Digsite"] = "Excavación de las Ruinas de las Agujas Gemelas",
["Ruins of Enkaat Digsite"] = "Excavación de las Ruinas de Enkaat",
["Arklon Ruins Digsite"] = "Excavación de las Ruinas Arklon",
["Ruins of Farahlon Digsite"] = "Excavación de las Ruinas de Farahlon",
["Ancestral Grounds Digsite"] = "Excavación de las Tierras Ancestrales",
["Sunspring Post Digsite"] = "Excavación del Puesto Primasol",
["Laughing Skull Digsite"] = "Excavación de las Ruinas Riecráneos",
["Burning Blade Digsite"] = "Excavación de las Ruinas Filo Ardiente",
["Halaa Digsite"] = "Excavación de Halaa",
["Grangol'var Village Digsite"] = "Excavación del Poblado Grangol'var",
["Tuurem Digsite"] = "Excavación de Tuurem",
["Bleeding Hollow Ruins Digsite"] = "Excavación de las Ruinas Foso Sangrante",
["Bonechewer Ruins Digsite"] = "Excavación de las Ruinas Mascahuesos",
["Bone Wastes Digsite"] = "Excavación de El Vertedero de Huesos",
["East Auchindoun Digsite"] = "Excavación de Auchindoun oriental",
["West Auchindoun Digsite"] = "Excavación de Auchindoun occidental",
["Illidari Point Digsite"] = "Excavación del Alto Illidari",
["Coilskar Point Digsite"] = "Excavación del Alto Cicatriz Espiral",
["Ruins of Baa'ri Digsite"] = "Excavación de las Ruinas de Baa'ri",
["Eclipse Point Digsite"] = "Excavación de Punta Eclipse",
["Warden's Cage Digsite"] = "Excavación de la Jaula de la Guardiana",
["Dragonmaw Fortress"] = "Fortaleza Faucedraco",
["Skorn Digsite"] = "Excavación de Skorn",
["Halgrind Digsite"] = "Excavación de Haltorboll",
["Wyrmskull Digsite"] = "Excavación de Calavermis",
["Shield Hill Digsite"] = "Excavación de la Colina Escudo",
["Baleheim Digsite"] = "Excavación de Baleheim",
["Nifflevar Digsite"] = "Excavación de Nifflevar",
["Gjalerbron Digsite"] = "Excavación de Gjalerbron",
["Pit of Narjun Digsite"] = "Excavación de El Foso de Narjun",
["Moonrest Gardens Digsite"] = "Excavación de los Jardines Reposo Lunar",
["En'kilah Digsite"] = "Excavación de En'kilah",
["Kolramas Digsite"] = "Excavación de Kolramas",
["Riplash Ruins Digsite"] = "Excavación de las Ruinas Tralladón",
["Violet Stand Digsite"] = "Excavación de El Confín Violeta",
["Ruins of Shandaral Digsite"] = "Excavación de las Ruinas de Shandaral",
["Altar of Sseratus Digsite"] = "Excavación del Altar de Sseratus",
["Zim'Rhuk Digsite"] = "Excavación de Zim'Rhuk",
["Zol'Heb Digsite"] = "Excavación de Zol'Heb",
["Altar of Quetz'lun Digsite"] = "Excavación del Altar de Quetz'lun",
["Talramas Digsite"] = "Excavación de Talramas",
["Voldrune Digsite"] = "Excavación de Runavold",
["Drakil'Jin Ruins Digsite"] = "Excavación de las Ruinas de Drakil'Jin",
["Brunnhildar Village Digsite"] = "Excavación del Poblado Brunnhildar",
["Sifreldar Village Digsite"] = "Excavación del Poblado Sifreldar",
["Valkyrion Digsite"] = "Excavación de Valkyrion",
["Scourgeholme Digsite"] = "Excavación de la Ciudad de la Plaga",
["Ymirheim Digsite"] = "Excavación de Ymirheim",
["Jotunheim Digsite"] = "Excavación de Jotunheim",
["Njorndar Village Digsite"] = "Excavación del Poblado Njorndar",
["Ruins of Lar'donir Digsite"] = "Excavación de las Ruinas de Lar'donir",
["Shrine of Goldrinn Digsite"] = "Excavación del Santuario de Goldrinn",
["Grove of Aessina Digsite"] = "Excavación de la Arboleda de Aessina",
["Sanctuary of Malorne Digsite"] = "Excavación del Santuario de Malorne",
["Scorched Plain Digsite"] = "Excavación de La Llanura Agostada",
["Quel'Dormir Gardens Digsite"] = "Excavación de los Jardines de Quel'Dormir",
["Nar'shola (Middle Tier) Digsite"] = "Excavación de Nar'shola (nivel medio)",
["Biel'aran Ridge Digsite"] = "Excavación de la Cresta Biel'aran",
["Dunwald Ruins Digsite"] = "Excavación de las Ruinas Montocre",
["Thundermar Ruins Digsite"] = "Excavación de las Ruinas de Bramal",
["Humboldt Conflagration Digsite"] = "Excavación de la Conflagración de Humboldt",
["Khartut's Tomb Digsite"] = "Excavación de la Tumba de Khartut",
["Tombs of the Precursors Digsite"] = "Excavación de las Tumbas de los Precursores",
["Steps of Fate Digsite"] = "Excavación de Los Pasos del Sino",
["Neferset Digsite"] = "Excavación de Neferset",
["Orsis Digsite"] = "Excavación de Orsis",
["Ruins of Ammon Digsite"] = "Excavación de las Ruinas de Ammon",
["Ruins of Khintaset Digsite"] = "Excavación de las Ruinas de Khintaset",
["Temple of Uldum Digsite"] = "Excavación del Templo de Uldum",
["Ruins of Ahmtul Digsite"] = "Excavación de las Ruinas de Ahmtul",
["River Delta Digsite"] = "Excavación del Delta",
["Cursed Landing Digsite"] = "Excavación de El Embarcadero Maldito",
["Keset Pass Digsite"] = "Excavación del Paso de Keset",
["Akhenet Fields Digsite"] = "Excavación de los Campos de Akhenet",
["Obelisk of the Stars Digsite"] = "Excavación del Obelisco de las Estrellas",
["Sahket Wastes Digsite"] = "Excavación de las Ruinas de Sahket",
["Schnottz's Landing"] = "Embarcadero de Schnottz",
["Pit of Fiends Digsite"] = "Excavación de El Foso de los Mefistos",
["Sands of Nasam"] = "Arenas de Nasam",
["Terrorweb Tunnel Digsite"] = "Excavación del Túnel Terroarácnido",
["Plaguewood Digsite"] = "Excavación del Bosque de la Peste",
["Tiger's Wood Digsite"] = "Excavación de El Bosque del Tigre",
["Tian Digsite"] = "Excavación de Tian",
["Shrine of the Dawn Digsite"] = "Excavación del Santuario del Alba",
["Ruins of Gan Shi Digsite"] = "Excavación de las Ruinas de Gan Shi",
["Emperor's Omen Digsite"] = "Excavación del Augurio del Emperador",
["The Arboretum Digsite"] = "Excavación de El Arboretum",
["Thunderwood Digsite"] = "Excavación de El Bosque del Trueno",
["Singing Marshes Digsite"] = "Excavación del Marjal Exótico",
["North Great Wall Digsite"] = "Excavación norte de la Gran Muralla",
["South Great Wall Digsite"] = "Excavación sur de la Gran Muralla",
["Torjari Pit Digsite"] = "Excavación de La Fosa Torjari",
["The Spring Road Digsite"] = "Excavación de La Senda Florida",
["Paoquan Hollow Digsite"] = "Excavación de la Espesura Paoquan",
["North Fruited Fields Digsite"] = "Excavación norte de Los Cultivos Florecientes",
["South Fruited Fields Digsite"] = "Excavación sur de Los Cultivos Florecientes",
["Pools of Purity Digsite"] = "Excavación de las Pozas de la Pureza",
["Fallsong Village Digsite"] = "Excavación del Poblado Canción de Otoño",
["Ruins of Korja Digsite"] = "Excavación de las Ruinas de Korja",
["Krasarang Wilds Digsite"] = "Excavación de la Espesura Krasarang",
["Lost Dynasty Digsite"] = "Excavación de la Dinastía Perdida",
["North Temple of the Red Crane Digsite"] = "Excavación norte del Templo de la Grulla Roja",
["Zhu Province Digsite"] = "Excavación de la Provincia Zhu",
["Valley of Kings Digsite"] = "Excavación del Valle de los Reyes",
["Gate to Golden Valley Digsite"] = "Excavación de la Puerta del Valle Dorado",
["Snow Covered Hills Digsite"] = "Excavación de las Colinas Nevadas",
["East Snow Covered Hills Digsite"] = "Excavación del este de las Colinas Nevadas",
["Remote Village Digsite"] = "Excavación de la Aldea Remota",
["Destroyed Village Digsite"] = "Excavación de la Aldea Derruida",
["Old Village Digsite"] = "Excavación de la Antigua Aldea",
["Grumblepaw Ranch Digsite"] = "Excavación del Rancho Zarpa Rumiante",
["Chow Farmstead Digsite"] = "Excavación de la Granja de Tallarín",
["West Old Village Digsite"] = "Excavación del oeste de la Antigua Aldea",
["Small Gate Digsite"] = "Excavación de la Puerta Pequeña",
["Kun-Lai Peak Digsite"] = "Excavación del Pico Kun-Lai",
["Forest Heart Digsite"] = "Excavación del Corazón del Bosque",
["Gong of Hope Digsite"] = "Excavación de El Gong de la Esperanza",
["Great Bridge Digsite"] = "Excavación del Gran Puente",
["Orchard Digsite"] = "Excavación del Huerto",
["Jade Temple Grounds Digsite"] = "Excavación de las Tierras del Templo de Jade",
["South Orchard Digsite"] = "Excavación del Huerto del sur",
["Den of Sorrow Digsite"] = "Excavación de la Guarida del Pesar",
["Shrine Meadow Digsite"] = "Excavación del Prado Santuario",
["Veridian Grove Digsite"] = "Excavación de la Arboleda Veridiana",
["Setting Sun Garrison Digsite"] = "Excavación del Baluarte del Sol Poniente",
["Mistfall Village Digsite"] = "Excavación de la Aldea Bruma Otoñal",
["Five Sisters Digsite"] = "Excavación de Las Cinco Hermanas",
["North Ruins of Guo-Lai Digsite"] = "Excavación norte de las Ruinas de Guo-Lai",
["South Ruins of Guo-Lai Digsite"] = "Excavación sur de las Ruinas de Guo-Lai",
["Tu Shen Digsite"] = "Excavación de Tu Shen",
["West Ruins of Guo-Lai Digsite"] = "Excavación oeste de Guo-Lai",
["Winterbough Digsite"] = "Excavación de Brote Invernal",
["Emperor's Approach Digsite"] = "Excavación de La Vía del Emperador",
["North Summer Fields Digsite"] = "Excavación norte de Los Campos Estivales",
["East Summer Fields Digsite"] = "Excavación este de Los Campos Estivales",
["Sra'thik Digsite"] = "Excavación Sra'thik",
["Niuzao Temple Digsite"] = "Excavación del Templo de Niuzao",
["Fire Camp Osul Digsite"] = "Excavación del Campamento Osul",
["Hatred's Vice Digsite"] = "Excavación de la Corrupción del Odio",
["Shanze'Dao Digsite"] = "Excavación de Shanze'Dao",
["Lake of Stars Digsite"] = "Excavación del Lago de los Astros",
["Terrace of Gurthan Digsite"] = "Excavación del Bancal Gurthan",
["Writhingwood Digsite"] = "Excavación de Bosquetormento",
["South Ruins of Dojan Digsite"] = "Excavación sur de las Ruinas de Dojan",
["North Ruins of Dojan Digsite"] = "Excavación norte de las Ruinas de Dojan",
["Kor'vess Digsite"] = "Excavación de Kor'vess",
["Sra'thik Swarmdock Digsite"] = "Excavación del Puerto del Enjambre Sra'thik",
["West Sra'vess Digsite"] = "Excavación oeste de Sra'vess",
["The Feeding Pits Digsite"] = "Excavación de Las Fosas del Ágape",
["Kzzok Warcamp Digsite"] = "Excavación del Campamento de Guerra Kzzok",
["East Sra'vess Digsite"] = "Excavación este de Sra'vess",
["The Underbough Digsite"] = "Excavación de Ramabaja",
["Ikz'ka Ridge Digsite"] = "Excavación de la Cresta Ikz'ka",
["Sik'vess Digsite"] = "Excavación de Sik'vess",
["West Sik'vess Digsite"] = "Excavación oeste de Sik'vess",
["North Sik'vess Digsite"] = "Excavación norte de Sik'vess",
["The Clutches of Shek'zeer Digsite"] = "Excavación de La Nidada de Shek'zeer",
["Kypari'ik Digsite"] = "Excavación de Kypari Ik",
["Zan'vess Digsite"] = "Excavación de Zan'vess",
["Venomous Ledge Digsite"] = "Excavación del Saliente Venenoso",
["Amber Quarry Digsite"] = "Excavación de la Cantera de Ámbar",
["The Briny Muck Digsite"] = "Excavación de La Mugre Salobre",
["Kypari'zar Digsite"] = "Excavación de Kypari Zar",
["Lake of Stars Digsite"] = "Excavación del Lago de los Astros",
["Kypari Vor Digsite"] = "Excavación de Kypari Vor",
["Frozen Lake Digsite"] = "Excavación del Lago congelado",
["Wor'gol Ridge Digsite"] = "Excavación de la Cresta Wor'gol",
["Daggermaw Flows Digsite"] = "Excavación de Corrientes Faucedaga",
["Lashwind Cleft Digsite"] = "Excavación de la Grieta Viento Azotador",
["The Crackling Plains Digsite"] = "Excavación de las Llanuras Chisporroteantes.",
["Grom'gar Digsite"] = "Excavación de Grom'gar",
["Stonefang Ridge Digsite"] = "Excavación de la Cresta de Colmillos Pétreos",
["Frostboar Drifts Digsite"] = "Excavación de las Derivas de Jabaescarcha",
["Icewind Drifts Digsite"] = "Excavación de las Derivas Ventohelado",
["East Coldsnap Bluffs Digsite"] = "Excavación de los Riscos Quiebres Fríos del este",
["Coldsnap Bluffs Digsite"] = "Excavación de los Riscos Quiebres Fríos",
["Shaz'gul Digsite"] = "Excavación de Shaz'gul",
["Burial Fields Digsite"] = "Excavación de los Campos Fúnebres",
["Anguish Fortress Digsite"] = "Excavación de la Fortaleza Angustia",
["Cursed Woods Digsite"] = "Excavación del Bosque Maldito",
["Dataminer's Delite Digsite"] = "Excavación de la Alegría del extractor de datos",
["Umbrafen Digsite"] = "Excavación de Umbropantano",
["Shimmering Moor Digsite"] = "Excavación del Páramo Brillante",
["Gloomshade Digsite"] = "Excavación de Penumbra",
["Sethekk Hollow South Digsite"] = "Excavación sur de la Hondonada Sethekk",
["Sethekk Hollow North Digsite"] = "Excavación del norte de la Hondonada Sethekk",
["Veil Akraz Digsite"] = "Excavación del Velo Akraz",
["Writhing Mire Digsite"] = "Excavación del Fango Avieso",
["Bloodmane Pridelands Digsite"] = "Excavación de las Praderas Melena Sangrienta",
["Pinchwhistle Point Digsite"] = "Excavación de Punta Silbapellizco",
["Bloodmane Valley Digsite"] = "Excavación del Valle Melena Sangrienta",
["Veil Zekk Digsite"] = "Excavación del Velo Zekk",
["Apexis Excavation Digsite"] = "Sitio de Excavación de ápices",
["Gordal Fortress Digsite"] = "Excavación de la Fortaleza Gordal",
["Veil Shadar Digsite"] = "Excavación del Velo Shadar",
["Duskfall Island Digsite"] = "Excavación de la Isla del Anochecer",
["Zangarra Digsite"] = "Excavación de Zangarra",
["PH West Talador Dig Site (disabled)"] = "PH Excavación de Talador del oeste (desactivado)",
["Ango'rosh Digsite"] = "Excavación de Ango'rosh",
["Forgotten Ogre Ruin Digsite"] = "Excavación de las Ruinas olvidadas de los ogros",
["Ruins of Na'gwa Digsite"] = "Excavación de las Ruinas de Na'gwa",
["Overgrown Highmaul Road Digsite"] = "Excavación del Camino de Gran Magullador con crecimiento excesivo",
["Razed Warsong Outpost Digsite"] = "Excavación del Puesto de avanzada de los Grito de Guerra demolido",
["Stonecrag Excavation Digsite"] = "Sitio de Excavación de Riscopétreo",
["North Spirit Woods Digsite"] = "Excavación del Bosque de espíritus del norte",
["Kag'ah Digsite"] = "Excavación de Kag'ah",
["Ancestral Grounds Digsite"] = "Excavación de las Tierras Ancestrales",
["Ring of Trials Sludge Digsite"] = "Excavación del Fango del Anillo de los Retos",
["Howling Plateau Digsite"] = "Excavación de la Meseta Aulladora",
["Rumbling Plateau Digsite"] = "Excavación de la Meseta Estruendosa",
["Drowning Plateau Digsite"] = "Excavación de la Meseta Ahogada",
["Burning Plateau Digsite"] = "Excavación de la Meseta Ardiente",
["Highmaul Watchtower Digsite"] = "Excavación de la Torre de vigilancia de Gran Magullador",
["Mar'gok's Overwatch Digsite"] = "Excavación de la Ordenanza de Mar'gok",
["Deadgrin Ruins Digsite"] = "Excavación de las Ruinas de Sonrimuerto",
["The Broken Spine Digsite"] = "Excavación de la Espina Quebrada",
["Overlook Ruins Digsite"] = "Excavación de las Ruinas del mirador",
["Wildwood Wash Dam Digsite"] = "Excavación de la Presa de Estela de madera salvaje",
["Ruins of the First Bastion Digsite"] = "Excavación de las Ruinas del primer bastión",
["Southwind Cliffs Digsite"] = "Excavación de los Acantilados del Viento del Sur",
["Digsite: Whitewater Wash"] = "Excavación: Rivera Aguablanca",
["Digsite: Aggramar's Vault"] = "Excavación: Bóveda de Aggramar",
["Digsite: Stormdrake Peak"] = "Excavación: Pico Dracotormenta",
["Digsite: Southern Helmouth Shallows"] = "Excavación: Bajío del Tártaro Sur",
["Digsite: Northern Helmouth Shallows"] = "Excavación: Bajío del Tártaro Norte",
["Digsite: Fields of An'she"] = "Excavación: Campos de An'she",
["Digsite: Screeching Bend"] = "Excavación: Recodo Estridente",
["Digsite: Southern Snowblind Mesa"] = "Excavación: Meseta Veloneve del Sur",
["Digsite: Bradensbrook"] = "Excavación Bradensbrook",
["Digsite: Kal'delar"] = "Excavación: Kal'delar",
["Digsite: Lightsong"] = "Excavación: Canción de Luz",
["Digsite: Andu'talah"] = "Excavación: Andu'talah",
["Digsite: Shala'nir"] = "Excavación: Shala'nir",
["Digsite: The Crescent Vale"] = "Excavación: El Valle Creciente",
["Digsite: Legion Camp: Chaos"] = "Excavación: Campamento de la Legión: Caos",
["Digsite: Llothien"] = "Excavación: Llothien",
["Digsite: Feathermane Hunting Grounds"] = "Excavación: Terrenos de Caza de Crinpluma",
["Digsite: Moonwhisper Gulch"] = "Excavación: Gulch Susurrolunar",
["Digsite: Gates of Valor"] = "Excavación: Puertas de Valor",
["Digsite: Timeworn Strand"] = "Excavación: Playa Vetusta",
["Digsite: Warden's Bluff"] = "Excavación: Risco del Guardián",
["Digsite: Amberfall Mesa"] = "Excavación: Meseta de la Caída Ámbar",
["Digsite: Storm's Reach"] = "Excavación: Dominios de Tormenta",
["Digsite: Fallen Kings"] = "Excavación: Reyes Caídos",
["Digsite: Citrine Bay"] = "Excavación: Bahía Citrino",
["Digsite: Cliffpaw Ridge"] = "Excavación: Cresta Garrabismo",
["Digsite: Skold-Ashil"] = "Excavación: Skold-Ashil",
["Digsite: Prowler's Scratch"] = "Excavación: Rasguño del Luchador",
["Digsite: Pinerock Basin"] = "Excavación: Cuenca Rocapino",
["Digsite: The Witchwood"] = "Excavación: El Bosquebruja",
["Digsite: Bloodhunt Highland"] = "Excavación: Tierras Altas Cazador de Sangre",
["Digsite: The Haglands"] = "Excavación: La Tierra de las Brujas",
["Digsite: Darkfeather Valley"] = "Excavación: Valle Plumaoscura",
["Digsite: Sky Sepulcher"] = "Excavación: Sepulcro del Cielo",
["Digsite: Northern Snowblind Mesa"] = "Excavación: Meseta Veloneve del Norte",
["Digsite: Dragon's Falls"] = "Excavación: Caída del Dragón",
["Digsite: Llothien Highlands"] = "Excavación: Tierras Altas de Llothien",
["Digsite: Farondale"] = "Excavación: Farondale",
["Digsite: Rhut'van Passage"] = "Excavación: Pasadizo de Rhut'van",
["Digsite: Timeworn Strand"] = "Excavación: Playa Vetusta",
["Digsite: Northern Watcher Isle"] = "Excavación: Isla Vigía del Norte",
["Digsite: Southern Watcher Isle"] = "Excavación: Isla Vigía del Sur",
["Digsite: Makrana"] = "Excavación: Makrana",
["Digsite: Garden of Elune"] = "Excavación: Jardín de Elune",
["Digsite: The Ruined Sanctum"] = "Excavación: El Santuario Arruinado",
["Digsite: Old Coast Path"] = "Excavación: Viejo camino de la costa",
["Digsite: Temple of a Thousand Lights"] = "Excavación: Templo de las Mil Luces",
["Digsite: Ruins of Zarkhenar"] = "Excavación: Ruinas de Zarkhenar",
["Digsite: The Tidal Marsh"] = "Excavación: El Pantano de las Mareas",
["Digsite: Nor'Danil Wellspring"] = "Excavación: Manantial Nor'Danil",
["Digsite: Black Rook Hold"] = "Excavación: Fuerte Torre Oscura",
["Digsite: Sundersong Glade"] = "Excavación: Claro Cantohendidor",
["Digsite: Ashmane's Fall"] = "Excavación: Pendiente Cenicrin",
["Digsite: Southern Wash"] = "Excavación: Rivera del Sur",
["Digsite: Thas'talah"] = "Excavación: Thas'talah",
["Digsite: Wretched Hollow"] = "Excavación: Hondonada Maldita",
["Digsite: Dreadroot"] = "Excavación: Raíz aterradora",
["Digsite: Eastern Ambervale"] = "Excavación: Valle Ámbar del Este",
["Digsite: Northern Moonfall Retreat"] = "Excavación: Retirada Puestaluna del Norte",
["Digsite: Gates of the City"] = "Excavación: Puertas de la Ciudad",
["Digsite: Meredil"] = "Excavación: Meredil",
["Digsite: Crimson Thicket"] = "Excavación: Zarzal Carmesí",
["Digsite: Koralune Fields"] = "Excavación: Dominios de Koralune",
["Digsite: Meredil"] = "Excavación: Meredil",
["Digsite: Felsoul Hold"] = "Excavación: Bastión Almavil",
["Digsite: Southern Suramar"] = "Excavación: Suramar del Sur",
["Digsite: Crimson Thicket"] = "Excavación: Zarzal Carmesí",
["Digsite: Sundered Shoals"] = "Excavación: Bancos Hendidos",
["Digsite: Anora Hollow"] = "Excavación: Fosa de Anora",
["Digsite: Upper Felsoul Hold"] = "Excavación: Bastión Almavil, área superior",
["Digsite: Koralune Estate"] = "Excavación: Dominios de Koralune",
["Digsite: Highmountain Burial Ground"] = "Excavación: Cementerio de Altamontaña",
["Digsite: Path of Huln"] = "Excavación: Camino de Huln",
["Digsite: Black Rook Courtyard"] = "Excavación: Patio de Torre Oscura",
["Digsite: Gloaming Reef"] = "Excavación: Arrecife anochecedor",
["Southern Barrens Warfront Phase 1"] = "Frente de batalla de los Baldíos del Sur, fase 1",
["Southern Barrens Warfront Phase 2"] = "Frente de batalla de los Baldíos del Sur, fase 2",
["Southern Barrens Warfront Phase 3"] = "Frente de batalla de los Baldíos del Sur, fase 3",
["Digsite: The Wildwood"] = "Excavación: El Bosque Salvaje",
["Digsite: Valley View"] = "Excavación: Vista del Valle",
["Digsite: Brokenbough Roost"] = "Excavación: Nidal Ramapartida",
["Digsite: Fernwood Ridge"] = "Excavación: Cresta Frondaleña",
["Digsite: Rockslip Woodlands"] = "Excavación: Bosque Petrabrinco",
["Digsite: Vigil Hill"] = "Excavación: Colina de la Vigilia",
["Digsite: Placid Springs"] = "Excavación: Manantial Afable",
["Digsite: Stagheart Cliffs"] = "Excavación: Riscos Corazón de Venado",
["Digsite: Deathmist Hills"] = "Excavación: Colinas Brumamorta",
["Digsite: Gol Koval"] = "Excavación: Gol Koval",
["Digsite: Hunter's Run"] = "Excavación: Huida del Cazador",
["Digsite: Brackish Coast"] = "Excavación: Costa Salobre",
["Digsite: Arom's Crossing"] = "Excavación: Cruce de Arom",
["Digsite: Corlain"] = "Excavación: Corlain",
["Digsite: Whitegrove Chapel"] = "Excavación: Capilla Bosquealbo",
["Digsite: Crimson Forest"] = "Excavación: Bosque Carmesí",
["Digsite: Iceveil Glacier"] = "Excavación: Glaciar Velohielo",
["Digsite: Seabreeze Shallows"] = "Excavación: Bajíos Brisamarina",
["Digsite: Millstone Hills"] = "Excavación: Colinas Molino",
["Digsite: Goldfield Farmstead"] = "Excavación: Granja Campoáureo",
["Digsite: Roaming Hills"] = "Excavación: Colinas Merodeantes",
["Digsite: Dire Hills"] = "Excavación: Colinas Temibles",
["Digsite: Drowned Lands"] = "Excavación: Tierras Sumergidas",
["Digsite: Briny Flats"] = "Excavación: Llanuras de Salmuera",
["Digsite: Windwhisper Summit"] = "Excavación: Cima Susurro del Viento",
["Digsite: Xibala"] = "Excavación: Xibala",
["Digsite: Tusk Isle"] = "Excavación: Isla Verroja",
["Digsite: Dreadpearl Shallows"] = "Excavación: Bajíos Perlaterror",
["Digsite: Atal'Gral"] = "Excavación: Atal'Gral",
["Digsite: Savagelands"] = "Excavación: Tierras Indomables",
["Digsite: Old Merchant Road"] = "Excavación: Camino Antiguo de Mercaderes",
["Digsite: Zeb'ahari"] = "Excavación: Zeb'ahari",
["Digsite: The Rivermarsh"] = "Excavación: El Riodazal",
["Digsite: Plains of Tojek"] = "Excavación: Llanuras de Tojek",
["Digsite: Terrace of Sorrows"] = "Excavación: Bancal de las Penas",
["Digsite: The Far Reach"] = "Excavación: Los Confines",
["Digsite: Natha'vor"] = "Excavación: Natha'vor",
["Digsite: Razorjaw River"] = "Excavación: Río Quijafilada",
["Digsite: Upper Frogmarsh"] = "Excavación: Ranastanque Superior",
["Digsite: Xal'vor"] = "Excavación: Xal'vor",
["Digsite: Verdant Plateau"] = "Excavación: Meseta Glauca",
["Digsite: Arid Basin"] = "Excavación: Cuenca Árida",
["Digsite: The Eternal Spring"] = "Excavación: La Fuente Eterna",
["Digsite: Whistlebloom Oasis"] = "Excavación: Oasis Frondarrullo",
["Digsite: Port of Zem'lan"] = "Excavación: Puerto de Zem'lan",
["Digsite: The Cracked Coast"] = "Excavación: La Costa Partida",
["Digsite: Court of Zak'rajan"] = "Excavación: Corte de Zak'rajan",
["Digsite: Terrace of the Fang"] = "Excavación: Bancal de Colmillos",
}
|
--[[
Copyright (c) 2016-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory.
]]--
require 'torch'
local tnt = require 'torchnet.env'
local doc = require 'argcheck.doc'
doc[[
[](https://travis-ci.org/torchnet/torchnet)
# torchnet
*torchnet* is a framework for [torch](http://torch.ch) which provides a set
of abstractions aiming at encouraging code re-use as well as encouraging
modular programming.
At the moment, *torchnet* provides four set of important classes:
- [`Dataset`](#tntdataset): handling and pre-processing data in various ways.
- [`Engine`](#tntengine): training/testing machine learning algorithm.
- [`Meter`](#tntmeter): meter performance or any other quantity.
- [`Log`](#tntlog): output performance or any other string to file / disk in a consistent manner.
For an overview of the *torchnet* framework, please also refer to
[this paper](https://lvdmaaten.github.io/publications/papers/Torchnet_2016.pdf).
## Installation
Please install *torch* first, following instructions on
[torch.ch](http://torch.ch/docs/getting-started.html). If *torch* is
already installed, make sure you have an up-to-date version of
[*argcheck*](https://github.com/torch/argcheck), otherwise you will get
weird errors at runtime.
Assuming *torch* is already installed, the *torchnet* core is only a set of
lua files, so it is straightforward to install it with *luarocks*
```
luarocks install torchnet
```
To run the MNIST example from the paper, install the `mnist` package:
```
luarocks install mnist
```
`cd` into the installed `torchnet` package directory and run:
```
th example/mnist.lua
```
## Documentation
Requiring *torchnet* returns a local variable containing all *torchnet*
class constructors.
```
local tnt = require 'torchnet'
```
]]
require 'torchnet.dataset'
require 'torchnet.dataset.listdataset'
require 'torchnet.dataset.tabledataset'
require 'torchnet.dataset.indexeddataset'
require 'torchnet.dataset.transformdataset'
require 'torchnet.dataset.batchdataset'
require 'torchnet.dataset.coroutinebatchdataset'
require 'torchnet.dataset.concatdataset'
require 'torchnet.dataset.resampledataset'
require 'torchnet.dataset.shuffledataset'
require 'torchnet.dataset.splitdataset'
require 'torchnet.dataset.datasetiterator'
require 'torchnet.dataset.paralleldatasetiterator'
require 'torchnet.engine'
require 'torchnet.engine.sgdengine'
require 'torchnet.engine.optimengine'
require 'torchnet.meter'
require 'torchnet.meter.apmeter'
require 'torchnet.meter.averagevaluemeter'
require 'torchnet.meter.aucmeter'
require 'torchnet.meter.confusionmeter'
require 'torchnet.meter.mapmeter'
require 'torchnet.meter.movingaveragevaluemeter'
require 'torchnet.meter.msemeter'
require 'torchnet.meter.multilabelconfusionmeter'
require 'torchnet.meter.classerrormeter'
require 'torchnet.meter.timemeter'
require 'torchnet.meter.precisionatkmeter'
require 'torchnet.meter.recallmeter'
require 'torchnet.meter.precisionmeter'
require 'torchnet.meter.ndcgmeter'
require 'torchnet.log'
require 'torchnet.utils'
require 'torchnet.transform'
require 'torchnet.test.test'
-- function that makes package serializable:
local function _makepackageserializable(packagetbl, packagename)
local mt = torch.class('package.' .. packagename)
function mt:__write() end
function mt:__read() end
function mt:__factory() return require(packagename) end
setmetatable(packagetbl, mt)
end
-- this can be removed when @locronan implements a real torch.isclass():
function torch.isclass(obj)
local REG = debug.getregistry()
return REG[obj] and true or false
end
-- make torchnet serializable:
local argcheck = require 'argcheck'
tnt.makepackageserializable = argcheck{
{name = 'packagetbl', type = 'table'},
{name = 'packagename', type = 'string'},
call = function(packagetbl, packagename)
assert(not torch.isclass(getmetatable(packagetbl))
and not torch.isclass(packagetbl), 'input cant be a class (instance)')
_makepackageserializable(packagetbl, packagename)
for key, val in pairs(packagetbl) do
if type(val) == 'table' and not torch.isclass(getmetatable(val))
and not torch.isclass(val) then
tnt.makepackageserializable(val, packagename .. '.' .. key)
end
end
end
}
tnt.makepackageserializable(tnt, 'torchnet')
return tnt
|
--====================================================================--
-- dmc_ui/dmc_style/style_manager.lua
--
-- Documentation: http://docs.davidmccuskey.com/
--====================================================================--
--[[
The MIT License (MIT)
Copyright (c) 2015 David McCuskey
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, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
--]]
--====================================================================--
--== DMC Corona UI : Style Manager
--====================================================================--
-- Semantic Versioning Specification: http://semver.org/
local VERSION = "0.1.0"
--====================================================================--
--== DMC UI Setup
--====================================================================--
local dmc_ui_data = _G.__dmc_ui
local dmc_ui_func = dmc_ui_data.func
local ui_find = dmc_ui_func.find
--====================================================================--
--== DMC UI : Style Manager
--====================================================================--
--====================================================================--
--== Imports
local EventsMixModule = require 'dmc_events_mix'
local Patch = require 'dmc_patch'
local Path = require 'dmc_path'
--====================================================================--
--== Setup, Constants
Patch.addPatch( { 'table-pop', 'print-output' } )
local sfmt = string.format
local smatch = string.match
local tinsert = table.insert
local tpop = table.pop
--== To be set in initialize()
local Style = nil
--===================================================================--
--== Support Functions
--====================================================================--
--== Style Manager Class
--====================================================================--
local StyleMgr = {}
EventsMixModule.patch( StyleMgr )
--[[
keyed on Style/dUI type, then name
{
Button={
'home-page'
}
NavBar={
'home-page'
}
}
--]]
StyleMgr._style = {}
-- references the theme structure
StyleMgr._activeTheme = nil
-- keyed on theme name
StyleMgr._theme = {}
--[[
registered widgets and styles
keyed on widget theme id
textfield={
<TextField Style Class>
<TextField Class>
--]]
StyleMgr._registered = {}
StyleMgr.EVENT = 'style-mgr-event'
StyleMgr.THEME = 'theme-update'
--====================================================================--
--== Static Functions
function StyleMgr.initialize( manager, params )
-- params = params or {}
-- if params.mode==nil then params.mode=uiConst.RUN_MODE end
--==--
Style = manager
--== Add API calls
Style.addStyle = StyleMgr.addStyle
Style.getStyle = StyleMgr.getStyle
Style.purgeStyles = StyleMgr.purgeStyles
Style.registerWidget = StyleMgr.registerWidget
Style.removeStyle = StyleMgr.removeStyle
-- Theme Functions
Style.activateTheme = StyleMgr.activateTheme
Style.createTheme = StyleMgr.createTheme
Style.getActiveThemeId = StyleMgr.getActiveThemeId
Style.getActiveThemeName = StyleMgr.getActiveThemeName
Style.getAvailableThemeIds = StyleMgr.getAvailableThemeIds
Style.loadTheme = StyleMgr.loadTheme
Style.loadThemes = StyleMgr.loadThemes
end
--====================================================================--
--== Public Functions
--======================================================--
-- Style Functions
function StyleMgr.purgeStyles()
-- print( "StyleMgr.purgeStyles" )
StyleMgr._style = {}
end
function StyleMgr.addStyle( style )
-- print( "StyleMgr.addStyle", style )
assert( style, "StyleMgr.addStyle missing arg 'style'" )
assert( style.isa and style:isa(Style.Base), "StyleMgr.addStyle wrong type for 'style'" )
--==--
local name = style.name
local sType = style.TYPE
local styles
if type(sType)~='string' then
pnotice( sfmt( "StyleMgr.addStyle improper TYPE on Style, got '%s'", tostring( type(sType) ) ))
return
end
if type(name)~='string' then
pnotice( sfmt( "StyleMgr.addStyle expected string name, got '%s'", tostring( type(name) ) ))
return
end
if #name==0 then
pnotice( sfmt( "StyleMgr.addStyle name too short '%s'", tostring(name) ))
return
end
styles = StyleMgr._style[ sType ]
if not styles then
StyleMgr._style[ sType ] = {}
styles = StyleMgr._style[ sType ]
end
if styles[ name ] then
pnotice( sfmt( "StyleMgr.addStyle already have style with name '%s'", name ))
return
end
styles[ name ] = style
end
function StyleMgr.getStyle( style, name )
-- print( "StyleMgr.getStyle", name )
assert( type(style)=='string' or type(style)=='table', sfmt("StyleMgr:getStyle arg 'style' must be a string or table got '%s'", tostring(style) ) )
assert( type(name)=='string', sfmt("StyleMgr:getStyle arg 'name' must be a string, got '%s'", tostring(name) ) )
--==--
local sType
if type(style)=='string' then
sType = style
elseif type(style)=='table' then
assert( type(style.TYPE)=='string', sfmt("StyleMgr:getStyle arg 'name' must be a string, got '%s'", tostring(name) ) )
sType = style.TYPE
end
-- look for style in theme collection or style collection
local cType, collection
if StyleMgr._activeTheme then
cType = StyleMgr._activeTheme.style[ sType ]
end
if not cType then
cType = StyleMgr._style[ sType ]
end
collection = cType or {}
return collection[ name ]
end
function StyleMgr.removeStyle( style, name )
-- print( "StyleMgr.removeStyle", style, name )
assert( type(style)=='string' or type(style)=='table', sfmt("StyleMgr:getStyle arg 'name' must be a string, got '%s'", tostring(name) ) )
assert( type(name)=='string', "StyleMgr:removeStyle arg 'name' must be string" )
--==--
local sType
if type(style)=='string' then
sType = style
elseif type(style)=='table' then
assert( type(style.TYPE)=='string', sfmt("StyleMgr:getStyle arg 'name' must be a string, got '%s'", tostring(name) ) )
sType = style.TYPE
end
local styles = StyleMgr._style[ sType ] or {}
return tpop( styles, name )
end
--======================================================--
-- Theme Methods
function StyleMgr.activateTheme( themeId )
-- print( "StyleMgr.activateTheme", themeId )
local themes = StyleMgr._theme
local currTheme = StyleMgr._activeTheme
if currTheme~=nil then
currTheme.isActive=false
end
currTheme = themes[ themeId ]
currTheme.isActive=true
StyleMgr._activeTheme = currTheme
StyleMgr:dispatchEvent( StyleMgr.THEME )
end
function StyleMgr.createTheme( themeId, params )
-- print( "StyleMgr.createTheme", params.name )
params = params or {}
params.id = themeId
--==--
local themes = StyleMgr._theme
local struct = themes[ themeId ]
if struct then
return StyleMgr._createThemeInterface( struct )
end
struct = StyleMgr._createThemeStruct( params )
StyleMgr._theme[ themeId ] = struct
return StyleMgr._createThemeInterface( struct )
end
function StyleMgr.getAvailableThemeIds()
local themes = StyleMgr._theme
local list = {}
for k,_ in pairs( themes ) do
tinsert( list, k )
end
return list
end
function StyleMgr.getActiveThemeId()
return StyleMgr._activeTheme and StyleMgr._activeTheme.id
end
function StyleMgr.getActiveThemeName()
return StyleMgr._activeTheme and StyleMgr._activeTheme.name
end
local lfs = require 'lfs'
-- path: 'one/two/three/file.lua'
-- path: 'one\two\three\file.lua'
--
-- parse(path)
-- buildRequire(parts)
-- buildPath(parts)
function StyleMgr.loadTheme( filePath )
-- print( "StyleMgr.loadTheme", filePath )
local pathInfo = Path.parse( filePath )
local reqPath = Path.buildRequire( pathInfo )
local t = require( reqPath )
t.initialize( Style )
end
-- local p = path.buildPath( parse )
-- local p = path.buildRequire( parse )
--- loadThemes requires a directory.
--
function StyleMgr.loadThemes( directory )
-- print( "StyleMgr.loadThemes", directory )
local dirInfo = Path.parse( directory )
local resPath, resInfo
local themePath
-- resPath = system.pathForFile( '', system.ResourceDirectory )
--== START TEMP fix for bug in corona ==--
resPath = system.pathForFile( 'main.lua', system.ResourceDirectory )
resPath = smatch( resPath, '^(.+)main.lua' )
--== END TEMP fix for bug in corona ==--
local resInfo = Path.parse( resPath )
dirInfo.dir = resInfo.path
dirInfo.isAbs = resInfo.isAbs
themePath = Path.buildPath( dirInfo )
-- reset
dirInfo.dir = {}
dirInfo.isAbs = false
for file in lfs.dir( themePath ) do
local name = smatch( file, '^(.+)%.lua$' )
if name then
dirInfo.name = name
local reqPath = Path.buildRequire( dirInfo )
local pathInfo = Path.parse( directory )
pathInfo.dir = pathInfo.path
pathInfo.path = {}
local t = require( reqPath )
t.initialize( Style, pathInfo )
end
end
end
--======================================================--
-- Misc Functions
function StyleMgr.registerWidget( widget )
-- print( "StyleMgr.registerWidget", widget, widget.STYLE_TYPE )
assert( widget and type(widget.STYLE_TYPE)=='string' )
--==--
local wType = widget.STYLE_TYPE
StyleMgr._registered[ wType ] = widget
end
--[[
--===================================================================--
--== Theme Methods
function Widget.activateTheme( theme_id )
end
function Widget.availableThemes()
end
function Widget.availableThemeNames()
end
function Widget.availableThemeIds()
end
-- struct or name/dir
function Widget.createTheme( theme, dir )
end
function Widget.getTheme( theme_id )
end
function Widget.getActiveTheme()
end
function Widget.deleteTheme( theme_id )
end
function Widget.addThemeStyle( theme_id, style, name )
return Widget.StyleMgr:addThemeStyle( theme_id, style, name )
end
function Widget.getThemeStyle( theme_id, style, name )
end
function Widget.removeThemeStyle( theme_id, style, name )
end
function Widget.loadTheme( file )
end
function Widget.unloadTheme( theme_id )
end
function Widget.reloadTheme( theme_id )
end
--]]
--====================================================================--
--== Private Functions
function StyleMgr._addThemeStyle( struct, style, name )
-- print( "StyleMgr._addThemeStyle", struct, style, name )
assert( style, "StyleMgr:_addThemeStyle missing arg 'style'" )
assert( style.isa and style:isa(Style.Base), "StyleMgr:_addThemeStyle wrong type for 'style'" )
--==--
local sType = style.TYPE
local styles = struct.style
local collection = styles[sType]
if not collection then
-- need to create container for this style TYPE
collection = {}
styles[ sType ] = collection
end
collection[ name ] = style
end
function StyleMgr._createThemeInterface( struct )
-- print( "StyleMgr._createThemeInterface", struct )
return {
addStyle=function( name, style )
StyleMgr._addThemeStyle( struct, style, name )
end
}
end
function StyleMgr._createThemeStruct( params )
-- print( "StyleMgr._createThemeStruct" )
return {
id=params.id,
name=params.name,
root=params.root,
file=params.file,
isActive=false,
style = {
Text={
-- 'home-text'= style
}
}
}
end
--====================================================================--
--== Event Handlers
-- none
return StyleMgr
|
local function deepCopy(original)
local copy = {}
for k, v in pairs(original) do
-- as before, but if we find a table, make sure we copy that too
if type(v) == "table" then
v = deepCopy(v)
end
copy[k] = v
end
return copy
end
roboportmk2 = deepCopy(data.raw.roboport["roboport"])
roboportmk2.name = "roboport-mk2"
roboportmk2.fast_replaceable_group = "roboport"
roboportmk2.next_upgrade = "roboport-mk3"
roboportmk2.logistics_radius = settings.startup["mk2-logistic-radius"].value
roboportmk2.construction_radius = settings.startup["mk2-construction-radius"].value
roboportmk2.minable = {mining_time = 0.1, result = "roboport-mk2"}
roboportmk2.energy_source = {
type = "electric",
usage_priority = "secondary-input",
input_flow_limit = "16MW",
buffer_capacity = "600MJ"
}
roboportmk2.recharge_minimum = "240MJ"
roboportmk2.energy_usage = "300kW"
roboportmk2.charging_energy = "1MW"
roboportmk2.robot_slots_count = 16
roboportmk2.material_slots_count = 10
roboportmk2.charging_offsets = {
{-1.5,1.5}, {-0.5,1.5}, {0,1.5}, {0.5,1.5}, {1.5,1.5},
{-1.5,0.5}, {1.5,0.5},
{-1.5,0}, {1.5,0},
{-1.5,-1.0}, {1.5,-0.5},
{-1.5,-1.5},{-0.5,-1.5},{0,-1.5},{0.5,-1.5},{1.5,-1.5}
}
roboportmk2.base.layers =
{
{
filename = "__Factorio_Roboport_mk2__/graphics/entity/roboport/roboport-mk2-base.png",
width = 143,
height = 135,
shift = {0.5, 0.25},
hr_version =
{
filename = "__Factorio_Roboport_mk2__/graphics/entity/roboport/hr-roboport-mk2-base.png",
width = 228,
height = 277,
shift = util.by_pixel(2, 7.75),
scale = 0.5
}
},
{
filename = "__base__/graphics/entity/roboport/roboport-shadow.png",
width = 147,
height = 101,
draw_as_shadow = true,
shift = util.by_pixel(28.5, 19.25),
hr_version =
{
filename = "__base__/graphics/entity/roboport/hr-roboport-shadow.png",
width = 294,
height = 201,
draw_as_shadow = true,
force_hr_shadow = true,
shift = util.by_pixel(28.5, 19.25),
scale = 0.5
}
}
}
roboportmk3 = deepCopy(data.raw.roboport["roboport"])
roboportmk3.name = "roboport-mk3"
roboportmk3.fast_replaceable_group = "roboport"
roboportmk3.logistics_radius = settings.startup["mk3-logistic-radius"].value
roboportmk3.construction_radius = settings.startup["mk3-construction-radius"].value
roboportmk3.minable = {mining_time = 1, result = "roboport-mk3"}
roboportmk3.energy_source = {
type = "electric",
usage_priority = "secondary-input",
input_flow_limit = "48MW",
buffer_capacity = "1200MJ"
}
roboportmk3.recharge_minimum = "480MJ"
roboportmk3.energy_usage = "600kW"
roboportmk3.charging_energy = "2MW"
roboportmk3.robot_slots_count = 24
roboportmk3.material_slots_count = 10
roboportmk3.charging_offsets = {
{-1.5,1.5},{-1.0,1.5},{-0.5,1.5},{0.0,1.5},{0.5,1.5},{1.0,1.5},{1.5,1.5},
{-1.5,1.0}, {1.5,1.0},
{-1.5,0.5}, {1.5,0.5},
{-1.5,-0.5}, {1.5,0.0},
{-1.5,-1.0}, {1.5,-0.5},
{-1.5,-1.5}, {1.5,-1.5},
{-1.5,-1.5},{-1.0,-1.5},{-0.5,-1.5},{0.0,-1.5},{0.5,-1.5},{1.0,-1.5},{1.5,-1.5}
}
roboportmk3.base.layers =
{
{
filename = "__Factorio_Roboport_mk2__/graphics/entity/roboport/roboport-mk3-base.png",
width = 143,
height = 135,
shift = {0.5, 0.25},
hr_version =
{
filename = "__Factorio_Roboport_mk2__/graphics/entity/roboport/hr-roboport-mk3-base.png",
width = 228,
height = 277,
shift = util.by_pixel(2, 7.75),
scale = 0.5
}
},
{
filename = "__base__/graphics/entity/roboport/roboport-shadow.png",
width = 147,
height = 101,
draw_as_shadow = true,
shift = util.by_pixel(28.5, 19.25),
hr_version =
{
filename = "__base__/graphics/entity/roboport/hr-roboport-shadow.png",
width = 294,
height = 201,
draw_as_shadow = true,
force_hr_shadow = true,
shift = util.by_pixel(28.5, 19.25),
scale = 0.5
}
}
}
data:extend(
{
roboportmk2,
roboportmk3
}
)
|
-- This file is generated by program!
-- Don't change it manaully.
-- Author: zerospace007@163.com NormanYang
-- Source file: Config/ConfigAll.lua
-- Created at: Aug 2019
--load require管理名称--
local LoadRq =
{
RandomName = require 'Config/RandomName',
Sound = require 'Config/Sound',
}
--配置管理名称--
ConfigName =
{
RandomName = 'RandomName',
Sound = 'Sound',
}
--配置文件管理--
ConfigAll = {};
local this = ConfigAll;
local configList = {};
--添加所有配置到管理列表--
function ConfigAll.LoadAll()
this.AddConfig(ConfigName.RandomName, LoadRq.RandomName);
this.AddConfig(ConfigName.Sound, LoadRq.Sound);
end
--添加配置表--
function ConfigAll.AddConfig(configName, configObj)
configList[configName] = configObj;
end
--获取配置表--
function ConfigAll.GetConfig(configName)
return configList[configName];
end
--移除配置表--
function ConfigAll.RemoveConfig(configName)
configList[configName] = nil;
end
return ConfigAll;
|
require "Game.Common.UIManager"
PrefabPool = require "Game.Common.PrefabPool"
require "Common.UI.UIComponent"
require "Common.UI.Countdown"
require("Common.UI.ItemListCreator")
require("Game.Common.Message")
--管理器--
local Game = {}
local Ctrls = {}
function LuaMain()
print("logic start")
UpdateManager:GetInstance():Startup()
Game:OnInitOK()
end
function ExitGame()
print('Cat:LuaMain.lua[ExitGame]')
local util = require 'Tools.print_delegate'
util.print_func_ref_by_csharp()
end
--初始化完成
function Game:OnInitOK()
print('Cat:Game.lua[Game.OnInitOK()]')
GlobalEventSystem.Init()
Game:InitLuaPool()
Game:InitUI()
Game:InitControllers()
end
function Game.InitUI()
local msg_panel = GameObject.Find("UICanvas/Dynamic/MessagePanel")
assert(msg_panel, "cannot fine message panel!")
Message:Init(msg_panel.transform)
UIMgr:Init({"UICanvas/Normal","UICanvas/MainUI", "UICanvas/Dynamic"}, "Normal")
local pre_load_prefab = {
"Assets/AssetBundleRes/ui/common/Background.prefab",
"Assets/AssetBundleRes/ui/common/GoodsItem.prefab",
"Assets/AssetBundleRes/ui/common/WindowBig.prefab",
"Assets/AssetBundleRes/ui/common/WindowNoTab.prefab",
"Assets/AssetBundleRes/ui/common/EmptyContainer.prefab",
"Assets/AssetBundleRes/ui/common/Button1.prefab",
"Assets/AssetBundleRes/ui/common/Button2.prefab",
"Assets/AssetBundleRes/ui/common/Button3.prefab",
}
PrefabPool:Init("UICanvas/HideUI")
PrefabPool:Register(pre_load_prefab)
end
function Game:InitControllers()
local ctrl_paths = {
"Game/Test/TestController",
"Game/Login/LoginController",
"Game/MainUI/MainUIController",
"Game/Task/TaskController",
"Game/Scene/SceneController",
"Game/Bag/BagController",
"Game/GM/GMController",
}
for i,v in ipairs(ctrl_paths) do
local ctrl = require(v)
if type(ctrl) ~= "boolean" then
--调用每个Controller的Init函数
ctrl:Init()
table.insert(Ctrls, ctrl)
else
--Controller类忘记了在最后return
assert(false, 'Cat:Main.lua error : you must forgot write a return in you controller file :'..v)
end
end
end
function Game:InitLuaPool( )
LuaPool = require "Game.Common.LuaPool"
local info = {
["Window"] = {
name="Window", maxNum = 5, prototype = require("Game.Common.UI.Window")
},
["GoodsItem"] = {
name="GoodsItem", maxNum = 50, prototype = require("Game.Common.UI.GoodsItem")
},
["GoodsInfoView"] = {
name="GoodsInfoView", maxNum = 50, prototype = require("Game.Common.UI.GoodsInfoView")
},
["TabBar"] = {
name="TabBar", maxNum = 5, createFunc = function()
return require("Game.Common.UI.TabBar").New()
end
},
}
LuaPool:Init(info)
end
--销毁--
function Game:OnDestroy()
end
|
local K = unpack(select(2, ...))
local ModuleSkinsTest = K:GetModule("SkinsTest")
local function SimcSkin()
if not SimcCopyFrame then return end
SimcCopyFrame:CreateBorder(nil, nil, nil, true)
SimcCopyFrameButton:SkinButton()
SimcCopyFrameScrollScrollBar:SetAlpha(0)
end
ModuleSkinsTest:LoadWithAddOn("Simulationcraft", "Simulationcraft", SimcSkin)
|
return {
source = {
type = 'dist',
location = 'https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/arm-linux-gnueabi/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi.tar.xz',
sha256sum = '232302236c90ec136a42d44bc387d2e1199f5df010b77e97ee590216d2b5b181',
},
build = {
system = 'arm-linux-gnueabi',
toolchain = false
},
install = 'toolchain'
}
|
--New
object_tangible_meatlump_reward_shared_mtp_king_cutout = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/meatlump/reward/shared_mtp_king_cutout.iff"
}
ObjectTemplates:addClientTemplate(object_tangible_meatlump_reward_shared_mtp_king_cutout, "object/tangible/meatlump/reward/shared_mtp_king_cutout.iff")
--**********************************************************************************************************************************
object_tangible_meatlump_reward_shared_mtp_king_painting = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/meatlump/reward/shared_mtp_king_painting.iff"
}
ObjectTemplates:addClientTemplate(object_tangible_meatlump_reward_shared_mtp_king_painting, "object/tangible/meatlump/reward/shared_mtp_king_painting.iff")
------------------------------------------------------------------------------------------------------------------------------------
object_tangible_meatlump_reward_shared_mtp_meatlump_graffiti_01 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/meatlump/reward/shared_mtp_meatlump_graffiti_01.iff"
}
ObjectTemplates:addClientTemplate(object_tangible_meatlump_reward_shared_mtp_meatlump_graffiti_01, "object/tangible/meatlump/reward/shared_mtp_meatlump_graffiti_01.iff")
------------------------------------------------------------------------------------------------------------------------------------
object_tangible_meatlump_reward_shared_mtp_meatlump_graffiti_02 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/meatlump/reward/shared_mtp_meatlump_graffiti_02.iff"
}
ObjectTemplates:addClientTemplate(object_tangible_meatlump_reward_shared_mtp_meatlump_graffiti_02, "object/tangible/meatlump/reward/shared_mtp_meatlump_graffiti_02.iff")
------------------------------------------------------------------------------------------------------------------------------------
object_tangible_meatlump_reward_shared_mtp_meatlump_graffiti_03 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/meatlump/reward/shared_mtp_meatlump_graffiti_03.iff"
}
ObjectTemplates:addClientTemplate(object_tangible_meatlump_reward_shared_mtp_meatlump_graffiti_03, "object/tangible/meatlump/reward/shared_mtp_meatlump_graffiti_03.iff")
------------------------------------------------------------------------------------------------------------------------------------
object_tangible_meatlump_reward_shared_mtp_meatlump_graffiti_04 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/meatlump/reward/shared_mtp_meatlump_graffiti_04.iff"
}
ObjectTemplates:addClientTemplate(object_tangible_meatlump_reward_shared_mtp_meatlump_graffiti_04, "object/tangible/meatlump/reward/shared_mtp_meatlump_graffiti_04.iff")
------------------------------------------------------------------------------------------------------------------------------------
object_tangible_meatlump_reward_shared_mtp_meatlump_graffiti_05 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/meatlump/reward/shared_mtp_meatlump_graffiti_05.iff"
}
ObjectTemplates:addClientTemplate(object_tangible_meatlump_reward_shared_mtp_meatlump_graffiti_05, "object/tangible/meatlump/reward/shared_mtp_meatlump_graffiti_05.iff")
------------------------------------------------------------------------------------------------------------------------------------
object_tangible_meatlump_reward_shared_mtp_meatlump_graffiti_06 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/meatlump/reward/shared_mtp_meatlump_graffiti_06.iff"
}
ObjectTemplates:addClientTemplate(object_tangible_meatlump_reward_shared_mtp_meatlump_graffiti_06, "object/tangible/meatlump/reward/shared_mtp_meatlump_graffiti_06.iff")
------------------------------------------------------------------------------------------------------------------------------------
object_tangible_meatlump_reward_shared_mtp_meatlump_graffiti_07 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/meatlump/reward/shared_mtp_meatlump_graffiti_07.iff"
}
ObjectTemplates:addClientTemplate(object_tangible_meatlump_reward_shared_mtp_meatlump_graffiti_07, "object/tangible/meatlump/reward/shared_mtp_meatlump_graffiti_07.iff")
------------------------------------------------------------------------------------------------------------------------------------
|
local t = Def.ActorFrame{};
t[#t+1] = Def.ActorFrame{
InitCommand=cmd(Center;zoom,1.02);
OnCommand=cmd(sleep,0.6;queuecommand,"Vib");
VibCommand=cmd(linear,0.05;addy,10;linear,0.05;addy,-20;linear,0.05;addy,20;linear,0.05;addy,-10;sleep,0.3;);
LoadActor("Common doors/door 5.png")..{
OnCommand=cmd(rotationz,0;zoom,0;linear,0.5;zoom,0.0;rotationz,-20;sleep,0.05;zoom,1;linear,0.04;rotationz,0);
};
LoadActor("Common doors/door 3.png")..{
OnCommand=cmd(zoom,0;rotationz,080;linear,0.5;zoom,0.0;rotationz,90;sleep,0.05;zoom,1;linear,0.04;rotationz,0);
};
LoadActor("Common doors/door 2.png")..{
OnCommand=cmd(diffusealpha,0;rotationz,-110;zoom,2;sleep,0.25;diffusealpha,1;linear,0.3;zoom,1.2;rotationz,-050;linear,0.039;zoom,1;rotationz,0);
};
LoadActor("Common doors/door 1.png")..{
OnCommand=cmd(zoom,5;linear,0.2;zoom,1.8;linear,0.2;zoom,1;rotationz,0);
};
};
return t
|
local Image = require "lib.image"
return function()
local itemType = {}
itemType.tileID = 2866
itemType.name = "Dark Sword"
itemType.type = "sword"
itemType.attack = 50
itemType.description = string.format("A sword stolen from the mounts by grave robbers. Attack: %d", itemType.attack)
itemType.use = function(self, entity, item)
if entity.equipment.weapon == item then
entity.equipment.weapon = nil
item.equiped = false
else
if entity.equipment.weapon then entity.equipment.equiped = false end
entity.equipment.weapon = item
item.equiped = true
end
end
return itemType
end
|
return {
base00 = "18191f",
base01 = "222329",
base02 = "2c2d33",
base03 = "3c3d43",
base04 = "b5ac9b",
base05 = "cbc0ab",
base06 = "e0d6bd",
base07 = "f1ebd1",
base08 = "b8aad9",
base09 = "b17f81",
base0A = "d4ae80",
base0B = "8aa387",
base0C = "9ba292",
base0D = "c495a2",
base0E = "8896ae",
base0F = "d0d0c7",
}
|
data:extend({
{
type = "item",
name = "orbital-ion-cannon",
icon = "__Orbital Ion Cannon__/graphics/icon64.png",
icon_size = 64,
flags = {"goes-to-main-inventory"},
subgroup = "defensive-structure",
order = "e[orbital-ion-cannon]",
stack_size = 1
},
{
type = "item",
name = "ion-cannon-targeter",
icon = "__Orbital Ion Cannon__/graphics/crosshairs64.png",
icon_size = 64,
flags = {"goes-to-quickbar"},
place_result = "ion-cannon-targeter",
subgroup = "capsule",
order = "c[target]",
stack_size = 1,
}
})
|
--[[
XML class written by Kenix
Additional
Version: 1.0.0
]]
push([[
XML = Class:Create()
function XML:toObj( ele )
if ele then
local obj = Class:Create( XML )
obj.ele = ele
return obj
end
return false
end
function XML:Create( sPath, sNodeName )
TableAssert
{
{
value = type( sPath );
condition = 'string';
sMsg = '1 argument is not string';
};
{
value = type( sNodeName );
condition = 'string';
sMsg = '2 argument is not string';
};
}
local ele = xmlCreateFile( sPath, sNodeName )
return XML:toObj( ele )
end
function XML:Copy( sPath )
assert( type( sPath ) == 'string', '1 argument is not string' )
local ele = xmlCopyFile( self.ele, sPath )
return XML:toObj( ele )
end
function XML:Load( sPath )
assert( type( sPath ) == 'string', '1 argument is not string' )
local ele = xmlLoadFile( sPath )
return XML:toObj( ele )
end
function XML:DestroyNode( )
return xmlDestroyNode( self.ele )
end
function XML:Attribute( sName, Value )
assert( type( sName ) == 'string', '1 argument is not string' )
if type( Value ) == 'string' or type( Value ) == 'number' then
return xmlNodeSetAttribute( self.ele, sName, Value )
end
return xmlNodeGetAttribute( self.ele, sName )
end
function XML:Value( sValue )
if type( sValue ) == 'string' then
return xmlNodeSetValue( self.ele, sValue )
end
return xmlNodeGetValue( self.ele )
end
function XML:Save( )
return xmlSaveFile( self.ele )
end
function XML:Unload( )
return xmlUnloadFile( self.ele )
end
function XML:CreateChild( sTag )
assert( type( sTag ) == 'string', '1 argument is not string' )
return xmlCreateChild( self.ele, sTag )
end
function XML:FindChild( sTag, nIndex )
TableAssert
{
{
value = type( sTag );
condition = 'string';
sMsg = '1 argument is not string';
};
{
value = type( nIndex );
condition = 'number';
sMsg = '2 argument is not number';
};
}
return xmlFindChild( self.ele, sTag, nIndex )
end
function XML:Attributes( )
return xmlNodeGetAttributes( self.ele )
end
function XML:Children( nIndex )
return xmlNodeGetChildren( self.ele, nIndex )
end
function XML:Name( sName )
if type( sName ) == 'string' then
return xmlNodeSetName( self.ele, sName )
end
return xmlNodeGetName( self.ele )
end
function XML:Parent( )
return xmlNodeGetParent( self.ele )
end
]])
|
--
-- 定时器管理器
--
local DRIVE_TYPE = {
TIME = 0,
FRAME = 1
}
TimerMgr = {}
TimerMgr._funcHandle = nil
TimerMgr._timerList = {}
TimerMgr._frameList = {}
TimerMgr._enterFrameCO = nil
TimerMgr._needClean = false
TimerMgr._dt = 0
TimerMgr._running = false
function TimerMgr.start()
if TimerMgr._funcHandle then
return
end
TimerMgr._running = true
TimerMgr._createTimerThread()
TimerMgr._funcHandle = cc.Director:
getInstance():
getScheduler():
scheduleScriptFunc(
TimerMgr.onEnterFrame,
0,
false
)
end
function TimerMgr._createTimerThread()
TimerMgr._enterFrameCO = coroutine.create(function()
while TimerMgr._running do
if TimerMgr._needClean then
TimerMgr._clean()
TimerMgr._needClean = false
end
for i, v in ipairs(TimerMgr._timerList) do
if v and v._isDirty == false and v._isPause == false then
local trigger = false
if v._type == DRIVE_TYPE.FRAME then
v._currentFrame = v._currentFrame + 1
if v._currentFrame >= v._totalFrame then
trigger = true
if v._loop then
v._currentFrame = 0
else
v._isDirty = true
TimerMgr._needClean = true
end
end
else
v._countTime = v._countTime + TimerMgr._dt
if v._countTime >= v._totalTime then
trigger = true
if v._loop then
v._countTime = 0
else
v._isDirty = true
TimerMgr._needClean = true
end
end
end
--清理空函数
if v._callFunc == nil then
v._isDirty = true
TimerMgr._needClean = true
else
if trigger then
if v._data then
v._callFunc(v._data)
else
v._callFunc()
end
end
end
end
end
coroutine.yield()
end
end)
end
function TimerMgr.stop()
if not TimerMgr._funcHandle then
return
end
cc.Director:getInstance():getScheduler():unscheduleScriptEntry(TimerMgr._funcHandle)
TimerMgr._funcHandle = nil
--make coroutine dead
TimerMgr._running = false
coroutine.resume(TimerMgr._enterFrameCO)
TimerMgr._enterFrameCO = nil
end
function TimerMgr._clean()
local tempList = {}
local i = 1
local timerData = nil
while i <= #TimerMgr._timerList do
timerData = TimerMgr._timerList[i]
if timerData._isDirty == true then
timerData._callFunc = nil
table.remove(TimerMgr._timerList, i)
else
i = i + 1
end
end
end
function TimerMgr._initTimer(timer, time, loop, data, token)
timer._type = DRIVE_TYPE.TIME --时间驱动
timer._totalTime = time * 0.001 --触发间隔时间(这里改成s)
timer._countTime = 0 --统计时间
timer._loop = loop --是否循环
timer._data = data --附带数据
timer._isDirty = false --
timer._isPause = false --是否暂停
timer._token = token
end
function TimerMgr._initFrame(timer, frames, loop, data, token)
timer._type = DRIVE_TYPE.FRAME --帧驱动
if frames <= 0 then
frames = 1
end
timer._totalFrame = frames
timer._currentFrame = 0 --统计时间
timer._loop = loop --是否循环
timer._data = data --附带数据
timer._isDirty = false --
timer._isPause = false --是否暂停
timer._token = token
end
--[[
添加时间驱动定时器
@param time 时间(ms)
@param callFunc 回调函数
@param loop 是否循环
@param data 附带数据
@param token 定时器附带的标识(用作清除)
]]
function TimerMgr.addTimer(time, callFunc, loop, data, token)
if type(callFunc) ~= "function" then
return
end
for i, v in ipairs(TimerMgr._timerList) do
if v._callFunc == callFunc then
TimerMgr._initTimer(v, time, loop, data, token)
return
end
end
local timer = {}
timer._callFunc = callFunc --回调函数
TimerMgr._initTimer(timer, time, loop, data, token)
TimerMgr._timerList[#TimerMgr._timerList + 1] = timer
end
--[[
添加帧驱动定时器
]]
function TimerMgr.addFrame(frames, callFunc, loop, data, token)
if type(callFunc) ~= "function" then
return
end
for i, v in ipairs(TimerMgr._timerList) do
if v._callFunc == callFunc then
TimerMgr._initFrame(v, frames, loop, data, token)
return
end
end
local timer = {}
timer._callFunc = callFunc --回调函数
TimerMgr._initFrame(timer, frames, loop, data, token)
TimerMgr._timerList[#TimerMgr._timerList + 1] = timer
end
--[[
根据回调清除定时器
]]
function TimerMgr.removeTimer(callFunc)
if type(callFunc) ~= "function" then
return
end
local co = coroutine.create(function()
for i, v in ipairs(TimerMgr._timerList) do
if v and v._isDirty == false then
if v._callFunc == callFunc then
v._isDirty = true
TimerMgr._needClean = true
break
end
end
end
end)
coroutine.resume(co)
end
--[[
根据设置标识清除定时器
]]
function TimerMgr.removeTimerWithToken(token)
if token == nil then
return
end
local co = coroutine.create(function()
for i, v in ipairs(TimerMgr._timerList) do
if v and v._isDirty == false then
if v._token == token then
v._isDirty = true
TimerMgr._needClean = true
-- break
end
end
end
end)
coroutine.resume(co)
end
--[[
暂停定时器
]]
function TimerMgr.pauseTimer(callFunc)
local timer = TimerMgr._getTimer(callFunc)
if timer == nil then
return
end
timer._isPause = true
end
--[[
恢复定时器
]]
function TimerMgr.resumeTimer(callFunc)
local timer = TimerMgr._getTimer(callFunc)
if timer == nil then
return
end
timer._isPause = false
end
function TimerMgr._getTimer(callFunc)
for i, v in ipairs(TimerMgr._timerList) do
if v and v._isDirty == false then
if v._callFunc == callFunc then
return v
end
end
end
return nil
end
function TimerMgr.onEnterFrame(dt)
TimerMgr._dt = dt
local status, msg = coroutine.resume(TimerMgr._enterFrameCO)
if status == false then
print("定时器调试>> 执行函数报错:", msg)
-- GmManager:getInstance():addErrorInfo(msg)
TimerMgr._createTimerThread()
end
end
|
package("tl_function_ref")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/TartanLlama/function_ref")
set_description("A lightweight, non-owning reference to a callable.")
set_license("CC0")
set_urls("https://github.com/TartanLlama/function_ref/archive/$(version).zip",
"https://github.com/TartanLlama/function_ref.git")
add_versions("v1.0.0", "b3161fddbf40b41be984d5649ad6b5790ecebd0388f9db51b3160ecd006963f4")
on_install(function (package)
os.cp("include/tl", package:installdir("include"))
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
void test()
{
tl::function_ref<void(void)> fr1 = []{};
}
]]}, {configs = {languages = "c++14"}, includes = { "tl/function_ref.hpp"} }))
end)
|
appname = "插件"
appver = "1.1"
packagename = "com.androluna.plugin"
theme = "Theme_Holo_Light"
developer = "nirenr"
description = "插件管理"
debugmode = true
user_permission = {
"INTERNET",
"WRITE_EXTERNAL_STORAGE"
}
|
-- Colorscheme build in Lua with `lush.nvim`, modeled initially on Solarized, but intended to be
-- usable with alternate colors.
-- Still early days, with lots of work needed
-- https://github.com/rktjmp/lush.nvim
local lush = require 'lush'
local hsl = lush.hsl
local _ = require 'moses'
local M = {}
-- Default colors are the Solarized colors
M.colors = {
darkBase = hsl '#002b36', -- base03
darkBaseHl = hsl '#073642', -- base02
darkestTone = hsl '#586e75', -- base01
darkTone = hsl '#657b83', -- base00
lightTone = hsl '#839496', -- base0
lightestTone = hsl '#93a1a1', -- base1
lightBaseHl = hsl '#eee8d5', -- base2
lightBase = hsl '#fdf6e3', -- base3
yellow = hsl '#b58900',
orange = hsl '#cb4b16',
red = hsl '#dc322f',
magenta = hsl '#d33682',
violet = hsl '#6c71c4',
blue = hsl '#268bd2',
cyan = hsl '#2aa198',
green = hsl '#859900',
}
-- A table of strings with the name of additonal Lush specs that should be merged with the
-- colorscheme.
M.extraLushSpecs = {}
-- Function called from `../colors/malo.vim` to load the colorscheme.
M.loadColorscheme = function ()
-- vim.o.pumblend = 10
-- vim.o.winblend = vim.o.pumblend
-- We need to unload all Lush specs so that the specs are regenerated whenever the colorscheme is
-- reapplied.
package.loaded['lush_theme.malo'] = nil
_.eachi(M.extraLushSpecs, function(v) package.loaded[v] = nil end)
-- Merge the main colorscheme spec with any additional specs that were provided.
local finalSpec = lush.merge {
require 'lush_theme.malo',
lush.merge(_.mapi(M.extraLushSpecs, require))
}
-- Apply colorscheme
lush(finalSpec)
-- Set `nvim-web-devincons` highlights if they are in use
if pcall(require, 'nvim-web-devicons') then require'nvim-web-devicons'.setup() end
end
return M
|
local opts = {
enabled = true,
center = "92,92",
scale = 12,
max_size = "16,16",
image_opacity = "88",
image_color = "BBBBBB",
view_opacity = "BB",
view_color = "222222",
view_above_image = true,
hide_when_full_image_in_view = true,
}
local msg = require 'mp.msg'
local assdraw = require 'mp.assdraw'
local options = require 'mp.options'
options.read_options(opts, nil, function(c)
if c["enabled"] then
if opts.enabled then
enable()
else
disable()
end
end
mark_stale()
end)
function split_comma(input)
local ret = {}
for str in string.gmatch(input, "([^,]+)") do
ret[#ret + 1] = tonumber(str)
end
return ret
end
local active = false
local refresh = true
function draw_ass(ass)
local ww, wh = mp.get_osd_size()
mp.set_osd_ass(ww, wh, ass)
end
function mark_stale()
refresh = true
end
function refresh_minimap()
if not refresh then return end
refresh = false
local dim = mp.get_property_native("osd-dimensions")
if not dim then
draw_ass("")
return
end
local ww, wh = dim.w, dim.h
if not (ww > 0 and wh > 0) then return end
if opts.hide_when_full_image_in_view then
if dim.mt >= 0 and dim.mb >= 0 and dim.ml >= 0 and dim.mr >= 0 then
draw_ass("")
return
end
end
local center = split_comma(opts.center)
center[1] = center[1] * 0.01 * ww
center[2] = center[2] * 0.01 * wh
local cutoff = split_comma(opts.max_size)
cutoff[1] = cutoff[1] * 0.01 * ww * 0.5
cutoff[2] = cutoff[2] * 0.01 * wh * 0.5
local a = assdraw.ass_new()
local draw = function(x, y, w, h, opacity, color)
a:new_event()
a:pos(center[1], center[2])
a:append("{\\bord0}")
a:append("{\\shad0}")
a:append("{\\c&" .. color .. "&}")
a:append("{\\2a&HFF}")
a:append("{\\3a&HFF}")
a:append("{\\4a&HFF}")
a:append("{\\1a&H" .. opacity .. "}")
w = w * 0.5
h = h * 0.5
a:draw_start()
local rounded = {true,true,true,true} -- tl, tr, br, bl
local x0,y0,x1,y1 = x-w, y-h, x+w, y+h
if x0 < -cutoff[1] then
x0 = -cutoff[1]
rounded[4] = false
rounded[1] = false
end
if y0 < -cutoff[2] then
y0 = -cutoff[2]
rounded[1] = false
rounded[2] = false
end
if x1 > cutoff[1] then
x1 = cutoff[1]
rounded[2] = false
rounded[3] = false
end
if y1 > cutoff[2] then
y1 = cutoff[2]
rounded[3] = false
rounded[4] = false
end
local r = 3
local c = 0.551915024494 * r
if rounded[0] then
a:move_to(x0 + r, y0)
else
a:move_to(x0,y0)
end
if rounded[1] then
a:line_to(x1 - r, y0)
a:bezier_curve(x1 - r + c, y0, x1, y0 + r - c, x1, y0 + r)
else
a:line_to(x1, y0)
end
if rounded[2] then
a:line_to(x1, y1 - r)
a:bezier_curve(x1, y1 - r + c, x1 - r + c, y1, x1 - r, y1)
else
a:line_to(x1, y1)
end
if rounded[3] then
a:line_to(x0 + r, y1)
a:bezier_curve(x0 + r - c, y1, x0, y1 - r + c, x0, y1 - r)
else
a:line_to(x0, y1)
end
if rounded[4] then
a:line_to(x0, y0 + r)
a:bezier_curve(x0, y0 + r - c, x0 + r - c, y0, x0 + r, y0)
else
a:line_to(x0, y0)
end
a:draw_stop()
end
local image = function()
draw((dim.ml/2 - dim.mr/2) / opts.scale,
(dim.mt/2 - dim.mb/2) / opts.scale,
(ww - dim.ml - dim.mr) / opts.scale,
(wh - dim.mt - dim.mb) / opts.scale,
opts.image_opacity,
opts.image_color)
end
local view = function()
draw(0,
0,
ww / opts.scale,
wh / opts.scale,
opts.view_opacity,
opts.view_color)
end
if opts.view_above_image then
image()
view()
else
view()
image()
end
draw_ass(a.text)
end
function enable()
if active then return end
active = true
mp.observe_property("osd-dimensions", nil, mark_stale)
mp.register_idle(refresh_minimap)
mark_stale()
end
function disable()
if not active then return end
active = false
mp.unobserve_property(mark_stale)
mp.unregister_idle(refresh_minimap)
draw_ass("")
end
function toggle()
if active then
disable()
else
enable()
end
end
if opts.enabled then
enable()
end
mp.add_key_binding(nil, "minimap-enable", enable)
mp.add_key_binding(nil, "minimap-disable", disable)
mp.add_key_binding(nil, "minimap-toggle", toggle)
|
--[[
**************************************** PUC-RIO 2014 ****************************************
Implemented by Breno Riba
On July 2014
**********************************************************************************************
]]--
local parsing = {}
-- Split string
parsing.strsplit = function(str)
local words = {}
for w in string.gmatch (str, "%S+") do
words[#words+1] = w
end
return words
end
-- Read request headers
parsing.read_headers = function(sock,req)
local headers = {}
local prevval, prevname
while true do
local l,err = sock:receive()
if (not l or l == "") then
req.headers = headers
return
end
local _,_, name, value = string.find (l, "^([^: ]+)%s*:%s*(.+)")
name = string.lower (name or '')
if name then
prevval = headers [name]
if prevval then
value = prevval .. "," .. value
end
headers [name] = value
prevname = name
elseif prevname then
headers [prevname] = headers [prevname] .. l
end
end
end
-- Parse URL
parsing.parse_url = function(req)
local url = require "socket.url"
local def_url = string.format ("http://%s%s", req.headers.host or "", req.cmd_url or "")
req.parsed_url = url.parse (def_url or '')
req.parsed_url.port = req.parsed_url.port or req.port
req.built_url = url.build (req.parsed_url)
req.relpath = url.unescape (req.parsed_url.path)
end
return parsing
|
-----------------------------------
-- Area: Norg
-- NPC: Aeka
-- Involved in Quest: Forge Your Destiny
-- !pos 4 0 -4 252
-----------------------------------
require("scripts/globals/settings")
require("scripts/globals/quests")
local ID = require("scripts/zones/Norg/IDs")
-----------------------------------
function onTrade(player, npc, trade)
local questItem = player:getCharVar("ForgeYourDestiny_Event")
local checkItem = testflag(tonumber(questItem), 0x01)
if (checkItem == true) then
if (trade:hasItemQty(645, 1) and trade:getItemCount() == 1) then
player:startEvent(47, 0, 1151, 645) -- Oriental Steel, Darksteel Ore
end
end
end
-----------------------------------
-- Event Check
-----------------------------------
function testflag(set, flag)
return (set % (2*flag) >= flag)
end
function onTrigger(player, npc)
local swordTimer = player:getCharVar("ForgeYourDestiny_timer")
if (player:getQuestStatus(OUTLANDS, tpz.quest.id.outlands.FORGE_YOUR_DESTINY) == QUEST_ACCEPTED and swordTimer == 0) then
if (player:hasItem(1152)) then
player:startEvent(48, 1152) -- Bomb Steel
elseif (player:hasItem(1151) == false) then
local questItem = player:getCharVar("ForgeYourDestiny_Event")
local checkItem = testflag(tonumber(questItem), 0x01)
if (checkItem == false) then
player:startEvent(44, 1152, 1151) -- Bomb Steel, Oriental Steel
elseif (checkItem == true) then
player:startEvent(46, 0, 1151, 645) -- Oriental Steel, Darksteel Ore
end
elseif (player:hasItem(1151)) then
player:startEvent(45, 1152, 1151) -- Bomb Steel, Oriental Steel
end
elseif (swordTimer > 0) then
player:startEvent(50)
else
player:startEvent(120)
end
end
function onEventUpdate(player, csid, option)
end
function onEventFinish(player, csid, option)
local questItem = player:getCharVar("ForgeYourDestiny_Event")
if (csid == 44) then
if (player:getFreeSlotsCount(0) >= 1) then
player:addItem(1151)
player:messageSpecial(ID.text.ITEM_OBTAINED, 1151) -- Oriental Steel
player:setCharVar("ForgeYourDestiny_Event", questItem + 0x01)
else
player:messageSpecial(ID.text.ITEM_CANNOT_BE_OBTAINED, 1151) -- Oriental Steel
end
elseif (csid == 47) then
if (player:getFreeSlotsCount(0) >= 1) then
player:tradeComplete()
player:addItem(1151)
player:messageSpecial(ID.text.ITEM_OBTAINED, 1151) -- Oriental Steel
else
player:messageSpecial(ID.text.ITEM_CANNOT_BE_OBTAINED, 1151) -- Oriental Steel
end
end
end
|
local part = workspace.FloatingPart
local mass = part:GetMass()
local bodyForce = Instance.new("BodyForce")
bodyForce.Force = Vector3.new(0,mass * workspace.Gravity,0)
bodyForce.Parent = part
local Part = workspace.TouchPart
Part.Touched:Connect(function(hit)
print(hit)
end)
local Part = workspace.TouchPart
local function printHitName(hit)
print(hit)
end
Part.Touched:Connect(printHitName)
|
local CharacterState = {}
function CharacterState:start()
return self:Load("Deus.Enumeration").addEnum(
"CharacterState",
{
Unsimulated = 0,
Idling = 1,
Walking = 2,
Jumping = 3,
-- Sitting = 4,
-- Falling = 5,
-- Swimming = 6,
-- SwimIdling = 7,
-- Climbing = 8
}
)
end
return CharacterState
|
loadstring(game:HttpGet("https://pastebin.com/raw/vdr3zxKD",true))()
|
--[[
Copyright 2017 The Nakama Authors
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 or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--]]
local nk = require("nakama")
-- A simple echo example which returns the payload received as input.
local function echo(context, payload)
return payload
end
nk.register_rpc(echo, "client_rpc_echo")
-- Tests whether a client handles a Lua error gracefully.
local function fail(context, payload)
error("fail")
end
nk.register_rpc(fail, "client_rpc_fail")
-- Create a leaderboard and insert 15 test records.
-- Expects as input {"leaderboard_id": "<...>"}
local function generate_leaderboard(context, payload)
local leaderboard_id = nk.json_decode(payload)["leaderboard_id"]
nk.leaderboard_create(leaderboard_id, "desc")
for i = 1, 15 do
nk.leaderboard_submit_set(leaderboard_id, i, nk.uuid_v4())
end
end
nk.register_rpc(generate_leaderboard, "generate_leaderboard")
-- Generate 15 notifications for the user calling.
local function generate_notifications(context, payload)
local notifications = {}
for i = 1, 15 do
table.insert(notifications, {
Persistent = true,
UserId = context.UserId,
Subject = "test " .. i,
Content = {
test = i
}
})
end
nk.notifications_send_id(notifications)
end
nk.register_rpc(generate_notifications, "generate_notifications")
|
---@class Food : zombie.inventory.types.Food
---@field protected bBadCold boolean
---@field protected bGoodHot boolean
---@field private MIN_HEAT float
---@field private MAX_HEAT float
---@field protected Heat float
---@field protected endChange float
---@field protected hungChange float
---@field protected useOnConsume String
---@field protected rotten boolean
---@field protected bDangerousUncooked boolean
---@field protected LastCookMinute int
---@field public thirstChange float
---@field public Poison boolean
---@field private ReplaceOnCooked List|Unknown
---@field private baseHunger float
---@field public spices ArrayList|String
---@field private isSpice boolean
---@field private poisonDetectionLevel int
---@field private PoisonLevelForRecipe Integer
---@field private UseForPoison int
---@field private PoisonPower int
---@field private FoodType String
---@field private CustomEatSound String
---@field private RemoveNegativeEffectOnCooked boolean
---@field private Chef String
---@field private OnCooked String
---@field private WorldTextureCooked String
---@field private WorldTextureRotten String
---@field private WorldTextureOverdone String
---@field private fluReduction int
---@field private ReduceFoodSickness int
---@field private painReduction float
---@field private HerbalistType String
---@field private carbohydrates float
---@field private lipids float
---@field private proteins float
---@field private calories float
---@field private packaged boolean
---@field private freezingTime float
---@field private frozen boolean
---@field private canBeFrozen boolean
---@field protected LastFrozenUpdate float
---@field public FreezerAgeMultiplier float
---@field private replaceOnRotten String
---@field private forceFoodTypeAsName boolean
---@field private rottenTime float
---@field private compostTime float
---@field private onEat String
---@field private badInMicrowave boolean
---@field private cookedInMicrowave boolean
Food = {}
---@public
---@param onCooked String
---@return void
function Food:setOnCooked(onCooked) end
---Overrides:
---
---finishupdate in class InventoryItem
---@public
---@return boolean
function Food:finishupdate() end
---@public
---@return String
function Food:getOnEat() end
---@public
---@param bBadCold boolean
---@return void
function Food:setBadCold(bBadCold) end
---@public
---@return float
function Food:getHeat() end
---@public
---@param arg0 float
---@return void
function Food:setCalories(arg0) end
---@public
---@return Integer
function Food:getPoisonLevelForRecipe() end
---@public
---@return int
function Food:getUseForPoison() end
---Overrides:
---
---DoTooltip in class InventoryItem
---@public
---@param tooltipUI ObjectTooltip
---@param layout ObjectTooltip.Layout
---@return void
function Food:DoTooltip(tooltipUI, layout) end
---@public
---@param chef String
---@return void
function Food:setChef(chef) end
---@public
---@param arg0 boolean
---@return void
function Food:setCanBeFrozen(arg0) end
---@public
---@return float
function Food:getHungerChange() end
---@public
---@return String
function Food:getChef() end
---@public
---@param baseHunger float
---@return void
function Food:setBaseHunger(baseHunger) end
---@public
---@param useOnConsume String
---@return void
function Food:setUseOnConsume(useOnConsume) end
---@public
---@return float
function Food:getEnduranceChange() end
---@public
---@param useForPoison int
---@return void
function Food:setUseForPoison(useForPoison) end
---@public
---@return float
function Food:getLipids() end
---@public
---@return List|String
function Food:getReplaceOnCooked() end
---@public
---@return int
function Food:getFluReduction() end
---@public
---@return float
function Food:getActualWeight() end
---@public
---@param LastCookMinute int
---@return void
function Food:setLastCookMinute(LastCookMinute) end
---@public
---@param arg0 boolean
---@return void
function Food:setBadInMicrowave(arg0) end
---@public
---@param thirstChange float
---@return void
function Food:setThirstChange(thirstChange) end
---@public
---@return boolean
function Food:isRotten() end
---@public
---@return int
function Food:getSaveType() end
---throws java.io.IOException
---
---Overrides:
---
---save in class InventoryItem
---@public
---@param output ByteBuffer
---@param net boolean
---@return void
function Food:save(output, net) end
---@public
---@return boolean
function Food:isGoodHot() end
---@public
---@return void
function Food:setAutoAge() end
---@public
---@return float
function Food:getProteins() end
---@public
---@return boolean
function Food:shouldUpdateInWorld() end
---@public
---@return boolean
function Food:IsFood() end
---Overrides:
---
---getStressChange in class InventoryItem
---@public
---@return float @the stressChange
function Food:getStressChange() end
---@public
---@return float
function Food:getCarbohydrates() end
---@public
---@return String
function Food:getReplaceOnRotten() end
---@public
---@param arg0 int
---@return void
function Food:setReduceFoodSickness(arg0) end
---@public
---@return float
function Food:getPainReduction() end
---@public
---@return boolean
function Food:isRemoveNegativeEffectOnCooked() end
---@public
---@param bDangerousUncooked boolean
---@return void
function Food:setbDangerousUncooked(bDangerousUncooked) end
---@public
---@return String
function Food:getName() end
---@public
---@return boolean
function Food:isbDangerousUncooked() end
---@public
---@param arg0 ItemContainer
---@return void
function Food:updateFreezing(arg0) end
---@public
---@param bGoodHot boolean
---@return void
function Food:setGoodHot(bGoodHot) end
---@public
---@return boolean
function Food:isBadCold() end
---@public
---@return ArrayList|Unknown
function Food:getSpices() end
---@public
---@param arg0 float
---@return void
function Food:multiplyFoodValues(arg0) end
---Overrides:
---
---updateAge in class InventoryItem
---@public
---@return void
function Food:updateAge() end
---@public
---@return String
function Food:getOnCooked() end
---@public
---@return int
function Food:getPoisonPower() end
---@public
---@return boolean
function Food:isPackaged() end
---@public
---@return float
function Food:getHungChange() end
---@public
---@return String
function Food:getFoodType() end
---@public
---@return boolean
function Food:isFreezing() end
---@public
---@return void
function Food:freeze() end
---@public
---@return String
function Food:getUseOnConsume() end
---Overrides:
---
---getUnhappyChange in class InventoryItem
---@public
---@return float @the unhappyChange
function Food:getUnhappyChange() end
---@public
---@param arg0 float
---@return void
function Food:setCarbohydrates(arg0) end
---@public
---@param removeNegativeEffectOnCooked boolean
---@return void
function Food:setRemoveNegativeEffectOnCooked(removeNegativeEffectOnCooked) end
---@public
---@return boolean
function Food:isFresh() end
---@public
---@param arg0 float
---@return void
function Food:setPainReduction(arg0) end
---@public
---@return boolean
function Food:isFrozen() end
---@public
---@param arg0 float
---@return void
function Food:setLipids(arg0) end
---@public
---@return int
function Food:getLastCookMinute() end
---@public
---@param arg0 String
---@return void
function Food:setHerbalistType(arg0) end
---@public
---@return boolean
function Food:isSpice() end
---@public
---@param foodType String
---@return void
function Food:setFoodType(foodType) end
---Overrides:
---
---CanStack in class InventoryItem
---@public
---@param item InventoryItem
---@return boolean
function Food:CanStack(item) end
---@public
---@param arg0 ArrayList|Unknown
---@return void
function Food:setSpices(arg0) end
---@public
---@return float
function Food:getInvHeat() end
---@public
---@return boolean
function Food:canBeFrozen() end
---@public
---@param arg0 int
---@return void
function Food:setFluReduction(arg0) end
---@public
---@return int
function Food:getPoisonDetectionLevel() end
---@public
---@param endChange float
---@return void
function Food:setEndChange(endChange) end
---Overrides:
---
---getBoredomChange in class InventoryItem
---@public
---@return float @the boredomChange
function Food:getBoredomChange() end
---@public
---@param rotten boolean
---@return void
function Food:setRotten(rotten) end
---@public
---@return float
function Food:getBaseHunger() end
---@public
---@return Texture
function Food:getTex() end
---@public
---@param arg0 boolean
---@return void
function Food:setPackaged(arg0) end
---@public
---@return boolean
function Food:isBadInMicrowave() end
---@public
---@param poisonDetectionLevel int
---@return void
function Food:setPoisonDetectionLevel(poisonDetectionLevel) end
---@public
---@return boolean
function Food:isPoison() end
---@public
---@return float
function Food:getEndChange() end
---@public
---@param arg0 String
---@return void
function Food:setOnEat(arg0) end
---Overrides:
---
---getWorldTexture in class InventoryItem
---@public
---@return String @the WorldTexture
function Food:getWorldTexture() end
---@public
---@param hungChange float
---@return void
function Food:setHungChange(hungChange) end
---Overrides:
---
---update in class InventoryItem
---@public
---@return void
function Food:update() end
---@public
---@param arg0 float
---@return void
function Food:setCompostTime(arg0) end
---@public
---@param customEatSound String
---@return void
function Food:setCustomEatSound(customEatSound) end
---@public
---@return boolean
function Food:isThawing() end
---@public
---@return float
function Food:getThirstChange() end
---@public
---@param arg0 float
---@return void
function Food:setFreezingTime(arg0) end
---@private
---@return void
function Food:destroyThisItem() end
---This method is annotated as @Deprecated
---
---Deprecated.
---@public
---@return float
function Food:getBaseHungChange() end
---@public
---@return float
function Food:getCalories() end
---@public
---@return String
function Food:getHerbalistType() end
---@private
---@param arg0 ItemContainer
---@return void
function Food:updateRotting(arg0) end
---@public
---@return float
function Food:getWeight() end
---@public
---@param arg0 ByteBuffer
---@param arg1 int
---@return void
function Food:load(arg0, arg1) end
---Overrides:
---
---getCategory in class InventoryItem
---@public
---@return String
function Food:getCategory() end
---@public
---@param poisonPower int
---@return void
function Food:setPoisonPower(poisonPower) end
---@public
---@return boolean
function Food:isCookedInMicrowave() end
---@public
---@param replaceOnCooked List|String
---@return void
function Food:setReplaceOnCooked(replaceOnCooked) end
---@public
---@return int
function Food:getReduceFoodSickness() end
---Overrides:
---
---getScore in class InventoryItem
---@public
---@param desc SurvivorDesc
---@return float
function Food:getScore(desc) end
---@public
---@param arg0 boolean
---@return void
function Food:setFrozen(arg0) end
---@public
---@param arg0 float
---@return void
function Food:setProteins(arg0) end
---@public
---@return float
function Food:getRottenTime() end
---@public
---@param isSpice boolean
---@return void
function Food:setSpice(isSpice) end
---@public
---@return String
function Food:getCustomEatSound() end
---@public
---@return float
function Food:getFreezingTime() end
---@public
---@param poisonLevelForRecipe Integer
---@return void
function Food:setPoisonLevelForRecipe(poisonLevelForRecipe) end
---@public
---@param Heat float
---@return void
function Food:setHeat(Heat) end
---@public
---@param arg0 String
---@return void
function Food:setReplaceOnRotten(arg0) end
---@public
---@param arg0 float
---@return void
function Food:setRottenTime(arg0) end
---@public
---@return float
function Food:getCompostTime() end
|
-- Here are all the Xenoth's Stats
TUNING_XENOTH = {}
function TuneXenoth(overrides)
if overrides == nil then
overrides = {}
end
-- default day time
local seg_time = 30
local total_day_time = seg_time * 16
local calories_per_day = 75
TUNING_XENOTH =
{
XENOTH_MAX_HEALTH = 175,
XENOTH_MAX_HUNGER = 175,
XENOTH_MAX_SANITY = 140,
XENOTH_HUNGER_MULT = 1,
XENOTH_DAMAGE_MULT = 1,
XENOTH_SANITY_NUDE = .02,
XENOTH_SANITY_NIGHT_DRAIN_MULT = .75,
XENOTH_HUNGER_RATE = calories_per_day/total_day_time,
XENOTH_SANITY_DELTA_EATING_MEAT = -10,
XENOTH_SANITY_DELTA_HURTING_ANIMALS = -1,
XENOTH_SANITY_DELTA_KILLING_ANIMALS_PRIORITY_3 = -15,
XENOTH_SANITY_DELTA_KILLING_ANIMALS_PRIORITY_2 = -45,
XENOTH_SANITY_DELTA_KILLING_ANIMALS_PRIORITY_1 = -65,
XENOTH_SOUNDS_NAME = "willow",
-- Add/remove chest equipable items here that Xenoth can wear and still naked
XENOTH_BODY_ITEMS_NOT_DRESSING =
{
"Backpack",
"Life Giving Amulet",
"Chilled Amulet",
"Nightmare Amulet",
"Magiluminescence",
"The Lazy Forager",
"Construction Amulet",
},
-- Add/remove animals here that Xenoth wont hurt
XENOTH_ANIMALS_WONT_HURT_PRIORITY_3 =
{
"Bee",
"Pig Man",
"Koalefant",
"Tallbird",
--"Splumonkey",
"Slurtle",
"Beefalo",
"Domesticated Beefalo",
"Pengull",
"Bunnyman",
"Rabbit",
"Rock Lobster",
"Redbird",
"Crow",
"Snowbird",
"Chester",
"Gobbler",
"Snurtle",
"Butterfly",
"Mandrake",
"No-Eyed Deer",
"Catcoon",
"Moleworm",
"Volt Goat"
},
XENOTH_ANIMALS_WONT_HURT_PRIORITY_2 =
{
"Smallish Tallbird",
"Baby Beefalo",
"Smallbird",
},
XENOTH_ANIMALS_WONT_HURT_PRIORITY_1 =
{
"Glommer"
},
}
end
TuneXenoth()
|
local Signal = require 'lib.hump.signal'
local assets = require 'assets'
local level = (require 'gamestate._level')()
local love = love
local lg = love.graphics
local lgw, lgh
local pad = 100
local p = {}
function p:update (dt)
lgw = lg.getWidth()
lgh = lg.getHeight()
end
function p:draw()
lg.setColor(255,255,255)
lg.rectangle('fill', 0,0,lgw, lgh)
lg.setColor(0,0,0)
lg.setFont(assets.font.big)
lg.printf("Barrel", 0, 120, lgw, 'center')
lg.setFont(assets.font.comic)
lg.printf("Use right arrow to control the barrel.\nPress enter to continue.\nListen.", pad, 280, lgw-pad*2, 'center')
end
p.keypressed = level.enterToNextLevel
return p
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.