content stringlengths 5 1.05M |
|---|
local E, L = unpack(ElvUI) -- Import Functions/Constants, Config, Locales
local S = E:NewModule('NewFunc', 'AceEvent-3.0')
SPLASH_SCREENS['singleFunc'] = {
id = 1,
questID = nil,
leftTex = "splash-601-topleft",
rightTex = "splash-601-right",
bottomTex = "splash-601-botleft",
header = 'EUI '..L['singleFunc'],
label = '',
feature1Title = L['singleFunc_desc'],
feature1Desc = '',
feature2Title = '',
feature2Desc = '',
rightTitle = '',
rightDesc = '',
cVar="singleFunc",
features = {
[1] = { EnterFunc = function() end,
LeaveFunc = function() end,
},
[2] = { EnterFunc = function() end,
LeaveFunc = function() end,
},
},
}
local function GetSplashFrameTag()
local tag;
local expansionLevel = GetExpansionLevel();
if ( IsCharacterNewlyBoosted() ) then
if ( expansionLevel >= SPLASH_SCREENS["BOOST2"].expansion ) then
tag = "BOOST2";
else
tag = "BOOST";
end
else
if ( expansionLevel >= SPLASH_SCREENS["NEW"].expansion) then
tag = "NEW";
else
local playerLevel = UnitLevel("player");
tag = (playerLevel >= 90 and "BASE_90") or "BASE";
end
end
return tag;
end
function S:Initialize()
local tag = GetSplashFrameTag();
local playerLevel = UnitLevel("player");
-- check if they've seen this screen already
local lastScreenID = tonumber(GetCVar(SPLASH_SCREENS[tag].cVar)) or 0;
if( lastScreenID >= SPLASH_SCREENS[tag].id ) or (not tag) or ( playerLevel < 20 ) then
if E.global.general.newFuncShown then
SplashFrame_Open('singleFunc')
SplashFrame.EuiTexture = SplashFrame:CreateTexture(nil, 'OVERLAY')
SplashFrame.EuiTexture:SetSize(780, 500);
SplashFrame.EuiTexture:SetPoint("TOP", SplashFrame.Header, "BOTTOM", 8, -15);
SplashFrame.EuiTexture:SetTexture('Interface\\AddOns\\ElvUI\\media\\textures\\singleFunc.blp')
-- SplashFrame.LeftTexture --371*434
-- SplashFrame.RightTexture --510*584
-- SplashFrame.BottomTexture --371*137
E.global.general.newFuncShown = false;
end
end
end
local function InitializeCallback()
S:Initialize()
end
E:RegisterModule(S:GetName(), InitializeCallback) |
vim.opt.list = true
vim.opt.listchars:append("space: ")
vim.cmd [[highlight IndentBlanklineIndent1 guifg=#E06C75 gui=nocombine]]
vim.cmd [[highlight IndentBlanklineIndent2 guifg=#E5C07b gui=nocombine]]
vim.cmd [[highlight IndentBlanklineIndent3 guifg=#98C379 gui=nocombine]]
vim.cmd [[highlight IndentBlanklineIndent4 guifg=#56B6C2 gui=nocombine]]
vim.cmd [[highlight IndentBlanklineIndent5 guifg=#61AFEF gui=nocombine]]
vim.cmd [[highlight IndentBlanklineIndent6 guifg=#C678DD gui=nocombine]]
require("indent_blankline").setup {
space_char_blankline = " ",
char_highlight_list = {
"IndentBlanklineIndent1",
"IndentBlanklineIndent2",
"IndentBlanklineIndent3",
"IndentBlanklineIndent4",
"IndentBlanklineIndent5",
"IndentBlanklineIndent6",
},
}
|
data:extend(
{
--shell-brick
{
type = "ammo",
name = "piercing-shotgun-shell-brick",
icon = "__Advanced-Tanks__/graphics/icons/shell-brick.png",
flags = {"goes-to-main-inventory"},
ammo_type =
{
category = "shotgun-shell",
target_type = "direction",
source_effects =
{
type = "create-entity",
entity_name = "explosion-gunshot"
},
action =
{
type = "direct",
repeat_count = 16,
action_delivery =
{
type = "projectile",
projectile = "piercing-shotgun-pellet",
starting_speed = 1,
direction_deviation = 0.3,
range_deviation = 0.3,
max_range = 15,
}
}
},
magazine_size = 50,
subgroup = "tank-ammo-infantry",
order = "b[tank-ammo]",
stack_size = 50
},
--bullet-brick
{
type = "ammo",
name = "ap-bullet-brick",
icon = "__Advanced-Tanks__/graphics/icons/bullet-brick.png",
flags = {"goes-to-main-inventory"},
ammo_type =
{
category = "bullet",
action =
{
type = "direct",
action_delivery =
{
type = "instant",
source_effects =
{
type = "create-entity",
entity_name = "explosion-gunshot"
},
target_effects =
{
{
type = "create-entity",
entity_name = "explosion-gunshot"
},
{
type = "damage",
damage = { amount = 4 , type = "physical"}
}
}
}
}
},
magazine_size = 100,
subgroup = "tank-ammo-infantry",
order = "b[tank-ammo]",
stack_size = 50
},
--flame-thrower-ammo-tanker
{
type = "ammo",
name = "flame-thrower-ammo-tanker",
icon = "__Advanced-Tanks__/graphics/icons/flame-thrower-ammo-tanker.png",
flags = {"goes-to-main-inventory"},
ammo_type =
{
category = "tank-spray-ammo",
target_type = "direction",
action =
{
type = "direct",
action_delivery =
{
{
type = "flame-thrower",
explosion = "tank-flame-thrower-explosion",
direction_deviation = 0.07,
speed_deviation = 0.1,
starting_frame_deviation = 0.07,
projectile_starting_speed = 0.2,
starting_distance = 0.6,
}
}
}
},
magazine_size = 500,
subgroup = "tank-ammo",
order = "b[tank-ammo]",
stack_size = 10
},
--"45mm-auto"
{
type = "ammo",
name = "45mm-auto",
icon = "__Advanced-Tanks__/graphics/icons/cannon-auto-ammo.png",
flags = {"goes-to-main-inventory"},
ammo_type =
{
category = "auto-cannon-ammo",
target_type = "direction",
source_effects =
{
type = "create-entity",
entity_name = "explosion-gunshot"
},
action =
{
type = "direct",
action_delivery =
{
type = "projectile",
projectile = "45mm-projectile",
starting_speed = 1,
direction_deviation = 0.1,
range_deviation = 0.1,
max_range = 30
}
},
},
magazine_size = 3,
subgroup = "tank-ammo",
order = "a[tank-ammo]",
stack_size = 500
},
--50mm-mortar
{
type = "ammo",
name = "50mm-mortar",
icon = "__Advanced-Tanks__/graphics/icons/nade_tank_ammo.png",
flags = {"goes-to-main-inventory"},
ammo_type =
{
category = "tank-nade-ammo",
target_type = "direction",
source_effects =
{
type = "create-entity",
entity_name = "explosion-gunshot"
},
action =
{
type = "direct",
action_delivery =
{
type = "projectile",
projectile = "50mm-projectile",
starting_speed = 1,
direction_deviation = 0.1,
range_deviation = 0.1,
max_range = 750
}
},
},
magazine_size = 1,
subgroup = "tank-ammo",
order = "a[tank-ammo]",
stack_size = 500
},
--50mm-mortar-poison
{
type = "ammo",
name = "50mm-mortar-poison",
icon = "__Advanced-Tanks__/graphics/icons/nade_tank_ammo-poison.png",
flags = {"goes-to-main-inventory"},
ammo_type =
{
category = "tank-nade-ammo",
target_type = "direction",
source_effects =
{
type = "create-entity",
entity_name = "explosion-gunshot"
},
action =
{
type = "direct",
action_delivery =
{
type = "projectile",
projectile = "50mm-projectile-poison",
starting_speed = 1,
direction_deviation = 0.1,
range_deviation = 0.1,
max_range = 750
}
},
},
magazine_size = 1,
subgroup = "tank-ammo",
order = "a[tank-ammo]",
stack_size = 500
},
--minepack
{
type = "ammo",
name = "minepack",
icon = "__Advanced-Tanks__/graphics/icons/mine-pack.png",
flags = {"goes-to-main-inventory"},
ammo_type =
{
category = "tank-mine-ammo",
target_type = "direction",
source_effects =
{
type = "create-entity",
entity_name = "explosion-gunshot"
},
action =
{
type = "direct",
action_delivery =
{
type = "projectile",
projectile = "tank-mine-projectile",
starting_speed = 1,
direction_deviation = 0.1,
range_deviation = 0.1,
max_range = 50
}
},
},
magazine_size = 10,
subgroup = "tank-ammo",
order = "a[tank-ammo]",
stack_size = 10
},
--minepack-poison
{
type = "ammo",
name = "minepack-poison",
icon = "__Advanced-Tanks__/graphics/icons/mine-pack-poison.png",
flags = {"goes-to-main-inventory"},
ammo_type =
{
category = "tank-mine-ammo",
target_type = "direction",
source_effects =
{
type = "create-entity",
entity_name = "explosion-gunshot"
},
action =
{
type = "direct",
action_delivery =
{
type = "projectile",
projectile = "tank-mine-projectile-poison",
starting_speed = 1,
direction_deviation = 0.1,
range_deviation = 0.1,
max_range = 50
}
},
},
magazine_size = 10,
subgroup = "tank-ammo",
order = "a[tank-ammo]",
stack_size = 10
},
--rocketpack
{
type = "ammo",
name = "rocketpack",
icon = "__Advanced-Tanks__/graphics/icons/rocket-pack.png",
flags = {"goes-to-main-inventory"},
ammo_type =
{
category = "tank-rocket-ammo",
action =
{
type = "direct",
action_delivery =
{
type = "projectile",
projectile = "tank-rocket",
starting_speed = 0.2,
source_effects =
{
type = "create-entity",
entity_name = "explosion-gunshot"
}
}
}
},
magazine_size = 5,
subgroup = "tank-ammo",
order = "a[tank-ammo]",
stack_size = 100
},
--cannon-shell-2
{
type = "ammo",
name = "cannon-shell-2",
icon = "__Advanced-Tanks__/graphics/icons/tank-ammo-shell2.png",
flags = {"goes-to-main-inventory"},
ammo_type =
{
category = "cannon-shell",
target_type = "direction",
source_effects =
{
type = "create-entity",
entity_name = "explosion-gunshot"
},
action =
{
type = "direct",
action_delivery =
{
type = "projectile",
projectile = "cannon-projectile",
starting_speed = 1.5,
direction_deviation = 0.05,
range_deviation = 0.05,
max_range = 50
}
},
},
subgroup = "tank-ammo",
order = "a[tank-ammo]",
stack_size = 500
},
--tank-wmd-ammo
{
type = "ammo",
name = "tank-wmd-ammo",
icon = "__Advanced-Tanks__/graphics/icons/tank-ammo-wmd.png",
flags = {"goes-to-main-inventory"},
ammo_type =
{
category = "tank-wmd-ammo",
target_type = "direction",
source_effects =
{
type = "create-entity",
entity_name = "explosion-gunshot"
},
action =
{
type = "direct",
action_delivery =
{
type = "projectile",
projectile = "wmd-projectile",
starting_speed = 1.5,
direction_deviation = 0.05,
range_deviation = 0.05,
max_range = 1250
}
},
},
subgroup = "tank-ammo",
order = "a[tank-ammo]",
stack_size = 500
},
}
) |
local E = {vars = {}, defs = {}}
E.macros = {
';\n',-- ')',
'~', '=',
'?', '|',
'&',
}
E.operators = {
'+%-',
'/*×÷%%',
'%^',
}
function E.eval(expression)
if expression == '()' then
return io.read()
end
if expression:find('^ *[0-9,]+%.?[0]* *$') then
return (expression:gsub('[ ,]', '') :gsub('%.0$',''))
end -- numbers evaluate to numbers
if expression:find('^ *[a-z][a-z0-9]* *$') then
expression = expression:gsub('^ *([a-z][a-z0-9]*) *$', '%1')
local val = E.vars[expression]
or E.defs[expression]
or E.getvariable and E.getvariable(expression)
if val then return val end
end
for _, macro in ipairs(E.macros) do
if expression:match('['..macro..']') then
return E.Apply(macro, expression)
end
end
while expression:find('(' ,nil, true) do
local bef = expression:match('^(.*)[(][^()]*[)].*$')
local inside = expression:match('^.*[(]([^()]*)[)].*$')
local aft = expression:match('^.*[(][^()]*[)](.*)$')
expression = bef.. E.eval(inside) ..aft
end
for macro, expansion in pairs(E.defs) do
--print( ("%q (%q=>%q)"):format(expression,macro,expansion) )
return E.eval(expression:gsub(macro, expansion))
end
for _,operator in ipairs(E.operators) do
if expression:match('['..operator..']') then
return E.Apply(operator, expression)
end
end
return expression
end
function E.Apply(operator, expression)
local op1 = expression:match('^(.-)['..operator..']')
local op2 = expression:match('^.-[' ..operator..'](.*)$')
operator = expression:match('^.-([' ..operator..'])')
--print( ('%q in %q (%q, %q)'):format(operator, expression, op1,op2) )
if operator == ')' then
return E.eval(op1)
elseif operator == ';' or operator == '\n' then
E.eval(op1)
return E.eval(op2)
elseif operator == '~' then
E.defs[op1] = op2
return 0
elseif operator == '?' then
op1 = E.eval(op1)
if tonumber(op1) ~= 0 and op1 ~= '' then
return E.eval(op2:match('^(.-):'))
else
return E.eval(op2:match('^.-:(.*)$'))
end
elseif operator == '=' then
if E.setvariable then
local val = E.eval(op2)
E.setvariable(op1, val )
return val
else
E.vars[op1] = E.eval(op2)
return E.vars[op1]
end
end
op1 = E.eval(op1)
op2 = E.eval(op2)
if operator == '/' or operator == '÷' then
return op1 / op2
elseif operator == '*' or operator == '×' then
return op1 * op2
elseif operator == '+' then
return op1 + op2
elseif operator == '-' then
return op1 - op2
elseif operator == '%' then
return op1 % op2
elseif operator == '^' then
return op1 ^ op2
elseif operator == '.' then
return op1.."."..op2
else
error(('unknown operator: %q (%q, %q)'):format(operator, op1, op2))
return '0'
end
end
--[[ debug
require('doodles_in')
e=E.eval
--]]
return E
|
DefineClass.OrbitalProbe = {
__parents = { "BaseBuilding", "CityObject", "Shapeshifter", "PinnableObject" },
flags = { efWalkable = false, efCollision = false, efApplyToGrids = false },
properties = {
{ id = "display_name", default = T(3525, "Orbital Probe") },
{ id = "display_icon", default = "UI/Icons/Buildings/orbital_probe.tga" },
{ id = "description", default = T(10086, "Reveals underground deposits in the scanned area.")},
},
entity = "InvisibleObject",
range = 160*guim,
duration = 2*const.HourDuration,
detected_classes = { "SubsurfaceDepositMetals", "SubsurfaceDepositWater", "SubsurfaceDepositMinerals" },
show_pin_toggle = false,
pin_on_start = false,
pin_rollover = T(3680, "Immediately scans a Sector for deposits and Anomalies.<DeepScanWarning><newline><newline>Available Orbital Probes<right><NumProbes>"),
pin_rollover_hint = T(3681, "<left_click> Select Sector"),
pin_rollover_hint_xbox = T(7882, "<PinRolloverGamepadHint>"),
pin_progress_value = "",
pin_progress_max = "",
pin_summary1 = T(3683, "<NumProbes>"),
scan_pattern = { point(0, 0) },
--resolve inheritance
Random = CityObject.Random
}
function OrbitalProbe:GetPinRolloverGamepadHint()
if GetInGameInterfaceMode() ~= "overview" then
return T(3682, "<ButtonA> Overview")
else
return T(8569, "<ButtonA> Select Sector")
end
end
function OrbitalProbe:GameInit()
if self.city.MapSectors then
local _, fully_scanned = UnexploredSectorsExist(self.city)
if fully_scanned then
self:Notify("delete")
return
end
end
self.city:AddToLabel("OrbitalProbe", self)
if not self.city.labels.OrbitalProbe or #self.city.labels.OrbitalProbe == 1 then
self:TogglePin()
end
end
function OrbitalProbe:UpdateNotWorkingBuildingsNotification()
end
function OrbitalProbe:Done()
self.city:RemoveFromLabel("OrbitalProbe", self)
end
function OrbitalProbe:GetNumProbes()
local city = self and self.city or MainCity
local probes = city and city.labels.OrbitalProbe
return probes and #probes or 0
end
function OrbitalProbe:GetDeepScanWarning()
if self.city.colony:IsTechResearched("AdaptedProbes") then
return ""
end
return T(3684, "<newline><em>Deep scanning of the Sector is not possible with the current technology</em>")
end
function OrbitalProbe:GetAffectedSectors(sector)
local list = {}
local exploration = self.city
for _, offset in ipairs(self.scan_pattern) do
local x, y = offset:xy()
local col = sector.col + x
local row = sector.row + y
local s = exploration.MapSectors[col] and exploration.MapSectors[col][row]
if s then
list[#list + 1] = s
end
end
return list
end
function OrbitalProbe:ScanSector(sector)
assert(not sector:HasBlockers())
if g_Tutorial and not g_Tutorial.EnableOrbitalProbes or sector:HasBlockers() then
return
end
local deep = UIColony:IsTechResearched("AdaptedProbes")
local list = self:GetAffectedSectors(sector)
local mode = deep and "deep scanned" or "scanned"
for _, s in ipairs(list) do
s:Scan(mode, "probe")
end
local realm = GetRealm(self)
local scan_pos = sector.area:Center()
scan_pos = realm:SnapToTerrain(scan_pos)
PlayFX({
actionFXClass = "OrbitalProbeScan",
actionFXMoment = "start",
action_pos = scan_pos,
action_map_id = self:GetMapID(),
})
HintDisable("HintProbes")
local label = self.city.labels.OrbitalProbe
DoneObject(label[#label])
ObjModified(self)
end
function OrbitalProbe:CanBeUnpinned()
local label = self.city.labels.OrbitalProbe
return not label or not next(label)
end
function OrbitalProbe:OnPinClicked(gamepad)
local dlg = GetInGameInterface()
assert(dlg)
if not CameraTransitionThread and dlg.mode ~= "overview" then
dlg:SetMode("overview")
end
assert(dlg.mode == "overview" and dlg.mode_dialog:IsKindOf("OverviewModeDialog"))
--gamepad doesn't go into this state (fix:0129799)
if not gamepad then
dlg.mode_dialog:SetScan(true)
end
--if a pin is selected (it must be this object) -> deselect it (fix:0129807)
local focus = terminal.desktop:GetKeyboardFocus()
if focus and IsKindOf(focus.parent, "PinsDlg") then
GetDialog("PinsDlg"):SetFocus(false, true)
end
if HintsEnabled then
HintTrigger("HintProbes")
end
return true
end
function OrbitalProbe:GetDisplayName()
return self.display_name
end
DefineClass.AdvancedOrbitalProbe = {
__parents = { "OrbitalProbe" },
pin_rollover = T(11413, "Immediately scans a Sector and the four adjacent Sectors for deposits and anomalies.<DeepScanWarning><newline><newline>Available Orbital Probes<right><NumProbes>"),
properties = {
{ id = "display_name", default = T(10087, "Advanced Orbital Probe") },
{ id = "display_icon", default = "UI/Icons/Buildings/orbital_probe.tga" },
},
scan_pattern = {
point(0, 0),
point(-1, 0),
point(1, 0),
point(0, 1),
point(0, -1),
},
} |
local adns = require "net.adns";
local rbl = module:get_option_string("registration_rbl");
local function reverse(ip, suffix)
local a,b,c,d = ip:match("^(%d+).(%d+).(%d+).(%d+)$");
if not a then return end
return ("%d.%d.%d.%d.%s"):format(d,c,b,a, suffix);
end
module:hook("user-registered", function (event)
local session = event.session;
local ip = session and session.ip;
local rbl_ip = ip and reverse(ip, rbl);
if rbl_ip then
local registration_time = os.time();
local log = session.log;
adns.lookup(function (reply)
if reply and reply[1] then
log("warn", "Account %s@%s registered from IP %s found in RBL (%s)", event.username, event.host or module.host, ip, reply[1].a);
local user = prosody.bare_sessions[event.username .. "@" .. module.host];
if user and user.firewall_marks then
user.firewall_marks.dnsbl_hit = registration_time;
else
module:open_store("firewall_marks", "map"):set(event.username, "dnsbl_hit", registration_time);
end
end
end, rbl_ip);
end
end);
|
return [[
#Base text for Hungarian language
[hu]
lang = Magyar #Full language name
AuthorText = Fordítók: Xenox, Lackó #Author text
#Workshop errors
Workshop.Title = Tartalom kezelő
Workshop.FilesMissing = Néhány kiegészítő fájl hiányzik, vagy hibás.\nHa a Műhelyből lett(ek) telepítve, próbáld meg kitörölni ezt a fájlt:\nGarrysMod/garrysmod/%s.
Workshop.FilesMissingLocaly = Néhány kiegészítő fájl hiányzik, vagy hibás.
Workshop.InstalledLocaly = Telepített (helyi)
Workshop.NotInstalledE = Nem telepített.\nIratkozz fel a kiegészítőre, és ellenőrizd a "Bővítmények" menüben.
Workshop.NotInstalled = Nem telepített.
Workshop.Disabled = Kikapcsolt.\nKapcsold be az "Bővítmények" menüben.
Workshop.Installed = Telepített
Workshop.Open = Műhely
Workshop.ErrorGithub = A Metrostroi GitHub verziója észlelhető. A jelenlegi Metrostroi verzió nem kompatibilis és nem működik a GitHub-os verzióval.
Workshop.ErrorLegacy = A Metrostroi egyik régi verziója észlelhető. A jelenlegi Metrostroi verzió nem kompatibilis és nem működik a régi verzióval.
Workshop.ErrorEnhancers = Ez a kiegészítő grafikus javításokat tartalmaz, amelyek esetleg ronthatják a játékélményt.
Workshop.Error1 = Ez a kiegészítő a Metrostroi régi szkriptjeit tartalmazza, amelyek zavarhatják a jelenlegieket. "Szkript hiba" és instabil működés léphet föl.
Workshop.ErrorOld = Régi modellek észlelhetők (81-702 és 81-717 régi modelljei). Ellenőrizd és töröld a régi Metrostroi fájlokat, távolítsd el a "cache", "download" és "downloads" mappákat a "garrysmod" könyvtárból.
#Client settings
Panel.Admin = Admin
Panel.RequireThirdRail = Harmadik sín szükséges
Panel.Client = Kliens
Panel.Language = Nyelv választás
Panel.DrawCams = Kamerák renderelése
Panel.DisableHUD = HUD kikapcsolása a vezető ülésben
Panel.DisableCamAccel = Kamera gyorsítás kikapcsolása
Panel.DisableHoverText = Felvillanó szövegek kikapcsolása
Panel.ScreenshotMode = Képernyőmentés mód (ALACSONY FPS)
Panel.ShadowsHeadlight = Fényszóró árnyékok bekapcsolása
Panel.RedLights = \nZárjelző lámpák dinamikus fényének bekapcsolása
Panel.ShadowsOther = \nEgyéb forrásokból származó árnyékok bekapcsolása
Panel.MinimizedShow = Ne töltse be az elemeket, \nha a program tálcán van
Panel.FOV = FOV
Panel.Z = Kamera magassága
Panel.RenderDistance = Renderelési távolság
Panel.ReloadClient = Kliens oldal újraindítása
Panel.ClientAdvanced = Kliens (haladó)
Panel.DrawDebugInfo = Debug információk megjelenítése
Panel.DrawSignalDebugInfo = Jelzők debug információi
Panel.CheckAddons = Kiegészítők keresése
Panel.ReloadLang = Nyelvek újratöltése
Panel.SoftDraw = Vonatelemek betöltési ideje
Panel.SoftReloadLang = Ne töltsön be új spawnmenü-t
#Common train
Train.Common.Camera0 = Vezető ülés
Train.Common.RouteNumber = Forgalmi szám
Train.Common.LastStation = Végállomás
Train.Common.HelpersPanel = Segédvezetői panel
Train.Common.UAVA = UAVA
Train.Common.PneumoPanels = Pneumatikus szelepek
Train.Common.Voltmeters = Volt- és ampermérők
Train.Common.CouplerCamera = Csatlás
Common.ARM.Monitor1 = Monitor 1 ARM
Train.Buttons.Sealed = Leplombált
#Train entities
Entities.gmod_subway_base.Name = Metrókocsi alap
Entities.gmod_subway_81-502.Name = 81-502 (Ema-502 vezér)
Entities.gmod_subway_81-501.Name = 81-501 (Em-501 közbenső)
Entities.gmod_subway_81-702.Name = 81-702 (D vezér)
Entities.gmod_subway_81-702_int.Name = 81-702 (D közbenső)
Entities.gmod_subway_81-703.Name = 81-703 (E vezér)
Entities.gmod_subway_81-703_int.Name = 81-703 (E közbenső)
Entities.gmod_subway_ezh.Name = 81-707 (Ezh vezér)
Entities.gmod_subway_ezh1.Name = 81-708 (Ezh1 közbenső)
Entities.gmod_subway_ezh3.Name = 81-710 (Ezh3 vezér)
Entities.gmod_subway_em508t.Name = 81-508T (Em-508T közbenső)
Entities.gmod_subway_81-717_mvm.Name = 81-717 (Moszkvai vezér)
Entities.gmod_subway_81-717_mvm_custom.Name = 81-717 (Moszkvai egyedi)
Entities.gmod_subway_81-714_mvm.Name = 81-714 (Moszkvai közbenső)
Entities.gmod_subway_81-717_lvz.Name = 81-717 (Szentpétervári vezér)
Entities.gmod_subway_81-714_lvz.Name = 81-714 (Szentpétervári közbenső)
Entities.gmod_subway_81-718.Name = 81-718 (TISU vezér)
Entities.gmod_subway_81-719.Name = 81-719 (TISU közbenső)
Entities.gmod_subway_81-720.Name = 81-720 (Yauza vezér)
Entities.gmod_subway_81-721.Name = 81-721 (Yauza közbenső)
Entities.gmod_subway_81-722.Name = 81-722 (Yubileyniy vezér)
Entities.gmod_subway_81-723.Name = 81-723 (Yubileyniy közbenső)
Entities.gmod_subway_81-724.Name = 81-724 (Yubileyniy szabadonfutó)
Entities.gmod_subway_81-7036.Name = 81-7036 (nem működik)
Entities.gmod_subway_81-7037.Name = 81-7037 (nem működik)
Entities.gmod_subway_tatra_t3.Name = Tátra T3
#Train util entities
Entities.gmod_train_bogey.Name = Forgóváz
Entities.gmod_train_couple.Name = Csatlás
#Other entities
Entities.gmod_track_pui.Name = PUI
Entities.gmod_track_mus_elektronika7.Name = "Electronika" óra
Entities.gmod_mus_clock_analog.Name = Analóg óra
Entities.gmod_track_clock_time.Name = Nagy térköz óra (idő)
Entities.gmod_track_clock_small.Name = Kicsi térköz óra
Entities.gmod_track_clock_interval.Name = Nagy térköz óra (térköz)
Entities.gmod_track_switch.Name = Váltó
Entities.gmod_track_powermeter.Name = Feszültségmérő
Entities.gmod_track_arm.Name = ARM DSCP
Entities.gmod_track_udochka.Name = Áram csatlakozó
Entities.gmod_train_spawner.Name = Vonat lehelyező
Entities.gmod_train_special_box.Name = Speciális csomag
#Weapons
Weapons.button_presser.Name = Gombnyomó
Weapons.button_presser.Purpose = Pályákon lévő gombok megnyomására.
Weapons.button_presser.Instructions = Mutass a megnyomandó gombra, majd kattints az "Támadás" gombra.
Weapons.train_key.Name = Adminisztrátori kulcs
Weapons.train_key.Purpose = Pályákon levő adminisztrátori gombok megnyomására.
Weapons.train_key.Instructions = Mutass az adminisztrátori gombra, majd kattints az "Támadás" gombra.
Weapons.train_kv_wrench.Name = Irányváltó kulcs
Weapons.train_kv_wrench.Purpose = Metrókocsikban található gombok megnyomására való.
Weapons.train_kv_wrench.Instructions = Mutass a megnyomandó gombra a vonatban, majd kattints az "Támadás" gombra.
Weapons.train_kv_wrench_gold.Name = Az arany irányváltó kulcs
Weapons.train_kv_wrench_gold.Purpose = @[Weapons.train_kv_wrench.Purpose]
Weapons.train_kv_wrench_gold.Instructions = @[Weapons.train_kv_wrench.Instructions]
#Spawner common
Spawner.Title = Vonat lehelyező
Spawner.Spawn = Lehelyezés
Spawner.Close = Bezárás
Spawner.Trains1 = Megengedett kocsik száma
Spawner.Trains2 = Játékosonként
Spawner.WagNum = Kocsik száma
Common.Spawner.Texture = Külső festés
Common.Spawner.PassTexture = Belső festés
Common.Spawner.CabTexture = Fülke festés
Common.Spawner.Announcer = Utastájékoztató típusa
Common.Spawner.Type1 = 1-es típus
Common.Spawner.Type2 = 2-es típus
Common.Spawner.Type3 = 3-es típus
Common.Spawner.Type4 = 4-es típus
Common.Spawner.SpawnMode = Lehelyezési állapot
Common.Spawner.SpawnMode.Deadlock = Kihúzó
Common.Spawner.SpawnMode.Full = Üzemkész
Common.Spawner.SpawnMode.NightDeadlock = Kihúzó, éjszaka után
Common.Spawner.SpawnMode.Depot = Kikapcsolt
Spawner.Common.EType = Elektromos áramkörök típusa
Common.Spawner.Scheme = Vonal sémák
Common.Spawner.Random = Random
Common.Spawner.Old = Régi
Common.Spawner.New = Új
Common.Spawner.Type = Típus
Common.Spawner.SchemeInvert = Fordított vonal sémák
#Coupler common
Common.Couple.Title = Csatlás menü
Common.Couple.CoupleState = Csatlás állapota
Common.Couple.Coupled = Csatolva
Common.Couple.Uncoupled = Nem csatolt
Common.Couple.Uncouple = Szétcsatol
Common.Couple.IsolState = Végelzáró csapok állapota
Common.Couple.Isolated = Zárt
Common.Couple.Opened = Nyitott
Common.Couple.Open = Nyitva
Common.Couple.Isolate = Zárva
Common.Couple.EKKState = EKK állapota (elektromos csatlás)
Common.Couple.Disconnected = Lecsatlakozva
Common.Couple.Connected = Csatlakozva
Common.Couple.Connect = Összeköt
Common.Couple.Disconnect = Szétkapcsol
#Bogey common
Common.Bogey.Title = Forgóváz menü
Common.Bogey.ContactState = Áremszedők állapota
Common.Bogey.CReleased = Kiengedve
Common.Bogey.CPressed = Lenyomva
Common.Bogey.CPress = Lenyomás
Common.Bogey.CRelease = Elengedés
Common.Bogey.ParkingBrakeState = Rögzítőfék állapota
Common.Bogey.PBDisabled = Manuálisan kikapcsolva
Common.Bogey.PBEnabled = Bekapcsolt
Common.Bogey.PBEnable = Bekapcsol
Common.Bogey.PBDisable = Manuális kikapcsolás
#Trains common
Common.ALL.Unsused1 = Nem használt
Common.ALL.Unsused2 = (Nem használt)
Common.ALL.Up = (fel)
Common.ALL.Down = (le)
Common.ALL.Left = (bal)
Common.ALL.Right = (jobb)
Common.ALL.CW = (óramutató járásával megegyezően)
Common.ALL.CCW = (óramutató járásával ellentétesen)
Common.ALL.VB = VB: Akkumulátor be/ki
Common.ALL.VSOSD = SOSD: Peronajtó nyitás lámpa
Common.ALL.VKF = VKF: Zárjelző lámpák áramellátása
Common.ALL.VB2 = (Alacsony feszültségű áramkörök)
Common.ALL.VPR = VPR: Fedélzeti rádióállomás
Common.ALL.VASNP = ASNP áramellátása
Common.ALL.UOS = RC-UOS: Sebességkorlátozó eszköz (EPV/EPK nélküli vezetéshez)
Common.ALL.VAH = VAH: Szükségmenet(RPB relé hiba)
Common.ALL.KAH = KAH: Szükségmenet gombja ARS nélküli vezetéshez
Common.ALL.KAHK = KAH fedél
Common.ALL.VAD = VAD: Tartalék ajtózárás felülírása (KD relé meghibásodása esetén)
Common.ALL.OVT = OVT: Pneumatikus fékek kikapcsolása
Common.ALL.VOVT = VOVT: Pneumatikus szelepfék kikapcsolása
Common.ALL.EmergencyBrakeValve = Vészfék
Common.ALL.ParkingBrake = Rögzítőfék
Common.ALL.VU = VU: Vonatvezérlés kapcsoló
Common.ALL.KDP = KDP: Jobb oldali ajtók nyitása
Common.ALL.KDPL = Jobb oldali ajtók kiválasztva
Common.ALL.KDPK = Jobb oldali ajtók gombfedele
Common.ALL.KDL = KDL: Bal oldali ajtók nyitása
Common.ALL.KDLL = Bal oldali ajtók kiválasztva
Common.ALL.KDLK = Bal oldali ajtók gombfedele
Common.ALL.KDLPK = Ajtó gombok fedele
Common.ALL.KRZD = KRZD: Tartalék ajtózáró
Common.ALL.VSD = Ajtó oldal választó
Common.ALL.Ring = Csengő
Common.ALL.VUD = VUD: Ajtónyitás engedélyező (Ajtózáró)
Common.ALL.KDPH = Utolsó kocsi jobb oldali ajtajainak nyitása
Common.ALL.VUD2 = VUD2: Segédvezetői ajtónyitás engedélyező
Common.ALL.Program1 = Program I
Common.ALL.Program2 = Program II
Common.ALL.VRP = VRP: Túlfeszültség relé visszaállítása
Common.ALL.VRPBV = VRP: Túlfeszültség relé visszaállítása, BV bekapcsolása
Common.ALL.KSN = KSN: Hibajelzés
Common.ALL.VMK = VMK: Kompresszor
Common.ALL.MK = Kompresszor
Common.ALL.VF1 = Tompított fényszóró
Common.ALL.VF2 = Távolsági fényszóró
Common.ALL.VF = Fényszóró kapcsoló
Common.ALL.VUS = VUS: Fényszórók (távolsági/tompított)
Common.ALL.GaugeLights = Műszerek világítása
Common.ALL.CabLights = Fülkevilágítás
Common.ALL.PassLights = Utastér világítás
Common.ALL.PanelLights = Műszerfal világítása
Common.ALL.RMK = RMK: Tartalék kompresszor
Common.ALL.KRP = KRP: Szükségindító
Common.ALL.VZP = VZP: Menet késleltetés kikapcsolása
Common.ALL.VZD = VZD: Ajtó késleltetés kikapcsolása
Common.ALL.VAV = VAV: Automatikus vonatvezérlés kapcsoló
Common.ALL.RouteNumber1+ = Forgalmi szám első karakterének növelése
Common.ALL.RouteNumber1- = Forgalmi szám első karakterének csökkentése
Common.ALL.RouteNumber2+ = Forgalmi szám második karakterének növelése
Common.ALL.RouteNumber2- = Forgalmi szám második karakterének csökkentése
Common.ALL.RouteNumber3+ = Forgalmi szám harmadik karakterének növelése
Common.ALL.RouteNumber3- = Forgalmi szám harmadik karakterének csökkentése
Common.ALL.LastStation+ = Következő végállomás
Common.ALL.LastStation- = Előző végállomás
Common.ALL.RRP = RP: Vörös túlfeszültség relé visszajelző (menet-/fékáram nem alakult ki)
Common.ALL.GRP = RP: Zöld túlfeszültség relé visszajelző (megakadályozza a motorok túláramát)
Common.ALL.RP = RP: Vörös túlfeszültség relé visszajelző (menet-/fékáram nem alakult ki vagy RP-s)
Common.ALL.SN = LSN: Hiba visszajelző lámpa (áramkörök nem működnek)
Common.ALL.PU = Csökkentett feszültségű mód visszajelző
Common.ALL.BrT = Vonat légfék üzemben
Common.ALL.BrW = Kocsi légfék üzemben
Common.ALL.ARS = ARS: Automatikus sebességszabályozó rendszer kapcsoló
Common.ALL.ARSR = ARS-R: Automatikus sebességszabályozó rendszer ARS-R mód kapcsoló
Common.ALL.ALS = ALS: Automatikus vonat jeladás
Common.ALL.RCARS = RC-ARS: ARS áramköreinek lekapcsolása
Common.ALL.RC1 = RC-1: ARS áramköreinek lekapcsolása
Common.ALL.EPK = ARS elektropneumatikus szelep (EPK)
Common.ALL.EPV = ARS elektropneumatikus szelep (EPV)
Common.ARS.LN = LN: Irányjelző
Common.ARS.KT = KT: Fék visszajelző lámpa
Common.ARS.VD = VD: Vezérlés kikapcsolva ARS által
Common.ARS.Freq = ALS dekóder kapcsoló
Common.ARS.FreqD = (fel 1/5, le 2/6)
Common.ARS.FreqU = (fel 2/6, le 1/5)
Common.ARS.VP = "Tartalék vonat" mód
Common.ARS.RS = RS: Sebesség egyenlőség (a következő szakasz sebességkorlátozása egyenlő vagy gyorsabb az aktuális értéknél)
Common.ARS.AB = ARS Automatikus blokkolás mód
Common.ARS.ABButton = ARS Automatikus blokkolás mód gomb
Common.ARS.ABDriver = (vezetői)
Common.ARS.ABHelper = (segédvezetői)
Common.ARS.AV = Elsődleges ARS-MP egység hiba
Common.ARS.AV1 = Tartalék ARS-MP egység hiba
Common.ARS.AB2 = Automatikus blokkolás mód gomb
Common.ARS.ARS = ARS mód
Common.ARS.LRD = LRD: Mozgatás engedély (ALS 0-ás jelzés esetén)
Common.ARS.VRD = VRD: Mozgatás engedély(ALS 0-ás jelzés esetén)
Common.ARS.KB = KB: Éberségi gomb/pedál
Common.ARS.KVT = KVT: Féknyugtázó gomb
Common.ARS.KVTR = KVT: ARS-R féknyugtázó gomb
Common.ARS.04 = OCh: Nincs ARS frekvencia
Common.ARS.N4 = NCh: Nincs ARS frekvencia
Common.ARS.0 = 0: ARS stop jelzés
Common.ARS.40 = Maximum megengedett sebesség 40 km/h
Common.ARS.60 = Maximum megengedett sebesség 60 km/h
Common.ARS.70 = Maximum megengedett sebesség 70 km/h
Common.ARS.80 = Maximum megengedett sebesség 80 km/h
Common.ALL.RCBPS = RC-BPS: Megfutamodás elleni egység kapcsoló
Common.BPS.On = Megfutamodás elleni egység üzem
Common.BPS.Err = Megfutamodás elleni egység hiba
Common.BPS.Fail = Megfutamodás elleni egység meghibásodás
Commom.NMnUAVA.NMPressureLow = Alacsony légvezetéki nyomás visszajelző
Commom.NMnUAVA.UAVATriggered = UAVA kiiktatva
Common.ALL.LSD = Vonat ajtó állapot visszajelző (ajtók zárva)
Common.ALL.L1w = Első vezeték visszajelző (menet mód)
Common.ALL.L2w = Második vezeték visszajelző (reosztát kontroller mozgás)
Common.ALL.L6w = Hatodik vezeték visszajelző (fék mód)
Common.ALL.Horn = Kürt
Common.ALL.DriverValveBLDisconnect = Fékvezeték elzáró csap
Common.ALL.DriverValveTLDisconnect = Töltővezeték elzáró csap
Common.ALL.DriverValveDisconnect = Légfék elzáró csap
Common.ALL.KRMH = KRMSH: Légfék vészeseti bekapcsoló
Common.ALL.RVTB = RVTB: Biztonsági fék szelep
Common.ALL.FrontBrakeLineIsolationToggle = Fékvezeték elzáró csap
Common.ALL.FrontTrainLineIsolationToggle = Töltővezeték elzáró csap
Common.ALL.RearTrainLineIsolationToggle = Töltővezeték elzáró csap
Common.ALL.RearBrakeLineIsolationToggle = Fékvezeték elzáró csap
Common.ALL.UAVA = UAVA: Automatikus autostop kikapcsoló\n(légvezetéki nyomás csökkentése esetén)
Common.ALL.UAVA2 = UAVA: Automatikus autostop kikapcsoló
Common.ALL.UAVAContact = UAVA kontakt reset
Common.ALL.OAVU = OAVU: AVU kikapcsolása
Common.ALL.LAVU = AVU bekapcsolva
Common.ALL.GV = Főkapcsoló
Common.ALL.AirDistributor = VRN: Levegőelosztó megszakító
Common.ALL.CabinDoor = Fülkeajtó
Common.ALL.PassDoor = Ajtó az utastérbe
Common.ALL.FrontDoor = Átjáróajtó
Common.ALL.RearDoor = Átjáróajtó
Common.ALL.OtsekDoor1 = Első hátfalszekrény nyitó fogantyú
Common.ALL.OtsekDoor2 = Második hátfalszekrény nyitó fogantyú
Common.ALL.CouchCap = Ülés kiemelése
Common.ALL.UNCh = UNCh: Alacsony frekvenciás erősítő kapcsoló
Common.ALL.ES = ES: Vészhelyzeti kommunikációs kapcsoló
Common.ALL.GCab = Hangszóró: Kabinhangszóró kapcsoló
Common.ALL.UPO = UPO: Utastájékoztató
Common.ALL.R_Radio = Utastájékoztató
Common.ALL.AnnPlay = Utastájékoztató visszajelző lámpa
#RRI
Train.Common.RRI = RRI: Rádió-relé utastájékoztató
Common.RRI.RRIUp = RRI: Fel
Common.RRI.RRIDown = RRI: Le
Common.RRI.RRILeft = RRI: Balra
Common.RRI.RRIRight = RRI: Jobbra
Common.RRI.RRIEnableToggle = RRI: Áramellátás
Common.RRI.RRIRewindSet2 = RRI: Előretekerés
Common.RRI.RRIRewindSet0 = RRI: Visszatekerés
Common.RRI.RRIAmplifierToggle = RRI: Erősítő
Common.RRI.RRIOn = RRI üzem visszajelző
#ASNP
Train.Common.ASNP = ASNP
Common.ASNP.ASNPMenu = ASNP: Menü
Common.ASNP.ASNPUp = ASNP: Fel
Common.ASNP.ASNPDown = ASNP: Le
Common.ASNP.ASNPOn = ASNP: Áramellátás
#PVK
Common.CabVent.PVK- = Fülkeszellőztetés erejének csökkentése
Common.CabVent.PVK+ = Fülkeszellőztetés erejének növelése
#IGLA
Train.Common.IGLA = IGLA
Common.IGLA.Button1Up = IGLA: Első gomb fel
Common.IGLA.Button1 = IGLA: Első gomb
Common.IGLA.Button1Down = IGLA: Első gomb le
Common.IGLA.Button2Up = IGLA: Második gomb fel
Common.IGLA.Button2 = IGLA: Második gomb
Common.IGLA.Button2Down = IGLA: Második gomb le
Common.IGLA.Button23 = IGLA: Második és Harmadik gomb
Common.IGLA.Button3 = IGLA: Harmadik gomb
Common.IGLA.Button4 = IGLA: Negyedik gomb
Common.IGLA.IGLASR = IGLA: Áramellátás
Common.IGLA.IGLARX = IGLA: Nincs kapcsolat
Common.IGLA.IGLAErr = IGLA: Hiba
Common.IGLA.IGLAOSP = IGLA: Tűzoltó rendszer üzemben
Common.IGLA.IGLAPI = IGLA: Tűz
Common.IGLA.IGLAOff = IGLA: Nagyfeszültségű áramkörök ki
#BZOS
Common.BZOS.On = Riasztó kapcsoló
Common.BZOS.VH1 = Riasztó bekapcsolva
Common.BZOS.VH2 = Riasztó kioldva
Common.BZOS.Engaged = Riasztó kioldva
#Train helpers common
Common.ALL.SpeedCurr = Jelenlegi sebesség
Common.ALL.SpeedAccept = Megengedett sebesség
Common.ALL.SpeedAttent = Következő szakasz megengedett sebesség
Common.ALL.Speedometer = Sebességmérő
Common.ALL.BLTLPressure = Nyomás a légvezetékekben (piros: fékvezeték, fekete: töltővezeték)
Common.ALL.BCPressure = Fékhenger nyomás
Common.ALL.EnginesCurrent = Motor áramerősség (A)
Common.ALL.EnginesCurrent1 = Első vontatómotorok áramerőssége (A)
Common.ALL.EnginesCurrent2 = Második vontatómotorok áramerőssége (A)
Common.ALL.EnginesVoltage = Motor feszültség (kV)
Common.ALL.BatteryVoltage = Akkumulátor feszültség (V)
Common.ALL.BatteryCurrent = Akkumulátor áramerősség (A)
Common.ALL.HighVoltage = Magasfeszültség (kV)
]] |
require 'utils'
_G.data = {}
local all_recipes = {}
function data:extend( p_recipe_list )
all_recipes = table.union(all_recipes, p_recipe_list)
end
require 'recipe.ammo'
require 'recipe.capsule'
require 'recipe.demo-furnace-recipe'
require 'recipe.demo-recipe'
require 'recipe.demo-turret'
require 'recipe.equipment'
require 'recipe.fluid-recipe'
require 'recipe.inserter'
require 'recipe.module'
require 'recipe.recipe'
require 'recipe.turret'
local recipe_map = {}
local items = {}
for _, _recipe in ipairs(all_recipes) do
local recipe = _recipe
if _recipe.normal then
recipe = _recipe.normal
end
if recipe.result then
table.insert(items, recipe.result)
recipe_map[recipe.result] = recipe
elseif recipe.results then
for _, v in ipairs(recipe.results) do
table.insert(items, v.name or v[1])
recipe_map[v.name or v[1]] = recipe
end
else
assert(false, "xxx")
end
end
-- print(table.tostring((table.filter(table.groupBy(items, function ( v )
-- return v
-- end), function ( v )
-- return #v > 1
-- end))))
items = table.unique(items)
local locale = require 'locale'
-- print(table.tostring(table.map(function ( v )
-- return locale(v) .. ' ' .. v
-- end, items)))
local final_items = {
'crude-oil',
'copper-plate',
'iron-plate',
'stone-brick',
'steel-plate',
'petroleum-gas',
'water',
'coal',
'stone-brick',
'stone',
'heavy-oil',
'heavy-oil',
'light-oil',
'sulfuric-acid',
-- 'advanced-circuit',
}
-- local products = {
-- -- 'iron-gear-wheel',
-- -- 'electronic-circuit',
-- 'automation-science-pack',
-- 'chemical-science-pack',
-- 'logistic-science-pack',
-- 'military-science-pack',
-- 'production-science-pack',
-- 'utility-science-pack',
-- }
local function resolve( products )
local resolved = {}
local queue = table.simpleClone(products)
while #queue > 0 do
local top = queue[1]
table.remove(queue, 1)
if resolved[top] then
elseif table.includes(final_items, top) then
resolved[top] = true
elseif not recipe_map[top] then
resolved[top] = true
else
resolved[top] = true
local recipe = recipe_map[top]
io.stderr:write('top ', top, locale(top), '\n')
for _, v in ipairs(recipe.ingredients) do
table.insert(queue, v.name or v[1])
end
end
end
local edges = {}
for item, _ in pairs(resolved) do
if not table.includes(final_items, item) then
for _, v in ipairs((recipe_map[item] or {}).ingredients or {}) do
table.insert(edges, {v.name or v[1], item})
end
end
end
edges = table.map(function ( v )
return string.format("%s -> %s", locale(v[1]), locale(v[2]))
end, edges)
edges = table.concat(edges, '\n')
-- print('edges', edges)
return 'digraph g {\n' .. edges .. '\n}\n'
end
-- print(resolve())
local function print_non_final_items( ... )
local items = table.filter(items, function ( v )
return not table.includes(final_items, v)
end)
for _, v in ipairs(items) do
print(v .. ',' .. locale(v))
end
end
if arg[1] == 'resolve' then
-- print()
local products = io.read('*all'):split('\n')
-- print(table.tostring(products))
products = table.map(function(v)
v = string.gsub(v, '\r', '')
v = string.gsub(v, ' ', '')
return v
end, products)
print(resolve(products))
-- print(resolve())
elseif arg[1] == 'non-final-items' then
print_non_final_items()
end
|
local M = {}
function M.apply(colors)
local set_highlight = require('lighthaus.utils').set_highlight
set_highlight('StartifyBracket', colors.grey)
set_highlight('StartifyFile', colors.green2)
set_highlight('StartifyFooter', colors.grey)
set_highlight('StartifyHeader', colors.cyan2)
set_highlight('StartifyNumber', colors.purple)
set_highlight('StartifyPath', colors.white2, colors.bg)
set_highlight('StartifySection', colors.blue2)
set_highlight('StartifySelect', colors.bg, colors.hl_yellow)
set_highlight('StartifySlash', colors.white2)
set_highlight('StartifySpecial', colors.hl_orange)
end
return M
|
-- tolua: typedef class
-- Written by Waldemar Celes
-- TeCGraf/PUC-Rio
-- Jul 1998
-- $Id$
-- This code is free software; you can redistribute it and/or modify it.
-- The software provided hereunder is on an "as is" basis, and
-- the author has no obligation to provide maintenance, support, updates,
-- enhancements, or modifications.
-- Typedef class
-- Represents a type synonym.
-- The 'de facto' type replaces the typedef before the
-- remaining code is parsed.
-- The following fields are stored:
-- utype = typedef name
-- type = 'the facto' type
-- mod = modifiers to the 'de facto' type
classTypedef = {
utype = '',
mod = '',
type = ''
}
classTypedef.__index = classTypedef
-- Print method
function classTypedef:print (ident,close)
print(ident.."Typedef{")
print(ident.." utype = '"..self.utype.."',")
print(ident.." mod = '"..self.mod.."',")
print(ident.." type = '"..self.type.."',")
print(ident.."}"..close)
end
-- Return it's not a variable
function classTypedef:isvariable ()
return false
end
-- Internal constructor
function _Typedef (t)
setmetatable(t,classTypedef)
t.type = resolve_template_types(t.type)
appendtypedef(t)
return t
end
-- Constructor
-- Expects one string representing the type definition.
function Typedef (s)
if strfind(string.gsub(s, '%b<>', ''),'[%*&]') then
tolua_error("#invalid typedef: pointers (and references) are not supported")
end
local o = {mod = ''}
if string.find(s, "[<>]") then
_,_,o.type,o.utype = string.find(s, "^%s*([^<>]+%b<>[^%s]*)%s+(.-)$")
else
local t = split(gsub(s,"%s%s*"," ")," ")
o = {
utype = t[t.n],
type = t[t.n-1],
mod = concat(t,1,t.n-2),
}
end
return _Typedef(o)
end
|
-- TODO: Persist data between save and load of game?
-- TODO: Add clear navigation command?
if onServer() then
printlog("NAV: On Server")
-- Imports
package.path = package.path .. ";data/scripts/lib/?.lua"
require( "stringutility" )
require( "faction" )
-- Module Scoped Variables
local factionNavigationTargets
-- Initialization Function: Process the Navigate command
function initialize( coords, factionIndex, ... )
-- Initialize Module Variables
factionNavigationTargets = {}
-- If no faction index is provided then set it based on the calling entity
if not factionIndex then
factionIndex = Entity().factionIndex
end
local faction = Faction( factionIndex )
-- Set on faction object for retrieval by players who connect later
faction:setValue( 'navigate_to_x', coords.x )
faction:setValue( 'navigate_to_y', coords.y )
-- Update the module's table for persistant storage
factionNavigationTargets[ factionIndex ] = coords
-- Propegate navigation command to all online players in the current player's faction
local players = { Server():getOnlinePlayers() }
for _, player in ipairs( players ) do
if player.index == factionIndex then
player:sendChatMessage( "Server", 0, "Faction navigation target set to (" .. coords.x .. ":" .. coords.y .. ")" )
invokeClientFunction( player, "showSector", coords.x, coords.y )
end
end
-- Finish execution and unload lua module
terminate()
end
-- Instruct the player to navigate to a particular location
function showSector( x, y )
-- GalaxyMap():setSelectedCoordinates( x, y )
-- GalaxyMap():lookAt( x, y )
GalaxyMap():show( x, y )
end
end
|
local Log = {}
--- Adds a log entry using Plenary.log
---@param msg any
---@param level string [same as vim.log.log_levels]
function Log:add_entry(msg, level)
assert(type(level) == "string")
if self.__handle then
-- plenary uses lower-case log levels
self.__handle[level:lower()](msg)
end
local status_ok, plenary = pcall(require, "plenary")
if status_ok then
local default_opts = { plugin = "lunarvim", level = lvim.log.level }
local handle = plenary.log.new(default_opts)
handle[level:lower()](msg)
self.__handle = handle
end
-- don't do anything if plenary is not available
end
---Retrieves the path of the logfile
---@return string path of the logfile
function Log:get_path()
return string.format("%s/%s.log", vim.fn.stdpath "cache", "lunarvim")
end
---Add a log entry at TRACE level
---@param msg any
function Log:trace(msg)
self:add_entry(msg, "TRACE")
end
---Add a log entry at DEBUG level
---@param msg any
function Log:debug(msg)
self:add_entry(msg, "DEBUG")
end
---Add a log entry at INFO level
---@param msg any
function Log:info(msg)
self:add_entry(msg, "INFO")
end
---Add a log entry at WARN level
---@param msg any
function Log:warn(msg)
self:add_entry(msg, "WARN")
end
---Add a log entry at ERROR level
---@param msg any
function Log:error(msg)
self:add_entry(msg, "ERROR")
end
setmetatable({}, Log)
return Log
|
require 'plugins.galaxyline.setting'
|
--[[lit-meta
name = "commandia"
version = "0.0.1"
dependencies = {}
description = "A simple to use commands manager/handler for the Discord library Discordia"
tags = { "discordia", "commandia", "discord", "bot", "commands" }
license = "MIT"
author = { name = "Bilal2453" }
]]
return {
Manager = require('./objects/Manager'),
VERSION = '0.0.1-ALPHA'
} |
-- A set that acts like an array
-- Uses 2 tables for O(1) lookups of keys or values
---@class ArraySet
---@field arr table<any, any>
---@field set table<any, any>
local ArraySet = {}
---@param arr? table<any, any>
function ArraySet.new(arr)
arr = arr or {}
local self = setmetatable({ arr = {}, set = {} }, ArraySet)
for i = 1, #arr do
table.insert(self, arr[i])
end
return self
end
-- Static to prevent name collisions
---@param set ArraySet
---@param name any
function ArraySet.has(set, name)
return set.set[name]
end
function ArraySet:__index(iOrV)
return self.arr[iOrV] or self.set[iOrV]
end
function ArraySet:__newindex(index, value)
if self.set[value] then
return
end
local prevValue = not value and self.arr[index]
self.arr[index] = value
if value then
self.set[value] = index
return
end
local last, i
for k, v in pairs(self.set) do
if v == last then
self.set[i] = nil
return
end
last = v
i = k
end
self.set[prevValue] = nil
end
function ArraySet:__len()
return #self.arr
end
function ArraySet:__pairs()
return next, self.arr, nil
end
return ArraySet
|
-- -*- lua -*-
--
-- Module file created by Anaconda builder
--
whatis([[Name : anaconda]])
whatis([[Version : 2021-03-tf2]])
help([[This is an automatically created Anaconda installation.]])
prepend_path("PATH", "/usr/local/modules/miniconda/bin/")
setenv("CONDA_PREFIX", "/usr/local/modules/miniconda/") |
Locales['br'] = {
['bought'] = 'você comprou ~b~1x ',
['not_enough'] = 'você não tem ~r~dinheiro suficiente~s~.',
['press_menu'] = 'Pressione ~INPUT_CONTEXT~ para acessar a loja.',
['press_menu_mafia'] = 'Pressione ~INPUT_CONTEXT~ para acessar a loja.\n~INPUT_REPLAY_SCREENSHOT~ to racket',
['racketting'] = 'racketting...',
['shop'] = 'Comprar',
['shops'] = 'Lojas',
}
|
print("Including Common/Draw/* files")
dofile(CommonScriptsFolder.."/Draw/CreateSprite.lua")
dofile(CommonScriptsFolder.."/Draw/CreateMultiTextLine.lua") |
-- If your action has no objects, do: name = prop_none and set all numerical values to 0.0".
config = {
newUsers = {
DefaultDepartment = "civilian",
DefaultRank = 0,
DefaultPermissionLevel = 0
},
bindings = {
interact_position = 51, -- E
use_police_menu = 166, -- F5
accept_fine = 246, -- Y
refuse_fine = 45 -- R
},
actions = {
box_carry = {
name = "Carry Package",
currentAction = "box_carry",
animDictionary = "anim@heists@box_carry@",
animationName = "idle",
animObjects = {
name = "prop_cs_cardbox_01",
--- Offsets: ---
xoff = 0.0,
yoff = 0.0,
zoff = 0.0,
-- Rotations: --
xrot = 0.0,
yrot = 0.0,
zrot = 0.0,
},
},
pizza_delivery = {
name = "Deliver Pizza",
currentAction = "pizza_delivery",
animDictionary = "anim@heists@box_carry@",
animationName = "idle",
animObjects = {
name = "prop_pizza_box_01",
--- Offsets: ---
xoff = 0.0,
yoff = -0.25,
zoff = -0.2,
-- Rotations: --
xrot = 0.0,
yrot = 0.0,
zrot = 0.0,
},
},
crate_delivery = {
name = "Carry Crate",
currentAction = "crate_delivery",
animDictionary = "anim@heists@box_carry@",
animationName = "idle",
animObjects = {
name = "prop_crate_07a",
--- Offsets: ---
xoff = 0.0,
yoff = -0.25,
zoff = -0.2,
-- Rotations: --
xrot = 180.0,
yrot = 180.0,
zrot = 90.0,
},
},
},
}
i18n.setLang(tostring(config.lang)) |
return {'meyerode','meyer','meys'} |
if SL.Global.GameMode ~= "Casual" then return end
return Def.BitmapText{
Font="Common Bold",
Text=THEME:GetString("ScreenEvaluation", "PressStartToContinue"),
InitCommand=function(self)
self:xy(_screen.cx, _screen.cy + 170):zoom(0.55)
:diffusealpha(0):shadowlength(0.5)
end,
OnCommand=function(self)
self:sleep(3):diffusealpha(1)
:diffuseshift():effectperiod(3)
:effectcolor1(1,1,1,0):effectcolor2(1,1,1,1)
end
} |
local M = {}
local cb_list = require'cb_list'.get_list() --list of callbacks for readings
local vlring=require('vl53ring')
local table_sort = table.sort
--CONSTANTS
local N_SENSORS = 6
local N_SENSORS_2= N_SENSORS/2
assert(N_SENSORS %2 == 0, 'median optimized for par N_SENSORS')
local WIN_SIZE = 3 -- global, store history distance values to compute low pass filter
local dmin = 80
local dmax = 600
local alpha_lpf = 1 -- low pass filter update parameter
local MASK_ON_SENSORS = {true, true, true, true, true, true}
local rate = 50 -- actualization rate in seconds
local sensors = { -- sensors ports
{16},
{17},
{2},
{14},
{12},
{13},
}
-- VARIABLES
local norm_d = {0, 0, 0, 0, 0, 0} -- normalized measurements
local previous_d = {0, 0, 0, 0, 0, 0} -- previous norm_d
M.norm_d = norm_d
M.previous_d = previous_d
M.cb_list = cb_list
local line = function(x1, y1, x2, y2, x) -- evalua la funcion de una recta en x dado dos puntos (x1, y1) y (x2, y2)
local y = (y2-y1)/(x2-x1)*(x-x1)+y1
return y
end
M.get_reading_cb = function ()
local dist_callback = function(d1,d2,d3,d4,d5,d6)
local laser_data = {d1,d2,d3,d4,d5,d6}
for i = 1,N_SENSORS do
previous_d[i] = norm_d[i]
if laser_data[i] > dmin and laser_data[i] < dmax and MASK_ON_SENSORS[i] then
norm_d[i] = line(dmin, 0, dmax, 1, laser_data[i]) -- 0..1
else
norm_d[i] = 0
end
end
end
return dist_callback
end
M.get_filtering_cb = function ()
local sensors_win = {} -- create sensors readings matrix
local current_wp = 0 -- global, curren position in the sensor readings history window
local act_d = {0, 0, 0, 0, 0, 0} -- measures filtered
--[[
local median = function (numlist)
if type(numlist) ~= 'table' then return numlist end
table.sort(numlist)
if #numlist %2 == 0 then return (numlist[#numlist/2] + numlist[#numlist/2+1]) / 2 end
return numlist[math.ceil(#numlist/2)]
end
--]]
-- version optimizada para #numlist = N_SENSORS
local median = function (numlist)
table_sort(numlist)
return (numlist[N_SENSORS_2] + numlist[N_SENSORS_2]) / 2
end
-- init sensors window
for i=1,N_SENSORS do
sensors_win[i] = {WIN_SIZE} -- create a new row
for j=1,WIN_SIZE do
sensors_win[i][j] = 0
end
end
local dist_callback_filter = function(d1,d2,d3,d4,d5,d6)
local laser_data = {d1,d2,d3,d4,d5,d6}
for i = 1,N_SENSORS do
sensors_win[i][current_wp] = laser_data[i]
act_d[i] = act_d[i] + alpha_lpf*(median(sensors_win[i])-act_d[i])
previous_d[i] = norm_d[i]
if act_d[i] > dmin and act_d[i] < dmax and MASK_ON_SENSORS[i] then
norm_d[i] = line(dmin, 0, dmax, 1, act_d[i]) -- 0..1
else
norm_d[i] = 0
end
end
current_wp = (current_wp + 1) % WIN_SIZE
end
return dist_callback_filter
end
M.init = function()
vlring.init(sensors)
vlring.set_measurement_timing_budget(5000)
vlring.get_continuous(rate, cb_list.call)
end
return M |
--[[
GD50 2018
Pong Remake
pong-4
"The Ball Update"
-- Main Program --
Author: Colton Ogden
cogden@cs50.harvard.edu
Originally programmed by Atari in 1972. Features two
paddles, controlled by players, with the goal of getting
the ball past your opponent's edge. First to 10 points wins.
This version is built to more closely resemble the NES than
the original Pong machines or the Atari 2600 in terms of
resolution, though in widescreen (16:9) so it looks nicer on
modern systems.
]]
-- push is a library that will allow us to draw our game at a virtual
-- resolution, instead of however large our window is; used to provide
-- a more retro aesthetic
--
-- https://github.com/Ulydev/push
push = require 'push'
WINDOW_WIDTH = 1280
WINDOW_HEIGHT = 720
VIRTUAL_WIDTH = 432
VIRTUAL_HEIGHT = 243
-- speed at which we will move our paddle; multiplied by dt in update
PADDLE_SPEED = 200
--[[
Runs when the game first starts up, only once; used to initialize the game.
]]
function love.load()
love.graphics.setDefaultFilter('nearest', 'nearest')
-- "seed" the RNG so that calls to random are always random
-- use the current time, since that will vary on startup every time
math.randomseed(os.time())
-- more "retro-looking" font object we can use for any text
smallFont = love.graphics.newFont('font.ttf', 8)
-- set LÖVE2D's active font to the smallFont obect
love.graphics.setFont(smallFont)
-- initialize window with virtual resolution
push:setupScreen(VIRTUAL_WIDTH, VIRTUAL_HEIGHT, WINDOW_WIDTH, WINDOW_HEIGHT, {
fullscreen = false,
resizable = false,
vsync = true
})
-- paddle positions on the Y axis (they can only move up or down)
player1Y = 30
player2Y = VIRTUAL_HEIGHT - 50
-- velocity and position variables for our ball when play starts
ballX = VIRTUAL_WIDTH / 2 - 2
ballY = VIRTUAL_HEIGHT / 2 - 2
-- math.random returns a random value between the left and right number
ballDX = math.random(2) == 1 and 100 or -100
ballDY = math.random(-50, 50)
-- game state variable used to transition between different parts of the game
-- (used for beginning, menus, main game, high score list, etc.)
-- we will use this to determine behavior during render and update
gameState = 'start'
end
--[[
Runs every frame, with "dt" passed in, our delta in seconds
since the last frame, which LÖVE2D supplies us.
]]
function love.update(dt)
-- player 1 movement
if love.keyboard.isDown('w') then
-- add negative paddle speed to current Y scaled by deltaTime
-- now, we clamp our position between the bounds of the screen
-- math.max returns the greater of two values; 0 and player Y
-- will ensure we don't go above it
player1Y = math.max(0, player1Y + -PADDLE_SPEED * dt)
elseif love.keyboard.isDown('s') then
-- add positive paddle speed to current Y scaled by deltaTime
-- math.min returns the lesser of two values; bottom of the egde minus paddle height
-- and player Y will ensure we don't go below it
player1Y = math.min(VIRTUAL_HEIGHT - 20, player1Y + PADDLE_SPEED * dt)
end
-- player 2 movement
if love.keyboard.isDown('up') then
-- add negative paddle speed to current Y scaled by deltaTime
player2Y = math.max(0, player2Y + -PADDLE_SPEED * dt)
elseif love.keyboard.isDown('down') then
-- add positive paddle speed to current Y scaled by deltaTime
player2Y = math.min(VIRTUAL_HEIGHT - 20, player2Y + PADDLE_SPEED * dt)
end
-- update our ball based on its DX and DY only if we're in play state;
-- scale the velocity by dt so movement is framerate-independent
if gameState == 'play' then
ballX = ballX + ballDX * dt
ballY = ballY + ballDY * dt
end
end
--[[
Keyboard handling, called by LÖVE2D each frame;
passes in the key we pressed so we can access.
]]
function love.keypressed(key)
-- keys can be accessed by string name
if key == 'escape' then
-- function LÖVE gives us to terminate application
love.event.quit()
-- if we press enter during the start state of the game, we'll go into play mode
-- during play mode, the ball will move in a random direction
elseif key == 'enter' or key == 'return' then
if gameState == 'start' then
gameState = 'play'
else
gameState = 'start'
-- start ball's position in the middle of the screen
ballX = VIRTUAL_WIDTH / 2 - 2
ballY = VIRTUAL_HEIGHT / 2 - 2
-- given ball's x and y velocity a random starting value
-- the and/or pattern here is Lua's way of accomplishing a ternary operation
-- in other programming languages like C
ballDX = math.random(2) == 1 and 100 or -100
ballDY = math.random(-50, 50) * 1.5
end
end
end
--[[
Called after update by LÖVE2D, used to draw anything to the screen,
updated or otherwise.
]]
function love.draw()
-- begin rendering at virtual resolution
push:apply('start')
-- clear the screen with a specific color; in this case, a color similar
-- to some versions of the original Pong
love.graphics.clear(40/255, 45/255, 52/255, 255/255)
-- draw different things based on the state of the game
love.graphics.setFont(smallFont)
if gameState == 'start' then
love.graphics.printf('Hello Start State!', 0, 20, VIRTUAL_WIDTH, 'center')
else
love.graphics.printf('Hello Play State!', 0, 20, VIRTUAL_WIDTH, 'center')
end
-- render first paddle (left side), now using the players' Y variable
love.graphics.rectangle('fill', 10, player1Y, 5, 20)
-- render second paddle (right side)
love.graphics.rectangle('fill', VIRTUAL_WIDTH - 10, player2Y, 5, 20)
-- render ball (center)
love.graphics.rectangle('fill', ballX, ballY, 4, 4)
-- end rendering at virtual resolution
push:apply('end')
end
|
local fb = require("swig_fribidi")
local iconv = require("iconv")
local text8 = "Ленивый рыжий кот شَدَّة latin العَرَبِية";
local ic = assert(iconv.open("UTF-32LE", "UTF-8"))
local text = ic:iconv(text8)
local nLineSize = #text/4
local pTempLogicalLine = fb.new_FriBidiCharArray(nLineSize)
local pTempVisualLine = fb.new_FriBidiCharArray(nLineSize)
local pTempPositionLogicToVisual = fb.new_FriBidiStrIndexArray(nLineSize)
local pTempBidiTypes = fb.new_FriBidiCharTypeArray(nLineSize)
local pTempEmbeddingLevels = fb.new_FriBidiLevelArray(nLineSize)
local pTempJtypes = fb.new_FriBidiJoiningTypeArray(nLineSize)
local pTempArProps = fb.new_FriBidiArabicPropArray(nLineSize)
--for i = 1, #text, 4 do
--local c = (string.byte(text,i+3) << 24)|(string.byte(text,i+2) << 16|(string.byte(text,i+1) << 8))|(string.byte(text,i))
--fb.FriBidiCharArray_setitem(pTempLogicalLine, (i-1)//4, c)
--end
fb.memcpy_FriBidiCharArray(pTempLogicalLine, text, #text)
fb.fribidi_get_bidi_types(pTempLogicalLine, nLineSize, pTempBidiTypes);
local resolveParDir, baseDirection = fb.get_par_embedding_levels_ref(pTempBidiTypes, nLineSize, fb.FRIBIDI_PAR_LTR, pTempEmbeddingLevels)
fb.fribidi_get_joining_types(pTempLogicalLine, nLineSize, pTempJtypes);
fb.memcpy_FriBidiJoiningTypeArray(pTempArProps, pTempJtypes, nLineSize);
fb.fribidi_join_arabic(pTempBidiTypes, nLineSize, pTempEmbeddingLevels, pTempArProps);
fb.fribidi_shape(fb.FRIBIDI_FLAG_SHAPE_MIRRORING | fb.FRIBIDI_FLAG_SHAPE_ARAB_PRES | fb.FRIBIDI_FLAG_SHAPE_ARAB_LIGA, pTempEmbeddingLevels, nLineSize, pTempArProps, pTempLogicalLine);
fb.memcpy_FriBidiCharArray2(pTempVisualLine, pTempLogicalLine, nLineSize);
for i = 0, nLineSize-1 do
fb.FriBidiStrIndexArray_setitem(pTempPositionLogicToVisual, i, i)
end
local levels = fb.fribidi_reorder_line(fb.FRIBIDI_FLAGS_ARABIC, pTempBidiTypes, nLineSize, 0, baseDirection, pTempEmbeddingLevels, pTempVisualLine, pTempPositionLogicToVisual);
for i = 0, nLineSize-1 do
print(string.format("%i => %i", i, fb.FriBidiStrIndexArray_getitem(pTempPositionLogicToVisual, i)))
end
|
local function set_alpha(name, a)
local player = minetest.get_player_by_name(name)
if not player then
return false
else
local nametag_attributes = player:get_nametag_attributes()
nametag_attributes.color.a = a
player:set_nametag_attributes(nametag_attributes)
return true
end
end
minetest.register_chatcommand("hidename", {
description = "Hide your nametag",
privs = {interact = true},
func = function(name, param)
if set_alpha(name, 0) then
return true, "Your nametag is hidden"
else
return false, "Could not hide nametag"
end
end
})
minetest.register_chatcommand("showname", {
description = "Show your nametag",
privs = {interact = true},
func = function(name, param)
if set_alpha(name, 255) then
return true, "Your nametag is showing"
else
return false, "Could not show nametag"
end
end
})
|
-- pluginable_mixin
-- created on 2021/8/25
-- author @zoloypzuo
local IPlugin = {
Execute = nil; -- function
userData = nil; -- void*
}
local PluginableMixin = Mixin(function(self)
self.plugins = {} -- List[IPlugin]
end)
function PluginableMixin:AddPlugin(type_, ...)
assert(type(type_) == "table", "T should derive from IPlugin")
local inst = type_(...)
self.plugins[#self.plugins + 1] = inst
return inst
end
function PluginableMixin:GetPlugin(type_)
-- TODO
end
function PluginableMixin:ExecutePlugins()
for i, plugin in ipairs(self.plugins) do
plugin:Execute()
end
end
function PluginableMixin:RemoveAllPlugins()
self.plugins = {}
end
return PluginableMixin |
-- credit to atom0s for help with decompiling
-- Decompiled using luadec 2.2 rev: for Lua 5.1 from https://github.com/viruscamp/luadec
return {
EXTRA_REWARD = {},
MONTHLY_CARD = {
[1001] = {
ActiveReward = {
{ 1001002, 300 },
},
DayReward = {
{ 1001002, 100 },
},
Days = 30,
ID = 1001,
Name = "Monthly Card 1 Android",
Type = 1,
},
[1002] = {
ActiveReward = {
{ 1001002, 300 },
},
DayReward = {
{ 1001002, 100 },
},
Days = 30,
ID = 1002,
Name = "Monthly Card 1 Apple",
Type = 1,
},
[2001] = {
DayReward = {
{ 1029992, 2 },
{ 1001002, 50 },
},
Days = 7,
ID = 2001,
IconScale = { 1, 1 },
IsWeekCardShow = true,
Name = "Weekly Card 1 Android",
ShowIconList = {
"σòåσƒÄ_Σ╕èµû╣Φ┤ºσ╕üµáÅΣ╜ôσè¢σ¢╛µá\135",
"通用H_货币图标_钻石",
},
ShowNumList = { 100, 50 },
TitleImageList = "σæ¿σìí_Σ╜ôσè¢σìíµûçσ¡\151",
Type = 2,
},
[2002] = {
DayReward = {
{ 1029992, 2 },
{ 1001002, 50 },
},
Days = 7,
ID = 2002,
IconScale = { 1, 1 },
IsWeekCardShow = true,
Name = "Weekly Card 1 Apple",
ShowIconList = {
"σòåσƒÄ_Σ╕èµû╣Φ┤ºσ╕üµáÅΣ╜ôσè¢σ¢╛µá\135",
"通用H_货币图标_钻石",
},
ShowNumList = { 100, 50 },
TitleImageList = "σæ¿σìí_Σ╜ôσè¢σìíµûçσ¡\151",
Type = 2,
},
[2003] = {
DayReward = {
{ 1021012, 10 },
{ 1001002, 50 },
},
Days = 7,
ID = 2003,
IconScale = { 0.48, 1 },
Name = "Weekly Card 2 Android",
ShowIconList = { "夜战_门票", "通用H_货币图标_钻石" },
ShowNumList = { 10, 50 },
TitleImageList = "σæ¿σìí_µîæµêÿσìíµûçσ¡\151",
Type = 2,
},
[2004] = {
DayReward = {
{ 1021012, 10 },
{ 1001002, 50 },
},
Days = 7,
ID = 2004,
IconScale = { 0.48, 1 },
Name = "Weekly Card 2 Apple",
ShowIconList = { "夜战_门票", "通用H_货币图标_钻石" },
ShowNumList = { 10, 50 },
TitleImageList = "σæ¿σìí_µîæµêÿσìíµûçσ¡\151",
Type = 2,
},
},
}
|
function SFX()
-- sound = love.audio.newSource("pling.wav", "static") -- the "static" tells LÖVE to load the file into memory, good for short sound effects
local bgm = love.audio.newSource("src/sounds/bgm.mp3", "stream") -- the "stream" tells LÖVE to stream the file from disk, good for longer music tracks
bgm:setVolume(0.1)
bgm:setLooping(true)
local effects = {
ship_explosion = love.audio.newSource("src/sounds/explosion_player.ogg", "static"),
asteroid_explosion = love.audio.newSource("src/sounds/explosion_asteroid.ogg", "static"),
laser = love.audio.newSource("src/sounds/laser.ogg", "static"),
select = love.audio.newSource("src/sounds/option_select.ogg", "static"),
thruster = love.audio.newSource("src/sounds/thruster_loud.ogg", "static"),
}
return {
fx_played = false,
setFXPlayed = function (self, has_played)
self.fx_played = has_played
end,
playBGM = function (self)
if not bgm:isPlaying() then
bgm:play()
end
end,
stopFX = function (self, effect)
if effects[effect]:isPlaying() then
effects[effect]:stop()
end
end,
playFX = function (self, effect, mode)
if mode == "single" then
if not self.fx_played then
self:setFXPlayed(true)
if not effects[effect]:isPlaying() then
effects[effect]:play()
end
end
elseif mode == "slow" then
if not effects[effect]:isPlaying() then
effects[effect]:play()
end
else
self:stopFX(effect)
effects[effect]:play()
end
end,
}
end
return SFX |
--KyYay's interpolation library
local self = {}
local moving = {}
self.loopmode = "CAP"
function self.applyloopmode(t)
if self.loopmode == "CAP" then
return math.max(math.min(t,1),0)
elseif self.loopmode == "REFLECT" then
return math.min(t%2,-t%2)
end
return t
end
function self.linear(s,e,t)
t = self.applyloopmode(t)
return s+(e-s)*t
end
function self.easeinout(s,e,t)
t = self.applyloopmode(t)
return s+(e-s)*(-math.cos(t*math.pi)+1)*0.5
end
function self.easein(s,e,t)
t = self.applyloopmode(t)
return s+(e-s)*(-math.cos(t*math.pi*0.5)+1)
end
function self.easeout(s,e,t)
t = self.applyloopmode(t)
return s+(e-s)*(math.sin(t*math.pi*0.5))
end
function self.easeoutin(s,e,t)
t = self.applyloopmode(t)
if t < 0.5 then
return self.easeout(s,s+(e-s)*0.5,t*2)
else
return self.easein(s+(e-s)*0.5,e,(t-0.5)*2)
end
end
function self.bouncein(s,e,t)
return self.bounceout(e,s,1-t)
end
function self.bounceout(s,e,t)
t = self.applyloopmode(t)
local scale = 1
local offset = -1/3
local reps = 0
while (t-(offset+2/3*scale) > 0 and reps < 25) do
offset = offset+2/3*scale
scale = scale*0.5
reps = reps + 1
end
t = t-offset
return s+(e-s)*(1-math.sin(t*math.pi*1.5/scale)*scale)
end
function self.bounceinout(s,e,t)
t = self.applyloopmode(t)
if t < 0.5 then
return self.bouncein(s,s+(e-s)*0.5,t*2)
else
return self.bounceout(s+(e-s)*0.5,e,(t-0.5)*2)
end
end
function self.lightbouncein(s,e,t)
return self.lightbounceout(e,s,1-t)
end
function self.lightbounceout(s,e,t)
t = self.applyloopmode(t)
local scale = 1
local offset = -1/3
local reps = 0
while (t-(offset+2/3*scale) > 0 and reps < 25) do
offset = offset+2/3*scale
scale = scale*0.5
reps = reps + 1
end
t = t-offset
return s+(e-s)*(1-math.sin(t*math.pi*1.5/scale)*scale^2)
end
function self.lightbounceinout(s,e,t)
t = self.applyloopmode(t)
if t < 0.5 then
return self.lightbouncein(s,s+(e-s)*0.5,t*2)
else
return self.lightbounceout(s+(e-s)*0.5,e,(t-0.5)*2)
end
end
function self.stronginout(s,e,t)
return s+(e-s)*(-math.cos(self.easeinout(0,1,t)*math.pi)+1)*0.5
end
function self.strongin(s,e,t)
t = self.applyloopmode(t)
return s+(e-s)*(-math.cos(self.easein(0,1,t)*math.pi*0.5)+1)
end
function self.strongout(s,e,t)
t = self.applyloopmode(t)
return s+(e-s)*(math.sin(self.easeout(0,1,t)*math.pi*0.5))
end
function self.strongoutin(s,e,t)
t = self.applyloopmode(t)
if t < 0.5 then
return self.strongout(s,s+(e-s)*0.5,t*2)
else
return self.strongin(s+(e-s)*0.5,e,(t-0.5)*2)
end
end
function self.gentlein(s,e,t)
return s+(e-s)*(math.sin(self.easein(0,1,t)*math.pi*0.5))
end
function self.gentleout(s,e,t)
return s+(e-s)*(-math.cos(self.easeout(0,1,t)*math.pi)+1)*0.5
end
function self.gentleoutin(s,e,t)
t = self.applyloopmode(t)
if t < 0.5 then
return self.easeout(s,s+(e-s)*0.5,self.easeinout(0,1,t)*2)
else
return self.easein(s+(e-s)*0.5,e,(self.easeinout(0,1,t)-0.5)*2)
end
end
function self.taninout(s,e,t)
t = self.applyloopmode(t)
return s+(e-s)*(2*t-(math.tan((t-0.5)*math.pi/2)/2+0.5))
end
function self.tanoutin(s,e,t)
t = self.applyloopmode(t)
return s+(e-s)*(math.tan((t-0.5)*math.pi/2)/2+0.5)
end
--easing formulas below are courtesy of https://easings.net/
function self.backinout(s,e,t)
t = self.applyloopmode(t)
local c1 = 1.70158;
local c2 = c1 * 1.525;
if t < 0.5 then
return s+(e-s)*(((2 * t)^2 * ((c2 + 1) * 2 * t - c2)) / 2)
else
return s+(e-s)*(((2 * t - 2)^2 * ((c2 + 1) * (t * 2 - 2) + c2) + 2) / 2)
end
end
function self.backin(s,e,t)
t = self.applyloopmode(t)
local c1 = 1.70158;
local c3 = c1 + 1;
return s+(e-s)*(c3 * t * t * t - c1 * t * t)
end
function self.backout(s,e,t)
t = self.applyloopmode(t)
local c1 = 1.70158;
local c3 = c1 + 1;
return s+(e-s)*(1 + c3 * (t - 1)^3 + c1 * (t - 1)^2)
end
function self.elasticinout(s,e,t)
t = self.applyloopmode(t)
local c5 = (2 * math.pi) / 4.5
if t == 0 then return s elseif t == 1 then return e end
if t < 0.5 then
return s+(e-s)*(-(2^(20 * t - 10) * math.sin((20 * t - 11.125) * c5)) / 2)
else
return s+(e-s)*((2^(-20 * t + 10) * math.sin((20 * t - 11.125) * c5)) / 2 + 1)
end
end
function self.elasticin(s,e,t)
t = self.applyloopmode(t)
local c4 = (2 * math.pi) / 3;
return t == 0 and s or t == 1 and e or s+(e-s)*(-(2^(10 * t - 10)) * math.sin((t * 10 - 10.75) * c4))
end
function self.elasticout(s,e,t)
t = self.applyloopmode(t)
local c4 = (2 * math.pi) / 3;
return t == 0 and s or t == 1 and e or s+(e-s)*(2^(-10 * t) * math.sin((t * 10 - 0.75) * c4) + 1)
end
--moves a sprite or a projectile automatically, according to the easing mode you input for mode (assuming you are calling self.Update every frame),
--mode should just be the name of one of the functions above (except applyloopmode), minus the "self."
--if timebased is true, t is in seconds; otherwise, it is in frames.
function self.GetItem(ID)
if moving[ID] ~= nil then
return moving[ID]
else
--KROMER_LOG("Interpolation "..ID.." does not exist!",2)
--return false
end
end
function self.GetValue(ID)
if moving[ID] ~= nil then
return moving[ID].obj
else
--KROMER_LOG("Interpolation "..ID.." does not exist!",2)
--return false
end
end
function self.SetValue(ID,start,tar,t,mode,timebased)
if timebased then
moving[ID] = {obj=start,mode=mode,tx=tar,sx=start,lx=start,t=t,ct=Time.time,tb=timebased,type="number"}
return true
else
moving[ID] = {obj=start,mode=mode,tx=tar,sx=start,lx=start,t=t,ct=0,tb=timebased,type="number"}
return true
end
return false
end
function self.MoveObj(obj,x,y,t,mode,timebased)
if timebased then
moving[#moving+1] = {obj=obj,mode=mode,tx=obj.absx+x,ty=obj.absy+y,sx=obj.absx,sy=obj.absy,lx=obj.absx,ly=obj.absy,t=t,ct=Time.time,tb=timebased}
else
moving[#moving+1] = {obj=obj,mode=mode,tx=obj.absx+x,ty=obj.absy+y,sx=obj.absx,sy=obj.absy,lx=obj.absx,ly=obj.absy,t=t,ct=0,tb=timebased}
end
end
function self.MoveObjTo(obj,x,y,t,mode,timebased)
if timebased then
moving[#moving+1] = {obj=obj,mode=mode,tx=x,ty=y,sx=obj.absx,sy=obj.absy,lx=obj.absx,ly=obj.absy,t=t,ct=Time.time,tb=timebased}
else
moving[#moving+1] = {obj=obj,mode=mode,tx=x,ty=y,sx=obj.absx,sy=obj.absy,lx=obj.absx,ly=obj.absy,t=t,ct=0,tb=timebased}
end
end
function self.ClearObjMovement(obj)
for i in pairs(moving) do
local m = moving[i]
if m.obj == obj then
moving[i] = nil
end
end
end
--call every frame for automatic interpolation
function self.Update()
for i in pairs(moving) do
local m = moving[i]
if m.type ~= "number" then
m.obj["interp_finish"] = false
if m.tb then
local newx,newy = self[m.mode](m.sx,m.tx,(Time.time-m.ct)/m.t),self[m.mode](m.sy,m.ty,(Time.time-m.ct)/m.t)
m.obj.Move(newx-m.lx,newy-m.ly)
m.lx,m.ly = newx,newy
if (Time.time-m.ct) >= m.t then
m.obj["interp_finish"] = true
moving[i] = nil
end
else
m.ct = m.ct + 1
local newx,newy = self[m.mode](m.sx,m.tx,m.ct/m.t),self[m.mode](m.sy,m.ty,m.ct/m.t)
m.obj.Move(newx-m.lx,newy-m.ly)
m.lx,m.ly = newx,newy
if m.ct >= m.t then
m.obj["interp_finish"] = true
moving[i] = nil
end
end
else
if m.tb then
local newx = self[m.mode](m.sx,m.tx,(Time.time-m.ct)/m.t)
m.obj = newx
m.lx = newx
if (Time.time-m.ct) >= m.t then
moving[i] = nil
end
else
m.ct = m.ct + 1
local newx = self[m.mode](m.sx,m.tx,m.ct/m.t)
m.obj = newx
m.lx = newx
if m.ct >= m.t then
moving[i] = nil
end
end
end
end
end
return self
|
local g = vim.g
local stdpath = vim.fn.stdpath
g.vsnip_snippet_dir = stdpath('config') .. '/vsnip'
g.vsnip_filetypes = {
typescript={'javascript'},
typescriptreact={'javascript'},
javascript={'javascript'},
javascriptreact={'javascript'},
gitcommit={'gitcommit'},
rust={'rust'}
}
|
return {
[13001]={animation_id=13001,move=true,move_type=1,move_speed=1000.0,attack="attack",injured="injured",hurt_effect_file="hurt_light",},
[13002]={animation_id=13002,attack="skill_sound",props_ready_file="effects_magic_attack_ready_1",props_flying_file="effects_magic_attack_sprint_1",flying_speed=1000.0,multi_props=true,flying_beg=1,flying_end=20,flying_line=2,props_end_file="effects_magic_attack_boom_1",injured="injured",hurt_effect_file="hurt_light",},
[13003]={animation_id=13003,attack="skill_sound",props_ready_file="effects_skill_light_1",props_flying_file="effects_magic_skill_sprint_1",flying_speed=1000.0,multi_props=false,flying_beg=1,flying_end=21,flying_line=1,props_end_file="effects_magic_skill_boom_1",injured="injured",hurt_effect_file="hurt_light",},
}
|
include("shared.lua")
include("cl_roundmanager.lua")
include("cl_message.lua")
include("cl_player.lua")
include("cl_hud.lua")
include("cl_language.lua")
include("cl_menu.lua")
include("cl_keymanager.lua")
include("cl_derma.lua")
include("cl_scoreboard.lua")
function GM:PlayerFootstep(ply)
return !ply:GetFootstep() -- Since true = no footsteps, false = footsteps
end
net.Receive("SendServerStatus", function()
local Info = net.ReadTable()
RoundManager:SetTimer(Info.Timer)
RoundManager:SetRoundState(Info.RoundState)
RoundManager:SetRound(Info.Round)
for k, TempPly in pairs(Info.Players) do
local ply = PlayerManager:DiscoverPlayerByTextID(TempPly.ID)
if IsValid(ply) then
ply:SetMaxBatteryCharge(TempPly.Battery)
ply:SetAmmoPacks(TempPly.AmmoPacks)
ply:SetZombieClass(TempPly.ZombieClass)
ply:SetHumanClass(TempPly.HumanClass)
ply:SetLight(TempPly.Light)
ply:SetFootstep(TempPly.Footstep)
ply:SetAbilityPower(TempPly.AbilityPower)
ply:SetMaxAbilityPower(TempPly.MaxAbilityPower)
end
end
end)
hook.Add("InitPostEntity", "PlayerRdy", function()
if !file.Exists("zombieplague", "DATA") then
file.CreateDir("zombieplague")
end
Dictionary:Start()
CreateMenu()
net.Start("RequestServerStatus")
net.WriteString(Dictionary.LanguageID)
net.SendToServer()
end)
concommand.Add("zp_ability", function( ply, cmd, args )
net.Start("RequestAbility")
net.SendToServer()
end) |
local assert = require "luassert.assert"
local stub = require "luassert.stub"
local main = require "atlas.server.main"
local Server = require "atlas.server.server"
local assertions = require "atlas.test.assertions"
local loop = require "atlas.test.loop"
local function build_mock_server()
return {
accept = function(_) return nil, nil end, -- arg is a client
bind = function() return 0 end,
listen = function() return 0 end,
}
end
describe("Server", function()
it("constructs an instance", function()
local server = Server()
assert.equal(Server, getmetatable(server))
end)
it("runs the event loop", function()
local server = Server()
local has_active_handles = server:run()
assert.is_false(has_active_handles)
end)
it("creates a TCP server", function()
local server = Server()
local status = server:_make_tcp_server()
assert.equal(0, status)
end)
it("sets up the TCP server", function()
local server = Server()
stub(server, "_make_tcp_server").returns(0)
server._server = build_mock_server()
local config = {host = "127.0.0.1", port = 5555}
local status = server:set_up(config)
assert.equal(0, status)
loop.close()
end)
it("listens via the callback", function()
local luv = require "luv"
local err = nil
local server = Server()
server._server = build_mock_server()
local mock_client = {read_start = function() end}
stub(mock_client, "read_start")
stub(luv, "new_tcp").returns(mock_client)
local callback = server:_make_listen_callback()
callback(err)
assert.stub(mock_client.read_start).called()
end)
it("exits on sigint", function()
stub(_G.os, "exit")
Server.on_sigint(nil)
assert.stub(_G.os.exit).called_with(0)
end)
it("fails on a signal creation error", function()
local luv = require "luv"
stub(luv, "new_signal").returns(nil, 1)
local server = Server()
local status
loop.run_until_done(function() status = server:_set_sigint() end)
assert.equal(1, status)
end)
it("fails on TCP creation error", function()
local luv = require "luv"
stub(luv, "new_tcp").returns(nil, 1)
local server = Server()
local status
loop.run_until_done(function() status = server:_make_tcp_server() end)
assert.equal(1, status)
end)
it("fails on bind error", function()
local server = Server()
server._server = build_mock_server()
stub(server._server, "bind").returns(42, nil)
local status
loop.run_until_done(function() status = server:_bind("127.0.0.1", 5000) end)
assert.equal(42, status)
end)
it("fails on listen error", function()
local server = Server()
server._server = build_mock_server()
stub(server._server, "listen").returns(42, nil)
local status
loop.run_until_done(function() status = server:_listen() end)
assert.equal(42, status)
end)
end)
describe("main", function()
it("runs", function()
local server = Server()
stub(server, "_make_tcp_server").returns(0)
stub(server, "run").returns(false)
server._server = build_mock_server()
local config = {host = "127.0.0.1", port = 5555}
local app = {}
local status = main.run(config, server, app)
assert.equal(1, status)
loop.close()
end)
it("fails on server setup failure", function()
local server = {set_up = function() return 42 end}
local config = {host = "127.0.0.1", port = 5555}
local app = {}
local status = main.run(config, server, app)
assert.equal(42, status)
end)
it("fails when active handles persist", function()
local server = {set_up = function() return 0 end, run = function() return 1 end}
local config = {host = "127.0.0.1", port = 5555}
local app = {}
local status = main.run(config, server, app)
assert.equal(1, status)
end)
it("loads an app", function()
local server = {set_up = function() return 0 end, run = function() return false end}
local config = {host = "127.0.0.1", port = 5555, app = "app.main:app"}
local status = main.run(config, server)
assert.equal(0, status)
end)
it("fails when there is no app", function()
local server = {set_up = function() return 0 end, run = function() return false end}
local config = {host = "127.0.0.1", port = 5555, app = "app.main:app_not_here"}
local status, message = pcall(main.run, config, server)
assert.is_false(status)
assertions.contains("No app named 'app_not_here' found in module 'app.main'",
message)
end)
end)
|
L = LANG.GetLanguageTableReference("de")
L[PIRATE.name] = "Pirat"
L[PIRATE.defaultTeam] = "Team Piraten"
L["info_popup_" .. PIRATE.name] = [[Du bist ein Pirat! Tu dich mit jemandem zusammen und kämpfe für Gold und Punkte.]]
L["body_found_" .. PIRATE.abbr] = "Er war ein Pirat..."
L["search_role_" .. PIRATE.abbr] = "Diese Person war ein Pirat!"
L["target_" .. PIRATE.name] = "Pirat"
L["ttt2_desc_" .. PIRATE.name] = [[Piraten sind neutral. Sie kümmern sich nicht um gut und böse... das Geld muss stimmen.
So lange eine andere Person einen Vertrag mit dem Piraten geschlossen hat, kämpft er für sein Team.]]
L["hilite_win_" .. TEAM_PIRATE] = "TEAM PIRAT GEWANN"
L["win_" .. TEAM_PIRATE] = "Die Piraten haben gewonnen! ARRRR"
L["ev_win_" .. TEAM_PIRATE] = "Die Piraten haben sich ihr Gold geholt!"
L[PIRATE_CAPTAIN.name] = "Piraten Kapitän"
L["info_popup_" .. PIRATE_CAPTAIN.name] = [[Du bist ein Piraten Kapitän! Tu dich mit jemandem zusammen und kämpfe für Gold und Punkte.]]
L["body_found_" .. PIRATE_CAPTAIN.abbr] = "Er war ein Piraten Kapitän..."
L["search_role_" .. PIRATE_CAPTAIN.abbr] = "Diese Person war ein Piraten Kapitän!"
L["target_" .. PIRATE_CAPTAIN.name] = "Piraten Kapitän"
L["ttt2_desc_" .. PIRATE_CAPTAIN.name] = [[ Der Piraten Kapitän ist neutral. Er kümmert sich nicht um gut und böse... das Geld muss stimmen.
So lange eine andere Person einen Vertrag mit dem Piraten Kapitän geschlossen hat, kämpfen alle Piraten für sein Team.]]
|
#!/usr/bin/env lua-any
-- Lua-Versions: 5.3 5.2 5.1
local prefix="PioneerDDJSX2."
local channel={ [0]="0", "[Channel1]","[Channel2]","[Channel3]","[Channel4]" }
local leftright={ "LEFT","RIGHT","LEFT","RIGHT" }
local function control(c,k,d,s,m,g)
local template=[[
<control>
<group>@_GROUP_@</group>
<key>@_KEY_@</key>
<description>@_DESCRIPTION_@</description>
<status>@_STATUS_@</status>
<midino>@_MIDINO_@</midino>
<options>
<script-binding/>
</options>
</control>
]]
if d==nil then d=k end
if g then
d=d:gsub(g[1],g)
end
local out=template:gsub("@_(%w+)_@",{
GROUP=channel[c],
KEY=prefix..k,
DESCRIPTION=d,
STATUS=("0x%02x"):format(s),
MIDINO=("0x%02x"):format(m)
})
io.write(out)
end
local function output_xml()
local g={"_(%w+)_"}
for c=1,4 do
g.C=c
for p=1,8 do
g.P=p
--control(c,"hotCueButtons","Hot-Cue _P_ Deck _C_, Button: PAD_P_ (in HOT-CUE-Mode, Deck _C_ active)",0x97+c-1,0x00+p-1,g)
--control(c,"clearHotCueButtons","Clear Hot-Cue _P_ Deck _C_, Button: SHIFT & PAD_P_ (in HOT-CUE-Mode, Deck _C_ active)",0x97+c-1,0x08+p-1,g)
--control(c,"samplerButtons","Sampler _P_ play, Button: PAD_P_ (in SAMPLER-Mode, Deck _C_ active)",0x97+c-1,0x30+p-1,g)
--control(c,"stopSamplerButtons", "Sampler _P_ stop, Button: SHIFT & PAD_P_ (in SAMPLER-Mode, Deck _C_ active)",0x97+c-1,0x38+p-1,g)
--control(c,"slicerButtons", "Slicer beatjump/loop Beat _P_ Deck _C_, Button: PAD_P_ (in SLICER-Mode, Deck _C_ active)",0x97+c-1,0x20+p-1,g)
--control(c,"samplerVelocityVolume", "Sampler _P_ play with velocity volume, Button: PAD_P_ (in SAMPLER-Mode, VELOCITY active, Deck _C_ active)",0xb7+c-1,0x70+p-1,g)
--control(c,"beatloopButtons","Beatloop Deck _C_, Button: PAD_P_ (in GROUP2-Mode->Saved loop, Deck _C_ active)",0x97+c+1,0x50+p-1,g)
control(c,"HotCueLoop","HotCueLoop _P_ Deck _C_, Button: SHIFT & PAD_P_ (in CUE-LOOP mode, Deck _C_ active)",0x97+c-1,0x48+p-1,g)
control(c,"HotCueLoop","HotCueLoop _P_ Deck _C_, Button: PAD_P_ (in CUE-LOOP mode, Deck _C_ active)",0x97+c-1,0x40+p-1,g)
control(c,"SlicerThing", "Slicer beatjump/loop Beat _P_ Deck _C_, Button: PAD_P_ (in SLICER-Mode, Deck _C_ active)",0x97+c-1,0x20+p-1,g)
control(c,"SlicerThing", "Slicer beatjump/loop Beat _P_ Deck _C_, Button: PAD_P_ (in SLICER-LOOP-Mode, Deck _C_ active)",0x97+c-1,0x60+p-1,g)
end
control(c,"SamplerParam1L","Velocity Sampler Mode parameter left deck _C_",0x90+c-1,0x2b,g)
control(c,"SamplerParam1R","Velocity Sampler Mode parameter right deck _C_",0x90+c-1,0x33,g)
control(c,"SamplerParam1L","Sampler Mode parameter left deck _C_",0x90+c-1,0x27,g)
control(c,"SamplerParam1R","Sampler Mode parameter right deck _C_",0x90+c-1,0x2F,g)
control(c,"Shift","Shift on deck _C_",0x90+c-1,0x3F,g)
control(c,"Shift","Shift on deck _C_",0x90+c-1,0x3F,g)
end
end
io.write(
[=[<?xml version='1.0' encoding='utf-8'?>
<MixxxControllerPreset schemaVersion="1" mixxxVersion="2.1+">
<info>
<name>Pioneer DDJ-SX3</name>
<author>hrudham, tildearrow, ardje</author>
<description>Pioneer DDJ-SX3 controller mapping for tildearrow script</description>
</info>
<controller id="PIONEER">
<scriptfiles>
<file functionprefix="PioneerDDJSX2" filename="PIONEER_DDJ-SX2-scripts.js"/>
</scriptfiles>
<controls>
]=])
output_xml()
io.write(
[=[
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x99</status>
<midino>0x3F</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x98</status>
<midino>0x3F</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x9A</status>
<midino>0x3F</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x99</status>
<midino>0x3B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x98</status>
<midino>0x3B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x9A</status>
<midino>0x3B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x99</status>
<midino>0x37</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x97</status>
<midino>0x3F</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x98</status>
<midino>0x37</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x9A</status>
<midino>0x37</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x97</status>
<midino>0x3B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x99</status>
<midino>0x33</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x98</status>
<midino>0x33</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x9A</status>
<midino>0x33</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x97</status>
<midino>0x37</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>stop</key>
<status>0x81</status>
<midino>0x47</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x97</status>
<midino>0x33</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>stop</key>
<status>0x80</status>
<midino>0x47</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>stop</key>
<status>0x83</status>
<midino>0x47</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>stop</key>
<status>0x82</status>
<midino>0x47</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[EffectRack1_EffectUnit1]</group>
<key>group_[Channel4]_enable</key>
<status>0x96</status>
<midino>0x4F</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>pitch_up</key>
<status>0x91</status>
<midino>0x4B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>pitch_up</key>
<status>0x90</status>
<midino>0x4B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>pitch_up</key>
<status>0x93</status>
<midino>0x4B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>pitch_up</key>
<status>0x92</status>
<midino>0x4B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>play_stutter</key>
<status>0x91</status>
<midino>0x47</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>play_stutter</key>
<status>0x90</status>
<midino>0x47</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>play_stutter</key>
<status>0x93</status>
<midino>0x47</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>play_stutter</key>
<status>0x92</status>
<midino>0x47</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.EffectButton</key>
<status>0x95</status>
<midino>0x47</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.EffectButton</key>
<status>0x94</status>
<midino>0x47</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x99</status>
<midino>0x5F</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>LoadSelectedTrack</key>
<status>0x96</status>
<midino>0x47</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x98</status>
<midino>0x5F</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x9A</status>
<midino>0x5F</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.CCC</key>
<status>0x95</status>
<midino>0x43</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.CCC</key>
<status>0x94</status>
<midino>0x43</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x99</status>
<midino>0x5B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x98</status>
<midino>0x5B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x9A</status>
<midino>0x5B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x97</status>
<midino>0x5F</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x99</status>
<midino>0x57</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x98</status>
<midino>0x57</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x9A</status>
<midino>0x57</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x97</status>
<midino>0x5B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x99</status>
<midino>0x53</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x98</status>
<midino>0x53</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x9A</status>
<midino>0x53</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x97</status>
<midino>0x57</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x97</status>
<midino>0x53</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[EffectRack1_EffectUnit2]</group>
<key>group_[Channel4]_enable</key>
<status>0x96</status>
<midino>0x53</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.SetVelocitySamplerMode</key>
<status>0x91</status>
<midino>0x6F</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.SetVelocitySamplerMode</key>
<status>0x90</status>
<midino>0x6F</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.SetVelocitySamplerMode</key>
<status>0x93</status>
<midino>0x6F</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler8]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB9</status>
<midino>0x77</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.SetVelocitySamplerMode</key>
<status>0x92</status>
<midino>0x6F</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler8]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB8</status>
<midino>0x77</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler8]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xBA</status>
<midino>0x77</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.SetSavedLoopMode</key>
<status>0x91</status>
<midino>0x6B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.SetSavedLoopMode</key>
<status>0x90</status>
<midino>0x6B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.SetSavedLoopMode</key>
<status>0x93</status>
<midino>0x6B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler4]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB9</status>
<midino>0x73</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.SetSavedLoopMode</key>
<status>0x92</status>
<midino>0x6B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler4]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB8</status>
<midino>0x73</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler4]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xBA</status>
<midino>0x73</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler8]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB7</status>
<midino>0x77</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x99</status>
<midino>0x7F</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[PreviewDeck1]</group>
<key>LoadSelectedTrack</key>
<status>0x96</status>
<midino>0x67</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x98</status>
<midino>0x7F</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x9A</status>
<midino>0x7F</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler4]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB7</status>
<midino>0x73</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>1</group>
<key>PioneerDDJSX2.EffectSelect</key>
<status>0x95</status>
<midino>0x63</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>1</group>
<key>PioneerDDJSX2.EffectSelect</key>
<status>0x94</status>
<midino>0x63</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x99</status>
<midino>0x7B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x98</status>
<midino>0x7B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x9A</status>
<midino>0x7B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x97</status>
<midino>0x7F</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x99</status>
<midino>0x77</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[BeatJump]</group>
<key>next</key>
<status>0x91</status>
<midino>0x7B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x98</status>
<midino>0x77</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[BeatJump]</group>
<key>next</key>
<status>0x90</status>
<midino>0x7B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[BeatJump]</group>
<key>next</key>
<status>0x93</status>
<midino>0x7B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x9A</status>
<midino>0x77</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[BeatJump]</group>
<key>next</key>
<status>0x92</status>
<midino>0x7B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x97</status>
<midino>0x7B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x99</status>
<midino>0x73</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x98</status>
<midino>0x73</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x9A</status>
<midino>0x73</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x97</status>
<midino>0x77</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x97</status>
<midino>0x73</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>pregain</key>
<status>0xB1</status>
<midino>0x04</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>pregain</key>
<status>0xB0</status>
<midino>0x04</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>pregain</key>
<status>0xB3</status>
<midino>0x04</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>pregain</key>
<status>0xB2</status>
<midino>0x04</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>4</group>
<key>PioneerDDJSX2.EffectKnob</key>
<status>0xB5</status>
<midino>0x04</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>1</group>
<key>PioneerDDJSX2.EffectKnob</key>
<status>0xB4</status>
<midino>0x04</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>rate</key>
<status>0xB1</status>
<midino>0x00</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>rate</key>
<status>0xB0</status>
<midino>0x00</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>rate</key>
<status>0xB3</status>
<midino>0x00</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>hotcue_5_clear</key>
<status>0x99</status>
<midino>0x0C</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>rate</key>
<status>0xB2</status>
<midino>0x00</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>hotcue_5_clear</key>
<status>0x98</status>
<midino>0x0C</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>1</group>
<key>PioneerDDJSX2.EffectJog</key>
<status>0xB5</status>
<midino>0x00</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.EffectJog</key>
<status>0xB4</status>
<midino>0x00</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>hotcue_5_clear</key>
<status>0x9A</status>
<midino>0x0C</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>hotcue_1_clear</key>
<status>0x99</status>
<midino>0x08</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>cue_default</key>
<status>0x91</status>
<midino>0x0C</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>hotcue_1_clear</key>
<status>0x98</status>
<midino>0x08</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>cue_default</key>
<status>0x90</status>
<midino>0x0C</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>cue_default</key>
<status>0x93</status>
<midino>0x0C</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>hotcue_1_clear</key>
<status>0x9A</status>
<midino>0x08</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>cue_default</key>
<status>0x92</status>
<midino>0x0C</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>hotcue_5_clear</key>
<status>0x97</status>
<midino>0x0C</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>hotcue_5_activate</key>
<status>0x99</status>
<midino>0x04</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>hotcue_5_activate</key>
<status>0x98</status>
<midino>0x04</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>hotcue_5_activate</key>
<status>0x9A</status>
<midino>0x04</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[QuickEffectRack1_[Channel2]]</group>
<key>super1</key>
<status>0xB6</status>
<midino>0x18</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>hotcue_1_clear</key>
<status>0x97</status>
<midino>0x08</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>hotcue_1_activate</key>
<status>0x99</status>
<midino>0x00</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>hotcue_1_activate</key>
<status>0x98</status>
<midino>0x00</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>hotcue_1_activate</key>
<status>0x9A</status>
<midino>0x00</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>hotcue_5_activate</key>
<status>0x97</status>
<midino>0x04</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>hotcue_1_activate</key>
<status>0x97</status>
<midino>0x00</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>rate_set_default</key>
<status>0x91</status>
<midino>0x1C</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>rate_set_default</key>
<status>0x90</status>
<midino>0x1C</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>rate_set_default</key>
<status>0x93</status>
<midino>0x1C</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>rate_set_default</key>
<status>0x92</status>
<midino>0x1C</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x99</status>
<midino>0x14</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>orientation_right</key>
<status>0x91</status>
<midino>0x18</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x98</status>
<midino>0x14</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>orientation_right</key>
<status>0x90</status>
<midino>0x18</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>orientation_right</key>
<status>0x93</status>
<midino>0x18</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x9A</status>
<midino>0x14</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>orientation_right</key>
<status>0x92</status>
<midino>0x18</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x99</status>
<midino>0x10</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.AutoLoop</key>
<status>0x91</status>
<midino>0x14</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x98</status>
<midino>0x10</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.AutoLoop</key>
<status>0x90</status>
<midino>0x14</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.AutoLoop</key>
<status>0x93</status>
<midino>0x14</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x9A</status>
<midino>0x10</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.AutoLoop</key>
<status>0x92</status>
<midino>0x14</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x97</status>
<midino>0x14</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.LoopIn</key>
<status>0x91</status>
<midino>0x10</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.LoopIn</key>
<status>0x90</status>
<midino>0x10</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.LoopIn</key>
<status>0x93</status>
<midino>0x10</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.LoopIn</key>
<status>0x92</status>
<midino>0x10</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x97</status>
<midino>0x10</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>rate_temp_up</key>
<status>0x91</status>
<midino>0x2C</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>rate_temp_up</key>
<status>0x90</status>
<midino>0x2C</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>rate_temp_up</key>
<status>0x93</status>
<midino>0x2C</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>rate_temp_up</key>
<status>0x92</status>
<midino>0x2C</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.CueLoopParam1L</key>
<status>0x91</status>
<midino>0x28</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.CueLoopParam1L</key>
<status>0x90</status>
<midino>0x28</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.CueLoopParam1L</key>
<status>0x93</status>
<midino>0x28</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.CueLoopParam1L</key>
<status>0x92</status>
<midino>0x28</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>rate_temp_down</key>
<status>0x91</status>
<midino>0x24</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>rate_temp_down</key>
<status>0x90</status>
<midino>0x24</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>rate_temp_down</key>
<status>0x93</status>
<midino>0x24</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>rate_temp_down</key>
<status>0x92</status>
<midino>0x24</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x99</status>
<midino>0x3C</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.SetSlicerMode</key>
<status>0x91</status>
<midino>0x20</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x98</status>
<midino>0x3C</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.SetSlicerMode</key>
<status>0x90</status>
<midino>0x20</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.SetSlicerMode</key>
<status>0x93</status>
<midino>0x20</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x9A</status>
<midino>0x3C</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.SetSlicerMode</key>
<status>0x92</status>
<midino>0x20</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x99</status>
<midino>0x38</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x98</status>
<midino>0x38</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x9A</status>
<midino>0x38</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x97</status>
<midino>0x3C</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x99</status>
<midino>0x34</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.Reverse</key>
<status>0x91</status>
<midino>0x38</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x98</status>
<midino>0x34</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.Reverse</key>
<status>0x90</status>
<midino>0x38</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.Reverse</key>
<status>0x93</status>
<midino>0x38</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x9A</status>
<midino>0x34</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.Reverse</key>
<status>0x92</status>
<midino>0x38</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x97</status>
<midino>0x38</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x99</status>
<midino>0x30</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x98</status>
<midino>0x30</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x9A</status>
<midino>0x30</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x97</status>
<midino>0x34</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.CueLoopParam1R</key>
<status>0x91</status>
<midino>0x30</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.CueLoopParam1R</key>
<status>0x90</status>
<midino>0x30</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.CueLoopParam1R</key>
<status>0x93</status>
<midino>0x30</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.CueLoopParam1R</key>
<status>0x92</status>
<midino>0x30</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Playlist]</group>
<key>PioneerDDJSX2.RotarySelector</key>
<status>0xB6</status>
<midino>0x40</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x97</status>
<midino>0x30</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[EffectRack1_EffectUnit1]</group>
<key>group_[Channel1]_enable</key>
<status>0x96</status>
<midino>0x4C</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>start</key>
<status>0x91</status>
<midino>0x48</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>start</key>
<status>0x90</status>
<midino>0x48</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>start</key>
<status>0x93</status>
<midino>0x48</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>start</key>
<status>0x92</status>
<midino>0x48</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.EffectButton</key>
<status>0x95</status>
<midino>0x48</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.EffectButton</key>
<status>0x94</status>
<midino>0x48</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>LoadSelectedTrack</key>
<status>0x96</status>
<midino>0x48</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x99</status>
<midino>0x5C</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.slipenabled</key>
<status>0x91</status>
<midino>0x40</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x98</status>
<midino>0x5C</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.slipenabled</key>
<status>0x90</status>
<midino>0x40</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.slipenabled</key>
<status>0x93</status>
<midino>0x40</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x9A</status>
<midino>0x5C</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.slipenabled</key>
<status>0x92</status>
<midino>0x40</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>1</group>
<key>PioneerDDJSX2.CPS</key>
<status>0x95</status>
<midino>0x40</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.CPS</key>
<status>0x94</status>
<midino>0x40</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x99</status>
<midino>0x58</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>1</group>
<key>PioneerDDJSX2.SyncDisable</key>
<status>0x91</status>
<midino>0x5C</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x98</status>
<midino>0x58</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SyncDisable</key>
<status>0x90</status>
<midino>0x5C</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>3</group>
<key>PioneerDDJSX2.SyncDisable</key>
<status>0x93</status>
<midino>0x5C</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x9A</status>
<midino>0x58</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>2</group>
<key>PioneerDDJSX2.SyncDisable</key>
<status>0x92</status>
<midino>0x5C</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x97</status>
<midino>0x5C</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x99</status>
<midino>0x54</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>1</group>
<key>PioneerDDJSX2.SyncEnable</key>
<status>0x91</status>
<midino>0x58</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x98</status>
<midino>0x54</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SyncEnable</key>
<status>0x90</status>
<midino>0x58</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>3</group>
<key>PioneerDDJSX2.SyncEnable</key>
<status>0x93</status>
<midino>0x58</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x9A</status>
<midino>0x54</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>2</group>
<key>PioneerDDJSX2.SyncEnable</key>
<status>0x92</status>
<midino>0x58</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x97</status>
<midino>0x58</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x99</status>
<midino>0x50</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Deere]</group>
<key>show_no_bpm_info</key>
<status>0x96</status>
<midino>0x58</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>pfl</key>
<status>0x91</status>
<midino>0x54</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x98</status>
<midino>0x50</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>pfl</key>
<status>0x90</status>
<midino>0x54</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>pfl</key>
<status>0x93</status>
<midino>0x54</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x9A</status>
<midino>0x50</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>pfl</key>
<status>0x92</status>
<midino>0x54</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x97</status>
<midino>0x54</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>reloop_exit</key>
<status>0x91</status>
<midino>0x50</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>reloop_exit</key>
<status>0x90</status>
<midino>0x50</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>reloop_exit</key>
<status>0x93</status>
<midino>0x50</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>reloop_exit</key>
<status>0x92</status>
<midino>0x50</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x97</status>
<midino>0x50</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[EffectRack1_EffectUnit2]</group>
<key>group_[Channel1]_enable</key>
<status>0x96</status>
<midino>0x50</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Sampler5]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB9</status>
<midino>0x74</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler5]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB8</status>
<midino>0x74</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler5]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xBA</status>
<midino>0x74</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>bpm_tap</key>
<status>0x91</status>
<midino>0x68</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>bpm_tap</key>
<status>0x90</status>
<midino>0x68</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Sampler1]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB9</status>
<midino>0x70</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>bpm_tap</key>
<status>0x93</status>
<midino>0x68</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Sampler1]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB8</status>
<midino>0x70</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>bpm_tap</key>
<status>0x92</status>
<midino>0x68</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Sampler1]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xBA</status>
<midino>0x70</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Master]</group>
<key>maximize_library</key>
<status>0x96</status>
<midino>0x68</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>beats_translate_curpos</key>
<status>0x91</status>
<midino>0x64</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>beats_translate_curpos</key>
<status>0x90</status>
<midino>0x64</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Sampler5]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB7</status>
<midino>0x74</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>beats_translate_curpos</key>
<status>0x93</status>
<midino>0x64</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>beats_translate_curpos</key>
<status>0x92</status>
<midino>0x64</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>2</group>
<key>PioneerDDJSX2.EffectSelect</key>
<status>0x95</status>
<midino>0x64</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>2</group>
<key>PioneerDDJSX2.EffectSelect</key>
<status>0x94</status>
<midino>0x64</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x99</status>
<midino>0x7C</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.SetTempoRange</key>
<status>0x91</status>
<midino>0x60</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x98</status>
<midino>0x7C</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.SetTempoRange</key>
<status>0x90</status>
<midino>0x60</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.SetTempoRange</key>
<status>0x93</status>
<midino>0x60</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x9A</status>
<midino>0x7C</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler1]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB7</status>
<midino>0x70</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.SetTempoRange</key>
<status>0x92</status>
<midino>0x60</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x99</status>
<midino>0x78</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x98</status>
<midino>0x78</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x9A</status>
<midino>0x78</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x97</status>
<midino>0x7C</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x99</status>
<midino>0x74</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x98</status>
<midino>0x74</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x9A</status>
<midino>0x74</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x97</status>
<midino>0x78</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x99</status>
<midino>0x70</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>1</group>
<key>PioneerDDJSX2.PanelSelect</key>
<status>0x96</status>
<midino>0x78</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x98</status>
<midino>0x70</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x9A</status>
<midino>0x70</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x97</status>
<midino>0x74</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x97</status>
<midino>0x70</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>hotcue_6_clear</key>
<status>0x99</status>
<midino>0x0D</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>hotcue_6_clear</key>
<status>0x98</status>
<midino>0x0D</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>hotcue_6_clear</key>
<status>0x9A</status>
<midino>0x0D</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Mixer Profile]</group>
<key>PioneerDDJSX2.CrossfaderCurve</key>
<status>0xB6</status>
<midino>0x01</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>hotcue_2_clear</key>
<status>0x99</status>
<midino>0x09</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>hotcue_2_clear</key>
<status>0x98</status>
<midino>0x09</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>hotcue_2_clear</key>
<status>0x9A</status>
<midino>0x09</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>hotcue_6_clear</key>
<status>0x97</status>
<midino>0x0D</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>hotcue_6_activate</key>
<status>0x99</status>
<midino>0x05</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>hotcue_6_activate</key>
<status>0x98</status>
<midino>0x05</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>hotcue_6_activate</key>
<status>0x9A</status>
<midino>0x05</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[QuickEffectRack1_[Channel3]]</group>
<key>super1</key>
<status>0xB6</status>
<midino>0x19</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>hotcue_2_clear</key>
<status>0x97</status>
<midino>0x09</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>hotcue_2_activate</key>
<status>0x99</status>
<midino>0x01</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>hotcue_2_activate</key>
<status>0x98</status>
<midino>0x01</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>hotcue_2_activate</key>
<status>0x9A</status>
<midino>0x01</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>hotcue_6_activate</key>
<status>0x97</status>
<midino>0x05</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>hotcue_2_activate</key>
<status>0x97</status>
<midino>0x01</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>orientation_center</key>
<status>0x91</status>
<midino>0x1D</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>orientation_center</key>
<status>0x90</status>
<midino>0x1D</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>orientation_center</key>
<status>0x93</status>
<midino>0x1D</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>orientation_center</key>
<status>0x92</status>
<midino>0x1D</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x99</status>
<midino>0x15</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.InputSelect</key>
<status>0x91</status>
<midino>0x19</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x98</status>
<midino>0x15</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.InputSelect</key>
<status>0x90</status>
<midino>0x19</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.InputSelect</key>
<status>0x93</status>
<midino>0x19</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x9A</status>
<midino>0x15</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.InputSelect</key>
<status>0x92</status>
<midino>0x19</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x99</status>
<midino>0x11</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>reverseroll</key>
<status>0x91</status>
<midino>0x15</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x98</status>
<midino>0x11</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>reverseroll</key>
<status>0x90</status>
<midino>0x15</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>reverseroll</key>
<status>0x93</status>
<midino>0x15</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x9A</status>
<midino>0x11</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>reverseroll</key>
<status>0x92</status>
<midino>0x15</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.jogPitchBend</key>
<status>0xB1</status>
<midino>0x21</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.jogPitchBend</key>
<status>0xB0</status>
<midino>0x21</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.jogPitchBend</key>
<status>0xB3</status>
<midino>0x21</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x97</status>
<midino>0x15</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.jogPitchBend</key>
<status>0xB2</status>
<midino>0x21</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>loop_out</key>
<status>0x91</status>
<midino>0x11</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>loop_out</key>
<status>0x90</status>
<midino>0x11</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>loop_out</key>
<status>0x93</status>
<midino>0x11</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>loop_out</key>
<status>0x92</status>
<midino>0x11</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x97</status>
<midino>0x11</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.RollParam1R</key>
<status>0x91</status>
<midino>0x2D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.RollParam1R</key>
<status>0x90</status>
<midino>0x2D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.RollParam1R</key>
<status>0x93</status>
<midino>0x2D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.RollParam1R</key>
<status>0x92</status>
<midino>0x2D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.RollParam1L</key>
<status>0x91</status>
<midino>0x25</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.RollParam1L</key>
<status>0x90</status>
<midino>0x25</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.RollParam1L</key>
<status>0x93</status>
<midino>0x25</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.RollParam1L</key>
<status>0x92</status>
<midino>0x25</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x99</status>
<midino>0x3D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x98</status>
<midino>0x3D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x9A</status>
<midino>0x3D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x99</status>
<midino>0x39</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x98</status>
<midino>0x39</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x9A</status>
<midino>0x39</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x99</status>
<midino>0x35</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x97</status>
<midino>0x3D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x98</status>
<midino>0x35</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x9A</status>
<midino>0x35</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x97</status>
<midino>0x39</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x99</status>
<midino>0x31</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.jogSeekTouch</key>
<status>0x91</status>
<midino>0x35</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x98</status>
<midino>0x31</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.jogSeekTouch</key>
<status>0x90</status>
<midino>0x35</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.jogSeekTouch</key>
<status>0x93</status>
<midino>0x35</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x9A</status>
<midino>0x31</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.jogSeekTouch</key>
<status>0x92</status>
<midino>0x35</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x97</status>
<midino>0x35</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x97</status>
<midino>0x31</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>reloop_exit</key>
<status>0x91</status>
<midino>0x4D</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>reloop_exit</key>
<status>0x90</status>
<midino>0x4D</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>reloop_exit</key>
<status>0x93</status>
<midino>0x4D</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>reloop_exit</key>
<status>0x92</status>
<midino>0x4D</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[EffectRack1_EffectUnit1]</group>
<key>group_[Channel2]_enable</key>
<status>0x96</status>
<midino>0x4D</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>pitch_adjust_set_zero</key>
<status>0x91</status>
<midino>0x49</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>pitch_adjust_set_zero</key>
<status>0x90</status>
<midino>0x49</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>pitch_adjust_set_zero</key>
<status>0x93</status>
<midino>0x49</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>pitch_adjust_set_zero</key>
<status>0x92</status>
<midino>0x49</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.EffectButton</key>
<status>0x95</status>
<midino>0x49</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.EffectButton</key>
<status>0x94</status>
<midino>0x49</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>LoadSelectedTrack</key>
<status>0x96</status>
<midino>0x49</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.FourBeat</key>
<status>0x91</status>
<midino>0x45</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.FourBeat</key>
<status>0x90</status>
<midino>0x45</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.FourBeat</key>
<status>0x93</status>
<midino>0x45</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.FourBeat</key>
<status>0x92</status>
<midino>0x45</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x99</status>
<midino>0x5D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x98</status>
<midino>0x5D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x9A</status>
<midino>0x5D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x99</status>
<midino>0x59</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Playlist]</group>
<key>PioneerDDJSX2.RotarySelectorClick</key>
<status>0x96</status>
<midino>0x41</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x98</status>
<midino>0x59</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x9A</status>
<midino>0x59</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x97</status>
<midino>0x5D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x99</status>
<midino>0x55</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x98</status>
<midino>0x55</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x9A</status>
<midino>0x55</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x97</status>
<midino>0x59</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x99</status>
<midino>0x51</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x98</status>
<midino>0x51</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x9A</status>
<midino>0x51</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x97</status>
<midino>0x55</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x97</status>
<midino>0x51</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[EffectRack1_EffectUnit2]</group>
<key>group_[Channel2]_enable</key>
<status>0x96</status>
<midino>0x51</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.SetSlicerLoopMode</key>
<status>0x91</status>
<midino>0x6D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.SetSlicerLoopMode</key>
<status>0x90</status>
<midino>0x6D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.SetSlicerLoopMode</key>
<status>0x93</status>
<midino>0x6D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler6]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB9</status>
<midino>0x75</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.SetSlicerLoopMode</key>
<status>0x92</status>
<midino>0x6D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler6]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB8</status>
<midino>0x75</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler6]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xBA</status>
<midino>0x75</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.SetCueLoopMode</key>
<status>0x91</status>
<midino>0x69</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.SetCueLoopMode</key>
<status>0x90</status>
<midino>0x69</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.SetCueLoopMode</key>
<status>0x93</status>
<midino>0x69</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler2]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB9</status>
<midino>0x71</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.SetCueLoopMode</key>
<status>0x92</status>
<midino>0x69</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler2]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB8</status>
<midino>0x71</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler2]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xBA</status>
<midino>0x71</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>1</group>
<key>PioneerDDJSX2.ClearGrid</key>
<status>0x91</status>
<midino>0x65</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.ClearGrid</key>
<status>0x90</status>
<midino>0x65</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>3</group>
<key>PioneerDDJSX2.ClearGrid</key>
<status>0x93</status>
<midino>0x65</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler6]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB7</status>
<midino>0x75</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>2</group>
<key>PioneerDDJSX2.ClearGrid</key>
<status>0x92</status>
<midino>0x65</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>3</group>
<key>PioneerDDJSX2.EffectSelect</key>
<status>0x95</status>
<midino>0x65</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>3</group>
<key>PioneerDDJSX2.EffectSelect</key>
<status>0x94</status>
<midino>0x65</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x99</status>
<midino>0x7D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Playlist]</group>
<key>PioneerDDJSX2.BackButton</key>
<status>0x96</status>
<midino>0x65</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>loop_move_4_backward</key>
<status>0x91</status>
<midino>0x61</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x98</status>
<midino>0x7D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>loop_move_4_backward</key>
<status>0x90</status>
<midino>0x61</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>loop_move_4_backward</key>
<status>0x93</status>
<midino>0x61</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x9A</status>
<midino>0x7D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler2]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB7</status>
<midino>0x71</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>loop_move_4_backward</key>
<status>0x92</status>
<midino>0x61</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x99</status>
<midino>0x79</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x98</status>
<midino>0x79</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x9A</status>
<midino>0x79</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x97</status>
<midino>0x7D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x99</status>
<midino>0x75</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>1</group>
<key>PioneerDDJSX2.SetGridAdjust</key>
<status>0x91</status>
<midino>0x79</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x98</status>
<midino>0x75</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SetGridAdjust</key>
<status>0x90</status>
<midino>0x79</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>3</group>
<key>PioneerDDJSX2.SetGridAdjust</key>
<status>0x93</status>
<midino>0x79</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x9A</status>
<midino>0x75</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>2</group>
<key>PioneerDDJSX2.SetGridAdjust</key>
<status>0x92</status>
<midino>0x79</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x97</status>
<midino>0x79</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x99</status>
<midino>0x71</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.PanelSelect</key>
<status>0x96</status>
<midino>0x79</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x98</status>
<midino>0x71</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x9A</status>
<midino>0x71</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x97</status>
<midino>0x75</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x97</status>
<midino>0x71</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>5</group>
<key>PioneerDDJSX2.EffectKnob</key>
<status>0xB5</status>
<midino>0x06</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>2</group>
<key>PioneerDDJSX2.EffectKnob</key>
<status>0xB4</status>
<midino>0x06</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>hotcue_7_clear</key>
<status>0x99</status>
<midino>0x0E</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>hotcue_7_clear</key>
<status>0x98</status>
<midino>0x0E</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>3</group>
<key>PioneerDDJSX2.EffectKnob</key>
<status>0xB5</status>
<midino>0x02</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.EffectKnob</key>
<status>0xB4</status>
<midino>0x02</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>hotcue_7_clear</key>
<status>0x9A</status>
<midino>0x0E</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>hotcue_3_clear</key>
<status>0x99</status>
<midino>0x0A</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>hotcue_3_clear</key>
<status>0x98</status>
<midino>0x0A</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>hotcue_3_clear</key>
<status>0x9A</status>
<midino>0x0A</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>hotcue_7_clear</key>
<status>0x97</status>
<midino>0x0E</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>hotcue_7_activate</key>
<status>0x99</status>
<midino>0x06</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>1</group>
<key>PioneerDDJSX2.SetGridSlide</key>
<status>0x91</status>
<midino>0x0A</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>hotcue_7_activate</key>
<status>0x98</status>
<midino>0x06</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SetGridSlide</key>
<status>0x90</status>
<midino>0x0A</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>3</group>
<key>PioneerDDJSX2.SetGridSlide</key>
<status>0x93</status>
<midino>0x0A</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>hotcue_7_activate</key>
<status>0x9A</status>
<midino>0x06</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>2</group>
<key>PioneerDDJSX2.SetGridSlide</key>
<status>0x92</status>
<midino>0x0A</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[QuickEffectRack1_[Channel4]]</group>
<key>super1</key>
<status>0xB6</status>
<midino>0x1A</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>hotcue_3_clear</key>
<status>0x97</status>
<midino>0x0A</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>hotcue_3_activate</key>
<status>0x99</status>
<midino>0x02</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>hotcue_3_activate</key>
<status>0x98</status>
<midino>0x02</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>hotcue_3_activate</key>
<status>0x9A</status>
<midino>0x02</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>hotcue_7_activate</key>
<status>0x97</status>
<midino>0x06</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>hotcue_3_activate</key>
<status>0x97</status>
<midino>0x02</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.SetRollMode</key>
<status>0x91</status>
<midino>0x1E</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.SetRollMode</key>
<status>0x90</status>
<midino>0x1E</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.SetRollMode</key>
<status>0x93</status>
<midino>0x1E</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.SetRollMode</key>
<status>0x92</status>
<midino>0x1E</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x99</status>
<midino>0x16</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>keylock</key>
<status>0x91</status>
<midino>0x1A</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x98</status>
<midino>0x16</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>keylock</key>
<status>0x90</status>
<midino>0x1A</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>keylock</key>
<status>0x93</status>
<midino>0x1A</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x9A</status>
<midino>0x16</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>keylock</key>
<status>0x92</status>
<midino>0x1A</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.jogSeek</key>
<status>0xB1</status>
<midino>0x26</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.jogSeek</key>
<status>0xB0</status>
<midino>0x26</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.jogSeek</key>
<status>0xB3</status>
<midino>0x26</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x99</status>
<midino>0x12</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.jogSeek</key>
<status>0xB2</status>
<midino>0x26</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>orientation_left</key>
<status>0x91</status>
<midino>0x16</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x98</status>
<midino>0x12</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>orientation_left</key>
<status>0x90</status>
<midino>0x16</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>orientation_left</key>
<status>0x93</status>
<midino>0x16</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x9A</status>
<midino>0x12</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>orientation_left</key>
<status>0x92</status>
<midino>0x16</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.jogScratchTurn</key>
<status>0xB1</status>
<midino>0x22</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.jogScratchTurn</key>
<status>0xB0</status>
<midino>0x22</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.jogScratchTurn</key>
<status>0xB3</status>
<midino>0x22</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x97</status>
<midino>0x16</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.jogScratchTurn</key>
<status>0xB2</status>
<midino>0x22</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>loop_halve</key>
<status>0x91</status>
<midino>0x12</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>loop_halve</key>
<status>0x90</status>
<midino>0x12</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>loop_halve</key>
<status>0x93</status>
<midino>0x12</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>loop_halve</key>
<status>0x92</status>
<midino>0x12</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x97</status>
<midino>0x12</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x99</status>
<midino>0x3E</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.SetSamplerMode</key>
<status>0x91</status>
<midino>0x22</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x98</status>
<midino>0x3E</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.SetSamplerMode</key>
<status>0x90</status>
<midino>0x22</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.SetSamplerMode</key>
<status>0x93</status>
<midino>0x22</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x9A</status>
<midino>0x3E</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.SetSamplerMode</key>
<status>0x92</status>
<midino>0x22</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x99</status>
<midino>0x3A</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x98</status>
<midino>0x3A</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x9A</status>
<midino>0x3A</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x97</status>
<midino>0x3E</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x99</status>
<midino>0x36</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x98</status>
<midino>0x36</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x9A</status>
<midino>0x36</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x97</status>
<midino>0x3A</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x99</status>
<midino>0x32</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.jogScratchTouch</key>
<status>0x91</status>
<midino>0x36</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x98</status>
<midino>0x32</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.jogScratchTouch</key>
<status>0x90</status>
<midino>0x36</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.jogScratchTouch</key>
<status>0x93</status>
<midino>0x36</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x9A</status>
<midino>0x32</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.jogScratchTouch</key>
<status>0x92</status>
<midino>0x36</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x97</status>
<midino>0x36</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x97</status>
<midino>0x32</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[EffectRack1_EffectUnit1]</group>
<key>group_[Channel3]_enable</key>
<status>0x96</status>
<midino>0x4E</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>pitch_down</key>
<status>0x91</status>
<midino>0x4A</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>pitch_down</key>
<status>0x90</status>
<midino>0x4A</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>pitch_down</key>
<status>0x93</status>
<midino>0x4A</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>pitch_down</key>
<status>0x92</status>
<midino>0x4A</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[OK]</group>
<key>PioneerDDJSX2.EffectTap</key>
<status>0x95</status>
<midino>0x4A</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[OK]</group>
<key>PioneerDDJSX2.EffectTap</key>
<status>0x94</status>
<midino>0x4A</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x99</status>
<midino>0x5E</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>LoadSelectedTrack</key>
<status>0x96</status>
<midino>0x46</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x98</status>
<midino>0x5E</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x9A</status>
<midino>0x5E</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x99</status>
<midino>0x5A</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x98</status>
<midino>0x5A</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x9A</status>
<midino>0x5A</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x97</status>
<midino>0x5E</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x99</status>
<midino>0x56</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x98</status>
<midino>0x56</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x9A</status>
<midino>0x56</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.ClearSavedLoop</key>
<status>0x97</status>
<midino>0x5A</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x99</status>
<midino>0x52</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x98</status>
<midino>0x52</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x9A</status>
<midino>0x52</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x97</status>
<midino>0x56</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>cue_gotoandstop</key>
<status>0x91</status>
<midino>0x52</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>cue_gotoandstop</key>
<status>0x90</status>
<midino>0x52</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>cue_gotoandstop</key>
<status>0x93</status>
<midino>0x52</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>cue_gotoandstop</key>
<status>0x92</status>
<midino>0x52</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.SavedLoop</key>
<status>0x97</status>
<midino>0x52</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[EffectRack1_EffectUnit2]</group>
<key>group_[Channel3]_enable</key>
<status>0x96</status>
<midino>0x52</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Sampler7]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB9</status>
<midino>0x76</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler7]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB8</status>
<midino>0x76</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler7]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xBA</status>
<midino>0x76</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>quantize</key>
<status>0x91</status>
<midino>0x6A</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>quantize</key>
<status>0x90</status>
<midino>0x6A</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>quantize</key>
<status>0x93</status>
<midino>0x6A</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Sampler3]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB9</status>
<midino>0x72</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>quantize</key>
<status>0x92</status>
<midino>0x6A</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Sampler3]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB8</status>
<midino>0x72</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler3]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xBA</status>
<midino>0x72</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>play</key>
<status>0x91</status>
<midino>0x66</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>play</key>
<status>0x90</status>
<midino>0x66</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>play</key>
<status>0x93</status>
<midino>0x66</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Sampler7]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB7</status>
<midino>0x76</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>play</key>
<status>0x92</status>
<midino>0x66</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[EffectRack1_EffectUnit2]</group>
<key>show_parameters</key>
<status>0x95</status>
<midino>0x66</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[EffectRack1_EffectUnit1]</group>
<key>show_parameters</key>
<status>0x94</status>
<midino>0x66</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x99</status>
<midino>0x7E</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.ViewButton</key>
<status>0x96</status>
<midino>0x66</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>loop_move_4_forward</key>
<status>0x91</status>
<midino>0x62</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x98</status>
<midino>0x7E</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>loop_move_4_forward</key>
<status>0x90</status>
<midino>0x62</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>loop_move_4_forward</key>
<status>0x93</status>
<midino>0x62</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x9A</status>
<midino>0x7E</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Sampler3]</group>
<key>PioneerDDJSX2.SetSampleGain</key>
<status>0xB7</status>
<midino>0x72</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>loop_move_4_forward</key>
<status>0x92</status>
<midino>0x62</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x99</status>
<midino>0x7A</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x98</status>
<midino>0x7A</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x9A</status>
<midino>0x7A</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x97</status>
<midino>0x7E</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x99</status>
<midino>0x76</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x98</status>
<midino>0x76</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x9A</status>
<midino>0x76</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerStop</key>
<status>0x97</status>
<midino>0x7A</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x99</status>
<midino>0x72</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x98</status>
<midino>0x72</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x9A</status>
<midino>0x72</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x97</status>
<midino>0x76</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SamplerPlay</key>
<status>0x97</status>
<midino>0x72</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>filterLow</key>
<status>0xB1</status>
<midino>0x0F</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>filterLow</key>
<status>0xB0</status>
<midino>0x0F</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>filterLow</key>
<status>0xB3</status>
<midino>0x0F</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>filterLow</key>
<status>0xB2</status>
<midino>0x0F</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>filterMid</key>
<status>0xB1</status>
<midino>0x0B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>filterMid</key>
<status>0xB0</status>
<midino>0x0B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>filterMid</key>
<status>0xB3</status>
<midino>0x0B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>filterMid</key>
<status>0xB2</status>
<midino>0x0B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>filterHigh</key>
<status>0xB1</status>
<midino>0x07</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>filterHigh</key>
<status>0xB0</status>
<midino>0x07</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>filterHigh</key>
<status>0xB3</status>
<midino>0x07</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>filterHigh</key>
<status>0xB2</status>
<midino>0x07</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>playposition</key>
<status>0xB1</status>
<midino>0x03</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>playposition</key>
<status>0xB0</status>
<midino>0x03</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>playposition</key>
<status>0xB3</status>
<midino>0x03</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>hotcue_8_clear</key>
<status>0x99</status>
<midino>0x0F</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>playposition</key>
<status>0xB2</status>
<midino>0x03</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>hotcue_8_clear</key>
<status>0x98</status>
<midino>0x0F</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>hotcue_8_clear</key>
<status>0x9A</status>
<midino>0x0F</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>0</group>
<key>PioneerDDJSX2.SetSamplerVol</key>
<status>0xB6</status>
<midino>0x03</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>hotcue_4_clear</key>
<status>0x99</status>
<midino>0x0B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>hotcue_4_clear</key>
<status>0x98</status>
<midino>0x0B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>hotcue_4_clear</key>
<status>0x9A</status>
<midino>0x0B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Master]</group>
<key>crossfader</key>
<status>0xB6</status>
<midino>0x1F</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>hotcue_8_clear</key>
<status>0x97</status>
<midino>0x0F</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>hotcue_8_activate</key>
<status>0x99</status>
<midino>0x07</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>play</key>
<status>0x91</status>
<midino>0x0B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>hotcue_8_activate</key>
<status>0x98</status>
<midino>0x07</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>play</key>
<status>0x90</status>
<midino>0x0B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>play</key>
<status>0x93</status>
<midino>0x0B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>hotcue_8_activate</key>
<status>0x9A</status>
<midino>0x07</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>play</key>
<status>0x92</status>
<midino>0x0B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>hotcue_4_clear</key>
<status>0x97</status>
<midino>0x0B</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>hotcue_4_activate</key>
<status>0x99</status>
<midino>0x03</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>hotcue_4_activate</key>
<status>0x98</status>
<midino>0x03</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>hotcue_4_activate</key>
<status>0x9A</status>
<midino>0x03</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[QuickEffectRack1_[Channel1]]</group>
<key>super1</key>
<status>0xB6</status>
<midino>0x17</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>volume</key>
<status>0xB1</status>
<midino>0x13</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>volume</key>
<status>0xB0</status>
<midino>0x13</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>volume</key>
<status>0xB3</status>
<midino>0x13</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>hotcue_8_activate</key>
<status>0x97</status>
<midino>0x07</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>volume</key>
<status>0xB2</status>
<midino>0x13</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[BeatJump]</group>
<key>prev</key>
<status>0x91</status>
<midino>0x03</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[BeatJump]</group>
<key>prev</key>
<status>0x90</status>
<midino>0x03</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[BeatJump]</group>
<key>prev</key>
<status>0x93</status>
<midino>0x03</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[BeatJump]</group>
<key>prev</key>
<status>0x92</status>
<midino>0x03</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>hotcue_4_activate</key>
<status>0x97</status>
<midino>0x03</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x99</status>
<midino>0x17</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.SetHotCueMode</key>
<status>0x91</status>
<midino>0x1B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x98</status>
<midino>0x17</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.SetHotCueMode</key>
<status>0x90</status>
<midino>0x1B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.SetHotCueMode</key>
<status>0x93</status>
<midino>0x1B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x9A</status>
<midino>0x17</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.SetHotCueMode</key>
<status>0x92</status>
<midino>0x1B</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x99</status>
<midino>0x13</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.ToggleVinyl</key>
<status>0x91</status>
<midino>0x17</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x98</status>
<midino>0x13</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.ToggleVinyl</key>
<status>0x90</status>
<midino>0x17</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.ToggleVinyl</key>
<status>0x93</status>
<midino>0x17</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x9A</status>
<midino>0x13</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.ToggleVinyl</key>
<status>0x92</status>
<midino>0x17</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>PioneerDDJSX2.jogSeekTurn</key>
<status>0xB1</status>
<midino>0x23</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.jogSeekTurn</key>
<status>0xB0</status>
<midino>0x23</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>PioneerDDJSX2.jogSeekTurn</key>
<status>0xB3</status>
<midino>0x23</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x97</status>
<midino>0x17</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>PioneerDDJSX2.jogSeekTurn</key>
<status>0xB2</status>
<midino>0x23</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>loop_double</key>
<status>0x91</status>
<midino>0x13</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>loop_double</key>
<status>0x90</status>
<midino>0x13</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel4]</group>
<key>loop_double</key>
<status>0x93</status>
<midino>0x13</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel3]</group>
<key>loop_double</key>
<status>0x92</status>
<midino>0x13</midino>
<options>
<normal/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>PioneerDDJSX2.RollPerformancePad</key>
<status>0x97</status>
<midino>0x13</midino>
<options>
<script-binding/>
</options>
</control>
</controls>
<outputs/>
</controller>
</MixxxControllerPreset>
]=])
|
solution "gmsv_fileio"
language "C++"
location (os.get() .. "/" .. _ACTION)
flags {"Symbols", "NoEditAndContinue", "NoPCH", "StaticRuntime", "EnableSSE"}
targetdir ("build/" .. os.get())
includedirs {"include/"}
if (os.is("linux") or os.is("macosx")) then
buildoptions {"-fPIC"}
end
configurations
{
"Release",
"Debug"
}
configuration "Release"
defines { "NDEBUG" }
flags{ "OptimizeSpeed", "FloatFast" }
configuration "Debug"
defines { "_DEBUG" }
project "gmsv_fileio"
defines { "GMMODULE" }
files { "src/**.*", "include/**.*" }
libdirs { "lib/" }
kind "SharedLib"
targetname( "gmsv_fileio" )
if (os.is("Windows")) then
links { "bootil_static" }
targetsuffix "_win32"
elseif (os.is("linux")) then
links { "libbootil_static" }
targetsuffix "_linux"
end; |
function stepHit(step)
if step == 1 then
for i = 0, 3 do
tweenPosXAngle(i, _G['defaultStrum'..i..'X'] - 1000, getActorAngle(i) - 360, 0.05, i)
tweenFadeIn(i, 0, 0.05)
end
for i = 4, 7 do
tweenPosXAngle(i, _G['defaultStrum'..i..'X'] - 275, getActorAngle(i) - 360, 0.05, i)
end
end
end
|
ENT.Base = "dronesrewrite_base"
ENT.Type = "anim"
ENT.PrintName = "Plasma Bomb Drone"
ENT.Spawnable = true
ENT.AdminSpawnable = true
ENT.Category = "Drones Rewrite"
ENT.UNIT = "PB"
ENT.Weight = 120
ENT.Model = "models/dronesrewrite/plasmabomb/plasmabomb.mdl"
ENT.DoExplosionEffect = false
ENT.HealthAmount = 50
ENT.DefaultHealth = 50
ENT.HUD_hudName = "Drones 1"
ENT.OverlayName = "Red"
ENT.FirstPersonCam_pos = Vector(17, 0, 0)
ENT.ThirdPersonCam_distance = 50
ENT.RenderCam = false
ENT.NoiseCoefficient = 0
ENT.HUD_shouldDrawWeps = false
ENT.Speed = 1800
ENT.RotateSpeed = 9
ENT.AngOffset = 2
ENT.PitchOffset = 0.4
ENT.Alignment = 3.5
ENT.Fuel = 120
ENT.MaxFuel = 120
ENT.FuelReduction = 0.5
ENT.KeysFuncs = DRONES_REWRITE.DefaultKeys()
ENT.AllowPitchRestrictions = false
ENT.AllowYawRestrictions = true
ENT.YawMin = -60
ENT.YawMax = 60
ENT.UseFlashlight = false
ENT.AI_NoSkipZ = true
ENT.AI_AirZ = -50
ENT.AI_DistanceEnemy = 20
ENT.AI_MaxDistance = 60
ENT.Sounds = {
PropellerSound = {
Name = "hl1/ambience/computalk2.wav",
Pitch = 130,
Level = 65,
NoPitchChanges = true
},
ExplosionSound = {
Name = "drones/eblade_shock_01.wav",
Level = 85
}
}
ENT.NoPropellers = true
ENT.Propellers = {
Model = "models/props_junk/PopCan01a.mdl",
Info = { Vector(0, 0, 0) }
}
ENT.Modules = DRONES_REWRITE.GetBaseModules()
ENT.Weapons = { ["Plasma Bomb"] = { Name = "Plasma Bomb" } } |
CommonScriptsFolder="data/scripts/Common"
-- подключение независимых файлов
dofile(CommonScriptsFolder.."/assert.lua")
dofile(CommonScriptsFolder.."/ConvertToFunction.lua")
dofile(CommonScriptsFolder.."/CreateMethodForObject.lua")
dofile(CommonScriptsFolder.."/TempGlobals.lua")
dofile(CommonScriptsFolder.."/GetScriptByName.lua")
dofile(CommonScriptsFolder.."/ResourceManager.lua")
InitResourceManager()
--подключение папок c базовыми функциями
dofile(CommonScriptsFolder.."/String/_Include.lua")
dofile(CommonScriptsFolder.."/Draw/_Include.lua")
dofile(CommonScriptsFolder.."/Table/_Include.lua")
dofile(CommonScriptsFolder.."/Timing/_Include.lua")
dofile(CommonScriptsFolder.."/XML/_Include.lua")
--подключение зависимых файлов
dofile(CommonScriptsFolder.."/AddEventManager.lua")
dofile(CommonScriptsFolder.."/Mouse.lua")
InitMouse()
dofile(CommonScriptsFolder.."/Keyboard.lua")
InitKeyboard()
dofile(CommonScriptsFolder.."/GameSettings.lua")
dofile(CommonScriptsFolder.."/List.lua")
|
object_tangible_loot_creature_loot_kashyyyk_loot_minstyngar_fang_01 = object_tangible_loot_creature_loot_kashyyyk_loot_shared_minstyngar_fang_01:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_kashyyyk_loot_minstyngar_fang_01, "object/tangible/loot/creature_loot/kashyyyk_loot/minstyngar_fang_01.iff") |
local eonz = require 'eonz'
local table = eonz.pf.table
local string = eonz.pf.string
local SyntaxNode = require 'eonz.lexer.syntax_node'
return function(LuaParser, define_rule)
define_rule { name = 'function_name',
function (self)
local node = self:peek({'.', ':'}, 2)
and self:variable_reference()
or self:variable_declaration {
'function-declaration';
'declaration';
'function-name';
}
while self:peek('.') do
node = self:peek({'.', ':'}, 3)
and self:indexing_identifier(node)
or self:indexing_identifier(node, {
'member-function-declaration';
'function-declaration';
'declaration';
'function-name';
})
end
if self:peek(':') then
node = self:method_index(node, {
'method-function-declaration';
'member-function-declaration';
'function-declaration';
'declaration';
'function-name';
})
end
return node
end
}
define_rule { name = 'function_body',
function (self)
local params, block, kw_end =
self:param_list({
'function-parameter',
'local-variable-declaration',
'function-parameter-declaration',
'local-variable'
}),
self:block(),
self:consume('keyword.end')
return SyntaxNode({
'function-body-construct', 'construct'
},{
params,
block,
kw_end
},{
declared_locals = assert(params:tags("identifiers"));
expressions = {};
block_locals = params:tags("identifiers");
blocks = { block };
})
end
}
define_rule { name = 'invocation_prime',
function (self, base)
local target, args, is_method
if self:peek(':') then
target = self:method_index(base, {
'method-identifier-index-expression';
'identifier-index-expression';
'expression';
'lvalue-expression';
}):extend({}, {
expressions = { target }
})
--[[SyntaxNode({
'invocation-target-construct', 'method-invocation-target', 'target-construct', 'construct'
},{
self:method_index(base)
})--]]
is_method = true
else
target = base --[[ SyntaxNode({
'invocation-target-construct', 'function-invocation-target', 'target-construct', 'construct'
},{
base
})--]]
is_method = false
end
args = self:invocation_args(is_method)
local roles = {
'invocation-expression', 'expression', 'rvalue-expression', LuaParser.VARIABLE_LENGTH_ROLE
}
if is_method then
roles = table.join({ 'method-invocation-expression' }, roles)
else
roles = table.join({ 'function-invocation-expression' }, roles)
end
return SyntaxNode( roles,
{
target, args
},{
args = args,
is_method = is_method,
calling_convention = is_method and "method" or "normal",
value_category = LuaParser.RVALUE_CATEGORY,
valid_statement = true;
expressions = table.join({target}, assert(args:tags("expressions")));
})
end
}
define_rule { name = 'invocation_args',
function (self, is_method)
self:expect(LuaParser.INVOCATION_ARGS_PREDICT_SET,
"expected function arguments, table-as-arguments, or string-as-arguments")
if self:peek('(') then
local _1, _2
_1 = self:consume_optional('(')
if self:peek(LuaParser.EXPRESSION_PREDICT_SET) then
local args = self:expression_list()
_2 = self:consume(")")
return SyntaxNode({
'populated-list-arguments-construct',
'list-arguments-construct',
'arguments-construct',
'list-construct',
'construct',
(is_method and 'method-' or '') .. 'arguments-construct'
},{ _1, args, _2 },{
expressions = assert(args:tags("expressions"));
})
else
_2 = self:consume(")")
return SyntaxNode({
'empty-list-arguments-construct',
'list-arguments-construct',
'arguments-construct',
'list-construct',
'construct',
(is_method and 'method-' or '') .. 'arguments-construct'
},{ _1, _2 }, { expressions = {} })
end
elseif self:peek('{') then
local expr = self:table_constructor()
return SyntaxNode({
'table-arguments-construct',
'arguments-construct',
'construct',
(is_method and 'method-' or '') .. 'arguments-construct'
},{ expr }, { expressions = { expr }; })
elseif self:peek(LuaParser.STRING_TOKENS) then
local expr = self:expression()
return SyntaxNode({
'string-arguments-construct',
'arguments-construct',
'construct',
(is_method and 'method-' or '') .. 'arguments-construct'
},{ expr },{ expressions = { expr };})
end
end
}
end
|
-- inserts a new beat at the correct index.
-- Has several options for how to handle the associated table
print()
print("in insert_between, 'lam' is :", tostring(lam))
print("in insert_between, 'is_sorted' is :", tostring(lam.basic.is_sorted))
print()
--local add = require(_lamroot..'src/basic_methods/transformers/add')
local is_sorted = lam.basic.is_sorted --require(_lamroot..'src/basic_methods/selectors/is_sorted')
--local is_all_same = require(_lamroot..'src/basic_methods/selectors/is_all_same')
local insert_between = lam.basic.insert_between --require(_lamroot..'src/basic_methods/selectors/insert_between')
local tinsert = table.insert
local tremove = table.remove
local algo = function (rhythm, beats, overwrite, rhythms_upper_bound)
local r=0
while rhythm[r+1] and rhythm[r+1]<=beats[1] do
r = r+1
end
--r=r-1
local eb, equal_beats = 0, {
vals = {},
idx_beats = {},
idx_rhythm = {},
}
-- local b = 1 --`beats` indexer
-- local ii, insertions = r,{}
-- while beats[b] do --rhythm[r]<beats[b] do
-- if beats[b] == rhythm[r] then
-- eb = eb + 1
-- equal_beats.vals[eb] = rhythm[r]
-- equal_beats.idx_beats[eb] = b
-- equal_beats.idx_rhythm[eb] = r
-- eb = eb + 1
-- b = b + 1
-- elseif beats[b] > rhythm[r] then
-- r = r + 1
-- insertions[b] = r + b - eb
-- elseif beats[b] > rhythm[r] then
-- inserts[
-- end
print("~~~ performing algo")
local insertions, removals = {},{}
local b=1
while beats[b] do
local beat = beats[b]
local rhy = rhythm[r]
local rhy_next = rhythm[r+1] or rhythms_upper_bound
print(" ~ testing for ...")
print(string.format(" %8g < %8g < %8g", rhy, beat, rhy_next))
if beat == rhy then
eb = eb + 1
insertions[b] = false
elseif rhy<beat and beat<rhy_next then
insertions_val = r + b - eb
if overwrite then
insertions_val = insertions_val - (#removals)
end
insertions[b] = insertions_val
else
print(" ",beat,"is not less than", rhy_next)
b = b - 1
r = r + 1
removals[#removals+1] = r
end
b = b + 1
end
return insertions, removals, eb
end
return function (self, beats, assc_option, overwrite)
-- handle input args
if overwrite~=false or overwrite==nil then
overwrite = true
end
--print("overwrite is", overwrite)
if type(beats)=="number" then
beats = {beats}
end
if not is_sorted(beats) then
error("beats must be sorted")
end
-- get local copies of `rhythm` and `associated` properties
local rhythm = self:get('r')
local assc = self:get('a')
if not is_sorted(rhythm) then
error("rhythm property isn't sorted!", 2)
end
-- perform algo, get insertion and removal points
--print("-- about to perform algo")
local insertions, removals = algo(rhythm, beats, overwrite, self.upper_bound)
--print("-- algo was successful")
-- remove beats that are overalpped by the new ones
if overwrite then
print()
for i=#removals,1,-1 do -- these should be removed in reverse order
print("removing `rhythm["..tostring(removals[i]).."]` = ",rhythm[removals[i]])
tremove(rhythm,removals[i])
end
end
--print("-- loop 3 successful")
-- insert new beats
for i=1,#insertions do
local idx = insertions[i]
print("inserting beat "..tostring(beats[i]).." at index ",idx)
if idx then
tinsert(rhythm, idx, beats[i])
end
end
print()
--print("-- loop 4 successful")
-- now set the properties in self
self.associated = assc
self:set( rhythm )
return #removals, eb
end
|
-- require("prototypes.entities")
data:extend({
{
type = "sound",
name = "nevergonnagive",
filename = "__Roadrunner__/sounds/nevergonnagiveyouup.ogg",
volume = 1
}
}) |
if vim.g.did_load_filetypes and vim.g.did_load_filetypes ~= 0 then
return
end
-- For now, make this opt-in with a global variable
if vim.g.do_filetype_lua ~= 1 then
return
end
vim.cmd [[
augroup filetypedetect
au BufRead,BufNewFile * call v:lua.vim.filetype.match(expand('<afile>'))
" These *must* be sourced after the autocommand above is created
runtime! ftdetect/*.vim
runtime! ftdetect/*.lua
" Set a marker so that the ftdetect scripts are not sourced a second time by filetype.vim
let g:did_load_ftdetect = 1
augroup END
]]
if not vim.g.ft_ignore_pat then
vim.g.ft_ignore_pat = "\\.\\(Z\\|gz\\|bz2\\|zip\\|tgz\\)$"
end
|
-----------------------------------
-- Area: Port Bastok
-- NPC: Latifah
-- Involved in Quest: Stamp Hunt
-----------------------------------
require("scripts/globals/quests");
-----------------------------------
function onTrade(player,npc,trade)
end;
function onTrigger(player,npc)
local StampHunt = player:getQuestStatus(BASTOK,tpz.quest.id.bastok.STAMP_HUNT);
if (StampHunt == QUEST_ACCEPTED and player:getMaskBit(player:getCharVar("StampHunt_Mask"),6) == false) then
player:startEvent(120);
else
player:startEvent(13);
end
end;
function onEventUpdate(player,csid,option)
end;
function onEventFinish(player,csid,option)
if (csid == 120) then
player:setMaskBit(player:getCharVar("StampHunt_Mask"),"StampHunt_Mask",6,true);
end
end;
|
local memory = require "memory"
local system = require "coutil.system"
newtest("stdio") --------------------------------------------------------------
do case "file"
local inputpath = os.tmpname()
local outputpath = os.tmpname()
writeto(inputpath, "Hello world!\n")
local stdin = assert(io.open(inputpath, "r"))
local stdout = assert(io.open(outputpath, "w"))
spawn(function ()
local res, val = system.execute{
execfile = luabin,
stdin = stdin,
stdout = stdout,
arguments = { "-e", utilschunk..[[
local memory = require "memory"
local system = require "coutil.system"
spawn(function ()
local buffer = memory.create(1024)
local bytes = system.stdin:read(buffer)
if standard == "win32" then
assert(bytes == 14)
assert(buffer:tostring(1, 14) == "Hello world!\r\n")
else
assert(bytes == 13)
assert(buffer:tostring(1, 13) == "Hello world!\n")
end
system.stdout:write("Goodbye world!\n")
end)
system.run()
]] }
}
assert(res == "exit")
assert(val == 0)
assert(readfrom(outputpath) == "Goodbye world!\n")
end)
assert(stdin:close())
assert(stdout:close())
system.run()
done()
end
do case "pipe"
spawn(function ()
local procinfo = {
execfile = luabin,
stdin = "w",
stdout = "r",
arguments = { "-e", utilschunk..[[
local memory = require "memory"
local system = require "coutil.system"
spawn(function ()
local buffer = memory.create(1024)
local bytes = system.stdin:read(buffer)
assert(bytes == 13)
assert(buffer:tostring(1, 13) == "Hello world!\n")
system.stdout:write("Goodbye world!\n")
end)
system.run()
]] }
}
spawn(system.execute, procinfo)
assert(procinfo.stdin:write("Hello world!\n"))
local buffer = memory.create(1024)
local bytes = procinfo.stdout:read(buffer)
assert(bytes == 15)
assert(buffer:tostring(1, 15) == "Goodbye world!\n")
end)
system.run()
done()
end
|
ITEM.name = "Bowl"
ITEM.desc = "A dirty ceramic bowl"
ITEM.model = "models/z-o-m-b-i-e/metro_2033/station_props/m33_plate_03.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.money = {1, 3}
|
local ffi = require "ffi"
local R3E_FULL_DRIVERS = R3E_FULL_DRIVERS or 128
local R3E_SHARED_MEMORY_NAME = "$R3E"
local R3E_DEFS_COMMON = [[
typedef int32_t r3e_int32;
typedef float r3e_float32;
typedef double r3e_float64;
typedef uint8_t r3e_u8char;
#pragma pack(1)
typedef enum
{
// Major version number to test against
R3E_VERSION_MAJOR = 1,
// Minor version number to test against
R3E_VERSION_MINOR = 7,
R3E_NUM_DRIVERS_MAX = 128,
}r3e_misc;
typedef enum
{
R3E_SESSION_UNAVAILABLE = -1,
R3E_SESSION_PRACTICE = 0,
R3E_SESSION_QUALIFY = 1,
R3E_SESSION_RACE = 2,
R3E_SESSION_WARMUP = 3,
} r3e_session;
typedef enum
{
R3E_SESSION_PHASE_UNAVAILABLE = -1,
// Currently in garage
R3E_SESSION_PHASE_GARAGE = 1,
// Gridwalk or track walkthrough
R3E_SESSION_PHASE_GRIDWALK = 2,
// Formation lap, rolling start etc.
R3E_SESSION_PHASE_FORMATION = 3,
// Countdown to race is ongoing
R3E_SESSION_PHASE_COUNTDOWN = 4,
// Race is ongoing
R3E_SESSION_PHASE_GREEN = 5,
// End of session
R3E_SESSION_PHASE_CHECKERED = 6,
} r3e_session_phase;
typedef enum
{
R3E_CONTROL_UNAVAILABLE = -1,
// Controlled by the actual player
R3E_CONTROL_PLAYER = 0,
// Controlled by AI
R3E_CONTROL_AI = 1,
// Controlled by a network entity of some sort
R3E_CONTROL_REMOTE = 2,
// Controlled by a replay or ghost
R3E_CONTROL_REPLAY = 3,
} r3e_control;
typedef enum
{
R3E_PIT_WINDOW_UNAVAILABLE = -1,
// Pit stops are not enabled for this session
R3E_PIT_WINDOW_DISABLED = 0,
// Pit stops are enabled, but you're not allowed to perform one right now
R3E_PIT_WINDOW_CLOSED = 1,
// Allowed to perform a pit stop now
R3E_PIT_WINDOW_OPEN = 2,
// Currently performing the pit stop changes (changing driver, etc.)
R3E_PIT_WINDOW_STOPPED = 3,
// After the current mandatory pitstop have been completed
R3E_PIT_WINDOW_COMPLETED = 4,
} r3e_pit_window;
typedef enum
{
R3E_TIRE_TYPE_UNAVAILABLE = -1,
R3E_TIRE_TYPE_OPTION = 0,
R3E_TIRE_TYPE_PRIME = 1,
} r3e_tire_type;
typedef enum
{
R3E_TIRE_SUBTYPE_UNAVAILABLE = -1,
R3E_TIRE_SUBTYPE_PRIMARY = 0,
R3E_TIRE_SUBTYPE_ALTERNATE = 1,
R3E_TIRE_SUBTYPE_SOFT = 2,
R3E_TIRE_SUBTYPE_MEDIUM = 3,
R3E_TIRE_SUBTYPE_HARD = 4,
} r3e_tire_subtype;
typedef enum
{
// No mandatory pitstops
R3E_PITSTOP_STATUS_UNAVAILABLE = -1,
// Mandatory pitstop not served yet
R3E_PITSTOP_STATUS_UNSERVED = 0,
// Mandatory pitstop served
R3E_PITSTOP_STATUS_SERVED = 1,
} r3e_pitstop_status;
typedef enum
{
// N/A
R3E_FINISH_STATUS_UNAVAILABLE = -1,
// Still on track, not finished
R3E_FINISH_STATUS_NONE = 0,
// Finished session normally
R3E_FINISH_STATUS_FINISHED = 1,
// Did not finish
R3E_FINISH_STATUS_DNF = 2,
// Did not qualify
R3E_FINISH_STATUS_DNQ = 3,
// Did not start
R3E_FINISH_STATUS_DNS = 4,
// Disqualified
R3E_FINISH_STATUS_DQ = 5,
} r3e_finish_status;
typedef enum
{
// N/A
R3E_SESSION_LENGTH_UNAVAILABLE = -1,
R3E_SESSION_LENGTH_TIME_BASED = 0,
R3E_SESSION_LENGTH_LAP_BASED = 1,
// Time and lap based session means there will be an extra lap after the time has run out
R3E_SESSION_LENGTH_TIME_AND_LAP_BASED = 2,
} r3e_session_length_format;
typedef struct
{
r3e_float32 x;
r3e_float32 y;
r3e_float32 z;
} r3e_vec3_f32;
typedef struct
{
r3e_float64 x;
r3e_float64 y;
r3e_float64 z;
} r3e_vec3_f64;
typedef struct
{
r3e_float32 pitch;
r3e_float32 yaw;
r3e_float32 roll;
} r3e_ori_f32;
typedef struct
{
r3e_float32 front_left_left;
r3e_float32 front_left_center;
r3e_float32 front_left_right;
r3e_float32 front_right_left;
r3e_float32 front_right_center;
r3e_float32 front_right_right;
r3e_float32 rear_left_left;
r3e_float32 rear_left_center;
r3e_float32 rear_left_right;
r3e_float32 rear_right_left;
r3e_float32 rear_right_center;
r3e_float32 rear_right_right;
} r3e_tire_temp;
// High precision data for player's vehicle only
typedef struct
{
// Virtual physics time
// Unit: Ticks (1 tick = 1/400th of a second)
r3e_int32 game_simulation_ticks;
// Virtual physics time
// Unit: Seconds
r3e_float64 game_simulation_time;
// Car world-space position
r3e_vec3_f64 position;
// Car world-space velocity
// Unit: Meter per second (m/s)
r3e_vec3_f64 velocity;
// Car local-space velocity
// Unit: Meter per second (m/s)
r3e_vec3_f64 local_velocity;
// Car world-space acceleration
// Unit: Meter per second squared (m/s^2)
r3e_vec3_f64 acceleration;
// Car local-space acceleration
// Unit: Meter per second squared (m/s^2)
r3e_vec3_f64 local_acceleration;
// Car body orientation
// Unit: Euler angles
r3e_vec3_f64 orientation;
// Car body rotation
r3e_vec3_f64 rotation;
// Car body angular acceleration (torque divided by inertia)
r3e_vec3_f64 angular_acceleration;
// Car world-space angular velocity
// Unit: Radians per second
r3e_vec3_f64 angular_velocity;
// Car local-space angular velocity
// Unit: Radians per second
r3e_vec3_f64 local_angular_velocity;
} r3e_playerdata;
typedef struct
{
// Whether yellow flag is currently active
// -1 = no data
// 0 = not active
// 1 = active
r3e_int32 yellow;
// Whether blue flag is currently active
// -1 = no data
// 0 = not active
// 1 = active
r3e_int32 blue;
// Whether black flag is currently active
// -1 = no data
// 0 = not active
// 1 = active
r3e_int32 black;
} r3e_flags;
typedef struct
{
// Whether green flag is currently active
// -1 = no data
// 0 = not active
// 1 = active
r3e_int32 green;
// Whether checkered flag is currently active
// -1 = no data
// 0 = not active
// 1 = active
r3e_int32 checkered;
// Whether black and white flag is currently active and reason
// -1 = no data
// 0 = not active
// 1 = blue flag 1st warning
// 2 = blue flag 2nd warning
// 3 = wrong way
// 4 = cutting track
r3e_int32 black_and_white;
} r3e_flags_extended;
typedef struct
{
// Whether white flag is currently active
// -1 = no data
// 0 = not active
// 1 = active
r3e_int32 white;
// Whether yellow flag was caused by current slot
// -1 = no data
// 0 = didn't cause it
// 1 = caused it
r3e_int32 yellowCausedIt;
// Whether overtake of car in front by current slot is allowed under yellow flag
// -1 = no data
// 0 = not allowed
// 1 = allowed
r3e_int32 yellowOvertake;
// Whether you have gained positions illegaly under yellow flag to give back
// -1 = no data
// 0 = no positions gained
// n = number of positions gained
r3e_int32 yellowPositionsGained;
} r3e_flags_extended_2;
typedef struct
{
// Range: 0.0 - 1.0
// Note: -1.0 = N/A
r3e_float32 engine;
// Range: 0.0 - 1.0
// Note: -1.0 = N/A
r3e_float32 transmission;
// Range: 0.0 - 1.0
// Note: A bit arbitrary at the moment. 0.0 doesn't necessarily mean completely destroyed.
// Note: -1.0 = N/A
r3e_float32 aerodynamics;
} r3e_car_damage;
typedef struct
{
r3e_float32 front_left;
r3e_float32 front_right;
r3e_float32 rear_left;
r3e_float32 rear_right;
} r3e_tire_data;
typedef struct
{
r3e_int32 drive_through;
r3e_int32 stop_and_go;
r3e_int32 pit_stop;
r3e_int32 time_deduction;
r3e_int32 slow_down;
} r3e_cut_track_penalties;
typedef struct
{
// If DRS is equipped and allowed
// 0 = No, 1 = Yes, -1 = N/A
r3e_int32 equipped;
// Got DRS activation left
// 0 = No, 1 = Yes, -1 = N/A
r3e_int32 available;
// Number of DRS activations left this lap
// Note: In sessions with 'endless' amount of drs activations per lap this value starts at int32::max
// -1 = N/A
r3e_int32 numActivationsLeft;
// DRS engaged
// 0 = No, 1 = Yes, -1 = N/A
r3e_int32 engaged;
} r3e_drs;
typedef struct
{
r3e_int32 available;
r3e_int32 engaged;
r3e_int32 amount_left;
r3e_float32 engaged_time_left;
r3e_float32 wait_time_left;
} r3e_push_to_pass;
typedef struct
{
r3e_float32 sector1;
r3e_float32 sector2;
r3e_float32 sector3;
} r3e_sectors;
typedef struct
{
r3e_u8char name[64];
r3e_int32 car_number;
r3e_int32 class_id;
r3e_int32 model_id;
r3e_int32 team_id;
r3e_int32 livery_id;
r3e_int32 manufacturer_id;
r3e_int32 slot_id;
r3e_int32 class_performance_index;
} r3e_driver_info;
typedef struct
{
r3e_driver_info driver_info;
r3e_finish_status finish_status;
r3e_int32 place;
r3e_float32 lap_distance;
r3e_vec3_f32 position;
r3e_int32 track_sector;
r3e_int32 completed_laps;
r3e_int32 current_lap_valid;
r3e_float32 lap_time_current_self;
r3e_sectors sector_time_current_self;
r3e_sectors sector_time_previous_self;
r3e_sectors sector_time_best_self;
r3e_float32 time_delta_front;
r3e_float32 time_delta_behind;
r3e_pitstop_status pitstop_status;
r3e_int32 in_pitlane;
r3e_int32 num_pitstops;
r3e_cut_track_penalties penalties;
r3e_float32 car_speed;
r3e_int32 tire_type_front;
r3e_int32 tire_type_rear;
r3e_int32 tire_subtype_front;
r3e_int32 tire_subtype_rear;
} r3e_driver_data;
]]
local R3E_DEFS_PLAYER1 =
[[
//////////////////////////////////////////////////////////////////////////
// Version
//////////////////////////////////////////////////////////////////////////
r3e_int32 _version_major;
r3e_int32 _version_minor;
r3e_int32 _all_drivers_offset; // Offset to num_cars
r3e_int32 _driver_data_size; // size of the driver data struct
//////////////////////////////////////////////////////////////////////////
// Game State
//////////////////////////////////////////////////////////////////////////
r3e_int32 game_paused;
r3e_int32 game_in_menus;
//////////////////////////////////////////////////////////////////////////
// High detail
//////////////////////////////////////////////////////////////////////////
// High detail player vehicle data
r3e_playerdata player;
//////////////////////////////////////////////////////////////////////////
// Event and session
//////////////////////////////////////////////////////////////////////////
r3e_u8char track_name[64];
r3e_u8char layout_name[64];
r3e_int32 track_id;
r3e_int32 layout_id;
r3e_float32 layout_length;
// The current race event index, for championships with multiple events
// Note: 0-indexed, -1 = N/A
r3e_int32 event_index;
// Which session the player is in (practice, qualifying, race, etc.)
// Note: See the r3e_session enum
r3e_int32 session_type;
// The current iteration of the current type of session (second qualifying session, etc.)
// Note: 0-indexed, -1 = N/A
r3e_int32 session_iteration;
// Which phase the current session is in (gridwalk, countdown, green flag, etc.)
// Note: See the r3e_session_phase enum
r3e_int32 session_phase;
// If tire wear is active (-1 = N/A, 0 = Off, 1 = 1)
r3e_int32 tire_wear_active;
// If fuel usage is active (-1 = N/A, 0 = Off, 1 = 1)
r3e_int32 fuel_use_active;
// Total number of laps in the race, or -1 if player is not in race mode (practice, test mode, etc.)
r3e_int32 number_of_laps;
// Amount of time remaining for the current session
// Note: Only available in time-based sessions, -1.0 = N/A
// Units: Seconds
r3e_float32 session_time_remaining;
//////////////////////////////////////////////////////////////////////////
// Pit
//////////////////////////////////////////////////////////////////////////
// Current status of the pit stop
// Note: See the r3e_pit_window enum
r3e_int32 pit_window_status;
// The minute/lap from which you're obligated to pit (-1 = N/A)
// Unit: Minutes in time-based sessions, otherwise lap
r3e_int32 pit_window_start;
// The minute/lap into which you need to have pitted (-1 = N/A)
// Unit: Minutes in time-based sessions, otherwise lap
r3e_int32 pit_window_end;
// If current vehicle is in pitlane (-1 = N/A)
r3e_int32 in_pitlane;
// Number of pitstops the current vehicle has performed (-1 = N/A)
r3e_int32 num_pitstops;
//////////////////////////////////////////////////////////////////////////
// Scoring & Timings
//////////////////////////////////////////////////////////////////////////
// The current state of each type of flag
r3e_flags flags;
// Current position (1 = first place)
r3e_int32 position;
r3e_finish_status finish_status;
// Total number of cut track warnings (-1 = N/A)
r3e_int32 cut_track_warnings;
// The number of penalties the car currently has pending of each type (-1 = N/A)
r3e_cut_track_penalties penalties;
// Total number of penalties pending for the car
// Note: See the 'penalties' field
r3e_int32 num_penalties;
// How many laps the car has completed. If this value is 6, the car is on it's 7th lap. -1 = n/a
r3e_int32 completed_laps;
r3e_int32 current_lap_valid;
r3e_int32 track_sector;
r3e_float32 lap_distance;
// fraction of lap completed, 0.0-1.0, -1.0 = N/A
r3e_float32 lap_distance_fraction;
// The current best lap time for the leader of the session
// Unit: Seconds (-1.0 = N/A)
r3e_float32 lap_time_best_leader;
// The current best lap time for the leader of the current/viewed vehicle's class in the current session
// Unit: Seconds (-1.0 = N/A)
r3e_float32 lap_time_best_leader_class;
// Sector times of fastest lap by anyone in session
// Unit: Seconds (-1.0 = N/A)
r3e_sectors session_best_lap_sector_times;
// Best lap time
// Unit: Seconds (-1.0 = N/A)
r3e_float32 lap_time_best_self;
r3e_sectors sector_time_best_self;
// Previous lap
// Unit: Seconds (-1.0 = N/A)
r3e_float32 lap_time_previous_self;
r3e_sectors sector_time_previous_self;
// Current lap time
// Unit: Seconds (-1.0 = N/A)
r3e_float32 lap_time_current_self;
r3e_sectors sector_time_current_self;
// The time delta between this car's time and the leader
// Unit: Seconds (-1.0 = N/A)
r3e_float32 lap_time_delta_leader;
// The time delta between this car's time and the leader of the car's class
// Unit: Seconds (-1.0 = N/A)
r3e_float32 lap_time_delta_leader_class;
// Time delta between this car and the car placed in front
// Unit: Seconds (-1.0 = N/A)
r3e_float32 time_delta_front;
// Time delta between this car and the car placed behind
// Unit: Seconds (-1.0 = N/A)
r3e_float32 time_delta_behind;
//////////////////////////////////////////////////////////////////////////
// Vehicle information
//////////////////////////////////////////////////////////////////////////
r3e_driver_info vehicle_info;
r3e_u8char player_name[64];
//////////////////////////////////////////////////////////////////////////
// Vehicle state
//////////////////////////////////////////////////////////////////////////
// Which controller is currently controlling the vehicle (AI, player, remote, etc.)
// Note: See the r3e_control enum
r3e_int32 control_type;
// Unit: Meter per second (m/s)
r3e_float32 car_speed;
// Unit: Radians per second (rad/s)
r3e_float32 engine_rps;
r3e_float32 max_engine_rps;
// -2 = N/A, -1 = reverse, 0 = neutral, 1 = first gear, ...
r3e_int32 gear;
// -1 = N/A
r3e_int32 num_gears;
// Physical location of car's center of gravity in world space (X, Y, Z) (Y = up)
r3e_vec3_f32 car_cg_location;
// Pitch, yaw, roll
// Unit: Radians (rad)
r3e_ori_f32 car_orientation;
// Acceleration in three axes (X, Y, Z) of car body in local-space.
// From car center, +X=left, +Y=up, +Z=back.
// Unit: Meter per second squared (m/s^2)
r3e_vec3_f32 local_acceleration;
// Unit: Liters (l)
// Note: Not valid for AI or remote players
r3e_float32 fuel_left;
r3e_float32 fuel_capacity;
// Unit: Celsius (C)
// Note: Not valid for AI or remote players
r3e_float32 engine_water_temp;
r3e_float32 engine_oil_temp;
// Unit: Kilopascals (KPa)
// Note: Not valid for AI or remote players
r3e_float32 fuel_pressure;
// Unit: Kilopascals (KPa)
// Note: Not valid for AI or remote players
r3e_float32 engine_oil_pressure;
// How pressed the throttle pedal is
// Range: 0.0 - 1.0 (-1.0 = N/A)
// Note: Not valid for AI or remote players
r3e_float32 throttle_pedal;
// How pressed the brake pedal is
// Range: 0.0 - 1.0 (-1.0 = N/A)
// Note: Not valid for AI or remote players
r3e_float32 brake_pedal;
// How pressed the clutch pedal is
// Range: 0.0 - 1.0 (-1.0 = N/A)
// Note: Not valid for AI or remote players
r3e_float32 clutch_pedal;
// DRS data
r3e_drs drs;
// Pit limiter (-1 = N/A, 0 = inactive, 1 = active)
r3e_int32 pit_limiter;
// Push to pass data
r3e_push_to_pass push_to_pass;
// How much the vehicle's brakes are biased towards the back wheels (0.3 = 30%, etc.) (-1.0 = N/A)
// Note: Not valid for AI or remote players
r3e_float32 brake_bias;
//////////////////////////////////////////////////////////////////////////
// Tires
//////////////////////////////////////////////////////////////////////////
// Which type of tires the car has (option, prime, etc.)
// Note: See the r3e_tire_type enum, deprecated - use the values further down instead
r3e_int32 tire_type;
// Rotation speed
// Uint: Radians per second
r3e_tire_data tire_rps;
// Range: 0.0 - 1.0 (-1.0 = N/A)
r3e_tire_data tire_grip;
// Range: 0.0 - 1.0 (-1.0 = N/A)
r3e_tire_data tire_wear;
// Unit: Kilopascals (KPa) (-1.0 = N/A)
// Note: Not valid for AI or remote players
r3e_tire_data tire_pressure;
// Percentage of dirt on tire (-1.0 = N/A)
// Range: 0.0 - 1.0
r3e_tire_data tire_dirt;
// Brake temperature (-1.0 = N/A)
// Unit: Celsius (C)
// Note: Not valid for AI or remote players
r3e_tire_data brake_temp;
// Temperature of three points across the tread of the tire (-1.0 = N/A)
// Unit: Celsius (C)
// Note: Not valid for AI or remote players
r3e_tire_temp tire_temp;
// Which type of tires the car has (option, prime, etc.)
// Note: See the r3e_tire_type enum
r3e_int32 tire_type_front;
r3e_int32 tire_type_rear;
// Which subtype of tires the car has
// Note: See the r3e_tire_subtype enum
r3e_int32 tire_subtype_front;
r3e_int32 tire_subtype_rear;
//////////////////////////////////////////////////////////////////////////
// Damage
//////////////////////////////////////////////////////////////////////////
// The current state of various parts of the car
// Note: Not valid for AI or remote players
r3e_car_damage car_damage;
//////////////////////////////////////////////////////////////////////////
// Additional Info
//////////////////////////////////////////////////////////////////////////
// The current state of each type of extended flag
r3e_flags_extended flags_extended;
// Yellow flag for each sector; -1 = no data, 0 = not active, 1 = active
r3e_int32 sector_yellow[3];
// Distance into track for closest yellow, -1.0 if no yellow flag exists
// Unit: Meters (m)
r3e_float32 closest_yellow_distance_into_track;
// Additional flag info
r3e_flags_extended_2 flags_extended_2;
// If the session is time based, lap based or time based with an extra lap at the end
r3e_session_length_format session_length_format;
]]
local R3E_DEFS = R3E_DEFS_COMMON..[[
typedef struct {
]]..R3E_DEFS_PLAYER1..[[
} r3e_shared;
typedef struct {
]]..R3E_DEFS_PLAYER1..[[
// Driver info
//////////////////////////////////////////////////////////////////////////
// Number of cars (including the player) in the race
r3e_int32 num_cars;
// Contains name and vehicle info for all drivers in place order
r3e_driver_data all_drivers_data_1[]]..R3E_FULL_DRIVERS..[[];
} r3e_shared_full;
]]
-- windows internals
ffi.cdef(R3E_DEFS)
ffi.cdef([[
typedef void* HANDLE;
typedef int BOOL;
typedef unsigned long DWORD;
typedef const char* LPCSTR;
typedef const void* LPCVOID;
typedef void* LPVOID;
typedef size_t SIZE_T;
typedef unsigned long ULONG_PTR;
typedef long LONG;
typedef char CHAR;
DWORD GetLastError();
enum {
MAX_PATH = 260,
FILE_MAP_COPY = 0x0001,
FILE_MAP_WRITE = 0x0002,
FILE_MAP_READ = 0x0004,
PAGE_READONLY = 0x02,
PAGE_READWRITE = 0x04,
TH32CS_SNAPPROCESS = 0x0002,
};
typedef struct tagPROCESSENTRY32
{
DWORD dwSize;
DWORD cntUsage;
DWORD th32ProcessID; // this process
ULONG_PTR th32DefaultHeapID;
DWORD th32ModuleID; // associated exe
DWORD cntThreads;
DWORD th32ParentProcessID; // this process's parent process
LONG pcPriClassBase; // Base priority of process's threads
DWORD dwFlags;
CHAR szExeFile[MAX_PATH]; // Path
} PROCESSENTRY32;
typedef PROCESSENTRY32 * PPROCESSENTRY32;
typedef PROCESSENTRY32 * LPPROCESSENTRY32;
BOOL
Process32First(
HANDLE hSnapshot,
LPPROCESSENTRY32 lppe
);
BOOL
Process32Next(
HANDLE hSnapshot,
LPPROCESSENTRY32 lppe
);
HANDLE
CreateToolhelp32Snapshot(
DWORD dwFlags,
DWORD th32ProcessID
);
HANDLE
OpenFileMappingA(
DWORD dwDesiredAccess,
BOOL bInheritHandle,
LPCSTR lpName
);
HANDLE
CreateFileMappingA(
HANDLE hFile,
void* lpFileMappingAttributes,
DWORD flProtect,
DWORD dwMaximumSizeHigh,
DWORD dwMaximumSizeLow,
LPCSTR lpName
);
BOOL CloseHandle(HANDLE);
LPVOID
MapViewOfFile(
HANDLE hFileMappingObject,
DWORD dwDesiredAccess,
DWORD dwFileOffsetHigh,
DWORD dwFileOffsetLow,
SIZE_T dwNumberOfBytesToMap
);
BOOL
FlushViewOfFile(
LPCVOID lpBaseAddress,
SIZE_T dwNumberOfBytesToFlush
);
BOOL
UnmapViewOfFile(
LPCVOID lpBaseAddress
);
]])
local r3e_shared_type_full = ffi.typeof("r3e_shared_full")
local r3e_shared_type_ptr_full = ffi.typeof("r3e_shared_full*")
local r3e_shared_size_full = ffi.sizeof("r3e_shared_full")
local r3e_shared_type = ffi.typeof("r3e_shared")
local r3e_shared_type_ptr = ffi.typeof("r3e_shared*")
local r3e_shared_size = ffi.sizeof("r3e_shared")
print ("r3e sizeof shared", r3e_shared_size)
print ("r3e sizeof shared full", r3e_shared_size_full)
local _M = {
RPS_TO_RPM = (60 / (2 * math.pi)),
MPS_TO_KPH = 3.6,
SHARED_TYPE = r3e_shared_type,
SHARED_TYPE_NAME = "r3e_shared",
SHARED_SIZE = r3e_shared_size,
SHARED_TYPE_FULL = r3e_shared_type_full,
SHARED_TYPE_NAME_FULL = "r3e_shared_full",
SHARED_SIZE_FULL = r3e_shared_size_full,
DEFS = R3E_DEFS,
DEFS_FULL = R3E_DEFS_FULL,
Session = {
Unavailable = -1,
Practice = 0,
Qualify = 1,
Race = 2,
WarmUp = 3,
},
SessionPhase = {
Unavailable = -1,
Garage = 0,
Gridwalk = 1,
Formation = 3,
Countdown = 4,
Green = 5,
Checkered = 6
},
Control = {
Unavailable = -1,
Player = 0,
AI = 1,
Remote = 2,
Replay = 3
},
PitWindow = {
Unavailable = -1,
Disabled = 0,
Closed = 1,
Open = 2,
Completed = 3
},
TireType = {
Unavailable = -1,
Option = 0,
Prime = 1
},
FinishStatus = {
Unavailable = -1,
None = 0,
Finished = 1,
DNF = 2,
DNQ = 3,
DNS = 4,
DQ = 5,
},
PitstopStatus = {
Unavailable = -1,
Unserved = 0,
Served = 1,
},
}
local function isProcessRunning(name)
local entry = ffi.new("PROCESSENTRY32")
ffi.fill(entry,0)
entry.dwSize = ffi.sizeof("PROCESSENTRY32");
local snapshot = ffi.C.CreateToolhelp32Snapshot(ffi.C.TH32CS_SNAPPROCESS, 0);
if (ffi.C.Process32First(snapshot, entry) ~= 0) then
while (ffi.C.Process32Next(snapshot, entry) ~= 0) do
if (ffi.string(entry.szExeFile) == name) then
return true
end
end
end
return false
end
function _M.isR3Erunning()
return _M.emulation or isProcessRunning("RRRE64.exe")
end
local function open()
return ffi.C.OpenFileMappingA(
ffi.C.FILE_MAP_READ,
0,
R3E_SHARED_MEMORY_NAME);
end
local function create()
local invalid = ffi.cast("HANDLE",ffi.cast("size_t",-1))
return ffi.C.CreateFileMappingA(
invalid,
nil,
ffi.C.PAGE_READWRITE,
0,
r3e_shared_size_full,
R3E_SHARED_MEMORY_NAME);
end
function _M.isMappable()
local handle = open()
if (handle ~= nil) then
ffi.C.CloseHandle(handle)
end
return handle ~= nil
end
function _M.createMapping(writeonly, fulldata)
assert(not writeonly or (writeonly and fulldata), "writeonly mappings must be using fulldata")
local filemap = writeonly and ffi.C.FILE_MAP_WRITE or ffi.C.FILE_MAP_READ
local handle
if (writeonly) then
handle = create()
else
handle = open()
end
if (handle == nil) then
error("could not open handle: "..ffi.C.GetLastError())
return
end
local buffer = ffi.C.MapViewOfFile(handle, filemap, 0, 0, r3e_shared_size_full)
buffer = ffi.cast(r3e_shared_type_ptr_full, buffer)
if (buffer == nil) then
error("could not map buffer: "..ffi.C.GetLastError())
ffi.C.CloseHandle(handle)
return
end
local map = {}
print("r3edata map created", map, writeonly)
if (fulldata) then
if (writeonly) then
function map:writeData(src)
ffi.copy(buffer, src, r3e_shared_size_full)
end
else
function map:readData(dst)
ffi.copy(dst, buffer, r3e_shared_size_full)
end
end
else
-- transcode from full/reduced
assert(not writeonly)
function map:readData(dst)
ffi.copy(dst, buffer, r3e_shared_size)
end
end
function map:destroy()
ffi.C.UnmapViewOfFile(buffer)
ffi.C.CloseHandle(handle)
print("r3edata map destroyed", map, writeonly)
end
return map
end
-- module definition
return _M
|
local merge = require('./init')
local t1 = {a = 'hello', b = 'world'}
local t1addon = {c = 'goodbye', d = 'universe'}
assert(merge(t1, t1addon), { b = 'world', d = 'universe', a = 'hello', c = 'goodbye' })
local t2 = {a = 'hello', b = 'world'}
assert(merge(t2, t2), { a = 'hello', b = 'world' })
local t3 = {a = 'hello', b = 'world'}
local t3addon = {a = 'goodbye', b = 'world'}
assert(merge(t3, t3addon), {a = 'goodbye', b = 'world'})
local t4 = {a = 'hello', b = 'world'}
local t4addon = {c = t4, d = t1}
assert(merge(t4, t4addon), { b = 'world', d = { b = 'world', d = 'universe', a = 'hello', c = 'goodbye' }, a = 'hello', c = { a = 'hello', b = 'world' } })
print('All tests passed successfully') |
return require('packer').startup(function()
-- Packer can manage itself
use 'wbthomason/packer.nvim'
use 'morhetz/gruvbox'
use 'tpope/vim-fugitive'
use {
'nvim-telescope/telescope.nvim',
requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}}
}
use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
use 'vim-airline/vim-airline'
use 'jiangmiao/auto-pairs'
use 'neovim/nvim-lspconfig'
use 'nvim-lua/completion-nvim'
use 'ervandew/supertab'
use 'maxmellon/vim-jsx-pretty'
use 'tpope/vim-commentary'
use {
'prettier/vim-prettier',
run = 'npm install'
}
use 'tpope/vim-unimpaired'
use 'mattn/emmet-vim'
use 'nelsyeung/twig.vim'
--use 'captbaritone/better-indent-support-for-php-with-html'
use 'danilamihailov/beacon.nvim'
end)
|
local log = require('telescope.log')
local entry_display = {}
-- index are used to determine the correct order
-- elements = {
-- [1] = { element, max width }, -- max width should be greater than 0
-- [2] = { a, 0 } -- Use 0 to disable max width
-- [3] = { b, 0 } -- If b is nil, skip this column, should skip column for all rows
-- },
-- separator = " " -- either arbitrary string, when you wanna use the same separator between all elements
-- separator = { " ", ":" } -- or table, where [1] is separator between elements[1] and elements[2], etc
-- TODO: Remove this and move ONLY to create method.
local table_format = function(picker, elements, separator)
-- TODO: Truncate...
local win_width = vim.api.nvim_win_get_width(picker.results_win)
local output = ""
for k, v in ipairs(elements) do
local text = v[1]
local width = v[2]
if text ~= nil then
if k > 1 then
output = output .. (type(separator) == "table" and separator[k - 1] or separator)
end
if width then
if width == 0 then
output = output .. string.format("%s", text)
elseif width < 1 then
output = output .. string.format("%-" .. math.floor(width * win_width) .. "s", text)
else
output = output .. string.format("%-" .. width .."s", text)
end
else
output = output .. text
end
end
end
return output
end
local function truncate(str, len)
-- TODO: This doesn't handle multi byte chars...
if vim.fn.strdisplaywidth(str) > len then
str = str:sub(1, len - 1)
str = str .. "…"
end
return str
end
entry_display.create = function(configuration)
local generator = {}
for _, v in ipairs(configuration.items) do
if v.width then
local justify = not v.right_justify and "-" or ""
local format_str = "%" .. justify .. v.width .. "s"
table.insert(generator, function(item)
if type(item) == 'table' then
return string.format(format_str, truncate(item[1], v.width)), item[2]
else
return string.format(format_str, truncate(item, v.width))
end
end)
else
table.insert(generator, function(item)
if type(item) == 'table' then
return item[1], item[2]
else
return item
end
end)
end
end
return function(self, picker)
local results = {}
local highlights = {}
for i = 1, table.getn(generator) do
if self[i] ~= nil then
local str, hl = generator[i](self[i], picker)
if hl then
local hl_start = 0
for j = 1, (i - 1) do
hl_start = hl_start + #results[j] + (#configuration.separator or 1)
end
local hl_end = hl_start + #str:gsub('%s*$', '')
table.insert(highlights, { { hl_start, hl_end }, hl })
end
table.insert(results, str)
end
end
if configuration.separator_hl then
local width = #configuration.separator or 1
local hl_start, hl_end = 0, 0
for _, v in ipairs(results) do
hl_start = hl_end + #tostring(v)
hl_end = hl_start + width
table.insert(highlights, { { hl_start, hl_end }, configuration.separator_hl })
end
end
return table.concat(results, configuration.separator or "│"), highlights
end
end
entry_display.resolve = function(self, entry)
local display, display_highlights
if type(entry.display) == 'function' then
self:_increment("display_fn")
display, display_highlights = entry:display(self)
if type(display) == 'string' then
return display, display_highlights
end
else
display = entry.display
end
if type(display) == 'string' then
return display, display_highlights
elseif type(display) == 'table' then
return table_format(self, display, "│"), display_highlights
end
end
return entry_display
|
local sorters = require "telescope.sorters"
local util = require("telescope._extensions.frecency.util")
local my_sorters = {}
local substr_highlighter = function(_, prompt, display)
local highlights = {}
display = display:lower()
local search_terms = util.split(prompt, "%s")
local hl_start, hl_end
for _, word in pairs(search_terms) do
hl_start, hl_end = display:find(word, 1, true)
if hl_start then
table.insert(highlights, {start = hl_start, finish = hl_end})
end
end
return highlights
end
my_sorters.get_substr_matcher = function(opts)
opts = opts or {}
local substr = sorters:new()
substr.highlighter = substr_highlighter
substr.scoring_function = function(_, prompt, _, entry)
local display = entry.name:lower()
local search_terms = util.split(prompt, "%s")
local matched = 0
local total_search_terms = 0
for _, word in pairs(search_terms) do
total_search_terms = total_search_terms + 1
if display:find(word, 1, true) then
matched = matched + 1
end
end
return matched == total_search_terms and entry.index or -1
end
return substr
end
return my_sorters
|
local function status_line()
local mode = "%-5{%v:lua.string.upper(v:lua.vim.fn.mode())%}"
local file_name = "%-.16t"
local buf_nr = "[%n]"
local modified = " %-m"
local file_type = " %y"
local right_align = "%="
local line_no = "%10([%l/%L%)]"
local pct_thru_file = "%5p%%"
return string.format(
"%s%s%s%s%s%s%s%s",
mode,
file_name,
buf_nr,
modified,
file_type,
right_align,
line_no,
pct_thru_file
)
end
-- vim.opt.statusline = status_line()
vim.opt.winbar = status_line()
|
--=======================================
-- filename: squareshape.lua
-- author: Shane Krolikowski
-- created: Sept. 25, 2017
-- description: Square shape.
--=======================================
local Cell = require 'cell'
local SquareShape = Class{
__includes = require 'shapes.shape'
}
local color = {1, 0.38, 0.001, 0.75} -- orange
function SquareShape:init(grid, row, col)
self.grid = grid
self.row = row
self.col = col
self.position = 1
self.isMobile = true
self.cells = {
Cell(grid, row - 1, col + 0, color, true),
Cell(grid, row - 1, col + 1, color, true),
Cell(grid, row + 0, col + 0, color, true),
Cell(grid, row + 0, col + 1, color, true)
}
end
--=======================================
-- Rotate this shape.
-- --------------------
-- @return void
--=======================================
function SquareShape:rotate()
-- this shape doesn't rotate
end
return SquareShape
|
------------------------------------------------------------------------------------------------------------
-- Cairo UI - Develop by David Lannan
--
-- Design Notes:
-- The aim of the UI is to provide pixel consistancy for scalable graphics. What this means is the art
-- and the scalable graphics use a common measurement system (currently 1024 x1024) and it auto pixel
-- scales the output to match the target UI resolution.
--
-- Why this is needed - Quite often when you scale Cairo you will get pixel blends and stretching that
-- deform the output. Small fonts are a good example. If you rotate or place some cairo operation on a small
-- font with a small base scale then you will lose pixels in the operation and the output will look poor.
-- By using a high internal level of scale but maintaining the output to match the target it means
-- the blending will look good for the target resolution no matter the size.
--
-- When the resolution has a unique aspect (non square) then we adjust the underlying maximum sizes so that
-- it still matches. For example, 640x480 will have a underlying Cairo UI size of 1024x768 rather than 1024x1024
-- to ensure close pixel approximation. A mobile phone type resolution of 480x800 will map to 614x1024
--
-- Cairo UI cannot solve all layout UI problems, but it should make development much easier in the long run.
--
------------------------------------------------------------------------------------------------------------
CAIRO_RENDER = {}
-- These are valid resolution widths for textures that map closely to resolutions.
-- The concept is that the underlying texture map should closely match the required resolution.
-- Using this method the output graphics will be clear and 'tidy' only most devices.
CAIRO_RENDER_SIZES = { 512, 1024, 2048, 4096 }
-- The function here finds the best solution from an input width.
function CAIRO_RENDER:GetSize(width, aspect)
local w = width
for k,v in pairs(CAIRO_RENDER_SIZES) do
if v > width then w=v; break; end
end
return w, math.ceil( w * aspect )
end
--Some sensible defaults...
CAIRO_RENDER.DEFAULT_WIDTH = 512
CAIRO_RENDER.DEFAULT_HEIGHT = 512
CAIRO_RENDER.MAX_PIXEL_SIZE = 2048
------------------------------------------------------------------------------------------------------------
CAIRO_UI =
{
LEFT = 0,
RIGHT = 1,
TOP = 2,
BOTTOM = 3,
EXPLODER_MODE = 'linear',
EXPLODER_TWEEN_TIME = 0.1,
EXPLODER_TWEEN_SPEED = 0.5,
SLIDER_MODE = 'linear',
SLIDER_TWEEN_TIME = 0.1,
SLIDER_TWEEN_SPEED = 0.5,
}
------------------------------------------------------------------------------------------------------------
CAIRO_TYPE =
{
-- Base types
TEXT = 0,
BUTTON = 1,
IMAGE = 2,
TEXTBOX = 3, -- Text entry box, same as text but has input handling and such.
-- Complex types
SLIDEOUT = 10,
EXPLODER = 11,
LISTBOX = 12, -- Technically the same as VLINE/LIST.. TODO: will need to sort out later
PANEL = 13, -- Simple Dialog / Window like panel
-- Layout types
HLINE = 20,
VLINE = 21,
LIST = 22
}
------------------------------------------------------------------------------------------------------------
CAIRO_STATE = {}
CAIRO_STATE.SO_STATES = { INITIAL = 0, MOVING_OUT = 1, OUT = 2, MOVING_IN = 3, IN = 4}
------------------------------------------------------------------------------------------------------------
CAIRO_STYLE = {}
CAIRO_STYLE.WHITE = { r=1.0, g=1.0, b=1.0, a=1.0 }
------------------------------------------------------------------------------------------------------------
-- Metro style colours!! Base metroc colors (ala Win8)
CAIRO_STYLE.METRO = {}
CAIRO_STYLE.METRO.ORANGE = { r=0.97, g=0.576, b=0.117, a=1 }
CAIRO_STYLE.METRO.PURPLE = { r=0.341, g=0.149, b=0.5, a=1 }
CAIRO_STYLE.METRO.LBLUE = { r=0.012, g=0.684, b=0.859, a=1 }
CAIRO_STYLE.METRO.SEAGREEN = { r=0.258, g=0.570, b=0.598, a=1 }
CAIRO_STYLE.METRO.GREEN = { r=0.469, g=0.730, b=0.265, a=1 }
------------------------------------------------------------------------------------------------------------ |
padawan_spice_mom_01_convo_template = ConvoTemplate:new {
initialScreen = "",
templateType = "Lua",
luaClassHandler = "padawan_spice_mom_01_conv_handler",
screens = {}
}
intro = ConvoScreen:new {
id = "intro",
leftDialog = "@conversation/padawan_spice_mom_01:s_4f24860b", -- Hello dear, I'm a single mother and could use all the help I can get. You wouldn't mind helping out an old mother now would you?
stopConversation = "false",
options = {
{"@conversation/padawan_spice_mom_01:s_16ec7737", "short_on_supplies"}, -- No, not at all Miss, how may I help?
{"@conversation/padawan_spice_mom_01:s_d4ade5e3", "sorry_for_bothering"} -- Ask one of your kids to do it. I'm busy.
}
}
padawan_spice_mom_01_convo_template:addScreen(intro);
short_on_supplies = ConvoScreen:new {
id = "short_on_supplies",
leftDialog = "@conversation/padawan_spice_mom_01:s_6a11e41a", -- I've run short on some supplies around the house, and could use a healthy person like you to run out and pick them up for me. I know it's not the most glamorous of tasks, but I have no one else to ask. Would you mind?
stopConversation = "false",
options = {
{"@conversation/padawan_spice_mom_01:s_d471cdd", "here_is_waypoint"}, -- I would be happy to help.
{"@conversation/padawan_spice_mom_01:s_d4ade5e3", "sorry_for_bothering"} -- Ask one of your kids to do it. I'm busy.
}
}
padawan_spice_mom_01_convo_template:addScreen(short_on_supplies);
here_is_waypoint = ConvoScreen:new {
id = "here_is_waypoint",
leftDialog = "@conversation/padawan_spice_mom_01:s_93965747", -- Oh good! You are a dear, here is the waypoint to my good friend Evif Sulp, he has what I need.
stopConversation = "true",
options = {}
}
padawan_spice_mom_01_convo_template:addScreen(here_is_waypoint);
sorry_for_bothering = ConvoScreen:new {
id = "sorry_for_bothering",
leftDialog = "@conversation/padawan_spice_mom_01:s_b40d662", -- I see, well sorry for bothering dear. Good day.
stopConversation = "true",
options = {}
}
padawan_spice_mom_01_convo_template:addScreen(sorry_for_bothering);
intro_talked_to_target = ConvoScreen:new {
id = "intro_talked_to_target",
leftDialog = "@conversation/padawan_spice_mom_01:s_98244955", -- Have you got my supplies.
stopConversation = "false",
options = {
{"@conversation/padawan_spice_mom_01:s_9b2292c8", "hand_them_over"}, -- Yes, I have them.
}
}
padawan_spice_mom_01_convo_template:addScreen(intro_talked_to_target);
hand_them_over = ConvoScreen:new {
id = "hand_them_over",
leftDialog = "@conversation/padawan_spice_mom_01:s_cf8c69f5", -- Oh good, hand them over please.
stopConversation = "false",
options = {
{"@conversation/padawan_spice_mom_01:s_829888a9", "grateful_son"}, -- Here you go.
{"@conversation/padawan_spice_mom_01:s_85da54b7", "pain_and_misery"} -- Are you sure you want these?
}
}
padawan_spice_mom_01_convo_template:addScreen(hand_them_over);
pain_and_misery = ConvoScreen:new {
id = "pain_and_misery",
leftDialog = "@conversation/padawan_spice_mom_01:s_dcecfc37", -- Hand them over dear, or so help me I will make sure the rest of your existence is one of pain and misery.
stopConversation = "false",
options = {
{"@conversation/padawan_spice_mom_01:s_72b6d639", "grateful_son"}, -- Wow, here you go.
{"@conversation/padawan_spice_mom_01:s_d1aec57f", "dont_regret_anything"} -- Don't say anything you are going to regret.
}
}
padawan_spice_mom_01_convo_template:addScreen(pain_and_misery);
dont_regret_anything = ConvoScreen:new {
id = "dont_regret_anything",
leftDialog = "@conversation/padawan_spice_mom_01:s_a687a0a6", -- I don't regret anything anymore. Now give that spice here! My son is in horrible pain, and nothing seems to work better than the calming hallucinations he gets from that spice. As much as I hate giving it to him, he needs it to make his painful existence bearable.
stopConversation = "false",
options = {
{"@conversation/padawan_spice_mom_01:s_1aa2a6e6", "through_another_week"}, -- Oh, I'm sorry for causing trouble. Here is the spice.
{"@conversation/padawan_spice_mom_01:s_a8241eb1", "good_and_bad"} -- I don't care what you use it for... you're no better than a spice peddler.
}
}
padawan_spice_mom_01_convo_template:addScreen(dont_regret_anything);
good_and_bad = ConvoScreen:new {
id = "good_and_bad",
leftDialog = "@conversation/padawan_spice_mom_01:s_751ed2f1", -- May my son's pain be passed to you. Maybe then you'd see that the world is not so clearly good and bad. That spice would have brought peace to my son. To my mind, that good is worth the price.
stopConversation = "true",
options = {}
}
padawan_spice_mom_01_convo_template:addScreen(good_and_bad);
through_another_week = ConvoScreen:new {
id = "through_another_week",
leftDialog = "@conversation/padawan_spice_mom_01:s_78f7bd03", -- Thank you dear, these spices will help my son through another week or so.
stopConversation = "true",
options = {}
}
padawan_spice_mom_01_convo_template:addScreen(through_another_week);
grateful_son = ConvoScreen:new {
id = "grateful_son",
leftDialog = "@conversation/padawan_spice_mom_01:s_dc552ff6", -- Thank you dear, my son will be very grateful. The calming hallucinations this spice gives him help ease his mind of the lingering pain he still suffers from after he was in a horrible swoop accident as a child.
stopConversation = "true",
options = {}
}
padawan_spice_mom_01_convo_template:addScreen(grateful_son);
intro_in_progress = ConvoScreen:new {
id = "intro_in_progress",
leftDialog = "@conversation/padawan_spice_mom_01:s_b638139d", -- Did you speak with Evif?
stopConversation = "false",
options = {
{"@conversation/padawan_spice_mom_01:s_42c15c5", "hurry_back"}, -- Not yet, but I'm on my way.
{"@conversation/padawan_spice_mom_01:s_8a806d30", "sorry_for_bothering"} -- No and even thinking about doing so was a mistake.
}
}
padawan_spice_mom_01_convo_template:addScreen(intro_in_progress);
hurry_back = ConvoScreen:new {
id = "hurry_back",
leftDialog = "@conversation/padawan_spice_mom_01:s_238c7ac2", -- Oh very good. Hurry back now, dear.
stopConversation = "true",
options = {}
}
padawan_spice_mom_01_convo_template:addScreen(hurry_back);
what_did_i_do = ConvoScreen:new {
id = "what_did_i_do",
leftDialog = "@conversation/padawan_spice_mom_01:s_a3b22c35", -- Oh my. What did I do to provoke such an outburst?!
stopConversation = "true",
options = {}
}
padawan_spice_mom_01_convo_template:addScreen(what_did_i_do);
quest_completed = ConvoScreen:new {
id = "quest_completed",
leftDialog = "@conversation/padawan_spice_mom_01:s_bf3942ab", -- Please believe that I know what I'm doing, and that this is the best that can be done for my son.
stopConversation = "true",
options = {}
}
padawan_spice_mom_01_convo_template:addScreen(quest_completed);
not_quest_owner = ConvoScreen:new {
id = "not_quest_owner",
leftDialog = "@conversation/padawan_spice_mom_01:s_2aa97a99", -- Oh my poor son. Whatever will I do if I cannot ease his pain and suffering.
stopConversation = "true",
options = {}
}
padawan_spice_mom_01_convo_template:addScreen(not_quest_owner);
addConversationTemplate("padawan_spice_mom_01_convo_template", padawan_spice_mom_01_convo_template);
|
package("imagemagick")
set_homepage("https://imagemagick.org/script/index.php")
set_description("ImageMagick is a FOSS software suite for modifying images. This does NOT provide any of the utilities. It installs the C/C++ Libraries.")
add_urls("https://download.imagemagick.org/ImageMagick/download/ImageMagick-$(version).tar.gz")
add_versions("7.0.11-13", "6c162d7cbd7b80968a6d083d39eb18d9c9bbd49f500f7f49c9a5dcc0fc36a03b")
add_configs("bzlib", {description = "Enable bzip2 support.", default = false, type = "boolean"})
add_configs("exr", {description = "Enable exr support.", default = false, type = "boolean"})
add_configs("fftw", {description = "Enable fftw support.", default = false, type = "boolean"})
add_configs("fontconfig", {description = "Enable fontconfig support.", default = false, type = "boolean"})
add_configs("freetype", {description = "Enable freetype support.", default = false, type = "boolean"})
add_configs("jpeg", {description = "Enable jpeg support through libjpeg.", default = true, type = "boolean"})
add_configs("lzma", {description = "Enable LZMA support.", default = false, type = "boolean"})
add_configs("openjpeg", {description = "Enable jpeg support through openjpeg.", default = false, type = "boolean"})
add_configs("png", {description = "Enable png support.", default = true, type = "boolean"})
add_configs("raw", {description = "Enable raw image support.", default = false, type = "boolean"})
add_configs("tiff", {description = "Enable tiff support.", default = false, type = "boolean"})
add_configs("threads", {description = "Enable threading support.", default = false})
add_configs("xml", {description = "Enable XML support.", default = false, type = "boolean"})
add_configs("webp", {description = "Enable webp support.", default = false, type = "boolean"})
add_includedirs("include/ImageMagick-7/")
add_links("MagickWand-7.Q16", "MagickCore-7.Q16", "Magick++-7.Q16")
on_load(function(package)
local configdeps = {bzlib = "bzip2",
exr = "openexr",
ffmpeg = "ffmpeg",
fontconfig = "fontconfig",
freetype = "freetype",
fftw = "fftw",
jpeg = "libjpeg",
lzma = "lzma",
openjpeg = "openjpeg",
png = "libpng",
raw = "libraw",
tiff = "libtiff",
xml = "libxml2",
webp = "libwebp"}
for name, dep in pairs(configdeps) do
if package:config(name) then
package:add("deps", dep)
if name == "tiff" then
package:add("deps", "zlib")
end
end
end
if package:config("threads") and package:is_plat("linux") then
package:add("syslinks", "pthread")
end
if package:is_plat("linux") then
package:add("deps", "pkg-config")
end
if package:is_plat("bsd") then
package:add("deps", "pkgconf")
local pkgconf = package:find_tool("pkgconf")
if pkgconf then
package:addenv("PKG_CONFIG", pkgconf.program)
end
end
end)
on_install("linux", "macosx", "bsd", function(package)
local configs = {"--without-utilities",
"--without-x",
"--without-djvu",
"--without-jbig",
"--disable-openmp",
"--without-perl",
"--without-lcms",
"--disable-hdri",
"--without-lqr"}
for name, enabled in pairs(package:configs()) do
if not package:extraconf("configs", name, "builtin") then
if enabled then
if name == "openjpeg" then
table.insert(configs, "--with-" .. "openjp2")
elseif name == "exr" then
table.insert(configs, "--with-" .. "openexr")
else
table.insert(configs, "--with-" .. name)
end
else
if name == "openjpeg" then
table.insert(configs, "--without-" .. "openjp2")
elseif name == "exr" then
table.insert(configs, "--without-" .. "openexr")
else
table.insert(configs, "--without-" .. name)
end
end
end
end
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
if package:config("pic") ~= false then
table.insert(configs, "--with-pic")
end
if not package:config("threads") then
table.insert(configs, "--without-threads")
end
import("package.tools.autoconf").install(package, configs)
end)
on_test(function (package)
assert(package:has_cfuncs("MagickWandGenesis", {includes = "MagickWand/MagickWand.h"}))
end)
|
AchievementScreenshots = Object:extend()
function AchievementScreenshots:new()
self.font = fonts.Anonymous_8
self.big_font = fonts.m5x7_16
self.main_canvas = love.graphics.newCanvas(10*64, 10*64)
self.active = true
self.y_offsets = {['Fighter'] = -2, ['Crusader'] = 0, ['Rogue'] = -2, ['Bit Hunter'] = 0, ['Sentinel'] = 0, ['Striker'] = 0, ['Nuclear'] = 0, ['Cycler'] = 0, ['Wisp'] = 0}
self.device_vertices = {
['Fighter'] = {
['vertice_groups'] = {
[1] = {
12, 0,
12/2, -12/2,
-12/2, -12/2,
-12, 0,
-12/2, 12/2,
12/2, 12/2,
},
[2] = {
12/2, -12/2,
0, -12,
-12 - 12/2, -12,
-3*12/4, -12/4,
-12/2, -12/2,
},
[3] = {
12/2, 12/2,
-12/2, 12/2,
-3*12/4, 12/4,
-12 - 12/2, 12,
0, 12,
}
}
},
['Crusader'] = {
['vertice_groups'] = {
[1] = {
12, 0,
12/2, 12/2,
-12/4, 12/2,
-12/2, 12/4,
-12/2, -12/4,
-12/4, -12/2,
12/2, -12/2,
},
[2] = {
12/2, 12/2,
12/2, 12,
-12/2, 12,
-12, 12/2,
-12, 0,
-12/2, 0,
-12/2, 12/4,
-12/4, 12/2,
},
[3] = {
12/2, -12/2,
12/2, -12,
-12/2, -12,
-12, -12/2,
-12, 0,
-12/2, 0,
-12/2, -12/4,
-12/4, -12/2,
},
}
},
['Rogue'] = {
['vertice_groups'] = {
[1] = {
12, 0,
0, -12/2,
-12, 0,
0, 12/2,
},
[2] = {
12/2, -12/4,
12/4, -3*12/4,
-12 - 12/2, -2*12,
-12/2, -12/4,
0, -12/2,
},
[3] = {
12/2, 12/4,
0, 12/2,
-12/2, 12/4,
-12 - 12/2, 2*12,
12/4, 3*12/4,
},
}
},
['Bit Hunter'] = {
['vertice_groups'] = {
[1] = {
12, 0,
12/2, -12/2,
-12, -12/2,
-12/2, 0,
-12, 12/2,
12/2, 12/2,
}
}
},
['Sentinel'] = {
['vertice_groups'] = {
[1] = {
12, 0,
0, -12,
-3*12/4, -3*12/4,
-12, 0,
-3*12/4, 3*12/4,
0, 12,
}
}
},
['Striker'] = {
['vertice_groups'] = {
[1] = {
12, 0,
12/2, -12/2,
-12/2, -12/2,
-12, 0,
-12/2, 12/2,
12/2, 12/2,
},
[2] = {
0, 12/2,
-12/4, 12,
0, 12 + 12/2,
12, 12,
0, 2*12,
-12/2, 12 + 12/2,
-12, 0,
-12/2, 12/2,
},
[3] = {
0, -12/2,
-12/4, -12,
0, -12 - 12/2,
12, -12,
0, -2*12,
-12/2, -12 - 12/2,
-12, 0,
-12/2, -12/2,
},
}
},
['Nuclear'] = {
['vertice_groups'] = {
[1] = {
12, -12/4,
12, 12/4,
12 - 12/4, 12/2,
-12 + 12/4, 12/2,
-12, 12/4,
-12, -12/4,
-12 + 12/4, -12/2,
12 - 12/4, -12/2,
}
}
},
['Cycler'] = {
['vertice_groups'] = {
[1] = {
12, 0,
0, 12,
-12, 0,
0, -12,
}
}
},
['Wisp'] = {
['vertice_groups'] = {
[1] = {
12, -12/4,
12, 12/4,
12/4, 12,
-12/4, 12,
-12, 12/4,
-12, -12/4,
-12/4, -12,
12/4, -12,
}
}
}
}
end
function AchievementScreenshots:update(dt)
if input:pressed('escape') then self.active = not self.active end
end
function AchievementScreenshots:draw()
love.graphics.setFont(self.font)
love.graphics.setCanvas(self.main_canvas)
love.graphics.clear()
love.graphics.setColor(default_color)
local k = 1
for i = 1, 4 do
for j = 1, 10 do
self:drawAchievement(32 + (j-1)*64, 32 + (i-1)*64, achievement_names[k])
k = k + 1
end
end
love.graphics.setCanvas()
shaders.distort:send('time', time)
shaders.distort:send('horzFuzzOpt', 0.2)
love.graphics.setShader(shaders.distort)
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setBlendMode('alpha', 'premultiplied')
love.graphics.draw(self.main_canvas, 0, 0, 0, sx, sy)
love.graphics.setBlendMode('alpha')
love.graphics.setShader()
end
function AchievementScreenshots:drawAchievement(x, y, achievement_name, active)
-- BSGRectangle('line', x - 32, y - 32, 64, 64, 8, 8)
y = y - 20
local name = ''
local color = nil
if achievement_name:find('Reroll') then name = 'RR'; color = hp_color end
if achievement_name:find('Escape') then name = 'WIN'; color = skill_point_color end
if achievement_name:find('10K') then name = '10K'; color = ammo_color end
if achievement_name:find('50K') then name = '50K'; color = ammo_color end
if achievement_name:find('100K') then name = '100K'; color = boost_color end
if achievement_name:find('500K') then name = '500K'; color = hp_color end
if achievement_name:find('1KK') then name = '1KK'; color = skill_point_color end
if self.active then love.graphics.setColor(color) end
love.graphics.print(name, x, y, 0, 2, 2, math.floor(self.font:getWidth(name)/2), math.floor(self.font:getHeight()/2))
y = y + 28
local device = ''
if achievement_name:find('Fighter') then device = 'Fighter' end
if achievement_name:find('Crusader') then device = 'Crusader' end
if achievement_name:find('Rogue') then device = 'Rogue' end
if achievement_name:find('Bit Hunter') then device = 'Bit Hunter' end
if achievement_name:find('Sentinel') then device = 'Sentinel' end
if achievement_name:find('Striker') then device = 'Striker' end
if achievement_name:find('Nuclear') then device = 'Nuclear' end
if achievement_name:find('Cycler') then device = 'Cycler' end
if achievement_name:find('Wisp') then device = 'Wisp' end
if device == '' then goto continue end
y = y + self.y_offsets[device]
love.graphics.setColor(default_color)
pushRotateScale(x, y, -math.pi/2)
for _, vertice_group in ipairs(self.device_vertices[device].vertice_groups) do
local points = fn.map(vertice_group, function(k, v)
if k % 2 == 1 then return x + v + random(-1, 1) else return y + v + random(-1, 1) end
end)
love.graphics.polygon('line', points)
end
love.graphics.pop()
::continue::
if achievement_name == 'Reroll Build' then
love.graphics.line(x - 16 + 4, y - 8, x + 4, y + 8)
love.graphics.setColor(background_color)
love.graphics.rectangle('fill', x - 4 - 16 + 4, y - 4 - 8, 8, 8)
love.graphics.rectangle('fill', x - 4 + 4, y - 4 + 8, 8, 8)
love.graphics.rectangle('fill', x - 4 - 12 + 12 + 4, y - 4 - 8, 16, 8)
love.graphics.setColor(default_color)
love.graphics.rectangle('line', x - 4 - 16 + 4, y - 4 - 8, 8, 8)
love.graphics.rectangle('line', x - 4 + 4, y - 4 + 8, 8, 8)
love.graphics.rectangle('line', x - 4 - 12 + 12 + 4, y - 4 - 8, 16, 8)
elseif achievement_name == 'Reroll Skills' then
love.graphics.line(x - 16, y - 8, x + 16, y - 8)
love.graphics.line(x - 16, y - 8, x, y + 8)
love.graphics.line(x + 16, y - 8, x, y + 8)
love.graphics.setColor(background_color)
love.graphics.rectangle('fill', x - 4 - 16, y - 4 - 8, 8, 8)
love.graphics.rectangle('fill', x - 4 + 16, y - 4 - 8, 8, 8)
love.graphics.rectangle('fill', x - 4, y - 4 + 8, 8, 8)
love.graphics.setColor(default_color)
love.graphics.rectangle('line', x - 4 - 16, y - 4 - 8, 8, 8)
love.graphics.rectangle('line', x - 4 + 16, y - 4 - 8, 8, 8)
love.graphics.rectangle('line', x - 4, y - 4 + 8, 8, 8)
elseif achievement_name == 'Reroll Classes' then
love.graphics.setColor(background_color)
love.graphics.rectangle('fill', x - 4 - 12, y - 4 - 4, 16, 8)
love.graphics.rectangle('fill', x - 4 + 4, y - 4 - 4, 16, 8)
love.graphics.rectangle('fill', x - 4 + 4, y - 4 + 4, 16, 8)
love.graphics.setColor(default_color)
love.graphics.rectangle('line', x - 4 - 12, y - 4 - 4, 16, 8)
love.graphics.rectangle('line', x - 4 + 4, y - 4 - 4, 16, 8)
love.graphics.rectangle('line', x - 4 + 4, y - 4 + 4, 16, 8)
elseif achievement_name == 'Escape' then
love.graphics.setColor(default_color)
love.graphics.print('escape', x - 1, y, 0, 1, 1, math.floor(self.font:getWidth('escape')/2), math.floor(self.font:getHeight()/2))
local r, g, b = unpack(default_color)
love.graphics.setColor(r, g, b, 3/8)
love.graphics.rectangle('fill', x + 16 - math.floor(self.font:getWidth('w')/2), y - math.floor(self.font:getHeight()/2), self.font:getWidth('w'), self.font:getHeight())
love.graphics.setColor(r, g, b, 1)
end
love.graphics.setColor(default_color)
end
function AchievementScreenshots:destroy()
end
|
require 'pl'
local __FILE__ = (function() return string.gsub(debug.getinfo(2, 'S').source, "^@", "") end)()
package.path = path.join(path.dirname(__FILE__), "..", "lib", "?.lua;") .. package.path
require 'os'
require 'w2nn'
local srcnn = require 'srcnn'
local function cudnn2cunn(cudnn_model)
local cunn_model = srcnn.waifu2x_cunn(srcnn.channels(cudnn_model))
local weight_from = cudnn_model:findModules("cudnn.SpatialConvolution")
local weight_to = cunn_model:findModules("nn.SpatialConvolutionMM")
assert(#weight_from == #weight_to)
for i = 1, #weight_from do
local from = weight_from[i]
local to = weight_to[i]
to.weight:copy(from.weight)
to.bias:copy(from.bias)
end
cunn_model:cuda()
cunn_model:evaluate()
return cunn_model
end
local cmd = torch.CmdLine()
cmd:text()
cmd:text("waifu2x cudnn model to cunn model converter")
cmd:text("Options:")
cmd:option("-i", "", 'Specify the input cunn model')
cmd:option("-o", "", 'Specify the output cudnn model')
cmd:option("-iformat", "ascii", 'Specify the input format (ascii|binary)')
cmd:option("-oformat", "ascii", 'Specify the output format (ascii|binary)')
local opt = cmd:parse(arg)
if not path.isfile(opt.i) then
cmd:help()
os.exit(-1)
end
local cudnn_model = torch.load(opt.i, opt.iformat)
local cunn_model = cudnn2cunn(cudnn_model)
torch.save(opt.o, cunn_model, opt.oformat)
|
--[[
Copyright (c) 2014-2017 Chukong Technologies Inc.
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 Node = cc.Node
function Node:add(child, zorder, tag)
if tag then
self:addChild(child, zorder, tag)
elseif zorder then
self:addChild(child, zorder)
else
self:addChild(child)
end
return self
end
function Node:addTo(parent, zorder, tag)
if tag then
parent:addChild(self, zorder, tag)
elseif zorder then
parent:addChild(self, zorder)
else
parent:addChild(self)
end
return self
end
function Node:removeSelf()
self:removeFromParent()
return self
end
function Node:align(anchorPoint, x, y)
self:setAnchorPoint(anchorPoint)
return self:move(x, y)
end
function Node:show()
self:setVisible(true)
return self
end
function Node:hide()
self:setVisible(false)
return self
end
function Node:move(x, y)
if y then
self:setPosition(x, y)
else
self:setPosition(x)
end
return self
end
function Node:moveTo(args)
transition.moveTo(self, args)
return self
end
function Node:moveBy(args)
transition.moveBy(self, args)
return self
end
function Node:fadeIn(args)
transition.fadeIn(self, args)
return self
end
function Node:fadeOut(args)
transition.fadeOut(self, args)
return self
end
function Node:fadeTo(args)
transition.fadeTo(self, args)
return self
end
function Node:rotate(rotation)
self:setRotation(rotation)
return self
end
function Node:rotateTo(args)
transition.rotateTo(self, args)
return self
end
function Node:rotateBy(args)
transition.rotateBy(self, args)
return self
end
function Node:scaleTo(args)
transition.scaleTo(self, args)
return self
end
function Node:onUpdate(callback)
self:scheduleUpdateWithPriorityLua(callback, 0)
return self
end
Node.scheduleUpdate = Node.onUpdate
function Node:onNodeEvent(eventName, callback)
if "enter" == eventName then
self.onEnterCallback_ = callback
elseif "exit" == eventName then
self.onExitCallback_ = callback
elseif "enterTransitionFinish" == eventName then
self.onEnterTransitionFinishCallback_ = callback
elseif "exitTransitionStart" == eventName then
self.onExitTransitionStartCallback_ = callback
elseif "cleanup" == eventName then
self.onCleanupCallback_ = callback
end
self:enableNodeEvents()
end
function Node:enableNodeEvents()
if self.isNodeEventEnabled_ then
return self
end
self:registerScriptHandler(function(state)
if state == "enter" then
self:onEnter_()
elseif state == "exit" then
self:onExit_()
elseif state == "enterTransitionFinish" then
self:onEnterTransitionFinish_()
elseif state == "exitTransitionStart" then
self:onExitTransitionStart_()
elseif state == "cleanup" then
self:onCleanup_()
end
end)
self.isNodeEventEnabled_ = true
self.onExitCallbacks = {}
return self
end
function Node:disableNodeEvents()
self:unregisterScriptHandler()
self.isNodeEventEnabled_ = false
self.onExitCallbacks = nil
return self
end
function Node:onEnter()
end
function Node:onExit()
end
function Node:onEnterTransitionFinish()
end
function Node:onExitTransitionStart()
end
function Node:onCleanup()
end
function Node:onEnter_()
self:onEnter()
if not self.onEnterCallback_ then
return
end
self:onEnterCallback_()
end
function Node:onExit_()
self:onExit()
if self.onExitCallbacks then
for _,callbacks in pairs(self.onExitCallbacks) do
for _,callback in ipairs(callbacks) do
if callback then
callback()
end
end
end
end
if not self.onExitCallback_ then
return
end
self:onExitCallback_()
end
function Node:onEnterTransitionFinish_()
self:onEnterTransitionFinish()
if not self.onEnterTransitionFinishCallback_ then
return
end
self:onEnterTransitionFinishCallback_()
end
function Node:onExitTransitionStart_()
self:onExitTransitionStart()
if not self.onExitTransitionStartCallback_ then
return
end
self:onExitTransitionStartCallback_()
end
function Node:onCleanup_()
self:onCleanup()
if not self.onCleanupCallback_ then
return
end
self:onCleanupCallback_()
end
--扩展Node的方法 递归查询子结点
function Node:seekNodeByName(name)
if self:getName() == name then
return self
end
local children = self:getChildren() -- return array table
for _,child in ipairs(children) do
local ret = child:seekNodeByName(name)
if ret then
return ret
end
end
end
--自动释放列表
function Node:addExitCallback(name,tab)
self.onExitCallbacks[name] = tab
end
function Node:getExitCallbackByName(name)
return self.onExitCallbacks[name]
end
function Node:loadLayout(viewLayout)
local root,animManager = g_NodeUtils:getRootNodeInCreator(viewLayout)
self:add(root)
return animManager
end
function Node:setGray(isGray)
if isGray == false then
self:setColor(cc.c3b(255,255,255))
else
self:setColor(cc.c3b(124,124,124))
end
end
|
--------------------------------------------------------------------------------
-- Sample code is MIT licensed, see http://www.coronalabs.com/links/code/license
-- Copyright (C) 2013 Corona Labs Inc. All Rights Reserved.
--------------------------------------------------------------------------------
--
-- To test this client-side code, use this server:
--
-- openssl s_server \
-- -key path/to/my/private_key.pem \
-- -cert path/to/my/signed_public_key_certificate.pem \
-- -accept 64001 -www
print( "lua-openssl secure socket test start." )
local openssl = require('plugin.openssl')
local socket = require('socket')
local plugin_luasec_ssl = require('plugin_luasec_ssl')
lua_openssl_version, lua_version, openssl_version = openssl.version()
print( "lua-openssl version: " .. lua_openssl_version, lua_version, openssl_version )
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- TLS/SSL client parameters (omitted)
local params =
{
mode = "client",
protocol = "tlsv1",
verify = "none",
options = "all",
}
local conn = socket.tcp()
local server_address = "10.3.3.106"
local server_port = 64001
local result, error = conn:connect( server_address, server_port )
if result then
-- We're connected.
else
print( "Failed to connect to: " .. server_address .. ":" .. tostring( server_port ) .. " Error: " .. error )
return
end
-- TLS/SSL initialization
conn = plugin_luasec_ssl.wrap(conn, params)
conn:dohandshake()
--
conn:send( "GET / HTTP/1.0\n\n" )
local data, status, partial_data = conn:receive("*a")
if data then
print( data )
end
if partial_data then
print( partial_data )
end
conn:close()
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
print( "lua-openssl secure socket test done." )
|
-- mdotengine - particle file
-- Local definitions
local Vector = require("Vector")
local Particle = {}
Particle.__index = Particle
function Particle:New(x, y, r, l)
local attributes = {
isParticle = true, -- identifier
pos = Vector:New(x, y), -- vector position
pre = Vector:New(0, 0), -- previous vector position
radius = r, -- particle's radius
dtime = 0 -- time passed since spawned
}
return setmetatable(attributes, self)
end
function Particle:Update(behaviour, dt)
self.pos:SetX(behaviour.x(self.pre:GetX(), self.dtime))
self.pos:SetY(behaviour.y(self.pre:GetY(), self.dtime))
self.radius = behaviour.r(self.radius, self.dtime)
self.pre:SetX(self.pos:GetX())
self.pre:SetY(self.pos:GetY())
self.dtime = self.dtime + dt
end
return Particle
|
main_quest=true
markers = {
{
map = "res/map/marshland/marshland.tmx",
position = {1925, 1275},
step = 0
},
{
map = "res/map/marshland/marshland.tmx",
position = {1925, 1275},
step = -1
},
}
|
function love.draw()
love.graphics.print("Lovely, it works!", 580, 360)
end |
function generate_decoratives_for_all_existing_chunks()
local decorative_names = {}
for k,v in pairs(game.decorative_prototypes) do
if v.autoplace_specification then
decorative_names[#decorative_names+1] = k
end
end
for _, surface in pairs(game.surfaces) do
for chunk in surface.get_chunks() do
surface.regenerate_decorative(decorative_names, {chunk})
end
end
end |
package.path = package.path .. ";/home/OpenGlassesOS/lib/?.lua;/home/OpenGlassesOS/lib/?/init.lua;/home/OpenGlassesOS/?.lua"
print("running")
local rect = require("overlay/Rect")
w = rect()
|
local __name = ...
local lib4
local splash
if __name == 'main' then
splash = love
love.window.setMode(768, 512)
love.window.setTitle('splash')
else
splash = {}
lib4 = require('lib4')
end
local floor
local screen
local rain
local stars
local transition
local seq
local frame
function splash:_load()
floor = {}
floor.color = {0x92, 0x88, 0xb0, 0xff}
floor.height = 32
screen = {}
screen.width = 128
screen.height = 128
screen.rain_canvas = love.graphics.newCanvas(screen.width, screen.height)
screen.rain_canvas:setFilter('nearest', 'nearest')
screen.star_canvas = love.graphics.newCanvas(screen.width, screen.height)
screen.star_canvas:setFilter('nearest', 'nearest')
local w, h = love.graphics.getDimensions()
if w > h then
screen.scale = h/screen.height
screen.x = (w-h)/2
screen.y = 0
else
screen.scale = w/screen.width
screen.x = 0
screen.y = (h-w)/2
end
rain = {}
rain.background = {0xcd, 0x98, 0xb6, 0xff}
rain.color = {0xee, 0xc3, 0x00, 0xff}
rain.intensity = 0.1
rain.length = 6
rain.angle = math.rad(30) -- 0 is downwards
rain.dx = -rain.length*math.sin(rain.angle)
rain.dy = -rain.length*math.cos(rain.angle)
rain.drops = {}
rain.count = math.floor(rain.intensity*screen.width
* rain.intensity*screen.height/rain.length + 0.5)
rain.speed = 160
rain.splash = {}
rain.splash_time = 0.25
for i = 1, rain.count do
local drop = {}
drop.x = math.random(0, screen.width)
drop.y = math.random(0, screen.height)
rain.drops[i] = drop
end
stars = {}
stars.background = {0x02, 0x0c, 0x24, 0xff}
stars.color = {0xee, 0xc3, 0x00, 0xff}
stars.intensity = 0.05
stars.stars = {}
stars.count = math.floor(stars.intensity*screen.width *
stars.intensity*screen.height+0.5)
stars.flash_time = 0.35
local sectors = math.floor(math.sqrt(stars.count)+0.5)
local w = screen.width/sectors
local h = (screen.height-floor.height)/sectors
local s = {}
for i = 1, stars.count do
local x, y
local good
while not good do
x = math.random(0, sectors)
y = math.random(0, sectors)
if not s[y] then
s[y] = {[x] = true}
good = true
elseif not s[y][x] then
s[y][x] = true
good = true
end
end
local star = {}
star.x = x*w + math.random(0, w*0.7)
star.y = y*h + math.random(0, h*0.7)
star.t = 0
stars.stars[i] = star
end
transition = {duration = 0.5, total = 0.5}
rain.duration = 2.5
stars.duration = 1.5
seq = {stars, transition, rain}
frame = 1
end
function splash:_update(dt)
seq[frame].duration = seq[frame].duration - dt
if seq[frame].duration <= 0 then
frame = frame + 1
end
if frame > #seq then
if __name == 'main' then
love.event.quit()
else
lib4.load_game()
end
end
if frame == 1 or frame == 2 then
for _, star in ipairs(stars.stars) do
star.t = math.fmod(star.t + dt, stars.flash_time)
end
end
if frame == 2 or frame == 3 then
for _, drop in ipairs(rain.drops) do
local sp = 1/rain.length*rain.speed*dt
drop.x = drop.x + rain.dx*sp
drop.y = drop.y - rain.dy*sp
if drop.x < 0 then drop.x = drop.x + screen.width end
if drop.x >= screen.width then drop.x = drop.x - screen.width end
if drop.y >= screen.height-floor.height*math.random()+rain.dy then
table.insert(rain.splash, {x = math.floor(drop.x + rain.dx),
y = math.floor(drop.y - rain.dy),
t = rain.splash_time})
drop.y = drop.y - screen.height + floor.height - rain.length
end
end
for _, drop in ipairs(rain.splash) do
drop.t = drop.t - dt
end
end
end
local draw_rain = function()
love.graphics.setBlendMode('alpha')
love.graphics.clear(rain.background)
love.graphics.setColor(floor.color)
love.graphics.rectangle('fill', 0, screen.height-floor.height,
screen.width, floor.height)
love.graphics.setLineWidth(0.6)
love.graphics.setLineStyle('rough')
love.graphics.setColor(rain.color)
for _, drop in ipairs(rain.drops) do
love.graphics.line(drop.x, drop.y,
drop.x + rain.dx, drop.y - rain.dy)
end
for i, drop in ipairs(rain.splash) do
local stage = math.ceil((rain.splash_time-drop.t)
* (3/rain.splash_time))
if stage == 1 then
love.graphics.points(drop.x, drop.y-1,
drop.x+1, drop.y,
drop.x, drop.y+1,
drop.x-1, drop.y)
elseif stage == 2 then
love.graphics.points(drop.x, drop.y-2,
drop.x+2, drop.y,
drop.x, drop.y+2,
drop.x-2, drop.y,
drop.x+1, drop.y+1,
drop.x-1, drop.y+1,
drop.x-1, drop.y-1,
drop.x+1, drop.y-1)
elseif stage == 3 then
love.graphics.points(drop.x, drop.y-2,
drop.x+2, drop.y,
drop.x, drop.y+2,
drop.x-2, drop.y)
else
table.remove(rain.splash, i)
end
end
end
local draw_stars = function()
love.graphics.setBlendMode('alpha')
love.graphics.clear(stars.background)
love.graphics.setColor(stars.color)
for _, star in ipairs(stars.stars) do
local stage = math.ceil(star.t * (2/stars.flash_time))
if stage == 1 then
love.graphics.points(star.x, star.y-1,
star.x+1, star.y,
star.x, star.y+1,
star.x-1, star.y)
elseif stage == 2 then
love.graphics.points(star.x, star.y-2,
star.x+2, star.y,
star.x, star.y+2,
star.x-2, star.y)
end
end
end
function splash:_draw()
if frame == 1 or frame == 2 then
love.graphics.setCanvas(screen.star_canvas)
draw_stars()
love.graphics.setCanvas()
end
if frame == 2 or frame == 3 then
love.graphics.setCanvas(screen.rain_canvas)
draw_rain()
love.graphics.setCanvas()
end
if frame == 1 then
love.graphics.setBlendMode('alpha')
love.graphics.clear(0, 0, 0, 255)
love.graphics.setColor(255, 255, 255, 255)
love.graphics.draw(screen.star_canvas, screen.x, screen.y,
0, screen.scale)
end
if frame == 2 then
love.graphics.setBlendMode('alpha')
love.graphics.clear(0, 0, 0, 255)
local w = transition.duration/transition.total
love.graphics.setColor(255, 255, 255, w*255)
love.graphics.draw(screen.star_canvas, screen.x, screen.y,
0, screen.scale)
love.graphics.setColor(255, 255, 255, (1-w)*255)
love.graphics.draw(screen.rain_canvas, screen.x, screen.y,
0, screen.scale)
end
if frame == 3 then
love.graphics.setBlendMode('alpha')
love.graphics.clear(0, 0, 0, 255)
love.graphics.setColor(255, 255, 255, 255)
love.graphics.draw(screen.rain_canvas, screen.x, screen.y,
0, screen.scale)
end
end
function splash:_keypressed(key)
if key == 'escape' then
lib4.load_game()
end
end
return splash
|
-- ---------------------------------------------
-- util.lua 2014/06/05
-- Copyright (c) 2013-2014 Jun Mizutani,
-- released under the MIT open source license.
-- ---------------------------------------------
local ffi = require("ffi")
ffi.cdef[[
typedef struct timeval {
long tv_sec;
long tv_usec;
} timeval;
int gettimeofday(struct timeval *tv, void *tz);
int poll(struct pollfd *fds, unsigned long nfds, int timeout);
]]
local util = {}
function util.sleep(sec)
ffi.C.poll(nil, 0, sec * 1000)
end
function util.gettimeofday()
local t = ffi.new("timeval")
ffi.C.gettimeofday(t, nil)
return t.tv_sec, t.tv_usec
end
function util.now()
local sec, usec = util.gettimeofday()
return tonumber(sec) + tonumber(usec) / 1000000
end
function util.packagePath()
for s in string.gmatch(package.path, ".-;") do
local path = string.match(s, ".+LjES/")
if path ~= nil then return path end
end
return nil
end
function util.isFileExist(file)
local fh, errormsg = io.open(file)
if fh then
fh:close()
return true
else
return false
end
end
function util.readFile(filename)
local f = assert(io.open(filename, "rb"))
local text = f:read("*all")
f:close()
return text
end
function util.printf(fmt, ...)
io.write(string.format(fmt, ...))
end
function util.print()
io.write("\n")
end
function util.countTableElements(tbl)
local count = 0
for _ in pairs(tbl) do
count = count + 1
end
return count
end
-- simple table copy
-- No:circular reference, keys which are tables, metatable
function util.copyTable(dest, source)
for key, value in pairs(source) do
if type(value) == 'table' then
local t ={}
util.copyTable(t, value)
dest[key] = t
else
dest[key] = value
end
end
end
function util.checkTable(Table)
util.printf("------ %15s ---(meta)---> %s\n", Table, getmetatable(Table))
local nameList = {}
for name, value in pairs(Table) do
nameList[#nameList + 1] = name
end
table.sort(nameList)
for i = 1, #nameList do
util.printf("%24s -- %s\n", nameList[i], Table[nameList[i]])
end
util.printf("\n")
local mt = getmetatable(Table)
if mt ~= nil then
local next = mt.__index
if next ~= nil then util.checkTable(next) end
end
end
return util
|
-- Module metrics provides access to various metrics providers supported by envel
return {
prometheus = require("envel.metrics.prometheus"),
} |
local Players = game:GetService("Players")
local ServerScriptService = game:GetService("ServerScriptService")
local Workspace = game:GetService("Workspace")
local dataStore = game:GetService("DataStoreService")
local DataStore2 = require(game.ServerStorage.DataStore2)
DataStore2.Combine("DATA", "Gems","Scavanger","Collector","Pro","Equipped")
Players.PlayerAdded:Connect(function(player)
local gemStore = DataStore2("Gems", player)
local scavangerStore = DataStore2("Scavanger", player)
local collectorStore = DataStore2("Collector", player)
local proStore = DataStore2("Pro", player)
local equipStore = DataStore2("Equipped",player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "Leaderstats"
local gems = Instance.new("IntValue")
gems.Name = "Gems"
gems.Value = gemStore:Get(0)
gems.Parent = leaderstats
leaderstats.Parent = player
local backpack = Instance.new("Folder")
backpack.Name = "backpacks"
backpack.Parent = player
local Scavanger = Instance.new("BoolValue")
Scavanger.Name = "Scavanger"
Scavanger.Value = scavangerStore:Get(false)
Scavanger.Parent = backpack
local Collector = Instance.new("BoolValue")
Collector.Name = "Collector"
Collector.Value = collectorStore:Get(false)
Collector.Parent = backpack
local Pro = Instance.new("BoolValue")
Pro.Name = "Pro"
Pro.Value = proStore:Get(false)
Pro.Parent = backpack
local Equipped = Instance.new("StringValue")
Equipped.Name = "Equipped"
Equipped.Value = equipStore:Get("nil")
Equipped.Parent = backpack
gemStore:OnUpdate(function(newGems)
gems.Value = newGems
end)
scavangerStore:OnUpdate(function(newValue)
Scavanger.Value = newValue
end)
collectorStore:OnUpdate(function(newValue)
Collector.Value = newValue
end)
proStore:OnUpdate(function(newValue)
Pro.Value = newValue
end)
equipStore:OnUpdate(function(newValue)
Equipped.Value = newValue
end)
end)
|
local module = {}
local animateInTweenInfo = TweenInfo.new(0.3, Enum.EasingStyle.Back)
local animateOutTweenInfo = TweenInfo.new(0.3, Enum.EasingStyle.Quint)
function module.animateIn(Window)
if not Window.Visible then
Window.UIScale.Scale = 0.95
module.Fader.FadeIn(Window, 0.2)
module.Tween(Window.UIScale, animateInTweenInfo, {Scale = 1})
Window.Visible = true
end
end
function module.animateOut(Window)
if Window.Visible then
module.Fader.FadeOut(Window, 0.2)
module.Tween(Window.UIScale, animateOutTweenInfo, {Scale = 0.95})
coroutine.wrap(function()
wait(0.3)
if Window.Visible then
Window.Visible = false
end
end)()
end
end
return module
|
local _ = function(k, ...) return ImportPackage("i18n").t(GetPackageName(), k, ...) end
gatherTable = {
{
gather_zone = {-96766, 88886, 180},
gather_item = "unprocessed_rock",
gather_tool = "pickaxe",
process_zone = {-82629, 90991, 481},
process_item = "processed_rock",
pickup_animation = "PICKAXE_SWING",
},
{
gather_zone = {232464, 193521, 112},
gather_item = "fish",
gather_tool = "fishing_rod",
pickup_animation= "FISHING",
},
{
gather_zone = {-174432, 10837, 1831}, -- Champs du village
gather_item = "peach",
pickup_animation= "PICKUP_UPPER",
gather_props = {
-- Peach trees
{model = 145, x = -174006, y = 10457, z = 1773, rx = 0, ry = 10, rz = 0},
{model = 145, x = -173829, y = 10894, z = 1743, rx = 0, ry = 30, rz = 0},
{model = 145, x = -173980, y = 11396, z = 1698, rx = 0, ry = 45, rz = 0},
{model = 145, x = -174691, y = 11532, z = 1709, rx = 0, ry = 0, rz = 0},
{model = 145, x = -175204, y = 11094, z = 1755, rx = 0, ry = 145, rz = 0},
{model = 145, x = -175449, y = 11528, z = 1757, rx = 0, ry = 80, rz = 0},
{model = 145, x = -175171, y = 12038, z = 1719, rx = 0, ry = 50, rz = 0},
{model = 145, x = -174581, y = 12021, z = 1686, rx = 0, ry = 40, rz = 0},
}
},
{
gather_zone = {-45600, -106988, 2574},
gather_item = "coca_leaf",
process_zone = {-215517, -51147, 200},
process_item = "cocaine",
nb_items_per_processing = 3,
gather_props = {
-- Coca plants
{model = 118, x = -45773, y = -106903, z = 2470},
{model = 115, x = -45632, y = -106576, z = 2475},
{model = 114, x = -45291, y = -106575, z = 2460},
{model = 117, x = -45676, y = -107138, z = 2475},
{model = 118, x = -45974, y = -106991, z = 2459},
{model = 118, x = -46002, y = -106673, z = 2461},
{model = 114, x = -45773, y = -106622, z = 2457},
{model = 118, x = -45996, y = -106875, z = 2459},
{model = 117, x = -45816, y = -106407, z = 2480},
{model = 118, x = -45645, y = -106710, z = 2474},
{model = 114, x = -45856, y = -106640, z = 2471},
{model = 114, x = -46330, y = -106327, z = 2445},
{model = 115, x = -46487, y = -106181, z = 2436},
{model = 114, x = -46569, y = -106505, z = 2427},
{model = 117, x = -46188, y = -106066, z = 2455},
{model = 118, x = -46093, y = -106249, z = 2464},
{model = 118, x = -46408, y = -106572, z = 2438},
{model = 118, x = -45402, y = -107068, z = 2475},
{model = 115, x = -45271, y = -106912, z = 2461},
{model = 114, x = -45487, y = -106842, z = 2476},
{model = 118, x = -45354, y = -106658, z = 2466},
-- Process zone
{model = 1093, x = -215575, y = -51368, z = 100, rx = 0, ry = 49, rz = 0},
{model = 791, x = -215766, y = -50923, z = 98, rx = 0, ry = 44, rz = 0},
{model = 887, x = -216356, y = -50306, z = 96, rx = 0, ry = 47, rz = 0},
{model = 969, x = -215320, y = -50847, z = 110, rx = 0, ry = -47, rz = 0},
{model = 970, x = -215351, y = -50942, z = 105, rx = 0, ry = 43, rz = 0},
{model = 791, x = -215954, y = -51115, z = 98, rx = 0, ry = 44, rz = 0},
{model = 501, x = -215909, y = -51147, z = 106, rx = 0, ry = 0, rz = 0},
{model = 1099, x = -215450, y = -51220, z = 101, rx = 0, ry = -45, rz = 0},
{model = 1160, x = -215479, y = -50969, z = 107, rx = 0, ry = 0, rz = 0},
},
require_knowledge = true
},
}
gatherZoneCached = {}
processZoneCached = {}
AddEvent("OnPackageStart", function()
for k, v in pairs(gatherTable) do
if v.gather_zone ~= nil then
v.gatherObject = CreatePickup(2, v.gather_zone[1], v.gather_zone[2], v.gather_zone[3])
CreateText3D(_("gather") .. "\n" .. _("press_e"), 18, v.gather_zone[1], v.gather_zone[2], v.gather_zone[3] + 120, 0, 0, 0)
table.insert(gatherZoneCached, v.gatherObject)
end
if v.process_zone ~= nil then
v.processObject = CreatePickup(2, v.process_zone[1], v.process_zone[2], v.process_zone[3])
CreateText3D(_("process") .. "\n" .. _("press_e"), 18, v.process_zone[1], v.process_zone[2], v.process_zone[3] + 120, 0, 0, 0)
table.insert(processZoneCached, v.processObject)
end
if v.gather_props ~= nil then
for kk, vv in pairs(v.gather_props) do
if vv.ry ~= nil then
CreateObject(vv.model, vv.x, vv.y, vv.z, vv.rx, vv.ry, vv.rx)
else
CreateObject(vv.model, vv.x, vv.y, vv.z)
end
end
end
end
end)
AddEvent("OnPlayerJoin", function(player)
CallRemoteEvent(player, "gatheringSetup", gatherZoneCached, processZoneCached)
end)
AddEvent("OnPlayerDeath", function(player)
PlayerData[player].onAction = false
PlayerData[player].isActioned = false
end)
AddRemoteEvent("StartGathering", function(player, gatherzone)
local gather = GetGatherByGatherzone(gatherzone)
local animation = ""
local attached_item = 0
if gatherTable[gather].gather_tool ~= nil then
if PlayerData[player].inventory[gatherTable[gather].gather_tool] == nil then
return CallRemoteEvent(player, "MakeNotification", _("need_tool"), "linear-gradient(to right, #ff5f6d, #ffc371)")
end
end
if PlayerData[player].onAction then
PlayerData[player].onAction = false
return CallRemoteEvent(player, "MakeNotification", _("gather_cancelled"), "linear-gradient(to right, #ff5f6d, #ffc371)")
end
if GetPlayerVehicle(player) ~= 0 then
return
end
if gatherTable[gather].gather_tool == "pickaxe" then
attached_item = 1063
elseif gatherTable[gather].gather_tool == "fishing_rod" then
attached_item = 1111
end
if gatherTable[gather].pickup_animation ~= nil then
animation = gatherTable[gather].pickup_animation
else
animation = "PICKUP_LOWER"
end
PlayerData[player].onAction = true
function DoGathering(player, animation, gather, attached_item)
if PlayerData[player].onAction and not PlayerData[player].isActioned then
CallRemoteEvent(player, "loadingbar:show", _("gather").." ".._(gatherTable[gather].gather_item), 8) -- LOADING BAR
CallRemoteEvent(player, "LockControlMove", true)
PlayerData[player].isActioned = true
SetPlayerAnimation(player, animation)
SetAttachedItem(player, "hand_r", attached_item)
Delay(4000, function()
SetPlayerAnimation(player, animation)
end)
Delay(8000, function()
PlayerData[player].isActioned = false
SetPlayerAnimation(player, "STOP")
CallRemoteEvent(player, "LockControlMove", false)
SetAttachedItem(player, "hand_r", 0)
if AddInventory(player, gatherTable[gather].gather_item, 1) == true then
CallRemoteEvent(player, "MakeNotification", _("gather_success", _(gatherTable[gather].gather_item)), "linear-gradient(to right, #00b09b, #96c93d)")
return DoGathering(player, animation, gather, attached_item)
else
CallRemoteEvent(player, "MakeNotification", _("inventory_notenoughspace"), "linear-gradient(to right, #ff5f6d, #ffc371)")
PlayerData[player].onAction = false
return false
end
end)
end
end
DoGathering(player, animation, gather, attached_item)
end)
AddRemoteEvent("StartProcessing", function(player, processzone)
gather = GetGatherByProcesszone(processzone)
unprocessed_item = gatherTable[gather].gather_item
requireKnowledge = gatherTable[gather].require_knowledge
processItem = gatherTable[gather].process_item or 1
nbItemsPerProcessing = gatherTable[gather].nb_items_per_processing
if PlayerData[player].onAction then
PlayerData[player].onAction = false
return
end
if GetPlayerVehicle(player) ~= 0 then
return
end
-- On check si le joueur à la connaissance pour process cet item (si c'est requis)
if requireKnowledge then
local canProcess = 0
for k,v in pairs(PlayerData[player].drug_knowledge) do
if k == processItem and v == 1 then
canProcess = 1
end
end
if canProcess == 0 then
CallRemoteEvent(player, "MakeNotification", _("drugdealer_noknowledgeforthis"), "linear-gradient(to right, #ff5f6d, #ffc371)")
return
end
end
PlayerData[player].onAction = true
function DoProcessing(player, gather, unprocessed_item)
if PlayerData[player].onAction and not PlayerData[player].isActioned then
if PlayerData[player].inventory[unprocessed_item] == nil then
PlayerData[player].onAction = false
return CallRemoteEvent(player, "MakeNotification", _("not_enough_item"), "linear-gradient(to right, #ff5f6d, #ffc371)")
end
if tonumber(PlayerData[player].inventory[unprocessed_item]) < nbItemsPerProcessing then
PlayerData[player].onAction = false
return CallRemoteEvent(player, "MakeNotification", _("not_enough_item"), "linear-gradient(to right, #ff5f6d, #ffc371)")
else
CallRemoteEvent(player, "LockControlMove", true)
RemoveInventory(player, unprocessed_item, nbItemsPerProcessing)
SetPlayerAnimation(player, "COMBINE")
PlayerData[player].isActioned = true
Delay(4000, function()
SetPlayerAnimation(player, "COMBINE")
end)
Delay(8000, function()
PlayerData[player].isActioned = false
CallRemoteEvent(player, "LockControlMove", false)
SetPlayerAnimation(player, "STOP")
if AddInventory(player, gatherTable[gather].process_item, 1) then
CallRemoteEvent(player, "MakeNotification", _("process_success", _(gatherTable[gather].process_item)), "linear-gradient(to right, #00b09b, #96c93d)")
return DoProcessing(player, gather, unprocessed_item)
else
CallRemoteEvent(player, "MakeNotification", _("inventory_notenoughspace"), "linear-gradient(to right, #ff5f6d, #ffc371)")
return false
end
end)
end
end
end
DoProcessing(player, gather, unprocessed_item)
end)
function GetGatherByGatherzone(gatherzone)
for k, v in pairs(gatherTable) do
if v.gatherObject == gatherzone then
return k
end
end
end
function GetGatherByProcesszone(processzone)
for k, v in pairs(gatherTable) do
if v.processObject == processzone then
return k
end
end
end
|
local assets=
{
Asset("ANIM", "anim/swap_bedroll_furry.zip"),
}
local function onsleep(inst, sleeper)
local br = nil
if inst.components.stackable then
br = inst.components.stackable:Get()
else
br = inst
end
if br and br.components.finiteuses then
if br.components.finiteuses:GetUses() <= 1 then
br:Remove()
br.persists = false
end
end
GetPlayer().HUD:Hide()
TheFrontEnd:Fade(false,1)
inst:DoTaskInTime(1.2, function()
TheFrontEnd:Fade(true,1)
GetPlayer().HUD:Show()
sleeper.sg:GoToState("wakeup")
if sleeper.components.hunger then
-- Check SGwilson, state "bedroll", if you change this value
sleeper.components.hunger:DoDelta(-TUNING.CALORIES_HUGE, false, true)
end
if sleeper.components.sanity then
sleeper.components.sanity:DoDelta(TUNING.SANITY_HUGE, false)
end
if sleeper.components.health then
sleeper.components.health:DoDelta(TUNING.HEALING_MEDLARGE, false, "bedroll", true)
end
if sleeper.components.temperature then
if sleeper.components.temperature.current < TUNING.TARGET_SLEEP_TEMP then
sleeper.components.temperature:SetTemperature(TUNING.TARGET_SLEEP_TEMP)
elseif sleeper.components.temperature.current > TUNING.TARGET_SLEEP_TEMP * 1.5 then
sleeper.components.temperature:SetTemperature(sleeper.components.temperature.current + (TUNING.TARGET_SLEEP_TEMP * .5))
end
end
GetClock():MakeNextDay()
end)
end
local function onuse()
GetPlayer().AnimState:OverrideSymbol("swap_bedroll", "swap_bedroll_furry", "bedroll_furry")
end
local function fn(Sim)
local inst = CreateEntity()
local trans = inst.entity:AddTransform()
local anim = inst.entity:AddAnimState()
MakeInventoryPhysics(inst)
anim:SetBank("swap_bedroll_furry")
anim:SetBuild("swap_bedroll_furry")
anim:PlayAnimation("idle")
inst:AddComponent("inspectable")
inst:AddComponent("inventoryitem")
inst:AddComponent("finiteuses")
inst.components.finiteuses:SetConsumption(ACTIONS.SLEEPIN, 1)
inst.components.finiteuses:SetMaxUses(3)
inst.components.finiteuses:SetUses(3)
inst:AddComponent("fuel")
inst.components.fuel.fuelvalue = TUNING.LARGE_FUEL
MakeSmallBurnable(inst, TUNING.LONG_BURNABLE)
MakeSmallPropagator(inst)
inst.components.burnable:MakeDragonflyBait(3)
inst:AddComponent("sleepingbag")
inst.components.sleepingbag.onsleep = onsleep
inst.onuse = onuse
return inst
end
return Prefab( "common/inventory/bedroll_furry", fn, assets)
|
-- This file is automatically generated, do not edit!
-- Path of Building
--
-- Intelligence support gems
-- Skill data (c) Grinding Gear Games
--
local skills, mod, flag, skill = ...
skills["SupportAddedChaosDamage"] = {
name = "Added Chaos Damage",
color = 3,
support = true,
requireSkillTypes = { 10, 1, },
addSkillTypes = { },
excludeSkillTypes = { },
baseMods = {
},
qualityStats = {
{ "chaos_damage_+%", 0.5 },
},
stats = {
"global_minimum_added_chaos_damage",
"global_maximum_added_chaos_damage",
},
statInterpolation = { },
levels = {
[1] = { 18, 26, manaMultiplier = 30, levelRequirement = 31, },
[2] = { 21, 32, manaMultiplier = 30, levelRequirement = 34, },
[3] = { 24, 36, manaMultiplier = 30, levelRequirement = 36, },
[4] = { 27, 41, manaMultiplier = 30, levelRequirement = 38, },
[5] = { 31, 46, manaMultiplier = 30, levelRequirement = 40, },
[6] = { 35, 52, manaMultiplier = 30, levelRequirement = 42, },
[7] = { 39, 59, manaMultiplier = 30, levelRequirement = 44, },
[8] = { 44, 67, manaMultiplier = 30, levelRequirement = 46, },
[9] = { 50, 75, manaMultiplier = 30, levelRequirement = 48, },
[10] = { 56, 84, manaMultiplier = 30, levelRequirement = 50, },
[11] = { 63, 94, manaMultiplier = 30, levelRequirement = 52, },
[12] = { 71, 106, manaMultiplier = 30, levelRequirement = 54, },
[13] = { 79, 118, manaMultiplier = 30, levelRequirement = 56, },
[14] = { 88, 132, manaMultiplier = 30, levelRequirement = 58, },
[15] = { 99, 148, manaMultiplier = 30, levelRequirement = 60, },
[16] = { 110, 165, manaMultiplier = 30, levelRequirement = 62, },
[17] = { 123, 185, manaMultiplier = 30, levelRequirement = 64, },
[18] = { 137, 206, manaMultiplier = 30, levelRequirement = 66, },
[19] = { 153, 229, manaMultiplier = 30, levelRequirement = 68, },
[20] = { 170, 256, manaMultiplier = 30, levelRequirement = 70, },
[21] = { 190, 284, manaMultiplier = 30, levelRequirement = 72, },
[22] = { 211, 316, manaMultiplier = 30, levelRequirement = 74, },
[23] = { 234, 352, manaMultiplier = 30, levelRequirement = 76, },
[24] = { 260, 391, manaMultiplier = 30, levelRequirement = 78, },
[25] = { 289, 434, manaMultiplier = 30, levelRequirement = 80, },
[26] = { 321, 482, manaMultiplier = 30, levelRequirement = 82, },
[27] = { 356, 534, manaMultiplier = 30, levelRequirement = 84, },
[28] = { 395, 592, manaMultiplier = 30, levelRequirement = 86, },
[29] = { 438, 657, manaMultiplier = 30, levelRequirement = 88, },
[30] = { 485, 728, manaMultiplier = 30, levelRequirement = 90, },
},
}
skills["SupportAddedLightningDamage"] = {
name = "Added Lightning Damage",
color = 3,
support = true,
requireSkillTypes = { 1, 10, },
addSkillTypes = { },
excludeSkillTypes = { },
baseMods = {
},
qualityStats = {
{ "lightning_damage_+%", 0.5 },
},
stats = {
"global_minimum_added_lightning_damage",
"global_maximum_added_lightning_damage",
},
statInterpolation = { },
levels = {
[1] = { 1, 8, manaMultiplier = 30, levelRequirement = 8, },
[2] = { 1, 9, manaMultiplier = 30, levelRequirement = 10, },
[3] = { 1, 12, manaMultiplier = 30, levelRequirement = 13, },
[4] = { 1, 16, manaMultiplier = 30, levelRequirement = 17, },
[5] = { 1, 22, manaMultiplier = 30, levelRequirement = 21, },
[6] = { 1, 28, manaMultiplier = 30, levelRequirement = 25, },
[7] = { 2, 36, manaMultiplier = 30, levelRequirement = 29, },
[8] = { 2, 47, manaMultiplier = 30, levelRequirement = 33, },
[9] = { 3, 59, manaMultiplier = 30, levelRequirement = 37, },
[10] = { 4, 70, manaMultiplier = 30, levelRequirement = 40, },
[11] = { 4, 83, manaMultiplier = 30, levelRequirement = 43, },
[12] = { 5, 98, manaMultiplier = 30, levelRequirement = 46, },
[13] = { 6, 116, manaMultiplier = 30, levelRequirement = 49, },
[14] = { 7, 136, manaMultiplier = 30, levelRequirement = 52, },
[15] = { 8, 159, manaMultiplier = 30, levelRequirement = 55, },
[16] = { 10, 186, manaMultiplier = 30, levelRequirement = 58, },
[17] = { 11, 218, manaMultiplier = 30, levelRequirement = 61, },
[18] = { 13, 253, manaMultiplier = 30, levelRequirement = 64, },
[19] = { 16, 295, manaMultiplier = 30, levelRequirement = 67, },
[20] = { 18, 342, manaMultiplier = 30, levelRequirement = 70, },
[21] = { 20, 378, manaMultiplier = 30, levelRequirement = 72, },
[22] = { 22, 417, manaMultiplier = 30, levelRequirement = 74, },
[23] = { 24, 459, manaMultiplier = 30, levelRequirement = 76, },
[24] = { 27, 506, manaMultiplier = 30, levelRequirement = 78, },
[25] = { 29, 557, manaMultiplier = 30, levelRequirement = 80, },
[26] = { 32, 614, manaMultiplier = 30, levelRequirement = 82, },
[27] = { 36, 675, manaMultiplier = 30, levelRequirement = 84, },
[28] = { 39, 743, manaMultiplier = 30, levelRequirement = 86, },
[29] = { 43, 816, manaMultiplier = 30, levelRequirement = 88, },
[30] = { 47, 897, manaMultiplier = 30, levelRequirement = 90, },
},
}
skills["SupportBlasphemy"] = {
name = "Blasphemy",
color = 3,
support = true,
requireSkillTypes = { 32, },
addSkillTypes = { 15, 16, 31, 44, },
excludeSkillTypes = { },
baseMods = {
},
qualityStats = {
{ "curse_effect_+%", 0.5 },
},
stats = {
"curse_area_of_effect_+%",
"curse_apply_as_aura",
},
statInterpolation = { },
levels = {
[1] = { 0, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 31, },
[2] = { 4, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 34, },
[3] = { 8, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 36, },
[4] = { 12, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 38, },
[5] = { 16, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 40, },
[6] = { 20, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 42, },
[7] = { 24, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 44, },
[8] = { 28, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 46, },
[9] = { 32, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 48, },
[10] = { 36, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 50, },
[11] = { 40, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 52, },
[12] = { 44, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 54, },
[13] = { 48, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 56, },
[14] = { 52, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 58, },
[15] = { 56, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 60, },
[16] = { 60, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 62, },
[17] = { 64, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 64, },
[18] = { 68, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 66, },
[19] = { 72, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 68, },
[20] = { 76, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 70, },
[21] = { 80, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 72, },
[22] = { 84, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 74, },
[23] = { 88, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 76, },
[24] = { 92, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 78, },
[25] = { 96, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 80, },
[26] = { 100, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 82, },
[27] = { 104, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 84, },
[28] = { 108, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 86, },
[29] = { 112, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 88, },
[30] = { 116, manaCostOverride = 35, cooldown = 0.5, levelRequirement = 90, },
},
}
skills["SupportCastOnStunned"] = {
name = "Cast when Stunned",
color = 3,
support = true,
requireSkillTypes = { 36, },
addSkillTypes = { 42, },
excludeSkillTypes = { 37, 41, 30, 44, 61, },
baseMods = {
},
qualityStats = {
{ "damage_+%", 0.5 },
},
stats = {
"cast_on_stunned_%",
"spell_uncastable_if_triggerable",
"base_skill_show_average_damage_instead_of_dps",
},
statInterpolation = { },
levels = {
[1] = { 50, cooldown = 0.25, levelRequirement = 38, },
[2] = { 51, cooldown = 0.25, levelRequirement = 40, },
[3] = { 52, cooldown = 0.25, levelRequirement = 42, },
[4] = { 53, cooldown = 0.25, levelRequirement = 44, },
[5] = { 54, cooldown = 0.25, levelRequirement = 46, },
[6] = { 55, cooldown = 0.25, levelRequirement = 48, },
[7] = { 56, cooldown = 0.25, levelRequirement = 50, },
[8] = { 57, cooldown = 0.25, levelRequirement = 52, },
[9] = { 58, cooldown = 0.25, levelRequirement = 54, },
[10] = { 59, cooldown = 0.25, levelRequirement = 56, },
[11] = { 60, cooldown = 0.25, levelRequirement = 58, },
[12] = { 61, cooldown = 0.25, levelRequirement = 60, },
[13] = { 62, cooldown = 0.25, levelRequirement = 62, },
[14] = { 63, cooldown = 0.25, levelRequirement = 64, },
[15] = { 64, cooldown = 0.25, levelRequirement = 65, },
[16] = { 65, cooldown = 0.25, levelRequirement = 66, },
[17] = { 66, cooldown = 0.25, levelRequirement = 67, },
[18] = { 67, cooldown = 0.25, levelRequirement = 68, },
[19] = { 68, cooldown = 0.25, levelRequirement = 69, },
[20] = { 69, cooldown = 0.25, levelRequirement = 70, },
[21] = { 70, cooldown = 0.25, levelRequirement = 72, },
[22] = { 71, cooldown = 0.25, levelRequirement = 74, },
[23] = { 72, cooldown = 0.25, levelRequirement = 76, },
[24] = { 73, cooldown = 0.25, levelRequirement = 78, },
[25] = { 74, cooldown = 0.25, levelRequirement = 80, },
[26] = { 75, cooldown = 0.25, levelRequirement = 82, },
[27] = { 76, cooldown = 0.25, levelRequirement = 84, },
[28] = { 77, cooldown = 0.25, levelRequirement = 86, },
[29] = { 78, cooldown = 0.25, levelRequirement = 88, },
[30] = { 79, cooldown = 0.25, levelRequirement = 90, },
},
}
skills["SupportCastWhileChannelling"] = {
name = "Cast while Channelling",
color = 3,
support = true,
requireSkillTypes = { 58, 36, },
addSkillTypes = { },
excludeSkillTypes = { 30, 61, },
statMap = {
["cast_while_channelling_time_ms"] = {
skill("timeOverride", nil, { type = "SkillType", skillType = SkillType.TriggerableSpell }),
div = 1000,
},
["support_cast_while_channelling_triggered_skill_damage_+%_final"] = {
mod("Damage", "MORE", nil, 0, 0, { type = "SkillType", skillType = SkillType.TriggerableSpell }),
},
},
baseMods = {
},
qualityStats = {
{ "damage_+%", 0.5 },
},
stats = {
"cast_while_channelling_time_ms",
"support_cast_while_channelling_triggered_skill_damage_+%_final",
"spell_uncastable_if_triggerable",
},
statInterpolation = { },
levels = {
[1] = { 450, 0, manaMultiplier = 40, levelRequirement = 38, },
[2] = { 440, 0, manaMultiplier = 40, levelRequirement = 40, },
[3] = { 440, 1, manaMultiplier = 40, levelRequirement = 42, },
[4] = { 430, 1, manaMultiplier = 40, levelRequirement = 44, },
[5] = { 430, 2, manaMultiplier = 40, levelRequirement = 46, },
[6] = { 420, 2, manaMultiplier = 40, levelRequirement = 48, },
[7] = { 420, 3, manaMultiplier = 40, levelRequirement = 50, },
[8] = { 410, 3, manaMultiplier = 40, levelRequirement = 52, },
[9] = { 410, 4, manaMultiplier = 40, levelRequirement = 54, },
[10] = { 400, 4, manaMultiplier = 40, levelRequirement = 56, },
[11] = { 400, 5, manaMultiplier = 40, levelRequirement = 58, },
[12] = { 390, 5, manaMultiplier = 40, levelRequirement = 60, },
[13] = { 390, 6, manaMultiplier = 40, levelRequirement = 62, },
[14] = { 380, 6, manaMultiplier = 40, levelRequirement = 64, },
[15] = { 380, 7, manaMultiplier = 40, levelRequirement = 65, },
[16] = { 370, 7, manaMultiplier = 40, levelRequirement = 66, },
[17] = { 370, 8, manaMultiplier = 40, levelRequirement = 67, },
[18] = { 360, 8, manaMultiplier = 40, levelRequirement = 68, },
[19] = { 360, 9, manaMultiplier = 40, levelRequirement = 69, },
[20] = { 350, 9, manaMultiplier = 40, levelRequirement = 70, },
[21] = { 350, 10, manaMultiplier = 40, levelRequirement = 72, },
[22] = { 340, 10, manaMultiplier = 40, levelRequirement = 74, },
[23] = { 340, 11, manaMultiplier = 40, levelRequirement = 76, },
[24] = { 330, 11, manaMultiplier = 40, levelRequirement = 78, },
[25] = { 330, 12, manaMultiplier = 40, levelRequirement = 80, },
[26] = { 320, 12, manaMultiplier = 40, levelRequirement = 82, },
[27] = { 320, 13, manaMultiplier = 40, levelRequirement = 84, },
[28] = { 310, 13, manaMultiplier = 40, levelRequirement = 86, },
[29] = { 310, 14, manaMultiplier = 40, levelRequirement = 88, },
[30] = { 300, 14, manaMultiplier = 40, levelRequirement = 90, },
},
}
skills["SupportChanceToIgnite"] = {
name = "Chance to Ignite",
color = 3,
support = true,
requireSkillTypes = { 10, 1, },
addSkillTypes = { },
excludeSkillTypes = { },
baseMods = {
},
qualityStats = {
{ "burn_damage_+%", 0.5 },
},
stats = {
"base_chance_to_ignite_%",
},
statInterpolation = { },
levels = {
[1] = { 30, manaMultiplier = 10, levelRequirement = 31, },
[2] = { 31, manaMultiplier = 10, levelRequirement = 34, },
[3] = { 32, manaMultiplier = 10, levelRequirement = 36, },
[4] = { 33, manaMultiplier = 10, levelRequirement = 38, },
[5] = { 34, manaMultiplier = 10, levelRequirement = 40, },
[6] = { 35, manaMultiplier = 10, levelRequirement = 42, },
[7] = { 36, manaMultiplier = 10, levelRequirement = 44, },
[8] = { 37, manaMultiplier = 10, levelRequirement = 46, },
[9] = { 38, manaMultiplier = 10, levelRequirement = 48, },
[10] = { 39, manaMultiplier = 10, levelRequirement = 50, },
[11] = { 40, manaMultiplier = 10, levelRequirement = 52, },
[12] = { 41, manaMultiplier = 10, levelRequirement = 54, },
[13] = { 42, manaMultiplier = 10, levelRequirement = 56, },
[14] = { 43, manaMultiplier = 10, levelRequirement = 58, },
[15] = { 44, manaMultiplier = 10, levelRequirement = 60, },
[16] = { 45, manaMultiplier = 10, levelRequirement = 62, },
[17] = { 46, manaMultiplier = 10, levelRequirement = 64, },
[18] = { 47, manaMultiplier = 10, levelRequirement = 66, },
[19] = { 48, manaMultiplier = 10, levelRequirement = 68, },
[20] = { 49, manaMultiplier = 10, levelRequirement = 70, },
[21] = { 50, manaMultiplier = 10, levelRequirement = 72, },
[22] = { 51, manaMultiplier = 10, levelRequirement = 74, },
[23] = { 52, manaMultiplier = 10, levelRequirement = 76, },
[24] = { 53, manaMultiplier = 10, levelRequirement = 78, },
[25] = { 54, manaMultiplier = 10, levelRequirement = 80, },
[26] = { 55, manaMultiplier = 10, levelRequirement = 82, },
[27] = { 56, manaMultiplier = 10, levelRequirement = 84, },
[28] = { 57, manaMultiplier = 10, levelRequirement = 86, },
[29] = { 58, manaMultiplier = 10, levelRequirement = 88, },
[30] = { 59, manaMultiplier = 10, levelRequirement = 90, },
},
}
skills["SupportConcentratedEffect"] = {
name = "Concentrated Effect",
color = 3,
support = true,
requireSkillTypes = { 11, 21, 53, },
addSkillTypes = { },
excludeSkillTypes = { },
statMap = {
["support_concentrated_effect_skill_area_of_effect_+%_final"] = {
mod("AreaOfEffect", "MORE", nil),
},
["support_area_concentrate_area_damage_+%_final"] = {
mod("Damage", "MORE", nil, ModFlag.Area),
},
},
baseMods = {
},
qualityStats = {
{ "area_damage_+%", 0.5 },
},
stats = {
"support_concentrated_effect_skill_area_of_effect_+%_final",
"support_area_concentrate_area_damage_+%_final",
},
statInterpolation = { },
levels = {
[1] = { -30, 35, manaMultiplier = 40, levelRequirement = 18, },
[2] = { -30, 36, manaMultiplier = 40, levelRequirement = 22, },
[3] = { -30, 37, manaMultiplier = 40, levelRequirement = 26, },
[4] = { -30, 38, manaMultiplier = 40, levelRequirement = 29, },
[5] = { -30, 39, manaMultiplier = 40, levelRequirement = 32, },
[6] = { -30, 40, manaMultiplier = 40, levelRequirement = 35, },
[7] = { -30, 41, manaMultiplier = 40, levelRequirement = 38, },
[8] = { -30, 42, manaMultiplier = 40, levelRequirement = 41, },
[9] = { -30, 43, manaMultiplier = 40, levelRequirement = 44, },
[10] = { -30, 44, manaMultiplier = 40, levelRequirement = 47, },
[11] = { -30, 45, manaMultiplier = 40, levelRequirement = 50, },
[12] = { -30, 46, manaMultiplier = 40, levelRequirement = 53, },
[13] = { -30, 47, manaMultiplier = 40, levelRequirement = 56, },
[14] = { -30, 48, manaMultiplier = 40, levelRequirement = 58, },
[15] = { -30, 49, manaMultiplier = 40, levelRequirement = 60, },
[16] = { -30, 50, manaMultiplier = 40, levelRequirement = 62, },
[17] = { -30, 51, manaMultiplier = 40, levelRequirement = 64, },
[18] = { -30, 52, manaMultiplier = 40, levelRequirement = 66, },
[19] = { -30, 53, manaMultiplier = 40, levelRequirement = 68, },
[20] = { -30, 54, manaMultiplier = 40, levelRequirement = 70, },
[21] = { -30, 55, manaMultiplier = 40, levelRequirement = 72, },
[22] = { -30, 56, manaMultiplier = 40, levelRequirement = 74, },
[23] = { -30, 57, manaMultiplier = 40, levelRequirement = 76, },
[24] = { -30, 58, manaMultiplier = 40, levelRequirement = 78, },
[25] = { -30, 59, manaMultiplier = 40, levelRequirement = 80, },
[26] = { -30, 60, manaMultiplier = 40, levelRequirement = 82, },
[27] = { -30, 61, manaMultiplier = 40, levelRequirement = 84, },
[28] = { -30, 62, manaMultiplier = 40, levelRequirement = 86, },
[29] = { -30, 63, manaMultiplier = 40, levelRequirement = 88, },
[30] = { -30, 64, manaMultiplier = 40, levelRequirement = 90, },
},
}
skills["SupportControlledDestruction"] = {
name = "Controlled Destruction",
color = 3,
support = true,
requireSkillTypes = { 10, 1, 59, },
addSkillTypes = { },
excludeSkillTypes = { },
statMap = {
["support_controlled_destruction_spell_damage_+%_final"] = {
mod("Damage", "MORE", nil, ModFlag.Spell),
},
},
baseMods = {
},
qualityStats = {
{ "spell_damage_+%", 0.5 },
},
stats = {
"support_controlled_destruction_spell_damage_+%_final",
"critical_strike_chance_+%",
},
statInterpolation = { },
levels = {
[1] = { 25, -100, manaMultiplier = 30, levelRequirement = 18, },
[2] = { 26, -100, manaMultiplier = 30, levelRequirement = 22, },
[3] = { 27, -100, manaMultiplier = 30, levelRequirement = 26, },
[4] = { 28, -100, manaMultiplier = 30, levelRequirement = 29, },
[5] = { 29, -100, manaMultiplier = 30, levelRequirement = 32, },
[6] = { 30, -100, manaMultiplier = 30, levelRequirement = 35, },
[7] = { 31, -100, manaMultiplier = 30, levelRequirement = 38, },
[8] = { 32, -100, manaMultiplier = 30, levelRequirement = 41, },
[9] = { 33, -100, manaMultiplier = 30, levelRequirement = 44, },
[10] = { 34, -100, manaMultiplier = 30, levelRequirement = 47, },
[11] = { 35, -100, manaMultiplier = 30, levelRequirement = 50, },
[12] = { 36, -100, manaMultiplier = 30, levelRequirement = 53, },
[13] = { 37, -100, manaMultiplier = 30, levelRequirement = 56, },
[14] = { 38, -100, manaMultiplier = 30, levelRequirement = 58, },
[15] = { 39, -100, manaMultiplier = 30, levelRequirement = 60, },
[16] = { 40, -100, manaMultiplier = 30, levelRequirement = 62, },
[17] = { 41, -100, manaMultiplier = 30, levelRequirement = 64, },
[18] = { 42, -100, manaMultiplier = 30, levelRequirement = 66, },
[19] = { 43, -100, manaMultiplier = 30, levelRequirement = 68, },
[20] = { 44, -100, manaMultiplier = 30, levelRequirement = 70, },
[21] = { 45, -100, manaMultiplier = 30, levelRequirement = 72, },
[22] = { 46, -100, manaMultiplier = 30, levelRequirement = 74, },
[23] = { 47, -100, manaMultiplier = 30, levelRequirement = 76, },
[24] = { 48, -100, manaMultiplier = 30, levelRequirement = 78, },
[25] = { 49, -100, manaMultiplier = 30, levelRequirement = 80, },
[26] = { 50, -100, manaMultiplier = 30, levelRequirement = 82, },
[27] = { 51, -100, manaMultiplier = 30, levelRequirement = 84, },
[28] = { 52, -100, manaMultiplier = 30, levelRequirement = 86, },
[29] = { 53, -100, manaMultiplier = 30, levelRequirement = 88, },
[30] = { 54, -100, manaMultiplier = 30, levelRequirement = 90, },
},
}
skills["SupportCurseOnHit"] = {
name = "Curse On Hit",
color = 3,
support = true,
requireSkillTypes = { 1, 10, 32, },
addSkillTypes = { },
excludeSkillTypes = { 37, 41, 44, },
baseMods = {
},
qualityStats = {
{ "curse_effect_+%", 0.5 },
},
stats = {
"apply_linked_curses_on_hit_%",
"base_curse_duration_+%",
"cannot_cast_curses",
},
statInterpolation = { },
levels = {
[1] = { 100, -50, levelRequirement = 38, },
[2] = { 100, -48, levelRequirement = 40, },
[3] = { 100, -46, levelRequirement = 42, },
[4] = { 100, -44, levelRequirement = 44, },
[5] = { 100, -42, levelRequirement = 46, },
[6] = { 100, -40, levelRequirement = 48, },
[7] = { 100, -38, levelRequirement = 50, },
[8] = { 100, -36, levelRequirement = 52, },
[9] = { 100, -34, levelRequirement = 54, },
[10] = { 100, -32, levelRequirement = 56, },
[11] = { 100, -30, levelRequirement = 58, },
[12] = { 100, -28, levelRequirement = 60, },
[13] = { 100, -26, levelRequirement = 62, },
[14] = { 100, -24, levelRequirement = 64, },
[15] = { 100, -22, levelRequirement = 65, },
[16] = { 100, -20, levelRequirement = 66, },
[17] = { 100, -18, levelRequirement = 67, },
[18] = { 100, -16, levelRequirement = 68, },
[19] = { 100, -14, levelRequirement = 69, },
[20] = { 100, -12, levelRequirement = 70, },
[21] = { 100, -10, levelRequirement = 72, },
[22] = { 100, -8, levelRequirement = 74, },
[23] = { 100, -6, levelRequirement = 76, },
[24] = { 100, -4, levelRequirement = 78, },
[25] = { 100, -2, levelRequirement = 80, },
[26] = { 100, 0, levelRequirement = 82, },
[27] = { 100, 2, levelRequirement = 84, },
[28] = { 100, 4, levelRequirement = 86, },
[29] = { 100, 6, levelRequirement = 88, },
[30] = { 100, 8, levelRequirement = 90, },
},
}
skills["SupportElementalFocus"] = {
name = "Elemental Focus",
color = 3,
support = true,
requireSkillTypes = { 10, 1, 29, },
addSkillTypes = { },
excludeSkillTypes = { },
statMap = {
["support_gem_elemental_damage_+%_final"] = {
mod("ElementalDamage", "MORE", nil),
},
},
baseMods = {
},
qualityStats = {
{ "elemental_damage_+%", 0.5 },
},
stats = {
"support_gem_elemental_damage_+%_final",
"cannot_inflict_status_ailments",
},
statInterpolation = { },
levels = {
[1] = { 30, manaMultiplier = 30, levelRequirement = 18, },
[2] = { 31, manaMultiplier = 30, levelRequirement = 22, },
[3] = { 32, manaMultiplier = 30, levelRequirement = 26, },
[4] = { 33, manaMultiplier = 30, levelRequirement = 29, },
[5] = { 34, manaMultiplier = 30, levelRequirement = 32, },
[6] = { 35, manaMultiplier = 30, levelRequirement = 35, },
[7] = { 36, manaMultiplier = 30, levelRequirement = 38, },
[8] = { 37, manaMultiplier = 30, levelRequirement = 41, },
[9] = { 38, manaMultiplier = 30, levelRequirement = 44, },
[10] = { 39, manaMultiplier = 30, levelRequirement = 47, },
[11] = { 40, manaMultiplier = 30, levelRequirement = 50, },
[12] = { 41, manaMultiplier = 30, levelRequirement = 53, },
[13] = { 42, manaMultiplier = 30, levelRequirement = 56, },
[14] = { 43, manaMultiplier = 30, levelRequirement = 58, },
[15] = { 44, manaMultiplier = 30, levelRequirement = 60, },
[16] = { 45, manaMultiplier = 30, levelRequirement = 62, },
[17] = { 46, manaMultiplier = 30, levelRequirement = 64, },
[18] = { 47, manaMultiplier = 30, levelRequirement = 66, },
[19] = { 48, manaMultiplier = 30, levelRequirement = 68, },
[20] = { 49, manaMultiplier = 30, levelRequirement = 70, },
[21] = { 50, manaMultiplier = 30, levelRequirement = 72, },
[22] = { 51, manaMultiplier = 30, levelRequirement = 74, },
[23] = { 52, manaMultiplier = 30, levelRequirement = 76, },
[24] = { 53, manaMultiplier = 30, levelRequirement = 78, },
[25] = { 54, manaMultiplier = 30, levelRequirement = 80, },
[26] = { 55, manaMultiplier = 30, levelRequirement = 82, },
[27] = { 56, manaMultiplier = 30, levelRequirement = 84, },
[28] = { 57, manaMultiplier = 30, levelRequirement = 86, },
[29] = { 58, manaMultiplier = 30, levelRequirement = 88, },
[30] = { 59, manaMultiplier = 30, levelRequirement = 90, },
},
}
skills["SupportElementalProliferation"] = {
name = "Elemental Proliferation",
color = 3,
support = true,
requireSkillTypes = { 10, 1, 20, },
addSkillTypes = { 11, },
excludeSkillTypes = { },
statMap = {
["support_ignite_prolif_ignite_damage_+%_final"] = {
mod("Damage", "MORE", {val}),
},
},
baseMods = {
},
qualityStats = {
{ "ignite_duration_+%", 0.5 },
{ "chill_duration_+%", 0.5 },
{ "freeze_duration_+%", 0.5 },
{ "shock_duration_+%", 0.5 },
},
stats = {
"elemental_status_effect_aura_radius",
"display_what_elemental_proliferation_does",
"support_elemental_proliferation_damage_+%_final",
},
statInterpolation = { },
levels = {
[1] = { 16, 1, -30, manaMultiplier = 40, levelRequirement = 38, },
[2] = { 16, 1, -30, manaMultiplier = 40, levelRequirement = 40, },
[3] = { 16, 1, -29, manaMultiplier = 40, levelRequirement = 42, },
[4] = { 16, 1, -29, manaMultiplier = 40, levelRequirement = 44, },
[5] = { 16, 1, -28, manaMultiplier = 40, levelRequirement = 46, },
[6] = { 16, 1, -28, manaMultiplier = 40, levelRequirement = 48, },
[7] = { 16, 1, -27, manaMultiplier = 40, levelRequirement = 50, },
[8] = { 16, 1, -27, manaMultiplier = 40, levelRequirement = 52, },
[9] = { 16, 1, -26, manaMultiplier = 40, levelRequirement = 54, },
[10] = { 16, 1, -26, manaMultiplier = 40, levelRequirement = 56, },
[11] = { 16, 1, -25, manaMultiplier = 40, levelRequirement = 58, },
[12] = { 16, 1, -25, manaMultiplier = 40, levelRequirement = 60, },
[13] = { 16, 1, -24, manaMultiplier = 40, levelRequirement = 62, },
[14] = { 16, 1, -24, manaMultiplier = 40, levelRequirement = 64, },
[15] = { 16, 1, -23, manaMultiplier = 40, levelRequirement = 65, },
[16] = { 16, 1, -23, manaMultiplier = 40, levelRequirement = 66, },
[17] = { 16, 1, -22, manaMultiplier = 40, levelRequirement = 67, },
[18] = { 16, 1, -22, manaMultiplier = 40, levelRequirement = 68, },
[19] = { 16, 1, -21, manaMultiplier = 40, levelRequirement = 69, },
[20] = { 16, 1, -21, manaMultiplier = 40, levelRequirement = 70, },
[21] = { 16, 1, -20, manaMultiplier = 40, levelRequirement = 72, },
[22] = { 16, 1, -20, manaMultiplier = 40, levelRequirement = 74, },
[23] = { 16, 1, -19, manaMultiplier = 40, levelRequirement = 76, },
[24] = { 16, 1, -19, manaMultiplier = 40, levelRequirement = 78, },
[25] = { 16, 1, -18, manaMultiplier = 40, levelRequirement = 80, },
[26] = { 16, 1, -18, manaMultiplier = 40, levelRequirement = 82, },
[27] = { 16, 1, -17, manaMultiplier = 40, levelRequirement = 84, },
[28] = { 16, 1, -17, manaMultiplier = 40, levelRequirement = 86, },
[29] = { 16, 1, -16, manaMultiplier = 40, levelRequirement = 88, },
[30] = { 16, 1, -16, manaMultiplier = 40, levelRequirement = 90, },
},
}
skills["SupportAdditionalXP"] = {
name = "Enlighten",
color = 3,
support = true,
requireSkillTypes = { },
addSkillTypes = { },
excludeSkillTypes = { },
supportGemsOnly = true,
baseMods = {
},
qualityStats = {
{ "local_gem_experience_gain_+%", 5 },
},
stats = {
},
statInterpolation = { },
levels = {
[1] = { levelRequirement = 1, },
[2] = { manaMultiplier = -4, levelRequirement = 10, },
[3] = { manaMultiplier = -8, levelRequirement = 45, },
[4] = { manaMultiplier = -12, levelRequirement = 60, },
[5] = { manaMultiplier = -16, levelRequirement = 75, },
[6] = { manaMultiplier = -20, levelRequirement = 90, },
[7] = { manaMultiplier = -24, levelRequirement = 100, },
[8] = { manaMultiplier = -28, levelRequirement = 100, },
[9] = { manaMultiplier = -32, levelRequirement = 100, },
[10] = { manaMultiplier = -36, levelRequirement = 100, },
},
}
skills["SupportFasterCast"] = {
name = "Faster Casting",
color = 3,
support = true,
requireSkillTypes = { 2, 39, },
addSkillTypes = { },
excludeSkillTypes = { },
baseMods = {
},
qualityStats = {
{ "base_cast_speed_+%", 0.5 },
},
stats = {
"base_cast_speed_+%",
},
statInterpolation = { },
levels = {
[1] = { 20, manaMultiplier = 20, levelRequirement = 18, },
[2] = { 21, manaMultiplier = 20, levelRequirement = 22, },
[3] = { 22, manaMultiplier = 20, levelRequirement = 26, },
[4] = { 23, manaMultiplier = 20, levelRequirement = 29, },
[5] = { 24, manaMultiplier = 20, levelRequirement = 32, },
[6] = { 25, manaMultiplier = 20, levelRequirement = 35, },
[7] = { 26, manaMultiplier = 20, levelRequirement = 38, },
[8] = { 27, manaMultiplier = 20, levelRequirement = 41, },
[9] = { 28, manaMultiplier = 20, levelRequirement = 44, },
[10] = { 29, manaMultiplier = 20, levelRequirement = 47, },
[11] = { 30, manaMultiplier = 20, levelRequirement = 50, },
[12] = { 31, manaMultiplier = 20, levelRequirement = 53, },
[13] = { 32, manaMultiplier = 20, levelRequirement = 56, },
[14] = { 33, manaMultiplier = 20, levelRequirement = 58, },
[15] = { 34, manaMultiplier = 20, levelRequirement = 60, },
[16] = { 35, manaMultiplier = 20, levelRequirement = 62, },
[17] = { 36, manaMultiplier = 20, levelRequirement = 64, },
[18] = { 37, manaMultiplier = 20, levelRequirement = 66, },
[19] = { 38, manaMultiplier = 20, levelRequirement = 68, },
[20] = { 39, manaMultiplier = 20, levelRequirement = 70, },
[21] = { 40, manaMultiplier = 20, levelRequirement = 72, },
[22] = { 41, manaMultiplier = 20, levelRequirement = 74, },
[23] = { 42, manaMultiplier = 20, levelRequirement = 76, },
[24] = { 43, manaMultiplier = 20, levelRequirement = 78, },
[25] = { 44, manaMultiplier = 20, levelRequirement = 80, },
[26] = { 45, manaMultiplier = 20, levelRequirement = 82, },
[27] = { 46, manaMultiplier = 20, levelRequirement = 84, },
[28] = { 47, manaMultiplier = 20, levelRequirement = 86, },
[29] = { 48, manaMultiplier = 20, levelRequirement = 88, },
[30] = { 49, manaMultiplier = 20, levelRequirement = 90, },
},
}
skills["SupportIncreasedAreaOfEffect"] = {
name = "Increased Area of Effect",
color = 3,
support = true,
requireSkillTypes = { 11, 21, 53, },
addSkillTypes = { },
excludeSkillTypes = { },
baseMods = {
},
qualityStats = {
{ "area_damage_+%", 0.5 },
},
stats = {
"base_skill_area_of_effect_+%",
},
statInterpolation = { },
levels = {
[1] = { 30, manaMultiplier = 40, levelRequirement = 38, },
[2] = { 31, manaMultiplier = 40, levelRequirement = 40, },
[3] = { 32, manaMultiplier = 40, levelRequirement = 42, },
[4] = { 33, manaMultiplier = 40, levelRequirement = 44, },
[5] = { 34, manaMultiplier = 40, levelRequirement = 46, },
[6] = { 35, manaMultiplier = 40, levelRequirement = 48, },
[7] = { 36, manaMultiplier = 40, levelRequirement = 50, },
[8] = { 37, manaMultiplier = 40, levelRequirement = 52, },
[9] = { 38, manaMultiplier = 40, levelRequirement = 54, },
[10] = { 39, manaMultiplier = 40, levelRequirement = 56, },
[11] = { 40, manaMultiplier = 40, levelRequirement = 58, },
[12] = { 41, manaMultiplier = 40, levelRequirement = 60, },
[13] = { 42, manaMultiplier = 40, levelRequirement = 62, },
[14] = { 43, manaMultiplier = 40, levelRequirement = 64, },
[15] = { 44, manaMultiplier = 40, levelRequirement = 65, },
[16] = { 45, manaMultiplier = 40, levelRequirement = 66, },
[17] = { 46, manaMultiplier = 40, levelRequirement = 67, },
[18] = { 47, manaMultiplier = 40, levelRequirement = 68, },
[19] = { 48, manaMultiplier = 40, levelRequirement = 69, },
[20] = { 49, manaMultiplier = 40, levelRequirement = 70, },
[21] = { 50, manaMultiplier = 40, levelRequirement = 72, },
[22] = { 51, manaMultiplier = 40, levelRequirement = 74, },
[23] = { 52, manaMultiplier = 40, levelRequirement = 76, },
[24] = { 53, manaMultiplier = 40, levelRequirement = 78, },
[25] = { 54, manaMultiplier = 40, levelRequirement = 80, },
[26] = { 55, manaMultiplier = 40, levelRequirement = 82, },
[27] = { 56, manaMultiplier = 40, levelRequirement = 84, },
[28] = { 57, manaMultiplier = 40, levelRequirement = 86, },
[29] = { 58, manaMultiplier = 40, levelRequirement = 88, },
[30] = { 59, manaMultiplier = 40, levelRequirement = 90, },
},
}
skills["SupportIncreasedCriticalDamage"] = {
name = "Increased Critical Damage",
color = 3,
support = true,
requireSkillTypes = { 10, 1, },
addSkillTypes = { },
excludeSkillTypes = { },
baseMods = {
},
qualityStats = {
{ "base_critical_strike_multiplier_+", 0.75 },
},
stats = {
"base_critical_strike_multiplier_+",
},
statInterpolation = { },
levels = {
[1] = { 75, manaMultiplier = 30, levelRequirement = 18, },
[2] = { 76, manaMultiplier = 30, levelRequirement = 22, },
[3] = { 78, manaMultiplier = 30, levelRequirement = 26, },
[4] = { 79, manaMultiplier = 30, levelRequirement = 29, },
[5] = { 81, manaMultiplier = 30, levelRequirement = 32, },
[6] = { 82, manaMultiplier = 30, levelRequirement = 35, },
[7] = { 84, manaMultiplier = 30, levelRequirement = 38, },
[8] = { 85, manaMultiplier = 30, levelRequirement = 41, },
[9] = { 87, manaMultiplier = 30, levelRequirement = 44, },
[10] = { 88, manaMultiplier = 30, levelRequirement = 47, },
[11] = { 90, manaMultiplier = 30, levelRequirement = 50, },
[12] = { 91, manaMultiplier = 30, levelRequirement = 53, },
[13] = { 93, manaMultiplier = 30, levelRequirement = 56, },
[14] = { 94, manaMultiplier = 30, levelRequirement = 58, },
[15] = { 96, manaMultiplier = 30, levelRequirement = 60, },
[16] = { 97, manaMultiplier = 30, levelRequirement = 62, },
[17] = { 99, manaMultiplier = 30, levelRequirement = 64, },
[18] = { 100, manaMultiplier = 30, levelRequirement = 66, },
[19] = { 102, manaMultiplier = 30, levelRequirement = 68, },
[20] = { 103, manaMultiplier = 30, levelRequirement = 70, },
[21] = { 105, manaMultiplier = 30, levelRequirement = 72, },
[22] = { 106, manaMultiplier = 30, levelRequirement = 74, },
[23] = { 108, manaMultiplier = 30, levelRequirement = 76, },
[24] = { 109, manaMultiplier = 30, levelRequirement = 78, },
[25] = { 111, manaMultiplier = 30, levelRequirement = 80, },
[26] = { 112, manaMultiplier = 30, levelRequirement = 82, },
[27] = { 114, manaMultiplier = 30, levelRequirement = 84, },
[28] = { 115, manaMultiplier = 30, levelRequirement = 86, },
[29] = { 117, manaMultiplier = 30, levelRequirement = 88, },
[30] = { 118, manaMultiplier = 30, levelRequirement = 90, },
},
}
skills["SupportIncreasedCriticalStrikes"] = {
name = "Increased Critical Strikes",
color = 3,
support = true,
requireSkillTypes = { 10, 1, },
addSkillTypes = { },
excludeSkillTypes = { },
baseMods = {
},
qualityStats = {
{ "critical_strike_chance_+%", 1 },
},
stats = {
"critical_strike_chance_+%",
"additional_base_critical_strike_chance",
},
statInterpolation = { },
levels = {
[1] = { 50, 100, manaMultiplier = 15, levelRequirement = 8, },
[2] = { 52, 100, manaMultiplier = 15, levelRequirement = 10, },
[3] = { 54, 110, manaMultiplier = 15, levelRequirement = 13, },
[4] = { 56, 110, manaMultiplier = 15, levelRequirement = 17, },
[5] = { 58, 120, manaMultiplier = 15, levelRequirement = 21, },
[6] = { 60, 120, manaMultiplier = 15, levelRequirement = 25, },
[7] = { 62, 130, manaMultiplier = 15, levelRequirement = 29, },
[8] = { 64, 130, manaMultiplier = 15, levelRequirement = 33, },
[9] = { 66, 140, manaMultiplier = 15, levelRequirement = 37, },
[10] = { 68, 140, manaMultiplier = 15, levelRequirement = 40, },
[11] = { 70, 150, manaMultiplier = 15, levelRequirement = 43, },
[12] = { 72, 150, manaMultiplier = 15, levelRequirement = 46, },
[13] = { 74, 160, manaMultiplier = 15, levelRequirement = 49, },
[14] = { 76, 160, manaMultiplier = 15, levelRequirement = 52, },
[15] = { 78, 170, manaMultiplier = 15, levelRequirement = 55, },
[16] = { 80, 170, manaMultiplier = 15, levelRequirement = 58, },
[17] = { 82, 180, manaMultiplier = 15, levelRequirement = 61, },
[18] = { 84, 180, manaMultiplier = 15, levelRequirement = 64, },
[19] = { 86, 190, manaMultiplier = 15, levelRequirement = 67, },
[20] = { 88, 190, manaMultiplier = 15, levelRequirement = 70, },
[21] = { 90, 200, manaMultiplier = 15, levelRequirement = 72, },
[22] = { 92, 200, manaMultiplier = 15, levelRequirement = 74, },
[23] = { 94, 210, manaMultiplier = 15, levelRequirement = 76, },
[24] = { 96, 210, manaMultiplier = 15, levelRequirement = 78, },
[25] = { 98, 220, manaMultiplier = 15, levelRequirement = 80, },
[26] = { 100, 220, manaMultiplier = 15, levelRequirement = 82, },
[27] = { 102, 230, manaMultiplier = 15, levelRequirement = 84, },
[28] = { 104, 230, manaMultiplier = 15, levelRequirement = 86, },
[29] = { 106, 240, manaMultiplier = 15, levelRequirement = 88, },
[30] = { 108, 240, manaMultiplier = 15, levelRequirement = 90, },
},
}
skills["SupportOnslaughtOnSlayingShockedEnemy"] = {
name = "Innervate",
color = 3,
support = true,
requireSkillTypes = { 10, 1, },
addSkillTypes = { },
excludeSkillTypes = { },
baseMods = {
},
qualityStats = {
{ "shock_duration_+%", 1.5 },
},
stats = {
"onslaught_time_granted_on_killing_shocked_enemy_ms",
"base_chance_to_shock_%",
},
statInterpolation = { },
levels = {
[1] = { 5000, 15, manaMultiplier = 10, levelRequirement = 31, },
[2] = { 5100, 15, manaMultiplier = 10, levelRequirement = 34, },
[3] = { 5200, 15, manaMultiplier = 10, levelRequirement = 36, },
[4] = { 5300, 15, manaMultiplier = 10, levelRequirement = 38, },
[5] = { 5400, 15, manaMultiplier = 10, levelRequirement = 40, },
[6] = { 5500, 15, manaMultiplier = 10, levelRequirement = 42, },
[7] = { 5600, 15, manaMultiplier = 10, levelRequirement = 44, },
[8] = { 5700, 15, manaMultiplier = 10, levelRequirement = 46, },
[9] = { 5800, 15, manaMultiplier = 10, levelRequirement = 48, },
[10] = { 5900, 15, manaMultiplier = 10, levelRequirement = 50, },
[11] = { 6000, 15, manaMultiplier = 10, levelRequirement = 52, },
[12] = { 6100, 15, manaMultiplier = 10, levelRequirement = 54, },
[13] = { 6200, 15, manaMultiplier = 10, levelRequirement = 56, },
[14] = { 6300, 15, manaMultiplier = 10, levelRequirement = 58, },
[15] = { 6400, 15, manaMultiplier = 10, levelRequirement = 60, },
[16] = { 6500, 15, manaMultiplier = 10, levelRequirement = 62, },
[17] = { 6600, 15, manaMultiplier = 10, levelRequirement = 64, },
[18] = { 6700, 15, manaMultiplier = 10, levelRequirement = 66, },
[19] = { 6800, 15, manaMultiplier = 10, levelRequirement = 68, },
[20] = { 6900, 15, manaMultiplier = 10, levelRequirement = 70, },
[21] = { 7000, 15, manaMultiplier = 10, levelRequirement = 72, },
[22] = { 7100, 15, manaMultiplier = 10, levelRequirement = 74, },
[23] = { 7200, 15, manaMultiplier = 10, levelRequirement = 76, },
[24] = { 7300, 15, manaMultiplier = 10, levelRequirement = 78, },
[25] = { 7400, 15, manaMultiplier = 10, levelRequirement = 80, },
[26] = { 7500, 15, manaMultiplier = 10, levelRequirement = 82, },
[27] = { 7600, 15, manaMultiplier = 10, levelRequirement = 84, },
[28] = { 7700, 15, manaMultiplier = 10, levelRequirement = 86, },
[29] = { 7800, 15, manaMultiplier = 10, levelRequirement = 88, },
[30] = { 7900, 15, manaMultiplier = 10, levelRequirement = 90, },
},
}
skills["SupportItemRarity"] = {
name = "Item Rarity",
color = 3,
support = true,
requireSkillTypes = { 10, 1, 40, },
addSkillTypes = { },
excludeSkillTypes = { },
baseMods = {
},
qualityStats = {
{ "base_killed_monster_dropped_item_rarity_+%", 0.5 },
},
stats = {
"base_killed_monster_dropped_item_rarity_+%",
},
statInterpolation = { },
levels = {
[1] = { 40, levelRequirement = 31, },
[2] = { 41, levelRequirement = 34, },
[3] = { 42, levelRequirement = 36, },
[4] = { 43, levelRequirement = 38, },
[5] = { 44, levelRequirement = 40, },
[6] = { 45, levelRequirement = 42, },
[7] = { 46, levelRequirement = 44, },
[8] = { 47, levelRequirement = 46, },
[9] = { 48, levelRequirement = 48, },
[10] = { 49, levelRequirement = 50, },
[11] = { 50, levelRequirement = 52, },
[12] = { 51, levelRequirement = 54, },
[13] = { 52, levelRequirement = 56, },
[14] = { 53, levelRequirement = 58, },
[15] = { 54, levelRequirement = 60, },
[16] = { 55, levelRequirement = 62, },
[17] = { 56, levelRequirement = 64, },
[18] = { 57, levelRequirement = 66, },
[19] = { 58, levelRequirement = 68, },
[20] = { 59, levelRequirement = 70, },
[21] = { 60, levelRequirement = 72, },
[22] = { 61, levelRequirement = 74, },
[23] = { 62, levelRequirement = 76, },
[24] = { 63, levelRequirement = 78, },
[25] = { 64, levelRequirement = 80, },
[26] = { 65, levelRequirement = 82, },
[27] = { 66, levelRequirement = 84, },
[28] = { 67, levelRequirement = 86, },
[29] = { 68, levelRequirement = 88, },
[30] = { 69, levelRequirement = 90, },
},
}
skills["SupportLightningPenetration"] = {
name = "Lightning Penetration",
color = 3,
support = true,
requireSkillTypes = { 10, 1, },
addSkillTypes = { },
excludeSkillTypes = { },
baseMods = {
},
qualityStats = {
{ "lightning_damage_+%", 0.5 },
},
stats = {
"base_reduce_enemy_lightning_resistance_%",
},
statInterpolation = { },
levels = {
[1] = { 18, manaMultiplier = 40, levelRequirement = 31, },
[2] = { 19, manaMultiplier = 40, levelRequirement = 34, },
[3] = { 20, manaMultiplier = 40, levelRequirement = 36, },
[4] = { 21, manaMultiplier = 40, levelRequirement = 38, },
[5] = { 22, manaMultiplier = 40, levelRequirement = 40, },
[6] = { 23, manaMultiplier = 40, levelRequirement = 42, },
[7] = { 24, manaMultiplier = 40, levelRequirement = 44, },
[8] = { 25, manaMultiplier = 40, levelRequirement = 46, },
[9] = { 26, manaMultiplier = 40, levelRequirement = 48, },
[10] = { 27, manaMultiplier = 40, levelRequirement = 50, },
[11] = { 28, manaMultiplier = 40, levelRequirement = 52, },
[12] = { 29, manaMultiplier = 40, levelRequirement = 54, },
[13] = { 30, manaMultiplier = 40, levelRequirement = 56, },
[14] = { 31, manaMultiplier = 40, levelRequirement = 58, },
[15] = { 32, manaMultiplier = 40, levelRequirement = 60, },
[16] = { 33, manaMultiplier = 40, levelRequirement = 62, },
[17] = { 34, manaMultiplier = 40, levelRequirement = 64, },
[18] = { 35, manaMultiplier = 40, levelRequirement = 66, },
[19] = { 36, manaMultiplier = 40, levelRequirement = 68, },
[20] = { 37, manaMultiplier = 40, levelRequirement = 70, },
[21] = { 38, manaMultiplier = 40, levelRequirement = 72, },
[22] = { 39, manaMultiplier = 40, levelRequirement = 74, },
[23] = { 40, manaMultiplier = 40, levelRequirement = 76, },
[24] = { 41, manaMultiplier = 40, levelRequirement = 78, },
[25] = { 42, manaMultiplier = 40, levelRequirement = 80, },
[26] = { 43, manaMultiplier = 40, levelRequirement = 82, },
[27] = { 44, manaMultiplier = 40, levelRequirement = 84, },
[28] = { 45, manaMultiplier = 40, levelRequirement = 86, },
[29] = { 46, manaMultiplier = 40, levelRequirement = 88, },
[30] = { 47, manaMultiplier = 40, levelRequirement = 90, },
},
}
skills["SupportMinefield"] = {
name = "Minefield",
color = 3,
support = true,
requireSkillTypes = { 41, },
addSkillTypes = { },
excludeSkillTypes = { },
statMap = {
["support_minefield_mine_damage_+%_final"] = {
mod("Damage", "MORE", nil),
},
},
baseMods = {
},
qualityStats = {
{ "mine_detonation_radius_+%", 1 },
},
stats = {
"number_of_additional_mines_to_place",
"support_minefield_mine_damage_+%_final",
"number_of_additional_remote_mines_allowed",
},
statInterpolation = { },
levels = {
[1] = { 2, -40, 2, manaMultiplier = 60, levelRequirement = 8, },
[2] = { 2, -39, 2, manaMultiplier = 60, levelRequirement = 10, },
[3] = { 2, -38, 2, manaMultiplier = 60, levelRequirement = 13, },
[4] = { 2, -37, 2, manaMultiplier = 60, levelRequirement = 17, },
[5] = { 2, -36, 2, manaMultiplier = 60, levelRequirement = 21, },
[6] = { 2, -35, 2, manaMultiplier = 60, levelRequirement = 25, },
[7] = { 2, -34, 2, manaMultiplier = 60, levelRequirement = 29, },
[8] = { 2, -33, 2, manaMultiplier = 60, levelRequirement = 33, },
[9] = { 2, -32, 2, manaMultiplier = 60, levelRequirement = 37, },
[10] = { 2, -31, 2, manaMultiplier = 60, levelRequirement = 40, },
[11] = { 2, -30, 2, manaMultiplier = 60, levelRequirement = 43, },
[12] = { 2, -29, 2, manaMultiplier = 60, levelRequirement = 46, },
[13] = { 2, -28, 2, manaMultiplier = 60, levelRequirement = 49, },
[14] = { 2, -27, 2, manaMultiplier = 60, levelRequirement = 52, },
[15] = { 2, -26, 2, manaMultiplier = 60, levelRequirement = 55, },
[16] = { 2, -25, 2, manaMultiplier = 60, levelRequirement = 58, },
[17] = { 2, -24, 2, manaMultiplier = 60, levelRequirement = 61, },
[18] = { 2, -23, 2, manaMultiplier = 60, levelRequirement = 64, },
[19] = { 2, -22, 2, manaMultiplier = 60, levelRequirement = 67, },
[20] = { 2, -21, 2, manaMultiplier = 60, levelRequirement = 70, },
[21] = { 2, -20, 2, manaMultiplier = 60, levelRequirement = 72, },
[22] = { 2, -19, 2, manaMultiplier = 60, levelRequirement = 74, },
[23] = { 2, -18, 2, manaMultiplier = 60, levelRequirement = 76, },
[24] = { 2, -17, 2, manaMultiplier = 60, levelRequirement = 78, },
[25] = { 2, -16, 2, manaMultiplier = 60, levelRequirement = 80, },
[26] = { 2, -15, 2, manaMultiplier = 60, levelRequirement = 82, },
[27] = { 2, -14, 2, manaMultiplier = 60, levelRequirement = 84, },
[28] = { 2, -13, 2, manaMultiplier = 60, levelRequirement = 86, },
[29] = { 2, -12, 2, manaMultiplier = 60, levelRequirement = 88, },
[30] = { 2, -11, 2, manaMultiplier = 60, levelRequirement = 90, },
},
}
skills["SupportMinionDamage"] = {
name = "Minion Damage",
color = 3,
support = true,
requireSkillTypes = { 9, },
addSkillTypes = { },
excludeSkillTypes = { },
statMap = {
["support_minion_damage_+%_final"] = {
mod("MinionModifier", "LIST", { mod = mod("Damage", "MORE", nil) }),
},
},
baseMods = {
},
qualityStats = {
{ "minion_damage_+%", 0.75 },
},
stats = {
"support_minion_damage_+%_final",
},
statInterpolation = { },
levels = {
[1] = { 30, manaMultiplier = 30, levelRequirement = 8, },
[2] = { 31, manaMultiplier = 30, levelRequirement = 10, },
[3] = { 32, manaMultiplier = 30, levelRequirement = 13, },
[4] = { 33, manaMultiplier = 30, levelRequirement = 17, },
[5] = { 34, manaMultiplier = 30, levelRequirement = 21, },
[6] = { 35, manaMultiplier = 30, levelRequirement = 25, },
[7] = { 36, manaMultiplier = 30, levelRequirement = 29, },
[8] = { 37, manaMultiplier = 30, levelRequirement = 33, },
[9] = { 38, manaMultiplier = 30, levelRequirement = 37, },
[10] = { 39, manaMultiplier = 30, levelRequirement = 40, },
[11] = { 40, manaMultiplier = 30, levelRequirement = 43, },
[12] = { 41, manaMultiplier = 30, levelRequirement = 46, },
[13] = { 42, manaMultiplier = 30, levelRequirement = 49, },
[14] = { 43, manaMultiplier = 30, levelRequirement = 52, },
[15] = { 44, manaMultiplier = 30, levelRequirement = 55, },
[16] = { 45, manaMultiplier = 30, levelRequirement = 58, },
[17] = { 46, manaMultiplier = 30, levelRequirement = 61, },
[18] = { 47, manaMultiplier = 30, levelRequirement = 64, },
[19] = { 48, manaMultiplier = 30, levelRequirement = 67, },
[20] = { 49, manaMultiplier = 30, levelRequirement = 70, },
[21] = { 50, manaMultiplier = 30, levelRequirement = 72, },
[22] = { 51, manaMultiplier = 30, levelRequirement = 74, },
[23] = { 52, manaMultiplier = 30, levelRequirement = 76, },
[24] = { 53, manaMultiplier = 30, levelRequirement = 78, },
[25] = { 54, manaMultiplier = 30, levelRequirement = 80, },
[26] = { 55, manaMultiplier = 30, levelRequirement = 82, },
[27] = { 56, manaMultiplier = 30, levelRequirement = 84, },
[28] = { 57, manaMultiplier = 30, levelRequirement = 86, },
[29] = { 58, manaMultiplier = 30, levelRequirement = 88, },
[30] = { 59, manaMultiplier = 30, levelRequirement = 90, },
},
}
skills["SupportMinionLife"] = {
name = "Minion Life",
color = 3,
support = true,
requireSkillTypes = { 9, },
addSkillTypes = { },
excludeSkillTypes = { },
statMap = {
["support_minion_maximum_life_+%_final"] = {
mod("MinionModifier", "LIST", { mod = mod("Life", "MORE", nil) }),
},
},
baseMods = {
},
qualityStats = {
{ "minion_maximum_life_+%", 0.75 },
},
stats = {
"minion_maximum_life_+%",
},
statInterpolation = { },
levels = {
[1] = { 30, manaMultiplier = 40, levelRequirement = 18, },
[2] = { 31, manaMultiplier = 40, levelRequirement = 22, },
[3] = { 32, manaMultiplier = 40, levelRequirement = 26, },
[4] = { 33, manaMultiplier = 40, levelRequirement = 29, },
[5] = { 34, manaMultiplier = 40, levelRequirement = 32, },
[6] = { 35, manaMultiplier = 40, levelRequirement = 35, },
[7] = { 36, manaMultiplier = 40, levelRequirement = 38, },
[8] = { 37, manaMultiplier = 40, levelRequirement = 41, },
[9] = { 38, manaMultiplier = 40, levelRequirement = 44, },
[10] = { 39, manaMultiplier = 40, levelRequirement = 47, },
[11] = { 40, manaMultiplier = 40, levelRequirement = 50, },
[12] = { 41, manaMultiplier = 40, levelRequirement = 53, },
[13] = { 42, manaMultiplier = 40, levelRequirement = 56, },
[14] = { 43, manaMultiplier = 40, levelRequirement = 58, },
[15] = { 44, manaMultiplier = 40, levelRequirement = 60, },
[16] = { 45, manaMultiplier = 40, levelRequirement = 62, },
[17] = { 46, manaMultiplier = 40, levelRequirement = 64, },
[18] = { 47, manaMultiplier = 40, levelRequirement = 66, },
[19] = { 48, manaMultiplier = 40, levelRequirement = 68, },
[20] = { 49, manaMultiplier = 40, levelRequirement = 70, },
[21] = { 50, manaMultiplier = 40, levelRequirement = 72, },
[22] = { 51, manaMultiplier = 40, levelRequirement = 74, },
[23] = { 52, manaMultiplier = 40, levelRequirement = 76, },
[24] = { 53, manaMultiplier = 40, levelRequirement = 78, },
[25] = { 54, manaMultiplier = 40, levelRequirement = 80, },
[26] = { 55, manaMultiplier = 40, levelRequirement = 82, },
[27] = { 56, manaMultiplier = 40, levelRequirement = 84, },
[28] = { 57, manaMultiplier = 40, levelRequirement = 86, },
[29] = { 58, manaMultiplier = 40, levelRequirement = 88, },
[30] = { 59, manaMultiplier = 40, levelRequirement = 90, },
},
}
skills["SupportMinionSpeed"] = {
name = "Minion Speed",
color = 3,
support = true,
requireSkillTypes = { 9, },
addSkillTypes = { },
excludeSkillTypes = { },
baseMods = {
},
qualityStats = {
{ "minion_movement_speed_+%", 0.5 },
},
stats = {
"minion_movement_speed_+%",
"minion_attack_speed_+%",
"minion_cast_speed_+%",
},
statInterpolation = { },
levels = {
[1] = { 25, 10, 10, manaMultiplier = 40, levelRequirement = 18, },
[2] = { 26, 10, 10, manaMultiplier = 40, levelRequirement = 22, },
[3] = { 27, 11, 11, manaMultiplier = 40, levelRequirement = 26, },
[4] = { 28, 11, 11, manaMultiplier = 40, levelRequirement = 29, },
[5] = { 29, 12, 12, manaMultiplier = 40, levelRequirement = 32, },
[6] = { 30, 12, 12, manaMultiplier = 40, levelRequirement = 35, },
[7] = { 31, 13, 13, manaMultiplier = 40, levelRequirement = 38, },
[8] = { 32, 13, 13, manaMultiplier = 40, levelRequirement = 41, },
[9] = { 33, 14, 14, manaMultiplier = 40, levelRequirement = 44, },
[10] = { 34, 14, 14, manaMultiplier = 40, levelRequirement = 47, },
[11] = { 35, 15, 15, manaMultiplier = 40, levelRequirement = 50, },
[12] = { 36, 15, 15, manaMultiplier = 40, levelRequirement = 53, },
[13] = { 37, 16, 16, manaMultiplier = 40, levelRequirement = 56, },
[14] = { 38, 16, 16, manaMultiplier = 40, levelRequirement = 58, },
[15] = { 39, 17, 17, manaMultiplier = 40, levelRequirement = 60, },
[16] = { 40, 17, 17, manaMultiplier = 40, levelRequirement = 62, },
[17] = { 41, 18, 18, manaMultiplier = 40, levelRequirement = 64, },
[18] = { 42, 18, 18, manaMultiplier = 40, levelRequirement = 66, },
[19] = { 43, 19, 19, manaMultiplier = 40, levelRequirement = 68, },
[20] = { 44, 19, 19, manaMultiplier = 40, levelRequirement = 70, },
[21] = { 45, 20, 20, manaMultiplier = 40, levelRequirement = 72, },
[22] = { 46, 20, 20, manaMultiplier = 40, levelRequirement = 74, },
[23] = { 47, 21, 21, manaMultiplier = 40, levelRequirement = 76, },
[24] = { 48, 21, 21, manaMultiplier = 40, levelRequirement = 78, },
[25] = { 49, 22, 22, manaMultiplier = 40, levelRequirement = 80, },
[26] = { 50, 22, 22, manaMultiplier = 40, levelRequirement = 82, },
[27] = { 51, 23, 23, manaMultiplier = 40, levelRequirement = 84, },
[28] = { 52, 23, 23, manaMultiplier = 40, levelRequirement = 86, },
[29] = { 53, 24, 24, manaMultiplier = 40, levelRequirement = 88, },
[30] = { 54, 24, 24, manaMultiplier = 40, levelRequirement = 90, },
},
}
skills["SupportSummonElementalResistances"] = {
name = "Minion and Totem Elemental Resistance",
color = 3,
support = true,
requireSkillTypes = { 9, 30, },
addSkillTypes = { },
excludeSkillTypes = { },
statMap = {
["support_minion_totem_resistance_elemental_damage_+%_final"] = {
mod("ElementalDamage", "MORE", nil, 0, KeywordFlag.Totem),
mod("MinionModifier", "LIST", { mod = mod("ElementalDamage", "MORE", nil) }),
},
},
baseMods = {
},
qualityStats = {
{ "summon_fire_resistance_+", 0.5 },
{ "summon_cold_resistance_+", 0.5 },
{ "summon_lightning_resistance_+", 0.5 },
},
stats = {
"summon_fire_resistance_+",
"summon_cold_resistance_+",
"summon_lightning_resistance_+",
"support_minion_totem_resistance_elemental_damage_+%_final",
},
statInterpolation = { },
levels = {
[1] = { 25, 25, 25, 10, manaMultiplier = 40, levelRequirement = 31, },
[2] = { 26, 26, 26, 10, manaMultiplier = 40, levelRequirement = 34, },
[3] = { 27, 27, 27, 11, manaMultiplier = 40, levelRequirement = 36, },
[4] = { 28, 28, 28, 11, manaMultiplier = 40, levelRequirement = 38, },
[5] = { 29, 29, 29, 12, manaMultiplier = 40, levelRequirement = 40, },
[6] = { 30, 30, 30, 12, manaMultiplier = 40, levelRequirement = 42, },
[7] = { 31, 31, 31, 13, manaMultiplier = 40, levelRequirement = 44, },
[8] = { 32, 32, 32, 13, manaMultiplier = 40, levelRequirement = 46, },
[9] = { 33, 33, 33, 14, manaMultiplier = 40, levelRequirement = 48, },
[10] = { 34, 34, 34, 14, manaMultiplier = 40, levelRequirement = 50, },
[11] = { 35, 35, 35, 15, manaMultiplier = 40, levelRequirement = 52, },
[12] = { 36, 36, 36, 15, manaMultiplier = 40, levelRequirement = 54, },
[13] = { 37, 37, 37, 16, manaMultiplier = 40, levelRequirement = 56, },
[14] = { 38, 38, 38, 16, manaMultiplier = 40, levelRequirement = 58, },
[15] = { 39, 39, 39, 17, manaMultiplier = 40, levelRequirement = 60, },
[16] = { 40, 40, 40, 17, manaMultiplier = 40, levelRequirement = 62, },
[17] = { 41, 41, 41, 18, manaMultiplier = 40, levelRequirement = 64, },
[18] = { 42, 42, 42, 18, manaMultiplier = 40, levelRequirement = 66, },
[19] = { 43, 43, 43, 19, manaMultiplier = 40, levelRequirement = 68, },
[20] = { 44, 44, 44, 19, manaMultiplier = 40, levelRequirement = 70, },
[21] = { 45, 45, 45, 20, manaMultiplier = 40, levelRequirement = 72, },
[22] = { 46, 46, 46, 20, manaMultiplier = 40, levelRequirement = 74, },
[23] = { 47, 47, 47, 21, manaMultiplier = 40, levelRequirement = 76, },
[24] = { 48, 48, 48, 21, manaMultiplier = 40, levelRequirement = 78, },
[25] = { 49, 49, 49, 22, manaMultiplier = 40, levelRequirement = 80, },
[26] = { 50, 50, 50, 22, manaMultiplier = 40, levelRequirement = 82, },
[27] = { 51, 51, 51, 23, manaMultiplier = 40, levelRequirement = 84, },
[28] = { 52, 52, 52, 23, manaMultiplier = 40, levelRequirement = 86, },
[29] = { 53, 53, 53, 24, manaMultiplier = 40, levelRequirement = 88, },
[30] = { 54, 54, 54, 24, manaMultiplier = 40, levelRequirement = 90, },
},
}
skills["SupportPhysicalToLightning"] = {
name = "Physical to Lightning",
color = 3,
support = true,
requireSkillTypes = { 10, 1, },
addSkillTypes = { },
excludeSkillTypes = { },
baseMods = {
},
qualityStats = {
{ "physical_damage_+%", 0.5 },
{ "lightning_damage_+%", 0.5 },
},
stats = {
"skill_physical_damage_%_to_convert_to_lightning",
"physical_damage_%_to_add_as_lightning",
},
statInterpolation = { },
levels = {
[1] = { 50, 10, manaMultiplier = 10, levelRequirement = 18, },
[2] = { 50, 11, manaMultiplier = 10, levelRequirement = 22, },
[3] = { 50, 12, manaMultiplier = 10, levelRequirement = 26, },
[4] = { 50, 13, manaMultiplier = 10, levelRequirement = 29, },
[5] = { 50, 14, manaMultiplier = 10, levelRequirement = 32, },
[6] = { 50, 15, manaMultiplier = 10, levelRequirement = 35, },
[7] = { 50, 16, manaMultiplier = 10, levelRequirement = 38, },
[8] = { 50, 17, manaMultiplier = 10, levelRequirement = 41, },
[9] = { 50, 18, manaMultiplier = 10, levelRequirement = 44, },
[10] = { 50, 19, manaMultiplier = 10, levelRequirement = 47, },
[11] = { 50, 20, manaMultiplier = 10, levelRequirement = 50, },
[12] = { 50, 21, manaMultiplier = 10, levelRequirement = 53, },
[13] = { 50, 22, manaMultiplier = 10, levelRequirement = 56, },
[14] = { 50, 23, manaMultiplier = 10, levelRequirement = 58, },
[15] = { 50, 24, manaMultiplier = 10, levelRequirement = 60, },
[16] = { 50, 25, manaMultiplier = 10, levelRequirement = 62, },
[17] = { 50, 26, manaMultiplier = 10, levelRequirement = 64, },
[18] = { 50, 27, manaMultiplier = 10, levelRequirement = 66, },
[19] = { 50, 28, manaMultiplier = 10, levelRequirement = 68, },
[20] = { 50, 29, manaMultiplier = 10, levelRequirement = 70, },
[21] = { 50, 30, manaMultiplier = 10, levelRequirement = 72, },
[22] = { 50, 31, manaMultiplier = 10, levelRequirement = 74, },
[23] = { 50, 32, manaMultiplier = 10, levelRequirement = 76, },
[24] = { 50, 33, manaMultiplier = 10, levelRequirement = 78, },
[25] = { 50, 34, manaMultiplier = 10, levelRequirement = 80, },
[26] = { 50, 35, manaMultiplier = 10, levelRequirement = 82, },
[27] = { 50, 36, manaMultiplier = 10, levelRequirement = 84, },
[28] = { 50, 37, manaMultiplier = 10, levelRequirement = 86, },
[29] = { 50, 38, manaMultiplier = 10, levelRequirement = 88, },
[30] = { 50, 39, manaMultiplier = 10, levelRequirement = 90, },
},
}
skills["SupportPowerChargeOnCrit"] = {
name = "Power Charge On Critical",
color = 3,
support = true,
requireSkillTypes = { 10, 1, },
addSkillTypes = { },
excludeSkillTypes = { },
baseMods = {
},
qualityStats = {
{ "critical_strike_chance_+%", 1 },
},
stats = {
"add_power_charge_on_critical_strike_%",
},
statInterpolation = { },
levels = {
[1] = { 35, manaMultiplier = 10, levelRequirement = 18, },
[2] = { 36, manaMultiplier = 10, levelRequirement = 22, },
[3] = { 37, manaMultiplier = 10, levelRequirement = 26, },
[4] = { 38, manaMultiplier = 10, levelRequirement = 29, },
[5] = { 39, manaMultiplier = 10, levelRequirement = 32, },
[6] = { 40, manaMultiplier = 10, levelRequirement = 35, },
[7] = { 41, manaMultiplier = 10, levelRequirement = 38, },
[8] = { 42, manaMultiplier = 10, levelRequirement = 41, },
[9] = { 43, manaMultiplier = 10, levelRequirement = 44, },
[10] = { 44, manaMultiplier = 10, levelRequirement = 47, },
[11] = { 45, manaMultiplier = 10, levelRequirement = 50, },
[12] = { 46, manaMultiplier = 10, levelRequirement = 53, },
[13] = { 47, manaMultiplier = 10, levelRequirement = 56, },
[14] = { 48, manaMultiplier = 10, levelRequirement = 58, },
[15] = { 49, manaMultiplier = 10, levelRequirement = 60, },
[16] = { 50, manaMultiplier = 10, levelRequirement = 62, },
[17] = { 51, manaMultiplier = 10, levelRequirement = 64, },
[18] = { 52, manaMultiplier = 10, levelRequirement = 66, },
[19] = { 53, manaMultiplier = 10, levelRequirement = 68, },
[20] = { 54, manaMultiplier = 10, levelRequirement = 70, },
[21] = { 55, manaMultiplier = 10, levelRequirement = 72, },
[22] = { 56, manaMultiplier = 10, levelRequirement = 74, },
[23] = { 57, manaMultiplier = 10, levelRequirement = 76, },
[24] = { 58, manaMultiplier = 10, levelRequirement = 78, },
[25] = { 59, manaMultiplier = 10, levelRequirement = 80, },
[26] = { 60, manaMultiplier = 10, levelRequirement = 82, },
[27] = { 61, manaMultiplier = 10, levelRequirement = 84, },
[28] = { 62, manaMultiplier = 10, levelRequirement = 86, },
[29] = { 63, manaMultiplier = 10, levelRequirement = 88, },
[30] = { 64, manaMultiplier = 10, levelRequirement = 90, },
},
}
skills["SupportRemoteMine"] = {
name = "Remote Mine",
color = 3,
support = true,
requireSkillTypes = { 19, },
addSkillTypes = { 12, 41, },
excludeSkillTypes = { 61, },
addFlags = {
mine = true,
duration = true,
},
statMap = {
["base_skill_show_average_damage_instead_of_dps"] = {
skill("showAverage", true, { type = "SkillType", skillType = SkillType.SkillCanMine }),
},
["support_remote_mine_hit_damage_+%_final"] = {
mod("Damage", "MORE", nil, ModFlag.Hit, KeywordFlag.Mine),
},
},
baseMods = {
},
qualityStats = {
{ "mine_laying_speed_+%", 0.5 },
},
stats = {
"is_remote_mine",
"base_mine_duration",
"support_remote_mine_hit_damage_+%_final",
"mine_override_pvp_scaling_time_ms",
"base_skill_is_mined",
"disable_skill_if_melee_attack",
"base_skill_show_average_damage_instead_of_dps",
},
statInterpolation = { },
levels = {
[1] = { 1, 16000, 30, 900, manaMultiplier = 50, levelRequirement = 8, },
[2] = { 1, 16000, 31, 900, manaMultiplier = 50, levelRequirement = 10, },
[3] = { 1, 16000, 32, 900, manaMultiplier = 50, levelRequirement = 13, },
[4] = { 1, 16000, 33, 900, manaMultiplier = 50, levelRequirement = 17, },
[5] = { 1, 16000, 34, 900, manaMultiplier = 50, levelRequirement = 21, },
[6] = { 1, 16000, 35, 900, manaMultiplier = 50, levelRequirement = 25, },
[7] = { 1, 16000, 36, 900, manaMultiplier = 50, levelRequirement = 29, },
[8] = { 1, 16000, 37, 900, manaMultiplier = 50, levelRequirement = 33, },
[9] = { 1, 16000, 38, 900, manaMultiplier = 50, levelRequirement = 37, },
[10] = { 1, 16000, 39, 900, manaMultiplier = 50, levelRequirement = 40, },
[11] = { 1, 16000, 40, 900, manaMultiplier = 50, levelRequirement = 43, },
[12] = { 1, 16000, 41, 900, manaMultiplier = 50, levelRequirement = 46, },
[13] = { 1, 16000, 42, 900, manaMultiplier = 50, levelRequirement = 49, },
[14] = { 1, 16000, 43, 900, manaMultiplier = 50, levelRequirement = 52, },
[15] = { 1, 16000, 44, 900, manaMultiplier = 50, levelRequirement = 55, },
[16] = { 1, 16000, 45, 900, manaMultiplier = 50, levelRequirement = 58, },
[17] = { 1, 16000, 46, 900, manaMultiplier = 50, levelRequirement = 61, },
[18] = { 1, 16000, 47, 900, manaMultiplier = 50, levelRequirement = 64, },
[19] = { 1, 16000, 48, 900, manaMultiplier = 50, levelRequirement = 67, },
[20] = { 1, 16000, 49, 900, manaMultiplier = 50, levelRequirement = 70, },
[21] = { 1, 16000, 50, 900, manaMultiplier = 50, levelRequirement = 72, },
[22] = { 1, 16000, 51, 900, manaMultiplier = 50, levelRequirement = 74, },
[23] = { 1, 16000, 52, 900, manaMultiplier = 50, levelRequirement = 76, },
[24] = { 1, 16000, 53, 900, manaMultiplier = 50, levelRequirement = 78, },
[25] = { 1, 16000, 54, 900, manaMultiplier = 50, levelRequirement = 80, },
[26] = { 1, 16000, 55, 900, manaMultiplier = 50, levelRequirement = 82, },
[27] = { 1, 16000, 56, 900, manaMultiplier = 50, levelRequirement = 84, },
[28] = { 1, 16000, 57, 900, manaMultiplier = 50, levelRequirement = 86, },
[29] = { 1, 16000, 58, 900, manaMultiplier = 50, levelRequirement = 88, },
[30] = { 1, 16000, 59, 900, manaMultiplier = 50, levelRequirement = 90, },
},
}
skills["SupportMulticast"] = {
name = "Spell Echo",
color = 3,
support = true,
requireSkillTypes = { 26, },
addSkillTypes = { },
excludeSkillTypes = { 30, 37, 41, 42, 15, },
statMap = {
["support_echo_damage_+%_final"] = {
mod("Damage", "MORE", nil),
},
["support_multicast_cast_speed_+%_final"] = {
mod("Speed", "MORE", nil, ModFlag.Cast),
},
},
baseMods = {
},
qualityStats = {
{ "spell_damage_+%", 0.5 },
},
stats = {
"base_spell_repeat_count",
"support_multicast_cast_speed_+%_final",
"support_echo_damage_+%_final",
},
statInterpolation = { },
levels = {
[1] = { 1, 51, -10, manaMultiplier = 40, levelRequirement = 38, },
[2] = { 1, 52, -10, manaMultiplier = 40, levelRequirement = 40, },
[3] = { 1, 53, -10, manaMultiplier = 40, levelRequirement = 42, },
[4] = { 1, 54, -10, manaMultiplier = 40, levelRequirement = 44, },
[5] = { 1, 55, -10, manaMultiplier = 40, levelRequirement = 46, },
[6] = { 1, 56, -10, manaMultiplier = 40, levelRequirement = 48, },
[7] = { 1, 57, -10, manaMultiplier = 40, levelRequirement = 50, },
[8] = { 1, 58, -10, manaMultiplier = 40, levelRequirement = 52, },
[9] = { 1, 59, -10, manaMultiplier = 40, levelRequirement = 54, },
[10] = { 1, 60, -10, manaMultiplier = 40, levelRequirement = 56, },
[11] = { 1, 61, -10, manaMultiplier = 40, levelRequirement = 58, },
[12] = { 1, 62, -10, manaMultiplier = 40, levelRequirement = 60, },
[13] = { 1, 63, -10, manaMultiplier = 40, levelRequirement = 62, },
[14] = { 1, 64, -10, manaMultiplier = 40, levelRequirement = 64, },
[15] = { 1, 65, -10, manaMultiplier = 40, levelRequirement = 65, },
[16] = { 1, 66, -10, manaMultiplier = 40, levelRequirement = 66, },
[17] = { 1, 67, -10, manaMultiplier = 40, levelRequirement = 67, },
[18] = { 1, 68, -10, manaMultiplier = 40, levelRequirement = 68, },
[19] = { 1, 69, -10, manaMultiplier = 40, levelRequirement = 69, },
[20] = { 1, 70, -10, manaMultiplier = 40, levelRequirement = 70, },
[21] = { 1, 71, -10, manaMultiplier = 40, levelRequirement = 72, },
[22] = { 1, 72, -10, manaMultiplier = 40, levelRequirement = 74, },
[23] = { 1, 73, -10, manaMultiplier = 40, levelRequirement = 76, },
[24] = { 1, 74, -10, manaMultiplier = 40, levelRequirement = 78, },
[25] = { 1, 75, -10, manaMultiplier = 40, levelRequirement = 80, },
[26] = { 1, 76, -10, manaMultiplier = 40, levelRequirement = 82, },
[27] = { 1, 77, -10, manaMultiplier = 40, levelRequirement = 84, },
[28] = { 1, 78, -10, manaMultiplier = 40, levelRequirement = 86, },
[29] = { 1, 79, -10, manaMultiplier = 40, levelRequirement = 88, },
[30] = { 1, 80, -10, manaMultiplier = 40, levelRequirement = 90, },
},
} |
-- module
local PythonBridgeModule = {}
local rawget, rawset = rawget, rawset
local bridge = CANDY_PYTHON_BRIDGE
-- 在非编辑器的情况下
if not bridge then return setmetatable ( PythonBridgeModule, { __index = function () return function () end end } ) end
--------------------------------------------------------------------
-- CORE FUNCTIONS
--------------------------------------------------------------------
--communication
PythonBridgeModule.emitPythonSignal = bridge.emitPythonSignal
PythonBridgeModule.emitPythonSignalNow = bridge.emitPythonSignalNow
PythonBridgeModule.connectPythonSignal = bridge.connectPythonSignal
PythonBridgeModule.registerPythonSignal = bridge.registerPythonSignal
--data
PythonBridgeModule.sizeOfPythonObject = bridge.sizeOfPythonObject
PythonBridgeModule.newPythonDict = bridge.newPythonDict
PythonBridgeModule.newPythonList = bridge.newPythonList
PythonBridgeModule.appendPythonList = bridge.appendPythonList
PythonBridgeModule.deletePythonList = bridge.deletePythonList
PythonBridgeModule.getDict = bridge.getDict
PythonBridgeModule.setDict = bridge.setDict
--other
PythonBridgeModule.throwPythonException = bridge.throwPythonException
PythonBridgeModule.getTime = bridge.getTime
PythonBridgeModule.generateGUID = bridge.generateGUID
PythonBridgeModule.showAlertMessage = bridge.showAlertMessage
PythonBridgeModule.pyLogInfo = bridge.pyLogInfo
PythonBridgeModule.pyLogWarn = bridge.pyLogWarn
PythonBridgeModule.pyLogError = bridge.pyLogError
--import
PythonBridgeModule.importPythonModule = bridge.importModule
--------------------------------------------------------------------
--communication
PythonBridgeModule.emitPythonSignal = bridge.emitPythonSignal
PythonBridgeModule.emitPythonSignalNow = bridge.emitPythonSignalNow
PythonBridgeModule.connectPythonSignal = bridge.connectPythonSignal
PythonBridgeModule.registerPythonSignal = bridge.registerPythonSignal
--data
PythonBridgeModule.sizeOfPythonObject = bridge.sizeOfPythonObject
PythonBridgeModule.newPythonDict = bridge.newPythonDict
PythonBridgeModule.newPythonList = bridge.newPythonList
PythonBridgeModule.appendPythonList = bridge.appendPythonList
PythonBridgeModule.deletePythonList = bridge.deletePythonList
PythonBridgeModule.getDict = bridge.getDict
PythonBridgeModule.setDict = bridge.setDict
--other
PythonBridgeModule.throwPythonException = bridge.throwPythonException
PythonBridgeModule.getTime = bridge.getTime
PythonBridgeModule.generateGUID = bridge.generateGUID
PythonBridgeModule.showAlertMessage = bridge.showAlertMessage
--import
PythonBridgeModule.importPythonModule = bridge.importModule
MOAIEnvironment.generateGUID = bridge.generateGUID
--data conversion
local encodeDict = bridge.encodeDict
local decodeDict = bridge.decodeDict
local function tableToDict ( table )
local json = MOAIJsonParser.encode ( table )
return decodeDict ( json )
end
local function tableToList ( table )
local list = bridge.newPythonList ()
for i, v in ipairs ( table ) do
appendPythonList ( list,v )
end
return list
end
local function dictToTable ( dict )
local json = encodeDict ( dict )
return MOAIJsonParser.decode ( json )
end
local function dictToTablePlain ( dict ) --just one level?
local t = {}
for k in python.iter ( dict ) do
t[ k ] = dict[ k ]
end
return t
end
local _sizeOf = bridge.sizeOfPythonObject
local function listToTable ( list )
local c = _sizeOf ( list )
local r = {}
for i = 1, c do
r[ i ] = list[ i - 1 ]
end
return r
end
local function unpackPythonList ( t )
return unpack ( listToTable ( t ) )
end
PythonBridgeModule.tableToDict = tableToDict
PythonBridgeModule.tableToList = tableToList
PythonBridgeModule.dictToTable = dictToTable
PythonBridgeModule.dictToTablePlain = dictToTablePlain
PythonBridgeModule.listToTable = listToTable
PythonBridgeModule.unpackPythonList = unpackPythonList
--------------------------------------------------------------------
-- EDITOR RELATED
--------------------------------------------------------------------
local function changeSelection ( key, obj, ... )
assert ( type ( key ) == 'string', 'selection key expected' )
if obj then
bridge.changeSelection ( key, newPythonList ( obj, ... ) )
else
bridge.changeSelection ( key, nil )
end
end
local function addSelection ( key, obj, ... )
assert ( type ( key ) == 'string', 'selection key expected' )
if obj then
bridge.addSelection ( key, newPythonList ( obj, ... ) )
else
bridge.addSelection ( key, nil )
end
end
local function removeSelection( key, obj, ... )
assert ( type ( key ) == 'string', 'selection key expected' )
if obj then
bridge.removeSelection( key, newPythonList ( obj,... ) )
else
bridge.removeSelection( key, nil )
end
end
local function toggleSelection ( key, obj, ... )
assert ( type ( key ) == 'string', 'selection key expected' )
if obj then
bridge.toggleSelection ( key, newPythonList ( obj,... ) )
else
bridge.toggleSelection ( key, nil )
end
end
local function getSelection ( key )
assert( type ( key )=='string', 'selection key expected' )
return listToTable ( bridge.getSelection ( key ) )
end
-- Environment
-- getProjectExtPath = bridge.getProjectExtPath
-- getProjectPath = bridge.getProjectPath
-- getAppPath = bridge.getAppPath
PythonBridgeModule.app = bridge.app
local function getProject ()
return app:getProject ()
end
local function getApp ()
return app
end
local function getModule ( id )
return app:getModule ( id )
end
local function findDataFile ( name )
return app:findDataFile ( name )
end
PythonBridgeModule.changeSelection = changeSelection
PythonBridgeModule.addSelection = addSelection
PythonBridgeModule.removeSelection = removeSelection
PythonBridgeModule.toggleSelection = toggleSelection
PythonBridgeModule.toggleSelection = toggleSelection
PythonBridgeModule.getSelection = getSelection
PythonBridgeModule.getProject = getProject
PythonBridgeModule.getApp = getApp
PythonBridgeModule.getModule = getModule
PythonBridgeModule.findDataFile = findDataFile
--------------------------------------------------------------------
-- PYTHON-LUA DELEGATION CREATION
--------------------------------------------------------------------
function loadLuaWithEnv ( file, env, ... )
if env then
assert ( type ( env ) == 'userdata' )
env = dictToTablePlain ( env )
end
env = setmetatable ( env or {},
{ __index = function ( t, k ) return rawget ( _G, k ) end }
)
local func, err = loadfile ( file )
if not func then
error ( 'Failed load script:' .. file .. '\n' .. err, 2 )
end
env._C = env
setfenv ( func, env )
local args = { ... }
local function _f ()
return func ( unpack ( args ) )
end
local function _onError ( err, level )
print ( err )
print ( debug.traceback ( level or 2 ) )
return err, level
end
local succ, err = xpcall ( _f, _onError )
if not succ then
error ( 'Failed start script:'.. file, 2 )
end
local dir = env._path
function env.dofile ( path )
end
return env
end
function loadLuaDelegate ( file, env, ... )
end
PythonBridgeModule.loadLuaWithEnv = loadLuaWithEnv
PythonBridgeModule.loadLuaDelegate = loadLuaDelegate
--------------------------------------------------------------------
-- Lua Functions For Python
--------------------------------------------------------------------
stepSim = assert ( MOAISim.stepSim )
setBufferSize = assert ( MOAISim.setBufferSize )
--local renderFrameBuffer = assert ( MOAISim.renderFrameBuffer ) --a manual renderer caller
local renderFrameBuffer = nil --a manual renderer caller
local function renderTable ( t )
for i,f in ipairs ( t ) do
local tt = type ( f )
if tt == 'table' then
renderTable ( f )
elseif tt=='userdata' then
renderFrameBuffer ( f )
end
end
end
local function manualRenderAll ()
local rt = MOAIRenderMgr.getBufferTable ()
if rt then
renderTable ( rt )
else
renderFrameBuffer ( MOAIGfxMgr.getFrameBuffer () )
end
end
PythonBridgeModule.renderTable = renderTable
PythonBridgeModule.manualRenderAll = manualRenderAll
--------------------------------------------------------------------
-- Editor Command
--------------------------------------------------------------------
PythonBridgeModule.registerLuaEditorCommand = bridge.registerLuaEditorCommand
PythonBridgeModule.doCommand = bridge.doCommand
PythonBridgeModule.undoCommand = bridge.undoCommand
--------------------------------------------------------------------
-- MODEL
--------------------------------------------------------------------
local modelBridge = bridge.ModelBridge.get ()
local function registerModelProvider ( setting )
local priority = setting.priority or 10
local name = setting.name
local getTypeId = assert ( setting.getTypeId, 'getTypeId not provided' )
local getModel = assert ( setting.getModel, 'getModel not provided' )
local getModelFromTypeId = assert ( setting.getModelFromTypeId, 'getModelFromTypeId not provided' )
return modelBridge:buildLuaObjectModelProvider (
name, priority, getTypeId, getModel, getModelFromTypeId
)
end
local function registerObjectEnumerator ( setting )
local name = setting.name
local enumerateObjects = assert ( setting.enumerateObjects, 'enumerateObjects not provided' )
local getObjectRepr = assert ( setting.getObjectRepr, 'getObjectRepr not provided' )
local getObjectTypeRepr = assert ( setting.getObjectTypeRepr, 'getObjectTypeRepr not provided' )
return modelBridge:buildLuaObjectEnumerator (
name,
enumerateObjects,
getObjectRepr,
getObjectTypeRepr
)
end
PythonBridgeModule.registerModelProvider = registerModelProvider
PythonBridgeModule.registerObjectEnumerator = registerObjectEnumerator
return PythonBridgeModule |
data:extend(
{
{
type = "recipe",
name = "lucky-box",
energy_required = 2,
ingredients =
{
{"wooden-chest", 1},
{"iron-gear-wheel", 3},
{"electronic-circuit", 5},
{"grenade", 2},
},
result = "lucky-box"
},
}
) |
-- mod_file_management
--
-- Copyright (C) 2019 Emmanuel Gil Peyrot
--
-- This file is MIT/X11 licensed.
--
module:depends("http_upload");
local dataform_new = require "util.dataforms".new;
local adhoc_new = module:require "adhoc".new;
local adhoc_simple_form = require "util.adhoc".new_simple_form;
local adhoc_initial_data_form = require "util.adhoc".new_initial_data_form;
local url = require "socket.url";
local lfs = require "lfs";
local datamanager = require "util.datamanager";
local jid_prepped_split = require "util.jid".prepped_split;
local join_path = require "util.paths".join;
local t_concat = table.concat;
local t_insert = table.insert;
local storage_path = module:get_option_string("http_upload_path", join_path(prosody.paths.data, "http_upload"));
local function get_url(dir, filename)
local slot_url = url.parse(module:http_url("upload"));
slot_url.path = url.parse_path(slot_url.path or "/");
t_insert(slot_url.path, dir);
t_insert(slot_url.path, filename);
slot_url.path.is_directory = false;
slot_url.path = url.build_path(slot_url.path);
return url.build(slot_url);
end
local list_form = dataform_new {
title = "List files for user";
instructions = "Select the JID of a user to list the files they have uploaded.";
{
type = "hidden";
name = "FORM_TYPE";
value = "http://prosody.im/protocol/file_management#list";
};
{
type = "jid-single";
name = "accountjid";
required = true;
label = "JID";
};
};
module:provides("adhoc", adhoc_new("File Management", "http://prosody.im/protocol/file_management#list", adhoc_simple_form(list_form, function (data, errors)
if errors then
local errmsg = {};
for name, text in pairs(errors) do
errmsg[#errmsg + 1] = name .. ": " .. text;
end
return { status = "completed", error = { message = t_concat(errmsg, "\n") } };
end
local jid = data.accountjid;
local user, host = jid_prepped_split(jid);
local uploads, err = datamanager.list_load(user, host, "http_upload");
if err then
return { status = "completed", error = "File upload data not found for user "..jid.."." };
end
local result = {};
for i, upload in ipairs(uploads) do
module:log("debug", "http_upload_management#list %d %q", i, upload);
if upload.dir ~= nil then
t_insert(result, get_url(upload.dir, upload.filename));
else
-- upload.filename was pointing to a path on the file system…
-- TODO: Try to guess the URL from that.
end
end
return { status = "completed", info = t_concat(result, "\n") };
end), "admin"));
|
-- Number
testvalue_num = 900.0
-- Integer
testvalue_int = -900
-- Unsigned
testvalue_uint = 900
-- String
testvalue_str = "900"
function_return = GlobalAddString("test");
loluademo_return = LoluaDemo.AddFive(1);
loluademo_inst = LoluaDemo.New();
loluademo_inst:SetX(10);
loluademo_getx = loluademo_inst:GetX();
loluademo_inst_return = loluademo_inst:AddTenInstance(2.5, 4, 6);
|
if nil ~= require then
require "fritomod/currying";
end;
if Mixins == nil then
Mixins = {};
end;
-- Adds an operation for keys and values to the specified library. The operation
-- is given the appropriate iterator function for the item type.
--
-- library
-- the library that is the target of this mixin
-- name
-- the name format. "Key", or "Value" will be interpolated
-- operation
-- the function that is mixed in. It should expect a iterator function for its first argument
function Mixins.KeyValueOperation(library, name, operation)
if library[name:format("Key")] == nil then
library[name:format("Key")] = function(...)
return operation(library.KeyIterator, ...);
end;
end;
if library[name:format("Value")] == nil then
library[name:format("Value")] = function(...)
return operation(library.ValueIterator, ...);
end;
end;
end;
-- Adds an operation for keys, values, and pairs to the specified library. The operation
-- is given a chooser function that selects the appropriate item for the item type.
--
-- library
-- the library that is the target of this mixin
-- name
-- the name format. "Pair", "Key", or "Value" will be interpolated
-- operation
-- the function that is mixed in. It should expect a chooser function for the first argument.
-- The chooser has the signature chooser(key, value) and returns the appropriate item for
-- the item type.
function Mixins.KeyValuePairOperation(library, name, operation)
if library[name:format("Pair")] == nil then
library[name:format("Pair")] = Curry(operation, function(key, value)
return key, value;
end);
end;
if library[name:format("Key")] == nil then
library[name:format("Key")] = Curry(operation, function(key, value)
return key;
end);
end;
if library[name:format("Value")] == nil then
library[name:format("Value")] = Curry(operation, function(key, value)
return value;
end);
end;
end;
-- Adds an operation for keys, values, and pairs to the specified library.
--
-- library
-- the library that is the target of this mixin
-- name
-- the name format. "Pair", "Key", or "Value" will be interpolated
-- operation
-- the function that is mixed in. It should expect the item type as the first
-- argument.
function Mixins.KeyValuePairOperationByName(library, name, operation)
if library[name:format("Pair")] == nil then
library[name:format("Pair")] = Curry(operation, "Pair");
end;
if library[name:format("Key")] == nil then
library[name:format("Key")] = Curry(operation, "Key");
end;
if library[name:format("Value")] == nil then
library[name:format("Value")] = Curry(operation, "Value");
end;
end;
-- Creates a runtime alias, pointing to the function at the specified target.
--
-- We use this a lot in our Iteration mixin, since it's sort-of a pain to
-- type this out.
function Mixins.DefaultAlias(t, target, ...)
for i=1,select("#", ...) do
local name=select(i, ...);
if t[name] == nil then
t[name]=CurryNamedFunction(t, target);
end;
end;
end;
function Mixins.Overridable(t, name, func)
if t[name] == nil then
t[name]=func;
end;
end;
|
local gradient = ix.util.GetMaterial("vgui/gradient-u")
local gradient2 = ix.util.GetMaterial("vgui/gradient-d")
local PANEL = {}
AccessorFunc(PANEL, "color", "Color")
AccessorFunc(PANEL, "value", "Value", FORCE_NUMBER)
AccessorFunc(PANEL, "boostValue", "Boost", FORCE_NUMBER)
AccessorFunc(PANEL, "max", "Max", FORCE_NUMBER)
function PANEL:Init()
self:SetTall(20)
self.add = self:Add("DImageButton")
self.add:SetSize(16, 16)
self.add:Dock(RIGHT)
self.add:DockMargin(2, 2, 2, 2)
self.add:SetImage("icon16/add.png")
self.add.OnMousePressed = function()
self.pressing = 1
self:DoChange()
self.add:SetAlpha(150)
end
self.add.OnMouseReleased = function()
if (self.pressing) then
self.pressing = nil
self.add:SetAlpha(255)
end
end
self.add.OnCursorExited = self.add.OnMouseReleased
self.sub = self:Add("DImageButton")
self.sub:SetSize(16, 16)
self.sub:Dock(LEFT)
self.sub:DockMargin(2, 2, 2, 2)
self.sub:SetImage("icon16/delete.png")
self.sub.OnMousePressed = function()
self.pressing = -1
self:DoChange()
self.sub:SetAlpha(150)
end
self.sub.OnMouseReleased = function()
if (self.pressing) then
self.pressing = nil
self.sub:SetAlpha(255)
end
end
self.sub.OnCursorExited = self.sub.OnMouseReleased
self.value = 0
self.deltaValue = self.value
self.max = 10
self.bar = self:Add("DPanel")
self.bar:Dock(FILL)
self.bar.Paint = function(this, w, h)
surface.SetDrawColor(35, 35, 35, 75)
surface.DrawRect(0, 0, w, h)
surface.SetDrawColor(Color(0, 0, 0, 129))
surface.DrawOutlinedRect( 1,1, w - 2, h - 2, 1 )
w, h = w - 4, h - 4
local value = self.deltaValue / self.max
if (value > 0) then
local color = self.color and self.color or ix.config.Get("color")
local boostedValue = self.boostValue or 0
local add = 0
if (self.deltaValue != self.value) then
add = 35
end
-- your stat
do
if !(boostedValue < 0 and math.abs(boostedValue) > self.value) then
surface.SetDrawColor(color.r + add, color.g + add, color.b + add, 100)
surface.DrawRect(2, 2, w * value, h)
--surface.SetDrawColor(89, 71, 168, 35)
--surface.SetMaterial(gradient)
--surface.DrawTexturedRect(2, 2, w * value, h)
end
end
-- boosted stat
do
local boostValue
if (boostedValue != 0) then
if (boostedValue < 0) then
local please = math.min(self.value, math.abs(boostedValue))
boostValue = ((please or 0) / self.max) * (self.deltaValue / self.value)
else
boostValue = ((boostedValue or 0) / self.max) * (self.deltaValue / self.value)
end
if (boostedValue < 0) then
surface.SetDrawColor(200, 40, 40, 230)
local bWidth = math.abs(w * boostValue)
surface.DrawRect(2 + w * value - bWidth, 2, bWidth, h)
--surface.SetDrawColor(255, 255, 255, 35)
--surface.SetMaterial(gradient)
--surface.DrawTexturedRect(2 + w * value - bWidth, 2, bWidth, h)
else
surface.SetDrawColor(40, 200, 40, 230)
surface.DrawRect(2 + w * value, 2, w * boostValue, h)
--surface.SetDrawColor(255, 255, 255, 35)
--surface.SetMaterial(gradient)
--surface.DrawTexturedRect(2 + w * value, 2, w * boostValue, h)
end
end
end
end
--surface.SetDrawColor(255, 255, 255, 5)
--surface.SetMaterial(gradient2)
--surface.DrawTexturedRect(2, 2, w, h)
end
self.label = self.bar:Add("DLabel")
self.label:Dock(FILL)
self.label:SetExpensiveShadow(1, Color(0, 0, 60))
self.label:SetContentAlignment(5)
end
function PANEL:Think()
if (self.pressing) then
if ((self.nextPress or 0) < CurTime()) then
self:DoChange()
end
end
self.deltaValue = math.Approach(self.deltaValue, self.value, FrameTime() * 35)
end
function PANEL:DoChange()
if ((self.value == 0 and self.pressing == -1) or (self.value == self.max and self.pressing == 1)) then
return
end
self.nextPress = CurTime() + 0.2
if (self:OnChanged(self.pressing) != false) then
self.value = math.Clamp(self.value + self.pressing, 0, self.max)
end
end
function PANEL:OnChanged(difference)
end
function PANEL:SetText(text)
self.label:SetText(text)
self.label:SetFont("ixMenuButtonFontSmall")
--self.AttriImage = vgui.Create("DImage", self)
--self.AttriImage:SetPos(10, 10)
--self.AttriImage:SetSize(45, 45)
--self.AttriImage:SetImage("darkrpg/skills/none.png")
end
function PANEL:SetReadOnly()
self.sub:Remove()
self.add:Remove()
end
vgui.Register("ixAttributeBar", PANEL, "DPanel")
|
--!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you 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.
--
-- Copyright (C) 2015 - 2018, TBOOX Open Source Group.
--
-- @author ruki
-- @file deprecated_project.lua
--
-- define module: deprecated_project
local deprecated_project = deprecated_project or {}
-- load modules
local os = require("base/os")
local path = require("base/path")
local utils = require("base/utils")
local table = require("base/table")
local string = require("base/string")
local config = require("project/config")
local platform = require("platform/platform")
local deprecated = require("base/deprecated")
local deprecated_interpreter = require("base/deprecated/interpreter")
-- load all packages from the given directories
function deprecated_project._api_add_pkgdirs(interp, ...)
-- get all directories
local pkgdirs = {}
local dirs = table.join(...)
for _, dir in ipairs(dirs) do
table.insert(pkgdirs, dir .. "/*.pkg")
end
-- add all packages
interp:api_builtin_includes(pkgdirs)
end
-- load the given packages
function deprecated_project._api_add_pkgs(interp, ...)
-- add all packages
interp:api_builtin_includes(...)
end
-- load all packages from the given directories
function deprecated_project._api_add_packagedirs(interp, ...)
-- make values
local values = ""
for _, v in ipairs(table.join(...)) do
if v and type(v) == "string" then
if #values == 0 then
values = v
else
values = values .. ", " .. v
end
end
end
-- deprecated
deprecated.add("add_packagedirs(\"%s\")", "add_pkgdirs(\"%s\")", values)
-- done
return deprecated_project._api_add_pkgdirs(interp, ...)
end
-- load the given packages
function deprecated_project._api_add_packages(interp, ...)
-- make values
local values = ""
for _, v in ipairs(table.join(...)) do
if v and type(v) == "string" then
if #values == 0 then
values = v
else
values = values .. ", " .. v
end
end
end
-- deprecated
deprecated.add("add_packages(\"%s\")", "add_pkgs(\"%s\")", values)
-- done
return deprecated_project._api_add_pkgs(interp, ...)
end
-- set_enable for option
function deprecated_project._api_option_set_enable(interp, ...)
-- get api function
local apifunc = interp:_api_within_scope("option", "set_default")
assert(apifunc)
-- register api
interp:api_register_builtin("set_enable", function (value)
-- deprecated
deprecated.add("set_default(%s)", "set_enable(%s)", tostring(value))
-- dispatch it
apifunc(value)
end)
end
-- register api
function deprecated_project.api_register(interp)
-- register api: add_pkgdirs() to root
interp:api_register(nil, "add_pkgdirs", deprecated_project._api_add_packagedirs)
-- register api: add_pkgs() to root
interp:api_register(nil, "add_pkgs", deprecated_project._api_add_packages)
-- register api: set_enable() to option
interp:api_register("option", "set_enable", deprecated_project._api_option_set_enable)
-- register api: set_values() to option
deprecated_interpreter._api_register_set_xxx_xxx(interp, "option", "enable")
deprecated_interpreter._api_register_set_xxx_xxx(interp, "option", "showmenu")
deprecated_interpreter._api_register_set_xxx_xxx(interp, "option", "category")
deprecated_interpreter._api_register_set_xxx_xxx(interp, "option", "warnings")
deprecated_interpreter._api_register_set_xxx_xxx(interp, "option", "optimize")
deprecated_interpreter._api_register_set_xxx_xxx(interp, "option", "languages")
deprecated_interpreter._api_register_set_xxx_xxx(interp, "option", "description")
-- register api: add_values() to option
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "links")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "cincludes")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "cxxincludes")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "cfuncs")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "cxxfuncs")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "ctypes")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "cxxtypes")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "cflags")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "cxflags")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "cxxflags")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "mflags")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "mxflags")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "mxxflags")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "ldflags")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "vectorexts")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "defines")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "defines_if_ok")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "defines_h_if_ok")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "undefines")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "undefines_if_ok")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "undefines_h_if_ok")
-- register api: add_pathes() to option
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "linkdirs")
deprecated_interpreter._api_register_add_xxx_xxx(interp, "option", "includedirs")
end
-- return module: deprecated_project
return deprecated_project
|
-- mpvSockets, one socket per instance, removes socket on exit
local utils = require 'mp.utils'
local function get_temp_path()
local example_temp_file_path = os.tmpname()
-- remove generated temp file
os.remove(example_temp_file_path)
return utils.split_path(example_temp_file_path)
end
local function mkdir(...)
return mp.command_native({
name = "subprocess",
capture_stdout = true,
capture_stderr = true,
playback_only = false,
args = {"mkdir", "--", ...},
})
end
local ppid = utils.getpid()
local temp_dir = get_temp_path()
local socket_dir = utils.join_path(temp_dir, "mpvSockets")
local socket_path = utils.join_path(socket_dir, ppid)
mkdir(socket_dir)
mp.set_property("options/input-ipc-server", socket_path)
mp.register_event("shutdown", function()
os.remove(socket_path)
os.remove(socket_dir)
end)
|
-----------------------------------
-- Area: Al'Taieu
-- NPC: Rubious Crystal (South Tower)
-- !pos 0 -6.250 -736.912 33
-----------------------------------
local ID = require("scripts/zones/AlTaieu/IDs");
require("scripts/globals/missions");
-----------------------------------
function onTrade(player,npc,trade)
end;
function onTrigger(player,npc)
if (
player:getCurrentMission(COP) == tpz.mission.id.cop.GARDEN_OF_ANTIQUITY
and player:getCharVar("PromathiaStatus") == 2
and player:getCharVar("[SEA][AlTieu]SouthTower") == 0
and player:getCharVar("[SEA][AlTieu]SouthTowerCS") == 0
and not GetMobByID(ID.mob.AERNS_TOWER_SOUTH+0):isSpawned()
and not GetMobByID(ID.mob.AERNS_TOWER_SOUTH+1):isSpawned()
and not GetMobByID(ID.mob.AERNS_TOWER_SOUTH+2):isSpawned()
) then
player:messageSpecial(ID.text.OMINOUS_SHADOW);
SpawnMob(ID.mob.AERNS_TOWER_SOUTH+0):updateClaim(player);
SpawnMob(ID.mob.AERNS_TOWER_SOUTH+1):updateClaim(player);
SpawnMob(ID.mob.AERNS_TOWER_SOUTH+2):updateClaim(player);
elseif (
player:getCurrentMission(COP) == tpz.mission.id.cop.GARDEN_OF_ANTIQUITY
and player:getCharVar("PromathiaStatus") == 2
and player:getCharVar("[SEA][AlTieu]SouthTower") == 1
and player:getCharVar("[SEA][AlTieu]SouthTowerCS") == 0
) then
player:startEvent(161);
else
player:messageSpecial(ID.text.NOTHING_OF_INTEREST);
end
end;
function onEventUpdate(player,csid,option)
end;
function onEventFinish(player,csid,option)
if (csid == 161) then
player:setCharVar("[SEA][AlTieu]SouthTowerCS", 1);
player:setCharVar("[SEA][AlTieu]SouthTower", 0);
end
end;
|
-- Rigidly defined PseudoInstance class system to instantiate Roblox-like instances
-- @documentation https://rostrap.github.io/Libraries/Classes/PseudoInstance/
-- @author Validark
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Resources = require(ReplicatedStorage:WaitForChild("Resources"))
local Debug = Resources:LoadLibrary("Debug")
local Table = Resources:LoadLibrary("Table")
local Typer = Resources:LoadLibrary("Typer")
local Signal = Resources:LoadLibrary("Signal")
local Janitor = Resources:LoadLibrary("Janitor")
local SortedArray = Resources:LoadLibrary("SortedArray")
local Enumeration = Resources:LoadLibrary("Enumeration")
local Templates = Resources:GetLocalTable("Templates")
local Metatables = setmetatable({}, {__mode = "kv"})
local function Empty() end
local function Metatable__index(this, i)
local self = Metatables[this] or this -- self is the internal copy
local Value = self.__rawdata[i]
local ClassTemplate = self.__class
if Value == nil then
Value = ClassTemplate.Methods[i]
else
return Value
end
if Value == nil and not ClassTemplate.Properties[i] then
local GetConstructorAndDestructor = ClassTemplate.Events[i]
if GetConstructorAndDestructor then
if self == this then -- if internal access
local Event = Signal.new(GetConstructorAndDestructor(self))
rawset(self, i, Event)
return Event
else
return self[i].Event
end
elseif ClassTemplate.Internals[i] == nil or self ~= this then
Debug.Error("[%s] is not a valid Property of " .. tostring(self), i)
end
else
return Value
end
end
local function Metatable__newindex(this, i, v)
local self = Metatables[this] or this
local Type = self.__class.Properties[i]
if Type then
Type(self, v)
elseif self == this and self.__class.Internals[i] ~= nil then
rawset(self, i, v)
else
Debug.Error(i .. " is not a modifiable property")
end
end
local function Metatable__tostring(self)
return (Metatables[self] or self).__class.ClassName
end
local function Metatable__rawset(self, Property, Value)
self.__rawdata[Property] = Value
return self
end
local function ReturnHelper(Success, ...)
if Success then
return ...
else
Debug.Error(...)
end
end
local ThreadDepthTracker = setmetatable({}, {__mode = "k"})
local function Metatable__super(self, MethodName, ...)
local Thread = coroutine.running()
local InSuperclass = ThreadDepthTracker[Thread]
local PreviousClass = InSuperclass or self.__class
local Class = PreviousClass
while Class.HasSuperclass do
Class = Class.Superclass
local Function = Class.Methods[MethodName]
if Function and Function ~= PreviousClass.Methods[MethodName] then
if InSuperclass then
ThreadDepthTracker[Thread] = Class
return Function(self, ...)
else
local NewThread = coroutine.create(Function)
ThreadDepthTracker[NewThread] = Class
return ReturnHelper(coroutine.resume(NewThread, self, ...))
end
end
end
return Debug.Error("Could not find parent method " .. MethodName .. " of " .. PreviousClass.ClassName)
end
local PseudoInstance = {}
local function DefaultInit(self, ...)
self:superinit(...)
end
local DataTableNames = SortedArray.new{"Events", "Methods", "Properties", "Internals"}
local MethodIndex = DataTableNames:Find("Methods")
local function Filter(this, self, ...)
-- Filter out `this` and convert to `self`
-- Try not to construct a table if possible (we keep it light up in here)
local ArgumentCount = select("#", ...)
if ArgumentCount > 2 then
local Arguments
for i = 1, ArgumentCount do
if select(i, ...) == this then
Arguments = {...} -- Create a table if absolutely necessary
Arguments[i] = self
for j = i + 1, ArgumentCount do -- Just loop through the rest normally if a table was already created
if Arguments[j] == this then
Arguments[j] = self
end
end
return unpack(Arguments)
end
end
return ...
else
if this == ... then -- Optimize for most cases where they only returned a single parameter
return self
else
return ...
end
end
end
local function superinit(self, ...)
local CurrentClass = self.currentclass
if CurrentClass.HasSuperclass then
self.currentclass = CurrentClass.Superclass
else
self.currentclass = nil
self.superinit = nil
end
CurrentClass.Init(self, ...)
end
function PseudoInstance.Register(_, ClassName, ClassData, Superclass)
if type(ClassData) ~= "table" then Debug.Error("Register takes parameters (string ClassName, table ClassData, Superclass)") end
for i = 1, #DataTableNames do
local DataTableName = DataTableNames[i]
if not ClassData[DataTableName] then
ClassData[DataTableName] = {}
end
end
for Property, Function in next, ClassData.Properties do
if type(Function) == "table" then
ClassData.Properties[Property] = Typer.AssignSignature(2, Function, function(self, Value)
self:rawset(Property, Value)
end)
end
end
local Internals = ClassData.Internals
for i = 1, #Internals do
Internals[Internals[i]] = false
Internals[i] = nil
end
local Events = ClassData.Events
for i = 1, #Events do
Events[Events[i]] = Empty
Events[i] = nil
end
ClassData.Abstract = false
for MethodName, Method in next, ClassData.Methods do -- Wrap to give internal access to private metatable members
if Method == 0 then
ClassData.Abstract = true
else
ClassData.Methods[MethodName] = function(self, ...)
local this = Metatables[self]
if this then -- External method call
return Filter(this, self, Method(this, ...))
else -- Internal method call
return Method(self, ...)
end
end
end
end
ClassData.Init = ClassData.Init or DefaultInit
ClassData.ClassName = ClassName
-- Make properties of internal objects externally accessible
if ClassData.WrappedProperties then
for ObjectName, Properties in next, ClassData.WrappedProperties do
for i = 1, #Properties do
local Property = Properties[i]
if ClassData.Properties[Property] then
Debug.Error("Identifier \"" .. Property .. "\" was used in both Properties and WrappedProperties")
else
ClassData.Properties[Property] = function(this, Value)
local Object = this[ObjectName]
if Object then
Object[Property] = Value
end
this:rawset(Property, Value)
end
end
end
end
local PreviousInit = ClassData.Init
ClassData.Init = function(self, ...)
PreviousInit(self, ...)
for ObjectName, Properties in next, ClassData.WrappedProperties do
for i = 1, #Properties do
local Property = Properties[i]
local Object = self[ObjectName]
if Object then
if self[Property] == nil then
self[Property] = Object[Property] -- This will implicitly error if they do something stupid
end
else
Debug.Error(ObjectName .. " is not a valid member of " .. ClassName)
end
end
end
end
end
if Superclass == nil then
Superclass = Templates.PseudoInstance
end
if Superclass then -- Copy inherited stuff into ClassData
ClassData.HasSuperclass = true
ClassData.Superclass = Superclass
for a = 1, #DataTableNames do
local DataTable = DataTableNames[a]
local ClassTable = ClassData[DataTable]
for i, v in next, Superclass[DataTable] do
if not ClassTable[i] then
ClassTable[i] = v == 0 and Debug.Error(ClassName .. " failed to implement " .. i .. " from its superclass " .. Superclass.ClassName) or v
end
end
end
else
ClassData.HasSuperclass = false
end
local Identifiers = {} -- Make sure all identifiers are unique
for a = 1, #DataTableNames do -- Make sure there aren't any duplicate names
local DataTableName = DataTableNames[a]
for i in next, ClassData[DataTableName] do
if type(i) == "string" then
if Identifiers[i] then
Debug.Error("Identifier \"" .. i .. "\" was used in both " .. DataTableNames[Identifiers[i]] .. " and " .. DataTableName)
else
Identifiers[i] = a
end
else
Debug.Error("%q is not a valid Identifier, found inside " .. DataTableName, i)
end
end
end
local LockedClass = Table.Lock(ClassData)
Templates[ClassName] = LockedClass
return LockedClass
end
local function AccessProperty(self, Property)
local _ = self[Property]
end
PseudoInstance:Register("PseudoInstance", { -- Generates a rigidly defined userdata class with `.new()` instantiator
Internals = {
"Children", "PropertyChangedSignals", "Janitor";
rawset = function(self, Property, Value)
self.__rawdata[Property] = Value
local PropertyChangedSignal = self.PropertyChangedSignals and self.PropertyChangedSignals[Property]
if PropertyChangedSignal and PropertyChangedSignal.Active then
PropertyChangedSignal:Fire(Value)
end
return self
end;
SortByName = function(a, b)
return a.Name < b.Name
end;
ParentalChange = function(self)
local this = Metatables[self.Parent]
if this then
this.Children:Insert(self)
end
end;
ChildNameMatchesObject = function(ChildName, b)
return ChildName == b.Name
end;
ChildNamePrecedesObject = function(ChildName, b)
return ChildName < b.Name
end;
SetEventActive = function(Event)
Event.Active = true
end;
SetEventInactive = function(Event)
Event.Active = false
end;
};
Properties = { -- Only Indeces within this table are writable, and these are the default values
Archivable = Typer.Boolean; -- Values written to these indeces must match the initial type (unless it is a function, see below)
Parent = Typer.OptionalInstance;
Name = Typer.String;
};
Events = {
Changed = function(self)
local Assigned = Janitor.new()
return function(Event)
for Property in next, self.__class.Properties do
Assigned:Add(self:GetPropertyChangedSignal(Property):Connect(function()
Event:Fire(Property)
end), "Disconnect")
end
end, Assigned
end;
};
Methods = {
Clone = function(self)
if self.Archivable then
local CurrentClass = self.__class
local New = Resources:LoadLibrary("PseudoInstance").new(CurrentClass.ClassName)
repeat
for Property in next, CurrentClass.Properties do
if Property ~= "Parent" then
local Old = self[Property]
if Old ~= nil then
if Typer.Instance(Old) then
Old = Old:Clone()
end
New[Property] = Old
end
end
end
CurrentClass = CurrentClass.HasSuperclass and CurrentClass.Superclass
until not CurrentClass
return New
else
return nil
end
end;
GetFullName = function(self)
return (self.Parent and self.Parent:GetFullName() .. "." or "") .. self.Name
end;
IsDescendantOf = function(self, Grandparent)
return self.Parent == Grandparent or (self.Parent and self.Parent:IsDescendantOf(Grandparent)) or false
end;
GetPropertyChangedSignal = function(self, String)
if type(String) ~= "string" then Debug.Error("invalid argument 2: string expected, got %s", String) end
local PropertyChangedSignal = self.PropertyChangedSignals[String]
if not PropertyChangedSignal then
if not pcall(AccessProperty, self, String) then Debug.Error("%s is not a valid Property of " .. tostring(self), String) end
PropertyChangedSignal = Signal.new(self.SetEventActive, self.SetEventInactive)
self.Janitor:Add(PropertyChangedSignal, "Destroy")
self.PropertyChangedSignals[String] = PropertyChangedSignal
end
return PropertyChangedSignal.Event
end;
FindFirstChild = function(self, ChildName, Recursive)
local Children = self.Children
if Recursive then
for i = 1, #Children do
local Child = Children[i]
if Child.Name == ChildName then
return Child
end
local Grandchild = Child:FindFirstChild(ChildName, Recursive)
if Grandchild then
return Grandchild
end
end
else -- Much faster than recursive
return Children:Find(ChildName, self.ChildNameMatchesObject, self.ChildNamePrecedesObject)
end
end;
GetChildren = function(self)
return self.Children:Copy()
end;
IsA = function(self, ClassName)
local CurrentClass = self.__class
repeat
if ClassName == CurrentClass.ClassName then
return true
end
CurrentClass = CurrentClass.HasSuperclass and CurrentClass.Superclass
until not CurrentClass
return ClassName == "<<</sc>>>" -- This is a reference to the old Roblox chat...
end;
Destroy = function(self)
self.Archivable = false
self.Parent = nil
for GlobalSelf, InternalSelf in next, Metatables do
if self == InternalSelf then
self.Janitor[GlobalSelf] = nil
Metatables[GlobalSelf] = nil
end
end
self.Janitor:Cleanup()
-- Nuke the object
if self.__rawdata then
for i in next, self.__rawdata do
rawset(self.__rawdata, i, nil)
end
end
for i, v in next, self do
if Signal.IsA(v) then
v:Destroy()
end
rawset(self, i, nil)
end
end;
};
Init = function(self)
local Name = self.__class.ClassName
-- Default properties
self.Name = Name
self.Archivable = true
-- Read-only
self:rawset("ClassName", Name)
-- Internals
self.Children = SortedArray.new(nil, self.SortByName)
self.PropertyChangedSignals = {}
self:GetPropertyChangedSignal("Parent"):Connect(self.ParentalChange, self)
end;
}, false)
function PseudoInstance.new(ClassName, ...)
local Class = Templates[ClassName]
if not Class then
Resources:LoadLibrary(ClassName)
Class = Templates[ClassName] or Debug.Error("Invalid ClassName: " .. ClassName)
end
if Class.Abstract then
Debug.Error("Cannot instantiate an abstract " .. ClassName)
end
local self = newproxy(true)
local Mt = getmetatable(self)
-- This one can be overwritten by an internal function if so desired :D
Mt.rawset = Metatable__rawset
for i, v in next, Class.Internals do
Mt[i] = v
end
-- Internal members
Mt.__class = Class
Mt.__index = Metatable__index
Mt.__rawdata = {}
Mt.__newindex = Metatable__newindex
Mt.__tostring = Metatable__tostring
Mt.__metatable = "[PseudoInstance] Locked metatable"
Mt.__type = ClassName -- Calling `typeof` will error without having this value :/
-- Internally accessible methods
Mt.super = Metatable__super
-- These two are only around for instantiation and are cleared after a successful and full instantiation
Mt.superinit = superinit
Mt.currentclass = Class
-- Internally accessible cleaner
Mt.Janitor = Janitor.new()
Metatables[self] = setmetatable(Mt, Mt)
Mt.Janitor:Add(self, "Destroy")
Mt:superinit(...)
if rawget(Mt, "currentclass") then
local StoppedOnClass = Class
while StoppedOnClass.HasSuperclass and StoppedOnClass.Superclass ~= Mt.currentclass do
StoppedOnClass = StoppedOnClass.Superclass
end
Debug.Error("Must call self:superinit(...) from " .. StoppedOnClass.ClassName .. ".Init")
end
return self
end
function PseudoInstance.Make(ClassName, Properties, ...)
local Object = PseudoInstance.new(ClassName)
local Parent = Properties.Parent
if Parent then
Properties.Parent = nil
end
for Property, Value in next, Properties do
if type(Property) == "number" then
Value.Parent = Object
elseif Object[Property] ~= Value then
Object[Property] = Value
end
end
if Parent then
Object.Parent = Parent
end
if ... then
local Objects = {...}
for a = 1, #Objects do
local Object = Object:Clone()
for Property, Value in next, Objects[a] do
if type(Property) == "number" then
Value.Parent = Object
else
Object[Property] = Value
end
end
Object.Parent = not Object.Parent and Parent
Objects[a] = Object
end
return Object, unpack(Objects)
else
return Object
end
end
return Table.Lock(PseudoInstance)
|
ys = ys or {}
slot1 = ys.Battle.BattleConfig
slot2 = ys.Battle.BattleTargetChoise
slot3 = ys.Battle.BattleUnitEvent
ys.Battle.BattelUAVUnit = class("BattelUAVUnit", ys.Battle.BattleAircraftUnit)
ys.Battle.BattelUAVUnit.__name = "BattelUAVUnit"
ys.Battle.BattelUAVUnit.MOVE_STATE = "MOVE_STATE"
ys.Battle.BattelUAVUnit.HOVER_STATE = "HOVER_STATE"
ys.Battle.BattelUAVUnit.Ctor = function (slot0, slot1)
slot0.super.Ctor(slot0, slot1)
slot0._dir = slot1.Battle.BattleConst.UnitDir.LEFT
slot0._type = slot1.Battle.BattleConst.UnitType.UAV_UNIT
end
ys.Battle.BattelUAVUnit.Update = function (slot0, slot1)
slot0:updatePatrol(slot1)
end
ys.Battle.BattelUAVUnit.SetTemplate = function (slot0, slot1)
slot0.super.SetTemplate(slot0, slot1)
slot0._centerPos = BuildVector3(slot4) + Vector3(slot1.funnel_behavior.offsetX * slot0:GetIFF(), 0, slot1.funnel_behavior.offsetZ)
slot0._range = slot1.funnel_behavior.hover_range
end
ys.Battle.BattelUAVUnit.changePartolState = function (slot0, slot1)
if slot1 == slot0.MOVE_STATE then
slot0:changeToMoveState()
elseif slot1 == slot0.HOVER_STATE then
slot0:changeToHoverState()
end
slot0._portalState = slot1
end
ys.Battle.BattelUAVUnit.AddCreateTimer = function (slot0, slot1, slot2)
slot0._currentState = slot0.STATE_CREATE
slot0._speedDir = slot1
slot0._velocity = slot0.Battle.BattleFormulas.ConvertAircraftSpeed(20)
slot0.updatePatrol = slot0._updateCreate
slot0._createTimer = pg.TimeMgr.GetInstance().AddBattleTimer(slot4, "AddCreateTimer", 0, slot2 or 1.5, function ()
slot0._existStartTime = pg.TimeMgr.GetInstance():GetCombatTime()
slot0._velocity = pg.TimeMgr.GetInstance().GetCombatTime().Battle.BattleFormulas.ConvertAircraftSpeed(slot0._tmpData.speed)
slot0:changePartolState(slot0._tmpData.speed.MOVE_STATE)
pg.TimeMgr.GetInstance():RemoveBattleTimer(slot0._createTimer)
pg.TimeMgr.GetInstance().RemoveBattleTimer._createTimer = nil
end)
end
ys.Battle.BattelUAVUnit._updateCreate = function (slot0)
slot0:UpdateSpeed()
slot0._pos = slot0._pos + slot0._speed
end
ys.Battle.BattelUAVUnit.changeToMoveState = function (slot0)
slot0._cruiseLimit = slot0._centerPos.x
slot0.updatePatrol = slot0._updateMove
end
ys.Battle.BattelUAVUnit._updateMove = function (slot0, slot1)
slot0:UpdateSpeed()
slot0._pos = slot0._pos + slot0._speed
if slot0._IFF == slot0.FRIENDLY_CODE then
if slot0._cruiseLimit < slot0._pos.x then
slot0:changePartolState(slot1.HOVER_STATE)
end
elseif slot0._IFF == slot0.FOE_CODE and slot0._pos.x < slot0._cruiseLimit then
slot0:changePartolState(slot1.HOVER_STATE)
end
end
ys.Battle.BattelUAVUnit.changeToHoverState = function (slot0)
slot0._hoverStartTime = pg.TimeMgr.GetInstance():GetCombatTime()
slot0.updatePatrol = slot0._updateHover
end
ys.Battle.BattelUAVUnit._updateHover = function (slot0, slot1)
slot0._pos = Vector3(math.sin(slot2) * slot0._range, 15, math.cos(slot2) * slot0._range):Add(slot0._centerPos)
end
ys.Battle.BattelUAVUnit.GetSize = function (slot0)
if slot0._portalState == slot0.HOVER_STATE then
if math.cos(slot1) > 0 and slot2 < 0.2 then
slot2 = 0.2
elseif slot2 <= 0 and slot2 > -0.2 then
slot2 = -0.2
end
return slot2
else
slot0.super.GetSize(slot0)
end
end
return
|
project "Sim"
generateMessages("../src/sim/events")
language "C#"
kind "SharedLib"
files { "../src/sim/**.cs", "../src/sim/**.event"}
links { "System", "OpenTK", "Util", "Engine", "Renderer", "Audio", "Engine", "GpuNoise", "Terrain", "UI", "Lua" }
location "sim"
vpaths { ["*"] = "../src/sim" }
|
--[[
@Authors: Ben Dol (BeniS)
@Details: Helper methods for global use.
]]
Helper = {}
function Helper.safeDelay(min, max)
if g_game.isOfficialTibia() then
return math.random(min, max)
end
return min
end
function Helper.safeUseInventoryItem(itemId, forceCheck)
if forceCheck or g_game.isOfficialTibia() then
local player = g_game.getLocalPlayer()
if player:getItemsCount(itemId) < 1 then
return false
end
end
if g_game.getProtocolVersion() < 800 then -- Need to verify
local item = g_game.findPlayerItem(itemId, -1)
if item then
if item:getSubType() > 1 then
g_game.use(item, thing)
else
g_game.useInventoryItem(itemId, thing)
end
return true
end
return false
end
g_game.useInventoryItem(itemId)
return true
end
function Helper.safeUseInventoryItemWith(itemId, thing, forceCheck)
if forceCheck or g_game.isOfficialTibia() then
local player = g_game.getLocalPlayer()
if player:getItemsCount(itemId) < 1 then
return false
end
end
if g_game.getProtocolVersion() < 800 then -- Need to verify
local item = g_game.findPlayerItem(itemId, -1)
if item then
if item:getSubType() > 1 then
g_game.useWith(item, thing)
else
g_game.useInventoryItemWith(itemId, thing)
end
return true
end
return false
end
g_game.useInventoryItemWith(itemId, thing)
return true
end
function Helper.castSpell(player, words, defaultGroupId)
local spell = nil
if BotModule.isPrecisionMode() then
spell = Spells.getSpellByWords(words)
end
if defaultGroupId then
local groupCooldown = modules.game_cooldown.isGroupCooldownIconActive(defaultGroupId)
if groupCooldown then
BotLogger.debug(SpellGroups[defaultGroupId].." group cooldown is active.")
return false
end
end
local playerId = player:getId()
if spell then
local iconId = spell.id
local cooldown = modules.game_cooldown.isCooldownIconActive(iconId)
if cooldown then
BotLogger.debug("Spell "..tostring(iconId).." cooldown is active")
return false
end
for groupId,_ in pairs(spell.group) do
local groupCooldown = modules.game_cooldown.isGroupCooldownIconActive(groupId)
if groupCooldown then
BotLogger.debug("Group "..SpellGroups[groupId].." cooldown is active")
return false
end
end
if player:getSoul() < spell.soul then
BotLogger.warning("Not enough soul points("..spell.soul..") to cast this spell.")
return false
end
if Helper.hasEnoughMana(player, spell) then
g_game.talk(spell.words)
end
else
if player:getMana() > 0 then
g_game.talk(words)
end
end
return true
end
function Helper.hasEnoughMana(player, spell)
if type(spell) ~= "table" then
spell = Spells.getSpellByWords(spell)
end
if spell then
return player:getMana() >= spell.mana
end
return player:getMana() > 0
end
function Helper.getSpellDelay(words)
local delay = 0
local ping = g_game.getPing()
if ping < 1 then ping = 150 end
delay = ping * 2 -- default delay
if BotModule.isPrecisionMode() then
local spell = Spells.getSpellByWords(words)
if spell then
delay = spell.exhaustion + (ping / 3)
end
end
return Helper.safeDelay(delay, delay + 200)
end
function Helper.getItemUseDelay()
local ping = g_game.getPing()
if ping < 1 then
ping = 150
end
return Helper.safeDelay(ping + 200, ping + 400)
end
function Helper.getRandomVocationSpell(vocId, groups)
local vocSpells = Spells.getSpellsByVocationId(vocId)
local spells = Spells.filterSpellsByGroups(vocSpells, groups)
return not table.empty(spells) and spells[math.random(1,#spells)] or {}
end
function Helper.startChooseItem(releaseCallback, param)
if not releaseCallback then
error("No mouse release callback parameter set.")
end
local mouseGrabberWidget = g_ui.createWidget('UIWidget')
mouseGrabberWidget:setVisible(false)
mouseGrabberWidget:setFocusable(false)
connect(mouseGrabberWidget, { onMouseRelease = function(self, mousePosition, mouseButton)
local item = nil
if mouseButton == MouseLeftButton then
local clickedWidget = modules.game_interface.getRootPanel()
:recursiveGetChildByPos(mousePosition, false)
if clickedWidget then
if clickedWidget:getClassName() == 'UIMap' then
local tile = clickedWidget:getTile(mousePosition)
if tile then
local thing = tile:getTopMoveThing()
if thing then
item = thing:asItem()
end
end
elseif clickedWidget:getClassName() == 'UIItem' and not clickedWidget:isVirtual() then
item = clickedWidget:getItem()
end
end
end
if releaseCallback(self, item, param) then
-- revert mouse change
g_mouse.popCursor()
self:ungrabMouse()
self:destroy()
end
end })
mouseGrabberWidget:grabMouse()
g_mouse.pushCursor('target')
ShaykieBot.hide()
end
function Helper.getActiveRingId(itemid)
return RingIds[itemid]
end
function Helper.getRingIdByName(name)
return Rings[name]
end
function Helper.getItemFromTiles(tiles, itemId)
local items = {}
for _,tile in pairs(tiles) do
if tile and tile:getThing() then
if table.contains(itemId, tile:getThing():getId()) then
table.insert(items, tile)
end
end
end
return items
end
function Helper.explode(div,str)
if (div=='') then return false end
local pos,arr = 0,{}
-- for each divider found
for st,sp in function() return string.find(str,div,pos,true) end do
table.insert(arr,string.sub(str,pos,st-1)) -- Attach chars left of current divider
pos = sp + 1 -- Jump past current divider
end
table.insert(arr,string.sub(str,pos)) -- Attach chars right of last divider
return arr
end
local numbers = { 1, 5, 10, 50, 100, 500, 1000 }
local chars = { "I", "V", "X", "L", "C", "D", "M" }
function Helper.ToRomanNumerals(s)
--s = tostring(s)
s = tonumber(s)
if not s or s ~= s then error"Unable to convert to number" end
if s == math.huge then error"Unable to convert infinity" end
s = math.floor(s)
if s <= 0 then return s end
local ret = ""
for i = #numbers, 1, -1 do
local num = numbers[i]
while s - num >= 0 and s > 0 do
ret = ret .. chars[i]
s = s - num
end
--for j = i - 1, 1, -1 do
for j = 1, i - 1 do
local n2 = numbers[j]
if s - (num - n2) >= 0 and s < num and s > 0 and num - n2 ~= n2 then
ret = ret .. chars[j] .. chars[i]
s = s - (num - n2)
break
end
end
end
return ret
end |
local Tunnel = PlayState:addState('Tunnel')
local DURATION = 35.2 - 23.5
function Tunnel:enteredState()
if ANDROID or IOS then
love.system.unlockAchievement(IDS.ACH_REACH_THE_TUNNEL)
end
local hallway = self:addEntity(Hallway())
self:flashWhite(1.0)
local tunnel = self:addEntity(TunnelEntity())
self.timer:after(DURATION, function()
hallway:destroy()
tunnel:destroy()
self:gotoState('Endless')
end)
end
|
-- -*- lua -*-
help([[
This loads the MKL library environment.
Version 2018.2.
Modifies: LD_LIBRARY_PATH, LIBRARY_PATH, MANPATH, NLSPATH, CPATH, MIC_LIBRARY_PATH, MIC_LD_LIBRARY_PATH
]])
-- Here are some local variables for paths and version numbering
local pkgVersion = '18.0.2'
local pkgName = 'mkl'
local pkgNameVer = pathJoin(pkgName,pkgVersion)
local mkl_root = '/appl/opt/mkl/2018.2/mkl'
-- This tells the module system that this module is a compiler
-- family('compiler')
prepend_path('MKLROOT', pathJoin(mkl_root))
-- prepend_path('MANPATH', pathJoin(mkl_root,'man/en_US'))
prepend_path('NLSPATH', pathJoin(mkl_root,'lib/intel64/locale/%l_%t/%N'))
prepend_path('LD_LIBRARY_PATH', pathJoin(mkl_root,'lib/intel64_lin'))
prepend_path('LD_LIBRARY_PATH', pathJoin(mkl_root,'../tbb/lib/intel64_lin/gcc4.7'))
prepend_path('LIBRARY_PATH', pathJoin(mkl_root,'lib/intel64_lin'))
prepend_path('LIBRARY_PATH', pathJoin(mkl_root,'../tbb/lib/intel64_lin/gcc4.7'))
prepend_path('CPATH', pathJoin(mkl_root,'include'))
prepend_path('CPATH', pathJoin(mkl_root,'../tbb/include'))
-- prepend_path('FPATH', pathJoin(mkl_root,'mkl/include'))
-- prepend_path('INCLUDE', pathJoin(mkl_root,'mkl/include'))
-- F95ROOT variable into compiler dependant fortran 95 libraries (not needed for Intel compiler)
prepend_path('F95ROOT', pathJoin(mkl_root,'mkl_gnu_interface'))
prepend_path('TBBROOT','/homeappl/appl_taito/opt/mkl/2018.2/compilers_and_libraries_2018.2.199/linux/tbb')
-- This part adds the new directory to the modulepath
-- Add compiler dependent module files to this directory!
-- local modulepath_root = os.getenv("MODULEPATH_ROOT")
-- prepend_path('MODULEPATH', pathJoin(modulepath_root,"Compiler",pkgNameVer))
|
----------------------------------------------------------------------
-- L00: Leatrix Maps Library
----------------------------------------------------------------------
-- LibDBIcon 8.0.4 by funkehdude
-- 11: LibStub: (?s)-- LibStubStart\R?\K.*?(?=-- LibStubEnd)
-- 12: LibCallbackHandler: (?s)-- CallbackStart\R?\K.*?(?=-- CallbackEnd)
-- 13: LibDataBroker: (?s)-- DataBrokerStart\R?\K.*?(?=-- DataBrokerEnd)
-- 14: LibDBIcon: (?s)-- LibDBIconStart\R?\K.*?(?=-- LibDBIconEnd)
----------------------------------------------------------------------
-- L11: LibDBIcon: LibStub
----------------------------------------------------------------------
local function LeaLibStub()
-- LibStubStart
-- $Id: LibStub.lua 76 2007-09-03 01:50:17Z mikk $
-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info
-- LibStub is hereby placed in the Public Domain
-- Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS!
local LibStub = _G[LIBSTUB_MAJOR]
-- Check to see is this version of the stub is obsolete
if not LibStub or LibStub.minor < LIBSTUB_MINOR then
LibStub = LibStub or {libs = {}, minors = {} }
_G[LIBSTUB_MAJOR] = LibStub
LibStub.minor = LIBSTUB_MINOR
-- LibStub:NewLibrary(major, minor)
-- major (string) - the major version of the library
-- minor (string or number ) - the minor version of the library
--
-- returns nil if a newer or same version of the lib is already present
-- returns empty library object or old library object if upgrade is needed
function LibStub:NewLibrary(major, minor)
assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
local oldminor = self.minors[major]
if oldminor and oldminor >= minor then return nil end
self.minors[major], self.libs[major] = minor, self.libs[major] or {}
return self.libs[major], oldminor
end
-- LibStub:GetLibrary(major, [silent])
-- major (string) - the major version of the library
-- silent (boolean) - if true, library is optional, silently return nil if its not found
--
-- throws an error if the library can not be found (except silent is set)
-- returns the library object if found
function LibStub:GetLibrary(major, silent)
if not self.libs[major] and not silent then
error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
end
return self.libs[major], self.minors[major]
end
-- LibStub:IterateLibraries()
--
-- Returns an iterator for the currently registered libraries
function LibStub:IterateLibraries()
return pairs(self.libs)
end
setmetatable(LibStub, { __call = LibStub.GetLibrary })
end
-- LibStubEnd
end
LeaLibStub()
----------------------------------------------------------------------
-- L12: LibDBIcon: CallbackHandler
----------------------------------------------------------------------
local function LeaCallbackHandler()
-- CallbackStart
--[[ $Id: CallbackHandler-1.0.lua 1186 2018-07-21 14:19:18Z nevcairiel $ ]]
local MAJOR, MINOR = "CallbackHandler-1.0", 7
local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
if not CallbackHandler then return end -- No upgrade needed
local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end}
-- Lua APIs
local tconcat = table.concat
local assert, error, loadstring = assert, error, loadstring
local setmetatable, rawset, rawget = setmetatable, rawset, rawget
local next, select, pairs, type, tostring = next, select, pairs, type, tostring
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
-- List them here for Mikk's FindGlobals script
-- GLOBALS: geterrorhandler
local xpcall = xpcall
local function errorhandler(err)
return geterrorhandler()(err)
end
local function Dispatch(handlers, ...)
local index, method = next(handlers)
if not method then return end
repeat
xpcall(method, errorhandler, ...)
index, method = next(handlers, index)
until not method
end
--------------------------------------------------------------------------
-- CallbackHandler:New
--
-- target - target object to embed public APIs in
-- RegisterName - name of the callback registration API, default "RegisterCallback"
-- UnregisterName - name of the callback unregistration API, default "UnregisterCallback"
-- UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API.
function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName)
RegisterName = RegisterName or "RegisterCallback"
UnregisterName = UnregisterName or "UnregisterCallback"
if UnregisterAllName==nil then -- false is used to indicate "don't want this method"
UnregisterAllName = "UnregisterAllCallbacks"
end
-- we declare all objects and exported APIs inside this closure to quickly gain access
-- to e.g. function names, the "target" parameter, etc
-- Create the registry object
local events = setmetatable({}, meta)
local registry = { recurse=0, events=events }
-- registry:Fire() - fires the given event/message into the registry
function registry:Fire(eventname, ...)
if not rawget(events, eventname) or not next(events[eventname]) then return end
local oldrecurse = registry.recurse
registry.recurse = oldrecurse + 1
Dispatch(events[eventname], eventname, ...)
registry.recurse = oldrecurse
if registry.insertQueue and oldrecurse==0 then
-- Something in one of our callbacks wanted to register more callbacks; they got queued
for eventname,callbacks in pairs(registry.insertQueue) do
local first = not rawget(events, eventname) or not next(events[eventname]) -- test for empty before. not test for one member after. that one member may have been overwritten.
for self,func in pairs(callbacks) do
events[eventname][self] = func
-- fire OnUsed callback?
if first and registry.OnUsed then
registry.OnUsed(registry, target, eventname)
first = nil
end
end
end
registry.insertQueue = nil
end
end
-- Registration of a callback, handles:
-- self["method"], leads to self["method"](self, ...)
-- self with function ref, leads to functionref(...)
-- "addonId" (instead of self) with function ref, leads to functionref(...)
-- all with an optional arg, which, if present, gets passed as first argument (after self if present)
target[RegisterName] = function(self, eventname, method, ... --[[actually just a single arg]])
if type(eventname) ~= "string" then
error("Usage: "..RegisterName.."(eventname, method[, arg]): 'eventname' - string expected.", 2)
end
method = method or eventname
local first = not rawget(events, eventname) or not next(events[eventname]) -- test for empty before. not test for one member after. that one member may have been overwritten.
if type(method) ~= "string" and type(method) ~= "function" then
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - string or function expected.", 2)
end
local regfunc
if type(method) == "string" then
-- self["method"] calling style
if type(self) ~= "table" then
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): self was not a table?", 2)
elseif self==target then
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): do not use Library:"..RegisterName.."(), use your own 'self'", 2)
elseif type(self[method]) ~= "function" then
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - method '"..tostring(method).."' not found on self.", 2)
end
if select("#",...)>=1 then -- this is not the same as testing for arg==nil!
local arg=select(1,...)
regfunc = function(...) self[method](self,arg,...) end
else
regfunc = function(...) self[method](self,...) end
end
else
-- function ref with self=object or self="addonId" or self=thread
if type(self)~="table" and type(self)~="string" and type(self)~="thread" then
error("Usage: "..RegisterName.."(self or \"addonId\", eventname, method): 'self or addonId': table or string or thread expected.", 2)
end
if select("#",...)>=1 then -- this is not the same as testing for arg==nil!
local arg=select(1,...)
regfunc = function(...) method(arg,...) end
else
regfunc = method
end
end
if events[eventname][self] or registry.recurse<1 then
-- if registry.recurse<1 then
-- we're overwriting an existing entry, or not currently recursing. just set it.
events[eventname][self] = regfunc
-- fire OnUsed callback?
if registry.OnUsed and first then
registry.OnUsed(registry, target, eventname)
end
else
-- we're currently processing a callback in this registry, so delay the registration of this new entry!
-- yes, we're a bit wasteful on garbage, but this is a fringe case, so we're picking low implementation overhead over garbage efficiency
registry.insertQueue = registry.insertQueue or setmetatable({},meta)
registry.insertQueue[eventname][self] = regfunc
end
end
-- Unregister a callback
target[UnregisterName] = function(self, eventname)
if not self or self==target then
error("Usage: "..UnregisterName.."(eventname): bad 'self'", 2)
end
if type(eventname) ~= "string" then
error("Usage: "..UnregisterName.."(eventname): 'eventname' - string expected.", 2)
end
if rawget(events, eventname) and events[eventname][self] then
events[eventname][self] = nil
-- Fire OnUnused callback?
if registry.OnUnused and not next(events[eventname]) then
registry.OnUnused(registry, target, eventname)
end
end
if registry.insertQueue and rawget(registry.insertQueue, eventname) and registry.insertQueue[eventname][self] then
registry.insertQueue[eventname][self] = nil
end
end
-- OPTIONAL: Unregister all callbacks for given selfs/addonIds
if UnregisterAllName then
target[UnregisterAllName] = function(...)
if select("#",...)<1 then
error("Usage: "..UnregisterAllName.."([whatFor]): missing 'self' or \"addonId\" to unregister events for.", 2)
end
if select("#",...)==1 and ...==target then
error("Usage: "..UnregisterAllName.."([whatFor]): supply a meaningful 'self' or \"addonId\"", 2)
end
for i=1,select("#",...) do
local self = select(i,...)
if registry.insertQueue then
for eventname, callbacks in pairs(registry.insertQueue) do
if callbacks[self] then
callbacks[self] = nil
end
end
end
for eventname, callbacks in pairs(events) do
if callbacks[self] then
callbacks[self] = nil
-- Fire OnUnused callback?
if registry.OnUnused and not next(callbacks) then
registry.OnUnused(registry, target, eventname)
end
end
end
end
end
end
return registry
end
-- CallbackHandler purposefully does NOT do explicit embedding. Nor does it
-- try to upgrade old implicit embeds since the system is selfcontained and
-- relies on closures to work.
-- CallbackEnd
end
LeaCallbackHandler()
----------------------------------------------------------------------
-- L13: LibDBIcon: LibDataBroker
----------------------------------------------------------------------
local function LeaDataBroker()
-- DataBrokerStart
assert(LibStub, "LibDataBroker-1.1 requires LibStub")
assert(LibStub:GetLibrary("CallbackHandler-1.0", true), "LibDataBroker-1.1 requires CallbackHandler-1.0")
local lib, oldminor = LibStub:NewLibrary("LibDataBroker-1.1", 4)
if not lib then return end
oldminor = oldminor or 0
lib.callbacks = lib.callbacks or LibStub:GetLibrary("CallbackHandler-1.0"):New(lib)
lib.attributestorage, lib.namestorage, lib.proxystorage = lib.attributestorage or {}, lib.namestorage or {}, lib.proxystorage or {}
local attributestorage, namestorage, callbacks = lib.attributestorage, lib.namestorage, lib.callbacks
if oldminor < 2 then
lib.domt = {
__metatable = "access denied",
__index = function(self, key) return attributestorage[self] and attributestorage[self][key] end,
}
end
if oldminor < 3 then
lib.domt.__newindex = function(self, key, value)
if not attributestorage[self] then attributestorage[self] = {} end
if attributestorage[self][key] == value then return end
attributestorage[self][key] = value
local name = namestorage[self]
if not name then return end
callbacks:Fire("LibDataBroker_AttributeChanged", name, key, value, self)
callbacks:Fire("LibDataBroker_AttributeChanged_"..name, name, key, value, self)
callbacks:Fire("LibDataBroker_AttributeChanged_"..name.."_"..key, name, key, value, self)
callbacks:Fire("LibDataBroker_AttributeChanged__"..key, name, key, value, self)
end
end
if oldminor < 2 then
function lib:NewDataObject(name, dataobj)
if self.proxystorage[name] then return end
if dataobj then
assert(type(dataobj) == "table", "Invalid dataobj, must be nil or a table")
self.attributestorage[dataobj] = {}
for i,v in pairs(dataobj) do
self.attributestorage[dataobj][i] = v
dataobj[i] = nil
end
end
dataobj = setmetatable(dataobj or {}, self.domt)
self.proxystorage[name], self.namestorage[dataobj] = dataobj, name
self.callbacks:Fire("LibDataBroker_DataObjectCreated", name, dataobj)
return dataobj
end
end
if oldminor < 1 then
function lib:DataObjectIterator()
return pairs(self.proxystorage)
end
function lib:GetDataObjectByName(dataobjectname)
return self.proxystorage[dataobjectname]
end
function lib:GetNameByDataObject(dataobject)
return self.namestorage[dataobject]
end
end
if oldminor < 4 then
local next = pairs(attributestorage)
function lib:pairs(dataobject_or_name)
local t = type(dataobject_or_name)
assert(t == "string" or t == "table", "Usage: ldb:pairs('dataobjectname') or ldb:pairs(dataobject)")
local dataobj = self.proxystorage[dataobject_or_name] or dataobject_or_name
assert(attributestorage[dataobj], "Data object not found")
return next, attributestorage[dataobj], nil
end
local ipairs_iter = ipairs(attributestorage)
function lib:ipairs(dataobject_or_name)
local t = type(dataobject_or_name)
assert(t == "string" or t == "table", "Usage: ldb:ipairs('dataobjectname') or ldb:ipairs(dataobject)")
local dataobj = self.proxystorage[dataobject_or_name] or dataobject_or_name
assert(attributestorage[dataobj], "Data object not found")
return ipairs_iter, attributestorage[dataobj], 0
end
end
-- DataBrokerEnd
end
LeaDataBroker()
----------------------------------------------------------------------
-- L14: LibDBIcon: LibDBIcon
----------------------------------------------------------------------
local function LeaLibDBIcon()
-- LibDBIconStart
-----------------------------------------------------------------------
-- LibDBIcon-1.0
--
-- Allows addons to easily create a lightweight minimap icon as an alternative to heavier LDB displays.
--
local DBICON10 = "LibDBIcon-1.0"
local DBICON10_MINOR = 43 -- Bump on changes
if not LibStub then error(DBICON10 .. " requires LibStub.") end
local ldb = LibStub("LibDataBroker-1.1", true)
if not ldb then error(DBICON10 .. " requires LibDataBroker-1.1.") end
local lib = LibStub:NewLibrary(DBICON10, DBICON10_MINOR)
if not lib then return end
lib.objects = lib.objects or {}
lib.callbackRegistered = lib.callbackRegistered or nil
lib.callbacks = lib.callbacks or LibStub("CallbackHandler-1.0"):New(lib)
lib.notCreated = lib.notCreated or {}
lib.radius = lib.radius or 5
lib.tooltip = lib.tooltip or CreateFrame("GameTooltip", "LibDBIconTooltip", UIParent, "GameTooltipTemplate")
local next, Minimap = next, Minimap
local isDraggingButton = false
function lib:IconCallback(event, name, key, value)
if lib.objects[name] then
if key == "icon" then
lib.objects[name].icon:SetTexture(value)
elseif key == "iconCoords" then
lib.objects[name].icon:UpdateCoord()
elseif key == "iconR" then
local _, g, b = lib.objects[name].icon:GetVertexColor()
lib.objects[name].icon:SetVertexColor(value, g, b)
elseif key == "iconG" then
local r, _, b = lib.objects[name].icon:GetVertexColor()
lib.objects[name].icon:SetVertexColor(r, value, b)
elseif key == "iconB" then
local r, g = lib.objects[name].icon:GetVertexColor()
lib.objects[name].icon:SetVertexColor(r, g, value)
end
end
end
if not lib.callbackRegistered then
ldb.RegisterCallback(lib, "LibDataBroker_AttributeChanged__icon", "IconCallback")
ldb.RegisterCallback(lib, "LibDataBroker_AttributeChanged__iconCoords", "IconCallback")
ldb.RegisterCallback(lib, "LibDataBroker_AttributeChanged__iconR", "IconCallback")
ldb.RegisterCallback(lib, "LibDataBroker_AttributeChanged__iconG", "IconCallback")
ldb.RegisterCallback(lib, "LibDataBroker_AttributeChanged__iconB", "IconCallback")
lib.callbackRegistered = true
end
local function getAnchors(frame)
local x, y = frame:GetCenter()
if not x or not y then return "CENTER" end
local hhalf = (x > UIParent:GetWidth()*2/3) and "RIGHT" or (x < UIParent:GetWidth()/3) and "LEFT" or ""
local vhalf = (y > UIParent:GetHeight()/2) and "TOP" or "BOTTOM"
return vhalf..hhalf, frame, (vhalf == "TOP" and "BOTTOM" or "TOP")..hhalf
end
local function onEnter(self)
if isDraggingButton then return end
for _, button in next, lib.objects do
if button.showOnMouseover then
button.fadeOut:Stop()
button:SetAlpha(1)
end
end
local obj = self.dataObject
if obj.OnTooltipShow then
lib.tooltip:SetOwner(self, "ANCHOR_NONE")
lib.tooltip:SetPoint(getAnchors(self))
obj.OnTooltipShow(lib.tooltip)
lib.tooltip:Show()
elseif obj.OnEnter then
obj.OnEnter(self)
end
end
local function onLeave(self)
lib.tooltip:Hide()
if not isDraggingButton then
for _, button in next, lib.objects do
if button.showOnMouseover then
button.fadeOut:Play()
end
end
end
local obj = self.dataObject
if obj.OnLeave then
obj.OnLeave(self)
end
end
--------------------------------------------------------------------------------
local onDragStart, updatePosition
do
local minimapShapes = {
["ROUND"] = {true, true, true, true},
["SQUARE"] = {false, false, false, false},
["CORNER-TOPLEFT"] = {false, false, false, true},
["CORNER-TOPRIGHT"] = {false, false, true, false},
["CORNER-BOTTOMLEFT"] = {false, true, false, false},
["CORNER-BOTTOMRIGHT"] = {true, false, false, false},
["SIDE-LEFT"] = {false, true, false, true},
["SIDE-RIGHT"] = {true, false, true, false},
["SIDE-TOP"] = {false, false, true, true},
["SIDE-BOTTOM"] = {true, true, false, false},
["TRICORNER-TOPLEFT"] = {false, true, true, true},
["TRICORNER-TOPRIGHT"] = {true, false, true, true},
["TRICORNER-BOTTOMLEFT"] = {true, true, false, true},
["TRICORNER-BOTTOMRIGHT"] = {true, true, true, false},
}
local rad, cos, sin, sqrt, max, min = math.rad, math.cos, math.sin, math.sqrt, math.max, math.min
function updatePosition(button, position)
local angle = rad(position or 225)
local x, y, q = cos(angle), sin(angle), 1
if x < 0 then q = q + 1 end
if y > 0 then q = q + 2 end
local minimapShape = GetMinimapShape and GetMinimapShape() or "ROUND"
local quadTable = minimapShapes[minimapShape]
local w = (Minimap:GetWidth() / 2) + lib.radius
local h = (Minimap:GetHeight() / 2) + lib.radius
if quadTable[q] then
x, y = x*w, y*h
else
local diagRadiusW = sqrt(2*(w)^2)-10
local diagRadiusH = sqrt(2*(h)^2)-10
x = max(-w, min(x*diagRadiusW, w))
y = max(-h, min(y*diagRadiusH, h))
end
button:SetPoint("CENTER", Minimap, "CENTER", x, y)
end
end
local function onClick(self, b)
if self.dataObject.OnClick then
self.dataObject.OnClick(self, b)
end
end
local function onMouseDown(self)
self.isMouseDown = true
self.icon:UpdateCoord()
end
local function onMouseUp(self)
self.isMouseDown = false
self.icon:UpdateCoord()
end
do
local deg, atan2 = math.deg, math.atan2
local function onUpdate(self)
local mx, my = Minimap:GetCenter()
local px, py = GetCursorPosition()
local scale = Minimap:GetEffectiveScale()
px, py = px / scale, py / scale
local pos = 225
if self.db then
pos = deg(atan2(py - my, px - mx)) % 360
self.db.minimapPos = pos
else
pos = deg(atan2(py - my, px - mx)) % 360
self.minimapPos = pos
end
updatePosition(self, pos)
end
function onDragStart(self)
self:LockHighlight()
self.isMouseDown = true
self.icon:UpdateCoord()
self:SetScript("OnUpdate", onUpdate)
isDraggingButton = true
lib.tooltip:Hide()
for _, button in next, lib.objects do
if button.showOnMouseover then
button.fadeOut:Stop()
button:SetAlpha(1)
end
end
end
end
local function onDragStop(self)
self:SetScript("OnUpdate", nil)
self.isMouseDown = false
self.icon:UpdateCoord()
self:UnlockHighlight()
isDraggingButton = false
for _, button in next, lib.objects do
if button.showOnMouseover then
button.fadeOut:Play()
end
end
end
local defaultCoords = {0, 1, 0, 1}
local function updateCoord(self)
local coords = self:GetParent().dataObject.iconCoords or defaultCoords
local deltaX, deltaY = 0, 0
if not self:GetParent().isMouseDown then
deltaX = (coords[2] - coords[1]) * 0.05
deltaY = (coords[4] - coords[3]) * 0.05
end
self:SetTexCoord(coords[1] + deltaX, coords[2] - deltaX, coords[3] + deltaY, coords[4] - deltaY)
end
local function createButton(name, object, db)
local button = CreateFrame("Button", "LibDBIcon10_"..name, Minimap)
button.dataObject = object
button.db = db
button:SetFrameStrata("MEDIUM")
button:SetSize(31, 31)
button:SetFrameLevel(8)
button:RegisterForClicks("anyUp")
button:RegisterForDrag("LeftButton")
button:SetHighlightTexture(136477) --"Interface\\Minimap\\UI-Minimap-ZoomButton-Highlight"
local overlay = button:CreateTexture(nil, "OVERLAY")
overlay:SetSize(53, 53)
overlay:SetTexture(136430) --"Interface\\Minimap\\MiniMap-TrackingBorder"
overlay:SetPoint("TOPLEFT")
local background = button:CreateTexture(nil, "BACKGROUND")
background:SetSize(20, 20)
background:SetTexture(136467) --"Interface\\Minimap\\UI-Minimap-Background"
background:SetPoint("TOPLEFT", 7, -5)
local icon = button:CreateTexture(nil, "ARTWORK")
icon:SetSize(17, 17)
icon:SetTexture(object.icon)
icon:SetPoint("TOPLEFT", 7, -6)
button.icon = icon
button.isMouseDown = false
local r, g, b = icon:GetVertexColor()
icon:SetVertexColor(object.iconR or r, object.iconG or g, object.iconB or b)
icon.UpdateCoord = updateCoord
icon:UpdateCoord()
button:SetScript("OnEnter", onEnter)
button:SetScript("OnLeave", onLeave)
button:SetScript("OnClick", onClick)
if not db or not db.lock then
button:SetScript("OnDragStart", onDragStart)
button:SetScript("OnDragStop", onDragStop)
end
button:SetScript("OnMouseDown", onMouseDown)
button:SetScript("OnMouseUp", onMouseUp)
button.fadeOut = button:CreateAnimationGroup()
local animOut = button.fadeOut:CreateAnimation("Alpha")
animOut:SetOrder(1)
animOut:SetDuration(0.2)
animOut:SetFromAlpha(1)
animOut:SetToAlpha(0)
animOut:SetStartDelay(1)
button.fadeOut:SetToFinalAlpha(true)
lib.objects[name] = button
if lib.loggedIn then
updatePosition(button, db and db.minimapPos)
if not db or not db.hide then
button:Show()
else
button:Hide()
end
end
lib.callbacks:Fire("LibDBIcon_IconCreated", button, name) -- Fire 'Icon Created' callback
end
-- We could use a metatable.__index on lib.objects, but then we'd create
-- the icons when checking things like :IsRegistered, which is not necessary.
local function check(name)
if lib.notCreated[name] then
createButton(name, lib.notCreated[name][1], lib.notCreated[name][2])
lib.notCreated[name] = nil
end
end
-- Wait a bit with the initial positioning to let any GetMinimapShape addons
-- load up.
if not lib.loggedIn then
local f = CreateFrame("Frame")
f:SetScript("OnEvent", function(f)
for _, button in next, lib.objects do
updatePosition(button, button.db and button.db.minimapPos)
if not button.db or not button.db.hide then
button:Show()
else
button:Hide()
end
end
lib.loggedIn = true
f:SetScript("OnEvent", nil)
end)
f:RegisterEvent("PLAYER_LOGIN")
end
local function getDatabase(name)
return lib.notCreated[name] and lib.notCreated[name][2] or lib.objects[name].db
end
function lib:Register(name, object, db)
if not object.icon then error("Can't register LDB objects without icons set!") end
if lib.objects[name] or lib.notCreated[name] then error(DBICON10.. ": Object '".. name .."' is already registered.") end
if not db or not db.hide then
createButton(name, object, db)
else
lib.notCreated[name] = {object, db}
end
end
function lib:Lock(name)
if not lib:IsRegistered(name) then return end
if lib.objects[name] then
lib.objects[name]:SetScript("OnDragStart", nil)
lib.objects[name]:SetScript("OnDragStop", nil)
end
local db = getDatabase(name)
if db then
db.lock = true
end
end
function lib:Unlock(name)
if not lib:IsRegistered(name) then return end
if lib.objects[name] then
lib.objects[name]:SetScript("OnDragStart", onDragStart)
lib.objects[name]:SetScript("OnDragStop", onDragStop)
end
local db = getDatabase(name)
if db then
db.lock = nil
end
end
function lib:Hide(name)
if not lib.objects[name] then return end
lib.objects[name]:Hide()
end
function lib:Show(name)
check(name)
local button = lib.objects[name]
if button then
button:Show()
updatePosition(button, button.db and button.db.minimapPos or button.minimapPos)
end
end
function lib:IsRegistered(name)
return (lib.objects[name] or lib.notCreated[name]) and true or false
end
function lib:Refresh(name, db)
check(name)
local button = lib.objects[name]
if db then
button.db = db
end
updatePosition(button, button.db and button.db.minimapPos or button.minimapPos)
if not button.db or not button.db.hide then
button:Show()
else
button:Hide()
end
if not button.db or not button.db.lock then
button:SetScript("OnDragStart", onDragStart)
button:SetScript("OnDragStop", onDragStop)
else
button:SetScript("OnDragStart", nil)
button:SetScript("OnDragStop", nil)
end
end
function lib:GetMinimapButton(name)
return lib.objects[name]
end
do
local function OnMinimapEnter()
if isDraggingButton then return end
for _, button in next, lib.objects do
if button.showOnMouseover then
button.fadeOut:Stop()
button:SetAlpha(1)
end
end
end
local function OnMinimapLeave()
if isDraggingButton then return end
for _, button in next, lib.objects do
if button.showOnMouseover then
button.fadeOut:Play()
end
end
end
Minimap:HookScript("OnEnter", OnMinimapEnter)
Minimap:HookScript("OnLeave", OnMinimapLeave)
function lib:ShowOnEnter(name, value)
local button = lib.objects[name]
if button then
if value then
button.showOnMouseover = true
button.fadeOut:Stop()
button:SetAlpha(0)
else
button.showOnMouseover = false
button.fadeOut:Stop()
button:SetAlpha(1)
end
end
end
end
function lib:GetButtonList()
local t = {}
for name in next, lib.objects do
t[#t+1] = name
end
return t
end
function lib:SetButtonRadius(radius)
if type(radius) == "number" then
lib.radius = radius
for _, button in next, lib.objects do
updatePosition(button, button.db and button.db.minimapPos or button.minimapPos)
end
end
end
function lib:SetButtonToPosition(button, position)
updatePosition(lib.objects[button] or button, position)
end
-- Upgrade!
for name, button in next, lib.objects do
local db = getDatabase(name)
if not db or not db.lock then
button:SetScript("OnDragStart", onDragStart)
button:SetScript("OnDragStop", onDragStop)
end
button:SetScript("OnEnter", onEnter)
button:SetScript("OnLeave", onLeave)
button:SetScript("OnClick", onClick)
button:SetScript("OnMouseDown", onMouseDown)
button:SetScript("OnMouseUp", onMouseUp)
if not button.fadeOut then -- Upgrade to 39
button.fadeOut = button:CreateAnimationGroup()
local animOut = button.fadeOut:CreateAnimation("Alpha")
animOut:SetOrder(1)
animOut:SetDuration(0.2)
animOut:SetFromAlpha(1)
animOut:SetToAlpha(0)
animOut:SetStartDelay(1)
button.fadeOut:SetToFinalAlpha(true)
end
end
lib:SetButtonRadius(lib.radius) -- Upgrade to 40
-- LibDBIconEnd
end
LeaLibDBIcon()
-- L15: End
|
precondition = "ENEMIES_CONTAINED_DEAD"
function onEnterTrigger(context, trigger, collider)
DisableMovementInput(context);
DisableAbilityInput(context);
player = GetPlayerCharacter(context);
MoveTo(player, 65, 15, 5.0);
Yield(trigger, 5.0);
CameraMoveTo(context, 72, 15, 1.0);
CameraZoomTo(context, 2, 1.0);
DisplayTextbox(context, "Crusader", "That seems to be the last of those corrupted sheep.");
YieldUntilInput(trigger);
DisplayTextbox(context, "??", "A young voice, you believe belonging to the boy from earlier, calls to you from afar.");
YieldUntilInput(trigger);
PlaySound(context, "kid_took_daisy.adpcm");
DisplayTextbox(context, "Boy", "Mister! They... they took daisy!");
YieldUntilInput(trigger);
DisplayTextbox(context, "Boy", "The men in red took her Mister!");
YieldUntilInput(trigger);
DisplayTextbox(context, "Crusader", "Men in red? Does he mean... the red cloaks? What are they doing here?");
YieldUntilInput(trigger);
DisplayTextbox(context, "Crusader", "No matter, it seems another group of hertics have brought the wrong kind of attention to themselves.");
YieldUntilInput(trigger);
DisplayTextbox(context, "Crusader", "Time to do what I do best...");
YieldUntilInput(trigger);
DisplayTextbox(context, "Crusader", "Crusade!");
AwardExp(player, 150);
x, y = GetPosition(player);
CameraZoomTo(context, .75, 5.0);
Yield(trigger, 5.0);
EndLevel(context);
end
function onExitTrigger(context, trigger, collider)
end |
local mod = mod_loader.mods[modApi.currentMod]
local path = mod.scriptPath
local utils = require(path .."libs/utils")
local menu = require(path .."libs/menu")
local UiAnim2 = require(path .."ui/anim/uiAnim2")
local UiCover = require(path .."ui/cover")
local Ui2 = require(path .."ui/Ui2")
local this = Class.inherit(UiCover)
function this:new(adjust, color, duration_in, duration_out)
UiCover.new(self, adjust, color, duration)
self:width(1):height(1)
self.animations.fade = nil
self.animations.fadeout = UiAnim2(self, duration_out or 100, function(anim, widget, percent)
widget.fadein = false
widget.fadeout = percent
end)
self.animations.fadein = UiAnim2(self, duration_in or 100, function(anim, widget, percent)
widget.fadein = percent
widget.fadeout = false
end)
function self.animations.fadein:update(dt)
local widget = self.widget
local currentAnim = widget.currentAnim
if menu.isOpen() or sdlext.isConsoleOpen() or widget.isDestroy then
if currentAnim.anim == self then
widget.isFade = false
self:stop()
widget.animations.fadeout:start((1 - currentAnim.percent) * widget.animations.fadeout.msTimeTotal)
end
elseif currentAnim.anim == widget.animations.fadeout then
widget.animations.fadeout:stop()
self:start((1 - currentAnim.percent) * self.msTimeTotal)
end
UiAnim2.update(self, dt)
end
self.animations.fadein.onStarted = function(anim, widget)
widget.isFade = false
end
self.animations.fadein.onFinished = function(anim, widget)
widget.isFade = true
end
self.animations.fadeout.onStarted = function(anim, widget)
widget.isFade = false
end
self.animations.fadeout.onFinished = function(anim, widget)
widget.isFade = false
if widget.isDestroy then
widget.onDestroy()
end
end
self.animations.fadein:start()
end
function this:isUpdate(screen)
return
self._fadein ~= self.fadein or
self._fadeout ~= self.fadeout or
Ui2.isUpdate(self, screen)
end
function this:update(screen)
self._fadein = self.fadein
self._fadeout = self.fadeout
if self.fadeout then
local percent = utils.interpolate(self.fadeout, 0, 1, 1, 1)
self.decorations[2].color = InterpolateColor(
self.color,
self.colorTransparent,
percent
)
elseif self.fadein then
local percent = utils.interpolate(self.fadein, 1, 1, 1, 0)
self.decorations[2].color = InterpolateColor(
self.color,
self.colorTransparent,
percent
)
end
Ui2.update(self, screen)
end
-- opens the ui and destroys itself after calling back function fn.
function this:destroy(fn)
assert(type(fn) == 'function')
self.isDestroy = true
self.onDestroy = fn
end
function this:draw(screen)
Ui2.draw(self, screen)
end
return this |
-- Destroys cargo over time
if onClient() then return end
-- namespace DestroyCargoBuff
DestroyCargoBuff = {}
local data
function DestroyCargoBuff.initialize(volume, frequency)
if volume and frequency then
data = {
volume = volume,
frequency = frequency
}
end
end
function DestroyCargoBuff.secure()
return data
end
function DestroyCargoBuff.restore(_data)
if _data then
data = _data
end
end
function DestroyCargoBuff.getUpdateInterval()
return data and data.frequency or 1
end
function DestroyCargoBuff.updateParallelSelf()
if not data then return end -- we CAN'T terminate buffs even if arguments are wrong - this will mess up other scripts!
Entity():destroyCargo(data.volume)
end |
local Screen = require "widgets/screen"
local AnimButton = require "widgets/animbutton"
local ImageButton = require "widgets/imagebutton"
local Text = require "widgets/text"
local Image = require "widgets/image"
local Widget = require "widgets/widget"
local Levels = require "map/levels"
require("constants")
local controls_per_screen = 8
local controls_per_scroll = 8
local column_offsets_x_pos = -RESOLUTION_X*0.18;
local column_offsets_y_pos = RESOLUTION_Y*0.23;
local column_offsets
if JapaneseOnPS4() then
column_offsets ={
DAYS_LIVED = -35,
DECEASED = 100,
CAUSE = 290,
MODE = 500,
}
else
column_offsets ={
DAYS_LIVED = 0,
DECEASED = 120,
CAUSE = 290,
MODE = 460,
}
end
local MorgueScreen = Class(Screen, function(self, in_game)
Widget._ctor(self, "MorgueScreen")
self.bg = self:AddChild(Image("images/ui.xml", "bg_plain.tex"))
if IsDLCInstalled(REIGN_OF_GIANTS) then
self.bg:SetTint(BGCOLOURS.PURPLE[1],BGCOLOURS.PURPLE[2],BGCOLOURS.PURPLE[3], 1)
else
self.bg:SetTint(BGCOLOURS.RED[1],BGCOLOURS.RED[2],BGCOLOURS.RED[3], 1)
end
self.bg:SetVRegPoint(ANCHOR_MIDDLE)
self.bg:SetHRegPoint(ANCHOR_MIDDLE)
self.bg:SetVAnchor(ANCHOR_MIDDLE)
self.bg:SetHAnchor(ANCHOR_MIDDLE)
self.bg:SetScaleMode(SCALEMODE_FILLSCREEN)
self.scaleroot = self:AddChild(Widget("scaleroot"))
self.scaleroot:SetVAnchor(ANCHOR_MIDDLE)
self.scaleroot:SetHAnchor(ANCHOR_MIDDLE)
self.scaleroot:SetScaleMode(SCALEMODE_PROPORTIONAL)
self.root = self.scaleroot:AddChild(Widget("root"))
self.root:SetScale(.9)
self.root:SetPosition(0,10,0)
local left_col = -RESOLUTION_X*.05 - 60
local right_col = RESOLUTION_X*.40 - 130
--add the controls panel
self.control_offset = 0
self.obits_panel = self.root:AddChild(Widget("obits_panel"))
self.obits_panel:SetPosition(left_col,0,0)
self.obits_panelbg = self.obits_panel:AddChild(Image("images/fepanels.xml", "panel_obituaries.tex"))
if JapaneseOnPS4() then
self.obits_panelbg:SetScale(1.15,1,1)
end
self.devicetitle = self.obits_panel:AddChild(Text(TITLEFONT, 55))
self.devicetitle:SetHAlign(ANCHOR_MIDDLE)
self.devicetitle:SetPosition(0, RESOLUTION_Y*0.30, 0)
self.devicetitle:SetRegionSize( 400, 70 )
self.devicetitle:SetString(STRINGS.UI.MORGUESCREEN.TITLE)
local font_size = 35
if JapaneseOnPS4() then
font_size = 35 * 0.75;
end
self.obits_titles = self.obits_panel:AddChild(Widget("obits_titles"))
self.obits_titles:SetPosition(column_offsets_x_pos, column_offsets_y_pos, 0)
if JapaneseOnPS4() then
self.DAYS_LIVED = self.obits_titles:AddChild(Text(TITLEFONT, font_size * 0.8))
else
self.DAYS_LIVED = self.obits_titles:AddChild(Text(TITLEFONT, font_size))
end
self.DAYS_LIVED:SetHAlign(ANCHOR_MIDDLE)
self.DAYS_LIVED:SetPosition(column_offsets.DAYS_LIVED, 0, 0)
self.DAYS_LIVED:SetRegionSize( 400, 70 )
self.DAYS_LIVED:SetString(STRINGS.UI.MORGUESCREEN.DAYS_LIVED)
self.DAYS_LIVED:SetColour(177.0/255.0,154/255.0,120/255.0, 1)
self.DECEASED = self.obits_titles:AddChild(Text(TITLEFONT, font_size))
self.DECEASED:SetHAlign(ANCHOR_MIDDLE)
self.DECEASED:SetPosition(column_offsets.DECEASED, 0, 0)
self.DECEASED:SetRegionSize( 400, 70 )
self.DECEASED:SetString(STRINGS.UI.MORGUESCREEN.DECEASED)
self.DECEASED:SetColour(177/255.0,154/255.0,120/255.0, 1)
self.CAUSE = self.obits_titles:AddChild(Text(TITLEFONT, font_size))
self.CAUSE:SetHAlign(ANCHOR_MIDDLE)
self.CAUSE:SetPosition(column_offsets.CAUSE, 0, 0)
self.CAUSE:SetRegionSize( 400, 70 )
self.CAUSE:SetString(STRINGS.UI.MORGUESCREEN.CAUSE)
self.CAUSE:SetColour(177/255.0,154/255.0,120/255.0, 1)
self.MODE = self.obits_titles:AddChild(Text(TITLEFONT, font_size))
self.MODE:SetHAlign(ANCHOR_MIDDLE)
self.MODE:SetPosition(column_offsets.MODE, 0, 0)
self.MODE:SetRegionSize( 400, 70 )
self.MODE:SetString(STRINGS.UI.MORGUESCREEN.MODE)
self.MODE:SetColour(177/255.0,154/255.0,120/255.0, 1)
self.obits_rows = self.obits_panel:AddChild(Widget("obits_rows"))
self.obits_rows:SetPosition(column_offsets_x_pos, -RESOLUTION_Y*0.075, 0)
-- self.obits_rows:SetVAlign(ANCHOR_MIDDLE)
self.list_widgets = {}
self.control_offset = 0
self.mogue = Morgue:GetRows()
self:RefreshControls()
if not Input:ControllerAttached() then
self.OK_button = self.root:AddChild(ImageButton())
self.OK_button:SetPosition(right_col, -250, 0)
self.OK_button:SetText(STRINGS.UI.MORGUESCREEN.OK)
self.OK_button.text:SetColour(0,0,0,1)
self.OK_button:SetOnClick( function() self:OK() end )
self.OK_button:SetFont(BUTTONFONT)
self.OK_button:SetTextSize(40)
end
self.down_button = self.obits_panel:AddChild(ImageButton("images/ui.xml", "scroll_arrow.tex", "scroll_arrow_over.tex", "scroll_arrow_disabled.tex"))
if JapaneseOnPS4() then
self.down_button:SetPosition(360 * 1.15, 0, 0)
else
self.down_button:SetPosition(360, 0, 0)
end
--self.down_button:SetRotation(90)
self.down_button:SetOnClick( function() self:Scroll(controls_per_scroll) end)
self.up_button = self.obits_panel:AddChild(ImageButton("images/ui.xml", "scroll_arrow.tex", "scroll_arrow_over.tex", "scroll_arrow_disabled.tex"))
if JapaneseOnPS4() then
self.up_button:SetPosition(-360 * 1.15,0, 0)
else
self.up_button:SetPosition(-360,0, 0)
end
self.up_button:SetScale(-1,1,1)
--self.up_button:SetRotation(-90)
self.up_button:SetOnClick( function() self:Scroll(-controls_per_scroll) end)
self.up_button:Hide()
if self.control_offset + controls_per_screen < #self.mogue then
self.down_button:Show()
else
self.down_button:Hide()
end
end)
function MorgueScreen:OnBecomeActive()
MorgueScreen._base.OnBecomeActive(self)
--TheFrontEnd:GetSound():KillSound("FEMusic")
end
function MorgueScreen:OnBecomeInactive()
MorgueScreen._base.OnBecomeInactive(self)
--TheFrontEnd:GetSound():PlaySound("dontstarve/music/music_FE","FEMusic")
end
function MorgueScreen:OnDestroy()
self._base.OnDestroy(self)
end
local function tchelper(first, rest)
return first:upper()..rest:lower()
end
function MorgueScreen:RefreshControls()
for k,v in pairs(self.list_widgets) do
v.root:Kill()
end
self.list_widgets = {}
-- killed_by
-- days_survived
-- character
-- location
-- world
local font_size = 35
if JapaneseOnPS4() then
font_size = 35 * 0.75
end
local portrate_scale = 0.45
local spacing = 52
for k = 1, controls_per_screen do
local idx = self.control_offset+k
if self.mogue[idx] then
local death = self.mogue[idx]
local group = self.obits_rows:AddChild(Widget("control"))
local DAYS_LIVED = group:AddChild(Text(TITLEFONT, font_size))
DAYS_LIVED:SetHAlign(ANCHOR_MIDDLE)
DAYS_LIVED:SetPosition(column_offsets.DAYS_LIVED, 0, 0)
DAYS_LIVED:SetRegionSize( 400, 70 )
DAYS_LIVED:SetString(death["days_survived"] or "?")
local DECEASED = group:AddChild(Widget("DECEASED"))
DECEASED:SetPosition(column_offsets.DECEASED, 0, 0)
DECEASED.portraitbg = DECEASED:AddChild(Image("images/saveslot_portraits.xml", "background.tex"))
DECEASED.portraitbg:SetScale(portrate_scale, portrate_scale, 1)
DECEASED.portraitbg:SetClickable(false)
DECEASED.base = DECEASED:AddChild(Widget("base"))
DECEASED.portrait = DECEASED.base:AddChild(Image())
DECEASED.portrait:SetClickable(false)
local character = death["character"]:lower()
if character == "maxwell" then
character = "waxwell"
end
local atlas = (table.contains(MODCHARACTERLIST, character) and "images/saveslot_portraits/"..character..".xml") or "images/saveslot_portraits.xml"
if not table.contains(GetActiveCharacterList(), character) then
character = "random" -- Use a question mark if the character isn't currently active
end
DECEASED.portrait:SetTexture(atlas, character..".tex")
DECEASED.portrait:SetScale(portrate_scale, portrate_scale, 1)
local CAUSE = group:AddChild(Text(TITLEFONT, font_size))
CAUSE:SetHAlign(ANCHOR_MIDDLE)
CAUSE:SetPosition(column_offsets.CAUSE, 0, 0)
CAUSE:SetRegionSize( 400, 70 )
local killed_by = death["killed_by"]:lower()
if killed_by == "nil" then
if character == "waxwell" then
killed_by = "charlie"
else
killed_by = "darkness"
end
elseif killed_by == "unknown" then
killed_by = "shenanigans"
elseif killed_by == "moose" then
if math.random() < .5 then
killed_by = "moose1"
else
killed_by = "moose2"
end
end
killed_by = STRINGS.NAMES[string.upper(killed_by)] or STRINGS.NAMES.SHENANIGANS
CAUSE:SetString(killed_by:gsub("(%a)([%w_']*)", tchelper))
local MODE = group:AddChild(Text(TITLEFONT, font_size))
MODE:SetHAlign(ANCHOR_MIDDLE)
MODE:SetPosition(column_offsets.MODE, 0, 0)
MODE:SetRegionSize( 400, 70 )
MODE:SetString(STRINGS.UI.MORGUESCREEN.LEVELTYPE[Levels.GetTypeForLevelID(death["world"])])
if k <= controls_per_screen then
group:SetPosition(0, (controls_per_screen-1)*spacing*.5 - (k-1)*spacing - 10, 0)
else
group:SetPosition(0, (controls_per_screen-1)*spacing*.5 - (k-1-controls_per_screen)*spacing- 10, 0)
end
table.insert(self.list_widgets, {root = group, id=idx})
end
end
end
function MorgueScreen:Scroll(dir)
if (dir > 0 and (self.control_offset + controls_per_screen) < #self.mogue) or
(dir < 0 and self.control_offset + dir >= 0) then
self.control_offset = self.control_offset + dir
self:RefreshControls()
end
if self.control_offset > 0 then
self.up_button:Show()
else
self.up_button:Hide()
end
if self.control_offset + controls_per_screen < #self.mogue then
self.down_button:Show()
else
self.down_button:Hide()
end
end
function MorgueScreen:OnControl(control, down)
if MorgueScreen._base.OnControl(self, control, down) then return true end
if not down then
if control == CONTROL_CANCEL then
TheFrontEnd:PopScreen()
elseif control == CONTROL_PAGELEFT then
if self.up_button.shown then
TheFrontEnd:GetSound():PlaySound("dontstarve/HUD/click_move")
self:Scroll(-controls_per_scroll)
end
elseif control == CONTROL_PAGERIGHT then
if self.down_button.shown then
TheFrontEnd:GetSound():PlaySound("dontstarve/HUD/click_move")
self:Scroll(controls_per_scroll)
end
else
return false
end
return true
end
end
function MorgueScreen:OK()
TheFrontEnd:PopScreen()
end
function MorgueScreen:GetHelpText()
local controller_id = TheInput:GetControllerID()
local t = {}
if self.control_offset > 0 then
table.insert(t, TheInput:GetLocalizedControl(controller_id, CONTROL_PAGELEFT) .. " " .. STRINGS.UI.HELP.SCROLLBACK)
end
if self.control_offset + controls_per_screen < #self.mogue then
table.insert(t, TheInput:GetLocalizedControl(controller_id, CONTROL_PAGERIGHT) .. " " .. STRINGS.UI.HELP.SCROLLFWD)
end
table.insert(t, TheInput:GetLocalizedControl(controller_id, CONTROL_CANCEL) .. " " .. STRINGS.UI.HELP.BACK)
return table.concat(t, " ")
end
return MorgueScreen |
object_building_kashyyyk_mun_kash_imprv_streetlamp_s02 = object_building_kashyyyk_shared_mun_kash_imprv_streetlamp_s02:new {
}
ObjectTemplates:addTemplate(object_building_kashyyyk_mun_kash_imprv_streetlamp_s02, "object/building/kashyyyk/mun_kash_imprv_streetlamp_s02.iff")
|
--[[
Cyber Bruiser Class Made by Fenrier.
]]
Player=game:GetService("Players").LocalPlayer
Character=Player.Character
PlayerGui=Player.PlayerGui
Backpack=Player.Backpack
Torso=Character.Torso
Head=Character.Head
Humanoid=Character.Humanoid
LeftArm=Character["Left Arm"]
LeftLeg=Character["Left Leg"]
RightArm=Character["Right Arm"]
RightLeg=Character["Right Leg"]
LS=Torso["Left Shoulder"]
LH=Torso["Left Hip"]
RS=Torso["Right Shoulder"]
RH=Torso["Right Hip"]
Neck=Torso.Neck
it=Instance.new
vt=Vector3.new
cf=CFrame.new
euler=CFrame.fromEulerAnglesXYZ
angles=CFrame.Angles
necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
RootPart=Character.HumanoidRootPart
RootJoint=RootPart.RootJoint
RootCF=euler(-1.57,0,3.14)
attack = false
attackdebounce = false
MMouse=nil
combo=0
mana=0
local idle=0
local Anim="Idle"
--player
player=nil
--save shoulders
RSH, LSH=nil, nil
--welds
RW, LW=Instance.new("Weld"), Instance.new("Weld")
RW.Name="Right Shoulder" LW.Name="Left Shoulder"
LH=Torso["Left Hip"]
RH=Torso["Right Hip"]
Charge=0
function swait(num)
if num==0 or num==nil then
game:service'RunService'.RenderStepped:wait()
else
for i=0,num do
game:service'RunService'.RenderStepped:wait()
end
end
end
if Character:findFirstChild("Kaltos Arm",true) ~= nil then
Character:findFirstChild("Kaltos Arm",true).Parent = nil
end
if Player.PlayerGui:findFirstChild("WeaponGUI",true) ~= nil then
Player.PlayerGui:findFirstChild("WeaponGUI",true).Parent = nil
end
function NoOutline(Part)
Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
end
function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
local fp=it("Part")
fp.formFactor=formfactor
fp.Parent=parent
fp.Reflectance=reflectance
fp.Transparency=transparency
fp.CanCollide=false
fp.Locked=true
fp.BrickColor=brickcolor
fp.Name=name
fp.Size=size
fp.Position=Torso.Position
NoOutline(fp)
fp.Material="SmoothPlastic"
fp:BreakJoints()
return fp
end
function mesh(Mesh,part,meshtype,meshid,offset,scale)
local mesh=it(Mesh)
mesh.Parent=part
if Mesh=="SpecialMesh" then
mesh.MeshType=meshtype
mesh.MeshId=meshid
end
mesh.Offset=offset
mesh.Scale=scale
return mesh
end
function weld(parent,part0,part1,c0)
local weld=it("Weld")
weld.Parent=parent
weld.Part0=part0
weld.Part1=part1
weld.C0=c0
return weld
end
local Color1=Torso.BrickColor
local fengui=it("GuiMain")
fengui.Parent=Player.PlayerGui
fengui.Name="WeaponGUI"
local fenframe=it("Frame")
fenframe.Parent=fengui
fenframe.BackgroundColor3=Color3.new(255,255,255)
fenframe.BackgroundTransparency=1
fenframe.BorderColor3=Color3.new(17,17,17)
fenframe.Size=UDim2.new(0.0500000007, 0, 0.100000001, 0)
fenframe.Position=UDim2.new(0.4,0,0.1,0)
local fenbarmana1=it("TextLabel")
fenbarmana1.Parent=fenframe
fenbarmana1.Text=" "
fenbarmana1.BackgroundTransparency=0
fenbarmana1.BackgroundColor3=Color3.new(0,0,0)
fenbarmana1.SizeConstraint="RelativeXY"
fenbarmana1.TextXAlignment="Center"
fenbarmana1.TextYAlignment="Center"
fenbarmana1.Position=UDim2.new(0,0,0,0)
fenbarmana1.Size=UDim2.new(4,0,0.2,0)
local fenbarmana2=it("TextLabel")
fenbarmana2.Parent=fenframe
fenbarmana2.Text=" "
fenbarmana2.BackgroundTransparency=0
fenbarmana2.BackgroundColor3=Torso.Color
fenbarmana2.SizeConstraint="RelativeXY"
fenbarmana2.TextXAlignment="Center"
fenbarmana2.TextYAlignment="Center"
fenbarmana2.Position=UDim2.new(0,0,0,0)
fenbarmana2.Size=UDim2.new(4*mana/100,0,0.2,0)
local fenbarmana4=it("TextLabel")
fenbarmana4.Parent=fenframe
fenbarmana4.Text="Energy("..mana..")"
fenbarmana4.BackgroundTransparency=1
fenbarmana4.BackgroundColor3=Color3.new(0,0,0)
fenbarmana4.SizeConstraint="RelativeXY"
fenbarmana4.TextXAlignment="Center"
fenbarmana4.TextYAlignment="Center"
fenbarmana4.Position=UDim2.new(0,0,-0.3,0)
fenbarmana4.Size=UDim2.new(4,0,0.2,0)
fenbarmana4.FontSize="Size9"
fenbarmana4.TextStrokeTransparency=0
fenbarmana4.TextColor=BrickColor.new("White")
local modelzorz=Instance.new("Model")
modelzorz.Parent=Character
modelzorz.Name="Kaltos Arm"
--local prt1=part(3,modelzorz,0,0,Torso.BrickColor,"Handle",vt())
local prt1=part(3,modelzorz,0,0,BrickColor.new("Black"),"Handle",vt())
local prt2=part(3,modelzorz,0,0,BrickColor.new("White"),"Part2",vt())
local prt3=part(3,modelzorz,0,0,BrickColor.new("White"),"Part3",vt())
local prt4=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part4",vt()) --
local prt5=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part5",vt()) --
local prt6=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part6",vt())
local prt7=part(3,modelzorz,0,0,BrickColor.new("White"),"Part7",vt())
local prt10=part(3,modelzorz,0,0,BrickColor.new("White"),"Part10",vt())
local prt11=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part11",vt()) --
local prt12=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part12",vt())
local prt13=part(3,modelzorz,0,0.5,BrickColor.new("Really black"),"Part13",vt())
local prt14=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part14",vt())
local prt15=part(3,modelzorz,0,0,Torso.BrickColor,"Part15",vt())
local prt16=part(3,modelzorz,0,0.5,BrickColor.new("Really black"),"Part16",vt())
local prt17=part(3,modelzorz,0,0.5,BrickColor.new("Really black"),"Part17",vt())
local prt18=part(3,modelzorz,0,0.5,BrickColor.new("Really black"),"Part18",vt())
local prt19=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part19",vt())
local prt20=part(3,modelzorz,0,0,Torso.BrickColor,"Part20",vt())
local prt21=part(3,modelzorz,0,0,Torso.BrickColor,"Part21",vt())
local msh1=mesh("BlockMesh",prt1,"","",vt(0,0,0),vt(5,3.5,3.5))
local msh2=mesh("BlockMesh",prt2,"","",vt(0,0,0),vt(8,3,3))
local msh3=mesh("CylinderMesh",prt3,"","",vt(0,0,0),vt(3,5,3))
local msh4=mesh("BlockMesh",prt4,"","",vt(0,0,0),vt(1,5.1,4))
local msh5=mesh("BlockMesh",prt5,"","",vt(0,0,0),vt(1,5.1,4))
local msh6=mesh("CylinderMesh",prt6,"","",vt(0,0,0),vt(5,2.5,5))
local msh7=mesh("CylinderMesh",prt7,"","",vt(0,0,0),vt(5.4,2.4,5.4))
local msh10=mesh("SpecialMesh",prt10,"Sphere","",vt(0,0,0),vt(4,4,4))
local msh11=mesh("BlockMesh",prt11,"","",vt(0,0,0),vt(1,4,4))
local msh12=mesh("CylinderMesh",prt12,"","",vt(0,0,0),vt(3,6,3))
local msh14=mesh("SpecialMesh",prt14,"Head","",vt(0,0,0),vt(4,9,4))
local msh15=mesh("CylinderMesh",prt15,"","",vt(0,0,0),vt(7,3,7))
local msh16=mesh("BlockMesh",prt16,"","",vt(0,0,0),vt(3,7,3))
local msh17=mesh("BlockMesh",prt17,"","",vt(0,0,0),vt(2,12,2))
local msh18=mesh("BlockMesh",prt18,"","",vt(0,0,0),vt(3,3,3))
local msh19=mesh("SpecialMesh",prt19,"Head","",vt(0,0,0),vt(6,5,6))
local msh20=mesh("CylinderMesh",prt20,"","",vt(0,0,0),vt(4,5,4))
local msh21=mesh("SpecialMesh",prt21,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(1.7,1.2,.8))
local wld1=weld(prt1,prt1,Torso,euler(0,0,0)*cf(0,-0.4,-.7))
local wld2=weld(prt2,prt2,prt1,euler(0,0,0)*cf(0,0,0))
local wld3=weld(prt3,prt3,prt1,euler(1.57,0,0)*cf(0,0,0))
local wld4=weld(prt4,prt4,prt3,euler(0,0.785,0)*cf(0,0,0))
local wld5=weld(prt5,prt5,prt3,euler(0,-0.785,0)*cf(0,0,0))
local wld6=weld(prt6,prt6,prt2,euler(1.57,0,0)*cf(-1,-0.5,0))
local wld7=weld(prt7,prt7,prt6,euler(0,0,0)*cf(-.05,0,-.1))
local wld10=weld(prt10,prt10,prt6,euler(0,0,0)*cf(0,0,0))
local wld11=weld(prt11,prt11,prt10,euler(0,0.785,0)*cf(0,0,0))
local wld12=weld(prt12,prt12,prt2,euler(0,0,1.57)*cf(.7,0.2,0)*euler(0,0,0.4))
local wld13=weld(prt13,prt13,prt12,euler(0,0,0)*cf(0,.6,0)*euler(0,0,0))
local wld14=weld(prt14,prt14,prt13,cf(0,.8,0)*euler(0,0,1))
local wld15=weld(prt15,prt15,prt14,euler(1.5,-.7,0)*cf(0,1.2,0.2))
local wld16=weld(prt16,prt16,prt15,cf(0,1.2,0)*euler(1.57,-.8,0))
local wld17=weld(prt17,prt17,prt16,cf(0,1.2,0)*euler(0,0,0.5)*cf(0,.7,0))
local wld18=weld(prt18,prt18,prt17,euler(0,0,0)*cf(0,1.8,0))
local wld19=weld(prt19,prt19,prt15,euler(0,0,0)*cf(0,0,0))
local wld20=weld(prt20,prt20,prt19,euler(0,0,0)*cf(0,0,0))
local wld21=weld(prt21,prt21,prt15,cf(-0.2,0,.5)*euler(0,0.6,0))
for i=0,1.5,0.5 do
local prt8=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part8",vt())
local prt9=part(3,modelzorz,0,0,BrickColor.new("White"),"Part9",vt())
local msh8=mesh("CylinderMesh",prt8,"","",vt(0,0,0),vt(1,6,1))
local msh9=mesh("CylinderMesh",prt9,"","",vt(0,0,0),vt(1.5,1.5,1.5))
local wld8=weld(prt8,prt8,prt7,cf(0,.6,0)*euler(1.57,-0.2-i,0))
local wld9=weld(prt9,prt9,prt8,euler(0,0,0)*cf(0,.3,0))
end
for i=0.25,-0.45,-0.35 do
local prt22=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part22",vt())
local prt23=part(3,modelzorz,0,0,BrickColor.new("White"),"Part23",vt())
local msh22=mesh("CylinderMesh",prt22,"","",vt(0,0,0),vt(2.5,9,2.5))
local msh23=mesh("CylinderMesh",prt23,"","",vt(0,0,0),vt(2.6,2,2.6))
local wld22=weld(prt22,prt22,prt15,euler(0,0,1.57)*cf(.8,0,i)*euler(0,0.6,0))
local wld23=weld(prt23,prt23,prt22,cf(0,0.6,0))
end
for i=0,6.28,2.093 do
local prt24=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part24",vt())
local msh24=mesh("CylinderMesh",prt24,"","",vt(0,0,0),vt(3,7,3))
local wld24=weld(prt24,prt24,prt16,cf(.2,0,0)*euler(0,i,0)) --+2.093
end
local hitbox=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
hitbox.Anchored=false
if (script.Parent.className~="HopperBin") then
Tool=Instance.new("HopperBin")
Tool.Parent=Backpack
Tool.Name="Kaltos Arm"
script.Parent=Tool
end
Bin=script.Parent
local bodvel=Instance.new("BodyVelocity")
local bg=Instance.new("BodyGyro")
so = function(id,par,vol,pit)
coroutine.resume(coroutine.create(function()
local sou = Instance.new("Sound",par or workspace)
sou.Volume=vol
sou.Pitch=pit or 1
sou.SoundId=id
swait()
sou:play()
game:GetService("Debris"):AddItem(sou,6)
end))
end
function clerp(a,b,t)
local qa = {QuaternionFromCFrame(a)}
local qb = {QuaternionFromCFrame(b)}
local ax, ay, az = a.x, a.y, a.z
local bx, by, bz = b.x, b.y, b.z
local _t = 1-t
return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
end
function QuaternionFromCFrame(cf)
local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
local trace = m00 + m11 + m22
if trace > 0 then
local s = math.sqrt(1 + trace)
local recip = 0.5/s
return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
else
local i = 0
if m11 > m00 then
i = 1
end
if m22 > (i == 0 and m00 or m11) then
i = 2
end
if i == 0 then
local s = math.sqrt(m00-m11-m22+1)
local recip = 0.5/s
return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
elseif i == 1 then
local s = math.sqrt(m11-m22-m00+1)
local recip = 0.5/s
return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
elseif i == 2 then
local s = math.sqrt(m22-m00-m11+1)
local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
end
end
end
function QuaternionToCFrame(px, py, pz, x, y, z, w)
local xs, ys, zs = x + x, y + y, z + z
local wx, wy, wz = w*xs, w*ys, w*zs
local xx = x*xs
local xy = x*ys
local xz = x*zs
local yy = y*ys
local yz = y*zs
local zz = z*zs
return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
end
function QuaternionSlerp(a, b, t)
local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
local startInterp, finishInterp;
if cosTheta >= 0.0001 then
if (1 - cosTheta) > 0.0001 then
local theta = math.acos(cosTheta)
local invSinTheta = 1/math.sin(theta)
startInterp = math.sin((1-t)*theta)*invSinTheta
finishInterp = math.sin(t*theta)*invSinTheta
else
startInterp = 1-t
finishInterp = t
end
else
if (1+cosTheta) > 0.0001 then
local theta = math.acos(-cosTheta)
local invSinTheta = 1/math.sin(theta)
startInterp = math.sin((t-1)*theta)*invSinTheta
finishInterp = math.sin(t*theta)*invSinTheta
else
startInterp = t-1
finishInterp = t
end
end
return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
end
function hideanim()
equipped=false
for i=0,1,0.1 do
swait()
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.4)
Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.4)
Torso.Neck.C1=clerp(Torso.Neck.C1,necko2*euler(0,0,0),.4)
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0),.4)
RW.C1=clerp(RW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,0),.4)
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
RH.C0=clerp(RH.C0,RHC0,.2)
RH.C1=clerp(RH.C1,RHC1,.2)
LH.C0=clerp(LH.C0,LHC0,.2)
LH.C1=clerp(LH.C1,LHC1,.2)
end
end
function equipanim()
equipped=true
for i=0,1,0.1 do
swait()
Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0.1),.3)
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-0.1),.3)
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
end
end
function MagniDamage(Part,magni,mindam,maxdam,knock,Type)
for _,c in pairs(workspace:children()) do
local hum=c:findFirstChild("Humanoid")
if hum~=nil then
local head=c:findFirstChild("Torso")
if head~=nil then
local targ=head.Position-Part.Position
local mag=targ.magnitude
if mag<=magni and c.Name~=Player.Name then
Damagefunc(head,mindam,maxdam,knock,Type,RootPart,.2,1,nil,1)
end
end
end
end
end
function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
end
local Effects={}
local Point=Torso.CFrame*cf(0,Torso.Size.Y,0)
LastPoint=Point
function effect(Color,Ref,LP,P1,returnn)
local effectsmsh=Instance.new("CylinderMesh")
effectsmsh.Scale=Vector3.new(0.2,1,0.2)
effectsmsh.Name="Mesh"
local effectsg=Instance.new("Part")
effectsg.formFactor=3
effectsg.CanCollide=false
effectsg.Name="Eff"
effectsg.Locked=true
effectsg.Anchored=true
effectsg.Size=Vector3.new(0.5,1,0.5)
effectsg.Parent=workspace
effectsmsh.Parent=effectsg
effectsg.BrickColor=Color1
effectsg.Reflectance=Ref
local point1=P1
local mg=(LP.p - point1.p).magnitude
effectsg.Size=Vector3.new(0.5,mg,0.5)
effectsg.CFrame=cf((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
effectsmsh.Scale=Vector3.new(0.4,1,0.4)
game:GetService("Debris"):AddItem(effectsg,2)
if returnn then return effectsg end
if not returnn then
table.insert(Effects,{effectsg,"Cylinder",0.05,0.01,0,0.01})
end
end
function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type,parent)
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
prt.Anchored=true
prt.CFrame=cframe
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
game:GetService("Debris"):AddItem(prt,5)
table.insert(Effects,{prt,"Block1",delay,x3,y3,z3,msh})
end
function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
prt.Anchored=true
prt.CFrame=cframe
local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
game:GetService("Debris"):AddItem(prt,2)
table.insert(Effects,{prt,"Cylinder2",delay,x3,y3,z3,msh})
end
function MagicWave(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
prt.Anchored=true
prt.CFrame=cframe
local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
game:GetService("Debris"):AddItem(prt,5)
table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3})
end
Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock,Slash)
if hit.Parent==nil then
return
end
h=hit.Parent:FindFirstChild("Humanoid")
for _,v in pairs(hit.Parent:children()) do
if v:IsA("Humanoid") then
h=v
end
end
if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
h=hit.Parent.Parent:FindFirstChild("Humanoid")
end
if hit.Parent.className=="Hat" then
hit=hit.Parent.Parent:findFirstChild("Head")
end
if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
--[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
return
end]]
-- hs(hit,1.2)
if Slash==1 then
so("http://www.roblox.com/asset/?id=10209590",hit,1,1)
MagicCircle(Color1,hit.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),.2,2,.2,.2,6,.2,0.1)
end
c=Instance.new("ObjectValue")
c.Name="creator"
c.Value=game:service("Players").LocalPlayer
c.Parent=h
game:GetService("Debris"):AddItem(c,.5)
Damage=math.random(minim,maxim)
-- h:TakeDamage(Damage)
blocked=false
block=hit.Parent:findFirstChild("Block")
if block~=nil then
print(block.className)
if block.className=="NumberValue" then
if block.Value>0 then
blocked=true
if decreaseblock~=nil then
block.Value=block.Value-decreaseblock
end
end
end
if block.className=="IntValue" then
if block.Value>0 then
blocked=true
if decreaseblock~=nil then
block.Value=block.Value-decreaseblock
end
end
end
end
if blocked==false then
-- h:TakeDamage(Damage)
h.Health=h.Health-Damage
showDamage(hit.Parent,Damage,.5,BrickColor:Red())
else
h.Health=h.Health-(Damage/2)
showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
end
if Type=="Knockdown" then
hum=hit.Parent.Humanoid
hum.PlatformStand=true
coroutine.resume(coroutine.create(function(HHumanoid)
swait(1)
HHumanoid.PlatformStand=false
end),hum)
local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
--hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
local bodvol=Instance.new("BodyVelocity")
bodvol.velocity=angle*knockback
bodvol.P=5000
bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
bodvol.Parent=hit
rl=Instance.new("BodyAngularVelocity")
rl.P=3000
rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
rl.Parent=hit
game:GetService("Debris"):AddItem(bodvol,.5)
game:GetService("Debris"):AddItem(rl,.5)
elseif Type=="Normal" then
vp=Instance.new("BodyVelocity")
vp.P=500
vp.maxForce=Vector3.new(math.huge,0,math.huge)
-- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
if KnockbackType==1 then
vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
elseif KnockbackType==2 then
vp.velocity=Property.CFrame.lookVector*knockback
end
if knockback>0 then
vp.Parent=hit.Parent.Torso
end
game:GetService("Debris"):AddItem(vp,.5)
elseif Type=="Up" then
local bodyVelocity=Instance.new("BodyVelocity")
bodyVelocity.velocity=vt(0,30,0)
bodyVelocity.P=5000
bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
bodyVelocity.Parent=hit
game:GetService("Debris"):AddItem(bodyVelocity,1)
rl=Instance.new("BodyAngularVelocity")
rl.P=3000
rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
rl.angularvelocity=Vector3.new(math.random(-2,2),math.random(-2,2),math.random(-2,2))
rl.Parent=hit
game:GetService("Debris"):AddItem(rl,.5)
elseif Type=="Snare" then
bp=Instance.new("BodyPosition")
bp.P=2000
bp.D=100
bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
bp.position=hit.Parent.Torso.Position
bp.Parent=hit.Parent.Torso
game:GetService("Debris"):AddItem(bp,1)
end
debounce=Instance.new("BoolValue")
debounce.Name="DebounceHit"
debounce.Parent=hit.Parent
debounce.Value=true
game:GetService("Debris"):AddItem(debounce,Delay)
c=Instance.new("ObjectValue")
c.Name="creator"
c.Value=Player
c.Parent=h
game:GetService("Debris"):AddItem(c,.5)
CRIT=false
end
end
showDamage=function(Char,Dealt,du,Color)
m=Instance.new("Model")
m.Name=tostring(math.floor(Dealt))
h=Instance.new("Humanoid")
h.Health=0
h.MaxHealth=0
h.Parent=m
c=Instance.new("Part")
c.Transparency=0
c.BrickColor=Color
c.Name="Head"
c.TopSurface=0
c.BottomSurface=0
c.formFactor="Plate"
c.Size=Vector3.new(1,.4,1)
ms=Instance.new("CylinderMesh")
ms.Scale=Vector3.new(.8,.8,.8)
if CRIT==true then
ms.Scale=Vector3.new(1,1.25,1)
end
ms.Parent=c
c.Reflectance=0
Instance.new("BodyGyro").Parent=c
c.Parent=m
if Char:findFirstChild("Head")~=nil then
c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
elseif Char.Parent:findFirstChild("Head")~=nil then
c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
end
f=Instance.new("BodyPosition")
f.P=2000
f.D=100
f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
f.position=c.Position+Vector3.new(0,3,0)
f.Parent=c
game:GetService("Debris"):AddItem(m,.5+du)
c.CanCollide=false
m.Parent=workspace
c.CanCollide=false
end
combo=0
function ob1d(mouse)
if attack==true then return end
hold=true
if combo==0 then
combo=1
--attackone()
elseif combo==1 then
combo=2
--attacktwo()
elseif combo==2 then
combo=0
--attackthree()
end
coroutine.resume(coroutine.create(function()
for i=1,50 do
if attack==false then
swait()
end
end
if attack==false then
combo=0
end
end))
end
function ob1u(mouse)
hold = false
end
buttonhold = false
eul=0
holdx=false
equipped=false
function key(key)
if attack==true then return end
if key=="f" then
attack=true
if equipped==false then
equipped=true
RSH=ch.Torso["Right Shoulder"]
LSH=ch.Torso["Left Shoulder"]
--
RSH.Parent=nil
LSH.Parent=nil
--
RW.Name="Right Shoulder"
RW.Part0=ch.Torso
RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
RW.C1=cf(0, 0.5, 0)
RW.Part1=ch["Right Arm"]
RW.Parent=ch.Torso
--
LW.Name="Left Shoulder"
LW.Part0=ch.Torso
LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
LW.C1=cf(0, 0.5, 0)
LW.Part1=ch["Left Arm"]
LW.Parent=ch.Torso
--
equipanim()
else
equipped=false
hideanim()
swait(0)
RW.Parent=nil
LW.Parent=nil
RSH.Parent=player.Character.Torso
LSH.Parent=player.Character.Torso
end
attack=false
end
if equipped==false then return end
end
function key2(key)
end
function s(mouse)
mouse.Button1Down:connect(function() ob1d(mouse) end)
mouse.Button1Up:connect(function() ob1u(mouse) end)
mouse.KeyDown:connect(key)
mouse.KeyUp:connect(key2)
player=Player
ch=Character
MMouse=mouse
end
function ds(mouse)
end
Bin.Selected:connect(s)
Bin.Deselected:connect(ds)
print("Cyber Bruiser loaded.")
local mananum=0
while true do
swait()
local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
local velderp=RootPart.Velocity.y
hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
if equipped==true then
if attack==false then
idle=idle+1
else
idle=0
end
if idle>=500 then
if attack==false then
--Sheath()
end
end
if RootPart.Velocity.y > 1 and hitfloor==nil then
Anim="Jump"
if attack==false then
Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.3)
Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,0.5),.3)
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-0.5),.3)
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
end
elseif RootPart.Velocity.y < -1 and hitfloor==nil then
Anim="Fall"
if attack==false then
Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.3)
Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0.3,0,0.2),.3)
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0.3,0,-0.2),.3)
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2)
LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2)
end
elseif torvel<1 and hitfloor~=nil then
Anim="Idle"
if attack==false then
wld14.C0=clerp(wld14.C0,cf(0,.8,0)*euler(0,0,1),.3)
wld15.C0=clerp(wld15.C0,euler(1.5,-.7,0)*cf(0,1.2,0.2),.3)
wld16.C0=clerp(wld16.C0,cf(0,1.2,0)*euler(1.57,-.8,0),.3)
wld17.C0=clerp(wld17.C0,cf(0,1.2,0)*euler(0,0,0.5)*cf(0,.7,0),.3)
wld18.C0=clerp(wld18.C0,euler(0,0,0)*cf(0,1.8,0),.3)
Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0.1),.3)
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-0.1),.3)
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
RH.C0=clerp(RH.C0,RHC0,.3)
RH.C1=clerp(RH.C1,RHC1,.3)
LH.C0=clerp(LH.C0,LHC0,.3)
LH.C1=clerp(LH.C1,LHC1,.3)
end
elseif torvel>2 and torvel<22 and hitfloor~=nil then
Anim="Walk"
if attack==false then
wld14.C0=clerp(wld14.C0,cf(0,.8,0)*euler(0,0,.5),.3)
wld15.C0=clerp(wld15.C0,euler(1.2,-.1,.2)*cf(0,1.2,0.2),.3)
wld16.C0=clerp(wld16.C0,cf(0,1.2,0)*euler(1.57,-.8,0),.3)
wld17.C0=clerp(wld17.C0,cf(0,1.2,0)*euler(0,0,0.2)*cf(0,.7,0),.3)
wld18.C0=clerp(wld18.C0,euler(0,0,0)*cf(0,1.8,0),.3)
Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.1,0,0),.3)
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-0.2,0,0.3),.3)
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.2,0,-0.3),.3)
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
end
elseif torvel>=22 and hitfloor~=nil then
Anim="Run"
if attack==false then
Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.2,0,0),.3)
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-0.5,0,0.5),.3)
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.5,0,-0.5),.3)
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
end
end
end
if #Effects>0 then
--table.insert(Effects,{prt,"Block1",delay})
for e=1,#Effects do
if Effects[e]~=nil then
--for j=1,#Effects[e] do
local Thing=Effects[e]
if Thing~=nil then
local Part=Thing[1]
local Mode=Thing[2]
local Delay=Thing[3]
local IncX=Thing[4]
local IncY=Thing[5]
local IncZ=Thing[6]
if Thing[1].Transparency<=1 then
if Thing[2]=="Block1" then
Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
Mesh=Thing[1].Mesh
Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
elseif Thing[2]=="Cylinder" then
Mesh=Thing[1].Mesh
Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
elseif Thing[2]=="Blood" then
Mesh=Thing[7]
Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
elseif Thing[2]=="Elec" then
Mesh=Thing[1].Mesh
Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
elseif Thing[2]=="Disappear" then
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
end
else
Part.Parent=nil
table.remove(Effects,e)
end
end
--end
end
end
end
fenbarmana2:TweenSize(UDim2.new(4*mana/100,0,0.2,0),nil,1,0.4,true)
fenbarmana4.Text="Energy("..mana..")"
if mana>=100 then
mana=100
else
if mananum<=12 then
mananum=mananum+1
else
mananum=0
mana=mana+1
end
end
end
--[[
Copyrighted (C) Fenrier 2014
]] |
local ChandelierExit = {}
setmetatable(ChandelierExit, {
__call = function(self, period, multiplier)
local AverageTrueRange = require "AverageTrueRange"
local Minimum = require "Minimum"
local Maximum = require "Maximum"
local ce = {}
setmetatable(ce, {
__tostring = function()
return "ce"
end
})
ce.period = period or 22
ce.min = Minimum(period)
ce.max = Maximum(period)
ce.multiplier = multiplier or 3.0
ce.atr = AverageTrueRange(period)
ce._series = {}
ce.longs = {}
ce.shorts = {}
ce.last = self.last
ce.series = self.series
ce.add = self.add
ce.reset = self.reset
return ce
end
})
local calculate = function(self, input)
assert(tostring(input) == "C", string.format("Input should be 'Candlestick'. Passed %s", tostring(input)))
local atr = self.atr
local min = self.min
local max = self.max
atr:add(input)
min:add(input)
max:add(input)
if atr:last() then
local multiplied_atr = atr:last() * self.multiplier
local longs = self.longs
longs[#longs + 1] = max:last() - multiplied_atr
local shorts = self.shorts
shorts[#shorts + 1] = min:last() + multiplied_atr
self._series[#self._series + 1] = multiplied_atr
end
end
function ChandelierExit:add(...)
local input = {...}
for i = 1, #input do
local item = input[i]
if type(item) == "table" then
if tostring(item) == "C" then
calculate(self, item)
else
for j = 1, #input[i] do
self:add(input[i][j])
end
end
end
end
return self
end
function ChandelierExit:reset()
self._series = {}
self.longs = {}
self.shorts = {}
self.atr:reset()
self.min:reset()
self.max:reset()
end
function ChandelierExit:series()
return self._series, self.longs, self.shorts
end
function ChandelierExit:last()
return self._series[#self._series], self.longs[#self.longs], self.shorts[#self.shorts]
end
return ChandelierExit
|
object_mobile_vehicle_mine = object_mobile_shared_vehicle_mine:new {
}
ObjectTemplates:addTemplate(object_mobile_vehicle_mine, "object/mobile/vehicle_mine.iff")
|
--
-- Sounds
--
function default.node_sound_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "", gain = 1.0}
table.dug = table.dug or
{name = "default_dug_node", gain = 0.25}
table.place = table.place or
{name = "default_place_node_hard", gain = 1.0}
return table
end
function default.node_sound_stone_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "default_hard_footstep", gain = 0.3}
table.dug = table.dug or
{name = "default_hard_footstep", gain = 1.0}
default.node_sound_defaults(table)
return table
end
function default.node_sound_dirt_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "default_dirt_footstep", gain = 0.4}
table.dug = table.dug or
{name = "default_dirt_footstep", gain = 1.0}
table.place = table.place or
{name = "default_place_node", gain = 1.0}
default.node_sound_defaults(table)
return table
end
function default.node_sound_sand_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "default_sand_footstep", gain = 0.12}
table.dug = table.dug or
{name = "default_sand_footstep", gain = 0.24}
table.place = table.place or
{name = "default_place_node", gain = 1.0}
default.node_sound_defaults(table)
return table
end
function default.node_sound_gravel_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "default_gravel_footstep", gain = 0.4}
table.dug = table.dug or
{name = "default_gravel_footstep", gain = 1.0}
table.place = table.place or
{name = "default_place_node", gain = 1.0}
default.node_sound_defaults(table)
return table
end
function default.node_sound_wood_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "default_wood_footstep", gain = 0.3}
table.dug = table.dug or
{name = "default_wood_footstep", gain = 1.0}
default.node_sound_defaults(table)
return table
end
function default.node_sound_leaves_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "default_grass_footstep", gain = 0.45}
table.dug = table.dug or
{name = "default_grass_footstep", gain = 0.7}
table.place = table.place or
{name = "default_place_node", gain = 1.0}
default.node_sound_defaults(table)
return table
end
function default.node_sound_glass_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "default_glass_footstep", gain = 0.3}
table.dig = table.dig or
{name = "default_glass_footstep", gain = 0.5}
table.dug = table.dug or
{name = "default_break_glass", gain = 1.0}
default.node_sound_defaults(table)
return table
end
function default.node_sound_metal_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "default_metal_footstep", gain = 0.4}
table.dig = table.dig or
{name = "default_dig_metal", gain = 0.5}
table.dug = table.dug or
{name = "default_dug_metal", gain = 0.5}
table.place = table.place or
{name = "default_place_node_metal", gain = 0.5}
default.node_sound_defaults(table)
return table
end
function default.node_sound_water_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "default_water_footstep", gain = 0.2}
default.node_sound_defaults(table)
return table
end
function default.node_sound_snow_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "default_snow_footstep", gain = 0.2}
table.dig = table.dig or
{name = "default_snow_footstep", gain = 0.3}
table.dug = table.dug or
{name = "default_snow_footstep", gain = 0.3}
table.place = table.place or
{name = "default_place_node", gain = 1.0}
default.node_sound_defaults(table)
return table
end
--
-- Lavacooling
--
default.cool_lava = function(pos, node)
if node.name == "default:lava_source" then
minetest.set_node(pos, {name = "default:obsidian"})
else -- Lava flowing
minetest.set_node(pos, {name = "default:stone"})
end
minetest.sound_play("default_cool_lava",
{pos = pos, max_hear_distance = 16, gain = 0.25}, true)
end
if minetest.settings:get_bool("enable_lavacooling") ~= false then
minetest.register_abm({
label = "Lava cooling",
nodenames = {"default:lava_source", "default:lava_flowing"},
neighbors = {"group:cools_lava", "group:water"},
interval = 2,
chance = 2,
catch_up = false,
action = function(...)
default.cool_lava(...)
end,
})
end
--
-- Optimized helper to put all items in an inventory into a drops list
--
function default.get_inventory_drops(pos, inventory, drops)
local inv = minetest.get_meta(pos):get_inventory()
local n = #drops
for i = 1, inv:get_size(inventory) do
local stack = inv:get_stack(inventory, i)
if stack:get_count() > 0 then
drops[n+1] = stack:to_table()
n = n + 1
end
end
end
--
-- Papyrus and cactus growing
--
-- Wrapping the functions in ABM action is necessary to make overriding them possible
function default.grow_cactus(pos, node)
if node.param2 >= 4 then
return
end
pos.y = pos.y - 1
if minetest.get_item_group(minetest.get_node(pos).name, "sand") == 0 then
return
end
pos.y = pos.y + 1
local height = 0
while node.name == "default:cactus" and height < 4 do
height = height + 1
pos.y = pos.y + 1
node = minetest.get_node(pos)
end
if height == 4 or node.name ~= "air" then
return
end
if minetest.get_node_light(pos) < 13 then
return
end
minetest.set_node(pos, {name = "default:cactus"})
return true
end
function default.grow_papyrus(pos, node)
pos.y = pos.y - 1
local name = minetest.get_node(pos).name
if name ~= "default:dirt" and
name ~= "default:dirt_with_grass" and
name ~= "default:dirt_with_dry_grass" and
name ~= "default:dirt_with_rainforest_litter" and
name ~= "default:dry_dirt" and
name ~= "default:dry_dirt_with_dry_grass" then
return
end
if not minetest.find_node_near(pos, 3, {"group:water"}) then
return
end
pos.y = pos.y + 1
local height = 0
while node.name == "default:papyrus" and height < 4 do
height = height + 1
pos.y = pos.y + 1
node = minetest.get_node(pos)
end
if height == 4 or node.name ~= "air" then
return
end
if minetest.get_node_light(pos) < 13 then
return
end
minetest.set_node(pos, {name = "default:papyrus"})
return true
end
minetest.register_abm({
label = "Grow cactus",
nodenames = {"default:cactus"},
neighbors = {"group:sand"},
interval = 12,
chance = 83,
action = function(...)
default.grow_cactus(...)
end
})
minetest.register_abm({
label = "Grow papyrus",
nodenames = {"default:papyrus"},
-- Grows on the dirt and surface dirt nodes of the biomes papyrus appears in,
-- including the old savanna nodes.
-- 'default:dirt_with_grass' is here only because it was allowed before.
neighbors = {
"default:dirt",
"default:dirt_with_grass",
"default:dirt_with_dry_grass",
"default:dirt_with_rainforest_litter",
"default:dry_dirt",
"default:dry_dirt_with_dry_grass",
},
interval = 14,
chance = 71,
action = function(...)
default.grow_papyrus(...)
end
})
--
-- Dig upwards
--
function default.dig_up(pos, node, digger)
if digger == nil then return end
local np = {x = pos.x, y = pos.y + 1, z = pos.z}
local nn = minetest.get_node(np)
if nn.name == node.name then
minetest.node_dig(np, nn, digger)
end
end
--
-- Fence registration helper
--
local fence_collision_extra = minetest.settings:get_bool("enable_fence_tall") and 3/8 or 0
function default.register_fence(name, def)
minetest.register_craft({
output = name .. " 4",
recipe = {
{ def.material, 'group:stick', def.material },
{ def.material, 'group:stick', def.material },
}
})
local fence_texture = "default_fence_overlay.png^" .. def.texture ..
"^default_fence_overlay.png^[makealpha:255,126,126"
-- Allow almost everything to be overridden
local default_fields = {
paramtype = "light",
drawtype = "nodebox",
node_box = {
type = "connected",
fixed = {-1/8, -1/2, -1/8, 1/8, 1/2, 1/8},
-- connect_top =
-- connect_bottom =
connect_front = {{-1/16, 3/16, -1/2, 1/16, 5/16, -1/8 },
{-1/16, -5/16, -1/2, 1/16, -3/16, -1/8 }},
connect_left = {{-1/2, 3/16, -1/16, -1/8, 5/16, 1/16},
{-1/2, -5/16, -1/16, -1/8, -3/16, 1/16}},
connect_back = {{-1/16, 3/16, 1/8, 1/16, 5/16, 1/2 },
{-1/16, -5/16, 1/8, 1/16, -3/16, 1/2 }},
connect_right = {{ 1/8, 3/16, -1/16, 1/2, 5/16, 1/16},
{ 1/8, -5/16, -1/16, 1/2, -3/16, 1/16}}
},
collision_box = {
type = "connected",
fixed = {-1/8, -1/2, -1/8, 1/8, 1/2 + fence_collision_extra, 1/8},
-- connect_top =
-- connect_bottom =
connect_front = {-1/8, -1/2, -1/2, 1/8, 1/2 + fence_collision_extra, -1/8},
connect_left = {-1/2, -1/2, -1/8, -1/8, 1/2 + fence_collision_extra, 1/8},
connect_back = {-1/8, -1/2, 1/8, 1/8, 1/2 + fence_collision_extra, 1/2},
connect_right = { 1/8, -1/2, -1/8, 1/2, 1/2 + fence_collision_extra, 1/8}
},
connects_to = {"group:fence", "group:wood", "group:tree", "group:wall"},
inventory_image = fence_texture,
wield_image = fence_texture,
tiles = {def.texture},
sunlight_propagates = true,
is_ground_content = false,
groups = {},
}
for k, v in pairs(default_fields) do
if def[k] == nil then
def[k] = v
end
end
-- Always add to the fence group, even if no group provided
def.groups.fence = 1
def.texture = nil
def.material = nil
minetest.register_node(name, def)
end
--
-- Fence rail registration helper
--
function default.register_fence_rail(name, def)
minetest.register_craft({
output = name .. " 16",
recipe = {
{ def.material, def.material },
{ "", ""},
{ def.material, def.material },
}
})
local fence_rail_texture = "default_fence_rail_overlay.png^" .. def.texture ..
"^default_fence_rail_overlay.png^[makealpha:255,126,126"
-- Allow almost everything to be overridden
local default_fields = {
paramtype = "light",
drawtype = "nodebox",
node_box = {
type = "connected",
fixed = {{-1/16, 3/16, -1/16, 1/16, 5/16, 1/16},
{-1/16, -3/16, -1/16, 1/16, -5/16, 1/16}},
-- connect_top =
-- connect_bottom =
connect_front = {{-1/16, 3/16, -1/2, 1/16, 5/16, -1/16},
{-1/16, -5/16, -1/2, 1/16, -3/16, -1/16}},
connect_left = {{-1/2, 3/16, -1/16, -1/16, 5/16, 1/16},
{-1/2, -5/16, -1/16, -1/16, -3/16, 1/16}},
connect_back = {{-1/16, 3/16, 1/16, 1/16, 5/16, 1/2 },
{-1/16, -5/16, 1/16, 1/16, -3/16, 1/2 }},
connect_right = {{ 1/16, 3/16, -1/16, 1/2, 5/16, 1/16},
{ 1/16, -5/16, -1/16, 1/2, -3/16, 1/16}}
},
collision_box = {
type = "connected",
fixed = {-1/8, -1/2, -1/8, 1/8, 1/2 + fence_collision_extra, 1/8},
-- connect_top =
-- connect_bottom =
connect_front = {-1/8, -1/2, -1/2, 1/8, 1/2 + fence_collision_extra, -1/8},
connect_left = {-1/2, -1/2, -1/8, -1/8, 1/2 + fence_collision_extra, 1/8},
connect_back = {-1/8, -1/2, 1/8, 1/8, 1/2 + fence_collision_extra, 1/2},
connect_right = { 1/8, -1/2, -1/8, 1/2, 1/2 + fence_collision_extra, 1/8}
},
connects_to = {"group:fence", "group:wall"},
inventory_image = fence_rail_texture,
wield_image = fence_rail_texture,
tiles = {def.texture},
sunlight_propagates = true,
is_ground_content = false,
groups = {},
}
for k, v in pairs(default_fields) do
if def[k] == nil then
def[k] = v
end
end
-- Always add to the fence group, even if no group provided
def.groups.fence = 1
def.texture = nil
def.material = nil
minetest.register_node(name, def)
end
--
-- Leafdecay
--
-- Prevent decay of placed leaves
default.after_place_leaves = function(pos, placer, itemstack, pointed_thing)
if placer and placer:is_player() then
local node = minetest.get_node(pos)
node.param2 = 1
minetest.set_node(pos, node)
end
end
-- Leafdecay
local function leafdecay_after_destruct(pos, oldnode, def)
for _, v in pairs(minetest.find_nodes_in_area(vector.subtract(pos, def.radius),
vector.add(pos, def.radius), def.leaves)) do
local node = minetest.get_node(v)
local timer = minetest.get_node_timer(v)
if node.param2 ~= 1 and not timer:is_started() then
timer:start(math.random(20, 120) / 10)
end
end
end
local movement_gravity = tonumber(
minetest.settings:get("movement_gravity")) or 9.81
local function leafdecay_on_timer(pos, def)
if minetest.find_node_near(pos, def.radius, def.trunks) then
return false
end
local node = minetest.get_node(pos)
local drops = minetest.get_node_drops(node.name)
for _, item in ipairs(drops) do
local is_leaf
for _, v in pairs(def.leaves) do
if v == item then
is_leaf = true
end
end
if minetest.get_item_group(item, "leafdecay_drop") ~= 0 or
not is_leaf then
minetest.add_item({
x = pos.x - 0.5 + math.random(),
y = pos.y - 0.5 + math.random(),
z = pos.z - 0.5 + math.random(),
}, item)
end
end
minetest.remove_node(pos)
minetest.check_for_falling(pos)
-- spawn a few particles for the removed node
minetest.add_particlespawner({
amount = 8,
time = 0.001,
minpos = vector.subtract(pos, {x=0.5, y=0.5, z=0.5}),
maxpos = vector.add(pos, {x=0.5, y=0.5, z=0.5}),
minvel = vector.new(-0.5, -1, -0.5),
maxvel = vector.new(0.5, 0, 0.5),
minacc = vector.new(0, -movement_gravity, 0),
maxacc = vector.new(0, -movement_gravity, 0),
minsize = 0,
maxsize = 0,
node = node,
})
end
function default.register_leafdecay(def)
assert(def.leaves)
assert(def.trunks)
assert(def.radius)
for _, v in pairs(def.trunks) do
minetest.override_item(v, {
after_destruct = function(pos, oldnode)
leafdecay_after_destruct(pos, oldnode, def)
end,
})
end
for _, v in pairs(def.leaves) do
minetest.override_item(v, {
on_timer = function(pos)
leafdecay_on_timer(pos, def)
end,
})
end
end
--
-- Convert default:dirt to something that fits the environment
--
minetest.register_abm({
label = "Grass spread",
nodenames = {"default:dirt"},
neighbors = {
"air",
"group:grass",
"group:dry_grass",
"default:snow",
},
interval = 6,
chance = 50,
catch_up = false,
action = function(pos, node)
-- Check for darkness: night, shadow or under a light-blocking node
-- Returns if ignore above
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
if (minetest.get_node_light(above) or 0) < 13 then
return
end
-- Look for spreading dirt-type neighbours
local p2 = minetest.find_node_near(pos, 1, "group:spreading_dirt_type")
if p2 then
local n3 = minetest.get_node(p2)
minetest.set_node(pos, {name = n3.name})
return
end
-- Else, any seeding nodes on top?
local name = minetest.get_node(above).name
-- Snow check is cheapest, so comes first
if name == "default:snow" then
minetest.set_node(pos, {name = "default:dirt_with_snow"})
elseif minetest.get_item_group(name, "grass") ~= 0 then
minetest.set_node(pos, {name = "default:dirt_with_grass"})
elseif minetest.get_item_group(name, "dry_grass") ~= 0 then
minetest.set_node(pos, {name = "default:dirt_with_dry_grass"})
end
end
})
--
-- Grass and dry grass removed in darkness
--
minetest.register_abm({
label = "Grass covered",
nodenames = {"group:spreading_dirt_type", "default:dry_dirt_with_dry_grass"},
interval = 8,
chance = 50,
catch_up = false,
action = function(pos, node)
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
local name = minetest.get_node(above).name
local nodedef = minetest.registered_nodes[name]
if name ~= "ignore" and nodedef and not ((nodedef.sunlight_propagates or
nodedef.paramtype == "light") and
nodedef.liquidtype == "none") then
if node.name == "default:dry_dirt_with_dry_grass" then
minetest.set_node(pos, {name = "default:dry_dirt"})
else
minetest.set_node(pos, {name = "default:dirt"})
end
end
end
})
--
-- Moss growth on cobble near water
--
local moss_correspondences = {
["default:cobble"] = "default:mossycobble",
["stairs:slab_cobble"] = "stairs:slab_mossycobble",
["stairs:stair_cobble"] = "stairs:stair_mossycobble",
["stairs:stair_inner_cobble"] = "stairs:stair_inner_mossycobble",
["stairs:stair_outer_cobble"] = "stairs:stair_outer_mossycobble",
["walls:cobble"] = "walls:mossycobble",
}
minetest.register_abm({
label = "Moss growth",
nodenames = {"default:cobble", "stairs:slab_cobble", "stairs:stair_cobble",
"stairs:stair_inner_cobble", "stairs:stair_outer_cobble",
"walls:cobble"},
neighbors = {"group:water"},
interval = 16,
chance = 200,
catch_up = false,
action = function(pos, node)
node.name = moss_correspondences[node.name]
if node.name then
minetest.set_node(pos, node)
end
end
})
--
-- Register a craft to copy the metadata of items
--
function default.register_craft_metadata_copy(ingredient, result)
minetest.register_craft({
type = "shapeless",
output = result,
recipe = {ingredient, result}
})
minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv)
if itemstack:get_name() ~= result then
return
end
local original
local index
for i = 1, #old_craft_grid do
if old_craft_grid[i]:get_name() == result then
original = old_craft_grid[i]
index = i
end
end
if not original then
return
end
local copymeta = original:get_meta():to_table()
itemstack:get_meta():from_table(copymeta)
-- put the book with metadata back in the craft grid
craft_inv:set_stack("craft", index, original)
end)
end
--
-- NOTICE: This method is not an official part of the API yet.
-- This method may change in future.
--
function default.can_interact_with_node(player, pos)
if player and player:is_player() then
if minetest.check_player_privs(player, "protection_bypass") then
return true
end
else
return false
end
local meta = minetest.get_meta(pos)
local owner = meta:get_string("owner")
if not owner or owner == "" or owner == player:get_player_name() then
return true
end
-- Is player wielding the right key?
local item = player:get_wielded_item()
if minetest.get_item_group(item:get_name(), "key") == 1 then
local key_meta = item:get_meta()
if key_meta:get_string("secret") == "" then
local key_oldmeta = item:get_metadata()
if key_oldmeta == "" or not minetest.parse_json(key_oldmeta) then
return false
end
key_meta:set_string("secret", minetest.parse_json(key_oldmeta).secret)
item:set_metadata("")
end
return meta:get_string("key_lock_secret") == key_meta:get_string("secret")
end
return false
end
|
---@class LuaCodeWriter
CodeWriter = fclass()
function CodeWriter:ctor()
self.indent_str = "\t"
self.end_of_line = "\n"
self.lines = {}
end
function CodeWriter:WriteMark()
table.insert(self.lines, "--- This is an automatically generated class by FairyGUI. Please do not modify it. ---")
table.insert(self.lines, "")
end
function CodeWriter:WriteLine(format, ...)
if not format then
table.insert(self.lines, "")
return
end
table.insert(self.lines, string.format(format, ...))
return self
end
function CodeWriter:WriteLineIndent(format, ...)
self:WriteLine(self.indent_str .. format, ...)
end
function CodeWriter:ReadLineAll(file_path)
if CS.System.IO.File.Exists(file_path) then
self:Reset()
local lines = CS.System.IO.File.ReadAllLines(file_path)
for i = 0, lines.Length - 1 do
table.insert(self.lines, lines[i])
end
end
end
function CodeWriter:WriteLineOnce(format, ...)
if not format then
table.insert(self.lines, "")
return
end
local str = string.format(format, ...)
for key, line in pairs(self.lines) do
if line == str then
return
end
end
table.insert(self.lines, str)
return self
end
function CodeWriter:Reset()
if #self.lines > 0 then
self.lines = {}
end
end
function CodeWriter:IsEmpty()
return #self.lines == 0
end
function CodeWriter:SaveFile(file_path)
local str = table.concat(self.lines, self.end_of_line)
if CS.System.IO.File.Exists(file_path) then
CS.System.IO.File.Delete(file_path)
end
CS.System.IO.File.WriteAllText(file_path, str)
end |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.