content stringlengths 5 1.05M |
|---|
local debug = {}
is_debug = true
function debug.drawFps()
if is_debug then
love.graphics.print("Current FPS: "..
tostring(love.timer.getFPS()),
10, 10)
love.graphics.reset()
end
end
function debug.drawXy(entity)
if is_debug then
love.graphics.print("X: "..
tostring(entity.x)..
"\n".."Y: "..
tostring(entity.y),
10, 25)
love.graphics.reset()
end
end
return debug
|
--[[
LuiExtended
License: The MIT License (MIT)
--]]
LUIE.Data.AbilityBlacklistPresets = {}
local BlacklistPresets = LUIE.Data.AbilityBlacklistPresets
-- Minor Buffs
BlacklistPresets.MinorBuffs = {
[61693] = true, -- Minor Resolve
[61697] = true, -- Minor Fortitude
[61704] = true, -- Minor Endurance
[61706] = true, -- Minor Intellect
[61685] = true, -- Minor Sorcery
[61691] = true, -- Minor Prophecy
[61662] = true, -- Minor Brutality
[61666] = true, -- Minor Savagery
[61744] = true, -- Minor Berserk
[61746] = true, -- Minor Force
[61549] = true, -- Minor Vitality
[61710] = true, -- Minor Mending
[61721] = true, -- Minor Protection
[61715] = true, -- Minor Evasion
[61735] = true, -- Minor Expedition
[61708] = true, -- Minor Heroism
[88490] = true, -- Minor Toughness
[147417] = true, -- Minor Courage
}
-- Major Buffs
BlacklistPresets.MajorBuffs = {
[61694] = true, -- Major Resolve
[61698] = true, -- Major Fortitude
[61705] = true, -- Major Endurance
[61707] = true, -- Major Intellect
[61687] = true, -- Major Sorcery
[61689] = true, -- Major Prophecy
[61665] = true, -- Major Brutality
[61667] = true, -- Major Savagery
[61745] = true, -- Major Berserk
[61747] = true, -- Major Force
[61713] = true, -- Major Vitality
[61711] = true, -- Major Mending
[61722] = true, -- Major Protection
[61716] = true, -- Major Evasion
[61736] = true, -- Major Expedition
[63569] = true, -- Major Gallop
[61709] = true, -- Major Heroism
[109966] = true, -- Major Courage
}
-- Minor Debuffs
BlacklistPresets.MinorDebuffs = {
[61742] = true, -- Minor Breach
[79717] = true, -- Minor Vulnerability
[61723] = true, -- Minor Maim
[61726] = true, -- Minor Defile
[88401] = true, -- Minor Magickasteal
[86304] = true, -- Minor Lifesteal
[79907] = true, -- Minor Enervation
[79895] = true, -- Minor Uncertainty
[79867] = true, -- Minor Cowardice
[61733] = true, -- Minor Mangle
[140699] = true, -- Minor Timidity
[145975] = true, -- Minor Brittle
}
-- Major Debuffs
BlacklistPresets.MajorDebuffs = {
[61743] = true, -- Major Breach
[106754] = true, -- Major Vulnerability
[61725] = true, -- Major Maim
[61727] = true, -- Major Defile
[147643] = true, -- Major Cowardice
--[145977] = true, -- Major Brittle
}
|
local drawableSpriteStruct = require("structs.drawable_sprite")
local lava = {}
lava.name = "MaxHelpingHand/SidewaysLava"
lava.depth = 0
lava.placements = {
name = "lava",
data = {
intro = false,
lavaMode = "LeftToRight",
speedMultiplier = 1.0
}
}
function lava.rotation(room, entity)
if entity.lavaMode == "LeftToRight" then
return math.pi / 2
elseif entity.lavaMode == "RightToLeft" then
return - math.pi / 2
else
return 0
end
end
function lava.texture(room, entity)
if entity.lavaMode == "Sandwich" then
return "@Internal@/lava_sandwich"
else
return "@Internal@/rising_lava"
end
end
return lava
|
--[[
TheNexusAvenger
Loads types on the client for Nexus Admin.
--]]
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local NexusAdminAPI = require(ReplicatedStorage:WaitForChild("NexusAdminClient"))
local NexusAdminTypes = ReplicatedStorage:WaitForChild("NexusAdminTypes")
--[[
Loads a type.
--]]
local function LoadType(Module)
if Module:IsA("ModuleScript") then
require(Module)(NexusAdminAPI)
end
end
--Load the types.
NexusAdminTypes.ChildAdded:Connect(LoadType)
for _,Module in pairs(NexusAdminTypes:GetChildren()) do
LoadType(Module)
end |
local DEBUG_PAUSING = CreateConVar("twg_debug_pausing", "0", bit.bor( FCVAR_SERVER_CAN_EXECUTE, FCVAR_NOTIFY, FCVAR_CHEAT, FCVAR_ARCHIVE ) )
local PAUSING_DISABLE = CreateConVar("twg_pausing_disable", "0", bit.bor( FCVAR_SERVER_CAN_EXECUTE, FCVAR_NOTIFY, FCVAR_CHEAT, FCVAR_ARCHIVE ) )
local DISABLE_SENSES_AND_STUFF = GetConVar( "twg_disable_senses_and_stuff" )
function ENT:FrozenPausingInit()
self.pausing = false
self.pausing_wants_to_stop = false
self.pausing_end = 0
end
function ENT:BeginPausing()
if DEBUG_PAUSING:GetBool() then
print( self, "BeginPausing" )
end
if PAUSING_DISABLE:GetBool() or DISABLE_SENSES_AND_STUFF:GetBool() or (not self.pausing_enabled) then return end
if not self.pausing then
if DEBUG_PAUSING:GetBool() then
print( self, "Pausing start." )
end
self.pausing = true
self.pausing_wants_to_stop = false
self.pausing_end = CurTime() + Lerp( math.pow( self.unstable_counter / Lerp(0.5, self.unstable_lower_hint_limit, self.unstable_upper_hint_limit), 2), Lerp( math.random(), 5, 10 ), Lerp(math.random(), 0.5, 1) )
elseif not self.pausing_wants_to_stop then
self.pausing_end = math.max( self.pausing_end, CurTime() + Lerp( self.unstable_percent, Lerp( math.random(), 2.5, 10 ), 0.0 ) )
end
end
function ENT:FrozenPausingUpdate()
if self.pausing then
if ( CurTime() >= self.pausing_end ) or self.is_unstable or PAUSING_DISABLE:GetBool() or DISABLE_SENSES_AND_STUFF:GetBool() or (not self.pausing_enabled) or
( self.have_target and ( ( CurTime() - self.target_last_seen > 5.0 and CurTime() - self.target_last_heard > 10.0 ) or ( isvector(self.target_last_known_position) and self.target_last_known_position:Distance( self:GetPos() ) > 1000 ) ) ) then
if self.frozen then
if DEBUG_PAUSING:GetBool() and not self.pausing_wants_to_stop then
print( self, "I want to unpause but I can't." )
self:IncrementInstability()
end
self.pausing_wants_to_stop = true
else
if DEBUG_PAUSING:GetBool() then
print( self, "Pausing end." )
end
self.pausing = false
self.pausing_wants_to_stop = false
end
end
end
end |
local spec_helpers = require "spec.helpers"
local conf_loader = require "kong.conf_loader"
local DATABASES = {"postgres", "cassandra"}
local function for_each_dao(fn)
for i = 1, #DATABASES do
local database_name = DATABASES[i]
local conf = assert(conf_loader(spec_helpers.test_conf_path, {
database = database_name
}))
fn(conf)
end
end
return {
for_each_dao = for_each_dao
}
|
require("scripts/util")
distanceMap = {
short = 0.85,
normal = 1.15,
medium = 1.85,
long = 2.15
}
MoarInserterEntityPrototypeTemplate = {
type = "inserter",
name = "TEMPLATE",
icon = "TEMPLATE",
flags = {"placeable-neutral", "placeable-player", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5},
max_health = 40,
corpse = "small-remnants",
resistances = {
{
type = "fire",
percent = 90
}
},
order = "TEMPLATE",
collision_box = {{-0.15, -0.15}, {0.15, 0.15}},
selection_box = {{-0.4, -0.35}, {0.4, 0.45}},
pickup_position = {0, -5},
insert_position = {0, 5},
energy_per_movement = 13337,
energy_per_rotation = 13337,
rotation_speed = 1337,
hand_size = 5,
energy_source = {
type = "electric",
usage_priority = "secondary-input",
drain = "0.4kW"
},
extension_speed = 1337,
fast_replaceable_group = "inserter",
--[[ working_sound = -- nah sorry, too lazy to create inserter sounds...
{
match_progress_to_activity = true,
sound =
{
{
filename = "__MoarInserters__/sound/inserter-long-handed-1.ogg",
volume = 0.75
},
{
filename = "__MoarInserters__/sound/inserter-long-handed-2.ogg",
volume = 0.75
},
{
filename = "__MoarInserters__/sound/inserter-long-handed-3.ogg",
volume = 0.75
},
{
filename = "__MoarInserters__/sound/inserter-long-handed-4.ogg",
volume = 0.75
},
{
filename = "__MoarInserters__/sound/inserter-long-handed-5.ogg",
volume = 0.75
}
}
}, ]]--
hand_base_picture = {
filename = "TEMPLATE",
priority = "extra-high",
width = 8,
height = 34
},
hand_closed_picture = {
filename = "TEMPLATE",
priority = "extra-high",
width = 18,
height = 41
},
hand_open_picture = {
filename = "TEMPLATE",
priority = "extra-high",
width = 18,
height = 41
},
hand_base_shadow = {
filename = "__MoarInserters__/graphics/entity/shadow/hand-base-shadow.png",
priority = "extra-high",
width = 8,
height = 34
},
hand_closed_shadow = {
filename = "__MoarInserters__/graphics/entity/shadow/hand-closed-shadow.png",
priority = "extra-high",
width = 18,
height = 41
},
hand_open_shadow = {
filename = "__MoarInserters__/graphics/entity/shadow/hand-open-shadow.png",
priority = "extra-high",
width = 18,
height = 41
},
platform_picture = {
priority = "extra-high",
width = 46,
height = 46,
sheet = "TEMPLATE"
}
}
function init(obj, typeArg, rangeArg, directionArg)
local baseName = typeArg .. "-" .. rangeArg .. "-MIinserter"
obj.name = baseName .. "-" .. directionArg
-- GRAPHICS
obj.icon = "__MoarInserters__/graphics/icons/" .. baseName .. ".png"
obj.hand_base_picture["filename"] = "__MoarInserters__/graphics/entity/hand/" .. rangeArg .. "-hand-base.png"
obj.hand_closed_picture["filename"] = "__MoarInserters__/graphics/entity/hand/" .. rangeArg .. "-hand-closed.png"
obj.hand_open_picture["filename"] = "__MoarInserters__/graphics/entity/hand/" .. rangeArg .. "-hand-open.png"
obj.platform_picture["sheet"] = "__MoarInserters__/graphics/entity/platform/" .. typeArg .. "-platform.png"
-- RANGE DEPENDENT
if rangeArg == "short" then
obj.pickup_position = {0, -1}
obj.hand_size = 0.9
elseif rangeArg == "normal" then
obj.pickup_position = {0, -1}
obj.hand_size = 1.1
elseif rangeArg == "medium" then
obj.pickup_position = {0, -2}
obj.hand_size = 1.4
elseif rangeArg == "long" then
obj.pickup_position = {0, -2}
obj.hand_size = 1.6
end
-- DIRECTION DEPENDENT
local distance = distanceMap[rangeArg]
if directionArg == "straight" then
obj.insert_position = {0, distance}
else
obj.subgroup = "moarinserters-" .. typeArg
obj.order = "b[moarinserters]-" .. getOrderCharacterRange(rangeArg) .. "[range]-" .. getOrderCharacterDirection(directionArg) .. "[direction]"
local xVal = string.find(directionArg, "right") and -distance or distance
if string.find(directionArg, "upper") then
obj.insert_position = {xVal, distance}
elseif string.find(directionArg, "lower") then
obj.insert_position = {xVal, -distance}
else
obj.insert_position = {xVal, 0}
end
end
-- TYPE DEPENDENT
if typeArg == "basic" then
obj.extension_speed = 0.028
obj.rotation_speed = 0.014
obj.energy_per_movement = 5000
obj.energy_per_rotation = 5000
elseif typeArg == "fast" then
obj.extension_speed = 0.07
obj.rotation_speed = 0.035
obj.energy_per_movement = 5000
obj.energy_per_rotation = 5000
elseif typeArg == "smart" then
obj.extension_speed = 0.07
obj.rotation_speed = 0.035
obj.energy_per_movement = 7000
obj.energy_per_rotation = 7000
obj.filter_count = 5
obj.programmable = true
elseif typeArg == "alien" then
obj.extension_speed = 0.14
obj.rotation_speed = 0.07
obj.energy_per_movement = 7000
obj.energy_per_rotation = 7000
obj.filter_count = 5
obj.programmable = true
end
end
function createEntityPrototype(typeArg, rangeArg, directionArg)
local copy = moarinserters_deepcopy(MoarInserterEntityPrototypeTemplate)
init(copy, typeArg, rangeArg, directionArg)
return copy
end
function initGolden(obj, xinput, yinput, xoutput, youtput, isNearSideOutput)
local baseName = "golden-MIinserter#" .. xinput .. "_".. yinput .. ":" .. xoutput .. "_" .. youtput .. (isNearSideOutput and "#near" or "#far")
obj.name = baseName
-- GRAPHICS
obj.icon = "__MoarInserters__/graphics/icons/golden-MIinserter.png"
obj.hand_base_picture["filename"] = "__MoarInserters__/graphics/entity/hand/golden-hand-base.png"
obj.hand_closed_picture["filename"] = "__MoarInserters__/graphics/entity/hand/golden-hand-closed.png"
obj.hand_open_picture["filename"] = "__MoarInserters__/graphics/entity/hand/golden-hand-open.png"
obj.platform_picture["sheet"] = "__MoarInserters__/graphics/entity/platform/golden-platform.png"
-- RANGE DEPENDENT
obj.pickup_position = {xinput, yinput}
obj.hand_size = 2
-- DIRECTION DEPENDENT
local outputAdder = isNearSideOutput and -0.15 or 0.15
obj.insert_position = {xoutput + outputAdder, youtput + outputAdder}
obj.subgroup = "moarinserters-golden"
obj.order = baseName
obj.extension_speed = 0.14
obj.rotation_speed = 0.07
obj.energy_per_movement = 7000
obj.energy_per_rotation = 7000
obj.filter_count = 5
obj.programmable = true
end
function createGoldenEntityPrototype(xinput, yinput, xoutput, youtput, isNearSideOutput)
local copy = moarinserters_deepcopy(MoarInserterEntityPrototypeTemplate)
initGolden(copy, xinput, yinput, xoutput, youtput, isNearSideOutput)
return copy
end |
--------------------------------------------------------------------------------
-- https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide
--------------------------------------------------------------------------------
local http = _G.http or require 'cherry.libs.http'
local ANALYTICS_URL = 'http://www.google-analytics.com/collect'
local params = nil
--------------------------------------------------------------------------------
local function init(trackingId, deviceId, gameName, gameVersion)
params = {
trackingId = trackingId,
clientId = deviceId,
gameName = gameName,
gameVersion = gameVersion
}
end
--------------------------------------------------------------------------------
local function screenview(page)
if (_G.SIMULATOR or App.ENV == 'development' or params == nil) then
return
end
local data = 'v=1'
data = data .. '&tid=' .. params.trackingId
data = data .. '&cid=' .. params.clientId
data = data .. '&t=' .. 'screenview'
data = data .. '&an=' .. params.gameName
data = data .. '&av=' .. params.gameVersion
data = data .. '&cd=' .. page
http.post(ANALYTICS_URL, data, nil, 'urlencoded')
end
--------------------------------------------------------------------------------
local function event(category, action, label)
if (_G.SIMULATOR or App.ENV == 'development' or params == nil) then
return
end
local data = 'v=1'
data = data .. '&tid=' .. params.trackingId
data = data .. '&cid=' .. params.clientId
data = data .. '&t=' .. 'event'
data = data .. '&an=' .. params.gameName
data = data .. '&av=' .. params.gameVersion
data = data .. '&ec=' .. category
data = data .. '&ea=' .. action
if (label) then
data = data .. '&el=' .. label
end
http.post(ANALYTICS_URL, data, nil, 'urlencoded')
end
--------------------------------------------------------------------------------
return {
init = init,
screenview = screenview,
event = event,
getParams = function()
return params
end
}
|
local http = require "http"
hive.register("/", function(req)
local resp = http.request "https://httpbin.org/get"
return {
status = resp.status,
result = resp.body:parse_json(),
}
end)
|
--[[
-- 作者:Steven
-- 日期:2017-02-26
-- 文件名:file_help.lua
-- 版权说明:南京正溯网络科技有限公司.版权所有©copy right.
-- 提供关于文件下相关的信息查询 包括获取文件的文件名,扩展名,文件路径,文件大小,文件md5编码,文件sha1编码等
--]]
local _M={};
-- _M.__index=_M;
function _M.getMD5( _file_ )
-- body
end
function _M.getSHA1( _file_ )
-- body
end
function _M.getSize( _file_ )
-- body
end
--获取文件名
function _M.getFileName(_file_)
local idx = _file_:match(".+()%.%w+$")
if(idx) then
return _file_:sub(1, idx-1)
else
return _file_
end
end
--获取扩展名
function _M.getExtension(_file_)
return _file_:match(".+%.(%w+)$")
end
--获取扩展名
function _M.getPath(str)
return string.match(str, "(.+)[/\\][^/^\\]*%.%w+$") --*nix system
--return string.match(str, “(.+)\\[^\\]*%.%w+$”) — windows
end
return _M |
-- Description:
local ConstantsStringsLocal = SE.Constants.Strings.Local
local StorageChestGUI = SE.Constants.Names.Gui.StorageChest
-- Constructs and returns the StorageNodeGUI object
return function(BaseGUI)
local StorageNodeGUI = {}
setmetatable(StorageNodeGUI, {__index = BaseGUI})
-- @See BaseGUI:OnShow
function StorageNodeGUI:OnShow(event)
local player = Player.load(event).get()
-- Get root
local root = player.gui[StorageChestGUI.FrameRoot]
-- Has frame?
local frame = root[StorageChestGUI.Name]
if (frame ~= nil) then
-- Already open
return false
end
-- Add the frame
frame = GuiElement.add(root, GuiFrame(StorageChestGUI.Name):caption(ConstantsStringsLocal.ChestSettings))
-- Add read only checkbox
GuiElement.add(frame, GuiCheckBox(StorageChestGUI.ReadOnlyCheckbox)
:caption(ConstantsStringsLocal.ChestMode):tooltip(ConstantsStringsLocal.ChestMode_Tooltip):state((self.Node.ReadOnlyMode == true)))
return true
end
-- @See BaseGUI:OnClose
function StorageNodeGUI:OnClose(playerIndex)
local player = Player.setByIndex(playerIndex).get()
local root = player.gui[StorageChestGUI.FrameRoot]
local frame = root[StorageChestGUI.Name]
if (frame ~= nil) then
frame.destroy()
end
end
-- @See BaseGUI:OnPlayerChangedCheckboxElement
function StorageNodeGUI:OnPlayerChangedCheckboxElement(event)
local chkBox = event.element
-- Ensure the frame is present, and the correct box was clicked
if (chkBox.name == StorageChestGUI.ReadOnlyCheckbox) then
if (chkBox.state) then
self.Node.ReadOnlyMode = true
else
-- Why nil? Micro-optimization.
-- Setting to false will cause the property to be serialized
-- Since false is the default mode, removing the property has the same effect
self.Node.ReadOnlyMode = nil
end
end
end
return StorageNodeGUI
end
|
local BuildSlideableBar = {}
BuildSlideableBar.ClassName = "SlideableBarBuilder"
function BuildSlideableBar:CreateBar()
local Frame = Instance.new("Frame")
Frame.AnchorPoint = Vector2.new(0, 0)
Frame.BackgroundColor3 = Color3.fromRGB(250, 250, 250)
Frame.BorderSizePixel = 0
Frame.Size = UDim2.new(.5, 0, 1, 0)
Frame.Position = UDim2.new(0, 0, 0, 0)
Frame.Name = "SliderBar"
return Frame
end
function BuildSlideableBar:CreateSlideableBarTemplate()
local Frame = Instance.new("Frame")
Frame.AnchorPoint = Vector2.new(0, .5)
Frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
Frame.BorderSizePixel = 0
Frame.Name = "Background"
local Bar = self:CreateBar()
Bar.Parent = Frame
local TextLabel = Instance.new("TextLabel")
TextLabel.AnchorPoint = Vector2.new(.5, 0)
TextLabel.Position = UDim2.fromScale(.5, 0)
TextLabel.BackgroundTransparency = 1
TextLabel.Size = UDim2.new(1, 0, 1, 0)
TextLabel.TextScaled = true
TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
TextLabel.TextStrokeTransparency = 0
TextLabel.Font = Enum.Font.Oswald
TextLabel.Text = "0%"
TextLabel.Name = "BarLabel"
TextLabel.Parent = Frame
Instance.new("UIGradient").Parent = TextLabel -- parent parameter isnt slow so long as u arent settings properties
local TextSizeConstraint = Instance.new("UITextSizeConstraint")
TextSizeConstraint.MaxTextSize = 30
TextSizeConstraint.Parent = TextLabel
return Frame
end
return BuildSlideableBar |
local util = {}
local os_name = vim.loop.os_uname().sysname
local is_windows = os_name == "Windows" or os_name == "Windows_NT"
-- Check whether current buffer contains main function
local function has_main()
local output = vim.api.nvim_exec("grep func\\ main\\(\\) %", true)
local matchCount = vim.split(output, "\n")
return #matchCount > 3
end
function util.sep()
if is_windows then
return "\\"
end
return "/"
end
local function get_path_sep()
if is_windows then
return ";"
end
return ":"
end
local function strip_path_sep(path)
local l = path[#path]
util.log(l, util.sep(), path:sub(1, #path - 1))
if l == util.sep() then
return path:sub(1, #path - 1)
end
return path
end
function util.root_dirs()
local dirs = {}
local root = vim.fn.systemlist({ _GO_NVIM_CFG.go, "env", "GOROOT" })
table.insert(dirs, root[1])
local paths = vim.fn.systemlist({ _GO_NVIM_CFG.go, "env", "GOPATH" })
local sp = get_path_sep()
paths = vim.split(paths[1], sp)
for _, p in pairs(paths) do
p = vim.fn.substitute(p, "\\\\", "/", "g")
table.insert(dirs, p)
end
return dirs
end
function util.go_packages(dirs, arglead)
util.log(debug.traceback())
local pkgs = {}
for _, dir in pairs(dirs) do
util.log(dir)
local scr_root = vim.fn.expand(dir .. util.sep() .. "src" .. util.sep())
util.log(scr_root, arglead)
local roots = vim.fn.globpath(scr_root, arglead .. "*", 0, 1)
if roots == { "" } then
roots = {}
end
util.log(roots)
for _, pkg in pairs(roots) do
util.log(pkg)
if vim.fn.isdirectory(pkg) then
pkg = pkg .. util.sep()
table.insert(pkgs, pkg)
elseif not pkg:match([[%.a$]]) then
-- without this the result can have duplicates in form of
-- 'encoding/json' and '/encoding/json/'
pkg = strip_path_sep(pkg)
-- remove the scr root and keep the package in tact
pkg = vim.fn.substitute(pkg, scr_root, "", "")
table.insert(pkgs, pkg)
end
end
end
util.log(pkgs)
return pkgs
end
-- function! s:interface_list(pkg) abort
-- let [contents, err] = go#util#Exec(['go', 'doc', a:pkg])
-- if err
-- return []
-- endif
--
-- let contents = split(contents, "\n")
-- call filter(contents, 'v:val =~# ''^type\s\+\h\w*\s\+interface''')
-- return map(contents, 'a:pkg . "." . matchstr(v:val, ''^type\s\+\zs\h\w*\ze\s\+interface'')')
-- endfunction
function util.interface_list(pkg)
local p = vim.fn.systemlist({ _GO_NVIM_CFG.go, "doc", pkg })
util.log(p)
local ifaces = {}
if p then
contents = p -- vim.split(p[1], "\n")
for _, content in pairs(contents) do
util.log(content)
if content:find("interface") then
local iface_name = vim.fn.matchstr(content, [[^type\s\+\zs\h\w*\ze\s\+interface]])
if iface_name ~= "" then
table.insert(ifaces, pkg .. iface_name)
end
end
end
end
util.log(ifaces)
return ifaces
end
local function smartrun()
local cmd
if has_main() then
-- Found main function in current buffer
cmd = string.format("lcd %:p:h | :set makeprg=%s\\ run\\ . | :make | :lcd -", _GO_NVIM_CFG.go)
vim.cmd(cmd)
else
cmd = string.format("setl makeprg=%s\\ run\\ . | :make", _GO_NVIM_CFG.go)
vim.cmd(cmd)
end
end
local function smartbuild()
local cmd
if has_main() then
-- Found main function in current buffer
cmd = string.format("lcd %:p:h | :set makeprg=%s\\ build\\ . | :make | :lcd -", _GO_NVIM_CFG.go)
vim.cmd(cmd)
else
cmd = string.format("setl makeprg=%s\\ build\\ . | :make", _GO_NVIM_CFG.go)
vim.cmd(cmd)
end
end
util.check_same = function(tbl1, tbl2)
if #tbl1 ~= #tbl2 then
return false
end
for k, v in ipairs(tbl1) do
if v ~= tbl2[k] then
return false
end
end
return true
end
util.map = function(modes, key, result, options)
options = util.merge({ noremap = true, silent = false, expr = false, nowait = false }, options or {})
local buffer = options.buffer
options.buffer = nil
if type(modes) ~= "table" then
modes = { modes }
end
for i = 1, #modes do
if buffer then
vim.api.nvim_buf_set_keymap(0, modes[i], key, result, options)
else
vim.api.nvim_set_keymap(modes[i], key, result, options)
end
end
end
util.copy_array = function(from, to)
for i = 1, #from do
to[i] = from[i]
end
end
util.deepcopy = function(orig)
local orig_type = type(orig)
local copy
if orig_type == "table" then
copy = {}
for orig_key, orig_value in next, orig, nil do
copy[util.deepcopy(orig_key)] = util.deepcopy(orig_value)
end
setmetatable(copy, util.deepcopy(getmetatable(orig)))
else -- number, string, boolean, etc
copy = orig
end
return copy
end
util.handle_job_data = function(data)
if not data then
return nil
end
-- Because the nvim.stdout's data will have an extra empty line at end on some OS (e.g. maxOS), we should remove it.
for i = 1, 3, 1 do
if data[#data] == "" then
table.remove(data, #data)
end
end
if #data < 1 then
return nil
end
return data
end
local cache_dir = vim.fn.stdpath("cache")
util.log = function(...)
if not _GO_NVIM_CFG then
return
end
if not _GO_NVIM_CFG.verbose then
return
end
local arg = { ... }
local log_default = string.format("%s%sgonvim.log", cache_dir, util.sep())
local log_path = _GO_NVIM_CFG.log_path or log_default
local str = " "
local info = debug.getinfo(2, "Sl")
str = str .. info.short_src .. ":" .. info.currentline
for i, v in ipairs(arg) do
if type(v) == "table" then
str = str .. " |" .. tostring(i) .. ": " .. vim.inspect(v) .. "\n"
else
str = str .. " |" .. tostring(i) .. ": " .. tostring(v)
end
end
if #str > 2 then
if log_path ~= nil and #log_path > 3 then
local f, err = io.open(log_path, "a+")
if err then
vim.notify("failed to open log" .. log_path .. err, vim.lsp.log_levels.ERROR)
return
end
if not f then
error("open file " .. log_path, f)
end
io.output(f)
io.write(str .. "\n")
io.close(f)
else
vim.notify(str .. "\n", vim.lsp.log_levels.DEBUG)
end
end
end
local rhs_options = {}
function rhs_options:new()
local instance = {
cmd = "",
options = { noremap = false, silent = false, expr = false, nowait = false },
}
setmetatable(instance, self)
self.__index = self
return instance
end
function rhs_options:map_cmd(cmd_string)
self.cmd = cmd_string
return self
end
function rhs_options:map_cr(cmd_string)
self.cmd = (":%s<CR>"):format(cmd_string)
return self
end
function rhs_options:map_args(cmd_string)
self.cmd = (":%s<Space>"):format(cmd_string)
return self
end
function rhs_options:map_cu(cmd_string)
self.cmd = (":<C-u>%s<CR>"):format(cmd_string)
return self
end
function rhs_options:with_silent()
self.options.silent = true
return self
end
function rhs_options:with_noremap()
self.options.noremap = true
return self
end
function rhs_options:with_expr()
self.options.expr = true
return self
end
function rhs_options:with_nowait()
self.options.nowait = true
return self
end
function util.map_cr(cmd_string)
local ro = rhs_options:new()
return ro:map_cr(cmd_string)
end
function util.map_cmd(cmd_string)
local ro = rhs_options:new()
return ro:map_cmd(cmd_string)
end
function util.map_cu(cmd_string)
local ro = rhs_options:new()
return ro:map_cu(cmd_string)
end
function util.map_args(cmd_string)
local ro = rhs_options:new()
return ro:map_args(cmd_string)
end
function util.nvim_load_mapping(mapping)
for key, value in pairs(mapping) do
local mode, keymap = key:match("([^|]*)|?(.*)")
if type(value) == "table" then
local rhs = value.cmd
local options = value.options
vim.api.nvim_set_keymap(mode, keymap, rhs, options)
end
end
end
function util.load_plugin(name, modulename)
assert(name ~= nil, "plugin should not empty")
modulename = modulename or name
local has, plugin = pcall(require, modulename)
if has then
return plugin
end
if packer_plugins ~= nil then
-- packer installed
local loader = require("packer").loader
if not packer_plugins[name] or not packer_plugins[name].loaded then
util.log("packer loader " .. name)
vim.cmd("packadd " .. name) -- load with default
if packer_plugins[name] ~= nil then
loader(name)
end
end
else
util.log("packadd " .. name)
vim.cmd("packadd " .. name) -- load with default
end
has, plugin = pcall(require, modulename)
if not has then
util.info("plugin " .. name .. " not loaded ")
return nil
end
return plugin
end
-- deprecated
-- function util.check_capabilities(feature, client_id)
-- local clients = vim.lsp.buf_get_clients(client_id or 0)
--
-- local supported_client = false
-- for _, client in pairs(clients) do
-- -- util.log(client.resolved_capabilities)
-- util.log(client.server_capabilities)
-- supported_client = client.resolved_capabilities[feature]
-- supported_client = client.resolved_capabilities[feature]
-- if supported_client then
-- break
-- end
-- end
--
-- if supported_client then
-- return true
-- else
-- if #clients == 0 then
-- util.log("LSP: no client attached")
-- else
-- util.log("LSP: server does not support " .. feature)
-- end
-- return false
-- end
-- end
function util.relative_to_cwd(name)
local rel = vim.fn.isdirectory(name) == 0 and vim.fn.fnamemodify(name, ":h:.") or vim.fn.fnamemodify(name, ":.")
if rel == "." then
return "."
else
return "." .. util.sep() .. rel
end
end
function util.all_pkgs()
return "." .. util.sep() .. "..."
end
-- log and messages
function util.warn(msg)
vim.notify("WARN: " .. msg, vim.lsp.log_levels.WARN)
end
function util.error(msg)
vim.notify("ERR: " .. msg, vim.lsp.log_levels.ERROR)
end
function util.info(msg)
vim.notify("INF: " .. msg, vim.lsp.log_levels.INFO)
end
function util.rel_path()
local fpath = vim.fn.expand("%:p:h")
local workfolders = vim.lsp.buf.list_workspace_folders()
if workfolders ~= nil and next(workfolders) then
fpath = "." .. fpath:sub(#workfolders[1] + 1)
end
return fpath
end
function util.rtrim(s)
local n = #s
while n > 0 and s:find("^%s", n) do
n = n - 1
end
return s:sub(1, n)
end
function util.ltrim(s)
return (s:gsub("^%s*", ""))
end
function util.file_exists(name)
local f = io.open(name, "r")
if f ~= nil then
io.close(f)
return true
else
return false
end
end
function util.work_path()
local fpath = vim.fn.expand("%:p:h")
local workfolders = vim.lsp.buf.list_workspace_folders()
if #workfolders == 1 then
return workfolders[1]
end
for _, value in pairs(workfolders) do
local mod = value .. util.sep() .. "go.mod"
if util.file_exists(mod) then
return value
end
end
return workfolders[1] or fpath
end
function util.empty(t)
if t == nil then
return true
end
return next(t) == nil
end
local open = io.open
function util.read_file(path)
local file = open(path, "rb") -- r read mode and b binary mode
if not file then
return nil
end
local content = file:read("*a") -- *a or *all reads the whole file
file:close()
return content
end
function util.restart(cmd_args)
local lsp = require("lspconfig")
local configs = require("lspconfig.configs")
for _, client in ipairs(lsp.util.get_clients_from_cmd_args(cmd_args)) do
if client.name == "gopls" then
util.log("client to stop: " .. client.name)
client.stop()
vim.defer_fn(function()
configs[client.name].launch()
util.log("client to launch: " .. client.name)
end, 500)
end
end
end
util.deletedir = function(dir)
local lfs = require("lfs")
for file in lfs.dir(dir) do
local file_path = dir .. "/" .. file
if file ~= "." and file ~= ".." then
if lfs.attributes(file_path, "mode") == "file" then
os.remove(file_path)
print("remove file", file_path)
elseif lfs.attributes(file_path, "mode") == "directory" then
print("dir", file_path)
util.deletedir(file_path)
end
end
end
lfs.rmdir(dir)
util.log("remove dir", dir)
end
function util.file_exists(file)
local f = io.open(file, "rb")
if f then f:close() end
return f ~= nil
end
-- get all lines from a file, returns an empty
-- list/table if the file does not exist
function util.lines_from(file)
if not util.file_exists(file) then return {} end
local lines = {}
for line in io.lines(file) do
lines[#lines + 1] = line
end
return lines
end
function util.set_env(key, val)
end
function util.list_directory()
local fn = vim.fn
local dirs = fn.map(fn.glob(fn.fnameescape('./')..'/{,.}*/', 1, 1), 'fnamemodify(v:val, ":h:t")')
end
function util.set_nulls()
if _GO_NVIM_CFG.null_ls_document_formatting_disable then
local query = {}
if type( _GO_NVIM_CFG.null_ls_document_formatting_disable) ~= 'boolean'
then
query = _GO_NVIM_CFG.null_ls_document_formatting_disable
end
local ok, nulls = pcall(require, "null-ls")
if ok then
nulls.disable(query)
end
end
end
return util
|
require("pixel")
GLUP.ArcadeStyle()
joueurx=13
joueury=10
vx=0
vy=0
newvx=0
newvy=0
lasttime=0
lastfantomtime=0
gumtime=0
gummode=false
eatentime=0
eatenmode=false
frozen=true
gameover=false
fantomx=13
fantomy=15
fantomvx=0
fantomvy=1
score=0
level=1
lives=3
niveau = {
"*************************",
"*...........*...........*",
"*.****.****.*.****.****.*",
"*O* *.* *.*.* *.* *O*",
"*.****.****.*.****.****.*",
"*.......................*",
"*.****.*.*******.*.****.*",
"*......*....*....*......*",
"******.**** * ****.******",
" *.* *.* ",
"******.* ******* *.******",
" . * * . ",
"******.* * * *.******",
" *.* ******* *.* ",
" *.* *.* ",
"******.* ******* *.******",
"*...........*...........*",
"*.****.****.*.****.****.*",
"*O...*.............*...O*",
"****.*.*.*******.*.*.****",
"*......*....*....*......*",
"*.*********.*.*********.*",
"*.......................*",
"*************************"
}
niveauH=#niveau
niveauL=#niveau[1]
function youwin()
niveau = {
"O.O.O.O.O.O.O.O.O.O.O.O.O",
". .",
"O * * *** * * O",
". * * * * * * .",
"O * * * * * * O",
". * * * * * * .",
"O * * * * * O",
". * * * * * .",
"O * * * * * O",
". * *** ** .",
"O O",
". .",
"O O",
". * * * *** ** * .",
"O * * * * * * * O",
". * * * * * * * .",
"O * * * * * * * O",
". * * * * * * * .",
"O * * * * * * * O",
". * * * * * * * .",
"O *** *** * ** O",
". .",
"O.O.O.O.O.O.O.O.O.O.O.O.O"
}
niveauH=#niveau
niveauL=#niveau[1]
gameover=true
end
function youlose()
niveau = {
"O.O.O.O.O.O.O.O.O.O.O.O.O",
". .",
"O ********* O",
". * ... ... * .",
"O * O O * O",
". * * .",
"O * . . * O",
". * ....... * .",
"O * * O",
". * ** ** ** * .",
"O ** ** ** *** O",
". .",
"O O",
". **** *** *** .",
"O * * * * * * O",
". * * * * * * .",
"O **** * * * * O",
". * * * * * * .",
"O * * * * * * O",
". * * * * * * .",
"O **** *** *** O",
". .",
"O.O.O.O.O.O.O.O.O.O.O.O.O"
}
niveauH=#niveau
niveauL=#niveau[1]
gameover=true
end
function getniveau(x,y)
return niveau[#niveau-y+1]:sub(x,x)
end
function setniveau(x,y,c)
local s = niveau[#niveau-y+1]
s = s:sub(1,x-1) .. c .. s:sub(x+1)
niveau[#niveau-y+1] = s
end
function nbballs()
local result = 0
for y=1,niveauH,1 do
for x=1,niveauL,1 do
if getniveau(x,y) == "." then
result = result + 1
end
end
end
return result
end
niveauBalls = nbballs()
function terrain()
pixBegin()
col("blue")
for y=1,niveauH,1 do
for x=1,niveauL,1 do
if getniveau(x,y) == "*" then
pix(x,y)
end
end
end
pixEnd()
GLUP.SetColor(GLUP.FRONT_COLOR,"white")
local Rgum = ((GLUP.ElapsedTime()*5)%2)*0.2+0.1
GLUP.Begin(GLUP.SPHERES)
for y=1,niveauH,1 do
for x=1,niveauL,1 do
local c = getniveau(x,y)
if c == "." then
GLUP.Vertex(x+0.5,y+0.5,0.5,0.2)
elseif c == "O" then
GLUP.Vertex(x+0.5,y+0.5,0.5,Rgum)
end
end
end
GLUP.End()
end
function GLUP.init_graphics()
GLUP.SetRegionOfInterest(1,1,1,niveauH,niveauH,1)
end
function imgui.on_key_pressed(key)
frozen = false
if key == "left" then
newvx=-1
newvy=0
elseif key == "right" then
newvx=1
newvy=0
elseif key == "up" then
newvx=0
newvy=1
elseif key == "down" then
newvx=0
newvy=-1
end
end
function dessinjoueur(x,y,vx,vy)
GLUP.Enable(GLUP.VERTEX_COLORS)
GLUP.Begin(GLUP.SPHERES)
col("yellow")
GLUP.Vertex(x+0.5, y+0.5, 0.5, 0.5)
col("white")
GLUP.Vertex(x+0.35+0.25*vx, y+0.5+0.25*vy, 1.0, 0.15)
GLUP.Vertex(x+0.65+0.25*vx, y+0.5+0.25*vy, 1.0, 0.15)
col("black")
GLUP.Vertex(x+0.35+0.27*vx, y+0.5+0.27*vy, 1.1, 0.1)
GLUP.Vertex(x+0.65+0.27*vx, y+0.5+0.27*vy, 1.1, 0.1)
GLUP.End()
GLUP.Disable(GLUP.VERTEX_COLORS)
end
function dessinfantome(x,y,vx,vy,c)
GLUP.Enable(GLUP.VERTEX_COLORS)
GLUP.Begin(GLUP.SPHERES)
if not eatenmode then
if gummode then
col("blue")
else
col(c)
end
GLUP.Vertex(x+0.5, y+0.5, 0.5, 0.5)
for xx=x+0.2,x+0.8,0.3 do
GLUP.Vertex(xx,y+0.1,0.5,0.3)
end
end
col("white")
GLUP.Vertex(x+0.35+0.3*vx, y+0.5+0.3*vy, 1.0, 0.15)
GLUP.Vertex(x+0.65+0.3*vx, y+0.5+0.3*vy, 1.0, 0.15)
if eatenmode or not gummode then
col("black")
GLUP.Vertex(x+0.35+0.32*vx, y+0.5+0.32*vy, 1.1, 0.1)
GLUP.Vertex(x+0.65+0.32*vx, y+0.5+0.32*vy, 1.1, 0.1)
end
GLUP.End()
GLUP.Disable(GLUP.VERTEX_COLORS)
end
function killed()
frozen=true
joueurx=13
joueury=10
vx=0
vy=0
newvx=0
newvy=0
lasttime=0
lastfantomtime=0
gumtime=0
gummode=false
eatentime=0
eatenmode=false
fantomx=13
fantomy=15
fantomvx=0
fantomvy=1
lives = lives - 1
if lives == 0 then
youlose()
end
end
function collision(time)
if joueurx == fantomx and joueury == fantomy then
if gummode then
score = score + 100
eatenmode = true
eatentime = time
elseif not eatenmode then
killed()
end
end
end
function joueur()
local time = GLUP.ElapsedTime()
if gummode then
if (time - gumtime) > 5 then
gummode = false
end
end
if not frozen and time-lasttime > 0.075 then
lasttime = time
local newx,newy
newx = joueurx+newvx
newy = joueury+newvy
if newx < 1 then
newx = niveauL
elseif newx > niveauL then
newx = 1
end
if newy < 1 then
newy = niveauH
elseif newy > niveauH then
newy = 1
end
local c = getniveau(newx,newy)
if c == " " or c == "." or c == "O" then
joueurx = newx
joueury = newy
vx = newvx
vy = newvy
else
newx = joueurx + vx
newy = joueury + vy
c = getniveau(newx,newy)
if c == " " or c == "." or c == "O" then
joueurx = newx
joueury = newy
end
end
if c == "O" then
gumtime = time
gummode = true
fantomvx = -fantomvx
fantomvy = -fantomvy
elseif c == "." then
score = score + 10
niveauBalls = niveauBalls - 1
if niveauBalls == 0 then
youwin()
end
end
setniveau(joueurx, joueury, " ")
end
collision(time)
dessinjoueur(joueurx,joueury,vx,vy)
end
function fantome()
local time = GLUP.ElapsedTime()
local delay = 0.1
if gummode then
delay = 0.2
end
if eatenmode and (time - eatentime) > 5 then
eatenmode = false
end
if not frozen and time-lastfantomtime > delay then
lastfantomtime = time
while getniveau(fantomx + fantomvx, fantomy + fantomvy) ~= " " do
local v = math.random(1,4)
if v == 1 then
fantomvx = -1
fantomvy = 0
elseif v == 2 then
fantomvx = 1
fantomvy = 0
elseif v == 3 then
fantomvx = 0
fantomvy = -1
elseif v == 4 then
fantomvx = 0
fantomvy = 1
end
end
fantomx = fantomx + fantomvx
fantomy = fantomy + fantomvy
end
collision(time)
dessinfantome(fantomx,fantomy,fantomvx,fantomvy,"pink")
end
function GLUP.draw_scene()
GLUP.Enable(GLUP.DRAW_MESH)
GLUP.SetColor(GLUP.MESH_COLOR, 0,0,0.5)
GLUP.SetMeshWidth(2)
terrain()
if not gameover then
joueur()
fantome()
end
end
function imgui.draw_object_properties()
imgui.Text("Level: " .. level)
imgui.Text("Score: " .. score)
imgui.Text("Lives: " .. lives)
end
|
log('Got IP: ', wifi.sta.getip())
foreach(file.list(), function(filename, size)
local suf_start, suf_end = filename:find('.lua', 1, true)
if suf_end ~= filename:len() then
return
end
local pref_start, pref_end = filename:find('sensor_', 1, true)
if pref_start == 1 then
log('dofile sensor ' .. filename)
dofile(filename)
end
local pref_start, pref_end = filename:find('provider_', 1, true)
if pref_start == 1 then
log('dofile provider ' .. filename)
dofile(filename)
end
end)
if not sensor_get_data then
log('no sensor module loaded')
return
end
if not provider_submit_data then
log('no provider module loaded')
return
end
function main_next_call(resp)
log('scheduling next call')
if cfg.debug then
log('free ram', node.heap())
end
tmr.alarm(0, cfg.submit_interval or 15000, 1, main)
end
function main_got_data(data)
if not data then
log('no data received')
main_next_call()
return
end
log('got data')
foreach(data, function(k, v)
foreach(v, function(k1, v1)
print(k, k1, v1)
end)
end)
provider_submit_data(data, main_next_call)
end
function main()
sensor_get_data(main_got_data)
end
sntp.sync(nil, function(sec, usec, server, info)
log('time sync successful, ts=', sec, 'us=', usec, 'server=', server, 'stratum=', info.stratum)
main()
end, function(code, err)
log('time sync error, code=', code, 'error=', err)
log('operation without correct time is not possible, stopping program')
end)
|
---
-- Option or "radio" button.
--
-- Radio buttons are like check buttons, but only one in a group may be
-- selected at any one time. They are grouped first by parent, and sub-grouped
-- by their `group` value. When one is "checked", all others with the same
-- parent *and* group are unchecked. Groups are checked for equality using the
-- `rawequal` function.
--
-- **Extends:** `kloveui.Check`
--
-- @classmod kloveui.Option
local graphics = love.graphics
local Check = require "kloveui.Check"
local Option = Check:extend("kloveui.Option")
---
-- Group of this option.
--
-- @tfield any group Default is the empty string.
Option.group = ""
function Option:paintcheck(value, x, y, size)
size = size/2
x, y = x+size, y+size
graphics.circle("line", x, y, size)
if value then
graphics.circle("fill", x, y, size-3)
end
end
function Option:activated()
local p = self.weakrefs.parent
for wid in p:children() do
if rawequal(wid.group, self.group) then
wid.value = false
end
end
self.value = true
end
return Option
|
--Round to natural number
function round(n)
return n % 1 >= 0.5 and math.ceil(n) or math.floor(n)
end
--Main program
--
local MU = level(HPLevelType.kMaximumThetaE,0)
local HL = level(HPLevelType.kHeightLayer,500,0)
local HG = level(HPLevelType.kHeight,0)
EL500 = luatool:FetchWithType(current_time, HL, param("EL-LAST-HPA"), current_forecast_type)
LCL500 = luatool:FetchWithType(current_time, HL, param("LCL-HPA"), current_forecast_type)
LFC500 = luatool:FetchWithType(current_time, HL, param("LFC-HPA"), current_forecast_type)
CAPE500 = luatool:FetchWithType(current_time, HL, param("CAPE-JKG"), current_forecast_type)
CIN500 = luatool:FetchWithType(current_time, HL, param("CIN-JKG"), current_forecast_type)
LCLmu = luatool:FetchWithType(current_time, MU, param("LCL-HPA"), current_forecast_type)
LFCmu = luatool:FetchWithType(current_time, MU, param("LFC-HPA"), current_forecast_type)
ELmu = luatool:FetchWithType(current_time, MU, param("EL-LAST-HPA"), current_forecast_type)
CINmu = luatool:FetchWithType(current_time, MU, param("CIN-JKG"), current_forecast_type)
CAPEmu = luatool:FetchWithType(current_time, MU, param("CAPE-JKG"), current_forecast_type)
Ttop = luatool:FetchWithType(current_time, HL, param("EL-K"), current_forecast_type)
Tbase = luatool:FetchWithType(current_time, HL, param("LCL-K"), current_forecast_type)
TtopMU = luatool:FetchWithType(current_time, MU, param("EL-K"), current_forecast_type)
--LFC probably better than LCL for elev conv. base
TbaseMU = luatool:FetchWithType(current_time, MU, param("LFC-K"), current_forecast_type)
NL = luatool:FetchWithType(current_time, HG, param("NL-PRCNT"), current_forecast_type)
NM = luatool:FetchWithType(current_time, HG, param("NM-PRCNT"), current_forecast_type)
if not NL then
NL = luatool:FetchWithType(current_time, HG, param("NL-0TO1"), current_forecast_type)
end
if not NM then
NM = luatool:FetchWithType(current_time, HG, param("NM-0TO1"), current_forecast_type)
end
RR = luatool:FetchWithType(current_time, HG, param("RRR-KGM2"), current_forecast_type)
CBlimit = 12 --required vertical thickness [degrees C] to consider a CB (tweak this..!)
TCUlimit = 9 --required vertical thickness [degrees C] to consider a TCU (tweak this..!)
CBtopLim = 263.15 --required top T [K] to consider a CB (tweakable!)
CINlimTCU = -1 --CIN limit for TCu
--Max height [FL] to check for top
TopLim = 650
--Denominator to calculate overshooting top based on CAPE, +1000ft/350J/kg (tweak this!)
overshoot = 35
local i = 0
local res = {}
local Missing = missing
for i=1, #EL500 do
res[i] = Missing
--TCU
if ((Tbase[i]-Ttop[i]>TCUlimit) and (NL[i]>0) and (CIN500[i]>CINlimTCU)) then
res[i] = FlightLevel_(EL500[i]*100)
--Limit top value
if (res[i] <= TopLim) then
--Add for overshooting top based on CAPE, +1000ft/350J/kg (tweak this!)
res[i] = -(res[i] + CAPE500[i]/overshoot)
else
--Add for overshooting top based on CAPE, +1000ft/350J/kg (tweak this!)
res[i] = Missing
end
end
--CB
if ((Ttop[i]<CBtopLim) and (Tbase[i]-Ttop[i]>CBlimit) and (RR[i]>0)) then
res[i] = FlightLevel_(EL500[i]*100)
--Limit top value
if (res[i] <= TopLim) then
--Add for overshooting top based on CAPE, +1000ft/350J/kg (tweak this!)
res[i] = res[i] + CAPE500[i]/overshoot
else
res[i] = Missing
end
end
--If no TOP from above, check also with MU values, for elev. conv. only from blw 3,5km
if ( IsMissing(res[i]) and (LFCmu[i]<LCL500[i]) and (LFCmu[i]>650)) then
-- TCU
if ((TbaseMU[i]-TtopMU[i]>TCUlimit) and ((NL[i]>0) or (NM[i]>0)) and (CINmu[i]>CINlimTCU)) then
res[i] = FlightLevel_(ELmu[i]*100)
--Limit top value
if (res[i] <= TopLim) then
--Add for overshooting top based on CAPE, +1000ft/350J/kg (tweak this!)
res[i] = -(res[i] + CAPEmu[i]/overshoot)
else
res[i] = Missing
end
end
--CB
if ((TtopMU[i]<CBtopLim) and (TbaseMU[i]-TtopMU[i]>CBlimit) and (RR[i]>0)) then
res[i] = FlightLevel_(ELmu[i]*100)
--Limit top value
if (res[i] <= TopLim) then
--Add for overshooting top based on CAPE, +1000ft/350J/kg (tweak this!)
res[i] = res[i] + CAPEmu[i]/overshoot
else
res[i] = Missing
end
end
end
res[i] = round(res[i]/10)*10;
end
p = param("CBTCU-FL")
result:SetValues(res)
result:SetParam(p)
luatool:WriteToFile(result)
|
ardour {
["type"] = "EditorAction",
name = "Rubberband AutoTune",
license = "MIT",
author = "David Healey",
description = [[Automatically adds automation data for a pitch shifter plugin to create an auto-tune effect.]]
}
function factory () return function ()
local sel = Editor:get_selection ()
local rl = sel.regions:regionlist ()
local sr = Session:nominal_sample_rate ()
local vamp = ARDOUR.LuaAPI.Vamp("libardourvamppyin:pyin", sr)
vamp:plugin():setParameter ("lowampsuppression", 0.0) -- Don't supress low amplitude estimates
local automationIndex = 1
local useSemiTones = false
-- prepare undo operation
local add_undo = false -- keep track if something has changed
Session:begin_reversible_command ("Rubberband AutoTune")
-- get first track
local route = Session:get_remote_nth_route(0)
assert (not route:isnil (), "Invalid first track")
--Look for the plugin in the first 5 plugin slots
local plugin
for i = 0, 6, 1 do
plugin = route:nth_plugin(i):to_insert();
if plugin and plugin:isnil() == false then
local name = plugin:display_name()
if name == "Rubberband (Mono)" or name == "Rubber Band Mono Pitch Shifter" then
break
else
plugin = nil
end
end
end
assert(plugin, "Plugin not found")
--FUNCTIONS--
function freqToCentsOffset(f)
local lnote = (math.log(f) - math.log(440)) / math.log(2) + 4.0
local oct = math.floor(lnote)
local cents = 1200 * (lnote - oct)
local noteNames = {"A", "A#", "B", "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#"}
local note = ""
local offset = 50.0
if cents < 50 then
note = "A "
elseif cents >= 1150 then
note = "A "
cents = cents - 1200
oct = oct + 1;
else
for i = 1, 11, 1 do
if cents >= offset and cents < offset + 100 then
note = noteNames[i+1]
cents = cents - (i * 100)
break
end
offset = offset + 100
end
end
--print(f, " - ", note .. oct) -- helpful when debugging
if useSemiTones == true then
return cents / 100
else
return cents
end
end
function addEnvelopePoints(f, data, r)
-- get AutomationList, ControlList and ParameterDescriptor of the first plugin's first parameter (cents)
local al, cl, pd = ARDOUR.LuaAPI.plugin_automation (plugin, automationIndex)
-- get state for undo
local before = al:get_state ()
-- if there are no events aready add one at the begining
if cl:events():size() == 0 then
cl:add(0, 0, false, false)
end
-- remove old automation for the region
cl:clear(r:position(), r:position() + r:length())
-- one 10th of region's length - points will be spaced this distance apart
local interval = r:length()/10
-- calculate number of cents difference between f and closest note
local offset = freqToCentsOffset(f)
cl:add(r:position() - 0.1 * sr, 0, false, false) -- add zero point
cl:add(r:position() + 0.2 * sr, -offset, false, false) -- add first pitch point
cl:clear(r:position(), r:position() - 1 + 0.2 * sr) -- clean up buggy guard points
-- add the rest of the pitch points
local lastPos = r:position() + 0.2 * sr
local lastOffset
for i, d in ipairs(data) do
if d.timestamp > lastPos + interval and d.timestamp < r:position() + r:length() - 1.5 * sr then
offset = freqToCentsOffset(d.value) -- get offset from frequency value
cl:add(d.timestamp, -offset, false, false) -- add pitch point
cl:clear(lastPos+1, d.timestamp-1) -- clean up buggy guard points
lastPos = d.timestamp -- update last position
end
end
offset = freqToCentsOffset(f) -- get pitch offset from fixed frequency value
cl:add(r:position() + r:length() - 0.3 * sr, -offset, false, false) -- add final pitch point
cl:clear(lastPos+1, r:position() + r:length() - 1 + 0.3 * sr) -- clean up buggy guard points
cl:add(r:position() + r:length() + 0.1 * sr, 0, false, false) -- add zero point
cl:clear(r:position() + r:length() - 0.3 * sr, r:position() + r:length() - 1 + 0.1 * sr) -- clean up buggy guard points
-- get state for undo
local after = al:get_state ()
Session:add_command (al:memento_command (before, after))
add_undo = true
end
--MAIN--
--Each selected region
for r in rl:iter () do
local freq = nil
local data = {}
-- Test if it's an audio region
if r:to_audioregion ():isnil () then goto continue end
-- callback to handle Vamp-Plugin analysis results
function callback (feats)
if feats and feats:size() > 0 then
local f = feats:table()[0]:table()[1] -- frequency candidates
local p = feats:table()[1]:table()[1] -- probabilities
local ts = Vamp.RealTime.realTime2Frame (f.timestamp, sr)
local d = {["timestamp"]=r:position()+ts, ["value"]=0, ["probability"]=0.2}
-- get f candidates with highest probability
for i, v in ipairs(p.values:table()) do -- each probability
if v > d.probability then
d.value = f.values:table()[i]
d.probability = v
end
end
-- probability must be higher than 0.2 to be included
if d.probability > 0.2 then
table.insert(data, d)
end
end
return false
end
vamp:analyze (r:to_readable (), 0, callback)
-- get remaining features (end of analyis)
local feats = vamp:plugin():getRemainingFeatures()
local fl = feats:table()[5] --5 = frequency
--If frequency value is returned
if (fl and fl:size() > 0) then
freq = fl:at(0).values:at(0) -- store frequency of region
addEnvelopePoints(freq, data, r)
end
-- reset the plugin (prepare for next iteration)
vamp:reset ()
::continue::
end
-- all done, commit the combined Undo Operation
if add_undo then
-- the 'nil' Commend here mean to use the collected diffs added above
Session:commit_reversible_command (nil)
else
Session:abort_reversible_command ()
end
end end |
local Utility = require("Utility")
local Rubick = {}
local optionAutoTelekinesis = Menu.AddOption({"Hero Specific", "Rubick"}, "Auto Telekinesis", "Auto cast Telekinesis on any enemy in range once rubick has level 6")
local optionKillSteal = Menu.AddOption({"Hero Specific", "Rubick"}, "Kill Steal", "Cast spell on enemy to KS")
local optionAutoSpellSteal = Menu.AddOption({"Hero Specific", "Rubick"}, "Auto Spell Steal", "Auto steal important spells")
local optionQuickCast = Menu.AddOption({"Hero Specific", "Rubick"}, "Quick Cast Spells", "If have certain spells, then cast them quickly.")
-- stolen spell name -> timestamp
local StolenSpells = {}
local StealTable = {}
StealTable["abaddon_aphotic_shield"] = true
StealTable["abyssal_underlord_firestorm"] = true
StealTable["abyssal_underlord_pit_of_malice"] = true
StealTable["abyssal_underlord_dark_rift"] = true
StealTable["alchemist_unstable_concoction"] = true
StealTable["alchemist_chemical_rage"] = true
StealTable["ancient_apparition_cold_feet"] = true
StealTable["ancient_apparition_ice_blast"] = true
StealTable["antimage_blink"] = true
StealTable["antimage_spell_shield"] = true
StealTable["antimage_mana_void"] = true
StealTable["axe_berserkers_call"] = true
StealTable["bane_nightmare"] = true
StealTable["bane_fiends_grip"] = true
StealTable["batrider_firefly"] = true
StealTable["batrider_flaming_lasso"] = true
StealTable["beastmaster_primal_roar"] = true
StealTable["bloodseeker_blood_bath"] = true
StealTable["bloodseeker_rupture"] = true
-- StealTable["bounty_hunter_wind_walk"] = true
StealTable["bounty_hunter_track"] = true
StealTable["brewmaster_primal_split"] = true
StealTable["centaur_hoof_stomp"] = true
StealTable["centaur_stampede"] = true
StealTable["chaos_knight_chaos_bolt"] = true
-- StealTable["chaos_knight_reality_rift"] = true
StealTable["chaos_knight_phantasm"] = true
StealTable["chen_hand_of_god"] = true
StealTable["chen_holy_persuasion"] = true
StealTable["clinkz_wind_walk"] = true
StealTable["crystal_maiden_frostbite"] = true
StealTable["crystal_maiden_freezing_field"] = true
StealTable["dark_seer_ion_shell"] = true
StealTable["dark_seer_surge"] = true
StealTable["dark_seer_wall_of_replica"] = true
StealTable["dazzle_shallow_grave"] = true
StealTable["dazzle_weave"] = true
StealTable["death_prophet_silence"] = true
StealTable["death_prophet_exorcism"] = true
StealTable["disruptor_glimpse"] = true
StealTable["disruptor_kinetic_field"] = true
StealTable["disruptor_static_storm"] = true
StealTable["doom_bringer_doom"] = true
StealTable["dragon_knight_dragon_tail"] = true
StealTable["dragon_knight_elder_dragon_form"] = true
StealTable["drow_ranger_wave_of_silence"] = true
StealTable["earth_spirit_magnetize"] = true
StealTable["earthshaker_fissure"] = true
StealTable["earthshaker_echo_slam"] = true
StealTable["elder_titan_earth_splitter"] = true
StealTable["ember_spirit_searing_chains"] = true
StealTable["ember_spirit_flame_guard"] = true
StealTable["ember_spirit_activate_fire_remnant"] = true
StealTable["enchantress_enchant"] = true
StealTable["enchantress_natures_attendants"] = true
StealTable["enigma_malefice"] = true
StealTable["enigma_midnight_pulse"] = true
StealTable["enigma_black_hole"] = true
StealTable["faceless_void_time_walk"] = true
StealTable["faceless_void_chronosphere"] = true
StealTable["furion_sprout"] = true
StealTable["furion_teleportation"] = true
StealTable["furion_force_of_nature"] = true
StealTable["furion_wrath_of_nature"] = true
StealTable["gyrocopter_homing_missile"] = true
StealTable["gyrocopter_call_down"] = true
StealTable["huskar_inner_vitality"] = true
StealTable["invoker_cold_snap"] = true
-- StealTable["invoker_ghost_walk"] = true
StealTable["invoker_tornado"] = true
StealTable["invoker_emp"] = true
StealTable["invoker_chaos_meteor"] = true
StealTable["invoker_sun_strike"] = true
-- StealTable["invoker_forge_spirit"] = true
StealTable["invoker_ice_wall"] = true
StealTable["invoker_deafening_blast"] = true
StealTable["jakiro_ice_path"] = true
StealTable["jakiro_macropyre"] = true
StealTable["juggernaut_blade_fury"] = true
StealTable["juggernaut_healing_ward"] = true
StealTable["juggernaut_omni_slash"] = true
StealTable["keeper_of_the_light_mana_leak"] = true
StealTable["keeper_of_the_light_chakra_magic"] = true
StealTable["keeper_of_the_light_blinding_light"] = true
StealTable["kunkka_torrent"] = true
StealTable["kunkka_x_marks_the_spot"] = true
StealTable["kunkka_ghostship"] = true
StealTable["legion_commander_press_the_attack"] = true
StealTable["legion_commander_duel"] = true
StealTable["leshrac_split_earth"] = true
StealTable["leshrac_diabolic_edict"] = true
StealTable["lich_chain_frost"] = true
StealTable["life_stealer_rage"] = true
StealTable["life_stealer_open_wounds"] = true
-- StealTable["life_stealer_infest"] = true
StealTable["lina_light_strike_array"] = true
StealTable["lina_laguna_blade"] = true
StealTable["lion_impale"] = true
StealTable["lion_voodoo"] = true
StealTable["lion_finger_of_death"] = true
StealTable["lone_druid_spirit_bear"] = true
StealTable["luna_eclipse"] = true
StealTable["lycan_summon_wolves"] = true
StealTable["lycan_shapeshift"] = true
StealTable["magnataur_skewer"] = true
StealTable["magnataur_reverse_polarity"] = true
StealTable["medusa_stone_gaze"] = true
StealTable["meepo_earthbind"] = true
StealTable["mirana_arrow"] = true
StealTable["mirana_leap"] = true
StealTable["mirana_invis"] = true
StealTable["monkey_king_boundless_strike"] = true
StealTable["monkey_king_tree_dance"] = true
StealTable["monkey_king_primal_spring"] = true
StealTable["monkey_king_wukongs_command"] = true
StealTable["morphling_waveform"] = true
StealTable["morphling_adaptive_strike"] = true
StealTable["morphling_morph_agi"] = true
StealTable["morphling_morph_str"] = true
StealTable["morphling_morph"] = true
StealTable["naga_siren_ensnare"] = true
StealTable["naga_siren_song_of_the_siren"] = true
StealTable["necrolyte_sadist"] = true
StealTable["necrolyte_reapers_scythe"] = true
StealTable["nevermore_requiem"] = true
StealTable["night_stalker_void"] = true
StealTable["night_stalker_crippling_fear"] = true
StealTable["night_stalker_hunter_in_the_night"] = true
StealTable["nyx_assassin_impale"] = true
StealTable["nyx_assassin_spiked_carapace"] = true
StealTable["nyx_assassin_vendetta"] = true
StealTable["obsidian_destroyer_astral_imprisonment"] = true
StealTable["obsidian_destroyer_sanity_eclipse"] = true
StealTable["ogre_magi_fireblast"] = true
StealTable["ogre_magi_multicast"] = true
StealTable["omniknight_repel"] = true
StealTable["omniknight_guardian_angel"] = true
StealTable["oracle_fortunes_end"] = true
StealTable["oracle_false_promise"] = true
StealTable["phantom_assassin_stifling_dagger"] = true
StealTable["phantom_lancer_doppelwalk"] = true
StealTable["phoenix_icarus_dive"] = true
StealTable["phoenix_supernova"] = true
StealTable["puck_waning_rift"] = true
StealTable["puck_phase_shift"] = true
StealTable["puck_dream_coil"] = true
StealTable["pudge_meat_hook"] = true
StealTable["pudge_dismember"] = true
StealTable["pugna_nether_blast"] = true
StealTable["pugna_nether_ward"] = true
StealTable["pugna_life_drain"] = true
StealTable["queenofpain_blink"] = true
StealTable["queenofpain_sonic_wave"] = true
StealTable["rattletrap_power_cogs"] = true
StealTable["rattletrap_rocket_flare"] = true
StealTable["rattletrap_hookshot"] = true
StealTable["razor_static_link"] = true
StealTable["razor_eye_of_the_storm"] = true
StealTable["riki_smoke_screen"] = true
StealTable["riki_blink_strike"] = true
StealTable["riki_tricks_of_the_trade"] = true
StealTable["sandking_burrowstrike"] = true
StealTable["sandking_sand_storm"] = true
StealTable["sandking_epicenter"] = true
StealTable["shadow_demon_disruption"] = true
StealTable["shadow_demon_demonic_purge"] = true
StealTable["shadow_shaman_voodoo"] = true
StealTable["shadow_shaman_shackles"] = true
StealTable["shadow_shaman_mass_serpent_ward"] = true
StealTable["shredder_timber_chain"] = true
StealTable["silencer_last_word"] = true
StealTable["silencer_global_silence"] = true
StealTable["skeleton_king_hellfire_blast"] = true
StealTable["skywrath_mage_ancient_seal"] = true
StealTable["skywrath_mage_mystic_flare"] = true
StealTable["slardar_sprint"] = true
StealTable["slardar_slithereen_crush"] = true
StealTable["slardar_amplify_damage"] = true
StealTable["slark_pounce"] = true
StealTable["slark_shadow_dance"] = true
StealTable["sniper_shrapnel"] = true
StealTable["sniper_assassinate"] = true
StealTable["spectre_spectral_dagger"] = true
StealTable["spectre_haunt"] = true
StealTable["spirit_breaker_charge_of_darkness"] = true
StealTable["spirit_breaker_nether_strike"] = true
StealTable["storm_spirit_electric_vortex"] = true
StealTable["storm_spirit_ball_lightning"] = true
StealTable["sven_storm_bolt"] = true
StealTable["sven_warcry"] = true
StealTable["techies_land_mines"] = true
StealTable["techies_stasis_trap"] = true
StealTable["techies_suicide"] = true
StealTable["techies_remote_mines"] = true
StealTable["templar_assassin_refraction"] = true
-- StealTable["templar_assassin_meld"] = true
StealTable["templar_assassin_trap"] = true
StealTable["terrorblade_sunder"] = true
StealTable["tidehunter_ravage"] = true
StealTable["tinker_rearm"] = true
StealTable["tiny_avalanche"] = true
-- StealTable["tiny_toss"] = true
-- StealTable["treant_living_armor"] = true
StealTable["treant_overgrowth"] = true
StealTable["troll_warlord_battle_trance"] = true
StealTable["tusk_ice_shards"] = true
StealTable["tusk_snowball"] = true
StealTable["tusk_walrus_kick"] = true
StealTable["tusk_walrus_punch"] = true
StealTable["undying_tombstone"] = true
StealTable["undying_flesh_golem"] = true
StealTable["ursa_enrage"] = true
StealTable["vengefulspirit_magic_missile"] = true
StealTable["vengefulspirit_nether_swap"] = true
StealTable["venomancer_plague_ward"] = true
StealTable["venomancer_poison_nova"] = true
StealTable["viper_nethertoxin"] = true
StealTable["viper_viper_strike"] = true
StealTable["visage_summon_familiars"] = true
StealTable["warlock_fatal_bonds"] = true
StealTable["warlock_rain_of_chaos"] = true
StealTable["weaver_shukuchi"] = true
StealTable["weaver_time_lapse"] = true
StealTable["windrunner_shackleshot"] = true
StealTable["windrunner_windrun"] = true
StealTable["winter_wyvern_cold_embrace"] = true
StealTable["winter_wyvern_winters_curse"] = true
StealTable["witch_doctor_paralyzing_cask"] = true
StealTable["witch_doctor_voodoo_restoration"] = true
StealTable["witch_doctor_death_ward"] = true
StealTable["zuus_lightning_bolt"] = true
StealTable["zuus_cloud"] = true
StealTable["zuus_thundergods_wrath"] = true
local QuickCastAbilities = {
"abyssal_underlord_pit_of_malice",
"ancient_apparition_cold_feet",
"batrider_flaming_lasso",
"bane_nightmare_end",
"bloodseeker_rupture",
"bounty_hunter_track",
"chaos_knight_chaos_bolt",
"crystal_maiden_frostbite",
"death_prophet_silence",
"doom_bringer_doom",
"dragon_knight_dragon_tail",
"drow_ranger_wave_of_silence",
"earthshaker_fissure",
"elder_titan_earth_splitter",
"ember_spirit_flame_guard",
"enigma_malefice",
"enigma_midnight_pulse",
"enigma_black_hole",
"gyrocopter_homing_missile",
"gyrocopter_call_down",
"invoker_cold_snap",
"invoker_tornado",
"invoker_emp",
"invoker_chaos_meteor",
"invoker_sun_strike",
"invoker_deafening_blast",
"jakiro_ice_path",
"jakiro_macropyre",
"juggernaut_omni_slash",
"keeper_of_the_light_mana_leak",
"kunkka_torrent",
"kunkka_x_marks_the_spot",
"kunkka_ghostship",
"leshrac_split_earth",
"lich_chain_frost",
"life_stealer_open_wounds",
"lina_light_strike_array",
"lina_laguna_blade",
"lion_impale",
"lion_voodoo",
"lion_finger_of_death",
"mirana_arrow",
"monkey_king_boundless_strike",
"morphling_adaptive_strike",
"naga_siren_ensnare",
"night_stalker_void",
"night_stalker_crippling_fear",
"nyx_assassin_impale",
"nyx_assassin_mana_burn",
"ogre_magi_fireblast",
"ogre_magi_ignite",
"ogre_magi_multicast",
"phantom_assassin_stifling_dagger",
"phantom_lancer_spirit_lance",
"pudge_dismember",
"pugna_nether_blast",
"pugna_life_drain",
"queenofpain_sonic_wave",
"razor_static_link",
"riki_smoke_screen",
"shadow_demon_demonic_purge",
"shadow_shaman_ether_shock",
"shadow_shaman_voodoo",
"silencer_last_word",
"skeleton_king_hellfire_blast",
"skywrath_mage_ancient_seal",
"skywrath_mage_mystic_flare",
"slardar_amplify_damage",
"spectre_spectral_dagger",
"storm_spirit_electric_vortex",
"sven_storm_bolt",
"sven_warcry",
"techies_land_mines",
"techies_stasis_trap",
"templar_assassin_trap",
"tidehunter_gush",
"tinker_laser",
"tinker_heat_seeking_missile",
"tinker_march_of_the_machines",
"tiny_avalanche",
"tusk_walrus_punch",
"vengefulspirit_magic_missile",
"viper_viper_strike",
"warlock_fatal_bonds",
"warlock_shadow_word",
"windrunner_shackleshot",
"witch_doctor_paralyzing_cask",
"witch_doctor_maledict",
"zuus_lightning_bolt"
}
function Rubick.OnUpdate()
if Menu.IsEnabled(optionKillSteal) then
Rubick.KillSteal()
end
if Menu.IsEnabled(optionAutoTelekinesis) then
Rubick.AutoTelekinesis()
end
if Menu.IsEnabled(optionAutoSpellSteal) then
Rubick.AutoSpellSteal()
end
if Menu.IsEnabled(optionQuickCast) then
Rubick.QuickCast()
end
end
-- Kill stealer or linkens breaker
function Rubick.KillSteal()
local myHero = Heroes.GetLocal()
if not myHero or not Utility.IsSuitableToCastSpell(myHero) then return end
local spell = NPC.GetAbility(myHero, "rubick_fade_bolt")
if not spell or not Ability.IsCastable(spell, NPC.GetMana(myHero)) then return end
local range = Utility.GetCastRange(myHero, spell)
local damage = 25 + 75 * Ability.GetLevel(spell) -- damage update in version 7.27b
for i = 1, Heroes.Count() do
local enemy = Heroes.Get(i)
if enemy and not NPC.IsIllusion(enemy) and not Entity.IsSameTeam(myHero, enemy)
and Utility.CanCastSpellOn(enemy) and NPC.IsEntityInRange(myHero, enemy, range) then
-- local true_damage = damage * NPC.GetMagicalArmorDamageMultiplier(enemy)
local true_damage = Utility.GetRealDamage(myHero, enemy, damage)
if (true_damage >= Entity.GetHealth(enemy) or Utility.IsLinkensProtected(enemy))
and Utility.IsSafeToCast(myHero, enemy, true_damage) then
Ability.CastTarget(spell, enemy)
return
end
end
end
end
function Rubick.AutoTelekinesis()
local myHero = Heroes.GetLocal()
if not myHero or not Utility.IsSuitableToCastSpell(myHero) then return end
if NPC.GetCurrentLevel(myHero) < 6 then return end
local spell = NPC.GetAbility(myHero, "rubick_telekinesis")
if not spell or not Ability.IsCastable(spell, NPC.GetMana(myHero)) then return end
local range = Utility.GetCastRange(myHero, spell)
for i = 1, Heroes.Count() do
local enemy = Heroes.Get(i)
if enemy and not NPC.IsIllusion(enemy) and not Entity.IsSameTeam(myHero, enemy)
and Utility.CanCastSpellOn(enemy) and NPC.IsEntityInRange(myHero, enemy, range)
and not Utility.IsDisabled(enemy) and not Utility.IsLinkensProtected(enemy)
and not Utility.IsLotusProtected(enemy) then
Ability.CastTarget(spell, enemy)
return
end
end
end
-- return true if can cast spell on this npc, return false otherwise
-- Rubick version of CanCastSpellOn() is able to steal skill from BKB
function Rubick.CanCastSpellOn(npc)
if Entity.IsDormant(npc) or not Entity.IsAlive(npc) then return false end
if NPC.IsStructure(npc) or not NPC.IsKillable(npc) then return false end
-- if NPC.HasState(npc, Enum.ModifierState.MODIFIER_STATE_MAGIC_IMMUNE) then return false end
-- if NPC.HasState(npc, Enum.ModifierState.MODIFIER_STATE_INVULNERABLE) then return false end
return true
end
function Rubick.AutoSpellSteal()
local myHero = Heroes.GetLocal()
if not myHero or not Utility.IsSuitableToCastSpell(myHero) then return end
local steal = NPC.GetAbility(myHero, "rubick_spell_steal")
if not steal or not Ability.IsCastable(steal, NPC.GetMana(myHero)) then return end
local range = Utility.GetCastRange(myHero, steal)
-- don't steal if currently has stolen spells available
local slot1 = NPC.GetAbilityByIndex(myHero, 3)
local slot2 = NPC.GetAbilityByIndex(myHero, 4)
if (slot1 and Ability.IsCastable(slot1, NPC.GetMana(myHero))) or (slot2 and Ability.IsCastable(slot2, NPC.GetMana(myHero))) then return end
for i = 1, Heroes.Count() do
local enemy = Heroes.Get(i)
if enemy and not NPC.IsIllusion(enemy) and not Entity.IsSameTeam(myHero, enemy)
and Rubick.CanCastSpellOn(enemy) and NPC.IsEntityInRange(myHero, enemy, range)
and not Utility.IsLinkensProtected(enemy) then
local spell = Rubick.GetLastSpell(enemy)
if spell and StealTable[Ability.GetName(spell)]
and (not slot1 or Ability.GetName(slot1) ~= Ability.GetName(spell))
and (not slot2 or Ability.GetName(slot2) ~= Ability.GetName(spell))
and (not StolenSpells[Ability.GetName(spell)]
or GameRules.GetGameTime() - StolenSpells[Ability.GetName(spell)] > Ability.GetCooldownLength(spell)) then
Ability.CastTarget(steal, enemy)
StolenSpells[Ability.GetName(spell)] = GameRules.GetGameTime()
return
end
end
end
end
function Rubick.QuickCast()
local myHero = Heroes.GetLocal()
if not myHero or not Utility.IsSuitableToCastSpell(myHero) then return end
if NPC.GetUnitName(myHero) ~= "npc_dota_hero_rubick" then return end
local spell
for i = 1, #QuickCastAbilities do
if NPC.GetAbility(myHero, QuickCastAbilities[i]) then
spell = NPC.GetAbility(myHero, QuickCastAbilities[i])
end
end
if not spell or not Ability.IsCastable(spell, NPC.GetMana(myHero)) then return end
Ability.CastNoTarget(spell)
local range = Utility.GetCastRange(myHero, spell)
for i = 1, Heroes.Count() do
local enemy = Heroes.Get(i)
if enemy and not NPC.IsIllusion(enemy) and not Entity.IsSameTeam(myHero, enemy)
and Utility.CanCastSpellOn(enemy) and NPC.IsEntityInRange(myHero, enemy, range)
and not Utility.IsDisabled(enemy) then
Ability.CastTarget(spell, enemy)
Ability.CastPosition(spell, Utility.GetPredictedPosition(enemy, Ability.GetCastPoint(spell)))
return
end
end
end
function Rubick.GetLastSpell(enemy)
if not enemy then return end
local min = 999999
local res
for i = 0, 24 do
local ability = NPC.GetAbilityByIndex(enemy, i)
if ability and Entity.IsAbility(ability) and not Ability.IsHidden(ability) and not Ability.IsAttributes(ability) then
-- Ability.SecondsSinceLastUse returns -1 if it isn't on cooldown.
local lastUsed = Ability.SecondsSinceLastUse(ability)
if lastUsed >= 0 and lastUsed < min then
res = ability
min = lastUsed
end
end
end
return res
end
return Rubick
|
World.SpawnDefaultSun()
--spawns the ui in game
main_hud = WebUI("Main HUD", "file:///UI/index.html")
--SoundsPlaying
local SoundsPlaying = {}
Events.Subscribe("DisplayLight", function(Light)
main_hud:CallEvent("DisplayLight", Light)
end)
Events.Subscribe("KillPlayerBomb", function (Pos)
local GrenadeEffect = "nanos-world::P_Explosion"
local GrenadeSound = "nanos-world::A_Explosion_Large"
Particle(Pos, Rotator(), GrenadeEffect, true, true)
Sound(Pos, GrenadeSound, false, true, SoundType.SFX)
end)
Events.Subscribe("CheckIfPlayerHasMoved", function (params, debug)
print(params.character:GetPlayer())
local trace_results = Client.Trace(params.startpos, params.endpos, CollisionChannel.Pawn | CollisionChannel.WorldStatic | CollisionChannel.PhysicsBody, false, true, false, {}, true)
-- If hit something draws a Debug Point at the location
if (trace_results.Success) then
print("In Success")
if (debug == false) then return end
-- Makes the point Red or Green if hit an Actor
local color = Color(1, 0, 0) -- Red
if (trace_results.Entity) then
print("green")
color = Color(0, 1, 0) -- Green
-- Here you can check which actor you hit like
-- if (trace_result.Entity:GetType() == "Character") then ...
end
-- Draws a Debug Point at the Hit location for 5 seconds with size 10
Client.DrawDebugPoint(trace_results.Location, color, 5, 10)
else
print(params.PlayersLastPos)
if (params.PlayersLastPos) then
if (params.PlayersLastPos ~= params.PlayersLoc) then
Events.CallRemote("KillPlayerRayCast")
end
else
print("Calling PlayersLastLocation")
Events.CallRemote("PlayersLastLocation", params.PlayersLoc)
end
end
end)
Events.Subscribe("PlaySound", function (soundPath, PutIsPlaying)
print(soundPath)
local newsound = Sound(Vector(),soundPath,true,true,SoundType.SFX)
if (PutIsPlaying) then
table.insert( SoundsPlaying, newsound)
else
newsound:Play()
end
end) |
-- load tftpclnt.lua
local tftp = require("socket.tftp")
-- needs tftp server running on localhost, with root pointing to
-- a directory with index.html in it
function readfile(file)
local f = io.open(file, "r")
if not f then return nil end
local a = f:read("*a")
f:close()
return a
end
host = host or "diego.student.princeton.edu"
retrieved, err = tftp.get("tftp://" .. host .."/index.html")
assert(not err, err)
original = readfile("test/index.html")
assert(original == retrieved, "files differ!")
print("passed")
|
Vector = require('lib.vector')
local HooECS = require('lib.HooECS')
HooECS.initialize({ globals = true, debug = true })
local Factory = require('src.entity_factory')
local InputSystem = require('src.systems.input_system')
local MovementSystem = require('src.systems.movement_system')
local PhysicsRenderingSystem = require('src.systems.physics_rendering_system')
local engine, world, input, factory
function love.load(args)
if arg[#arg] == '-debug' then require('mobdebug').start() end
engine = Engine()
engine:addSystem(InputSystem())
engine:addSystem(MovementSystem())
engine:addSystem(PhysicsRenderingSystem())
world = love.physics.newWorld()
factory = Factory('data.player_data')
factory:build(engine, world, input)
end
function love.update(dt)
world:update(dt)
engine:update(dt)
end
function love.draw()
engine:draw()
end
|
pcall(require, "luarocks.loader")
--local gears = require("gears")
local awful = require("awful")
--local wibox = require("wibox")
--local beautiful = require("beautiful")
--local naughty = require("naughty")
require("awful.autofocus")
-- Use LuaJIT
-- pcall(function() jit.on() end)
require("modules.error") -- I don't think this works
--require("modules.autostart")
require("modules.looks")
require("modules.desktop")
require("modules.rules")
require("modules.signal")
require("modules.mouse")
require("modules.keybind")
|
--[[
Copyright (c) 2015, Robert 'Bobby' Zenz
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--]]
--- Provides various utility methods for manipulating entities.
entityutil = {
--- The name of builtin items.
BUILTIN_ITEM_NAME = "__builtin:item"
}
--- Checks the given entity if it is a builtin item.
--
-- @param entity The entity to test.
-- @return true if the given entity is a builtin item.
function entityutil.is_builtin_item(entity)
local lua_entity = entity:get_luaentity();
return entity.name == entityutil.BUILTIN_ITEM_NAME
or (lua_entity ~= nil
and lua_entity.name == entityutil.BUILTIN_ITEM_NAME)
end
--- Moves the given entity towards the given point by setting its velocity into
-- the correct direction.
--
-- @param entity The entity to move, a LuaEntitySAO.
-- @param position The position to move the entity towards.
-- @param acceleration_x Optional. The acceleration to use in the x direction,
-- defaults to 1.
-- @param acceleration_y Optional. The acceleration to use in the y direction,
-- defaults to acceleration_x.
-- @param acceleration_z Optional. The acceleration to use in the x direction,
-- defaults to acceleration_x.
function entityutil.move_to(entity, position, acceleration_x, acceleration_y, acceleration_z)
acceleration_x = acceleration_x or 1
acceleration_y = acceleration_y or acceleration_x
acceleration_z = acceleration_z or acceleration_x
local direction = vector.direction(entity:getpos(), position)
local velocity = entity:getvelocity()
velocity.x = velocity.x + (acceleration_x * direction.x)
velocity.y = velocity.y + (acceleration_y * direction.y)
velocity.z = velocity.z + (acceleration_z * direction.z)
entity:setvelocity(velocity)
end
|
MoreGamesDownloadStatus = {
None = 0;
Downloading = 1;
Successed = 2;
}; |
-- mono_runes.lua
require "ccrypt"
local text=[[ER STAND AUF SEINES DACHES ZINNEN,
ER SCHAUTE MIT VERGNÜGTEN SINNEN]]
local alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜß.,!"
local runes="ᚪᛒᚲᛞᛖᚠᚷᚺᛇᛃᚴᛚᛗᛜᛟᛈᛩᚱᛊᚦᚢᚡᚹᛪᚤᛎᛅᚯᚣᛋ᛫᛭᛬"
local enc_key=alphabet:subst_table(runes) -- default key=0
local encrypted=text:substitute(enc_key)
print("\n"..encrypted)
local dec_key=runes:subst_table(alphabet)
print(encrypted:substitute(dec_key))
|
class "ConeLight" (PositionalLight);
function ConeLight:__init(rayHandler, rays, color, distance, x, y, dirDegree, coneDegree)
PositionalLight.__init(self, rayHandler, rays, color, distance, x, y, dirDegree);
self:setConeDegree(coneDegree);
self:setDirection(self.direction);
self:update();
end;
local TO_RADIANS = function(angle)
return angle * (math.pi / 180);
end;
function ConeLight:setDirection(direction)
self.direction = direction;
for i = 0, self.rayNum do
local angle = direction + self.coneDegree - 2 * self.coneDegree * i / self.rayNum; -- no minus 1
self.sin[i] = math.sin(TO_RADIANS(angle));
self.cos[i] = math.cos(TO_RADIANS(angle));
local s = self.sin[i];
local c = self.cos[i];
self.endX[i] = self.distance * c;
self.endY[i] = self.distance * s;
end;
if (self.staticLight) then
self:staticUpdate();
end;
end;
function ConeLight:getConeDegree()
return self.coneDegree;
end;
function ConeLight:setConeDegree(coneDegree)
if (coneDegree < 0) then coneDegree = 0; end;
if (coneDegree > 180) then coneDegree = 180; end;
self.coneDegree = coneDegree;
self:setDirection(self.direction);
end;
function ConeLight:setDistance(distance)
distance = distance * self.rayHandler.gammaCorrectionParameter;
self.distance = distance;
self:setDirection(self.direction);
end; |
local function isDisenchantable(itemInfo)
return
#itemInfo == 0 or (
(
itemInfo[Auctionator.Constants.ITEM_INFO.CLASS] == Enum.ItemClass.Weapon or
itemInfo[Auctionator.Constants.ITEM_INFO.CLASS] == Enum.ItemClass.Armor
) and
itemInfo[Auctionator.Constants.ITEM_INFO.RARITY] >= Enum.ItemQuality.Uncommon and
itemInfo[Auctionator.Constants.ITEM_INFO.RARITY] <= Enum.ItemQuality.Epic
)
end
function Auctionator.Enchant.DisenchantStatus(itemInfo)
return {
isDisenchantable = isDisenchantable(itemInfo),
supportedXpac =
itemInfo[Auctionator.Constants.ITEM_INFO.XPAC] >=
LE_EXPANSION_WARLORDS_OF_DRAENOR
}
end
local function GetDisenchantReagents(itemInfo)
local xpac = Auctionator.Enchant.DE_TABLE[
itemInfo[Auctionator.Constants.ITEM_INFO.XPAC]
]
if xpac then
return xpac[itemInfo[Auctionator.Constants.ITEM_INFO.RARITY]]
else
return nil
end
end
function Auctionator.Enchant.GetDisenchantAuctionPrice(itemLink)
local itemInfo = { GetItemInfo(itemLink) }
if not isDisenchantable(itemInfo) then
return nil
end
local disenchantInfo = GetDisenchantReagents(itemInfo)
if disenchantInfo == nil then
return nil
end
local price = 0
for reagentKey, meanDrop in pairs(disenchantInfo) do
local reagentPrice = Auctionator.Database:GetPrice(reagentKey)
if reagentPrice == nil then
return nil
end
price = price + reagentPrice * meanDrop
end
return price
end
|
local Behavior = CreateAIBehavior("HeliFireGuns", "HeliIdle",
{
Constructor = function (self, entity)
self:AnalyzeSituation(entity)
end,
ShouldRelocate = function(self, entity)
return AI.GetTargetType(entity.id) ~= AITARGET_ENEMY
end,
AnalyzeSituation = function(self, entity, sender, data)
--AI.SetRefPointPosition( entity.id, data.point )
--entity:InsertSubpipe(AIGOALPIPE_HIGHPRIORITY + AIGOALPIPE_KEEP_ON_TOP, "HeliShootAt", nil, nil)
end,
}) |
modifier_hurricane_tempest = class({})
function modifier_hurricane_tempest:GetAttributes() return MODIFIER_ATTRIBUTE_MULTIPLE end
local function TempestStrike(hAbility, hLastTarget, hUnit, fStunDuration, fDamage)
local tSurroudingTargets = FindUnitsInRadius(hUnit:GetTeam(), hUnit:GetOrigin(), nil, hAbility:GetSpecialValueFor("radius"), DOTA_UNIT_TARGET_TEAM_BOTH, DOTA_UNIT_TARGET_BASIC+DOTA_UNIT_TARGET_HERO, DOTA_UNIT_TARGET_FLAG_NONE, FIND_ANY_ORDER, false)
local iTargets = #tSurroudingTargets
if iTargets > 2 then
for i = 1, iTargets do
if tSurroudingTargets[iTargets+1-i] == hUnit or tSurroudingTargets[iTargets+1-i] == hLastTarget then
table.remove(tSurroudingTargets, iTargets+1-i)
end
end
elseif iTargets == 2 then
for i = 1, iTargets do
if tSurroudingTargets[iTargets+1-i] == hUnit then
table.remove(tSurroudingTargets, iTargets+1-i)
end
end
else
return nil
end
iTargets = #tSurroudingTargets
local hTarget = tSurroudingTargets[RandomInt(1, iTargets)]
local iParticle = ParticleManager:CreateParticle("particles/units/heroes/hero_disruptor/disruptor_thunder_strike_bolt_child.vpcf", PATTACH_ABSORIGIN_FOLLOW, hTarget)
ParticleManager:SetParticleControl(iParticle, 4, hTarget:GetOrigin())
ParticleManager:SetParticleControl(iParticle, 1, Vector(0,0,1000)+hTarget:GetOrigin())
hTarget:EmitSound("Hero_Disruptor.ThunderStrike.Target")
ApplyDamage({attacker = hUnit, victim = hTarget, damage = fDamage, damage_type = DAMAGE_TYPE_MAGICAL, ability = hAbility})
hTarget:AddNewModifier(hUnit, hAbility, "modifier_stunned", {Duration = fStunDuration*CalculateStatusResist(hTarget)})
return hTarget
end
function modifier_hurricane_tempest:IsHidden() return false end
function modifier_hurricane_tempest:IsPurgable() return true end
function modifier_hurricane_tempest:OnCreated()
if IsClient() then return end
self.tTargets = {}
local hAbility = self:GetAbility()
self.fStunDuration = hAbility:GetSpecialValueFor("stun_duration")
self.fDamage = hAbility:GetSpecialValueFor("damage")
if self:GetCaster():HasAbility("special_bonus_hurricane_1") then
self.fStunDuration = self.fStunDuration+self:GetCaster():FindAbilityByName("special_bonus_hurricane_1"):GetSpecialValueFor("value")
end
self.hLastTarget = TempestStrike(hAbility, nil, self:GetCaster(), self.fStunDuration, self.fDamage)
self.iStrikeLeft = hAbility:GetSpecialValueFor("bolt_count")-1
if self:GetCaster():HasAbility("special_bonus_hurricane_2") then
self.iStrikeLeft = self.iStrikeLeft + self:GetCaster():FindAbilityByName("special_bonus_hurricane_2"):GetSpecialValueFor("value")
end
self:StartIntervalThink(hAbility:GetSpecialValueFor("strike_interval"))
end
function modifier_hurricane_tempest:OnIntervalThink()
if IsClient() then return end
self.hLastTarget = TempestStrike(self:GetAbility(), self.hLastTarget, self:GetCaster(), self.fStunDuration, self.fDamage) or self.hLastTarget
self.iStrikeLeft = self.iStrikeLeft - 1
if self.iStrikeLeft == 0 then
self:Destroy()
end
end
modifier_hurricane_cyclone = class({})
function modifier_hurricane_cyclone:IsPurgable() return false end
function modifier_hurricane_cyclone:DeclareFunctions() return {MODIFIER_PROPERTY_OVERRIDE_ANIMATION} end
function modifier_hurricane_cyclone:GetOverrideAnimation() return ACT_DOTA_FLAIL end
function modifier_hurricane_cyclone:OnCreated()
if IsClient() then return end
local fThrowDistance = self:GetAbility():GetSpecialValueFor("throw_distance")
if self:GetCaster():HasAbility("special_bonus_hurricane_4") then
fThrowDistance = fThrowDistance + self:GetCaster():FindAbilityByName("special_bonus_hurricane_4"):GetSpecialValueFor("value")
end
self.vSpeedHorizontal = fThrowDistance*Vector2D(RandomVector(1)):Normalized()
local hParent = self:GetParent()
local hAbility = self:GetAbility()
self.iDamage = hAbility:GetSpecialValueFor("throw_damage")
self.iStunDuration = hAbility:GetSpecialValueFor("stun_duration")
self.iParticle = ParticleManager:CreateParticle("particles/econ/events/fall_major_2016/force_staff_fm06.vpcf", PATTACH_ABSORIGIN_FOLLOW, hParent)
hParent:EmitSound("Hero_Invoker.Tornado")
hParent:SetOrigin(self:GetCaster():GetOrigin())
self:ApplyVerticalMotionController()
self:ApplyHorizontalMotionController()
end
function modifier_hurricane_cyclone:UpdateHorizontalMotion(me, dt)
local hCaster = self:GetCaster()
local hAbility = self:GetAbility()
self.tHitUnits = self.tHitUnits or {}
for k, v in ipairs(FindUnitsInRadius(me:GetTeam(), me:GetOrigin(), nil, 150, DOTA_UNIT_TARGET_TEAM_BOTH, DOTA_UNIT_TARGET_BASIC+DOTA_UNIT_TARGET_HERO, DOTA_UNIT_TARGET_FLAG_NONE, FIND_ANY_ORDER, false)) do
if v:GetTeam() ~= hCaster:GetTeam() and not v:HasModifier("modifier_hurricane_cyclone") and not self.tHitUnits[v:entindex()] then
self.tHitUnits[v:entindex()] = true
v:AddNewModifier(hCaster, hAbility, "modifier_stunned", {Duration = self.iStunDuration*CalculateStatusResist(v)})
ApplyDamage({attacker = hCaster, damage = self.iDamage, damage_type = DAMAGE_TYPE_MAGICAL, victim = v, ability = hAbility})
end
end
me:SetOrigin(me:GetOrigin()+dt*self.vSpeedHorizontal)
end
function modifier_hurricane_cyclone:UpdateVerticalMotion(me, dt)
me:SetOrigin(GetGroundPosition(me:GetOrigin(), me))
end
function modifier_hurricane_cyclone:OnDestroy()
if IsClient() then return end
local hParent = self:GetParent()
local hCaster = self:GetCaster()
local hAbility = self:GetAbility()
ParticleManager:DestroyParticle(self.iParticle, true)
hParent:StopSound("Hero_Invoker.Tornado")
hParent:RemoveHorizontalMotionController(self)
hParent:RemoveVerticalMotionController(self)
FindClearSpaceForUnit(hParent, hParent:GetOrigin(), false)
if hParent:GetTeam() ~= hCaster:GetTeam() then
hParent:AddNewModifier(hCaster, hAbility, "modifier_stunned", {Duration = self.iStunDuration*CalculateStatusResist(hParent)})
ApplyDamage({attacker = hCaster, damage = self.iDamage, damage_type = DAMAGE_TYPE_MAGICAL, victim = hParent, ability = hAbility})
end
end
modifier_hurricane_whirlewind = class({})
function modifier_hurricane_whirlewind:IsPurgable() return false end
function modifier_hurricane_whirlewind:DeclareFunctions() return {MODIFIER_PROPERTY_OVERRIDE_ANIMATION} end
function modifier_hurricane_whirlewind:GetOverrideAnimation() return ACT_DOTA_FLAIL end
function modifier_hurricane_whirlewind:CheckState() return {[MODIFIER_STATE_STUNNED] = true} end
function modifier_hurricane_whirlewind:OnCreated()
if IsClient() then return end
local fDamageInterval = 0.1
self.vSpeedHorizontal = self:GetAbility():GetSpecialValueFor("throw_distance")*Vector2D(RandomVector(1)):Normalized()
local hParent = self:GetParent()
local hAbility = self:GetAbility()
self.fDamage1 = hAbility:GetSpecialValueFor("damage_per_second_1")*fDamageInterval
self.fDamage2 = hAbility:GetSpecialValueFor("damage_per_second_2")*fDamageInterval
self.fDamage3 = hAbility:GetSpecialValueFor("damage_per_second_3")*fDamageInterval
self.iRadius1 = hAbility:GetSpecialValueFor("radius_1")
self.iRadius2 = hAbility:GetSpecialValueFor("radius_2")
self.iRadius3 = hAbility:GetSpecialValueFor("radius_3")
self.fSpeedHorizontal = hAbility:GetSpecialValueFor("pull_speed")
if self:GetCaster():HasAbility("special_bonus_hurricane_3") then
self.fSpeedHorizontal = self.fSpeedHorizontal+self:GetCaster():FindAbilityByName("special_bonus_hurricane_3"):GetSpecialValueFor("value")
end
self.iParticle = ParticleManager:CreateParticle("particles/units/heroes/hero_windrunner/windrunner_windrun.vpcf", PATTACH_ABSORIGIN_FOLLOW, hParent)
hParent:EmitSound("n_creep_Wildkin.Tornado")
self:StartIntervalThink(fDamageInterval)
self:ApplyVerticalMotionController()
self:ApplyHorizontalMotionController()
end
function modifier_hurricane_whirlewind:OnIntervalThink()
local hCaster = self:GetCaster()
local hAbility = self:GetAbility()
local hParent = self:GetParent()
local fDistance = (hParent:GetOrigin()-hCaster:GetOrigin()):Length2D()
if hCaster:GetTeam() ~= hParent:GetTeam() then
if fDistance < self.iRadius1 then
ApplyDamage({attacker = hCaster, damage = self.fDamage1, damage_type = DAMAGE_TYPE_MAGICAL, victim = hParent, ability = hAbility})
elseif fDistance < self.iRadius2 then
ApplyDamage({attacker = hCaster, damage = self.fDamage2, damage_type = DAMAGE_TYPE_MAGICAL, victim = hParent, ability = hAbility})
elseif fDistance < self.iRadius3 then
ApplyDamage({attacker = hCaster, damage = self.fDamage3, damage_type = DAMAGE_TYPE_MAGICAL, victim = hParent, ability = hAbility})
end
end
if not hAbility:IsChanneling() then self:Destroy() end
end
local function GetTangent(vRadical)
local x = Vector(0,0,0).Dot(Vector(1, 0, 0), vRadical)
local y = Vector(0,0,0).Dot(Vector(0, 1, 0), vRadical)
local theta
if x > 0 then
theta = math.atan(y/x)
else
theta = math.atan(y/x)+math.pi
end
return Vector(math.cos(theta+math.pi/2), math.sin(theta+math.pi/2), 0)
end
function modifier_hurricane_whirlewind:UpdateHorizontalMotion(me, dt)
local vRadical = (self:GetCaster():GetOrigin()-me:GetOrigin()):Normalized()
me:SetOrigin(me:GetOrigin()+dt*(self.fSpeedHorizontal*vRadical+self.fSpeedHorizontal*2*GetTangent(vRadical)))
end
function modifier_hurricane_whirlewind:UpdateVerticalMotion(me, dt)
me:SetOrigin(GetGroundPosition(me:GetOrigin(), me))
end
function modifier_hurricane_whirlewind:OnDestroy()
if IsClient() then return end
local hParent = self:GetParent()
ParticleManager:DestroyParticle(self.iParticle, true)
hParent:StopSound("n_creep_Wildkin.Tornado")
hParent:RemoveHorizontalMotionController(self)
hParent:RemoveVerticalMotionController(self)
FindClearSpaceForUnit(hParent, hParent:GetOrigin(), false)
end
modifier_hurricane_eyes_of_the_storm = class({})
function modifier_hurricane_eyes_of_the_storm:IsHidden() return true end
function modifier_hurricane_eyes_of_the_storm:IsPurgable() return false end
function modifier_hurricane_eyes_of_the_storm:RemoveOnDeath() return false end
function modifier_hurricane_eyes_of_the_storm:OnCreated()
self:StartIntervalThink(0.1)
end
function modifier_hurricane_eyes_of_the_storm:OnIntervalThink()
if IsClient() then return end
local hParent = self:GetParent()
if hParent:HasScepter() and hParent:HasAbility("hurricane_eyes_of_the_storm") then
local iLevel = hParent:FindAbilityByName("hurricane_eyes_of_the_storm"):GetLevel()
hParent:RemoveAbility("hurricane_eyes_of_the_storm")
hParent:AddAbility("hurricane_eyes_of_the_storm_upgrade"):SetLevel(iLevel)
self:Destroy()
end
end
modifier_hurricane_eyes_of_the_storm_upgrade = class({})
function modifier_hurricane_eyes_of_the_storm_upgrade:IsHidden() return true end
function modifier_hurricane_eyes_of_the_storm_upgrade:IsPurgable() return false end
function modifier_hurricane_eyes_of_the_storm_upgrade:RemoveOnDeath() return false end
function modifier_hurricane_eyes_of_the_storm_upgrade:OnCreated()
self:StartIntervalThink(0.1)
end
function modifier_hurricane_eyes_of_the_storm_upgrade:OnIntervalThink()
if IsClient() then return end
local hParent = self:GetParent()
if not hParent:HasScepter() and hParent:HasAbility("hurricane_eyes_of_the_storm_upgrade") then
local iLevel = hParent:FindAbilityByName("hurricane_eyes_of_the_storm_upgrade"):GetLevel()
hParent:RemoveAbility("hurricane_eyes_of_the_storm_upgrade")
hParent:AddAbility("hurricane_eyes_of_the_storm"):SetLevel(iLevel)
self:Destroy()
end
end
modifier_hurricane_sound_manager = class({})
function modifier_hurricane_sound_manager:IsPurgable() return false end
function modifier_hurricane_sound_manager:IsHidden() return true end
function modifier_hurricane_sound_manager:OnCreated()
if IsClient() then return end
self:GetParent():EmitSound('n_creep_Wildkin.Tornado')
self:StartIntervalThink(30)
end
function modifier_hurricane_sound_manager:OnIntervalThink()
if IsClient() then return end
self:GetParent():StopSound('n_creep_Wildkin.Tornado')
self:GetParent():EmitSound('n_creep_Wildkin.Tornado')
end
function modifier_hurricane_sound_manager:OnDestroy()
if IsClient() then return end
self:GetParent():StopSound('n_creep_Wildkin.Tornado')
end
modifier_hurricane_model_scale_manager = class({})
function modifier_hurricane_model_scale_manager:IsPurgable() return false end
function modifier_hurricane_model_scale_manager:RemoveOnDeath() return false end
function modifier_hurricane_model_scale_manager:IsHidden() return true end
function modifier_hurricane_model_scale_manager:DeclareFunctions() return {MODIFIER_EVENT_ON_MODEL_CHANGED} end
function modifier_hurricane_model_scale_manager:OnModelChanged(keys)
if keys.attacker ~= self:GetParent() then return end
local hHero = keys.attacker
if hHero:GetModelName() == "models/heroes/attachto_ghost/pa_gravestone_ghost.vmdl" then
hHero.iParticle1 = ParticleManager:CreateParticle("particles/econ/items/invoker/invoker_ti6/invoker_tornado_ti6_funnel.vpcf", PATTACH_ABSORIGIN_FOLLOW, hHero)
ParticleManager:SetParticleControlEnt(hHero.iParticle1, 3, hHero, PATTACH_POINT_FOLLOW, 'follow_origin' ,hHero:GetAbsOrigin(), true)
hHero.iParticle2 = ParticleManager:CreateParticle("particles/econ/items/invoker/invoker_ti6/invoker_tornado_ti6_base.vpcf", PATTACH_ABSORIGIN_FOLLOW, hHero)
ParticleManager:SetParticleControlEnt(hHero.iParticle2, 3, hHero, PATTACH_POINT_FOLLOW, 'follow_origin' ,hHero:GetAbsOrigin(), true)
hHero:SetModelScale(15)
else
ParticleManager:DestroyParticle(hHero.iParticle1 ,true)
ParticleManager:DestroyParticle(hHero.iParticle2 ,true)
hHero:SetModelScale(1)
end
end |
-- This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild
--
-- This file is compatible with Lua 5.3
local class = require("class")
require("kaitaistruct")
local enum = require("enum")
local stringstream = require("string_stream")
local utils = require("utils")
local str_decode = require("string_decode")
require("bytes_with_io")
--
-- Portable Compiled Format (PCF) font is a bitmap font format
-- originating from X11 Window System. It matches BDF format (which is
-- text-based) closely, but instead being binary and
-- platform-independent (as opposed to previously used SNF binary
-- format) due to introduced features to handle different endianness
-- and bit order.
--
-- The overall composition of the format is straightforward: it's more
-- or less classic directory of type-offset-size pointers, pointing to
-- what PCF format calls "tables". Each table carries a certain
-- piece of information related to the font (metadata properties,
-- metrics, bitmaps, mapping of glyphs to characters, etc).
-- See also: Source (https://fontforge.org/docs/techref/pcf-format.html)
PcfFont = class.class(KaitaiStruct)
PcfFont.Types = enum.Enum {
properties = 1,
accelerators = 2,
metrics = 4,
bitmaps = 8,
ink_metrics = 16,
bdf_encodings = 32,
swidths = 64,
glyph_names = 128,
bdf_accelerators = 256,
}
function PcfFont:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function PcfFont:_read()
self.magic = self._io:read_bytes(4)
if not(self.magic == "\001\102\099\112") then
error("not equal, expected " .. "\001\102\099\112" .. ", but got " .. self.magic)
end
self.num_tables = self._io:read_u4le()
self.tables = {}
for i = 0, self.num_tables - 1 do
self.tables[i + 1] = PcfFont.Table(self._io, self, self._root)
end
end
--
-- Table offers a offset + length pointer to a particular
-- table. "Type" of table references certain enum. Applications can
-- ignore enum values which they don't support.
PcfFont.Table = class.class(KaitaiStruct)
function PcfFont.Table:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function PcfFont.Table:_read()
self.type = PcfFont.Types(self._io:read_u4le())
self.format = PcfFont.Format(self._io, self, self._root)
self.len_body = self._io:read_u4le()
self.ofs_body = self._io:read_u4le()
end
PcfFont.Table.property.body = {}
function PcfFont.Table.property.body:get()
if self._m_body ~= nil then
return self._m_body
end
local _pos = self._io:pos()
self._io:seek(self.ofs_body)
local _on = self.type
if _on == PcfFont.Types.properties then
self._raw__m_body = self._io:read_bytes(self.len_body)
local _io = KaitaiStream(stringstream(self._raw__m_body))
self._m_body = PcfFont.Table.Properties(_io, self, self._root)
elseif _on == PcfFont.Types.bdf_encodings then
self._raw__m_body = self._io:read_bytes(self.len_body)
local _io = KaitaiStream(stringstream(self._raw__m_body))
self._m_body = PcfFont.Table.BdfEncodings(_io, self, self._root)
elseif _on == PcfFont.Types.swidths then
self._raw__m_body = self._io:read_bytes(self.len_body)
local _io = KaitaiStream(stringstream(self._raw__m_body))
self._m_body = PcfFont.Table.Swidths(_io, self, self._root)
elseif _on == PcfFont.Types.glyph_names then
self._raw__m_body = self._io:read_bytes(self.len_body)
local _io = KaitaiStream(stringstream(self._raw__m_body))
self._m_body = PcfFont.Table.GlyphNames(_io, self, self._root)
elseif _on == PcfFont.Types.bitmaps then
self._raw__m_body = self._io:read_bytes(self.len_body)
local _io = KaitaiStream(stringstream(self._raw__m_body))
self._m_body = PcfFont.Table.Bitmaps(_io, self, self._root)
else
self._m_body = self._io:read_bytes(self.len_body)
end
self._io:seek(_pos)
return self._m_body
end
--
-- Table containing scalable widths of characters.
-- See also: Source (https://fontforge.org/docs/techref/pcf-format.html#the-scalable-widths-table)
PcfFont.Table.Swidths = class.class(KaitaiStruct)
function PcfFont.Table.Swidths:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function PcfFont.Table.Swidths:_read()
self.format = PcfFont.Format(self._io, self, self._root)
self.num_glyphs = self._io:read_u4le()
self.swidths = {}
for i = 0, self.num_glyphs - 1 do
self.swidths[i + 1] = self._io:read_u4le()
end
end
--
-- The scalable width of a character is the width of the corresponding
-- PostScript character in em-units (1/1000ths of an em).
--
-- Array of properties (key-value pairs), used to convey different X11
-- settings of a font. Key is always an X font atom.
-- See also: Source (https://fontforge.org/docs/techref/pcf-format.html#properties-table)
PcfFont.Table.Properties = class.class(KaitaiStruct)
function PcfFont.Table.Properties:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function PcfFont.Table.Properties:_read()
self.format = PcfFont.Format(self._io, self, self._root)
self.num_props = self._io:read_u4le()
self.props = {}
for i = 0, self.num_props - 1 do
self.props[i + 1] = PcfFont.Table.Properties.Prop(self._io, self, self._root)
end
self.padding = self._io:read_bytes(utils.box_unwrap(((self.num_props & 3) == 0) and utils.box_wrap(0) or ((4 - (self.num_props & 3)))))
self.len_strings = self._io:read_u4le()
self._raw_strings = self._io:read_bytes(self.len_strings)
local _io = KaitaiStream(stringstream(self._raw_strings))
self.strings = BytesWithIo(_io)
end
--
-- Strings buffer. Never used directly, but instead is
-- addressed by offsets from the properties.
--
-- Property is a key-value pair, "key" being always a
-- string and "value" being either a string or a 32-bit
-- integer based on an additinal flag (`is_string`).
--
-- Simple offset-based mechanism is employed to keep this
-- type's sequence fixed-sized and thus have simple access
-- to property key/value by index.
PcfFont.Table.Properties.Prop = class.class(KaitaiStruct)
function PcfFont.Table.Properties.Prop:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function PcfFont.Table.Properties.Prop:_read()
self.ofs_name = self._io:read_u4le()
self.is_string = self._io:read_u1()
self.value_or_ofs_value = self._io:read_u4le()
end
--
-- Name of the property addressed in the strings buffer.
PcfFont.Table.Properties.Prop.property.name = {}
function PcfFont.Table.Properties.Prop.property.name:get()
if self._m_name ~= nil then
return self._m_name
end
local _io = self._parent.strings._io
local _pos = _io:pos()
_io:seek(self.ofs_name)
self._m_name = str_decode.decode(_io:read_bytes_term(0, false, true, true), "UTF-8")
_io:seek(_pos)
return self._m_name
end
--
-- Value of the property addressed in the strings
-- buffer, if this is a string value.
PcfFont.Table.Properties.Prop.property.str_value = {}
function PcfFont.Table.Properties.Prop.property.str_value:get()
if self._m_str_value ~= nil then
return self._m_str_value
end
if self.is_string ~= 0 then
local _io = self._parent.strings._io
local _pos = _io:pos()
_io:seek(self.value_or_ofs_value)
self._m_str_value = str_decode.decode(_io:read_bytes_term(0, false, true, true), "UTF-8")
_io:seek(_pos)
end
return self._m_str_value
end
--
-- Value of the property, if this is an integer value.
PcfFont.Table.Properties.Prop.property.int_value = {}
function PcfFont.Table.Properties.Prop.property.int_value:get()
if self._m_int_value ~= nil then
return self._m_int_value
end
if self.is_string == 0 then
self._m_int_value = self.value_or_ofs_value
end
return self._m_int_value
end
--
-- Offset to name in the strings buffer.
--
-- Designates if value is an integer (zero) or a string (non-zero).
--
-- If the value is an integer (`is_string` is false),
-- then it's stored here. If the value is a string
-- (`is_string` is true), then it stores offset to the
-- value in the strings buffer.
--
-- Table that allows mapping of character codes to glyphs present in the
-- font. Supports 1-byte and 2-byte character codes.
--
-- Note that this mapping is agnostic to character encoding itself - it
-- can represent ASCII, Unicode (ISO/IEC 10646), various single-byte
-- national encodings, etc. If application cares about it, normally
-- encoding will be specified in `properties` table, in the properties named
-- `CHARSET_REGISTRY` / `CHARSET_ENCODING`.
-- See also: Source (https://fontforge.org/docs/techref/pcf-format.html#the-encoding-table)
PcfFont.Table.BdfEncodings = class.class(KaitaiStruct)
function PcfFont.Table.BdfEncodings:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function PcfFont.Table.BdfEncodings:_read()
self.format = PcfFont.Format(self._io, self, self._root)
self.min_char_or_byte2 = self._io:read_u2le()
self.max_char_or_byte2 = self._io:read_u2le()
self.min_byte1 = self._io:read_u2le()
self.max_byte1 = self._io:read_u2le()
self.default_char = self._io:read_u2le()
self.glyph_indexes = {}
for i = 0, (((self.max_char_or_byte2 - self.min_char_or_byte2) + 1) * ((self.max_byte1 - self.min_byte1) + 1)) - 1 do
self.glyph_indexes[i + 1] = self._io:read_u2le()
end
end
--
-- Table containing character names for every glyph.
-- See also: Source (https://fontforge.org/docs/techref/pcf-format.html#the-glyph-names-table)
PcfFont.Table.GlyphNames = class.class(KaitaiStruct)
function PcfFont.Table.GlyphNames:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function PcfFont.Table.GlyphNames:_read()
self.format = PcfFont.Format(self._io, self, self._root)
self.num_glyphs = self._io:read_u4le()
self.names = {}
for i = 0, self.num_glyphs - 1 do
self.names[i + 1] = PcfFont.Table.GlyphNames.StringRef(self._io, self, self._root)
end
self.len_strings = self._io:read_u4le()
self._raw_strings = self._io:read_bytes(self.len_strings)
local _io = KaitaiStream(stringstream(self._raw_strings))
self.strings = BytesWithIo(_io)
end
--
-- Glyph names are represented as string references in strings buffer.
--
-- Strings buffer which contains all glyph names.
PcfFont.Table.GlyphNames.StringRef = class.class(KaitaiStruct)
function PcfFont.Table.GlyphNames.StringRef:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function PcfFont.Table.GlyphNames.StringRef:_read()
self.ofs_string = self._io:read_u4le()
end
PcfFont.Table.GlyphNames.StringRef.property.value = {}
function PcfFont.Table.GlyphNames.StringRef.property.value:get()
if self._m_value ~= nil then
return self._m_value
end
local _io = self._parent.strings._io
local _pos = _io:pos()
_io:seek(self.ofs_string)
self._m_value = str_decode.decode(_io:read_bytes_term(0, false, true, true), "UTF-8")
_io:seek(_pos)
return self._m_value
end
--
-- Table containing uncompressed glyph bitmaps.
-- See also: Source (https://fontforge.org/docs/techref/pcf-format.html#the-bitmap-table)
PcfFont.Table.Bitmaps = class.class(KaitaiStruct)
function PcfFont.Table.Bitmaps:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function PcfFont.Table.Bitmaps:_read()
self.format = PcfFont.Format(self._io, self, self._root)
self.num_glyphs = self._io:read_u4le()
self.offsets = {}
for i = 0, self.num_glyphs - 1 do
self.offsets[i + 1] = self._io:read_u4le()
end
self.bitmap_sizes = {}
for i = 0, 4 - 1 do
self.bitmap_sizes[i + 1] = self._io:read_u4le()
end
end
--
-- Table format specifier, always 4 bytes. Original implementation treats
-- it as always little-endian and makes liberal use of bitmasking to parse
-- various parts of it.
--
-- TODO: this format specification recognizes endianness and bit
-- order format bits, but it does not really takes any parsing
-- decisions based on them.
-- See also: Source (https://fontforge.org/docs/techref/pcf-format.html#file-header)
PcfFont.Format = class.class(KaitaiStruct)
function PcfFont.Format:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function PcfFont.Format:_read()
self.padding1 = self._io:read_bits_int_be(2)
self.scan_unit_mask = self._io:read_bits_int_be(2)
self.is_most_significant_bit_first = self._io:read_bits_int_be(1)
self.is_big_endian = self._io:read_bits_int_be(1)
self.glyph_pad_mask = self._io:read_bits_int_be(2)
self._io:align_to_byte()
self.format = self._io:read_u1()
self.padding = self._io:read_u2le()
end
--
-- If set, then all integers in the table are treated as big-endian.
|
--[[-------------------------------------------------------------------------
{
['photos'] = {
[1] = {
[1] = {
['file_id'] = 'AgADAgADqqcxGyOJMwVezQOVQ0hDs5YbgyoABCv*****************',
['width'] = 160,
['file_size'] = 9504,
['height'] = 160,
},
[2] = {
['file_id'] = 'AgADAgADqqcxGyOJMwVezQOVQ0hDs5YbgyoABF6*****************',
['width'] = 320,
['file_size'] = 20568,
['height'] = 320,
},
[3] = {
['file_id'] = 'AgADAgADqqcxGyOJMwVezQOVQ0hDs5YbgyoABF1*****************',
['width'] = 640,
['file_size'] = 59005,
['height'] = 640,
},
},
},
['total_count'] = 1,
}
---------------------------------------------------------------------------]]
local UPP = TLG.NewObjectBase("UserProfilePhotos")
-- int
function UPP:Total()
return self.total_count
end
function UPP:Photos()
for photo_id = 1,#self.photos do
for size_id = 1,#self.photos[photo_id] do
TLG.SetMeta(self.photos[photo_id][size_id],"PhotoSize")
end
end
return self.photos
end
|
--[[
This file is part of 'Masque', an add-on for World of Warcraft. For license information,
please see the included License.txt file or visit https://github.com/StormFX/Masque.
* File...: Options\Info.lua
* Author.: StormFX
'Installed Skins' Group/Panel
]]
-- GLOBALS: LibStub
local MASQUE, Core = ...
----------------------------------------
-- Lua
---
local pairs, tostring = pairs, tostring
----------------------------------------
-- Libraries
---
local LIB_ACR = LibStub("AceConfigRegistry-3.0")
----------------------------------------
-- Locals
---
-- @ Options\Core
local Setup = Core.Setup
-- @ Locales\enUS
local L = Core.Locale
----------------------------------------
-- Utility
---
local GetInfoGroup
do
-- Formatted Text
local UPDATED = "|cff00ff00"..L["Compatible"].."|r"
local COMPATIBLE = "|cffffff00"..L["Compatible"].."|r"
local INCOMPATIBLE = "|cffff0000"..L["Incompatible"].."|r"
local UNKNOWN = "|cff777777"..L["Unknown"].."|r"
-- Versions
local API = Core.API_VERSION
local OLD = Core.OLD_VERSION
-- Returns the Status text and tooltip for a skin based on its Masque_Version setting.
local function GetStatus(Version)
if not Version then
return UNKNOWN, L["The status of this skin is unknown."]
elseif Version < OLD then
return INCOMPATIBLE, L["This skin is outdated and is incompatible with Masque."]
elseif Version < API then
return COMPATIBLE, L["This skin is outdated but is still compatible with Masque."]
else
return UPDATED, L["This skin is compatible with Masque."]
end
end
----------------------------------------
-- Options Builder
---
-- Reusable Header
local HDR = {
type = "description",
name = "|cffffcc00"..L["Description"].."|r\n",
order = 1,
fontSize = "medium",
}
-- Creates a skin info options group.
function GetInfoGroup(Skin, Group)
local Title = (Group and Skin.Title) or Skin.SkinID
local Order = (Group and Skin.Order) or nil
local Description = Skin.Description or L["No description available."]
local Version = (Skin.Version and tostring(Skin.Version)) or UNKNOWN
local Authors = Skin.Authors or Skin.Author or UNKNOWN
local Websites = Skin.Websites or Skin.Website
local Status, Tooltip = GetStatus(Skin.Masque_Version)
-- Options Group
local Info = {
type = "group",
name = Title,
order = Order,
args = {
Head = HDR,
Desc = {
type = "description",
name = Description.."\n",
order = 2,
fontSize = "medium",
},
Info = {
type = "group",
name = "",
order = 3,
inline = true,
args = {
Version = {
type = "input",
name = L["Version"],
arg = Version.."\n",
order = 1,
disabled = true,
dialogControl = "SFX-Info",
},
},
},
},
}
local args = Info.args.Info.args
Order = 2
-- Populate the Author field(s).
if type(Authors) == "table" then
local Count = #Authors
if Count > 0 then
for i = 1, Count do
local Key = "Author"..i
local Name = (i == 1 and L["Authors"]) or ""
args[Key] = {
type = "input",
name = Name,
arg = Authors[i],
order = Order,
disabled = true,
dialogControl = "SFX-Info",
}
Order = Order + 1
end
args["SPC"..Order] = {
type = "description",
name = " ",
order = Order,
}
Order = Order + 1
end
elseif type(Authors) == "string" then
args.Author = {
type = "input",
name = L["Author"],
arg = Authors,
order = Order,
disabled = true,
dialogControl = "SFX-Info",
}
Order = Order + 1
args["SPC"..Order] = {
type = "description",
name = " ",
order = Order,
}
Order = Order + 1
end
-- Populate the Website field(s).
if type(Websites) == "table" then
local Count = #Websites
if Count > 0 then
for i = 1, Count do
local Key = "Website"..i
local Name = (i == 1) and L["Websites"] or ""
args[Key] = {
type = "input",
name = Name,
arg = Websites[i],
order = Order,
dialogControl = "SFX-Info-URL",
}
Order = Order + 1
end
args["SPC"..Order] = {
type = "description",
name = " ",
order = Order,
}
Order = Order + 1
end
elseif type(Websites) == "string" then
args.Website = {
type = "input",
name = L["Website"],
arg = Websites,
order = Order,
dialogControl = "SFX-Info",
}
Order = Order + 1
args["SPC"..Order] = {
type = "description",
name = " ",
order = Order,
}
Order = Order + 1
end
-- Status
args.Status = {
type = "input",
name = L["Status"],
desc = Tooltip,
arg = Status,
order = Order,
dialogControl = "SFX-Info",
}
return Info
end
end
----------------------------------------
-- Setup
---
-- Creates/Removes the 'Installed Skins' options group/panel.
function Setup.Info(self)
if not self.OptionsLoaded then return end
local cArgs = self.Options.args.Core.args
if not self.db.profile.SkinInfo then
cArgs.SkinInfo = nil
elseif not cArgs.SkinInfo then
local Tooltip = "|cffffffff"..L["Select to view."].."|r"
local Options = {
type = "group",
name = L["Installed Skins"],
desc = Tooltip,
get = self.GetArg,
set = self.NoOp,
order = 4,
args = {
Head = {
type = "description",
name = "|cffffcc00"..L["Installed Skins"].."|r\n",
fontSize = "medium",
order = 0,
},
Desc = {
type = "description",
name = L["This section provides information on any skins you have installed."].."\n",
fontSize = "medium",
order = 1,
},
},
}
local Skins, SkinList = self.Skins, self.SkinList
local args = Options.args
-- Create the info groups.
for SkinID in pairs(SkinList) do
local Skin = Skins[SkinID]
local Group = Skin.Group
if Group then
if not args[Group] then
args[Group] = {
type = "group",
name = Group,
desc = Tooltip,
args = {},
childGroups = "select",
}
end
args[Group].args[SkinID] = GetInfoGroup(Skin, Group)
else
args[SkinID] = GetInfoGroup(Skin)
args[SkinID].desc = Tooltip
end
end
cArgs.SkinInfo = Options
else
return
end
LIB_ACR:NotifyChange(MASQUE)
end
|
entities.require("item_welder")
class "item_welder_industrial" ("item_welder")
item_welder_industrial._anims = {
welder = item_welder._sprite:createAnimInstance("ind"),
on = item_welder._sprite:createAnimInstance("ind_on"),
fuel = {
["100"] = item_welder._sprite:createAnimInstance("ind_100"),
["75"] = item_welder._sprite:createAnimInstance("ind_75"),
["50"] = item_welder._sprite:createAnimInstance("ind_50"),
["25"] = item_welder._sprite:createAnimInstance("ind_25"),
["0"] = item_welder._sprite:createAnimInstance("ind_0"),
}
}
function item_welder_industrial:item_welder_industrial()
item_welder.item_welder(self)
self.maxFuel = 40
self.fuel = 40
self.anims = item_welder_industrial._anims
end
entities.linkToClassname( item_welder_industrial, "item_welder_industrial" )
|
-- Dimensional Sample --
-- Item --
local dsI = {}
dsI.type = "tool"
dsI.name = "DimensionalSample"
dsI.durability = 1
dsI.infinite = false
dsI.icon = "__Mobile_Factory_Graphics__/graphics/icones/DimensionalSampleI.png"
dsI.icon_size = 64
dsI.subgroup = "Resources"
dsI.order = "b"
dsI.stack_size = 1000
data:extend{dsI}
-- Recipe --
local dsR = {}
dsR.type = "recipe"
dsR.name = "DimensionalSample"
dsR.energy_required = 1
dsR.ingredients =
{
{"DimensionalOre", 1}
}
dsR.result = "DimensionalSample"
dsR.result_count = 3
data:extend{dsR} |
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local modpath_default = minetest.get_modpath("default")
-- table_def can have the following:
--{
-- show_guides = true or false,
-- alphabetize_items = true or false,
-- description = string,
-- hopper_node_name = string,
-- enable_pipeworks = true or false,
-- append_to_formspec = string,
-- protect_inventory = true or false,
--}
simplecrafting_lib.generate_table_functions = function(craft_type, table_def)
if table_def == nil then
table_def = {}
end
local output_width = 8
local output_height = 6
local output_count = output_width * output_height
-- Hopper compatibility
if table_def.hopper_node_name and minetest.get_modpath("hopper") and hopper ~= nil and hopper.add_container ~= nil then
hopper:add_container({
{"top", table_def.hopper_node_name, "input"},
{"bottom", table_def.hopper_node_name, "input"},
{"side", table_def.hopper_node_name, "input"},
})
end
local function make_formspec(pos, meta, inv)
local row = meta:get_int("row")
local item_count = inv:get_size("output")
local max_mode = meta:get_string("max_mode") == "True"
local pos_string = pos.x .. "," .. pos.y .. "," ..pos.z
local inventory = {
"size[10.2,10.2]",
"list[nodemeta:"..pos_string..";input;0,0.5;2,5;]",
"list[nodemeta:"..pos_string..";output;2.2,0;"..output_width..","..output_height..";" , tostring(row*output_width), "]",
"list[current_player;main;1.1,6.25;8,1;]",
"list[current_player;main;1.1,7.5;8,3;8]",
"listring[nodemeta:"..pos_string..";output]",
"listring[current_player;main]",
"listring[nodemeta:"..pos_string..";input]",
"listring[current_player;main]",
}
if table_def.description then
inventory[#inventory+1] = "label[0,0;"..table_def.description.."]"
end
if modpath_default then
inventory[#inventory+1] = default.gui_bg
inventory[#inventory+1] = default.gui_bg_img
inventory[#inventory+1] = default.gui_slots
end
local pages = false
local page_button_y = "7.3"
if item_count > ((row/output_height)+1) * output_count then
inventory[#inventory+1] = "button[9.3,"..page_button_y..";1,0.75;next;»]"
inventory[#inventory+1] = "tooltip[next;"..S("Next page of crafting products").."]"
page_button_y = "8.0"
pages = true
end
if row >= output_height then
inventory[#inventory+1] = "button[9.3,"..page_button_y..";1,0.75;prev;«]"
inventory[#inventory+1] = "tooltip[prev;"..S("Previous page of crafting products").."]"
pages = true
end
if pages then
inventory[#inventory+1] = "label[9.3,6.5;" .. S("Page @1", tostring(row/output_height+1)) .. "]"
end
if max_mode then
inventory[#inventory+1] = "button[9.3,8.7;1,0.75;max_mode;"..S("Max\nOutput").."]"
else
inventory[#inventory+1] = "button[9.3,8.7;1,0.75;max_mode;"..S("Min\nOutput").."]"
end
if table_def.show_guides then
inventory[#inventory+1] = "button[9.3,9.7;1,0.75;show_guide;"..S("Show\nGuide").."]"
end
if table_def.append_to_formspec then
inventory[#inventory+1] = table_def.append_to_formspec
end
return table.concat(inventory), row
end
local function refresh_output(inv, max_mode)
local craftable = simplecrafting_lib.get_craftable_items(craft_type, inv:get_list("input"), max_mode, table_def.alphabetize_items)
inv:set_size("output", #craftable + (output_count - (#craftable%output_count)))
inv:set_list("output", craftable)
end
local function refresh_inv(pos, meta)
local inv = meta:get_inventory()
local max_mode = meta:get_string("max_mode")
refresh_output(inv, max_mode == "True")
local row = meta:get_int("row")
local item_count = inv:get_size("output")
if item_count < output_count then
meta:set_int("row", 0)
elseif (row*output_width)+output_count > item_count then
meta:set_int("row", (item_count - output_count) / output_width)
end
end
local on_construct = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size("input", 2*5)
inv:set_size("output", output_count)
meta:set_int("row", 0)
end
local allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, number, player)
if to_list == "output" then
return 0
end
if table_def.protect_inventory and
minetest.is_protected(pos, player:get_player_name())
and not minetest.check_player_privs(player:get_name(), "protection_bypass") then
return 0
end
if to_list == "input" then
if from_list == "input" then
return number
end
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local stack = inv:get_stack(from_list, from_index)
if simplecrafting_lib.is_possible_input(craft_type, stack:get_name()) then
return number
end
end
return 0
end
local _pipeworks_override_player = {} -- Horrible hack. Pipeworks gets to insert stuff regardless of protection.
local allow_metadata_inventory_put = function(pos, list_name, index, stack, player)
if table_def.protect_inventory and
player ~= _pipeworks_override_player and
minetest.is_protected(pos, player:get_player_name())
and not minetest.check_player_privs(player:get_name(), "protection_bypass") then
return 0
end
if list_name == "output" then
return 0
end
if list_name == "input" and simplecrafting_lib.is_possible_input(craft_type, stack:get_name()) then
return stack:get_count()
end
return 0
end
-- Pipeworks compatibility
local tube = nil
if table_def.enable_pipeworks and minetest.get_modpath("pipeworks") then
tube = {
insert_object = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
return inv:add_item("input", stack)
end,
can_insert = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
return allow_metadata_inventory_put(pos, "input", 1, stack, _pipeworks_override_player) > 0 and inv:room_for_item("input", stack)
end,
input_inventory = "input",
connect_sides = {left = 1, right = 1, back = 1, bottom = 1, top = 1}
}
end
local function allow_metadata_inventory_take(pos, listname, index, stack, player)
if table_def.protect_inventory and
minetest.is_protected(pos, player:get_player_name())
and not minetest.check_player_privs(player:get_name(), "protection_bypass") then
return 0
end
return stack:get_count()
end
local on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, number, player)
local meta = minetest.get_meta(pos)
if from_list == "output" and to_list == "input" then
local inv = meta:get_inventory()
local stack = inv:get_stack(to_list, to_index)
stack:set_count(number)
simplecrafting_lib.craft_stack(craft_type, stack, inv, "input", inv, to_list, player)
if simplecrafting_lib.award_crafting then
simplecrafting_lib.award_crafting(player, stack)
end
end
refresh_inv(pos, meta)
end
local on_metadata_inventory_take = function(pos, list_name, index, stack, player)
local meta = minetest.get_meta(pos)
if list_name == "output" then
local inv = meta:get_inventory()
simplecrafting_lib.craft_stack(craft_type, stack, inv, "input", player:get_inventory(), "main", player)
if modpath_awards then
awards.increment_item_counter(awards.players[player:get_player_name()], "craft", ItemStack(stack):get_name(), ItemStack(stack):get_count())
end
end
refresh_inv(pos, meta)
end
local on_metadata_inventory_put = function(pos, list_name, index, stack, player)
local meta = minetest.get_meta(pos)
refresh_inv(pos, meta)
end
local on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
minetest.show_formspec(clicker:get_player_name(),
"simplecrafting_lib:table_"..craft_type..minetest.pos_to_string(pos),
make_formspec(pos, meta, inv))
end
local can_dig = function(pos, player)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
return inv:is_empty("input")
end
local prefix_length = string.len("simplecrafting_lib:table_"..craft_type)
minetest.register_on_player_receive_fields(function(sender, formname, fields)
if string.sub(formname, 1, prefix_length) ~= "simplecrafting_lib:table_"..craft_type then
return false -- not a formspec we handle
end
local pos = minetest.string_to_pos(string.sub(formname, prefix_length+1))
if pos == nil then return false end
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local size = inv:get_size("output")
local row = meta:get_int("row")
if fields.next then
minetest.sound_play("paperflip1", {to_player=sender:get_player_name(), gain = 1.0})
row = row + output_height
meta:set_int("row", row)
elseif fields.prev then
minetest.sound_play("paperflip2", {to_player=sender:get_player_name(), gain = 1.0})
row = row - output_height
meta:set_int("row", row)
elseif fields.max_mode then
local max_mode = meta:get_string("max_mode")
if max_mode == "" then
max_mode = "True"
else
max_mode = ""
end
meta:set_string("max_mode", max_mode)
refresh_output(inv, max_mode == "True")
elseif fields.show_guide and table_def.show_guides then
simplecrafting_lib.show_crafting_guide(craft_type, sender, function()
minetest.after(0.1, function()
minetest.show_formspec(sender:get_player_name(), formname, make_formspec(pos, meta, inv))
end)
end)
return true
elseif fields.quit then
return true
end
minetest.show_formspec(sender:get_player_name(), formname, make_formspec(pos, meta, inv))
return true
end)
return {
allow_metadata_inventory_move = allow_metadata_inventory_move,
allow_metadata_inventory_put = allow_metadata_inventory_put,
allow_metadata_inventory_take = allow_metadata_inventory_take,
can_dig = can_dig,
on_construct = on_construct,
on_metadata_inventory_move = on_metadata_inventory_move,
on_metadata_inventory_put = on_metadata_inventory_put,
on_metadata_inventory_take = on_metadata_inventory_take,
on_rightclick = on_rightclick,
tube = tube,
}
end |
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md
--
-- Description: Check that if the first PTU via mobile application for the App1 was performed, the second PTU via HMI
-- will be performed successfully after registration of the App2
--
-- Preconditions:
-- 1. SDL and HMI are started
-- 2. App1 is registered
-- 3. PTU via mobile App1 was performed successfully
-- 4. App2 is registered
--
-- Steps:
-- 1) The second PTU is triggered
-- SDL does:
-- a) send SDL.OnStatusUpdate(UPDATE_NEEDED) notification to the HMI,
-- b) create the PTS,
-- c) send BC.PolicyUpdate request to the HMI
-- 2) HMI sends BC.PolicyUpdate response with resultCode "SUCCESS" to the SDL
-- SDL does:
-- a) send SDL.OnStatusUpdate(UPDATING) notification to the HMI
-- 3) HMI requests endpoints for service 7 sending GetPolicyConfigurationData rpc to the SDL
-- SDL does:
-- a) send GetPolicyConfigurationData response with endpoints for the requested service 7
-- 4) HMI decodes the file received from the policy server successfully and
-- sends OnReceivedPolicyUpdate notification to the SDL
-- SDL does:
-- a) check that PTU is correct and send SDL.OnStatusUpdate(UP_TO_DATE) notification to the HMI
-- b) send OnPermissionsChange notification to the App1 and to the App2
---------------------------------------------------------------------------------------------------
--[[ Required Shared libraries ]]
local runner = require('user_modules/script_runner')
local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu')
--[[ Test Configuration ]]
runner.testSettings.isSelfIncluded = false
runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } }
--[[ Local Variables ]]
local appSessionId1 = 1
local appSessionId2 = 2
--[[ Scenario ]]
runner.Title("Preconditions")
runner.Step("Clean environment", common.preconditions)
runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start)
runner.Step("Register App1", common.registerApp, { appSessionId1 })
runner.Step("PTU via mobile application", common.policyTableUpdate)
runner.Step("Register App2", common.registerApp, { appSessionId2 })
runner.Title("Test")
runner.Step("Second PTU via HMI", common.ptuViaHMI, { common.PTUfuncWithNewGroup })
runner.Title("Postconditions")
runner.Step("Stop SDL", common.postconditions)
|
--// Initialization
local CollectionService = game:GetService("CollectionService")
local Module = {}
--// Functions
function Module.BindToTag(Tag, Callback)
for _, TaggedItem in next, CollectionService:GetTagged(Tag) do
coroutine.wrap(Callback)(TaggedItem)
end
return CollectionService:GetInstanceAddedSignal(Tag):Connect(Callback)
end
function Module.BindToTagRemoved(Tag, Callback)
return CollectionService:GetInstanceRemovedSignal(Tag):Connect(Callback)
end
return Module |
local activityData = {
{ factor=0, name="Премия за добросовестное исполнение обязанностей"},
{ factor=0, name="отсутствует" },
{ factor=5, name="5% от оклада по ВД"},
{ factor=10, name="10% от оклада по ВД" },
{ factor=15, name="15% от оклада по ВД" },
{ factor=20, name="20% от оклада по ВД" },
{ factor=25, name="25% от оклада по ВД" },
}
return activityData; |
local M = {}
function M.config(opts)
local new_opts = vim.tbl_deep_extend("force", {
settings = {
Lua = {
runtime = {version = 'LuaJIT', path = vim.split(package.path, ';')},
diagnostics = {globals = {'vim'}},
workspace = {library = vim.api.nvim_get_runtime_file("", true), checkThirdParty = false},
telemetry = {enable = false}
}
}
}, opts)
return new_opts
end
return M
|
local spell = Spell("instant")
function spell.onCastSpell(creature, variant)
return creature:conjureItem(3147, 3200, 6)
end
spell:name("Explosion Rune")
spell:words("adevo mas hur")
spell:group("support")
spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true")
spell:cooldown(2 * 1000)
spell:groupCooldown(2 * 1000)
spell:level(31)
spell:mana(570)
spell:soul(4)
spell:isAggressive(false)
spell:needLearn(false)
spell:register()
|
-- Generated by LairTool
geonosis_security1_droid_neutral = Lair:new {
mobiles = {{"security1_droid",1}},
bossMobiles = {{"security1_droid_boss",1}},
spawnLimit = 15,
buildingsVeryEasy = {"object/tangible/lair/base/poi_all_lair_rock_shelter_large_evil_fire_small.iff"},
buildingsEasy = {"object/tangible/lair/base/poi_all_lair_rock_shelter_large_evil_fire_small.iff"},
buildingsMedium = {"object/tangible/lair/base/poi_all_lair_rock_shelter_large_evil_fire_small.iff"},
buildingsHard = {"object/tangible/lair/base/poi_all_lair_rock_shelter_large_evil_fire_small.iff"},
buildingsVeryHard = {"object/tangible/lair/base/poi_all_lair_rock_shelter_large_evil_fire_small.iff"},
}
addLairTemplate("geonosis_security1_droid_neutral", geonosis_security1_droid_neutral)
|
syn_getmenv(game.ChildAdded)
cloneref(game.ChildAdded)
syn_getsenv(game.ChildAdded)
getsenv(game.ChildAdded)
getmenv(game.ChildAdded)
setnamecallmethod(1)
debug.getstack(1, 214748368)
local _ = clonefunction(getrenv().getfenv)
hookfunction(getrenv().getfenv, function(...) _(...) end)
getgenv().getfenv(1, "OwO")
--DANGEROUS METHOD ( Not really, lol )
local function Start()
local script = game:FindFirstChildWhichIsA("LocalScript", true)
for i = 0,1000000 do
coroutine.resume(coroutine.create(function()
decompile(script)
end))
end
end
--Start()
|
--
-- Copyright (c) 2014, 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('fb.luaunit')
local ffivector = require('fb.ffivector')
function testIntFFIVector()
local v = ffivector.new_int()
v:resize(42)
assertEquals(42, #v)
assertTrue(v:capacity() >= 42)
for i = 1, 42 do
assertEquals(0, v[i])
end
assertError(function() return v[0] end)
assertError(function() return v[43] end)
for i = 1, 42 do
v[i] = i * 10
end
for i = 1, 42 do
assertEquals(i * 10, v[i])
end
end
function testStructFFIVector()
local v = ffivector.new('struct { int a; int64_t b; }')
v:resize(42)
for i = 1, 42 do
p = v[i] -- it's a reference!
p.a = i * 10
p.b = i * 100
end
for i = 1, 42 do
assertEquals(i * 10, v[i].a)
assertEquals(i * 100, tonumber(v[i].b))
end
end
function testStringFFIVector()
local v = ffivector.new_string()
v:resize(42)
for i = 1, 42 do
v[i] = 'hello ' .. tostring(i)
end
collectgarbage() -- temp strings should no longer be allocated
for i = 1, 42 do
assertEquals('hello ' .. tostring(i), v[i])
end
end
function testStringFFIVectorDestruction()
do
local v = ffivector.new_string()
end
collectgarbage()
end
function testFFIVectorDestruction()
local destructor_count = 0
do
local v = ffivector.new(
'int', 0, tonumber, nil,
function(x) destructor_count = destructor_count + 1 end)
v:resize(42)
assertEquals(0, destructor_count)
v[10] = 10
assertEquals(1, destructor_count)
v[42] = 10
assertEquals(2, destructor_count)
v[43] = 10
assertEquals(2, destructor_count)
assertEquals(43, #v)
v:resize(50)
assertEquals(2, destructor_count)
assertEquals(50, #v)
v:resize(40)
assertEquals(12, destructor_count)
assertEquals(40, #v)
end
collectgarbage()
assertEquals(52, destructor_count)
end
LuaUnit:main()
|
-- INIT
State_Init = {}
State_Init["Enter"] = function(actor)
actor:setHealth(100);
width = 16;--math.random(4, 32);
height = 72;--width*(math.random(20, 45)/10);
actor:setSize(width, height);
actor:changeState(State_Wander);
end
State_Init["Execute"] = function(actor)
end
State_Init["Exit"] = function(actor)
end
-- IDLE
State_Idle = {timer = 0, limit = math.random(120, 480)}
State_Idle["Enter"] = function(actor)
State_Idle.timer = 0;
end
State_Idle["Execute"] = function(actor)
State_Idle.timer = State_Idle.timer + 1;
if State_Idle.timer > State_Idle.limit then
actor:changeState(State_Wander);
end
end
State_Idle["Exit"] = function(actor)
end
-- WANDER
State_Wander = {target = {x = 0, y = 0}, angle = 0}
State_Wander["Enter"] = function(actor)
State_Wander.target.x = math.random(-100, 100) + actor:getPositionX();
State_Wander.target.y = math.random(-100, 100) + actor:getPositionY();
State_Wander.angle = math.atan2(State_Wander.target.y - actor:getPositionY(), State_Wander.target.x - actor:getPositionX());
end
State_Wander["Execute"] = function(actor)
distance = math.sqrt(math.pow(State_Wander.target.x - actor:getPositionX(), 2) + math.pow(State_Wander.target.y - actor:getPositionY(), 2));
if distance <= 2 then
actor:setVelocity(0, 0);
actor:changeState(State_Idle);
else
x = math.cos(State_Wander.angle)*100;
y = math.sin(State_Wander.angle)*100;
actor:setVelocity(x, y);
end
end
State_Wander["Exit"] = function(actor)
end
-- FOLLOW
State_Follow = {targetID = -1}
State_Follow["Enter"] = function(actor)
end
State_Follow["Execute"] = function(actor)
end
State_Follow["Exit"] = function(actor)
end
|
local lib = require "resty.haru.library"
local enums = require "resty.haru.enums"
local icon = enums.annotation.icon
local setmetatable = setmetatable
local rawset = rawset
local type = type
local annotation = {}
annotation.__index = annotation
function annotation.new(context)
return setmetatable({ context = context }, annotation)
end
function annotation:__newindex(n, v)
if n == "icon" then
if type(v) == "string" then
v = icon[v]
end
lib.HPDF_TextAnnot_SetIcon(self.context, v)
elseif n == "opened" then
lib.HPDF_TextAnnot_SetOpened(self.context, v)
else
rawset(self, n, v)
end
end
return annotation
|
require("plugins")
require("settings")
|
function love.conf(t)
t.author = 'Qumeric'
t.identity = "Tetris"
t.version = "0.10.1"
t.window.title = "Tetris"
t.window.width = 480
t.window.height = 880
t.modules.joystick = false
t.modules.physics = false
end
|
-- Copyright © 2017
-- Scriptwriters Shutnik, AdamQQQ, Arizona Fauzie, Furious Puppy.
-- AdamQQQ 36 hero basic AI \ Warding AI \ Complex scipts for logical decisions
-- Arizona Fauzie 43 hero basic AI \ Rune AI \ ItemBuilds AI \ Complex scripts for Meepo and Invoker
-- Furious Puppy 12 hero basic AI \ Glyph AI \ Retreat logic
-- Shutnik 22 hero basic AI \ Laning behavior \ Map awarness logic \ Skill preferences \ Code adaptation
-- 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 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.
function LocHeroNum(location, radius)
local counts = 0;
local TableEnemyHero = GetUnitList( UNIT_LIST_ENEMY_HEROES );
for k, hero in pairs(TableEnemyHero) do
if ( #(location - hero:GetLocation()) < radius) then
counts = counts + 1;
end
end
return counts;
end
function Power(hero)
local ID = hero:GetPlayerID( );
local kills = GetHeroKills( ID );
local assist = GetHeroAssists( ID );
local death = GetHeroDeaths( ID );
local power = 0;
if ( hero:GetTeam( )== GetOpposingTeam() ) then
power = hero:GetRawOffensivePower( ) + hero:GetHealth() + (hero:GetHealthRegen( ) * 2.5) + ((kills - death + 0.3 * assist) * 100);
elseif ( hero:GetTeam( )== GetTeam() ) then
power = hero:GetRawOffensivePower( ) + hero:GetHealth() + (hero:GetHealthRegen( ) * 2.5) + ((kills - death + 0.3 * assist) * 100); ----Can't use GetOffensivePower( ) becaue can't use that on enemy
end
return power;
end
local TableHeroPriorityAsAlly = {
"npc_dota_hero_antimage",
"npc_dota_hero_spectre",
"npc_dota_hero_terrorblade",
"npc_dota_hero_medusa",
"npc_dota_hero_morphling",
"npc_dota_hero_chaos_knight",
"npc_dota_hero_alchemist",
"npc_dota_hero_naga_siren",
"npc_dota_hero_phantom_lancer",
"npc_dota_hero_phantom_assassin",
"npc_dota_hero_slark",
"npc_dota_hero_juggernaut",
"npc_dota_hero_sven",
"npc_dota_hero_lycan",
"npc_dota_hero_skeleton_king",
"npc_dota_hero_ursa",
"npc_dota_hero_meepo",
"npc_dota_hero_sniper",
"npc_dota_hero_drow_ranger",
"npc_dota_hero_clinkz",
"npc_dota_hero_troll_warlord",
"npc_dota_hero_luna",
"npc_dota_gyrocopter",
"npc_dota_hero_tiny",
"npc_dota_hero_nevermore",
"npc_dota_hero_tinker",
"npc_dota_hero_invoker",
"npc_dota_hero_templar_assassin",
"npc_dota_hero_ember_spirit",
"npc_dota_hero_slardar",
"npc_dota_hero_obsidian_destroyer",
"npc_dota_hero_storm_spirit",
"npc_dota_hero_razor",
"npc_dota_hero_bloodseeker",
"npc_dota_hero_arc_warden",
"npc_dota_hero_dragon_knight",
"npc_dota_hero_monkey_king",
"npc_dota_hero_queenofpain",
"npc_dota_hero_windrunner",
"npc_dota_hero_death_prophet",
"npc_dota_hero_life_stealer",
"npc_dota_hero_weaver",
"npc_dota_hero_faceless_void",
"npc_dota_hero_lone_druid",
"npc_dota_hero_necrolyte",
"npc_dota_hero_zuus",
"npc_dota_hero_leshrac",
"npc_dota_hero_bristleback",
"npc_dota_hero_huskar",
"npc_dota_hero_shredder",
"npc_dota_hero_legion_commander",
"npc_dota_hero_broodmother",
"npc_dota_hero_riki",
"npc_dota_hero_viper",
"npc_dota_hero_furion",
"npc_dota_hero_pugna",
"npc_dota_hero_puck",
"npc_dota_hero_magnataur",
"npc_dota_hero_doom_bringer",
"npc_dota_hero_centaur",
"npc_dota_hero_brewmaster",
"npc_dota_hero_tidehunter",
"npc_dota_hero_axe",
"npc_dota_hero_batrider",
"npc_dota_hero_dark_seer",
"npc_dota_hero_beastmaster",
"npc_dota_hero_sand_king",
"npc_dota_hero_abaddon",
"npc_dota_hero_mirana",
"npc_dota_hero_lina",
"npc_dota_hero_night_stalker",
"npc_dota_hero_nyx_assassin",
"npc_dota_hero_earthshaker",
"npc_dota_hero_visage",
"npc_dota_hero_rattletrap",
"npc_dota_hero_undying",
"npc_dota_hero_phoenix",
"npc_dota_hero_spirit_breaker",
"npc_dota_hero_pudge",
"npc_dota_hero_omniknight",
"npc_dota_hero_abyssal_underlord",
"npc_dota_hero_lion",
"npc_dota_hero_enigma",
"npc_dota_hero_silencer",
"npc_dota_hero_enchantress",
"npc_dota_hero_elder_titan",
"npc_dota_hero_vengefulspirit",
"npc_dota_hero_chen",
"npc_dota_hero_tusk",
"npc_dota_hero_earth_spirit",
"npc_dota_hero_bane",
"npc_dota_hero_shadow_shaman",
"npc_dota_hero_dazzle",
"npc_dota_hero_wisp",
"npc_dota_hero_disruptor",
"npc_dota_hero_rubick",
"npc_dota_hero_bounty_hunter",
"npc_dota_hero_treant",
"npc_dota_hero_venomancer",
"npc_dota_hero_jakiro",
"npc_dota_hero_techies",
"npc_dota_hero_warlock",
"npc_dota_hero_witch_doctor",
"npc_dota_hero_skywrath_mage",
"npc_dota_hero_crystal_maiden",
"npc_dota_hero_ancient_apparition",
"npc_dota_hero_shadow_demon",
"npc_dota_hero_lich",
"npc_dota_hero_winter_wyvern",
"npc_dota_hero_keeper_of_the_light",
"npc_dota_hero_oracle",
};
function GetPriority()
local npcBot = GetBot();
local herofile = require(GetScriptDirectory() .. "/herofile");
local priority = 0;
local name = npcBot:GetUnitName();
for k, heroname in pairs(TableHeroPriorityAsAlly) do
if(heroname == name) then
priority = 999 - k;
return priority;
end
end
return priority;
end
function GetRole()
local counts = 1;
local herofile = require(GetScriptDirectory() .. "/herofile");
for k , AllyHeroPriority in pairs (herofile.TableAllyHeroPriority) do
if (GetPriority() < AllyHeroPriority) then
counts = counts + 1;
end
end
return counts;
end
function FindNearestEnemyHero(location)
local herofile = require(GetScriptDirectory() .. "/herofile");
local MinDistance = 99999;
local NearestEnemyHero = nil;
local HeroNum = nil;
for k, PlayerID in pairs(herofile.TableEnemyPlayerID) do
local LastSeenLocation = GetHeroLastSeenInfo( PlayerID ).location;
if (IsHeroAlive( PlayerID ) and #(location - LastSeenLocation) < MinDistance) then
NearestEnemyHero = PlayerID;
MinDistance = #(location - LastSeenLocation);
HeroNum = k;
end
end
return NearestEnemyHero, HeroNum, MinDistance;
end
local tablebuildings = {
TOWER_BASE_1,
TOWER_BASE_2,
TOWER_MID_3,
TOWER_BOT_3,
TOWER_TOP_3,
TOWER_MID_2,
TOWER_MID_1,
TOWER_TOP_2,
TOWER_BOT_2,
TOWER_TOP_1,
TOWER_BOT_1,
};
function GetNearbyEnemyPower( location )
local herofile = require(GetScriptDirectory() .. "/herofile");
local EnemyRawPower = 0;
local TowerPower = 0;
for k, PlayerID in pairs(herofile.TableEnemyPlayerID) do
if (IsHeroAlive( PlayerID ) and #(location - herofile.TableLastSeenInfo[k].location) < math.max(herofile.TableEnemyPlayerSpeed[k] * 3 + herofile.TableEnemyPlayerAttackRange[k], 1500) ) then
EnemyRawPower = EnemyRawPower + herofile.TableEnemyHeroPower[k];
end
end
return EnemyRawPower;
end
function GetNearbyEnemyHealth( location )
local herofile = require(GetScriptDirectory() .. "/herofile");
local EnemyHealth = 0;
for k, PlayerID in pairs(herofile.TableEnemyPlayerID) do
if (IsHeroAlive( PlayerID ) and #(location - herofile.TableLastSeenInfo[k].location) < math.max(herofile.TableEnemyPlayerSpeed[k] * 3 + herofile.TableEnemyPlayerAttackRange[k], 1500) ) then
EnemyHealth = EnemyHealth + herofile.TableEnemyHeroHP[k] ;
end
end
return EnemyHealth;
end |
-- Gkyl -----------------------------------------------------------------------
-- Z.Liu 5/6/2021
-- wider electron velocity range
-- all modes excited
local Plasma = require("App.PlasmaOnCartGrid").VlasovMaxwell()
-- Electron parameters.
vDriftElc = 0.00 -- Modified from 0.159.
vtElc = 0.02
-- Ion parameters.
vDriftIon = 0.0
vtIon = 0.000566 -- Modified from 0.001 (use Te = 50 Ti).
-- Mass ratio.
massRatio = 25.0 -- Modified from 25.
knumber = 10.0 -- Wave-number.
perturbation = 1.0e-4 -- Distribution function perturbation.
noise = 1.0e-6
-- Collision frequencies.
nuee = 0.0001
nuei = 0.0 --nuee --RLW
nuii = nuee/math.sqrt(massRatio) --should have been nuee/math.sqrt(massRatio)*math.pow(tempRatio,1.5)
nuie = 0.0 -- nuee/massRatio
local function maxwellian1v(v, vDrift, vt)
return 1/math.sqrt(2*math.pi*vt^2)*math.exp(-(v-vDrift)^2/(2*vt^2))
end
local function sponEmissionSource(x_table, t, lx_table, ncells_table, p)
local Nx = ncells_table[1]*3 -- Number of spatial degrees of freedom along x
local Lx = lx_table[1]
local x, vx = x_table[1], x_table[2]
local fIon = 0.0
local ksquared = 0.0
math.randomseed(math.floor(1000000*t)) --I want all xs and ys (and vx, vy) to see the same random phase at a given time step. Since t will be a fraction, need to multiply it so that we don't get the same random number thousands of times.
for nx = -math.floor(Nx/2), math.floor(Nx/2) do --need to divied by two because we are including nx and -nx by using sines and cosines
ksquared = math.pow(2*nx*math.pi /Lx,2)
if ksquared > 0.0 then
fIon = fIon + math.cos(2*math.pi*(nx*x/Lx + math.random() ))
end
end
return {fIon}
end
plasmaApp = Plasma.App {
logToFile = true,
tEnd = 2000.0, -- End time.
nFrame = 1000, -- Number of output frames.
lower = {0.0}, -- Configuration space lower left.
upper = {1.0}, -- Configuration space upper right.
cells = {64}, -- Configuration space cells.
basis = "serendipity", -- One of "serendipity" or "maximal-order".
polyOrder = 2, -- Polynomial order.
timeStepper = "rk3", -- One of "rk2" or "rk3".
cflFrac = 0.9,
-- Eecomposition for configuration space
decompCuts = {16}, -- Cuts in each configuration direction.
useShared = false, -- If to use shared memory.
-- Boundary conditions for configuration space.
periodicDirs = {1}, -- Periodic directions.
-- Integrated moment flag, compute quantities 1000 times in simulation.
calcIntQuantEvery = 0.001,
-- Electrons.
elc = Plasma.Species {
charge = -1.0, mass = 1.0,
-- Velocity space grid.
lower = {-3.0*vtElc},
upper = { 12.0*vtElc},
cells = {120},
decompCuts = {1},
-- Initial conditions.
init = function (t, xn)
local x, v = xn[1], xn[2]
local fv = maxwellian1v(v, vDriftElc, vtElc)
return fv*(1)
end,
evolve = true, -- Evolve species?
diagnosticMoments = { "M0", "M1i"},
diagnosticIntegratedMoments = { "intM0", "intM1i"},
coll = Plasma.LBOCollisions{
collideWith = {'elc', 'ion'},
frequencies = {nuee, nuei},
}
},
-- Ions.
ion = Plasma.Species {
charge = 1.0, mass = massRatio,
-- Velocity space grid.
lower = {-16.0*vtIon},
upper = { 16.0*vtIon},
cells = {32},
decompCuts = {1},
-- Initial conditions.
init = function (t, xn)
local x, v = xn[1], xn[2]
local fv = maxwellian1v(v, vDriftIon, vtIon)
local dfv = sponEmissionSource({x,v},t, lx, nx, polyOrder)[1]* maxwellian1v(v, vDriftIon, vtIon)
return fv + perturbation*dfv
end,
source = function (t,xn)
local x, v = xn[1], xn[2]
local dfv = sponEmissionSource({x,v},t, lx, nx, polyOrder)[1]*maxwellian2v(v, vDriftIon, vtIo)
return noise*dfv
end,
evolve = true, -- Evolve species?
diagnosticMoments = { "M0", "M1i"},
diagnosticIntegratedMoments = { "intM0", "intM1i","intM2Flow", "intM2Thermal",},
coll = Plasma.LBOCollisions{
collideWith = {'elc', 'ion'},
frequencies = {nuie, nuii},
}
},
-- Field solver.
field = Plasma.Field {
epsilon0 = 1.0,
evolve = true, -- Evolve field?
hasMagneticField = false,
},
externalField = Plasma.ExternalField {
hasMagneticField = false,
emFunc = function(t, xn)
local extE_x, extE_y, extE_z = -0.00001, 0., 0.
return extE_x, extE_y, extE_z
end,
evolve = false, -- Evolve field?
},
}
-- Run application.
plasmaApp:run()
|
-- ScrollFrame.lua
-- @Author : DengSir (tdaddon@163.com)
-- @Link : https://dengsir.github.io
-- @Date : 10/20/2018, 7:46:03 PM
--
---@type ns
local ns = select(2, ...)
---@class _ScrollFrame: ScrollFrame, Object
---@field scrollBar Slider
---@field buttons Button[]
---@field buttonHeight number
---@field update fun()
local ScrollFrame = ns.class('ScrollFrame')
ns.ScrollFrame = ScrollFrame
function ScrollFrame:Constructor(_, opts)
self.buttons = setmetatable({}, {
__index = function(t, i)
if type(i) ~= 'number' then
return
end
local button
if opts.itemCreate then
button = opts.itemCreate(self:GetScrollChild())
elseif opts.buttonTemplate then
button = CreateFrame('Button', nil, self:GetScrollChild(), opts.buttonTemplate)
else
error('error')
end
t[i] = button
if i == 1 then
button:SetPoint('TOPLEFT')
button:SetPoint('TOPRIGHT')
else
button:SetPoint('TOPLEFT', t[i - 1], 'BOTTOMLEFT')
button:SetPoint('TOPRIGHT', t[i - 1], 'BOTTOMRIGHT')
end
return button
end,
})
self.buttonHeight = self.buttons[1]:GetHeight()
self:SetScript('OnSizeChanged', self.OnSizeChanged)
self.update = opts.update or self.update
if self.scrollBar and not opts.pinBottom then
self.scrollBar:SetMinMaxValues(0, 1)
self.scrollBar:SetValue(0)
end
self:OnSizeChanged(self:GetSize())
end
function ScrollFrame:OnUpdate()
self:SetScript('OnUpdate', nil)
self:update()
end
function ScrollFrame:OnSizeChanged(width, height)
self.stepSize = height - self.buttonHeight
self.scrollBar.stepSize = self.stepSize
self:GetScrollChild():SetSize(width - 14, height)
self:Refresh()
end
function ScrollFrame:Refresh()
return self:SetScript('OnUpdate', self.OnUpdate)
end
function ScrollFrame:SetOffset(height)
HybridScrollFrame_SetOffset(self, height)
self.scrollBar:SetValue(height)
end
|
local log = require('completor.log')
local protocol = require('vim.lsp.protocol')
local api = require('completor.api')
local function fix_edits_col(ctx, edits)
local new_edits = {}
local fix = function(pos)
local line = ctx.typed
if pos.line ~= ctx.pos[1] then
line = api.get_line(pos.line)
end
pos.character = vim.str_byteindex(line, pos.character)
return pos
end
for _, e in ipairs(edits) do
e.range.start = fix(e.range.start)
e.range["end"] = fix(e.range["end"])
table.insert(new_edits, e)
end
return new_edits
end
local function filter_items(ctx, items)
if not items or #items == 0 then
return {}
end
local new_items = items
local prefix = ctx:typed_to_cursor()
prefix = prefix:match("[%w_]+$")
if prefix and #prefix > 0 then
new_items = vim.tbl_filter(function(item)
local word = item.filterText or item.insertText or item.label
return vim.startswith(word, prefix)
end, items)
end
log.trace("new items num: ", #new_items, " old items num: ", #items)
return new_items
end
local function complete_items_lsp2vim(ctx, data)
-- lsp range pos: zero-base
local prefix = ctx:typed_to_cursor():match('[%w_]+$')
local ft = vim.bo.ft
local convert_item = function(complete_item)
-- 组装user_data
local user_data = {
filter_text = complete_item.filterText or complete_item.label,
ctx = ctx,
}
if complete_item.textEdit and complete_item.textEdit.newText then
local raw_edits = {complete_item.textEdit}
if complete_item.additionalTextEdits then
vim.list_extend(raw_edits, complete_item.additionalTextEdits)
end
user_data.text_edits = fix_edits_col(ctx, raw_edits)
user_data.insertTextMode = complete_item.insertTextMode or 1
if ft == "rust" then user_data.insertTextMode = 2 end
end
local word = complete_item.insertText or complete_item.label
if complete_item.label == word and
prefix and
vim.startswith(word, prefix)
then
word = word:sub(#prefix + 1)
end
local documentation = function()
if complete_item.documentation then
if type(complete_item.documentation) == 'string' then
return complete_item.documentation
elseif type(complete_item.documentation) == 'table' and
type(complete_item.documentation.value) == 'string' then
return complete_item.documentation.value
end
end
return ' '
end
local info = documentation()
if #info == 0 then
info = ' '
end
return {
word = word,
abbr = complete_item.label,
kind = protocol.CompletionItemKind[complete_item.kind] or '',
menu = complete_item.detail or '',
info = info,
icase = 1,
dup = 1,
empty = 1,
user_data = user_data,
}
end
local filter = function(item)
if not prefix or #prefix == 0 then return true end
return vim.startswith(item.filterText or item.label, prefix)
end
local items = {}
for _, v in pairs(data) do
if filter(v) then
local item = convert_item(v)
if item ~= nil then
table.insert(items, item)
end
end
end
return items
end
local function request(ctx, complete_cb)
if not ctx then return end
local bufno = vim.api.nvim_get_current_buf()
log.trace("builtin_lsp complete request")
params = {
textDocument = { uri = vim.uri_from_bufnr(0) },
position = {
line = ctx.pos[1];
character = vim.str_utfindex(ctx.typed, ctx.pos[2]);
}
}
function respone(err, _, result)
if err or not result then
log.warn("lsp complete err ", err)
return
end
local items = result.items or result
local incomplete = result.incomplete or false
log.trace("incomplete", incomplete)
items = complete_items_lsp2vim(ctx, items)
if items and #items > 0 and complete_cb(items, incomplete) then
log.trace("incomplete trigger")
params.context = {triggerKind = 3}
vim.lsp.buf_request(
bufno,
'textDocument/completion',
params,
respone
)
end
end
vim.lsp.buf_request(
bufno,
'textDocument/completion',
params,
respone
)
end
return {
compfunc = request
}
|
data:extend(
{
{
type = "fuel-category",
name = "chemical"
},
{
type = "fuel-category",
name = "nuclear"
}
}
)
|
--[[----------------------------------------------------------------------------
ADOBE SYSTEMS INCORPORATED
Copyright 2007 Adobe Systems Incorporated
All Rights Reserved.
NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
with the terms of the Adobe license agreement accompanying it. If you have received
this file from a source other than Adobe, then your use, modification, or distribution
of it requires the prior written permission of Adobe.
--------------------------------------------------------------------------------
CustomDialogMultipleBind.lua
From the Hello World sample plug-in. Displays several custom dialog and writes debug info.
------------------------------------------------------------------------------]]
-- Access the Lightroom SDK namespaces.
local LrFunctionContext = import 'LrFunctionContext'
local LrBinding = import 'LrBinding'
local LrDialogs = import 'LrDialogs'
local LrView = import 'LrView'
--[[
Demonstrates a custom dialog with a multi binding, two properties from
separate tables are bound to the value of a text field. The dialog displays two
sliders. Each slider's value is shown in a field next to the slider. A third text field
displays the values from both sliders.
Whenever either of the sliders' value changes the third text field will be updated.
The binding is done by overriding the default property table for the key value that resides
in the second property table.
]]
local function showCustomDialogWithMultipleBind()
LrFunctionContext.callWithContext( "showCustomDialogWithMultipleBind", function( context )
-- Create two observable tables.
local tableOne = LrBinding.makePropertyTable( context ) -- This will be bound to the view
local tableTwo = LrBinding.makePropertyTable( context )
-- Add a property to each table.
tableOne.sliderOne = 0
tableTwo.sliderTwo = 50
local f = LrView.osFactory()
local c = f:column {
bind_to_object = tableOne, -- bind tableOne
spacing = f:control_spacing(),
f:row {
f:group_box {
title = "Slider One",
font = "<system>",
f:slider {
value = LrView.bind( "sliderOne" ),
min = 0,
max = 100,
width = LrView.share( "slider_width" )
},
f:edit_field {
place_horizontal = 0.5,
value = LrView.bind( "sliderOne" ),
width_in_digits = 7
},
},
f:group_box {
title = "Slider Two",
font = "<system>",
f:slider {
bind_to_object = tableTwo,
value = LrView.bind( "sliderTwo" ),
min = 0,
max = 100,
width = LrView.share( "slider_width" )
},
f:edit_field {
place_horizontal = 0.5,
bind_to_object = tableTwo,
value = LrView.bind( "sliderTwo" ),
width_in_digits = 7
}
},
},
f:group_box {
fill_horizontal = 1,
title = "Both Values",
font = "<system>",
f:edit_field{
place_horizontal = 0.5,
value = LrView.bind {
-- Supply a table with table keys.
keys = {
{
-- Only the key name is needed as sliderOne in tableOne and that is already bound.
key = "sliderOne"
},
{
-- We need to supply the key and the table to which it belongs.
key = "sliderTwo",
bind_to_object = tableTwo
}
},
-- This operation will create the value for this edit_field.
-- The bound values are accessed with the arg 'values'.
operation = function( _, values, _ )
return values.sliderTwo + values.sliderOne
end
},
width_in_digits = 7
},
}
}
LrDialogs.presentModalDialog {
title = "Custom Dialog Multiple Bind",
contents = c
}
end )
end
-- Now display the dialogs.
showCustomDialogWithMultipleBind()
|
local configs = require 'lspconfig/configs'
local lspui = require 'lspconfig/_lspui'
local M = {
util = require 'lspconfig/util';
}
M._root = {}
function M.available_servers()
return vim.tbl_keys(configs)
end
function M.installable_servers()
print("deprecated, see https://github.com/neovim/neovim/wiki/Following-HEAD")
end
-- Called from plugin/lspconfig.vim because it requires knowing that the last
-- script in scriptnames to be executed is lspconfig.
function M._root._setup()
M._root.commands = {
LspInfo = {
function()
-- These options need to be cached before switching to the floating
-- buffer.
local buf_clients = vim.lsp.buf_get_clients()
local clients = vim.lsp.get_active_clients()
local buffer_filetype = vim.bo.filetype
local buffer_dir = vim.fn.expand('%:p:h')
local win_info = lspui.percentage_range_window(0.8, 0.7)
local bufnr, win_id = win_info.bufnr, win_info.win_id
local buf_lines = {}
local header = {
"Available servers:",
"\t"..table.concat(vim.tbl_keys(configs), ', '),
"",
"Clients attached to this buffer: "..tostring(#buf_clients)
}
vim.list_extend(buf_lines, header)
for _, client in ipairs(buf_clients) do
local client_info = {
"",
"Client: "..tostring(client.id),
"\tname: "..client.name,
"\troot: "..client.workspaceFolders[1].name,
"\tfiletypes: "..table.concat(client.config.filetypes, ', '),
"\tcmd: "..table.concat(client.config.cmd, ', '),
}
vim.list_extend(buf_lines, client_info)
end
local active_section_header = {
"",
"Total active clients: "..tostring(#clients),
}
vim.list_extend(buf_lines, active_section_header)
for _, client in ipairs(clients) do
local client_info = {
"",
"Client: "..tostring(client.id),
"\tname: "..client.name,
"\troot: "..client.workspaceFolders[1].name,
"\tfiletypes: "..table.concat(client.config.filetypes, ', '),
"\tcmd: "..table.concat(client.config.cmd, ', '),
}
vim.list_extend(buf_lines, client_info)
end
local matching_config_header = {
"",
"Clients that match the current buffer filetype:",
}
local cmd_not_found_msg = "False. Please check your path and ensure the server is installed"
vim.list_extend(buf_lines, matching_config_header)
for _, config in pairs(configs) do
local cmd_is_executable, cmd
if config.cmd then
cmd = table.concat(config.cmd, " ")
if vim.fn.executable(config.cmd[1]) == 1 then
cmd_is_executable = "True"
else
cmd_is_executable = cmd_not_found_msg
end
else
cmd = "cmd not defined"
cmd_is_executable = cmd
end
for _, filetype_match in ipairs(config.filetypes) do
if buffer_filetype == filetype_match then
local matching_config_info = {
"",
"Config: "..config.name,
"\tcmd: "..cmd,
"\tcmd is executable: ".. cmd_is_executable,
"\tidentified root: "..(config.get_root_dir(buffer_dir) or "None"),
"\tcustom handlers: "..table.concat(vim.tbl_keys(config.handlers), ", "),
}
vim.list_extend(buf_lines, matching_config_info)
end
end
end
buf_lines = vim.lsp.util._trim_and_pad(buf_lines, { pad_left = 2, pad_top = 1})
vim.api.nvim_buf_set_lines(bufnr, 0, -1, true, buf_lines )
vim.fn.matchadd("Title", table.concat(vim.tbl_keys(configs), '\\|'))
vim.fn.matchadd("Error", "cmd not defined\\|"..cmd_not_found_msg)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<esc>', '<cmd>bd<CR>', { noremap = true})
vim.lsp.util.close_preview_autocmd({"BufHidden", "BufLeave"}, win_id)
end;
"-nargs=?";
description = '`:LspInfo` Displays info on currently configured and currently active servers';
};
LspInstall = {
function()
print("deprecated, see https://github.com/neovim/neovim/wiki/Following-HEAD")
end;
"-nargs=?";
"-complete=custom,v:lua.lsp_complete_installable_servers";
description = '`:LspInstall {name}` installs a server under stdpath("cache")/lspconfig/{name}';
};
LspInstallInfo = {
function()
print("deprecated, see https://github.com/neovim/neovim/wiki/Following-HEAD")
end;
"-nargs=?";
"-complete=custom,v:lua.lsp_complete_servers";
description = 'Print installation info for {name} if one is specified, or all installable servers.';
};
};
M.util.create_module_commands("_root", M._root.commands)
end
local mt = {}
function mt:__index(k)
if configs[k] == nil then
require('lspconfig/'..k)
end
return configs[k]
end
return setmetatable(M, mt)
-- vim:et ts=2 sw=2
|
AddRoom("TallbirdNests", {
colour={r=.55,g=.75,b=.75,a=.50},
value = GROUND.DIRT,
tags = {"ExitPiece", "Chester_Eyebone"},
contents = {
distributepercent = .1,
distributeprefabs=
{
rock1 = 2,
rock2 = 2,
tallbirdnest=1.8,
spiderden=.01,
blue_mushroom = .02,
},
}
})
|
local sprotoparser = require "sprotoparser"
local proto = {}
proto.c2s = sprotoparser.parse [[
.package {
type 0 : integer
session 1 : integer
}
handshake 1 {
response {
msg 0 : string
}
}
quit 2 {}
login_account 3 {
request {
account 0 : string
password 1 : string
}
}
add_account 4 {
request {
account 1 : string
password 2 : string
}
}
add_user 5 {
request {
name 0 : string
}
}
login_user 6 {
request {
uid 0 : integer
name 1 : string
}
}
login_game 7 {
request {
uid 0 : integer
subid 1 : integer
account 2 : string
}
}
logic_data 8 {
request {
data 0 : string
index 1 : integer
}
}
]]
proto.s2c = sprotoparser.parse [[
.package {
type 0 : integer
session 1 : integer
}
heartbeat 1 {}
login_account 2 {
request {
result 0 : integer
desc 1 : string
}
}
add_account 3 {
request {
result 0 : integer
account 1 : string
password 2 : string
desc 3 : string
}
}
add_user 4 {
request {
result 0 : integer
name 1 : string
desc 2 : string
uid 3 : integer
}
}
login_user 5 {
request {
result 0 : integer
desc 1 : string
uid 2 : integer
subid 3 : integer
port 4 : integer
}
}
user_list 6 {
request {
amount 0 : integer
.UserInfo {
uid 0 : integer
name 1 : string
}
user 1 : *UserInfo
}
}
login_game 7 {
request {
result 0 : integer
uid 1 : integer
desc 2 : string
}
}
]]
return proto
|
COMMAND.Realm = PYRITION_MEDIATED
function COMMAND:Execute(ply, arguments, arguments_string)
if #arguments > 0 then
local players = hook.Call("PyritionPlayerFind", PYRITION, arguments_string, ply)
if players then
local player_count = #players
if player_count > 1 then self:Fail(ply, "Too many targets.\n")
elseif player_count == 0 then self:Fail(ply, "No targets.\n")
else
local destinations, destination_count = hook.Call("PyritionPlayerFindLanding", PYRITION, players[1], {ply})
if destination_count == 1 then ply:SetPos(destinations[1])
else self:Fail(ply, "Destination count is not 1. (" .. destination_count .. ")\n") end
end
else self:Fail(ply, "Failed to find a target.\n") end
else self:Fail(ply, "You must specify a player.\n") end
end |
local SPACING = 8
local COLUMNS = 2
local TOP_LABEL_SPACING = 3
-- Helper Functions
local function addUpdateLabel(frame, id, config)
local parent = frame:GetParent()
if config.labelPos == "top" then
local label = frame.label or UI.CreateFrame("Text", "widgetLabel_" .. id, parent)
label:SetText(config.label)
label:SetPoint("TOPLEFT", parent, "TOPLEFT")
frame:ClearAll()
if frame.ResizeToFit then
frame:ResizeToFit()
end
parent:SetHeight(label:GetHeight() + frame:GetHeight() + TOP_LABEL_SPACING)
frame:ClearWidth()
frame:ClearHeight()
frame:SetPoint("TOPLEFT", label, "BOTTOMLEFT", 0, TOP_LABEL_SPACING)
frame:SetPoint("BOTTOMRIGHT", parent, "BOTTOMRIGHT")
frame:SetVisible(true)
frame.label = label
elseif config.labelPos == "left" then
local label = frame.label or UI.CreateFrame("Text", "widgetLabel_" .. id, parent)
label:SetText(config.label..": ")
label:SetPoint("TOPLEFT", parent, "TOPLEFT")
frame:ClearAll()
if frame.ResizeToFit then
frame:ResizeToFit()
end
parent:SetHeight(frame:GetHeight())
frame:ClearWidth()
frame:ClearHeight()
frame:SetPoint("TOPLEFT", label, "TOPRIGHT", 0, 0)
frame:SetPoint("BOTTOMRIGHT", parent, "BOTTOMRIGHT")
frame:SetVisible(true)
frame.label = label
else
if parent.label then
parent.label:SetVisible(false)
end
frame:ClearAll()
parent:SetHeight(frame:GetHeight())
frame:SetAllPoints(parent)
end
end
local function updateButton(widget, id, config, parent)
widget:SetText(config.label)
widget.Event.LeftClick = function(self)
if config.func then config.func() end
end
end
local function createButton(id, config, parent)
local widget = UI.CreateFrame("RiftButton", "Button_" .. id, parent)
updateButton(widget, id, config, parent)
return widget
end
local function updateTextfield(widget, id, config, parent)
local textfield = widget.textfield
addUpdateLabel(textfield, id, config)
textfield:SetBackgroundColor(0, 0, 0, 1)
Library.LibSimpleWidgets.SetBorder(textfield, 1, 0.5, 0.5, 0.5, 1)
if config.get then
textfield.value = config.get()
end
textfield:SetText(textfield.value)
local function InvokeSet()
if config.set and textfield.value ~= textfield:GetText() then
textfield.value = textfield:GetText()
config.set(textfield.value)
end
end
textfield.Event.KeyFocusLoss = InvokeSet()
textfield.Event.KeyDown = function(self, key)
if string.byte(key) == 13 then
InvokeSet()
end
end
end
local function createTextfield(id, config, parent)
local widget = UI.CreateFrame("Frame", "TextfieldContainer_" .. id, parent)
local textfield = UI.CreateFrame("RiftTextfield", "Textfield_" .. id, widget)
widget.textfield = textfield
updateTextfield(widget, id, config, parent)
return widget
end
local function updateHorizontalRule(widget, id, config, parent)
-- nothing to do
end
local function createHorizontalRule(id, config, parent)
local widget = UI.CreateFrame("Frame", "HorizontalRule_" .. id, parent)
widget:SetBackgroundColor(0.5, 0.5, 0.5, 1)
widget:SetHeight(2)
return widget
end
local function updateCheckbox(widget, id, config, parent)
widget.Event.CheckboxChange = nil
if config.labelPos then
widget:SetLabelPos(config.labelPos)
end
if config.get then
widget:SetChecked(config.get())
end
widget:SetText(config.label)
if config.labelFontSize then
widget:SetFontSize(config.labelFontSize)
end
widget.Event.CheckboxChange = function(self)
if config.set then
config.set(widget:GetChecked())
end
end
end
local function createCheckbox(id, config, parent)
local widget = UI.CreateFrame("SimpleCheckbox", "Checkbox_" .. id, parent)
updateCheckbox(widget, id, config, parent)
return widget
end
local function updateSelect(widget, id, config, parent)
local select = widget.select
addUpdateLabel(select, id, config)
select.Event.ItemSelect = nil
select:SetBorder(1, 0.5, 0.5, 0.5, 1)
local items = config.items
if items then
if type(items) == "function" then
items = items()
end
local values = config.values
if values then
if type(values) == "function" then
values = values()
end
end
select:SetItems(items, values)
end
if config.get then
select:SetSelectedItem(config.get())
elseif config.getvalue then
select:SetSelectedValue(config.getvalue())
elseif config.getindex then
select:SetSelectedIndex(config.getindex())
end
select.Event.ItemSelect = function(self, item, value, index)
if config.set then
config.set(item, value, index)
end
end
end
local function createSelect(id, config, parent)
local widget = UI.CreateFrame("Frame", "SelectContainer_" .. id, parent)
local select = UI.CreateFrame("SimpleSelect", "Select_" .. id, widget)
widget.select = select
updateSelect(widget, id, config, parent)
return widget
end
local function updateSlider(widget, id, config, parent)
local slider = widget.slider
addUpdateLabel(slider, id, config)
slider.Event.SliderRelease = nil
local min = config.min or 1
local max = config.max or 100
slider:SetRange(min, max)
if config.get then
slider:SetPosition(config.get())
else
slider:SetPosition(min)
end
slider.value = slider:GetPosition()
if config.editable ~= nil then
slider:SetEditable(config.editable)
else
slider:SetEditable(true)
end
slider.Event.SliderRelease = function(self)
local value = slider:GetPosition()
if slider.value ~= value then
slider.value = value
if config.set then
config.set(value)
end
end
end
end
local function createSlider(id, config, parent)
local widget = UI.CreateFrame("Frame", "SliderContainer_" .. id, parent)
local slider = UI.CreateFrame("SimpleSlider", "Slider_" .. id, widget)
widget.slider = slider
updateSlider(widget, id, config, parent)
return widget
end
local function updateSpacer(widget, id, config, parent)
-- nothing to do
end
local function createSpacer(id, config, parent)
local widget = UI.CreateFrame("Frame", "Spacer_" .. id, parent)
widget:SetHeight(25)
return widget
end
local widgetConstructors = {
button = createButton,
textfield = createTextfield,
hrule = createHorizontalRule,
checkbox = createCheckbox,
select = createSelect,
slider = createSlider,
spacer = createSpacer,
}
local widgetUpdators = {
button = updateButton,
textfield = updateTextfield,
hrule = updateHorizontalRule,
checkbox = updateCheckbox,
select = updateSelect,
slider = updateSlider,
spacer = updateSpacer,
}
local widgetResizable = {
button = false,
textfield = true,
hrule = true,
checkbox = true,
select = true,
slider = true,
spacer = true,
}
local widgetDefaultWidthSetting = {
button = "default",
textfield = "column",
hrule = "full",
checkbox = "column",
select = "column",
slider = "column",
spacer = "column",
}
local widgetSpacing = {
button = SPACING,
textfield = SPACING,
hrule = SPACING,
checkbox = SPACING,
select = SPACING,
slider = SPACING,
spacer = 0,
}
local widgetTopCompensation = {
button = -6,
textfield = 0,
hrule = 0,
checkbox = 0,
select = 0,
slider = 0,
spacer = 0,
}
local widgetLeftCompensation = {
button = -4,
textfield = 0,
hrule = 0,
checkbox = 0,
select = 0,
slider = 0,
spacer = 0,
}
local widgetHeightCompensation = {
button = -12,
textfield = 0,
hrule = 0,
checkbox = 0,
select = 0,
slider = 0,
spacer = 0,
}
local widgetWidthCompensation = {
button = 0,
textfield = 0,
hrule = 0,
checkbox = 0,
select = 0,
slider = 0,
spacer = 0,
}
local function calcMaxHeight(widgets)
local maxHeight = 0
for i, rw in ipairs(widgets) do
maxHeight = math.max(maxHeight, rw:GetHeight() + widgetHeightCompensation[rw.LSW_WidgetType])
end
return maxHeight
end
-- Constructor Function
function Library.LibSimpleWidgets.Layout(configTable, parent)
parent.layoutWidgets = parent.layoutWidgets or {}
-- hide widgets which are no longer in the configTable
for k, v in pairs(parent.layoutWidgets) do
if not configTable[k] then
v:SetVisible(false)
end
end
-- layout widgets
local nextX = 0
local nextY = 0
local columnWidth = parent:GetWidth() / COLUMNS
local rowWidgets = {}
-- validate configTable and sort entries according to their order attribute
local sortedIDs = {}
for id, config in pairs(configTable) do
if not id then
error("nil widget id")
return
end
if not config then
error("no config for widget id "..id)
return
end
if not config.type then
error("no type for widget id "..id)
return
end
table.insert(sortedIDs, id)
end
table.sort(sortedIDs, function(a,b)
local orderA = configTable[a].order or 100
local orderB = configTable[b].order or 100
return orderA < orderB
end)
-- widgets at the top have a higher layer than widgets further down
-- so that things like dropdown popup frames overlay widgets below them
local layer = #sortedIDs
local tooltip = parent.layoutTooltip
-- create or update widgets
for _, id in ipairs(sortedIDs) do
local config = configTable[id]
local constructor = widgetConstructors[config.type]
local updator = widgetUpdators[config.type]
if not constructor then
error("invalid widget type: "..config.type)
return
end
-- lookup or create widget
local widget = parent.layoutWidgets[id]
if widget then
updator(widget, id, config, parent)
else
widget = constructor(id, config, parent)
end
widget:SetLayer(layer)
widget.LSW_WidgetType = config.type
local spacing = widgetSpacing[config.type]
local nextWidth = columnWidth
local widthSetting = widgetDefaultWidthSetting[config.type]
if widgetResizable[config.type] and config.width then
widthSetting = config.width
end
local widthCompensation = widgetWidthCompensation[config.type]
-- calculate widget width
if widthSetting == "default" then
-- leave widget at default width
elseif widthSetting == "column" then
if nextX + nextWidth >= parent:GetWidth() then
widget:SetWidth(columnWidth - spacing*2 + widthCompensation)
else
widget:SetWidth(columnWidth - spacing + widthCompensation)
end
elseif widthSetting == "full" then
if nextX > 0 then
nextX = 0
local maxHeight = calcMaxHeight(rowWidgets)
nextY = nextY + maxHeight + SPACING
rowWidgets = {}
end
widget:SetWidth(parent:GetWidth() - spacing*2 + widthCompensation)
nextWidth = parent:GetWidth()
end
local topCompensation = widgetTopCompensation[config.type]
local leftCompensation = widgetLeftCompensation[config.type]
widget:SetPoint("TOPLEFT", parent, "TOPLEFT", nextX + spacing + leftCompensation, nextY + spacing + topCompensation)
if config.tooltipText ~= nil then
if tooltip == nil then
tooltip = UI.CreateFrame("SimpleTooltip", "LayoutTooltip", parent)
parent.layoutTooltip = tooltip
end
tooltip:InjectEvents(widget, function() return config.tooltipText end)
end
table.insert(rowWidgets, widget)
parent.layoutWidgets[id] = widget
-- next column or row
nextX = nextX + nextWidth
if nextX >= parent:GetWidth() then
nextX = 0
local maxHeight = calcMaxHeight(rowWidgets)
nextY = nextY + maxHeight + SPACING
rowWidgets = {}
end
layer = layer - 1
end
end
|
local gid = ...
gid = tonumber(gid)
if gid == 6028004 then
if not module.QuestModule.Get(350013) or module.QuestModule.Get(350013).status ~= 1 then
return true
else
return false
end
end
if gid == 6028005 then
if not module.QuestModule.Get(350013) or module.QuestModule.Get(350013).status ~= 1 then
return false
end
end
if gid == 6014001 then
if not module.QuestModule.Get(350014) or module.QuestModule.Get(350014).status ~= 1 then
return false
end
end |
local filepath = require "util/filepath"
local HESH_NAME
local INPUT_CACHE
local TABLE_CACHE
local function ParseInput(input)
if input == INPUT_CACHE then
return TABLE_CACHE
end
INPUT_CACHE = input
TABLE_CACHE = nil
local t = input:split("\n")
local result = {}
if #t > 1 then
for i, line in ipairs(t) do
local entry = line:split("=")
if #entry == 2 then
table.insert(result, entry)
end
end
TABLE_CACHE = result
return result
end
return nil
end
local function OnPreLoad()
Content.AddStringTable("REPLACE_HESH", {
REPLACE_HESH = {
HESH = "Hesh",
ENTER_REPLACEMENT = "Enter Replacement",
ENTER_REPLACEMENT_DESC = "Enter a replacement for Hesh, a list of entries in the form of \"A=B\", or nothing.",
REPLACEMENT_SET = "Replacement Set!",
REPLACEMENT_SET_DESC = "Now you will see a lot of weird phrases everywhere.",
REPLACEMENT_SET_DESC_EMPTY = "Now everything is back to normal.",
},
})
local old_loc = Content.LookupString
Content.LookupString = function(id)
local old_str = old_loc(id)
if not old_str then
return old_str
end
if id == "REPLACE_HESH.HESH" then
if not HESH_NAME then
HESH_NAME = old_str
end
return old_str
end
local replace_to = Content.GetModSetting(mod, "replace_to") or ""
if replace_to and replace_to ~= "" then
local t = ParseInput(replace_to)
if t then
-- Is actually a json, do the thing.
for i, data in ipairs(t) do
old_str = old_str:gsub(data[1], data[2])
end
return old_str
else
-- Screw you if your language translate Hesh to regex
local replaced = old_str:gsub(HESH_NAME or LOC"REPLACE_HESH.HESH", replace_to)
return replaced
end
end
return old_str
end
function CharacterDef:GetLocalizedName( agent )
if self.name then
return loc.format( LOC(self:GetLocNameKey()), agent )
end
end
end
local function OnLoad( mod )
rawset(_G, "CURRENT_MOD_ID", mod.id)
for k, filepath in ipairs( filepath.list_files( "REPLACE_HESH:ui/", "*.lua", true )) do
local name = filepath:match( "(.+)[.]lua$" )
-- print(name)
if name then
require(name)
end
end
end
local function EditString( title, subtitle, initial_value, on_done_fn )
local screen = Screen.LargeEditStringPopup( title, subtitle, initial_value, on_done_fn )
TheGame:FE():PushScreen(screen)
end
local MOD_OPTIONS =
{
{
title = "Set Replacement String",
button = true,
key = "set_replacement",
desc = "Set a replacement string for Hesh. Leave blank to skip replacement.\nFor advanced string manipulation, add a list of entries in the form \"A=B\", indicating that all instances of \"A\" is replaced by \"B\".\n<#PENALTY>Doing so might cause functional changes to certain strings, so continue at your own risk!</>",
on_click = function()
EditString(
LOC"REPLACE_HESH.ENTER_REPLACEMENT", LOC"REPLACE_HESH.ENTER_REPLACEMENT_DESC",
Content.GetModSetting(mod, "replace_to") or "",
function( val )
if not val then return end
if val ~= "" then
Content.SetModSetting(mod, "replace_to", val)
UIHelpers.InfoPopup( LOC"REPLACE_HESH.REPLACEMENT_SET", LOC"REPLACE_HESH.REPLACEMENT_SET_DESC" )
else
Content.SetModSetting(mod, "replace_to", false)
UIHelpers.InfoPopup( LOC"REPLACE_HESH.REPLACEMENT_SET", LOC"REPLACE_HESH.REPLACEMENT_SET_DESC_EMPTY" )
end
end )
end,
},
}
return {
version = "1.1.0",
alias = "REPLACE_HESH",
OnPreLoad = OnPreLoad,
OnLoad = OnLoad,
mod_options = MOD_OPTIONS,
title = "Replace Hesh",
description = "A silly mod for Griftlands that replace all instances of Hesh with whatever you like.\n\nRageLeague is not responsible for whatever the user created.",
}
|
---
-- @classmod Plot
local middleclass = require("middleclass")
local cpml = require("cpml")
local types = require("luaplot.types")
local maths = require("luaplot.maths")
local Iterable = require("luaplot.iterable")
---
-- @table instance
-- @tfield {number,...} _points
-- @tfield number _default
-- @tfield number _minimum
-- @tfield number _maximum
local Plot = middleclass("Plot")
Plot:include(Iterable)
---
-- @function new
-- @tparam number length [0, ∞)
-- @tparam[opt=minimum] number default
-- @tparam[opt=0] number minimum
-- @tparam[opt=1] number maximum [minimum, ∞)
-- @treturn Plot
function Plot:initialize(length, default, minimum, maximum)
minimum = minimum or 0
maximum = maximum or 1
default = default or minimum
assert(types.is_number_with_limits(length, 0))
assert(types.is_number_with_limits(minimum))
assert(types.is_number_with_limits(maximum, minimum))
assert(types.is_number_with_limits(default, minimum, maximum))
self._points = {}
for _ = 1, length do
table.insert(self._points, default)
end
self._default = default
self._minimum = minimum
self._maximum = maximum
end
---
-- It is used for iterating over plot points in Lua 5.3+.
-- @tparam number index [1, ∞)
-- @treturn number
function Plot:__index(index)
assert(types.is_number_with_limits(index, 1))
local left_point_index = math.floor(index)
local left_point = self._points[left_point_index]
local progress = index - left_point_index
if progress == 0 then
return left_point
end
local right_point_index = math.floor(index + 1)
local right_point = self._points[right_point_index]
if not right_point then
return nil
end
if right_point < left_point then
left_point, right_point = right_point, left_point
progress = 1 - progress
end
return cpml.utils.lerp(left_point, right_point, progress)
end
---
-- It is used for iterating over plot points in Lua 5.2.
-- @function __ipairs
-- @treturn iterators.inext iterator function
-- @treturn Plot self
-- @treturn number always zero
---
-- @tparam number point
function Plot:push(point)
assert(types.is_number_with_limits(point))
point = cpml.utils.clamp(point, self._minimum, self._maximum)
table.insert(self._points, point)
end
---
-- @tparam number factor
function Plot:push_with_factor(factor)
assert(types.is_number_with_limits(factor))
local last_point
if #self._points ~= 0 then
last_point = self._points[#self._points]
else
last_point = self._default
end
local delta_x = 1 -- because it's the next point
local next_point = factor * delta_x + last_point
self:push(next_point)
end
---
-- @tparam number factor_limit
function Plot:push_with_random_factor(factor_limit)
assert(types.is_number_with_limits(factor_limit))
local factor = maths.random_in_range(-factor_limit, factor_limit)
self:push_with_factor(factor)
end
---
-- @treturn number
function Plot:shift()
local first_point = table.remove(self._points, 1)
return first_point or self._default
end
return Plot
|
local BaseLoginDialog = require("hall/login/widget/baseLoginDialog");
local ListEditText = require("hall/login/widget/listEditText");
local login_oldAccountLogin = require("view/kScreen_1280_800/hall/login/login_oldAccountLogin");
require("util/StringLib");
--已有账户登录
local OldAccountLoginDialog = class(BaseLoginDialog,false);
---------------------------------------------------------------------
----------------- config tables -------------------------------------
---------------------------------------------------------------------
local h_index = 0;
local getIndex = function(self)
h_index = h_index + 1;
return h_index;
end
OldAccountLoginDialog.s_controls =
{
closeBtn = getIndex();
confirmBtn = getIndex();
bg = getIndex();
listEditText = getIndex();
warningIcon = getIndex();
errorMsg = getIndex();
psdEditText = getIndex();
psdWarningIcon = getIndex();
psdErrorMsg = getIndex();
findPsd = getIndex();
guestLogin = getIndex();
registerArea = getIndex();
maskView = getIndex();
phoneNumber = getIndex();
phoneTips = getIndex();
phoneLine = getIndex();
};
OldAccountLoginDialog.ctor = function(self)
super(self,login_oldAccountLogin);
self.m_ctrls = OldAccountLoginDialog.s_controls;
self:_init();
LoginLogic.getInstance():setObserver(self);
end
OldAccountLoginDialog.dtor = function(self)
LoginLogic.getInstance():clearObserver(self);
MessageBox.hide();
end
---------------------------------------------------------------------
----------------- Button event response functions -------------------
---------------------------------------------------------------------
OldAccountLoginDialog.onCloseClick = function(self)
Log.d("-------------OldAccountLoginDialog onCloseClick------------");
OldAccountLoginDialog.hide();
end
OldAccountLoginDialog.onLoginClick = function(self)
Log.d("-------------OldAccountLoginDialog onLoginClick A------------");
if self.m_listEditText:isShowing() then
self.m_listEditText:hide();
return;
end
local text = string.trim(self.m_listEditText:getText());
local isNil = (text== nil or text == "");
self:findViewById(self.m_ctrls.errorMsg):setVisible(isNil);
self:findViewById(self.m_ctrls.warningIcon):setVisible(isNil);
if isNil then
return;
end
local psd = string.trim(self:findViewById(self.m_ctrls.psdEditText):getText());
local isPsdNil = (psd== nil or psd == "");
local isPsdFormatError = not string.checkPsd(psd);
self:findViewById(self.m_ctrls.psdErrorMsg):setVisible(isPsdNil or isPsdFormatError);
self:findViewById(self.m_ctrls.psdWarningIcon):setVisible(isPsdNil or isPsdFormatError);
if isPsdNil then
self:findViewById(self.m_ctrls.psdErrorMsg):setText("请输入密码");
return;
elseif isPsdFormatError then
self:findViewById(self.m_ctrls.psdErrorMsg):setText("请输入6-12位数值、字母或符号的密码");
return ;
end
--TODO 调用登录接口
self:onOpenToast();
LoginLogic.getInstance():requestAccPswdLogin(text,psd);
end
OldAccountLoginDialog.onFindPsdClick = function(self,finger_action,x,y,drawing_id_first,drawing_id_current)
Log.d("-------------OldAccountLoginDialog onFindPsdClick------------");
if finger_action == kFingerUp and drawing_id_first == drawing_id_current then
if self.m_listEditText:isShowing() then
self.m_listEditText:hide();
return;
end
local text = string.trim(self.m_listEditText:getText());
OldAccountLoginDialog.hide();
local FindPsdDialog = require("hall/login/widget/findPsdDialog");
FindPsdDialog.show(text);
end
end
OldAccountLoginDialog.onGuestLoginClick = function(self)
Log.d("-------------OldAccountLoginDialog onGuestLoginClick------------");
if self.m_listEditText:isShowing() then
self.m_listEditText:hide();
return;
end
self:onOpenToast();
LoginLogic.getInstance():requestGuestLogin();
end
OldAccountLoginDialog.onRegistAccountBtnClick = function(self)
OldAccountLoginDialog.hide();
local RegisterAccountDialog = require("hall/login/widget/registerAccountDialog");
RegisterAccountDialog.show();
end
OldAccountLoginDialog.onBgClick = function(self,finger_action,x,y,drawing_id_first,drawing_id_current)
if finger_action == kFingerUp then
Log.d("-------------OldAccountLoginDialog onBgClick------------");
if self.m_listEditText:isShowing() then
self.m_listEditText:hide();
return;
end
end
end
OldAccountLoginDialog.onMaskTouch = function(self,finger_action,x,y,drawing_id_first,drawing_id_current)
end
---------------------------------------------------------------------
OldAccountLoginDialog._init = function(self)
self:findViewById(self.m_ctrls.errorMsg):setVisible(false);
self:findViewById(self.m_ctrls.warningIcon):setVisible(false);
self:findViewById(self.m_ctrls.psdErrorMsg):setVisible(false);
self:findViewById(self.m_ctrls.psdWarningIcon):setVisible(false);
local listEditText = self:findViewById(self.m_ctrls.listEditText);
local w = listEditText:getSize();
self.m_listEditText = new(ListEditText , w , 200 );
listEditText:addChild(self.m_listEditText);
self:findViewById(self.m_ctrls.psdEditText):setInputFlag(kEditBoxInputFlagPassword);
self:findViewById(self.m_ctrls.psdEditText):setBackgroundColor("#EEE4CA");
self.m_listEditText:setOnAccountClickListener(self,OldAccountLoginDialog.onAccountClick);
self.m_listEditText:setOnDeleteTextClickListener(self,OldAccountLoginDialog.onDeleteTextClick);
self:findViewById(self.m_ctrls.closeBtn):setVisible( not kLoginDataInterface:isForbidLogin() );
local isShiledGuestLogin = kLoginDataInterface:isShiledGuestLogin()
self:findViewById(self.m_ctrls.guestLogin):setVisible( not isShiledGuestLogin );
self:findViewById(self.m_ctrls.registerArea):setVisible( isShiledGuestLogin );
local phoneTips = self:findViewById(self.m_ctrls.phoneTips);
local text = new(Text, phoneTips:getText(), nil, nil, nil, nil, phoneTips.m_res.m_fontSize);
local w,_ = text:getSize();
delete(text);
local phoneNumber = self:findViewById(self.m_ctrls.phoneNumber);
local phoneNum = HallDataInterface.getInstance():getHotline();
phoneNumber:setText(phoneNum, 1);
local x = phoneTips:getPos() + w;
phoneNumber:setPos(x, nil);
local phoneLine = self:findViewById(self.m_ctrls.phoneLine);
phoneLine:setPos(x, nil);
local numberW,_ = phoneNumber:getSize();
phoneLine:setSize(numberW, nil);
end
OldAccountLoginDialog.onAccountClick = function(self , data )
local psd = data and (data.loginPsd or "") or "";
self:findViewById(self.m_ctrls.psdEditText):setText(psd);
end
OldAccountLoginDialog.onDeleteTextClick = function(self )
self:findViewById(self.m_ctrls.psdEditText):setText("");
end
---------------------------------继承自父类------------------------------------------------
OldAccountLoginDialog.onLoginSuccess = function(self,...)
Log.v("OldAccountLoginDialog","onLoginSuccess");
self:onCloseToast();
OldAccountLoginDialog.hide();
end
OldAccountLoginDialog.onLoginFailed = function(self,errorInfo)
Log.v("OldAccountLoginDialog","onLoginFailed");
self:onCloseToast();
if errorInfo and errorInfo.errorType == LoginConstants.eLoginFailErr.ERR_FOBID_GUEST_LOGIN then
self:findViewById(self.m_ctrls.psdErrorMsg):setVisible(false);
else
local msg=errorInfo and (errorInfo.errorTips or "登录失败" ) or "登录失败";
self:findViewById(self.m_ctrls.psdErrorMsg):setVisible(true);
self:findViewById(self.m_ctrls.psdErrorMsg):setText(msg);
end
end
----------------------------------全 局-----------------------------------------------
OldAccountLoginDialog.show = function()
OldAccountLoginDialog.hide(true);
OldAccountLoginDialog.s_instance = new(OldAccountLoginDialog);
OldAccountLoginDialog.s_instance:addToRoot();
OldAccountLoginDialog.s_instance:setFillParent(true,true);
return OldAccountLoginDialog.s_instance;
end
OldAccountLoginDialog.hide = function()
delete(OldAccountLoginDialog.s_instance);
OldAccountLoginDialog.s_instance = nil;
end
OldAccountLoginDialog.onPsdEditText = function(self, text, flag)
local psdTxt = string.trim(self:findViewById(self.m_ctrls.psdEditText):getText());
if string.len(psdTxt) > 0 then
self:findViewById(self.m_ctrls.psdEditText):setText(string.subUtfStr(psdTxt, 1, 12), 400);
end
if flag == EditText.s_EX_CLOSE_DONE then
self:onLoginClick()
end
end
OldAccountLoginDialog.onPhoneNumberClick = function(self, finger_action, x, y, drawing_id_first, drawing_id_current)
if finger_action == kFingerUp then
HallDataInterface.getInstance():callHotline();
end
end
OldAccountLoginDialog.s_controlConfig =
{
[OldAccountLoginDialog.s_controls.closeBtn] = {"contentView","closeBtn"};
[OldAccountLoginDialog.s_controls.confirmBtn] = {"contentView","centerView","subView","confirmBtn"};
[OldAccountLoginDialog.s_controls.bg] = {"contentView","bg"};
[OldAccountLoginDialog.s_controls.listEditText] = {"contentView","centerView","subView","accountView","listEditText"};
[OldAccountLoginDialog.s_controls.warningIcon] = {"contentView","centerView","subView","accountView","listEditText","warningIcon"};
[OldAccountLoginDialog.s_controls.errorMsg] = {"contentView","centerView","subView","accountView","listEditText","errorMsg"};
[OldAccountLoginDialog.s_controls.psdEditText] = {"contentView","centerView","subView","pswdView","psdBg","psdEditText"};
[OldAccountLoginDialog.s_controls.psdWarningIcon] = {"contentView","centerView","subView","pswdView","psdBg","psdWarningIcon"};
[OldAccountLoginDialog.s_controls.psdErrorMsg] = {"contentView","centerView","subView","pswdView","psdBg","psdErrorMsg"};
[OldAccountLoginDialog.s_controls.findPsd] = {"contentView","centerView","subView","pswdView","findPsd"};
[OldAccountLoginDialog.s_controls.guestLogin] = {"contentView","bottomView","loginarea"};
[OldAccountLoginDialog.s_controls.registerArea] = {"contentView", "bottomView", "registerArea"};
[OldAccountLoginDialog.s_controls.maskView] = {"shiled"};
[OldAccountLoginDialog.s_controls.phoneNumber] = {"contentView", "bottomView", "phoneNumber"};
[OldAccountLoginDialog.s_controls.phoneTips] = {"contentView", "bottomView", "phoneTips"};
[OldAccountLoginDialog.s_controls.phoneLine] = {"contentView", "bottomView", "phoneLine"};
};
OldAccountLoginDialog.s_controlFuncMap =
{
[OldAccountLoginDialog.s_controls.closeBtn] = OldAccountLoginDialog.onCloseClick;
[OldAccountLoginDialog.s_controls.confirmBtn] = OldAccountLoginDialog.onLoginClick;
[OldAccountLoginDialog.s_controls.findPsd] = OldAccountLoginDialog.onFindPsdClick;
[OldAccountLoginDialog.s_controls.bg] = OldAccountLoginDialog.onBgClick;
[OldAccountLoginDialog.s_controls.guestLogin] = OldAccountLoginDialog.onGuestLoginClick;
[OldAccountLoginDialog.s_controls.registerArea] = OldAccountLoginDialog.onRegistAccountBtnClick;
[OldAccountLoginDialog.s_controls.maskView] = OldAccountLoginDialog.onMaskTouch;
[OldAccountLoginDialog.s_controls.psdEditText] = OldAccountLoginDialog.onPsdEditText;
[OldAccountLoginDialog.s_controls.phoneNumber] = OldAccountLoginDialog.onPhoneNumberClick;
};
return OldAccountLoginDialog |
-- https://wowpedia.fandom.com/wiki/Module:API_info/elink/event
local Util = require("Util/Util")
local OUT = "out/lua/API_info.elink.event.lua"
local m = {}
function m:main()
local FrameXML = require("Documenter/FrameXML/FrameXML")
FrameXML:LoadApiDocs("Documenter/FrameXML")
table.sort(APIDocumentation.events, function(a, b)
return a.LiteralName < b.LiteralName
end)
local file = io.open(OUT, "w")
file:write('local data = {\n')
for _, event in ipairs(APIDocumentation.events) do
file:write(string.format('\t["%s"] = {Name = "%s", System = "%s"},\n',
event.LiteralName, event.Name, event.System.Name))
end
file:write("}\n\nreturn data\n")
file:close()
end
m:main()
print("done")
|
-- Code created by Kwik - Copyright: kwiksher.com 2016, 2017, 2018, 2019, 2020
-- Version:
-- Project: Tiled
--
local _Command = {}
-----------------------------
-----------------------------
function _Command:new()
local command = {}
--
function command:execute(params)
local event = params.event
if event=="init" then
-- Adding external code
end
end
return command
end
--
return _Command |
local commands = require("code_runner.commands")
local M = {}
local o = require("code_runner.options")
M.setup = function(user_options)
o.set(user_options)
M.load_json_files()
vim.api.nvim_exec(
[[
function! CRunnerGetKeysForCmds(Arg,Cmd,Curs)
let cmd_keys = ""
for x in keys(g:fileCommands)
let cmd_keys = cmd_keys.x."\n"
endfor
return cmd_keys
endfunction
command! CRFiletype lua require('code_runner').open_filetype_suported()
command! CRProjects lua require('code_runner').open_project_manager()
command! CRFiletype lua require('code_runner').open_filetype_suported()
command! CRProjects lua require('code_runner').open_project_manager()
command! -nargs=? -complete=custom,CRunnerGetKeysForCmds RunCode lua require('code_runner').run_code("<args>")
command! RunFile lua require('code_runner').run_filetype()
command! RunProject lua require('code_runner').run_project()
command! RunClose lua require('code_runner').run_close()
" command! RunReload lua require('code_runner').run_reload()
]],
false
)
end
local function open_json(json_path)
local command = "tabnew " .. json_path
vim.cmd(command)
end
M.load_json_files = function()
-- Load json config and convert to table
local opt = o.get()
local load_json_as_table = require("code_runner.load_json")
local next = next
-- convert json filetype as table lua
if next(opt.filetype or {}) == nil then
opt.filetype = load_json_as_table(opt.filetype_path)
end
-- convert json project as table lua
if next(opt.project or {}) == nil then
opt.project = load_json_as_table(opt.project_path)
end
-- Message if json file not exist
if next(opt.filetype or {}) == nil then
print("Not exist command for filetypes or format invalid, if use json please execute :CRFiletype or if use lua edit setup")
end
end
M.run_code = commands.run
M.run_filetype = commands.run_filetype
M.run_project = commands.run_project
M.run_close = commands.run_close
-- M.run_reload = commands.run_reload
M.get_filetype_command = commands.get_filetype_command
M.get_project_command = commands.get_project_command
M.open_filetype_suported = function()
open_json(o.get().filetype_path)
end
M.open_project_manager = function()
open_json(o.get().project_path)
end
return M
|
linha1 = "Primeira Linha"
linha2 = "Segunda Linha"
print(linha1 .. " ".. "e".." "..linha2) --O operador .. é a concatenacao
titulo = "Voce me deve: "
valor = 450
print(titulo .. "R$"..valor) |
--
-- Addon _cut_ttip.lua
-- Author marcob@marcob.org
-- StartDate 23/10/2017
--
local addon, cut = ...
local function _newTT()
--Global context (parent frame-thing).
local ttcontext = UI.CreateContext("Tooltip_context")
ttcontext:SetStrata("topmost")
local ttwindow = UI.CreateFrame("Frame", "cut_ttip", ttcontext)
ttwindow:SetLayer(8)
ttwindow:SetBackgroundColor(unpack(cut.color.deepblack))
cut.ttframes.ttwindow = ttwindow
-- TT CONTAINER FRAME
local ttframe = UI.CreateFrame("Frame", "cut_ttip_frame", cut.ttframes.ttwindow)
ttframe:SetLayer(9)
ttframe:SetPoint("TOPLEFT", ttwindow, "TOPLEFT", cut.gui.borders.left, cut.gui.borders.top)
ttframe:SetPoint("TOPRIGHT", ttwindow, "TOPRIGHT", -cut.gui.borders.right, cut.gui.borders.top)
ttframe:SetPoint("BOTTOMLEFT", ttwindow, "BOTTOMLEFT", cut.gui.borders.right, -cut.gui.borders.bottom)
ttframe:SetPoint("BOTTOMRIGHT", ttwindow, "BOTTOMRIGHT", -cut.gui.borders.right, -cut.gui.borders.bottom)
ttframe:SetBackgroundColor(unpack(cut.color.darkgrey))
cut.ttframes.ttframe = ttframe
-- TT Currency Name
local tttext1 = UI.CreateFrame("Text", "cut_ttip_text_1", cut.ttframes.ttframe)
tttext1:SetFontSize(cut.gui.font.size)
tttext1:SetText("", true)
tttext1:SetLayer(10)
tttext1:SetFontColor(unpack(cut.color.yellow))
tttext1:SetPoint( "TOPCENTER", cut.ttframes.ttframe, "TOPCENTER")
cut.ttframes.tttext1 = tttext1
-- TT Line Separator 0
local linesep0 = UI.CreateFrame("Texture", "cut_ttip_separator_1", cut.ttframes.ttframe)
linesep0:SetTexture("Rift", "line_window_break.png.dds")
linesep0:SetHeight(cut.gui.font.size/2)
linesep0:SetLayer(10)
linesep0:SetPoint( "TOPLEFT", cut.ttframes.ttframe, "TOPLEFT", 0, cut.ttframes.ttframe:GetTop() + tttext1:GetHeight() + cut.gui.font.size*1.5)
linesep0:SetPoint( "TOPRIGHT", cut.ttframes.ttframe, "TOPRIGHT", 0, cut.ttframes.ttframe:GetTop() + tttext1:GetHeight() + cut.gui.font.size*1.5)
cut.ttframes.linesep0 = linesep0
-- TT In Label
local tttext2 = UI.CreateFrame("Text", "cut_ttip_text_2", cut.ttframes.ttframe)
tttext2:SetFontSize(cut.gui.font.size)
tttext2:SetText("", true)
tttext2:SetLayer(10)
tttext2:SetFontColor(1, 1, 1)
tttext2:SetPoint( "TOPLEFT", cut.ttframes.linesep0, "TOPLEFT", 0, cut.gui.font.size)
cut.ttframes.tttext2 = tttext2
-- TT In value
local tttext3 = UI.CreateFrame("Text", "cut_ttip_text_3", cut.ttframes.ttframe)
tttext3:SetFontSize(cut.gui.font.size)
tttext3:SetText("", true)
tttext3:SetLayer(10)
tttext3:SetFontColor(1, 1, 1)
tttext3:SetPoint( "TOPRIGHT", cut.ttframes.linesep0, "TOPRIGHT", 0, cut.gui.font.size)
cut.ttframes.tttext3 = tttext3
-- TT Out Label
local tttext4 = UI.CreateFrame("Text", "cut_ttip_text_4", cut.ttframes.ttframe)
tttext4:SetFontSize(cut.gui.font.size)
tttext4:SetText("", true)
tttext4:SetLayer(10)
tttext4:SetFontColor(1, 1, 1)
tttext4:SetPoint( "TOPLEFT", cut.ttframes.tttext2, "BOTTOMLEFT")
cut.ttframes.tttext4 = tttext4
-- TT Out value
local tttext5 = UI.CreateFrame("Text", "cut_ttip_text_5", cut.ttframes.ttframe)
tttext5:SetFontSize(cut.gui.font.size)
tttext5:SetText("", true)
tttext5:SetLayer(10)
tttext5:SetFontColor(1, 1, 1)
tttext5:SetPoint( "TOPRIGHT", cut.ttframes.tttext3, "BOTTOMRIGHT")
cut.ttframes.tttext5 = tttext5
-- TT Line Separator 1
local linesep1 = UI.CreateFrame("Texture", "cut_ttip_separator_1", cut.ttframes.ttframe)
linesep1:SetTexture("Rift", "line_window_break.png.dds")
linesep1:SetHeight(cut.gui.font.size/2)
linesep1:SetLayer(10)
linesep1:SetPoint( "TOPLEFT", cut.ttframes.tttext4, "BOTTOMLEFT", 0, cut.gui.font.size)
linesep1:SetPoint( "TOPRIGHT", cut.ttframes.tttext5, "BOTTOMRIGHT", 0, cut.gui.font.size)
cut.ttframes.linesep1 = linesep1
-- TT Balance Label
local tttext6 = UI.CreateFrame("Text", "cut_ttip_text_6", cut.ttframes.ttframe)
tttext6:SetFontSize(cut.gui.font.size)
tttext6:SetText("", true)
tttext6:SetLayer(10)
tttext6:SetFontColor(1, 1, 1)
tttext6:SetPoint( "TOPLEFT", cut.ttframes.linesep1, "BOTTOMLEFT")
cut.ttframes.tttext6 = tttext6
-- TT Balance value
local tttext7 = UI.CreateFrame("Text", "cut_ttip_text_7", cut.ttframes.ttframe)
tttext7:SetFontSize(cut.gui.font.size)
tttext7:SetText("", true)
tttext7:SetLayer(10)
tttext7:SetFontColor(1, 1, 1)
tttext7:SetPoint( "TOPRIGHT", cut.ttframes.linesep1, "BOTTOMRIGHT")
cut.ttframes.tttext7 = tttext7
cut.init.tt = true
return cut.ttframes.ttwindow
end
local function showTT(o, var, panel, id)
-- print(string.format("o=%s, var=%s, panel=%s id=%s", o, var, panel, id))
if o and var then
local tip = ""
local tbl = {}
local vals = {}
-- update tooltip
cut.ttframes.tttext1:SetText(var, true)
cut.ttframes.tttext2:SetText("In :", true)
cut.ttframes.tttext3:SetText("")
cut.ttframes.tttext4:SetText("Out:", true)
cut.ttframes.tttext5:SetText("")
cut.ttframes.tttext6:SetText("Bal:", true)
cut.ttframes.tttext7:SetText("")
if panel == 1 then tbl = cut.balance.current end
if panel == 2 then tbl = cut.balance.today end
if panel == 3 then tbl = cut.balance.week end
if tbl[var] then
table.insert(vals, tbl[var].income)
table.insert(vals, tbl[var].outcome)
table.insert(vals, tbl[var].outcome + tbl[var].income)
else
vals = { 0, 0, 0 }
end
if id == "coin" then
cut.ttframes.tttext3:SetText( cut.printmoney(vals[1]), true )
cut.ttframes.tttext5:SetText( cut.printmoney(vals[2]), true )
cut.ttframes.tttext7:SetText( cut.printmoney(vals[3]), true )
else
cut.ttframes.tttext3:SetText( tostring(vals[1]), true )
cut.ttframes.tttext5:SetText( tostring(vals[2]), true )
cut.ttframes.tttext7:SetText( tostring(vals[3]), true )
end
-- resize tooltip
-- Vertical
cut.gui.ttobj:SetHeight((cut.ttframes.tttext7:GetBottom() - cut.ttframes.tttext1:GetTop()) + (cut.gui.borders.top*2) + (cut.gui.borders.bottom))
-- Orizontal
local w = { cut.ttframes.tttext1:GetWidth() + cut.gui.borders.left + (cut.gui.borders.left*2) + (cut.gui.borders.right*2),
cut.ttframes.tttext2:GetWidth() + cut.ttframes.tttext3:GetWidth() + (cut.gui.borders.left*2) + (cut.gui.borders.right*2),
cut.ttframes.tttext4:GetWidth() + cut.ttframes.tttext5:GetWidth() + (cut.gui.borders.left*2) + (cut.gui.borders.right*2),
cut.ttframes.tttext6:GetWidth() + cut.ttframes.tttext7:GetWidth() + (cut.gui.borders.left*2) + (cut.gui.borders.right*2)
}
local W = 0
for _, width in ipairs(w) do if width > W then W = width end end
cut.gui.ttobj:SetWidth(W)
-- re-position tooltip
local mouseData = Inspect.Mouse()
cut.gui.ttobj:SetPoint("TOPLEFT", UIParent, "TOPLEFT", mouseData.x + 10, mouseData.y + 10)
-- Show tooltip
cut.gui.ttobj:SetVisible(true)
else
cut.gui.ttobj:SetVisible(false)
end
return
end
function cut.attachTT(o, var, panel, id)
if o and var then
if not cut.init.tt then
cut.gui.ttobj = _newTT()
cut.gui.ttobj:SetVisible(false)
end
-- Mouse Hover IN => show tooltip
o:EventAttach(Event.UI.Input.Mouse.Cursor.In, function() showTT(o, var, panel, id) end, "Event.UI.Input.Mouse.Cursor.In_" .. o:GetName())
-- Mouse Hover OUT => show tooltip
o:EventAttach(Event.UI.Input.Mouse.Cursor.Out, function() showTT(nil, nil, nil, nil) end, "Event.UI.Input.Mouse.Cursor.Out_" .. o:GetName())
end
return
end
|
--
--==============================================================================
-- WGLUE (WIP)
--==============================================================================
--
--==============================================================================
-- Copyright (C) 2017-2019 Ulrich Schmidt.
--
-- 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.
--==============================================================================
--
--luacheck: globals arg
local VERSION = "V 19/11/23";
--
local iup = require "iuplua";
local lpeg = require "lpeg";
local insert, concat = table.insert, table.concat;
--
local app = {};
--
local function luaVersion()
local f = function() return function() end end;
local t = {
nil, --luacheck: ignore
[false] = 'LUA5.1',
[true] = 'LUA5.2',
[1/'-0'] = 'LUA5.3',
[1] = 'LUAJIT'
};
return t[1] or t[1/0] or t[f()==f()];
end;
local function pairsByKey(t)
local a = {}
for n in pairs(t) do
a[#a + 1] = n;
end;
table.sort(a, function(a, b)
return (type(a) == type(b)) and (a < b) or (type(a) < type(b))
end
);
local i = 0; -- iterator variable
return function() -- iterator function
i = i + 1;
return a[i], a[i] and t[a[i]];
end;
end;
local function splitpath(path)
local i = #path;
local ch = path:sub(i, i);
while i > 0 and ch ~= '/' and ch ~= '\\' do
i = i - 1;
ch = path:sub(i, i);
end;
if i == 0 then
return '', path;
else
return path:sub(1, i - 1), path:sub(i + 1);
end;
end;
local function filetype(fn, ext)
ext = ext:lower();
if ext:sub(1,1) ~= "." then ext = "." .. ext end;
return fn:sub(-#ext):lower() == ext;
end;
local function is_exe(fn)
return filetype(fn, ".exe");
end;
--
local function ifSources(elem)
local filelist = {
"Makefile",
"loader.c",
"miniglue.c",
"lua.ico",
"glue.lua",
"wglue.wlua",
"lua.ico",
"lua_lang.ico",
"lua_small.ico"
};
for _,fn in ipairs(filelist) do
local f = io.open(fn);
if not f then
return;
end;
f:close();
end;
return elem;
end;
ifSources = ifSources(function(x) return x; end) or function() return; end;
--
local function printMessageLine(ps, mt)
local size = 131 - #ps;
local s = "";
local t = {};
for k in pairsByKey(mt) do
insert(t, k);
end;
if #t > 0 then
for i = 1, #t do
if (#ps + #s + #t[i]) > size then
app.print(ps .. s);
ps = string.rep(" ", #ps);
s = "";
end;
if #s > 0 then
s = s..", ";
end;
s = s .. t[i];
end
app.print(ps .. s);
end
end;
local function doGlue(args)
--[[ Lua Module Catenation.
Creates one single lua file preloading all lua modules.
Usefull to create stand alone lua programs.
**Required Modules:** lpeg
]]
--
lpeg.setmaxstack(300); -- default: 100
local locale = lpeg.locale();
local P, S, V = lpeg.P, lpeg.S, lpeg.V;
local C, Cb, Cg, Cs, Cmt = lpeg.C, lpeg.Cb, lpeg.Cg, lpeg.Cs, lpeg.Cmt;
local EOL, ANY = P"\n", P(1);
local EOF = P(-1);
local SPACE = locale.space;
local DIGIT = locale.digit;
local ALPHA = locale.alpha + P"_";
local ALPHANUM = ALPHA + DIGIT;
local SHEBANG = P"#" * (ANY - EOL)^0 * EOL;
local function K(w)
return P(w) * -ALPHANUM;
end;
local tblLuaMods = {}; -- required lua modules.
local tblOtherMods = {}; -- unknown modules.
local tblBuiltinMods = { -- list of built in modules.
_G = true,
coroutine = package.loaded["coroutine"] and true, --luacheck: ignore
debug = package.loaded["debug"] and true, --luacheck: ignore
io = package.loaded["io"] and true, --luacheck: ignore
math = package.loaded["math"] and true, --luacheck: ignore
os = package.loaded["os"] and true, --luacheck: ignore
package = package.loaded["package"] and true, --luacheck: ignore
string = package.loaded["string"] and true, --luacheck: ignore
table = package.loaded["table"] and true, --luacheck: ignore
utf8 = package.loaded["utf8"] and true, --luacheck: ignore
bit32 = package.loaded["bit32"] and true, --luacheck: ignore
bit = package.loaded["bit"] and true, --luacheck: ignore
jit = package.loaded["jit"] and true, --luacheck: ignore
utf8 = package.loaded["utf8"] and true, --luacheck: ignore
};
local tblExcludedMods = setmetatable({},{__index = tblBuiltinMods}); -- excluded modules
local tblIncludedMods = {}; -- manually included modules
local tblPreloadedMods = {}; -- already preloaded modules.
local sources = {};
local stripping; -- true in pass2: generating amalgam
local function get_module_name(s) return s; end; -- forward declaration
local function GMN(s)
return get_module_name(s);
end;
local function GPN(s) -- get preloaded name
tblPreloadedMods[s] = true;
tblLuaMods[s] = nil;
return s;
end;
local function strip_spc(s)
if stripping then return " " end;
return s;
end;
local function stripall(s)
if stripping then return "" end;
return s;
end;
local PARSER = Cs{
"chunk",
spc = (SPACE + V"comment")^0 / stripall,
space = ((SPACE + V"comment")^1 / strip_spc)^0,
longstring = (P"[" * Cg((P"=")^0, "init") * P"[") *
(ANY - (Cmt((P"]" * C((P"=")^0) * "]") * Cb"init",
function (s,i,a,b) return a == b end)))^0 * --luacheck: ignore
(P"]" * (P"=")^0 * P"]"),
comment = (P"--" * V"longstring") +
(P"--" * (ANY - EOL)^0),
Name = ALPHA * ALPHANUM^0 - (
K"and" + K"break" + K"do" + K"else" + K"elseif" +
K"end" + K"false" + K"for" + K"function" + K"goto" + K"if" +
K"in" + K"local" + K"nil" + K"not" + K"or" + K"repeat" +
K"return" + K"then" + K"true" + K"until" + K"while"),
Number = (P"-")^-1 * V"spc" * P"0x" * locale.xdigit^1 * -ALPHANUM +
(P"-")^-1 * V"spc" * DIGIT^1 *
(P "." * DIGIT^1)^-1 * (S "eE" * (P "-")^-1 *
DIGIT^1)^-1 * -ALPHANUM +
(P"-")^-1 * V "spc" * P "." * DIGIT^1 *
(S "eE" * (P "-")^-1 * DIGIT^1)^-1 * -ALPHANUM,
String = P'"' * (P"\\" * ANY + (1 - P'"'))^0 * P'"' +
P"'" * (P"\\" * ANY + (1 - P"'"))^0 * P"'" +
V"longstring",
chunk = ((SHEBANG)^-1 / "") * V"spc" * V"block" * V"spc" * EOF,
preload = P"package.preload[" * V"preloaded_name" * P"]" * V"spc" * P"=" * V"spc" * P"function(...)" *
V"spc" * V"block" * V"space" * K"end" * V"space" * P";",
preloaded_name = P'"' * ((1 - P'"')^1 / GPN) * P'"' +
P"'" * ((1 - P"'")^1 / GPN) * P"'",
block = (V"stat" * ((V"spc" * P";" * V"spc") + V"space"))^0,
stat = P";" * V"spc" +
P"::" * V"spc" * V"Name" * V"spc" * P"::" +
V"preload" +
K"break" +
K"goto" * V"space" * V"Name" +
K"do" * V"space" * V"block" * V"space" * K "end" +
K"while" * V"space" * V"expr" * V"space" * K "do" * V"space" *
V"block" * V"space" * K"end" +
K"repeat" * V"space" * V"block" * V"space" * K"until" *
V"space" * V"expr" +
K"if" * V"space" * V"expr" * V"space" * K"then" *
V"space" * V"block" * V"space" *
(K"elseif" * V"space" * V"expr" * V"space" * K"then" *
V"space" * V"block" * V"space")^0 *
(K"else" * V"space" * V"block" * V"space")^-1 * K"end" +
K"for" * V"space" *
((V"Name" * V"spc" * P"=" * V"spc" *
V"expr" * V"spc" * P"," * V"spc" * V"expr" *
(V"spc" * P"," * V"spc" * V"expr")^-1) +
(V"namelist" * V"space" * K"in" * V"space" * V"explist")
)* V"space" * K"do" * V"space" * V"block" * V"space" * K"end" +
K"return" * (V"space" * V"explist")^-1 +
K"function" * V"space" * V"funcname" * V"spc" * V"funcbody" +
K"local" * V"space" * (
(K"function" * V"space" * V"Name" * V"spc" * V"funcbody") +
(V"namelist" * (V"spc" * P"=" * V"spc" * V"explist")^-1)) +
V"varlist" * V"spc" * P"=" * V"spc" * V"explist" +
V"functioncall",
funcname = V"Name" * (V"spc" * P"." * V"spc" * V"Name")^0 *
(V"spc" * P":" * V"spc" * V"Name")^-1,
namelist = V"Name" * (V"spc" * P"," * V"spc" * V"Name")^0,
varlist = V"var" * (V"spc" * P"," * V"spc" * V"var")^0,
value = K"nil" + K"false" + K"true" + P"..." +
V"Number" + V"String" * V"spc" +
V"functiondef" + V"tableconstructor" +
V"functioncall" + V"var" +
P"(" * V"spc" * V"expr" * V"spc" * P")" * V"spc",
expr = V"unop" * V"spc" * V"expr" +
V"value" * (V"binop" * V"expr")^-1,
index = P"[" * V"spc" * V"expr" * V"spc" * P"]" +
P"." * V"spc" * V"Name",
call = V"args" +
P":" * V"spc" * V"Name" * V"spc" * V"args",
prefix = P"(" * V"spc" * V"expr" * V"spc" * P")" +
V"Name",
suffix = V"call" + V"index",
var = V"prefix" * (V"spc" * V"suffix" * #(V"spc" * V"suffix"))^0 * V"spc" * V"index" +
V"Name",
-- <require>
moduleargs = -- capture constant module names
V"modulename" + P"(" * V"spc" * V"modulename" * V"spc" * P")" +
-- cant capture calculated module names
P"(" * V"spc" * V"explist" * V"spc" * P")",
modulename = P'"' * ((1 - P'"')^0 / GMN) * P'"' +
P"'" * ((1 - P"'")^0 / GMN) * P"'",
-- </require>
functioncall = -- <require>
K"require" * V"space" * V"moduleargs" * (
V"spc" * P"." * V"spc" * V"Name" +
V"spc" * (V"args" + V"index"))^0 +
-- </require>
V"prefix" * (V"spc" * V"suffix" * #(V"spc" * V"suffix"))^0 * V"spc" * V"call",
explist = V"expr" * (V"spc" * P"," * V"spc" * V"expr")^0;
args = P"(" * V"spc" * (V"explist" * V"spc")^-1 * P")" +
V"tableconstructor" +
V"String",
functiondef = K"function" * V"spc" * V"funcbody",
funcbody = P"(" * V"spc" * (V"parlist" * V"spc")^-1 * P")" * V"spc" * V"block" * V"space" * K"end",
parlist = V"namelist" * (V"spc" * P"," * V"spc" * P"...")^-1 + P"...",
tableconstructor = P"{" * V"spc" * (V"fieldlist" * V"spc")^-1 * P"}",
fieldlist = V"field" * (V"spc" * V"fieldsep" * V"spc" * V"field")^0 * (V"spc" * V"fieldsep")^-1,
field = V"spc" * P"[" * V"spc" *V"expr" * V"spc" * P"]" * V"spc" * P"=" * V"spc" * V"expr"
+ V"space" * V"Name" * V"spc" * P"=" * V"spc" * V"expr" + V"expr",
fieldsep = V"spc" * (P"," + P ";") * V"spc",
binop = V"space" * (K"and" + K"or") * V"space" +
V"spc" * (P".." + P"<=" + P">=" + P"==" + P"~="
+ P"//" + P">>" + P"<<" + P"~"
+ P"|" + P"+" + P"-" + P"*" + P"/"
+ P"^" + P"%" + P"&" + P"<" + P">" ) * V"spc",
unop = V"space" *K"not" * V"space" +
V"spc" * (P"-" + P"~" + P"#") * V"spc"
};
local function assert(cond, msg, ...)
if cond then return cond end;
assert(msg, 'assertion failed.');
io.stderr:write(" *ERROR: " .. msg:format(...) .. "\n"); --luacheck: ignore
os.exit(1);
end;
local function locate_module() end; -- forward declaration
local function scan_file(fn, mn)
mn = mn or 0;
local t = {};
function get_module_name(s)
insert(t, s);
return s;
end;
local f = assert(io.open(fn), 'cant open "' .. fn .. '".');
sources[mn] = PARSER:match(f:read("*a"));
f:close();
if not sources[mn] then
app.print('* syntax error in file "' .. fn ..'".');
return;
end;
for _, n in ipairs(t) do
locate_module(n);
end;
return;
end;
function locate_module(ModuleName)
if (type(ModuleName) ~= "string") or
(not args.glue) or
tblLuaMods[ModuleName] or
tblExcludedMods[ModuleName] or
tblOtherMods[ModuleName] or
tblPreloadedMods[ModuleName] then
return;
end;
local f, filename;
for p in (package.path..";".. splitpath(args.infile) .."/?.lua"):gsub("\\","/"):gmatch("([^;]+);") do --luacheck: ignore
p = p:gsub("?",ModuleName:gsub("%.","/"));
f = io.open(p);
if f then
filename = p;
f:close();
break;
end;
end;
if filename then
if not tblLuaMods[ModuleName] then
tblLuaMods[ModuleName] = filename;
scan_file(filename, ModuleName);
end
return;
else
tblOtherMods[ModuleName] = (package.preload[ModuleName] and "preloaded") or "?"; --luacheck: ignore
end;
return;
end;
local function create_amalgam(sources)
local t = {sources[0]}; -- main source
sources[0] = nil;
for m in pairsByKey(tblLuaMods) do
insert(t, #t, 'package.preload["'.. m .. '"] = function(...)\n');
insert(t, #t, sources[m]);
insert(t, #t, "\nend; -- module " .. m .. " \n");
sources[m] = nil;
end;
local s = concat(t)
if args.strip then
stripping = true;
local s1 = #s;
s = PARSER:match(s)
local s2 = #s;
app.print("- strip result:\t"..string.format("%i / %i => %2.1f%% saved.", s1, s2, (1.0 - (s2/s1)) * 100.0));
end;
return s;
end;
local function print_status()
printMessageLine("- already preloaded:\t", tblPreloadedMods);
printMessageLine("- lua modules:\t", tblLuaMods);
printMessageLine("- excluded modules:\t", tblExcludedMods);
printMessageLine("- included modules:\t", tblIncludedMods);
printMessageLine("- non lua modules:\t", tblOtherMods);
end;
local function find_loader()
local function anystub()
local function exestub(fn)
local GLUESIG = "%%glue:L";
--local LUACSIG = "\x1bLuaR";
local stub;
--fn = fn or arg[0];
if is_exe(fn) then
local sfile = assert(io.open(fn, "rb")); --TODO
sfile:seek("end", -(8 + #GLUESIG));
local stublen = "a";
if GLUESIG == sfile:read(#GLUESIG) then
stublen = (string.byte(sfile:read(1))) +
(string.byte(sfile:read(1)) * 256) +
(string.byte(sfile:read(1)) * 256^2) +
(string.byte(sfile:read(1)) * 256^3);
else
app.print("* exe has no lua source attached. Be shure you have chosen the right exe stub!");
end;
sfile:seek("set", 0);
stub = assert(sfile:read(stublen)); --TODO
sfile:close();
return stub, fn;
end
return nil;
end;
--
local stub, stubname;
if args.loader then
stub, stubname = exestub(args.loader);
else
stub, stubname = exestub(arg[0]);
end
return stub , stubname;
end;
--
local stub, stubname = anystub();
assert(stub, "can't find a loader.");
app.print('- using loader in:\t"' .. stubname ..'".');
return stub;
end;
local function glue(source)
local GLUESIG = "%%glue:L"
--local LUACSIG = "\x1bLuaR"
local function linteger(num)
local function byte(n)
return math.floor(num / (256^n)) % 256;
end;
return string.char(byte(0), byte(1), byte(2), byte(3));
end;
local stub = find_loader();
return concat{stub, source, GLUESIG, linteger(#stub), linteger(#source)};
end;
--
if not args.infile then
app.print("no source file given.");
return;
end;
if not args.outfile then
app.print("no target file given.");
return;
end;
if args.exclude then
for _, m in ipairs(args.exclude) do
tblExcludedMods[m] = true;
tblIncludedMods[m] = nil
end;
end;
if args.include then
for _, m in ipairs(args.include) do
if not tblExcludedMods[m] then
tblIncludedMods[m] = true;
end;
end;
end;
-- read main source
scan_file(args.infile);
if sources[0] then
-- read manually included modules ...
for mn in pairsByKey(tblIncludedMods) do
locate_module(mn);
end;
--
print_status();
--
if args.outfile then
-- write outfile
local of;
sources = create_amalgam(sources);
if is_exe(args.outfile) then
sources = glue(sources);
of = assert(io.open(args.outfile, "w+b"), 'cant open "' .. args.outfile .. '".');
else
of = assert(io.open(args.outfile, "w+"), 'cant open "' .. args.outfile .. '".');
end;
assert(of:write(sources), 'cant write "' .. args.outfile .. '".');
of:close();
app.print('* Done.\t\t"' .. args.outfile .. '" created.');
end;
end;
end;
local function doCompile()
local cmdline = 'make "LUAVER=$LUAVER" "ICON=$ICON" "CLISTUB=$CLISTUB" "GUISTUB=$GUISTUB" "PRELOAD_MODS=$PRELOADMODS"';
local function execute(cmd)
local res1, _, res3 = os.execute(cmd);
if type(res1) == "number" then
return res1 == 0, res1;
else
return res1, res3;
end;
end;
cmdline = cmdline:gsub("$(%u+)", app);
app.print(cmdline);
execute(cmdline.." >makeoutput.tmp 2>&1");
local f = io.open("makeoutput.tmp");
if f then
local strres = f:read("*a");
f:close();
app.print(strres);
os.remove("makeoutput.tmp");
end;
execute("make clean");
end;
--
app.print = function(msg)
if msg then
app.messages.append = msg;
else
app.messages.value = "";
end;
end;
--
-- GUI ----------------------------------------------------------------------
--
local last_directory = ".";
app.ifSource = iup.text{value = arg[1],
multiline = "no",
cuebanner = "lua-source",
expand = "HORIZONTAL",
};
app.ifTarget = iup.text{value = arg[2],
multiline = "no",
cuebanner = "lua-source or exe-file",
expand = "HORIZONTAL",
};
app.ifLoader = iup.text{value = arg[3] or is_exe(arg[0]) and arg[0],
multiline = "no",
cuebanner = "executable containing a loader",
expand = "HORIZONTAL",
active = "no",
};
--
app.btBrowseSource = iup.button{title = " Browse ",
action = function ()
local fd=iup.filedlg{ title = "Lua Source File",
dialogtype = "OPEN",
parentdialog = app.dlg,
nochangedir = "NO",
directory = last_directory,
filter = "*.lua;*.wlua",
filterinfo = "Lua Files",
allownew = "NO",
}
fd:popup(iup.CENTER, iup.CENTER)
local status = fd.status
local filename = fd.value
last_directory = fd.directory
fd:destroy()
if (status == "-1") or (status == "1") then
if (status == "1") then
app.print("Cannot load file " .. filename)
end
else
app.ifSource.value = filename
end
end,
};
app.btnBrowseTarget = iup.button{title = " Browse ",
action = function ()
local fd = iup.filedlg{title="Target File",
dialogtype="SAVE",
parentdialog = app.dlg,
nochangedir="NO",
directory=last_directory,
extfilter="scripts/exe (.lua;.wlua;.exe)|*.exe;*.lua;*.wlua|\z
executable file (.exe)|*.exe|\z
lua script (.lua;.wlua)|*.lua;*.wlua",
allownew = "yes",
};
fd:popup(iup.LEFT, iup.LEFT)
local status = fd.status;
app.targetFileName = fd.value;
last_directory = fd.directory;
fd:destroy();
if status ~= "-1" then
if (app.targetFileName == nil) then
app.print("Cannot Save file "..app.targetFileName);
end;
app.ifTarget.value = app.targetFileName;
end;
end,
};
app.btnBrowseLoader = iup.button{title = " Browse ",
action = function ()
local fd = iup.filedlg{title="Loader File",
dialogtype ="OPEN",
parentdialog = app.dlg,
nochangedir ="NO",
directory =last_directory,
filter ="*.exe",
filterinfo ="exe files",
allownew = "NO",
};
fd:popup(iup.LEFT, iup.LEFT);
local status = fd.status;
local loaderFileName = fd.value;
last_directory = fd.directory;
fd:destroy();
if (status == "-1") or (status == "1") then
if (status == "1") then
app.print("Cannot read file " .. loaderFileName);
end
else
app.ifLoader.value = loaderFileName;
end;
end,
};
app.btnAbort = iup.button{title = " Quit ",
name = "btnAbort",
expand = "horizontal",
action = function()
return iup.CLOSE;
end,
};
app.btnGlue = iup.button{title = " Glue! ",
action = function()
app.messages.value = ""; -- clear old messages
doGlue{
infile = app.ifSource.value ~= "" and app.ifSource.value or nil,
outfile = app.ifTarget.value ~= "" and app.ifTarget.value or nil,
loader = app.ifLoader.value ~= "" and app.ifLoader.value or nil,
glue = app.cbPreloadModules.value == "ON",
strip = app.cbStripWhitespaces.value == "ON",
};
end,
};
app.btnIcon = iup.button{title = " Icon?",
active = "no",
action = function(self)
local dlg = iup.filedlg{
dialogtype = "open",
directory = ".",
extfilter = "icons|*.ico|",
nochangedir = "no",
parentdialog = app.dlg,
};
if iup.Popup(dlg,iup.CENTERPARENT,iup.CENTERPARENT) == iup.NOERROR then
if dlg.value then
app.ICON = dlg.value:match("([^\\/]+).ico$");
self.title = app.ICON;
iup.Map(app.dlg);
app.btnModules.active = "yes";
end;
end;
--TODO:
end,
};
app.btnModules = iup.button{title = " Modules: ",
expand = "horizontal",
active = "no",
action = function(self)
app.modules = {
"idle",
"iuplua",
"lanes.core",
"lfs",
"lpeg",
"lsqlite3",
"mime.core",
"socket.core",
"winapi",
};
app.modsChoosen = {};
for i in ipairs(app.modules) do
app.modsChoosen[i] = 0;
end;
local err = iup.ListDialog(2,"module selection",
#app.modules,
app.modules,
0, 0, #app.modules,
app.modsChoosen
);
if err ~= -1 then
local selection = {};
local i = 1;
while i ~= (#app.modules + 1) do
if app.modsChoosen[i] ~= 0 then
insert(selection, app.modules[i]);
end;
i = i + 1;
end;
if #selection == 0 then
app.PRELOADMODS = "";
self.title = "(dynamic module loading)";
else
app.PRELOADMODS = table.concat(selection, " ");
self.title = app.PRELOADMODS;
end;
iup.Map(app.dlg);
app.btnCompile.active = "yes";
end;
end,
};
app.btnCompile = iup.button{title = " Compile ",
expand = "horizontal",
active = "no",
action = doCompile,
};
--
app.cbPreloadModules = iup.toggle{title = "preload lua modules",
flat = "YES",
value = "ON",
};
app.cbStripWhitespaces = iup.toggle{title = "strip whitspaces",
flat = "YES",
value = "OFF",
};
--
app.lstVersion = iup.list{
dropdown = "yes",
"Lua 5.1",
"Lua 5.2",
"Lua 5.3",
action = function(_, _, item)
app.LUAVER = "5"..item;
app.lstGuiCli.active = "yes";
end;
};
app.lstGuiCli = iup.list{
active = "no",
dropdown = "yes",
"GUI",
"CLI",
action = function(_, text)
if text == "CLI" then
app.CLISTUB = "true";
app.GUISTUB = "";
elseif text == "GUI" then
app.CLISTUB = "";
app.GUISTUB = "true";
end;
app.btnIcon.active = "yes";
end;
};
--
app.messages = iup.text{
multiline = "yes",
border = "no",
canfocus = "no",
readonly = "yes",
formatting = "yes",
expand = "yes",
};
--
app.dlg = iup.dialog{title = "wGlue "..VERSION,
minsize = "640x340",
defaultesc = app.btnAbort,
defaultenter = app.btnGlue,
iup.vbox{
cgap = "2",
cmargin = "1x1",
iup.frame{--title = "source/target"
iup.gridbox{
NUMDIV = 3,
cgapcol = 5,
cgaplin = 2,
iup.label{ title = "Source:",
padding = "1x2",
},
app.ifSource,
app.btBrowseSource,
iup.label{ title = "Target:",
padding = "1x2",
},
app.ifTarget,
app.btnBrowseTarget,
},
},
iup.frame{--title = "Loader",
iup.gridbox{
NUMDIV = 3,
cgapcol = 5,
cgaplin = 2,
iup.label{title = "Loader:",
padding = "1x2",
},
app.ifLoader,
app.btnBrowseLoader,
ifSources(iup.label{title = "build:",
padding = "1x4",
}
),
ifSources(iup.hbox{
app.lstVersion,
app.lstGuiCli,
app.btnIcon,
app.btnModules,
}
);
ifSources(app.btnCompile),
},
},
iup.frame{title = "glue options",
iup.hbox{
alignment = "ACENTER",
app.cbPreloadModules,
app.cbStripWhitespaces,
--iup.button{title = "include module(s)",
-- flat = "YES",
--},
iup.fill{},
},
},
iup.frame{title = "messages",
app.messages,
},
iup.hbox{
cmargin = "0x2",
app.btnAbort,
app.btnGlue,
},
},
};
--
-- Main Loop ----------------------------------------------------------------
--
app.dlg:showxy();
app.print(("WGlue %s (%s)"):format(VERSION, luaVersion()));
printMessageLine("* preloaded modules: ", package.preload);
iup.MainLoop();
iup.Close();
|
if mcbPacker then --mcbPacker.ignore
mcbPacker.require("s5CommunityLib/comfort/table/CopyTable")
mcbPacker.require("s5CommunityLib/lib/UnlimitedArmy")
mcbPacker.require("s5CommunityLib/comfort/math/GetDistance")
mcbPacker.require("s5CommunityLib/comfort/entity/EntityIdChangedHelper")
mcbPacker.require("s5CommunityLib/comfort/number/GetRandom")
end --mcbPacker.ignore
--- author:mcb current maintainer:mcb v0.1b
-- truppen rekrutierer für UnlimitedArmy.
--
-- Recruiter = UnlimitedArmyRecruiter:New(army, {
-- -- benötigt:
-- Buildings = {id...},
-- ArmySize,
-- UCats = {
-- {UCat, SpawnNum, Looped},
-- --...
-- },
-- -- optional:
-- ResCheat,
-- ReorderAllowed,
-- RemoveUnavailable,
-- RandomizeSpawn,
-- DoNotRemoveIfDeadOrEmpty,
-- })
--
-- - Recruiter:Remove() entfernt den spawner.
-- - Recruiter:IsDead() gibt zurück, ob der spawngenerator tot (und der spawner somit nutzlos) ist.
-- - Recruiter:AddBuilding(id) fügt ein rekrutierungsgebäude hinzu.
-- - Recruiter:RemoveBuilding(id) entfernt ein rekrutierungsgebäude.
-- - Recruiter:AddUCat(ucat, spawnnum, looped) fügt einen kaufauftrag hinzu.
-- - Recruiter:RemoveUCat(ucat) entfernt alle kaufaufträge der ucat.
--
-- Benötigt:
-- - CopyTable
-- - UnlimitdArmy
-- - GetDistance
-- - EntityIdChangedHelper
-- - GetRandom
--- @class UnlimitedArmyRecruiter : UnlimitedArmyFiller
UnlimitedArmyRecruiter = {Army=nil, Buildings=nil, ArmySize=nil, UCats=nil, ResCheat=nil, InRecruitment=nil, AddTrigger=nil,
TriggerType=nil, TriggerBuild=nil, Cannons=nil, ReorderAllowed=nil, RemoveUnavailable=nil, RandomizeSpawn=nil,DoNotRemoveIfDeadOrEmpty=nil, IdChangedTrigger=nil
}
--- @type UnlimitedArmyRecruiterUCat[]
UnlimitedArmyRecruiter.UCats=nil
--- @type UnlimitedArmyRecruiterInRec[]
UnlimitedArmyRecruiter.InRecruitment=nil
--- @type UnlimitedArmyRecruiter
UnlimitedArmyRecruiter = UnlimitedArmyFiller:CreateSubClass("UnlimitedArmyRecruiter")
UnlimitedArmyRecruiter:AStatic()
UnlimitedArmyRecruiter.NumCache = {}
UnlimitedArmyRecruiter:AReference()
function UnlimitedArmyRecruiter:New(army, data) end
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:Init(army, data)
self:CallBaseMethod("Init", UnlimitedArmyRecruiter)
assert(army:InstanceOf(UnlimitedArmy))
self.Buildings = data.Buildings
assert(self.Buildings[1] and IsAlive(self.Buildings[1]))
self.ArmySize = assert(data.ArmySize)
self.UCats = {}
self.ResCheat = data.ResCheat
self.InRecruitment = {}
self.Cannons = {}
self.ReorderAllowed = data.ReorderAllowed
self.RemoveUnavailable = data.RemoveUnavailable
self.RandomizeSpawn = data.RandomizeSpawn
self.DoNotRemoveIfDeadOrEmpty = data.DoNotRemoveIfDeadOrEmpty
self.AddTrigger = Trigger.RequestTrigger(Events.LOGIC_EVENT_ENTITY_CREATED, nil, ":CheckAddRecruitment", 1, nil, {self})
self.IdChangedTrigger = Trigger.RequestTrigger(Events.SCRIPT_EVENT_ON_ENTITY_ID_CHANGED, nil, ":OnIdChanged", 1, nil, {self})
self.Army = army
army.Spawner = self
for _,d in ipairs(data.UCats) do
self:AddUCat(d.UCat, d.SpawnNum, d.Looped)
end
end
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:IsDead()
assert(self ~= UnlimitedArmyRecruiter)
if not self.Army then
return true
end
for _,id in ipairs(self.Buildings) do
if IsAlive(id) then
return false
end
end
return self.UCats[1] and true or false
end
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:CheckValidSpawner()
assert(self ~= UnlimitedArmyRecruiter)
assert(self.Army or self.DetachedFunc)
end
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:Tick(active)
self:CheckValidSpawner()
self:CheckLeaders(self.Army, self.Army.AddLeader)
if self:IsDead() then
if (table.getn(self.InRecruitment) + self:GetCannonBuyNum())<=0 and not self.DoNotRemoveIfDeadOrEmpty then
self:Remove()
end
return
end
if active and (self.Army:GetSize(true, true) + table.getn(self.InRecruitment) + self:GetCannonBuyNum())<self.ArmySize then
self:ForceSpawn(self.ArmySize - (self.Army:GetSize(true, true) + table.getn(self.InRecruitment) + self:GetCannonBuyNum()))
end
end
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:TickDetached()
self:CheckValidSpawner()
self:CheckLeaders(self.DetachedObject, self.DetachedFunc)
if table.getn(self.InRecruitment) + self:GetCannonBuyNum() <= 0 then
self:Remove()
return true
end
end
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:GetCannonBuyNum()
self:CheckValidSpawner()
local i=0
for _,_ in pairs(self.Cannons) do
i = i + 1
end
return i
end
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:CheckLeaders(obj, f)
self:CheckValidSpawner()
for i=table.getn(self.Buildings),1,-1 do
local alive = true
if IsDead(self.Buildings[i]) then
if self.Cannons[self.Buildings[i]] then
if IsValid(self.Cannons[self.Buildings[i]]) then
f(obj, self.Cannons[self.Buildings[i]])
end
self.Cannons[self.Buildings[i]] = nil
UnlimitedArmyRecruiter.NumCache[self.Buildings[i]] = UnlimitedArmyRecruiter.NumCache[self.Buildings[i]] - 1
end
table.remove(self.Buildings, i)
alive = false
end
if alive and self.Cannons[self.Buildings[i]] then
local c = Logic.GetLeaderTrainingAtBuilding(self.Buildings[i])
if self.Cannons[self.Buildings[i]] == -1 and IsValid(c) then
self.Cannons[self.Buildings[i]] = c
elseif self.Cannons[self.Buildings[i]]~=-1 and c==0 then
if IsValid(self.Cannons[self.Buildings[i]]) then
f(obj, self.Cannons[self.Buildings[i]])
end
self.Cannons[self.Buildings[i]] = nil
UnlimitedArmyRecruiter.NumCache[self.Buildings[i]] = UnlimitedArmyRecruiter.NumCache[self.Buildings[i]] - 1
end
end
end
for i=table.getn(self.InRecruitment),1,-1 do
if IsDestroyed(self.InRecruitment[i].Id) then
local d = table.remove(self.InRecruitment, i)
UnlimitedArmyRecruiter.NumCache[d.Building] = UnlimitedArmyRecruiter.NumCache[d.Building] - 1
elseif Logic.LeaderGetBarrack(self.InRecruitment[i].Id)==0 then
local d = table.remove(self.InRecruitment, i)
f(obj, d.Id)
UnlimitedArmyRecruiter.NumCache[d.Building] = UnlimitedArmyRecruiter.NumCache[d.Building] - 1
end
end
end
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:OnIdChanged()
local ol, ne = Event.GetEntityID1(), Event.GetEntityID2()
for i,id in ipairs(self.Buildings) do
if id==ol then
self.Buildings[i] = ne
end
end
for _,t in ipairs(self.InRecruitment) do
if t.Id==ol then
t.Id = ne
end
end
end
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:ForceSpawn(num)
self:CheckValidSpawner()
for i=1, num do
if self:SpawnOneLeader() then
return
end
end
end
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:IsSpawnPossible()
self:CheckValidSpawner()
return not self:IsDead()
end
UnlimitedArmyRecruiter:AStatic()
UnlimitedArmyRecruiter.UCatBuyTypes = {
[UpgradeCategories.LeaderSword] = UpgradeCategories.Barracks,
[UpgradeCategories.LeaderPoleArm] = UpgradeCategories.Barracks,
[UpgradeCategories.LeaderBandit] = UpgradeCategories.Barracks,
[UpgradeCategories.LeaderBarbarian] = UpgradeCategories.Barracks,
[UpgradeCategories.BlackKnightLeaderMace1] = UpgradeCategories.Barracks,
[UpgradeCategories.LeaderBow] = UpgradeCategories.Archery,
[UpgradeCategories.LeaderCavalry] = UpgradeCategories.Stable,
[UpgradeCategories.LeaderHeavyCavalry] = UpgradeCategories.Stable,
}
if UpgradeCategories.Thief then
UnlimitedArmyRecruiter.UCatBuyTypes[UpgradeCategories.Thief] = UpgradeCategories.Tavern
UnlimitedArmyRecruiter.UCatBuyTypes[UpgradeCategories.Scout] = UpgradeCategories.Tavern
UnlimitedArmyRecruiter.UCatBuyTypes[UpgradeCategories.Evil_LeaderBearman] = UpgradeCategories.Barracks
UnlimitedArmyRecruiter.UCatBuyTypes[UpgradeCategories.Evil_LeaderSkirmisher] = UpgradeCategories.Archery
UnlimitedArmyRecruiter.UCatBuyTypes[UpgradeCategories.LeaderRifle] = UpgradeCategories.Archery
end
if UpgradeCategories.LeaderBanditBow then
UnlimitedArmyRecruiter.UCatBuyTypes[UpgradeCategories.LeaderBanditBow] = UpgradeCategories.Archery
end
UnlimitedArmyRecruiter:AStatic()
UnlimitedArmyRecruiter.CannonBuyTypes = {
[UpgradeCategories.Cannon1] = UpgradeCategories.Foundry,
[UpgradeCategories.Cannon2] = UpgradeCategories.Foundry,
[UpgradeCategories.Cannon3] = UpgradeCategories.Foundry,
[UpgradeCategories.Cannon4] = UpgradeCategories.Foundry,
}
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:SpawnOneLeader()
self:CheckValidSpawner()
if Logic.GetPlayerAttractionUsage(self.Army.Player) >= Logic.GetPlayerAttractionLimit(self.Army.Player) then
return
end
if Logic.GetAverageMotivation(self.Army.Player) < Logic.GetLogicPropertiesMotivationThresholdVCLock() then
return
end
if not self.UCats[1] then
return
end
local index = 1
if self.RandomizeSpawn then
index = GetRandom(1, table.getn(self.UCats))
end
local buyT = UnlimitedArmyRecruiter.UCatBuyTypes[self.UCats[index].UCat]
local cbuyT = UnlimitedArmyRecruiter.CannonBuyTypes[self.UCats[index].UCat]
local buyingAt = 0
local hasOneBuilding = false
if buyT then
for _,id in ipairs(self.Buildings) do
if Logic.GetUpgradeCategoryByBuildingType(Logic.GetEntityType(id))==buyT then
hasOneBuilding = true
if self:GetNumberTrainingAtBuilding(id)<3 and Logic.GetEntityHealth(id)/Logic.GetEntityMaxHealth(id)>0.2 then
buyingAt = id
break
end
end
end
elseif cbuyT then
for _,id in ipairs(self.Buildings) do
if Logic.GetUpgradeCategoryByBuildingType(Logic.GetEntityType(id))==cbuyT then
hasOneBuilding = true
if self:GetNumberTrainingAtBuilding(id)<1 and Logic.GetEntityHealth(id)/Logic.GetEntityMaxHealth(id)>0.2 then
local num, wid = Logic.GetAttachedWorkersToBuilding(id)
if num>=1 and Logic.GetCurrentTaskList(wid)=="TL_SMELTER_WORK1_WAIT"
and not InterfaceTool_IsBuildingDoingSomething(id)
and Logic.GetCannonProgress(id)==100 then
buyingAt = id
break
end
end
end
end
else
assert(false)
end
if buyingAt ~= 0 then
local c = {}
Logic.FillLeaderCostsTable(self.Army.Player, self.UCats[index].UCat, c)
if self:CheckResources(c, true) then
UnlimitedArmyRecruiter.NumCache[buyingAt] = UnlimitedArmyRecruiter.NumCache[buyingAt] + 1
if buyT then
self.TriggerType = Logic.GetSettlerTypeByUpgradeCategory(self.UCats[index].UCat, self.Army.Player)
self.TriggerBuild = buyingAt
Logic.BarracksBuyLeader(buyingAt, self.UCats[index].UCat)
else
local ty = Logic.GetSettlerTypeByUpgradeCategory(self.UCats[index].UCat, self.Army.Player)
if UnlimitedArmy.HasHook() then
CppLogic.Entity.Building.CommandFoundryBuildCannon(buyingAt, ty)
else
local playerId = GUI.GetPlayerID()
local selected = {GUI.GetSelectedEntities()}
GUI.SetControlledPlayer(self.Army.Player)
GUI.BuyCannon(buyingAt, ty)
GUI.SetControlledPlayer(playerId)
Logic.PlayerSetGameStateToPlaying(playerId)
Logic.ForceFullExplorationUpdate()
for i = 1, table.getn(selected), 1 do
GUI.SelectEntity(selected[i])
end
end
self.Cannons[buyingAt] = -1
end
end
self.UCats[index].CurrNum = self.UCats[index].CurrNum - 1
if self.UCats[index].CurrNum <= 0 then
local d = table.remove(self.UCats, index)
if d.Looped then
self:ResetUCatNum(d)
table.insert(self.UCats, d)
end
end
elseif not hasOneBuilding and self.RemoveUnavailable then
table.remove(self.UCats, index)
elseif self.ReorderAllowed then
table.insert(self.UCats, table.remove(self.UCats, index)) -- move ucat to end
end
end
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:CheckResources(c, addIfCheat)
self:CheckValidSpawner()
if self.ResCheat then
if addIfCheat then
for r,a in pairs(c) do
Logic.AddToPlayersGlobalResource(self.Army.Player, r, a)
end
end
return true
else
for r,a in pairs(c) do
local am = Logic.GetPlayersGlobalResource(self.Army.Player, r) + Logic.GetPlayersGlobalResource(self.Army.Player, Logic.GetRawResourceType(r))
if am < a then
return false
end
end
return true
end
end
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:GetNumberTrainingAtBuilding(id)
if not UnlimitedArmyRecruiter.NumCache[id] then
UnlimitedArmyRecruiter.NumCache[id] = 0
end
return UnlimitedArmyRecruiter.NumCache[id]
end
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:Remove(detachedFunc, detachedObj)
self:CheckValidSpawner()
if table.getn(self.InRecruitment) + self:GetCannonBuyNum() > 0 then
if not self.DetachedFunc then
StartSimpleJob(":TickDetached", self)
end
self.DetachedFunc = detachedFunc or self.DetachedFunc or function(_,id) DestroyEntity(id) end
self.DetachedObject = detachedObj or self.DetachedObject
return
end
if self.Army then
self.Army.Spawner = nil
self.Army = nil
end
EndJob(self.AddTrigger)
EndJob(self.IdChangedTrigger)
end
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:AddBuilding(id)
self:CheckValidSpawner()
table.insert(self.Buildings, id)
end
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:RemoveBuilding(id)
self:CheckValidSpawner()
for i=table.getn(self.Buildings),1,-1 do
if self.Buildings[i]==id then
table.remove(self.Buildings, i)
end
end
end
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:AddUCat(ucat, spawnnum, looped)
self:CheckValidSpawner()
--- @class UnlimitedArmyRecruiterUCat
local t = {
UCat = assert(ucat),
SpawnNum = assert(spawnnum),
Looped = looped,
CurrNum = nil,
}
self:ResetUCatNum(t)
table.insert(self.UCats, t)
end
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:RemoveUCat(ucat)
self:CheckValidSpawner()
for i=table.getn(self.UCats),1,-1 do
if self.UCats[i].UCat==ucat then
table.remove(self.UCats, i)
end
end
end
UnlimitedArmyRecruiter:AStatic()
--- @type Position[]
UnlimitedArmyRecruiter.SpawnOffset = {
[Entities.PB_Barracks1] = {X=-800,Y=-300},
[Entities.PB_Barracks2] = {X=-800,Y=-300},
[Entities.PB_Archery1] = {X=-670,Y=600},
[Entities.PB_Archery2] = {X=-670,Y=600},
[Entities.PB_Stable1] = {X=-350,Y=400},
[Entities.PB_Stable2] = {X=-350,Y=400},
}
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:CheckAddRecruitment()
self:CheckValidSpawner()
local id = Event.GetEntityID()
if Logic.GetEntityType(id)~=self.TriggerType then
return
end
local ep = GetPosition(id)
local tp = GetPosition(self.TriggerBuild)
local off = UnlimitedArmyRecruiter.SpawnOffset[Logic.GetEntityType(self.TriggerBuild)]
if GetDistance(ep, {X=tp.X+off.X, Y=tp.Y+off.Y}) <= 200 then
--- @class UnlimitedArmyRecruiterInRec
local t = {Id=id, Building=self.TriggerBuild}
table.insert(self.InRecruitment, t)
if self.ResCheat then
local c = {}
Logic.FillSoldierCostsTable(self.Army.Player, Logic.LeaderGetSoldierUpgradeCategory(id), c)
local snum = Logic.LeaderGetMaxNumberOfSoldiers(id)
for r,a in pairs(c) do
Logic.AddToPlayersGlobalResource(self.Army.Player, r, a*snum)
end
end
self.TriggerBuild = nil
self.TriggerType = nil
return
end
end
UnlimitedArmyRecruiter:AMethod()
function UnlimitedArmyRecruiter:ResetUCatNum(ldesc)
self:CheckValidSpawner()
if type(ldesc.SpawnNum)=="number" then
ldesc.CurrNum = ldesc.SpawnNum
else
ldesc.CurrNum = ldesc.SpawnNum(self, ldesc)
end
end
UnlimitedArmyRecruiter:FinalizeClass()
|
local co = coroutine
local async_thread = {
threads = {},
}
function async_thread.inside()
local id = string.format("%p", co.running())
return async_thread.threads[id]
end
function async_thread.create(fn)
local thread = co.create(fn)
local id = string.format("%p", thread)
async_thread.threads[id] = true
return thread
end
function async_thread.finished(x)
if co.status(x) == 'dead' then
local id = string.format("%p", x)
async_thread.threads[id] = nil
return true
end
return false
end
local function execute(async_fn, ...)
local thread = async_thread.create(async_fn)
local function step(...)
local ret = { co.resume(thread, ...) }
local stat, err_or_fn, nargs = unpack(ret)
if not stat then
error(string.format("The coroutine failed with this message: %s\n%s",
err_or_fn, debug.traceback(thread)))
end
if async_thread.finished(thread) then
return
end
assert(type(err_or_fn) == "function", "type error :: expected func")
local ret_fn = err_or_fn
local args = { select(4, unpack(ret)) }
args[nargs] = step
ret_fn(unpack(args, 1, nargs))
end
step(...)
end
local M = {}
function M.wrap(func, argc)
return function(...)
if not async_thread.inside() then
return func(...)
end
return co.yield(func, argc, ...)
end
end
function M.void(func)
return function(...)
if async_thread.inside() then
return func(...)
end
execute(func, ...)
end
end
M.scheduler = M.wrap(vim.schedule, 1)
return M
|
gfunction onCreate()
-- background shit
makeLuaSprite('mirafloordark', 'mirafloordark', -1150, 550);
scaleObject('mirafloordark', 0.9, 0.8);
makeLuaSprite('miradark', 'miradark', -500, -30);
scaleObject('miradark', 0.65, 0.65);
makeLuaSprite('tablesdark', 'tablesdark', -950, 780);
setLuaSpriteScrollFactor('tablesdark', 0.9, 0.9);
scaleObject('tablesdark', 0.6, 0.6);
makeLuaSprite('vingette', 'vingette', -650, 0);
setLuaSpriteScrollFactor('vingette', 0.9, 0.9);
scaleObject('vingette', 1.1, 1.1);
-- sprites that only load if Low Quality is turned off
if not lowQuality then
makeLuaSprite('mirafloordark', 'mirafloordark', -1150, 550);
scaleObject('mirafloordark', 0.9, 0.8);
makeLuaSprite('miradark', 'miradark', -500, -30);
scaleObject('miradark', 0.65, 0.65);
makeLuaSprite('tablesdark', 'tablesdark', -950, 780);
setLuaSpriteScrollFactor('tablesdark', 0.9, 0.9);
scaleObject('tablesdark', 0.6, 0.6);
makeLuaSprite('vingette', 'vingette', -650, 0);
setLuaSpriteScrollFactor('vingette', 0.9, 0.9);
scaleObject('vingette', 1.1, 1.1);
end
addLuaSprite('mirafloordark', false);
addLuaSprite('miradark', false);
addLuaSprite('tablesdark', true);
addLuaSprite('vingette', true);
close(true); --For performance reasons, close this script once the stage is fully loaded, as this script won't be used anymore after loading the stage
end |
local Plugin = Shine.Plugin( ... )
Plugin.Version = "1.4"
Plugin.NS2Only = true
function Plugin:SetupDataTable()
self:AddDTVar( "boolean", "ShowStatus", false )
self:AddDTVar( "string (255)", "CountdownText", "" )
self:AddDTVar( "string (255)", "StatusText", "" )
self:AddDTVar( "float (0 to 1 by 0.05)", "StatusX", 0.05)
self:AddDTVar( "float (0 to 1 by 0.05)", "StatusY", 0.45)
self:AddDTVar( "integer (0 to 255)", "StatusR", 0 )
self:AddDTVar( "integer (0 to 255)", "StatusG", 255 )
self:AddDTVar( "integer (0 to 255)", "StatusB", 255 )
self:AddDTVar( "integer (0 to 1023)", "StatusDelay", 30 ) --2^10
self:AddDTVar( "boolean", "AllowOnosExo", true )
self:AddDTVar( "boolean", "AllowMines", true )
self:AddDTVar( "boolean", "AllowCommanding", true )
self:AddDTVar( "integer (1 to 12)", "BioLevel", 9 )
self:AddDTVar( "integer (0 to 3)", "UpgradeLevel", 3 )
self:AddDTVar( "integer (0 to 3)", "WeaponLevel", 3 )
self:AddDTVar( "integer (0 to 3)", "ArmorLevel", 3 )
end
function Plugin:NetworkUpdate( Key, _, NewValue )
if Server then return end
if Key == "ShowStatus" then
self:ShowStatus( NewValue )
elseif Key == "StatusText" then
self:UpdateStatusText( NewValue )
elseif Key == "CountdownText" then
self:UpdateStatusCountdown( NewValue )
end
end
function Plugin:OnFirstTink()
local SetupClassHook = Shine.Hook.SetupClassHook
local SetupGlobalHook = Shine.Hook.SetupGlobalHook
SetupClassHook( "TechNode", "GetResearched", "GetResearched", "ActivePre" )
SetupClassHook( "TechNode", "GetHasTech", "GetHasTech", "ActivePre" )
SetupGlobalHook( "LookupTechData", "LookupTechData", "ActivePre" )
SetupClassHook( "Player", "GetGameStarted", "GetGameStarted", "ActivePre" )
SetupClassHook( "AlienTeamInfo", "OnUpdate", "AlienTeamInfoUpdate", "PassivePost" )
-- stuff for modular Exo mod ( guys really use the techtree )
if ModularExo_GetIsConfigValid then
local function ReplaceModularExo_GetIsConfigValid( OldFunc, ... )
local Hook = Shine.Hook.Call( "ModularExo_GetIsConfigValid", ... )
if not Hook then return OldFunc(...) end
local a, b, resourceCost, powerSupply, powerCost, exoTexturePath = OldFunc(...)
resourceCost = resourceCost and 0
return a, b, resourceCost, powerSupply, powerCost, exoTexturePath
end
SetupGlobalHook( "ModularExo_GetIsConfigValid", "ModularExo_GetIsConfigValid", ReplaceModularExo_GetIsConfigValid )
end
end
function Plugin:LookupTechData( techId, fieldName )
if GetGameInfoEntity() and GetGameInfoEntity():GetWarmUpActive() and ( fieldName == kTechDataUpgradeCost or fieldName == kTechDataCostKey ) then
if not self.dt.AllowOnosExo and ( techId == kTechId.Onos or techId == kTechId.Exosuit or techId == kTechId.ClawRailgunExosuit ) then
return 999
end
if not self.dt.AllowMines then
local Gamemode = Shine.GetGamemode()
if Gamemode == "ns2" and techId == kTechId.LayMines or Gamemode == "mvm" and ( techId == kTechId.DemoMines or techId == kTechId.Mine ) then
return 999
end
end
return 0
end
end
--fixing issues with TechNode
function TechNode:GetCost()
return LookupTechData(self.techId, kTechDataCostKey, 0)
end
function Plugin:GetHasTech( Tech )
if GetGameInfoEntity():GetWarmUpActive() then
local TechId = Tech.techId
if TechId == kTechId.Weapons3 and self.dt.WeaponLevel < 3 then return false end
if TechId == kTechId.Weapons2 and self.dt.WeaponLevel < 2 then return false end
if TechId == kTechId.Weapons1 and self.dt.WeaponLevel < 1 then return false end
if TechId == kTechId.Armor3 and self.dt.ArmorLevel < 3 then return false end
if TechId == kTechId.Armor2 and self.dt.ArmorLevel < 2 then return false end
if TechId == kTechId.Armor1 and self.dt.ArmorLevel < 1 then return false end
return true
end
end
function Plugin:GetResearched( Tech )
return self:GetHasTech( Tech )
end
function Plugin:GetGameStarted( Player )
if GetGameInfoEntity():GetWarmUpActive() then
if Player:isa( "Commander" ) and not self.dt.AllowCommanding then return false end
return true
end
end
function Plugin:AlienTeamInfoUpdate( AlienTeamInfo )
if not GetGameInfoEntity():GetWarmUpActive() then return end
AlienTeamInfo.bioMassLevel = self.dt.BioLevel
AlienTeamInfo.numHives = 3
AlienTeamInfo.veilLevel = self.dt.UpgradeLevel
AlienTeamInfo.spurLevel = self.dt.UpgradeLevel
AlienTeamInfo.shellLevel = self.dt.UpgradeLevel
end
function Plugin:ModularExo_GetIsConfigValid()
return GetGameInfoEntity():GetWarmUpActive()
end
return Plugin |
if FirstLoad then
g_PhotoMode = false
g_PhotoModeShotNum = false
g_PhotoModeShotThread = false
PhotoModeObj = false
g_PrePhotoModeStoredVisuals = false
g_PhotoFilter = false
g_PhotoFilterData = false
end
function OpenPhotoMode()
g_PrePhotoModeStoredVisuals = {}
PhotoModeBegin()
local dlg = GetInGameInterface()
if dlg and dlg.mode == "overview" then
dlg:SetMode("selection")
end
CreateRealTimeThread(function()
if CameraTransitionThread then
WaitMsg("CameraTransitionEnd")
end
CloseIngameMainMenu() --could have been opened by the user during camera transition
OpenDialog("PhotoMode")
end)
end
function ClosePhotoMode()
if g_PhotoMode then
CreateMapRealTimeThread(function()
PhotoModeObj:Save()
end)
end
end
function AbortPhotoMode()
ClosePhotoMode()
CloseDialog("PhotoMode")
end
local function ActivateFreeCamera()
if not GetUIStyleGamepad() then
local dlg = GetDialog("PhotoMode")
if dlg then
dlg.idFreeCameraWarning:SetVisible(true)
end
end
cameraFly.Activate(1)
SetMouseDeltaMode(true)
end
local function DeactivateFreeCamera()
if cameraFly.IsActive() then
SetMouseDeltaMode(false)
SetDefaultCameraRTS()
end
local dlg = GetDialog("PhotoMode")
if dlg then
dlg.idFreeCameraWarning:SetVisible(false)
end
end
function PhotoModeBegin()
g_PhotoMode = true
table.change(hr, "photo_mode", {
InterfaceInScreenshot = 0,
LODDistanceModifier = Max(hr.LODDistanceModifier, 200),
DistanceModifier = Max(hr.DistanceModifier, 100),
ObjectLODCapMin = Min(hr.ObjectLODCapMin, 0),
EnablePostProcDOF = 1,
Anisotropy = 4,
})
--store all initial values
g_PrePhotoModeStoredVisuals.SignsVisible = g_SignsVisible
g_PrePhotoModeStoredVisuals.ResourceIconsTurnedOff = g_ResourceIconsTurnedOff
g_PrePhotoModeStoredVisuals.lm_name = CurrentLightmodel[1].name
g_PrePhotoModeStoredVisuals.dof_params = { GetDOFParams() }
end
function PhotoModeEnd()
if g_PhotoFilter and g_PhotoFilter.deactivate then
g_PhotoFilter.deactivate(g_PhotoFilter.filter, g_PhotoFilterData)
end
g_PhotoMode = false
g_PhotoFilter = false
g_PhotoFilterData = false
PhotoModeObj:Resume("final")
--restore from initial values
table.restore(hr, "photo_mode")
g_SignsVisible = not g_PrePhotoModeStoredVisuals.SignsVisible
ToggleSigns()
g_ResourceIconsTurnedOff = not g_PrePhotoModeStoredVisuals.ResourceIconsTurnedOff
ToggleResourceIcons()
--rebuild the postprocess
PP_Rebuild()
--restore time of day and lightmodel
SetTimeOfDay(LocalToEarthTime((UICity.hour*const.MinutesPerHour + UICity.minute)*1000), const.HourDuration)
SetLightmodel(1, g_PrePhotoModeStoredVisuals.lm_name, 0)
--restore FOV
camera.SetAutoFovX(1, 0, const.Camera.DefaultFovX_16_9, 16, 9)
table.insert(g_PrePhotoModeStoredVisuals.dof_params, 0)
SetDOFParams(unpack_params(g_PrePhotoModeStoredVisuals.dof_params))
DeactivateFreeCamera()
end
function PhotoModeApply(pm_object, prop_id)
if prop_id == "toggleSigns" then
g_SignsVisible = not pm_object.toggleSigns
ToggleSigns()
elseif prop_id == "timeOfDay" then
SetTimeOfDay(LocalToEarthTime(pm_object.timeOfDay*1000), const.HourDuration)
if GetTimeFactor() == 0 then
local lm = FindPrevLightmodel(GetCurrentLightmodelList(), pm_object.timeOfDay)
if lm.name ~= CurrentLightmodel[1].name then
SetLightmodel(1, lm.name, 0)
end
end
PhotoModeApply(pm_object, "fogDensity")
PhotoModeApply(pm_object, "bloomStrength")
PhotoModeApply(pm_object, "exposure")
PhotoModeApply(pm_object, "vignette")
elseif prop_id == "fov" then
camera.SetAutoFovX(1, 0, pm_object.fov, 16, 9)
elseif prop_id == "filter" then
if g_PhotoFilter and g_PhotoFilter.deactivate then
g_PhotoFilter.deactivate(g_PhotoFilter.filter, g_PhotoFilterData)
end
local filter = PhotoFilterPresetMap[pm_object.filter]
if filter and filter.filename ~= "" then
g_PhotoFilterData = {}
if filter.activate then
filter.activate(filter, g_PhotoFilterData)
end
g_PhotoFilter = filter:GetShaderDescriptor()
else
g_PhotoFilter = false
g_PhotoFilterData = false
end
if not filter then
pm_object:SetProperty("filter", PhotoModeObject.filter) --revert to default filter
end
PP_Rebuild()
elseif prop_id == "fogDensity" then
SetSceneParam(1, "FogGlobalDensity", pm_object.fogDensity, 0, 0)
elseif prop_id == "bloomStrength" then
SetSceneVectorParam(1, "Bloom", 0, pm_object.bloomStrength, 0, 0)
elseif prop_id == "exposure" then
SetSceneParam(1, "GlobalExposure", pm_object.exposure, 0, 0)
elseif prop_id == "vignette" then
SetSceneParam(1, "Vignette", pm_object.vignette, 0, 0)
elseif prop_id == "depthOfField" or prop_id == "focusDepth" or prop_id == "defocusStrength" then
local detail = 3
local focus_depth = Lerp(hr.NearZ, hr.FarZ, pm_object.focusDepth ^ detail, 100 ^ detail)
local dof = Lerp(0, hr.FarZ - hr.NearZ, pm_object.depthOfField ^ detail, 100 ^ detail)
local strength = sqrt(pm_object.defocusStrength * 100)
SetDOFParams(
strength,
Max(focus_depth - dof / 3, hr.NearZ),
Max(focus_depth - dof / 6, hr.NearZ),
strength,
Min(focus_depth + dof / 3, hr.FarZ),
Min(focus_depth + dof * 2 / 3, hr.FarZ),
0)
elseif prop_id == "freeCamera" then
if pm_object.freeCamera then
ActivateFreeCamera()
else
DeactivateFreeCamera()
end
end
end
function PhotoModeTake()
g_PhotoModeShotThread = IsValidThread(g_PhotoModeShotThread) and g_PhotoModeShotThread or CreateMapRealTimeThread(function()
g_PhotoModeShotNum = g_PhotoModeShotNum or 0
local folder = "AppPictures/"
local proposed_name = string.format("Screenshot%04d.png", g_PhotoModeShotNum)
if io.exists(folder .. proposed_name) then
local files = io.listfiles(folder, "Screenshot*.png")
for i = 1, #files do
g_PhotoModeShotNum = Max(g_PhotoModeShotNum, tonumber(string.match(files[i], "Screenshot(%d+)%.png") or 0))
end
g_PhotoModeShotNum = g_PhotoModeShotNum + 1
proposed_name = string.format("Screenshot%04d.png", g_PhotoModeShotNum)
end
local width, height = GetResolution()
WaitNextFrame(3)
LockCamera("Screenshot")
MovieWriteScreenshot(folder .. proposed_name, 0, 32, false, width, height)
UnlockCamera("Screenshot")
g_PhotoModeShotNum = g_PhotoModeShotNum + 1
local dlg = GetDialog("PhotoMode")
if dlg then
dlg:BlinkFilePath(ConvertToOSPath(folder .. proposed_name))
end
end)
end
function PhotoObjectCreateAndLoad()
local obj = PhotoModeObject:new()
local props = obj:GetProperties()
if AccountStorage.PhotoMode then
for _, prop in ipairs(props) do
local value = AccountStorage.PhotoMode[prop.id]
if value ~= nil then --false could be a valid value
obj:SetProperty(prop.id, value)
end
end
end
PropertyObject.SetProperty(obj, "timeOfDay", UICity.hour * const.MinutesPerHour + UICity.minute)
PropertyObject.SetProperty(obj, "fogDensity", CurrentLightmodel[1].fog_density)
PropertyObject.SetProperty(obj, "bloomStrength", CurrentLightmodel[1].pp_bloom_strength)
PropertyObject.SetProperty(obj, "exposure", CurrentLightmodel[1].exposure)
PropertyObject.SetProperty(obj, "vignette", CurrentLightmodel[1].vignette)
PhotoModeObj = obj
PhotoModeObj.initial_time_factor = GetTimeFactor()
return obj
end
function OnMsg.AfterLightmodelChange()
if g_PhotoMode and GetTimeFactor() ~= 0 then
--in photo mode in resumed state
g_PrePhotoModeStoredVisuals.lm_name = CurrentLightmodel[1].name
PhotoModeObj:SetProperty("timeOfDay", UICity.hour * const.MinutesPerHour + UICity.minute)
end
end
function OnMsg.NewHour(hour)
if g_PhotoMode and PhotoModeObj.timeOfDay ~= UICity.hour * const.MinutesPerHour then
PhotoModeObj:SetProperty("timeOfDay", hour * const.MinutesPerHour)
end
end
function GetPhotoModeFilters()
local filters = {}
ForEachPreset("PhotoFilterPreset", function(preset, group, filters)
filters[#filters + 1] = { value = preset.id, text = preset.displayName }
end, filters)
return filters
end
DefineClass.PhotoModeObject = {
__parents = {"PropertyObject"},
properties =
{
{ name = T{3451, "FOV"}, id = "fov", editor = "number", default = const.Camera.DefaultFovX_16_9, slider = true, min = 20*60, max = 120*60, scale = 60, dont_save = true, step = function() return GetUIStyleGamepad() and 300 or 1 end, dpad_only = true, },
{ name = T{3452, "Time of day"}, id = "timeOfDay", editor = "number", default = 0, slider = true, min = 0, max = const.HoursPerDay * const.MinutesPerHour, dont_save = true, filter = function() return GetTimeFactor() == 0 end, step = function() return GetUIStyleGamepad() and 20 or 1 end, dpad_only = true, },
{ name = T{3453, "Gameplay Indicators"}, id = "toggleSigns", editor = "bool", default = true },
{ name = T{8712, "Free Camera"}, id = "freeCamera", editor = "bool", default = false, dont_save = true, },
{ name = T{3454, "Photo Filter"}, id = "filter", editor = "dropdown", default = "None", items = GetPhotoModeFilters },
{ name = T{3455, "Vignette"}, id = "vignette", editor = "number", slider = true, default = 0, min = 0, max = 255, dont_save = true, step = function() return GetUIStyleGamepad() and 10 or 1 end, dpad_only = true, },
{ name = T{3456, "Exposure"}, id = "exposure", editor = "number", slider = true, default = 0, min = -255, max = 255, dont_save = true, step = function() return GetUIStyleGamepad() and 20 or 1 end, dpad_only = true, },
{ name = T{3457, "Fog Density"}, id = "fogDensity", editor = "number", slider = true, default = 0, min = 0, max = 1000, dont_save = true, step = function() return GetUIStyleGamepad() and 50 or 1 end, dpad_only = true, },
{ name = T{8656, "Depth of Field"}, id = "depthOfField", editor = "number", slider = true, default = 50, min = 0, max = 100, dont_save = true, step = 1, dpad_only = true },
{ name = T{8657, "Focus Depth"}, id = "focusDepth", editor = "number", slider = true, default = 50, min = 0, max = 100, dont_save = true, step = 1, dpad_only = true },
{ name = T{8658, "Defocus Strength"}, id = "defocusStrength", editor = "number", slider = true, default = 0, min = 0, max = 100, dont_save = true, step = 1, dpad_only = true },
{ name = T{3458, "Bloom Strength"}, id = "bloomStrength", editor = "number", slider = true, default = 0, min = 0, max = 100, dont_save = true, step = function() return GetUIStyleGamepad() and 5 or 1 end, dpad_only = true, },
},
initial_time_factor = 0,
}
function PhotoModeObject:SetProperty(id, value)
local ret = PropertyObject.SetProperty(self, id, value)
PhotoModeApply(self, id)
return ret
end
function PhotoModeObject:Save()
AccountStorage.PhotoMode = {}
local storage_table = AccountStorage.PhotoMode
for _, prop in ipairs(self:GetProperties()) do
if not prop.dont_save then
local value = self:GetProperty(prop.id)
storage_table[prop.id] = value
end
end
SaveAccountStorage()
end
function PhotoModeObject:Pause()
Pause(self)
SetTimeFactor(0, "sync")
end
function PhotoModeObject:Resume(force)
Resume(self)
SetTimeFactor((force or self.initial_time_factor ~= 0) and self.initial_time_factor or const.DefaultTimeFactor, "sync")
if CurrentLightmodel[1].name ~= g_PrePhotoModeStoredVisuals.lm_name then
SetLightmodel(1, g_PrePhotoModeStoredVisuals.lm_name, 0)
end
end |
local g_LastCol = false
local function onPlayerQuit(reason)
g_LastCol[source] = nil
end
local function onVehCol(hitElement)
if(source ~= getPedOccupiedVehicle(localPlayer)) then return end
local hitPlayer = hitElement and getElementType(hitElement) == 'vehicle' and getVehicleOccupant(hitElement)
if(not hitPlayer) then return end
g_LastCol[hitPlayer] = getTickCount()
end
-- Used by RPC
function DdGetKillers()
assert(g_LastCol)
local ticks = getTickCount()
local killersSorted = {}
for player, colTicks in pairs(g_LastCol) do
local dt = ticks - colTicks
if(dt < 15000) then
table.insert(killersSorted, player)
end
end
table.sort(killersSorted, function(pl1, pl2) return g_LastCol[pl1] > g_LastCol[pl2] end)
-- Note: killersSorted[1] is last killer
local lastColTicks = #killersSorted > 0 and g_LastCol[killersSorted[1]]
local i = 2
while(i <= #killersSorted) do
local colTicks = g_LastCol[killersSorted[i]]
assert(colTicks <= lastColTicks)
if(lastColTicks - colTicks > 2000) then
table.remove(killersSorted, i)
else
i = i + 1
end
end
if(#killersSorted > 0) then
local killerName = getPlayerName(killersSorted[1])
local assistName = killersSorted[2] and getPlayerName(killersSorted[2]) or 'no'
Debug.info('Killer '..killerName..' assist '..assistName)
end
g_LastCol = {}
return unpack(killersSorted)
end
--[[local function onMyselfWasted()
local killerPlayer, assistPlayer = DdGetKillers()
triggerServerEvent('stats.onDDKillersList', resourceRoot, killerPlayer, assistPlayer)
end]]
function DdSetKillersDetectionEnabled(enabled)
local curEnabled = g_LastCol and true
if(curEnabled == enabled) then return end
--Debug.info('DD killers detection: '..tostring(enabled))
if(enabled) then
addEventHandler('onClientPlayerQuit', g_Root, onPlayerQuit)
addEventHandler('onClientVehicleCollision', g_Root, onVehCol)
--addEventHandler('onClientPlayerWasted', g_Me, onMyselfWasted)
g_LastCol = {}
else
removeEventHandler('onClientPlayerQuit', g_Root, onPlayerQuit)
removeEventHandler('onClientVehicleCollision', g_Root, onVehCol)
--removeEventHandler('onClientPlayerWasted', g_Me, onMyselfWasted)
g_LastCol = false
end
end
|
local Intertitle = class("intertitle")
Intertitle.default_font = love.graphics.newFont(
'assets/fonts/Birmingham.ttf', 50)
local filmgrain_effect = moonshine(moonshine.effects.desaturate)
.chain(moonshine.effects.filmgrain)
.chain(moonshine.effects.vignette)
function Intertitle:initialize(text, duration, font)
self.text = text or "Default Text \n You shouldn't see this"
self.end_time = love.timer.getTime() + duration
if font then self.font = font else self.font=self.default_font end
filmgrain_effect.filmgrain.size = 10
filmgrain_effect.filmgrain.opacity = .6
filmgrain_effect.desaturate.tint = {138, 111, 48}
end
function Intertitle:complete(dt)
if love.timer.getTime() >= self.end_time then
return true
else
return false
end
end
function Intertitle:draw()
if love.math.random() > 0.7 then filmgrain_effect.filmgrain.size = love.math.random() * 10 + 5 end
if love.math.random() > 0.7 then filmgrain_effect.filmgrain.opacity = love.math.random() * 0.3 end
if love.math.random() > 0.7 then filmgrain_effect.desaturate.strength = love.math.random() * .1 + .1 end
if love.math.random() > 0.7 then filmgrain_effect.vignette.radius = love.math.random() * .1 + .6 end
if love.math.random() > 0.7 then filmgrain_effect.vignette.opacity = love.math.random() * .1 + .6 end
filmgrain_effect(function()
love.graphics.draw(image.intro, 0, 0, 0, window.w / image.intro:getWidth(), window.h / image.intro:getHeight())
love.graphics.setFont(self.font)
local th = mainmenu.font:getHeight()*3
love.graphics.printf(self.text, 0, window.h/2-th/2,
window.w, 'center')
love.graphics.setFont(love.graphics.newFont())
end)
end
return Intertitle
|
fx_version 'adamant'
game 'gta5'
ui_page 'html/index.html'
files {
'html/index.html',
'html/index.js',
'html/index.css',
'html/vendor/*',
'html/images/**/*.png',
}
client_scripts {
'cl_config.lua',
'cl_hud.lua',
} |
local skynet = require "skynet"
local service = require "service"
local log = require "log"
local Table = require "table_op"
local server_common = require "global.server_common"
local MAX_AGENT_COUNT = 100
local SUCC = server_common.succ
local FAIL = server_common.fail
local manager = {}
local users = {}
-- 对象池
local pool = {}
local function new_agent()
local len = #pool
log("new_agent len=%d", len)
if len > 0 then
return table.remove(pool, len)
end
log("new_agent fail, pool is empty")
return FAIL
end
local function free_agent(agent)
table.insert(pool, agent)
log("after free agent len =%d", #pool)
-- skynet.kill(agent)
end
function manager.assign(fd, userid)
skynet.error("manager assign fd userid", fd, userid)
local agent
repeat
agent = users[userid]
if not agent then
agent = new_agent()
log("after new_agent len=%d", #pool)
if not users[userid] then
-- double check
users[userid] = agent
else
free_agent(agent)
agent = users[userid]
end
end
until skynet.call(agent, "lua", "assign", fd, userid)
log("Assign %d to %s [%s]", fd, userid, agent)
end
function manager.exit(userid)
log("manager userid = %s exit", userid)
free_agent(users[userid])
users[userid] = nil
log("manager exit userid = %s", Table.toString(users))
end
function manager.init()
MAX_AGENT_COUNT = server_common.pools_config.agent_count or 100
end
function manager.init_agent_pool()
pool = {}
for i = 1, MAX_AGENT_COUNT do
local agent = skynet.newservice "agent"
table.insert(pool, agent)
end
log("manager init ------ MAX_AGENT_COUNT=%s, pool=%d", MAX_AGENT_COUNT, #pool)
end
service.init {
command = manager,
info = users,
initself = manager.init,
}
|
return Def.ActorFrame {
Def.ActorFrame {
OnCommand=cmd(x,SCREEN_CENTER_X-20);
-- Initial glow around receptors
LoadActor("tapglow") .. {
OnCommand=cmd(x,85;y,95;zoom,0.7;rotationz,90;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,6;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
LoadActor("tapglow") .. {
OnCommand=cmd(x,275;y,95;zoom,0.7;rotationz,270;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,6;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
LoadActor("tapglow") .. {
OnCommand=cmd(x,212;y,95;zoom,0.7;rotationz,180;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,6;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
LoadActor("tapglow") .. {
OnCommand=cmd(x,148;y,95;zoom,0.7;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,6;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
LoadActor("tapglow") .. {
OnCommand=cmd(x,148;y,95;zoom,0.7;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,9.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
-- 2nd step UP
LoadActor("tapglow") .. {
OnCommand=cmd(x,212;y,95;zoom,0.7;rotationz,180;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,12.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
-- 3rd step UP
LoadActor("tapglow") .. {
OnCommand=cmd(x,84;y,95;zoom,0.7;rotationz,90;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,15.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
-- 4th step jump
LoadActor("tapglow") .. {
OnCommand=cmd(x,85;y,95;zoom,0.7;rotationz,90;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,18.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
LoadActor("tapglow") .. {
OnCommand=cmd(x,275;y,95;zoom,0.7;rotationz,270;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,18.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
-- miss step
LoadActor("healthhilight") .. {
OnCommand=cmd(x,180;y,40;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,22.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
};
};
-- messages
LoadFont("Common Bold") .. {
Text=ScreenString("How To Play StepMania"),
InitCommand=cmd(zbuffer,1;z,20;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;shadowlength,1;strokecolor,Color("Outline"));
BeginCommand=function(self)
self:AddAttribute(12, {Length=9, Diffuse=Color.White});
end;
OnCommand=cmd(skewx,-0.125;diffuse,color("#ffd400");shadowlength,2;shadowcolor,BoostColor(color("#ffd40077"),0.25);diffusealpha,0;zoom,4;sleep,0.0;linear,0.3;diffusealpha,1;zoom,1;sleep,1.8;linear,0.3;zoom,0.75;x,170;y,60);
};
LoadActor("_howtoplay feet") .. {
InitCommand=cmd(shadowlength,1;strokecolor,Color.Outline);
OnCommand=cmd(z,20;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;addx,-SCREEN_WIDTH;sleep,2.4;decelerate,0.3;addx,SCREEN_WIDTH;sleep,2;linear,0.3;zoomy,0);
};
Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X+120;y,SCREEN_CENTER_Y+40);
LoadActor("_howtoplay tap")..{
InitCommand=cmd(diffusealpha,0);
ShowCommand=cmd(linear,0;diffusealpha,1;sleep,2;linear,0;diffusealpha,0);
OnCommand=cmd(sleep,6;queuecommand,"Show");
};
LoadActor("_howtoplay tap")..{
InitCommand=cmd(diffusealpha,0);
ShowCommand=cmd(linear,0;diffusealpha,1;sleep,2;linear,0;diffusealpha,0);
OnCommand=cmd(sleep,9.7;queuecommand,"Show");
};
LoadActor("_howtoplay tap")..{
InitCommand=cmd(diffusealpha,0);
ShowCommand=cmd(linear,0;diffusealpha,1;sleep,2;linear,0;diffusealpha,0);
OnCommand=cmd(sleep,12.7;queuecommand,"Show");
};
LoadActor("_howtoplay tap")..{
InitCommand=cmd(diffusealpha,0);
ShowCommand=cmd(linear,0;diffusealpha,1;sleep,2;linear,0;diffusealpha,0);
OnCommand=cmd(sleep,15.7;queuecommand,"Show");
};
LoadActor("_howtoplay jump")..{
InitCommand=cmd(diffusealpha,0);
ShowCommand=cmd(linear,0;diffusealpha,1;sleep,2;linear,0;diffusealpha,0);
OnCommand=cmd(sleep,18.7;queuecommand,"Show");
};
LoadActor("_howtoplay miss")..{
InitCommand=cmd(diffusealpha,0);
ShowCommand=cmd(linear,0;diffusealpha,1;sleep,2;linear,0;diffusealpha,0);
OnCommand=cmd(sleep,22.7;queuecommand,"Show");
};
};
};
|
object_tangible_loot_generic_usable_scope_weapon_generic = object_tangible_loot_generic_usable_shared_scope_weapon_generic:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_generic_usable_scope_weapon_generic, "object/tangible/loot/generic/usable/scope_weapon_generic.iff")
|
-- tinyxml2 with static runtime, as used for launcher
return {
include = function()
includedirs "vendor/botan/include/"
end,
run = function()
language "C++"
kind "SharedLib"
defines { "BOTAN_DLL=__declspec(dllexport)" }
buildoptions '/bigobj'
files {
"vendor/botan/src/*.cpp",
"vendor/botan/src/*.h"
}
end
} |
local sptr_ = engine.scene.new()
local path_ = engine.fs.current_path()
local table = require("table")
local spriteShader_ = engine.window.get_shader("spriteShader")
if(spriteShader_ == nil) then
spriteShader_ = engine.shader.new("spriteShader", path_ .. "spriteVertex.glsl", path_ .. "spriteFragment.glsl" )
if(spriteShader_:good() == false) then
close_callback()
end
engine.window.push_shader(spriteShader_)
end
if(spriteShader_:good() == false) then
close_callback()
end
local testTexture_ = engine.texture.load("RGBA_8", path_ .. "RGBATestImage.png")
local w_color_ = { r = 150, g = 255, b = 150, a = 255 }
local w_color_2_ = { r = 150, g = 150, b = 255, a = 255 }
local allWidgets_ = {}
engine.fs.dofile(path_ .. "widgetHelper.lua")
function test_button_callback(_widget, _mbutton, _action, _mods)
if(_mbutton == 0 and _action == 0) then
if(is_bound(_widget) == false) then
bind_widget(_widget)
else
unbind_widget(_widget)
end
elseif(_mbutton == 1 and _action == 0 and engine.window.get_key(340) == 1) then
unbind_widget(_widget)
for i, widget in pairs(allWidgets_) do
if(widget == _widget) then
table.remove(allWidgets_, i)
return
end
end
end
end
local function new_widget(_x, _y)
local _w = engine.gfx.sprite.new(spriteShader_, testTexture_)
_w:set_color(w_color_2_)
_w:set_position({ x = _x, y = _y, z = 0.0})
sptr_:push(_w)
sptr_:push(engine.ui.button.new(_w, test_button_callback))
table.insert(allWidgets_, _w)
end
new_widget(0, 0)
new_widget(200, 0)
local function get_mouse_pos()
local _w, _h = engine.window.get_size()
local _cpos = engine.window.get_cursor_pos()
_cpos.y = _cpos.y * -1
_cpos.y = _cpos.y + _h
return _cpos
end
local function cursor_callback(_x, _y)
if(boundWidget_ ~= nil and engine.window.get_key(341) ~= 1) then
local _w, _h = engine.window.get_size()
_y = _y * -1
_y = _y + _h
set_bound_widgets(_x, _y)
end
end
local function mouse_callback(_button, _action, _mods)
if(_action == 0 and _button == 0 and engine.window.get_key(340) == 1) then
local _ms = get_mouse_pos()
new_widget(_ms.x - 50, _ms.y - 50)
end
end
local function key_callback(_button, _scancode, _action, _mods)
if(_button == 96 and _action == 0) then
engine.fs.doAfter(path_ .. "createUIElement.lua")
engine.window.pop_scene()
elseif(_button == 341 and _action == 0 and boundWidget_ ~= nil) then
local _ms = get_mouse_pos()
set_bound_widgets(_ms.x, _ms.y)
end
end
engine.window.set_callback("key", key_callback)
engine.window.set_callback("cursor", cursor_callback)
engine.window.set_callback("mouse", mouse_callback)
engine.window.push_scene(sptr_) |
-- Create a constructor for each type
-- See also: ast.lua
return function(prefix, types)
local constructors = {}
for typename, conss in pairs(types) do
for consname, fields in pairs(conss) do
local tag = prefix .. "." .. consname
constructors[consname] = function(...)
local args = table.pack(...)
if args.n ~= #fields then
error("missing arguments for " .. consname)
end
local node = { _tag = tag }
for i, field in ipairs(fields) do
node[field] = args[i]
end
return node
end
end
end
return constructors
end
|
require("data/scripts/events/events")
UnitDynamic = class(Events)
function UnitDynamic:init(unit)
self:super( ):init(unit)
unit:storage().foodTypes = bit.bor(constants.utPlant, constants.utCorpse)
end
function UnitDynamic:action(unit)
local ubuild = unit:getBuild()
ubuild:tire()
end
function UnitDynamic:attack(unit, closest)
if closest == nil then
closest = unit:getClosest(constants.utDynamic, 120.0)
end
unit:getBuild():tire(0.1)
if closest ~= nil then
closest:storage().attacker = unit
self:hit(closest, unit)
end
-- Attack animation
end
function UnitDynamic:hit(unit, attacker)
unit:setAction("hit")
unit:storage().lasthit = attacker
if attacker ~= nil then
local damage = 0
if type(attacker) == "userdata" then
local abuild = attacker:getBuild()
damage = abuild:Damage()
elseif type(attacker) == "number" then
damage = attacker
end
local ubuild = unit:getBuild()
ubuild:Damage( damage )
end
end
function UnitDynamic:eat(unit)
local closest = unit:getClosest(unit:storage().foodTypes, 120.0)
unit:getBuild():tire(0.1)
if closest ~= nil then
self:consume(unit, closest)
end
-- Attack animation
end
function UnitDynamic:consume(unit, victim)
local ubuild = unit:getBuild()
local vbuild = victim:getBuild()
local dmg = ubuild:Damage()
local php = ubuild:get(constants.uParamHP)
local sthp = ubuild:get(constants.uStateHP)
local pfed = ubuild:get(constants.uParamFed)
local stfed = ubuild:get(constants.uStateFed)
local level = ubuild:get(constants.uBaseLevel)
-- Set hp
if stfed >= 80 and stfed < 100 and sthp < php then
sthp = math.min(sthp + dmg / level, php)
ubuild:set(constants.uStateHP, sthp)
end
-- Set fed
if stfed >= 100 then
ubuild:set(constants.uStateFed, 100)
sthp = math.min(sthp + dmg, php)
ubuild:set(constants.uStateHP, sthp)
else
local n = vbuild:get(constants.uChrNutritive)
stfed = math.min(stfed + dmg * n / level, 100)
ubuild:set(constants.uStateFed, stfed)
end
-- Damage meal
vbuild:Damage(dmg)
end
function UnitDynamic:die(unit)
local x = unit:UnitX()
local y = unit:UnitY()
local corpse = UnitManager.getUnit(UnitManager.createUnit(
constants.utCorpse, x, y, 'unit_corpse'))
corpse:UnitSize(unit:UnitSize())
corpse:UnitZ(unit:UnitZ() - 0.01)
local cbuild = corpse:getBuild()
local ubuild = unit:getBuild()
cbuild:set(constants.uParamHP,
ubuild:get(constants.uParamHP) * ubuild:get(constants.uParamFed) / 100)
if unit:storage().lasthit then
local lbuild = unit:storage().lasthit:getBuild()
lbuild:set(constants.uStateExp, lbuild:get(constants.uStateExp) +
ubuild:get(constants.uParamHP) / ubuild:get(constants.uBaseLevel))
lbuild:set(constants.uBaseKills, lbuild:get(constants.uBaseKills) + 1)
end
unit:Deleted(true)
end
|
----------------------------------------------------------
-- Load RayUI Environment
----------------------------------------------------------
RayUI:LoadEnv("Skins")
local S = _Skins
local ToyBoxFilterFixerFilter = false
local function LoadSkin()
local r, g, b = _r, _g, _b
-- [[ Mounts and pets ]]
local PetJournal = PetJournal
local MountJournal = MountJournal
for i = 1, 14 do
if i ~= 8 then
select(i, CollectionsJournal:GetRegions()):Hide()
end
end
for i = 1, 9 do
select(i, MountJournal.MountCount:GetRegions()):Hide()
select(i, PetJournal.PetCount:GetRegions()):Hide()
end
S:SetBD(CollectionsJournal)
S:CreateTab(CollectionsJournalTab1)
S:CreateTab(CollectionsJournalTab2)
S:CreateTab(CollectionsJournalTab3)
S:CreateTab(CollectionsJournalTab4)
S:CreateTab(CollectionsJournalTab5)
S:ReskinClose(CollectionsJournalCloseButton)
CollectionsJournalTab2:SetPoint("LEFT", CollectionsJournalTab1, "RIGHT", -15, 0)
CollectionsJournalTab3:SetPoint("LEFT", CollectionsJournalTab2, "RIGHT", -15, 0)
CollectionsJournalTab4:SetPoint("LEFT", CollectionsJournalTab3, "RIGHT", -15, 0)
CollectionsJournalTab5:SetPoint("LEFT", CollectionsJournalTab4, "RIGHT", -15, 0)
MountJournal.LeftInset:Hide()
MountJournal.RightInset:Hide()
PetJournal.LeftInset:Hide()
PetJournal.RightInset:Hide()
PetJournal.PetCardInset:Hide()
PetJournal.loadoutBorder:Hide()
MountJournal.MountDisplay.YesMountsTex:SetAlpha(0)
MountJournal.MountDisplay.NoMountsTex:SetAlpha(0)
MountJournal.MountDisplay.ShadowOverlay:Hide()
PetJournalTutorialButton.Ring:Hide()
S:CreateBD(MountJournal.MountCount, .25)
S:CreateBD(PetJournal.PetCount, .25)
S:CreateBD(MountJournal.MountDisplay.ModelScene, .25)
S:Reskin(MountJournalMountButton)
S:Reskin(PetJournalSummonButton)
S:Reskin(PetJournalFindBattle)
S:ReskinScroll(MountJournalListScrollFrameScrollBar)
S:ReskinScroll(PetJournalListScrollFrameScrollBar)
S:ReskinInput(MountJournalSearchBox)
S:ReskinInput(PetJournalSearchBox)
S:ReskinArrow(MountJournal.MountDisplay.ModelScene.RotateLeftButton, "left")
S:ReskinArrow(MountJournal.MountDisplay.ModelScene.RotateRightButton, "right")
S:ReskinFilterButton(PetJournalFilterButton)
S:ReskinFilterButton(MountJournalFilterButton)
MountJournalFilterButton:SetPoint("TOPRIGHT", MountJournal.LeftInset, -5, -8)
PetJournalFilterButton:SetPoint("TOPRIGHT", PetJournalLeftInset, -5, -8)
PetJournalTutorialButton:SetPoint("TOPLEFT", PetJournal, "TOPLEFT", -14, 14)
local scrollFrames = {MountJournal.ListScrollFrame.buttons, PetJournal.listScroll.buttons}
for _, scrollFrame in pairs(scrollFrames) do
for i = 1, #scrollFrame do
local bu = scrollFrame[i]
local ic = bu.icon
bu:GetRegions():Hide()
bu:SetHighlightTexture("")
bu.iconBorder:SetTexture("")
bu.selectedTexture:SetTexture("")
local bg = CreateFrame("Frame", nil, bu)
bg:SetPoint("TOPLEFT", 0, -1)
bg:SetPoint("BOTTOMRIGHT", 0, 1)
bg:SetFrameLevel(bu:GetFrameLevel()-1)
S:CreateBD(bg, .25)
bu.bg = bg
ic:SetTexCoord(.08, .92, .08, .92)
ic.bg = S:CreateBG(ic)
bu.name:SetParent(bg)
if bu.DragButton then
bu.DragButton:StyleButton(1)
bu.DragButton.ActiveTexture:SetTexture(S["media"].checked)
bu.DragButton.ActiveTexture:SetVertexColor(r, g, b)
else
bu.dragButton:StyleButton(1)
bu.dragButton.ActiveTexture:SetTexture(S["media"].checked)
bu.dragButton.ActiveTexture:SetVertexColor(r, g, b)
bu.dragButton.levelBG:SetAlpha(0)
bu.dragButton.level:FontTemplate(nil, nil, R["media"].fontflag)
bu.dragButton.level:SetTextColor(1, 1, 1)
end
end
end
local function updateMountScroll()
local buttons = MountJournal.ListScrollFrame.buttons
for i = 1, #buttons do
local bu = buttons[i]
if bu.index ~= nil then
bu.bg:Show()
bu.icon:Show()
bu.icon.bg:Show()
if bu.selectedTexture:IsShown() then
bu.bg:SetBackdropColor(r, g, b, .25)
else
bu.bg:SetBackdropColor(0, 0, 0, .25)
end
else
bu.bg:Hide()
bu.icon:Hide()
bu.icon.bg:Hide()
end
end
end
hooksecurefunc("MountJournal_UpdateMountList", updateMountScroll)
hooksecurefunc(MountJournalListScrollFrame, "update", updateMountScroll)
local function updatePetScroll()
local petButtons = PetJournal.listScroll.buttons
if petButtons then
for i = 1, #petButtons do
local bu = petButtons[i]
local index = bu.index
if index then
local petID, _, isOwned = C_PetJournal.GetPetInfoByIndex(index)
if petID and isOwned then
local _, _, _, _, rarity = C_PetJournal.GetPetStats(petID)
if rarity then
local color = ITEM_QUALITY_COLORS[rarity-1]
bu.name:SetTextColor(color.r, color.g, color.b)
else
bu.name:SetTextColor(1, 1, 1)
end
else
bu.name:SetTextColor(.5, .5, .5)
end
if bu.selectedTexture:IsShown() then
bu.bg:SetBackdropColor(r, g, b, .25)
else
bu.bg:SetBackdropColor(0, 0, 0, .25)
end
end
end
end
end
hooksecurefunc("PetJournal_UpdatePetList", updatePetScroll)
hooksecurefunc(PetJournalListScrollFrame, "update", updatePetScroll)
PetJournalHealPetButtonBorder:Hide()
PetJournalHealPetButtonIconTexture:SetTexCoord(.08, .92, .08, .92)
PetJournal.HealPetButton:SetPushedTexture("")
S:CreateBG(PetJournal.HealPetButton)
MountJournalSummonRandomFavoriteButton:SetPoint("TOPRIGHT", -7, -32)
MountJournalSummonRandomFavoriteButtonBorder:Hide()
MountJournalSummonRandomFavoriteButtonIconTexture:SetTexCoord(.08, .92, .08, .92)
MountJournalSummonRandomFavoriteButton:StyleButton(true)
S:CreateBG(MountJournalSummonRandomFavoriteButton)
do
local ic = MountJournal.MountDisplay.InfoButton.Icon
ic:SetTexCoord(.08, .92, .08, .92)
S:CreateBG(ic)
end
for _, f in pairs({PetJournalPrimaryAbilityTooltip, PetJournalSecondaryAbilityTooltip}) do
f:DisableDrawLayer("BACKGROUND")
local bg = CreateFrame("Frame", nil, f)
bg:SetAllPoints()
bg:SetFrameLevel(0)
S:CreateBD(bg)
end
PetJournalLoadoutBorderSlotHeaderText:SetParent(PetJournal)
PetJournalLoadoutBorderSlotHeaderText:SetPoint("CENTER", PetJournalLoadoutBorderTop, "TOP", 0, 4)
-- Pet card
local card = PetJournalPetCard
PetJournalPetCardBG:Hide()
card.PetInfo.levelBG:SetAlpha(0)
card.PetInfo.qualityBorder:SetAlpha(0)
card.AbilitiesBG1:SetAlpha(0)
card.AbilitiesBG2:SetAlpha(0)
card.AbilitiesBG3:SetAlpha(0)
card.PetInfo.level:FontTemplate(nil, nil, R["media"].fontflag)
card.PetInfo.level:SetTextColor(1, 1, 1)
card.PetInfo.icon:SetTexCoord(.08, .92, .08, .92)
card.PetInfo.icon.bg = S:CreateBG(card.PetInfo.icon)
S:CreateBD(card, .25)
for i = 2, 12 do
select(i, card.xpBar:GetRegions()):Hide()
end
card.xpBar:SetStatusBarTexture(R["media"].normal)
R:SetStatusBarGradient(card.xpBar)
S:CreateBDFrame(card.xpBar, .25)
PetJournalPetCardHealthFramehealthStatusBarLeft:Hide()
PetJournalPetCardHealthFramehealthStatusBarRight:Hide()
PetJournalPetCardHealthFramehealthStatusBarMiddle:Hide()
PetJournalPetCardHealthFramehealthStatusBarBGMiddle:Hide()
card.HealthFrame.healthBar:SetStatusBarTexture(R["media"].normal)
S:CreateBDFrame(card.HealthFrame.healthBar, .25)
R:SetStatusBarGradient(card.HealthFrame.healthBar)
for i = 1, 6 do
local bu = card["spell"..i]
bu.icon:SetTexCoord(.08, .92, .08, .92)
S:CreateBG(bu.icon)
end
hooksecurefunc("PetJournal_UpdatePetCard", function(self)
local border = self.PetInfo.qualityBorder
local r, g, b
if border:IsShown() then
r, g, b = self.PetInfo.qualityBorder:GetVertexColor()
else
r, g, b = 0, 0, 0
end
self.PetInfo.icon.bg:SetVertexColor(r, g, b)
end)
-- Pet loadout
for i = 1, 3 do
local bu = PetJournal.Loadout["Pet"..i]
_G["PetJournalLoadoutPet"..i.."BG"]:Hide()
bu.iconBorder:SetAlpha(0)
bu.qualityBorder:SetTexture("")
bu.levelBG:SetAlpha(0)
bu.helpFrame:GetRegions():Hide()
bu.level:FontTemplate(nil, nil, R["media"].fontflag)
bu.level:SetTextColor(1, 1, 1)
bu.icon:SetTexCoord(.08, .92, .08, .92)
bu.icon.bg = S:CreateBDFrame(bu.icon, .25)
bu.setButton:GetRegions():SetPoint("TOPLEFT", bu.icon, -5, 5)
bu.setButton:GetRegions():SetPoint("BOTTOMRIGHT", bu.icon, 5, -5)
S:CreateBD(bu, .25)
for i = 2, 12 do
select(i, bu.xpBar:GetRegions()):Hide()
end
bu.xpBar:SetStatusBarTexture(R["media"].normal)
R:SetStatusBarGradient(bu.xpBar)
S:CreateBDFrame(bu.xpBar, .25)
_G["PetJournalLoadoutPet"..i.."HealthFramehealthStatusBarLeft"]:Hide()
_G["PetJournalLoadoutPet"..i.."HealthFramehealthStatusBarRight"]:Hide()
_G["PetJournalLoadoutPet"..i.."HealthFramehealthStatusBarMiddle"]:Hide()
_G["PetJournalLoadoutPet"..i.."HealthFramehealthStatusBarBGMiddle"]:Hide()
bu.healthFrame.healthBar:SetStatusBarTexture(R["media"].normal)
S:CreateBDFrame(bu.healthFrame.healthBar, .25)
R:SetStatusBarGradient(bu.healthFrame.healthBar)
for j = 1, 3 do
local spell = bu["spell"..j]
spell:SetPushedTexture("")
spell.selected:SetTexture(S["media"].checked)
spell:GetRegions():Hide()
spell.FlyoutArrow:SetTexture(S["media"].arrowDown)
spell.FlyoutArrow:SetSize(8, 8)
spell.FlyoutArrow:SetTexCoord(0, 1, 0, 1)
spell.icon:SetTexCoord(.08, .92, .08, .92)
S:CreateBG(spell.icon)
end
end
hooksecurefunc("PetJournal_UpdatePetLoadOut", function()
for i = 1, 3 do
local bu = PetJournal.Loadout["Pet"..i]
bu.icon.bg:SetShown(not bu.helpFrame:IsShown())
bu.icon.bg:SetBackdropBorderColor(bu.qualityBorder:GetVertexColor())
bu.dragButton:SetEnabled(not bu.helpFrame:IsShown())
end
end)
PetJournal.SpellSelect.BgEnd:Hide()
PetJournal.SpellSelect.BgTiled:Hide()
for i = 1, 2 do
local bu = PetJournal.SpellSelect["Spell"..i]
bu:SetCheckedTexture(S["media"].checked)
bu:SetPushedTexture("")
bu.icon:SetDrawLayer("ARTWORK")
bu.icon:SetTexCoord(.08, .92, .08, .92)
S:CreateBG(bu.icon)
end
-- [[ Toy box ]]
local ToyBox = ToyBox
local icons = ToyBox.iconsFrame
icons.Bg:Hide()
icons.BackgroundTile:Hide()
icons:DisableDrawLayer("BORDER")
icons:DisableDrawLayer("ARTWORK")
icons:DisableDrawLayer("OVERLAY")
S:ReskinInput(ToyBox.searchBox)
S:ReskinFilterButton(ToyBoxFilterButton)
S:ReskinArrow(ToyBox.PagingFrame.PrevPageButton, "left")
S:ReskinArrow(ToyBox.PagingFrame.NextPageButton, "right")
-- Progress bar
local progressBar = ToyBox.progressBar
progressBar.border:Hide()
progressBar:DisableDrawLayer("BACKGROUND")
progressBar.text:SetPoint("CENTER", 0, 1)
progressBar:SetStatusBarTexture(R["media"].normal)
R:SetStatusBarGradient(progressBar)
S:CreateBDFrame(progressBar, .25)
-- Toys!
local shouldChangeTextColor = true
local changeTextColor = function(toyString)
if shouldChangeTextColor then
shouldChangeTextColor = false
local self = toyString:GetParent()
if PlayerHasToy(self.itemID) then
local _, _, quality = GetItemInfo(self.itemID)
if quality then
toyString:SetTextColor(GetItemQualityColor(quality))
else
toyString:SetTextColor(1, 1, 1)
end
else
toyString:SetTextColor(.5, .5, .5)
end
shouldChangeTextColor = true
end
end
local buttons = ToyBox.iconsFrame
for i = 1, 18 do
local bu = buttons["spellButton"..i]
local ic = bu.iconTexture
bu:StyleButton(true)
bu.cooldown:SetAllPoints(ic)
bu.slotFrameCollected:SetTexture("")
bu.slotFrameUncollected:SetTexture("")
bu.hover:SetAllPoints(ic)
bu.checked:SetAllPoints(ic)
bu.pushed:SetAllPoints(ic)
bu.cooldown:SetAllPoints(ic)
ic:SetTexCoord(.08, .92, .08, .92)
S:CreateBG(ic)
hooksecurefunc(bu.name, "SetTextColor", changeTextColor)
end
-- [[ Heirlooms ]]
local HeirloomsJournal = HeirloomsJournal
local icons = HeirloomsJournal.iconsFrame
icons.Bg:Hide()
icons.BackgroundTile:Hide()
icons:DisableDrawLayer("BORDER")
icons:DisableDrawLayer("ARTWORK")
icons:DisableDrawLayer("OVERLAY")
S:ReskinInput(HeirloomsJournalSearchBox)
S:ReskinDropDown(HeirloomsJournalClassDropDown)
S:ReskinFilterButton(HeirloomsJournalFilterButton)
S:ReskinArrow(HeirloomsJournal.PagingFrame.PrevPageButton, "left")
S:ReskinArrow(HeirloomsJournal.PagingFrame.NextPageButton, "right")
-- Progress bar
local progressBar = HeirloomsJournal.progressBar
progressBar.border:Hide()
progressBar:DisableDrawLayer("BACKGROUND")
progressBar.text:SetPoint("CENTER", 0, 1)
progressBar:SetStatusBarTexture(R["media"].normal)
R:SetStatusBarGradient(progressBar)
S:CreateBDFrame(progressBar, .25)
-- [[ WardrobeCollection ]]
local WardrobeCollectionFrame = WardrobeCollectionFrame
local ModelsFrame = WardrobeCollectionFrame.ModelsFrame
for i = 1, 2 do
for j = 1, 6 do
select(j, _G["WardrobeCollectionFrameTab"..i]:GetRegions()):Kill()
end
end
WardrobeCollectionFrameBg:Hide()
local ItemsCollectionFrame = WardrobeCollectionFrame["ItemsCollectionFrame"]
ItemsCollectionFrame:DisableDrawLayer("BACKGROUND")
ItemsCollectionFrame:DisableDrawLayer("BORDER")
ItemsCollectionFrame:DisableDrawLayer("ARTWORK")
ItemsCollectionFrame:DisableDrawLayer("OVERLAY")
S:ReskinInput(WardrobeCollectionFrameSearchBox)
S:ReskinFilterButton(WardrobeCollectionFrame.FilterButton)
S:ReskinDropDown(WardrobeCollectionFrameWeaponDropDown)
S:ReskinArrow(ItemsCollectionFrame.PagingFrame.PrevPageButton, "left")
S:ReskinArrow(ItemsCollectionFrame.PagingFrame.NextPageButton, "right")
local SetsCollectionFrame = WardrobeCollectionFrame["SetsCollectionFrame"]
SetsCollectionFrame:DisableDrawLayer("BACKGROUND")
SetsCollectionFrame:DisableDrawLayer("BORDER")
SetsCollectionFrame:DisableDrawLayer("ARTWORK")
SetsCollectionFrame:DisableDrawLayer("OVERLAY")
SetsCollectionFrame.LeftInset:StripTextures()
-- S:CreateBD(SetsCollectionFrame.LeftInset, .25)
SetsCollectionFrame.RightInset:StripTextures()
SetsCollectionFrame.DetailsFrame.ModelFadeTexture:Hide()
S:CreateBD(SetsCollectionFrame.DetailsFrame, .25)
for i = 1, 11 do
local bu = _G["WardrobeCollectionFrameScrollFrameButton"..i]
local ic = bu.Icon
bu:GetRegions():Hide()
bu:SetHighlightTexture("")
bu.SelectedTexture:SetTexture("")
local bg = CreateFrame("Frame", nil, bu)
bg:SetPoint("TOPLEFT", 0, -1)
bg:SetPoint("BOTTOMRIGHT", 0, 1)
bg:SetFrameLevel(bu:GetFrameLevel()-1)
S:CreateBD(bg, .25)
bu.bg = bg
ic:SetTexCoord(.08, .92, .08, .92)
ic.bg = S:CreateBG(ic)
end
S:ReskinFilterButton(WardrobeSetsCollectionVariantSetsButton)
S:ReskinScroll(WardrobeCollectionFrameScrollFrameScrollBar)
S:ReskinClose(WardrobeCollectionFrame.SetsTabHelpBox.CloseButton)
-- Progress bar
local progressBar = WardrobeCollectionFrame.progressBar
progressBar.border:Hide()
progressBar:DisableDrawLayer("BACKGROUND")
progressBar.text:SetPoint("CENTER", 0, 1)
progressBar:SetStatusBarTexture(R["media"].normal)
R:SetStatusBarGradient(progressBar)
S:CreateBDFrame(progressBar, .25)
-- ModelRC
for i = 1, 3 do
for j = 1, 6 do
ItemsCollectionFrame["ModelR"..i.."C"..j]:GetRegions():Kill()
end
end
-- [[ Wardrobe ]]
local WardrobeFrame = WardrobeFrame
local WardrobeTransmogFrame = WardrobeTransmogFrame
WardrobeTransmogFrameBg:Hide()
WardrobeTransmogFrame.Inset.BG:Hide()
WardrobeTransmogFrame.Inset:DisableDrawLayer("BORDER")
WardrobeTransmogFrame.MoneyLeft:Hide()
WardrobeTransmogFrame.MoneyMiddle:Hide()
WardrobeTransmogFrame.MoneyRight:Hide()
WardrobeTransmogFrame.SpecButton.Icon:Hide()
for i = 1, 9 do
select(i, WardrobeTransmogFrame.SpecButton:GetRegions()):Hide()
end
S:ReskinPortraitFrame(WardrobeFrame)
S:Reskin(WardrobeTransmogFrame.ApplyButton)
S:Reskin(WardrobeOutfitDropDown.SaveButton)
S:ReskinArrow(WardrobeTransmogFrame.SpecButton, "down")
S:ReskinDropDown(WardrobeOutfitDropDown)
WardrobeOutfitDropDown:SetHeight(32)
WardrobeOutfitDropDown.SaveButton:SetPoint("LEFT", WardrobeOutfitDropDown, "RIGHT", -13, 2)
WardrobeTransmogFrame.SpecButton:SetPoint("RIGHT", WardrobeTransmogFrame.ApplyButton, "LEFT", -3, 0)
local slots = {"Head", "Shoulder", "Chest", "Waist", "Legs", "Feet", "Wrist", "Hands", "Back", "Shirt", "Tabard", "MainHand", "SecondaryHand"}
for i = 1, #slots do
local slot = WardrobeTransmogFrame.Model[slots[i].."Button"]
if slot then
slot.Border:Hide()
slot.Icon:SetDrawLayer("BACKGROUND", 1)
S:ReskinIcon(slot.Icon)
end
end
-- Outfit & OutfitEdit Frame
local WardrobeOutfitFrame = WardrobeOutfitFrame
local WardrobeOutfitEditFrame = WardrobeOutfitEditFrame
S:CreateBD(WardrobeOutfitFrame, .75)
S:CreateBD(WardrobeOutfitEditFrame, .75)
S:Reskin(WardrobeOutfitEditFrame.AcceptButton)
S:Reskin(WardrobeOutfitEditFrame.CancelButton)
S:Reskin(WardrobeOutfitEditFrame.DeleteButton)
WardrobeOutfitEditFrame.EditBox.LeftTexture:Hide()
WardrobeOutfitEditFrame.EditBox.MiddleTexture:Hide()
WardrobeOutfitEditFrame.EditBox.RightTexture:Hide()
S:ReskinInput(WardrobeOutfitEditFrame.EditBox)
-- [[ WardrobeTransmogFrameControlFrame Button ]]
WardrobeTransmogFrameControlFrame:DisableDrawLayer("BACKGROUND")
local buttons = {
"ZoomIn",
"ZoomOut",
"Pan",
"RotateLeft",
"RotateRight",
"RotateReset",
}
for i = 1, #buttons do
local cb = _G["WardrobeTransmogFrameControlFrame"..buttons[i].."Button"]
_G["WardrobeTransmogFrameControlFrame"..buttons[i].."ButtonBg"]:Hide()
S:Reskin(cb)
end
S:Reskin(WardrobeTransmogFrame.Model.ClearAllPendingButton)
end
S:AddCallbackForAddon("Blizzard_Collections", "Collections", LoadSkin)
|
local multiplier_damage_convar = 1
local multiplier_convar = 1
local multiplier_local = 1
local multiplier_idle = 1
local lerped_bob_the_builder = Angle(0, 0, 0)
local is_calc = false
local tool_equipped = false
local function equipped_tool(ply)
-- returns true if a tool is equipped
-- returns false if not and if viewbob_tools_enable is at 1
local weapon_ent = ply:GetActiveWeapon()
if GetConVarNumber("viewbob_tools_enable") == 0 && weapon_ent:IsValid() then
local weapon = weapon_ent:GetClass()
if weapon == "gmod_tool" or weapon == "weapon_physgun" or weapon == "gmod_camera" then
return true
else
return false
end
else
return false
end
end
local function walk_viewbob(ply, pos, foot, sound, volume, rf)
if GetConVarNumber("viewbob_enable") != 1 || equipped_tool(ply) then return end
multiplier_convar = GetConVarNumber("viewbob_multiplier")
-- Calculate the multiplier we're going to use for walking
if ply:KeyDown(IN_DUCK) || ply:KeyDown(IN_WALK) then
-- duck or walking
multiplier_local = 0.3 * multiplier_convar
elseif ply:KeyDown(IN_SPEED) then
-- run
multiplier_local = 1.2 * multiplier_convar
else
-- walk
multiplier_local = 0.5 * multiplier_convar
end
if foot == 0 then
-- left foot
step = 0.5 * multiplier_local
elseif foot == 1 then
-- right foot
step = -0.5 * multiplier_local
end
-- Jump viewbob
if ply:KeyPressed(IN_JUMP) && GetConVarNumber("viewbob_land_jump_enable") == 1 then
ply:ViewPunch(Angle(-4 * multiplier_local, step, step))
end
-- The rest of the function is related to walking, so we skip all of that if we have disabled it
if GetConVarNumber("viewbob_walk_enable") == 0 then return end
if ply:KeyDown(IN_FORWARD) then
ply:ViewPunch(Angle(multiplier_local, step, step))
end
if ply:KeyDown(IN_BACK) then
ply:ViewPunch(Angle(-1 * multiplier_local, step, step))
end
if ply:KeyDown(IN_MOVELEFT) then
ply:ViewPunch(Angle(step, step, -1 * multiplier_local))
end
if ply:KeyDown(IN_MOVERIGHT) then
ply:ViewPunch(Angle(step, step, multiplier_local))
end
end
local function land_viewbob(ply, inWater, onFloater, speed)
if GetConVarNumber("viewbob_enable") != 1 || GetConVarNumber("viewbob_land_jump_enable") != 1 then return end
if equipped_tool(ply) then return end
multiplier_convar = GetConVarNumber("viewbob_multiplier")
-- I thought that if you duck in air it'd look cooler if you bob less, so I've done that
if ply:KeyDown(IN_DUCK) then
ply:ViewPunch(Angle(speed / 80 * multiplier_convar, 0, 0))
else
ply:ViewPunch(Angle(speed / 40 * multiplier_convar, 0, 0))
end
end
local function damage_viewbob(target, dmginfo)
if target:IsPlayer() then
if GetConVarNumber("viewbob_enable") != 1 || GetConVarNumber("viewbob_damage_enable") != 1 then return end
if target:GetMoveType() == MOVETYPE_NOCLIP then return end
if equipped_tool(target) then return end
multiplier_damage_convar = GetConVarNumber("viewbob_damage_multiplier")
-- OW HELL I GOT HIT >:(
target:ViewPunch(Angle(math.random(-3,3) * multiplier_damage_convar,
math.random(-3,3) * multiplier_damage_convar,
math.random(-3,3) * multiplier_damage_convar))
end
end
local function idle_viewbob(ply, origin, angles, fov, znear, zfar)
-- pasted from tfa's cbob mod...
-- we're doing this so that we don't completely override the other hooks into CalcView.
-- In modern warfare base it causes a lot of wacky stuff!
if is_calc then return end
is_calc = true
local view = hook.Run("CalcView", ply, origin, angles, fov, znear, zfar) or {}
is_calc = false
view.origin = view.origin or pos
view.angles = view.angles or ang
view.fov = view.fov or fov
view.znear = view.znear or znear
view.zfar = view.zfar or zfar
multiplier_idle = GetConVarNumber("viewbob_idle_multiplier")
local bob_the_builder = Angle(math.cos(CurTime() / 0.9) / 3 * multiplier_idle,
math.sin(CurTime() / 0.8) / 3.6 * multiplier_idle,
math.cos(CurTime() / 0.5) / 3.3 * multiplier_idle)
if ply:KeyDown(IN_ATTACK2) then
lerped_bob_the_builder = Angle(0, 0, 0)
else
lerped_bob_the_builder = LerpAngle(0.1, lerped_bob_the_builder, bob_the_builder)
end
if GetConVarNumber("viewbob_idle_enable") == 1 && !equipped_tool(ply) && ply:GetMoveType() != MOVETYPE_NOCLIP then
view.angles = view.angles + lerped_bob_the_builder
else
view.angles = view.angles
end
return view
end
local function crouch_uncrouch_viewbob()
if GetConVarNumber("viewbob_crouch_enable") != 1 || GetConVarNumber("viewbob_enable") != 1 then return end
local crouch_mult = GetConVarNumber("viewbob_crouch_multiplier")
for i, ply in ipairs(player.GetAll()) do
if equipped_tool(ply) then return end
if ply:GetMoveType() == MOVETYPE_NOCLIP then return end
if ply:KeyPressed(IN_DUCK) then
ply:ViewPunch(Angle(4 * crouch_mult,
math.random(-1, 1) * crouch_mult,
math.random(-1, 1) * crouch_mult))
elseif ply:KeyReleased(IN_DUCK) then
ply:ViewPunch(Angle(-4 * crouch_mult,
math.random(-1, 1) * crouch_mult,
math.random(-1, 1) * crouch_mult))
end
end
end
hook.Add("EntityTakeDamage", "damage_viewbob", damage_viewbob)
hook.Add("PlayerFootstep", "walk_viewbob", walk_viewbob)
hook.Remove("OnPlayerHitGround", "voskydive_falldamage_hook")
hook.Add("OnPlayerHitGround", "land_viewbob", land_viewbob)
hook.Add("CalcView", "idle_viewbob", idle_viewbob)
hook.Add("Think", "crouch_uncrouch_viewbob", crouch_uncrouch_viewbob)
|
-- =====================================================================================
-- Name: notify.lua
-- Author: Gurpreet Singh
-- Url: https://github.com/ffs97/awesome-config/themes/thunderclouds/ ...
-- ... components/notify.lua
-- License: The MIT License (MIT)
--
-- Theme specific custom configuration for naughty notifications
-- =====================================================================================
local theme = require("beautiful")
local naughty = require("naughty")
local beautiful = theme.naughty
-- -------------------------------------------------------------------------------------
-- Changing Naughty Configuration
naughty.config.defaults["icon_size"] = beautiful.icon_size
-- Timeouts {{
naughty.config.defaults.timeout = 50
naughty.config.presets.low.timeout = 2
naughty.config.presets.critical.timeout = 50
-- }}
-- Apply theme variables {{
naughty.config.padding = beautiful.padding or 0
naughty.config.spacing = beautiful.spacing or 0
naughty.config.defaults.font = beautiful.font or "monospace 11"
naughty.config.defaults.margin = beautiful.margin or 0
naughty.config.defaults.position = beautiful.position or "top-right"
naughty.config.defaults.border_width = beautiful.border_width or 0
-- }}
-- Adding presets {{
naughty.config.presets.normal = {
fg = beautiful.fg,
bg = beautiful.bg
}
naughty.config.presets.low = {
fg = beautiful.fg,
bg = beautiful.bg
}
naughty.config.presets.ok = naughty.config.presets.low
naughty.config.presets.info = naughty.config.presets.low
naughty.config.presets.warn = naughty.config.presets.normal
naughty.config.presets.critical = {
fg = beautiful.fg_critical,
bg = beautiful.bg_critical
}
-- }}
-- Applying border radius {{
theme.notification_shape = function(cr, width, height)
require("gears").shape.rounded_rect(cr, width, height, theme.window_border_radius)
end
-- }}
-- -------------------------------------------------------------------------------------
return naughty
|
local _toJSON = toJSON
function toJSON(value, ...)
if value == nil then return "[ nil ]" end
return _toJSON(value, ...)
end
local _fromJSON = fromJSON
function fromJSON(s)
if not scheck("s") then return false end
if s == "[ ]" then return end
if s == "[ nil ]" then return nil end
return _fromJSON(s)
end
function stripColorCodes(str)
if not scheck("s") then return false end
str = utf8.gsub(str, "#%x%x%x%x%x%x", "")
return str
end
function isInsideArea(x, y, minX, minY, maxX, maxY)
if not scheck("n[6]") then return false end
if x < minX or x > maxX or
y < minY or y > maxY then
return false
end
return true
end
function isInsideRectangle(x, y, rx, ry, width, height)
if not scheck("n[6]") then return false end
return isInsideArea(x, y, rx, ry, rx + width, ry + height)
end |
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('XTemplate', {
group = "PreGame",
id = "PGMissionLandingSpot",
PlaceObj('XTemplateWindow', {
'__context', function (parent, context) return LandingSiteObjectCreateAndLoad() end,
'__class', "XDialog",
'Padding', box(0, 65, 100, 80),
'LayoutMethod', "VList",
'HandleMouse', true,
'InitialMode', "items",
'InternalModes', "items,prefabs",
}, {
PlaceObj('XTemplateWindow', {
'Id', "idSelector",
'Dock', "ignore",
'HAlign', "left",
'VAlign', "top",
'MinWidth', 73,
'MinHeight', 62,
'MaxWidth', 73,
'MaxHeight', 62,
'Visible', false,
}, {
PlaceObj('XTemplateFunc', {
'name', "DrawContent(self)",
'func', function (self)
self.parent.context:DrawSelector(self)
end,
}),
}),
PlaceObj('XTemplateWindow', {
'Id', "idSpotTemplate",
'Dock', "ignore",
'HAlign', "left",
'VAlign', "top",
}, {
PlaceObj('XTemplateFunc', {
'name', "DrawContent(self)",
'func', function (self)
self.parent.context:DrawSpot(self)
end,
}),
}),
PlaceObj('XTemplateLayer', {
'layer', "MarsPlanet",
}),
PlaceObj('XTemplateWindow', {
'__class', "XText",
'Id', "idtxtCoord",
'Margins', box(-150, -35, 0, 0),
'Dock', "box",
'HAlign', "left",
'VAlign', "top",
'MinWidth', 300,
'MaxWidth', 300,
'Clip', false,
'TextFont', "PreGamePlanetCoordinates",
'TextColor', RGBA(250, 236, 208, 255),
'RolloverTextColor', RGBA(250, 236, 208, 255),
'Translate', true,
'TextHAlign', "center",
'TextVAlign', "center",
}),
PlaceObj('XTemplateWindow', {
'__condition', function (parent, context) return GetUIStyleGamepad() end,
'__class', "XText",
'Id', "idHint",
'Margins', box(-300, -65, 0, 0),
'Dock', "box",
'HAlign', "left",
'VAlign', "top",
'MinWidth', 600,
'MaxWidth', 600,
'Clip', false,
'TextFont', "PreGamePlanetCoordinates",
'TextColor', RGBA(250, 236, 208, 255),
'RolloverTextColor', RGBA(250, 236, 208, 255),
'Translate', true,
'Text', T{4132, --[[XTemplate PGMissionLandingSpot Text]] "<LS> Select landing spot"},
'TextHAlign', "center",
'TextVAlign', "center",
}),
PlaceObj('XTemplateWindow', {
'__condition', function (parent, context) return not GetUIStyleGamepad() end,
'__class', "XText",
'Id', "idHint",
'Margins', box(-300, -65, 0, 0),
'Dock', "box",
'HAlign', "left",
'VAlign', "top",
'MinWidth', 600,
'MaxWidth', 600,
'Clip', false,
'TextFont', "PreGamePlanetCoordinates",
'TextColor', RGBA(250, 236, 208, 255),
'RolloverTextColor', RGBA(250, 236, 208, 255),
'Translate', true,
'Text', T{4133, --[[XTemplate PGMissionLandingSpot Text]] "<left_click> Select landing spot"},
'TextHAlign', "center",
'TextVAlign', "center",
}),
PlaceObj('XTemplateFunc', {
'name', "OnMouseButtonDown(self, pos, button)",
'func', function (self, pos, button)
self.context:MouseButtonDown(pos, button)
end,
}),
PlaceObj('XTemplateFunc', {
'name', "OnMouseButtonUp(self, pos, button)",
'func', function (self, pos, button)
self.context:MouseButtonUp(pos, button)
end,
}),
PlaceObj('XTemplateFunc', {
'name', "OnMousePos(self, pos)",
'func', function (self, pos)
self.context:MousePos(pos)
end,
}),
PlaceObj('XTemplateFunc', {
'name', "OnKbdKeyDown(self, char, virtual_key, repeated)",
'func', function (self, char, virtual_key, repeated)
self.context:KbdKeyDown(char, virtual_key, repeated)
end,
}),
PlaceObj('XTemplateFunc', {
'name', "OnKbdKeyUp(self, char, virtual_key, repeated)",
'func', function (self, char, virtual_key, repeated)
self.context:KbdKeyUp(char, virtual_key, repeated)
end,
}),
PlaceObj('XTemplateFunc', {
'name', "OnDelete",
'func', function (self, ...)
self:DeleteThread("drag")
self:DeleteThread("spin")
self:DeleteThread("easing")
self:DeleteThread("visibility")
self:DeleteThread("gamepad")
g_SelectedSpotChallengeMods = false
end,
}),
PlaceObj('XTemplateFunc', {
'name', "Open",
'func', function (self, ...)
g_SelectedSpotChallengeMods = {}
g_CurrentMissionParams.SelectedSpotChallengeMods = g_SelectedSpotChallengeMods
XDialog.Open(self, ...)
self.context:InitData(self)
local padding = GetSafeMargins(self:GetPadding())
self:SetPadding(padding)
self.idHint:SetMargins(box(-300-padding:minx(), -padding:miny(), 0, 0))
self.idtxtCoord:SetMargins(box(-150-padding:minx(), -padding:miny()+30, 0, 0))
end,
}),
PlaceObj('XTemplateAction', {
'ActionId', "custom",
'ActionName', T{5462, --[[XTemplate PGMissionLandingSpot ActionName]] "CUSTOM"},
'ActionToolbar', "ActionBar",
'ActionGamepad', "LeftTrigger",
'OnAction', function (self, host, source, toggled)
host.context:Custom()
end,
}),
PlaceObj('XTemplateAction', {
'ActionId', "random",
'ActionName', T{5461, --[[XTemplate PGMissionLandingSpot ActionName]] "RANDOM"},
'ActionToolbar', "ActionBar",
'ActionGamepad', "ButtonY",
'OnAction', function (self, host, source, toggled)
host.context:Random()
end,
}),
PlaceObj('XTemplateAction', {
'ActionId', "back",
'ActionName', T{4254, --[[XTemplate PGMissionLandingSpot ActionName]] "BACK"},
'ActionToolbar', "ActionBar",
'ActionShortcut', "Escape",
'ActionGamepad', "ButtonB",
'OnActionEffect', "mode",
'OnActionParam', "payload",
}),
PlaceObj('XTemplateAction', {
'ActionId', "start",
'ActionName', T{5452, --[[XTemplate PGMissionLandingSpot ActionName]] "START"},
'ActionToolbar', "ActionBar",
'ActionGamepad', "ButtonX",
'ActionState', function (self, host)
if not g_CurrentMapParams.latitude
or not g_CurrentMapParams.longitude then
return "disabled"
end
end,
'OnAction', function (self, host, source, toggled)
MarkNameAsUsed("Rocket", g_CurrentMapParams.rocket_name_base)
GenerateCurrentRandomMap()
end,
'FXPress', "StartGameButtonClick",
}),
PlaceObj('XTemplateTemplate', {
'__template', "ActionBar",
'MinWidth', 550,
}),
PlaceObj('XTemplateWindow', {
'Margins', box(0, 0, 0, 50),
'Dock', "bottom",
'HAlign', "right",
'MinWidth', 350,
'LayoutMethod', "VList",
}, {
PlaceObj('XTemplateWindow', {
'__class', "XText",
'HAlign', "right",
'TextFont', "PGLandingPosDetails",
'TextColor', RGBA(118, 163, 222, 255),
'RolloverTextColor', RGBA(118, 163, 222, 255),
'Translate', true,
'Text', T{482503373345, --[[XTemplate PGMissionLandingSpot Text]] "<white><Coord></white>"},
'TextHAlign', "right",
}),
PlaceObj('XTemplateWindow', {
'Id', "idContent",
'LayoutMethod', "VList",
'Visible', false,
}, {
PlaceObj('XTemplateWindow', {
'__class', "XText",
'HAlign', "right",
'TextFont', "PGLandingPosDetails",
'TextColor', RGBA(118, 163, 222, 255),
'RolloverTextColor', RGBA(118, 163, 222, 255),
'Translate', true,
'Text', T{609979737076, --[[XTemplate PGMissionLandingSpot Text]] "Average Altitude <white><Altitude> m</white><newline>Mean Temperature <white><Temperature>°C</white><newline>Topography <white><MapDifficulty></white>"},
'TextHAlign', "right",
}),
PlaceObj('XTemplateWindow', {
'__class', "XFrame",
'Margins', box(-340, 20, -40, -130),
'Image', "UI/Common/pm_pad_large.tga",
'FrameBox', box(320, 0, 40, 0),
'SqueezeY', false,
'FlipY', true,
}),
PlaceObj('XTemplateWindow', {
'__class', "XLabel",
'Margins', box(0, 0, 0, 20),
'HAlign', "right",
'TextFont', "PGMissionDescrTitle",
'TextColor', RGBA(96, 135, 185, 255),
'Translate', true,
'Text', T{4270, --[[XTemplate PGMissionLandingSpot Text]] "RESOURCES"},
}),
PlaceObj('XTemplateWindow', {
'__class', "XContentTemplateList",
'BorderWidth', 0,
'LayoutVSpacing', 10,
'Clip', false,
'Background', RGBA(0, 0, 0, 0),
'FocusedBackground', RGBA(0, 0, 0, 0),
'VScroll', "idScroll",
'ShowPartialItems', false,
}, {
PlaceObj('XTemplateForEach', {
'comment', "item",
'array', function (parent, context) return context:GetProperties() end,
'condition', function (parent, context, item, i) return (not item.filter or item.filter()) and item.category == "Resources" end,
'item_in_context', "prop_meta",
'run_after', function (child, context, item, i, n)
child:SetRolloverTitle(item.rollover.title)
child:SetRolloverText(item.rollover.descr)
end,
}, {
PlaceObj('XTemplateTemplate', {
'__template', "PropLandingParam",
'RolloverTemplate', "Rollover",
}),
}),
}),
PlaceObj('XTemplateWindow', {
'__class', "XFrame",
'Margins', box(-340, 20, -40, -130),
'Image', "UI/Common/pm_pad_large.tga",
'FrameBox', box(320, 0, 40, 0),
'SqueezeY', false,
'FlipY', true,
}),
PlaceObj('XTemplateWindow', {
'__class', "XLabel",
'Margins', box(0, 0, 0, 20),
'HAlign', "right",
'TextFont', "PGMissionDescrTitle",
'TextColor', RGBA(96, 135, 185, 255),
'Translate', true,
'Text', T{4271, --[[XTemplate PGMissionLandingSpot Text]] "THREATS"},
}),
PlaceObj('XTemplateWindow', {
'__class', "XContentTemplateList",
'BorderWidth', 0,
'LayoutVSpacing', 10,
'Clip', false,
'Background', RGBA(0, 0, 0, 0),
'FocusedBackground', RGBA(0, 0, 0, 0),
'VScroll', "idScroll",
'ShowPartialItems', false,
}, {
PlaceObj('XTemplateForEach', {
'comment', "item",
'array', function (parent, context) return context:GetProperties() end,
'condition', function (parent, context, item, i) return (not item.filter or item.filter()) and item.category == "Threats" end,
'item_in_context', "prop_meta",
'run_after', function (child, context, item, i, n)
child:SetRolloverTitle(item.rollover.title)
child:SetRolloverText(item.rollover.descr)
end,
}, {
PlaceObj('XTemplateTemplate', {
'__template', "PropLandingParam",
'RolloverTemplate', "Rollover",
}),
}),
}),
}),
}),
}),
})
|
local rng = require('lmbedtls.rng')
local csr = require('lmbedtls.x509.csr')
local util = require('util')
local fs = require('fs')
local crypto = require('crypto')
local tap = require('util/tap')
console.log(rng)
local test = tap.test
test("test csr", function()
local filename1 = util.dirname() .. "/cert_sha256.crt"
local filedata1 = fs.readFileSync(filename1);
console.log(csr, filedata1)
console.log(csr.parse(filedata1))
console.log(csr.parseFile(filename1))
end)
tap.run()
|
--[[
Variables
]]
Housing.zone = {}
Housing.info = {
-- MIRROR PARK --
["mp1"] = { ["pos"] = vector4(1060.5270996094, -378.19421386719, 68.231163024902, 39.172248840332), ["street"] = "West Mirror Drive 1", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp2"] = { ["pos"] = vector4(1028.857421875, -408.37677001953, 66.340995788574, 36.74836730957), ["street"] = "West Mirror Drive 2", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp3"] = { ["pos"] = vector4(1010.4624023438, -423.34521484375, 65.349403381348, 126.93661499023), ["street"] = "West Mirror Drive 3", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp4"] = { ["pos"] = vector4(987.54345703125, -432.95510864258, 64.049430847168, 36.587905883789), ["street"] = "West Mirror Drive 4", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp5"] = { ["pos"] = vector4(967.11212158203, -451.59536743164, 62.78955078125, 31.850078582764), ["street"] = "West Mirror Drive 5", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp6"] = { ["pos"] = vector4(944.39227294922, -463.11999511719, 61.554039001465, 305.21826171875), ["street"] = "West Mirror Drive 6", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp7"] = { ["pos"] = vector4(921.82891845703, -477.82299804688, 61.083656311035, 21.096143722534), ["street"] = "West Mirror Drive 7", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp8"] = { ["pos"] = vector4(906.28021240234, -489.40518188477, 59.436264038086, 24.171745300293), ["street"] = "West Mirror Drive 8", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp9"] = { ["pos"] = vector4(878.36248779297, -497.95910644531, 58.092247009277, 48.525253295898), ["street"] = "West Mirror Drive 9", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp10"] = { ["pos"] = vector4(861.45330810547, -509.10510253906, 57.722187042236, 47.109214782715), ["street"] = "West Mirror Drive 10", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp11"] = { ["pos"] = vector4(850.26702880859, -532.63494873047, 57.925567626953, 84.248329162598), ["street"] = "West Mirror Drive 11", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp12"] = { ["pos"] = vector4(844.12030029297, -562.57104492188, 57.992664337158, 12.474022865295), ["street"] = "West Mirror Drive 12", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp13"] = { ["pos"] = vector4(861.72882080078, -583.63330078125, 58.156475067139, 179.55603027344), ["street"] = "West Mirror Drive 13", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp14"] = { ["pos"] = vector4(886.80242919922, -608.21661376953, 58.445079803467, 134.77833557129), ["street"] = "West Mirror Drive 14", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp15"] = { ["pos"] = vector4(902.98699951172, -615.42529296875, 58.453296661377, 49.018825531006), ["street"] = "West Mirror Drive 15", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp16"] = { ["pos"] = vector4(928.91748046875, -639.77319335938, 58.242473602295, 137.42723083496), ["street"] = "West Mirror Drive 16", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp17"] = { ["pos"] = vector4(943.30651855469, -653.25109863281, 58.626636505127, 34.842063903809), ["street"] = "West Mirror Drive 17", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp18"] = { ["pos"] = vector4(959.92620849609, -669.80181884766, 58.449829101563, 120.86544799805), ["street"] = "West Mirror Drive 18", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp19"] = { ["pos"] = vector4(970.85321044922, -701.42926025391, 58.481952667236, 168.38092041016), ["street"] = "West Mirror Drive 19", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp20"] = { ["pos"] = vector4(979.09948730469, -716.29669189453, 58.220672607422, 129.60705566406), ["street"] = "West Mirror Drive 20", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp21"] = { ["pos"] = vector4(996.794921875, -729.60821533203, 57.815738677979, 135.1485748291), ["street"] = "West Mirror Drive 21", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp22"] = { ["pos"] = vector4(980.19378662109, -627.74951171875, 59.235824584961, 210.14886474609), ["street"] = "West Mirror Drive 22", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp23"] = { ["pos"] = vector4(964.32727050781, -596.0966796875, 59.902698516846, 253.21008300781), ["street"] = "West Mirror Drive 23", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp24"] = { ["pos"] = vector4(893.14819335938, -540.5966796875, 58.506637573242, 291.46914672852), ["street"] = "West Mirror Drive 24", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp25"] = { ["pos"] = vector4(924.38159179688, -526.04797363281, 59.789012908936, 205.19898986816), ["street"] = "West Mirror Drive 25", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp26"] = { ["pos"] = vector4(945.79461669922, -518.87817382813, 60.625957489014, 122.80007171631), ["street"] = "West Mirror Drive 26", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp27"] = { ["pos"] = vector4(970.48211669922, -502.47778320313, 62.140895843506, 254.90859985352), ["street"] = "West Mirror Drive 27", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp28"] = { ["pos"] = vector4(1014.647644043, -469.31164550781, 64.502998352051, 214.49028015137), ["street"] = "West Mirror Drive 28", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp29"] = { ["pos"] = vector4(1114.4200439453, -391.31750488281, 68.949592590332, 243.16775512695), ["street"] = "West Mirror Drive 29", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp30"] = { ["pos"] = vector4(1101.0557861328, -411.33297729492, 67.555244445801, 263.08898925781), ["street"] = "West Bridge Street 1", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp31"] = { ["pos"] = vector4(1099.5396728516, -438.65231323242, 67.790550231934, 169.3970489502), ["street"] = "West Bridge Street 2", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp32"] = { ["pos"] = vector4(1098.5682373047, -464.46310424805, 67.319396972656, 349.91580200195), ["street"] = "West Bridge Street 3", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp33"] = { ["pos"] = vector4(1090.4429931641, -484.31781005859, 65.660491943359, 257.08602905273), ["street"] = "West Bridge Street 4", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp34"] = { ["pos"] = vector4(1046.189453125, -498.12869262695, 64.276695251465, 175.15147399902), ["street"] = "West Bridge Street 5", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp35"] = { ["pos"] = vector4(1051.0515136719, -470.49752807617, 64.296691894531, 79.124183654785), ["street"] = "West Bridge Street 6", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp36"] = { ["pos"] = vector4(1056.0778808594, -448.94134521484, 66.25749206543, 166.30560302734), ["street"] = "West Bridge Street 7", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp37"] = { ["pos"] = vector4(1009.6579589844, -572.58166503906, 60.594326019287, 89.871429443359), ["street"] = "Mirror Place 1", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp38"] = { ["pos"] = vector4(999.58666992188, -593.92395019531, 59.638610839844, 75.582366943359), ["street"] = "Mirror Place 2", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp39"] = { ["pos"] = vector4(976.68817138672, -580.6357421875, 59.850036621094, 209.76400756836), ["street"] = "Nikola Avenue 1", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp40"] = { ["pos"] = vector4(919.77563476563, -569.49523925781, 58.366367340088, 28.073726654053), ["street"] = "Nikola Avenue 2", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp41"] = { ["pos"] = vector4(965.16033935547, -541.87707519531, 59.72737121582, 26.211084365845), ["street"] = "Nikola Avenue 3", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp42"] = { ["pos"] = vector4(987.85699462891, -525.74835205078, 60.69314956665, 34.056797027588), ["street"] = "Nikola Avenue 4", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp43"] = { ["pos"] = vector4(1006.4995727539, -511.02130126953, 60.99239730835, 295.78338623047), ["street"] = "Nikola Avenue 5", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp44"] = { ["pos"] = vector4(1229.6369628906, -725.44104003906, 60.955581665039, 276.66021728516), ["street"] = "Mirror Park Blvd 1", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp45"] = { ["pos"] = vector4(1220.7989501953, -689.46929931641, 61.103183746338, 186.51431274414), ["street"] = "Mirror Park Blvd 2", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp46"] = { ["pos"] = vector4(1221.4425048828, -669.29541015625, 63.494541168213, 193.63804626465), ["street"] = "Mirror Park Blvd 3", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp47"] = { ["pos"] = vector4(1207.3757324219, -620.27996826172, 66.438613891602, 273.63305664063), ["street"] = "Mirror Park Blvd 4", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp48"] = { ["pos"] = vector4(1203.6031494141, -598.44708251953, 68.063529968262, 2.6423726081848), ["street"] = "Mirror Park Blvd 5", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp49"] = { ["pos"] = vector4(1200.9942626953, -575.45294189453, 69.139099121094, 306.09262084961), ["street"] = "Mirror Park Blvd 6", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp50"] = { ["pos"] = vector4(1204.8645019531, -557.68701171875, 69.615188598633, 269.8547668457), ["street"] = "Mirror Park Blvd 7", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp51"] = { ["pos"] = vector4(1264.7381591797, -702.83160400391, 64.909057617188, 60.090045928955), ["street"] = "East Mirror Drive 1", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp52"] = { ["pos"] = vector4(1271.0491943359, -683.62561035156, 66.031616210938, 182.1693572998), ["street"] = "East Mirror Drive 2", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp53"] = { ["pos"] = vector4(1265.5922851563, -648.68127441406, 68.121383666992, 216.49960327148), ["street"] = "East Mirror Drive 3", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp54"] = { ["pos"] = vector4(1250.8000488281, -620.89819335938, 69.572044372559, 28.82103729248), ["street"] = "East Mirror Drive 4", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp55"] = { ["pos"] = vector4(1240.5115966797, -601.64025878906, 69.782600402832, 88.39094543457), ["street"] = "East Mirror Drive 5", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp56"] = { ["pos"] = vector4(1241.4284667969, -566.33111572266, 69.65739440918, 130.70022583008), ["street"] = "East Mirror Drive 6", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp57"] = { ["pos"] = vector4(1250.8065185547, -515.45965576172, 69.349052429199, 78.661827087402), ["street"] = "East Mirror Drive 7", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp58"] = { ["pos"] = vector4(1251.51953125, -494.16235351563, 69.90682220459, 72.055519104004), ["street"] = "East Mirror Drive 8", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp59"] = { ["pos"] = vector4(1259.5539550781, -480.21234130859, 70.188774108887, 119.95747375488), ["street"] = "East Mirror Drive 9", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp60"] = { ["pos"] = vector4(1265.6907958984, -458.04486083984, 70.517059326172, 91.895706176758), ["street"] = "East Mirror Drive 10", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
["mp61"] = { ["pos"] = vector4(1262.3771972656, -429.93328857422, 70.015281677246, 113.67491149902), ["street"] = "East Mirror Drive 11", ["model"] = "v_int_61", ["price"] = 950, ["enabled"] = true },
-- MIRROR PARK MANSIONS --
["mp62"] = { ["pos"] = vector4(1303.17, -527.38, 71.46, 338.33), ["street"] = "Nikola Place 1", ["model"] = "v_int_44_empty", ["price"] = 1200, ["enabled"] = true },
["mp63"] = { ["pos"] = vector4(1328.55, -535.99, 72.44, 252.50), ["street"] = "Nikola Place 2", ["model"] = "v_int_44_empty", ["price"] = 1200, ["enabled"] = true },
["mp64"] = { ["pos"] = vector4(1348.48, -546.84, 73.89, 341.24), ["street"] = "Nikola Place 3", ["model"] = "v_int_44_empty", ["price"] = 1200, ["enabled"] = true },
["mp65"] = { ["pos"] = vector4(1373.20, -555.79, 74.68, 242.38), ["street"] = "Nikola Place 4", ["model"] = "v_int_44_empty", ["price"] = 1200, ["enabled"] = true },
["mp66"] = { ["pos"] = vector4(1388.98, -569.46, 74.49, 286.26), ["street"] = "Nikola Place 5", ["model"] = "v_int_44_empty", ["price"] = 1200, ["enabled"] = true },
["mp67"] = { ["pos"] = vector4(1386.28, -593.54, 74.48, 228.64), ["street"] = "Nikola Place 6", ["model"] = "v_int_44_empty", ["price"] = 1200, ["enabled"] = true },
["mp68"] = { ["pos"] = vector4(1367.18, -606.64, 74.71, 179.96), ["street"] = "Nikola Place 7", ["model"] = "v_int_44_empty", ["price"] = 1200, ["enabled"] = true },
["mp69"] = { ["pos"] = vector4(1341.35, -597.20, 74.70, 58.981), ["street"] = "Nikola Place 8", ["model"] = "v_int_44_empty", ["price"] = 1200, ["enabled"] = true },
["mp70"] = { ["pos"] = vector4(1323.29, -583.15, 73.24, 155.08), ["street"] = "Nikola Place 9", ["model"] = "v_int_44_empty", ["price"] = 1200, ["enabled"] = true },
["mp71"] = { ["pos"] = vector4(1301.00, -574.15, 71.73, 160.67), ["street"] = "Nikola Place 10", ["model"] = "v_int_44_empty", ["price"] = 1200, ["enabled"] = true },
-- EL BURRO --
["fl1"] = { ["pos"] = vector4(1193.59, -1656.52, 43.02, 207.22), ["street"] = "Fudge Lane 1", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fl2"] = { ["pos"] = vector4(1193.39, -1622.29, 45.22, 302.49), ["street"] = "Fudge Lane 2", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fl3"] = { ["pos"] = vector4(1210.36, -1606.64, 50.73, 31.25), ["street"] = "Fudge Lane 3", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fl4"] = { ["pos"] = vector4(1214.44, -1644.37, 48.64, 208.97), ["street"] = "Fudge Lane 4", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fl5"] = { ["pos"] = vector4(1245.32, -1626.95, 53.28, 212.80), ["street"] = "Fudge Lane 5", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fl6"] = { ["pos"] = vector4(1230.70, -1590.79, 53.76, 33.39), ["street"] = "Fudge Lane 6", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fl7"] = { ["pos"] = vector4(1261.64, -1616.75, 54.74, 159.26), ["street"] = "Fudge Lane 7", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fl8"] = { ["pos"] = vector4(1286.69, -1604.57, 54.82, 194.86), ["street"] = "Fudge Lane 8", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fl9"] = { ["pos"] = vector4(1315.61, -1526.54, 51.80, 11.96), ["street"] = "Fudge Lane 9", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fl10"] = { ["pos"] = vector4(1327.51, -1553.24, 54.05, 228.07), ["street"] = "Fudge Lane 10", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fl11"] = { ["pos"] = vector4(1342.35, -1526.67, 54.58, 350.62), ["street"] = "Fudge Lane 11", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fl12"] = { ["pos"] = vector4(1360.78, -1556.32, 56.34, 189.53), ["street"] = "Fudge Lane 12", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fl13"] = { ["pos"] = vector4(1341.45, -1577.80, 54.44, 32.20), ["street"] = "Fudge Lane 13", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fl14"] = { ["pos"] = vector4(1381.84, -1544.65, 57.10, 126.15), ["street"] = "Fudge Lane 14", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fl15"] = { ["pos"] = vector4(1379.18, -1514.84, 58.43, 25.96), ["street"] = "Fudge Lane 15", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fl16"] = { ["pos"] = vector4(1437.49, -1491.86, 63.62, 343.37), ["street"] = "Fudge Lane 16", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fl17"] = { ["pos"] = vector4(1403.93, -1496.51, 59.96, 112.44), ["street"] = "Fudge Lane 17", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fl18"] = { ["pos"] = vector4(1411.89, -1490.40, 60.65, 309.07), ["street"] = "Fudge Lane 18", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["av1"] = { ["pos"] = vector4(1259.23, -1761.93, 49.65, 203.16), ["street"] = "Amarillo Vista 1", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["av2"] = { ["pos"] = vector4(1250.80, -1734.24, 52.03, 17.97), ["street"] = "Amarillo Vista 2", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["av3"] = { ["pos"] = vector4(1289.23, -1710.51, 55.47, 22.20), ["street"] = "Amarillo Vista 3", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["av4"] = { ["pos"] = vector4(1294.98, -1739.77, 54.27, 110.46), ["street"] = "Amarillo Vista 4", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["av5"] = { ["pos"] = vector4(1314.42, -1733.04, 54.70, 109.32), ["street"] = "Amarillo Vista 5", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["av6"] = { ["pos"] = vector4(1316.66, -1698.51, 58.22, 2.56), ["street"] = "Amarillo Vista 6", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["av7"] = { ["pos"] = vector4(1354.93, -1690.60, 60.49, 78.95), ["street"] = "Amarillo Vista 7", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["av8"] = { ["pos"] = vector4(1365.69, -1721.73, 65.63, 191.28), ["street"] = "Amarillo Vista 8", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["av9"] = { ["pos"] = vector4(1358.27, -1752.07, 64.45, 282.40), ["street"] = "Amarillo Vista 9", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
-- RANCHO --
["js1"] = { ["pos"] = vector4(236.00491333008, -2046.2574462891, 18.379993438721, 135.28607177734), ["street"] = "Jamestown Street 1", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js2"] = { ["pos"] = vector4(251.08276367188, -2030.2310791016, 18.706092834473, 143.21060180664), ["street"] = "Jamestown Street 2", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js3"] = { ["pos"] = vector4(256.37887573242, -2023.4769287109, 19.266313552856, 49.362613677979), ["street"] = "Jamestown Street 3", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js4"] = { ["pos"] = vector4(279.51461791992, -1993.8798828125, 20.803779602051, 141.10772705078), ["street"] = "Jamestown Street 4", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js5"] = { ["pos"] = vector4(291.54159545898, -1980.1977539063, 21.600532531738, 324.55163574219), ["street"] = "Jamestown Street 5", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js6"] = { ["pos"] = vector4(295.71505737305, -1971.8776855469, 22.900455474854, 45.659702301025), ["street"] = "Jamestown Street 6", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js7"] = { ["pos"] = vector4(311.93563842773, -1956.1553955078, 24.616744995117, 53.766689300537), ["street"] = "Jamestown Street 7", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js8"] = { ["pos"] = vector4(324.2292175293, -1937.28515625, 25.018974304199, 320.47137451172), ["street"] = "Jamestown Street 8", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js9"] = { ["pos"] = vector4(368.68280029297, -1895.7458496094, 25.178525924683, 308.89474487305), ["street"] = "Jamestown Street 9", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js10"] = { ["pos"] = vector4(385.19158935547, -1881.4432373047, 26.032243728638, 42.536121368408), ["street"] = "Jamestown Street 10", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js11"] = { ["pos"] = vector4(399.37567138672, -1865.1232910156, 26.716352462769, 129.14002990723), ["street"] = "Jamestown Street 11", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js12"] = { ["pos"] = vector4(412.44268798828, -1856.3540039063, 27.323127746582, 128.5591583252), ["street"] = "Jamestown Street 12", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js13"] = { ["pos"] = vector4(427.17669677734, -1842.1383056641, 28.463445663452, 138.70210266113), ["street"] = "Jamestown Street 13", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js14"] = { ["pos"] = vector4(440.55447387695, -1829.7330322266, 28.361854553223, 312.51138305664), ["street"] = "Jamestown Street 14", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js15"] = { ["pos"] = vector4(495.35357666016, -1823.3120117188, 28.869703292847, 138.23983764648), ["street"] = "Jamestown Street 15", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js16"] = { ["pos"] = vector4(500.45217895508, -1813.3099365234, 28.891206741333, 138.02239990234), ["street"] = "Jamestown Street 16", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js17"] = { ["pos"] = vector4(512.53125, -1790.6063232422, 28.919452667236, 272.27606201172), ["street"] = "Jamestown Street 17", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js18"] = { ["pos"] = vector4(514.27545166016, -1780.6296386719, 28.913974761963, 255.70314025879), ["street"] = "Jamestown Street 18", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js19"] = { ["pos"] = vector4(472.14074707031, -1775.4378662109, 29.070844650269, 76.887962341309), ["street"] = "Jamestown Street 19", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js20"] = { ["pos"] = vector4(474.52075195313, -1757.5980224609, 29.092622756958, 73.652572631836), ["street"] = "Jamestown Street 20", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js21"] = { ["pos"] = vector4(479.73141479492, -1735.75, 29.151023864746, 341.09265136719), ["street"] = "Jamestown Street 21", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js22"] = { ["pos"] = vector4(489.66641235352, -1714.1704101563, 29.706884384155, 63.129993438721), ["street"] = "Jamestown Street 22", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["js23"] = { ["pos"] = vector4(500.73547363281, -1697.1264648438, 29.789270401001, 320.84722900391), ["street"] = "Jamestown Street 23", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb1"] = { ["pos"] = vector4(250.70349121094, -1935.1317138672, 24.699272155762, 228.41500854492), ["street"] = "Roy Lowenstein Blvd 1", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb2"] = { ["pos"] = vector4(258.28219604492, -1927.1214599609, 25.444778442383, 320.12921142578), ["street"] = "Roy Lowenstein Blvd 2", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb3"] = { ["pos"] = vector4(270.41299438477, -1917.0129394531, 26.180335998535, 315.22729492188), ["street"] = "Roy Lowenstein Blvd 3", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb4"] = { ["pos"] = vector4(282.89465332031, -1899.1324462891, 27.267543792725, 230.53842163086), ["street"] = "Roy Lowenstein Blvd 4", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb5"] = { ["pos"] = vector4(320.31948852539, -1854.0445556641, 27.510908126831, 224.65049743652), ["street"] = "Roy Lowenstein Blvd 5", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb6"] = { ["pos"] = vector4(329.32281494141, -1845.8959960938, 27.748058319092, 229.65765380859), ["street"] = "Roy Lowenstein Blvd 6", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb7"] = { ["pos"] = vector4(338.65530395508, -1829.6431884766, 28.337493896484, 133.00869750977), ["street"] = "Roy Lowenstein Blvd 7", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb8"] = { ["pos"] = vector4(348.73223876953, -1820.9365234375, 28.89409828186, 130.31896972656), ["street"] = "Roy Lowenstein Blvd 8", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb9"] = { ["pos"] = vector4(405.85034179688, -1751.1761474609, 29.710319519043, 323.14129638672), ["street"] = "Roy Lowenstein Blvd 9", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb10"] = { ["pos"] = vector4(419.07073974609, -1735.4952392578, 29.607696533203, 310.84912109375), ["street"] = "Roy Lowenstein Blvd 10", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb11"] = { ["pos"] = vector4(431.21612548828, -1725.3936767578, 29.60143661499, 315.63088989258), ["street"] = "Roy Lowenstein Blvd 11", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb12"] = { ["pos"] = vector4(443.40087890625, -1707.2608642578, 29.709173202515, 228.90977478027), ["street"] = "Roy Lowenstein Blvd 12", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
-- JAMESTOWN APARTMENTS --
["jb1-1"] = { ["pos"] = vector4(334.60122680664, -1978.6900634766, 24.167304992676, 233.59532165527), ["street"] = "Jamestown B1/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb1-2"] = { ["pos"] = vector4(331.55679321289, -1982.3286132813, 24.167278289795, 225.33917236328), ["street"] = "Jamestown B1/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb1-3"] = { ["pos"] = vector4(325.60192871094, -1989.2607421875, 24.167278289795, 225.10771179199), ["street"] = "Jamestown B1/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb1-4"] = { ["pos"] = vector4(323.73498535156, -1991.3568115234, 24.167280197144, 232.53494262695), ["street"] = "Jamestown B1/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb1-5"] = { ["pos"] = vector4(330.60073852539, -1999.9674072266, 24.046051025391, 51.88835144043), ["street"] = "Jamestown B1/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb1-6"] = { ["pos"] = vector4(334.98666381836, -1994.7337646484, 24.046035766602, 51.361019134521), ["street"] = "Jamestown B1/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb1-7"] = { ["pos"] = vector4(337.64196777344, -1991.5661621094, 24.047454833984, 55.159564971924), ["street"] = "Jamestown B1/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb1-8"] = { ["pos"] = vector4(342.21701049805, -1982.0043945313, 24.161058425903, 140.11630249023), ["street"] = "Jamestown B1/Apt8", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb2-1"] = { ["pos"] = vector4(361.92572021484, -1987.0261230469, 24.233808517456, 157.45364379883), ["street"] = "Jamestown B2/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb2-2"] = { ["pos"] = vector4(364.32357788086, -1987.9807128906, 24.233694076538, 162.54460144043), ["street"] = "Jamestown B2/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb2-3"] = { ["pos"] = vector4(374.75549316406, -1991.6096191406, 24.234952926636, 164.57040405273), ["street"] = "Jamestown B2/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb2-4"] = { ["pos"] = vector4(383.23977661133, -1994.7590332031, 24.234973907471, 154.24073791504), ["street"] = "Jamestown B2/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb2-5"] = { ["pos"] = vector4(385.84674072266, -1995.6184082031, 24.234973907471, 158.18209838867), ["street"] = "Jamestown B2/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb2-6"] = { ["pos"] = vector4(384.00805664063, -2006.4810791016, 24.246082305908, 350.09948730469), ["street"] = "Jamestown B2/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb2-7"] = { ["pos"] = vector4(377.47537231445, -2004.1079101563, 24.24614906311, 340.58071899414), ["street"] = "Jamestown B2/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb2-8"] = { ["pos"] = vector4(373.74786376953, -2002.7513427734, 24.249179840088, 347.05880737305), ["street"] = "Jamestown B2/Apt8", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb2-9"] = { ["pos"] = vector4(367.22543334961, -2000.3724365234, 24.249612808228, 344.40005493164), ["street"] = "Jamestown B2/Apt9", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb2-10"] = { ["pos"] = vector4(363.46014404297, -1999.0003662109, 24.248952865601, 336.42916870117), ["street"] = "Jamestown B2/Apt10", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb2-11"] = { ["pos"] = vector4(356.9582824707, -1996.6451416016, 24.24552154541, 339.38302612305), ["street"] = "Jamestown B2/Apt11", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb3-1"] = { ["pos"] = vector4(393.638671875, -2015.1669921875, 23.403118133545, 243.75427246094), ["street"] = "Jamestown B3/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb3-2"] = { ["pos"] = vector4(392.48391723633, -2017.5184326172, 23.403123855591, 238.88073730469), ["street"] = "Jamestown B3/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb3-3"] = { ["pos"] = vector4(388.67977905273, -2026.0201416016, 23.403127670288, 244.91293334961), ["street"] = "Jamestown B3/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb3-4"] = { ["pos"] = vector4(384.02871704102, -2035.7286376953, 23.402044296265, 250.18328857422), ["street"] = "Jamestown B3/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb3-5"] = { ["pos"] = vector4(382.94769287109, -2038.1041259766, 23.401960372925, 246.27073669434), ["street"] = "Jamestown B3/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb3-6"] = { ["pos"] = vector4(392.06838989258, -2043.9564208984, 23.415836334229, 67.284111022949), ["street"] = "Jamestown B3/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb3-7"] = { ["pos"] = vector4(394.95587158203, -2037.9771728516, 23.413230895996, 64.740821838379), ["street"] = "Jamestown B3/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb3-8"] = { ["pos"] = vector4(396.68911743164, -2034.0415039063, 23.413339614868, 61.380077362061), ["street"] = "Jamestown B3/Apt8", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb3-9"] = { ["pos"] = vector4(399.57568359375, -2027.8387451172, 23.413555145264, 63.618721008301), ["street"] = "Jamestown B3/Apt9", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb3-10"] = { ["pos"] = vector4(401.26559448242, -2024.2506103516, 23.413507461548, 64.983520507813), ["street"] = "Jamestown B3/Apt10", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb3-11"] = { ["pos"] = vector4(404.17327880859, -2017.9775390625, 23.413526535034, 68.092514038086), ["street"] = "Jamestown B3/Apt11", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb4-1"] = { ["pos"] = vector4(332.44039916992, -2018.5004882813, 22.354290008545, 325.05676269531), ["street"] = "Jamestown B4/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb4-2"] = { ["pos"] = vector4(336.15823364258, -2021.6939697266, 22.354284286499, 321.05502319336), ["street"] = "Jamestown B4/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb4-3"] = { ["pos"] = vector4(343.08807373047, -2027.4925537109, 22.354291915894, 322.70889282227), ["street"] = "Jamestown B4/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb4-4"] = { ["pos"] = vector4(345.05413818359, -2029.2130126953, 22.354291915894, 291.75079345703), ["street"] = "Jamestown B4/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb4-5"] = { ["pos"] = vector4(351.83508300781, -2034.8337402344, 22.354286193848, 20.895078659058), ["street"] = "Jamestown B4/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb4-6"] = { ["pos"] = vector4(353.80432128906, -2036.4833984375, 22.354286193848, 289.21585083008), ["street"] = "Jamestown B4/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb4-7"] = { ["pos"] = vector4(360.79684448242, -2042.3031005859, 22.354293823242, 317.7536315918), ["street"] = "Jamestown B4/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb4-8"] = { ["pos"] = vector4(364.54641723633, -2045.4521484375, 22.354291915894, 319.20281982422), ["street"] = "Jamestown B4/Apt8", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb4-9"] = { ["pos"] = vector4(371.43630981445, -2040.7381591797, 22.19612121582, 52.103458404541), ["street"] = "Jamestown B4/Apt9", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb4-10"] = { ["pos"] = vector4(365.09399414063, -2031.9387207031, 22.39546585083, 143.37335205078), ["street"] = "Jamestown B4/Apt10", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb4-11"] = { ["pos"] = vector4(362.15933227539, -2029.4517822266, 22.395467758179, 137.4874420166), ["street"] = "Jamestown B4/Apt11", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb4-12"] = { ["pos"] = vector4(356.83645629883, -2025.0130615234, 22.39546585083, 140.53541564941), ["street"] = "Jamestown B4/Apt12", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb4-13"] = { ["pos"] = vector4(353.72637939453, -2022.3737792969, 22.39546585083, 139.51728820801), ["street"] = "Jamestown B4/Apt13", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb4-14"] = { ["pos"] = vector4(345.50402832031, -2015.4143066406, 22.395412445068, 143.11471557617), ["street"] = "Jamestown B4/Apt14", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb4-15"] = { ["pos"] = vector4(335.85278320313, -2010.8381347656, 22.313123703003, 224.67457580566), ["street"] = "Jamestown B4/Apt15", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb5-1"] = { ["pos"] = vector4(372.80679321289, -2055.6801757813, 21.74450302124, 230.81092834473), ["street"] = "Jamestown B5/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb5-2"] = { ["pos"] = vector4(371.06317138672, -2057.6281738281, 21.74450302124, 193.21549987793), ["street"] = "Jamestown B5/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb5-3"] = { ["pos"] = vector4(365.19186401367, -2064.6672363281, 21.744482040405, 231.01982116699), ["street"] = "Jamestown B5/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb5-4"] = { ["pos"] = vector4(358.13684082031, -2073.0224609375, 21.744400024414, 264.11291503906), ["street"] = "Jamestown B5/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb5-5"] = { ["pos"] = vector4(356.57510375977, -2074.9851074219, 21.744422912598, 226.89297485352), ["street"] = "Jamestown B5/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb5-6"] = { ["pos"] = vector4(363.802734375, -2082.9987792969, 21.754623413086, 52.600360870361), ["street"] = "Jamestown B5/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb5-7"] = { ["pos"] = vector4(368.16165161133, -2077.7890625, 21.760034561157, 48.653285980225), ["street"] = "Jamestown B5/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb5-8"] = { ["pos"] = vector4(370.69586181641, -2074.7666015625, 21.754619598389, 45.748031616211), ["street"] = "Jamestown B5/Apt8", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb5-9"] = { ["pos"] = vector4(375.18005371094, -2069.4282226563, 21.754621505737, 45.424362182617), ["street"] = "Jamestown B5/Apt9", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb5-10"] = { ["pos"] = vector4(377.81967163086, -2066.3518066406, 21.754621505737, 48.102127075195), ["street"] = "Jamestown B5/Apt10", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb5-11"] = { ["pos"] = vector4(382.16656494141, -2061.0942382813, 21.754625320435, 48.674263000488), ["street"] = "Jamestown B5/Apt11", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb6-1"] = { ["pos"] = vector4(313.4267578125, -2040.5660400391, 20.936367034912, 139.07279968262), ["street"] = "Jamestown B6/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb6-2"] = { ["pos"] = vector4(317.02969360352, -2043.5991210938, 20.936389923096, 142.23825073242), ["street"] = "Jamestown B6/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb6-3"] = { ["pos"] = vector4(324.11148071289, -2049.4768066406, 20.936389923096, 138.57487487793), ["street"] = "Jamestown B6/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb6-4"] = { ["pos"] = vector4(326.11608886719, -2051.1652832031, 20.936389923096, 140.21017456055), ["street"] = "Jamestown B6/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb6-5"] = { ["pos"] = vector4(334.8395690918, -2058.4965820313, 20.936388015747, 137.70527648926), ["street"] = "Jamestown B6/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb6-6"] = { ["pos"] = vector4(332.80877685547, -2056.8291015625, 20.936386108398, 143.78883361816), ["street"] = "Jamestown B6/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb6-7"] = { ["pos"] = vector4(341.72637939453, -2064.4326171875, 20.936445236206, 137.84281921387), ["street"] = "Jamestown B6/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb6-8"] = { ["pos"] = vector4(345.53799438477, -2067.6120605469, 20.936414718628, 141.15020751953), ["street"] = "Jamestown B6/Apt8", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb6-9"] = { ["pos"] = vector4(342.02810668945, -2075.09375, 20.938692092896, 53.443161010742), ["street"] = "Jamestown B6/Apt9", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb6-10"] = { ["pos"] = vector4(332.45645141602, -2070.5302734375, 20.936922073364, 322.03112792969), ["street"] = "Jamestown B6/Apt10", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb6-11"] = { ["pos"] = vector4(324.09674072266, -2063.5107421875, 20.945068359375, 329.58920288086), ["street"] = "Jamestown B6/Apt11", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb6-12"] = { ["pos"] = vector4(321.01318359375, -2060.9343261719, 20.938524246216, 319.77011108398), ["street"] = "Jamestown B6/Apt12", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb6-13"] = { ["pos"] = vector4(315.63510131836, -2056.4169921875, 20.939353942871, 320.01742553711), ["street"] = "Jamestown B6/Apt13", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb6-14"] = { ["pos"] = vector4(312.78671264648, -2054.0192871094, 20.938684463501, 321.97982788086), ["street"] = "Jamestown B6/Apt14", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb6-15"] = { ["pos"] = vector4(306.57473754883, -2045.2821044922, 20.911754608154, 239.68170166016), ["street"] = "Jamestown B6/Apt15", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb7-1"] = { ["pos"] = vector4(290.23016357422, -2031.2514648438, 19.767562866211, 231.38883972168), ["street"] = "Jamestown B7/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb7-2"] = { ["pos"] = vector4(287.13168334961, -2034.9124755859, 19.767562866211, 225.02670288086), ["street"] = "Jamestown B7/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb7-3"] = { ["pos"] = vector4(281.3239440918, -2041.9440917969, 19.767560958862, 231.38938903809), ["street"] = "Jamestown B7/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb7-4"] = { ["pos"] = vector4(279.5442199707, -2043.984375, 19.767572402954, 230.8122253418), ["street"] = "Jamestown B7/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb7-5"] = { ["pos"] = vector4(286.24517822266, -2052.5622558594, 19.646318435669, 52.0637550354), ["street"] = "Jamestown B7/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb7-6"] = { ["pos"] = vector4(290.61325073242, -2047.3610839844, 19.647617340088, 43.938667297363), ["street"] = "Jamestown B7/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb7-7"] = { ["pos"] = vector4(293.36804199219, -2044.0804443359, 19.646335601807, 43.099849700928), ["street"] = "Jamestown B7/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb7-8"] = { ["pos"] = vector4(297.96264648438, -2034.6124267578, 19.835708618164, 140.61602783203), ["street"] = "Jamestown B7/Apt8", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb8-1"] = { ["pos"] = vector4(288.41580200195, -2072.5383300781, 17.663572311401, 293.31967163086), ["street"] = "Jamestown B8/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb8-2"] = { ["pos"] = vector4(290.103515625, -2077.0561523438, 17.663570404053, 285.61096191406), ["street"] = "Jamestown B8/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb8-3"] = { ["pos"] = vector4(293.20617675781, -2085.6550292969, 17.663505554199, 299.02059936523), ["street"] = "Jamestown B8/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb8-4"] = { ["pos"] = vector4(294.12213134766, -2088.1499023438, 17.66357421875, 292.65093994141), ["street"] = "Jamestown B8/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb8-5"] = { ["pos"] = vector4(295.95370483398, -2093.1682128906, 17.663572311401, 290.66647338867), ["street"] = "Jamestown B8/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb8-6"] = { ["pos"] = vector4(297.59811401367, -2097.7250976563, 17.663568496704, 285.72152709961), ["street"] = "Jamestown B8/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb8-7"] = { ["pos"] = vector4(305.88275146484, -2097.0349121094, 17.53413772583, 19.707368850708), ["street"] = "Jamestown B8/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb8-8"] = { ["pos"] = vector4(304.98614501953, -2086.6098632813, 17.708833694458, 109.38277435303), ["street"] = "Jamestown B8/Apt8", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb8-9"] = { ["pos"] = vector4(302.61926269531, -2080.0812988281, 17.709032058716, 112.20207977295), ["street"] = "Jamestown B8/Apt9", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb8-10"] = { ["pos"] = vector4(301.26388549805, -2076.3588867188, 17.709032058716, 107.67855834961), ["street"] = "Jamestown B8/Apt10", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb8-11"] = { ["pos"] = vector4(295.05215454102, -2067.6411132813, 17.649465560913, 200.53512573242), ["street"] = "Jamestown B8/Apt11", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb9-1"] = { ["pos"] = vector4(334.28802490234, -2092.9350585938, 18.244071960449, 207.03225708008), ["street"] = "Jamestown B9/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb9-2"] = { ["pos"] = vector4(330.03579711914, -2095.4421386719, 18.244064331055, 210.47578430176), ["street"] = "Jamestown B9/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb9-3"] = { ["pos"] = vector4(321.74151611328, -2100.1525878906, 18.244068145752, 209.58082580566), ["street"] = "Jamestown B9/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb9-4"] = { ["pos"] = vector4(319.90209960938, -2101.2680664063, 18.244087219238, 209.75910949707), ["street"] = "Jamestown B9/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb9-5"] = { ["pos"] = vector4(323.11709594727, -2111.6669921875, 18.122653961182, 28.306573867798), ["street"] = "Jamestown B9/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb9-6"] = { ["pos"] = vector4(329.21823120117, -2108.1501464844, 18.122587203979, 31.035840988159), ["street"] = "Jamestown B9/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb9-7"] = { ["pos"] = vector4(332.49319458008, -2106.2514648438, 18.122594833374, 26.813886642456), ["street"] = "Jamestown B9/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["jb9-8"] = { ["pos"] = vector4(340.18826293945, -2098.6594238281, 18.202049255371, 129.25440979004), ["street"] = "Jamestown B9/Apt8", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
-- DAVIS --
["rlb13"] = { ["pos"] = vector4(144.37077331543, -1969.0286865234, 18.857627868652, 323.27), ["street"] = "Roy Lowenstein Blvd 13", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb14"] = { ["pos"] = vector4(148.71545410156, -1960.6927490234, 19.458898544312, 32.76), ["street"] = "Roy Lowenstein Blvd 14", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb15"] = { ["pos"] = vector4(165.08596801758, -1944.9665527344, 20.235422134399, 49.11), ["street"] = "Roy Lowenstein Blvd 15", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb16"] = { ["pos"] = vector4(179.19453430176, -1923.9411621094, 21.371021270752, 316.73), ["street"] = "Roy Lowenstein Blvd 16", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb17"] = { ["pos"] = vector4(288.70532226563, -1792.6049804688, 28.089029312134, 136.97), ["street"] = "Roy Lowenstein Blvd 17", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb18"] = { ["pos"] = vector4(300.18322753906, -1783.7969970703, 28.438684463501, 321.18), ["street"] = "Roy Lowenstein Blvd 18", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb19"] = { ["pos"] = vector4(304.36111450195, -1775.6517333984, 29.10083770752, 41.96), ["street"] = "Roy Lowenstein Blvd 19", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb20"] = { ["pos"] = vector4(320.60317993164, -1759.8049316406, 29.637901306152, 49.468), ["street"] = "Roy Lowenstein Blvd 20", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["rlb21"] = { ["pos"] = vector4(332.98907470703, -1740.9118652344, 29.73052406311, 326.63), ["street"] = "Roy Lowenstein Blvd 21", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["ca1"] = { ["pos"] = vector4(208.47994995117, -1895.3342285156, 24.814130783081, 234.74), ["street"] = "Covenant Avenue 1", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["ca2"] = { ["pos"] = vector4(192.27688598633, -1883.3292236328, 25.056728363037, 330.69), ["street"] = "Covenant Avenue 2", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["ca3"] = { ["pos"] = vector4(171.51635742188, -1871.5698242188, 24.400228500366, 273.31), ["street"] = "Covenant Avenue 3", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["ca4"] = { ["pos"] = vector4(149.97314453125, -1864.6387939453, 24.591333389282, 329.56), ["street"] = "Covenant Avenue 4", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["ca5"] = { ["pos"] = vector4(130.68914794922, -1853.3425292969, 25.234785079956, 330.24), ["street"] = "Covenant Avenue 5", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["ca6"] = { ["pos"] = vector4(103.91329956055, -1885.2210693359, 24.318773269653, 144.08), ["street"] = "Covenant Avenue 6", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["ca7"] = { ["pos"] = vector4(115.41401672363, -1887.8723144531, 23.928253173828, 240.33), ["street"] = "Covenant Avenue 7", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["ca8"] = { ["pos"] = vector4(128.24870300293, -1896.8870849609, 23.674198150635, 244.35), ["street"] = "Covenant Avenue 8", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["ca9"] = { ["pos"] = vector4(148.74598693848, -1904.4958496094, 23.531669616699, 102.54), ["street"] = "Covenant Avenue 9", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["ba1"] = { ["pos"] = vector4(252.9818572998, -1670.8449707031, 29.663192749023, 318.51), ["street"] = "Brouge Avenue 1", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["ba2"] = { ["pos"] = vector4(240.59144592285, -1687.7633056641, 29.699613571167, 49.62), ["street"] = "Brouge Avenue 2", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["ba3"] = { ["pos"] = vector4(222.64501953125, -1702.5040283203, 29.696887969971, 33.40), ["street"] = "Brouge Avenue 3", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["ba4"] = { ["pos"] = vector4(216.47924804688, -1717.4909667969, 29.677795410156, 123.69), ["street"] = "Brouge Avenue 4", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["ba5"] = { ["pos"] = vector4(197.73216247559, -1725.6920166016, 29.663652420044, 110.83), ["street"] = "Brouge Avenue 5", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["ba6"] = { ["pos"] = vector4(281.92977905273, -1694.8891601563, 29.647905349731, 235.20), ["street"] = "Brouge Avenue 6", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["ba7"] = { ["pos"] = vector4(269.67547607422, -1712.7512207031, 29.668800354004, 314.02), ["street"] = "Brouge Avenue 7", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["ba8"] = { ["pos"] = vector4(257.53784179688, -1722.8643798828, 29.65412902832, 319.16), ["street"] = "Brouge Avenue 8", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["ba9"] = { ["pos"] = vector4(250.08491516113, -1730.6921386719, 29.670307159424, 228.44), ["street"] = "Brouge Avenue 9", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["ba10"] = { ["pos"] = vector4(152.8353729248, -1823.6676025391, 27.868656158447, 229.69), ["street"] = "Brouge Avenue 10", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["gs1"] = { ["pos"] = vector4(-50.386707305908, -1783.3234863281, 28.300819396973, 312.63), ["street"] = "Grove Street 1", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["gs2"] = { ["pos"] = vector4(-42.048469543457, -1792.1429443359, 27.828090667725, 314.44), ["street"] = "Grove Street 2", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["gs3"] = { ["pos"] = vector4(-34.118434906006, -1847.0059814453, 26.193525314331, 48.71), ["street"] = "Grove Street 3", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["gs4"] = { ["pos"] = vector4(-20.366222381592, -1858.8162841797, 25.408672332764, 225.35), ["street"] = "Grove Street 4", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["gs5"] = { ["pos"] = vector4(-4.6829915046692, -1872.0095214844, 24.151008605957, 208.05), ["street"] = "Grove Street 5", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["gs6"] = { ["pos"] = vector4(54.509159088135, -1873.1657714844, 22.805738449097, 337.10), ["street"] = "Grove Street 6", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["gs7"] = { ["pos"] = vector4(46.050094604492, -1864.14453125, 23.27827835083, 311.12), ["street"] = "Grove Street 7", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["gs8"] = { ["pos"] = vector4(29.971139907837, -1854.7880859375, 24.068830490112, 227.39), ["street"] = "Grove Street 8", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["gs9"] = { ["pos"] = vector4(21.253141403198, -1844.7386474609, 24.601736068726, 226.72), ["street"] = "Grove Street 9", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["gsb1-1"] = { ["pos"] = vector4(15.28, -1895.37, 22.02, 141.32), ["street"] = "Grove Street B1/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb1-2"] = { ["pos"] = vector4(19.0, -1898.54, 22.02, 138.44), ["street"] = "Grove Street B1/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb1-3"] = { ["pos"] = vector4(26.2, -1904.61, 22.02, 140.78), ["street"] = "Grove Street B1/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb1-4"] = { ["pos"] = vector4(27.65, -1905.83, 22.02, 139.16), ["street"] = "Grove Street B1/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb1-5"] = { ["pos"] = vector4(34.93, -1911.95, 22.02, 143.37), ["street"] = "Grove Street B1/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb1-6"] = { ["pos"] = vector4(36.36, -1913.12, 22.02, 147.95), ["street"] = "Grove Street B1/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb1-7"] = { ["pos"] = vector4(43.72, -1919.3, 22.02, 140.02), ["street"] = "Grove Street B1/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb1-8"] = { ["pos"] = vector4(47.48, -1922.34, 22.02, 139.91), ["street"] = "Grove Street B1/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb1-9"] = { ["pos"] = vector4(44.05, -1929.89, 21.97, 50.87), ["street"] = "Grove Street B1/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb1-10"] = { ["pos"] = vector4(34.42, -1925.41, 22.06, 320.15), ["street"] = "Grove Street B1/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb1-11"] = { ["pos"] = vector4(26.05, -1918.44, 22.06, 324.59), ["street"] = "Grove Street B1/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb1-12"] = { ["pos"] = vector4(22.96, -1915.84, 22.06, 321.92), ["street"] = "Grove Street B1/Apt 12", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb1-13"] = { ["pos"] = vector4(17.7, -1911.36, 22.06, 321.41), ["street"] = "Grove Street B1/Apt 13", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb1-14"] = { ["pos"] = vector4(14.65, -1908.84, 22.06, 321.84), ["street"] = "Grove Street B1/Apt 14", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb1-15"] = { ["pos"] = vector4(8.45, -1900.09, 21.94, 231.51), ["street"] = "Grove Street B1/Apt 15", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb2-1"] = { ["pos"] = vector4(60.66, -1935.85, 20.93, 138.29), ["street"] = "Grove Street B2/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb2-2"] = { ["pos"] = vector4(64.47, -1939.02, 20.93, 142.11), ["street"] = "Grove Street B2/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb2-3"] = { ["pos"] = vector4(71.58, -1945.02, 20.93, 142.33), ["street"] = "Grove Street B2/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb2-4"] = { ["pos"] = vector4(73.15, -1946.34, 20.93, 149.14), ["street"] = "Grove Street B2/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb2-5"] = { ["pos"] = vector4(80.31, -1952.39, 20.93, 148.95), ["street"] = "Grove Street B2/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb2-6"] = { ["pos"] = vector4(81.86, -1953.67, 20.93, 148.77), ["street"] = "Grove Street B2/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb2-7"] = { ["pos"] = vector4(89.22, -1959.74, 20.93, 137.45), ["street"] = "Grove Street B2/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb2-8"] = { ["pos"] = vector4(92.88, -1962.85, 20.93, 136.39), ["street"] = "Grove Street B2/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb2-9"] = { ["pos"] = vector4(89.47, -1970.41, 20.74, 52.07), ["street"] = "Grove Street B2/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb2-10"] = { ["pos"] = vector4(79.77, -1965.85, 20.97, 316.37), ["street"] = "Grove Street B2/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb2-11"] = { ["pos"] = vector4(71.39, -1958.81, 20.97, 315.28), ["street"] = "Grove Street B2/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb2-12"] = { ["pos"] = vector4(68.31, -1956.2, 20.97, 320.83), ["street"] = "Grove Street B2/Apt 12", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb2-13"] = { ["pos"] = vector4(63.14, -1951.88, 20.97, 322.98), ["street"] = "Grove Street B2/Apt 13", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb2-14"] = { ["pos"] = vector4(60.05, -1949.26, 20.97, 323.68), ["street"] = "Grove Street B2/Apt 14", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb2-15"] = { ["pos"] = vector4(53.96, -1940.62, 20.87, 231.48), ["street"] = "Grove Street B2/Apt 15", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb3-1"] = { ["pos"] = vector4(101.2, -1979.96, 20.03, 278.13), ["street"] = "Grove Street B3/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb3-2"] = { ["pos"] = vector4(101.61, -1981.92, 20.03, 280.14), ["street"] = "Grove Street B3/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb3-3"] = { ["pos"] = vector4(103.17, -1991.33, 20.03, 273.79), ["street"] = "Grove Street B3/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb3-4"] = { ["pos"] = vector4(105.14, -2002.47, 20.03, 282.84), ["street"] = "Grove Street B3/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb3-5"] = { ["pos"] = vector4(105.54, -2004.39, 20.03, 277.01), ["street"] = "Grove Street B3/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb3-6"] = { ["pos"] = vector4(116.37, -2004.26, 20.03, 92.07), ["street"] = "Grove Street B3/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb3-7"] = { ["pos"] = vector4(115.03, -1997.15, 20.03, 101.11), ["street"] = "Grove Street B3/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb3-8"] = { ["pos"] = vector4(114.39, -1993.43, 20.03, 102.88), ["street"] = "Grove Street B3/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb3-9"] = { ["pos"] = vector4(113.27, -1986.66, 20.03, 82.5), ["street"] = "Grove Street B3/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb3-10"] = { ["pos"] = vector4(112.57, -1982.69, 20.03, 96.68), ["street"] = "Grove Street B3/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb3-11"] = { ["pos"] = vector4(111.34, -1975.86, 20.03, 97.44), ["street"] = "Grove Street B3/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb4-1"] = { ["pos"] = vector4(144.16, -1936.79, 21.67, 11.25), ["street"] = "Grove Street B4/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb4-2"] = { ["pos"] = vector4(146.05, -1936.46, 21.67, 3.92), ["street"] = "Grove Street B4/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb4-3"] = { ["pos"] = vector4(155.57, -1934.87, 21.67, 11.69), ["street"] = "Grove Street B4/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb4-4"] = { ["pos"] = vector4(166.47, -1932.95, 21.67, 7.58), ["street"] = "Grove Street B4/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb4-5"] = { ["pos"] = vector4(168.47, -1932.51, 21.67, 6.64), ["street"] = "Grove Street B4/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb4-6"] = { ["pos"] = vector4(168.34, -1921.77, 21.68, 199.89), ["street"] = "Grove Street B4/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb4-7"] = { ["pos"] = vector4(161.6, -1922.89, 21.68, 176.57), ["street"] = "Grove Street B4/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb4-8"] = { ["pos"] = vector4(157.64, -1923.59, 21.68, 181.37), ["street"] = "Grove Street B4/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb4-9"] = { ["pos"] = vector4(150.76, -1924.8, 21.68, 178.22), ["street"] = "Grove Street B4/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb4-10"] = { ["pos"] = vector4(147.26, -1925.41, 21.68, 158.19), ["street"] = "Grove Street B4/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb4-11"] = { ["pos"] = vector4(140.09, -1926.68, 21.73, 182.13), ["street"] = "Grove Street B4/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb5-1"] = { ["pos"] = vector4(139.44, -1904.96, 21.81, 165.79), ["street"] = "Grove Street B5/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb5-2"] = { ["pos"] = vector4(134.77, -1903.34, 21.81, 148.29), ["street"] = "Grove Street B5/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb5-3"] = { ["pos"] = vector4(125.96, -1900.06, 21.81, 164.88), ["street"] = "Grove Street B5/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb5-4"] = { ["pos"] = vector4(124.06, -1899.47, 21.81, 153.24), ["street"] = "Grove Street B5/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb5-5"] = { ["pos"] = vector4(115.28, -1896.27, 21.81, 151.25), ["street"] = "Grove Street B5/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb5-6"] = { ["pos"] = vector4(113.16, -1895.52, 21.81, 115.49), ["street"] = "Grove Street B5/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb5-7"] = { ["pos"] = vector4(104.48, -1892.26, 21.81, 171.91), ["street"] = "Grove Street B5/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb5-8"] = { ["pos"] = vector4(99.94, -1890.69, 21.81, 156.2), ["street"] = "Grove Street B5/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb5-9"] = { ["pos"] = vector4(95.11, -1897.4, 21.81, 261.17), ["street"] = "Grove Street B5/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb5-10"] = { ["pos"] = vector4(103.94, -1903.57, 21.85, 332.76), ["street"] = "Grove Street B5/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb5-11"] = { ["pos"] = vector4(107.75, -1904.86, 21.85, 350.22), ["street"] = "Grove Street B5/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb5-12"] = { ["pos"] = vector4(114.22, -1907.25, 21.85, 355.37), ["street"] = "Grove Street B5/Apt 12", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb5-13"] = { ["pos"] = vector4(117.98, -1908.63, 21.85, 345.76), ["street"] = "Grove Street B5/Apt 13", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb5-14"] = { ["pos"] = vector4(128.09, -1912.37, 21.85, 345.77), ["street"] = "Grove Street B5/Apt 14", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["gsb5-15"] = { ["pos"] = vector4(138.73, -1913.3, 21.64, 69.84), ["street"] = "Grove Street B5/Apt 15", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
-- DAVIS HOOD --
["dhb1-1"] = { ["pos"] = vector4(37.01, -1704.72, 29.44, 206.3), ["street"] = "Davis B1/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb1-2"] = { ["pos"] = vector4(32.62, -1706.78, 29.44, 203.28), ["street"] = "Davis B1/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb1-3"] = { ["pos"] = vector4(24.21, -1710.7, 29.44, 207.54), ["street"] = "Davis B1/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb1-4"] = { ["pos"] = vector4(22.09, -1711.68, 29.44, 203.85), ["street"] = "Davis B1/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb1-5"] = { ["pos"] = vector4(24.12, -1722.09, 29.43, 26.55), ["street"] = "Davis B1/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb1-6"] = { ["pos"] = vector4(30.31, -1719.2, 29.44, 26.91), ["street"] = "Davis B1/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb1-7"] = { ["pos"] = vector4(34.07, -1717.46, 29.44, 24.81), ["street"] = "Davis B1/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb1-8"] = { ["pos"] = vector4(42.24, -1710.99, 29.32, 115.83), ["street"] = "Davis B1/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb2-1"] = { ["pos"] = vector4(58.97, -1715.5, 29.45, 139.53), ["street"] = "Davis B2/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb2-2"] = { ["pos"] = vector4(60.66, -1716.95, 29.45, 144.09), ["street"] = "Davis B2/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb2-3"] = { ["pos"] = vector4(69.37, -1724.21, 29.45, 139.16), ["street"] = "Davis B2/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb2-4"] = { ["pos"] = vector4(76.44, -1730.07, 29.45, 140.22), ["street"] = "Davis B2/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb2-5"] = { ["pos"] = vector4(78.2, -1731.59, 29.45, 143.43), ["street"] = "Davis B2/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb2-6"] = { ["pos"] = vector4(73.18, -1741.0, 29.46, 334.33), ["street"] = "Davis B2/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb2-7"] = { ["pos"] = vector4(67.85, -1736.43, 29.46, 321.76), ["street"] = "Davis B2/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb2-8"] = { ["pos"] = vector4(64.8, -1733.97, 29.46, 318.98), ["street"] = "Davis B2/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb2-9"] = { ["pos"] = vector4(59.53, -1729.45, 29.46, 321.47), ["street"] = "Davis B2/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb2-10"] = { ["pos"] = vector4(56.51, -1726.92, 29.46, 324.9), ["street"] = "Davis B2/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb2-11"] = { ["pos"] = vector4(51.16, -1722.4, 29.46, 319.25), ["street"] = "Davis B2/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb3-1"] = { ["pos"] = vector4(93.89, -1744.26, 29.48, 143.3), ["street"] = "Davis B3/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb3-2"] = { ["pos"] = vector4(95.54, -1745.57, 29.48, 145.21), ["street"] = "Davis B3/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb3-3"] = { ["pos"] = vector4(104.13, -1752.85, 29.48, 142.67), ["street"] = "Davis B3/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb3-4"] = { ["pos"] = vector4(111.39, -1758.77, 29.48, 139.89), ["street"] = "Davis B3/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb3-5"] = { ["pos"] = vector4(112.94, -1760.22, 29.48, 147.51), ["street"] = "Davis B3/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb3-6"] = { ["pos"] = vector4(107.91, -1769.59, 29.54, 321.98), ["street"] = "Davis B3/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb3-7"] = { ["pos"] = vector4(102.71, -1765.09, 29.54, 318.36), ["street"] = "Davis B3/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb3-8"] = { ["pos"] = vector4(99.59, -1762.5, 29.54, 321.38), ["street"] = "Davis B3/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb3-9"] = { ["pos"] = vector4(94.4, -1758.1, 29.48, 324.63), ["street"] = "Davis B3/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb3-10"] = { ["pos"] = vector4(91.3, -1755.5, 29.48, 322.57), ["street"] = "Davis B3/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb3-11"] = { ["pos"] = vector4(86.01, -1751.11, 29.48, 327.72), ["street"] = "Davis B3/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb4-1"] = { ["pos"] = vector4(127.63, -1776.88, 29.29, 235.0), ["street"] = "Davis B4/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb4-2"] = { ["pos"] = vector4(124.6, -1780.63, 29.33, 228.63), ["street"] = "Davis B4/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb4-3"] = { ["pos"] = vector4(118.4, -1787.92, 29.42, 232.81), ["street"] = "Davis B4/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb4-4"] = { ["pos"] = vector4(117.2, -1789.36, 29.3, 221.43), ["street"] = "Davis B4/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb4-5"] = { ["pos"] = vector4(123.46, -1798.09, 29.17, 52.53), ["street"] = "Davis B4/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb4-6"] = { ["pos"] = vector4(127.93, -1792.75, 29.29, 53.49), ["street"] = "Davis B4/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb4-7"] = { ["pos"] = vector4(130.44, -1789.67, 29.29, 56.11), ["street"] = "Davis B4/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb4-8"] = { ["pos"] = vector4(134.95, -1780.31, 29.28, 143.96), ["street"] = "Davis B4/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb5-1"] = { ["pos"] = vector4(94.8, -1825.44, 26.96, 141.72), ["street"] = "Davis B5/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb5-2"] = { ["pos"] = vector4(89.56, -1821.12, 27.5, 135.74), ["street"] = "Davis B5/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb5-3"] = { ["pos"] = vector4(86.49, -1818.55, 27.31, 137.05), ["street"] = "Davis B5/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb5-4"] = { ["pos"] = vector4(77.08, -1813.97, 27.24, 229.66), ["street"] = "Davis B5/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb5-5"] = { ["pos"] = vector4(73.65, -1821.26, 27.09, 324.11), ["street"] = "Davis B5/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb5-6"] = { ["pos"] = vector4(77.39, -1824.37, 27.15, 319.53), ["street"] = "Davis B5/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb5-7"] = { ["pos"] = vector4(84.4, -1830.36, 27.09, 323.06), ["street"] = "Davis B5/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb5-8"] = { ["pos"] = vector4(86.29, -1831.88, 27.09, 314.48), ["street"] = "Davis B5/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb6-1"] = { ["pos"] = vector4(69.06, -1803.31, 27.84, 140.98), ["street"] = "Davis B6/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb6-2"] = { ["pos"] = vector4(65.52, -1800.31, 27.84, 132.24), ["street"] = "Davis B6/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb6-3"] = { ["pos"] = vector4(58.26, -1794.12, 27.84, 145.62), ["street"] = "Davis B6/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb6-4"] = { ["pos"] = vector4(56.58, -1792.71, 27.84, 116.79), ["street"] = "Davis B6/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb6-5"] = { ["pos"] = vector4(49.61, -1786.86, 27.84, 141.25), ["street"] = "Davis B6/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb6-6"] = { ["pos"] = vector4(47.87, -1785.51, 27.84, 107.81), ["street"] = "Davis B6/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb6-7"] = { ["pos"] = vector4(40.68, -1779.48, 27.84, 141.23), ["street"] = "Davis B6/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb6-8"] = { ["pos"] = vector4(36.93, -1776.29, 27.84, 137.54), ["street"] = "Davis B6/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb6-9"] = { ["pos"] = vector4(30.33, -1780.95, 28.37, 233.85), ["street"] = "Davis B6/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb6-10"] = { ["pos"] = vector4(36.51, -1789.5, 27.84, 316.12), ["street"] = "Davis B6/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb6-11"] = { ["pos"] = vector4(39.48, -1792.03, 27.84, 317.92), ["street"] = "Davis B6/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb6-12"] = { ["pos"] = vector4(44.96, -1796.52, 27.84, 318.47), ["street"] = "Davis B6/Apt 12", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb6-13"] = { ["pos"] = vector4(47.84, -1799.05, 27.84, 314.85), ["street"] = "Davis B6/Apt 13", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb6-14"] = { ["pos"] = vector4(56.32, -1806.06, 27.89, 320.99), ["street"] = "Davis B6/Apt 14", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb6-15"] = { ["pos"] = vector4(65.62, -1810.68, 27.84, 48.58), ["street"] = "Davis B6/Apt 15", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb7-1"] = { ["pos"] = vector4(17.0, -1764.24, 29.28, 146.86), ["street"] = "Davis B7/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb7-2"] = { ["pos"] = vector4(13.19, -1761.53, 29.28, 143.74), ["street"] = "Davis B7/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb7-3"] = { ["pos"] = vector4(5.57, -1756.19, 29.28, 147.49), ["street"] = "Davis B7/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb7-4"] = { ["pos"] = vector4(3.6, -1754.81, 29.28, 138.3), ["street"] = "Davis B7/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb7-5"] = { ["pos"] = vector4(-3.85, -1749.72, 29.28, 145.62), ["street"] = "Davis B7/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb7-6"] = { ["pos"] = vector4(-5.71, -1748.29, 29.28, 135.4), ["street"] = "Davis B7/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb7-7"] = { ["pos"] = vector4(-13.29, -1743.0, 29.28, 145.61), ["street"] = "Davis B7/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb7-8"] = { ["pos"] = vector4(-17.23, -1740.22, 29.28, 137.58), ["street"] = "Davis B7/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb7-9"] = { ["pos"] = vector4(-23.54, -1745.42, 29.26, 238.22), ["street"] = "Davis B7/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb7-10"] = { ["pos"] = vector4(-16.63, -1753.44, 29.28, 330.1), ["street"] = "Davis B7/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb7-11"] = { ["pos"] = vector4(-13.41, -1755.69, 29.3, 316.19), ["street"] = "Davis B7/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb7-12"] = { ["pos"] = vector4(-7.54, -1759.77, 29.28, 335.48), ["street"] = "Davis B7/Apt 12", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb7-13"] = { ["pos"] = vector4(-4.52, -1761.91, 29.28, 320.23), ["street"] = "Davis B7/Apt 13", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb7-14"] = { ["pos"] = vector4(4.43, -1768.18, 29.28, 326.72), ["street"] = "Davis B7/Apt 14", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["dhb7-15"] = { ["pos"] = vector4(14.35, -1772.06, 29.28, 51.26), ["street"] = "Davis B7/Apt 15", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
-- ROY LOWENSTEIN APARTMENTS --
["rla1"] = { ["pos"] = vector4(467.03524780273, -1590.4201660156, 32.823143005371, 137.13475036621), ["street"] = "Roy Lowenstein Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["rla2"] = { ["pos"] = vector4(460.95776367188, -1585.1953125, 32.792167663574, 136.36898803711), ["street"] = "Roy Lowenstein Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["rla3"] = { ["pos"] = vector4(454.87615966797, -1580.1171875, 32.823150634766, 140.85285949707), ["street"] = "Roy Lowenstein Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["rla4"] = { ["pos"] = vector4(442.18969726563, -1569.5794677734, 32.822875976563, 139.52122497559), ["street"] = "Roy Lowenstein Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["rla5"] = { ["pos"] = vector4(436.21194458008, -1564.5284423828, 32.822532653809, 141.44682312012), ["street"] = "Roy Lowenstein Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["rla6"] = { ["pos"] = vector4(430.16354370117, -1559.4083251953, 32.823051452637, 138.10676574707), ["street"] = "Roy Lowenstein Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["rla7"] = { ["pos"] = vector4(460.59860229492, -1573.2945556641, 32.824447631836, 43.151210784912), ["street"] = "Roy Lowenstein Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["rla8"] = { ["pos"] = vector4(465.64605712891, -1567.3077392578, 32.826099395752, 49.426063537598), ["street"] = "Roy Lowenstein Apt8", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["rla9"] = { ["pos"] = vector4(470.74078369141, -1561.3095703125, 32.827110290527, 47.731323242188), ["street"] = "Roy Lowenstein Apt9", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
-- CHAMBERLAIN HILLS --
["fd14"] = { ["pos"] = vector4(16.727703094482, -1443.857421875, 30.949970245361, 336.02325439453), ["street"] = "Forum Drive 14", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fd15"] = { ["pos"] = vector4(-2.0487184524536, -1442.0869140625, 30.963369369507, 6.4238967895508), ["street"] = "Forum Drive 15", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fd16"] = { ["pos"] = vector4(-32.345783233643, -1446.3087158203, 31.891408920288, 263.07159423828), ["street"] = "Forum Drive 16", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fd17"] = { ["pos"] = vector4(-45.420589447021, -1445.6706542969, 32.429592132568, 273.75299072266), ["street"] = "Forum Drive 17", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
["fd18"] = { ["pos"] = vector4(-64.485778808594, -1449.5245361328, 32.524921417236, 91.686645507813), ["street"] = "Forum Drive 18", ["model"] = "v_int_16_mid_empty", ["price"] = 660, ["enabled"] = true },
-- FORUM DRIVE APARTMENTS --
["fd1-1"] = { ["pos"] = vector4(-157.86888122559, -1679.8059082031, 33.833404541016, 49.737812042236), ["street"] = "Forum Drive 1/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd1-2"] = { ["pos"] = vector4(-148.34036254883, -1687.2536621094, 33.067481994629, 319.62066650391), ["street"] = "Forum Drive 1/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd1-3"] = { ["pos"] = vector4(-146.64958190918, -1688.6226806641, 33.067478179932, 320.26229858398), ["street"] = "Forum Drive 1/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd1-4"] = { ["pos"] = vector4(-142.4000610352, -1692.4865722656, 32.872425079346, 317.2653503418), ["street"] = "Forum Drive 1/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd1-5"] = { ["pos"] = vector4(-141.93797302246, -1694.0872802734, 33.067470550537, 229.57470703125), ["street"] = "Forum Drive 1/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd1-6"] = { ["pos"] = vector4(-141.72570800781, -1693.6822509766, 36.16731262207, 231.88740539551), ["street"] = "Forum Drive 1/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd1-7"] = { ["pos"] = vector4(-142.2049407959, -1692.3555908203, 36.166179656982, 315.07482910156), ["street"] = "Forum Drive 1/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd1-8"] = { ["pos"] = vector4(-146.52275085449, -1688.7423095703, 36.166198730469, 321.06066894531), ["street"] = "Forum Drive 1/Apt8", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd1-9"] = { ["pos"] = vector4(-148.46899414063, -1687.0947265625, 36.166168212891, 318.51123046875), ["street"] = "Forum Drive 1/Apt9", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd1-10"] = { ["pos"] = vector4(-157.43060302734, -1679.7407226563, 36.96656036377, 320.85614013672), ["street"] = "Forum Drive 1/Apt10", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd1-11"] = { ["pos"] = vector4(-158.95239257813, -1679.7375488281, 36.966384887695, 46.61803817749), ["street"] = "Forum Drive 1/Apt11", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd2-1"] = { ["pos"] = vector4(-124.13957214355, -1671.341796875, 32.564373016357, 238.5280456543), ["street"] = "Forum Drive 2/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd2-2"] = { ["pos"] = vector4(-131.66931152344, -1665.5980224609, 32.564323425293, 139.16076660156), ["street"] = "Forum Drive 2/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd2-3"] = { ["pos"] = vector4(-138.67794799805, -1658.9266357422, 33.337871551514, 50.165042877197), ["street"] = "Forum Drive 2/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd2-4"] = { ["pos"] = vector4(-130.91288757324, -1679.5484619141, 34.914234161377, 229.35182189941), ["street"] = "Forum Drive 2/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd2-5"] = { ["pos"] = vector4(-124.03974151611, -1671.3470458984, 35.71418762207, 229.95617675781), ["street"] = "Forum Drive 2/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd2-6"] = { ["pos"] = vector4(-131.5640411377, -1665.6027832031, 35.71422958374, 140.21047973633), ["street"] = "Forum Drive 2/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd2-7"] = { ["pos"] = vector4(-138.546875, -1658.8282470703, 36.51416015625, 50.369003295898), ["street"] = "Forum Drive 2/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd3-1"] = { ["pos"] = vector4(-114.43034362793, -1659.7514648438, 32.564331054688, 230.27474975586), ["street"] = "Forum Drive 3/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd3-2"] = { ["pos"] = vector4(-121.17308044434, -1653.2239990234, 32.564323425293, 315.31921386719), ["street"] = "Forum Drive 3/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd3-3"] = { ["pos"] = vector4(-128.99075317383, -1647.2835693359, 33.309352874756, 50.826637268066), ["street"] = "Forum Drive 3/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd3-4"] = { ["pos"] = vector4(-107.34411621094, -1651.4270019531, 34.88102722168, 229.75347900391), ["street"] = "Forum Drive 3/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd3-5"] = { ["pos"] = vector4(-114.34871673584, -1659.7561035156, 35.714244842529, 232.53861999512), ["street"] = "Forum Drive 3/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd3-6"] = { ["pos"] = vector4(-121.22669219971, -1653.3151855469, 35.714191436768, 319.09509277344), ["street"] = "Forum Drive 3/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd3-7"] = { ["pos"] = vector4(-128.95811462402, -1647.4019775391, 36.514209747314, 47.969570159912), ["street"] = "Forum Drive 3/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd4-1"] = { ["pos"] = vector4(-83.556922912598, -1623.0555419922, 31.47674369812, 229.39793395996), ["street"] = "Forum Drive 4/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd4-2"] = { ["pos"] = vector4(-89.403503417969, -1629.9649658203, 31.505598068237, 228.2855682373), ["street"] = "Forum Drive 4/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd4-3"] = { ["pos"] = vector4(-97.103950500488, -1639.1413574219, 32.103012084961, 225.69479370117), ["street"] = "Forum Drive 4/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd4-4"] = { ["pos"] = vector4(-105.51274871826, -1632.6263427734, 32.906932830811, 127.17524719238), ["street"] = "Forum Drive 4/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd4-5"] = { ["pos"] = vector4(-109.58296966553, -1628.5084228516, 32.907569885254, 49.85391998291), ["street"] = "Forum Drive 4/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd4-6"] = { ["pos"] = vector4(-97.871566772461, -1612.2634277344, 32.312244415283, 49.138843536377), ["street"] = "Forum Drive 4/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd4-7"] = { ["pos"] = vector4(-93.542823791504, -1607.2357177734, 32.311977386475, 49.258350372314), ["street"] = "Forum Drive 4/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd4-8"] = { ["pos"] = vector4(-87.911003112793, -1601.4788818359, 32.311935424805, 319.61291503906), ["street"] = "Forum Drive 4/Apt8", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd4-9"] = { ["pos"] = vector4(-80.192886352539, -1607.8640136719, 31.480575561523, 317.53845214844), ["street"] = "Forum Drive 4/Apt9", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd4-10"] = { ["pos"] = vector4(-83.612747192383, -1622.9678955078, 34.689163208008, 229.04585266113), ["street"] = "Forum Drive 4/Apt10", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd4-11"] = { ["pos"] = vector4(-89.439826965332, -1630.0190429688, 34.689189910889, 227.83044433594), ["street"] = "Forum Drive 4/Apt11", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd4-12"] = { ["pos"] = vector4(-96.669578552246, -1638.6168212891, 35.489112854004, 219.69918823242), ["street"] = "Forum Drive 4/Apt12", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd4-13"] = { ["pos"] = vector4(-98.691452026367, -1638.4479980469, 35.484153747559, 138.59837341309), ["street"] = "Forum Drive 4/Apt13", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd4-14"] = { ["pos"] = vector4(-105.49387359619, -1632.6614990234, 36.289073944092, 139.99688720703), ["street"] = "Forum Drive 4/Apt14", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd4-15"] = { ["pos"] = vector4(-109.57651519775, -1628.4947509766, 36.289028167725, 45.186180114746), ["street"] = "Forum Drive 4/Apt15", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd4-16"] = { ["pos"] = vector4(-97.782447814941, -1612.2860107422, 35.489231109619, 54.467342376709), ["street"] = "Forum Drive 4/Apt16", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd4-17"] = { ["pos"] = vector4(-93.511528015137, -1607.2528076172, 35.489219665527, 45.427623748779), ["street"] = "Forum Drive 4/Apt17", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd4-18"] = { ["pos"] = vector4(-88.190635681152, -1601.2144775391, 35.48921585083, 327.81292724609), ["street"] = "Forum Drive 4/Apt18", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd4-19"] = { ["pos"] = vector4(-80.231117248535, -1607.8858642578, 34.689212799072, 323.32995605469), ["street"] = "Forum Drive 4/Apt19", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd5-1"] = { ["pos"] = vector4(-119.94580841064, -1574.5180664063, 34.176303863525, 323.27185058594), ["street"] = "Forum Drive 5/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd5-2"] = { ["pos"] = vector4(-114.07509613037, -1579.5446777344, 34.177116394043, 320.61663818359), ["street"] = "Forum Drive 5/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd5-3"] = { ["pos"] = vector4(-118.864402771, -1586.1635742188, 34.213012695313, 235.78921508789), ["street"] = "Forum Drive 5/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd5-4"] = { ["pos"] = vector4(-123.09200286865, -1591.1499023438, 34.207630157471, 229.22869873047), ["street"] = "Forum Drive 5/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd5-5"] = { ["pos"] = vector4(-140.30432128906, -1599.5738525391, 34.831317901611, 159.74984741211), ["street"] = "Forum Drive 5/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd5-6"] = { ["pos"] = vector4(-147.85983276367, -1596.4523925781, 34.831317901611, 52.37446975708), ["street"] = "Forum Drive 5/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd5-7"] = { ["pos"] = vector4(-140.17399597168, -1587.4272460938, 34.243698120117, 52.086315155029), ["street"] = "Forum Drive 5/Apt8", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd5-8"] = { ["pos"] = vector4(-134.2951965332, -1580.4344482422, 34.2080078125, 49.064823150635), ["street"] = "Forum Drive 5/Apt9", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd5-9"] = { ["pos"] = vector4(-120.17428588867, -1574.3861083984, 37.407760620117, 320.33831787109), ["street"] = "Forum Drive 5/Apt10", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd5-10"] = { ["pos"] = vector4(-114.08885192871, -1579.4815673828, 37.40779876709, 317.24310302734), ["street"] = "Forum Drive 5/Apt11", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd5-11"] = { ["pos"] = vector4(-118.88975524902, -1586.1417236328, 37.40779876709, 233.8642578125), ["street"] = "Forum Drive 5/Apt12", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd5-12"] = { ["pos"] = vector4(-122.94370269775, -1591.1256103516, 37.40779876709, 222.54373168945), ["street"] = "Forum Drive 5/Apt13", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd5-13"] = { ["pos"] = vector4(-140.38775634766, -1599.5661621094, 38.212665557861, 162.9878692627), ["street"] = "Forum Drive 5/Apt15", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd5-14"] = { ["pos"] = vector4(-146.98631286621, -1597.2280273438, 38.212665557861, 143.72055053711), ["street"] = "Forum Drive 5/Apt16", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd5-15"] = { ["pos"] = vector4(-147.59248352051, -1596.1369628906, 38.212665557861, 49.484382629395), ["street"] = "Forum Drive 5/Apt17", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd5-16"] = { ["pos"] = vector4(-140.19918823242, -1587.4166259766, 37.407821655273, 52.934421539307), ["street"] = "Forum Drive 5/Apt18", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd5-17"] = { ["pos"] = vector4(-134.29034423828, -1580.3792724609, 37.407810211182, 57.255722045898), ["street"] = "Forum Drive 5/Apt19", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd6-1"] = { ["pos"] = vector4(-150.3465423584, -1625.6456298828, 33.657516479492, 235.97994995117), ["street"] = "Forum Drive 6/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd6-2"] = { ["pos"] = vector4(-151.2947845459, -1622.4389648438, 33.650001525879, 49.806106567383), ["street"] = "Forum Drive 6/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd6-3"] = { ["pos"] = vector4(-145.07371520996, -1618.6275634766, 36.048496246338, 234.63772583008), ["street"] = "Forum Drive 6/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd6-4"] = { ["pos"] = vector4(-146.06555175781, -1614.6708984375, 36.048496246338, 74.083625793457), ["street"] = "Forum Drive 6/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd6-5"] = { ["pos"] = vector4(-152.45268249512, -1623.9466552734, 36.848293304443, 59.359844207764), ["street"] = "Forum Drive 6/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd6-6"] = { ["pos"] = vector4(-150.25576782227, -1625.4339599609, 36.848293304443, 229.58955383301), ["street"] = "Forum Drive 6/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd7-1"] = { ["pos"] = vector4(-161.16412353516, -1638.7297363281, 34.028846740723, 141.25634765625), ["street"] = "Forum Drive 7/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd7-2"] = { ["pos"] = vector4(-160.05888366699, -1636.2628173828, 34.028846740723, 321.16906738281), ["street"] = "Forum Drive 7/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd7-3"] = { ["pos"] = vector4(-153.51452636719, -1641.1810302734, 36.85103225708, 322.18487548828), ["street"] = "Forum Drive 7/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd7-4"] = { ["pos"] = vector4(-161.79312133789, -1638.3137207031, 37.245899200439, 143.87875366211), ["street"] = "Forum Drive 7/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd7-5"] = { ["pos"] = vector4(-159.98890686035, -1636.3117675781, 37.245906829834, 317.01657104492), ["street"] = "Forum Drive 7/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd8-1"] = { ["pos"] = vector4(-216.54403686523, -1674.4001464844, 34.463314056396, 175.41325378418), ["street"] = "Forum Drive 8/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd8-2"] = { ["pos"] = vector4(-224.39416503906, -1674.4105224609, 34.463310241699, 182.54685974121), ["street"] = "Forum Drive 8/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd8-3"] = { ["pos"] = vector4(-224.89135742188, -1666.2512207031, 34.463199615479, 87.496276855469), ["street"] = "Forum Drive 8/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd8-4"] = { ["pos"] = vector4(-225.05198669434, -1648.9034423828, 35.257999420166, 90.120697021484), ["street"] = "Forum Drive 8/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd8-5"] = { ["pos"] = vector4(-216.45895385742, -1648.4936523438, 34.463230133057, 0.2841406166553), ["street"] = "Forum Drive 8/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd8-6"] = { ["pos"] = vector4(-212.27938842773, -1660.7243652344, 34.463176727295, 266.39849853516), ["street"] = "Forum Drive 8/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd8-7"] = { ["pos"] = vector4(-212.29037475586, -1668.0736083984, 34.463218688965, 278.94705200195), ["street"] = "Forum Drive 8/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd8-8"] = { ["pos"] = vector4(-216.58726501465, -1674.4957275391, 37.636661529541, 182.23526000977), ["street"] = "Forum Drive 8/Apt8", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd8-9"] = { ["pos"] = vector4(-224.30519104004, -1674.443359375, 37.636711120605, 176.44631958008), ["street"] = "Forum Drive 8/Apt9", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd8-10"] = { ["pos"] = vector4(-224.89175415039, -1666.2017822266, 37.636943817139, 83.90047454834), ["street"] = "Forum Drive 8/Apt10", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd8-11"] = { ["pos"] = vector4(-224.99281311035, -1653.9693603516, 37.636795043945, 91.204383850098), ["street"] = "Forum Drive 8/Apt11", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd8-12"] = { ["pos"] = vector4(-224.07336425781, -1648.5795898438, 38.444931030273, 358.6994934082), ["street"] = "Forum Drive 8/Apt12", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd8-13"] = { ["pos"] = vector4(-216.42721557617, -1648.5181884766, 37.636993408203, 2.4451599121094), ["street"] = "Forum Drive 8/Apt13", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd8-14"] = { ["pos"] = vector4(-212.2900390625, -1660.7575683594, 37.636943817139, 269.74673461914), ["street"] = "Forum Drive 8/Apt14", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-1"] = { ["pos"] = vector4(-208.67100524902, -1600.5765380859, 34.869304656982, 259.90148925781), ["street"] = "Forum Drive 9/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-2"] = { ["pos"] = vector4(-210.05714416504, -1607.1656494141, 34.869304656982, 257.91180419922), ["street"] = "Forum Drive 9/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-3"] = { ["pos"] = vector4(-212.01370239258, -1617.3278808594, 34.869281768799, 255.37216186523), ["street"] = "Forum Drive 9/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-4"] = { ["pos"] = vector4(-213.33197021484, -1618.0194091797, 34.869281768799, 178.50494384766), ["street"] = "Forum Drive 9/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-5"] = { ["pos"] = vector4(-223.06330871582, -1617.228515625, 34.869331359863, 89.601501464844), ["street"] = "Forum Drive 9/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-6"] = { ["pos"] = vector4(-223.08114624023, -1601.1583251953, 34.882350921631, 89.208534240723), ["street"] = "Forum Drive 9/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-7"] = { ["pos"] = vector4(-223.10987854004, -1585.8304443359, 34.869277954102, 86.88355255127), ["street"] = "Forum Drive 9/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-8"] = { ["pos"] = vector4(-219.39335632324, -1579.9133300781, 34.869277954102, 52.200798034668), ["street"] = "Forum Drive 9/Apt8", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-9"] = { ["pos"] = vector4(-215.7350769043, -1576.3410644531, 34.869277954102, 318.02603149414), ["street"] = "Forum Drive 9/Apt9", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-10"] = { ["pos"] = vector4(-205.66059875488, -1585.6129150391, 34.869270324707, 263.85583496094), ["street"] = "Forum Drive 9/Apt10", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-12"] = { ["pos"] = vector4(-205.74645996094, -1585.7800292969, 38.054347991943, 260.22009277344), ["street"] = "Forum Drive 9/Apt12", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-13"] = { ["pos"] = vector4(-215.65962219238, -1576.3249511719, 38.054496765137, 324.07604980469), ["street"] = "Forum Drive 9/Apt13", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-14"] = { ["pos"] = vector4(-219.20751953125, -1579.8840332031, 38.054496765137, 57.760761260986), ["street"] = "Forum Drive 9/Apt14", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-15"] = { ["pos"] = vector4(-223.05101013184, -1585.7495117188, 38.054496765137, 86.806442260742), ["street"] = "Forum Drive 9/Apt15", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-16"] = { ["pos"] = vector4(-223.16677856445, -1601.2037353516, 38.054496765137, 91.422386169434), ["street"] = "Forum Drive 9/Apt16", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-17"] = { ["pos"] = vector4(-223.08306884766, -1617.44140625, 38.056354522705, 101.8589630127), ["street"] = "Forum Drive 9/Apt17", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-18"] = { ["pos"] = vector4(-213.1880645752, -1618.0655517578, 38.054504394531, 182.3821105957), ["street"] = "Forum Drive 9/Apt18", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-19"] = { ["pos"] = vector4(-212.0234375, -1616.9714355469, 38.054504394531, 249.29669189453), ["street"] = "Forum Drive 9/Apt19", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-20"] = { ["pos"] = vector4(-210.04006958008, -1607.166015625, 38.049308776855, 273.3283996582), ["street"] = "Forum Drive 9/Apt20", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd9-21"] = { ["pos"] = vector4(-208.71003723145, -1600.6431884766, 38.049308776855, 258.51733398438), ["street"] = "Forum Drive 9/Apt21", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd10-1"] = { ["pos"] = vector4(-173.7857208252, -1547.2521972656, 35.12731552124, 231.9022064209), ["street"] = "Forum Drive 10/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd10-2"] = { ["pos"] = vector4(-179.6558380127, -1554.34375, 35.12463760376, 229.87252807617), ["street"] = "Forum Drive 10/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd10-3"] = { ["pos"] = vector4(-187.23385620117, -1563.2825927734, 35.755142211914, 226.43968200684), ["street"] = "Forum Drive 10/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd10-4"] = { ["pos"] = vector4(-192.12760925293, -1559.7944335938, 34.954647064209, 134.98628234863), ["street"] = "Forum Drive 10/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd10-5"] = { ["pos"] = vector4(-196.16680908203, -1555.7495117188, 34.955455780029, 50.532958984375), ["street"] = "Forum Drive 10/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd10-6"] = { ["pos"] = vector4(-184.32119750977, -1539.4290771484, 34.359523773193, 54.141624450684), ["street"] = "Forum Drive 10/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd10-7"] = { ["pos"] = vector4(-180.10557556152, -1534.3549804688, 34.35767364502, 46.628040313721), ["street"] = "Forum Drive 10/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd10-8"] = { ["pos"] = vector4(-174.35328674316, -1528.7287597656, 34.35383605957, 324.43756103516), ["street"] = "Forum Drive 10/Apt8", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd10-9"] = { ["pos"] = vector4(-167.44271850586, -1534.5874023438, 35.099308013916, 320.21292114258), ["street"] = "Forum Drive 10/Apt9", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd10-10"] = { ["pos"] = vector4(-173.68717956543, -1547.2239990234, 38.334316253662, 230.96022033691), ["street"] = "Forum Drive 10/Apt10", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd10-11"] = { ["pos"] = vector4(-179.6439666748, -1554.2277832031, 38.330867767334, 227.80668640137), ["street"] = "Forum Drive 10/Apt11", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd10-12"] = { ["pos"] = vector4(-186.86424255371, -1562.845703125, 39.130310058594, 215.95974731445), ["street"] = "Forum Drive 10/Apt12", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd10-13"] = { ["pos"] = vector4(-188.5952911377, -1562.7546386719, 39.132881164551, 131.16847229004), ["street"] = "Forum Drive 10/Apt13", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd10-14"] = { ["pos"] = vector4(-192.08027648926, -1559.8435058594, 38.335048675537, 132.12875366211), ["street"] = "Forum Drive 10/Apt14", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd10-15"] = { ["pos"] = vector4(-196.19245910645, -1555.8243408203, 38.334999084473, 43.047676086426), ["street"] = "Forum Drive 10/Apt15", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd10-16"] = { ["pos"] = vector4(-184.41857910156, -1539.4937744141, 37.53503036499, 49.792041778564), ["street"] = "Forum Drive 10/Apt16", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd10-17"] = { ["pos"] = vector4(-180.00186157227, -1534.2301025391, 37.53503036499, 49.24828338623), ["street"] = "Forum Drive 10/Apt17", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd10-18"] = { ["pos"] = vector4(-174.54707336426, -1528.7135009766, 37.53503036499, 319.49914550781), ["street"] = "Forum Drive 10/Apt18", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd10-19"] = { ["pos"] = vector4(-167.34927368164, -1534.5784912109, 38.329814910889, 319.75393676758), ["street"] = "Forum Drive 10/Apt19", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd11-1"] = { ["pos"] = vector4(-112.72468566895, -1479.4575195313, 33.82266998291, 231.560546875), ["street"] = "Forum Drive 11/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd11-2"] = { ["pos"] = vector4(-107.51232910156, -1473.4644775391, 33.822719573975, 228.99778747559), ["street"] = "Forum Drive 11/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd11-3"] = { ["pos"] = vector4(-113.51965332031, -1467.6810302734, 33.822601318359, 320.60818481445), ["street"] = "Forum Drive 11/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd11-4"] = { ["pos"] = vector4(-122.87718963623, -1459.8271484375, 33.822723388672, 321.09927368164), ["street"] = "Forum Drive 11/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd11-5"] = { ["pos"] = vector4(-126.67626953125, -1456.4996337891, 34.616382598877, 322.74719238281), ["street"] = "Forum Drive 11/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd11-6"] = { ["pos"] = vector4(-132.36267089844, -1462.7883300781, 33.822666168213, 52.73006439209), ["street"] = "Forum Drive 11/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd11-7"] = { ["pos"] = vector4(-125.86991119385, -1473.7374267578, 33.822662353516, 140.55352783203), ["street"] = "Forum Drive 11/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd11-8"] = { ["pos"] = vector4(-120.20986175537, -1478.4034423828, 33.822719573975, 138.56091308594), ["street"] = "Forum Drive 11/Apt8", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd11-9"] = { ["pos"] = vector4(-119.38134002686, -1486.3859863281, 36.982070922852, 140.83039855957), ["street"] = "Forum Drive 11/Apt9", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd11-10"] = { ["pos"] = vector4(-112.63414764404, -1479.4250488281, 36.992160797119, 233.37567138672), ["street"] = "Forum Drive 11/Apt10", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd11-11"] = { ["pos"] = vector4(-107.6005859375, -1473.4937744141, 36.992160797119, 231.62178039551), ["street"] = "Forum Drive 11/Apt11", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd11-12"] = { ["pos"] = vector4(-113.22880554199, -1467.8388671875, 36.99214553833, 318.75512695313), ["street"] = "Forum Drive 11/Apt12", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd11-13"] = { ["pos"] = vector4(-122.79693603516, -1459.8869628906, 36.99214553833, 321.51876831055), ["street"] = "Forum Drive 11/Apt13", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd11-14"] = { ["pos"] = vector4(-127.63003540039, -1456.9655761719, 37.791904449463, 48.941715240479), ["street"] = "Forum Drive 11/Apt14", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd11-15"] = { ["pos"] = vector4(-132.44645690918, -1462.7554931641, 36.992149353027, 47.501567840576), ["street"] = "Forum Drive 11/Apt15", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd11-16"] = { ["pos"] = vector4(-138.25605773926, -1470.7712402344, 36.992141723633, 139.05941772461), ["street"] = "Forum Drive 11/Apt16", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd11-17"] = { ["pos"] = vector4(-125.97552490234, -1473.6989746094, 36.992092132568, 140.04263305664), ["street"] = "Forum Drive 11/Apt17", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd11-18"] = { ["pos"] = vector4(-120.18410491943, -1478.6143798828, 36.992095947266, 134.34965515137), ["street"] = "Forum Drive 11/Apt18", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd12-1"] = { ["pos"] = vector4(-77.723487854004, -1515.1479492188, 34.245307922363, 48.911598205566), ["street"] = "Forum Drive 12/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd12-2"] = { ["pos"] = vector4(-71.763893127441, -1508.1345214844, 33.436134338379, 48.059135437012), ["street"] = "Forum Drive 12/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd12-3"] = { ["pos"] = vector4(-65.006324768066, -1512.9553222656, 33.436134338379, 322.20092773438), ["street"] = "Forum Drive 12/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd12-4"] = { ["pos"] = vector4(-60.138416290283, -1517.1823730469, 33.436138153076, 312.02185058594), ["street"] = "Forum Drive 12/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd12-5"] = { ["pos"] = vector4(-53.382068634033, -1523.8607177734, 33.436115264893, 234.19683837891), ["street"] = "Forum Drive 12/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd12-6"] = { ["pos"] = vector4(-59.325214385986, -1530.6306152344, 34.235218048096, 226.20018005371), ["street"] = "Forum Drive 12/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd12-7"] = { ["pos"] = vector4(-62.294364929199, -1532.6306152344, 34.235218048096, 135.44757080078), ["street"] = "Forum Drive 12/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd12-8"] = { ["pos"] = vector4(-69.381317138672, -1526.6756591797, 34.235229492188, 130.77758789063), ["street"] = "Forum Drive 12/Apt8", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd12-9"] = { ["pos"] = vector4(-77.687812805176, -1515.162109375, 37.419578552246, 50.930805206299), ["street"] = "Forum Drive 12/Apt9", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd12-10"] = { ["pos"] = vector4(-71.804237365723, -1508.0815429688, 36.62491607666, 39.317440032959), ["street"] = "Forum Drive 12/Apt10", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd12-11"] = { ["pos"] = vector4(-65.139373779297, -1512.8406982422, 36.62491607666, 319.68286132813), ["street"] = "Forum Drive 12/Apt11", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd12-12"] = { ["pos"] = vector4(-59.986389160156, -1517.1474609375, 36.624908447266, 320.54833984375), ["street"] = "Forum Drive 12/Apt12", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd12-13"] = { ["pos"] = vector4(-53.220180511475, -1523.6704101563, 36.624908447266, 221.58871459961), ["street"] = "Forum Drive 12/Apt13", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd12-14"] = { ["pos"] = vector4(-59.208637237549, -1530.8282470703, 37.419616699219, 226.73208618164), ["street"] = "Forum Drive 12/Apt14", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd12-15"] = { ["pos"] = vector4(-62.296951293945, -1532.6276855469, 37.419616699219, 131.37631225586), ["street"] = "Forum Drive 12/Apt15", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd12-16"] = { ["pos"] = vector4(-69.316970825195, -1526.7349853516, 37.419616699219, 140.93304443359), ["street"] = "Forum Drive 12/Apt16", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd13-1"] = { ["pos"] = vector4(-35.757152557373, -1555.2116699219, 30.676759719849, 142.88516235352), ["street"] = "Forum Drive 13/Apt1", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd13-2"] = { ["pos"] = vector4(-44.580307006836, -1547.0203857422, 31.448577880859, 53.222694396973), ["street"] = "Forum Drive 13/Apt2", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd13-3"] = { ["pos"] = vector4(-36.131866455078, -1536.9438476563, 31.450687408447, 54.244045257568), ["street"] = "Forum Drive 13/Apt3", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd13-4"] = { ["pos"] = vector4(-26.496437072754, -1544.2133789063, 30.676733016968, 318.06298828125), ["street"] = "Forum Drive 13/Apt4", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd13-5"] = { ["pos"] = vector4(-19.670139312744, -1550.7504882813, 30.676734924316, 234.01092529297), ["street"] = "Forum Drive 13/Apt5", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd13-6"] = { ["pos"] = vector4(-24.824083328247, -1556.8966064453, 30.68684387207, 227.75440979004), ["street"] = "Forum Drive 13/Apt6", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd13-7"] = { ["pos"] = vector4(-33.567462921143, -1567.3110351563, 33.021366119385, 236.11221313477), ["street"] = "Forum Drive 13/Apt7", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd13-8"] = { ["pos"] = vector4(-35.766304016113, -1555.2552490234, 33.821392059326, 140.12403869629), ["street"] = "Forum Drive 13/Apt8", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd13-9"] = { ["pos"] = vector4(-44.499771118164, -1547.076171875, 34.621417999268, 48.699066162109), ["street"] = "Forum Drive 13/Apt9", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd13-10"] = { ["pos"] = vector4(-36.059722900391, -1536.9479980469, 34.621417999268, 46.637901306152), ["street"] = "Forum Drive 13/Apt10", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd13-11"] = { ["pos"] = vector4(-26.500473022461, -1544.3212890625, 33.821434020996, 326.53573608398), ["street"] = "Forum Drive 13/Apt11", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd13-12"] = { ["pos"] = vector4(-13.9848985672, -1543.9772949219, 33.173057556152, 228.85498046875), ["street"] = "Forum Drive 13/Apt12", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd13-13"] = { ["pos"] = vector4(-19.831258773804, -1550.9417724609, 33.821426391602, 231.55278015137), ["street"] = "Forum Drive 13/Apt13", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
["fd13-14"] = { ["pos"] = vector4(-28.21773147583, -1560.9443359375, 33.821426391602, 225.16987609863), ["street"] = "Forum Drive 13/Apt14", ["model"] = "v_int_49_empty", ["price"] = 400, ["enabled"] = true },
-- STAWBERRY HOOD --
["shb1-1"] = { ["pos"] = vector4(58.61, -1637.78, 29.24, 50.21), ["street"] = "Strawberry B1/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb1-2"] = { ["pos"] = vector4(59.75, -1636.38, 29.24, 47.2), ["street"] = "Strawberry B1/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb1-3"] = { ["pos"] = vector4(65.35, -1629.78, 29.24, 49.07), ["street"] = "Strawberry B1/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb1-4"] = { ["pos"] = vector4(71.85, -1622.11, 29.24, 52.08), ["street"] = "Strawberry B1/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb1-5"] = { ["pos"] = vector4(73.04, -1620.54, 29.24, 48.73), ["street"] = "Strawberry B1/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb1-6"] = { ["pos"] = vector4(66.76, -1613.35, 29.25, 233.44), ["street"] = "Strawberry B1/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb1-7"] = { ["pos"] = vector4(62.67, -1618.27, 29.26, 233.44), ["street"] = "Strawberry B1/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb1-8"] = { ["pos"] = vector4(60.36, -1620.94, 29.26, 227.77), ["street"] = "Strawberry B1/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb1-9"] = { ["pos"] = vector4(56.41, -1625.8, 29.26, 229.85), ["street"] = "Strawberry B1/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb1-10"] = { ["pos"] = vector4(54.07, -1628.49, 29.26, 227.54), ["street"] = "Strawberry B1/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb1-11"] = { ["pos"] = vector4(50.15, -1633.26, 29.26, 225.08), ["street"] = "Strawberry B1/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb2-1"] = { ["pos"] = vector4(39.92, -1624.07, 29.29, 47.85), ["street"] = "Strawberry B2/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb2-2"] = { ["pos"] = vector4(41.12, -1622.52, 29.3, 43.94), ["street"] = "Strawberry B2/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb2-3"] = { ["pos"] = vector4(46.73, -1615.95, 29.32, 52.1), ["street"] = "Strawberry B2/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb2-4"] = { ["pos"] = vector4(53.21, -1608.15, 29.32, 55.79), ["street"] = "Strawberry B2/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb2-5"] = { ["pos"] = vector4(54.43, -1606.83, 29.32, 44.74), ["street"] = "Strawberry B2/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb2-6"] = { ["pos"] = vector4(48.17, -1599.56, 29.37, 216.96), ["street"] = "Strawberry B2/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb2-7"] = { ["pos"] = vector4(44.12, -1604.34, 29.35, 230.57), ["street"] = "Strawberry B2/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb2-8"] = { ["pos"] = vector4(41.81, -1606.99, 29.35, 231.1), ["street"] = "Strawberry B2/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb2-9"] = { ["pos"] = vector4(37.74, -1611.83, 29.33, 212.99), ["street"] = "Strawberry B2/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb2-10"] = { ["pos"] = vector4(35.48, -1614.68, 29.32, 218.58), ["street"] = "Strawberry B2/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb2-11"] = { ["pos"] = vector4(31.44, -1619.51, 29.3, 238.66), ["street"] = "Strawberry B2/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb3-1"] = { ["pos"] = vector4(18.7, -1605.82, 29.34, 45.97), ["street"] = "Strawberry B3/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb3-2"] = { ["pos"] = vector4(19.88, -1604.36, 29.35, 40.36), ["street"] = "Strawberry B3/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb3-3"] = { ["pos"] = vector4(25.48, -1597.85, 29.37, 43.8), ["street"] = "Strawberry B3/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb3-4"] = { ["pos"] = vector4(32.03, -1589.89, 29.4, 52.38), ["street"] = "Strawberry B3/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb3-5"] = { ["pos"] = vector4(33.19, -1588.65, 29.4, 40.27), ["street"] = "Strawberry B3/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb3-6"] = { ["pos"] = vector4(26.89, -1581.39, 29.42, 225.72), ["street"] = "Strawberry B3/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb3-7"] = { ["pos"] = vector4(22.79, -1586.3, 29.4, 236.75), ["street"] = "Strawberry B3/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb3-8"] = { ["pos"] = vector4(20.46, -1589.05, 29.39, 236.37), ["street"] = "Strawberry B3/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb3-9"] = { ["pos"] = vector4(16.45, -1593.81, 29.38, 235.83), ["street"] = "Strawberry B3/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb3-10"] = { ["pos"] = vector4(14.18, -1596.6, 29.37, 221.94), ["street"] = "Strawberry B3/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb3-11"] = { ["pos"] = vector4(10.19, -1601.34, 29.35, 219.31), ["street"] = "Strawberry B3/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb4-1"] = { ["pos"] = vector4(100.17, -1592.83, 29.24, 47.83), ["street"] = "Strawberry B4/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb4-2"] = { ["pos"] = vector4(101.43, -1591.38, 29.24, 49.64), ["street"] = "Strawberry B4/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb4-3"] = { ["pos"] = vector4(106.96, -1584.85, 29.24, 50.7), ["street"] = "Strawberry B4/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb4-4"] = { ["pos"] = vector4(113.48, -1576.95, 29.24, 50.78), ["street"] = "Strawberry B4/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb4-5"] = { ["pos"] = vector4(114.58, -1575.77, 29.24, 47.19), ["street"] = "Strawberry B4/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb4-6"] = { ["pos"] = vector4(108.32, -1568.38, 29.24, 232.64), ["street"] = "Strawberry B4/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb4-7"] = { ["pos"] = vector4(104.39, -1573.06, 29.24, 220.04), ["street"] = "Strawberry B4/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb4-8"] = { ["pos"] = vector4(101.9, -1576.02, 29.24, 230.32), ["street"] = "Strawberry B4/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb4-9"] = { ["pos"] = vector4(97.94, -1580.8, 29.24, 230.55), ["street"] = "Strawberry B4/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb4-10"] = { ["pos"] = vector4(95.66, -1583.46, 29.24, 314.19), ["street"] = "Strawberry B4/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb4-11"] = { ["pos"] = vector4(91.46, -1588.46, 29.24, 263.7), ["street"] = "Strawberry B4/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb5-1"] = { ["pos"] = vector4(83.4, -1578.57, 29.29, 51.93), ["street"] = "Strawberry B5/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb5-2"] = { ["pos"] = vector4(84.54, -1577.23, 29.29, 43.07), ["street"] = "Strawberry B5/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb5-3"] = { ["pos"] = vector4(90.04, -1570.52, 29.28, 50.78), ["street"] = "Strawberry B5/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb5-4"] = { ["pos"] = vector4(96.52, -1562.94, 29.28, 52.36), ["street"] = "Strawberry B5/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb5-5"] = { ["pos"] = vector4(97.77, -1561.46, 29.28, 48.78), ["street"] = "Strawberry B5/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb5-6"] = { ["pos"] = vector4(91.47, -1554.1, 29.32, 234.26), ["street"] = "Strawberry B5/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb5-7"] = { ["pos"] = vector4(87.41, -1558.94, 29.33, 222.05), ["street"] = "Strawberry B5/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb5-8"] = { ["pos"] = vector4(85.13, -1561.66, 29.33, 190.9), ["street"] = "Strawberry B5/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb5-9"] = { ["pos"] = vector4(81.15, -1566.56, 29.33, 216.77), ["street"] = "Strawberry B5/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb5-10"] = { ["pos"] = vector4(78.77, -1569.32, 29.33, 207.66), ["street"] = "Strawberry B5/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb5-11"] = { ["pos"] = vector4(74.7, -1574.14, 29.34, 228.34), ["street"] = "Strawberry B5/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb6-1"] = { ["pos"] = vector4(62.04, -1560.56, 29.43, 47.26), ["street"] = "Strawberry B6/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb6-2"] = { ["pos"] = vector4(63.36, -1558.98, 29.43, 39.22), ["street"] = "Strawberry B6/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb6-3"] = { ["pos"] = vector4(68.82, -1552.44, 29.44, 51.74), ["street"] = "Strawberry B6/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb6-4"] = { ["pos"] = vector4(75.31, -1544.68, 29.51, 53.02), ["street"] = "Strawberry B6/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb6-5"] = { ["pos"] = vector4(76.42, -1543.31, 29.51, 49.84), ["street"] = "Strawberry B6/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb6-6"] = { ["pos"] = vector4(70.23, -1536.01, 29.51, 228.27), ["street"] = "Strawberry B6/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb6-7"] = { ["pos"] = vector4(66.12, -1540.83, 29.51, 228.67), ["street"] = "Strawberry B6/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb6-8"] = { ["pos"] = vector4(63.96, -1543.55, 29.51, 225.52), ["street"] = "Strawberry B6/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb6-9"] = { ["pos"] = vector4(59.82, -1548.4, 29.51, 241.3), ["street"] = "Strawberry B6/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb6-10"] = { ["pos"] = vector4(57.55, -1551.13, 29.51, 224.37), ["street"] = "Strawberry B6/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb6-11"] = { ["pos"] = vector4(53.52, -1555.96, 29.48, 235.92), ["street"] = "Strawberry B6/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb7-1"] = { ["pos"] = vector4(196.02, -1561.0, 29.42, 22.64), ["street"] = "Strawberry B7/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb7-2"] = { ["pos"] = vector4(200.27, -1558.51, 29.42, 27.41), ["street"] = "Strawberry B7/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb7-3"] = { ["pos"] = vector4(208.45, -1553.88, 29.42, 26.26), ["street"] = "Strawberry B7/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb7-4"] = { ["pos"] = vector4(210.12, -1552.84, 29.42, 28.56), ["street"] = "Strawberry B7/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb7-5"] = { ["pos"] = vector4(207.36, -1542.43, 29.3, 204.6), ["street"] = "Strawberry B7/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb7-6"] = { ["pos"] = vector4(201.32, -1546.02, 29.3, 212.32), ["street"] = "Strawberry B7/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb7-7"] = { ["pos"] = vector4(197.77, -1548.07, 29.31, 208.5), ["street"] = "Strawberry B7/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb7-8"] = { ["pos"] = vector4(190.27, -1555.23, 29.3, 301.99), ["street"] = "Strawberry B7/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb8-1"] = { ["pos"] = vector4(227.43, -1544.38, 29.63, 32.45), ["street"] = "Strawberry B8/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb8-2"] = { ["pos"] = vector4(233.34, -1540.88, 29.63, 29.73), ["street"] = "Strawberry B8/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb8-3"] = { ["pos"] = vector4(236.77, -1538.85, 29.63, 23.87), ["street"] = "Strawberry B8/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb8-4"] = { ["pos"] = vector4(242.68, -1535.45, 29.63, 25.07), ["street"] = "Strawberry B8/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb8-5"] = { ["pos"] = vector4(246.23, -1533.39, 29.63, 19.14), ["street"] = "Strawberry B8/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb8-6"] = { ["pos"] = vector4(252.19, -1529.84, 29.63, 27.36), ["street"] = "Strawberry B8/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb8-7"] = { ["pos"] = vector4(245.1, -1521.96, 29.62, 209.02), ["street"] = "Strawberry B8/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb8-8"] = { ["pos"] = vector4(243.37, -1523.07, 29.62, 208.34), ["street"] = "Strawberry B8/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb8-9"] = { ["pos"] = vector4(235.05, -1527.76, 29.62, 213.23), ["street"] = "Strawberry B8/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb8-10"] = { ["pos"] = vector4(225.5, -1533.32, 29.62, 206.75), ["street"] = "Strawberry B8/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb8-11"] = { ["pos"] = vector4(223.75, -1534.32, 29.62, 208.34), ["street"] = "Strawberry B8/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb9-1"] = { ["pos"] = vector4(228.82, -1496.75, 29.3, 318.52), ["street"] = "Strawberry B9/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb9-2"] = { ["pos"] = vector4(233.97, -1501.19, 29.3, 319.48), ["street"] = "Strawberry B9/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb9-3"] = { ["pos"] = vector4(237.17, -1503.76, 29.3, 312.89), ["street"] = "Strawberry B9/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb9-4"] = { ["pos"] = vector4(246.55, -1508.48, 29.32, 42.44), ["street"] = "Strawberry B9/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb9-5"] = { ["pos"] = vector4(250.03, -1501.01, 29.42, 146.84), ["street"] = "Strawberry B9/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb9-6"] = { ["pos"] = vector4(246.37, -1497.94, 29.42, 134.05), ["street"] = "Strawberry B9/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb9-7"] = { ["pos"] = vector4(238.95, -1491.82, 29.42, 150.41), ["street"] = "Strawberry B9/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb9-8"] = { ["pos"] = vector4(237.64, -1490.61, 29.42, 137.93), ["street"] = "Strawberry B9/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb10-1"] = { ["pos"] = vector4(206.84, -1506.87, 29.62, 227.69), ["street"] = "Strawberry B10/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb10-2"] = { ["pos"] = vector4(205.45, -1508.65, 29.62, 231.53), ["street"] = "Strawberry B10/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb10-3"] = { ["pos"] = vector4(199.44, -1515.83, 29.62, 232.01), ["street"] = "Strawberry B10/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb10-4"] = { ["pos"] = vector4(192.25, -1524.41, 29.62, 232.01), ["street"] = "Strawberry B10/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb10-5"] = { ["pos"] = vector4(190.93, -1525.99, 29.62, 231.22), ["street"] = "Strawberry B10/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb10-6"] = { ["pos"] = vector4(197.71, -1533.89, 29.63, 53.09), ["street"] = "Strawberry B10/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb10-7"] = { ["pos"] = vector4(202.18, -1528.71, 29.63, 38.89), ["street"] = "Strawberry B10/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb10-8"] = { ["pos"] = vector4(204.66, -1525.64, 29.63, 48.68), ["street"] = "Strawberry B10/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb10-9"] = { ["pos"] = vector4(209.1, -1520.32, 29.63, 45.21), ["street"] = "Strawberry B10/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb10-10"] = { ["pos"] = vector4(211.73, -1517.33, 29.63, 42.43), ["street"] = "Strawberry B10/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb10-11"] = { ["pos"] = vector4(216.38, -1511.79, 29.63, 66.27), ["street"] = "Strawberry B10/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb11-1"] = { ["pos"] = vector4(176.55, -1542.54, 29.62, 230.34), ["street"] = "Strawberry B11/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb11-2"] = { ["pos"] = vector4(175.44, -1544.0, 29.62, 225.17), ["street"] = "Strawberry B11/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb11-3"] = { ["pos"] = vector4(169.36, -1551.26, 29.62, 229.91), ["street"] = "Strawberry B11/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb11-4"] = { ["pos"] = vector4(162.0, -1560.02, 29.62, 238.3), ["street"] = "Strawberry B11/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb11-5"] = { ["pos"] = vector4(160.95, -1561.28, 29.62, 231.48), ["street"] = "Strawberry B11/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb11-6"] = { ["pos"] = vector4(167.67, -1569.4, 29.63, 56.16), ["street"] = "Strawberry B11/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb11-7"] = { ["pos"] = vector4(172.11, -1563.99, 29.63, 58.4), ["street"] = "Strawberry B11/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb11-8"] = { ["pos"] = vector4(174.61, -1561.06, 29.63, 49.01), ["street"] = "Strawberry B11/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb11-9"] = { ["pos"] = vector4(178.94, -1555.84, 29.63, 35.98), ["street"] = "Strawberry B11/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb11-10"] = { ["pos"] = vector4(181.63, -1552.78, 29.63, 39.66), ["street"] = "Strawberry B11/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb11-11"] = { ["pos"] = vector4(186.03, -1547.4, 29.63, 45.76), ["street"] = "Strawberry B11/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb12-1"] = { ["pos"] = vector4(149.69, -1532.16, 29.42, 50.47), ["street"] = "Strawberry B12/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb12-2"] = { ["pos"] = vector4(152.69, -1528.55, 29.42, 46.36), ["street"] = "Strawberry B12/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb12-3"] = { ["pos"] = vector4(158.83, -1521.25, 29.42, 51.37), ["street"] = "Strawberry B12/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb12-4"] = { ["pos"] = vector4(160.07, -1519.76, 29.42, 42.27), ["street"] = "Strawberry B12/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb12-5"] = { ["pos"] = vector4(153.86, -1511.01, 29.3, 230.26), ["street"] = "Strawberry B12/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb12-6"] = { ["pos"] = vector4(149.52, -1516.33, 29.3, 232.56), ["street"] = "Strawberry B12/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb12-7"] = { ["pos"] = vector4(146.89, -1519.32, 29.3, 221.89), ["street"] = "Strawberry B12/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb12-8"] = { ["pos"] = vector4(142.35, -1528.8, 29.38, 320.16), ["street"] = "Strawberry B12/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb13-1"] = { ["pos"] = vector4(135.83, -1532.04, 29.37, 133.32), ["street"] = "Strawberry B13/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb13-2"] = { ["pos"] = vector4(134.33, -1530.85, 29.38, 135.81), ["street"] = "Strawberry B13/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb13-3"] = { ["pos"] = vector4(127.02, -1524.66, 29.35, 138.46), ["street"] = "Strawberry B13/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb13-4"] = { ["pos"] = vector4(118.22, -1517.26, 29.35, 138.73), ["street"] = "Strawberry B13/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb13-5"] = { ["pos"] = vector4(116.79, -1516.19, 29.35, 152.71), ["street"] = "Strawberry B13/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb13-6"] = { ["pos"] = vector4(108.79, -1523.03, 29.39, 319.74), ["street"] = "Strawberry B13/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb13-7"] = { ["pos"] = vector4(114.17, -1527.53, 29.36, 319.35), ["street"] = "Strawberry B13/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb13-8"] = { ["pos"] = vector4(117.26, -1530.15, 29.36, 322.66), ["street"] = "Strawberry B13/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb13-9"] = { ["pos"] = vector4(122.53, -1534.43, 29.36, 320.09), ["street"] = "Strawberry B13/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb13-10"] = { ["pos"] = vector4(125.61, -1537.01, 29.36, 322.69), ["street"] = "Strawberry B13/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb13-11"] = { ["pos"] = vector4(130.99, -1541.68, 29.4, 326.15), ["street"] = "Strawberry B13/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb14-1"] = { ["pos"] = vector4(106.22, -1507.88, 29.63, 50.77), ["street"] = "Strawberry B14/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb14-2"] = { ["pos"] = vector4(110.68, -1502.63, 29.63, 49.1), ["street"] = "Strawberry B14/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb14-3"] = { ["pos"] = vector4(113.29, -1499.32, 29.63, 55.76), ["street"] = "Strawberry B14/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb14-4"] = { ["pos"] = vector4(117.58, -1494.34, 29.63, 49.55), ["street"] = "Strawberry B14/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb14-5"] = { ["pos"] = vector4(120.25, -1491.15, 29.63, 44.59), ["street"] = "Strawberry B14/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb14-6"] = { ["pos"] = vector4(124.7, -1485.84, 29.63, 58.93), ["street"] = "Strawberry B14/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb14-7"] = { ["pos"] = vector4(115.24, -1480.95, 29.62, 235.16), ["street"] = "Strawberry B14/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb14-8"] = { ["pos"] = vector4(114.03, -1482.43, 29.62, 229.72), ["street"] = "Strawberry B14/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb14-9"] = { ["pos"] = vector4(107.9, -1489.59, 29.62, 225.65), ["street"] = "Strawberry B14/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb14-10"] = { ["pos"] = vector4(100.62, -1498.4, 29.62, 228.1), ["street"] = "Strawberry B14/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb14-11"] = { ["pos"] = vector4(99.48, -1499.75, 29.62, 229.72), ["street"] = "Strawberry B14/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb15-1"] = { ["pos"] = vector4(134.84, -1472.99, 29.45, 48.35), ["street"] = "Strawberry B15/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb15-2"] = { ["pos"] = vector4(136.14, -1471.32, 29.45, 55.32), ["street"] = "Strawberry B15/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb15-3"] = { ["pos"] = vector4(142.13, -1464.16, 29.45, 49.78), ["street"] = "Strawberry B15/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb15-4"] = { ["pos"] = vector4(149.43, -1455.46, 29.45, 46.32), ["street"] = "Strawberry B15/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb15-5"] = { ["pos"] = vector4(150.61, -1454.06, 29.45, 49.86), ["street"] = "Strawberry B15/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb15-6"] = { ["pos"] = vector4(143.91, -1445.98, 29.46, 229.58), ["street"] = "Strawberry B15/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb15-7"] = { ["pos"] = vector4(139.49, -1451.17, 29.46, 224.86), ["street"] = "Strawberry B15/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb15-8"] = { ["pos"] = vector4(136.91, -1454.23, 29.46, 210.61), ["street"] = "Strawberry B15/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb15-9"] = { ["pos"] = vector4(132.31, -1459.73, 29.46, 233.57), ["street"] = "Strawberry B15/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb15-10"] = { ["pos"] = vector4(129.81, -1462.7, 29.46, 231.25), ["street"] = "Strawberry B15/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb15-11"] = { ["pos"] = vector4(125.44, -1468.05, 29.46, 237.08), ["street"] = "Strawberry B15/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb16-1"] = { ["pos"] = vector4(167.79, -1442.72, 29.17, 317.56), ["street"] = "Strawberry B16/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb16-2"] = { ["pos"] = vector4(169.5, -1444.03, 29.18, 317.45), ["street"] = "Strawberry B16/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb16-3"] = { ["pos"] = vector4(176.63, -1450.15, 29.1, 316.55), ["street"] = "Strawberry B16/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb16-4"] = { ["pos"] = vector4(185.41, -1457.42, 29.3, 327.65), ["street"] = "Strawberry B16/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb16-5"] = { ["pos"] = vector4(186.79, -1458.57, 29.3, 320.24), ["street"] = "Strawberry B16/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb16-6"] = { ["pos"] = vector4(194.66, -1451.73, 29.3, 149.98), ["street"] = "Strawberry B16/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb16-7"] = { ["pos"] = vector4(189.44, -1447.35, 29.3, 144.9), ["street"] = "Strawberry B16/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb16-8"] = { ["pos"] = vector4(186.36, -1444.68, 29.3, 150.74), ["street"] = "Strawberry B16/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb16-9"] = { ["pos"] = vector4(181.24, -1440.44, 29.17, 142.6), ["street"] = "Strawberry B16/Apt 9", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb16-10"] = { ["pos"] = vector4(178.19, -1437.87, 29.11, 131.76), ["street"] = "Strawberry B16/Apt 10", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb16-11"] = { ["pos"] = vector4(172.75, -1433.32, 29.25, 150.47), ["street"] = "Strawberry B16/Apt 11", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb17-1"] = { ["pos"] = vector4(191.79, -1467.07, 29.41, 232.03), ["street"] = "Strawberry B17/Apt 1", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb17-2"] = { ["pos"] = vector4(187.51, -1472.16, 29.37, 229.85), ["street"] = "Strawberry B17/Apt 2", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb17-3"] = { ["pos"] = vector4(184.84, -1475.34, 29.35, 225.6), ["street"] = "Strawberry B17/Apt 3", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb17-4"] = { ["pos"] = vector4(180.27, -1484.67, 29.14, 319.25), ["street"] = "Strawberry B17/Apt 4", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb17-5"] = { ["pos"] = vector4(187.65, -1488.27, 29.38, 50.12), ["street"] = "Strawberry B17/Apt 5", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb17-6"] = { ["pos"] = vector4(190.77, -1484.4, 29.38, 42.56), ["street"] = "Strawberry B17/Apt 6", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb17-7"] = { ["pos"] = vector4(196.99, -1477.15, 29.38, 52.85), ["street"] = "Strawberry B17/Apt 7", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
["shb17-8"] = { ["pos"] = vector4(198.1, -1475.67, 29.38, 47.14), ["street"] = "Strawberry B17/Apt 8", ["model"] = "v_int_16_low", ["price"] = 550, ["enabled"] = true },
-- DEL PERRO BEACH --
["dpf-1"] = { ["pos"] = vector4(-1977.82, -509.27, 11.85, 231.84), ["street"] = "Del Perro Freeway 1", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-2"] = { ["pos"] = vector4(-1965.22, -510.30, 11.83, 152.42), ["street"] = "Del Perro Freeway 2", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-3"] = { ["pos"] = vector4(-1957.88, -528.17, 12.18, 54.403), ["street"] = "Del Perro Freeway 3", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-4"] = { ["pos"] = vector4(-1950.19, -523.08, 11.84, 149.81), ["street"] = "Del Perro Freeway 4", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-5"] = { ["pos"] = vector4(-1940.99, -531.93, 11.84, 138.69), ["street"] = "Del Perro Freeway 5", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-6"] = { ["pos"] = vector4(-1934.81, -536.53, 11.83, 139.84), ["street"] = "Del Perro Freeway 6", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-7"] = { ["pos"] = vector4(-1909.07, -553.50, 11.83, 142.84), ["street"] = "Del Perro Freeway 7", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-8"] = { ["pos"] = vector4(-1898.49, -572.40, 11.84, 52.600), ["street"] = "Del Perro Freeway 8", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-9"] = { ["pos"] = vector4(-1890.00, -572.54, 11.81, 147.80), ["street"] = "Del Perro Freeway 9", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-10"] = { ["pos"] = vector4(-1883.31, -579.02, 11.85, 139.97), ["street"] = "Del Perro Freeway 10", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-11"] = { ["pos"] = vector4(-1876.77, -584.48, 11.85, 136.30), ["street"] = "Del Perro Freeway 11", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-12"] = { ["pos"] = vector4(-1869.42, -590.60, 11.86, 127.95), ["street"] = "Del Perro Freeway 12", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-13"] = { ["pos"] = vector4(-1835.08, -618.10, 10.97, 143.22), ["street"] = "Del Perro Freeway 13", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-14"] = { ["pos"] = vector4(-1828.25, -626.59, 11.01, 142.47), ["street"] = "Del Perro Freeway 14", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-15"] = { ["pos"] = vector4(-1816.81, -636.83, 10.93, 131.67), ["street"] = "Del Perro Freeway 15", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-16"] = { ["pos"] = vector4(-1808.37, -644.63, 10.93, 138.04), ["street"] = "Del Perro Freeway 16", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-17"] = { ["pos"] = vector4(-1798.54, -649.33, 10.96, 131.14), ["street"] = "Del Perro Freeway 17", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-18"] = { ["pos"] = vector4(-1793.41, -663.93, 10.60, 318.29), ["street"] = "Del Perro Freeway 18", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-19"] = { ["pos"] = vector4(-1781.06, -679.57, 10.65, 49.509), ["street"] = "Del Perro Freeway 19", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-20"] = { ["pos"] = vector4(-1771.01, -677.48, 10.38, 145.24), ["street"] = "Del Perro Freeway 20", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-21"] = { ["pos"] = vector4(-1761.41, -686.56, 10.13, 135.25), ["street"] = "Del Perro Freeway 21", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-22"] = { ["pos"] = vector4(-1756.25, -692.62, 10.14, 145.54), ["street"] = "Del Perro Freeway 22", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
["dpf-23"] = { ["pos"] = vector4(-1754.12, -708.93, 10.39, 224.50), ["street"] = "Del Perro Freeway 23", ["model"] = "v_int_61", ["price"] = 700, ["enabled"] = true },
-- VESPUCCI BEACH --
["vb-1"] = { ["pos"] = vector4(-1030.12, -1604.43, 5.09, 120.84), ["street"] = "Magellan Avenue 1", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-2"] = { ["pos"] = vector4(-1039.17, -1610.26, 5.11, 123.32), ["street"] = "Magellan Avenue 2", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-3"] = { ["pos"] = vector4(-1057.05, -1587.31, 4.60, 33.826), ["street"] = "Magellan Avenue 3", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-4"] = { ["pos"] = vector4(-1049.08, -1581.00, 4.98, 123.33), ["street"] = "Magellan Avenue 4", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-5"] = { ["pos"] = vector4(-1043.33, -1580.37, 5.03, 214.43), ["street"] = "Magellan Avenue 5", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-6"] = { ["pos"] = vector4(-1032.29, -1582.63, 5.26, 307.10), ["street"] = "Magellan Avenue 6", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-7"] = { ["pos"] = vector4(-1057.68, -1540.62, 5.04, 211.05), ["street"] = "Magellan Avenue 7", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-8"] = { ["pos"] = vector4(-1065.86, -1545.80, 4.90, 212.65), ["street"] = "Magellan Avenue 8", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-9"] = { ["pos"] = vector4(-1077.07, -1554.08, 4.62, 256.48), ["street"] = "Magellan Avenue 9", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-10"] = { ["pos"] = vector4(-1084.40, -1559.29, 4.78, 307.86), ["street"] = "Magellan Avenue 10", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-11"] = { ["pos"] = vector4(-1058.24, -1657.14, 4.67, 220.77), ["street"] = "Magellan Avenue 11", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-12"] = { ["pos"] = vector4(-1069.81, -1653.28, 4.41, 313.76), ["street"] = "Magellan Avenue 12", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-13"] = { ["pos"] = vector4(-1075.18, -1645.10, 4.50, 312.26), ["street"] = "Magellan Avenue 13", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-14"] = { ["pos"] = vector4(-1071.64, -1636.62, 8.19, 123.33), ["street"] = "Magellan Avenue 14", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-15"] = { ["pos"] = vector4(-1077.15, -1620.98, 4.47, 125.67), ["street"] = "Magellan Avenue 15", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-16"] = { ["pos"] = vector4(-1078.84, -1616.38, 4.42, 125.36), ["street"] = "Magellan Avenue 16", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-17"] = { ["pos"] = vector4(-1093.59, -1608.18, 8.45, 122.96), ["street"] = "Magellan Avenue 17", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-18"] = { ["pos"] = vector4(-1105.65, -1597.03, 4.61, 219.49), ["street"] = "Magellan Avenue 18", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-19"] = { ["pos"] = vector4(-1115.03, -1577.98, 4.54, 218.92), ["street"] = "Magellan Avenue 19", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-20"] = { ["pos"] = vector4(-1098.24, -1678.55, 4.35, 291.68), ["street"] = "Magellan Avenue 20", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-21"] = { ["pos"] = vector4(-1097.58, -1672.95, 8.39, 304.67), ["street"] = "Magellan Avenue 21", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-22"] = { ["pos"] = vector4(-1148.56, -1524.06, 10.6, 214.31), ["street"] = "Magellan Avenue 22", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-23"] = { ["pos"] = vector4(-1070.37, -1515.26, 5.30, 109.60), ["street"] = "Magellan Avenue 23", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-24"] = { ["pos"] = vector4(-1078.52, -1524.00, 5.08, 34.338), ["street"] = "Magellan Avenue 24", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-25"] = { ["pos"] = vector4(-1087.43, -1529.22, 4.69, 33.056), ["street"] = "Magellan Avenue 25", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-26"] = { ["pos"] = vector4(-1108.23, -1527.16, 6.77, 307.47), ["street"] = "Magellan Avenue 26", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-27"] = { ["pos"] = vector4(-1130.15, -1496.80, 4.42, 217.42), ["street"] = "Magellan Avenue 27", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-28"] = { ["pos"] = vector4(-1117.77, -1488.38, 4.73, 217.90), ["street"] = "Magellan Avenue 28", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-29"] = { ["pos"] = vector4(-1109.23, -1482.40, 4.92, 215.39), ["street"] = "Magellan Avenue 29", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-30"] = { ["pos"] = vector4(-1102.65, -1477.80, 5.28, 225.76), ["street"] = "Magellan Avenue 30", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-31"] = { ["pos"] = vector4(-1246.95, -1358.27, 7.82, 20.216), ["street"] = "Magellan Avenue 31", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-32"] = { ["pos"] = vector4(-1256.27, -1331.01, 4.08, 111.35), ["street"] = "Magellan Avenue 32", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-33"] = { ["pos"] = vector4(-1336.91, -1170.24, 4.56, 180.67), ["street"] = "Magellan Avenue 33", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-34"] = { ["pos"] = vector4(-1349.69, -1161.56, 4.50, 270.33), ["street"] = "Magellan Avenue 34", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-35"] = { ["pos"] = vector4(-1347.25, -1146.67, 4.53, 193.97), ["street"] = "Magellan Avenue 35", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-36"] = { ["pos"] = vector4(-1253.00, -1144.64, 8.51, 197.43), ["street"] = "Magellan Avenue 36", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-37"] = { ["pos"] = vector4(-1253.65, -1140.61, 8.56, 33.578), ["street"] = "Magellan Avenue 37", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-38"] = { ["pos"] = vector4(-1372.44, -901.260, 12.4, 216.45), ["street"] = "Magellan Avenue 38", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-39"] = { ["pos"] = vector4(-1010.27, -1532.31, 4.90, 216.85), ["street"] = "Bay City Avenue 1", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-40"] = { ["pos"] = vector4(-991.068, -1519.00, 4.90, 222.46), ["street"] = "Bay City Avenue 2", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-41"] = { ["pos"] = vector4(-1029.89, -1504.34, 4.90, 33.422), ["street"] = "Bay City Avenue 3", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-42"] = { ["pos"] = vector4(-1010.56, -1490.80, 4.90, 39.014), ["street"] = "Bay City Avenue 4", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-43"] = { ["pos"] = vector4(-1225.87, -1208.57, 8.26, 101.04), ["street"] = "Bay City Avenue 5", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-44"] = { ["pos"] = vector4(-1225.41, -1201.32, 7.68, 99.482), ["street"] = "Bay City Avenue 6", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
["vb-45"] = { ["pos"] = vector4(-1242.82, -1117.95, 8.32, 100.77), ["street"] = "Bay City Avenue 7", ["model"] = "v_int_61", ["price"] = 600, ["enabled"] = true },
}
--[[
Functions
]]
function retriveHousingTable()
return Housing.info
end
function retrieveHousingTableMapped()
local mapped = {}
for id, housing in pairs(Housing.info) do
if housing.enabled then
table.insert(mapped, {
id = id,
coords = {
x = housing["pos"].x,
y = housing["pos"].y,
z = housing["pos"].z
},
model = housing.model,
street = housing.street
})
end
end
return mapped
end
function getHousingCatFromPropertID(propertyID)
local targetPropertyType = Housing.typeInfo[Housing.info[propertyID].model].cat
if Housing.info[propertyID].override then
targetPropertyType = Housing.info[propertyID].override
end
return targetPropertyType
end
function getHouse(propertyID)
if Housing.info[propertyID] then
return Housing.info[propertyID]
else
return nil
end
end
--[[
Exports
]]
exports("retriveHousingTable", retriveHousingTable)
exports("retrieveHousingTableMapped", retrieveHousingTableMapped)
exports("getHouse", getHouse) |
local AddonName, AddonTable = ...
AddonTable.cooking = {
-- Ingredients
24477, -- Jaggal Clam Meat
27671, -- Buzzard Meat
31671, -- Serpent Flesh
}
|
require("moonsc").import_tags()
-- test that a variable can be accessed from a state
-- that is outside its lexical scope
return _scxml{ initial="s0", datamodel="lua",
_state{ id="s0",
_transition{ cond="var1==1", target="pass" },
_transition{ target="fail" },
},
_state{ id="s1",
_datamodel{
_data{ id="var1", expr="1" },
},
},
_final{id='pass'},
_final{id='fail'},
}
|
object_tangible_furniture_flooring_tile_frn_flooring_tile_s04 = object_tangible_furniture_flooring_tile_shared_frn_flooring_tile_s04:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_flooring_tile_frn_flooring_tile_s04, "object/tangible/furniture/flooring/tile/frn_flooring_tile_s04.iff")
|
love.graphics.setDefaultFilter("nearest","nearest")
require('menu')
require('game')
require('enemy')
require('shop')
function love.load()
min_dt = 1/60
next_time = love.timer.getTime()
thefont = love.graphics.newFont('/Sprites/Basics/hachicro.ttf', 8)
love.graphics.setFont(thefont)
controltype = "keyboard"
controls = {}
-- x = control row
-- A = controls[x][1],
-- B = controls[x][2],
-- Start = controls[x][3],
-- Select = controls[x][4],
-- Up = controls[x][5],
-- Down = controls[x][6],
-- Left = controls[x][7],
-- Right = controls[x][8],
controls = {
{'l','k','h','g','w','s','a','d',},
{'x','z','return','space','up','down','left','right',},
}
mode = 0
menuload()
dtotal = 0 -- this keeps track of how much time has passed
scwidth,scale = love.window.getDesktopDimensions()
scale = 3
love.graphics.setScissor(0,0,480,432)
end
function modeswitch(m)
if m == 1 then
mode = 1
gameload()
elseif m == 2 then
mode = 2
shopload()
elseif m == 3 then
mode = 3
selectload()
elseif m == 4 then
mode = 4
transload()
else
mode = 0
menuload()
end
end
function love.update(dt)
next_time = next_time + min_dt
dtotal = dtotal + dt
if mode == 1 then
gameupdate()
elseif mode == 2 then
shopupdate()
elseif mode == 3 then
selectupdate()
elseif mode == 4 then
gameupdate()
else
menuupdate()
end
end
function love.keypressed(key,scancode,isrepeat)
for x=1,2 do
if mode == 0 then
if key == controls[x][5] then
if sy == 0 then
if stage == nil then
if sx == 1 then
sx = 3
else
sx = sx - 1
end
else
if sx == 0 then
sx = 3
else
sx = sx - 1
end
end
elseif sy == 1 then
if sz == 0 then
if sx == 0 then
sx = 3
else
sx = sx - 1
end
elseif sz == 1 then
if sx == 0 then
sx = 4
else
sx = sx - 1
end
elseif sz == 2 then
if sx == 0 then
sx = 1
else
sx = 0
end
elseif sz == 3 then
if sx == 0 then
sx = 1
else
sx = 0
end
elseif sz == 4 then
if sx == 0 then
sx = 1
else
sx = 0
end
end
end
elseif key == controls[x][6] then
if sy == 0 then
if stage == nil then
if sx == 3 then
sx = 1
else
sx = sx + 1
end
else
if sx == 3 then
sx = 0
else
sx = sx + 1
end
end
elseif sy == 1 then
if sz == 0 then
if sx == 3 then
sx = 0
else
sx = sx + 1
end
elseif sz == 1 then
if sx == 4 then
sx = 0
else
sx = sx + 1
end
elseif sz == 2 then
if sx == 1 then
sx = 0
else
sx = 1
end
elseif sz == 3 then
if sx == 1 then
sx = 0
else
sx = 1
end
elseif sz == 4 then
if sx == 1 then
sx = 0
else
sx = 1
end
end
end
elseif key == controls[x][1] then
if sy == 0 then
if sx == 2 then
sy = 1
sx = 0
elseif sx == 3 then
love.event.quit()
elseif sx == 0 then
modeswitch(1)
else
stage = 0
modeswitch(1)
end
elseif sy == 1 then
if sz == 0 then
sz = sx + 1
sx = 0
elseif sz == 1 then
if sx == 0 then
scale = 2
love.window.setMode(320,288)
love.graphics.setScissor(0,0,320,288)
elseif sx == 1 then
scale = 3
love.window.setMode(480,432)
love.graphics.setScissor(0,0,480,432)
elseif sx == 2 then
scale = 5
love.window.setMode(800,720)
love.graphics.setScissor(0,0,800,720)
elseif sx == 3 then
scale = 7
love.window.setMode(1120,1008)
love.graphics.setScissor(0,0,1120,1008)
elseif sx == 4 then
scwidth,scale = love.window.getDesktopDimensions()
scale = scale / 144
love.window.setMode(scale * 160,scale * 144)
love.window.setFullscreen(true)
love.graphics.setScissor(((scwidth - (scale*160)) / 2),0,scale*160,scale * 144)
end
if love.window.getFullscreen() == true then
if sx ~= 4 then
love.window.setFullscreen(false)
end
end
elseif sz == 2 then
if sx == 0 then
if smusic == true then
smusic = false
else
smusic = true
end
elseif sx == 1 then
if ssound == true then
ssound = false
else
ssound = true
end
end
elseif sz == 3 then
if sx == 0 then
if slives == 2 then
slives = 4
elseif slives == 4 then
slives = 6
else
slives = 2
end
elseif sx == 1 then
if sprice == 1 then
sprice = 2
elseif sprice == 2 then
sprice = 0.5
else
sprice = 1
end
end
elseif sz == 4 then
if sx == 0 then
if keytype == 0 then
keytype = 1
elseif keytype == 1 then
keytype = 2
else
keytype = 0
end
elseif sx == 1 then
sz = 5
sx = 4
if keytype == 0 then
controls[1][5] = 'w'
controls[1][6] = 's'
controls[1][7] = 'a'
controls[1][8] = 'd'
controls[1][1] = 'l'
controls[1][2] = 'k'
controls[1][4] = 'g'
controls[2][1] = 'x'
controls[2][2] = 'z'
elseif keytype == 1 then
controls[1][5] = 'z'
controls[1][7] = 'q'
controls[2][2] = 'w'
elseif keytype == 2 then
controls[1][5] = ','
controls[1][6] = 'o'
controls[1][7] = 'a'
controls[1][8] = 'e'
controls[1][1] = 's'
controls[1][2] = 'n'
controls[1][4] = 'd'
controls[2][1] = 'q'
controls[2][2] = ';'
end
end
elseif sz == 5 then
sz = 6
sx = 4
elseif sz == 6 then
sz = 0
sx = 0
end
end
elseif key == controls[x][2] then
if sy == 1 then
if sz == 0 then
sy = 0
if stage == nil then
sx = 1
else
sx = 0
end
elseif sz ~= 6 and sz ~= 5 then
sz = 0
sx = 0
end
end
end
elseif mode == 1 then
if key == controls[x][3] then
if pause == false then
pause = true
love.audio.pause(music)
else
pause = false
love.audio.resume(musicstart)
love.audio.resume(music)
end
end
if pause == true then
if key == controls[x][5] then
if tx == 0 then
tx = 2
else
tx = tx - 1
end
elseif key == controls[x][6] then
if tx == 2 then
tx = 0
else
tx = tx + 1
end
end
if key == controls[x][1] then
if tx == 1 then
modeswitch(3)
elseif tx == 2 then
stage = nil
modeswitch(0)
else
modeswitch(2)
end
end
end
end
end
end
function love.draw()
love.graphics.clear()
if love.window.getFullscreen() == true then
love.graphics.translate((scwidth - (scale*160)) / 2, 0)
end
love.graphics.push()
love.graphics.scale(scale)
love.graphics.setColor(255,255,255)
love.graphics.rectangle('fill',0,0,160,144)
if mode == 1 then
gamedraw()
elseif mode == 2 then
shopdraw()
elseif mode == 3 then
selectdraw()
elseif mode == 4 then
transdraw()
else
menudraw()
end
love.graphics.pop()
local cur_time = love.timer.getTime()
if next_time <= cur_time then
next_time = cur_time
return
end
love.timer.sleep(next_time - cur_time)
end |
include "Premake/extensions.lua"
workspace "CommonUtilities"
location "."
startproject "CommonUtilities"
architecture "x64"
configurations {
"Debug",
"Release"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
project "CommonUtilities"
location "."
language "C++"
cppdialect "C++20"
targetdir ("./bin/%{prj.name}/" .. outputdir)
targetname("%{prj.name}-%{cfg.buildcfg}")
objdir ("./bin-int/%{prj.name}/" .. outputdir)
files {
"**.h",
"**.hpp",
"**.cpp"
}
includedirs {
".",
"./include/"
}
filter "configurations:Debug"
defines "_DEBUG"
runtime "Debug"
symbols "on"
filter "configurations:Release"
defines "_RELEASE"
runtime "Release"
optimize "on"
filter "system:windows"
kind "ConsoleApp"
systemversion "latest"
|
local Modules = script.Parent.Parent.Parent
local Roact = require(Modules.Roact)
local RoactRodux = require(Modules.RoactRodux)
local Actions = require(Modules.Plugin.Actions)
local ComponentManager = require(Modules.Plugin.ComponentManager)
local Util = require(Modules.Plugin.Util)
local Page = require(script.Parent.Page)
local ScrollingFrame = require(script.Parent.ScrollingFrame)
local Item = require(script.Parent.ListItem)
local GroupItem = require(script.GroupItem)
local function GroupPicker(props)
local children = {}
children.UIPadding = Roact.createElement("UIPadding", {
PaddingTop = UDim.new(0, 2),
PaddingBottom = UDim.new(0, 2),
PaddingLeft = UDim.new(0, 2),
PaddingRight = UDim.new(0, 2),
})
children.Default = Roact.createElement(GroupItem, {
Name = "Default",
Group = nil,
Active = props.componentGroup == nil,
LayoutOrder = -1,
})
table.sort(props.groups)
for i, group in pairs(props.groups) do
children["Group " .. group] = Roact.createElement(GroupItem, {
Name = group,
Group = group,
Active = props.componentGroup == group,
LayoutOrder = i,
})
end
children.AddNew = Roact.createElement(Item, {
LayoutOrder = 99999999,
Text = "Add new group...",
Icon = "folder_add",
IsInput = true,
onSubmit = function(_rbx, text)
ComponentManager.Get():SetGroup(props.groupPicker, text)
props.close()
end,
})
return Roact.createElement(Page, {
visible = props.groupPicker ~= nil,
title = tostring(props.groupPicker) .. " - Select a Group",
titleIcon = props.componentIcon,
close = props.close,
}, {
Body = Roact.createElement(ScrollingFrame, {
Size = UDim2.new(1, 0, 1, 0),
List = true,
}, children),
})
end
local function mapStateToProps(state)
local component = state.GroupPicker
and Util.findIf(state.ComponentData, function(item)
return item.Name == state.GroupPicker
end)
return {
groupPicker = state.GroupPicker,
componentIcon = component and component.Icon or nil,
componentGroup = component and component.Group or nil,
groups = state.GroupData,
}
end
local function mapDispatchToProps(dispatch)
return {
close = function()
dispatch(Actions.ToggleGroupPicker(nil))
end,
}
end
GroupPicker = RoactRodux.connect(mapStateToProps, mapDispatchToProps)(GroupPicker)
return GroupPicker
|
--
-- Author: wangdi
-- Date: 2016-02-09 22:47:05
--
local CoinBoard = class("CoinBoard", function()
return display.newLayer()
end)
function CoinBoard:ctor()
self:addCoin()
self:addTextUI()
self.value = 0
end
function CoinBoard:addValue(val)
self.value = self.value+val
self.text:setString(string.format("%d", self.value))
self.coin:runAction(cca.rep(transition.sequence({cca.scaleTo(0.3, 1.2), cca.scaleTo(0.3, 1)}), 2))
end
function CoinBoard:getValue()
return self.value
end
function CoinBoard:addCoin()
self.coin = display.newSprite("coin.png")
self.coin:setPosition(self.coin:getContentSize().width/2+8, display.height - self.coin:getContentSize().height/2 - 8)
self:add(self.coin)
end
function CoinBoard:getCoinImagePosition()
return cc.p(self.coin:getPositionX(), self.coin:getPositionY())
end
function CoinBoard:addTextUI()
self.text = cc.ui.UILabel.newTTFLabel_({text = "0", font = "fonts/archive.ttf", size = 30, x = self.coin:getPositionX() + self.coin:getContentSize().width/2+5, y = self.coin:getPositionY()})
self.text:setAnchorPoint(0, 0.5)
self:add(self.text)
end
return CoinBoard |
local member = app.session.member
local other_member = Member:by_id(param.get_id())
local public = param.get("public", atom.boolean)
local contact = Contact:by_pk(member.id, other_member.id)
if public == nil and contact then
slot.put_into("error", _"Member is already saved in your contacts!")
return false
end
if contact then
contact:destroy()
end
contact = Contact:new()
contact.member_id = member.id
contact.other_member_id = other_member.id
contact.public = public or false
contact:save()
|
--------------------------------------------------------------------------------
--
-- Non-Lua syntax extensions
--
--------------------------------------------------------------------------------
module ("mlp", package.seeall)
--------------------------------------------------------------------------------
-- Alebraic Datatypes
--------------------------------------------------------------------------------
local function adt (lx)
local tagval = id (lx) [1]
local tagkey = {tag="Pair", {tag="String", "tag"}, {tag="String", tagval} }
if lx:peek().tag == "String" or lx:peek().tag == "Number" then
return { tag="Table", tagkey, lx:next() }
elseif lx:is_keyword (lx:peek(), "{") then
local x = table (lx)
_G.table.insert (x, 1, tagkey)
return x
else return { tag="Table", tagkey } end
end
expr:add{ "`", adt, builder = fget(1) }
--------------------------------------------------------------------------------
-- Anonymous lambda
--------------------------------------------------------------------------------
local lambda_expr = gg.sequence{
"|", func_params_content, "|", expr,
builder= function (x)
local li = x[2].lineinfo
return { tag="Function", x[1],
{ {tag="Return", x[2], lineinfo=li }, lineinfo=li } }
end }
-- In an earlier version, lambda_expr took an expr_list rather than an expr
-- after the 2nd bar. However, it happened to be much more of a burden than an
-- help, So finally I disabled it. If you want to return several results,
-- use the long syntax.
--------------------------------------------------------------------------------
-- local lambda_expr = gg.sequence{
-- "|", func_params_content, "|", expr_list,
-- builder= function (x)
-- return {tag="Function", x[1], { {tag="Return", unpack(x[2]) } } } end }
expr:add (lambda_expr)
--------------------------------------------------------------------------------
-- Allows to write "a `f` b" instead of "f(a, b)". Taken from Haskell.
-- This is not part of Lua 5.1 syntax, so it's added to the expression
-- afterwards, so that it's easier to disable.
--------------------------------------------------------------------------------
local function expr_in_backquotes (lx) return expr(lx, 35) end
expr.infix:add{ name = "infix function",
"`", expr_in_backquotes, "`", prec = 35, assoc="left",
builder = function(a, op, b) return {tag="Call", op[1], a, b} end }
--------------------------------------------------------------------------------
-- table.override assignment
--------------------------------------------------------------------------------
mlp.lexer:add "<-"
stat.assignments["<-"] = function (a, b)
assert( #a==1 and #b==1, "No multi-args for '<-'")
return { tag="Call", { tag="Index", { tag="Id", "table" },
{ tag="String", "override" } },
a[1], b[1]}
end
--------------------------------------------------------------------------------
-- C-style op+assignments
--------------------------------------------------------------------------------
local function op_assign(kw, op)
local function rhs(a, b)
return { tag="Op", op, a, b }
end
local function f(a,b)
return { tag="Set", a, _G.table.imap(rhs, a, b) }
end
mlp.lexer:add (kw)
mlp.stat.assignments[kw] = f
end
_G.table.iforeach (op_assign,
{"+=", "-=", "*=", "/="},
{"add", "sub", "mul", "div"}) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.