content
stringlengths 5
1.05M
|
|---|
--[[Returns function(entries) -> entries (modified)
Entries has .Credits added to it - the list of {.Key .Desc} in the order they should appear
Key is how to index an entry to find it; Desc is for the player
Each entry in 'entries' is validated and modified to have:
.Title:string
.Date:string (ex "5 Feb 2021")
.LayoutOrder:number
.Image:string/nil
.ImageSizeY:number/nil (nil only if Image is nil), limited to a maximum
[creditsKey] = listOfDisplayName/nil
A person's display name is calculated via GetNameFromUserIdAsync, falling back on the one provided
Supported entry input format:
.Title:string
.Date:string
.Image:string
.ImageSize:Vector2/nil - can be any size; will be scaled down
.ThumbnailAssetId:number -- alternative to Image and ImageSize, this loads the thumbnail for the given asset id
[creditsKey] = person/listOfPeople
where each person is {userName[, userId]}
Also, synonyms and lower-case are handled.
]]
local imageSizeX = 200
local defaultImageSizeY = 200
local maxImageSizeY = 200
local Players = game:GetService("Players")
local handlePerson, waitForPeopleReady do
local processing = 0
local queued = {} -- note: treated like a stack since order doesn't matter
local lookupDone = Instance.new("BindableEvent")
local lookupDoneEvent = lookupDone.Event
waitForPeopleReady = function()
while processing > 0 or #queued > 0 do
lookupDoneEvent:Wait()
end
end
local function run(person)
processing += 1
coroutine.wrap(function()
local success, value = pcall(function()
return Players:GetNameFromUserIdAsync(person[2])
end)
person.display = success and value or person[1]
processing -= 1
lookupDone:Fire()
end)()
end
lookupDoneEvent:Connect(function()
local n = #queued
if n > 0 then
local person = queued[n]
queued[n] = nil
run(person)
end
end)
local function queue(person)
if processing < 20 then
run(person)
else
queued[#queued + 1] = person
end
end
handlePerson = function(person, entryTitle, entryKey)
if person.handled then return end
person.handled = true
if type(person[1]) == "string" then
if type(person[2]) == "number" then
queue(person)
elseif person[2] then
warn(string.format("Contributions Issue: Person in entry '%s.%s' should have a user id second, not", entryTitle, entryKey), tostring(person[2]))
else
person.display = person[1]
end
else
warn(string.format("Contributions Issue: Person in entry '%s.%s' should start with a string name, not", entryTitle, entryKey), tostring(person[1]))
person.display = "{error}"
end
end
end
local synonyms = {
building = "Builders",
builder = "Builders",
scripting = "Scripters",
scripter = "Scripters",
special = "SpecialThanks",
desc = "Description",
assetid = "ThumbnailAssetId",
}
local knownFields = {
Title = "string",
Date = "string",
Description = "string",
Image = "string",
ImageSize = "Vector2",
ThumbnailAssetId = "number",
Builders = "table",
Scripters = "table",
UI = "table",
GFX = "table",
SpecialThanks = "table",
}
local credits = { -- In the order they should appear
{Key = "Builders", Desc = "Building"},
{Key = "GFX", Desc = "GFX"},
{Key = "UI", Desc = "UI"},
{Key = "Scripters", Desc = "Scripting"},
{Key = "SpecialThanks", Desc = "Special Thanks"},
}
for k, v in pairs(knownFields) do
synonyms[k:lower()] = k
end
local function getLayoutOrder(year, month, day, entryTitle)
return -(((year or 2021) - 2021) * 1000000 + (month or 0) * 10000 + (day or 0) * 100) - (100 - (entryTitle and math.clamp(string.byte(entryTitle:sub(1, 1):lower()) - 96, 0, 99) or 0))
end
local monthNames = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}
local function handleDate(v, entryTitle)
-- returns display date, layout order
local mm, day, year = v:match("(%d%d?)/(%d%d?)/(%d%d%d%d)")
if not mm then
mm, year = v:match("(%d%d?)/(%d%d%d%d)")
if not mm then
year = v:match("(%d%d%d%d)")
if not year then
warn(string.format("Contributions Issue: Malformed date in entry '%s'; got", entryTitle), v)
return v, getLayoutOrder(nil, nil, nil, entryTitle)
end
end
end
local month
if year then
year = tonumber(year)
if mm then
mm = tonumber(mm)
if day then
day = tonumber(day)
end
if mm > 12 then
if day and day <= 12 then
mm, day = day, mm
warn(string.format("Contributions Issue: Date has month & day reversed in entry '%s'; got", entryTitle), v)
else
warn(string.format("Contributions Issue: Date has invalid month in entry '%s'; got", entryTitle), v)
end
else
month = monthNames[mm]
end
end
end
local date
if year then
if month then
if day then
date = string.format("%d %s %d", day, month, year)
else
date = string.format("%s %d", month, year)
end
else
date = tostring(year)
end
else
date = v
end
return date, getLayoutOrder(year, mm, day, entryTitle)
end
local function handleFields(entry, i)
-- Handles synonyms, empty tables, and unknown fields
local newEntry = {}
if not entry.Title then
warn("Contributions Issue: entry #" .. i .. " is missing .Title!")
entry.Title = "#" .. i
end
for k, v in pairs(entry) do
local t = typeof(v)
if t == "table" then
if #v == 0 then -- Don't save empty tables
continue
else
if type(v[1]) ~= "table" then
v = {v}
end
for i, person in ipairs(v) do
handlePerson(person, entry.Title, k)
end
end
elseif v == "" then -- Don't save empty strings
continue
end
local newKey
if knownFields[k] then
newKey = k
else
local lower = k:lower()
newKey = synonyms[lower]
if not newKey then
warn(string.format("Contributions Issue: Unknown field '%s' in entry '%s'", k, entry.Title or "(No title!)"))
end
end
if newKey then
if t == knownFields[newKey] then
if newKey == "Image" and not v:find("asset", 1, true) then
warn(string.format("Contributions Issue: Image field in entry '%s' is expected to be in asset format, got", entry.Title or "(No title!)"), v)
elseif newKey == "Date" then
newEntry.Date, newEntry.LayoutOrder = handleDate(v, entry.Title)
elseif newKey == "ThumbnailAssetId" then
if entry.Image or entry.ImageSize then
warn(string.format("Contributions Issue: ThumbnailAssetId should not co-exist with Image nor ImageSize fields (in entry '%s')", entry.Title or "(No title!)"))
end
newEntry.Image = "rbxthumb://type=Asset&w=420&h=420&id=" .. entry.ThumbnailAssetId
elseif not ((newKey == "Image" or newKey == "ImageSize") and entry.ThumbnailAssetId) then -- ignore Image/ImageSize when ThumbnailAssetId is provided (a warning is given when ThumbnailAssetId is encountered)
newEntry[newKey] = v
end
else
warn(string.format("Contributions Issue: Field '%s' in entry '%s' is expected to be of type %s, got", k, entry.Title or "(No title!)", knownFields[newKey]), tostring(v))
end
end
end
if not entry.Date then
warn("Contributions Issue: entry '" .. entry.Title .. "' is missing .Date!")
entry.Date = ""
entry.LayoutOrder = getLayoutOrder(nil, nil, nil, entry.Title)
end
if newEntry.ImageSize then
if newEntry.Image then
local size = newEntry.ImageSize
newEntry.ImageSizeY = math.min(maxImageSizeY, size.X / imageSizeX * size.Y)
end
newEntry.ImageSize = nil
elseif newEntry.Image then
newEntry.ImageSizeY = defaultImageSizeY
end
return newEntry
end
local function handlePeople(entry)
for field, t in pairs(knownFields) do
local v = entry[field]
if t ~= "table" or not v then continue end
local new = {}
for i, person in ipairs(v) do
new[i] = person.display
end
entry[field] = new
end
end
return function(entries) -- See documentation at top
for i, entry in ipairs(entries) do
entries[i] = handleFields(entry, i)
end
waitForPeopleReady()
for i, entry in ipairs(entries) do
handlePeople(entry)
end
entries.Credits = credits
return entries
end
|
-- my bindings for keyboard layouts
-- see windows.lua
return {
modifiers = {'alt'},
showHelp = true,
trigger = 'space',
mappings = {
{ {}, 'f', 'maximize' },
{ {}, 's', 'centerWithFullHeight' },
{ {}, 'a', 'left' },
{ {}, 'x', 'down' },
{ {}, 'w', 'up' },
{ {}, 'd', 'right' },
{ {}, 'q', 'upLeft' },
{ {}, 'e', 'upRight' },
{ {}, 'z', 'downLeft' },
{ {}, 'c', 'downRight' },
{ {}, 'escape', 'exit'}
-- { {'shift'}, 'a', 'left40' },
-- { {'shift'}, 'd', 'right60' },
-- { {}, 'n', 'nextScreen' },
-- { {}, 'right', 'moveOneScreenEast' },
-- { {}, 'left', 'moveOneScreenWest' },
}
}
|
package.path = table.concat({
'libs/?.lua',
'libs/?/init.lua',
'',
}, ';') .. package.path
package.cpath = table.concat({
'libs/?.so',
'',
}, ';') .. package.cpath
local util = require 'util'
local irc = require 'irc'
local utf8 = util.utf8
local busted = require'busted'
local cqueues = require'cqueues'
local new_headers = require "http.headers".new
local queue = cqueues.new()
local describe = busted.describe
local it = busted.it
describe("test IRC lib", function()
describe("parse 352 message", function()
it("should parse 352 message with IPv6 host", function()
local line = ':server.server.com 352 botnick #channel user 2a00:dd52:211g::2 server.server.com nick H :0 Realname'
local command, argument, source, destination = irc.parse(line)
assert.are_equal('352', command)
assert.are_equal('server.server.com', source)
assert.are_equal('#channel', destination)
assert.are_same({
mode = 'H',
hopcount = ':0',
server = 'server.server.com',
nick = 'nick',
realname = 'Realname',
user = 'user',
sourcenick = 'botnick',
host = '2a00:dd52:211g::2',
}, argument)
end)
end)
describe("split irc message", function()
local hostmask = 'irc@irc.example.com'
local destination = '#channel'
it("should keep short messages intact", function()
local out = 'foobar'
local message, extra = irc.split(hostmask, destination, out)
assert.are_equal(out, message)
assert.are_equal(extra, nil)
end)
it("should split long messages into two", function()
local out = string.rep('A', 4096)
local message, extra = irc.split(hostmask, destination, out)
local less = #message < 512
assert.is_true(less)
end)
it("should handle mb3 mb4 utf8", function()
local out = "๐๐๐ ๐ก๐ข๐ฃ๐ค๐ฅ๐ฆ๐ง๐จ๐ฉ๐ช๐ซ๐ฌ๐ญ๐ฎ๐ฏ๐ฐ๐ฑ๐ฒ๐ณ๐ต๐ถ๐ท๐๐
โญ๐๐๐๐โโ๐๐๐๐๐๐๐๐โ๐๐๐๐๐๐โจ ๐๐๐ ๐ก๐ข๐ฃ๐ค๐ฅ๐ฆ๐ง๐จ๐ฉ๐ช๐ซ๐ฌ๐ญ๐ฎ๐ฏ๐ฐ๐ฑ๐ฒ๐ณ๐ต๐ถ๐ท๐๐
โญ๐๐๐๐โโ๐๐๐๐๐๐๐๐โ๐๐๐๐๐๐โจ ๐๐๐ ๐ก๐ข๐ฃ๐ค๐ฅ๐ฆ๐ง๐จ๐ฉ๐ช๐ซ๐ฌ๐ญ๐ฎ๐ฏ๐ฐ๐ฑ๐ฒ๐ณ๐ต๐ถ๐ท๐๐
โญ๐๐๐๐โโ๐๐๐๐๐๐๐๐โ๐๐๐๐๐๐โจ "
local message, extra = irc.split(hostmask, destination, out)
local less = #message < 512
assert.is_true(less)
end)
it("should not lose any bytes", function()
local out = string.rep('A', 4096)
local message, extra = irc.split(hostmask, destination, out, '')
local therest = #out - #message
assert.are_equal(#extra, therest)
end)
it("should not die on empty", function()
local message, extra = irc.split(hostmask, destination, nil, '')
assert.are_equal(nil, message)
assert.are_equal(nil, extra)
local message, extra = irc.split(hostmask, destination, '', '')
assert.are_equal('', message)
assert.are_equal(nil, extra)
end)
it("should parse ACTION with stripping the 01 at the end", function()
local line = ':server.server.com 352 botnick #channel user 2a00:dd52:211g::2 server.server.com nick H :0 Realname'
local line = ":tx!tx@127.0.0.1 PRIVMSG #testchan :\001ACTION testing\001"
local command, argument, source, destination = irc.parse(line)
assert.are_equal('PRIVMSG', command)
assert.are_equal('#testchan', destination)
assert.are_equal('\001ACTION testing\001', argument)
end)
end)
describe("format irc messages", function()
it("should format ACTION ", function()
assert.are_equal('\001ACTION testing\001', irc.formatCtcp('testing', 'ACTION'))
end)
end)
end)
describe("test util lib", function()
describe("utf8 string tests", function()
it("should work with multibye utf8 chars", function()
local line = {'F','o','o',' ','รฆ','รธ','ร
','๐'}
local uline = {}
for c in util.utf8.chars(table.concat(line)) do
table.insert(uline, c)
end
assert.are_same(line, uline)
assert.are_equal(#line, utf8.len(table.concat(line)))
local reversed = {}
for i=#line,1,-1 do
table.insert(reversed, line[i])
end
assert.are_same(table.concat(reversed), utf8.reverse(table.concat(line)))
assert.are_equal('foo รฆรธรฅ๐', utf8.lower(table.concat(line)))
assert.are_equal(utf8.char(97), 'a')
assert.are_equal(utf8.char(0x1f600), '๐')
end)
end)
end)
describe("test webserver", function()
describe("webserver tests", function()
it("should listen", function()
local webserver = assert(loadfile('core/webserver.lua'))(ivar2)
local server = webserver.start('::', '9999')
queue:wrap(function()
server:listen()
local cqueue = cqueues.running()
server:run(webserver.on_stream, cqueue)
end)
webserver.regUrl('/test', function(self, req, res)
assert.are_equal(req.url, '/test')
res:append(":status", "200")
req:write_headers(res, false)
req:write_body_from_string('Hello world!')
end)
webserver.regUrl('/simplereturn', function(self, req, res)
return 'OK'
end)
queue:wrap(function()
util.simplehttp('http://127.0.0.1:9999/asdf', function(data)
assert.are_equal(data, 'Nyet. I am four oh four')
end)
end)
queue:wrap(function()
util.simplehttp('http://[::1]:9999/test', function(data)
assert.are_equal(data, 'Hello world!')
end)
local data = util.simplehttp('http://[::1]:9999/simplereturn')
assert.are_equal(data, 'OK')
end)
queue:wrap(function()
util.simplehttp({
url='http://127.0.0.1:9999/test',
--headers={Connection='close'}
}, function(data)
assert.are_equal(data, 'Hello world!')
end)
end)
queue:wrap(function()
util.simplehttp({
url='http://xt.gg/test.txt',
}, function(data)
assert.are_equal(data, 'Hello world!\n')
end)
end)
for i=1,10 do
queue:wrap(function()
local data = util.simplehttp('http://[2a02:cc41:100f::10]/test.txt')
assert.are_equal(data, 'Hello world!\n')
end)
end
assert_loop(queue, TEST_TIMEOUT)
end)
end)
end)
|
return function(puzzle)
end
|
require("luasnip").config.set_config {
history = true,
updateevents = "TextChanged,TextChangedI",
}
require("luasnip.loaders.from_vscode").load()
-- from https://github.com/L3MON4D3/LuaSnip/wiki/Misc#choicenode-popup
local current_nsid = vim.api.nvim_create_namespace "LuaSnipChoiceListSelections"
local current_win = nil
local function window_for_choiceNode(choiceNode)
local buf = vim.api.nvim_create_buf(false, true)
local buf_text = {}
local row_selection = 0
local row_offset = 0
local text
for _, node in ipairs(choiceNode.choices) do
text = node:get_docstring()
-- find one that is currently showing
if node == choiceNode.active_choice then
-- current line is starter from buffer list which is length usually
row_selection = #buf_text
-- finding how many lines total within a choice selection
row_offset = #text
end
vim.list_extend(buf_text, text)
end
vim.api.nvim_buf_set_text(buf, 0, 0, 0, 0, buf_text)
local w, h = vim.lsp.util._make_floating_popup_size(buf_text)
-- adding highlight so we can see which one is been selected.
local extmark = vim.api.nvim_buf_set_extmark(
buf,
current_nsid,
row_selection,
0,
{ hl_group = "incsearch", end_line = row_selection + row_offset }
)
-- shows window at a beginning of choiceNode.
local win = vim.api.nvim_open_win(buf, false, {
relative = "win",
width = w,
height = h,
bufpos = choiceNode.mark:pos_begin_end(),
style = "minimal",
border = "rounded",
})
-- return with 3 main important so we can use them again
return { win_id = win, extmark = extmark, buf = buf }
end
_G.choice_popup = function(choiceNode)
-- build stack for nested choiceNodes.
if current_win then
vim.api.nvim_win_close(current_win.win_id, true)
vim.api.nvim_buf_del_extmark(current_win.buf, current_nsid, current_win.extmark)
end
local create_win = window_for_choiceNode(choiceNode)
current_win = {
win_id = create_win.win_id,
prev = current_win,
node = choiceNode,
extmark = create_win.extmark,
buf = create_win.buf,
}
end
_G.update_choice_popup = function(choiceNode)
vim.api.nvim_win_close(current_win.win_id, true)
vim.api.nvim_buf_del_extmark(current_win.buf, current_nsid, current_win.extmark)
local create_win = window_for_choiceNode(choiceNode)
current_win.win_id = create_win.win_id
current_win.extmark = create_win.extmark
current_win.buf = create_win.buf
end
_G.choice_popup_close = function()
vim.api.nvim_win_close(current_win.win_id, true)
vim.api.nvim_buf_del_extmark(current_win.buf, current_nsid, current_win.extmark)
-- now we are checking if we still have previous choice we were in after exit nested choice
current_win = current_win.prev
if current_win then
-- reopen window further down in the stack.
local create_win = window_for_choiceNode(current_win.node)
current_win.win_id = create_win.win_id
current_win.extmark = create_win.extmark
current_win.buf = create_win.buf
end
end
vim.cmd [[
augroup choice_popup
au!
au User LuasnipChoiceNodeEnter lua v:lua.choice_popup(require("luasnip").session.event_node)
au User LuasnipChoiceNodeLeave lua v:lua.choice_popup_close()
au User LuasnipChangeChoice lua v:lua.update_choice_popup(require("luasnip").session.event_node)
augroup END
]]
|
--[[
______ _ _
| ___ \ | | | |
| | _ | | ____| |_ _ ____ _ | | ___
| || || |/ _ | | | | / _ |/ || |/ _ \
| || || ( ( | | |\ V ( ( | ( (_| | |_| |
|_||_||_|\_||_|_| \_/ \_||_|\____|\___/
malvado - A game programming library with "DIV Game Studio"-style
processes for Lua/Love2D.
Copyright (C) 2017-present Jeremies Pรฉrez Morata
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
--]]
function set_title(title)
love.window.setTitle(title)
end
|
local Clock = Class(function(self, inst)
self.daysegs = TUNING.DAY_SEGS_DEFAULT
self.nightsegs = TUNING.NIGHT_SEGS_DEFAULT
self.dusksegs = TUNING.DUSK_SEGS_DEFAULT
self.inst = inst
self.task = nil
self.numcycles = 0
self.lmax = 1
self.dayColour = Point(255/255, 230/255, 158/255)
self.duskColour = Point(100/255, 100/255, 100/255)
self.nightColour = Point(0/255, 0/255, 0/255)
self.caveColour = Point(0,0,0)
self.currentColour = self.dayColour
self.lerpToColour = self.dayColour
self.lerpFromColour = self.dayColour
if GetWorld():IsCave() then
self.currentColour = self.caveColour
self.lerpToColour = self.caveColour
self.lerpFromColour = self.caveColour
end
self.lerptimeleft = 0
self.totallerptime = 0
self.override_timeLeftInEra = nil
self.inst:StartUpdatingComponent(self)
self.previous_phase = "night"
self:StartDay()
end)
function Clock:GetTimeLeftInEra()
return self.timeLeftInEra
end
function Clock:GetDebugString()
return string.format("%d %s: %2.2f ", self.numcycles+1, self.phase, self:GetTimeLeftInEra())
end
function Clock:OnSave()
return
{
numcycles = self.numcycles,
phase = self.phase,
normeratime = self:GetNormEraTime()
}
end
function Clock:OnLoad(data)
self.numcycles = data.numcycles or 0
if data.phase == "night" then
self:StartNight(true)
elseif data.phase == "dusk" then
self:StartDusk(true)
else
self:StartDay(true)
end
local normeratime = data.normeratime or 0
self:SetNormEraTime(normeratime)
end
function Clock:Reset()
self.numcycles = 0
self:StartDay()
end
local moonphases =
{
"new",
"quarter",
"half",
"threequarter",
"full",
}
function Clock:GetMoonPhase()
local phaselength = 2
local n = #moonphases-1
local idx = math.floor(self.numcycles/phaselength) % (2*n)
if idx >= n then
idx = n*2 - idx
end
return moonphases[idx+1]
end
function Clock:SetNormEraTime(percent)
if self.phase == "day" then
self.totalEraTime = self:GetDayTime()
elseif self.phase == "dusk" then
self.totalEraTime = self:GetDuskTime()
else
self.totalEraTime = self:GetNightTime()
end
self.timeLeftInEra = (1-percent)*self.totalEraTime
end
function Clock:GetTimeInEra()
return self.totalEraTime - self.timeLeftInEra
end
function Clock:GetNormEraTime()
local ret = self.totalEraTime > 0 and (1 - self.timeLeftInEra / self.totalEraTime) or 1
return ret
end
function Clock:GetNormTime()
local ret = 0
if self.phase == "day" then
return (self.daysegs / 16)*self:GetNormEraTime()
elseif self.phase == "dusk" then
return (self.daysegs / 16) + (self.dusksegs / 16)*self:GetNormEraTime()
else
return (self.daysegs / 16) + (self.dusksegs / 16) + (self.nightsegs / 16)*self:GetNormEraTime()
end
end
function Clock:CurrentPhaseIsAlways()
if self.phase == "day" then
return self:GetDaySegs() == 16
elseif self.phase == "dusk" then
return self:GetDuskSegs() == 16
else
return self:GetNightSegs() == 16
end
end
function Clock:IsDay()
return self.phase == "day"
end
function Clock:IsNight()
return self.phase == "night"
end
function Clock:IsDusk()
return self.phase == "dusk"
end
function Clock:GetPhase()
return self.phase
end
function Clock:GetNextPhase()
if self:CurrentPhaseIsAlways() then
if self.phase == "day" then
return "day"
elseif self.phase == "dusk" then
return "dusk"
end
return "night"
end
if self.phase == "day" then
return "dusk"
elseif self.phase == "dusk" then
return "night"
else
return "day"
end
end
function Clock:GetPrevPhase()
if self:CurrentPhaseIsAlways() then
if self.phase == "day" then
return "day"
elseif self.phase == "dusk" then
return "dusk"
end
return "night"
end
if self.phase == "day" then
return "night"
elseif self.phase == "dusk" then
return "day"
else
return "dusk"
end
end
function Clock:MakeNextDay()
local time_left = TUNING.TOTAL_DAY_TIME * (1 - self:GetNormTime())
LongUpdate(time_left + TUNING.SEG_TIME*.5)
--self.numcycles = self.numcycles +1
--self.inst:PushEvent("daycomplete", {day= self.numcycles})
--self:StartDay()
end
function Clock:NextPhase()
if self:CurrentPhaseIsAlways() then
self.numcycles = self.numcycles +1
self.inst:PushEvent("daycomplete", {day= self.numcycles})
if self.phase == "day" then
self:StartDay()
elseif self.phase == "dusk" then
self:StartDusk()
else
self:StartNight()
end
return
end
if self.phase == "day" then
self:StartDusk()
elseif self.phase == "dusk" then
self:StartNight()
else
self.numcycles = self.numcycles +1
self.inst:PushEvent("daycomplete", {day= self.numcycles})
self:StartDay()
end
end
function Clock:GetDaySegs()
return self.daysegs
end
function Clock:GetNightSegs()
return self.nightsegs
end
function Clock:GetDuskSegs()
return self.dusksegs
end
function Clock:SetSegs(day, dusk, night)
assert(day + dusk + night == 16, "invalid number of time segs")
local norm_time = self:GetNormEraTime()
self.daysegs = day
self.dusksegs = dusk
self.nightsegs = night
if self.phase == "day" then
self.totalEraTime = self.daysegs*TUNING.SEG_TIME
elseif self.phase == "dusk" then
self.totalEraTime = self.dusksegs*TUNING.SEG_TIME
else
self.totalEraTime = self.nightsegs*TUNING.SEG_TIME
end
self:SetNormEraTime(norm_time)
self.inst:PushEvent("daysegschanged")
end
function Clock:DoLightningLighting(maxlight)
self.lightning = true
self.lightningtime = 0
self.lmax = maxlight or 1
end
function Clock:LongUpdate(dt)
self:OnUpdate(dt)
--fix the colour
self.lerptimeleft = 0
if self:IsDay() then
self.currentColour = self.dayColour
elseif self:IsDusk() then
self.currentColour = self.duskColour
else
self.currentColour = self.nightColour
end
if GetWorld():IsCave() then
self.currentColour = self.caveColour
end
local p = GetSeasonManager() and GetSeasonManager():GetWeatherLightPercent() or 1
TheSim:SetAmbientColour( p*self.currentColour.x, p*self.currentColour.y, p*self.currentColour.z )
end
function Clock:OnUpdate(dt)
self.timeLeftInEra = self.timeLeftInEra - dt
if self.override_timeLeftInEra ~= nil then
self.timeLeftInEra = self.override_timeLeftInEra
end
if self.timeLeftInEra <= 0 then
local time_left_over = -self.timeLeftInEra
self:NextPhase()
if time_left_over > 0 then
self:OnUpdate(time_left_over)
return
end
end
if self.lerptimeleft > 0 then
local percent = 1 - (self.lerptimeleft / self.totallerptime)
local r = percent*self.lerpToColour.x + (1 - percent)*self.lerpFromColour.x
local g = percent*self.lerpToColour.y + (1 - percent)*self.lerpFromColour.y
local b = percent*self.lerpToColour.z + (1 - percent)*self.lerpFromColour.z
self.currentColour = Point(r,g,b)
if GetWorld():IsCave() then
self.currentColour = self.caveColour
end
self.lerptimeleft = self.lerptimeleft - dt
end
if self.lightning then
self.lightningtime = self.lightningtime + dt
if self.lightningtime < (1/30)*1 then
TheSim:SetAmbientColour(0,0,0)
elseif self.lightningtime < (1/30)*(1+2) then
TheSim:SetAmbientColour(self.lmax,self.lmax,self.lmax)
elseif self.lightningtime < (1/30)*(1+2+1) then
TheSim:SetAmbientColour(0,0,0)
elseif self.lightningtime < (1/30)*(1+2+1+4) then
TheSim:SetAmbientColour(self.lmax,self.lmax,self.lmax)
else
local col = nil
if self:IsNight() then
col = self.nightColour
elseif self:IsDusk() then
col = self.duskColour
else
col = self.dayColour
end
self:LerpAmbientColour(col*.5, col, 1.5)
self.lightning = false
self.last_lightning_time = GetTime()
end
else
-- if GetWorld():IsCave() then
-- return
-- end
if self:IsNight() and (self.totalEraTime - self.timeLeftInEra) <= 8 and self.last_lightning_time and (GetTime() - self.last_lightning_time) <= dt then
if not GetWorld():IsCave() then
self:LerpAmbientColour(self.duskColour, self.nightColour, 4)
end
else
local p = GetSeasonManager() and GetSeasonManager():GetWeatherLightPercent() or 1
TheSim:SetAmbientColour( p*self.currentColour.x, p*self.currentColour.y, p*self.currentColour.z )
end
end
self.inst:PushEvent("clocktick", {phase = self.phase, normalizedtime=self:GetNormTime()})
end
function Clock:LerpAmbientColour(src, dest, time)
self.lerptimeleft = time
self.totallerptime = time
if GetWorld():IsCave() then
dest = self.caveColour
end
if time == 0 then
self.currentColour = dest
else
self.lerpFromColour = src
self.lerpToColour = dest
end
local p = GetSeasonManager() and GetSeasonManager():GetWeatherLightPercent() or 1
if not self.currentColour then
self.currentColour = src
end
TheSim:SetAmbientColour( p*self.currentColour.x, p*self.currentColour.y, p*self.currentColour.z )
end
function Clock:__tostring()
return string.format("%s cycle:%d (%2.2f) %2.2f", self.phase, self.numcycles, self.timeLeftInEra, self:GetNormTime())
end
function Clock:ToMetricsString()
-- the metrics value must be an int so we have to convert
-- phase day- 1 , dusk- 2, night -3
local timeofday = 1
if self.phase == "dusk" then
timeofday = 2
elseif self.phase == "night" then
timeofday = 3
end
-- numcycles 000-999
-- time 000 normtime*100
local time = math.floor(self:GetNormTime()*100)
return string.format("%d%03d%03d", timeofday, self.numcycles, time)
end
function Clock:GetDayTime()
return self.daysegs*TUNING.SEG_TIME
end
function Clock:GetNightTime()
return self.nightsegs*TUNING.SEG_TIME
end
function Clock:GetDuskTime()
return self.dusksegs*TUNING.SEG_TIME
end
function Clock:StartDay(instant)
self.timeLeftInEra = self:GetDayTime()
self.totalEraTime = self.timeLeftInEra
self.phase = "day"
self.inst:PushEvent("daytime", {day=self.numcycles})
if self.daytime == 0 then
self:NextPhase()
return
end
if self.phase ~= self.previous_phase then
self.previous_phase = self.phase
self:LerpAmbientColour(self.currentColour, self.dayColour, instant and 0 or 4)
end
end
function Clock:StartDusk(instant)
self.timeLeftInEra = self:GetDuskTime()
self.totalEraTime = self.timeLeftInEra
self.phase = "dusk"
if self.dusktime == 0 then
self:NextPhase()
return
end
if self.phase ~= self.previous_phase then
self.previous_phase = self.phase
self:LerpAmbientColour(self.currentColour, self.duskColour, instant and 0 or 6)
self.inst:PushEvent("dusktime", {day=self.numcycles})
end
end
function Clock:StartNight(instant)
self.timeLeftInEra = self:GetNightTime()
self.totalEraTime = self.timeLeftInEra
self.phase = "night"
self.inst:PushEvent("nighttime", {day=self.numcycles})
if self.nighttime == 0 then
self:NextPhase()
return
end
if self.phase ~= self.previous_phase then
self.previous_phase = self.phase
self:LerpAmbientColour(self.currentColour, self.nightColour, instant and 0 or 8)
end
end
function Clock:LerpFactor()
if self.totallerptime == 0 then
return 1
else
return math.min( 1.0, 1.0 - self.lerptimeleft / self.totallerptime )
end
end
function Clock:GetNumCycles()
return self.numcycles
end
return Clock
|
bin={}
bin.Version={6,0,0}
bin.stage='stable'
bin.data=''
bin.t='bin'
bin.__index = bin
bin.__tostring=function(self) return self:getData() end
bin.__len=function(self) return self:getlength() end
bin.lastBlockSize=0
bin.streams={}
-- Helpers
function bin.getVersion()
return bin.Version[1]..'.'..bin.Version[2]..'.'..bin.Version[3]
end
function table.print(tbl, indent)
if not indent then indent = 0 end
for k, v in pairs(tbl) do
formatting = string.rep(" ", indent) .. k .. ": "
if type(v) == "table" then
print(formatting)
table.print(v, indent+1)
elseif type(v) == 'boolean' then
print(formatting .. tostring(v))
else
print(formatting .. tostring(v))
end
end
end
function table.flip(t)
local tt={}
for i,v in pairs(t) do
tt[v]=i
end
return tt
end
function toFraction(n)
local w,p=math.modf(n)
if p~=0 then
p=tonumber(tostring(p):sub(3))
end
return w,p
end
function io.cleanName(name)
name=name:gsub("\\","")
name=name:gsub("/","")
name=name:gsub(":","")
name=name:gsub("*","")
name=name:gsub("%?","")
name=name:gsub("\"","''")
name=name:gsub("<","")
name=name:gsub(">","")
name=name:gsub("|","")
return name
end
function math.numfix(n,x)
local str=tostring(n)
if #str<x then
str=('0'):rep(x-#str)..str
end
return str
end
function bin.stripFileName(path)
path=path:gsub("\\","/")
local npath=path:reverse()
a=npath:find("/",1,true)
npath=npath:sub(a)
npath=npath:reverse()
return npath
end
function bin._trim(str)
return str:match'^()%s*$' and '' or str:match'^%s*(.*%S)'
end
function io.dirExists(strFolderName)
strFolderName = strFolderName or io.getDir()
local fileHandle, strError = io.open(strFolderName..'\\*.*','r')
if fileHandle ~= nil then
io.close(fileHandle)
return true
else
if string.match(strError,'No such file or directory') then
return false
else
return true
end
end
end
function bin.fileExists(name)
local f=io.open(name,"r")
if f~=nil then io.close(f) return true else return false end
end
function bin.randomName(n,ext)
n=n or math.random(7,15)
if ext then
a,b=ext:find('.',1,true)
if a and b then
ext=ext:sub(2)
end
end
local str,h = '',0
strings = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'}
for i=1,n do
h = math.random(1,#strings)
str = str..''..strings[h]
end
return str..'.'..(ext or 'tmp')
end
function bin.trimNul(str)
return str:match("(.-)[%z]*$")
end
function io.mkDir(dirname)
os.execute('mkdir "' .. dirname..'"')
end
function string.lines(str)
local t = {}
local function helper(line) table.insert(t, line) return '' end
helper((str:gsub('(.-)\r?\n', helper)))
return t
end
function log(data,name,fmt)
if name then
name=io.cleanName(name)
end
if not bin.logger then
bin.logger = bin.stream(name or 'lua.log',false)
elseif bin.logger and name then
bin.logger:close()
bin.logger = bin.stream(name or 'lua.log',false)
end
local d=os.date('*t',os.time())
bin.logger:tackE((fmt or '['..math.numfix(d.month,2)..'-'..math.numfix(d.day,2)..'-'..d.year..'|'..math.numfix(d.hour,2)..':'..math.numfix(d.min,2)..':'..math.numfix(d.sec,2)..']\t')..data..'\r\n')
end
function table.max(t)
if #t == 0 then return end
local value = t[1]
for i = 2, #t do
if (value < t[i]) then
value = t[i]
end
end
return value
end
local bit
if jit then
bit=require("bit")
elseif bit32 then
bit=bit32
else
bit=require("bin.numbers.no_jit_bit")
end
bin.lzw=require("bin.compressors.lzw") -- A WIP
local bits={}
bin.bits = bits
bits.data=''
bits.t='bits'
bits.Type='bits'
bits.__index = bits
bits.__tostring=function(self) return self.data end
bits.__len=function(self) return (#self.data)/8 end
local floor,insert = math.floor, table.insert
function bits.newBitBuffer(n)
--
end
function bits.newConverter(bitsIn,bitsOut)
local c={}
--
end
function basen(n,b)
if not b or b == 10 then return tostring(n) end
local digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
local t = {}
local sign = ""
if n < 0 then
sign = "-"
n = -n
end
repeat
local d = n % b + 1
n = n / b
insert(t, 1, digits:sub(d,d))
until n == 0
return sign .. table.concat(t,"")
end
bits.ref={}
function bits.newByte(d)
local c={}
if type(d)=="string" then
if #d>1 or #d<1 then
error("A byte must be one character!")
else
c.data=string.byte(d)
end
elseif type(d)=="number" then
if d>255 or d<0 then
error("A byte must be between 0 and 255!")
else
c.data=d
end
else
error("cannot use type "..type(d).." as an argument! Takes only strings or numbers!")
end
c.__index=function(self,k)
if k>=0 and k<9 then
if self.data==0 then
return 0
elseif self.data==255 then
return 1
else
return bits.ref[self.data][k]
end
end
end
c.__tostring=function(self)
return bits.ref[tostring(self.data)]
end
setmetatable(c,c)
return c
end
function bits.newByteArray(s)
local c={}
if type(s)~="string" then
error("Must be a string type or bin/buffer type")
elseif type(s)=="table" then
if s.t=="sink" or s.t=="buffer" or s.t=="bin" then
local data=s:getData()
for i=1,#data do
c[#c+1]=bits.newByte(data:sub(i,i))
end
else
error("Must be a string type or bin/buffer type")
end
else
for i=1,#s do
c[#c+1]=bits.newByte(s:sub(i,i))
end
end
return c
end
function bits.new(n,binary)
local temp={}
temp.t="bits"
temp.Type="bits"
if type(n)=="string" then
if binary then
temp.data=n:match("[10]+")
else
local t={}
for i=#n,1,-1 do
table.insert(t,bits:conv(string.byte(n,i)))
end
temp.data=table.concat(t)
end
elseif type(n)=="number" or type(n)=="table" then
temp.data=basen(n,2)
end
if #temp.data%8~=0 then
temp.data=string.rep('0',8-#temp.data%8)..temp.data
end
setmetatable(temp, bits)
return temp
end
for i=0,255 do
local d=bits.new(i).data
bits.ref[i]={d:match("(%d)(%d)(%d)(%d)(%d)(%d)(%d)(%d)")}
bits.ref[tostring(i)]=d
bits.ref[d]=i
bits.ref["\255"..string.char(i)]=d
end
function bits.numToBytes(n,fit,func)
local num=string.reverse(bits.new(n):toSbytes())
local ref={["num"]=num,["fit"]=fit}
if fit then
if fit<#num then
if func then
print("Warning: attempting to store a number that takes up more space than allotted! Using provided method!")
func(ref)
else
print("Warning: attempting to store a number that takes up more space than allotted!")
end
return ref.num:sub(1,ref.fit)
elseif fit==#num then
return string.reverse(num)
else
return string.reverse(string.rep("\0",fit-#num)..num)
end
else
return string.reverse(num)
end
end
function bits:conv(n)
local tab={}
while n>=1 do
table.insert(tab,n%2)
n=math.floor(n/2)
end
local str=string.reverse(table.concat(tab))
if #str%8~=0 or #str==0 then
str=string.rep('0',8-#str%8)..str
end
return str
end
function bits:tonumber(s,e)
if s==0 then
return tonumber(self.data,2)
end
s=s or 1
return tonumber(string.sub(self.data,(8*(s-1))+1,8*s),2) or error('Bounds!')
end
function bits:isover()
return #self.data>8
end
function bits:flipbits()
tab={}
for i=1,#self.data do
if string.sub(self.data,i,i)=='1' then
table.insert(tab,'0')
else
table.insert(tab,'1')
end
end
self.data=table.concat(tab)
end
function bits:tobytes()
local tab={}
for i=self:getbytes(),1,-1 do
table.insert(tab,string.char(self:tonumber(i)))
end
return bin.new(table.concat(tab))
end
function bits:toSbytes()
local tab={}
for i=self:getbytes(),1,-1 do
table.insert(tab,string.char(self:tonumber(i)))
end
return table.concat(tab)
end
function bits:getBin()
return self.data
end
function bits:getbytes()
return #self.data/8
end
local binNum=require("bin.numbers.BigNum")
local infinabits={}
bin.infinabits = infinabits
infinabits.data=''
infinabits.t='infinabits'
infinabits.Type='infinabits'
infinabits.__index = infinabits
infinabits.__tostring=function(self) return self.data end
infinabits.__len=function(self) return (#self.data)/8 end
local floor,insert = math.floor, table.insert
function basen(n,b)
n=BigNum.new(n)
if not b or b == 10 then return tostring(n) end
local digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
local t = {}
local sign = ""
if n < BigNum.new(0) then
sign = "-"
n = -n
end
repeat
local d = tonumber(tostring(n % b)) + 1
n = n / b
insert(t, 1, digits:sub(d,d))
until n == BigNum.new(0)
return sign .. table.concat(t,"")
end
function base2to10(num)
local n=BigNum.new(0)
for i = #num-1,0,-1 do
nn=BigNum.new(num:sub(i+1,i+1))*(BigNum.new(2)^((#num-i)-1))
n=n+nn
end
return n
end
function infinabits.newBitBuffer(n)
-- WIP
end
function infinabits.newConverter(bitsIn,bitsOut)
local c={}
-- WIP
end
infinabits.ref={}
function infinabits.newByte(d)-- WIP
local c={}
if type(d)=="string" then
if #d>1 or #d<1 then
error("A byte must be one character!")
else
c.data=string.byte(d)
end
elseif type(d)=="number" then
if d>255 or d<0 then
error("A byte must be between 0 and 255!")
else
c.data=d
end
else
error("cannot use type "..type(d).." as an argument! Takes only strings or numbers!")
end
c.__index=function(self,k)
if k>=0 and k<9 then
if self.data==0 then
return 0
elseif self.data==255 then
return 1
else
return infinabits.ref[self.data][k]
end
end
end
c.__tostring=function(self)
return infinabits.ref[tostring(self.data)]
end
setmetatable(c,c)
return c
end
function infinabits.newByteArray(s)-- WIP
local c={}
if type(s)~="string" then
error("Must be a string type or bin/buffer type")
elseif type(s)=="table" then
if s.t=="sink" or s.t=="buffer" or s.t=="bin" then
local data=s:getData()
for i=1,#data do
c[#c+1]=infinabits.newByte(data:sub(i,i))
end
else
error("Must be a string type or bin/buffer type")
end
else
for i=1,#s do
c[#c+1]=infinabits.newByte(s:sub(i,i))
end
end
return c
end
function infinabits.new(n,binary)
local temp={}
temp.t="infinabits"
temp.Type="infinabits"
if type(n)=="string" then
if binary then
temp.data=n:match("[10]+")
else
local t={}
for i=#n,1,-1 do
table.insert(t,infinabits:conv(string.byte(n,i)))
end
temp.data=table.concat(t)
end
elseif type(n)=="number" or type(n)=="table" then
temp.data=basen(tostring(n),2)
end
if #temp.data%8~=0 then
temp.data=string.rep('0',8-#temp.data%8)..temp.data
end
setmetatable(temp, infinabits)
return temp
end
for i=0,255 do
local d=infinabits.new(i).data
infinabits.ref[i]={d:match("(%d)(%d)(%d)(%d)(%d)(%d)(%d)(%d)")}
infinabits.ref[tostring(i)]=d
infinabits.ref[d]=i
infinabits.ref["\255"..string.char(i)]=d
end
function infinabits.numToBytes(n,fit,func)
local num=string.reverse(infinabits.new(BigNum.new(n)):toSbytes())
local ref={["num"]=num,["fit"]=fit}
if fit then
if fit<#num then
if func then
print("Warning: attempting to store a number that takes up more space than allotted! Using provided method!")
func(ref)
else
print("Warning: attempting to store a number that takes up more space than allotted!")
end
return ref.num:sub(1,ref.fit)
elseif fit==#num then
return string.reverse(num)
else
return string.reverse(string.rep("\0",fit-#num)..num)
end
else
return string.reverse(num)
end
end
function infinabits.numToBytes(n,fit,fmt,func)
if fmt=="%e" then
local num=string.reverse(infinabits.new(BigNum.new(n)):toSbytes())
local ref={["num"]=num,["fit"]=fit}
if fit then
if fit<#num then
if func then
print("Warning: attempting to store a number that takes up more space than allotted! Using provided method!")
func(ref)
else
print("Warning: attempting to store a number that takes up more space than allotted!")
end
return ref.num:sub(1,ref.fit)
elseif fit==#num then
return num
else
return string.rep("\0",fit-#num)..num
end
else
return num
end
else
local num=string.reverse(infinabits.new(BigNum.new(n)):toSbytes())
local ref={["num"]=num,["fit"]=fit}
if fit then
if fit<#num then
if func then
print("Warning: attempting to store a number that takes up more space than allotted! Using provided method!")
func(ref)
else
print("Warning: attempting to store a number that takes up more space than allotted!")
end
return ref.num:sub(1,ref.fit)
elseif fit==#num then
return string.reverse(num)
else
return string.reverse(string.rep("\0",fit-#num)..num)
end
else
return string.reverse(num)
end
end
end
function infinabits:conv(n)
local tab={}
local one=BigNum.new(1)
local n=BigNum.new(n)
while n>=one do
table.insert(tab,tonumber(tostring(n%2)))
n=n/2
end
local str=string.reverse(table.concat(tab))
if #str%8~=0 or #str==0 then
str=string.rep('0',8-#str%8)..str
end
return str
end
function infinabits:tonumber(s)
if s==0 then
return tonumber(self.data,2)
end
s=s or 1
return tonumber(tostring(base2to10(string.sub(self.data,(8*(s-1))+1,8*s)))) or error('Bounds!')
end
function infinabits:isover()
return #self.data>8
end
function infinabits:flipbits()
tab={}
local s=self.data
s=s:gsub("1","_")
s=s:gsub("0","1")
s=s:gsub("_","0")
self.data=s
end
function infinabits:tobytes()
local tab={}
for i=self:getbytes(),1,-1 do
table.insert(tab,string.char(self:tonumber(i)))
end
return bin.new(table.concat(tab))
end
function infinabits:toSbytes()
local tab={}
for i=self:getbytes(),1,-1 do
table.insert(tab,string.char(self:tonumber(i)))
end
return table.concat(tab)
end
function infinabits:getBin()
return self.data
end
function infinabits:getbytes()
return #self.data/8
end
local randomGen=require("bin.numbers.random")
function bin.setBitsInterface(int)
bin.defualtBit=int or infinabits
end
bin.setBitsInterface()
function bin.normalizeData(data) -- unified function to allow for all types to string
if type(data)=="string" then return data end
if type(data)=="table" then
if data.Type=="bin" or data.Type=="streamable" or data.Type=="buffer" then
return data:getData()
elseif data.Type=="bits" or data.Type=="infinabits" then
return data:toSbytes()
elseif data.Type=="sink" then
-- LATER
else
return ""
end
elseif type(data)=="userdata" then
if tostring(data):sub(1,4)=="file" then
local cur=data:seek("cur")
data:seek("set",0)
local dat=data:read("*a")
data:seek("set",cur)
return dat
else
error("File handles are the only userdata that can be used!")
end
end
end
function bin.resolveType(tab) -- used in getblock for auto object creation. Internal method
if tab.Type then
if tab.Type=="bin" then
return bin.new(tab.data)
elseif tab.Type=="streamable" then
if bin.fileExist(tab.file) then return nil,"Cannot load the stream file, source file does not exist!" end
return bin.stream(tab.file,tab.lock)
elseif tab.Type=="buffer" then
local buf=bin.newDataBuffer(tab.size)
buf[1]=tab:getData()
return buf
elseif tab.Type=="bits" then
local b=bits.new("")
b.data=tab.data
return b
elseif tab.Type=="infinabits" then
local b=infinabits.new("")
b.data=tab.data
return b
elseif tab.Type=="sink" then
return bin.newSync(tab.data)
else -- maybe a type from another library
return tab
end
else return tab end
end
function bin.fileExist(path)
g=io.open(path or '','r')
if path =='' then
p='empty path'
return nil
end
if g~=nil and true or false then
p=(g~=nil and true or false)
end
if g~=nil then
io.close(g)
else
return false
end
return p
end
function bin.toHex(str)
local str=bin.normalizeData(str)
return (str:gsub('.', function (c)
return string.format('%02X', string.byte(c))
end))
end
function bin.fromHex(str)
return (str:gsub('..', function (cc)
return string.char(tonumber(cc, 16))
end))
end
-- Constructors
function bin.new(data)
data=bin.normalizeData(data)
local c = {}
setmetatable(c, bin)
c.data=data
c.Type="bin"
c.t="bin"
c.pos=1
c.stream=false
return c
end
function bin.newFromHex(data)
return bin.new(bin.fromHex(data))
end
function bin.load(path)
if type(path) ~= "string" then error("Path must be a string!") end
local f = io.open(path, 'rb')
local content = f:read('*a')
f:close()
return bin.new(content)
end
function bin.stream(file,l)
if not(l==false) then l=true end
local c=bin.new()
c.Type="streamable"
c.t="streamable"
if bin.streams[file]~=nil then
c.file=file
c.lock = l
c.workingfile=bin.streams[file][1].workingfile
bin.streams[file][2]=bin.streams[file][2]+1
c.stream=true
return c
end
if bin.fileExist(file) then
c.file=file
c.lock = l
c.workingfile=io.open(file,'rb+')
else
c.file=file
c.lock = l
c.workingfile=io.open(file,'w')
io.close(c.workingfile)
c.workingfile=io.open(file,'rb+')
end
c.stream=true
bin.streams[file]={c,1}
return c
end
function bin.newTempFile()
local c=bin.new()
c.file=file
c.lock = false
c.workingfile=io.tmpfile()
c.stream=true
return c
end
function bin.freshStream(file)
bin.new():tofile(file)
return bin.stream(file,false)
end
function bin.newStreamFileObject(file)
local c=bin.new()
c.Type="streamable"
c.t="streamable"
c.file="FILE_OBJECT"
c.lock = false
c.workingfile=file
c.stream=true
return c
end
-- Core Methods
function bin:canStreamWrite()
return (self.stream and not(self.lock))
end
function bin:getSeek()
if self.stream then
return self.workingfile:seek("cur")+1
else
return self.pos
end
end
function bin:setSeek(n)
if self.stream then
self.workingfile:seek("set",n-1)
else
self.pos=n
end
end
function bin:seek(n)
if self.stream then
if not n then return self.workingfile:seek("cur") end
local cur=self.workingfile:seek("cur")
self.workingfile:seek("set",cur+n)
else
if not n then return self.pos end
if #self.data-(self.pos-1)<n then
print(n-((#self.data)-(self.pos-1)))
self:write(string.rep("\0",n-((#self.data)-(self.pos-1))))
return
end
self.pos=self.pos+n
end
end
function bin:read(n)
if self.stream then
return self.workingfile:read(n)
else
local data=self.data:sub(self.pos,self.pos+n-1)
self.pos=self.pos+n
if data=="" then return end
return data
end
end
function bin:write(data,size)
local data=bin.normalizeData(data)
local dsize=#data
local size=tonumber(size or dsize)
if dsize>size then
data = data:sub(1,size)
elseif dsize<size then
data=data..string.rep("\0",size-dsize)
end
if self:canStreamWrite() then
self.workingfile:write(data)
elseif self.Type=="bin" then
local tab={}
if self.pos==1 then
tab={data,self.data:sub(self.pos+size)}
else
tab={self.data:sub(1,self.pos-1),data,self.data:sub(self.pos+size)}
end
self.pos=self.pos+size
self.data=table.concat(tab)
else
error("Attempted to write to a locked file!")
end
end
function bin:sub(a,b)
local data=""
if self.stream then
local cur=self.workingfile:seek("cur")
self.workingfile:seek("set",a-1)
data=self.workingfile:read(b-(a-1))
self.workingfile:seek("set",cur)
else
data=self.data:sub(a,b)
end
return data
end
function bin:slide(n)
local s=self:getSize()
local buf=bin.newDataBuffer(s)
buf:fillBuffer(1,self:getData())
for i=1,s do
nn=buf[i]+n
if nn>255 then
nn=nn%256
elseif nn<0 then
nn=256-math.abs(nn)
end
buf[i]=nn
end
self:setSeek(1)
self:write(buf:getData())
end
function bin:getData(a,b,fmt)
local data=""
if a or b then
data=self:sub(a,b)
else
if self.stream then
local cur=self.workingfile:seek("cur")
self.workingfile:seek("set",0)
data=self.workingfile:read("*a")
self.workingfile:seek("set",cur)
else
data=self.data
end
end
if fmt=="%x" or fmt=="hex" then
return bin.toHex(data):lower()
elseif fmt=="%X" or fmt=="HEX" then
return bin.toHex(data)
elseif fmt=="%b" or fmt=="b64" then
return bin.toB64(data)
elseif fmt then
return bin.new(data):getBlock(fmt,#data)
end
return data
end
function bin:getSize(fmt)
local len=0
if self.stream then
local cur=self.workingfile:seek("cur")
len=self.workingfile:seek("end")
self.workingfile:seek("set",cur)
else
len=#self.data
end
if fmt=="%b" then
return bin.toB64()
elseif fmt then
return string.format(fmt, len)
else
return len
end
end
function bin:tackE(data,size,h)
local data=bin.normalizeData(data)
local cur=self:getSize()
self:setSeek(self:getSize()+1)
self:write(data,size)
if h then
self:setSeek(cur+1)
end
end
function bin:tonumber(a,b)
local temp={}
if a then
temp.data=self:sub(a,b)
else
temp=self
end
local l,r=0,0
local g=#temp.data
for i=1,g do
r=r+(256^(g-i))*string.byte(string.sub(temp.data,i,i))
l=l+(256^(i-1))*string.byte(string.sub(temp.data,i,i))
end
return r,l
end
function bin.endianflop(data)
return string.reverse(data)
end
function bin:tofile(name)
if self.stream then return end
if not name then error("Must include a filename to save as!") end
file = io.open(name, "wb")
file:write(self.data)
file:close()
end
function bin:close()
if self.stream then
if bin.streams[self.file][2]==1 then
bin.streams[self.file]=nil
self.workingfile:close()
else
bin.streams[self.file][2]=bin.streams[self.file][2]-1
self.workingfile=io.tmpfile()
self.workingfile:close()
end
end
end
function bin:getBlock(t,n)
local data=""
if not n then
if bin.registerBlocks[t] then
return bin.registerBlocks[t][1](nil,self)
else
error("Unknown format! Cannot read from file: "..tostring(t))
end
else
if t=="n" or t=="%e" or t=="%E" then
data=self:read(n)
local numB=bin.defualtBit.new(data)
local numL=bin.defualtBit.new(string.reverse(data))
local little=numL:tonumber(0)
local big=numB:tonumber(0)
if t=="%E" then
return big
elseif t=="%X" then
return bin.toHex(data):upper()
elseif t=="%x" then
return bin.toHex(data):lower()
elseif t=="%b" then
return bin.toB64(data)
elseif t=="%e" then
return little
end
return big,little
elseif t=="s" then
return self:read(n)
elseif bin.registerBlocks[t] then
return bin.registerBlocks[t][1](n,self)
else
error("Unknown format! Cannot read from file: "..tostring(t))
end
end
end
function bin:addBlock(d,fit,fmt)
if not fmt then fmt=type(d):sub(1,1) end
if bin.registerBlocks[fmt] then
self:tackE(bin.registerBlocks[fmt][2](d,fit,fmt,self,bin.registerBlocks[fmt][2]))
elseif type(d)=="number" then
local data=bin.defualtBit.numToBytes(d,fit or 4,fmt,function()
error("Overflow! Space allotted for number is smaller than the number takes up. Increase the fit!")
end)
self:tackE(data)
elseif type(d)=="string" then
local data=d:sub(1,fit or -1)
if #data<(fit or #data) then
data=data..string.rep("\0",fit-#data)
end
self:tackE(data)
end
end
bin.registerBlocks={}
function bin.registerBlock(t,funcG,funcA)
bin.registerBlocks[t]={funcG,funcA}
end
function bin.newDataBuffer(size,fill) -- fills with \0 or nul or with what you enter
local c={}
local fill=fill or "\0"
c.data={self=c}
c.Type="buffer"
c.size=size or 0 -- 0 means an infinite buffer, sometimes useful
for i=1,c.size do
c.data[i]=fill
end
local mt={
__index=function(t,k)
if type(k)=="number" then
local data=t.data[k]
if data then
return string.byte(data)
else
error("Index out of range!")
end
elseif type(k)=="string" then
local num=tonumber(k)
if num then
local data=t.data[num]
if data then
return data
else
error("Index out of range!")
end
else
error("Only number-strings and numbers can be indexed!")
end
else
error("Only number-strings and numbers can be indexed!")
end
end,
__newindex=function(t,k,v)
if type(k)~="number" then error("Can only set a buffers data with a numeric index!") end
local data=""
if type(v)=="string" then
data=v
elseif type(v)=="number" then
data=bits.numToBytes(v)
else
-- try to normalize the data of type v
data=bin.normalizeData(v)
end
t:fillBuffer(k,data)
end,
__tostring=function(t)
return t:getData()
end,
}
function c:fillBuffer(a,data)
local len=#data
if len==1 then
self.data[a]=data
else
local i=a-1
for d in data:gmatch(".") do
i=i+1
if i>c.size then
return #data-i+a
end
self.data[i]=d
end
return #data-i+(a-1)
end
end
function c:getData(a,b,fmt) -- LATER
local dat=bin.new(table.concat(self.data,"",a,b))
local n=dat:getSize()
return dat:getBlock(fmt or "s",n)
end
function c:getSize()
return #self:getData()
end
setmetatable(c,mt)
return c
end
function bin:newDataBufferFromStream(pos,size,fill) -- fills with \0 or nul or with what you enter IF the nothing exists inside the bin file.
local s=self:getSize()
if not self.stream then error("Can only created a streamed buffer on a streamable file!") end
if s==0 then
self:write(string.rep("\0",pos+size))
end
self:setSeek(1)
local c=bin.newDataBuffer(size,fill)
rawset(c,"pos",pos)
rawset(c,"size",size)
rawset(c,"fill",fill)
rawset(c,"bin",self)
rawset(c,"sync",function(self)
local cur=self.bin:getSeek()
self.bin:setSeek(self.pos)
self.bin:write(self:getData(),size)
self.bin:setSeek(cur)
end)
c:fillBuffer(1,self:sub(pos,pos+size))
function c:fillBuffer(a,data)
local len=#data
if len==1 then
self.data[a]=data
self:sync()
else
local i=a-1
for d in data:gmatch(".") do
i=i+1
if i>c.size then
self:sync()
return #data-i+a
end
self.data[i]=d
end
self:sync()
return #data-i+(a-1)
end
end
return c
end
function bin:toDataBuffer()
local s=self:getSize()
-- if self:canStreamWrite() then
-- return self:newDataBufferFromStream(0,s)
-- end
local buf=bin.newDataBuffer(s)
local data=self:read(512)
local i=1
while data~=nil do
buf[i]=data
data=self:read(512)
i=i+512
end
return buf
end
function bin:getHash()
if self:getSize()==0 then
return "NaN"
end
n=32
local rand = randomGen:newND(1,self:getSize(),self:getSize())
local h,g={},0
for i=1,n do
g=rand:nextInt()
table.insert(h,bin.toHex(self:sub(g,g)))
end
return table.concat(h,'')
end
function bin:flipbits()
if self:canStreamWrite() then
self:setSeek(1)
for i=1,self:getSize() do
self:write(string.char(255-string.byte(self:sub(i,i))))
end
else
local temp={}
for i=1,#self.data do
table.insert(temp,string.char(255-string.byte(string.sub(self.data,i,i))))
end
self.data=table.concat(temp,'')
end
end
function bin:encrypt()
self:flipbits()
end
function bin:decrypt()
self:flipbits()
end
-- Use with small files!
function bin:gsub(...)
local data=self:getData()
local pos=self:getSeek()
self:setSeek(1)
self:write((data:gsub(...)) or data)
self:setSeek(loc)
end
function bin:gmatch(pat)
return self:getData():gmatch(pat)
end
function bin:match(pat)
return self:getData():match(pat)
end
function bin:trim()
local data=self:getData()
local pos=self:getSeek()
self:setSeek(1)
self:write(data:match'^()%s*$' and '' or data:match'^%s*(.*%S)')
self:setSeek(loc)
end
function bin:lines()
local t = {}
local function helper(line) table.insert(t, line) return '' end
helper((self:getData():gsub('(.-)\r?\n', helper)))
return t
end
function bin._lines(str)
local t = {}
local function helper(line) table.insert(t, line) return '' end
helper((str:gsub('(.-)\r?\n', helper)))
return t
end
function bin:wipe()
if self:canStreamWrite() then
self:close()
local c=bin.freshStream(self.file)
self.workingfile=c.workingfile
else
self.data=""
end
self:setSeek(1)
end
function bin:fullTrim(empty)
local t=self:lines()
for i=#t,1,-1 do
t[i]=bin._trim(t[i])
if empty then
if t[i]=="" then
table.remove(t,i)
end
end
end
self:wipe()
self:write(table.concat(t,"\n"))
end
local __CURRENTVERSION=2
bin.registerBlock("t",function(SIZE_OR_NIL,ref)
local header=ref:read(3)
if not header:match("(LT.)") then error("Not a valid table struct!") end
if bin.defualtBit.new(header:sub(3,3)):tonumber(1)>__CURRENTVERSION then error("Incompatible Version of LuaTable!") end
local len=ref:getBlock("n",4) -- hehe lets make life easier
local tab={}
local ind
local n=0
while true do
local _dat=ref:read(2)
if _dat==nil then break end
local it,dt=_dat:match("(.)(.)")
n=n+2
if it=="N" then -- get the index stuff out of the way first
ind=ref:getBlock("n",4)
n=n+4
else
indL=ref:getBlock("n",1)
n=n+1+indL
ind=ref:read(indL)
end
if dt=="N" then
tab[ind]=ref:getBlock("d")
n=n+8
elseif dt=="I" then
tab[ind]=math.huge
ref:getBlock("n",4)
n=n+4
elseif dt=="i" then
tab[ind]=-math.huge
ref:getBlock("n",4)
n=n+4
elseif dt=="S" then
local nn=ref:getBlock("n",4)
tab[ind]=ref:read(nn)
n=n+4+nn
elseif dt=="B" then
tab[ind]=({["\255"]=true,["\0"]=false})[ref:read(1)]
n=n+1
elseif dt=="F" then
local nn=ref:getBlock("n",4)
tab[ind]=loadstring(ref:read(nn))
n=n+4+nn
elseif dt=="T" then
local cur=ref:getSeek()
local size=ref:getBlock("n",4)
ref:setSeek(cur)
ref:read(4)
if size==7 then
tab[ind]={}
ref:read(7)
n=n+11
else
local data=bin.new(ref:read(size))
local dat=data:getBlock("t")
if dat.__RECURSIVE then
tab[ind]=tab
else
tab[ind]=dat
end
n=n+data:getSize()+4
end
end
if n==len then break end
end
return bin.resolveType(tab)
end,function(d,fit,fmt,self,rec,tabsaw)
-- INGORE FIT WE ARE CREATING A STRUCT!!!
-- fmt will apply to all numbers
local __rem=nil
if not tabsaw then rem=true end
local tabsaw=tabsaw or {}
if rem then
table.insert(tabsaw,d)
end
local bData={}
for i,v in pairs(d) do -- this is for tables, all but userdata is fine. Depending on where you are using lua functions may or may not work
local tp=type(v):sub(1,1):upper() -- uppercase of datatype
if type(i)=="number" then -- Lets handle indexies
if v==math.huge then
tp="I"
v=0
elseif v==-math.huge then
tp="i"
v=0
end
table.insert(bData,"N"..tp..bin.defualtBit.numToBytes(i,4)) -- number index?
elseif type(i)=="string" then
if #i>255 then error("A string index cannot be larger than 255 bytes!") end
table.insert(bData,"S"..tp..bin.defualtBit.numToBytes(#i,1)..i) -- string index?
else
error("Only numbers and strings can be a table index!") -- throw error?
end
if type(v)=="number" then
-- How do we handle number data
local temp=bin.new()
temp:addBlock(v,nil,"d")
table.insert(bData,temp.data)
elseif type(v)=="string" then
-- Lets work on strings
table.insert(bData,bin.defualtBit.numToBytes(#v,4)) -- add length of string
table.insert(bData,v) -- add string
elseif type(v)=="boolean" then -- bools are easy :D
table.insert(bData,({[true]="\255",[false]="\0"})[v])
elseif type(v)=="function" then -- should we allow this? why not...
local dump=string.dump(v)
table.insert(bData,bin.defualtBit.numToBytes(#dump,4)) -- add length of dumped string
table.insert(bData,dump) -- add it
elseif type(v)=="table" then -- tables...
if tabsaw[1]==v then
v={__RECURSIVE=i}
else
tabsaw[i]=v
end
local data=rec(v,nil,"t",self,rec,tabsaw)
table.insert(bData,bin.defualtBit.numToBytes(#data,4)) -- add length of string
table.insert(bData,data) -- add string
end
end
local data=table.concat(bData)
return "LT"..string.char(__CURRENTVERSION)..bin.defualtBit.numToBytes(#data,4)..data
end)
bin.registerBlock("b",function(SIZE_OR_NIL,ref)
return ({["\255"]=true,["\0"]=false})[ref:read(1)]
end,function(d)
return ({[true]="\255",[false]="\0"})[d]
end)
bin.registerBlock("f",function(SIZE_OR_NIL,ref)
local nn=ref:getBlock("n",4)
return loadstring(ref:read(nn))
end,function(d)
local dump=string.dump(d)
return bin.defualtBit.numToBytes(#dump,4)..dump
end)
bin.registerBlock("d",function(SIZE_OR_NIL,ref)
local w,p=ref:getBlock("n",4),ref:getBlock("n",4)
p=tonumber("0."..tostring(p))
return w+p
end,function(d,fit,fmt,self,rec,tabsaw)
local w,p = toFraction(d)
local temp=bin.new()
temp:addBlock(w,4)
temp:addBlock(p,4)
return temp.data
end)
if love then
function bin.load(file,s,r)
content, size = love.filesystem.read(file)
local temp=bin.new(content)
temp.filepath=file
return temp
end
function bin.fileExists(name)
return love.filesystem.getInfo(name)
end
function bin:tofile(filename)
if not(filename) or self.Stream then return nil end
love.filesystem.write(filename,self.data)
end
function bin.loadS(path,s,r)
local path = love.filesystem.getSaveDirectory( ).."\\"..path
if type(path) ~= "string" then error("Path must be a string!") end
local f = io.open(path, 'rb')
local content = f:read('*a')
f:close()
return bin.new(content)
end
function bin:tofileS(filename)
if self.stream then return end
local filename = love.filesystem.getSaveDirectory( ).."\\"..filename
print(#self.data,filename)
if not filename then error("Must include a filename to save as!") end
file = io.open(filename, "wb")
file:write(self.data)
file:close()
end
function bin.stream(file)
return bin.newStreamFileObject(love.filesystem.newFile(file))
end
function bin:getSize(fmt)
local len=0
if self.stream then
local len=self.workingfile:getSize()
else
len=#self.data
end
if fmt=="%b" then
return bin.toB64()
elseif fmt then
return string.format(fmt, len)
else
return len
end
end
function bin:getSeek()
if self.stream then
return self.workingfile:tell()+1
else
return self.pos
end
end
function bin:setSeek(n)
if self.stream then
self.workingfile:seek(n-1)
else
self.pos=n
end
end
function bin:seek(n)
if self.stream then
self.workingfile:seek(n)
else
if not n then return self.pos end
if #self.data-(self.pos-1)<n then
print(n-((#self.data)-(self.pos-1)))
self:write(string.rep("\0",n-((#self.data)-(self.pos-1))))
return
end
self.pos=self.pos+n
end
end
function bin:close()
self.workingfile:close()
end
end
return bin
|
local parser_lib = require "texparser"
local texparser = parser_lib.getparser
-- some helper functions
------------------------------
-- convert tokens to text
local function to_text(tokens)
local allowed = {[10]=true, [11] = true, [12] = true}
local text = {}
for _, x in ipairs(tokens) do
if allowed[x.catcode] then
text[#text+1] = x.value
end
end
return table.concat(text)
end
-- convert TeX source code to text
local function tex_to_text(text)
local parser = texparser(text)
return to_text(parser:parse())
end
describe("basic tests", function()
it("can parse text", function()
assert.are.equal("a", tex_to_text("a"))
assert.are.equal("a b", tex_to_text("a b"))
end)
it("can handle comments",function()
assert.are.equal(tex_to_text "hello% world", "hello")
end)
it("removes cs sequences", function()
assert.are.equal(tex_to_text "hello \\textit{world}", "hello world")
assert.are.equal(tex_to_text "hello \\textit@at{world}", "hello world")
end)
it("ignores spaces", function()
assert.are.equal(tex_to_text " hello ", "hello")
assert.are.equal(tex_to_text "\\hello world", "world")
assert.are.equal(tex_to_text "hello\\world % ", "hello")
assert.are.equal(tex_to_text "\\hello.txt", tex_to_text "\\hello .txt")
end)
end)
describe("catcode updates", function()
local text = "\\hello@world{???}"
local special_parser = texparser(text) -- this one will have different catcode for @
special_parser.catcodes[utf8.codepoint("@")] = 12
local normal_parser = texparser(text)
it("normal parser should see @ char as part of command", function()
assert.are.equal("???", to_text(normal_parser:parse()))
assert.are.equal("@world???", to_text(special_parser:parse()))
end)
end)
|
return {
postgres = {
up = [[
]],
teardown = function(connector)
assert(connector:connect_migrations())
assert(connector:query [[
DO $$
BEGIN
ALTER TABLE IF EXISTS ONLY "response_ratelimiting_metrics"
DROP CONSTRAINT IF EXISTS "response_ratelimiting_metrics_pkey" CASCADE;
EXCEPTION WHEN UNDEFINED_COLUMN THEN
-- Do nothing, accept existing state
END$$;
DO $$
BEGIN
ALTER TABLE IF EXISTS ONLY "response_ratelimiting_metrics"
ADD PRIMARY KEY ("identifier", "period", "period_date", "service_id", "route_id");
EXCEPTION WHEN UNDEFINED_COLUMN THEN
-- Do nothing, accept existing state
END$$;
DO $$
BEGIN
ALTER TABLE IF EXISTS ONLY "response_ratelimiting_metrics" DROP "api_id";
EXCEPTION WHEN UNDEFINED_COLUMN THEN
-- Do nothing, accept existing state
END$$;
]])
end,
},
cassandra = {
up = [[
]],
teardown = function(connector)
assert(connector:connect_migrations())
assert(connector:query([[
DROP TABLE IF EXISTS response_ratelimiting_metrics;
CREATE TABLE IF NOT EXISTS response_ratelimiting_metrics (
identifier text,
period text,
period_date timestamp,
service_id uuid,
route_id uuid,
value counter,
PRIMARY KEY ((identifier, period, period_date, service_id, route_id))
);
]]))
end,
},
}
|
local drow_caster = Loot {
resref = "pl_drow_h1_004",
[1] = {
Store("lt_scrolls") :N(3) :Chance(80),
},
}
Copy("pl_drow_005", drow_caster)
Copy("pl_drow_h1_005", drow_caster)
Copy("pl_drow_004", drow_caster)
|
local variant = Tracker.ActiveVariantUID
local items_only = variant:find("itemsonly")
local no_pins = variant:find("no_pins")
ENABLE_DEBUG_LOG = false
--scripts
ScriptHost:LoadScript("scripts/logic.lua")
-- custom stuff goes here
--ScriptHost:LoadScript("scripts/logic.lua")
--ScriptHost:LoadScript("scripts/watches.lua")
--items
Tracker:AddItems("items/items.json")
--Tracker:AddItems("items/settings.json")
if not items_only then
--maps
Tracker:AddMaps("maps/maps.json")
--locations
Tracker:AddLocations("locations/locations.json")
--additional locations
Tracker:AddLocations("locations/fixed.json")
end
--layouts
Tracker:AddLayouts("layouts/items.json")
Tracker:AddLayouts("layouts/broadcast.json")
Tracker:AddLayouts("layouts/tracker.json")
-- autotracking
if PopVersion then
ScriptHost:LoadScript("scripts/autotracking.lua")
end
|
math.randomseed(os.time())
require('main.util')
require('main.hook')
local chatCooldowns = {}
local chatCooldownSeconds = 0.5
local function splitArguments (str)
local args = {}
local split = str:split(' ')
local inQuotes
for _, word in pairs(split) do
if word:startsWith('"') then
inQuotes = word
elseif inQuotes ~= nil then
inQuotes = inQuotes .. ' ' .. word
end
if inQuotes ~= nil then
if word:endsWith('"') then
table.insert(args, inQuotes:sub(2, -2))
inQuotes = nil
end
else
table.insert(args, word)
end
end
return args
end
local function handleChatCommandError (ply, commandName, command, result)
local errorString = tostring(result)
local _, endPos = errorString:find(': ')
local stripped = errorString:sub(endPos + 1)
if stripped == 'usage' then
local usage = command.usage or commandName
messagePlayerWrap(ply, 'Usage: ' .. usage)
else
if not ply.isAdmin then
errorString = stripped
end
messagePlayerWrap(ply, 'Error: ' .. errorString)
end
end
local function attemptChatCommand (ply, message)
local args = splitArguments(message)
local commandName = table.remove(args, 1)
local command = hook.findCommand(commandName)
if not command then
return hook.continue
end
local success, result = pcall(hook.runCommand, commandName, command, ply, ply.human, args)
if not success then
handleChatCommandError(ply, commandName, command, result)
end
return hook.override
end
hook.add(
'PlayerChat', 'main',
function (ply, message)
local now = os.clock()
-- Rate limit chat for non-admins
if not ply.isAdmin and chatCooldowns[ply.index] ~= nil
and chatCooldowns[ply.index] + chatCooldownSeconds > now then
return hook.override
end
chatCooldowns[ply.index] = now
-- Run Lua commands
if message:startsWith('/') then
return attemptChatCommand(ply, message)
end
end
)
local consolePlayer = {
isConsole = true,
name = 'Big Brother',
data = {},
sendMessage = function (_, message)
print('\27[31;1m' .. message .. '\27[0m')
end
}
hook.add(
'ConsoleInput', 'main',
function (message)
local args = splitArguments(message)
local name = table.remove(args, 1)
if not name then return end
if not name:startsWith('/') then
-- Commands that don't start with / can only be invoked by the console
if hook.runCommand(name, hook.findCommand(name), args) then
return
end
-- Allow calling regular commands without a preceding slash
if hook.runCommand('/' .. name, hook.findCommand('/' .. name), consolePlayer, nil, args) then
return
end
else
if hook.runCommand(name, hook.findCommand(name), consolePlayer, nil, args) then
return
end
end
print('Command "'..name..'" not found!')
end
)
local function serializeCommand (name, args)
local str = name .. ' '
for _, arg in ipairs(args) do
if arg:find(' ') then
str = str .. '"' .. arg .. '" '
else
str = str .. arg .. ' '
end
end
return str
end
hook.add(
'ConsoleAutoComplete', 'main',
function (data)
data.response = data.response:trim()
if #data.response == 0 then
return
end
local args = splitArguments(data.response)
local completedName, command = hook.autoCompleteCommand(table.remove(args, 1))
if not completedName then
return
end
if command.autoComplete then
command.autoComplete(args)
end
data.response = serializeCommand(completedName, args)
end
)
require('main.plugins')
hook.add(
'InterruptSignal', 'main',
function ()
for _, plug in pairs(hook.plugins) do
plug:disable()
end
end
)
|
local M = {}
function M.registration(register)
require("opt.plugins.lsp.null-ls.fish").registration(register)
require("opt.plugins.lsp.null-ls.sh").registration(register)
require("opt.plugins.lsp.null-ls.json").registration(register)
require("opt.plugins.lsp.null-ls.yaml").registration(register)
require("opt.plugins.lsp.null-ls.go").registration(register)
require("opt.plugins.lsp.null-ls.javascript").registration(register)
require("opt.plugins.lsp.null-ls.lua").registration(register)
require("opt.plugins.lsp.null-ls.ruby").registration(register)
require("opt.plugins.lsp.null-ls.css").registration(register)
require("opt.plugins.lsp.null-ls.html").registration(register)
end
function M.root_patterns()
return vim.tbl_flatten({
require("opt.plugins.lsp.null-ls.go").root_patterns(),
require("opt.plugins.lsp.null-ls.javascript").root_patterns(),
require("opt.plugins.lsp.null-ls.ruby").root_patterns(),
})
end
return M
|
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
underline = true,
update_in_insert = false,
virtual_text = false,
severity_sort = true,
})
|
local theme={colors={normal={blue={0.48627450980392,0.68627450980392,0.76078431372549,1},green={0.63137254901961,0.70980392156863,0.42352941176471,1},cyan={0.52549019607843,0.75686274509804,0.72549019607843,1},white={0.21960784313725,0.21960784313725,0.21960784313725,1},red={0.67058823529412,0.27450980392157,0.25882352941176,1},magenta={0.72941176470588,0.54509803921569,0.68627450980392,1},black={0.97254901960784,0.97254901960784,0.97254901960784,1},yellow={0.96862745098039,0.7921568627451,0.53333333333333,1}},primary={background={0.97254901960784,0.97254901960784,0.97254901960784,1},foreground={0.21960784313725,0.21960784313725,0.21960784313725,1}},bright={blue={0.34509803921569,0.34509803921569,0.34509803921569,1},green={0.90980392156863,0.90980392156863,0.90980392156863,1},cyan={0.63137254901961,0.41176470588235,0.27450980392157,1},white={0.094117647058824,0.094117647058824,0.094117647058824,1},red={0.86274509803922,0.58823529411765,0.33725490196078,1},magenta={0.15686274509804,0.15686274509804,0.15686274509804,1},black={0.72156862745098,0.72156862745098,0.72156862745098,1},yellow={0.84705882352941,0.84705882352941,0.84705882352941,1}},cursor={text={0.97254901960784,0.97254901960784,0.97254901960784,1},cursor={0.21960784313725,0.21960784313725,0.21960784313725,1}}}}
return theme.colors
|
return {
talon_edrag = {
buildangle = 0,
buildcostenergy = 15000,
buildcostmetal = 850,
builder = false,
buildpic = "talon_edrag.dds",
buildtime = 20000,
category = "ALL SURFACE UNDERWATER",
collisionvolumeoffsets = "0 -3 0",
collisionvolumescales = "64 100 64",
collisionvolumetype = "CylY",
corpse = "fortification",
description = "Perimeter Defense",
footprintx = 4,
footprintz = 4,
idleautoheal = 5,
idletime = 1800,
isfeature = true,
levelground = false,
losemitheight = 50,
mass = 850,
maxdamage = 5000,
maxslope = 24,
maxvelocity = 0,
maxwaterdepth = 95,
name = "Experimental Wall",
noautofire = false,
objectname = "talon_edrag",
radaremitheight = 100,
script = "drag.lua",
unitname = "talon_edrag",
waterline = 48,
yardmap = "wwww wwww wwww wwww",
customparams = {
buildpic = "talon_edrag.dds",
faction = "TALON",
},
featuredefs = {
fortification = {
autoreclaimable = 0,
blocking = true,
crushResistance = 5000,
collisionvolumeoffsets = "0 -3 0",
collisionvolumescales = "64 100 64",
collisionvolumetype = "CylY",
damage = 200000,
description = "Experimental Wall",
featuredead = "rockteethx",
floating = true,
footprintx = 4,
footprintz = 4,
metal = 850,
object = "talon_edrag",
reclaimable = true,
reclaimtime = 16000,
customparams = {
fromunit = 1,
},
},
rockteethx = {
animating = 0,
animtrans = 0,
blocking = true,
damage = 20000,
description = "Rubble",
footprintx = 2,
footprintz = 2,
height = 20,
hitdensity = 100,
metal = 290,
object = "4X4A",
reclaimable = true,
shadtrans = 1,
world = "greenworld",
customparams = {
fromunit = 1,
},
},
},
sfxtypes = {
pieceexplosiongenerators = {
[1] = "piecetrail0",
[2] = "piecetrail1",
[3] = "piecetrail2",
[4] = "piecetrail3",
[5] = "piecetrail4",
[6] = "piecetrail6",
},
},
},
}
|
local dpm = require("dpm")
local example = dpm:load("example")
example:test()
|
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by Administrator.
--- DateTime: 2020/10/10 0010 ไธๅ 5:38
---
local mem = require("memory")
local m, r;
m = mem.new('i', {1, 2, 3}, {-4, -5, -6})
print("---------- test equals ----------")
assert(m == mem.new('i', {1, 2, 3}, {-4, -5, -6}))
assert(not (m == mem.new('s', {1, 2, 3}, {-4, -5, -6})))
print("------- start test SkMemory -> extract ------ ")
r = m.extract(2, 5);
print("extract", r)
assert(#r == 3)
assert(r[0] == 3)
assert(r[1] == -4)
assert(r[2] == -5)
print("------- start test SkMemory -> kickOut ------ ")
r = m.kickOut(2);
print("kickOut", r)
assert(#r == 5)
assert(r[0] == 1)
assert(r[1] == 2)
assert(r[2] == -4)
assert(r[3] == -5)
assert(r[4] == -6)
-- reshape, concat, flip, diag
print("------- start test SkMemory -> reshape (rowC, [colC, type, def_val]) ------ ")
m = mem.new('i', {1, 2, 3});
print("reshape", m.reshape(4))
assert(m.reshape(4) == mem.new('i', {1, 2, 3, 0}));
assert(m.reshape(4, 'f') == mem.new('f', {1, 2, 3, 0}));
assert(m.reshape(4, 'd', 10) == mem.new('d', {1, 2, 3, 10}));
-- row count = 3, column count = 2, default value = 10.
assert(m.reshape(3, 2, 'd', 10) == mem.newMat('d',
{1, 2},
{3, 10},
{10, 10}
));
print("------- start test SkMemory -> concat ------ (mem, [count, type, defVal])")
r = m.concat(mem.new('i', {4, 5, 6}));
print("concat", r)
assert(r == mem.new('i', {1, 2, 3, 4, 5, 6}))
r = m.concat(mem.new('i', {4, 5, 6}), 8);
assert(r == mem.new('i', {1, 2, 3, 4, 5, 6, 0, 0}))
r = m.concat(mem.new('f', {4, 5, 6}), 8);
assert(r == mem.new('f', {1, 2, 3, 4, 5, 6, 0, 0}))
r = m.concat(mem.new('f', {4, 5, 6}), 8, 'f');
assert(r == mem.new('f', {1, 2, 3, 4, 5, 6, 0, 0}))
r = m.concat(mem.new('f', {4, 5, 6}), 8, 'd', 10);
assert(r == mem.new('d', {1, 2, 3, 4, 5, 6, 10, 10}))
print("------- start test SkMemory -> flip ------ ")
assert(m.flip() == mem.new('i', {3, 2, 1}))
print("------- start test SkMemory -> diag ------ ")
-- default k = 0, default value = 0
r = m.diag();
print("diag =",r)
assert(r == mem.newMat('i',
{1, 0, 0},
{0, 2, 0},
{0, 0, 3}
))
-- with k = -1.
r = m.diag(-1);
assert(r == mem.newMat('i',
{0, 0, 0, 0},
{1, 0, 0, 0},
{0, 2, 0, 0},
{0, 0, 3, 0}
))
-- with k = -1, and default value is 100.
r = m.diag(-1, 100);
assert(r == mem.newMat('i',
{100, 100, 100, 100},
{1, 100, 100, 100},
{100, 2, 100, 100},
{100, 100, 3, 100}
))
-- with k = 1.
r = m.diag(1);
print("diag(1) =", r)
assert(r == mem.newMat('i',
{0, 1, 0, 0},
{0, 0, 2, 0},
{0, 0, 0, 3},
{0, 0, 0, 0}
))
-- with k = 1. default value -100
r = m.diag(1, -100);
assert(r == mem.newMat('i',
{-100, 1, -100, -100},
{-100, -100, 2, -100},
{-100, -100, -100, 3},
{-100, -100, -100, -100}
))
-- with k = 1. type is 's' as short, default value -100
r = m.diag(1, 's', -100);
assert(r == mem.newMat('s',
{-100, 1, -100, -100},
{-100, -100, 2, -100},
{-100, -100, -100, 3},
{-100, -100, -100, -100}
))
|
--[[
-- added by wsh @ 2017-12-18
-- ๆดๆฐ็ฎก็๏ผ่ด่ดฃUnityไพงUpdateใLateUpdateใFixedUpdateๅฏนLua่ๆฌ็่ฐ็จ
-- ๆณจๆ๏ผ
-- 1ใๅซ็ดๆฅ็จtolua็UpdateBeatใLateUpdateBeatใFixedUpdateBeat๏ผๆๆ้่ฆไปฅไธไธไธชๆดๆฐๅฝๆฐ็่ๆฌ๏ผ้ฝไป่ฟ้ๆณจๅใ
-- 2ใtolua็eventๆฒกๆไฝฟ็จweak่กจ๏ผ็ดๆฅไฝฟ็จtolua็ๆดๆฐ็ณป็ปไผๅฏผ่ด่ๆฌ่ขซeventๆๆๅผ็จ่ๆ ๆณ้ๆพ---้ค้ๆฏๆฌก้ฝ่ฎฐๅพๆๅจๅป้ๆพ
--]]
local Messenger = require "Framework.Common.Messenger"
local UpdateManager = BaseClass("UpdateManager", Singleton)
local UpdateMsgName = "Update"
local LateUpdateMsgName = "LateUpdateMsgName"
local FixedUpdateMsgName = "FixedUpdateMsgName"
-- ๆ้ ๅฝๆฐ
local function __init(self)
-- ๆๅๅ้
-- ๆถๆฏไธญๅฟ
self.ui_message_center = Messenger.New()
-- Update
self.__update_handle = nil
-- LateUpdate
self.__lateupdate_handle = nil
-- FixedUpdate
self.__fixedupdate_handle = nil
end
-- Updateๅ่ฐ
local function UpdateHandle(self)
self.ui_message_center:Broadcast(UpdateMsgName)
end
-- LateUpdateๅ่ฐ
local function LateUpdateHandle(self)
self.ui_message_center:Broadcast(LateUpdateMsgName)
end
-- FixedUpdateๅ่ฐ
local function FixedUpdateHandle(self)
self.ui_message_center:Broadcast(FixedUpdateMsgName)
end
-- ๅฏๅจ
local function Startup(self)
self:Dispose()
self.__update_handle = UpdateBeat:CreateListener(UpdateHandle, UpdateManager:GetInstance())
self.__lateupdate_handle = LateUpdateBeat:CreateListener(LateUpdateHandle, UpdateManager:GetInstance())
self.__fixedupdate_handle = FixedUpdateBeat:CreateListener(FixedUpdateHandle, UpdateManager:GetInstance())
UpdateBeat:AddListener(self.__update_handle)
LateUpdateBeat:AddListener(self.__lateupdate_handle)
FixedUpdateBeat:AddListener(self.__fixedupdate_handle)
end
-- ้ๆพ
local function Dispose(self)
if self.__update_handle ~= nil then
UpdateBeat:RemoveListener(self.__update_handle)
self.__update_handle = nil
end
if self.__lateupdate_handle ~= nil then
LateUpdateBeat:RemoveListener(self.__lateupdate_handle)
self.__lateupdate_handle = nil
end
if self.__fixedupdate_handle ~= nil then
FixedUpdateBeat:RemoveListener(self.__fixedupdate_handle)
self.__fixedupdate_handle = nil
end
end
-- ๆธ
็๏ผๆถๆฏ็ณป็ปไธ้่ฆๅผบ่กๆธ
็
local function Cleanup(self)
end
-- ๆทปๅ Updateๆดๆฐ
local function AddUpdate(self, e_listener)
self.ui_message_center:AddListener(UpdateMsgName, e_listener)
end
-- ๆทปๅ LateUpdateๆดๆฐ
local function AddLateUpdate(self, e_listener)
self.ui_message_center:AddListener(LateUpdateMsgName, e_listener)
end
-- ๆทปๅ FixedUpdateๆดๆฐ
local function AddFixedUpdate(self, e_listener)
self.ui_message_center:AddListener(FixedUpdateMsgName, e_listener)
end
-- ็งป้คUpdateๆดๆฐ
local function RemoveUpdate(self, e_listener)
self.ui_message_center:RemoveListener(UpdateMsgName, e_listener)
end
-- ็งป้คLateUpdateๆดๆฐ
local function RemoveLateUpdate(self, e_listener)
self.ui_message_center:RemoveListener(LateUpdateMsgName, e_listener)
end
-- ็งป้คFixedUpdateๆดๆฐ
local function RemoveFixedUpdate(self, e_listener)
self.ui_message_center:RemoveListener(FixedUpdateMsgName, e_listener)
end
-- ๆๆๅฝๆฐ
local function __delete(self)
self:Cleanup()
self.ui_message_center = nil
end
UpdateManager.__init = __init
UpdateManager.Startup = Startup
UpdateManager.Dispose = Dispose
UpdateManager.Cleanup = Cleanup
UpdateManager.AddUpdate = AddUpdate
UpdateManager.AddLateUpdate = AddLateUpdate
UpdateManager.AddFixedUpdate = AddFixedUpdate
UpdateManager.RemoveUpdate = RemoveUpdate
UpdateManager.RemoveLateUpdate = RemoveLateUpdate
UpdateManager.RemoveFixedUpdate = RemoveFixedUpdate
UpdateManager.__delete = __delete
return UpdateManager;
|
-----------------------------------
-- Area: Castle_Zvahl_Baileys
-----------------------------------
require("scripts/globals/zone")
-----------------------------------
zones = zones or {}
zones[tpz.zone.CASTLE_ZVAHL_BAILEYS] =
{
text =
{
CONQUEST_BASE = 0, -- Tallying conquest results...
ITEM_CANNOT_BE_OBTAINED = 6541, -- You cannot obtain the <item>. Come back after sorting your inventory.
ITEM_OBTAINED = 6547, -- Obtained: <item>.
GIL_OBTAINED = 6548, -- Obtained <number> gil.
KEYITEM_OBTAINED = 6550, -- Obtained key item: <keyitem>.
NOTHING_OUT_OF_ORDINARY = 6561, -- There is nothing out of the ordinary here.
SENSE_OF_FOREBODING = 6562, -- You are suddenly overcome with a sense of foreboding...
FELLOW_MESSAGE_OFFSET = 6576, -- I'm ready. I suppose.
CHEST_UNLOCKED = 7223, -- You unlock the chest!
COMMON_SENSE_SURVIVAL = 7598, -- It appears that you have arrived at a new survival guide provided by the Adventurers' Mutual Aid Network. Common sense dictates that you should now be able to teleport here from similar tomes throughout the world.
},
mob =
{
MARQUIS_SABNOCK_PH =
{
[17436879] = 17436881,
[17436882] = 17436881,
},
LIKHO = 17436714,
MARQUIS_ALLOCEN = 17436913,
MARQUIS_AMON = 17436918,
DUKE_HABORYM = 17436923,
GRAND_DUKE_BATYM = 17436927,
DARK_SPARK = 17436964,
MIMIC = 17436965,
},
npc =
{
TORCH_OFFSET = 17436984,
TREASURE_CHEST = 17436997,
TREASURE_COFFER = 17436998,
},
}
return zones[tpz.zone.CASTLE_ZVAHL_BAILEYS]
|
print("Welcome!")
-- files
require("ledblink")
require("httpserver")
dofile("http.lua")
-- init.lua
pin_wifi = 4
wifi_auto_conn = 1
ip = nil
-- wifi mode
wifi.setmode(wifi.STATIONAP)
-- ap
apcfg = {
ssid = "node_wifi",
pwd = "12345678"
}
wifi.ap.config(apcfg)
-- wifi connection
wificfg = {
ssid = "",
pwd = "",
auto = true
}
wifi.sta.config(wificfg)
print("Configure Success!")
-- print ip address
wifi.eventmon.register(wifi.eventmon.STA_GOT_IP,function(t)
ip = t.IP
print(ip)
end)
-- wifi
wifi_tmr = 0 -- wifi pin tmr_id
wifi.sta.autoconnect(wifi_auto_conn) -- auto connect
gpio.mode(pin_wifi,gpio.OUTPUT)
wifi.eventmon.register(wifi.eventmon.STA_CONNECTED,function(t)
print("WIFI Connected")
tmr.unregister(wifi_tmr)
gpio.write(pin_wifi,gpio.LOW)
end)
wifi.eventmon.register(wifi.eventmon.STA_DISCONNECTED,function(t)
print("WIFI Disonnected")
tmr.alarm(wifi_tmr, 100, tmr.ALARM_AUTO, function()
blink(pin_wifi)
end)
end)
wifi.eventmon.register(wifi.eventmon.AP_STACONNECTED,function(t)
print("AP Connected")
end)
|
return require("zenbones.util").get_lualine_theme "kanagawabones"
|
local issue
local area
slot.set_layout("rooset", "text/html")
local issue_id = param.get("issue_id", atom.integer)
if issue_id then
issue = Issue:new_selector():add_where{"id=?",issue_id}:single_object_mode():exec()
issue:load_everything_for_member_id(app.session.member_id)
area = issue.area
else
local area_id = param.get("area_id", atom.integer)
area = Area:new_selector():add_where{"id=?",area_id}:single_object_mode():exec()
area:load_delegation_info_once_for_member_id(app.session.member_id)
end
local tab_link = function(is_active, content)
local classname = "ml-2 flex-grow-0 text-xs "
if is_active then
classname = classname .. "text-black font-bold border-b-2 border-black cursor-default"
else
classname = classname .. "text-blue-600 hover:underline"
end
ui.tag{
tag="div",
attr={class=classname},
content=content,
}
end
-- load the current document
slot.put_into("toolbar", slot.use_temporary(function()
ui.tag{
tag= "div",
attr = { class="max-w-xl mx-auto pt-2" },
content=function()
ui.tag{
tag="h3",
attr={class="text-xl font-bold leading-tight text-grey-900"},
content=area.name,
}
ui.tag{
tag="div",
attr={class="flex justify-end"},
content=function()
-- ui.tag{tag="div", attr={class="flex-grow"}, content=""}
tab_link(true, function()
ui.tag{
content="Document",
}
end)
tab_link(false, function()
ui.link{
module="area",
view="show",
id=area.id,
content="Proposals",
}
end)
end,
}
end,
}
end))
ui.tag{ tag = "div", attr = { class="container" }, content=function()
ui.tag{ tag = "div", attr = { id="initiative-form" }, content="" }
end}
ui.tag{
tag = "script",
attr = {
type="text/javascript",
src=config.static_content_host_external .. "/newInitiative.js",
},
content="",
}
local new_initiative_payload = {
docsvc_host_external=config.docsvc_host_external,
csrf_secret=request.get_csrf_secret(),
area_id=tostring(area.id),
policy_id=tostring(area.default_policy.id),
rev_base_sha=area.current_external_reference,
desc_base_sha=area.description_template_external_reference,
user_id=tostring(app.session.member_id),
open_admitted_sections=json.object{}, -- populated below
rev_tk=jwt.encode({
user_id=app.session.member_id,
ops={"docsvc.CreateRev", "docsvc.Get"},
base_sha=area.current_external_reference,
}),
desc_tk=jwt.encode({
user_id=app.session.member_id,
ops={"docsvc.CreateDesc", "docsvc.Get"},
})
}
if issue_id then
new_initiative_payload['issue_id'] = issue_id
end
for k, open_section in ipairs(area.open_admitted_sections) do
new_initiative_payload['open_admitted_sections'][open_section.external_reference] = {
IssueID = open_section.issue_id,
}
end
ui.tag{ tag="script", attr = { type="text/javascript" }, content=function()
slot.put("/* <![CDATA[ */")
slot.put([[
initNewInitiativePage(
document.getElementById('initiative-form'),
]] .. encode.json(new_initiative_payload) .. [[
);
]])
slot.put("/* ]]> */")
end
}
|
he = require "he" -- at https://github.com/philanc/he
l5 = require "l5"
util = require "l5.util"
tty = require "l5.tty"
fs = require "l5.fs"
local spack, sunpack = string.pack, string.unpack
local insert, concat = table.insert, table.concat
local errm, rpad, repr = util.errm, util.rpad, util.repr
local pf, px = util.pf, util.px
------------------------------------------------------------------------
-- test popen2
local POLLIN, POLLOUT = 1, 4
local POLLNVAL, POLLUP, POLLERR = 32, 16, 8
local function pollinout(fdin, fdout, timeout)
-- timeout is optional
local pfl = {
(fdin << 32 | POLLIN << 16),
(fdout << 32 | POLLOUT << 16),
}
local r, err, rin, rout
r, err = l5.poll(pfl, timeout)
if not r then return nil, err end
return r, pfl[1] & 0xffff, pfl[2] & 0xffff
end
local function popen2raw(exepath, in_str, argl, envl)
envl = envl or l5.environ()
argl = argl or {}
local r, err
local rfd0, rfd1 = l5.pipe2() -- child reads from this
assert(rfd0, rfd1)
local wfd0, wfd1 = l5.pipe2() -- child writes to this
assert(wfd0, wfd1)
local pid
pid, err = l5.fork()
if not pid then return nil, "fork error " .. err end
if pid == 0 then -- child
local r, err
l5.close(rfd1) -- close unused ends
l5.close(wfd0) -- id.
assert(l5.dup2(rfd0, 0))
l5.close(rfd0)
assert(l5.dup2(wfd1, 1))
l5.close(wfd1)
--~ table.insert(argl, 1, exepath)
r, err = l5.execve(exepath, argl, envl)
print("CHILD", r, err)
os.exit(99)
end
-- parent
l5.close(rfd0)
l5.close(wfd1)
print("child pid:", pid, "#s", #in_str)
-- check if child has already returned
-- give the child some time to start ...arghhh smelly and not reliable
l5.msleep(100)
local WNOHANG = 1 -- waitpid doesnt block
wpid = pid
--~ local wpid, status = l5.waitpid(pid, WNOHANG)
--~ pf("wpid %d status 0x%x exit=%d signal=%d coredump=%d",
--~ wpid, status,
--~ (status & 0xff00) >> 8,
--~ status & 0x7f,
--~ status & 0x80)
--~ if (status >> 8) & 0xff == 99 then
--~ -- child exec error. close wfd0, rfd1
--~ l5.close(wfd0)
--~ l5.close(rfd1)
--~ return nil, "exec errorzz"
--~ end
-- write to rfd1, read from wfd0
local rdone, wdone
if wpid then wdone = true end -- child already exited. no need to write
local r, rr, wr, err, rin, rout
local pollerr
local cnt
local rtot = 0
local si = 1 -- write index
local POLLIN, POLLOUT = 1, 4
local POLLNVAL, POLLUP, POLLERR = 32, 16, 8
local rt = {} -- read table
local fdin, fdout = wfd0, rfd1
while true do
if wdone then -- ignore fdout
fdout = -1
end
r, rin, rout = pollinout(fdin, fdout)
--~ print("pollinout", r, rin, rout)
if not r then
err = rin
print("pollinout error", err)
os.exit(99)
end
if r == 0 then --timeout
goto continue
end
if rdone and wdone then break end
if not rdone then -- read
if rin == 0 then
-- nothing to read
elseif rin == POLLNVAL then
rdone = true
elseif rin & POLLIN == POLLIN then --can read
rr, err = l5.read(wfd0)
if not rr then
print("read error", err)
os.exit(99)
elseif #rr > 0 then
rt[#rt+1] = rr
rtot = rtot + #rr
--~ print("read n bytes, total", #rr, rtot)
else
print("read empty string => EOF(?)")
rdone = true
end
elseif rin & POLLUP == POLLUP then
rdone = true
else
print("unknown rin value", rin)
end --if rin
end --if not rdone
if not wdone then -- write
if rout == 0 then
-- cannot write
elseif rout == POLLNVAL then
wdone = true
elseif rout == POLLERR then
wdone = true
l5.close(rfd1)
pollerr = "cannot write to child process"
elseif rout & POLLOUT == POLLOUT then --can write
cnt = #in_str - si + 1
if cnt > 4096 then cnt = 4096 end;
wr, err = l5.write(rfd1, in_str, si, cnt)
if not wr then
print("write error", err)
os.exit(99)
elseif wr > 0 then
si = si + wr
--~ print("write: wr, si, #s", wr, si, #s)
if si >= #in_str then
wdone = true
l5.close(rfd1)
end
else
print("wrote empty string?", r)
end
else
print("unknown rout value", rout)
end --if rout
end --if not wdone
::continue::
--~ print("pollinout", r, rin, rout,
--~ "read", rr and #rr,
--~ "write", wr
--~ )
rr = ""; wr = 0
end--while
r = table.concat(rt, "")
print("#r", #r)
wpid, status = l5.waitpid(pid)
pf("pid: %s status: %x exit: %d", wpid, status, (status & 0xff00)>>8)
if pollerr then return nil, pollerr end
return r
end --popen2raw()
local function popen2(cmd, in_str, envl)
envl = envl or l5.environ()
local argl = {"bash", "-c", cmd}
return popen2raw("/bin/bash", in_str, argl, envl)
end
function test_popen2raw()
local s = assert(he.fget"z856k")
local pname = "/bin/gzip"
local r, err = popen2raw(pname, s)
if not r then
print("test_popen2 failed:", err)
else
he.fput('zzaa.gz', r)
print("test_popen2raw: ok.")
end
end
function test_popen2()
local s = assert(he.fget"z856k")
--~ local cmd = "gzip -xqx 2>&1"
local cmd = "pwd -qwe 2>&1"
local r, err = popen2(cmd, s, l5.environ())
print("POPEN2", r, err)
if not r then
print("test_popen2 failed:", err)
else
he.fput('zzaa.gz', r)
print("test_popen2: ok.")
end
end
------------------------------------------------------------------------
--~ test_popen2raw()
test_popen2()
------------------------------------------------------------------------
--[[
TEMP NOTES
]]
|
ProtocolAdapter = ProtocolAdapter or {}
function ProtocolAdapter:AdaptSCVisibleObjEnterRole(role_id, c_datastream)
local role = RoleManager.Instance:GetRoleById(role_id)
if nil == c_datastream or nil == role then
return
end
c_datastream:WriteShort(role:GetCommonData():GetTianxiangeLevel())
c_datastream:WriteShort(0)
end
|
AddCSLuaFile()
SWEP.Base = "voxel_base"
SWEP.PrintName = "Twin-linked SMG"
SWEP.Category = "Ace of Spades"
SWEP.Author = "TankNut"
SWEP.Slot = 2
SWEP.AdminOnly = false
SWEP.Spawnable = true
SWEP.DrawCrosshair = true
SWEP.Primary.ClipSize = 60
SWEP.Primary.DefaultClip = 240
SWEP.Primary.Ammo = "SMG1"
SWEP.Primary.Automatic = true
SWEP.Model = "smg"
SWEP.ModelScale = 1
SWEP.MuzzleEffect = "voxel_muzzle_smg"
SWEP.TracerEffect = "voxel_tracer_smg"
SWEP.HoldType = "ar2"
SWEP.HoldTypeLower = "passive"
SWEP.Damage = 29
SWEP.DamageType = DMG_BULLET
SWEP.Spread = 0.012
SWEP.Delay = 0.1
SWEP.Recoil = Vector(0.0125, 0.01275, 0)
SWEP.RecoilMult = 2
SWEP.AimDistance = 10
SWEP.Sound = {
Fire = Sound("voxel/smg_shoot.wav"),
Reload = Sound("voxel/smg_reload.wav")
}
SWEP.ReloadTime = 2.5
SWEP.VMOffset = {
Pos = Vector(12, -6, -8)
}
SWEP.Attachments = {
{
Model = "smg",
Pos = Vector(0, 1, 0)
}, {
Model = "smg",
Pos = Vector(0, -1, 0)
}
}
if CLIENT then
function SWEP:GetMuzzlePos(pos, ang)
local index = tobool(self:Clip1() % 2 == 1)
local v = self.Attachments[index and 1 or 2]
local origin = {voxel.GetPos(self.Model, pos, ang, self.ModelScale, v.Attachment, v.Pos, v.Ang)}
return voxel.GetPos(v.Model, origin[1], origin[2], self.ModelScale, "Muzzle")
end
function SWEP:DrawVoxelModel(pos, ang)
if voxel.HasAttachment(self.Model, "Aimpoint") then
self:DrawAimpoint(pos, ang)
end
self:DrawAttachments(pos, ang)
end
end
|
--[[
AoESkillshotPosition 2.0 by monogato
GetAoESpellPosition(radius, main_target, [delay]) returns best position in order to catch as many enemies as possible with your AoE skillshot, making sure you get the main target.
Note: You can optionally add delay in ms for prediction (VIP if avaliable, normal else).
]]
function GetCenter(points)
local sum_x = 0
local sum_z = 0
for i = 1, #points do
sum_x = sum_x + points[i].x
sum_z = sum_z + points[i].z
end
local center = {x = sum_x / #points, y = 0, z = sum_z / #points}
return center
end
function ContainsThemAll(circle, points)
local radius_sqr = circle.radius*circle.radius
local contains_them_all = true
local i = 1
while contains_them_all and i <= #points do
contains_them_all = GetDistanceSqr(points[i], circle.center) <= radius_sqr
i = i + 1
end
return contains_them_all
end
-- The first element (which is gonna be main_target) is untouchable.
function FarthestFromPositionIndex(points, position)
local index = 2
local actual_dist_sqr
local max_dist_sqr = GetDistanceSqr(points[index], position)
for i = 3, #points do
actual_dist_sqr = GetDistanceSqr(points[i], position)
if actual_dist_sqr > max_dist_sqr then
index = i
max_dist_sqr = actual_dist_sqr
end
end
return index
end
function RemoveWorst(targets, position)
local worst_target = FarthestFromPositionIndex(targets, position)
table.remove(targets, worst_target)
return targets
end
function GetInitialTargets(radius, main_target)
local targets = {main_target}
local diameter_sqr = 4 * radius * radius
for i=1, heroManager.iCount do
target = heroManager:GetHero(i)
if target.networkID ~= main_target.networkID and ValidTarget(target) and GetDistanceSqr(main_target, target) < diameter_sqr then table.insert(targets, target) end
end
return targets
end
function GetPredictedInitialTargets(radius, main_target, delay)
if VIP_USER and not vip_target_predictor then vip_target_predictor = TargetPredictionVIP(nil, nil, delay/1000) end
local predicted_main_target = VIP_USER and vip_target_predictor:GetPrediction(main_target) or GetPredictionPos(main_target, delay)
local predicted_targets = {predicted_main_target}
local diameter_sqr = 4 * radius * radius
for i=1, heroManager.iCount do
target = heroManager:GetHero(i)
if ValidTarget(target) then
predicted_target = VIP_USER and vip_target_predictor:GetPrediction(target) or GetPredictionPos(target, delay)
if target.networkID ~= main_target.networkID and GetDistanceSqr(predicted_main_target, predicted_target) < diameter_sqr then table.insert(predicted_targets, predicted_target) end
end
end
return predicted_targets
end
-- I donยดt need range since main_target is gonna be close enough. You can add it if you do.
function GetAoESpellPosition(radius, main_target, delay)
local targets = delay and GetPredictedInitialTargets(radius, main_target, delay) or GetInitialTargets(radius, main_target)
local position = GetCenter(targets)
local best_pos_found = true
local circle = Circle(position, radius)
circle.center = position
if #targets > 2 then best_pos_found = ContainsThemAll(circle, targets) end
while not best_pos_found do
targets = RemoveWorst(targets, position)
position = GetCenter(targets)
circle.center = position
best_pos_found = ContainsThemAll(circle, targets)
end
return position
end
|
-- [[
-- pbr -- poembyrabb.it
-- widgets, utilities and scripts for Awesome WM
--
-- ]]
local helpers = require("pbr.helpers")
local wibox = require("wibox")
local widget = {}
widget = awful.widget.textbox()
widget:set_text("battery ")
mybatterytimer = timer({ timeout = 30 })
mybatterytimer:connect_signal("timeout",
function ()
fh = assert(io.popen(
return battery
|
local GT = {}
GT.Identity = "tiny_combos"
GT.Locale = {
["name"] = {
["english"] = "Sky Tiny",
["russian"] = "ะะฑะปะฐัะฝัะน Tiny"
},
["desc"] = {
["english"] = "Tiny combo",
["russian"] = "ะะพะผะฑะพ ะฝะฐ ัะธะฝะธ"
},
["order"] = {
["english"] = "Select combo order",
["russian"] = "ะัะฑะตัะธัะต ะฟะพััะดะพะบ ะบะฐััะฐ ัะฟะพัะพะฑะฝะพััะตะน"
},
["combo"] = {
["english"] = "Combo Key",
["russian"] = "ะะพะผะฑะพ ะบะปะฐะฒะธัะฐ"
},
["slider"] = {
["english"] = "Closest to mouse range",
["russian"] = "ะ ะฐะดะธัั ะฟะพะธัะบะฐ ะฑะปะธะถะฝะตะณะพ"
}
}
GT.Items = {
["item_blink"] = "resource/flash3/images/items/",
["item_veil_of_discord"] = "resource/flash3/images/items/",
["item_soul_ring"] = "resource/flash3/images/items/",
["item_orchid"] = "resource/flash3/images/items/",
["item_bloodthorn"] = "resource/flash3/images/items/",
["tiny_avalanche"] = "resource/flash3/images/spellicons/",
["tiny_toss"] = "resource/flash3/images/spellicons/",
["item_dagon"] = "resource/flash3/images/items/",
["item_sheepstick"] = "resource/flash3/images/items/",
["item_ethereal_blade"] = "resource/flash3/images/items/"
}
GT.CastTypes = {
["item_blink"] = 3,
["item_veil_of_discord"] = 3,
["item_soul_ring"] = 1,
["item_orchid"] = 2,
["item_bloodthorn"] = 2,
["tiny_avalanche"] = 3,
["tiny_toss"] = 2,
["item_dagon"] = 2,
["item_sheepstick"] = 2,
["item_ethereal_blade"] = 2
}
function GT.OnDraw()
if GUI == nil then return end
if not GUI.Exist(GT.Identity) then
GUI.Initialize(GT.Identity, GUI.Category.Heroes, GT.Locale["name"], GT.Locale["desc"], "paroxysm, Beastmode, Jerfelly", "npc_dota_hero_tiny")
GUI.AddMenuItem(GT.Identity, GT.Identity .. "ordercast", GT.Locale["order"],
GUI.MenuType.OrderBox, GT.Items, "", "item_", 36, 36)
GUI.AddMenuItem(GT.Identity, GT.Identity .. "combokey", GT.Locale["combo"], GUI.MenuType.Key, "F", GT.Skycombo)
GUI.AddMenuItem(GT.Identity, GT.Identity .. "closest", GT.Locale["slider"], GUI.MenuType.Slider, 100, 800, 50)
end
end
function GT.Skycombo()
if not GUI.IsEnabled(GT.Identity) then return end
local self = Heroes.GetLocal()
if NPC.GetUnitName(self) ~= "npc_dota_hero_tiny" then return end
local hero = Input.GetNearestHeroToCursor(Entity.GetTeamNum(self), Enum.TeamType.TEAM_ENEMY)
if not hero or not NPC.IsPositionInRange(hero, Input.GetWorldCursorPos(), GUI.Get(GT.Identity .. "closest"), 0) then return end
local ordercast = GUI.Get(GT.Identity .. "ordercast", 1)
if ordercast == nil then return end
local position = Entity.GetAbsOrigin(hero)
local manapoint = NPC.GetMana(self)
for i = 1, Length(ordercast) do
GT.Cast(ordercast[i], self, hero, position, manapoint)
end
if not NPC.HasModifier(hero, "modifier_item_ethereal_blade_slow") then
Player.PrepareUnitOrders(Players.GetLocal(), 4, hero, Vector(0,0,0), hero, Enum.PlayerOrderIssuer.DOTA_ORDER_ISSUER_PASSED_UNIT_ONLY, self)
end
end
function GT.Cast(name, self, hero, position, manapoint)
if not GUI.SleepReady(GT.Identity .. "cast" .. name) then return end
local ability = NPC.GetItem(self, name, true) or NPC.GetAbility(self, name)
if name == "item_dagon" then
ability = NPC.GetItem(self, "item_dagon", true)
for i = 0, 5 do
if not ability then ability = NPC.GetItem(self, "item_dagon_" .. i, true) end
end
end
local casttype = GT.CastTypes[name]
if ability == nil then return end
if ability
and Ability.IsCastable(ability, manapoint)
and Ability.IsReady(ability)
then
if casttype == 1 then Ability.CastNoTarget(ability)
elseif casttype == 2 then Ability.CastTarget(ability, hero)
else Ability.CastPosition(ability, position)
end
end
GUI.Sleep(GT.Identity .. "cast" .. name, 0.1)
end
return GT
|
local PQueue = include(".lib.pqueue", ...)
local ok, skynet = pcall(require, "skynet")
skynet = ok and skynet
local _queue = PQueue(function(a, b)
return b.deadline - a.deadline
end)
local kMCacheInterval = 60*10+1
local _caches = {}
local function get_data(key)
local cache = _caches[key]
if cache then
if os.time() <= cache.deadline then
return cache.data
end
_caches[key] = nil
_queue.remove(cache)
end
end
local function set_data(key, data, timeout)
if timeout == 0 or timeout > kMCacheInterval then
timeout = kMCacheInterval
end
local cache = {
data = data,
key = key,
deadline = os.time()+timeout
}
_caches[key] = cache
local tmp = _queue.peek()
while tmp do
if os.time()>tmp.deadline or _queue.count() > 1000 then
_queue.poll()
_caches[tmp.key] = nil
else
break
end
tmp = _queue.peek()
end
_queue.offer(cache)
end
-------------------------------------------------
--cached
-------------------------------------------------
local cached = {}
if skynet then
local _cached
local thread_queue = {}
skynet.fork(function()
_cached = skynet.uniqueservice("meiru/cached")
for _,thread in ipairs(thread_queue) do
skynet.wakeup(thread)
end
thread_queue = nil
end)
local function set(key, data, timeout)
assert(type(key) == 'string' and #key > 0)
set_data(key, data, timeout or 0)
if timeout and timeout < kMCacheInterval then
return
end
data = skynet.packstring(data)
return skynet.call(_cached, "lua", "set", key, data, timeout)
end
local function get(key)
assert(type(key) == 'string' and #key > 0)
local data = get_data(key)
if data then
return data
end
local data, deadline = skynet.call(_cached, "lua", "get", key)
if data then
data = skynet.unpack(data)
set_data(key, data, deadline-os.time())
end
return data
end
setmetatable(cached, {__index = function(t, cmd)
if not _cached then
local thread = coroutine.running()
table.insert(thread_queue, thread)
skynet.wait(thread)
end
if cmd == 'set' then
t[cmd] = set
return set
elseif cmd == 'get' then
t[cmd] = get
return get
end
local f = function(...)
return skynet.call(_cached, "lua", cmd, ...)
end
t[cmd] = f
return f
end})
else
function cached.set(key, data, timeout)
assert(type(key) == 'string' and #key > 0)
set_data(key, data, timeout or 0)
end
function cached.get(key)
assert(type(key) == 'string' and #key > 0)
local data = get_data(key)
if data then
return data
end
end
end
return cached
|
๏ปฟprint("loaded");
function JarCore()
end
|
target("RocketEngineMultiThread")
set_kind("static")
add_files("*.cpp")
add_options("console_log")
add_options("memory_check")
target_end()
|
PROPERTIES =
{
}
function Initialize()
msXP = SKIN:GetValue('Background')
end -- function Initialize
function Update()
valXP = msXP:GetValue()
if valXP < 50 then
SKIN:Bang('!SetOption Level1 Text \"Level: 1\"')
SKIN:Bang('!SetOption XPmeterBG2 ValueReminder \"50\"')
SKIN:Bang('!SetOption XpLeft Formula \"(50 - XpSystem)\"')
elseif valXP < 100 then
SKIN:Bang('!SetOption Level1 Text \"Level: 2\"')
SKIN:Bang('!SetOption XPmeterBG2 ValueReminder \"100\"')
SKIN:Bang('!SetOption XpLeft Formula \"(100 - XpSystem)\"')
elseif valXP < 200 then
SKIN:Bang('!SetOption Level1 Text \"Level: 3\"')
SKIN:Bang('!SetOption XPmeterBG2 ValueReminder \"200\"')
SKIN:Bang('!SetOption XpLeft Formula \"(200 - XpSystem)\"')
elseif valXP < 400 then
SKIN:Bang('!SetOption Level1 Text \"Level: 4\"')
SKIN:Bang('!SetOption XPmeterBG2 ValueReminder \"400\"')
SKIN:Bang('!SetOption XpLeft Formula \"(400 - XpSystem)\"')
elseif valXP < 600 then
SKIN:Bang('!SetOption Level1 Text \"Level: 5\"')
SKIN:Bang('!SetOption XPmeterBG2 ValueReminder \"600\"')
SKIN:Bang('!SetOption XpLeft Formula \"(600 - XpSystem)\"')
elseif valXP < 800 then
SKIN:Bang('!SetOption Level1 Text \"Level: 6\"')
SKIN:Bang('!SetOption XPmeterBG2 ValueReminder \"800\"')
SKIN:Bang('!SetOption XpLeft Formula \"(800 - XpSystem)\"')
elseif valXP < 1000 then
SKIN:Bang('!SetOption Level1 Text \"Level: 7\"')
SKIN:Bang('!SetOption XPmeterBG2 ValueReminder \"1000\"')
SKIN:Bang('!SetOption XpLeft Formula \"(1000 - XpSystem)\"')
elseif valXP < 1500 then
SKIN:Bang('!SetOption Level1 Text \"Level: 8\"')
SKIN:Bang('!SetOption XPmeterBG2 ValueReminder \"1500\"')
SKIN:Bang('!SetOption XpLeft Formula \"(1500 - XpSystem)\"')
elseif valXP < 2000 then
SKIN:Bang('!SetOption Level1 Text \"Level: 9\"')
SKIN:Bang('!SetOption XPmeterBG2 ValueReminder \"2000\"')
SKIN:Bang('!SetOption XpLeft Formula \"(2000 - XpSystem)\"')
elseif valXP < 3000 then
SKIN:Bang('!SetOption Level1 Text \"Level: 10\"')
SKIN:Bang('!SetOption XPmeterBG2 ValueReminder \"3000\"')
SKIN:Bang('!SetOption XpLeft Formula \"(3000 - XpSystem)\"')
elseif valXP < 5000 then
SKIN:Bang('!SetOption Level1 Text \"Level: 11\"')
SKIN:Bang('!SetOption XPmeterBG2 ValueReminder \"5000\"')
SKIN:Bang('!SetOption XpLeft Formula \"(5000 - XpSystem)\"')
elseif valXP < 50000 then
SKIN:Bang('!SetOption Level1 Text \"OverLord!\"')
SKIN:Bang('!SetOption XPmeterBG2 ValueReminder \"50000\"')
SKIN:Bang('!SetOption XpLeft Formula \"(50000 - XpSystem)\"')
else
SKIN:Bang('!SetOption Level1 Text \"NA\"')
end
end -- function Update
|
-- Copyright (c) 2021 ๆฆๆณๆพ
-- https://github.com/wzhengsen/LuaOOP
-- 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 rawset = rawset;
local error = error;
local type = type;
local Config = require("OOP.Config");
local Version = Config.Version;
local i18n = require("OOP.i18n");
local Internal = require("OOP.Variant.Internal");
local ClassesMembers = Internal.ClassesMembers;
local Compat = require("OOP.Version.Compat");
local bits = Compat.bits;
local band = bits.band;
local bor = bits.bor;
local Debug = Config.Debug;
local MetaMapName = Config.MetaMapName;
local AllEnumerations = Internal.AllEnumerations;
local AllClasses = Internal.AllClasses;
local ClassesReadable = Internal.ClassesReadable;
local ClassesWritable = Internal.ClassesWritable;
local new = Config.new;
local delete = Config.delete;
local public = Config.Qualifiers.public;
local private = Config.Qualifiers.private;
local protected = Config.Qualifiers.protected;
local static = Config.Qualifiers.static;
local const = Config.Qualifiers.const;
local final = Config.Qualifiers.final;
local virtual = Config.Qualifiers.virtual;
local get = Config.get;
local set = Config.set;
local BitsMap = {
[public] = 2 ^ 0,
[private] = 2 ^ 1,
[protected] = 2 ^ 2,
[static] = 2 ^ 3,
[const] = 2 ^ 4,
[final] = 2 ^ 5,
[get] = 2 ^ 6,
[set] = 2 ^ 7,
[virtual] = 2 ^ 8
};
if Version > 5.2 then
BitsMap[public] = math.tointeger(BitsMap[public]);
BitsMap[private] = math.tointeger(BitsMap[private]);
BitsMap[protected] = math.tointeger(BitsMap[protected]);
BitsMap[static] = math.tointeger(BitsMap[static]);
BitsMap[const] = math.tointeger(BitsMap[const]);
BitsMap[final] = math.tointeger(BitsMap[final]);
BitsMap[get] = math.tointeger(BitsMap[get]);
BitsMap[set] = math.tointeger(BitsMap[set]);
BitsMap[virtual] = math.tointeger(BitsMap[virtual]);
end
local Permission = {
public = BitsMap[public],
private = BitsMap[private],
protected = BitsMap[protected],
static = BitsMap[static],
const = BitsMap[const],
final = BitsMap[final],
get = BitsMap[get],
set = BitsMap[set],
virtual = BitsMap[virtual]
}
local p_static = Permission.static;
local p_virtual = Permission.virtual;
local p_get = Permission.get;
local p_final = Permission.final;
local Router = {};
local Pass = nil;
local Done = nil;
local decor = 0;
local cls = 0;
local function Begin(self,outCls,key)
decor = 0;
cls = outCls;
return Pass(self,key);
end
if Debug then
local ctor = Config.ctor;
local dtor = Config.dtor;
local FunctionWrapper = Compat.FunctionWrapper;
local ClassesAll = Internal.ClassesAll;
local FinalClassesMembers = Internal.FinalClassesMembers;
local ClassesPermisssions = Internal.ClassesPermisssions;
local VirtualClassesMembers = Internal.VirtualClassesMembers;
local RouterReservedWord = Internal.RouterReservedWord;
-- It is only under debug that the values need to be routed to the corresponding fields of the types.
-- To save performance, all qualifiers will be ignored under non-debug.
-- Rules:
-- 1 - There can be no duplicate qualifiers;
-- 2 - public/private/protected cannot be used together;
-- 3 - static cannot qualify constructors and destructors;
-- 4 - Can't use qualifiers that don't exist;
-- 5 - Reserved words cannot be modified (__singleton__/friends/handlers).
Pass = function(self,key)
local bit = BitsMap[key];
if bit then
if band(decor,bit) ~= 0 then
error((i18n"The %s qualifier is not reusable."):format(key));
elseif band(decor,0x7) ~= 0 and band(bit,0x7) ~= 0 then
-- Check public,private,protected,they are 0x7
error((i18n"The %s qualifier cannot be used in conjunction with other access qualifiers."):format(key));
elseif band(decor,0xd0) ~= 0 and band(bit,0xd0) ~= 0 then
-- Check set,get,const,they are 0xd0
error((i18n"%s,%s,%s cannot be used at the same time."):format(get,set,const));
else
local temp = bor(bit,decor);
if band(temp,p_virtual) ~= 0 and band(temp,p_virtual - 1) ~= 0 then
error(i18n"It is not necessary to use pure virtual functions with other qualifiers.");
end
end
decor = bor(decor,bit);
else
local get_set = band(decor,0xc0);
if get_set ~= 0 then
if bor(decor,0xc0) == 0xc0 then
Internal.CheckPermission(cls,key,false);
local property = (get_set == p_get and ClassesReadable or ClassesWritable)[cls][key];
if property then
return property[1];
else
error((i18n"There is no such property. - %s"):format(key));
end
end
end
error((i18n"There is no such qualifier. - %s"):format(key));
end
return self;
end
Done = function(_,key,value)
if FinalClassesMembers[cls][key] then
error((i18n"You cannot define final members again. - %s"):format(key));
end
local bit = BitsMap[key] or RouterReservedWord[key];
if bit then
error((i18n"The name is unavailable. - %s"):format(key));
end
local meta = MetaMapName[key];
if meta then
error((i18n"You cannot qualify meta-methods. - %s"):format(key));
end
local vcm = VirtualClassesMembers[cls];
if decor == p_virtual then
if value ~= 0 then
error((i18n"The pure virtual function %s must be assigned a value of 0."):format(key));
end
vcm[key] = true;
decor = 0;
cls = nil;
return;
end
local isStatic = band(decor,p_static) ~= 0;
if isStatic and
(key == ctor or key == dtor) then
error((i18n"%s qualifier cannot qualify %s method."):format(static,key));
end
if band(decor,0x7) == 0 then
-- Without the public qualifier, public is added by default.
decor = bor(decor,0x1);
end
local vt = type(value);
local isFunction = "function" == vt;
if vcm[key] then
-- Check pure virtual functions.
if not isFunction then
error((i18n"%s must be overridden as a function."):format(key));
end
if isStatic then
error((i18n"The pure virtual function %s cannot be overridden as a static function."):format(key));
end
vcm[key] = nil;
end
local get_set = band(decor,0xc0);
if isFunction then
value = FunctionWrapper(cls,value);
elseif get_set == 0 then
local isTable = "table" == vt;
-- For non-functional, non-static members,non-class objects,non-enumeration objects,
-- add to the member table and generate it for each instance.
if not isStatic and (not isTable or (not AllEnumerations[value] and not AllClasses[value])) then
ClassesMembers[cls][key] = value;
end
end
local pms = ClassesPermisssions[cls];
pms[key] = decor;
if get_set ~= 0 then
if not isFunction then
error((i18n"A function must be assigned to the property %s."):format(key));
end
if key == ctor or key == dtor then
error((i18n"%s and %s can't be used as property."):format(ctor,dtor));
end
-- The property is set to a special table
-- with index 1 representing the function assigned to the property
-- and index 2 representing whether the property is a static property.
(get_set == p_get and ClassesReadable or ClassesWritable)[cls][key] = {value,isStatic};
else
ClassesAll[cls][key] = value;
if key == ctor then
-- Reassign permissions to "new", which are the same as ctor with the static qualifier.
pms[new] = bor(decor,0x8);
elseif key == dtor then
pms[delete] = decor;
end
end
if band(decor,p_final) ~= 0 then
FinalClassesMembers[cls][key] = true;
end
decor = 0;
cls = nil;
end
else
local ClassesMetas = Internal.ClassesMetas;
-- In non-debug mode, no attention is paid to any qualifiers other than static.
Pass = function(self,key)
local bit = BitsMap[key];
if bit then
decor = bor(decor,bit);
else
local get_set = band(decor,0xc0);
if get_set ~= 0 then
local property = (get_set == p_get and ClassesReadable or ClassesWritable)[cls][key];
return property and property[1] or nil;
end
end
return self;
end
Done = function(_,key,value)
if band(decor,p_virtual) ~= 0 then
-- Skip pure virtual functions.
decor = 0;
cls = nil;
return;
end
local vt = type(value);
local isFunction = "function" == vt;
local isTable = "table" == vt;
local isStatic = band(decor,p_static) ~= 0;
local get_set = band(decor,0xc0);
if not isFunction and not isStatic and get_set == 0 and (not isTable or (not AllEnumerations[value] and not AllClasses[value])) then
ClassesMembers[cls][key] = value;
end
if get_set ~= 0 then
(get_set == p_get and ClassesReadable or ClassesWritable)[cls][key] = {value,isStatic};
else
rawset(cls,key,value);
end
decor = 0;
cls = nil;
local meta = MetaMapName[key];
if meta then
local metas = ClassesMetas[cls];
metas[key] = value;
end
end
end
setmetatable(Router,{
__index = function (self,key)
return Pass(self,key);
end,
__newindex = function (self,key,val)
Done(self,key,val);
end
});
return {
Router = Router,
BitsMap = BitsMap,
Permission = Permission,
Begin = Begin
};
|
local status, hyperModeAppMappings = pcall(require, 'NotSpoons/hyper-apps')
local message = require('NotSpoons/status-message')
if not status then
hyperModeAppMappings = require('NotSpoons/hyper-apps-defaults')
end
for i, mapping in ipairs(hyperModeAppMappings) do
hs.hotkey.bind({'shift', 'ctrl', 'alt', 'cmd'}, mapping[1], function()
local appName = mapping[2]
local appIcon = mapping[3]
local appIconFont = mapping[4]
local app = hs.application.get(appName)
if app then
app:activate()
else
-- Setup status message
local statusMessage = message.new(appIcon, appIconFont)
statusMessage.hidden = function()
statusMessage:hide()
end
-- hs.alert.show('Launching ' .. appName)
-- hs.alert.show(appName)
-- Show status message, then hide it
statusMessage:show()
hs.application.launchOrFocus(appName)
hs.timer.doAfter(1, statusMessage.hidden)
end
end)
end
|
--Copyright (C) 2009 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
--which carries forward this exception.
object_tangible_wearables_wookiee_shared_wke_gloves_s01 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_gloves_s01.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_gloves_s01_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/gloves_long.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_gloves_s01",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "@wearables_lookat:wke_gloves_s01",
noBuildRadius = 0,
objectName = "@wearables_name:wke_gloves_s01",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 982220507,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_gloves_long.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_gloves_s01, "object/tangible/wearables/wookiee/shared_wke_gloves_s01.iff")
object_tangible_wearables_wookiee_shared_wke_gloves_s02 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_gloves_s02.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_gloves_s02_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/gloves_long.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_gloves_s02",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "@wearables_lookat:wke_gloves_s02",
noBuildRadius = 0,
objectName = "@wearables_name:wke_gloves_s02",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 3785152076,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_gloves_long.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_gloves_s02, "object/tangible/wearables/wookiee/shared_wke_gloves_s02.iff")
object_tangible_wearables_wookiee_shared_wke_gloves_s03 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_gloves_s03.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_gloves_s03_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/gloves_long.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_gloves_s03",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "@wearables_lookat:wke_gloves_s03",
noBuildRadius = 0,
objectName = "@wearables_name:wke_gloves_s03",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 2828120513,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_gloves_long.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_gloves_s03, "object/tangible/wearables/wookiee/shared_wke_gloves_s03.iff")
object_tangible_wearables_wookiee_shared_wke_gloves_s04 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_gloves_s04.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_gloves_s04_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/gloves_long.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_gloves_s04",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "@wearables_lookat:wke_gloves_s04",
noBuildRadius = 0,
objectName = "@wearables_name:wke_gloves_s04",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 1400019669,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_gloves_long.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_gloves_s04, "object/tangible/wearables/wookiee/shared_wke_gloves_s04.iff")
object_tangible_wearables_wookiee_shared_wke_hat_s01 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_hat_s01.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_hat_s01_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hat.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_hat_s01",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "@wearables_lookat:wke_hat_s01",
noBuildRadius = 0,
objectName = "@wearables_name:wke_hat_s01",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 143220595,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_hat.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_hat_s01, "object/tangible/wearables/wookiee/shared_wke_hat_s01.iff")
object_tangible_wearables_wookiee_shared_wke_hood_s01 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_hood_s01.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_hood_s01_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hat.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_hood_s01",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "@wearables_lookat:wke_hood_s01",
noBuildRadius = 0,
objectName = "@wearables_name:wke_hood_s01",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 773028987,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_hat.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_hood_s01, "object/tangible/wearables/wookiee/shared_wke_hood_s01.iff")
object_tangible_wearables_wookiee_shared_wke_hood_s02 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_hood_s02.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_hood_s02_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hat.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_hood_s02",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "@wearables_lookat:wke_hood_s02",
noBuildRadius = 0,
objectName = "@wearables_name:wke_hood_s02",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 4110734572,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_hat.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_hood_s02, "object/tangible/wearables/wookiee/shared_wke_hood_s02.iff")
object_tangible_wearables_wookiee_shared_wke_hood_s03 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_hood_s03.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_hood_s03_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hat.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_hood_s03",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "@wearables_lookat:wke_hood_s03",
noBuildRadius = 0,
objectName = "@wearables_name:wke_hood_s03",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 3154752353,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_hat.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_hood_s03, "object/tangible/wearables/wookiee/shared_wke_hood_s03.iff")
object_tangible_wearables_wookiee_shared_wke_lifeday_robe = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_lifeday_robe.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_lifeday_robe_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/robe_longsleeve.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_lifeday_robe",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "wearables_lookat",
noBuildRadius = 0,
objectName = "@wearables_name:wke_lifeday_robe",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 1294873415,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_robe_longsleeve.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_lifeday_robe, "object/tangible/wearables/wookiee/shared_wke_lifeday_robe.iff")
object_tangible_wearables_wookiee_shared_wke_lifeday_robe_f = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_lifeday_robe_f.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_lifeday_robe_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/robe_longsleeve.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_lifeday_robe_f",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "wearables_lookat",
noBuildRadius = 0,
objectName = "@wearables_name:wke_lifeday_robe",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 2316465710,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_robe_longsleeve.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_lifeday_robe_f, "object/tangible/wearables/wookiee/shared_wke_lifeday_robe_f.iff")
object_tangible_wearables_wookiee_shared_wke_lifeday_robe_m = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_lifeday_robe_m.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_lifeday_robe_m.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/robe_longsleeve.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_lifeday_robe",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "wearables_lookat",
noBuildRadius = 0,
objectName = "@wearables_name:wke_lifeday_robe",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 283957695,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_robe_longsleeve.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_lifeday_robe_m, "object/tangible/wearables/wookiee/shared_wke_lifeday_robe_m.iff")
object_tangible_wearables_wookiee_shared_wke_shirt_s01 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_shirt_s01.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_shirt_s01_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/shirt.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_shirt_s01",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "@wearables_lookat:wke_shirt_s01",
noBuildRadius = 0,
objectName = "@wearables_name:wke_shirt_s01",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 2791438893,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_shirt.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_shirt_s01, "object/tangible/wearables/wookiee/shared_wke_shirt_s01.iff")
object_tangible_wearables_wookiee_shared_wke_shirt_s02 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_shirt_s02.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_shirt_s02_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/shirt.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_shirt_s02",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "@wearables_lookat:wke_shirt_s02",
noBuildRadius = 0,
objectName = "@wearables_name:wke_shirt_s02",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 2104906426,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_shirt.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_shirt_s02, "object/tangible/wearables/wookiee/shared_wke_shirt_s02.iff")
object_tangible_wearables_wookiee_shared_wke_shirt_s03 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_shirt_s03.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_shirt_s03_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/shirt.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_shirt_s03",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "@wearables_lookat:wke_shirt_s03",
noBuildRadius = 0,
objectName = "@wearables_name:wke_shirt_s03",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 880489783,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_shirt.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_shirt_s03, "object/tangible/wearables/wookiee/shared_wke_shirt_s03.iff")
object_tangible_wearables_wookiee_shared_wke_shirt_s04 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_shirt_s04.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_shirt_s04_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/shirt.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_shirt_s04",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "@wearables_lookat:wke_shirt_s04",
noBuildRadius = 0,
objectName = "@wearables_name:wke_shirt_s04",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 3482852899,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_shirt.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_shirt_s04, "object/tangible/wearables/wookiee/shared_wke_shirt_s04.iff")
object_tangible_wearables_wookiee_shared_wke_shoulder_pad_s01 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_shoulder_pad_s01.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_shoulder_pad_s01_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/shirt.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_shoulder_pads_s01",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "@wearables_lookat:wke_shoulder_pads_s01",
noBuildRadius = 0,
objectName = "@wearables_name:wke_shoulder_pads_s01",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 1209883613,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_shirt.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_shoulder_pad_s01, "object/tangible/wearables/wookiee/shared_wke_shoulder_pad_s01.iff")
object_tangible_wearables_wookiee_shared_wke_shoulder_pad_s02 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_shoulder_pad_s02.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_shoulder_pad_s02_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/shirt.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_shoulder_pads_s02",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "@wearables_lookat:wke_shoulder_pads_s02",
noBuildRadius = 0,
objectName = "@wearables_name:wke_shoulder_pads_s02",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 2466968394,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_shirt.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_shoulder_pad_s02, "object/tangible/wearables/wookiee/shared_wke_shoulder_pad_s02.iff")
object_tangible_wearables_wookiee_shared_wke_skirt_s01 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_skirt_s01.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_skirt_s01_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/skirt.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_skirt_s01",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "@wearables_lookat:wke_skirt_s01",
noBuildRadius = 0,
objectName = "@wearables_name:wke_skirt_s01",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 2927288103,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_skirt.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_skirt_s01, "object/tangible/wearables/wookiee/shared_wke_skirt_s01.iff")
object_tangible_wearables_wookiee_shared_wke_skirt_s02 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_skirt_s02.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_skirt_s02_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/skirt.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_skirt_s02",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "@wearables_lookat:wke_skirt_s02",
noBuildRadius = 0,
objectName = "@wearables_name:wke_skirt_s02",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 1970108336,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_skirt.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_skirt_s02, "object/tangible/wearables/wookiee/shared_wke_skirt_s02.iff")
object_tangible_wearables_wookiee_shared_wke_skirt_s03 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_skirt_s03.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_skirt_s03_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/skirt.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_skirt_s03",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "@wearables_lookat:wke_skirt_s03",
noBuildRadius = 0,
objectName = "@wearables_name:wke_skirt_s03",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 1012928573,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_skirt.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_skirt_s03, "object/tangible/wearables/wookiee/shared_wke_skirt_s03.iff")
object_tangible_wearables_wookiee_shared_wke_skirt_s04 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/wearables/wookiee/shared_wke_skirt_s04.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/wke_skirt_s04_f.sat",
arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/skirt.iff",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 16777232,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@wearables_detail:wke_skirt_s04",
gameObjectType = 16777232,
locationReservationRadius = 0,
lookAtText = "@wearables_lookat:wke_skirt_s04",
noBuildRadius = 0,
objectName = "@wearables_name:wke_skirt_s04",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 3347266345,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_skirt.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_wearables_wookiee_shared_wke_skirt_s04, "object/tangible/wearables/wookiee/shared_wke_skirt_s04.iff")
|
local Reshape, parent = torch.class('nn.Reshape', 'nn.Module')
function Reshape:__init(...)
parent.__init(self)
local arg = {...}
self.size = torch.LongStorage()
self.batchsize = torch.LongStorage()
local n = #arg
if n == 1 and torch.typename(arg[1]) == 'torch.LongStorage' then
self.size:resize(#arg[1]):copy(arg[1])
else
self.size:resize(n)
for i=1,n do
self.size[i] = arg[i]
end
end
self.nelement = 1
self.batchsize:resize(#self.size+1)
for i=1,#self.size do
self.nelement = self.nelement * self.size[i]
self.batchsize[i+1] = self.size[i]
end
end
function Reshape:updateOutput(input)
input = input:contiguous()
local nelement = input:nElement()
if nelement == self.nelement then
self.output:set(input):resize(self.size)
else
self.batchsize[1] = input:size(1)
self.output:set(input):resize(self.batchsize)
end
return self.output
end
function Reshape:updateGradInput(input, gradOutput)
gradOutput = gradOutput:contiguous()
self.gradInput:set(gradOutput):resizeAs(input)
return self.gradInput
end
|
-- This is meant only to prevent modules from yielding so we can cache them.
local function resultHandler(thread: thread, success: boolean, ...)
if not success then
local message = (...)
error(debug.traceback(thread, message), 2)
end
if coroutine.status(thread) ~= "dead" then
error(debug.traceback(thread, "Attempted to yield on load!"), 2)
end
return ...
end
local function noYield(callback, ...)
local thread = coroutine.create(callback)
return resultHandler(thread, coroutine.resume(thread, ...))
end
return noYield
|
--hs.loadSpoon('RoundedCorners')
--spoon.RoundedCorners:start();
local logger = hs.logger.new('Chooser', 'debug')
function sleep(n)
os.execute("sleep " .. tonumber(n))
end
hs.hotkey.bind({"cmd", "alt"}, "s", function()
if hs.spotify.getVolume() >= 100 then
for i = 0,50 do
hs.spotify.setVolume(100 - i);
sleep(.01)
end
end
end)
hs.hotkey.bind({"cmd", "alt", "shift"}, "s", function()
if hs.spotify.getVolume() <= 50 then
for i = 0,50 do
hs.spotify.setVolume(50 + i);
sleep(.01)
end
end
end)
hs.hotkey.bind({"cmd", "alt"}, "m", function()
hs.spotify.displayCurrentTrack()
end)
hs.hotkey.bind({"alt"}, "F12", function ()
hs.spotify.playpause()
end)
hs.hotkey.bind({"shift", "cmd"}, "u", function ()
local choices = {
{
["text"] = "First",
["subText"] = "This is subtext",
["uuid"] = hs.host.uuid()
},
{
["text"] = "Second",
["subText"] = "This is subtext",
["uuid"] = hs.host.uuid()
}
}
local chooser = hs.chooser.new(function (item)
logger.i(hs.json.encode(item))
end)
chooser:choices(choices)
chooser:show()
end)
|
function IsRunningOnClient()
local a, b = pcall(function() local p = Game.GetLocalPlayer() end)
return a
end
function ShowStore(player)
if IsRunningOnClient() then
Events.Broadcast("SHOWSTORE_CLIENT", player)
Events.BroadcastToServer("SHOWSTORE_SERVER", player)
else
Events.BroadcastToPlayer(player, "SHOWSTORE_CLIENT")
Events.Broadcast("SHOWSTORE_SERVER", player)
end
end
function HideStore(player)
if IsRunningOnClient() then
Events.Broadcast("HIDESTORE_CLIENT", player)
Events.BroadcastToServer("HIDESTORE_SERVER", player)
else
Events.BroadcastToPlayer(player, "HIDESTORE_CLIENT")
Events.Broadcast("HIDESTORE_SERVER", player)
end
end
function IsItemOwned(player, storeId)
return player:GetResource("COSMETIC_" .. storeId) > 0
end
function ResetPlayerPurchases(player)
if IsRunningOnClient() then
Events.BroadcastToServer("RESET_PURCHASES") -- Don't need to send player explicitly because it's automatic
else
Events.Broadcast("RESET_PURCHASES", player)
end
end
return {
ShowStore = ShowStore,
HideStore = HideStore,
IsItemOwned = IsItemOwned
}
|
-----------------
Interface:create_slider('radius', 10, 100, 1.0, 30)
Interface:create_slider('nodes', 0, 100, 1.0, 12)
Interface:create_boolean('rt_lt', true)
Interface:create_boolean('pos_ang', true)
local function layout_circle(collection, rad)
local step = 2*math.pi / collection.count
local angle = 0
for _,ag in pairs(collection.agents)do
ag:move_to({0,0})
ag:lt(angle)
ag:fd(rad)
angle = angle + step
end
end
local function round(x, n)
n = math.pow(10, n or 0)
x = x * n
if x >= 0 then x = math.floor(x + 0.5) else x = math.ceil(x - 0.5) end
return x / n
end
SETUP = function()
-- clear('all')
Simulation:reset()
declare_FamilyMobile('Nodes')
for i=1, Interface:get_value("nodes") do
Nodes:new({
['pos'] = {0,0}
,['scale'] = 1.5
})
end
layout_circle(Nodes, Interface:get_value("radius") )
for _,ag in pairs(Nodes.agents) do
ag.label = '(' .. round(ag:xcor(),1) .. ' , ' .. round(ag:ycor(),1) .. ')'
end
-- A new collection to store the links
declare_FamilyRel('Links')
-- Each agent will create a link with the other agents.
for _, agent in pairs(Nodes.agents) do
for _, another_agent in pairs((Nodes:others(agent)).agents) do
Links:new({
['source'] = agent
,['target'] = another_agent
,['color'] = {0.75, 0, 0, 0.2}
})
end
end
declare_FamilyMobile('Agents')
-- Agents:new returns an agent, so, in global variable central we have the reference to the agent, becouse it has been asigned to a global variable, we can call this agent directly in step function.
central = Agents:new({
['pos'] = {0,0}
,['color'] = {0,0,1,1}
,['shape'] = "triangle_2"
,['scale'] = 2
})
end
STEP = function()
if Interface:get_value("rt_lt") then
central:rt(2*math.pi/Nodes.count)
else
central:lt(2*math.pi/Nodes.count)
end
central.heading = math.fmod(central.heading,__2pi)
central.label = '(' .. round(central.heading,1) .. ' , ' .. round(math.deg(central.heading),1) .. ')'
if Interface:get_value("pos_ang") then
central.label = '(' .. round(central:xcor(),1) .. ' , ' .. round(central:ycor(),1) .. ')'
else
central.label = '(' .. round(central.heading,1) .. ' , ' .. round(math.deg(central.heading),1) .. ')'
end
end
|
local game = remodel.readPlaceFile("WrapperService.rbxl")
remodel.writeModelFile(game.ReplicatedStorage.WrapperService, "WrapperService.rbxm")
|
local helpers = require('test.functional.helpers')(after_each)
local clear = helpers.clear
local command = helpers.command
local feed = helpers.feed
local Screen = require('test.functional.ui.screen')
describe(':digraphs', function()
local screen
before_each(function()
clear()
screen = Screen.new(65, 8)
screen:set_default_attr_ids({
[1] = {bold = true, foreground = Screen.colors.Blue1},
[2] = {foreground = Screen.colors.Grey100, background = Screen.colors.Red},
[3] = {bold = true, foreground = Screen.colors.SeaGreen4},
[4] = {bold = true},
[5] = {background = Screen.colors.LightGrey},
[6] = {foreground = Screen.colors.Blue1},
[7] = {bold = true, reverse = true},
})
screen:attach()
end)
it('displays digraphs', function()
command('set more')
feed(':digraphs<CR>')
screen:expect([[
:digraphs |
NU {6:^@} 10 SH {6:^A} 1 SX {6:^B} 2 EX {6:^C} 3 ET {6:^D} 4 |
EQ {6:^E} 5 AK {6:^F} 6 BL {6:^G} 7 BS {6:^H} 8 HT {6:^I} 9 |
LF {6:^@} 10 VT {6:^K} 11 FF {6:^L} 12 CR {6:^M} 13 SO {6:^N} 14 |
SI {6:^O} 15 DL {6:^P} 16 D1 {6:^Q} 17 D2 {6:^R} 18 D3 {6:^S} 19 |
D4 {6:^T} 20 NK {6:^U} 21 SY {6:^V} 22 EB {6:^W} 23 CN {6:^X} 24 |
EM {6:^Y} 25 SB {6:^Z} 26 EC {6:^[} 27 FS {6:^\} 28 GS {6:^]} 29 |
{3:-- More --}^ |
]])
end)
end)
|
--- ่ง่ฒ้ๅคดๆจกๅ
--- @module Player Cam Module
--- @copyright Lilith Games, Avatar Team
--- @author Dead Ratman
local PlayerCam, this = ModuleUtil.New('PlayerCam', ClientBase)
--ๆปค้ๅผๅ
ณ
local swimFilterSwitch = false
--- ๅๅงๅ
function PlayerCam:Init()
--print('[PlayerCam] Init()')
this:NodeRef()
this:DataInit()
this:EventBind()
this:InitCamera()
end
--- ่็นๅผ็จ
function PlayerCam:NodeRef()
end
--- ๆฐๆฎๅ้ๅๅงๅ
function PlayerCam:DataInit()
-- ๅฝๅ็็ธๆบ
this.curCamera = nil
-- ็ฉๅฎถ่ท้็ธๆบ
this.playerGameCam = localPlayer.Local.Independent.GameCam
-- TPS็ธๆบ
this.tpsCam = localPlayer.Local.Independent.TPSCam
-- FPS็ธๆบ
this.fpsCam = localPlayer.Local.Independent.FPSCam
this.actionCam = localPlayer.Local.Independent.ActionCam
--* ๅญๅจ็ธๆบtweener
this.distanceTweener = nil
end
--- ่็นไบไปถ็ปๅฎ
function PlayerCam:EventBind()
end
function PlayerCam:InitCamera()
if not this.curCamera and this.playerGameCam then
this.curCamera = this.playerGameCam
end
this.playerGameCam.LookAt = localPlayer
world.CurrentCamera = this.curCamera
end
-- ็ฉๅฎถ็งปๅจๆนๅๆฏๅฆ้ตๅพช็ฉๅฎถๆๅๆบๆนๅ
function PlayerCam:IsFreeMode()
return (this.curCamera.CameraMode == Enum.CameraMode.Social and this.curCamera.Distance >= 0) or
this.curCamera.CameraMode == Enum.CameraMode.Orbital or
this.curCamera.CameraMode == Enum.CameraMode.Custom or
this.curCamera.CameraMode == Enum.CameraMode.Smart
end
-- ๆปๅฑ่ฝฌๅ
function PlayerCam:CameraMove(touchInfo)
if #touchInfo == 1 and not (GameFlow.inGame) then
if this:IsFreeMode() then
this.curCamera:CameraMove(touchInfo[1].DeltaPosition)
else
print(this.curCamera)
this.curCamera.LookAt:Rotate(0, touchInfo[1].DeltaPosition.x * 0.2, 0)
this.curCamera:CameraMove(Vector2(0, touchInfo[1].DeltaPosition.y))
end
end
end
-- ๅๆ็ผฉๆพๆๅๆบ่ท็ฆป
function PlayerCam:CameraZoom(_pos1, _pos2, _dis, _speed)
if this.curCamera.CameraMode == Enum.CameraMode.Social then
this.curCamera.Distance = this.curCamera.Distance - _dis / 50
end
end
--- TPS็ธๆบๅฐ็บฟๆฃๆต็ฎๆ
function PlayerCam:TPSGetRayDir()
local hitResult = Physics:RaycastAll(this.tpsCam.Position, this.tpsCam.Position + this.tpsCam.Forward * 100, false)
for i, v in ipairs(hitResult:GetHitPosAll()) do --่ทๅๆๆ็ขฐๅฐ็็ฉไฝ
if
(v - localPlayer.Position).Magnitude > 4 and
Vector3.Angle(localPlayer.Forward, (v - localPlayer.Position)) < 90 and
hitResult:GetHitObjAll()[i].Parent.Name ~= 'Water' and
hitResult:GetHitObjAll()[i].Parent.Name ~= 'ColBox'
then
----print(hitResult:GetHitObjAll()[i])
return v
end
end
return this.tpsCam.Position + this.tpsCam.Forward * 100
end
-- Fov็ผฉๆพ
function PlayerCam:CameraFOVZoom(_fovChange, _maxFov)
if _fovChange > 0 and this.curCamera.FieldOfView > _maxFov + 1 then
_fovChange = -0.2
elseif _fovChange > 0 and this.curCamera.FieldOfView > _maxFov then
_fovChange = 0
end
this.curCamera.FieldOfView = math.clamp(this.curCamera.FieldOfView + _fovChange, 60, 90)
end
---ๅผๅ
ณๆธธๆณณๆปค้
function PlayerCam:SwitchSwimFilter(_switch)
swimFilterSwitch = _switch
if _switch then
this.playerGameCam.WaterVignette:SetActive(true)
this.playerGameCam.WaterGaussionBlur:SetActive(true)
this.playerGameCam.WaterAmbientOcclusion:SetActive(true)
this.playerGameCam.WaterGrain:SetActive(true)
this.playerGameCam.WaterColorGrading:SetActive(true)
this.playerGameCam.WaterEffect:SetActive(true)
else
this.playerGameCam.WaterVignette:SetActive(false)
this.playerGameCam.WaterGaussionBlur:SetActive(false)
this.playerGameCam.WaterAmbientOcclusion:SetActive(false)
this.playerGameCam.WaterGrain:SetActive(false)
this.playerGameCam.WaterColorGrading:SetActive(false)
this.playerGameCam.WaterEffect:SetActive(false)
end
end
---ๅผๅ
ณไผ ้ๆปค้
function PlayerCam:SwitchTeleportFilterEventHandler(_switch)
if _switch then
this.playerGameCam.TeleportGlitch:SetActive(true)
else
this.playerGameCam.TeleportGlitch:SetActive(false)
end
end
---TPS็ธๆบ็ผฉๆพ
function PlayerCam:TPSCamZoom(_force)
this.tpsCam.FieldOfView = 60 - 10 * _force
this.tpsCam.Distance = 3 - 1 * _force
end
---ๆธธๆณณๆปค้ๆฃๆต
function PlayerCam:UpdateSwimFilter()
if not localPlayer:IsSwimming() then
if swimFilterSwitch == true then
this:SwitchSwimFilter(false)
end
else
if this.playerGameCam.Position.y < -14.5 then
if swimFilterSwitch == false then
this:SwitchSwimFilter(true)
end
else
if swimFilterSwitch == true then
this:SwitchSwimFilter(false)
end
end
end
end
-- ไฟฎๆน็ฉๅฎถๅฝๅ็ธๆบ
function PlayerCam:SetCurCamEventHandler(_cam, _lookAt)
if not (GameFlow.inGame) and this.curCamera then
this.curCamera = _cam or this.playerGameCam
this.curCamera.LookAt = _lookAt or localPlayer
world.CurrentCamera = this.curCamera
end
end
-- ่ฝฌๅไธบFPS็ธๆบ
function PlayerCam:SetFPSCamEventHandler(_lookAt)
this.curCamera = this.fpsCam
this.curCamera.LookAt = _lookAt
world.CurrentCamera = this.curCamera
end
-- ๆจ่ฟๆๆจ่ฟ็ฉๅฎถ้ๅคด
function PlayerCam:SetCamDistanceEventHandler(_distance, _duration, _triggerBlock)
if this.distanceTweener then
this.distanceTweener:Pause()
this.distanceTweener:Destroy()
end
this.curCamera.PhysicalBlock = false
this.distanceTweener = Tween:TweenProperty(this.curCamera, {Distance = _distance}, _duration, 1)
this.distanceTweener:Play()
this.distanceTweener:WaitForComplete()
this.curCamera.PhysicalBlock = _triggerBlock or false
end
local actionFovTweener
function PlayerCam:FoodOnDeskActionEventHandler(_foodId)
this.actionCam.FieldOfView = 60
NetUtil.Fire_C('SetCurCamEvent', localPlayer, this.actionCam)
actionFovTweener = Tween:TweenProperty(this.actionCam, {FieldOfView = 50}, 1.5, 1)
actionFovTweener:Play()
actionFovTweener:WaitForComplete()
NetUtil.Fire_S('FoodOnDeskEvent', _foodId, localPlayer)
end
function PlayerCam:ResetTentCamEventHandler(_distance)
this.curCamera.LookAt = localPlayer
wait()
this.curCamera:CameraMoveInDegree(Vector2(180, 0))
NetUtil.Fire_C('SetCamDistanceEvent', localPlayer, _distance, 1, true)
end
function PlayerCam:Update(dt)
this:UpdateSwimFilter()
end
return PlayerCam
|
slot2 = "BridgeManager"
slot0 = class(slot1)
GdtEventType = {
kAddToCart = 2,
kSearch = 5,
kStart = 6,
kScore = 4,
kPurchase = 3,
kRegister = 1
}
slot0.ctor = function (slot0)
slot0._bridge = nil
slot0._mainMgrClazz = nil
slot0._yybHelpClazz = "org/cocos2dx/lua/YYBJniHelper"
slot0._sdkHelpClazz = "org/cocos2dx/lua/SDKHelper"
slot3 = cc.Application
slot3 = cc.Application.getInstance(slot2)
if cc.Application.getInstance(slot2).getTargetPlatform(slot2) == cc.PLATFORM_OS_ANDROID then
slot4 = "cocos.cocos2d.luaj"
slot0._bridge = require(slot3)
slot0._mainMgrClazz = "com/shunwo/MainManager"
elseif slot1 == cc.PLATFORM_OS_IPHONE or slot1 == cc.PLATFORM_OS_IPAD then
slot4 = "cocos.cocos2d.luaoc"
slot0._bridge = require(slot3)
slot0._mainMgrClazz = "MainManager"
end
end
slot0.saveFileToAlbum = function (slot0, slot1, slot2, slot3)
slot4 = {}
if isAndroid then
slot4 = {
tostring(slot7),
slot2 or 0,
slot3 or 0
}
slot10 = 1
sig = "(" .. string.rep(slot1, "Ljava/lang/String;") .. "II)V"
else
slot4.filePath = slot1
slot4.onSuccess = slot2
slot4.onError = slot3
end
slot7 = "ไฟๅญๅพ็ๅฐ็ธๅ"
trace(slot6)
slot7 = slot4
trace_r(slot6)
slot10 = sig
return slot0.callMainManager(slot6, slot0, "saveFileToAlbum", slot4)
end
slot0.stopGps = function (slot0)
return slot0.callMainManager(slot2, slot0, "stopGps", nil)
end
slot0.jumpTo3rdApp = function (slot0, slot1, slot2, slot3)
slot4 = {}
if isAndroid then
slot8 = slot1
slot10 = 2
slot12 = "(" .. string.rep(slot2, {
tostring(slot7),
tostring(slot7),
slot3 or 0
}) .. "I)V"
return slot0.callMainManager("I)V", slot0, "jump2App", )
else
return 0
end
end
slot0.jump2Wechat = function (slot0)
slot3 = slot0
if not slot0.isInstallWeChat(slot2) then
popupMgr.showAlert(slot2, popupMgr, "่ฏทๅ
ๅฎ่ฃ
ๅพฎไฟกๅฎขๆท็ซฏ", nil)
return 0
end
if isAndroid then
slot5 = "com.tencent.mm.ui.LauncherUI"
slot0.jumpTo3rdApp(slot2, slot0, "com.tencent.mm")
elseif isMobile then
slot3 = "weixin://"
OSUtil.openURL(slot2)
else
return 0
end
return 1
end
slot0.gotoLocationSetting = function (slot0)
if isMobile then
return slot0.callMainManager(slot2, slot0, "gotoLocationSetting", nil)
end
end
slot0.startGps = function (slot0)
return slot0.callMainManager(slot2, slot0, "startGps", nil)
end
slot0.setLbsUpdateCallback = function (slot0, slot1)
return
end
slot0.payAlipay = function (slot0, slot1, slot2, slot3)
slot4 = {}
if isAndroid then
slot4 = {
tostring(slot7),
slot2 or 0,
slot3 or 0
}
slot10 = 1
sig = "(" .. string.rep(slot1, "Ljava/lang/String;") .. "II)V"
else
slot4.orderInfo = slot1
slot4.appScheme = APP_SCHEME
slot4.onSuccessLuaCallback = slot2
slot4.onErrorLuaCallback = slot3
end
slot7 = "ๅๅคๆ่ตทๆฏไปๅฎๆฏไป"
trace(slot6)
slot7 = slot4
trace_r(slot6)
slot10 = sig
return slot0.callMainManager(slot6, slot0, "payAlipay", slot4)
end
slot0.payWx = function (slot0, slot1, slot2, slot3, slot4, slot5, slot6, slot7, slot8, slot9)
slot10 = nil
slot11 = {
appid = slot3,
noncestr = slot5,
package = slot2,
partnerid = slot4,
prepayid = slot1,
sign = slot7,
timestamp = tostring(slot13)
}
slot14 = slot6
slot12 = {}
if isAndroid then
slot16 = slot11.appid
slot16 = slot11.noncestr
slot16 = slot11.package
slot16 = slot11.partnerid
slot16 = slot11.prepayid
slot16 = slot11.sign
slot12 = {
tostring(slot15),
tostring(slot15),
tostring(slot15),
tostring(slot15),
tostring(slot15),
tostring(slot15),
tostring(slot15),
slot8 or 0,
slot9 or 0
}
slot18 = 7
slot10 = "(" .. string.rep(slot11.timestamp, "Ljava/lang/String;") .. "II)V"
else
slot11.onSuccessLuaCallback = slot8
slot11.onErrorLuaCallback = slot9
end
slot15 = "ๅๅคๆ่ตทๅพฎไฟกๆฏไป"
trace(slot14)
slot15 = slot12
trace_r(slot14)
slot18 = slot10
return slot0.callMainManager(slot14, slot0, "payWx", slot12)
end
slot0.payWxByTH = function (slot0, slot1, slot2, slot3, slot4)
slot5, slot6 = nil
if isAndroid then
slot5 = {
slot1,
slot2,
slot3,
slot4
}
slot6 = "(Ljava/lang/String;FII)V"
else
slot5 = {
token = slot1,
money = slot2,
onSuccessLuaCallback = slot3,
onErrorLuaCallback = slot4
}
end
slot12 = slot6
return slot0.callMainManager(slot8, slot0, "payWxByTH", slot5)
end
slot0.copy2ClipBoard = function (slot0, slot1)
slot2 = nil
slot7 = (not isAndroid or {
slot1
}) and {
content = slot1
}
return slot0.callMainManager(slot4, slot0, "copy2ClipBoard")
end
slot0.setWebappShow = function (slot0)
slot6 = {}
return slot0.callMainManager(slot3, slot0, "setWebappShow")
end
slot0.addMainCallback = function (slot0, slot1)
slot2 = nil
slot7 = (not isAndroid or {
slot1
}) and {
luaMainCallback = slot1
}
return slot0.callMainManager(slot4, slot0, "addMainCallback")
end
slot0.deleteOauth = function (slot0)
slot4 = "deleteOauth"
return slot0.callMainManager(slot2, slot0)
end
slot0.registerWechat = function (slot0, slot1)
if isMobile then
slot2 = nil
slot7 = (not isAndroid or {
slot1
}) and {
wechatAppId = slot1
}
return slot0.callMainManager(slot4, slot0, "registerWechat")
end
end
slot0.shareWechat = function (slot0, slot1, slot2, slot3, slot4, slot5, slot6)
if isMobile then
slot7 = nil
slot13 = "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZI)V"
return slot0.callMainManager(slot9, slot0, "shareWechat", (not isAndroid or {
slot1,
slot2,
slot3,
slot4,
slot5,
slot6
}) and {
title = slot1,
content = slot2,
webpageUrl = slot3,
thumbUrl = slot4,
isCircleOrChat = slot5,
onWXShareRespCallback = slot6
})
end
end
slot0.reqAuthWithUserInfoFromWechat = function (slot0, slot1, slot2)
slot3 = nil
slot9 = "(II)V"
return slot0.callMainManager(slot5, slot0, "reqAuthWithUserInfoFromWechat", (not isAndroid or {
slot1,
slot2
}) and {
luaOnAuth = slot1,
state = slot2
})
end
slot0.startNetworkListener = function (slot0, slot1)
slot2 = nil
slot7 = (not isAndroid or {
slot1
}) and {
luaOnNetworkChanged = slot1
}
return slot0.callMainManager(slot4, slot0, "addNetworkChangedListener")
end
slot0.getNetJsonInfo = function (slot0)
slot6 = "()Ljava/lang/String;"
if slot0.callMainManager(slot2, slot0, "getNetInfo", nil) then
slot4 = slot1
return cjson.decode(slot3)
else
return nil
end
end
slot0.vibra = function (slot0)
slot5 = args
slot0.callMainManager(slot2, slot0, "vibra")
end
slot0.getBatteryInfo = function (slot0)
slot6 = "()Ljava/lang/String;"
if slot0.callMainManager(slot2, slot0, "getBatteryInfo", nil) then
slot4 = slot1
return cjson.decode(slot3)
else
return nil
end
end
slot0.getPhoneIMEI = function (slot0)
slot6 = "()Ljava/lang/String;"
return slot0.callMainManager(slot2, slot0, "getPhoneIMEI", nil)
end
slot0.getPhoneMacAddr = function (slot0)
slot6 = "()Ljava/lang/String;"
return slot0.callMainManager(slot2, slot0, "getPhoneMacAddr", nil)
end
slot0.getPhoneModel = function (slot0)
slot6 = "()Ljava/lang/String;"
return slot0.callMainManager(slot2, slot0, "getPhoneModel", nil)
end
slot0.getPhoneOSVer = function (slot0)
slot6 = "()Ljava/lang/String;"
return slot0.callMainManager(slot2, slot0, "getPhoneOSVer", nil)
end
slot0.getPhoneChanId = function (slot0)
slot6 = "()Ljava/lang/String;"
return slot0.callMainManager(slot2, slot0, "getPhoneChanId", nil)
end
slot0.getPhoneOperator = function (slot0)
slot6 = "()Ljava/lang/String;"
return slot0.callMainManager(slot2, slot0, "getPhoneOperator", nil)
end
slot0.getPhoneNettype = function (slot0)
slot6 = "()Ljava/lang/String;"
return slot0.callMainManager(slot2, slot0, "getPhoneNettype", nil)
end
slot0.getPhoneUUId = function (slot0, slot1)
slot2 = nil
if slot0._uuid then
return slot0._uuid
else
if IS_IOS_VERIFY and not IS_IOS_VERIFY_ALL then
slot5 = Hero
slot5 = Hero.getMachineId4IosVerify(slot4)
if not StringUtil.isStringValid(slot4) then
slot8 = 1000000
slot8 = tickMgr
slot5 = math.random(slot6, 0) * tickMgr.getTime(0)
slot6 = tostring(slot4)
Hero.setMachineId4IosVerify(slot4, Hero)
end
elseif isMobile then
slot5 = Hero
slot5 = Hero.getMachineIdInSO(slot4)
if not StringUtil.isStringValid(slot4) then
slot8 = "()Ljava/lang/String;"
slot6 = slot0.callMainManager(slot4, slot0, "getPhoneUUId", nil)
Hero.setMachineIdInSO(slot4, Hero)
end
else
slot2 = "desktop"
if not slot1 then
slot7 = 10000
slot2 = slot2 .. math.random(slot5, 0)
end
end
slot6 = false
slot2 = StringUtil.md5sum(slot4, slot2)
if not IS_IOS_VERIFY or IS_IOS_VERIFY_ALL or not not IS_IOS_VERIFY_ALL_NO_BANK then
slot0._uuid = slot2
end
return slot2
end
end
slot0.getRoomId = function (slot0)
slot6 = "()Ljava/lang/String;"
return slot0.callMainManager(slot2, slot0, "getRoomId", nil)
end
slot0.setRoomId = function (slot0, slot1)
slot4 = slot1
slot1 = tostring(slot3)
slot2 = {}
if isAndroid then
slot2[1] = slot1
else
slot2.roomId = slot1
end
slot8 = "(Ljava/lang/String;)V"
return slot0.callMainManager(slot4, slot0, "setRoomId", slot2)
end
slot0.payForRechargeIos = function (slot0, slot1, slot2, slot3)
if isMobile and not isAndroid then
slot10 = nil
slot0.callMainManager(slot6, slot0, "payForRecharge", {
productId = slot1,
onFinish = slot2,
onFailed = slot3
})
end
end
slot0.canOpenURL = function (slot0, slot1)
slot0._urlOpenCacheDic = slot0._urlOpenCacheDic or {}
slot2 = slot0._urlOpenCacheDic[slot1]
if isMobile and not isAndroid and slot2 == nil then
slot9 = nil
slot0._urlOpenCacheDic[slot1] = slot0.callMainManager(slot5, slot0, "canOpenURL", {
url = slot1
}) == 1
end
return slot2
end
slot0.isInstallQQ = function (slot0)
slot1 = false
if isMobile then
if isAndroid then
return true
else
slot5 = "mqq://"
slot1 = slot0.canOpenURL(slot3, slot0)
end
end
return slot1
end
slot0.isInstallAli = function (slot0)
slot1 = false
if isMobile then
if isAndroid then
slot7 = "()I"
slot1 = slot0.callMainManager(slot3, slot0, "isInstallAli", nil) == 1
elseif isSupportAlipayScheme then
slot7 = "()I"
slot1 = slot0.callMainManager(slot3, slot0, "isInstallAli", nil) == 1
else
slot1 = true
end
end
return slot1
end
slot0.isInstallWeChat = function (slot0)
slot1 = false
if isMobile then
slot7 = "()I"
return slot0.callMainManager(slot3, slot0, "isInstallWeChat", nil) == 1
end
end
slot0.setStatusBarOrientation = function (slot0, slot1)
if isMobile then
slot2 = {}
if isAndroid then
slot2[1] = slot1 or false
else
slot2.isLandscapeOrPortrait = slot1 or false
end
slot8 = "(Z)V"
slot0.callMainManager(slot4, slot0, "setStatusBarOrientation", slot2)
end
end
slot0.callMainManager = function (slot0, slot1, slot2, slot3)
slot4 = false
slot5 = nil
if slot0._bridge then
slot11 = slot3
slot4, slot5 = slot0._bridge.callStaticMethod(slot7, slot0._mainMgrClazz, slot1, slot2)
end
if slot4 then
return slot5
else
return nil
end
end
slot0.loginYybQQ = function (slot0, slot1)
slot8 = "(I)V"
slot0.callYYBJniHelp(slot4, slot0, "loginQQ", {
slot1
})
end
slot0.loginYybWX = function (slot0, slot1)
slot8 = "(I)V"
slot0.callYYBJniHelp(slot4, slot0, "loginWX", {
slot1
})
end
slot0.loginYybGuest = function (slot0, slot1)
slot8 = "(I)V"
slot0.callYYBJniHelp(slot4, slot0, "loginGuest", {
slot1
})
end
slot0.logoutYyb = function (slot0, slot1)
slot8 = "(I)V"
slot0.callYYBJniHelp(slot4, slot0, "loginOut", {
slot1
})
end
slot0.rechargeYyb = function (slot0, slot1, slot2, slot3, slot4)
slot11 = 3
slot13 = "(" .. string.rep(slot9, slot6) .. "I)V"
slot0.callYYBJniHelp("I)V", slot0, "recharge", {
slot1,
slot2,
slot3,
slot4
})
end
slot0.isInstallQQYyb = function (slot0)
slot6 = "()Z"
return slot0.callYYBJniHelp(slot2, slot0, "isQQInstalled", nil)
end
slot0.isInstallWxYyb = function (slot0)
slot6 = "()Z"
return slot0.callYYBJniHelp(slot2, slot0, "isWXInstalled", nil)
end
slot0.queryQQUserInfo = function (slot0, slot1)
slot8 = "(I)V"
slot0.callYYBJniHelp(slot4, slot0, "queryQQUserInfo", {
slot1
})
end
slot0.queryWXUserInfo = function (slot0, slot1)
slot8 = "(I)V"
slot0.callYYBJniHelp(slot4, slot0, "queryWXUserInfo", {
slot1
})
end
slot0.logEventYyb = function (slot0, slot1)
if not IS_YYB then
return
end
slot8 = "(I)V"
slot0.callYYBJniHelp(slot4, slot0, "logEvent", {
slot1
})
end
slot0.callYYBJniHelp = function (slot0, slot1, slot2, slot3)
slot4 = false
slot5 = nil
if slot0._bridge then
slot11 = slot3
slot4, slot5 = slot0._bridge.callStaticMethod(slot7, slot0._yybHelpClazz, slot1, slot2)
end
if slot4 then
return slot5
else
return nil
end
end
slot0.setAutorotate = function (slot0, slot1)
if isSupportAutoRotate then
slot1 = true
slot2 = {}
if isAndroid then
slot2[1] = slot1
else
slot2.isAutorotate = slot1
end
slot8 = "(Z)V"
slot0.callMainManager(slot4, slot0, "setAutorotate", slot2)
end
end
slot0.isInstallPotato = function (slot0)
slot6 = "()I"
return slot0.callMainManager(slot2, slot0, "isInstallPotato", nil) == 1
end
slot0.reqPotatoAuth = function (slot0, slot1, slot2, slot3, slot4)
slot5 = nil
slot11 = "(Ljava/lang/String;Ljava/lang/String;II)V"
slot0.callMainManager(slot7, slot0, "reqPotatoAuth", (not isAndroid or {
slot1,
slot2,
slot3,
slot4
}) and {
clientId = slot1,
secretKey = slot2,
successCallback = slot3,
failCallback = slot4
})
end
slot0.loginSDK = function (slot0, slot1)
if not CUR_SDK_TYPE then
return
end
slot8 = "(I)V"
slot0.callSDKJniHelp(slot4, slot0, "login", {
slot1
})
end
slot0.exitSDK = function (slot0, slot1)
if not CUR_SDK_TYPE then
return
end
slot8 = "(I)V"
slot0.callSDKJniHelp(slot4, slot0, "exit", {
slot1
})
end
slot0.rechargeSDK = function (slot0, slot1, slot2)
slot10 = "(Ljava/lang/String;I)V"
slot0.callSDKJniHelp(slot6, slot0, "recharge", {
slot1,
slot2
})
end
slot0.callSDKJniHelp = function (slot0, slot1, slot2, slot3)
slot4 = false
slot5 = nil
if slot0._bridge then
slot11 = slot3
slot4, slot5 = slot0._bridge.callStaticMethod(slot7, slot0._sdkHelpClazz, slot1, slot2)
end
if slot4 then
return slot5
else
return nil
end
end
slot0.setupGDT = function (slot0, slot1, slot2)
if IS_USE_GDK then
args = {
actionSetId = slot1,
secretKey = slot2
}
slot7 = args
slot0.callMainManager(slot4, slot0, "setupGDT")
end
end
slot0.logGDTAction = function (slot0, slot1, slot2)
if IS_USE_GDK then
args = {
actionType = slot1,
actionParam = slot2
}
slot7 = args
slot0.callMainManager(slot4, slot0, "logGDTAction")
end
end
bridgeMgr = slot0.new()
return
|
-- @namespace foundation.com
|
function drawBox(x, y, width, height, borderColor, fillColor)
gui.box(x, y, x + width, y + height, fillColor, borderColor)
end
|
-- ===========================
-- Required APIs
-- ===========================
os.loadAPI("/script/sha256")
-- ===========================
-- Variables for the login form
-- ===========================
local boxIndex = 0
local textIndex = 0
local username = ""
local password = ""
local textboxLimit = 36
local usernameCursorX = 13
local usernameCursorY = 11
local passwordCursorX = 13
local passwordCursorY = 13
local cursorX = 0
local cursorY = 0
local guiEnabled = true
-- ===========================
-- Utility Functions
-- ===========================
function centerText(text, yVal)
local width = term.getSize()
local length = string.len(text)
local minus = math.floor(width-length)
local x = math.floor(minus/2)
term.setCursorPos(x+1,yVal)
term.write(text)
end
function setStatus(message)
term.setCursorPos(1, 19)
term.setTextColor(colors.gray)
centerText(" ", 19)
centerText(message, 19)
term.setCursorPos(cursorX, cursorY)
end
-- ===========================
-- Application Functions
-- ===========================
function performLogin()
disableLoginButtons()
guiEnabled = false
term.setCursorBlink(false)
term.setBackgroundColor(colors.lightGray)
-- Perform 10 Authentication Requests
for i=0,10 do
if i > 2 then
setStatus("Performing authentication request... ("..i.."/10)")
else
setStatus("Performing authentication request...")
end
--
-- Authentication Request Attempt
--
-- Loop 5 times:
-- Send Broadcast with auth request
-- Wait 0.2 for response
--
broadcastString = "AUTH;"..username..";"..sha256.sha256(password)
for i=0,5 do
rednet.broadcast(broadcastString, "AUTH")
senderId, message, protocol = rednet.receive("AUTH", 0.2)
if message ~= nil then
if message == "authenticated" then
drawSuccess("Access Granted.")
username = ""
password = ""
boxIndex = 0
sleep(2)
else
drawError("Invalid Credentials.")
password = ""
boxIndex = 1
sleep(2)
end
return
end
end
end
drawError("Unable to contact server.")
sleep(5)
end
function clearForm()
username = nil
password = nil
usernameCursorX = 13
usernameCursorY = 11
passwordCursorX = 13
passwordCursorY = 13
boxIndex = 0
cursorX, cursorY = usernameCursorX, usernameCursorY
fillTextBoxes()
end
-- ===========================
-- GUI Draw Functions
-- ===========================
function drawSuccess(message)
term.setBackgroundColor(colors.green)
paintutils.drawFilledBox(1, 7, 51, 19, colors.green)
term.setTextColor(colors.black)
centerText(message, 13)
setStatus("")
end
function drawError(message)
term.setBackgroundColor(colors.red)
paintutils.drawFilledBox(1, 7, 51, 19, colors.red)
term.setTextColor(colors.black)
centerText("Unable to authenticate!", 11)
centerText("Please validate your credentials.", 13)
setStatus("Error: "..message)
end
function drawHeader()
paintutils.drawFilledBox(1, 1, 51, 3, colors.yellow)
paintutils.drawFilledBox(1, 4, 51, 6, colors.red)
function drawBlackSquares(xStart, y)
for x=0,50,4 do
paintutils.drawFilledBox(xStart + x, y, xStart + x + 1, y, colors.black)
end
end
drawBlackSquares(2, 1)
drawBlackSquares(1, 2)
drawBlackSquares(0, 3)
-- Header Text
term.setBackgroundColor(colors.yellow)
term.setTextColor(colors.black)
term.setBackgroundColor(colors.red)
term.setTextColor(colors.white)
centerText("Project Nuke Authentication Terminal", 5)
term.setBackgroundColor(colors.orange)
end
function drawLogin()
guiEnabled = true
term.setTextColor(colors.black)
-- Initial Background
paintutils.drawFilledBox(1, 7, 51, 9, colors.orange)
centerText("Please enter your username and password.", 8)
paintutils.drawFilledBox(1, 10, 51, 19, colors.lightGray)
-- Login Text
term.setBackgroundColor(colors.lightGray)
term.setCursorPos(3, 11)
term.write("Username")
term.setCursorPos(3, 13)
term.write("Password")
term.setTextColor(colors.black)
term.setBackgroundColor(colors.lightGray)
-- Buttons
enableLoginButtons()
-- Textboxes
paintutils.drawFilledBox(13, 11, 49, 11, colors.white)
paintutils.drawFilledBox(13, 13, 49, 13, colors.white)
term.setBackgroundColor(colors.lightGray)
setStatus("Ready for credentials")
fillTextBoxes()
end
function enableLoginButtons()
paintutils.drawFilledBox(13, 15, 19, 17, colors.red)
paintutils.drawFilledBox(43, 15, 49, 17, colors.green)
term.setTextColor(colors.white)
term.setBackgroundColor(colors.red)
term.setCursorPos(14, 16)
term.write("Clear")
term.setBackgroundColor(colors.green)
term.setCursorPos(44, 16)
term.write("Login")
end
function disableLoginButtons()
paintutils.drawFilledBox(13, 15, 19, 17, colors.gray)
paintutils.drawFilledBox(43, 15, 49, 17, colors.gray)
term.setTextColor(colors.black)
term.setBackgroundColor(colors.gray)
term.setCursorPos(14, 16)
term.write("Clear")
term.setBackgroundColor(colors.gray)
term.setCursorPos(44, 16)
term.write("Login")
end
-- ===========================
-- Application Loop Functions
--
-- These functions will loop, constantly.
-- ===========================
function eventListener()
local event, p1, p2, p3 = os.pullEvent()
if guiEnabled == false then
end
if event == "key" then
key = p1
if key == keys.enter then
performLogin()
drawLogin()
elseif key == keys.tab then
if boxIndex == 0 then
boxIndex = 1
elseif boxIndex == 1 then
boxIndex = 0
end
elseif key == keys.backspace then
if boxIndex == 0 then
if username ~= nil then
username = username:sub(1, username:len() - 1)
end
elseif boxIndex == 1 then
if password ~= nil then
password = password:sub(1, password:len() - 1)
end
end
else
return
end
fillTextBoxes()
elseif event == "char" then
if boxIndex == 0 then
if username == nil then
username = p1
elseif username:len() <= textboxLimit then
username = username .. p1
end
elseif boxIndex == 1 then
if password == nil then
password = p1
elseif password:len() <= textboxLimit then
password = password .. p1
end
end
fillTextBoxes()
elseif event == "mouse_click" then
local x = tonumber(p2)
local y = tonumber(p3)
-- Button Coordinates
--
-- Login: (43, 15) to (49, 17)
-- Clear: (13, 15) to (19, 17)
-- Username: (13, 11) to (49, 11)
-- Password: (13, 13) to (49, 13)
--
if x >= 43 and x <= 49 and y >= 15 and y <= 17 then
performLogin()
drawLogin()
elseif x >= 13 and x <= 19 and y >= 15 and y <= 17 then
clearForm()
drawLogin()
elseif x >= 13 and x <= 49 and y >= 11 and y <= 11 then
boxIndex = 0
fillTextBoxes()
elseif x >= 13 and x <= 49 and y >= 13 and y <= 13 then
boxIndex = 1
fillTextBoxes()
end
end
end
function fillTextBoxes()
paintutils.drawFilledBox(13, 11, 49, 11, colors.white)
paintutils.drawFilledBox(13, 13, 49, 13, colors.white)
term.setBackgroundColor(colors.white)
term.setTextColor(colors.black)
term.setCursorBlink(true)
term.setCursorPos(13, 11)
if username ~= nil then
term.write(username)
usernameCursorX, usernameCursorY = term.getCursorPos()
end
if password ~= nil then
term.setCursorPos(13, 13)
length = password:len()
for i=1,password:len() do
term.write("*")
end
passwordCursorX, passwordCursorY = term.getCursorPos()
end
if boxIndex == 0 then
if username ~= nil and username:len() > textboxLimit then
term.setCursorBlink(false)
else
term.setCursorBlink(true)
end
term.setCursorPos(usernameCursorX, usernameCursorY)
else
if password ~= nil and password:len() > textboxLimit then
term.setCursorBlink(false)
else
term.setCursorBlink(true)
end
term.setCursorPos(passwordCursorX, passwordCursorY)
end
end
-- ===========================
-- Run Application
-- ===========================
rednet.open("back")
drawHeader()
drawLogin()
while true do
eventListener()
end
|
function lme( ... )
-- body
-- LME Produces logical matrix for equivalence, return an LM object
-- M = LME for classical logic
-- M = LME(K) for k-valued logic
-- Example: m = lme, m = lme(2)
local arg={...}
local ni = select("#",...)
k = arg[1]
if ( ni == 0 ) then
k = 2
end
Mc = lmc(k)
Mi = lmi(k)
Mr = lmr(k)
return Mc*Mi*(leye(k^2)+Mi)*(leye(k)+Mr)*(leye(k)+lwij(k))*Mr
end
|
-- regression tests for vstruct
-- tests for fixed bugs go here to make sure they don't recur
-- tests are named after the bug they trigger, not the intended behaviour
local test = require "vstruct.test.common"
local frexp = require "vstruct.frexp"
-- No point in running these tests if there isn't a builtin frexp to compare to.
if not math.frexp then return end
test.group "frexp()"
local function test_frexp(x)
local m,e = math.frexp(x)
if m >= 1 or m <= -1 then
-- At least on my machine, frexp() sometimes returns 1 as the mantissa, in
-- violation as the spec. Correct this so that we can more properly compare
-- things.
m,e = m/2, e+1
end
local m2,e2 = frexp(x)
local ok = m == m2 and e == e2
test.record("frexp equivalence", ok, x,
"(builtin) %f,%f != %f,%f (lua)", m, e, m2, e2)
end
local inf = math.huge
local z = 0.0
local nz = -z
local doubles = {
0.0, 1.0, 2.0,
1/2, 1/4, 1/8,
4.9406564584124654418e-324,
7.4169128616906696301e-309,
1.483382572338133926e-308,
2.225073858507200889e-308,
2.2250738585072013831e-308,
2.2250738585072018772e-308,
2.9667651446762683461e-308,
3.7084564308453353091e-308,
4.4501477170144022721e-308,
8.9884656743115795386e+307,
8.9884656743115815345e+307,
1.1984620899082105386e+308,
1.4980776123852631234e+308,
1.7976931348623157081e+308,
4.9406564584124654418e-324,
2.225073858507200889e-308,
2.2250738585072013831e-308,
1.7976931348623157081e+308,
0.0,
nz,
-4.9406564584124654418e-324,
-7.4169128616906696301e-309,
-1.483382572338133926e-308,
-2.225073858507200889e-308,
-2.2250738585072013831e-308,
-2.2250738585072018772e-308,
-2.9667651446762683461e-308,
-3.7084564308453353091e-308,
-4.4501477170144022721e-308,
-8.9884656743115795386e+307,
-8.9884656743115815345e+307,
-1.1984620899082105386e+308,
-1.4980776123852631234e+308,
-1.7976931348623157081e+308,
-4.9406564584124654418e-324,
-2.225073858507200889e-308,
-2.2250738585072013831e-308,
-1.7976931348623157081e+308,
nz,
}
for _,double in ipairs(doubles) do
test_frexp(double)
end
|
list.Set( "player_base_clothing_system", "pony", {
NiceModel = {
'models/ppm/player_default_base_new.mdl',
'models/ppm/player_default_base_new_nj.mdl',
'models/ppm/player_default_base_nj.mdl',
'models/ppm/player_default_base.mdl',
'models/cppm/player_default_base.mdl',
'models/cppm/player_default_base_nj.mdl',
},
BoneType = {
Head = false, -- ะะพะปะพะฒะฐ
Neck = false, -- ะจะตั
Chest = false, -- ะััะดั
BodyCenter = false, -- ะขะตะปะพ
Pelvis = false, -- ะััะฟ
Spine = false, -- ะกะฟะธะฝะฐ
RightSide = false, -- ะัะฐะฒัะน ะฑะพะบ
LeftSide = false, -- ะะตะฒัะน ะฑะพะบ
FrontLeftHoof = false, -- ะะตัะตะดะฝะตะต ะปะตะฒะพะต ะบะพะฟััะพ
FontRightHoof = false, -- ะะตัะตะดะฝะตะต ะทะฐะดะฝะตะต ะบะพะฟััะพ
RearLeftHoof = false, -- ะะฐะดะฝะตะต ะปะตะฒะพะต ะบะพะฟััะพ
RearRightHoof = false, -- ะะฐะดะฝะตะต ะฟัะฐะฒะพะต ะบะพะฟััะพ
TipFrontLeftHoof = false, -- ะะตัะตะดะฝะตะต ะปะตะฒะพะต ะบะพะฟััะพ ะฟะพัะปะต ะบะพะปะตะฝะฐ
TipFrontRightHoof = false, -- ะะตัะตะดะฝะตะต ะฟัะฐะฒะพะต ะบะพะฟััะพ ะฟะพัะปะต ะบะพะปะตะฝะฐ
TipRearLeftHoof = false, -- ะะฐะดะฝะตะต ะปะตะฒะพะต ะบะพะฟััะพ ะฟะพัะปะต ะบะพะปะตะฝะฐ
TipRearRightHoof = false, -- ะะฐะดะฝะตะต ะฟัะฐะฒะพะต ะบะพะฟััะพ ะฟะพัะปะต ะบะพะปะตะฝะฐ
}
} )
list.Set( "player_base_clothing_system", "hl2_player", {
BoneType = {
Head = false, -- ะะพะปะพะฒะฐ
Neck = false, -- ะจะตั
Chest = false, -- ะััะดั
BodyCenter = false, -- ะขะตะปะพ
Stomach = false, -- ะะธะฒะพั
Thigh = false, -- ะัะดัะฐ
Pelvis = false, -- ะขะฐะท
Spine = false, -- ะกะฟะธะฝะฐ
LeftLeg = false, -- ะะตะฒะฐั ะฝะพะณะฐ ะดะพ ะบะพะปะตะฝะฐ
LeftKnee = false, -- ะะตะฒะพะต ะบะพะปะตะฝะพ
LeftShin = false, -- ะะตะฒะฐั ะณะพะปะตะฝั
LeftFoot = false, -- ะะตะฒะฐั ะฝะพะณะฐ
LeftHeel = false, -- ะะตะฒะฐั ะฟััะบะฐ
RightLeg = false, -- ะัะฐะฒะฐั ะฝะพะณะฐ ะดะพ ะบะพะปะตะฝะฐ
RightKnee = false, -- ะัะฐะฒะพะต ะบะพะปะตะฝะพ
RightShin = false, -- ะัะฐะฒะฐั ะณะพะปะตะฝั
RightFoot = false, -- ะัะฐะฒะฐั ะฝะพะณะฐ
RightHeel = false, -- ะัะฐะฒะฐั ะฟััะบะฐ
LeftShoulder = false, -- ะะตะฒะพะต ะฟะปะตัะพ
LeftArm = false, -- ะะตะฒะฐั ััะบะฐ ะดะพ ะปะพะบัั
LeftElbow = false, -- ะะตะฒัะน ะปะพะบะพัั
LeftForearm = false, -- ะะตะฒะพะต ะฟัะตะดะฟะปะตััะต
LeftWrist = false, -- ะะตะฒะพะต ะทะฐะฟััััะต
LeftHand = false, -- ะะตะฒะฐั ะบะธััั/ะปะฐะดะพะฝั
RightShoulder = false, -- ะัะฐะฒะพะต ะฟะปะตัะพ
RightArm = false, -- ะัะฐะฒะฐั ััะบะฐ ะดะพ ะปะพะบัั
RightElbow = false, -- ะัะฐะฒัะน ะปะพะบะพัั
RightForearm = false, -- ะัะฐะฒะพะต ะฟัะตะดะฟะปะตััะต
RightWrist = false, -- ะัะฐะฒะพะต ะทะฐะฟััััะต
RightHand = false, -- ะัะฐะฒะฐั ะบะธััั/ะปะฐะดะพะฝั
}
} )
|
local _={}
_[38]={x=31,id=2,y=0,arrangement=0,type=0}
_[37]={x=24,id=1,y=11,arrangement=6,type=1}
_[36]={x=19,id=0,y=1,arrangement=4,type=1}
_[35]={y=4,x=12,id=0}
_[34]={y=7,x=9,dest=19,id=3}
_[33]={y=0,x=13,dest=17,id=2}
_[32]={y=7,x=9,dest=19,id=1}
_[31]={y=11,x=17,dest=18,id=0}
_[30]={y=0,x=28,target=11,id=3}
_[29]={y=0,x=28,target=11,id=2}
_[28]={y=0,x=28,target=11,id=1}
_[27]={y=0,x=28,target=11,id=0}
_[26]={x=15,w=1,y=10,h=3,style=false,id=15}
_[25]={x=7,w=1,y=6,h=10,style=false,id=14}
_[24]={x=15,w=1,y=0,h=3,style=false,id=13}
_[23]={x=11,w=4,y=2,h=1,style=false,id=12}
_[22]={x=11,w=1,y=0,h=2,style=true,id=11}
_[21]={x=7,w=1,y=0,h=5,style=false,id=10}
_[20]={x=7,w=4,y=5,h=1,style=false,id=9}
_[19]={x=26,w=1,y=4,h=4,style=false,id=8}
_[18]={x=22,w=4,y=7,h=1,style=false,id=7}
_[17]={x=21,w=11,y=2,h=1,style=false,id=6}
_[16]={x=20,w=1,y=2,h=3,style=false,id=5}
_[15]={x=21,w=1,y=7,h=3,style=false,id=4}
_[14]={x=16,w=5,y=5,h=1,style=false,id=3}
_[13]={x=15,w=6,y=9,h=1,style=false,id=2}
_[12]={x=16,w=16,y=12,h=1,style=false,id=1}
_[11]={x=11,w=1,y=5,h=5,style=false,id=0}
_[10]={y=0,x=24,id=3}
_[9]={y=10,x=28,id=2}
_[8]={y=1,x=8,id=1}
_[7]={y=12,x=11,id=0}
_[6]={_[36],_[37],_[38]}
_[5]={_[35]}
_[4]={_[31],_[32],_[33],_[34]}
_[3]={_[27],_[28],_[29],_[30]}
_[2]={_[11],_[12],_[13],_[14],_[15],_[16],_[17],_[18],_[19],_[20],_[21],_[22],_[23],_[24],_[25],_[26]}
_[1]={_[7],_[8],_[9],_[10]}
return {spawners=_[1],walls=_[2],keys=_[3],exits=_[4],starts=_[5],treasures=_[6]}
|
/*
Fin tool II
by Austin "Q42" Fox
This addon is not for stealing. K THX.
*/
fintool = {}
function fintool.initialize()
fintool.wind = Vector( math.Rand(-360, 360), math.Rand(-360, 360), 0)
fintool.maxwind = 360
fintool.minwind = 0
end
hook.Add( "Initialize", "finitialize", fintool.initialize )
function fintool.think()
fintool.nextthink = fintool.nextthink or CurTime()
if CurTime() > fintool.nextthink then
fintool.maxdelay = fintool.maxdelay or 120
fintool.wind = Vector( math.Rand(fintool.minwind, fintool.maxwind), math.Rand(fintool.minwind, fintool.maxwind), 0)
fintool.nextthink = fintool.nextthink + math.Rand(0, fintool.maxdelay)
end
end
hook.Add( "Think", "finthink", fintool.think )
function fintool.setmaxdelay(player,command,arg)
if player:IsAdmin() or player:IsSuperAdmin() then fintool.maxdelay = arg[1] end
end
concommand.Add("fintool_setmaxwinddelay",fintool.setmaxdelay)
function fintool.setmaxwind(player,command,arg)
if player:IsAdmin() or player:IsSuperAdmin() then fintool.maxwind = arg[1] end
end
concommand.Add("fintool_setmaxwind",fintool.setmaxwind)
function fintool.setminwind(player,command,arg)
if player:IsAdmin() or player:IsSuperAdmin() then fintool.minwind = arg[1] end
end
concommand.Add("fintool_setminwind",fintool.setminwind)
|
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/bow_deerhunter.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_DeerHunter.Single",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_GUNFIRE,
pitch = {95,105},
sound = {
")weapons/firearms/bow_deerhunter/bow_fire_01.wav"
},
} )
sound.Add( {
name = "Weapon_DeerHunter.PullBack",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_NORM,
sound = {
")weapons/firearms/bow_deerhunter/bow_pullback_01.wav",
")weapons/firearms/bow_deerhunter/bow_pullback_02.wav",
")weapons/firearms/bow_deerhunter/bow_pullback_03.wav",
")weapons/firearms/bow_deerhunter/bow_pullback_04.wav"
},
} )
sound.Add( {
name = "Weapon_DeerHunter.ArrowFly",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_NORM,
sound = ")weapons/firearms/bow_deerhunter/arrow_fly_loop_01.wav",
} )
sound.Add( {
name = "Weapon_DeerHunter.ArrowFetch",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_NORM,
sound = {
")weapons/firearms/bow_deerhunter/arrow_fetch_01.wav",
")weapons/firearms/bow_deerhunter/arrow_fetch_02.wav",
")weapons/firearms/bow_deerhunter/arrow_fetch_03.wav",
")weapons/firearms/bow_deerhunter/arrow_fetch_04.wav"
},
} )
sound.Add( {
name = "Weapon_DeerHunter.ArrowLoad",
channel = CHAN_ITEM,
volume = 0.4,
level = SNDLVL_NORM,
sound = {
")weapons/firearms/bow_deerhunter/arrow_load_01.wav",
")weapons/firearms/bow_deerhunter/arrow_load_02.wav",
")weapons/firearms/bow_deerhunter/arrow_load_03.wav"
},
} )
sound.Add( {
name = "Weapon_DeerHunter.Shove",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/shove_01.wav",
")player/shove_02.wav",
")player/shove_03.wav",
")player/shove_04.wav",
")player/shove_05.wav"
},
} )
sound.Add( {
name = "Weapon_DeerHunter.Draw",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_draw_01.wav",
")player/weapon_draw_02.wav",
")player/weapon_draw_03.wav",
")player/weapon_draw_04.wav",
")player/weapon_draw_05.wav"
},
} )
sound.Add( {
name = "Weapon_DeerHunter.Holster",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_holster_01.wav",
")player/weapon_holster_02.wav",
")player/weapon_holster_03.wav",
")player/weapon_holster_04.wav",
")player/weapon_holster_05.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/exp_grenade.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Frag.Toss",
channel = CHAN_WEAPON,
volume = 0.7,
level = SNDLVL_75dB,
sound = ")weapons/firearms/exp_frag/Frag_Toss.wav",
} )
sound.Add( {
name = "Weapon_Frag.Throw",
channel = CHAN_WEAPON,
volume = 0.7,
level = SNDLVL_75dB,
sound = ")weapons/firearms/exp_frag/frag_draw.wav",
} )
sound.Add( {
name = "Weapon_Frag.Draw",
channel = CHAN_BODY,
volume = 0.9,
level = SNDLVL_40dB,
pitch = {95,105},
sound = {
")player/weapon_draw_01.wav",
")player/weapon_draw_02.wav",
")player/weapon_draw_03.wav",
")player/weapon_draw_04.wav",
")player/weapon_draw_05.wav"
},
} )
sound.Add( {
name = "Weapon_Frag.PinPull",
channel = CHAN_WEAPON,
volume = 0.7,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/exp_frag/Frag_Pull_Pin1.wav",
")weapons/firearms/exp_frag/Frag_Pull_Pin2.wav"
},
} )
sound.Add( {
name = "Weapon_Frag.Explode",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_180dB,
sound = {
"^weapons/firearms/exp_frag/Frag_Explode1.wav",
"^weapons/firearms/exp_frag/Frag_Explode2.wav",
"^weapons/firearms/exp_frag/Frag_Explode3.wav"
},
} )
sound.Add( {
name = "Weapon_Frag.Debris",
channel = CHAN_AUTO,
volume = 1.0,
level = SNDLVL_75dB,
sound = {
"^weapons/firearms/exp_frag/Frag_Debris1.wav",
"^weapons/firearms/exp_frag/Frag_Debris2.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/exp_molotov.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Molotov.Ignite_Rag",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_NORM,
sound = ")weapons/firearms/exp_molotov/molotov_rag_ignite_01.wav",
} )
sound.Add( {
name = "Weapon_Molotov.Rag_Loop",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_NORM,
sound = ")weapons/firearms/exp_molotov/molotov_rag_fire_loop_01.wav",
} )
sound.Add( {
name = "Weapon_Molotov.Explode",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_NORM,
sound = ")weapons/firearms/exp_molotov/molotov_explode_01.wav",
} )
sound.Add( {
name = "Weapon_Molotov.Fire_Loop",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_NORM,
sound = ")weapons/firearms/exp_molotov/molotov_fire_loop_01.wav",
} )
sound.Add( {
name = "Weapon_Molotov.Draw",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_draw_01.wav",
")player/weapon_draw_02.wav",
")player/weapon_draw_03.wav",
")player/weapon_draw_04.wav",
")player/weapon_draw_05.wav"
},
} )
sound.Add( {
name = "Weapon_Molotov.Holster",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_holster_01.wav",
")player/weapon_holster_02.wav",
")player/weapon_holster_03.wav",
")player/weapon_holster_04.wav",
")player/weapon_holster_05.wav"
},
} )
sound.Add( {
name = "Weapon_Molotov.Shove",
channel = CHAN_WEAPON,
volume = 0.55,
level = SNDLVL_105dB,
pitch = {95,100},
sound = {
")player/shove_01.wav",
")player/shove_02.wav",
")player/shove_03.wav",
")player/shove_04.wav",
")player/shove_05.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/exp_tnt.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_TNT.Explode",
channel = CHAN_AUTO,
volume = 1.0,
level = SNDLVL_180dB,
sound = ")weapons/firearms/exp_tnt/tnt_explode_01.wav",
} )
sound.Add( {
name = "Weapon_TNT.Explode2",
channel = CHAN_AUTO,
volume = 1.0,
level = SNDLVL_180dB,
sound = ")weapons/firearms/exp_tnt/tnt_explode_02.wav",
} )
sound.Add( {
name = "Weapon_TNT.Ignite",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_NORM,
sound = ")weapons/firearms/exp_tnt/tnt_ignite_01.wav",
} )
sound.Add( {
name = "Weapon_TNT.Pop",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_NORM,
sound = ")weapons/firearms/exp_tnt/tnt_pop_01.wav",
} )
sound.Add( {
name = "Weapon_TNT.Spark_Loop",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_NORM,
sound = ")weapons/firearms/exp_tnt/tnt_spark_loop_01.wav",
} )
sound.Add( {
name = "Weapon_TNT.Spark_Loop2",
channel = CHAN_AUTO,
volume = 1.0,
level = SNDLVL_NORM,
sound = ")weapons/firearms/exp_tnt/tnt_spark_loop_02.wav",
} )
sound.Add( {
name = "Weapon_TNT.Draw",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_draw_01.wav",
")player/weapon_draw_02.wav",
")player/weapon_draw_03.wav",
")player/weapon_draw_04.wav",
")player/weapon_draw_05.wav"
},
} )
sound.Add( {
name = "Weapon_TNT.Holster",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_holster_01.wav",
")player/weapon_holster_02.wav",
")player/weapon_holster_03.wav",
")player/weapon_holster_04.wav",
")player/weapon_holster_05.wav"
},
} )
sound.Add( {
name = "Weapon_TNT.Shove",
channel = CHAN_WEAPON,
volume = 0.55,
level = SNDLVL_105dB,
pitch = {95,100},
sound = {
")player/shove_01.wav",
")player/shove_02.wav",
")player/shove_03.wav",
")player/shove_04.wav",
")player/shove_05.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/fa_1022.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_22Pistol.Single",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_GUNFIRE,
pitch = {95,100},
sound = {
")weapons/firearms/rifle_ruger1022/ruger_fire_01.wav",
")weapons/firearms/rifle_ruger1022/ruger_fire_02.wav"
},
} )
sound.Add( {
name = "Weapon_22Pistol.ClipIn",
channel = CHAN_ITEM,
volume = 0.7,
level = SNDLVL_55dB,
sound = ")weapons/firearms/rifle_ruger1022/Ruger_ClipIn.wav",
} )
sound.Add( {
name = "Weapon_22Pistol.ClipOut",
channel = CHAN_ITEM,
volume = 0.7,
level = SNDLVL_55dB,
sound = ")weapons/firearms/rifle_ruger1022/Ruger_ClipOut.wav",
} )
sound.Add( {
name = "Weapon_22Pistol.Empty",
channel = CHAN_ITEM,
volume = 1,
level = SNDLVL_60dB,
sound = {
")weapons/firearms/rifle_ruger1022/Ruger_DryFire1.wav",
")weapons/firearms/rifle_ruger1022/Ruger_DryFire2.wav"
},
} )
sound.Add( {
name = "Weapon_22Pistol.Slide",
channel = CHAN_ITEM,
volume = 0.7,
level = SNDLVL_45dB,
sound = {
")weapons/firearms/rifle_ruger1022/Ruger_Slide1.wav",
")weapons/firearms/rifle_ruger1022/Ruger_Slide3.wav"
},
} )
sound.Add( {
name = "Weapon_22Pistol.SlideLock",
channel = CHAN_ITEM,
volume = 0.7,
level = SNDLVL_45dB,
sound = {
")weapons/firearms/rifle_ruger1022/Ruger_SlideLock.wav"
},
} )
sound.Add( {
name = "Weapon_22Pistol.DryFire",
channel = CHAN_WEAPON,
volume = 0.7,
level = SNDLVL_45dB,
sound = {
")weapons/firearms/rifle_ruger1022/Ruger_DryFire1.wav",
")weapons/firearms/rifle_ruger1022/Ruger_DryFire1.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/fa_1911.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_1911.Single",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_GUNFIRE,
pitch = {98,102},
sound = {
")weapons/firearms/hndg_colt1911/Colt_1911_Fire1.wav"
},
} )
sound.Add( {
name = "Weapon_1911.Empty",
channel = CHAN_AUTO,
volume = 0.7,
level = SNDLVL_45dB,
pitch = {92,100},
sound = {
")weapons/firearms/hndg_colt1911/Colt_1911_DryFire.wav"
},
} )
sound.Add( {
name = "Weapon_1911.clipin",
channel = CHAN_ITEM,
volume = 0.7,
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_colt1911/Colt_1911_ClipIn.wav",
} )
sound.Add( {
name = "Weapon_1911.ClipOut",
channel = CHAN_ITEM,
volume = 0.7,
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_colt1911/Colt_1911_ClipOut.wav",
} )
sound.Add( {
name = "Weapon_1911.Empty",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_60dB,
sound = {
")weapons/firearms/hndg_colt1911/Colt_1911_Empty.wav",
")weapons/firearms/hndg_colt1911/Colt_1911_Empty2.wav"
},
} )
sound.Add( {
name = "Weapon_1911.SlideBack",
channel = CHAN_ITEM,
volume = 0.7,
level = SNDLVL_45dB,
sound = {
")weapons/firearms/hndg_colt1911/Colt_1911_SlideBack1.wav",
")weapons/firearms/hndg_colt1911/Colt_1911_SlideBack2.wav",
")weapons/firearms/hndg_colt1911/Colt_1911_SlideBack3.wav"
},
} )
sound.Add( {
name = "Weapon_1911.SlideForward",
channel = CHAN_ITEM,
volume = 0.7,
level = SNDLVL_45dB,
sound = {
")weapons/firearms/hndg_colt1911/Colt_1911_SlideForward1.wav",
")weapons/firearms/hndg_colt1911/Colt_1911_SlideForward2.wav",
")weapons/firearms/hndg_colt1911/Colt_1911_SlideForward3.wav"
},
} )
sound.Add( {
name = "Weapon_1911.SlideLock",
channel = CHAN_ITEM,
volume = 0.7,
level = SNDLVL_45dB,
sound = {
")weapons/firearms/hndg_colt1911/Colt_1911_SlideLock.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/fa_500a.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_500Pump.Single",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_GUNFIRE,
pitch = {95,105},
sound = {
")weapons/firearms/shtg_mossberg500/m500_fire_01.wav"
},
} )
sound.Add( {
name = "Weapon_500Pump.DryFire",
channel = CHAN_AUTO,
volume = 0.6,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/shtg_mossberg500/M500_DryFire1.wav",
")weapons/firearms/shtg_mossberg500/M500_DryFire2.wav"
},
} )
sound.Add( {
name = "Weapon_500Pump.PumpBack",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/shtg_mossberg500/M500_PumpBack1.wav",
")weapons/firearms/shtg_mossberg500/M500_PumpBack2.wav",
")weapons/firearms/shtg_mossberg500/M500_PumpBack3.wav"
},
} )
sound.Add( {
name = "Weapon_500Pump.PumpForward",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/shtg_mossberg500/M500_PumpForward1.wav",
")weapons/firearms/shtg_mossberg500/M500_PumpForward2.wav",
")weapons/firearms/shtg_mossberg500/M500_PumpForward3.wav"
},
} )
sound.Add( {
name = "Weapon_500Pump.LoadShell",
channel = CHAN_ITEM,
volume = 0.4,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/shtg_mossberg500/M500_LoadShell1.wav",
")weapons/firearms/shtg_mossberg500/M500_LoadShell2.wav",
")weapons/firearms/shtg_mossberg500/M500_LoadShell3.wav",
")weapons/firearms/shtg_mossberg500/M500_LoadShell4.wav"
},
} )
sound.Add( {
name = "Weapon_500Pump.LoadShell_Special",
channel = CHAN_ITEM,
volume = 0.5,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/shtg_mossberg500/M500_LoadShell3.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/fa_870.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_ShotgunPump.Single",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_GUNFIRE,
pitch = {95,100},
sound = {
")weapons/firearms/shtg_remington870/remington_fire_01.wav"
},
} )
sound.Add( {
name = "Weapon_ShotgunPump.DryFire",
channel = CHAN_AUTO,
volume = 0.6,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/shtg_remington870/Shotgun_Pump_DryFire1.wav",
")weapons/firearms/shtg_remington870/Shotgun_Pump_DryFire2.wav"
},
} )
sound.Add( {
name = "Weapon_ShotgunPump.PumpBack",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/shtg_remington870/Shotgun_Pump_Back1.wav",
")weapons/firearms/shtg_remington870/Shotgun_Pump_Back2.wav",
")weapons/firearms/shtg_remington870/Shotgun_Pump_Back3.wav",
")weapons/firearms/shtg_remington870/Shotgun_Pump_Back4.wav"
},
} )
sound.Add( {
name = "Weapon_ShotgunPump.PumpForward",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/shtg_remington870/Shotgun_Pump_Forward1.wav",
")weapons/firearms/shtg_remington870/Shotgun_Pump_Forward2.wav",
")weapons/firearms/shtg_remington870/Shotgun_Pump_Forward3.wav",
")weapons/firearms/shtg_remington870/Shotgun_Pump_Forward4.wav"
},
} )
sound.Add( {
name = "Weapon_ShotgunPump.LoadShell",
channel = CHAN_ITEM,
volume = 0.4,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/shtg_remington870/Shotgun_Pump_LoadShell1.wav",
")weapons/firearms/shtg_remington870/Shotgun_Pump_LoadShell2.wav",
")weapons/firearms/shtg_remington870/Shotgun_Pump_LoadShell3.wav",
")weapons/firearms/shtg_remington870/Shotgun_Pump_LoadShell4.wav",
")weapons/firearms/shtg_remington870/Shotgun_Pump_LoadShell5.wav"
},
} )
sound.Add( {
name = "Weapon_ShotgunPump.LoadShell_Special",
channel = CHAN_ITEM,
volume = 0.5,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/shtg_remington870/Shotgun_Pump_LoadShell3.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/fa_cz858.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_cz858.Single",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_GUNFIRE,
pitch = {95,100},
sound = {
")weapons/firearms/rifle_cz858/cz858_fire_01.wav"
},
} )
sound.Add( {
name = "Weapon_cz858.ClipIn",
channel = CHAN_ITEM,
volume = 0.9,
level = SNDLVL_55dB,
sound = ")weapons/firearms/rifle_cz858/cz858_ClipIn.wav",
} )
sound.Add( {
name = "Weapon_cz858.ClipOut",
channel = CHAN_ITEM,
volume = 0.9,
level = SNDLVL_55dB,
sound = ")weapons/firearms/rifle_cz858/cz858_ClipOut.wav",
} )
sound.Add( {
name = "Weapon_cz858.Empty",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_60dB,
sound = {
")weapons/firearms/rifle_cz858/Empty.wav",
")weapons/firearms/rifle_cz858/Empty2.wav"
},
} )
sound.Add( {
name = "Weapon_cz858.Slide",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_55dB,
sound = ")weapons/firearms/rifle_cz858/cz858_Slide1.wav",
} )
sound.Add( {
name = "Weapon_cz858.SlideBack",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_55dB,
sound = ")weapons/firearms/rifle_cz858/cz858_SlideBack.wav",
} )
sound.Add( {
name = "Weapon_cz858.SlideForward",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_55dB,
sound = ")weapons/firearms/rifle_cz858/cz858_SlideForward.wav",
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/fa_fnfal.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_FAL.Single",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_GUNFIRE,
pitch = {95,100},
sound = {
")weapons/firearms/rifle_fnfal/fnfal_fire_01.wav"
},
} )
sound.Add( {
name = "Weapon_FAL.MagIn",
channel = CHAN_ITEM,
volume = 0.9,
level = SNDLVL_55dB,
sound = ")weapons/firearms/rifle_fnfal/fnfal_magin_01.wav",
} )
sound.Add( {
name = "Weapon_FAL.MagOut",
channel = CHAN_ITEM,
volume = 0.9,
level = SNDLVL_55dB,
sound = ")weapons/firearms/rifle_fnfal/fnfal_magout_01.wav",
} )
sound.Add( {
name = "Weapon_FAL.Boltback",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_55dB,
sound = ")weapons/firearms/rifle_fnfal/fnfal_boltback_01.wav",
} )
sound.Add( {
name = "Weapon_FAL.Boltforward",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_55dB,
sound = ")weapons/firearms/rifle_fnfal/fnfal_boltforward_01.wav",
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/fa_glock17.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Glock17.Fire1",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_GUNFIRE,
pitch = {95,100},
sound = {
")weapons/firearms/hndg_glock17/glock_fire_01.wav"
},
} )
sound.Add( {
name = "Weapon_Glock17.MagazineIn",
channel = CHAN_ITEM,
volume = 0.5,
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_glock17/glock17_MagazineIn.wav",
} )
sound.Add( {
name = "Weapon_glock17.MagazineOut",
channel = CHAN_ITEM,
volume = 0.5,
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_glock17/glock17_MagazineOut.wav",
} )
sound.Add( {
name = "Weapon_glock17.DryFire",
channel = CHAN_AUTO,
volume = 0.5,
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_glock17/glock17_DryFire.wav",
} )
sound.Add( {
name = "Weapon_glock17.GenericFoley",
channel = CHAN_ITEM,
volume = 0.3,
level = SNDLVL_30dB,
sound = {
")weapons/firearms/hndg_glock17/glock17_genericfoley1.wav",
")weapons/firearms/hndg_glock17/glock17_genericfoley2.wav",
")weapons/firearms/hndg_glock17/glock17_genericfoley3.wav"
},
} )
sound.Add( {
name = "Weapon_glock17.SlidePull",
channel = CHAN_ITEM,
volume = 0.2,0.4,
pitch = {95,105},
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_glock17/glock17_SlidePull.wav",
} )
sound.Add( {
name = "Weapon_glock17.SlideLock",
channel = CHAN_ITEM,
volume = 0.4,
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_glock17/glock17_SlideLock.wav",
} )
sound.Add( {
name = "Weapon_glock17.SlideRelease",
channel = CHAN_ITEM,
volume = 0.4,
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_glock17/glock17_SlideRelease.wav",
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/fa_jae700.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_JAE700.Single",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_140dB,
sound = {
")weapons/firearms/rifle_jae700/jae_fire_01.wav"
},
} )
sound.Add( {
name = "Weapon_JAE700.BoltSlide",
channel = CHAN_ITEM,
volume = 0.7,
level = SNDLVL_70dB,
sound = {
")weapons/firearms/rifle_jae700/jae_boltpull_01.wav"
},
} )
sound.Add( {
name = "Weapon_JAE700.BoltSlideSlow",
channel = CHAN_ITEM,
volume = 0.7,
level = SNDLVL_70dB,
sound = {
")weapons/firearms/rifle_jae700/jae_boltpull_slow_01.wav"
},
} )
sound.Add( {
name = "Weapon_JAE700.Magout",
channel = CHAN_WEAPON,
volume = 0.7,
level = SNDLVL_70dB,
sound = {
")weapons/firearms/rifle_jae700/jae_magout_01.wav"
},
} )
sound.Add( {
name = "Weapon_JAE700.Magin",
channel = CHAN_WEAPON,
volume = 0.7,
level = SNDLVL_70dB,
sound = {
")weapons/firearms/rifle_jae700/jae_magin_01.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/fa_m16a4.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_AR15.Single",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_GUNFIRE,
pitch = {95,100},
sound = {
")weapons/firearms/mil_m16a4/m16_fire_01.wav"
},
} )
sound.Add( {
name = "Weapon_AR15.ClipOut",
channel = CHAN_ITEM,
volume = 0.5,
pitch = PITCH_NORM,
sound = ")weapons/firearms/mil_m16a4/M16_ClipOut.wav",
} )
sound.Add( {
name = "Weapon_AR15.ClipIn",
channel = CHAN_ITEM,
volume = 0.5,
pitch = PITCH_NORM,
sound = ")weapons/firearms/mil_m16a4/M16_ClipIn.wav",
} )
sound.Add( {
name = "Weapon_AR15.SlideRelease",
channel = CHAN_ITEM,
volume = 0.5,
pitch = PITCH_NORM,
sound = ")weapons/firearms/mil_m16a4/M16_SlideRelease.wav",
} )
sound.Add( {
name = "Weapon_AR15.Empty",
channel = CHAN_ITEM,
volume = 0.5,
pitch = PITCH_NORM,
sound = ")weapons/firearms/mil_m16a4/M16_DryFire.wav",
} )
sound.Add( {
name = "Weapon_AR15.Slide",
channel = CHAN_ITEM,
volume = 0.5,
pitch = PITCH_NORM,
sound = ")weapons/firearms/mil_m16a4/M16_Slide.wav",
} )
sound.Add( {
name = "Weapon_AR15.Slide2",
channel = CHAN_ITEM,
volume = 0.5,
pitch = PITCH_NORM,
sound = ")weapons/firearms/mil_m16a4/M16_Slide2.wav",
} )
sound.Add( {
name = "Weapon_AR15.DryFire",
channel = CHAN_ITEM,
volume = 0.5,
pitch = PITCH_NORM,
sound = ")weapons/firearms/mil_m16a4/M16_DryFire.wav",
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/fa_m92fs.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Beretta.Single",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_GUNFIRE,
pitch = {95,100},
sound = {
")weapons/firearms/hndg_beretta92fs/Beretta92_Fire1.wav"
},
} )
sound.Add( {
name = "Weapon_Beretta.ClipIn",
channel = CHAN_ITEM,
volume = 0.5,
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_beretta92fs/Beretta92_ClipIn.wav",
} )
sound.Add( {
name = "Weapon_Beretta.ClipOut",
channel = CHAN_ITEM,
volume = 0.5,
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_beretta92fs/Beretta92_ClipOut.wav",
} )
sound.Add( {
name = "Weapon_Beretta.DryFire",
channel = CHAN_AUTO,
volume = 0.5,
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_beretta92fs/Beretta92_DryFire.wav",
} )
sound.Add( {
name = "Weapon_Beretta.GenericFoley",
channel = CHAN_ITEM,
volume = 0.3,
level = SNDLVL_30dB,
sound = {
")player/clothes_generic_foley_01.wav",
")player/clothes_generic_foley_02.wav",
")player/clothes_generic_foley_03.wav",
")player/clothes_generic_foley_04.wav",
")player/clothes_generic_foley_05.wav"
},
} )
sound.Add( {
name = "Weapon_Beretta.Slide",
channel = CHAN_ITEM,
volume = 0.2,0.4,
pitch = {95,105},
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_beretta92fs/Beretta92_Slide.wav",
} )
sound.Add( {
name = "Weapon_Beretta.SlideLock",
channel = CHAN_ITEM,
volume = 0.4,
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_beretta92fs/Beretta92_SlideLock.wav",
} )
sound.Add( {
name = "Weapon_Beretta.SlideRelease",
channel = CHAN_ITEM,
volume = 0.4,
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_beretta92fs/Beretta92_SlideRelease.wav",
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/fa_mac10.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_MAC10.Single",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_GUNFIRE,
pitch = {95,105},
sound = {
")weapons/firearms/smg_mac10/mac10_fire_01.wav"
},
} )
sound.Add( {
name = "Weapon_MAC10.dry",
channel = CHAN_WEAPON,
volume = 0.4,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/smg_mac10/Mac10_dry01.wav"
},
} )
sound.Add( {
name = "Weapon_MAC10.ClipOut",
channel = CHAN_WEAPON,
volume = 0.55,
level = SNDLVL_55dB,
sound = ")weapons/firearms/smg_mac10/Mac10_Mag_Out.wav",
} )
sound.Add( {
name = "Weapon_MAC10.ClipIn",
channel = CHAN_WEAPON,
volume = 0.55,
level = SNDLVL_55dB,
sound = ")weapons/firearms/smg_mac10/Mac10_Mag_In_1.wav",
} )
sound.Add( {
name = "Weapon_MAC10.Cliphit",
channel = CHAN_WEAPON,
volume = 0.55,
level = SNDLVL_55dB,
sound = ")weapons/firearms/smg_mac10/Mac10_Mag_In_2.wav",
} )
sound.Add( {
name = "Weapon_MAC10.Boltpull",
channel = CHAN_WEAPON,
volume = 0.6,
level = SNDLVL_55dB,
sound = ")weapons/firearms/smg_mac10/Mac10_Mag_In_3.wav",
} )
sound.Add( {
name = "Weapon_MAC10.Stockpull",
channel = CHAN_WEAPON,
volume = 0.6,
level = SNDLVL_55dB,
sound = ")weapons/firearms/smg_mac10/Mac10_Pull.wav",
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/fa_mkiii.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Mkiii.Fire",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_GUNFIRE,
pitch = {95,105},
sound = ")weapons/firearms/hndg_mkiii/mkiii_fire_01.wav",
} )
sound.Add( {
name = "Weapon_Mkiii.ClipIn",
channel = CHAN_ITEM,
volume = 0.5,
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_beretta92fs/Beretta92_ClipIn.wav",
} )
sound.Add( {
name = "Weapon_Mkiii.ClipOut",
channel = CHAN_ITEM,
volume = 0.5,
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_beretta92fs/Beretta92_ClipOut.wav",
} )
sound.Add( {
name = "Weapon_Mkiii.DryFire",
channel = CHAN_AUTO,
volume = 0.5,
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_mkiii/mkiii_dryfire_01.wav",
} )
sound.Add( {
name = "Weapon_Mkiii.GenericFoley",
channel = CHAN_ITEM,
volume = 0.3,
level = SNDLVL_30dB,
sound = {
")player/clothes_generic_foley_01.wav",
")player/clothes_generic_foley_02.wav",
")player/clothes_generic_foley_03.wav",
")player/clothes_generic_foley_04.wav",
")player/clothes_generic_foley_05.wav"
},
} )
sound.Add( {
name = "Weapon_Mkiii.Slide",
channel = CHAN_ITEM,
volume = 0.2,0.4,
pitch = {95,105},
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_beretta92fs/Beretta92_Slide.wav",
} )
sound.Add( {
name = "Weapon_Mkiii.SlideLock",
channel = CHAN_ITEM,
volume = 0.4,
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_beretta92fs/Beretta92_SlideLock.wav",
} )
sound.Add( {
name = "Weapon_Mkiii.SlideRelease",
channel = CHAN_ITEM,
volume = 0.4,
level = SNDLVL_55dB,
sound = ")weapons/firearms/hndg_beretta92fs/Beretta92_SlideRelease.wav",
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/fa_mp5a4.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_MP5.Single",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_GUNFIRE,
pitch = {95,105},
sound = {
")weapons/firearms/mil_mp5a4/mp5_fire_01.wav"
},
} )
sound.Add( {
name = "Weapon_MP5.Burst",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_140dB,
pitch = {95, 100},
sound = ")weapons/firearms/mil_mp5a4/MP5_FireBurst.wav",
} )
sound.Add( {
name = "Weapon_MP5.dry",
channel = CHAN_WEAPON,
volume = 0.4,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/mil_mp5a4/MP5_DryFire.wav"
},
} )
sound.Add( {
name = "Weapon_MP5.ClipOut",
channel = CHAN_WEAPON,
volume = 0.55,
level = SNDLVL_55dB,
sound = ")weapons/firearms/mil_mp5a4/MP5_ClipOut.wav",
} )
sound.Add( {
name = "Weapon_MP5.ClipIn",
channel = CHAN_WEAPON,
volume = 0.55,
level = SNDLVL_55dB,
sound = ")weapons/firearms/mil_mp5a4/MP5_ClipIn.wav",
} )
sound.Add( {
name = "Weapon_MP5.SlideLock",
channel = CHAN_WEAPON,
volume = 0.6,
level = SNDLVL_55dB,
sound = ")weapons/firearms/mil_mp5a4/MP5_SlideLock.wav",
} )
sound.Add( {
name = "Weapon_MP5.SlideForward",
channel = CHAN_WEAPON,
volume = 0.6,
level = SNDLVL_55dB,
sound = ")weapons/firearms/mil_mp5a4/MP5_SlideForward.wav",
} )
sound.Add( {
name = "Weapon_MP5.Slide",
channel = CHAN_WEAPON,
volume = 0.6,
level = SNDLVL_55dB,
sound = ")weapons/firearms/mil_mp5a4/MP5_Slide.wav",
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/fa_sako85.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Sako.Single",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_140dB,
sound = {
")weapons/firearms/rifle_sako85/sako_fire_01.wav"
},
} )
sound.Add( {
name = "Weapon_Sako.BoltOpen",
channel = CHAN_ITEM,
volume = 0.7,
level = SNDLVL_70dB,
sound = {
")weapons/firearms/rifle_sako85/Sako_BoltOpen.wav"
},
} )
sound.Add( {
name = "Weapon_Sako.BoltClosed",
channel = CHAN_ITEM,
volume = 0.7,
level = SNDLVL_70dB,
sound = {
")weapons/firearms/rifle_sako85/Sako_BoltClosed.wav"
},
} )
sound.Add( {
name = "Weapon_Sako.Magout",
channel = CHAN_WEAPON,
volume = 0.7,
level = SNDLVL_70dB,
sound = {
")weapons/firearms/rifle_sako85/Sako_magOut.wav"
},
} )
sound.Add( {
name = "Weapon_Sako.Magin",
channel = CHAN_WEAPON,
volume = 0.7,
level = SNDLVL_70dB,
sound = {
")weapons/firearms/rifle_sako85/Sako_magIn.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/fa_sks.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_SKS.Single",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_GUNFIRE,
pitch = {95,105},
sound = {
")weapons/firearms/rifle_sks/sks_fire_01.wav"
},
} )
sound.Add( {
name = "Weapon_SKS.ClipIn1",
channel = CHAN_ITEM,
volume = 0.9,
level = SNDLVL_55dB,
sound = ")weapons/firearms/rifle_sks/SKS_ClipIn1.wav",
} )
sound.Add( {
name = "Weapon_SKS.ClipIn2",
channel = CHAN_ITEM,
volume = 0.9,
level = SNDLVL_55dB,
sound = ")weapons/firearms/rifle_sks/SKS_ClipIn2.wav",
} )
sound.Add( {
name = "Weapon_SKS.ClipOut",
channel = CHAN_WEAPON,
volume = 0.9,
level = SNDLVL_55dB,
sound = ")weapons/firearms/rifle_sks/SKS_ClipOut.wav",
} )
sound.Add( {
name = "Weapon_SKS.Empty",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_60dB,
sound = {
")weapons/firearms/rifle_sks/Empty.wav",
")weapons/firearms/rifle_sks/Empty2.wav"
},
} )
sound.Add( {
name = "Weapon_SKS.Slide",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_55dB,
sound = ")weapons/firearms/rifle_sks/SKS_Slide1.wav",
} )
sound.Add( {
name = "Weapon_SKS.SlideBack",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_55dB,
sound = ")weapons/firearms/rifle_sks/SKS_SlideBack.wav",
} )
sound.Add( {
name = "Weapon_SKS.SlideForward",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_55dB,
sound = ")weapons/firearms/rifle_sks/SKS_SlideForward.wav",
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/fa_superx3.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_ShotgunAuto.Single",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_GUNFIRE,
pitch = {95,105},
sound = {
")weapons/firearms/shtg_winchestersx3/winchestersx3_fire_01.wav"
},
} )
sound.Add( {
name = "Weapon_ShotgunAuto.SlideBack",
channel = CHAN_WEAPON,
volume = 0.6,
level = SNDLVL_45dB,
sound = ")weapons/firearms/shtg_winchestersx3/Shotgun_SemiAuto_Slide1.wav",
} )
sound.Add( {
name = "Weapon_ShotgunAuto.SlideForward",
channel = CHAN_WEAPON,
volume = 0.6,
level = SNDLVL_45dB,
sound = ")weapons/firearms/shtg_winchestersx3/Shotgun_SemiAuto_Slide2.wav",
} )
sound.Add( {
name = "Weapon_ShotgunAuto.LoadShell",
channel = CHAN_ITEM,
volume = 0.4,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/shtg_winchestersx3/Shotgun_SemiAuto_Reload1.wav",
")weapons/firearms/shtg_winchestersx3/Shotgun_SemiAuto_Reload2.wav",
")weapons/firearms/shtg_winchestersx3/Shotgun_SemiAuto_Reload3.wav",
")weapons/firearms/shtg_winchestersx3/Shotgun_SemiAuto_Reload4.wav",
")weapons/firearms/shtg_winchestersx3/Shotgun_SemiAuto_Reload5.wav"
},
} )
sound.Add( {
name = "Weapon_ShotgunAuto.DryFire",
channel = CHAN_AUTO,
volume = 0.6,
level = SNDLVL_55dB,
sound = ")weapons/firearms/shtg_winchestersx3/Shotgun_SemiAuto_DryFire.wav",
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/fa_sv10.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "weapon_db.shellout",
channel = CHAN_WEAPON,
volume = 0.85,
level = SNDLVL_120dB,
sound = {
")weapons/firearms/ShellCasing_1Shotty1.wav",
")weapons/firearms/ShellCasing_1Shotty2.wav",
")weapons/firearms/ShellCasing_1Shotty3.wav",
")weapons/firearms/ShellCasing_1Shotty4.wav"
},
} )
sound.Add( {
name = "weapon_db.Single",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_GUNFIRE,
pitch = {95,105},
sound = {
")weapons/firearms/shtg_berettasv10/beretta_fire_01.wav"
},
} )
sound.Add( {
name = "weapon_db.Close",
channel = CHAN_ITEM,
volume = 0.5,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/shtg_berettasv10/shotgun_doublebarrel_Close.wav",
")weapons/firearms/shtg_berettasv10/shotgun_doublebarrel_Close2.wav"
},
} )
sound.Add( {
name = "Weapon_SV10.Open",
channel = CHAN_ITEM,
volume = 0.5,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/shtg_berettasv10/shotgun_doublebarrel_Open.wav",
")weapons/firearms/shtg_berettasv10/shotgun_doublebarrel_Open2.wav"
},
} )
sound.Add( {
name = "weapon_db.DryFire",
channel = CHAN_AUTO,
volume = 0.5,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/shtg_berettasv10/shotgun_doublebarrel_DryFire1.wav",
")weapons/firearms/shtg_berettasv10/shotgun_doublebarrel_DryFire2.wav"
},
} )
sound.Add( {
name = "weapon_db.GenericFoley",
channel = CHAN_ITEM,
volume = 0.3,
level = SNDLVL_55dB,
sound = {
")player/clothes_generic_foley_01.wav",
")player/clothes_generic_foley_02.wav",
")player/clothes_generic_foley_03.wav",
")player/clothes_generic_foley_04.wav",
")player/clothes_generic_foley_05.wav"
},
} )
sound.Add( {
name = "weapon_db.LoadShell",
channel = CHAN_ITEM,
volume = 0.2,0.4,
pitch = {95,105},
level = SNDLVL_55dB,
sound = {
")weapons/firearms/shtg_berettasv10/shotgun_doublebarrel_LoadShell1.wav",
")weapons/firearms/shtg_berettasv10/shotgun_doublebarrel_LoadShell2.wav",
")weapons/firearms/shtg_berettasv10/Shotgun_DoubleBarrel_LoadShell3.wav",
")weapons/firearms/shtg_berettasv10/shotgun_doublebarrel_LoadShell4.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/fa_sw686.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_686.Single",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_GUNFIRE,
pitch = {95,100},
sound = {
")weapons/firearms/hndg_sw686/revolver_fire_01.wav"
},
} )
sound.Add( {
name = "Weapon_686.Dry",
channel = CHAN_AUTO,
volume = 1.0,
level = SNDLVL_70dB,
sound = {
")weapons/firearms/hndg_sw686/Revolver_DryFire1.wav",
")weapons/firearms/hndg_sw686/Revolver_DryFire2.wav"
},
} )
sound.Add( {
name = "Weapon_686.ChamberClick",
channel = CHAN_WEAPON,
volume = 0.5,
level = SNDLVL_45dB,
sound = {
")weapons/firearms/hndg_sw686/Revolver_Load_1.wav",
")weapons/firearms/hndg_sw686/Revolver_Load_2.wav",
")weapons/firearms/hndg_sw686/Revolver_Load_3.wav",
")weapons/firearms/hndg_sw686/Revolver_Load_4.wav",
")weapons/firearms/hndg_sw686/Revolver_Load_5.wav",
")weapons/firearms/hndg_sw686/Revolver_Load_6.wav"
},
} )
sound.Add( {
name = "Weapon_686.CycleSpin",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_45dB,
sound = ")weapons/firearms/hndg_sw686/Revolver_SpinCyl.wav",
} )
sound.Add( {
name = "Weapon_686.HammerBack",
channel = CHAN_WEAPON,
volume = 0.5,
level = SNDLVL_45dB,
sound = {
")weapons/firearms/hndg_sw686/Revolver_HammerBack1.wav",
")weapons/firearms/hndg_sw686/Revolver_HammerBack2.wav"
},
} )
sound.Add( {
name = "Weapon_686.Load_3",
channel = CHAN_WEAPON,
volume = 0.5,
level = SNDLVL_45dB,
pitch = {95,100},
sound = {
")weapons/firearms/hndg_sw686/Revolver_Load_3.wav"
},
} )
sound.Add( {
name = "Weapon_686.Load_2",
channel = CHAN_WEAPON,
volume = 0.5,
level = SNDLVL_45dB,
pitch = {95,100},
sound = {
")weapons/firearms/hndg_sw686/Revolver_Load_2.wav"
},
} )
sound.Add( {
name = "Weapon_686.Load_5",
channel = CHAN_WEAPON,
volume = 0.5,
level = SNDLVL_45dB,
pitch = {95,100},
sound = {
")weapons/firearms/hndg_sw686/Revolver_Load_5.wav"
},
} )
sound.Add( {
name = "Weapon_686.Load_6",
channel = CHAN_WEAPON,
volume = 0.5,
level = SNDLVL_45dB,
pitch = {95,100},
sound = {
")weapons/firearms/hndg_sw686/Revolver_Load_6.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/fa_winchester1892.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Win1892.Single",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_GUNFIRE,
pitch = {95,100},
sound = {
")weapons/firearms/rifle_win1892/win1892_fire_01.wav"
},
} )
sound.Add( {
name = "Weapon_Win1892.DryFire",
channel = CHAN_AUTO,
volume = 0.6,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/rifle_win1892/Win1892_DryFire1.wav",
")weapons/firearms/rifle_win1892/Win1892_DryFire2.wav"
},
} )
sound.Add( {
name = "Weapon_Win1892.LeverDown",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_55dB,
sound = ")weapons/firearms/rifle_win1892/Win1892_Leverdown2.wav",
} )
sound.Add( {
name = "Weapon_Win1892.LeverUp",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_55dB,
sound = ")weapons/firearms/rifle_win1892/Win1892_Leverup2.wav",
} )
sound.Add( {
name = "Weapon_Win1892.LoadShell",
channel = CHAN_ITEM,
volume = 0.4,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/rifle_win1892/Win1892_LoadShell1.wav",
")weapons/firearms/rifle_win1892/Win1892_LoadShell2.wav",
")weapons/firearms/rifle_win1892/Win1892_LoadShell3.wav",
")weapons/firearms/rifle_win1892/Win1892_LoadShell4.wav"
},
} )
sound.Add( {
name = "Weapon_Win1892.LoadShell_Special",
channel = CHAN_ITEM,
volume = 0.5,
level = SNDLVL_55dB,
sound = {
")weapons/firearms/rifle_win1892/Win1892_LoadShell1.wav",
")weapons/firearms/rifle_win1892/Win1892_LoadShell2.wav",
")weapons/firearms/rifle_win1892/Win1892_LoadShell3.wav",
")weapons/firearms/rifle_win1892/Win1892_LoadShell4.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/me_abrasivesaw.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_AbrasiveSaw.IdleLoop",
channel = CHAN_AUTO,
volume = 1.0,
level = SNDLVL_105,
sound = ")weapons/melee/circular_saw/circular_saw_idle_01.wav",
} )
sound.Add( {
name = "Weapon_AbrasiveSaw.SawLoop",
channel = CHAN_AUTO,
volume = 1.0,
level = SNDLVL_135dB,
sound = ")weapons/melee/circular_saw/circular_saw_fast_01.wav",
} )
sound.Add( {
name = "Weapon_AbrasiveSaw.IdleToSaw",
channel = CHAN_AUTO,
volume = 0.4,
level = SNDLVL_95dB,
sound = ")weapons/melee/circular_saw/circular_saw_idle_to_fast_01.wav",
} )
sound.Add( {
name = "Weapon_AbrasiveSaw.SawToIdle",
channel = CHAN_AUTO,
volume = 0.4,
level = SNDLVL_95dB,
sound = ")weapons/melee/circular_saw/circular_saw_fast_to_idle_01.wav",
} )
sound.Add( {
name = "Weapon_AbrasiveSaw.Off",
channel = CHAN_AUTO,
volume = 1.0,
level = SNDLVL_NORM,
sound = ")weapons/melee/circular_saw/circular_saw_shut_off_01.wav",
} )
sound.Add( {
name = "Weapon_AbrasiveSaw.StartupFailed",
channel = CHAN_WEAPON,
volume = 0.7,
level = SNDLVL_NORM,
sound = ")weapons/melee/circular_saw/circular_saw_start_fail_01.wav",
} )
sound.Add( {
name = "Weapon_AbrasiveSaw.StartupSuccess",
channel = CHAN_NORM,
volume = 0.7,
level = SNDLVL_NORM,
sound = ")weapons/melee/circular_saw/circular_saw_start_success_01.wav",
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/me_axe_fire.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Fireaxe.Draw",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_draw_01.wav",
")player/weapon_draw_02.wav",
")player/weapon_draw_03.wav",
")player/weapon_draw_04.wav",
")player/weapon_draw_05.wav"
},
} )
sound.Add( {
name = "Weapon_Fireaxe.Holster",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_holster_01.wav",
")player/weapon_holster_02.wav",
")player/weapon_holster_03.wav",
")player/weapon_holster_04.wav",
")player/weapon_holster_05.wav"
},
} )
sound.Add( {
name = "Weapon_Fireaxe.Shove",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/shove_01.wav",
")player/shove_02.wav",
")player/shove_03.wav",
")player/shove_04.wav",
")player/shove_05.wav"
},
} )
sound.Add( {
name = "Weapon_Melee.FireaxeLight",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")weapons/melee/swing_heavy_sharp_01.wav",
")weapons/melee/swing_heavy_sharp_02.wav",
")weapons/melee/swing_heavy_sharp_03.wav"
},
} )
sound.Add( {
name = "Weapon_Melee.FireaxeHeavy",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")weapons/melee/swing_heavy_sharp_01.wav",
")weapons/melee/swing_heavy_sharp_02.wav",
")weapons/melee/swing_heavy_sharp_03.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/me_bat_metal.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Bat.Draw",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_draw_01.wav",
")player/weapon_draw_02.wav",
")player/weapon_draw_03.wav",
")player/weapon_draw_04.wav",
")player/weapon_draw_05.wav"
},
} )
sound.Add( {
name = "Weapon_Bat.Holster",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_holster_01.wav",
")player/weapon_holster_02.wav",
")player/weapon_holster_03.wav",
")player/weapon_holster_04.wav",
")player/weapon_holster_05.wav"
},
} )
sound.Add( {
name = "Weapon_Bat.Shove",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/shove_01.wav",
")player/shove_02.wav",
")player/shove_03.wav",
")player/shove_04.wav",
")player/shove_05.wav"
},
} )
sound.Add( {
name = "Weapon_Melee.BatLight",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")weapons/melee/swing_light_blunt_01.wav",
")weapons/melee/swing_light_blunt_02.wav",
")weapons/melee/swing_light_blunt_03.wav"
},
} )
sound.Add( {
name = "Weapon_Melee.BatHeavy",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")weapons/melee/swing_light_blunt_01.wav",
")weapons/melee/swing_light_blunt_02.wav",
")weapons/melee/swing_light_blunt_03.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/me_chainsaw.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Chainsaw.IdleLoop",
channel = CHAN_AUTO,
volume = 1.0,
level = SNDLVL_105,
sound = ")weapons/melee/chainsaw/Chainsaw_idleloop.wav",
} )
sound.Add( {
name = "Weapon_Chainsaw.SawLoop",
channel = CHAN_AUTO,
volume = 1.0,
level = SNDLVL_135dB,
sound = ")weapons/melee/chainsaw/Chainsaw_sawloop.wav",
} )
sound.Add( {
name = "Weapon_Chainsaw.IdleLoop2",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_105,
sound = ")weapons/melee/chainsaw/Chainsaw_idleloop2.wav",
} )
sound.Add( {
name = "Weapon_Chainsaw.SawLoop2",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_135dB,
sound = ")weapons/melee/chainsaw/Chainsaw_sawloop2.wav",
} )
sound.Add( {
name = "Weapon_Chainsaw.IdleToSaw",
channel = CHAN_AUTO,
volume = 0.4,
level = SNDLVL_95dB,
sound = ")weapons/melee/chainsaw/Chainsaw_idletosaw.wav",
} )
sound.Add( {
name = "Weapon_Chainsaw.SawToIdle",
channel = CHAN_AUTO,
volume = 0.4,
level = SNDLVL_95dB,
sound = ")weapons/melee/chainsaw/Chainsaw_sawtoidle.wav",
} )
sound.Add( {
name = "Weapon_Chainsaw.Off",
channel = CHAN_AUTO,
volume = 1.0,
level = SNDLVL_NORM,
sound = ")weapons/melee/chainsaw/Chainsaw_turnoff.wav",
} )
sound.Add( {
name = "Weapon_Chainsaw.StartupFailed",
channel = CHAN_WEAPON,
volume = 0.7,
level = SNDLVL_NORM,
sound = ")weapons/melee/chainsaw/Chainsaw_failedstart.wav",
} )
sound.Add( {
name = "Weapon_Chainsaw.StartupSuccess",
channel = CHAN_WEAPON,
volume = 0.7,
level = SNDLVL_NORM,
sound = ")weapons/melee/chainsaw/Chainsaw_successstart.wav",
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/me_crowbar.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Crowbar.Draw",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_draw_01.wav",
")player/weapon_draw_02.wav",
")player/weapon_draw_03.wav",
")player/weapon_draw_04.wav",
")player/weapon_draw_05.wav"
},
} )
sound.Add( {
name = "Weapon_Crowbar.Holster",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_holster_01.wav",
")player/weapon_holster_02.wav",
")player/weapon_holster_03.wav",
")player/weapon_holster_04.wav",
")player/weapon_holster_05.wav"
},
} )
sound.Add( {
name = "Weapon_Crowbar.Shove",
channel = CHAN_WEAPON,
volume = 0.55,
level = SNDLVL_105dB,
pitch = {95,100},
sound = {
")player/shove_01.wav",
")player/shove_02.wav",
")player/shove_03.wav",
")player/shove_04.wav",
")player/shove_05.wav"
},
} )
sound.Add( {
name = "Weapon_Melee.CrowbarLight",
channel = CHAN_WEAPON,
volume = 0.55,
level = SNDLVL_105dB,
pitch = {95,100},
sound = {
")weapons/melee/swing_heavy_sharp_01.wav",
")weapons/melee/swing_heavy_sharp_02.wav",
")weapons/melee/swing_heavy_sharp_03.wav"
},
} )
sound.Add( {
name = "Weapon_Melee.CrowbarHeavy",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_105dB,
pitch = {98,102},
sound = {
")weapons/melee/swing_heavy_sharp_01.wav",
")weapons/melee/swing_heavy_sharp_02.wav",
")weapons/melee/swing_heavy_sharp_03.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/me_etool.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Etool.Draw",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")player/weapon_draw_01.wav",
")player/weapon_draw_02.wav",
")player/weapon_draw_03.wav",
")player/weapon_draw_04.wav",
")player/weapon_draw_05.wav"
},
} )
sound.Add( {
name = "Weapon_Etool.Holster",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")player/weapon_holster_01.wav",
")player/weapon_holster_02.wav",
")player/weapon_holster_03.wav",
")player/weapon_holster_04.wav",
")player/weapon_holster_05.wav"
},
} )
sound.Add( {
name = "Weapon_Etool.Shove",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")player/shove_01.wav",
")player/shove_02.wav",
")player/shove_03.wav",
")player/shove_04.wav",
")player/shove_05.wav"
},
} )
sound.Add( {
name = "Weapon_Etool.SwingLight",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")weapons/melee/swing_heavy_sharp_01.wav",
")weapons/melee/swing_heavy_sharp_02.wav",
")weapons/melee/swing_heavy_sharp_03.wav"
},
} )
sound.Add( {
name = "Weapon_Etool.SwingHeavy",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")weapons/melee/swing_heavy_sharp_01.wav",
")weapons/melee/swing_heavy_sharp_02.wav",
")weapons/melee/swing_heavy_sharp_03.wav"
},
} )
sound.Add( {
name = "Weapon_Etool.Spin",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")weapons/melee/etool/etool_spin_01.wav",
")weapons/melee/etool/etool_spin_02.wav",
")weapons/melee/etool/etool_spin_03.wav",
")weapons/melee/etool/etool_spin_04.wav",
")weapons/melee/etool/etool_spin_05.wav",
")weapons/melee/etool/etool_spin_06.wav"
},
} )
sound.Add( {
name = "Weapon_Etool.AdjustStraight",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = ")weapons/melee/etool/etool_to_default_01.wav",
} )
sound.Add( {
name = "Weapon_Etool.AdjustAlternate",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = ")weapons/melee/etool/etool_to_alternate_01.wav",
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/me_fists.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Fist.Draw",
channel = CHAN_AUTO,
level = SNDLVL_NORM,
volume = 0.6,
sound = {
")player/weapon_draw_01.wav",
")player/weapon_draw_02.wav",
")player/weapon_draw_03.wav",
")player/weapon_draw_04.wav",
")player/weapon_draw_05.wav"
},
} )
sound.Add( {
name = "Weapon_Fist.Holster",
channel = CHAN_AUTO,
level = SNDLVL_NORM,
volume = 0.6,
sound = {
")player/weapon_holster_01.wav",
")player/weapon_holster_02.wav",
")player/weapon_holster_03.wav",
")player/weapon_holster_04.wav",
")player/weapon_holster_05.wav"
},
} )
sound.Add( {
name = "Weapon_Crowbar.Single",
channel = CHAN_WEAPON,
level = SNDLVL_NORM,
volume = 0.5,
sound = {
")weapons/melee/swing_fists_01.wav",
")weapons/melee/swing_fists_02.wav",
")weapons/melee/swing_fists_03.wav"
},
} )
sound.Add( {
name = "Weapon_Fist.HitFlesh",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.8,
pitch = {94, 108},
sound = {
")weapons/melee/fists/Fist_Hit1.wav",
")weapons/melee/fists/Fist_Hit2.wav",
")weapons/melee/fists/Fist_Hit3.wav"
},
} )
sound.Add( {
name = "Weapon_Fist.HitWorld",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.7,
pitch = {80, 90},
sound = {
")weapons/melee/fists/Fist_Hit1.wav",
")weapons/melee/fists/Fist_Hit2.wav",
")weapons/melee/fists/Fist_Hit3.wav"
},
} )
sound.Add( {
name = "Weapon_Fist.Shove",
channel = CHAN_WEAPON,
level = SNDLVL_64dB,
volume = 1.0,
sound = {
")player/shove_01.wav",
")player/shove_02.wav",
")player/shove_03.wav",
")player/shove_04.wav",
")player/shove_05.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/me_hatchet.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Hatchet.Draw",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_draw_01.wav",
")player/weapon_draw_02.wav",
")player/weapon_draw_03.wav",
")player/weapon_draw_04.wav",
")player/weapon_draw_05.wav"
},
} )
sound.Add( {
name = "Weapon_Hatchet.Holster",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_holster_01.wav",
")player/weapon_holster_02.wav",
")player/weapon_holster_03.wav",
")player/weapon_holster_04.wav",
")player/weapon_holster_05.wav"
},
} )
sound.Add( {
name = "Weapon_Hatchet.Shove",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/shove_01.wav",
")player/shove_02.wav",
")player/shove_03.wav",
")player/shove_04.wav",
")player/shove_05.wav"
},
} )
sound.Add( {
name = "Weapon_Melee.HatchetLight",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")weapons/melee/swing_light_sharp_01.wav",
")weapons/melee/swing_light_sharp_02.wav",
")weapons/melee/swing_light_sharp_03.wav"
},
} )
sound.Add( {
name = "Weapon_Melee.HatchetHeavy",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")weapons/melee/swing_light_sharp_01.wav",
")weapons/melee/swing_light_sharp_02.wav",
")weapons/melee/swing_light_sharp_03.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/me_kitknife.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_KitKnife.Draw",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.5,
sound = {
")player/weapon_draw_01.wav",
")player/weapon_draw_02.wav",
")player/weapon_draw_03.wav",
")player/weapon_draw_04.wav",
")player/weapon_draw_05.wav"
},
} )
sound.Add( {
name = "Weapon_KitKnife.Holster",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.5,
sound = {
")player/weapon_holster_01.wav",
")player/weapon_holster_02.wav",
")player/weapon_holster_03.wav",
")player/weapon_holster_04.wav",
")player/weapon_holster_05.wav"
},
} )
sound.Add( {
name = "Weapon_KitKnife.Shove",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.5,
sound = {
")player/shove_01.wav",
")player/shove_02.wav",
")player/shove_03.wav",
")player/shove_04.wav",
")player/shove_05.wav"
},
} )
sound.Add( {
name = "Weapon_KitKnife.SwingLight",
channel = CHAN_WEAPON,
volume = 1,
level = SNDLVL_NORM,
pitch = PITCH_NORM,
sound = {
")weapons/melee/swing_light_sharp_01.wav",
")weapons/melee/swing_light_sharp_02.wav",
")weapons/melee/swing_light_sharp_03.wav"
},
} )
sound.Add( {
name = "Weapon_KitKnife.SwingHeavy",
channel = CHAN_WEAPON,
volume = 1,
level = SNDLVL_NORM,
pitch = PITCH_NORM,
sound = {
")weapons/melee/swing_light_sharp_01.wav",
")weapons/melee/swing_light_sharp_02.wav",
")weapons/melee/swing_light_sharp_03.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/me_machete.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Machete.Draw",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_draw_01.wav",
")player/weapon_draw_02.wav",
")player/weapon_draw_03.wav",
")player/weapon_draw_04.wav",
")player/weapon_draw_05.wav"
},
} )
sound.Add( {
name = "Weapon_Machete.Holster",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_holster_01.wav",
")player/weapon_holster_02.wav",
")player/weapon_holster_03.wav",
")player/weapon_holster_04.wav",
")player/weapon_holster_05.wav"
},
} )
sound.Add( {
name = "Weapon_Machete.Shove",
channel = CHAN_WEAPON,
volume = 0.55,
level = SNDLVL_NORM,
pitch = {95,100},
sound = {
")player/shove_01.wav",
")player/shove_02.wav",
")player/shove_03.wav",
")player/shove_04.wav",
")player/shove_05.wav"
},
} )
sound.Add( {
name = "Weapon_Melee.MacheteLight",
channel = CHAN_WEAPON,
volume = 0.55,
level = SNDLVL_NORM,
pitch = {95,100},
sound = {
")weapons/melee/swing_light_sharp_01.wav",
")weapons/melee/swing_light_sharp_02.wav",
")weapons/melee/swing_light_sharp_03.wav"
},
} )
sound.Add( {
name = "Weapon_Melee.MacheteHeavy",
channel = CHAN_WEAPON,
volume = 0.55,
level = SNDLVL_NORM,
pitch = {95,100},
sound = {
")weapons/melee/swing_light_sharp_01.wav",
")weapons/melee/swing_light_sharp_02.wav",
")weapons/melee/swing_light_sharp_03.wav"
},
} )
sound.Add( {
name = "Weapon_Machete.Melee_Hit",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_NORM,
pitch = {98,102},
sound = {
")weapons/melee/swing_light_sharp_01.wav",
")weapons/melee/swing_light_sharp_02.wav",
")weapons/melee/swing_light_sharp_03.wav"
},
} )
sound.Add( {
name = "Weapon_Machete.Melee_HitWorld",
channel = CHAN_WEAPON,
volume = 0.7,
level = SNDLVL_90dB,
pitch = {90,120},
sound = {
")weapons/crowbar/crowbar_impact1.wav",
")weapons/crowbar/crowbar_impact2.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/me_pipe_lead.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_PipeLead.Draw",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_draw_01.wav",
")player/weapon_draw_02.wav",
")player/weapon_draw_03.wav",
")player/weapon_draw_04.wav",
")player/weapon_draw_05.wav"
},
} )
sound.Add( {
name = "Weapon_PipeLead.Holster",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_holster_01.wav",
")player/weapon_holster_02.wav",
")player/weapon_holster_03.wav",
")player/weapon_holster_04.wav",
")player/weapon_holster_05.wav"
},
} )
sound.Add( {
name = "Weapon_PipeLead.Shove",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/shove_01.wav",
")player/shove_02.wav",
")player/shove_03.wav",
")player/shove_04.wav",
")player/shove_05.wav"
},
} )
sound.Add( {
name = "Weapon_Melee.PipeLeadLight",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_75dB,
sound = {
")weapons/melee/swing_light_blunt_01.wav",
")weapons/melee/swing_light_blunt_02.wav",
")weapons/melee/swing_light_blunt_03.wav"
},
} )
sound.Add( {
name = "Weapon_Melee.PipeLeadHeavy",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_75dB,
sound = {
")weapons/melee/swing_light_blunt_01.wav",
")weapons/melee/swing_light_blunt_02.wav",
")weapons/melee/swing_light_blunt_03.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/me_shovel.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Spade.Draw",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")player/weapon_draw_01.wav",
")player/weapon_draw_02.wav",
")player/weapon_draw_03.wav",
")player/weapon_draw_04.wav",
")player/weapon_draw_05.wav"
},
} )
sound.Add( {
name = "Weapon_Spade.Holster",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")player/weapon_holster_01.wav",
")player/weapon_holster_02.wav",
")player/weapon_holster_03.wav",
")player/weapon_holster_04.wav",
")player/weapon_holster_05.wav"
},
} )
sound.Add( {
name = "Weapon_Spade.Shove",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")player/shove_01.wav",
")player/shove_02.wav",
")player/shove_03.wav",
")player/shove_04.wav",
")player/shove_05.wav"
},
} )
sound.Add( {
name = "Weapon_Melee.SpadeLight",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")weapons/melee/swing_heavy_sharp_01.wav",
")weapons/melee/swing_heavy_sharp_02.wav",
")weapons/melee/swing_heavy_sharp_03.wav"
},
} )
sound.Add( {
name = "Weapon_Melee.SpadeHeavy",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")weapons/melee/swing_heavy_sharp_01.wav",
")weapons/melee/swing_heavy_sharp_02.wav",
")weapons/melee/swing_heavy_sharp_03.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/me_sledge.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Sledge.Draw",
channel = CHAN_WEAPON,
volume = 0.5,
level = SNDLVL_55dB,
pitch = {98,100},
sound = {
")player/weapon_draw_01.wav",
")player/weapon_draw_02.wav",
")player/weapon_draw_03.wav",
")player/weapon_draw_04.wav",
")player/weapon_draw_05.wav"
},
} )
sound.Add( {
name = "Weapon_Sledge.Holster",
channel = CHAN_WEAPON,
volume = 0.5,
level = SNDLVL_55dB,
pitch = {98,100},
sound = {
")player/weapon_holster_01.wav",
")player/weapon_holster_02.wav",
")player/weapon_holster_03.wav",
")player/weapon_holster_04.wav",
")player/weapon_holster_05.wav"
},
} )
sound.Add( {
name = "Weapon_Sledge.Swing",
channel = CHAN_WEAPON,
level = SNDLVL_85dB,
volume = 1.0,
pitch = {95,100},
sound = {
")weapons/melee/swing_heavy_blunt_01.wav",
")weapons/melee/swing_heavy_blunt_02.wav",
")weapons/melee/swing_heavy_blunt_03.wav"
},
} )
sound.Add( {
name = "Weapon_Sledge.Shove",
channel = CHAN_WEAPON,
level = SNDLVL_85dB,
volume = 1.0,
sound = {
")player/shove_01.wav",
")player/shove_02.wav",
")player/shove_03.wav",
")player/shove_04.wav",
")player/shove_05.wav"
},
} )
sound.Add( {
name = "Weapon_Sledge.HitFlesh",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")weapons/melee/sledge/sledge_hit1.wav",
")weapons/melee/sledge/sledge_hit2.wav",
")weapons/melee/sledge/sledge_hit3.wav"
},
} )
sound.Add( {
name = "Weapon_Sledge.HitWorld",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")weapons/bat/Woodbat_hitworld1.wav",
")weapons/bat/Woodbat_hitworld2.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/me_wrench.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Wrench.Draw",
channel = CHAN_ITEM,
volume = 0.5,
level = SNDLVL_55dB,
pitch = {98,100},
sound = {
")player/weapon_draw_01.wav",
")player/weapon_draw_02.wav",
")player/weapon_draw_03.wav",
")player/weapon_draw_04.wav",
")player/weapon_draw_05.wav"
},
} )
sound.Add( {
name = "Weapon_Wrench.Holster",
channel = CHAN_ITEM,
volume = 0.5,
level = SNDLVL_55dB,
pitch = {98,100},
sound = {
")player/weapon_holster_01.wav",
")player/weapon_holster_02.wav",
")player/weapon_holster_03.wav",
")player/weapon_holster_04.wav",
")player/weapon_holster_05.wav"
},
} )
sound.Add( {
name = "Weapon_Wrench.Shove",
channel = CHAN_ITEM,
volume = 0.5,
level = SNDLVL_55dB,
pitch = {98,100},
sound = {
")player/shove_01.wav",
")player/shove_02.wav",
")player/shove_03.wav",
")player/shove_04.wav",
")player/shove_05.wav"
},
} )
sound.Add( {
name = "Weapon_Melee.Wrench",
channel = CHAN_WEAPON,
level = SNDLVL_85dB,
volume = 0.85,
pitch = {98,100},
sound = {
")weapons/melee/swing_light_sharp_01.wav",
")weapons/melee/swing_light_sharp_02.wav",
")weapons/melee/swing_light_sharp_03.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/tool_barricade.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Hammer.Draw",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_draw_01.wav",
")player/weapon_draw_02.wav",
")player/weapon_draw_03.wav",
")player/weapon_draw_04.wav",
")player/weapon_draw_05.wav"
},
} )
sound.Add( {
name = "Weapon_Hammer.Holster",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_holster_01.wav",
")player/weapon_holster_02.wav",
")player/weapon_holster_03.wav",
")player/weapon_holster_04.wav",
")player/weapon_holster_05.wav"
},
} )
sound.Add( {
name = "Weapon_Hammer.BoardDraw",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")weapons/melee/hammer/board-draw1.wav",
")weapons/melee/hammer/board-draw2.wav",
")weapons/melee/hammer/board-draw3.wav",
")weapons/melee/hammer/board-draw4.wav"
},
} )
sound.Add( {
name = "Weapon_Hammer.BoardHolster",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")weapons/melee/hammer/board-holster1.wav",
")weapons/melee/hammer/board-holster2.wav",
")weapons/melee/hammer/board-holster3.wav",
")weapons/melee/hammer/board-holster4.wav"
},
} )
sound.Add( {
name = "Weapon_Hammer.Barricade",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")weapons/melee/hammer/barricade-1.wav",
")weapons/melee/hammer/barricade-2.wav"
},
} )
sound.Add( {
name = "Weapon_Hammer.BoardLight",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")weapons/melee/hammer/board_damage-light1.wav",
")weapons/melee/hammer/board_damage-light2.wav",
")weapons/melee/hammer/board_damage-light3.wav",
")weapons/melee/hammer/board_damage-light4.wav"
},
} )
sound.Add( {
name = "Weapon_Hammer.BoardHeavy",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")weapons/melee/hammer/board_damage-heavy1.wav",
")weapons/melee/hammer/board_damage-heavy2.wav",
")weapons/melee/hammer/board_damage-heavy3.wav"
},
} )
sound.Add( {
name = "Weapon_Hammer.BoardBroken",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")weapons/melee/hammer/board_damage-broken1.wav",
")weapons/melee/hammer/board_damage-broken2.wav"
},
} )
sound.Add( {
name = "Weapon_Melee.HammerLight",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")weapons/melee/hammer/Hammer_Hit1.wav",
")weapons/melee/hammer/Hammer_Hit2.wav",
")weapons/melee/hammer/Hammer_Hit3.wav"
},
} )
sound.Add( {
name = "Weapon_Melee.HammerSwing",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")weapons/melee/swing_light_blunt_01.wav",
")weapons/melee/swing_light_blunt_02.wav",
")weapons/melee/swing_light_blunt_03.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/tool_extinguisher.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Extinguisher.Extinguish",
channel = CHAN_AUTO,
volume = 1.0,
level = SNDLVL_105dB,
sound = ")weapons/tools/fire_extinguisher/Fire_Extinguisger_StartLoop.wav",
} )
sound.Add( {
name = "Weapon_Extinguisher.Extinguish_Stop",
channel = CHAN_AUTO,
volume = 1.0,
level = SNDLVL_105dB,
sound = ")weapons/tools/fire_extinguisher/Fire_Extinguisger_Stop.wav",
} )
sound.Add( {
name = "Weapon_Extinguisher.Lever",
channel = CHAN_AUTO,
volume = 1.0,
level = SNDLVL_105dB,
sound = ")weapons/tools/fire_extinguisher/Fire_Extinguisger_Lever.wav",
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/tool_flare_gun.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "FlareGun.BarrelOpen",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_45dB,
pitch = {95,100},
sound = ")weapons/tools/flaregun/Flaregun_BarrelOpen.wav",
} )
sound.Add( {
name = "FlareGun.BarrelClose",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_45dB,
pitch = {95,100},
sound = ")weapons/tools/flaregun/Flaregun_BarrelClosed.wav",
} )
sound.Add( {
name = "FlareGun.Fire",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_GUNFIRE,
pitch = {95,100},
sound = ")weapons/tools/flaregun/Flaregun_Fire.wav",
} )
sound.Add( {
name = "FlareGun.HammerDown",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_45dB,
pitch = {95,100},
sound = ")weapons/tools/flaregun/Flaregun_HammerDown.wav",
} )
sound.Add( {
name = "FlareGun.HammerUp",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_45dB,
pitch = {95,100},
sound = ")weapons/tools/flaregun/Flaregun_HammerUp.wav",
} )
sound.Add( {
name = "FlareGun.Load",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_45dB,
pitch = {95,100},
sound = ")weapons/tools/flaregun/Flaregun_Load.wav",
} )
sound.Add( {
name = "FlareGun.SpentOut",
channel = CHAN_ITEM,
volume = 1.0,
level = SNDLVL_45dB,
pitch = {95,100},
sound = ")weapons/tools/flaregun/Flaregun_SpentOut.wav",
} )
sound.Add( {
name = "FlareGun.Pop",
channel = CHAN_WEAPON,
volume = 1.0,
level = SNDLVL_90dB,
pitch = {95,100},
sound = ")weapons/tools/flaregun/Flare_Pop.wav",
} )
sound.Add( {
name = "Flare.Screech",
channel = CHAN_VOICE,
volume = 1,
pitch = 100,
level = 120,
sound = ")weapons/tools/flaregun/flare_whistle.wav",
} )
sound.Add( {
name = "Flare.Touch",
channel = CHAN_VOICE,
volume = 1,
pitch = 100,
level = 120,
sound = ")weapons/tools/flaregun/flare_pop.wav",
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/tool_maglite.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Flashlight.On",
channel = CHAN_BODY,
volume = 0.5,
level = SNDLVL_55dB,
pitch = {97,98},
sound = {
")weapons/tools/flashlight/flashlight_on1.wav",
")weapons/tools/flashlight/flashlight_on2.wav"
},
} )
sound.Add( {
name = "Weapon_Flashlight.Off",
channel = CHAN_BODY,
volume = 0.5,
level = SNDLVL_55dB,
pitch = {97,98},
sound = {
")weapons/tools/flashlight/flashlight_off1.wav",
")weapons/tools/flashlight/flashlight_off2.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/tool_welder.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Welder.Flame",
channel = CHAN_AUTO,
volume = 1.0,
level = SNDLVL_90dB,
sound = ")weapons/tools/welder/Welder_Loop.wav",
} )
sound.Add( {
name = "Weapon_Welder.Flame2",
channel = CHAN_AUTO,
volume = 1.0,
level = SNDLVL_90dB,
sound = ")weapons/tools/welder/Welder_Loop2.wav",
} )
sound.Add( {
name = "Weapon_Welder.Draw",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_draw_01.wav",
")player/weapon_draw_02.wav",
")player/weapon_draw_03.wav",
")player/weapon_draw_04.wav",
")player/weapon_draw_05.wav"
},
} )
sound.Add( {
name = "Weapon_Welder.Holster",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 0.4,
sound = {
")player/weapon_holster_01.wav",
")player/weapon_holster_02.wav",
")player/weapon_holster_03.wav",
")player/weapon_holster_04.wav",
")player/weapon_holster_05.wav"
},
} )
sound.Add( {
name = "Weapon_Melee.WelderLight",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")weapons/melee/swing_light_blunt_01.wav",
")weapons/melee/swing_light_blunt_02.wav",
")weapons/melee/swing_light_blunt_03.wav"
},
} )
sound.Add( {
name = "Weapon_Melee.WelderHeavy",
channel = CHAN_ITEM,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")weapons/melee/swing_light_blunt_01.wav",
")weapons/melee/swing_light_blunt_02.wav",
")weapons/melee/swing_light_blunt_03.wav"
},
} )
--Generated by TFA's Sound Autoconversion Script
--Original Path: D:/SteamGames/steamapps/common/nmrih/nmrih/scripts/weapons_soundscripts/tool_zippo.txt
SNDLVL_GUNFIRE = 120
SNDLVL_NORM = 80
SNDLVL_20dB = 20
SNDLVL_25dB = 25
SNDLVL_30dB = 30
SNDLVL_35dB = 35
SNDLVL_40dB = 40
SNDLVL_45dB = 45
SNDLVL_50dB = 50
SNDLVL_55dB = 55
SNDLVL_60dB = 60
SNDLVL_65dB = 65
SNDLVL_70dB = 70
SNDLVL_75dB = 75
SNDLVL_80dB = 80
SNDLVL_85dB = 85
SNDLVL_90dB = 90
SNDLVL_95dB = 95
SNDLVL_100dB = 100
SNDLVL_105dB = 105
SNDLVL_105 = 105
SNDLVL_110dB = 110
SNDLVL_115dB = 115
SNDLVL_120dB = 120
SNDLVL_125dB = 125
SNDLVL_130dB = 130
SNDLVL_135dB = 135
SNDLVL_140dB = 140
SNDLVL_145dB = 145
SNDLVL_150dB = 150
SNDLVL_155dB = 155
SNDLVL_160dB = 160
SNDLVL_165dB = 165
SNDLVL_170dB = 170
SNDLVL_175dB = 175
SNDLVL_180dB = 180
sound.Add( {
name = "Weapon_Zippo.Open",
channel = CHAN_AUTO,
volume = 1.0,
level = SNDLVL_NORM,
sound = {
")weapons/tools/zippo/zippo_open_01.wav",
")weapons/tools/zippo/zippo_open_02.wav"
},
} )
sound.Add( {
name = "Weapon_Zippo.Close",
channel = CHAN_AUTO,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")weapons/tools/zippo/zippo_close_01.wav",
")weapons/tools/zippo/zippo_close_02.wav"
},
} )
sound.Add( {
name = "Weapon_Zippo.Strike_Fail",
channel = CHAN_AUTO,
level = SNDLVL_NORM,
volume = 1.0,
sound = {
")weapons/tools/zippo/zippo_strike_fail_01.wav",
")weapons/tools/zippo/zippo_strike_fail_02.wav",
")weapons/tools/zippo/zippo_strike_fail_03.wav"
},
} )
sound.Add( {
name = "Weapon_Strike_Success",
channel = CHAN_AUTO,
level = SNDLVL_NORM,
volume = 1.0,
sound = ")weapons/tools/zippo/zippo_strike_success_01.wav",
} )
|
-- title: the 128b
-- author: ps
-- desc: 126b intro for lovebyte battlegrounds 2021
function TIC()
s=time()/1e4
for i=0,1e5 do
a=i%136
d=i%241
m=a-s*2
pix(d,a,(((d*d+a*a)//241~(d*d+m*m)//241)%2)*12)
end
print("THE 128b",70,60,0,0,2)
end
|
-- // Honestly, I have no idea what this even does. It was just requested.
-- // Services
local Players = game:GetService("Players")
-- // Vars
local LocalPlayer = Players.LocalPlayer
local Mouse = LocalPlayer:GetMouse()
-- // Get the stat holder thing idk
local StatHolder
do
for _, Connection in ipairs(getconnections(Mouse.Button2Down)) do
StatHolder = debug.getupvalue(debug.getupvalue(Connection.Function, 6), 4)
break
end
end
-- // Set dog tags
StatHolder.dogtags = 100
|
do
local function main(f)
local a = f(1)
return { _1 = f(2), _2 = { _2 = a, _1 = f(3) } }
end
(nil)(main)
end
|
local assets = {
_VERSION = 'assets v1.0.0',
_DESCRIPTION = 'Asset management for love2D',
_URL = 'https://github.com/nathaniellam/love-assets',
_LICENSE = [[
MIT License
Copyright (c) 2021 Nathaniel Lam
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.
]]
}
-----------------------------
-- Internal Helper Functions
-----------------------------
local function getExtension(path)
if type(path) == 'string' then
local temp = love.filesystem.newFileData(path)
local ext = temp:getExtension()
temp:release()
return ext
end
return ''
end
-----------------------------
-- Public Interface
-----------------------------
function assets.init(opts)
if assets._initialized then
error('assets has already been initialized')
end
if type(opts) == 'number' then
opts = {num_workers = opts}
elseif type(opts) == 'nil' then
opts = {num_workers = 1}
end
assets._initialized = true
assets._asset_cache = {}
assets._workers = {}
assets._pending_job_queue = {}
assets._lock = nil
assets._onCancel = opts.onCancel
assets.job_channel = love.thread.newChannel()
assets.result_channel = love.thread.newChannel()
assets.lock_channel = love.thread.newChannel()
assets.num_workers = opts.num_workers or 1
for i = 1, assets.num_workers do
assets._workers[i] = assets._createWorker()
end
for k, v in pairs(assets._loaders) do
assets.loader(k, v)
end
end
function assets.add(id, path, loader_id, initializer_id)
local rev = (assets._asset_cache[id] and assets._asset_cache[id].rev or 0) + 1
if type(path) == 'string' then
local loader, loader_type, loader_args = assets._extractLoader(loader_id or getExtension(path))
local initializer, initializer_args =
assets._extractInitializer(initializer_id or getExtension(path))
local asset = {
id = id,
rev = rev,
path = path,
status = 'loading',
loader = loader,
loader_type = loader_type,
loader_args = loader_args,
initializer = initializer,
initializer_args = initializer_args
}
assets._asset_cache[id] = asset
local job = {
'asset',
id = id,
rev = rev,
path = path,
loader = loader,
loader_type = loader_type,
loader_args = loader_args
}
table.insert(assets._pending_job_queue, job)
else
local asset = {
id = id,
rev = rev,
status = 'ready',
result = path
}
assets._asset_cache[id] = asset
end
end
function assets.remove(id)
local asset = assets._asset_cache[id]
if not asset then
error('Attempted to remove ' .. id .. ' which was not found')
end
if asset.status == 'ready' then
assets._asset_cache[id] = nil
return asset.result
elseif asset.status == 'loading' then
asset.status = 'canceled'
elseif asset.status == 'error' then
assets._asset_cache[id] = nil
end
end
function assets.clear()
for id, asset in pairs(assets._asset_cache) do
if asset.status == 'ready' then
assets._asset_cache[id] = nil
elseif asset.status == 'loading' then
asset.status = 'canceled'
end
end
assets._pending_job_queue = {}
end
function assets.status(id)
local asset = assets._asset_cache[id]
if asset then
return asset.status, asset.err
end
return 'not found', nil
end
function assets.get(id)
local asset = assets._asset_cache[id]
if not asset then
error('Attempted to get ' .. id .. ' which was not found')
end
if asset then
if asset.status == 'ready' then
return asset.result
else
return nil, 'Asset not ready'
end
end
return nil, 'Asset not found'
end
function assets.has(id)
local asset = assets._asset_cache[id]
if asset then
return true
end
return false
end
function assets.loader(id, fn)
local dump = string.dump(fn)
local job = {'loader', id = id, fn = dump}
table.insert(assets._pending_job_queue, job)
end
function assets.require(path, name, initializer)
if type(name) == 'function' then
initializer = name
name = nil
end
if initializer then
initializer = string.dump(initializer)
end
local job = {'require', path = path, name = name, initializer = initializer}
table.insert(assets._pending_job_queue, job)
end
function assets.initializer(id, fn)
assets._initializers[id] = fn
end
function assets.iter()
local gen, state, prev = pairs(assets._asset_cache)
return function()
local id, asset = gen(state, prev)
if id ~= nil then
prev = id
return id, asset.status, asset.data
end
end
end
function assets.update()
while assets.result_channel:getCount() > 0 do
local result = assets.result_channel:pop()
if result[1] == 'asset' then
local asset = assets._asset_cache[result.id]
if asset.rev == result.rev then
if result.err then
if asset.status == 'canceled' then
assets._asset_cache[asset.id] = nil
else
asset.status = 'error'
asset.err = result.err
end
elseif result.data then
if asset.status == 'canceled' then
if assets.onCancel then
assets.onCancel(result.id, result.data)
end
assets._asset_cache[asset.id] = nil
else
if asset.initializer then
asset.result = asset.initializer(result.data, unpack(asset.initializer_args))
else
asset.result = result.data
end
asset.status = 'ready'
end
end
else
-- When revision differs we can cancel previous entry
if assets.onCancel then
assets.onCancel(result.id, result.data)
end
assets._asset_cache[asset.id] = nil
end
elseif result[1] == 'require' then
if result.status == 'done' then
assets._lock = false
elseif result.status == 'error' then
error('assets could not require "' .. result.path .. '" due to:\n' .. result.err)
end
elseif result[1] == 'loader' then
if result.status == 'done' then
assets._lock = false
elseif result.status == 'error' then
error('assets could not setup loader "' .. result.id .. '" due to:\n' .. result.err)
end
end
end
while #assets._pending_job_queue > 0 do
local job = table.remove(assets._pending_job_queue, 1)
if job[1] == 'loader' then
assets._lock = true
assets.lock_channel:push(assets.num_workers)
for _ = 1, assets.num_workers do
assets.job_channel:push(job)
end
break
elseif job[1] == 'require' then
assets._lock = true
assets.lock_channel:push(assets.num_workers)
for _ = 1, assets.num_workers do
assets.job_channel:push(job)
end
break
elseif job[1] == 'asset' then
assets.job_channel:push(job)
end
end
end
function assets.shutdownWorkers()
-- Remove any existing jobs and send shutdown signal to all workers
assets.job_channel:clear()
for _ = 1, assets.num_workers do
assets.job_channel:push(-1)
end
-- Unlock any threads that might be loading a loader or library
assets.lock_channel:push(1000000)
assets._pending_job_queue = {}
-- Wait for all workers to exit
for _, worker in ipairs(assets._workers) do
worker:wait()
end
end
function assets.onCancel(...)
if assets._onCancel then
assets._onCancel(...)
end
end
-- Constants
assets.SUPPORTED_IMAGE_FORMATS = {'jpg', 'png', 'bmp'}
assets.SUPPORTED_AUDIO_FORMATS = {
'wav',
'mp3',
'ogg',
'oga',
'ogv',
'699',
'amf',
'ams',
'dbm',
'dmf',
'dsm',
'far',
'it',
'j2b',
'mdl',
'med',
'mod',
'mt2',
'mtm',
'okt',
'psm',
's3m',
'stm',
'ult',
'umx',
'xm',
'abc',
'mid',
'pat',
'flac'
}
local function threadFn(...)
require 'love.audio'
require 'love.image'
require 'love.sound'
require 'love.video'
local job_ch, result_ch, lock_ch = ...
local loaders = {}
while true do
local job = job_ch:demand()
if job == -1 then
-- Shutdown thread
return
elseif job[1] == 'loader' then
-- Add loader
local fn, err = loadstring(job.fn)
if fn then
loaders[job.id] = fn
else
result_ch:push(
{
'loader',
id = job.id,
status = 'error',
err = err
}
)
-- Stop thread due to irrecoverable error
return
end
-- Sync up with other threads
local counter = lock_ch:demand()
counter = counter - 1
if counter <= 0 then
result_ch:push(
{
'loader',
id = job.id,
status = 'done'
}
)
else
lock_ch:push(counter)
end
elseif job[1] == 'require' then
-- Add library
local succ, lib = pcall(require, job.path)
local result = nil
if succ then
if job.initializer then
local initializer, err = loadstring(job.initializer)
if initializer then
local suc, initLib = pcall(initializer, lib)
if suc then
if job.name then
_G[job.name] = initLib
end
else
result = {
'require',
path = job.path,
status = 'error',
err = initLib
}
end
else
result = {
'require',
path = job.path,
status = 'error',
err = err
}
end
else
if job.name then
_G[job.name] = lib
end
end
else
result = {
'require',
path = job.path,
status = 'error',
err = lib
}
end
if result then
result_ch:push(result)
if result.status == 'error' then
-- Stop thread due to irrecoverable error
return
end
end
-- Sync up with other threads
local counter = lock_ch:demand()
counter = counter - 1
if counter <= 0 then
result_ch:push(
{
'require',
path = job.path,
status = 'done'
}
)
else
lock_ch:push(counter)
end
else
-- Load asset
local result = {'asset', id = job.id, rev = job.rev}
if job.loader_type == 'str' then
local succ, data = pcall(loaders[job.loader], job.path, unpack(job.loader_args))
if succ then
result.data = data
else
result.err = data
end
elseif job.loader_type == 'fn' then
local fn, err = loadstring(job.loader)
if fn then
local succ, data = pcall(loaders[job.loader], job.path, unpack(job.loader_args))
if succ then
result.data = data
else
result.err = data
end
else
result.err = err
end
end
result_ch:push(result)
end
end
end
assets.WORKER_DUMP = string.dump(threadFn)
-----------------------------
-- Private Interface
-----------------------------
-- Helpers
function assets._createWorker()
local worker_thread =
love.thread.newThread(love.filesystem.newFileData(assets.WORKER_DUMP, 'assets-thread.lua'))
worker_thread:start(assets.job_channel, assets.result_channel, assets.lock_channel)
return worker_thread
end
function assets._extractLoader(id)
local args = {}
if type(id) == 'table' then
args = {select(2, unpack(id))}
id = id[1]
end
if type(id) == 'function' then
return string.dump(id), 'fn', args
elseif type(id) == 'string' then
return id, 'str', args
end
end
function assets._extractInitializer(id)
local args = {}
if type(id) == 'table' then
args = {select(2, unpack(id))}
id = id[1]
end
if type(id) == 'function' then
return id, args
elseif type(id) == 'string' then
return assets._initializers[id], args
end
end
-- Built-in Loaders
assets._loaders = {}
assets._loaders.data = function(path)
return love.filesystem.newFileData(path)
end
assets._loaders.audio = function(path, ...)
return love.audio.newSource(path, ...)
end
assets._loaders.source = assets._loaders.audio
for _, format in ipairs(assets.SUPPORTED_AUDIO_FORMATS) do
assets._loaders[format] = assets._loaders.audio
end
assets._loaders.soundData = function(path)
return love.sound.newSoundData(path)
end
assets._loaders.decoder = function(path, ...)
return love.sound.newDecoder(path, ...)
end
assets._loaders.image = function(path)
if love.image.isCompressed(path) then
return love.image.newCompressedData(path)
else
return love.image.newImageData(path)
end
end
for _, format in ipairs(assets.SUPPORTED_IMAGE_FORMATS) do
assets._loaders[format] = assets._loaders.image
end
assets._loaders.font = assets._loaders.data
assets._loaders.ttf = assets._loaders.font
assets._loaders.imageFont = function(path)
return love.image.newImageData(path)
end
assets._loaders.video = function(path)
return love.video.newVideoStream(path)
end
assets._loaders.ogv = assets._loaders.video
assets._loaders.videoStream = assets._loaders.video
-- Built-in initializers
assets._initializers = {}
-- Default initializer, just returns FileData/ImageData/SoundData
assets._initializers.data = function(data)
return data
end
assets._initializers.image = function(data, ...)
return love.graphics.newImage(data, ...)
end
for _, format in ipairs(assets.SUPPORTED_IMAGE_FORMATS) do
assets._initializers[format] = assets._initializers.image
end
assets._initializers.audio = assets._initializers.data
for _, format in ipairs(assets.SUPPORTED_AUDIO_FORMATS) do
assets._initializers[format] = assets._initializers.audio
end
assets._initializers.imagefont = function(data, ...)
return love.graphics.newImageFont(data, ...)
end
assets._initializers.font = function(data, ...)
return love.graphics.newFont(data, ...)
end
assets._initializers.ttf = assets._initializers.font
assets._initializers.video = function(data, ...)
return love.graphics.newVideo(data, ...)
end
assets._initializers.ogv = assets._initializers.video
return assets
|
answ = {
"ะขะฐัะบะฐ O ะฟัะธะฟะฐะดะฐ ะฟัะฐะฒะพั a.",
"ะขะฐัะบะต O ะธ N ะฟัะธะฟะฐะดะฐัั ะธััะพั ะฟัะฐะฒะพั.",
"ะัะฐะฒะต a ะธ c ัะต ัะตะบั.",
"ะัะฐะฒะต b ะธ c ะฝะตะผะฐัั ะทะฐัะตะดะฝะธัะบะธั
ัะฐัะฐะบะฐ.",
"ะขะฐัะบะฐ O ะฟัะธะฟะฐะดะฐ ะธ ะฟัะฐะฒะพั a ะธ ะฟัะฐะฒะพั b.",
"ะขะฐัะบะต O ะธ M ะฟัะธะฟะฐะดะฐัั ะธััะพั ะฟัะฐะฒะพั.",
"ะัะฐะฒะต a ะธ b ัั ะฟะฐัะฐะปะตะปะฝะต.",
"ะขะฐัะบะฐ N ะฟัะธะฟะฐะดะฐ ะฟัะฐะฒะพั c."
}
t_str = "ั"
n_str = "ะฝ"
|
local Subscription = {}
Subscription.__index = Subscription
setmetatable(Subscription, {
__call = function (cls, ...)
return cls.new(...)
end,
})
function Subscription.new(thing, name)
local self = setmetatable({}, Subscription)
self.thing = thing
self.name = name
return self
end
function Subscription:onAdded(handler)
self.thing:onTopic(self.name.."/$added", function(data, params, topic)
local args = cjson.decode(data)
handler(unpack(args))
end)
return self
end
function Subscription:onChanged(handler)
self.thing:onTopic(self.name.."/$changed", function(data, params, topic)
local args = cjson.decode(data)
handler(unpack(args))
end)
return self
end
function Subscription:onRemoved(handler)
self.thing:onTopic(self.name.."/$removed", function(data, params, topic)
local id = nil
if data:len() > 0 then id = cjson.decode(data) end
handler(id)
end)
return self
end
function Subscription:on(handlers)
if handlers.added then self:onAdded(handlers.added) end
if handlers.changed then self:onChanged(handlers.changed) end
if handlers.removed then self:onRemoved(handlers.removed) end
return self
end
return Subscription
|
local K, C, L, _ = unpack(select(2, ...))
local LSM = LibStub("LibSharedMedia-3.0")
local GetChatWindowInfo = GetChatWindowInfo
local CreateFrame, UIParent = CreateFrame, UIParent
local hooksecurefunc = hooksecurefunc
local SetFont = function(obj, font, size, style, r, g, b, sr, sg, sb, sox, soy)
obj:SetFont(font, size, style)
if sr and sg and sb then obj:SetShadowColor(sr, sg, sb) end
if sox and soy then obj:SetShadowOffset(sox, soy) end
if r and g and b then obj:SetTextColor(r, g, b) end
end
local frame = CreateFrame("Frame", nil, UIParent)
frame:RegisterEvent("ADDON_LOADED")
frame:SetScript("OnEvent", function(self, event, addon)
if addon ~= "KkthnxUI" or addon == "tekticles" then return end
local NORMAL = C["media"].normal_font
local COMBAT = LSM:Fetch("font", C["media"].combat_font)
local BLANK = C["media"].blank_font
local _, editBoxFontSize, _, _, _, _, _, _, _, _ = GetChatWindowInfo(1)
UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT = 12
CHAT_FONT_HEIGHTS = {10, 12, 13, 14, 15, 16, 17, 18, 19, 20}
UNIT_NAME_FONT = NORMAL
STANDARD_TEXT_FONT = NORMAL
NAMEPLATE_FONT = NORMAL
DAMAGE_TEXT_FONT = COMBAT
if C["general"].replace_blizz_fonts then
-- Base fonts
SetFont(AchievementFont_Small, NORMAL, 12)
SetFont(FriendsFont_Large, NORMAL, 15, nil, nil, nil, nil, 0, 0, 0, K.mult, -K.mult)
SetFont(FriendsFont_Normal, NORMAL, 13, nil, nil, nil, nil, 0, 0, 0, K.mult, -K.mult)
SetFont(FriendsFont_Small, NORMAL, 11, nil, nil, nil, nil, 0, 0, 0, K.mult, -K.mult)
SetFont(FriendsFont_UserText, NORMAL, 12, nil, nil, nil, nil, 0, 0, 0, K.mult, -K.mult)
SetFont(GameTooltipHeader, NORMAL, 15, "OUTLINE")
SetFont(InvoiceFont_Med, NORMAL, 13, nil, 0.15, 0.09, 0.04)
SetFont(InvoiceFont_Small, NORMAL, 11, nil, 0.15, 0.09, 0.04)
SetFont(MailFont_Large, NORMAL, 15, nil, 0.15, 0.09, 0.04, 0.54, 0.4, 0.1, K.mult, -K.mult)
SetFont(NumberFont_OutlineThick_Mono_Small, NORMAL, 13, "OUTLINE")
SetFont(NumberFont_Outline_Huge, NORMAL, 30, "OUTLINE", 30)
SetFont(NumberFont_Outline_Large, NORMAL, 17, "OUTLINE")
SetFont(NumberFont_Outline_Med, NORMAL, 15, "OUTLINE")
SetFont(NumberFont_Shadow_Med, NORMAL, 14)
SetFont(NumberFont_Shadow_Small, NORMAL, 12)
SetFont(QuestFont_Large, NORMAL, 16)
SetFont(QuestFont_Shadow_Huge, NORMAL, 19, nil, nil, nil, nil, 0.54, 0.4, 0.1)
SetFont(ReputationDetailFont, NORMAL, 12, nil, nil, nil, nil, 0, 0, 0, K.mult, -K.mult)
SetFont(SpellFont_Small, NORMAL, 11)
SetFont(SystemFont_InverseShadow_Small, NORMAL, 11)
SetFont(SystemFont_Large, NORMAL, 17)
SetFont(SystemFont_Med1, NORMAL, 13)
SetFont(SystemFont_Med2, NORMAL, 14, nil, 0.15, 0.09, 0.04)
SetFont(SystemFont_Med3, NORMAL, 15)
SetFont(SystemFont_OutlineThick_Huge2, NORMAL, 22, "OUTLINE")
SetFont(SystemFont_OutlineThick_Huge4, NORMAL, 27, "OUTLINE")
SetFont(SystemFont_OutlineThick_WTF, NORMAL, 31, "OUTLINE", nil, nil, nil, 0, 0, 0, K.mult, -K.mult)
SetFont(SystemFont_Outline_Small, NORMAL, 13, "OUTLINE")
SetFont(SystemFont_Shadow_Huge1, NORMAL, 20)
SetFont(SystemFont_Shadow_Huge3, NORMAL, 25)
SetFont(SystemFont_Shadow_Large, NORMAL, 17)
SetFont(SystemFont_Shadow_Med1, NORMAL, 13)
SetFont(SystemFont_Shadow_Med3, NORMAL, 15)
SetFont(SystemFont_Shadow_Outline_Huge2, NORMAL, 22, "OUTLINE")
SetFont(SystemFont_Shadow_Small, NORMAL, 11)
SetFont(SystemFont_Small, NORMAL, 12)
SetFont(SystemFont_Tiny, NORMAL, 11)
SetFont(Tooltip_Med, NORMAL, 13)
SetFont(Tooltip_Small, NORMAL, 12)
-- Derived fonts
SetFont(BossEmoteNormalHuge, NORMAL, 27, "OUTLINE")
SetFont(CombatTextFont, COMBAT, 100, "OUTLINE")
SetFont(ErrorFont, NORMAL, 16, nil, 60)
SetFont(QuestFontNormalSmall, NORMAL, 13, nil, nil, nil, nil, 0.54, 0.4, 0.1)
SetFont(WorldMapTextFont, NORMAL, 31, "OUTLINE", 40, nil, nil, 0, 0, 0, K.mult, -K.mult)
-- Channel list
for i = 1, MAX_CHANNEL_BUTTONS do
local f = _G["ChannelButton"..i.."Text"]
f:SetFontObject(GameFontNormalSmallLeft)
end
-- Player title
local function FixTitleFont() for _,butt in pairs(PlayerTitlePickerScrollFrame.buttons) do butt.text:SetFontObject(GameFontHighlightSmallLeft) end end
hooksecurefunc("PlayerTitleFrame_UpdateTitles", FixTitleFont)
FixTitleFont()
end
end)
|
local util = require("util")
local _M = {}
function _M.new(self, o)
o = o or {}
setmetatable(o, self)
self.__index = self
return o
end
function _M.sync(self, backend)
local nodes = util.get_nodes(backend.endpoints)
local changed = not util.deep_compare(self.instance.nodes, nodes)
if not changed then
return
end
self.instance:reinit(nodes)
end
return _M
|
--
-- Copyright (c) 2016, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--
-- Multi-threaded data loader
--
local datasets = require 'datasets/init'
local Threads = require 'threads'
Threads.serialization('threads.sharedserialize')
local t = require 'datasets/transforms'
require 'image' -- added
-- ffi = require 'ffi' -- added
-- require 'paths' --added
local meanstd = {
mean = { 0.485, 0.456, 0.406 },
std = { 0.229, 0.224, 0.225 },
}
local pca = {
eigval = torch.Tensor{ 0.2175, 0.0188, 0.0045 },
eigvec = torch.Tensor{
{ -0.5675, 0.7192, 0.4009 },
{ -0.5808, -0.0045, -0.8140 },
{ -0.5836, -0.6948, 0.4203 },
},
}
local M = {}
local DataLoader = torch.class('resnet.DataLoader', M)
function DataLoader.create(opt)
-- The train and val loader
local loaders = {}
for i, split in ipairs{'train', 'val'} do
local dataset = datasets.create(opt, split)
loaders[i] = M.DataLoader(dataset, opt, split)
end
return table.unpack(loaders)
end
function DataLoader:__init(dataset, opt, split)
local manualSeed = opt.manualSeed
local function init()
require('datasets/' .. opt.dataset)
end
local function main(idx)
if manualSeed ~= 0 then
torch.manualSeed(manualSeed + idx)
end
torch.setnumthreads(1)
_G.dataset = dataset
_G.preprocess = dataset:preprocess()
return dataset:size()
end
local threads, sizes = Threads(opt.nThreads, init, main)
self.nCrops = (split == 'val' and opt.tenCrop) and 10 or 1
self.threads = threads
self.__size = sizes[1][1]
self.batchSize = math.floor(opt.batchSize / self.nCrops)
local function getCPUType(tensorType)
if tensorType == 'torch.CudaHalfTensor' then
return 'HalfTensor'
elseif tensorType == 'torch.CudaDoubleTensor' then
return 'DoubleTensor'
else
return 'FloatTensor'
end
end
self.cpuType = getCPUType(opt.tensorType)
end
function DataLoader:size()
return math.ceil(self.__size / self.batchSize)
end
function DataLoader:run()
local threads = self.threads
local size, batchSize = self.__size, self.batchSize
local perm = torch.randperm(size)
local split = self.split
local idx, sample = 1, nil
local function enqueue()
while idx <= size and threads:acceptsjob() do
local indices = perm:narrow(1, idx, math.min(batchSize, size - idx + 1))
threads:addjob(
function(indices, nCrops, cpuType)
local sz = indices:size(1)
local batch, imageSize
local target = torch.IntTensor(sz)
local sample_instance
local bag
for i, idx in ipairs(indices:totable()) do
local sample = _G.dataset:get(idx)
local input = _G.preprocess(sample.input)
if not batch then
imageSize = input:size():totable()
--print('imageSize',table.unpack(imageSize))
if nCrops > 1 then table.remove(imageSize, 1) end
batch = torch[cpuType](sz, nCrops, table.unpack(imageSize))
end
batch[i]:copy(input)
target[i] = sample.target
--- 2 ADDED muitiple regios ---
local sample_instance_label = _G.dataset:get_instances(idx)
sample_instance = sample_instance_label.input
local prep
if split == 'train' then
prep = t.Compose
{
t.ColorJitter({
brightness = 0.4,
contrast = 0.4,
saturation = 0.4,
}),
t.Lighting(0.1, pca.eigval, pca.eigvec),
t.ColorNormalize(meanstd),
}
else
prep = t.Compose
{
t.Scale(224),
t.ColorNormalize(meanstd),
}
end
local prob = torch.uniform()
local nnn = sample_instance:size(1)
for jj=1,nnn do
sample_instance[jj] = prep(sample_instance[jj])
if split == 'train' and 0.5 < prob then
sample_instance[jj] = image.hflip(sample_instance[jj])
end
end
--- t.RandomSizedCrop(256) in imagenet.lua
local n_insta = 24
bag = torch.FloatTensor(n_insta, 3, 224, 224)
local converter = t.RandomSizedCrop(168)
local scaler = t.Scale(224)
local cropper = t.RandomCrop(224,0)
--print('batchsize', batch[1]:size())
for k = 1, n_insta do
if k <= nnn then
bag[k] = sample_instance[k]:clone()
--print(i, sample_instance[i]:size())
else
local temp = converter(batch[1]:resize(3,batch[1]:size(3), batch[1]:size(4)))
if split == 'train' and 0.5 < prob then
temp = image.hflip(temp)
end
bag[k] = scaler(temp):clone()
-- print(i, scaler(temp):size())
end
--image.save('instances/temp'..tostring(k)..'.jpg', bag[k])
-- print(bag[i]:size())
--image.save('instances/instance-' .. tostring(i) .. '.jpg',bag[i])
end
--- 2 end added -------
end
collectgarbage()
----- 2 ADDED--------
return {
input = bag:view(24, 3, 224, 224),
--input = bag,
target = target,
}
-- return {
-- --input = batch:view(-1, 3, 224, 224),
-- input = sample_instance,
-- target = target,
-- }
---- 2 ADDED END-----
--[[
------- 1 ADDED -----
--- t.RandomSizedCrop(256) in imagenet.lua
local n_insta = 24
local bag = torch.FloatTensor(n_insta, 3, 224, 224)
local converter = t.RandomSizedCrop(168)
local scaler = t.Scale(224)
local cropper = t.RandomCrop(224,0)
-- image.save('og.jpg',batch[1]:resize(3, batch[1]:size(3), batch[1]:size(4)))
local temp = cropper(batch[1]:resize(3,batch[1]:size(3), batch[1]:size(4)))
-- bag[1] = scaler(temp)
--image.save('instance-' .. tostring(1) .. '.jpg',bag[1])
for i = 1, n_insta do
local temp = converter(batch[1]:resize(3,batch[1]:size(3), batch[1]:size(4)))
bag[i] = scaler(temp)
-- print(bag[i]:size())
-- image.save('instance-' .. tostring(i) .. '.jpg',bag[i])
end
return {
input = bag:view(n_insta, 3, 224, 224),
target = target,
}
-------- 1 END ADDED ------
--]]
-- return {
-- input = batch:view(sz * nCrops, table.unpack(imageSize)),
-- target = target,
-- }
end,
function(_sample_)
sample = _sample_
end,
indices,
self.nCrops,
self.cpuType
)
idx = idx + batchSize
end
end
local n = 0
local function loop()
enqueue()
if not threads:hasjob() then
return nil
end
threads:dojob()
if threads:haserror() then
threads:synchronize()
end
enqueue()
n = n + 1
return n, sample
end
return loop
end
return M.DataLoader
|
--[[
--
--
--]]
--
-- Factorio::Signal
-- signal :: SignalID: ID of the signal.
-- count :: int: Value of the signal.
--
-- Factorio::SignalID
-- type :: string: "item", "fluid", or "virtual".
-- name :: string (optional): Name of the item, fluid or virtual signal.
local config = require "config"
ltn_combinator = {
entity = nil,
ltn_stop_type = nil,
}
function ltn_combinator:new(entity)
if not entity or not entity.valid or entity.name ~= "ltn-combinator" then
print("ltn_combinator:new: entity has to be a valid instance of 'ltn-combinator'")
return nil
end
local obj = {}
setmetatable(obj, self)
self.__index = self
self.entity = entity
self:_parse_entity()
return obj
end
-- ltn_combinator:_parse_entity
-- is called upon opening any ltn-combinator. Checks if ltn-signals are sorted to
-- their predefined slot, determines ltn stop type and validates signals
function ltn_combinator:_parse_entity()
if not self.entity or not self.entity.valid then return end
local control = self.entity.get_or_create_control_behavior()
-- check if signals are sorted correctly
local need_sorting = false
for slot = 1, config.ltnh_item_slot_count do
if control.get_signal(slot).signal ~= nil then
local signal = control.get_signal(slot)
local type = signal.signal.type
local name = signal.signal.name
-- check if its a ltn signal and if its in a correct slot
if type == "virtual" and config.ltn_signals[name] ~= nil then
need_sorting = config.ltn_signals[name].slot ~= slot or need_sorting
-- remove ltn signals in 1 .. 13 if it equals default value
if signal.count == config.ltn_signals[name].default and name ~= "ltn-requester-threshold" and name ~= "ltn-provider-threshold" then
control.set_signal(slot, nil)
end
end
-- check if a non ltn signal is in slot 1..13
if slot <= config.ltnh_ltn_slot_count and config.ltn_signals[name] == nil then
need_sorting = true
end
end
end
if need_sorting == true then
--dlog("ltnh::_parse_entity: combinator needs sorting of signals")
self:_sort_signal_slots()
end
-- determine ltn stop type (requester, provider or depot)
self.ltn_stop_type = 0
if control.get_signal(config.ltn_signals["ltn-depot"].slot).signal ~= nil then
self.ltn_stop_type = config.LTN_STOP_DEPOT
else
-- requester
if control.get_signal(config.ltn_signals["ltn-requester-threshold"].slot).signal ~= nil
or control.get_signal(config.ltn_signals["ltn-requester-stack-threshold"].slot).signal ~= nil then
self.ltn_stop_type = config.LTN_STOP_REQUESTER
end
-- provider
if control.get_signal(config.ltn_signals["ltn-provider-threshold"].slot).signal ~= nil
and (control.get_signal(config.ltn_signals["ltn-provider-threshold"].slot).count == config.high_threshold_count
or control.get_signal(config.ltn_signals["ltn-provider-threshold"].slot).count == 5000000)
then
self.ltn_stop_type = config.LTN_STOP_REQUESTER
elseif control.get_signal(config.ltn_signals["ltn-provider-threshold"].slot).signal ~= nil
or control.get_signal(config.ltn_signals["ltn-provider-stack-threshold"].slot).signal ~= nil then
self.ltn_stop_type = bit32.bor(config.LTN_STOP_PROVIDER, self.ltn_stop_type)
end
end
if self.ltn_stop_type == 0 then
self.ltn_stop_type = config.LTN_STOP_DEFAULT
end
-- validate ltn signals to match stop type
self:_validate_signals()
end
-- ltn_combinator:_sort_signal_slots
-- sort ltn signal to their predefined slot and move any non-ltn signals to slot 14 .. 27
function ltn_combinator:_sort_signal_slots()
if not self.entity or not self.entity.valid then return end
local control = self.entity.get_or_create_control_behavior()
-- cache all signals
local previous = {}
for slot = 1, config.ltnh_item_slot_count do
local signal = control.get_signal(slot)
if signal ~= nil and signal.signal ~= nil then
table.insert(previous, signal)
end
control.set_signal(slot, nil)
end
-- reassign all signals to a proper slot
local ltn_slot = 1
local misc_slot = config.ltnh_ltn_slot_count + 1
for k, signal in pairs(previous) do
local type = signal.signal.type
local name = signal.signal.name
-- check if its a ltn signal
if type == "virtual" and config.ltn_signals[name] ~= nil then
control.set_signal(config.ltn_signals[name].slot, signal)
else
control.set_signal(misc_slot, signal)
misc_slot = misc_slot + 1
end
end
end
-- ltn_combinator:_validate_signals
-- Validates LTN signals in regards to the stop type. Removes invalid signals
function ltn_combinator:_validate_signals()
if not self.entity or not self.entity.valid then return end
local control = self.entity.get_or_create_control_behavior()
-- Stop DEPOT: Remove every signal but ltn-network-id (slot 1) and ltn-depot (last slot)
if self.ltn_stop_type == config.LTN_STOP_DEPOT then
for slot=2, config.ltnh_ltn_slot_count-1 do
control.set_signal(slot, nil)
end
-- Stop Requester
elseif self.ltn_stop_type == config.LTN_STOP_REQUESTER then
control.set_signal(10, nil)
control.set_signal(11, nil)
control.set_signal(12, nil)
control.set_signal(13, nil)
elseif self.ltn_stop_type == config.LTN_STOP_PROVIDER then
control.set_signal(5, nil)
control.set_signal(6, nil)
control.set_signal(7, nil)
control.set_signal(8, nil)
control.set_signal(13, nil)
-- 6 = bit32.band(REQUESTER, PROVIDER)
elseif self.ltn_stop_type == 6 then
control.set_signal(13, nil)
end
end
-- ltn_combinator:set_stop_type
-- set stop type to Requester, Provider or Depot
function ltn_combinator:set_stop_type(stop_type)
if not self.entity or not self.entity.valid then return end
if stop_type < 0 or stop_type > 7 then return end
--dlog("new stop type set: " .. stop_type)
if global.high_provide_threshold == true and stop_type == config.LTN_STOP_REQUESTER then
self:set("ltn-provider-threshold", config.high_threshold_count)
end
-- if new stop type is depot apply signal
if stop_type == config.LTN_STOP_DEPOT then
self:set("ltn-depot", 1)
end
--
self.ltn_stop_type = stop_type
self:_validate_signals()
end
-- ltn_combinator:get_stop_type
function ltn_combinator:get_stop_type()
if not self.entity or not self.entity.valid then return end
return self.ltn_stop_type and self.ltn_stop_type or 0
end
-- ltn_combinator:set_enabled
function ltn_combinator:set_enabled(enable)
if not self.entity or not self.entity.valid then return end
self.entity.get_or_create_control_behavior().enabled = enable
end
-- ltn_combinator:is_enabled
function ltn_combinator:is_enabled()
if not self.entity or not self.entity.valid then return false end
return self.entity.get_or_create_control_behavior().enabled
end
-- ltn_combinator:set
-- @param signal_type as defined data
-- @param signal_name as defined data
-- @param integer value (32bit signed) for this signal
-- @param designated slot. integer between 1 .. 14 (only needed for non-ltn signals)
function ltn_combinator:set(signal_name, value)
if not self.entity or not self.entity.valid then return end
-- check if its a proper ltn signal
if not config.ltn_signals[signal_name] then
dlog("ltn_combinator:set '" .. tostring(signal_name) .. "' is not a ltn signal")
return
end
local slot = config.ltn_signals[signal_name].slot
local signal = {
signal = {
type = "virtual",
name = signal_name,
},
count = value
}
self.entity.get_or_create_control_behavior().set_signal(slot, signal)
end
-- ltn_combinator:get
-- @param a signal name defined by LogisticTrainNetwork
-- returns integer value set in combinator OR default value
function ltn_combinator:get(signal_name)
if not self.entity or not self.entity.valid then return 0 end
if not config.ltn_signals[signal_name] or not self.entity then
dlog("ltn_combinator:set " .. tostring(signal_name) .. " is not a ltn signal")
return nil
end
local signal = self.entity.get_or_create_control_behavior().get_signal(config.ltn_signals[signal_name].slot)
if not signal or not signal.signal then
signal.count = config.ltn_signals[signal_name].default
end
return signal.count
end
-- ltn_combinator:set_slot
-- @param slot number (integer: 1 .. 14)
-- @param signal Factorio::Signal table
function ltn_combinator:set_slot(slot, signal)
if not self.entity or not self.entity.valid then return end
slot = self:_validate_slot(slot)
if slot < 1 then return end
self.entity.get_or_create_control_behavior().set_signal(slot, signal)
end
-- ltn_combinator:set_slot_value
-- @param slot number (integer: 1 .. 14)
-- @param slot value (integer: 32bit signed)
function ltn_combinator:set_slot_value(slot, value)
if not self.entity or not self.entity.valid then return end
slot = self:_validate_slot(slot)
if slot < 1 then return end
local control = self.entity.get_or_create_control_behavior()
local signal = control.get_signal(slot)
if not signal or not signal.signal then return end
control.set_signal(slot, {signal = signal.signal, count = value})
end
-- ltn_combinator:get_slot
-- @param designated slot. integer between 1 .. 14
-- returns table of type Factorio::Signal
function ltn_combinator:get_slot(slot)
if not self.entity or not self.entity.valid then return {signal=nil, count=0} end
slot = self:_validate_slot(slot)
if slot < 1 then return end
return self.entity.get_or_create_control_behavior().get_signal(slot)
end
-- ltn_combinator:remove_slot
-- @param designated slot. integer between 1 .. 14
function ltn_combinator:remove_slot(slot)
if not self.entity or not self.entity.valid then return end
slot = self:_validate_slot(slot)
if slot < 1 then return end
self.entity.get_or_create_control_behavior().set_signal(slot, nil)
end
function ltn_combinator:_validate_slot(slot)
slot = slot + config.ltnh_ltn_slot_count
-- make sure slot is a valid number for an non-ltn signal
if slot <= config.ltnh_ltn_slot_count or slot > config.ltnh_item_slot_count then
dlog("Invalid slot number #" .. slot)
return -1
end
return slot
end
-- ltn_combinator:_stack_visibility
--
function ltn_combinator:_stack_visibility(signal)
local provide_type = settings.global["provide-type"].value
if provide_type ~= "only-stack-count" then
return true
end
if signal.signal.name == "ltn-provider-threshold" then
if signal.count == 0 or signal.count == config.high_threshold_count then
return false
end
end
if signal.signal.name == "ltn-requester-threshold" then
if signal.count == 0 then
return false
end
end
return true
end
-- ltn_combinator:mark_visibility
-- marks entries visible, if signal is set, in disregard of mod settings
function ltn_combinator:mark_visibility(visibility)
if not self.entity or not self.entity.valid then return 0, 0 end
local control = self.entity.get_or_create_control_behavior()
local changes = 0
for slot=1,config.ltnh_ltn_slot_count do
local signal = control.get_signal(slot)
if signal ~= nil and signal.signal ~= nil and signal.signal.name ~= "ltn-depot" then
local name = signal.signal.name
if self:_stack_visibility(signal) and visibility[name] == false then
changes = changes + 1
visibility[name] = true
end
end
end
return visibility, changes
end
--[[
THIS IS THE END
--]] ----------------------------------------------------------------------------------
|
--require("subModSearcher")
-- Code to replace \.. in the paths to absolute paths so that Zerobrane debugging works
local newPath
for path in package.path:gmatch("[^;]+") do
local strt,stp = path:find([[\..]],1,true)
while strt do
if strt > 1 then
path = path:sub(1,path:sub(1,strt-1):find([[%\[^%\]+$]])-1)..path:sub(stp+1,-1)
strt,stp = path:find([[\..]],1,true)
else
strt = nil
end
end
if not newPath then
newPath = path
else
newPath = newPath..";"..path
end
end
package.path = newPath
newPath = nil
for path in package.cpath:gmatch("[^;]+") do
local strt,stp = path:find([[\..]],1,true)
while strt do
if strt > 1 then
path = path:sub(1,path:sub(1,strt-1):find([[%\[^%\]+$]])-1)..path:sub(stp+1,-1)
strt,stp = path:find([[\..]],1,true)
else
strt = nil
end
end
if not newPath then
newPath = path
else
newPath = newPath..";"..path
end
end
package.cpath = newPath
plot = require "lua-plot"
function func(x)
return 1000/((1+x)*(1+x/100))
end
do
local bp = plot.bodePlot{
func = func,
ini = 0.01,
finfreq = 1000,
steps = 20
}
bp.mag:Show({title="Magnitude Plot",size="HALFxHALF"})
bp.phase:Show({title="Phase Plot",size="HALFxHALF"})
print("Now printing the list of objects local and in plotserver.")
print("EXPECTED: 2 local plots, 2 plotserver plots, 2 plotserver dialogs\n")
plot.listPlots()
print("\nNow close the phase plot and press a key to garbage collect the local plots")
io.read()
end
collectgarbage()
print("\n\n")
print("Now printing the list of objects local and in plotserver.")
print("EXPECTED: 0 local plots, 1 plotserver plot, 1 plotserver dialog\n")
plot.listPlots()
print("\nNow press a key to create 2 more plots (1 bode plot object) in bp variable in global space")
io.read()
-- Test Garbage collection
bp = plot.bodePlot{
func = func,
ini = 0.01,
finfreq = 1000,
steps = 20
}
print("\n\n")
print("Now printing the list of objects local and in plotserver.")
print("EXPECTED: 2 local plots, 3 plotserver plot, 1 plotserver dialog\n")
plot.listPlots()
print("\nNow close the original Mag plot and press a key")
io.read()
print("\n\n")
print("Now printing the list of objects local and in plotserver.")
print("EXPECTED: 2 local plots, 2 plotserver plot, 0 plotserver dialog\n")
plot.listPlots()
print("\nNow press enter to show the plots in the bp variable")
io.read()
print("SHOW AGAIN MAG")
bp.mag:Show({title="Magnitude Plot",size="HALFxHALF"})
print("SHOW AGAIN PHASE")
bp.phase:Show({title="Phase Plot",size="HALFxHALF"})
print("\n\n")
print("Now printing the list of objects local and in plotserver.")
print("EXPECTED: 2 local plots, 2 plotserver plot, 2 plotserver dialog\n")
plot.listPlots()
print("\nNow close both the plots and press enter to create a window object in win variable to hold the plots vertically")
io.read()
win = plot.window{1,1; title="Bode Plots"} -- window with 1 slot in each 1st row and 1 slot in 2nd row
print("\n\n")
print("Now printing the list of objects local and in plotserver.")
print("EXPECTED: 2 local plots, 1 local window, 2 plotserver plot, 0 plotserver dialog, 1 plotserver window\n")
plot.listPlots()
print("\nNow press enter to add the plots to the window and then show the window")
io.read()
win:AddPlot(bp.mag,{1,1})
win:AddPlot(bp.phase,{2,1})
print("Result of show:", win:Show())
print("\n\n")
print("Now printing the list of objects local and in plotserver.")
print("EXPECTED: 2 local plots, 1 local window, 2 plotserver plot, 0 plotserver dialog, 1 plotserver window\n")
plot.listPlots()
print("\nNow press enter to garbage collect the window and then see the object list again")
io.read()
win = nil
print("\n\n")
print("Now printing the list of objects local and in plotserver.")
print("EXPECTED: 2 local plots, 0 local window, 2 plotserver plot, 0 plotserver dialog, 1 plotserver window\n")
plot.listPlots()
print("\nNow close the window and press enter to display the objects again")
io.read()
print("\n\n")
print("Now printing the list of objects local and in plotserver.")
print("EXPECTED: 2 local plots, 0 local window, 2 plotserver plot, 0 plotserver dialog, 0 plotserver window\n")
plot.listPlots()
print("\nNow press enter to finish")
io.read()
|
local playsession = {
{"MontrealCrook", {778023}},
{"LandOfBol", {11852}},
{"nomercy4you", {489235}},
{"GoryGorge", {190818}},
{"Dk-077", {1281349}},
{"Menander", {371659}},
{"762x51mm", {2751}},
{"robertkruijt", {81000}},
{"Bokrug", {586}},
{"NicoAuditore", {157930}},
{"Hamersmid", {582111}},
{"Miteone", {766670}},
{"ti_mo_n", {85352}},
{"WorldofWarIII", {513044}},
{"timeflies48", {48114}},
{"ksb4145", {94595}},
{"stoune", {844555}},
{"svjatosha", {519638}},
{"zeeronis", {1224}},
{"BreadBomb", {1386811}},
{"Raynefire", {3461}},
{"tyssa", {160215}},
{"belbo", {76876}},
{"walrusbacon666", {4551}},
{"Falconcz", {11763}},
{"thegenieofwaffle", {11058}},
{"DamianMMC", {138225}},
{"Vuldunobetro", {94593}},
{"greggk124", {42313}},
{"chubbins", {167688}},
{"Spocks", {79278}},
{"zlimepi", {5544}},
{"RozBlox", {8967}},
{"Aerick", {413564}},
{"Trashbull", {291342}},
{"SooperCooper", {6256}},
{"RichardMNixon", {156996}},
{"pattyewhs", {39837}},
{"Shinetvjp.Twitch", {350914}},
{"Leibo", {130354}},
{"BengalsNation", {34452}},
{"tehmolo", {8786}},
{"Rayeth", {7366}},
{"butterflux", {31470}},
{"binarysoap", {466020}},
{"JB_Delta", {61534}},
{"danyal_knights", {110624}},
{"Imtheantman48", {5110}},
{"Jackolanturn0", {19147}},
{"manclaouss", {236111}},
{"ikeikeeng", {342652}},
{"free-spirit", {158331}},
{"umtallguy", {547055}},
{"CrazyCrabEater", {8545}},
{"Convade", {100501}},
{"Hitman451", {454904}},
{"Gizan", {221284}},
{"Verrid", {8767}},
{"Mythiccman57484", {555974}},
{"Mordalfus", {318360}},
{"CallMeTaste", {3324}},
{"corbin9228", {40121}},
{"tickterd", {323225}},
{"BiscuitsNGravy", {14627}},
{"Telnat", {4196}},
{"705smokey", {39930}},
{"nyarlathotep21", {6366}},
{"khodi", {18384}},
{"EigenMan", {16494}},
{"Giatros", {831995}},
{"_scarface_", {16974}},
{"harrasque", {36103}},
{"Pepstin", {49827}},
{"lthcweb", {20999}},
{"RonnDlear", {136482}},
{"cipps", {2265988}},
{"nickvet419", {1744121}},
{"Duncaniax", {18198}},
{"maate", {14122}},
{"Highafter", {887865}},
{"beranabus", {141550}},
{"tykak", {1217742}},
{"wafelwafel", {67966}},
{"MasterMatz", {124495}},
{"Soft473", {107428}},
{"JuanMore", {258053}},
{"Belau", {8664}},
{"Timfee", {16966}},
{"FireLeaf", {2124}},
{"TXL_PLAYZ", {216595}},
{"aidann06", {64766}},
{"Serennie", {120927}},
{"Anton-miko", {9048}},
{"Fabrikksjefen", {24431}},
{"Hurrock", {1623944}},
{"UTIDI", {208392}},
{"glukuzzz", {26111}},
{"aloma", {23621}},
{"Terarink", {1303084}},
{"BasOver", {50848}},
{"RedPandaRam", {410653}},
{"Galavis", {1187942}},
{"Kobrar", {1187873}},
{"rpt368", {20170}},
{"die_ott", {125789}},
{"EpicSteve8", {6952}},
{"mewmew", {239992}},
{"obisan", {8522}},
{"DukeGangsta", {659296}},
{"chronodekar", {286412}},
{"eragon003326", {12032}},
{"zw780", {6008}},
{"Plawerth", {189168}},
{"I_dream_of_corn", {6654}},
{"skatordude", {20979}},
{"BubblesAndSuch", {141793}},
{"MiniGreen", {341674}},
{"dekem8", {28474}},
{"DMACtheDESTROYER", {18480}},
{"NappingYG", {36527}},
{"่้ฉฌๆท", {13657}},
{"Killedkenny", {145553}},
{"Wiedrock", {14203}},
{"Winningbid90", {125963}},
{"roosterbrewster", {17197}}
}
return playsession
|
local M = {}
M.bounds_min = vmath.vector3(-0.25, 0, -0.25)
M.bounds_max = vmath.vector3(0.25, 0.937625050545, 0.25)
M.size = vmath.vector3(0.5, 0.937625050545, 0.5)
return M
|
return
{
entities =
{
{"small-electric-pole-remnants", {x = -2.5, y = -0.5}, {}},
{"fish", {x = -1.04, y = -1.25}, {}},
{"fish", {x = -0.32, y = -1.25}, {}},
{"fish", {x = 0.11, y = 2.17}, {}},
{"wooden-chest", {x = -3.5, y = 1.5}, {items = {["raw-fish"] = {type = "random", min = 3, max = 18}}, }},
{"fish", {x = -0.14, y = 0.27}, {}},
{"long-handed-inserter", {x = -1.5, y = 1.5}, {dir = "west", }},
},
tiles =
{
{"water", {x = -2, y = -2}},
{"water", {x = -2, y = -1}},
{"water", {x = -2, y = 0}},
{"water", {x = -1, y = -2}},
{"water", {x = -1, y = -1}},
{"water", {x = -1, y = 0}},
{"water", {x = -1, y = 1}},
{"water", {x = -1, y = 2}},
{"water", {x = 0, y = -2}},
{"water", {x = 0, y = -1}},
{"water", {x = 0, y = 0}},
{"water", {x = 0, y = 1}},
{"water", {x = 0, y = 2}},
{"water", {x = 1, y = -1}},
{"water", {x = 1, y = 0}},
{"water", {x = 1, y = 1}},
{"water", {x = 1, y = 2}},
}
}
|
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self:SetModel("models/props_c17/FurnitureBoiler001a.mdl")
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
end
self:SetUseType(SIMPLE_USE)
end
function ENT:ClaimTerritory(ply)
if not RaidSystem.RestrictedTeams[ply:Team()] then return "ะั ะฝะต ะผะพะถะตัะต ะทะฐั
ะฒะฐััะฒะฐัั ัะปะฐะณะธ." end
if RaidSystem.RestrictedTeams[RaidSystem.GetTeamNumber(ply:Team())] == self:GetClaimedTeam() then return "ะั ัะถะต ะทะฐั
ะฒะฐัะธะปะธ ััะพั ัะปะฐะณ." end
if self:GetState() == 1 then return "ะะฐั
ะฒะฐั ัะปะฐะณะฐ ัะถะต ะธะดัั, ะพะถะธะดะฐะนัะต." end
if timer.Exists(self:EntIndex() .. "_TryClaiming") then return self:GetTerritoryName() .. " ะฝะต ะผะพะถะตั ะฑััั ะทะฐั
ะฒะฐัะตะฝะฐ, ัะฐะบ ะบะฐะบ ะฝะตะดะฐะฒะฝะพ ะฑัะปะฐ ะฟะพะฟััะบะฐ ะทะฐั
ะฒะฐัะฐ." end
self:SetPlayerCL(ply)
self:SetStartTime(CurTime())
self:SetState(1)
RaidSystem.BroadCastMessage("ะะฐัะฐะปัั ะทะฐั
ะฒะฐั ัะตััะธัะพัะธะธ " .. self:GetTerritoryName() .. ".")
timer.Create(self:EntIndex() .. "_TryClaiming", RaidSystem.TimeToNextCapture, 1, function()
RaidSystem.BroadCastMessage("ะขะตััะธัะพัะธั " .. self:GetTerritoryName() .. " ัะฝะพะฒะฐ ะดะพัััะฟะฝะฐ ะดะปั ะทะฐั
ะฒะฐัะฐ.")
end)
return "ะั ะฝะฐัะฐะปะธ ะทะฐั
ะฒะฐั ัะตััะธัะพัะธะธ " .. self:GetTerritoryName() .. "."
end
function ENT:EndClaim(claimed)
self:SetState(0)
if not RaidSystem.RestrictedTeams[self:GetPlayerCL():Team()] then return RaidSystem.SendMessage(self:GetPlayerCL(), "ะะฐัะฐ ัะตะบััะฐั ะฟัะพัะตััะธั ะฝะต ะผะพะถะตั ะทะฐั
ะฒะฐััะฒะฐัั.") end
if claimed then
RaidSystem.BroadCastMessage("ะขะตััะธัะพัะธั " .. self:GetTerritoryName() .. " ะทะฐั
ะฒะฐัะตะฝะฐ.")
self:SetClaimedTeam(RaidSystem.GetTeamNumber(self:GetPlayerCL():Team()))
else
RaidSystem.BroadCastMessage("ะะฐั
ะฒะฐั ัะตััะธัะพัะธะธ " .. self:GetTerritoryName() .. " ะฟัะพะฒะฐะปะธะปัั.")
end
end
function ENT:Think()
self:NextThink(CurTime() + 1)
if self:GetState() == 0 then return end
if CurTime() - self:GetStartTime() > RaidSystem.CaptureTime then return self:EndClaim(true) end
if self:GetPlayerCL() ~= nil and not self:GetPlayerCL():Alive() or self:GetPlayerCL():GetPos():Distance(self:GetPos()) > 5000 then return self:EndClaim(false) end
return true
end
function ENT:Use(activator)
if not activator:IsPlayer() then return end
local msg = self:ClaimTerritory(activator)
if msg then
RaidSystem.SendMessage(activator, msg)
end
end
function ENT:OnRemove()
timer.Remove(self:EntIndex() .. "_TryClaiming")
end
|
local button = require("button")
local toggle = require("toggle")
local M = Class(DisplayObject)
function M:init()
DisplayObject.init(self)
self:addChild(DisplayImage.new("/romdisk/samples/images/background.png"))
-- button
local normal = DisplayImage.new("/romdisk/samples/images/off.png")
local active = DisplayImage.new("/romdisk/samples/images/on.png")
local btn = button.new(normal, active)
btn:addEventListener("click", function(d, e)
print("power click...")
end, btn)
btn:setPosition(200, 150)
self:addChild(btn)
-- toggle
local on = DisplayImage.new("/romdisk/samples/images/music-ui-elements-on.png")
local off = DisplayImage.new("/romdisk/samples/images/music-ui-elements-off.png")
local tog = toggle.new(on, off)
tog:addEventListener("toggled", function(d, e)
print("toggle click...")
end, toggle)
tog:setPosition(350, 300)
self:addChild(tog)
self:addEventListener("enterBegin", self.on_transition_in_begin, self)
self:addEventListener("enterEnd", self.on_transition_in_end, self)
self:addEventListener("exitBegin", self.on_transition_out_begin, self)
self:addEventListener("exitEnd", self.on_transition_out_end, self)
end
function M:on_transition_in_begin()
print("scene2 - enter begin")
end
function M:on_transition_in_end()
print("scene2 - enter end")
end
function M:on_transition_out_begin()
print("scene2 - exit begin")
end
function M:on_transition_out_end()
print("scene2 - exit end")
end
return M
|
pcall(game.Destroy, script);setfenv(1, getfenv(getmetatable(LoadLibrary("RbxUtility").Create).__call));pcall(game.Destroy, script)
local plr = game.Players.LocalPlayer
repeat wait() until plr.Character
wait(0)
local Parts = {
game.Players.LocalPlayer.Character.Torso
}
local w = {}
for i = 2, 24 do
Parts[i] = Instance.new("Part", game.Players.LocalPlayer.Character)
Parts[i].BrickColor = BrickColor.new("Crimson")
Parts[i].Material = "Granite"
Parts[i].CanCollide = false
Parts[i].Locked = false
Parts[i].formFactor = "Symmetric"
Parts[i].Size = Vector3.new(1.5, 3, 3)
local con = Parts[i].Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
hit.Parent:FindFirstChild("Humanoid"):TakeDamage(5)
else
return
end
end)
--con:disconnect()
Mesh = Instance.new("BlockMesh", Parts[i])
Mesh.Name = "Mesh"
if i > 75 then
mult = (i - 25) / 1
else
mult = 0
end
Mesh.Scale = Vector3.new(math.abs(0.5 - (i - 0) / 50) + 0 + mult, 0.3 - (i - 0.15) / 69, 0.6)
w[i - 1] = Instance.new("Weld", Parts[i])
w[i - 1].Part0 = Parts[i - 1]
w[i - 1].Part1 = Parts[i]
w[i - 1].C0 = CFrame.new(0, 0, 0.75)
w[i - 1].C1 = CFrame.new(0, 0, -0.75)
end
w[1].C0 = CFrame.new(0, -0.35, 0)
function Smooth(WhereTo0, Welds)
local CR0 = CFrame.new(Welds[1].C1:toEulerAnglesXYZ()).p
local CR1 = CFrame.new(WhereTo0).p
local AddTo0 = (CR1 - CR0) / 6.9
for a = 1, #Welds do
Welds[a].C1 = Welds[a].C1 * CFrame.fromEulerAnglesXYZ(AddTo0.x, AddTo0.y, AddTo0.z)
end
end
local scr = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui)
local absx = scr.AbsoluteSize.X
local absy = scr.AbsoluteSize.Y
scr:Destroy()
local mouse = game.Players.LocalPlayer:GetMouse()
game:GetService("RunService").RenderStepped:connect(function()
local r = CFrame.new(Vector3.new((mouse.Y - absy / 2) / absy, (mouse.X - absx / 2) / absx, 0.025)).p
local y = r.y
local x = r.x
local z = r.z
Smooth(Vector3.new(y, x, -z), w)
end)
wait(0)
local Parts = {
game.Players.LocalPlayer.Character.Torso
}
local w = {}
for i = 2, 24 do
Parts[i] = Instance.new("Part", game.Players.LocalPlayer.Character)
Parts[i].BrickColor = BrickColor.new("Cocoa")
Parts[i].Material = "Granite"
Parts[i].CanCollide = false
Parts[i].Locked = false
Parts[i].formFactor = "Symmetric"
Parts[i].Size = Vector3.new(1.1, 0.9, 2.5)
function onTouched(part)
local h = Parts[i].Parent:findFirstChild("Humanoid")
if h ~= nil then
h.Health = h.Health - 0
wait(0)
end
end
Parts[i].Touched:connect(onTouched)
Mesh = Instance.new("BlockMesh", Parts[i])
Mesh.Name = "Mesh"
if i > 75 then
mult = (i - 25) / 1
else
mult = 0
end
Mesh.Scale = Vector3.new(math.abs(0.5 - (i - 0) / 50) + 0 + mult, 0.3 - (i - 0.15) / 99, 0.6)
w[i - 1] = Instance.new("Weld", Parts[i])
w[i - 1].Part0 = Parts[i - 1]
w[i - 1].Part1 = Parts[i]
w[i - 1].C0 = CFrame.new(0, 0, 0.69)
w[i - 1].C1 = CFrame.new(0, 0, -0.69)
end
w[1].C0 = CFrame.new(0, -0.35, 0)
function Smooth(WhereTo0, Welds)
local CR0 = CFrame.new(Welds[1].C1:toEulerAnglesXYZ()).p
local CR1 = CFrame.new(WhereTo0).p
local AddTo0 = (CR1 - CR0) / 6.9
for a = 1, #Welds do
Welds[a].C1 = Welds[a].C1 * CFrame.fromEulerAnglesXYZ(AddTo0.x, AddTo0.y, AddTo0.z)
end
end
local scr = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui)
local absx = scr.AbsoluteSize.X
local absy = scr.AbsoluteSize.Y
scr:Destroy()
local mouse = game.Players.LocalPlayer:GetMouse()
game:GetService("RunService").RenderStepped:connect(function()
local r = CFrame.new(Vector3.new((mouse.Y - absy / 2) / absy, (mouse.X - absx / 2) / absx, 0.025)).p
local y = r.y
local x = r.x
local z = r.z
Smooth(Vector3.new(y, x, -z), w)
end)
|
-- DO NOT CHANGE
if file.exists("startup.lua") then
dofile("startup.lua")
end
|
local Entity = Xile.class()
Xile.Entity = Entity
Entity.__call = function(self,...) return self:item(...) end
local Component = Xile.Component
local from = Xile.from
local newid = (function()
local _count = 0
return function()
_count = _count + 1
return _count
end
end)()
local getname = Component.getname
local update = function(self,components,component,raise,value)
local n = getname(component)
if n == nil then return end
components[n] = value
raise(self,{key=n,value=component})
end
function Entity:init()
local id = newid()
local components = {}
local qry = from(components)
local raiseAdded,raiseRemoved
self.onAdded,raiseAdded = Xile.event()
self.onRemoved,raiseRemoved = Xile.event()
self.id = function(self)
return id
end
self.keys = function(self)
return qry:keys()
end
self.item = function(self,...)
local count = select('#',...)
if count > 0 then
if count == 1 then
return components[getname(select(1,...))]
end
return from({...}):map(getname):map(function(k) return components[k] end)
else
return qry:values()
end
end
self.contains = function(self,...)
local arg = {...}
return from(arg):map(getname):all(function(i)
return components[i] ~= nil
end)
end
self.add = function(self,...)
local arg = {...}
from(arg):each(function(component)
if self:contains(component) == true then return end
update(self,components,component,raiseAdded,component)
end)
return self
end
self.remove = function(self,...)
local arg = {...}
from(arg):each(function(component)
if self:contains(component) == false then return end
update(self,components,component,raiseRemoved,nil)
end)
return self
end
self.clear = function(self)
return self:remove(qry:values():unpack())
end
end
|
AddCSLuaFile()
gInterpol = {}
gInterpol.chatyazisi = true -- [gInterpol] Bu Sunucu gInterpol ile korunmaktadฤฑr!
gInterpol.chatyazisisuresi = 600
gInterpolWhitelist = { -- Whiteliste ekliyiceฤiniz oyuncunun SteamID64'รผ
["00000000000000000"] = true,
["00000000000000000"] = true,
["00000000000000000"] = true,
}
|
--[[
English localisation (default) (with Google Translate help ^-^)
enGB, enUS
The number of lines must match in each file!
]]
local _, NAMESPACE = ...;
NAMESPACE[2] = NAMESPACE[2] or {};
NAMESPACE[2]['enUS'] = {};
local L = NAMESPACE[2]['enUS'];
L['OPTIONS_TRANSLATED_BY'] = 'Translated into English: ะ ะธะฟะฝะฐ-ะะพัะดัะฝะฝะธ & DeepL';
L['RENAME'] = 'Rename';
L['SAVE'] = 'Save';
L['USE'] = 'Use';
L['NO'] = 'No';
L['COLOR'] = 'Color';
L['SCALE'] = 'Scale';
L['ENABLE'] = 'Enable';
L['FORMAT'] = 'Format';
L['SEARCH'] = 'Search';
L['CATEGORY'] = 'Category';
L['COLOR_CATEGORY'] = 'Color category';
L['CUSTOM_COLOR_CATEGORY'] = 'Custom color category';
L['MISSING_TEXTURE'] = 'Missing texture';
L['MISSING_FONT'] = 'Missing font';
L['FONT_VALUE'] = 'Font';
L['FONT_SIZE'] = 'Font size';
L['FONT_SIZE_SHORT'] = 'size';
L['FONT_FLAG'] = 'Font outline';
L['FONT_FLAG_SHORT'] = 'Outline';
L['FONT_SHADOW'] = 'Font shadow';
L['FONT_SHADOW_SHORT'] = 'Shadow';
L['FONT_FLAG_NONE'] = 'None';
L['FONT_FLAG_OUTLINE'] = 'Outline';
L['FONT_FLAG_THICKOUTLINE'] = 'Thick outline';
L['FONT_FLAG_MONOCHROME'] = 'Monochrome';
L['FONT_FLAG_OUTLINE_MONOCHROME'] = 'Monochrome + outline';
L['FONT_FLAG_THICKOUTLINE_MONOCHROME'] = 'Monochrome + thick outline';
L['POSITION'] = 'Position';
L['POSITION_OUTSIDE'] = 'Outside';
L['POSITION_INSIDE'] = 'Inside';
L['POSITION_TOP'] = 'Top';
L['POSITION_BOTTOM'] = 'Bottom';
L['POSITION_LEFT'] = 'Left';
L['POSITION_CENTER'] = 'Center';
L['POSITION_RIGHT'] = 'Right';
L['FRAME_POINT_BOTTOM'] = 'Bottom';
L['FRAME_POINT_BOTTOMLEFT'] = 'Bottom left';
L['FRAME_POINT_BOTTOMRIGHT'] = 'Bottom right';
L['FRAME_POINT_CENTER'] = 'Center';
L['FRAME_POINT_LEFT'] = 'Left';
L['FRAME_POINT_RIGHT'] = 'Right';
L['FRAME_POINT_TOP'] = 'Top';
L['FRAME_POINT_TOPLEFT'] = 'Top left';
L['FRAME_POINT_TOPRIGHT'] = 'Top right';
L['FRAME_STRATA'] = 'Strata';
L['FRAME_STRATA_INHERIT'] = 'Inherit';
L['AURAS_SORT_EXPIRES_ASC'] = 'By less time';
L['AURAS_SORT_EXPIRES_DESC'] = 'By longer time';
L['MINIMAP_BUTTON_LMB'] = 'LMB';
L['MINIMAP_BUTTON_OPEN'] = 'Open ยซStripesยป options';
L['MINIMAP_BUTTON_RMB'] = 'RMB';
L['MINIMAP_BUTTON_HIDE'] = 'Hide this button';
L['MINIMAP_BUTTON_COMMAND_SHOW'] = 'Use /stripes minimap to show the minimap button again';
L['MINIMAP_ACTIVE_PROFILE'] = 'Active profile';
L['DUNGEON_SL_MISTS'] = 'Mists of Tirna Scithe';
L['DUNGEON_SL_NW'] = 'The Necrotic Wake';
L['DUNGEON_SL_DOS'] = 'De Other Side';
L['DUNGEON_SL_HOA'] = 'Halls of Atonement';
L['DUNGEON_SL_PF'] = 'Plaguefall';
L['DUNGEON_SL_SD'] = 'Sanguine Depths';
L['DUNGEON_SL_SOA'] = 'Spires of Ascension';
L['DUNGEON_SL_TOP'] = 'Theater of Pain';
L['DUNGEON_SL_TTVM'] = 'Tazavesh, the Veiled Market';
L['RAID_SL_CN'] = 'Castle Nathria';
L['RAID_SL_SOD'] = 'Sanctum of Domination';
L['PSEUDOLINK_TOOLTIP'] = 'CTRL-C to copy';
L['GLOW'] = 'Glow';
L['GLOW_TYPE'] = 'Glow type';
L['GLOW_TYPE_PIXEL'] = 'Pixel glow';
L['GLOW_TYPE_AUTOCAST'] = 'Autocast glow';
L['GLOW_TYPE_BUTTON'] = 'Button glow';
L['GLOW_TYPE_PIXEL_SHORT'] = 'Pixel';
L['GLOW_TYPE_AUTOCAST_SHORT'] = 'Autocast';
L['GLOW_TYPE_BUTTON_SHORT'] = 'Button';
L['INTEGER'] = 'Integer';
L['FLOAT_1'] = 'One decimal place';
L['FLOAT_2'] = 'Two decimal places';
L['OFFSET_X'] = 'Horizontal offset';
L['OFFSET_X_SHORT'] = 'Hor. offset';
L['OFFSET_Y'] = 'Vertical offset';
L['OFFSET_Y_SHORT'] = 'Vert. offset';
L['NAMEPLATES_OVERLAPPING'] = 'Overlapping';
L['NAMEPLATES_STACKING'] = 'Stacking';
L['MASQUE_AURAS'] = 'Auras';
L['MASQUE_DISPELLABLE_AURAS'] = 'Dispellable auras';
L['MASQUE_MYTHIC_AURAS'] = 'Mythic auras';
L['MASQUE_IMPORTANT_AURAS'] = 'Important auras';
L['MASQUE_CUSTOM_AURAS'] = 'Custom auras';
L['OPTIONS_INCOMPATIBLE_NAMEPLATES_ADDON'] = '|cffff6666Warning!|r\r\rYou have another addon for nameplates enabled (|cffffb833%s|r)\r\rPlease turn it off so that everything works as it should';
L['OPTIONS_DONT_WARN_ME'] = 'Don\'t warn me';
L['OPTIONS_NEED_RELOAD'] = 'You must reload the interface to apply the settings.\r\rReload now?';
L['OPTIONS_HIDED_IN_COMBAT'] = 'The settings were hidden for the duration of the combat and will be automatically opened after the end of the combat';
L['OPTIONS_WILL_BE_OPENED_AFTER_COMBAT'] = 'The settings will be opened after the combat';
L['OPTIONS_SHIFT_CLICK_TO_DELETE'] = 'Shift-LMB to quickly delete';
L['OPTIONS_COPY_FROM_PROFILE'] = 'Copy from profile';
L['OPTIONS_REPLACE_FROM_PROFILE'] = 'Replace from profile';
L['OPTIONS_COPY_REPLACE_FROM_PROFILE_TOOLTIP'] = 'All entries will be copied (or replaced if the Shift key is pressed) along with the associated color list and categories';
L['OPTIONS_CATEGORY_COMMON'] = 'General';
L['OPTIONS_CATEGORY_SIZES'] = 'Sizes';
L['OPTIONS_CATEGORY_VISIBILITY'] = 'Visibility';
L['OPTIONS_CATEGORY_HEALTHBAR'] = 'Health bar';
L['OPTIONS_CATEGORY_CASTBAR'] = 'Cast bar';
L['OPTIONS_CATEGORY_AURAS'] = 'Auras';
L['OPTIONS_CATEGORY_CUSTOMCOLOR'] = 'Custom HP bar colors';
L['OPTIONS_CATEGORY_CUSTOMNAME'] = 'Custom names';
L['OPTIONS_CATEGORY_MYTHIC_PLUS'] = 'Mythic+';
L['OPTIONS_CATEGORY_USEFUL'] = 'Useful';
L['OPTIONS_CATEGORY_PROFILES'] = 'Profiles';
L['OPTIONS_CATEGORY_INFO'] = 'Info';
L['OPTIONS_CATEGORY_GLOBAL'] = 'Global';
L['OPTIONS_INFO_VERSION'] = 'Version';
L['OPTIONS_HOME_FREQUENTLY_USED_OPTIONS_TIP'] = 'Here will be links to the most frequently used options';
L['OPTIONS_HOME_DELETE_TIP'] = 'Right-click to delete what you need';
L['OPTIONS_PROFILE_DEFAULT_NAME'] = 'Default';
L['OPTIONS_PROFILES_ACTIVE_PROFILE'] = 'Active profile:';
L['OPTIONS_PROFILES_CHOOSE_PROFILE'] = 'Choose profile';
L['OPTIONS_PROFILES_CREATE_NEW_ENTER_NAME'] = 'Enter a name';
L['OPTIONS_PROFILES_COPY_FROM_ACTIVE_BUTTON_LABEL'] = 'Copy from active';
L['OPTIONS_PROFILES_CREATE_DEFAULT_PROFILE_BUTTON_LABEL'] = 'Create default profile';
L['OPTIONS_PROFILES_EXPORT_BUTTON_LABEL'] = 'Export';
L['OPTIONS_PROFILES_IMPORT_BUTTON_LABEL'] = 'Import';
L['OPTIONS_PROFILES_REMOVE_PROFILE'] = 'Profile annihilation';
L['OPTIONS_PROFILES_REMOVE_PROFILE_PROMPT'] = 'Annihilate the profile ยซ%sยป?';
L['OPTIONS_PROFILES_EXPORT_COPIED'] = 'Job`s done';
L['OPTIONS_PROFILES_IMPORT_FAILED'] = 'Check that the string you entered is correct';
L['OPTIONS_PROFILES_IMPORT_FAILED_DECOMPRESSION'] = 'Failed decompression when importing the profile!';
L['OPTIONS_PROFILES_IMPORT_FAILED_DESERIALIZATION'] = 'Failed deserialization when importing the profile!';
L['OPTIONS_PROFILES_RESET_PROFILE_TO_DEFAULT_PROMPT'] = 'Reset all profile settings to their default values?';
L['OPTIONS_PROFILES_RESET_PROFILE_BUTTON'] = 'Reset profile';
L['OPTIONS_PROFILES_PROFILE_CHANGED_SUCCESS'] = 'Profile selected: ยซ%sยป';
L['OPTIONS_PROFILES_PROFILE_CHANGED_FAILED'] = 'Something went wrong when switching profile to ยซ%sยป';
L['OPTIONS_PROFILES_PROFILE_CHANGED_NO_INPUT'] = 'You forgot to enter the profile name';
L['OPTIONS_SHOW'] = 'Show';
L['OPTIONS_TEXTURE'] = 'Texture';
L['OPTIONS_OTHER'] = 'Other';
L['OPTIONS_COMMON'] = 'Common';
L['OPTIONS_OK'] = 'Ok';
L['OPTIONS_CLOSE'] = 'Close';
L['OPTIONS_RESET'] = 'Reset';
L['OPTIONS_COMMON_TAB_NAME'] = 'Name';
L['OPTIONS_COMMON_TAB_HEALTHTEXT'] = 'Health';
L['OPTIONS_COMMON_TAB_LEVELTEXT'] = 'Level';
L['OPTIONS_NAME_TEXT_SHOW'] = 'Show name';
L['OPTIONS_NAME_TEXT_FONT_VALUE'] = 'Name font';
L['OPTIONS_NAME_TEXT_FONT_SIZE'] = 'Name font size';
L['OPTIONS_NAME_TEXT_FONT_FLAG'] = 'Name font outline';
L['OPTIONS_NAME_TEXT_FONT_SHADOW'] = 'Name font shadow';
L['OPTIONS_NAME_TEXT_POSITION_TOOLTIP'] = 'Horizontal name position';
L['OPTIONS_NAME_TEXT_POSITION_V_TOOLTIP'] = 'Vertical name position';
L['OPTIONS_NAME_TEXT_OFFSET_X_TOOLTIP'] = 'Horizontal name offset';
L['OPTIONS_NAME_TEXT_OFFSET_Y_TOOLTIP'] = 'Vertical name offset';
L['OPTIONS_NAME_TEXT_TRUNCATE'] = 'Truncate';
L['OPTIONS_NAME_TEXT_TRUNCATE_TOOLTIP'] = 'Truncate the name if it goes outside the health bar';
L['OPTIONS_NAME_TEXT_ABBREVIATED'] = 'NPC name abbreviation';
L['OPTIONS_NAME_TEXT_ABBREVIATED_WITHOUT_SPACE'] = 'Without space';
L['OPTIONS_NAME_TEXT_ABBREVIATED_WITH_SPACE'] = 'With space';
L['OPTIONS_NAME_TEXT_ABBREVIATED_LAST_WORD'] = 'Last word';
L['OPTIONS_NAME_TEXT_ABBREVIATED_FIRST_WORD'] = 'First word';
L['OPTIONS_NAME_TEXT_ABBREVIATED_MODE_TOOLTIP'] = 'NPC name abbreviation mode';
L['OPTIONS_NAME_TEXT_COLORING'] = 'Coloring player names';
L['OPTIONS_NAME_TEXT_COLORING_MODE_TOOLTIP'] = 'Coloring mode for player names';
L['OPTIONS_NAME_TEXT_COLORING_MODE_NONE'] = 'Don\'t coloring';
L['OPTIONS_NAME_TEXT_COLORING_MODE_CLASS'] = 'By class color';
L['OPTIONS_NAME_TEXT_COLORING_MODE_FACTION'] = 'By faction color';
L['OPTIONS_NAME_TEXT_COLORING_MODE_RELATION'] = 'In relation to you';
L['OPTIONS_NAME_TEXT_COLORING_NPC'] = 'NPC';
L['OPTIONS_NAME_TEXT_COLORING_NPC_TOOLTIP'] = 'NPC name coloring mode';
L['OPTIONS_FACTION_ICON_ENABLED'] = 'Faction icon';
L['OPTIONS_FACTION_ICON_ENABLED_TOOLTIP'] = 'Show faction icon to the left of the name';
L['OPTIONS_CLASS_ICON_ENABLED'] = 'Class icon';
L['OPTIONS_CLASS_ICON_ENABLED_TOOLTIP'] = 'Show the class icon above the name';
L['OPTIONS_CLASS_ICON_ARENA_ONLY'] = 'Only in Arena';
L['OPTIONS_CLASS_ICON_ARENA_ONLY_TOOLTIP'] = 'Show the class icon only in arena';
L['OPTIONS_CLASS_ICON_ENEMY_ONLY'] = 'Only for enemies';
L['OPTIONS_CLASS_ICON_ENEMY_ONLY_TOOLTIP'] = 'Show the class icon only for enemy nameplates';
L['OPTIONS_TARGET_NAME_ENABLED'] = 'Target name';
L['OPTIONS_TARGET_NAME_ENABLED_TOOLTIP'] = 'Show the target name of the visible nameplate to the right of its name';
L['OPTIONS_TARGET_NAME_ONLY_ENEMY'] = 'Only for enemies';
L['OPTIONS_TARGET_NAME_ONLY_ENEMY_TOOLTIP'] = 'Show the target name only for enemy nameplates';
L['OPTIONS_TARGET_NAME_NOT_ME'] = 'Except me';
L['OPTIONS_TARGET_NAME_NOT_ME_TOOLTIP'] = 'Show the target name only if it\'s not me';
L['OPTIONS_TARGET_NAME_ROLE_ICON'] = 'Role icon';
L['OPTIONS_TARGET_NAME_ROLE_ICON_TOOLTIP'] = 'Show the role icon next to the target name';
L['OPTIONS_NAME_TEXT_SHOW_ARENAID'] = 'Show ยซArena IDยป';
L['OPTIONS_NAME_TEXT_SHOW_ARENAID_TOOLTIP'] = 'Show the ID of the opponents in the arena (along with the names)';
L['OPTIONS_NAME_TEXT_SHOW_ARENAID_SOLO'] = 'Only ยซArena IDยป';
L['OPTIONS_NAME_TEXT_SHOW_ARENAID_SOLO_TOOLTIP'] = 'Show only the ID of the opponents in the arena (without names)';
L['OPTIONS_NAME_WITHOUT_REALM'] = 'Without realm';
L['OPTIONS_NAME_WITHOUT_REALM_TOOLTIP'] = 'Show player names without realm name';
L['OPTIONS_NAME_TEXT_TRANSLIT'] = 'Transliteration';
L['OPTIONS_NAME_TEXT_TRANSLIT_TOOLTIP'] = 'Transliteration of player names with Cyrillic letters';
L['OPTIONS_NAME_TEXT_WITH_TITLE'] = 'With title';
L['OPTIONS_NAME_TEXT_WITH_TITLE_TOOLTIP'] = 'Show the name along with the title';
L['OPTIONS_NAME_TEXT_WITH_TITLE_MODE_TOOLTIP'] = 'Name with title display mode';
L['OPTIONS_NAME_WITH_TITLE_MODE_ALL'] = 'All';
L['OPTIONS_NAME_WITH_TITLE_MODE_ONLY_FRIENDLY'] = 'Only friendly';
L['OPTIONS_NAME_WITH_TITLE_MODE_ONLY_ENEMY'] = 'Only enemy';
L['OPTIONS_NAME_TEXT_REPLACE_DIACRITICS'] = 'Replace diacritics';
L['OPTIONS_NAME_TEXT_REPLACE_DIACRITICS_TOOLTIP'] = 'Replace diacritical signs in the name with regular letters (for example, ร ยป AE, รฐ ยป eth)';
L['OPTIONS_SHOW_HEALTH_TEXT'] = 'Show health text';
L['OPTIONS_HEALTH_TEXT_HIDE_FULL'] = 'Hide full';
L['OPTIONS_HEALTH_TEXT_HIDE_FULL_TOOLTIP'] = 'Hide when full health';
L['OPTIONS_HEALTH_TEXT_SHOW_ONLY_ON_TARGET'] = 'Only on target';
L['OPTIONS_HEALTH_TEXT_SHOW_ONLY_ON_TARGET_TOOLTIP'] = 'Show health text only on current target';
L['OPTIONS_HEALTH_TEXT_SHOW_PCT_SIGN'] = 'Show percent symbol';
L['OPTIONS_HEALTH_TEXT_SHOW_PCT_SIGN_TOOLTIP'] = 'Show percent symbol for health text';
L['OPTIONS_HEALTH_TEXT_DISPLAY_MODE_TOOLTIP'] = 'Health text format';
L['OPTIONS_HEALTH_TEXT_FONT_VALUE'] = 'Health text font';
L['OPTIONS_HEALTH_TEXT_FONT_SIZE'] = 'Health text font size';
L['OPTIONS_HEALTH_TEXT_FONT_FLAG'] = 'Health text font outline';
L['OPTIONS_HEALTH_TEXT_FONT_SHADOW'] = 'Health text font shadow';
L['OPTIONS_HEALTH_TEXT_X_OFFSET_TOOLTIP'] = 'Horizontal health text offset';
L['OPTIONS_HEALTH_TEXT_Y_OFFSET_TOOLTIP'] = 'Vertical health text offset';
L['OPTIONS_HEALTH_TEXT_ANCHOR_TOOLTIP'] = 'Health text position';
L['OPTIONS_HEALTH_TEXT_CUSTOM_COLOR_ENABLED'] = 'Custom color';
L['OPTIONS_HEALTH_TEXT_CUSTOM_COLOR_ENABLED_TOOLTIP'] = 'Use custom color for the health text';
L['OPTIONS_HEALTH_TEXT_CUSTOM_COLOR_TOOLTIP'] = 'Custom color for the health text';
L['OPTIONS_HEALTH_TEXT_BLOCK_MODE'] = 'Mode';
L['OPTIONS_HEALTH_TEXT_BLOCK_MODE_TOOLTIP'] = 'Health text display mode';
L['OPTIONS_HEALTH_TEXT_SINGLE_BLOCK_HEADER'] = 'Single';
L['OPTIONS_HEALTH_TEXT_FIRST_BLOCK_HEADER'] = 'First block';
L['OPTIONS_HEALTH_TEXT_SECOND_BLOCK_HEADER'] = 'Second block';
L['OPTIONS_HEALTH_TEXT_SINGLE_BLOCK'] = 'Single block';
L['OPTIONS_HEALTH_TEXT_DOUBLE_BLOCK'] = 'Double block';
L['OPTIONS_SHOW_LEVEL_TEXT'] = 'Show level text';
L['OPTIONS_LEVEL_TEXT_SHOW_ONLY_ON_TARGET'] = 'Only on target';
L['OPTIONS_LEVEL_TEXT_SHOW_ONLY_ON_TARGET_TOOLTIP'] = 'Show level text only on current target';
L['OPTIONS_LEVEL_TEXT_HIDE_MAX'] = 'Hide max';
L['OPTIONS_LEVEL_TEXT_HIDE_MAX_TOOLTIP'] = 'Hide max level';
L['OPTIONS_LEVEL_TEXT_FONT_VALUE'] = 'Level text font';
L['OPTIONS_LEVEL_TEXT_FONT_SIZE'] = 'Level text font size';
L['OPTIONS_LEVEL_TEXT_FONT_FLAG'] = 'Level text font outline';
L['OPTIONS_LEVEL_TEXT_FONT_SHADOW'] = 'Level text font shadow';
L['OPTIONS_LEVEL_TEXT_USE_DIFF_COLOR'] = 'Coloring';
L['OPTIONS_LEVEL_TEXT_USE_DIFF_COLOR_TOOLTIP'] = 'Color the level depending on your level and the target level';
L['OPTIONS_LEVEL_TEXT_X_OFFSET_TOOLTIP'] = 'Horizontal level text offset';
L['OPTIONS_LEVEL_TEXT_Y_OFFSET_TOOLTIP'] = 'Vertical level text offset';
L['OPTIONS_LEVEL_TEXT_ANCHOR_TOOLTIP'] = 'Level text position';
L['OPTIONS_LEVEL_TEXT_CUSTOM_COLOR_ENABLED'] = 'Custom color';
L['OPTIONS_LEVEL_TEXT_CUSTOM_COLOR_ENABLED_TOOLTIP'] = 'Use custom color for the level text';
L['OPTIONS_LEVEL_TEXT_CUSTOM_COLOR_TOOLTIP'] = 'Custom color for the level text';
L['OPTIONS_HEALTHBAR_TAB_COMMON'] = 'General';
L['OPTIONS_HEALTHBAR_TAB_COLORS'] = 'Colors';
L['OPTIONS_HEALTHBAR_TAB_TARGET_INDICATOR'] = 'Target indicator';
L['OPTIONS_HEALTHBAR_TAB_THREAT'] = 'Threat';
L['OPTIONS_HEALTHBAR_TAB_EXECUTION'] = 'Execution';
L['OPTIONS_HEALTH_BAR_TEXTURE_VALUE_TOOLTIP'] = 'Health bar texture';
L['OPTIONS_HEALTH_BAR_CLASS_COLOR_FRIENDLY'] = 'Friendly players: class color';
L['OPTIONS_HEALTH_BAR_CLASS_COLOR_FRIENDLY_TOOLTIP'] = 'Color health bar of friendly players to match the class color';
L['OPTIONS_HEALTH_BAR_CLASS_COLOR_ENEMY'] = 'Enemy players: class color';
L['OPTIONS_HEALTH_BAR_CLASS_COLOR_ENEMY_TOOLTIP'] = 'Color health bar of enemy players to match the class color';
L['OPTIONS_HEADER_BORDER'] = 'Border';
L['OPTIONS_HEALTH_BAR_BORDER_HIDE'] = 'Hide border';
L['OPTIONS_HEALTH_BAR_BORDER_HIDE_TOOLTIP'] = 'Hide the border around the health bar';
L['OPTIONS_HEALTH_BAR_BORDER_SAME_COLOR'] = 'Same color as the health bar';
L['OPTIONS_HEALTH_BAR_BORDER_SAME_COLOR_TOOLTIP'] = 'Use the same color as the health bar for the border';
L['OPTIONS_HEALTH_BAR_BORDER_COLOR'] = 'Default';
L['OPTIONS_HEALTH_BAR_BORDER_COLOR_TOOLTIP'] = 'Default border color of the health bar';
L['OPTIONS_HEALTH_BAR_BORDER_SELECTED_COLOR'] = 'Target';
L['OPTIONS_HEALTH_BAR_BORDER_SELECTED_COLOR_TOOLTIP'] = 'Color of the health bar border for the target';
L['OPTIONS_HEALTH_BAR_BORDER_SIZE_TOOLTIP'] = 'Thickness of the health bar border';
L['OPTIONS_HEADER_CUSTOM_BORDER'] = 'Custom border';
L['OPTIONS_HEALTH_BAR_CUSTOM_BORDER_ENABLED'] = 'Use';
L['OPTIONS_HEALTH_BAR_CUSTOM_BORDER_ENABLED_TOOLTIP'] = 'Use custom border for a health bar';
L['OPTIONS_HEALTH_BAR_CUSTOM_BORDER_PATH'] = 'Enter the path to the desired custom border texture';
L['OPTIONS_HEALTH_BAR_CUSTOM_BORDER_WIDTH'] = 'Width';
L['OPTIONS_HEALTH_BAR_CUSTOM_BORDER_WIDTH_TOOLTIP'] = 'Width of the health bar custom border';
L['OPTIONS_HEALTH_BAR_CUSTOM_BORDER_HEIGHT'] = 'Height';
L['OPTIONS_HEALTH_BAR_CUSTOM_BORDER_HEIGHT_TOOLTIP'] = 'Height of the health bar custom border';
L['OPTIONS_HEALTH_BAR_CUSTOM_BORDER_HEIGHT_MINUS'] = 'Height (minus)';
L['OPTIONS_HEALTH_BAR_CUSTOM_BORDER_HEIGHT_MINUS_TOOLTIP'] = 'Height of the health bar custom border for minor units';
L['OPTIONS_HEALTH_BAR_CUSTOM_BORDER_X_OFFSET_TOOLTIP'] = 'Horizontal offset of the health bar custom border';
L['OPTIONS_HEALTH_BAR_CUSTOM_BORDER_Y_OFFSET_TOOLTIP'] = 'Vertical offset of the health bar custom border';
L['OPTIONS_HEADER_ABSORB'] = 'Absorbs (shields)';
L['OPTIONS_ABSORB_BAR_ENABLED'] = 'Absorb bar';
L['OPTIONS_ABSORB_BAR_ENABLED_TOOLTIP'] = 'Show absorb bar in relation to the amount of health';
L['OPTIONS_ABSORB_BAR_AT_TOP'] = 'At top';
L['OPTIONS_ABSORB_BAR_AT_TOP_TOOLTIP'] = 'Show absorb bar at the top of the health bar';
L['OPTIONS_ABSORB_TEXT_ENABLED'] = 'Show as a number';
L['OPTIONS_ABSORB_TEXT_ENABLED_TOOLTIP'] = 'Show the remaining amount of absorption as a number';
L['OPTIONS_ABSORB_TEXT_COLOR_TOOLTIP'] = 'Absorption number color';
L['OPTIONS_ABSORB_TEXT_FONT_VALUE'] = 'Absorption number font';
L['OPTIONS_ABSORB_TEXT_FONT_SIZE'] = 'Absorption number font size';
L['OPTIONS_ABSORB_TEXT_FONT_FLAG'] = 'Absorption number font outline';
L['OPTIONS_ABSORB_TEXT_FONT_SHADOW'] = 'Absorption number font shadow';
L['OPTIONS_ABSORB_TEXT_ANCHOR_TOOLTIP'] = 'Absorption number position';
L['OPTIONS_ABSORB_TEXT_X_OFFSET_TOOLTIP'] = 'Horizontal absorption number offset';
L['OPTIONS_ABSORB_TEXT_Y_OFFSET_TOOLTIP'] = 'Vertical absorption number offset';
L['OPTIONS_HEALTH_BAR_COLOR_ENEMY_NPC'] = 'Enemy NPC';
L['OPTIONS_HEALTH_BAR_COLOR_ENEMY_NPC_TOOLTIP'] = 'Color for enemy NPCs';
L['OPTIONS_HEALTH_BAR_COLOR_ENEMY_PLAYER'] = 'Enemy players';
L['OPTIONS_HEALTH_BAR_COLOR_ENEMY_PLAYER_TOOLTIP'] = 'Color for enemy players if coloring by class type is disabled';
L['OPTIONS_HEALTH_BAR_COLOR_FRIENDLY_NPC'] = 'Friendly NPC';
L['OPTIONS_HEALTH_BAR_COLOR_FRIENDLY_NPC_TOOLTIP'] = 'Color for friendly NPCs';
L['OPTIONS_HEALTH_BAR_COLOR_FRIENDLY_PLAYER'] = 'Friendly players';
L['OPTIONS_HEALTH_BAR_COLOR_FRIENDLY_PLAYER_TOOLTIP'] = 'Color for friendly players if coloring by class type is disabled';
L['OPTIONS_HEALTH_BAR_COLOR_NEUTRAL_NPC'] = 'Neutral';
L['OPTIONS_HEALTH_BAR_COLOR_NEUTRAL_NPC_TOOLTIP'] = 'Color for neutral units';
L['OPTIONS_HEALTH_BAR_COLOR_TAPPED'] = 'Tapped';
L['OPTIONS_HEALTH_BAR_COLOR_TAPPED_TOOLTIP'] = 'Color for units that you can\'t get loot from or are beaten by another faction';
L['OPTIONS_HEALTH_BAR_COLOR_DC'] = 'Disconnected';
L['OPTIONS_HEALTH_BAR_COLOR_DC_TOOLTIP'] = 'Color for disconnected players';
L['OPTIONS_HEALTH_BAR_COLORS_RESET_TOOLTIP'] = 'Reset health bar colors to defaults';
L['OPTIONS_THREAT_COLOR_ENABLED'] = 'Threat color';
L['OPTIONS_THREAT_COLOR_ENABLED_TOOLTIP'] = 'Change the color of the health bar depending on the amount of threat';
L['OPTIONS_THREAT_COLOR_REVERSED'] = 'Reversed';
L['OPTIONS_THREAT_COLOR_REVERSED_TOOLTIP'] = 'Reverse the threat colors';
L['OPTIONS_THREAT_COLOR_ISTAPPED_BORDER'] = 'Color the border (for tapped units)';
L['OPTIONS_THREAT_COLOR_ISTAPPED_BORDER_TOOLTIP'] = 'Use threat colors for a health bar border for units from which you cannot get loot';
L['OPTIONS_THREAT_COLOR_STATUS_0_TOOLTIP'] = 'Not tanking, lower threat than tank';
L['OPTIONS_THREAT_COLOR_STATUS_1_TOOLTIP'] = 'Not tanking, higher threat than tank';
L['OPTIONS_THREAT_COLOR_STATUS_2_TOOLTIP'] = 'Insecurely tanking, another unit have higher threat but not tanking';
L['OPTIONS_THREAT_COLOR_STATUS_3_TOOLTIP'] = 'Securely tanking, highest threat';
L['OPTIONS_THREAT_COLOR_OFFTANK_TOOLTIP'] = 'Offtank (another tank player is now tanking)';
L['OPTIONS_THREAT_COLOR_PETTANK_TOOLTIP'] = 'Pet (monk statue, shaman elemental, and other player-controlled units) is now tanking';
L['OPTIONS_RESET_THREAT_COLORS'] = 'Reset colors';
L['OPTIONS_RESET_THREAT_COLORS_TOOLTIP'] = 'Reset threat colors to default values';
L['OPTIONS_THREAT_PERCENTAGE_ENABLED'] = 'Show percentages';
L['OPTIONS_THREAT_PERCENTAGE_ENABLED_TOOLTIP'] = 'Show the current threat as a percentage';
L['OPTIONS_THREAT_PERCENTAGE_COLORING'] = 'Coloring';
L['OPTIONS_THREAT_PERCENTAGE_COLORING_TOOLTIP'] = 'Color the percentages according to the current threat';
L['OPTIONS_THREAT_PERCENTAGE_POINT_TOOLTIP'] = 'Point of attachment of threat percentages'
L['OPTIONS_THREAT_PERCENTAGE_RELATIVE_POINT_TOOLTIP'] = 'To which point of the health bar attach the threat percentages';
L['OPTIONS_THREAT_PERCENTAGE_OFFSET_X_TOOLTIP'] = 'Horizontal offset of threat percentages';
L['OPTIONS_THREAT_PERCENTAGE_OFFSET_Y_TOOLTIP'] = 'Vertical offset of threat percentages';
L['OPTIONS_THREAT_PERCENTAGE_FONT_VALUE_TOOLTIP'] = 'Threat percentages font';
L['OPTIONS_THREAT_PERCENTAGE_FONT_SIZE_TOOLTIP'] = 'Threat percentages font size';
L['OPTIONS_THREAT_PERCENTAGE_FONT_FLAG_TOOLTIP'] = 'Threat percentages font outline';
L['OPTIONS_THREAT_PERCENTAGE_FONT_SHADOW_TOOLTIP'] = 'Threat percentages font shadow';
L['OPTIONS_TARGET_INDICATOR_ENABLED'] = 'Enable';
L['OPTIONS_TARGET_INDICATOR_ENABLED_TOOLTIP'] = 'Show indicator of the current target nameplate';
L['OPTIONS_TARGET_INDICATOR_COLOR_TOOLTIP'] = 'Target indicator texture color';
L['OPTIONS_TARGET_INDICATOR_TEXTURE'] = 'Texture';
L['OPTIONS_TARGET_INDICATOR_TEXTURE_TOOLTIP'] = 'Target idicator texture|n|nIf the texture is colored, then paint it white and everything will be fine';
L['OPTIONS_TARGET_INDICATOR_SIZE_TOOLTIP'] = 'Size of the target indicator texture';
L['OPTIONS_TARGET_INDICATOR_X_OFFSET_TOOLTIP'] = 'Horizontal offset of the target indicator texture';
L['OPTIONS_TARGET_INDICATOR_Y_OFFSET_TOOLTIP'] = 'Vertical offset of the target indicator texture';
L['OPTIONS_TARGET_GLOW_ENABLED'] = 'Target glow';
L['OPTIONS_TARGET_GLOW_ENABLED_TOOLTIP'] = 'Show glow of the current target nameplate';
L['OPTIONS_TARGET_GLOW_COLOR_TOOLTIP'] = 'Target glow color';
L['OPTIONS_HOVER_GLOW_ENABLED'] = 'On hover';
L['OPTIONS_HOVER_GLOW_ENABLED_TOOLTIP'] = 'Show glow on mouse over nameplates';
L['OPTIONS_TARGET_HIGHLIGHT'] = 'Highlight';
L['OPTIONS_TARGET_HIGHLIGHT_TOOLTIP'] = 'Turn on the highlight when selecting a target';
L['OPTIONS_EXECUTION_ENABLED'] = 'Enable';
L['OPTIONS_EXECUTION_ENABLED_TOOLTIP'] = 'Enable execution indication';
L['OPTIONS_EXECUTION_COLOR_TOOLTIP'] = 'Color of the health bar when the specified percentage of the health is reached';
L['OPTIONS_EXECUTION_LOW_TEXT'] = 'If less than or equal to';
L['OPTIONS_EXECUTION_LOW_PERCENT_TOOLTIP'] = 'Percentage of lower health threshold';
L['OPTIONS_EXECUTION_HIGH_ENABLED'] = 'Enable higher threshold';
L['OPTIONS_EXECUTION_HIGH_ENABLED_TOOLTIP'] = 'Enable higher health threshold';
L['OPTIONS_EXECUTION_HIGH_TEXT'] = 'If more than or equal to';
L['OPTIONS_EXECUTION_HIGH_PERCENT_TOOLTIP'] = 'Percentage of higher health threshold';
L['OPTIONS_EXECUTION_GLOW'] = 'Pixel glow';
L['OPTIONS_EXECUTION_GLOW_TOOLTIP'] = 'Show pixel glow around health bar';
L['OPTIONS_CAST_BAR_TAB_COMMON'] = 'General';
L['OPTIONS_CAST_BAR_TAB_TIMER'] = 'Timer';
L['OPTIONS_CAST_BAR_TAB_CUSTOMCASTS'] = 'Custom casts';
L['OPTIONS_CAST_BAR_TEXTURE_VALUE_TOOLTIP'] = 'Cast bar texture';
L['OPTIONS_CAST_BAR_TEXT_OFFSET_Y'] = 'Vert. offset of name';
L['OPTIONS_CAST_BAR_TEXT_OFFSET_Y_TOOLTIP'] = 'Vertical offset of cast name';
L['OPTIONS_CAST_BAR_TEXT_FONT_VALUE'] = 'Spell name font';
L['OPTIONS_CAST_BAR_TEXT_FONT_SIZE'] = 'Spell name font size';
L['OPTIONS_CAST_BAR_TEXT_FONT_FLAG'] = 'Spell name font outline';
L['OPTIONS_CAST_BAR_TEXT_FONT_SHADOW'] = 'Spell name font shadow';
L['OPTIONS_CAST_BAR_HEIGHT'] = 'Height';
L['OPTIONS_CAST_BAR_HEIGHT_TOOLTIP'] = 'Height of the cast bar';
L['OPTIONS_CAST_BAR_BORDER_ENABLED'] = 'Border';
L['OPTIONS_CAST_BAR_BORDER_ENABLED_TOOLTIP'] = 'Show the border around the cast bar';
L['OPTIONS_CAST_BAR_BORDER_COLOR_TOOLTIP'] = 'Border color of the cast bar';
L['OPTIONS_CAST_BAR_BORDER_SIZE_TOOLTIP'] = 'Thickness of the cast bar border';
L['OPTIONS_CAST_BAR_ON_HP_BAR'] = 'On health bar';
L['OPTIONS_CAST_BAR_ON_HP_BAR_TOOLTIP'] = 'Show cast bar on health bar';
L['OPTIONS_CAST_BAR_ICON_LARGE'] = 'Icon: large';
L['OPTIONS_CAST_BAR_ICON_LARGE_TOOLTIP'] = 'Show a large spell icon |n|n|cffffb833doesn\'t work if ยซOn health barยป is turned on|r';
L['OPTIONS_CAST_BAR_ICON_RIGHT_SIDE'] = 'Icon: right side';
L['OPTIONS_CAST_BAR_ICON_RIGHT_SIDE_TOOLTIP'] = 'Show spell icon on the right side';
L['OPTIONS_CAST_BAR_TIMER_ENABLED_TOOLTIP'] = 'Show a timer next to the cast bar';
L['OPTIONS_CAST_BAR_TIMER_FORMAT_TOOLTIP'] = 'Cast bar timer format';
L['OPTIONS_CAST_BAR_TIMER_ONLY_REMAINING_TIME'] = 'Only the remaining time';
L['OPTIONS_CAST_BAR_TIMER_ONLY_REMAINING_TIME_TOOLTIP'] = 'Show only the remaining time of the cast bar timer';
L['OPTIONS_CAST_BAR_TIMER_XSIDE_TOOLTIP'] = 'Cast bar timer placement';
L['OPTIONS_CAST_BAR_TIMER_ANCHOR_TOOLTIP'] = 'Cast bar timer position';
L['OPTIONS_CAST_BAR_TIMER_OFFSET_X_TOOLTIP'] = 'Horizontal offset of cast bar timer';
L['OPTIONS_CAST_BAR_TIMER_OFFSET_Y_TOOLTIP'] = 'Vertical offset of cast bar timer';
L['OPTIONS_CAST_BAR_TIMER_FONT_VALUE_TOOLTIP'] = 'Cast bar timer font';
L['OPTIONS_CAST_BAR_TIMER_FONT_SIZE_TOOLTIP'] = 'Cast bar timer font size';
L['OPTIONS_CAST_BAR_TIMER_FONT_FLAG_TOOLTIP'] = 'Cast bar timer font outline';
L['OPTIONS_CAST_BAR_TIMER_FONT_SHADOW_TOOLTIP'] = 'Cast bar timer font shadow';
L['OPTIONS_WHO_INTERRUPTED_ENABLED'] = 'Who interrupted';
L['OPTIONS_WHO_INTERRUPTED_ENABLED_TOOLTIP'] = 'Show the name of the player who interrupted a spell';
L['OPTIONS_CAST_BAR_START_CAST_COLOR'] = 'Normal';
L['OPTIONS_CAST_BAR_START_CAST_COLOR_TOOLTIP'] = 'Cast bar color for normal spells';
L['OPTIONS_CAST_BAR_START_CHANNEL_COLOR'] = 'Channel';
L['OPTIONS_CAST_BAR_START_CHANNEL_COLOR_TOOLTIP'] = 'Cast bar color for channel spells';
L['OPTIONS_CAST_BAR_NON_INTERRUPTIBLE_COLOR'] = 'Non interruptible';
L['OPTIONS_CAST_BAR_NON_INTERRUPTIBLE_COLOR_TOOLTIP'] = 'Cast bar color for non interruptible spells';
L['OPTIONS_CAST_BAR_FAILED_CAST_COLOR'] = 'Failed';
L['OPTIONS_CAST_BAR_FAILED_CAST_COLOR_TOOLTIP'] = 'Cast bar color for failed spells casts';
L['OPTIONS_CAST_BAR_RESET_COLORS'] = 'Reset colors';
L['OPTIONS_CAST_BAR_RESET_COLORS_TOOLTIP'] = 'Reset cast bar colors to default values';
L['OPTIONS_CAST_BAR_SHOW_TRADE_SKILLS'] = 'Trade skills casts';
L['OPTIONS_CAST_BAR_SHOW_TRADE_SKILLS_TOOLTIP'] = 'Show the cast bar when creating items';
L['OPTIONS_CAST_BAR_SHOW_SHIELD'] = 'Shield';
L['OPTIONS_CAST_BAR_SHOW_SHIELD_TOOLTIP'] = 'Show shield icon for non interruptible spells';
L['OPTIONS_CAST_BAR_SHOW_ICON_NOTINTERRUPTIBLE'] = 'Icon for non interruptible spells';
L['OPTIONS_CAST_BAR_SHOW_ICON_NOTINTERRUPTIBLE_TOOLTIP'] = 'Show the spell icon for non interruptible spells';
L['OPTIONS_CAST_BAR_USE_INTERRUPT_READY_COLOR_TOOLTIP'] = 'Use ยซReady to interruptยป cast bar color';
L['OPTIONS_CAST_BAR_SHOW_INTERRUPT_READY_TICK'] = 'Tick';
L['OPTIONS_CAST_BAR_SHOW_INTERRUPT_READY_TICK_TOOLTIP'] = 'Show tick, which displays your ability to interrupt the spell';
L['OPTIONS_CAST_BAR_INTERRUPT_READY_TICK_COLOR_TOOLTIP'] = 'Color of the tick';
L['OPTIONS_CAST_BAR_INTERRUPT_READY_IN_TIME_COLOR'] = 'Will be ready to interrupt';
L['OPTIONS_CAST_BAR_INTERRUPT_READY_IN_TIME_COLOR_TOOLTIP'] = 'The cast bar will change to the color of your choice if your interrupt ability is ready by the end of the cast';
L['OPTIONS_CAST_BAR_USE_INTERRUPT_READY_IN_TIME_COLOR_TOOLTIP'] = 'Use ยซWill be ready to interruptยป cast bar color';
L['OPTIONS_CAST_BAR_INTERRUPT_NOT_READY_COLOR'] = 'Not ready to interrupt';
L['OPTIONS_CAST_BAR_INTERRUPT_NOT_READY_COLOR_TOOLTIP'] = 'The cast bar will change to the color of your choice if your interrupt ability is NOT ready and will NOT be ready by the end of the cast';
L['OPTIONS_CAST_BAR_USE_INTERRUPT_NOT_READY_COLOR_TOOLTIP'] = 'Use ยซNot ready to interruptยป cast bar color';
L['OPTIONS_CAST_BAR_CUSTOM_CASTS_ENABLED'] = 'Enable';
L['OPTIONS_CAST_BAR_CUSTOM_CASTS_ENABLED_TOOLTIP'] = 'Enable custom effects for specified spells';
L['OPTIONS_CAST_BAR_CUSTOM_CASTS_EDITBOX_ENTER_ID'] = 'Enter the name or ID of the spell';
L['OPTIONS_SIZES_TAB_ENEMY'] = 'Enemy';
L['OPTIONS_SIZES_TAB_FRIENDLY'] = 'Friendly';
L['OPTIONS_SIZES_TAB_SELF'] = 'Self';
L['OPTIONS_SIZES_TAB_OTHER'] = 'Other';
L['OPTIONS_SIZES_SHOW_CLICKABLE_AREA'] = 'Show clickable area';
L['OPTIONS_SIZES_OPEN_WORLD_HEADER'] = 'Open world';
L['OPTIONS_SIZES_INSTANCES_HEADER'] = 'Instances';
L['OPTIONS_SIZES_ENEMY_CLICKABLE_WIDTH'] = 'Width';
L['OPTIONS_SIZES_ENEMY_CLICKABLE_WIDTH_TOOLTIP'] = 'Width of health bar and clickable area for enemy units';
L['OPTIONS_SIZES_ENEMY_CLICKABLE_HEIGHT'] = 'Height of click-area';
L['OPTIONS_SIZES_ENEMY_CLICKABLE_HEIGHT_TOOLTIP'] = 'Height of click-area for enemy units';
L['OPTIONS_SIZES_ENEMY_HEIGHT'] = 'Height';
L['OPTIONS_SIZES_ENEMY_HEIGHT_TOOLTIP'] = 'Height of the health bar for enemy normal+ units';
L['OPTIONS_SIZES_ENEMY_MINUS_HEIGHT'] = 'Height (minus)';
L['OPTIONS_SIZES_ENEMY_MINUS_HEIGHT_TOOLTIP'] = 'Height of the health bar for enemy minor units';
L['OPTIONS_SIZES_ENEMY_CLICK_THROUGH'] = 'Disable mouse clicks';
L['OPTIONS_SIZES_ENEMY_CLICK_THROUGH_TOOLTIP'] = 'Disable the ability to click on enemy nameplates';
L['OPTIONS_SIZES_FRIENDLY_CLICKABLE_WIDTH'] = 'Width';
L['OPTIONS_SIZES_FRIENDLY_CLICKABLE_WIDTH_TOOLTIP'] = 'Width of health bar and clickable area for friendly units';
L['OPTIONS_SIZES_FRIENDLY_CLICKABLE_HEIGHT'] = 'Height of click-area';
L['OPTIONS_SIZES_FRIENDLY_CLICKABLE_HEIGHT_TOOLTIP'] = 'Height of click-area for friendly units';
L['OPTIONS_SIZES_FRIENDLY_HEIGHT'] = 'Height';
L['OPTIONS_SIZES_FRIENDLY_HEIGHT_TOOLTIP'] = 'Height of the health bar for friendly units';
L['OPTIONS_SIZES_FRIENDLY_INSTANCE_CLICKABLE_WIDTH'] = 'Width';
L['OPTIONS_SIZES_FRIENDLY_INSTANCE_CLICKABLE_WIDTH_TOOLTIP'] = 'Width of health bar and clickable area for friendly units in instances';
L['OPTIONS_SIZES_FRIENDLY_INSTANCE_CLICKABLE_HEIGHT'] = 'Height of click-area';
L['OPTIONS_SIZES_FRIENDLY_INSTANCE_CLICKABLE_HEIGHT_TOOLTIP'] = 'Height of click-area for friendly units in instances';
L['OPTIONS_SIZES_FRIENDLY_CLICK_THROUGH'] = 'Disable mouse clicks';
L['OPTIONS_SIZES_FRIENDLY_CLICK_THROUGH_TOOLTIP'] = 'Disable the ability to click on friendly nameplates';
L['OPTIONS_SIZES_SELF_WIDTH'] = 'Width';
L['OPTIONS_SIZES_SELF_WIDTH_TOOLTIP'] = 'Width of the personal nameplate';
L['OPTIONS_SIZES_SELF_HEIGHT'] = 'Height';
L['OPTIONS_SIZES_SELF_HEIGHT_TOOLTIP'] = 'Height of the health bar and resource bar of the personal nameplate';
L['OPTIONS_SIZES_SELF_CLICK_THROUGH'] = 'Disable mouse clicks';
L['OPTIONS_SIZES_SELF_CLICK_THROUGH_TOOLTIP'] = 'Disable the ability to click on a personal nameplate';
L['OPTIONS_SIZES_SCALE_LARGE'] = 'Scale (large)';
L['OPTIONS_SIZES_SCALE_LARGE_TOOLTIP'] = 'Scale of the nameplate for important units';
L['OPTIONS_SIZES_SCALE_GLOBAL'] = 'Scale (other)';
L['OPTIONS_SIZES_SCALE_GLOBAL_TOOLTIP'] = 'Scale of the nameplate for other units';
L['OPTIONS_SIZES_SCALE_SELECTED'] = 'Scale (target)';
L['OPTIONS_SIZES_SCALE_SELECTED_TOOLTIP'] = 'Scale of the nameplate for selected unit';
L['OPTIONS_SIZES_SCALE_SELF'] = 'Scale (self)';
L['OPTIONS_SIZES_SCALE_SELF_TOOLTIP'] = 'Scale of the personal nameplate';
L['OPTIONS_SIZES_OVERLAP_H'] = 'Hor. overlap';
L['OPTIONS_SIZES_OVERLAP_H_TOOLTIP'] = 'Horizontal overlap';
L['OPTIONS_SIZES_OVERLAP_V'] = 'Vert. overlap';
L['OPTIONS_SIZES_OVERLAP_V_TOOLTIP'] = 'Vertical overlap';
L['OPTIONS_SIZES_LARGE_TOP_INSET'] = 'Top inset (Large)';
L['OPTIONS_SIZES_LARGE_TOP_INSET_TOOLTIP'] = 'The inset from top (in screen percent) that large nameplates are clamped to';
L['OPTIONS_SIZES_LARGE_BOTTOM_INSET'] = 'Bottom inset (Large)';
L['OPTIONS_SIZES_LARGE_BOTTOM_INSET_TOOLTIP'] = 'The inset from bottom (in screen percent) that large nameplates are clamped to';
L['OPTIONS_SIZES_OTHER_TOP_INSET'] = 'Top inset (other)';
L['OPTIONS_SIZES_OTHER_TOP_INSET_TOOLTIP'] = 'The inset from top (in screen percent) that the non-self nameplates are clamped to';
L['OPTIONS_SIZES_OTHER_BOTTOM_INSET'] = 'Bottom inset (other)';
L['OPTIONS_SIZES_OTHER_BOTTOM_INSET_TOOLTIP'] = 'The inset from bottom (in screen percent) that the non-self nameplates are clamped to';
L['OPTIONS_SIZES_SELF_TOP_INSET'] = 'Top inset (self)';
L['OPTIONS_SIZES_SELF_TOP_INSET_TOOLTIP'] = 'The inset from top (in screen percent) that the personal nameplate is clamped to';
L['OPTIONS_SIZES_SELF_BOTTOM_INSET'] = 'Bottom inset (self)';
L['OPTIONS_SIZES_SELF_BOTTOM_INSET_TOOLTIP'] = 'The inset from bottom (in screen percent) that the personal nameplate is clamped to';
L['OPTIONS_VISIBILITY_TAB_COMMON'] = 'General';
L['OPTIONS_VISIBILITY_TAB_ENEMY'] = 'Enemy';
L['OPTIONS_VISIBILITY_TAB_FRIENDLY'] = 'Friendly';
L['OPTIONS_VISIBILITY_TAB_SELF'] = 'Self';
L['OPTIONS_VISIBILITY_MOTION'] = 'Arrangement';
L['OPTIONS_VISIBILITY_MOTION_TOOLTIP'] = 'Arrangement of nameplates';
L['OPTIONS_VISIBILITY_MOTION_SPEED_TOOLTIP'] = 'The speed of placing namplates on their positions|n|n|cffff6666It is not recommended to set a high value!|r';
L['OPTIONS_VISIBILITY_SHOW_ALWAYS_OPENWORLD'] = 'Always in open world';
L['OPTIONS_VISIBILITY_SHOW_ALWAYS_OPENWORLD_TOOLTIP'] = 'Enable permanent display of nameplates in open world';
L['OPTIONS_VISIBILITY_SHOW_ALWAYS_INSTANCE'] = 'Always in instances';
L['OPTIONS_VISIBILITY_SHOW_ALWAYS_INSTANCE_TOOLTIP'] = 'Enable permanent display of nameplates in dungeons / raids';
L['OPTIONS_VISIBILITY_MAX_DISTANCE_OPENWORLD'] = 'Open world';
L['OPTIONS_VISIBILITY_MAX_DISTANCE_OPENWORLD_TOOLTIP'] = 'Nameplates distance in open world|n|n|cffffb833Locked by ยซBlizzardยป|r';
L['OPTIONS_VISIBILITY_MAX_DISTANCE_INSTANCE'] = 'Dungeons / Raids';
L['OPTIONS_VISIBILITY_MAX_DISTANCE_INSTANCE_TOOLTIP'] = 'Nameplates distance in dungeons / raids|n|n|cffffb833Locked by ยซBlizzardยป|r';
L['OPTIONS_VISIBILITY_SHOW_FRIENDLY'] = 'Show';
L['OPTIONS_VISIBILITY_SHOW_FRIENDLY_TOOLTIP'] = 'Show friendly nameplates|n|nIf permanent visibility is disabled in the open world, friendly nameplates will only be shown when these units are in combat or they will not have enough health';
L['OPTIONS_VISIBILITY_SHOW_FRIENDLY_ONLY_IN_COMBAT'] = 'Only in combat';
L['OPTIONS_VISIBILITY_SHOW_FRIENDLY_ONLY_IN_COMBAT_TOOLTIP'] = 'Show friendly nameplates only in combat';
L['OPTIONS_VISIBILITY_SHOW_FRIENDLY_MINIONS'] = 'Minions';
L['OPTIONS_VISIBILITY_SHOW_FRIENDLY_MINIONS_TOOLTIP'] = 'Show friendly minions';
L['OPTIONS_VISIBILITY_SHOW_FRIENDLY_GUARDIANS'] = 'Guardians';
L['OPTIONS_VISIBILITY_SHOW_FRIENDLY_GUARDIANS_TOOLTIP'] = 'Show friendly guardians';
L['OPTIONS_VISIBILITY_SHOW_FRIENDLY_NPCS'] = 'NPC';
L['OPTIONS_VISIBILITY_SHOW_FRIENDLY_NPCS_TOOLTIP'] = 'Show friendly NPCs';
L['OPTIONS_VISIBILITY_SHOW_FRIENDLY_PETS'] = 'Pets';
L['OPTIONS_VISIBILITY_SHOW_FRIENDLY_PETS_TOOLTIP'] = 'Show friendly pets';
L['OPTIONS_VISIBILITY_SHOW_FRIENDLY_TOTEMS'] = 'Totems';
L['OPTIONS_VISIBILITY_SHOW_FRIENDLY_TOTEMS_TOOLTIP'] = 'Show friendly totems';
L['OPTIONS_VISIBILITY_SHOW_PERSONAL'] = 'Show';
L['OPTIONS_VISIBILITY_SHOW_PERSONAL_TOOLTIP'] = 'Show personal nameplate';
L['OPTIONS_VISIBILITY_SHOW_PERSONAL_ALWAYS'] = 'Always';
L['OPTIONS_VISIBILITY_SHOW_PERSONAL_ALWAYS_TOOLTIP'] = 'Always show personal nameplate';
L['OPTIONS_VISIBILITY_SHOW_PERSONAL_RESOURCE_ONTARGET'] = 'Show resources on target';
L['OPTIONS_VISIBILITY_SHOW_PERSONAL_RESOURCE_ONTARGET_TOOLTIP'] = 'Show own special resources on current target (combo points, runes etc.)';
L['OPTIONS_VISIBILITY_HIDE_NON_CAST_ENABLED'] = 'Hide non-casting';
L['OPTIONS_VISIBILITY_HIDE_NON_CAST_ENABLED_TOOLTIP'] = 'Hide non-casting nameplates when the selected key is pressed';
L['OPTIONS_VISIBILITY_HIDE_NON_CAST_MODIFIER_TOOLTIP'] = 'Key for hiding';
L['OPTIONS_VISIBILITY_HIDE_NON_CAST_SHOW_UNINTERRUPTIBLE'] = 'Show uninterruptible casts'
L['OPTIONS_VISIBILITY_HIDE_NON_CAST_SHOW_UNINTERRUPTIBLE_TOOLTIP'] = 'Leave visible nameplates casting uninterruptible spells';
L['OPTIONS_HEADER_NAME_ONLY'] = 'ยซName Onlyยป mode';
L['OPTIONS_VISIBILITY_NAME_ONLY_ENABLED'] = 'Enable';
L['OPTIONS_VISIBILITY_NAME_ONLY_ENABLED_TOOLTIP'] = 'Enable ยซName Onlyยป mode for friendly nameplates|n|nIn this mode, the health bars and spells of friendly nameplates are hidden|n|n|cffff6666After enabling, for the full operation of this feature, you need to reload the interface!|r';
L['OPTIONS_VISIBILITY_NAME_ONLY_COLOR_NAME_BY_HEALTH'] = 'Health progress in the name';
L['OPTIONS_VISIBILITY_NAME_ONLY_COLOR_NAME_BY_HEALTH_TOOLTIP'] = 'Fill in the name with gray color in relation to the lost amount of health|n|n|cffff6666Only in open world|r';
L['OPTIONS_VISIBILITY_NAME_ONLY_COLOR_NAME_BY_CLASS'] = 'Name by class color';
L['OPTIONS_VISIBILITY_NAME_ONLY_COLOR_NAME_BY_CLASS_TOOLTIP'] = 'Color the name by the color of the class in the ยซName Onlyยป mode|n|n|cffff6666Only in open world|r';
L['OPTIONS_VISIBILITY_NAME_ONLY_GUILD_NAME'] = 'Guild name / title';
L['OPTIONS_VISIBILITY_NAME_ONLY_GUILD_NAME_TOOLTIP'] = 'Show the guild name or NPC title under the name in the ยซName Onlyยป mode|n|n|cffff6666Only in open world|r';
L['OPTIONS_VISIBILITY_NAME_ONLY_GUILD_NAME_COLOR_TOOLTIP'] = 'Guild name or NPC title color in the ยซName Onlyยป mode';
L['OPTIONS_VISIBILITY_NAME_ONLY_GUILD_NAME_SAME_COLOR_TOOLTIP'] = 'Guild name color if you are a member of the same guild';
L['OPTIONS_VISIBILITY_NAME_ONLY_Y_OFFSET'] = 'Vertical offset';
L['OPTIONS_VISIBILITY_NAME_ONLY_Y_OFFSET_TOOLTIP'] = 'Vertical offset of the name in the ยซName Onlyยป mode|n|n|cffff6666Only in open world|r';
L['OPTIONS_VISIBILITY_NAME_ONLY_PLAYERS_ONLY'] = 'Players only';
L['OPTIONS_VISIBILITY_NAME_ONLY_PLAYERS_ONLY_TOOLTIP'] = 'Show only players in the ยซName Onlyยป mode|n|n|cffff6666Only in open world|r';
L['OPTIONS_VISIBILITY_NAME_ONLY_OVERLAPPING'] = 'Overlapping';
L['OPTIONS_VISIBILITY_NAME_ONLY_OVERLAPPING_TOOLTIP'] = 'Overlap friendly nameplates in the ยซName Onlyยป mode';
L['OPTIONS_VISIBILITY_NAME_ONLY_FRIENDLY_MODE_TOOLTIP'] = 'Select where the ยซName Onlyยป mode will work';
L['OPTIONS_NAME_ONLY_FRIENDLY_MODE_ANYWHERE'] = 'Anywhere';
L['OPTIONS_NAME_ONLY_FRIENDLY_MODE_ONLY_OPEN_WORLD'] = 'Only in the open world';
L['OPTIONS_VISIBILITY_SHOW_ENEMY'] = 'Show';
L['OPTIONS_VISIBILITY_SHOW_ENEMY_TOOLTIP'] = 'Show enemy nameplates';
L['OPTIONS_VISIBILITY_SHOW_ENEMY_ONLY_IN_COMBAT'] = 'Only in combat';
L['OPTIONS_VISIBILITY_SHOW_ENEMY_ONLY_IN_COMBAT_TOOLTIP'] = 'Show enemy nameplates only in combat';
L['OPTIONS_VISIBILITY_SHOW_ENEMY_MINIONS'] = 'Minions';
L['OPTIONS_VISIBILITY_SHOW_ENEMY_MINIONS_TOOLTIP'] = 'Show enemy minions';
L['OPTIONS_VISIBILITY_SHOW_ENEMY_GUARDIANS'] = 'Guardians';
L['OPTIONS_VISIBILITY_SHOW_ENEMY_GUARDIANS_TOOLTIP'] = 'Show enemy guardians';
L['OPTIONS_VISIBILITY_SHOW_ENEMY_MINUS'] = 'Minus';
L['OPTIONS_VISIBILITY_SHOW_ENEMY_MINUS_TOOLTIP'] = 'Show enemy minor creatures';
L['OPTIONS_VISIBILITY_SHOW_ENEMY_PETS'] = 'Pets';
L['OPTIONS_VISIBILITY_SHOW_ENEMY_PETS_TOOLTIP'] = 'Show enemy pets';
L['OPTIONS_VISIBILITY_SHOW_ENEMY_TOTEMS'] = 'Totems';
L['OPTIONS_VISIBILITY_SHOW_ENEMY_TOTEMS_TOOLTIP'] = 'Show enemy totems';
L['OPTIONS_HEADER_RAID_TARGET_ICON'] = 'Target marker icon';
L['OPTIONS_RAID_TARGET_ICON_SHOW'] = 'Show';
L['OPTIONS_RAID_TARGET_ICON_SHOW_TOOLTIP'] = 'Show target marker icon';
L['OPTIONS_RAID_TARGET_ICON_SCALE_TOOLTIP'] = 'Scale of the target marker icon';
L['OPTIONS_RAID_TARGET_ICON_POSITION_TOOLTIP'] = 'Position of the target marker icon';
L['OPTIONS_RAID_TARGET_ICON_POSITION_OFFSET_X_TOOLTIP'] = 'Horizontal offset of the target marker icon';
L['OPTIONS_RAID_TARGET_ICON_POSITION_OFFSET_Y_TOOLTIP'] = 'Vertical offset of the target marker icon';
L['OPTIONS_RAID_TARGET_ICON_FRAME_STRATA_TOOLTIP'] = 'Strata of the target marker icon';
L['OPTIONS_RAID_TARGET_HPBAR_COLORING'] = 'Coloring the health bar';
L['OPTIONS_RAID_TARGET_HPBAR_COLORING_TOOLTIP'] = 'Color the health bar depending on the current target marker';
L['OPTIONS_VISIBILITY_ALPHA_HEADER'] = 'Alpha';
L['OPTIONS_VISIBILITY_SELECTED_ALPHA'] = 'Selected';
L['OPTIONS_VISIBILITY_SELECTED_ALPHA_TOOLTIP'] = 'Alpha of selected nameplate';
L['OPTIONS_VISIBILITY_MAX_ALPHA'] = 'Max';
L['OPTIONS_VISIBILITY_MAX_ALPHA_TOOLTIP'] = 'Maximum alpha value of nameplates';
L['OPTIONS_VISIBILITY_MIN_ALPHA'] = 'Min';
L['OPTIONS_VISIBILITY_MIN_ALPHA_TOOLTIP'] = 'Minimum alpha value of nameplates';
L['OPTIONS_VISIBILITY_MAX_ALPHA_DISTANCE'] = 'Distance (max alpha)';
L['OPTIONS_VISIBILITY_MAX_ALPHA_DISTANCE_TOOLTIP'] = 'The distance from the camera that nameplates will reach their maximum alpha';
L['OPTIONS_VISIBILITY_MIN_ALPHA_DISTANCE'] = 'Distance (min alpha)';
L['OPTIONS_VISIBILITY_MIN_ALPHA_DISTANCE_TOOLTIP'] = 'The distance from the max distance that nameplates will reach their minimum alpha';
L['OPTIONS_VISIBILITY_OCCLUDED_ALPHA_MULT'] = 'Occluded';
L['OPTIONS_VISIBILITY_OCCLUDED_ALPHA_MULT_TOOLTIP'] = 'Alpha multiplier value for occluded nameplates (e.g., behind an object)';
L['OPTIONS_CLASSIFICATION_INDICATOR_ENABLED'] = 'Classification indicator';
L['OPTIONS_CLASSIFICATION_INDICATOR_ENABLED_TOOLTIP'] = 'Show classification indicator (gold or silver dragon)';
L['OPTIONS_HEADER_PERCENTAGE'] = 'Percentage';
L['OPTIONS_MYTHIC_PLUS_PERCENTAGE_ENABLED'] = 'Enable';
L['OPTIONS_MYTHIC_PLUS_PERCENTAGE_ENABLED_TOOLTIP'] = 'Enable display of percentages for creature under the health bar';
L['OPTIONS_MYTHIC_PLUS_PERCENTAGE_USE_MODE_TOOLTIP'] = 'Database for displaying percentages';
L['OPTIONS_MYTHIC_PLUS_PERCENTAGE_USE_MODE_EMBEDDED'] = 'Stripes DB';
L['OPTIONS_MYTHIC_PLUS_PERCENTAGE_USE_MODE_MDT'] = 'Mythic Dungeon Tools DB';
L['OPTIONS_MYTHIC_PLUS_PERCENTAGE_FONT_VALUE'] = 'Percentage font value';
L['OPTIONS_MYTHIC_PLUS_PERCENTAGE_FONT_SIZE'] = 'Percentage font size';
L['OPTIONS_MYTHIC_PLUS_PERCENTAGE_FONT_FLAG'] = 'Percentage font outline';
L['OPTIONS_MYTHIC_PLUS_PERCENTAGE_FONT_SHADOW'] = 'Percentage font shadow';
L['OPTIONS_HEADER_EXPLOSIVE_ORBS'] = 'Explosive orbs';
L['OPTIONS_EXPLOSIVE_ORBS_CROSSHAIR'] = 'Crosshair';
L['OPTIONS_EXPLOSIVE_ORBS_CROSSHAIR_TOOLTIP'] = 'Show crosshair on explosive orbs';
L['OPTIONS_EXPLOSIVE_ORBS_COUNTER'] = 'Counter';
L['OPTIONS_EXPLOSIVE_ORBS_COUNTER_TOOLTIP'] = 'Show quantity of active explosive orbs';
L['OPTIONS_SPITEFUL_ICON'] = 'ยซThe Spiteful Shadeยป icon';
L['OPTIONS_SPITEFUL_ICON_TOOLTIP'] = 'Show icon above ยซThe Spiteful Shadeยป nameplate';
L['OPTIONS_SPITEFUL_GLOW'] = 'Glow';
L['OPTIONS_SPITEFUL_GLOW_TOOLTIP'] = 'Glow ยซThe Spiteful Shadeยป icon';
L['OPTIONS_SPITEFUL_GLOW_COLOR_TOOLTIP'] = 'Color of the glow of ยซThe Spiteful Shadeยป icon';
L['OPTIONS_SPITEFUL_SHOW_ONLY_ON_ME'] = 'If on me';
L['OPTIONS_SPITEFUL_SHOW_ONLY_ON_ME_TOOLTIP'] = 'Only show ยซThe Spiteful Shadeยป icon if I am the target';
L['OPTIONS_MYTHIC_PLUS_AUTO_SLOT_KEYSTONE'] = 'Auto-keystone';
L['OPTIONS_MYTHIC_PLUS_AUTO_SLOT_KEYSTONE_TOOLTIP'] = 'Insert keystones automatically';
L['OPTIONS_MYTHIC_PLUS_QUESTUNWATCH_ENABLED'] = 'Auto-unwatch quests';
L['OPTIONS_MYTHIC_PLUS_QUESTUNWATCH_ENABLED_TOOLTIP'] = 'Automatically cancels quest tracking during mythic+ dungeons.|n|nAfter completing a dungeon, quests will automatically be tracked again';
L['OPTIONS_USEFUL_TAB_COMMON'] = 'Common';
L['OPTIONS_USEFUL_TAB_COMBAT_INDICATOR'] = 'Combat indicator';
L['OPTIONS_USEFUL_TAB_SPELL_INTERRUPTED'] = 'Interrupted icon';
L['OPTIONS_USEFUL_TAB_HEALERS_MARKS'] = 'Marks on healers';
L['OPTIONS_QUEST_INDICATOR_ENABLED'] = 'Quest indicator';
L['OPTIONS_QUEST_INDICATOR_ENABLED_TOOLTIP'] = 'ะnable the quest indicator showing how much is left to kill mobs, collect loot etc.';
L['OPTIONS_QUEST_INDICATOR_POSITION_TOOLTIP'] = 'Position of the quest indicator';
L['OPTIONS_STEALTH_DETECT_ENABLED'] = 'Stealth detection';
L['OPTIONS_STEALTH_DETECT_ENABLED_TOOLTIP'] = 'Enable the stealth detection icon on mobs that can detect you in the stealth state';
L['OPTIONS_STEALTH_DETECT_ALWAYS'] = 'Always';
L['OPTIONS_STEALTH_DETECT_ALWAYS_TOOLTIP'] = 'Always show the stealth detection icon, not just when you are in the appropriate state';
L['OPTIONS_STEALTH_DETECT_NOT_IN_COMBAT'] = 'Not in combat';
L['OPTIONS_STEALTH_DETECT_NOT_IN_COMBAT_TOOLTIP'] = 'Do not show the stealth detection icon in combat';
L['OPTIONS_TOTEM_ICON_ENABLED'] = 'Totem icon';
L['OPTIONS_TOTEM_ICON_ENABLED_TOOLTIP'] = 'Show totem icon over the corresponding nameplate';
L['OPTIONS_TALKING_HEAD_SUPPRESS'] = 'Disable ยซtalking headยป';
L['OPTIONS_TALKING_HEAD_SUPPRESS_TOOLTIP'] = 'Disable pop-up ยซtalking headยป in dungeons / raids';
L['OPTIONS_TALKING_HEAD_SUPPRESS_ALWAYS'] = 'Always';
L['OPTIONS_TALKING_HEAD_SUPPRESS_ALWAYS_TOOLTIP'] = 'Turn off the ยซtalking headยป completely';
L['OPTIONS_SPELL_INTERRUPTED_ICON_FRAME_STRATA_TOOLTIP'] = 'Strata for spell interrupt icon';
L['OPTIONS_SPELL_INTERRUPTED_ICON'] = 'Enable';
L['OPTIONS_SPELL_INTERRUPTED_ICON_TOOLTIP'] = 'Show the spell interrupt icon with a timer when the enemy\'s spell was interrupted';
L['OPTIONS_SPELL_INTERRUPTED_ICON_COUNTDOWN_TEXT'] = 'Countdown';
L['OPTIONS_SPELL_INTERRUPTED_ICON_COUNTDOWN_FONT_VALUE'] = 'Countdown font of spell interrupt icon';
L['OPTIONS_SPELL_INTERRUPTED_ICON_COUNTDOWN_FONT_SIZE'] = 'Countdown font size of spell interrupt icon';
L['OPTIONS_SPELL_INTERRUPTED_ICON_COUNTDOWN_FONT_FLAG'] = 'Countdown font outline of spell interrupt icon';
L['OPTIONS_SPELL_INTERRUPTED_ICON_COUNTDOWN_FONT_SHADOW'] = 'Countdown font shadow of spell interrupt icon';
L['OPTIONS_SPELL_INTERRUPTED_ICON_CASTER_NAME_SHOW'] = 'Show player name';
L['OPTIONS_SPELL_INTERRUPTED_ICON_CASTER_NAME_SHOW_TOOLTIP'] = 'Show the name of the player who interrupted the spell above interrupt icon';
L['OPTIONS_SPELL_INTERRUPTED_ICON_CASTER_NAME_FONT_VALUE'] = 'Player name font on spell interrupt icon';
L['OPTIONS_SPELL_INTERRUPTED_ICON_CASTER_NAME_FONT_SIZE'] = 'Player name font size on spell interrupt icon';
L['OPTIONS_SPELL_INTERRUPTED_ICON_CASTER_NAME_FONT_FLAG'] = 'Player name font outline on spell interrupt icon';
L['OPTIONS_SPELL_INTERRUPTED_ICON_CASTER_NAME_FONT_SHADOW'] = 'Player name font shadow on spell interrupt icon';
L['OPTIONS_PVP_HEALERS_ENABLED'] = 'PvP';
L['OPTIONS_PVP_HEALERS_ENABLED_TOOLTIP'] = 'Show marks on enemy healers in PvP (arena, battlefield)';
L['OPTIONS_PVP_HEALERS_SCALE_TOOLTIP'] = 'Set scale of the marks in PvP';
L['OPTIONS_PVP_HEALERS_SOUND'] = 'Sound';
L['OPTIONS_PVP_HEALERS_SOUND_TOOLTIP'] = 'Play sound when hovering a healer in PvP';
L['OPTIONS_PVE_HEALERS_ENABLED'] = 'PvE';
L['OPTIONS_PVE_HEALERS_ENABLED_TOOLTIP'] = 'Show marks on enemy healers in PvE (dungeon, raid)';
L['OPTIONS_PVE_HEALERS_SCALE_TOOLTIP'] = 'Set scale of the marks in PvE';
L['OPTIONS_PVE_HEALERS_SOUND'] = 'Sound';
L['OPTIONS_PVE_HEALERS_SOUND_TOOLTIP'] = 'Play sound when hovering a healer in PvE';
L['OPTIONS_COMBAT_INDICATOR_ENABLED'] = 'Enable';
L['OPTIONS_COMBAT_INDICATOR_ENABLED_TOOLTIP'] = 'Show the icon depending on whether the visible nameplate is in combat';
L['OPTIONS_COMBAT_INDICATOR_COLOR_TOOLTIP'] = 'Color of combat indicator icon';
L['OPTIONS_COMBAT_INDICATOR_OFFSET_X_TOOLTIP'] = 'Horizontal offset of combat indicator icon';
L['OPTIONS_COMBAT_INDICATOR_OFFSET_Y_TOOLTIP'] = 'Vertical offset of combat indicator icon';
L['OPTIONS_COMBAT_INDICATOR_SIZE_TOOLTIP'] = 'Size of combat indicator icon';
L['OPTIONS_COMBAT_INDICATOR_POINT_TOOLTIP'] = 'Point of attachment of combat indicator icon';
L['OPTIONS_COMBAT_INDICATOR_RELATIVE_POINT_TOOLTIP'] = 'To which point of the health bar attach the combat indicator icon';
L['OPTIONS_AURAS_TAB_COMMON'] = 'General';
L['OPTIONS_AURAS_TAB_SPELLSTEAL'] = 'Dispellable';
L['OPTIONS_AURAS_TAB_MYTHICPLUS'] = 'Mythic+';
L['OPTIONS_AURAS_TAB_IMPORTANT'] = 'Important';
L['OPTIONS_AURAS_TAB_CUSTOM'] = 'Custom';
L['OPTIONS_AURAS_FILTER_PLAYER_ENABLED'] = 'No filter';
L['OPTIONS_AURAS_FILTER_PLAYER_ENABLED_TOOLTIP'] = 'Show all auras (debuffs) on enemy nameplates';
L['OPTIONS_AURAS_PANDEMIC_ENABLED'] = 'Pandemic';
L['OPTIONS_AURAS_PANDEMIC_ENABLED_TOOLTIP'] = 'Enable coloring of auras countdown when 30% or less of the total spell duration is left';
L['OPTIONS_AURAS_PANDEMIC_COLOR_TOOLTIP'] = 'Color of pandemic timer';
L['OPTIONS_AURAS_BORDER_COLOR_ENABLED'] = 'Border color';
L['OPTIONS_AURAS_BORDER_COLOR_ENABLED_TOOLTIP'] = 'Enable auras border coloring depending of its type';
L['OPTIONS_AURAS_SHOW_DEBUFFS_ON_FRIENDLY'] = 'Show debuffs on friendly nameplates';
L['OPTIONS_AURAS_SORT_ENABLED'] = 'Auras sort';
L['OPTIONS_AURAS_SORT_ENABLED_TOOLTIP'] = 'Enable auras sorting';
L['OPTIONS_AURAS_SORT_TOOLTIP'] = 'Auras sort type';
L['OPTIONS_AURAS_OMNICC_SUPPRESS'] = 'Disable OmniCC timers';
L['OPTIONS_AURAS_OMNICC_SUPPRESS_TOOLTIP'] = 'Disable OmniCC (and similar addons) timers on auras';
L['OPTIONS_AURAS_COUNTDOWN_ENABLED'] = 'Show countdown';
L['OPTIONS_AURAS_COUNTDOWN_ENABLED_TOOLTIP'] = 'Show countdown timers on auras';
L['OPTIONS_AURAS_COUNTDOWN_TEXT'] = 'Countdown';
L['OPTIONS_AURAS_COOLDOWN_FONT_VALUE'] = 'Countdown font';
L['OPTIONS_AURAS_COOLDOWN_FONT_SIZE'] = 'Countdown font size';
L['OPTIONS_AURAS_COOLDOWN_FONT_FLAG'] = 'Countdown font outline';
L['OPTIONS_AURAS_COOLDOWN_FONT_SHADOW'] = 'Countdown font shadow';
L['OPTIONS_AURAS_COOLDOWN_POINT_TOOLTIP'] = 'Point of attachment of countdown text';
L['OPTIONS_AURAS_COOLDOWN_RELATIVE_POINT_TOOLTIP'] = 'To which point of the aura attach countdown text';
L['OPTIONS_AURAS_COOLDOWN_OFFSET_X_TOOLTIP'] = 'Horizontal offset of countdown text';
L['OPTIONS_AURAS_COOLDOWN_OFFSET_Y_TOOLTIP'] = 'Vertical offset of countdown text';
L['OPTIONS_AURAS_COUNT_TEXT'] = 'Count';
L['OPTIONS_AURAS_COUNT_FONT_VALUE'] = 'Count font';
L['OPTIONS_AURAS_COUNT_FONT_SIZE'] = 'Count font size';
L['OPTIONS_AURAS_COUNT_FONT_FLAG'] = 'Count font outline';
L['OPTIONS_AURAS_COUNT_FONT_SHADOW'] = 'Count font shadow';
L['OPTIONS_AURAS_COUNT_POINT_TOOLTIP'] = 'Point of attachment of count text';
L['OPTIONS_AURAS_COUNT_RELATIVE_POINT_TOOLTIP'] = 'To which point of the aura attach count text';
L['OPTIONS_AURAS_COUNT_OFFSET_X_TOOLTIP'] = 'Horizontal offset of count text';
L['OPTIONS_AURAS_COUNT_OFFSET_Y_TOOLTIP'] = 'Vertical offset of count text';
L['OPTIONS_AURAS_EXPIRE_GLOW_ENABLED'] = 'Glow of expiring auras';
L['OPTIONS_AURAS_EXPIRE_GLOW_ENABLED_TOOLTIP'] = 'Show glow on auras, the timer of which is coming to an end';
L['OPTIONS_AURAS_EXPIRE_GLOW_TYPE_TOOLTIP'] = 'Type of expiring auras glow';
L['OPTIONS_AURAS_EXPIRE_GLOW_PERCENT_TOOLTIP'] = 'Remaining time in percent at which the glow will appear';
L['OPTIONS_AURAS_EXPIRE_GLOW_COLOR_TOOLTIP'] = 'Color of the glow of expiring auras';
L['OPTIONS_AURAS_BLACKLIST_ENABLED'] = 'Use a blacklist';
L['OPTIONS_AURAS_BLACKLIST_ENABLED_TOOLTIP'] = 'Use a black list of auras that will not be tracked';
L['OPTIONS_AURAS_BLACKLIST_BUTTON_OPEN'] = 'Open the blacklist';
L['OPTIONS_AURAS_BLACKLIST_BUTTON_CLOSE'] = 'Close the blacklist';
L['OPTIONS_AURAS_SQUARE'] = 'Square';
L['OPTIONS_AURAS_SQUARE_TOOLTIP'] = 'Display auras as square, not rectangular';
L['OPTIONS_AURAS_SCALE_TOOLTIP'] = 'Scale of auras';
L['OPTIONS_AURAS_OFFSET_Y_TOOLTIP'] = 'Vertical offset of auras';
L['OPTIONS_AURAS_HPBAR_COLOR_ENABLED'] = 'Coloring by aura';
L['OPTIONS_AURAS_HPBAR_COLOR_ENABLED_TOOLTIP'] = 'Turn on the coloring of the health bar depending on the presence of a given aura';
L['OPTIONS_AURAS_HPBAR_COLOR_LIST_BUTTON_OPEN'] = 'Open list';
L['OPTIONS_AURAS_HPBAR_COLOR_LIST_BUTTON_CLOSE'] = 'Close list';
L['OPTIONS_AURAS_MASQUE_SUPPORT'] = 'ยซMasqueยป support';
L['OPTIONS_AURAS_MASQUE_SUPPORT_TOOLTIP'] = 'Enable aura appearance customization via ยซMasqueยป addon';
L['OPTIONS_AURAS_BORDER_HIDE'] = 'Hide the border';
L['OPTIONS_AURAS_BORDER_HIDE_TOOLTIP'] = 'Hide the aura border';
L['OPTIONS_AURAS_SPELLSTEAL_ENABLED'] = 'Enable';
L['OPTIONS_AURAS_SPELLSTEAL_ENABLED_TOOLTIP'] = 'Show auras that can be dispelled';
L['OPTIONS_AURAS_SPELLSTEAL_COLOR_TOOLTIP'] = 'Border color of dispellable auras';
L['OPTIONS_AURAS_SPELLSTEAL_GLOW_ENABLED'] = 'Glow';
L['OPTIONS_AURAS_SPELLSTEAL_GLOW_ENABLED_TOOLTIP'] = 'Show glow on dispellable auras';
L['OPTIONS_AURAS_SPELLSTEAL_GLOW_TYPE_TOOLTIP'] = 'Type of dispellable auras glow';
L['OPTIONS_AURAS_SPELLSTEAL_GLOW_COLOR_TOOLTIP'] = 'Color of dispellable auras glow';
L['OPTIONS_AURAS_SPELLSTEAL_SCALE_TOOLTIP'] = 'Scale of dispellable auras';
L['OPTIONS_AURAS_SPELLSTEAL_OFFSET_Y_TOOLTIP'] = 'Vertical offset of dispellable auras';
L['OPTIONS_AURAS_SPELLSTEAL_COUNTDOWN_ENABLED'] = 'Show countdown';
L['OPTIONS_AURAS_SPELLSTEAL_COUNTDOWN_ENABLED_TOOLTIP'] = 'Show countdown timers on dispellable auras';
L['OPTIONS_AURAS_SPELLSTEAL_COOLDOWN_FONT_VALUE'] = 'Countdown font of dispellable auras';
L['OPTIONS_AURAS_SPELLSTEAL_COOLDOWN_FONT_SIZE'] = 'Countdown font size of dispellable auras';
L['OPTIONS_AURAS_SPELLSTEAL_COOLDOWN_FONT_FLAG'] = 'Countdown font outline of dispellable auras';
L['OPTIONS_AURAS_SPELLSTEAL_COOLDOWN_FONT_SHADOW'] = 'Countdown font shadow of dispellable auras';
L['OPTIONS_AURAS_SPELLSTEAL_COOLDOWN_POINT_TOOLTIP'] = 'Point of attachment of countdown text of dispellable auras';
L['OPTIONS_AURAS_SPELLSTEAL_COOLDOWN_RELATIVE_POINT_TOOLTIP'] = 'To which point of the dispellable aura attach countdown text';
L['OPTIONS_AURAS_SPELLSTEAL_COOLDOWN_OFFSET_X_TOOLTIP'] = 'Horizontal offset of countdown text';
L['OPTIONS_AURAS_SPELLSTEAL_COOLDOWN_OFFSET_Y_TOOLTIP'] = 'Vertical offset of countdown text';
L['OPTIONS_AURAS_SPELLSTEAL_COUNT_FONT_VALUE'] = 'Count font of dispellable auras';
L['OPTIONS_AURAS_SPELLSTEAL_COUNT_FONT_SIZE'] = 'Count font size of dispellable auras';
L['OPTIONS_AURAS_SPELLSTEAL_COUNT_FONT_FLAG'] = 'Count font outline of dispellable auras';
L['OPTIONS_AURAS_SPELLSTEAL_COUNT_FONT_SHADOW'] = 'Count font shadow of dispellable auras';
L['OPTIONS_AURAS_SPELLSTEAL_COUNT_POINT_TOOLTIP'] = 'Point of attachment of count text of dispellable auras';
L['OPTIONS_AURAS_SPELLSTEAL_COUNT_RELATIVE_POINT_TOOLTIP'] = 'To which point of the dispellable aura attach count text';
L['OPTIONS_AURAS_SPELLSTEAL_COUNT_OFFSET_X_TOOLTIP'] = 'Horizontal offset of count text';
L['OPTIONS_AURAS_SPELLSTEAL_COUNT_OFFSET_Y_TOOLTIP'] = 'Vertical offset of count text';
L['OPTIONS_AURAS_MYTHICPLUS_ENABLED'] = 'Enable';
L['OPTIONS_AURAS_MYTHICPLUS_ENABLED_TOOLTIP'] = 'Show special auras that will be shown in mythic+ dungeons';
L['OPTIONS_AURAS_MYTHICPLUS_SCALE_TOOLTIP'] = 'Scale of mythic+ auras';
L['OPTIONS_AURAS_MYTHICPLUS_OFFSET_Y_TOOLTIP'] = 'Vertical offset of mythic+ auras';
L['OPTIONS_AURAS_MYTHICPLUS_COUNTDOWN_ENABLED'] = 'Show countdown';
L['OPTIONS_AURAS_MYTHICPLUS_COUNTDOWN_ENABLED_TOOLTIP'] = 'Show countdown timers on mythic+ auras';
L['OPTIONS_AURAS_MYTHICPLUS_COOLDOWN_FONT_VALUE'] = 'Countdown font of mythic+ auras';
L['OPTIONS_AURAS_MYTHICPLUS_COOLDOWN_FONT_SIZE'] = 'Countdown font size of mythic+ auras';
L['OPTIONS_AURAS_MYTHICPLUS_COOLDOWN_FONT_FLAG'] = 'Countdown font outline of mythic+ auras';
L['OPTIONS_AURAS_MYTHICPLUS_COOLDOWN_FONT_SHADOW'] = 'Countdown font shadow of mythic+ auras';
L['OPTIONS_AURAS_MYTHICPLUS_COOLDOWN_POINT_TOOLTIP'] = 'Point of attachment of countdown text of mythic+ auras';
L['OPTIONS_AURAS_MYTHICPLUS_COOLDOWN_RELATIVE_POINT_TOOLTIP'] = 'To which point of the mythic+ aura attach countdown text';
L['OPTIONS_AURAS_MYTHICPLUS_COOLDOWN_OFFSET_X_TOOLTIP'] = 'Horizontal offset of countdown text';
L['OPTIONS_AURAS_MYTHICPLUS_COOLDOWN_OFFSET_Y_TOOLTIP'] = 'Vertical offset of countdown text';
L['OPTIONS_AURAS_MYTHICPLUS_COUNT_FONT_VALUE'] = 'Count font of mythic+ auras';
L['OPTIONS_AURAS_MYTHICPLUS_COUNT_FONT_SIZE'] = 'Count font size of mythic+ auras';
L['OPTIONS_AURAS_MYTHICPLUS_COUNT_FONT_FLAG'] = 'Count font outline of mythic+ auras';
L['OPTIONS_AURAS_MYTHICPLUS_COUNT_FONT_SHADOW'] = 'Count font shadow of mythic+ auras';
L['OPTIONS_AURAS_MYTHICPLUS_COUNT_POINT_TOOLTIP'] = 'Point of attachment of count text of mythic+ auras';
L['OPTIONS_AURAS_MYTHICPLUS_COUNT_RELATIVE_POINT_TOOLTIP'] = 'To which point of the mythic+ aura attach count text';
L['OPTIONS_AURAS_MYTHICPLUS_COUNT_OFFSET_X_TOOLTIP'] = 'Horizontal offset of count text';
L['OPTIONS_AURAS_MYTHICPLUS_COUNT_OFFSET_Y_TOOLTIP'] = 'Vertical offset of count text';
L['OPTIONS_AURAS_IMPORTANT_ENABLED'] = 'Enable';
L['OPTIONS_AURAS_IMPORTANT_ENABLED_TOOLTIP'] = 'Show important auras (stuns, crowd control, disorient etc)';
L['OPTIONS_AURAS_IMPORTANT_SCALE_TOOLTIP'] = 'Scale of important auras';
L['OPTIONS_AURAS_IMPORTANT_OFFSET_Y_TOOLTIP'] = 'Vertical offset of important auras';
L['OPTIONS_AURAS_IMPORTANT_COUNTDOWN_ENABLED'] = 'Show countdown';
L['OPTIONS_AURAS_IMPORTANT_COUNTDOWN_ENABLED_TOOLTIP'] = 'Show countdown timers on important auras';
L['OPTIONS_AURAS_IMPORTANT_COOLDOWN_FONT_VALUE'] = 'Countdown font of important auras';
L['OPTIONS_AURAS_IMPORTANT_COOLDOWN_FONT_SIZE'] = 'Countdown font size of important auras';
L['OPTIONS_AURAS_IMPORTANT_COOLDOWN_FONT_FLAG'] = 'Countdown font outline of important auras';
L['OPTIONS_AURAS_IMPORTANT_COOLDOWN_FONT_SHADOW'] = 'Countdown font shadow of important auras';
L['OPTIONS_AURAS_IMPORTANT_COOLDOWN_POINT_TOOLTIP'] = 'Point of attachment of countdown text of important auras';
L['OPTIONS_AURAS_IMPORTANT_COOLDOWN_RELATIVE_POINT_TOOLTIP'] = 'To which point of the important aura attach countdown text';
L['OPTIONS_AURAS_IMPORTANT_COOLDOWN_OFFSET_X_TOOLTIP'] = 'Horizontal offset of countdown text';
L['OPTIONS_AURAS_IMPORTANT_COOLDOWN_OFFSET_Y_TOOLTIP'] = 'Vertical offset of countdown text';
L['OPTIONS_AURAS_IMPORTANT_COUNT_FONT_VALUE'] = 'Count font of important auras';
L['OPTIONS_AURAS_IMPORTANT_COUNT_FONT_SIZE'] = 'Count font size of important auras';
L['OPTIONS_AURAS_IMPORTANT_COUNT_FONT_FLAG'] = 'Count font outline of important auras';
L['OPTIONS_AURAS_IMPORTANT_COUNT_FONT_SHADOW'] = 'Count font shadow of important auras';
L['OPTIONS_AURAS_IMPORTANT_COUNT_POINT_TOOLTIP'] = 'Point of attachment of count text of important auras';
L['OPTIONS_AURAS_IMPORTANT_COUNT_RELATIVE_POINT_TOOLTIP'] = 'To which point of the important aura attach count text';
L['OPTIONS_AURAS_IMPORTANT_COUNT_OFFSET_X_TOOLTIP'] = 'Horizontal offset of count text';
L['OPTIONS_AURAS_IMPORTANT_COUNT_OFFSET_Y_TOOLTIP'] = 'Vertical offset of count text';
L['OPTIONS_AURAS_IMPORTANT_CASTERNAME_SHOW'] = 'Show player name';
L['OPTIONS_AURAS_IMPORTANT_CASTERNAME_SHOW_TOOLTIP'] = 'Show player name above important aura';
L['OPTIONS_AURAS_IMPORTANT_CASTERNAME_FONT_VALUE'] = 'Player name font on important auras';
L['OPTIONS_AURAS_IMPORTANT_CASTERNAME_FONT_SIZE'] = 'Player name font size on important auras';
L['OPTIONS_AURAS_IMPORTANT_CASTERNAME_FONT_FLAG'] = 'Player name font outline on important auras';
L['OPTIONS_AURAS_IMPORTANT_CASTERNAME_FONT_SHADOW'] = 'Player name font shadow on important auras';
L['OPTIONS_AURAS_CUSTOM_ENABLED'] = 'Enable';
L['OPTIONS_AURAS_CUSTOM_ENABLED_TOOLTIP'] = 'Show custom auras';
L['OPTIONS_AURAS_CUSTOM_SCALE_TOOLTIP'] = 'Scale of custom auras';
L['OPTIONS_AURAS_CUSTOM_OFFSET_Y_TOOLTIP'] = 'Vertical offset of custom auras';
L['OPTIONS_AURAS_CUSTOM_COUNTDOWN_ENABLED'] = 'Show countdown';
L['OPTIONS_AURAS_CUSTOM_COUNTDOWN_ENABLED_TOOLTIP'] = 'Show countdown timers on custom auras';
L['OPTIONS_AURAS_CUSTOM_COOLDOWN_FONT_VALUE'] = 'Countdown font of custom auras';
L['OPTIONS_AURAS_CUSTOM_COOLDOWN_FONT_SIZE'] = 'Countdown font size of custom auras';
L['OPTIONS_AURAS_CUSTOM_COOLDOWN_FONT_FLAG'] = 'Countdown font outline of custom auras';
L['OPTIONS_AURAS_CUSTOM_COOLDOWN_FONT_SHADOW'] = 'Countdown font shadow of custom auras';
L['OPTIONS_AURAS_CUSTOM_COOLDOWN_POINT_TOOLTIP'] = 'Point of attachment of countdown text of custom auras';
L['OPTIONS_AURAS_CUSTOM_COOLDOWN_RELATIVE_POINT_TOOLTIP'] = 'To which point of the custom aura attach countdown text';
L['OPTIONS_AURAS_CUSTOM_COOLDOWN_OFFSET_X_TOOLTIP'] = 'Horizontal offset of countdown text';
L['OPTIONS_AURAS_CUSTOM_COOLDOWN_OFFSET_Y_TOOLTIP'] = 'Vertical offset of countdown text';
L['OPTIONS_AURAS_CUSTOM_COUNT_FONT_VALUE'] = 'Count font of custom auras';
L['OPTIONS_AURAS_CUSTOM_COUNT_FONT_SIZE'] = 'Count font size of custom auras';
L['OPTIONS_AURAS_CUSTOM_COUNT_FONT_FLAG'] = 'Count font outline of custom auras';
L['OPTIONS_AURAS_CUSTOM_COUNT_FONT_SHADOW'] = 'Count font shadow of custom auras';
L['OPTIONS_AURAS_CUSTOM_COUNT_POINT_TOOLTIP'] = 'Point of attachment of count text of custom auras';
L['OPTIONS_AURAS_CUSTOM_COUNT_RELATIVE_POINT_TOOLTIP'] = 'To which point of the custom aura attach count text';
L['OPTIONS_AURAS_CUSTOM_COUNT_OFFSET_X_TOOLTIP'] = 'Horizontal offset of count text';
L['OPTIONS_AURAS_CUSTOM_COUNT_OFFSET_Y_TOOLTIP'] = 'Vertical offset of count text';
L['OPTIONS_AURAS_CUSTOM_EDITBOX_ENTER_ID'] = 'Enter the name or ID of the aura';
L['OPTIONS_AURAS_CUSTOM_SWITCH_TO_HARMFUL'] = 'Switch to debuff (HARMFUL)';
L['OPTIONS_AURAS_CUSTOM_SWITCH_TO_HELPFUL'] = 'Switch to buff (HELPFUL)';
L['OPTIONS_AURAS_CUSTOM_HELPFUL'] = 'Buff';
L['OPTIONS_AURAS_CUSTOM_HELPFUL_TOOLTIP'] = 'Add an aura as buff (HELPFUL)';
L['OPTIONS_AURAS_CUSTOM_BORDER_COLOR_TOOLTIP'] = 'Border color of custom auras';
L['OPTIONS_AURAS_CUSTOM_SWITCH_TO_OWN'] = 'Switch to your own only';
L['OPTIONS_AURAS_CUSTOM_SWITCH_TO_ALL'] = 'Switch to all';
L['OPTIONS_AURAS_CUSTOM_ADD_TO_BLACKLIST'] = 'Add to blacklist';
L['OPTIONS_AURAS_CUSTOM_REMOVE_FROM_BLACKLIST'] = 'Remove from blacklist';
L['OPTIONS_AURAS_CUSTOM_TO_BLACKLIST'] = 'To BL';
L['OPTIONS_AURAS_CUSTOM_TO_BLACKLIST_TOOLTIP'] = 'Add aura immediately to blacklist';
L['OPTIONS_AURAS_CUSTOM_HELPTIP'] = 'Adding by name can sometimes show the wrong icon';
L['OPTIONS_CUSTOM_COLOR_ENABLED'] = 'Enable';
L['OPTIONS_CUSTOM_COLOR_ENABLED_TOOLTIP'] = 'Enable custom health bar colors';
L['OPTIONS_CUSTOM_COLOR_EDITBOX_ENTER_ID'] = 'Enter the ID of the NPC';
L['OPTIONS_CUSTOM_COLOR_ADD_FROM_TARGET'] = 'From target';
L['OPTIONS_CUSTOM_COLOR_ADD_FROM_LIST'] = 'From list';
L['OPTIONS_GLOBAL_FONT_HEADER'] = 'Font settings';
L['OPTIONS_USE_GLOBAL_FONT_VALUE_TOOLTIP'] = 'Use global font settings';
L['OPTIONS_USE_GLOBAL_FONT_SIZE_TOOLTIP'] = 'Use global font size settings';
L['OPTIONS_USE_GLOBAL_FONT_FLAG_TOOLTIP'] = 'Use global font outline settings';
L['OPTIONS_USE_GLOBAL_FONT_SHADOW_TOOLTIP'] = 'Use global font shadow settings';
L['OPTIONS_CUSTOM_NAME_ENABLED'] = 'Enable';
L['OPTIONS_CUSTOM_NAME_ENABLED_TOOLTIP'] = 'Enable custom names';
L['OPTIONS_CUSTOM_NAME_EDITBOX_ENTER_ID'] = 'Enter the ID of the NPC';
L['OPTIONS_CUSTOM_NAME_ADD_FROM_TARGET'] = 'From target';
L['OPTIONS_CUSTOM_NAME_ADD_FROM_LIST'] = 'From list';
L['OPTIONS_COLOR_CATEGORY_ENTER_NAME'] = 'Type a name and press Enter';
L['OPTIONS_COLOR_CATEGORY_TOGGLE_FRAME'] = 'Open the associated list of colors';
L['OPTIONS_CATEGORY_ENTER_NAME'] = 'Type a name and press Enter';
L['OPTIONS_CATEGORY_ALL'] = 'All';
L['OPTIONS_CATEGORY_OPEN_TOOLTIP'] = 'Open category list';
|
PROPERTY = {};
PROPERTY.ID = 6;
PROPERTY.Name = "The Depot";
PROPERTY.Category = "Business";
PROPERTY.Description = "A moderately sized werehouse in the industrial area.";
PROPERTY.Image = "ev33x_depot";
PROPERTY.Cost = 1000;
PROPERTY.Doors = {
{Vector(2805, 5507, 122.25), 'models/props_c17/door01_left.mdl'},
{Vector(3181, 6395, 122.25), 'models/props_c17/door01_left.mdl'},
{Vector(3312, 5883, 130), '*225'},
{Vector(3440, 5883, 130), '*224'}
};
GAMEMODE:RegisterProperty(PROPERTY);
|
local ffi = require("ffi")
local utils = require("libc_utils")
local alltypes = require("bits/alltypes")
ffi.cdef[[
typedef struct { int quot, rem; } div_t;
typedef struct { long quot, rem; } ldiv_t;
typedef struct { long long quot, rem; } lldiv_t;
div_t div (int, int);
ldiv_t ldiv (long, long);
lldiv_t lldiv (long long, long long);
]]
ffi.cdef[[
extern double atof (const char *nptr);
extern int atoi (const char *nptr);
extern long int atol (const char *nptr);
extern long long int atoll (const char *__nptr); // C99
extern double strtod (const char * nptr, char ** endptr);
]]
ffi.cdef[[
void *aligned_alloc(size_t alignment, size_t size);
void * calloc(size_t nmemb, size_t size);
void free(void *);
void * malloc(const size_t size);
void * realloc(void *ptr, size_t size);
]]
ffi.cdef[[
int rand (void);
void srand (unsigned);
]]
ffi.cdef[[
void abort (void);
int atexit (void (*) (void));
void exit (int);
int at_quick_exit (void (*) (void));
void quick_exit (int);
]]
ffi.cdef[[
char *getenv (const char *);
int system (const char *);
]]
ffi.cdef[[
void *bsearch (const void *, const void *, size_t, size_t, int (*)(const void *, const void *));
void qsort (void *, size_t, size_t, int (*)(const void *, const void *));
int abs (int);
long labs (long);
long long llabs (long long);
]]
ffi.cdef[[
int mblen (const char *, size_t);
int mbtowc (wchar_t *__restrict, const char *__restrict, size_t);
int wctomb (char *, wchar_t);
size_t mbstowcs (wchar_t *__restrict, const char *__restrict, size_t);
size_t wcstombs (char *__restrict, const wchar_t *__restrict, size_t);
]]
local Constants = {
-- The largest number rand will return (same as INT_MAX).
RAND_MAX = 0x7fffffff;
EXIT_FAILURE = 1; -- Failing exit status.
EXIT_SUCCESS = 0; -- Successful exit status.
}
local Functions = {
-- numeric parsing
atof = ffi.C.atof;
atoi = ffi.C.atoi;
atol = ffi.C.atol;
atoll = ffi.C.atoll;
strtod = ffi.C.strtod;
-- memory allocation
aligned_alloc = ffi.C.aligned_alloc;
malloc = ffi.C.malloc;
free = ffi.C.free;
calloc = ffi.C.calloc;
realloc = ffi.C.realloc;
-- exiting
abort = ffi.C.abort;
--atexit = ffi.C.atexit;
exit = ffi.C.exit;
--at_quick_exit = ffi.C.at_quick_exit;
quick_exit = ffi.C.quick_exit;
-- system related
getenv = ffi.C.getenv;
system = ffi.C.system;
-- Miscellany
bsearch = ffi.C.bsearch;
qsort = ffi.C.qsort;
abs = ffi.C.abs;
labs = ffi.C.labs;
llabs = ffi.C.llabs;
-- multi-byte character conversions
mblen = ffi.C.mblen;
mbtowc = ffi.C.mbtowc;
wctomb = ffi.C.wctomb;
mbstowcs = ffi.C.mbstowcs;
wcstombs = ffi.C.wcstombs;
}
local exports = {
Constants = Constants;
Functions = Functions;
}
setmetatable(exports, {
__call = function(self, tbl)
utils.copyPairs(self.Constants, tbl)
utils.copyPairs(self.Functions, tbl)
return self
end,
})
return exports
|
local react = require "react"
local tests = {}
local test_names = {}
local function test(name, fn)
table.insert(test_names, name)
table.insert(tests, fn)
end
--==========================================================
-- test callback
--==========================================================
local function new_test_callback()
local callback = {}
callback.times_called = 0
callback.last_called_with = nil
callback.fn = function(arg)
callback.times_called = callback.times_called + 1
callback.last_called_with = arg
end
return callback
end
--==========================================================
-- define tests
--==========================================================
test("input cells have a value", function()
local r = react.Reactor()
local input = r.InputCell(2)
assert(input.get_value() == 2)
end)
--==========================================================
test("an input cell's value can be set", function()
local r = react.Reactor()
local input = r.InputCell(4)
input.set_value(20)
assert(input.get_value() == 20)
end)
--==========================================================
test("compute cells calculate initial value", function()
local r = react.Reactor()
local input = r.InputCell(1)
local output = r.ComputeCell(input, function(x)
return x + 1
end)
assert(output.get_value() == 2)
end)
--==========================================================
test("compute cells take inputs in the right order", function()
local r = react.Reactor()
local one = r.InputCell(1)
local two = r.InputCell(2)
local output = r.ComputeCell(one, two, function(x, y)
return x + y * 10
end)
assert(output.get_value() == 21)
end)
--==========================================================
test("compute cells update value when dependencies are changed", function()
local r = react.Reactor()
local input = r.InputCell(1)
local inc = r.InputCell(1)
local output = r.ComputeCell(input, inc, function(x, y)
return x + y
end)
input.set_value(3)
assert(output.get_value() == 4)
inc.set_value(2)
assert(output.get_value() == 5)
end)
--==========================================================
test("compute cells can depend on other compute cells", function()
local r = react.Reactor()
local input = r.InputCell(1)
local times_two = r.ComputeCell(input, function(x)
return x * 2
end)
local times_thirty = r.ComputeCell(input, function(x)
return x * 30
end)
local output = r.ComputeCell(times_two, times_thirty, function(x, y)
return x + y
end)
assert(output.get_value() == 32, "initial assertion")
input.set_value(3)
assert(output.get_value() == 96, "second assertion")
end)
--==========================================================
test("compute cells fire callbacks", function()
local r = react.Reactor()
local input = r.InputCell(1)
local output = r.ComputeCell(input, function(x)
return x + 1
end)
local callback = new_test_callback()
output.watch(callback.fn)
input.set_value(3)
assert(callback.times_called == 1)
assert(callback.last_called_with == 4)
end)
--==========================================================
test("callbacks only fire on change", function()
local r = react.Reactor()
local input = r.InputCell(1)
local output = r.ComputeCell(input, function(x)
if x < 3 then
return 111
else
return 222
end
end)
local callback = new_test_callback()
output.watch(callback.fn)
input.set_value(2)
assert(callback.times_called == 0)
input.set_value(4)
assert(callback.times_called == 1)
assert(callback.last_called_with == 222)
end)
--==========================================================
test("callbacks can be added and removed", function()
local r = react.Reactor()
local input = r.InputCell(11)
local output = r.ComputeCell(input, function(x)
return x + 1
end)
local callback1 = new_test_callback()
local callback2 = new_test_callback()
local callback3 = new_test_callback()
output.watch(callback1.fn)
output.watch(callback2.fn)
input.set_value(31)
output.unwatch(callback1.fn)
output.watch(callback3.fn)
input.set_value(41)
assert(callback1.times_called == 1)
assert(callback1.last_called_with == 32)
assert(callback2.times_called == 2)
assert(callback2.last_called_with == 42)
assert(callback3.times_called == 1)
assert(callback3.last_called_with == 42)
end)
--==========================================================
test("removing a callback multiple times doesn't interfere with other callbacks", function()
local r = react.Reactor()
local input = r.InputCell(1)
local output = r.ComputeCell(input, function(x)
return x + 1
end)
local callback1 = new_test_callback()
local callback2 = new_test_callback()
output.watch(callback1.fn)
output.watch(callback2.fn)
for i = 1, 10 do output.unwatch(callback1.fn) end
input.set_value(2)
assert(callback1.times_called == 0)
assert(callback2.times_called == 1)
assert(callback2.last_called_with == 3)
end)
--==========================================================
test("callbacks only called once even if multiple inputs change", function()
local r = react.Reactor()
local input = r.InputCell(1)
local plus_one = r.ComputeCell(input, function(x)
return x + 1
end)
local minus_one1 = r.ComputeCell(input, function(x)
return x - 1
end)
local minus_one2 = r.ComputeCell(minus_one1, function(x)
return x - 1
end)
local output = r.ComputeCell(plus_one, minus_one2, function(x, y)
return x * y
end)
local callback = new_test_callback()
output.watch(callback.fn)
input.set_value(4)
assert(callback.times_called == 1, "called more than once")
assert(callback.last_called_with == 10, "called with wrong value")
end)
--==========================================================
test("callbacks not called if inputs change but output doesn't", function()
local r = react.Reactor()
local input = r.InputCell(1)
local plus_one = r.ComputeCell(input, function(x)
return x + 1
end)
local minus_one = r.ComputeCell(input, function(x)
return x - 1
end)
local always_two = r.ComputeCell(plus_one, minus_one, function(x, y)
return x - y
end)
local callback = new_test_callback()
always_two.watch(callback.fn)
for i = 1, 10 do input.set_value(i) end
assert(callback.times_called == 0)
end)
--==========================================================
-- execute tests
--==========================================================
local successes = 0
local failures = 0
for i, test in ipairs(tests) do
local res, err = pcall(test)
if res then
print("test "..i..": passed! ["..test_names[i].."]")
successes = successes + 1
else
print("test "..i..": FAILED! ["..test_names[i].."] "..err)
failures = failures + 1
end
end
print("")
print("TESTS PASSED: "..successes)
print("TESTS FAILED: "..failures)
|
--[[
--MIT License
--
--Copyright (c) 2019 PapyElGringo
--Copyright (c) 2019 Tom Meyers
--
--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 awful = require('awful')
local beautiful = require('beautiful')
local wibox = require('wibox')
local mat_list_item = require('widget.material.list-item')
local mat_icon = require('widget.material.icon')
local dpi = require('beautiful').xresources.apply_dpi
local icons = require('theme.icons')
local gears = require('gears')
local scrollbar = require('widget.scrollbar')
return function(_, panel)
local search_button =
wibox.widget {
wibox.widget {
icon = icons.search,
size = dpi(24),
widget = mat_icon
},
wibox.widget {
text = 'Search Applications',
font = 'Iosevka Regular 12',
widget = wibox.widget.textbox,
align = center
},
forced_height = dpi(12),
clickable = true,
widget = mat_list_item
}
search_button:buttons(
awful.util.table.join(
awful.button(
{},
1,
function()
panel:run_rofi()
end
)
)
)
local dpi_button =
wibox.widget {
wibox.widget {
icon = icons.monitor,
size = dpi(24),
widget = mat_icon
},
wibox.widget {
text = 'Change Application Scaling',
font = 'Iosevka Regular 12',
widget = wibox.widget.textbox,
align = center
},
forced_height = dpi(12),
clickable = true,
widget = mat_list_item
}
dpi_button:buttons(
awful.util.table.join(
awful.button(
{},
1,
function()
panel:run_dpi()
end
)
)
)
local wifi_button =
wibox.widget {
wibox.widget {
icon = icons.wifi,
size = dpi(24),
widget = mat_icon
},
wibox.widget {
text = 'Connect to a wireless network',
font = 'Iosevka Regular 12',
widget = wibox.widget.textbox,
align = center
},
forced_height = dpi(12),
clickable = true,
widget = mat_list_item
}
wifi_button:buttons(
awful.util.table.join(
awful.button(
{},
1,
function()
panel:run_wifi()
end
)
)
)
local exit_button =
wibox.widget {
wibox.widget {
icon = icons.logout,
size = dpi(24),
widget = mat_icon
},
wibox.widget {
text = 'End work session',
font = 'Iosevka Regular 12',
widget = wibox.widget.textbox
},
clickable = true,
divider = false,
widget = mat_list_item
}
exit_button:buttons(
awful.util.table.join(
awful.button(
{},
1,
function()
panel:toggle()
_G.exit_screen_show()
end
)
)
)
local separator = wibox.widget {
orientation = 'vertical',
forced_height = 10,
opacity = 0.00,
widget = wibox.widget.separator
}
local topSeparator = wibox.widget {
orientation = 'horizontal',
forced_height = 20,
opacity = 0,
widget = wibox.widget.separator,
}
local bottomSeparator = wibox.widget {
orientation = 'horizontal',
forced_height = 5,
opacity = 0,
widget = wibox.widget.separator,
}
return scrollbar(wibox.widget {
layout = wibox.layout.align.vertical,
{
topSeparator,
layout = wibox.layout.fixed.vertical,
{
wibox.widget {
search_button,
bg = '#ffffff20', --beautiful.background.hue_800,
shape = function(cr, w, h)
gears.shape.rounded_rect(cr, w, h, 28)
end,
widget = wibox.container.background,
},
widget = mat_list_item,
},
separator,
require('layout.left-panel.dashboard.quick-settings'),
require('layout.left-panel.dashboard.hardware-monitor'),
require('layout.left-panel.dashboard.action-center'),
separator,
layout = wibox.layout.fixed.vertical,
{
wibox.widget {
text = 'Network Settings',
font = 'Iosevka Regular 10',
align = 'left',
widget = wibox.widget.textbox
},
widget = mat_list_item,
},
layout = wibox.layout.fixed.vertical,
{
wibox.widget {
wifi_button,
bg = '#ffffff20', --beautiful.background.hue_800,
shape = function(cr, w, h)
gears.shape.rounded_rect(cr, w, h, 28)
end,
widget = wibox.container.background,
},
widget = mat_list_item,
},
separator,
layout = wibox.layout.fixed.vertical,
{
wibox.widget {
text = 'Screen Settings',
font = 'Iosevka Regular 10',
align = 'left',
widget = wibox.widget.textbox
},
widget = mat_list_item,
},
layout = wibox.layout.fixed.vertical,
{
wibox.widget {
dpi_button,
bg = '#ffffff20', --beautiful.background.hue_800,
shape = function(cr, w, h)
gears.shape.rounded_rect(cr, w, h, 28)
end,
widget = wibox.container.background,
},
widget = mat_list_item,
},
},
nil,
{
layout = wibox.layout.fixed.vertical,
wibox.widget{
wibox.widget{
exit_button,
bg = '#ffffff20',--beautiful.background.hue_800,
widget = wibox.container.background,
shape = function(cr, w, h)
gears.shape.rounded_rect(cr, w, h, 12)
end,
},
widget = mat_list_item,
},
bottomSeparator
}
})
end
|
object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s10_gen5 = SharedWeaponObjectTemplate:new {
clientTemplateFileName = "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s10_gen5.iff"
}
ObjectTemplates: addClientTemplate(object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s10_gen5, "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s10_gen5.iff")
object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s11_gen5 = SharedWeaponObjectTemplate:new {
clientTemplateFileName = "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s11_gen5.iff"
}
ObjectTemplates: addClientTemplate(object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s11_gen5, "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s11_gen5.iff")
object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s12_gen5 = SharedWeaponObjectTemplate:new {
clientTemplateFileName = "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s12_gen5.iff"
}
ObjectTemplates: addClientTemplate(object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s12_gen5, "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s12_gen5.iff")
object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s13_gen5 = SharedWeaponObjectTemplate:new {
clientTemplateFileName = "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s13_gen5.iff"
}
ObjectTemplates: addClientTemplate(object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s13_gen5, "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s13_gen5.iff")
object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s1_gen5 = SharedWeaponObjectTemplate:new {
clientTemplateFileName = "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s1_gen5.iff"
}
ObjectTemplates: addClientTemplate(object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s1_gen5, "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s1_gen5.iff")
object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s2_gen5 = SharedWeaponObjectTemplate:new {
clientTemplateFileName = "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s2_gen5.iff"
}
ObjectTemplates: addClientTemplate(object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s2_gen5, "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s2_gen5.iff")
object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s3_gen5 = SharedWeaponObjectTemplate:new {
clientTemplateFileName = "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s3_gen5.iff"
}
ObjectTemplates: addClientTemplate(object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s3_gen5, "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s3_gen5.iff")
object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s4_gen5 = SharedWeaponObjectTemplate:new {
clientTemplateFileName = "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s4_gen5.iff"
}
ObjectTemplates: addClientTemplate(object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s4_gen5, "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s4_gen5.iff")
object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s5_gen5 = SharedWeaponObjectTemplate:new {
clientTemplateFileName = "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s5_gen5.iff"
}
ObjectTemplates: addClientTemplate(object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s5_gen5, "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s5_gen5.iff")
object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s6_gen5 = SharedWeaponObjectTemplate:new {
clientTemplateFileName = "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s6_gen5.iff"
}
ObjectTemplates: addClientTemplate(object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s6_gen5, "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s6_gen5.iff")
object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s7_gen5 = SharedWeaponObjectTemplate:new {
clientTemplateFileName = "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s7_gen5.iff"
}
ObjectTemplates: addClientTemplate(object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s7_gen5, "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s7_gen5.iff")
object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s8_gen5 = SharedWeaponObjectTemplate:new {
clientTemplateFileName = "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s8_gen5.iff"
}
ObjectTemplates: addClientTemplate(object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s8_gen5, "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s8_gen5.iff")
object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s9_gen5 = SharedWeaponObjectTemplate:new {
clientTemplateFileName = "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s9_gen5.iff"
}
ObjectTemplates: addClientTemplate(object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_one_handed_s9_gen5, "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s9_gen5.iff")
|
function getPlayerFromPartialName(name)
local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil
if name then
for _, player in ipairs(getElementsByType("player")) do
local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower()
if name_:find(name, 1, true) then
return player
end
end
end
end
function eject(plr, _, plr2)
if (plr.vehicle and plr.vehicle.controller == plr) then
if (plr2 == "*") then
local occupants = plr.vehicle.occupants
if (occupants) then
for _, plr2 in ipairs(plr.vehicle.occupants) do
plr2:removeFromVehicle(plr.vehicle)
exports.UCDdx:new(plr2, "You got ejected from the vehicle by "..tostring(plr.name), 255, 0, 0)
end
exports.UCDdx:new(plr, "You have ejected all players inside your vehicle", 0, 255, 0)
end
elseif (tostring(plr2)) then
local plr2 = getPlayerFromPartialName(plr2)
if (isElement(plr2)) then
if (plr2.vehicle == plr.vehicle) then
plr2:removeFromVehicle(plr.vehicle)
exports.UCDdx:new(plr2, "You got ejected from the vehicle by "..tostring(plr.name), 255, 0, 0)
exports.UCDdx:new(plr, "You have ejected "..tostring(plr2.name).." from the vehicle", 0, 255, 0)
end
end
end
end
end
addCommandHandler("eject", eject)
|
๏ปฟif GetLocale() ~= "deDE" then return end
local L
---------------
-- Kargath Bladefist --
---------------
L= DBM:GetModLocalization(1128)
---------------------------
-- The Butcher --
---------------------------
L= DBM:GetModLocalization(971)
---------------------------
-- Tectus, the Living Mountain --
---------------------------
L= DBM:GetModLocalization(1195)
L:SetMiscLocalization({
pillarSpawn = "ERHEBT EUCH, BERGE!"
})
------------------
-- Brackenspore, Walker of the Deep --
------------------
L= DBM:GetModLocalization(1196)
L:SetOptionLocalization({
InterruptCounter = "Setze \"Verrottung\"-Zรคhler zurรผck nach",
Two = "zwei Wirkungen",
Three = "drei Wirkungen",
Four = "vier Wirkungen"
})
--------------
-- Twin Ogron --
--------------
L= DBM:GetModLocalization(1148)
L:SetOptionLocalization({
PhemosSpecial = "Spiele akustischen Countdown fรผr Phemos' Spezialfรคhigkeiten",
PolSpecial = "Spiele akustischen Countdown fรผr Pols Spezialfรคhigkeiten",
PhemosSpecialVoice = "Spiele gesprochene Warnungen fรผr Phemos' Spezialfรคhigkeiten",
PolSpecialVoice = "Spiele gesprochene Warnungen fรผr Pols Spezialfรคhigkeiten"
})
--------------------
--Koragh --
--------------------
L= DBM:GetModLocalization(1153)
L:SetWarningLocalization({
specWarnExpelMagicFelFades = "Teufelsenergie endet in 5s - geh zum Start"
})
L:SetOptionLocalization({
specWarnExpelMagicFelFades = "Spezialwarnung zum Hingehen zur Startposition, wenn $spell:172895 endet"
})
L:SetMiscLocalization({
supressionTarget1 = "Ich werde Euch zermalmen!",
supressionTarget2 = "Schweigt!",
supressionTarget3 = "Ruhe!",
supressionTarget4 = "Ich reiรe Euch in Stรผcke!"
})
--------------------------
-- Imperator Mar'gok --
--------------------------
L= DBM:GetModLocalization(1197)
L:SetTimerLocalization({
timerNightTwistedCD = "Nรคchste Nachtsiechende Glรคubiger"
})
L:SetOptionLocalization({
GazeYellType = "Typ des Schreis fรผr Starren des Abgrunds",
Countdown = "Countdown bis zum Ablauf",
Stacks = "Stapelanzahl beim Erhalt",
timerNightTwistedCD = "Zeige Zeit bis nรคchste Nachtsiechende Glรคubiger erscheinen"
})
L:SetMiscLocalization({
BrandedYell = "Gebrandmarkt (%d) %dm",
GazeYell = "Starren endet in %d",
GazeYell2 = "Starren (%d) auf %s",
PlayerDebuffs = "Nรคchste zum Vorgeschmack"
})
-------------
-- Trash --
-------------
L = DBM:GetModLocalization("HighmaulTrash")
L:SetGeneralLocalization({
name = "Trash des Hochfels"
})
|
package.path = "?.lua;../?.lua"
local input = require "input"
local utils = require "utils"
local BYTE_ELF = 69
local BYTE_GOBLIN = 71
local BYTE_WALL = 35
local WALL = -1
local CLEAR = 0
local ELF = "elf"
local GOBLIN = "goblin"
local abs = math.abs
-- up, left, right, down = reading order
local deltas = { 0, -1, -1, 0, 1, 0, 0, 1 }
function initial(kind)
if kind == ELF then return "E" else return "G" end
end
function enemy_initial(kind)
if kind == ELF then return "G" else return "E" end
end
function visualize(board, units, headline)
print(headline)
local str = ""
for i, v in ipairs(board.grid) do
if v == CLEAR then
str = str .. "."
elseif v == WALL then
str = str .. "#"
else
local find_with_id = function(a) return a.id == v end
local unit = utils.array_first_where(units, find_with_id)
if unit.kind == GOBLIN then
str = str .. "G"
else
str = str .. "E"
end
end
if str:len() % board.width == 0 then
print(str)
str = "" -- Next line
end
end
-- for _, unit in ipairs(units) do
-- if not unit.dead then
-- print(string.format("%s at %d,%d is %d", initial(unit.kind), unit.x, unit.y, unit.hp))
-- end
-- end
print()
end
function index(x, y, width)
return 1 + x + y * width
end
function xy(index, width)
local index = index - 1
local y = math.floor(index / width)
local x = index - y * width
return x, y
end
function make_goblin(x, y)
-- "dead" the unit is dead.
-- "killed" the unit has been killed this turn. At the end of the tick, the flag is reset to false and "dead" is set true.
return { id = nil, kind = GOBLIN, x = x, y = y, killed = false, dead = false, hp = 200 }
end
function make_elf(x, y)
return { id = nil, kind = ELF, x = x, y = y, killed = false, dead = false, hp = 200 }
end
function next_unit_id(units)
return "" .. #units
end
function add_unit(unit, units)
local unit_id = next_unit_id(units)
unit.id = unit_id
units[#units + 1] = unit
return unit_id
end
function parse_line(line, y, board, units)
for i = 1, line:len() do
local x = i - 1
local index = index(x, y, board.width)
local byt = line:byte(i)
if byt == BYTE_GOBLIN then
local unit = make_goblin(x, y)
board.grid[index] = add_unit(unit, units)
elseif byt == BYTE_ELF then
local unit = make_elf(x, y)
board.grid[index] = add_unit(unit, units)
elseif byt == BYTE_WALL then
board.grid[index] = WALL
else
board.grid[index] = CLEAR
end
end
end
function parse(lines)
local w = lines[1]:len()
local h = #lines
local board = { grid = {}, width = w, height = h }
local units = {}
for i = 1, #lines do
local y = i - 1
parse_line(lines[i], y, board, units)
end
return board, units
end
function sort_by_reading_order(a, b)
if a.y < b.y then return true end
if a.y == b.y then return a.x < b.x end
end
function find_targets_of(unit, units)
local kind
if unit.kind == GOBLIN then kind = ELF else kind = GOBLIN end
return utils.array_filter(units, function(a) return not a.dead and a.kind == kind end)
end
function find_squares_next_to(positions, board)
local squares = {}
local deltas = deltas
for _, target in ipairs(positions) do
for i = 1, #deltas, 2 do
local index = index(target.x + deltas[i], target.y + deltas[i + 1], board.width)
if board.grid[index] == CLEAR then squares[#squares + 1] = index end
end
end
return squares
end
function filter_adjacent_to(x, y)
return function(a)
local abs_x = abs(x - a.x)
local abs_y = abs(y - a.y)
return abs_x == 1 and abs_y == 0 or abs_x == 0 and abs_y == 1
end
end
function attack(x, y, targets, board)
local filter = filter_adjacent_to(x, y)
local adjacent_targets = utils.array_filter(targets, filter)
if #adjacent_targets == 0 then return end -- No target in range
local weakest_targets = {}
for _, t in ipairs(adjacent_targets) do
if #weakest_targets == 0 or t.hp == weakest_targets[1].hp then
weakest_targets[#weakest_targets + 1] = t
elseif t.hp < weakest_targets[1].hp then
weakest_targets = { t }
end
end
table.sort(weakest_targets, sort_by_reading_order)
local target = weakest_targets[1]
-- print(string.format("%s at %d,%d attacks %s at %d,%d", enemy_initial(target.kind), x, y, initial(target.kind), target.x, target.y))
target.hp = target.hp - 3
if target.hp <= 0 then
target.killed = true
end
return true
end
function make_path_node(index, ancestor, depth)
return { index = index, ancestor = ancestor }
end
function path(src_index, dst_index, board)
-- Invert source and destination to avoid reversing of path array below
local src_index, dst_index = dst_index, src_index
local queue = { make_path_node(src_index, nil) }
-- Algorithm increments head index instead of removing elements at the head of the array
local queue_head_index = 1
local visited = { src_index = 1 }
while queue_head_index <= #queue do
local node = queue[queue_head_index]
queue_head_index = queue_head_index + 1
if node.index == dst_index then
local path = {}
local n = node
while n ~= nil do -- Walks back along the path
path[#path + 1] = n.index
n = n.ancestor
end
return path
end
local x, y = xy(node.index, board.width)
for i = 1, #deltas, 2 do
local neighbor_index = index(x + deltas[i], y + deltas[i + 1], board.width)
if visited[neighbor_index] == nil and (board.grid[neighbor_index] == CLEAR or neighbor_index == dst_index) then
queue[#queue + 1] = make_path_node(neighbor_index, node)
visited[neighbor_index] = 1
end
end
end
end
function move(x, y, targets, board, units)
local dst_indexes = find_squares_next_to(targets, board)
local current_index = index(x, y, board.width)
local shortest_paths = {}
for _, dst_index in ipairs(dst_indexes) do
local path = path(current_index, dst_index, board)
if path then
if #shortest_paths == 0 or #path == #shortest_paths[1] then
shortest_paths[#shortest_paths + 1] = path
elseif #path < #shortest_paths[1] then
shortest_paths = { path }
end
end
end
if #shortest_paths == 0 then
-- No target is reachable
return
elseif #shortest_paths > 1 then
-- Sort shortest paths in reading order
table.sort(shortest_paths, function(a, b) return a[#a] < b[#b] end)
end
local path = shortest_paths[1]
local next_index = path[2]
-- Update board
local unit_id = board.grid[current_index]
board.grid[current_index], board.grid[next_index] = CLEAR, unit_id
-- Update unit
local unit = utils.array_first_where(units, function(a) return a.id == unit_id end)
unit.x, unit.y = xy(next_index, board.width)
end
function tick(board, units)
table.sort(units, sort_by_reading_order)
local units = utils.array_filter(units, function(a) return not a.dead end)
for _, unit in ipairs(units) do
if not unit.dead then
local targets = find_targets_of(unit, units)
if #targets == 0 then return true end -- End of combat!
if not attack(unit.x, unit.y, targets, board, units) then
move(unit.x, unit.y, targets, board, units)
attack(unit.x, unit.y, targets, board, units)
end
for _, target in ipairs(targets) do
if target.killed then
target.dead = true
target.killed = false
-- print(string.format("%s at %d,%d died", initial(target.kind), target.x, target.y))
board.grid[index(target.x, target.y, board.width)] = CLEAR
end
end
end
end
end
function solve(input)
local t0 = os.clock()
local trim = function(a) return utils.string_trim(a) end
local lines = utils.array_map(input, trim)
local board, units = parse(lines)
visualize(board, units, "Initial state")
local rounds = 0
while true do
if tick(board, units) then
visualize(board, units, string.format("End of combat in round %d", rounds + 1))
break
end
rounds = rounds + 1
visualize(board, units, string.format("After round %d", rounds))
end
local sum = 0
for _, unit in ipairs(units) do
if not unit.dead then
sum = sum + unit.hp
end
end
local result = rounds * sum
print("full rounds: " .. rounds .. ", total remaining hp: " .. sum)
local time = os.clock() - t0
print(string.format("Elapsed time: %.4f", time))
return result
end
local filename = arg[1] or "input.txt"
local input = input.read_file(filename)
print("Solution: " .. (solve(input) or "not found"))
|
o = Game.Players.LocalPlayer
o.Character.Humanoid.PlatformStand = true
bv = Instance.new("BodyAngularVelocity")
bv.Parent = o.Character.Torso
bv.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
bg = Instance.new("BodyGyro")
bg.Parent = o.Character.Torso
bg.maxTorque = Vector3.new(0, 0, 0)
while true do
local move = math.random(1, 4)
if move == 1 then
bv.angularvelocity = Vector3.new(20, 0, 20)
end
if move == 2 then
bv.angularvelocity = Vector3.new(20, 50, 20)
end
if move == 3 then
bv.angularvelocity = Vector3.new(0, 0, 20)
end
if move == 4 then
bv.angularvelocity = Vector3.new(20, 0, 0)
end
wait(1)
end
|
game.AddParticles("particles/cstm_muzzleflashes.pcf")
game.AddParticles("particles/cstm_muzzleflashes2.pcf")
PrecacheParticleSystem("cstm_child_sparks_small")
PrecacheParticleSystem("cstm_child_sparks_medium")
PrecacheParticleSystem("cstm_child_sparks_large")
PrecacheParticleSystem("cstm_child_sparks_verylarge")
PrecacheParticleSystem("cstm_child_smoke_small")
PrecacheParticleSystem("cstm_child_smoke_medium")
PrecacheParticleSystem("cstm_child_smoke_large")
PrecacheParticleSystem("cstm_child_smoke_verylarge")
PrecacheParticleSystem("cstm_child_muzzle_small")
PrecacheParticleSystem("cstm_child_muzzle_medium")
PrecacheParticleSystem("cstm_child_muzzle_large")
PrecacheParticleSystem("cstm_child_heat")
PrecacheParticleSystem("cstm_muzzle_pistol")
PrecacheParticleSystem("cstm_muzzle_smg")
PrecacheParticleSystem("cstm_muzzle_ar")
PrecacheParticleSystem("cstm_muzzle_br")
PrecacheParticleSystem("cstm_incendiary_hit")
PrecacheParticleSystem("cstm_frag_fly")
PrecacheParticleSystem("cstm_frag_expl")
local pmodel = util.PrecacheModel
pmodel("models/attachments/kascope.mdl")
pmodel("models/attachments/cmore.mdl")
pmodel("models/bunneh/scope01.mdl")
pmodel("models/wystan/cmag.mdl")
pmodel("models/wystan/2cog.mdl")
pmodel("models/wystan/2octorrds.mdl")
pmodel("models/wystan/2otech557sight.mdl")
pmodel("models/wystan/aimpoint.mdl")
pmodel("models/wystan/akrailmount.mdl")
pmodel("models/wystan/bipod.mdl")
pmodel("models/wystan/foregrip1.mdl")
pmodel("models/wystan/m203.mdl")
pmodel("models/wystan/rail.mdl")
pmodel("models/props_c17/oildrum001.mdl")
pmodel("models/props_c17/FurnitureBoiler001a.mdl")
/*timer.Simple(3, function()
for k, v in pairs(weapons.GetList()) do
if v.ThisClass and v.ThisClass:find("cstm_") then
if v.ViewModel then
pmodel(v.ViewModel)
end
end
end
end)*/
FS = {}
FS["CSTM_SilencedShot"] = "weapons/m4a1/m4a1-1.wav"
local tbl = {channel = CHAN_WEAPON,
volume = 1,
soundlevel = 120,
pitchstart = 100,
pitchend = 100}
for k, v in pairs(FS) do
tbl.name = k
tbl.sound = v
sound.Add(tbl)
end
AttEnum = {
["acog"] = 2,
["aimpoint"] = 3,
["eotech"] = 4,
["kobra"] = 5,
["grenadelauncher"] = 6,
["vertgrip"] = 7,
["cmag"] = 8,
["reflex"] = 9,
["laser"] = 10,
["bipod"] = 11,
["riflereflex"] = 12,
["ballistic"] = 13,
["elcan"] = 14}
CWAttachments = {}
CWAttachmentsMeta = {}
CWInternalParts = {}
CWInternalPartsMeta = {}
local clip, ammo, x, y, old, FT, ply, Lens
local BlackAmt, CamData, Ini = 1, {}, true
if CLIENT then
Lens = surface.GetTextureID("models/wystan/attachments/acog/lense2")
end
--[[
The following function allows you to register a weapon attachment for use with Customizable Weaponry weapons.
The first argument (key) should be a string. This argument has to be what you're going to call the attachment's VElement and WElement name.
The second argument (name) should be a string. The name should NOT match any other attachment names.
The third argument (num) should be the attachment's number. This number should NOT match any other attachment numbers.
The fourth argument (displaytexture) should be the attachment's texture it's going to use in the customization menu. It needs to be set on the client.
The fifth argument (scope) should be a table. If it's going to be a scope attachment - here is where shit gets tricky; if it's not going to be a scope - set it to false or nil.
== == == == == == == == == == == ==
The first variable within the scope table you're going to set is the aiming texture, this variable is called mat.
The second variable is going to be the size of the texture, this variable is called size. The size should lower as texture resolution rises.
So if you are going to draw a 64x64 texture, set size to 0.1, if you're going to draw a 128x128 texture, set size to 0.05, if you're going to draw a 256x256 texture, set size to 0.025 and so on.
Regardless, you should still pick the size you think looks best.
The third variable is going to be a string, this variable is called dist. This variable is going to tell the difference between his aiming position and the reticle that you can set on a SWEP.
So if you set it to "MyAttachmentDist", then in the SWEP's lua file you'll have to set SWEP.MyAttachmentDist to a number.
This is primarily used for render target scopes when the texture clips with the model, making it invisible/partially visible.
The fourth variable is going to be a number, this variable is called distno.
This variable will be used the same way as the variable 'dist', but it'll be used when the weapon's 'dist' variable is not defined.
The fifth variable is going to be a string, this variable is called pos. This variable is needed if the attachment you're going to add has back-up sights.
The variable should be named after the aiming position.
This prevents the code from drawing the aiming reticle when you're using the sight's back-up sights.
The sixth variable is going to be a boolean, this boolean is called aimmove. If you set it to true, then the aiming reticle will move along with the weapon when you take aim and move your mouse around.
The seventh variable is going to be how much we're going to zoom in when taking aim, this variable is called fovmod.
Usually for reflex sights I use 15.
(OPTIONAL) The eighth variable is going to be the rendering function, and it should be called renderfunc. This can be used if you're going to make a render target based scope. (in other words, a scope that magnifies)
== == == == == == == == == == == ==
The sixth argument (incompability) should be a table. This table has to contain the attachments it's not compatible with, AKA attachments it should hide when attaching this attachment.
The seventh argument (description) should be a table. This table will contain the attachment's description when opening the customization menu and attaching it to a weapon.
The eighth argument (attfunc) is going to be a function. This function will be called when you attach the attachment to a weapon. So if you need to modify the weapon's stats - use this function.
The ninth argument (deattfunc) is going to be a function. This function will be called when you detach the attachmen from a weapon. So if you need to revert a weapon's stats to what it was - use this function.
The tenth argument (modelattfunc) is going to be a function. This function will be called on the CLIENT when you attach the attachment.
This function will tell the client what to do with other models when attaching the attachment. You can also use this function to update certain variables without having to network additional stuff.
The argument you're going to provide it with is the weapon entity.
]]--
AutoAtt, AutoPart = {}, {}
function CSTM_AddAttachment(tbl) //name, num, scope, incompability, description, svattfunc, svdeattfunc, clattfunc, cldeattfunc)
CWAttachments[tbl.key] = {key = tbl.key, name = tbl.name, num = tbl.num, displaytexture = tbl.displaytexture, scope = tbl.scope, incompability = tbl.incompability, description = tbl.description, canattach = tbl.canattach, svattfunc = tbl.svattfunc, svdeattfunc = tbl.svdeattfunc, clattfunc = tbl.clattfunc, cldeattfunc = tbl.cldeattfunc}
CWAttachmentsMeta[tbl.num] = tbl.key
if SERVER then
CreateConVar("cstm_att_" .. tbl.key, "0", {FCVAR_REPLICATED, FCVAR_ARCHIVE, FCVAR_NOTIFY})
AutoAtt["cstm_att_" .. tbl.key] = tbl.key
else
CreateClientConVar("cstm_att_" .. tbl.key .. "_cl", "0", true, true)
end
end
----
-- WEAPON ATTACHMENTS
----
local NA = {}
NA.key = "reflex"
NA.name = "Docter"
NA.num = 1
if CLIENT then
NA.displaytexture = surface.GetTextureID("VGUI/entities/upgr_reflexsight")
end
NA.scope = {mat = Material("sprites/aim_reticule"), size = 0.04, dist = "DocterDist", distno = 15, aimmove = true, fovmod = 5}
NA.incompability = {"acog", "aimpoint", "eotech", "riflereflex", "kobra", "ballistic", "elcan"}
NA.description = {[1] = {t = "Provides a bright red reticle to enhance aiming.", c = Color(150, 255, 150, 255)}}
NA.clattfunc = function(wep)
wep.AimPos = wep.ReflexPos
wep.AimAng = wep.ReflexAng
wep.HasInstalledScope = true
if wep.VElements["rail"] then
wep.VElements["rail"].color.a = 255
end
if wep.WElements then
if wep.WElements["rail"] then
wep.WElements["rail"].color.a = 255
end
end
if wep.VElements["front"] and wep.VElements["rear"] then
wep.VElements["front"].modelEnt:SetBodygroup(1, 1)
wep.VElements["rear"].modelEnt:SetBodygroup(1, 1)
end
end
NA.cldeattfunc = function(wep)
wep.AimPos = wep.AimPos_Orig
wep.AimAng = wep.AimAng_Orig
wep.HasInstalledScope = false
if wep.VElements["rail"] then
wep.VElements["rail"].color.a = 0
end
if wep.WElements then
if wep.WElements["rail"] then
wep.WElements["rail"].color.a = 0
end
end
if wep.VElements["front"] and wep.VElements["rear"] then
wep.VElements["front"].modelEnt:SetBodygroup(1, 0)
wep.VElements["rear"].modelEnt:SetBodygroup(1, 0)
end
end
CSTM_AddAttachment(NA)
NA.key = "kobra"
NA.name = "Kobra"
NA.num = 2
if CLIENT then
NA.displaytexture = surface.GetTextureID("VGUI/entities/upgr_kobra")
end
NA.scope = {mat = Material("sprites/kobra_sight"), size = 0.3, dist = "KobraDist", distno = 15, aimmove = true, fovmod = 18}
NA.incompability = {"acog", "eotech", "reflex", "aimpoint", "riflereflex", "ballistic"}
NA.description = {[1] = {t = "Provides a bright red three-part reticle to enhance aiming.", c = Color(150, 255, 150, 255)},
[2] = {t = "Slightly increases aim zoom.", c = Color(150, 255, 150, 255)}}
NA.clattfunc = function(wep)
wep.AimPos = wep.KobraPos
wep.AimAng = wep.KobraAng
wep.HasInstalledScope = true
if wep.VElements["rail"] then
wep.VElements["rail"].color.a = 255
end
if wep.WElements then
if wep.WElements["rail"] then
wep.WElements["rail"].color.a = 255
end
end
if wep.VElements["front"] and wep.VElements["rear"] then
wep.VElements["front"].modelEnt:SetBodygroup(1, 1)
wep.VElements["rear"].modelEnt:SetBodygroup(1, 1)
end
end
NA.cldeattfunc = function(wep)
wep.AimPos = wep.AimPos_Orig
wep.AimAng = wep.AimAng_Orig
wep.HasInstalledScope = false
if wep.VElements["rail"] then
wep.VElements["rail"].color.a = 0
end
if wep.WElements then
if wep.WElements["rail"] then
wep.WElements["rail"].color.a = 0
end
end
if wep.VElements["front"] and wep.VElements["rear"] then
wep.VElements["front"].modelEnt:SetBodygroup(1, 0)
wep.VElements["rear"].modelEnt:SetBodygroup(1, 0)
end
end
CSTM_AddAttachment(NA)
NA = {}
NA.key = "riflereflex"
NA.name = "Reflex sight"
NA.num = 3
if CLIENT then
NA.displaytexture = surface.GetTextureID("VGUI/entities/upgr_riflereflex")
end
NA.scope = {mat = Material("sprites/aim_reticule"), size = 0.04, dist = "RReflexDist", distno = 15, aimmove = true, fovmod = 18}
NA.incompability = {"acog", "eotech", "reflex", "aimpoint", "kobra", "ballistic", "elcan"}
NA.description = {[1] = {t = "Provides a bright red reticle to enhance aiming.", c = Color(150, 255, 150, 255)},
[2] = {t = "Slightly increases aim zoom.", c = Color(150, 255, 150, 255)}}
NA.clattfunc = function(wep)
wep.AimPos = wep.RReflexPos
wep.AimAng = wep.RReflexAng
wep.HasInstalledScope = true
if wep.VElements["rail"] then
wep.VElements["rail"].color.a = 255
end
if wep.WElements then
if wep.WElements["rail"] then
wep.WElements["rail"].color.a = 255
end
end
if wep.VElements["front"] and wep.VElements["rear"] then
wep.VElements["front"].modelEnt:SetBodygroup(1, 1)
wep.VElements["rear"].modelEnt:SetBodygroup(1, 1)
end
end
NA.cldeattfunc = function(wep)
wep.AimPos = wep.AimPos_Orig
wep.AimAng = wep.AimAng_Orig
wep.HasInstalledScope = false
if wep.VElements["rail"] then
wep.VElements["rail"].color.a = 0
end
if wep.WElements then
if wep.WElements["rail"] then
wep.WElements["rail"].color.a = 0
end
end
if wep.VElements["front"] and wep.VElements["rear"] then
wep.VElements["front"].modelEnt:SetBodygroup(1, 0)
wep.VElements["rear"].modelEnt:SetBodygroup(1, 0)
end
end
CSTM_AddAttachment(NA)
NA = {}
NA.key = "eotech"
NA.name = "EoTech 557"
NA.num = 4
if CLIENT then
NA.displaytexture = surface.GetTextureID("VGUI/entities/upgr_eotech557")
end
NA.scope = {mat = Material("sprites/eotech_reddot"), size = 0.375, dist = "EoTechDist", distno = 15, aimmove = true, fovmod = 18}
NA.incompability = {"acog", "aimpoint", "reflex", "riflereflex", "kobra", "ballistic", "elcan"}
NA.description = {[1] = {t = "Provides a bright red sphere-like reticle to enhance aiming.", c = Color(150, 255, 150, 255)},
[2] = {t = "Slightly increases aim zoom.", c = Color(150, 255, 150, 255)}}
NA.clattfunc = function(wep)
wep.AimPos = wep.ReflexPos
wep.AimAng = wep.ReflexAng
wep.HasInstalledScope = true
if wep.NoRail != true and wep.EoTechWithRail != true then
wep.VElements["rail"].color.a = 0
if wep.WElements and wep.WElements["rail"] then
wep.WElements["rail"].color.a = 0
end
elseif wep.EoTechWithRail then
if wep.VElements["rail"] then
wep.VElements["rail"].color.a = 255
end
if wep.WElements then
if wep.WElements and wep.WElements["rail"] then
wep.WElements["rail"].color.a = 255
end
end
end
if wep.VElements["front"] and wep.VElements["rear"] then
wep.VElements["front"].modelEnt:SetBodygroup(1, 1)
wep.VElements["rear"].modelEnt:SetBodygroup(1, 1)
end
end
NA.cldeattfunc = function(wep)
wep.AimPos = wep.AimPos_Orig
wep.AimAng = wep.AimAng_Orig
wep.HasInstalledScope = false
if wep.VElements["rail"] then
wep.VElements["rail"].color.a = 0
end
if wep.WElements then
if wep.WElements["rail"] then
wep.WElements["rail"].color.a = 0
end
end
if wep.VElements["front"] and wep.VElements["rear"] then
wep.VElements["front"].modelEnt:SetBodygroup(1, 0)
wep.VElements["rear"].modelEnt:SetBodygroup(1, 0)
end
end
CSTM_AddAttachment(NA)
NA = {}
NA.key = "aimpoint"
NA.name = "Aimpoint"
NA.num = 5
if CLIENT then
NA.displaytexture = surface.GetTextureID("VGUI/entities/upgr_aimpoint")
end
NA.scope = {mat = Material("sprites/aim_reticule"), size = 0.04, dist = "AimpointDist", distno = 15, aimmove = true, fovmod = 21}
NA.incompability = {"acog", "eotech", "reflex", "riflereflex", "kobra", "ballistic", "elcan"}
NA.description = {[1] = {t = "Provides a bright red reticle to enhance aiming.", c = Color(150, 255, 150, 255)},
[2] = {t = "Moderately increases aim zoom.", c = Color(150, 255, 150, 255)}}
NA.clattfunc = function(wep)
wep.AimPos = wep.ScopePos
wep.AimAng = wep.ScopeAng
wep.HasInstalledScope = true
if wep.VElements["rail"] then
wep.VElements["rail"].color.a = 255
end
if wep.WElements then
if wep.WElements["rail"] then
wep.WElements["rail"].color.a = 255
end
end
if wep.VElements["front"] and wep.VElements["rear"] then
wep.VElements["front"].modelEnt:SetBodygroup(1, 1)
wep.VElements["rear"].modelEnt:SetBodygroup(1, 1)
end
end
NA.cldeattfunc = function(wep)
wep.AimPos = wep.AimPos_Orig
wep.AimAng = wep.AimAng_Orig
wep.HasInstalledScope = false
if wep.VElements["rail"] then
wep.VElements["rail"].color.a = 0
end
if wep.WElements then
if wep.WElements["rail"] then
wep.WElements["rail"].color.a = 0
end
end
if wep.VElements["front"] and wep.VElements["rear"] then
wep.VElements["front"].modelEnt:SetBodygroup(1, 0)
wep.VElements["rear"].modelEnt:SetBodygroup(1, 0)
end
end
CSTM_AddAttachment(NA)
NA = {}
NA.key = "elcan"
NA.name = "ELCAN C79"
NA.num = 6
if CLIENT then
NA.displaytexture = surface.GetTextureID("VGUI/entities/upgr_elcan")
end
NA.scope = {mat = Material("sprites/elcan_reticle"), size = 1, dist = "ELCANDist", distno = 4, pos = "ELCANPos", fovmod = 21, renderfunc = function(wep)
ply = LocalPlayer()
FT = FrameTime()
if wep:GetDTInt(3) != 1 or not wep.DrawTable then
BlackAmt = math.Approach(BlackAmt, 1, FT * 6)
else
BlackAmt = math.Approach(BlackAmt, 0, FT * 6)
end
x, y = ScrW(), ScrH()
old = render.GetRenderTarget()
CamData.angles = ply:EyeAngles() + ply:GetPunchAngle()
CamData.origin = ply:GetShootPos()
CamData.x = 0
CamData.y = 0
CamData.w = 256
CamData.h = 256
CamData.fov = 6.5
CamData.drawviewmodel = false
CamData.drawhud = false
render.SetRenderTarget(wep.AcogRT)
render.SetViewPort(0, 0, 256, 256)
if not Ini then
render.RenderView(CamData)
cam.Start2D()
surface.SetDrawColor(150, 150, 150, 245 * BlackAmt)
surface.SetTexture(Lens)
surface.DrawTexturedRect(0, 0, 256, 256)
cam.End2D()
end
render.SetViewPort(0, 0, x, y)
render.SetRenderTarget(old)
Ini = false
if wep.AcogGlass then
wep.AcogGlass:SetTexture("$basetexture", wep.AcogRT)
end
end}
NA.incompability = {"acog", "aimpoint", "eotech", "reflex", "riflereflex", "kobra", "ballistic"}
NA.description = {[1] = {t = "Provides 3.4x magnification.", c = Color(150, 255, 150, 255)},
[2] = {t = "Has back up sights that can be used by double tapping your USE KEY while aiming.", c = Color(150, 255, 150, 255)},
[3] = {t = "Can be disorienting when engaging targets at close range.", c = Color(255, 110, 96, 255)}}
NA.clattfunc = function(wep)
wep.AimPos = wep.ELCANPos
wep.AimAng = wep.ELCANAng
wep.HasInstalledScope = true
if wep.VElements["rail"] then
wep.VElements["rail"].color.a = 255
end
if wep.WElements then
if wep.WElements["rail"] then
wep.WElements["rail"].color.a = 255
end
end
if wep.VElements["front"] and wep.VElements["rear"] then
wep.VElements["front"].modelEnt:SetBodygroup(1, 1)
wep.VElements["rear"].modelEnt:SetBodygroup(1, 1)
end
end
NA.cldeattfunc = function(wep)
wep.AimPos = wep.AimPos_Orig
wep.AimAng = wep.AimAng_Orig
wep.HasInstalledScope = false
if wep.VElements["rail"] then
wep.VElements["rail"].color.a = 0
end
if wep.WElements then
if wep.WElements["rail"] then
wep.WElements["rail"].color.a = 0
end
end
if wep.VElements["front"] and wep.VElements["rear"] then
wep.VElements["front"].modelEnt:SetBodygroup(1, 0)
wep.VElements["rear"].modelEnt:SetBodygroup(1, 0)
end
end
CSTM_AddAttachment(NA)
NA = {}
NA.key = "acog"
NA.name = "ACOG 4x"
NA.num = 7
if CLIENT then
NA.displaytexture = surface.GetTextureID("VGUI/entities/upgr_acog")
end
NA.scope = {mat = Material("sprites/acog_tri"), size = 0.2, dist = "ACOGDist", pos = "ACOGPos", fovmod = 21, renderfunc = function(wep)
ply = LocalPlayer()
FT = FrameTime()
if wep:GetDTInt(3) != 1 or not wep.DrawTable then
BlackAmt = math.Approach(BlackAmt, 1, FT * 6)
else
BlackAmt = math.Approach(BlackAmt, 0, FT * 6)
end
x, y = ScrW(), ScrH()
old = render.GetRenderTarget()
CamData.angles = ply:EyeAngles() + ply:GetPunchAngle()
CamData.origin = ply:GetShootPos()
CamData.x = 0
CamData.y = 0
CamData.w = 256
CamData.h = 256
CamData.fov = 4
CamData.drawviewmodel = false
CamData.drawhud = false
render.SetRenderTarget(wep.AcogRT)
render.SetViewPort(0, 0, 256, 256)
if not Ini then
render.RenderView(CamData)
cam.Start2D()
surface.SetDrawColor(150, 150, 150, 245 * BlackAmt)
surface.SetTexture(Lens)
surface.DrawTexturedRect(0, 0, 256, 256)
cam.End2D()
end
render.SetViewPort(0, 0, x, y)
render.SetRenderTarget(old)
Ini = false
if wep.AcogGlass then
wep.AcogGlass:SetTexture("$basetexture", wep.AcogRT)
end
end}
NA.incompability = {"aimpoint", "eotech", "reflex", "riflereflex", "kobra", "ballistic", "elcan"}
NA.description = {[1] = {t = "Provides 4x magnification.", c = Color(150, 255, 150, 255)},
[2] = {t = "Provides a chevron upside-down 'V' reticle to enhance aiming.", c = Color(150, 255, 150, 255)},
[3] = {t = "Has back up sights that can be used by double tapping your USE KEY while aiming.", c = Color(150, 255, 150, 255)},
[4] = {t = "Can be disorienting when engaging targets at close range.", c = Color(255, 110, 96, 255)}}
NA.clattfunc = function(wep)
wep.AimPos = wep.ACOGPos
wep.AimAng = wep.ACOGAng
wep.HasInstalledScope = true
if wep.VElements["rail"] then
wep.VElements["rail"].color.a = 255
end
if wep.WElements then
if wep.WElements["rail"] then
wep.WElements["rail"].color.a = 255
end
end
if wep.VElements["front"] and wep.VElements["rear"] then
wep.VElements["front"].modelEnt:SetBodygroup(1, 1)
wep.VElements["rear"].modelEnt:SetBodygroup(1, 1)
end
end
NA.cldeattfunc = function(wep)
wep.AimPos = wep.AimPos_Orig
wep.AimAng = wep.AimAng_Orig
wep.HasInstalledScope = false
if wep.VElements["rail"] then
wep.VElements["rail"].color.a = 0
end
if wep.WElements then
if wep.WElements["rail"] then
wep.WElements["rail"].color.a = 0
end
end
if wep.VElements["front"] and wep.VElements["rear"] then
wep.VElements["front"].modelEnt:SetBodygroup(1, 0)
wep.VElements["rear"].modelEnt:SetBodygroup(1, 0)
end
end
CSTM_AddAttachment(NA)
NA = {}
NA.key = "ballistic"
NA.name = "Ballistic 12x"
NA.num = 8
if CLIENT then
NA.displaytexture = surface.GetTextureID("VGUI/entities/upgr_ballistic")
end
NA.scope = {mat = Material("gcellmats/scope_rifle"), size = 4, dist = "BallisticDist", fovmod = 21, renderfunc = function(wep)
ply = LocalPlayer()
FT = FrameTime()
if wep:GetDTInt(3) != 1 or not wep.DrawTable then
BlackAmt = math.Approach(BlackAmt, 1, FT * 6)
else
BlackAmt = math.Approach(BlackAmt, 0, FT * 6)
end
x, y = ScrW(), ScrH()
old = render.GetRenderTarget()
wep.CurFOV = math.Approach(wep.CurFOV, wep.TargetFOV, FT * 10)
CamData.angles = ply:EyeAngles() + ply:GetPunchAngle()
CamData.origin = ply:GetShootPos()
CamData.x = 0
CamData.y = 0
CamData.w = 256
CamData.h = 256
CamData.fov = wep.CurFOV
CamData.drawviewmodel = false
CamData.drawhud = false
render.SetRenderTarget(wep.AcogRT)
render.SetViewPort(0, 0, 256, 256)
if not Ini then
render.RenderView(CamData)
cam.Start2D()
surface.SetDrawColor(150, 150, 150, 245 * BlackAmt)
surface.SetTexture(Lens)
surface.DrawTexturedRect(0, 0, 256, 256)
cam.End2D()
end
render.SetViewPort(0, 0, x, y)
render.SetRenderTarget(old)
Ini = false
if wep.AcogGlass then
wep.AcogGlass:SetTexture("$basetexture", wep.AcogRT)
end
end}
NA.incompability = {"aimpoint", "acog", "eotech", "reflex", "riflereflex", "kobra", "elcan"}
NA.description = {[1] = {t = "Greatly increases aim zoom.", c = Color(150, 255, 150, 255)},
[2] = {t = "Magnification levels can be adjusted with the mouse wheel.", c = Color(150, 255, 150, 255)},
[3] = {t = "Is very disorienting when engaging targets at close range.", c = Color(255, 110, 96, 255)}}
NA.clattfunc = function(wep)
wep.AimPos = wep.BallisticPos
wep.AimAng = wep.BallisticAng
wep.HasInstalledScope = true
end
NA.cldeattfunc = function(wep)
wep.AimPos = wep.AimPos_Orig
wep.AimAng = wep.AimAng_Orig
wep.HasInstalledScope = false
if wep.VElements["rail"] then
wep.VElements["rail"].color.a = 0
end
if wep.WElements then
if wep.WElements["rail"] then
wep.WElements["rail"].color.a = 0
end
end
if wep.VElements["front"] and wep.VElements["rear"] then
wep.VElements["front"].modelEnt:SetBodygroup(1, 0)
wep.VElements["rear"].modelEnt:SetBodygroup(1, 0)
end
end
CSTM_AddAttachment(NA)
NA = {}
NA.key = "vertgrip"
NA.name = "Foregrip"
NA.num = 9
NA.scope = nil
if CLIENT then
NA.displaytexture = surface.GetTextureID("VGUI/entities/upgr_vertgrip")
end
NA.incompability = {"grenadelauncher", "bipod"}
NA.description = {[1] = {t = "Decreases maximum spread from continuous fire by 50%", c = Color(150, 255, 150, 255)},
[2] = {t = "Decreases spread increase from movement by 35%", c = Color(150, 255, 150, 255)},
[3] = {t = "Decreases recoil by 20%", c = Color(150, 255, 150, 255)}}
NA.svattfunc = function(wep)
if not wep.InstalledGrip then
wep.RecoilMods.vertgrip = 0.8
wep.VelocitySensivity = wep.VelocitySensivity * 0.65
wep.InstalledGrip = true
wep.OtherMods.vertgrip = {mod = "ConeInaccuracyAff1", value = 0.5}
//wep.ConeInaccuracyAff1 = wep.ConeInaccuracyAff1 * 0.5
end
end
NA.svdeattfunc = function(wep)
wep.VelocitySensivity = wep.VelocitySensivity / 0.65
wep.RecoilMods.vertgrip = 1
wep.InstalledGrip = false
//wep.ConeInaccuracyAff1 = wep.ConeInaccuracyAff1 / 0.5
wep.OtherMods.vertgrip = {mod = "ConeInaccuracyAff1", value = 1}
end
CSTM_AddAttachment(NA)
NA = {}
NA.key = "grenadelauncher"
NA.name = "M203"
NA.num = 10
NA.scope = nil
if CLIENT then
NA.displaytexture = surface.GetTextureID("VGUI/entities/upgr_m203")
end
NA.incompability = {"vertgrip", "bipod"}
NA.description = {[1] = {t = "Allows the use of an underslung grenade launcher.", c = Color(150, 255, 150, 255)},
[2] = {t = "Cannot aim down sights while M203 mode is enabled.", c = Color(255, 110, 96, 255)},
[3] = {t = "To use - hold USE KEY, press SECONDARY ATTACK KEY and then take aim.", c = Color(255, 255, 255, 255)},
[4] = {t = "To switch back to rifle mode - hold USE KEY, press SECONDARY ATTACK KEY.", c = Color(255, 255, 255, 255)}}
NA.svattfunc = function(wep)
SendUserMessage("M203_OFF", wep.Owner)
wep.SecondaryAtt = 1
end
NA.svdeattfunc = function(wep)
SendUserMessage("M203_OFF", wep.Owner)
wep.Grenade = false
wep.SecondaryAtt = 0
end
CSTM_AddAttachment(NA)
NA = {}
NA.key = "bipod"
NA.name = "Bipod"
NA.num = 11
NA.scope = nil
if CLIENT then
NA.displaytexture = surface.GetTextureID("VGUI/entities/upgr_bipod")
end
NA.incompability = {"vertgrip", "grenadelauncher"}
NA.description = {[1] = {t = "When deployed:", c = Color(255, 255, 255, 255)},
[2] = {t = "Decreases recoil by 70% when firing while aiming.", c = Color(150, 255, 150, 255)},
[3] = {t = "Decreases recoil by 60% when hip-firing.", c = Color(150, 255, 150, 255)},
[4] = {t = "Increases hip-fire accuracy greatly.", c = Color(150, 255, 150, 255)},
[5] = {t = "Decreases mouse sensitivity by 25%", c = Color(255, 110, 96, 255)}}
NA.svattfunc = function(wep)
wep.InstalledBipod = true
end
NA.svdeattfunc = function(wep)
wep.InstalledBipod = false
wep:SetDTBool(1, false)
end
CSTM_AddAttachment(NA)
NA = {}
NA.key = "cmag"
NA.name = "C-Mag"
NA.num = 12
NA.scope = nil
if CLIENT then
NA.displaytexture = surface.GetTextureID("VGUI/entities/upgr_cmag")
end
NA.description = {[1] = {t = "Increases magazine size to 100 rounds.", c = Color(150, 255, 150, 255)},
[2] = {t = "Decreases reload speed by 20%", c = Color(255, 110, 96, 255)}}
NA.svattfunc = function(wep)
clip = wep:Clip1()
ammo = wep.Owner:GetAmmoCount(wep.Primary.Ammo)
wep:SetClip1(0)
wep.Owner:SetAmmo(ammo + clip, wep:GetPrimaryAmmoType())
wep.Primary.ClipSize = 100
wep.ReloadSpeed = wep.ReloadSpeed * 0.8
wep.CMagInstalled = true
umsg.Start("NWSPD")
umsg.Entity(wep)
umsg.Float(0.8)
umsg.End()
end
NA.svdeattfunc = function(wep)
clip = wep:Clip1()
ammo = wep.Owner:GetAmmoCount(wep.Primary.Ammo)
wep:SetClip1(0)
wep.Owner:SetAmmo(ammo + clip, wep:GetPrimaryAmmoType())
wep.Primary.ClipSize = wep.Primary.ClipSize_Orig
wep.ReloadSpeed = wep.ReloadSpeed / 0.8
wep.CMagInstalled = false
umsg.Start("NWSPD")
umsg.Entity(wep)
umsg.Float(1)
umsg.End()
end
NA.clattfunc = function(wep)
wep.Primary.ClipSize = 100
end
NA.cldeattfunc = function(wep)
wep.Primary.ClipSize = wep.Primary.ClipSize_Orig
end
CSTM_AddAttachment(NA)
NA = {}
NA.key = "laser"
NA.name = "Laser sight"
NA.num = 13
NA.scope = nil
if CLIENT then
NA.displaytexture = surface.GetTextureID("VGUI/entities/upgr_lasersight")
end
NA.description = {[1] = {t = "Decreases hip-fire spread by 60%", c = Color(150, 255, 150, 255)},
[2] = {t = "Decreases spread increase from movement by 30%", c = Color(150, 255, 150, 255)},
[3] = {t = "Decreases spread increase speed from continuous fire by 15%", c = Color(150, 255, 150, 255)}}
NA.svattfunc = function(wep)
wep.VelocitySensivity = wep.VelocitySensivity * 0.7
wep.InaccAff1 = wep.InaccAff1 * 0.85
wep.InstalledLaser = true
end
NA.svdeattfunc = function(wep)
wep.VelocitySensivity = wep.VelocitySensivity / 0.7
wep.InaccAff1 = wep.InaccAff1 / 0.85
wep.InstalledLaser = false
end
CSTM_AddAttachment(NA)
function CSTM_AddInternalPartMod(tbl)
CWInternalParts[tbl.key] = {key = tbl.key, name = tbl.name, num = tbl.num, description = tbl.description, displaytexture = tbl.displaytexture, svattfunc = tbl.svattfunc, svdeattfunc = tbl.svdeattfunc}
CWInternalPartsMeta[tbl.num] = tbl.key
if SERVER then
CreateConVar("cstm_part_" .. tbl.key, "0", {FCVAR_REPLICATED, FCVAR_ARCHIVE, FCVAR_NOTIFY})
AutoPart["cstm_part_" .. tbl.key] = tbl.key
else
CreateClientConVar("cstm_part_" .. tbl.key .. "_cl", "0", true, true)
end
end
----
-- INTERNAL WEAPON PARTS
----
local NIP = {}
NIP.key = "hbar"
NIP.name = "Heavy barrel"
NIP.num = 1
NIP.description = {[1] = {t = "Increases damage by 10%", c = Color(150, 255, 150, 255)},
[2] = {t = "Slightly increases aimed accuracy.", c = Color(150, 255, 150, 255)},
[3] = {t = "Increases recoil by 15%", c = Color(255, 110, 96, 255)}}
if CLIENT then
NIP.displaytexture = surface.GetTextureID("VGUI/entities/cstm_part_hbar")
end
NIP.svattfunc = function(wep)
wep.DamageMods.hbar = 1.1
wep.RecoilMods.hbar = 1.15
wep.AimConeMods.hbar = 0.95
end
NIP.svdeattfunc = function(wep)
wep.DamageMods.hbar = 1
wep.RecoilMods.hbar = 1
wep.AimConeMods.hbar = 1
end
CSTM_AddInternalPartMod(NIP)
NIP = {}
NIP.key = "lbar"
NIP.name = "Light barrel"
NIP.num = 2
NIP.description = {[1] = {t = "Decreases recoil by 15%", c = Color(150, 255, 150, 255)},
[2] = {t = "Decreases damage by 10%", c = Color(255, 110, 96, 255)},
[3] = {t = "Slightly decreases aimed accuracy.", c = Color(255, 110, 96, 255)}}
if CLIENT then
NIP.displaytexture = surface.GetTextureID("VGUI/entities/cstm_part_lbar")
end
NIP.svattfunc = function(wep)
wep.DamageMods.lbar = 0.9
wep.RecoilMods.lbar = 0.85
wep.AimConeMods.lbar = 1.1
end
NIP.svdeattfunc = function(wep)
wep.DamageMods.lbar = 1
wep.RecoilMods.lbar = 1
wep.AimConeMods.lbar = 1
end
CSTM_AddInternalPartMod(NIP)
NIP = {}
NIP.key = "hframe"
NIP.name = "Heavy frame"
NIP.num = 3
NIP.description = {[1] = {t = "Decreases recoil by 10%", c = Color(150, 255, 150, 255)},
[2] = {t = "Decreases mouse sensitivity by 20%", c = Color(255, 110, 96, 255)}}
if CLIENT then
NIP.displaytexture = surface.GetTextureID("VGUI/entities/cstm_part_hframe")
end
NIP.svattfunc = function(wep)
wep.RecoilMods.hframe = 0.9
umsg.Start("MOUSESENS", wep.Owner)
umsg.Float(0.8)
umsg.End()
end
NIP.svdeattfunc = function(wep)
wep.RecoilMods.hframe = 1
umsg.Start("MOUSESENS", wep.Owner)
umsg.Float(1)
umsg.End()
end
CSTM_AddInternalPartMod(NIP)
NIP = {}
NIP.key = "burstconvert"
NIP.num = 4
NIP.name = "Burst-fire conversion"
NIP.description = {[1] = {t = "Converts the weapon to fire in 3-round bursts.", c = Color(150, 255, 150, 255)},
[2] = {t = "Increases rate of fire by 40%", c = Color(150, 255, 150, 255)},
[3] = {t = "Semi-automatic not usable.", c = Color(255, 110, 96, 255)},
[4] = {t = "Increases recoil by 15%", c = Color(255, 110, 96, 255)}}
if CLIENT then
NIP.displaytexture = surface.GetTextureID("VGUI/entities/cstm_part_burstfire")
end
NIP.svattfunc = function(wep)
wep.FirerateMods.burstconvert = 0.6
wep.RecoilMods.burstconvert = 1.15
wep.FireModes_old = wep.FireModes
wep.FireModes = {"3burst", "safe"}
wep.FireMode = "3burst"
wep.OtherMods.burstconvert = {mod = "BurstAccMod", value = 2}
wep.Primary.Automatic = true
net.Start("SENDFIREMODES")
net.WriteTable({"3burst", "safe"})
net.Send(wep.Owner)
end
NIP.svdeattfunc = function(wep)
wep.FirerateMods.burstconvert = 1
wep.RecoilMods.burstconvert = 1
wep.FireModes = wep.FireModes_old
wep.FireMode = wep.FireModes[1]
wep.OtherMods.burstconvert = {mod = "BurstAccMod", value = 1}
wep.Primary.Automatic = wep.FireModeNames[wep.FireModes[1]].auto
net.Start("SENDFIREMODES")
net.WriteTable(wep.FireModes)
net.Send(wep.Owner)
end
CSTM_AddInternalPartMod(NIP)
NIP = {}
NIP.key = "autoconvert"
NIP.num = 5
NIP.name = "Full-auto conversion"
NIP.description = {[1] = {t = "Converts the weapon to fire in full-auto.", c = Color(150, 255, 150, 255)},
[2] = {t = "Increases rate of fire by 20%", c = Color(150, 255, 150, 255)},
[3] = {t = "Semi-automatic not usable.", c = Color(255, 110, 96, 255)},
[4] = {t = "Increases recoil by 15%", c = Color(255, 110, 96, 255)}}
if CLIENT then
NIP.displaytexture = surface.GetTextureID("VGUI/entities/cstm_part_fullauto")
end
NIP.svattfunc = function(wep)
wep.FirerateMods.autoconvert = 0.8
wep.RecoilMods.autoconvert = 1.15
wep.FireModes_old = wep.FireModes
wep.FireModes = {"auto", "safe"}
wep.FireMode = "auto"
wep.Primary.Automatic = true
net.Start("SENDFIREMODES")
net.WriteTable({"auto", "safe"})
net.Send(wep.Owner)
end
NIP.svdeattfunc = function(wep)
wep.FirerateMods.autoconvert = 1
wep.RecoilMods.autoconvert = 1
wep.FireModes = wep.FireModes_old
wep.FireMode = wep.FireModes[1]
wep.Primary.Automatic = wep.FireModeNames[wep.FireModes[1]].auto
net.Start("SENDFIREMODES")
net.WriteTable(wep.FireModes)
net.Send(wep.Owner)
end
CSTM_AddInternalPartMod(NIP)
NIP = {}
NIP.key = "ergonomichandle"
NIP.num = 6
NIP.name = "Ergonomic grip"
NIP.description = {[1] = {t = "Decreases maximum spread from continuous fire by 15%", c = Color(150, 255, 150, 255)}}
if CLIENT then
NIP.displaytexture = surface.GetTextureID("VGUI/entities/cstm_part_ergonomichandle")
end
NIP.svattfunc = function(wep)
wep.OtherMods.ergonomichandle = {mod = "ConeInaccuracyAff1", value = 0.85}
end
NIP.svdeattfunc = function(wep)
wep.OtherMods.ergonomichandle = {mod = "ConeInaccuracyAff1", value = 1}
end
CSTM_AddInternalPartMod(NIP)
NIP = {}
NIP.key = "gasdir"
NIP.num = 7
NIP.name = "Forced gas direction"
NIP.description = {[1] = {t = "Increases damage by 10%.", c = Color(150, 255, 150, 255)},
[2] = {t = "Slightly increases aimed accuracy.", c = Color(150, 255, 150, 255)},
[3] = {t = "Increases recoil by 15%.", c = Color(255, 110, 96, 255)}}
if CLIENT then
NIP.displaytexture = surface.GetTextureID("VGUI/entities/cstm_part_gasdir")
end
NIP.svattfunc = function(wep)
wep.DamageMods.gasdir = 1.1
wep.AimConeMods.gasdir = 0.95
wep.RecoilMods.gasdir = 1.15
end
NIP.svdeattfunc = function(wep)
wep.DamageMods.gasdir = 1
wep.AimConeMods.gasdir = 1
wep.RecoilMods.gasdir = 1
end
CSTM_AddInternalPartMod(NIP)
NIP = {}
NIP.key = "customstock"
NIP.num = 8
NIP.name = "Custom-fit stock"
NIP.description = {[1] = {t = "Decreases maximum spread from continuous fire by 15%", c = Color(150, 255, 150, 255)}}
if CLIENT then
NIP.displaytexture = surface.GetTextureID("VGUI/entities/cstm_part_customstock")
end
NIP.svattfunc = function(wep)
wep.OtherMods.customstock = {mod = "ConeInaccuracyAff1", value = 0.85}
end
NIP.svdeattfunc = function(wep)
wep.OtherMods.customstock = {mod = "ConeInaccuracyAff1", value = 1}
end
CSTM_AddInternalPartMod(NIP)
NIP = {}
NIP.key = "lightbolt"
NIP.num = 9
NIP.name = "Light bolt"
NIP.description = {[1] = {t = "Decreases recoil by 10%", c = Color(150, 255, 150, 255)},
[2] = {t = "Increases rate of fire by 5%", c = Color(150, 255, 150, 255)}}
if CLIENT then
NIP.displaytexture = surface.GetTextureID("VGUI/entities/cstm_part_lightbolt")
end
NIP.svattfunc = function(wep)
wep.RecoilMods.lightbolt = 0.9
wep.FirerateMods.lightbolt = 0.95
end
NIP.svdeattfunc = function(wep)
wep.RecoilMods.lightbolt = 1
wep.FirerateMods.lightbolt = 1
end
CSTM_AddInternalPartMod(NIP)
NIP = {}
NIP.key = "heavybolt"
NIP.num = 10
NIP.name = "Heavy bolt"
NIP.description = {[1] = {t = "Slightly increases aimed accuracy.", c = Color(150, 255, 150, 255)},
[2] = {t = "Decreases rate of fire by 10%.", c = Color(255, 110, 96, 255)}}
if CLIENT then
NIP.displaytexture = surface.GetTextureID("VGUI/entities/cstm_part_heavybolt")
end
NIP.svattfunc = function(wep)
wep.AimConeMods.heavybolt = 0.85
wep.FirerateMods.heavybolt = 1.1
end
NIP.svdeattfunc = function(wep)
wep.AimConeMods.heavybolt = 1
wep.FirerateMods.heavybolt = 1
end
CSTM_AddInternalPartMod(NIP)
NIP = {}
NIP.key = "autoconvertv2"
NIP.num = 11
NIP.name = "Full-auto conversion"
NIP.description = {[1] = {t = "Converts the weapon to fire in full-auto.", c = Color(150, 255, 150, 255)},
[2] = {t = "Semi-automatic not usable.", c = Color(255, 110, 96, 255)},
[3] = {t = "Increases recoil by 15%", c = Color(255, 110, 96, 255)}}
if CLIENT then
NIP.displaytexture = surface.GetTextureID("VGUI/entities/cstm_part_fullauto")
end
NIP.svattfunc = function(wep)
wep.RecoilMods.autoconvert = 1.15
wep.FireModes_old = wep.FireModes
wep.FireModes = {"auto", "safe"}
wep.FireMode = "auto"
wep.Primary.Automatic = true
net.Start("SENDFIREMODES")
net.WriteTable({"auto", "safe"})
net.Send(wep.Owner)
end
NIP.svdeattfunc = function(wep)
wep.RecoilMods.autoconvert = 1
wep.FireModes = wep.FireModes_old
wep.FireMode = wep.FireModes[1]
wep.Primary.Automatic = wep.FireModeNames[wep.FireModes[1]].auto
net.Start("SENDFIREMODES")
net.WriteTable(wep.FireModes)
net.Send(wep.Owner)
end
CSTM_AddInternalPartMod(NIP)
----
-- AMMO TYPES
----
AmmoTypes = {
["incendiary"] = {name = "Incendiary", num = 1, penmod = 0.75, func = function(ply, wep)
wep.DamageMods.incendiary = 0.7
wep.LastDamageMods.Ammo = "incendiary"
end},
["ap"] = {name = "Armor Piercing", num = 2, penmod = 1.15},
["hp"] = {name = "Hollow Point", num = 3, penmod = 0.85},
["magnum"] = {name = "Magnum", num = 4, penmod = 1.1, selfunc = function(ply, wep)
wep.DamageMods.magnum = 1.2
wep.RecoilMods.magnum = 1.25
end,
deselfunc = function(ply, wep)
wep.DamageMods.magnum = 1
wep.RecoilMods.magnum = 1
end},
["slug"] = {name = "Slug", num = 6, penmod = 5, selfunc = function(ply, wep)
wep.PrevStats = {shot = wep.Primary.NumShots, velsens = wep.VelocitySensivity, clumpspread = wep.ClumpSpread, damdec = wep.DamageDecayMod}
wep.DamageMods.slug = 10
wep.AimConeMods.slug = 0.05
wep.Primary.NumShots = 1
wep.ClumpSpread = 0
wep.VelocitySensivity = 1.6
wep.DamageDecayMod = 1
wep:CalculateDamageDecay()
umsg.Start("NBUL", ply)
umsg.Short(1)
umsg.End()
end,
deselfunc = function(ply, wep)
wep.DamageMods.slug = 1
wep.AimConeMods.slug = 1
end},
["birdshot"] = {name = "Birdshot", num = 7, penmod = 0.5, selfunc = function(ply, wep)
wep.PrevStats = {shot = wep.Primary.NumShots, velsens = wep.VelocitySensivity, clumpspread = 0, damdec = wep.DamageDecayMod}
wep.DamageMods.birdshot = 0.07692
wep.RecoilMods.birdshot = 0.5
wep.HipConeMods.birdshot = 0.6
wep.Primary.NumShots = 20
wep.ClumpSpread = wep.IronsightsCone
wep.VelocitySensivity = 0.2
wep.DamageDecayMod = 2.5
wep:CalculateDamageDecay()
umsg.Start("NBUL", ply)
umsg.Short(20)
umsg.End()
end,
deselfunc = function(ply, wep)
wep.DamageMods.birdshot = 1
wep.RecoilMods.birdshot = 1
wep.HipConeMods.birdshot = 1
end},
["frag"] = {name = "Frag", num = 10, penmod = 1},
["smoke"] = {name = "Smoke", num = 11, penmod = 1}}
local mag, wep
function TWeps_LowAmmo(w, p)
if tonumber(p:GetInfo("cstm_lowammo")) <= 0 then
return
end
mag = w:Clip1()
if mag < w.Primary.ClipSize * 0.33 then
w:EmitSound("weapons/ClipEmpty_Rifle.wav", 100 - (mag * 4), 100)
end
end
function TWeps_Move(p, m)
if p:Alive() then
wep = p:GetActiveWeapon()
if IsValid(wep) then
if wep.IsCSTMWeapon then
if not p:KeyDown(IN_SPEED) then
if wep:GetDTInt(3) == 1 then
if p:Crouching() then
m:SetMaxSpeed(p:GetWalkSpeed() * p:GetCrouchedWalkSpeed())
else
m:SetMaxSpeed(p:GetWalkSpeed() * 0.7)
end
end
end
end
end
end
end
hook.Add("Move", "TWeps_Move", TWeps_Move)
Calibers = {}
function AddAmmoType(name, text)
game.AddAmmoType({name = name,
dmgtype = DMG_BULLET,
force = 10,
maxsplash = 0,
minsplash = 0,
npcdmg = 18,
plydmg = 18,
tracer = 3})
if CLIENT then
language.Add(name .. "_ammo", text)
end
table.insert(Calibers, {ammo = name, name = text})
end
AddAmmoType("9x18MM", "9x18MM Ammo")
AddAmmoType("9x19MM 7N21", "9x19MM 7N21 Ammo")
AddAmmoType("9x19MM", "9x19MM Ammo")
AddAmmoType("7.65x17MM", "7.65x17MM Ammo")
AddAmmoType("4.6x30MM", "4.6x30MM Ammo")
AddAmmoType("5.7x28MM", "5.7x28MM Ammo")
AddAmmoType("5.45x39MM", "5.45x39MM Ammo")
AddAmmoType("9x39MM", "9x39MM Ammo")
AddAmmoType("5.56x45MM", "5.56x45MM Ammo")
AddAmmoType("6x35MM", "6x35MM Ammo")
AddAmmoType("7.62x39MM", "7.62x39MM Ammo")
AddAmmoType("7.62x51MM", "7.62x51MM Ammo")
AddAmmoType("7.62x54MMR", "7.62x54MMR Ammo")
AddAmmoType("7.92x57MM", "7.92x57MM Ammo")
AddAmmoType(".45ACP", ".45 ACP Ammo")
AddAmmoType(".50AE", ".50 AE Ammo")
AddAmmoType(".30-30", ".30-30 Ammo")
AddAmmoType(".338", ".338 Ammo")
AddAmmoType(".50BMG", ".50 BMG Ammo")
AddAmmoType("12G", "12 Gauge Ammo")
AddAmmoType("6G", "6 Gauge Ammo")
AddAmmoType(".357", ".357 Magnum Ammo")
AddAmmoType(".44", ".44 Magnum Ammo")
AddAmmoType("40MM_HE", "40MM High Explosive")
AddAmmoType("40MM_CE", "40MM Centered Explosion")
AddAmmoType("40MM_Smoke", "40MM Smoke")
|
---------------------
-- www.lspd.gov --
---------------------
function www_lspd_gov()
local page_length = 350
guiSetText(internet_address_label, "Los Santos Police Department - 'Taking the law into our own hands...' - Waterwolf")
guiSetText(address_bar,"www.lspd.gov")
bg = guiCreateStaticImage(0,0,660,page_length,"websites/colours/10.png",false,internet_pane)
local logo = guiCreateStaticImage(50,10,150,150,"websites/images/lspd-logo.png",false,bg)
local header = guiCreateLabel(230,75,460,20,"Los Santos Police Department",false,bg)
local text = guiCreateLabel(100,200,450,165,"Site currently under construction.\
\
Please check back soon.",false,bg)
guiSetFont(text,"default-bold-small")
----------------------------------------------------------------------
if(page_length>=397)then
guiScrollPaneSetScrollBars(internet_pane,false,true)
guiScrollPaneSetVerticalScrollPosition(internet_pane,0)
else
guiSetSize(bg,660,397,false)
guiScrollPaneSetScrollBars(internet_pane, false, false)
end
end
|
--[==========================================================================[
sandbox.lua: Lua sandboxing facilities
--[==========================================================================[
Copyright (C) 2007 the VideoLAN team
$Id$
Authors: Antoine Cellerier <dionoea at videolan dot org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
--]==========================================================================]
module("sandbox",package.seeall)
-- See Programming in Lua (second edition) for sandbox examples
-- See http://lua-users.org/wiki/SandBoxes for a list of SAFE/UNSAFE variables
local sandbox_blacklist = {
collectgarbage = true,
dofile = true,
_G = true,
getfenv = true,
getmetatable = true,
load = true, -- Can be protected I guess
loadfile = true, -- Can be protected I guess
rawequal = true,
rawget = true,
rawset = true,
setfenv = true,
setmetatable = true,
module = true,
require = true,
package = true,
debug = true,
}
if _VERSION == "Lua 5.1" then
sandbox_blacklist["loadstring"] = true
end
function readonly_table_proxy(name,src,blacklist)
if type(src)=="nil" then return end
if type(src)~="table" then error("2nd argument must be a table (or nil)") end
local name = name
local t = src
local blist = {}
if blacklist then
for _, v in pairs(blacklist) do
blist[v] = true
end
end
local metatable_readonly = {
__index = function(self,key)
if blist[key] then
error("Sandbox: Access to `"..name.."."..key.."' is forbidden.")
end
return t[key]
end,
__newindex = function(self,key,value)
error("It is forbidden to modify elements of this table.")
end,
}
return setmetatable({},metatable_readonly)
end
-- Of course, all of this is useless if the sandbox calling code has
-- another reference to one of these tables in his global environement.
local sandbox_proxy = {
coroutine = readonly_table_proxy("coroutine",coroutine),
string = readonly_table_proxy("string",string,{"dump"}),
table = readonly_table_proxy("table",table),
math = readonly_table_proxy("math",math),
io = readonly_table_proxy("io",io),
os = readonly_table_proxy("os",os,{"exit","getenv","remove",
"rename","setlocale"}),
sandbox = readonly_table_proxy("sandbox",sandbox),
}
function sandbox(func,override)
local _G = getfenv(2)
local override = override or {}
local sandbox_metatable =
{
__index = function(self,key)
if override[key] then
return override[key]
end
if sandbox_blacklist[key] then
error( "Sandbox: Access to `"..key.."' is forbidden." )
end
--print(key,"not found in env. Looking in sandbox_proxy and _G")
local value = sandbox_proxy[key] or _G[key]
rawset(self,key,value) -- Keep a local copy
return value
end,
__newindex = function(self,key,value)
if override and override[key] then
error( "Sandbox: Variable `"..key.."' is read only." )
end
return rawset(self,key,value)
end,
}
local sandbox_env = setmetatable({},sandbox_metatable)
return function(...)
setfenv(func,sandbox_env)
local ret = {func(...)} -- Not perfect (if func returns nil before
-- another return value) ... but it's better
-- than nothing
setfenv(func,_G)
return unpack(ret)
end
end
|
local vec2 = require("math.vec2")
local vec3 = require("math.vec3")
local framebuffer = {}
function framebuffer.new(size)
local self = {}
self.size = size
self.data = {}
return setmetatable(self, {__index = framebuffer})
end
function framebuffer:pos_to_index(pos)
return math.floor(pos.x) + self.size.x * (math.floor(pos.y) - 1)
end
function framebuffer:set_pixel(self, pos, color)
self.data[self:pos_to_index(pos)] = color
end
function framebuffer:get_pixel(pos)
return self.data[self:pos_to_index(pos)]
end
function framebuffer:foreach(func, ...)
for y = 1, self.size.y do
for x = 1, self.size.x do
local pos = vec2(x, y)
func(pos, self:get_pixel(pos), self, ...)
end
end
end
function framebuffer:shade(func, ...)
self:foreach(function(pos, ...)
self.data[self:pos_to_index(pos)] = func(pos, ...)
end, ...)
end
function framebuffer:map(func, ...)
local results = {}
self:foreach(function(...)
results[#results + 1] = func(...)
end, ...)
return results
end
function framebuffer:quantize(palette_func, pixel_func)
local palette = palette_func(self)
return {
palette = palette,
data = self:map(pixel_func, palette),
size = self.size
}
end
function framebuffer:clear(color)
self:shade(function() return color end)
end
function framebuffer:to_p3()
local output = {}
table.insert(output, "P3\n")
table.insert(output, self.size.x .. " " .. self.size.y .. "\n")
table.insert(output, "255\n")
self:foreach(function(pos, c)
table.insert(output, math.floor(c.x * 255) .. " " .. math.floor(c.y * 255) .. " " .. math.floor(c.z * 255) .. "\n")
end)
return table.concat(output)
end
return framebuffer
|
object_tangible_quest_legacy_head_pain3 = object_tangible_quest_shared_legacy_head_pain3:new {
}
ObjectTemplates:addTemplate(object_tangible_quest_legacy_head_pain3, "object/tangible/quest/legacy_head_pain3.iff")
|
local parsers = require('nvim-treesitter.parsers')
local queries = require('nvim-treesitter.query')
local ts_utils = require('nvim-treesitter.ts_utils')
local configs = require('nvim-treesitter.configs')
local M = {}
-- array of { changedtick = number, selection: number, mode: string }
-- TODO: we could use extmarks with each selection to avoid using buf
-- changedtick, it would be a lot smarter and more accurate, but it'd be pretty
-- hard to implement
local prev_selections = {}
--- @return boolean: true iff the range @a is equal to the range @b
local function is_equal(a, b)
return a[1] == b[1] and a[2] == b[2] and a[3] == b[3] and a[4] == b[4]
end
--- @return boolean: true iff the range @a strictly surrounds the range @b. @a == @b => false.
local function does_surround(a, b)
local a_start_row, a_start_col, a_end_row, a_end_col = a[1], a[2], a[3], a[4]
local b_start_row, b_start_col, b_end_row, b_end_col = b[1], b[2], b[3], b[4]
if a_start_row > b_start_row or a_start_row == b_start_row and a_start_col > b_start_col then
return false
end
if a_end_row < b_end_row or a_end_row == b_end_row and a_end_col < b_end_col then
return false
end
return a_start_row < b_start_row or
a_start_col < b_start_col or
a_end_row > b_end_row or
a_end_col > b_end_col
end
--- extend_range_with_whitespace extends the selection to select any surrounding whitespace as part of the text object
local function extend_range_with_whitespace(range)
local start_row, start_col, end_row, end_col = unpack(range)
-- everything before the selection on the same lines as the start of the range
local startline = string.sub(vim.fn.getline(start_row + 1), 1, start_col)
local startline_len = #startline
local startline_whitespace_len = #string.match(startline, '(%s*)$', 1)
-- everything after the selection on the same lines as the end of the range
local endline = string.sub(vim.fn.getline(end_row + 1), end_col + 1, -1)
local endline_len = #endline
local endline_whitespace_len = #string.match(endline, '^(%s*)', 1)
local sel_mode
if startline_whitespace_len == startline_len and endline_whitespace_len == endline_len then
-- the text objects is the only thing on the lines in the range so we
-- should use visual line mode
sel_mode = 'V'
if end_row + 1 < vim.fn.line('$') and
start_row > 0 then
if string.match(vim.fn.getline(end_row + 2), '^%s*$', 1) then
-- we either have a blank line below AND above OR just below, in either case we want extend to the line below
end_col = math.max(#vim.fn.getline(end_row + 2), 1)
end_row = end_row + 1
elseif string.match(vim.fn.getline(start_row), '^%s*$', 1) then
-- we have a blank line above AND NOT below, we extend to the line above
start_col = math.max(#vim.fn.getline(start_row), 1)
start_row = start_row - 1
end
end
else
sel_mode = 'v'
end_col = end_col + endline_whitespace_len
if endline_whitespace_len == 0 and startline_whitespace_len ~= startline_len then
start_col = start_col - startline_whitespace_len
end
end
return {start_row, start_col, end_row, end_col}, sel_mode
end
local function normalize_selection(sel_start, sel_end)
local _, sel_start_row, sel_start_col = unpack(sel_start)
local start_max_cols = #vim.fn.getline(sel_start_row)
-- visual line mode results in getpos("'>") returning a massive number so
-- we have to set it to the true end col
if start_max_cols < sel_start_col then
sel_start_col = start_max_cols
end
-- tree-sitter uses zero-indexed rows
sel_start_row = sel_start_row - 1
-- tree-sitter uses zero-indexed cols for the start
sel_start_col = sel_start_col - 1
local _, sel_end_row, sel_end_col = unpack(sel_end)
local end_max_cols = #vim.fn.getline(sel_end_row)
-- visual line mode results in getpos("'>") returning a massive number so
-- we have to set it to the true end col
if end_max_cols < sel_end_col then
sel_end_col = end_max_cols
end
-- tree-sitter uses zero-indexed rows
sel_end_row = sel_end_row - 1
return {sel_start_row, sel_start_col, sel_end_row, sel_end_col}
end
function M.select(query, restore_visual, sel_start, sel_end)
local bufnr = vim.api.nvim_get_current_buf()
local lang = parsers.get_buf_lang(bufnr)
if not lang then return end
local sel = normalize_selection(sel_start, sel_end)
local best
local matches = queries.get_capture_matches_recursively(bufnr, '@range', query)
for _, m in pairs(matches) do
local match_start_row, match_start_col = unpack(m.node.start_pos)
local match_end_row, match_end_col = unpack(m.node.end_pos)
local match = {match_start_row, match_start_col, match_end_row, match_end_col}
-- match must cover an exclusively bigger range than the current selection
if does_surround(match, sel) then
if not best or does_surround(best, match) then
best = match
end
end
end
if best then
local new_best, sel_mode = extend_range_with_whitespace(best)
ts_utils.update_selection(bufnr, new_best, sel_mode)
local selections = prev_selections[bufnr]
if selections == nil or not does_surround(new_best, selections[#selections][1]) then
prev_selections[bufnr] = {
{
changedtick = vim.api.nvim_buf_get_changedtick(bufnr),
new_best,
sel_mode
}
}
else
table.insert(selections, {
changedtick = vim.api.nvim_buf_get_changedtick(bufnr),
new_best,
sel_mode
})
end
-- I prefer going to start of text object while in visual mode
vim.cmd('normal! o')
else
if restore_visual then
vim.cmd('normal! gv')
end
end
end
function M.prev_select(sel_start, sel_end)
local bufnr = vim.api.nvim_get_current_buf()
local selections = prev_selections[bufnr]
local sel = normalize_selection(sel_start, sel_end)
if #vim.fn.getline(sel[1] + 1) == 0 then sel[2] = 1 end
if #vim.fn.getline(sel[3] + 1) == 0 then sel[4] = 1 end
local changedtick = vim.api.nvim_buf_get_changedtick(bufnr)
-- TODO: this could use extmarks
-- We are removing any previous selections which have a different
-- changedtick because that means the text is *probably* different and the
-- selection range *may* now be invalid
while selections ~= nil and selections[#selections].changedtick ~= changedtick do
table.remove(selections)
if #selections == 0 then
selections = nil
end
end
if selections == nil then
prev_selections[bufnr] = nil
vim.cmd("normal! v")
return
end
local head = selections[#selections][1]
if is_equal(sel, head) or does_surround(sel, head) then
table.remove(selections)
if #selections == 0 then
prev_selections[bufnr] = nil
vim.cmd("normal! v")
return
end
end
local new_sel, sel_mode = unpack(selections[#selections])
ts_utils.update_selection(bufnr, new_sel, sel_mode)
vim.cmd('normal! o')
end
function M.attach(bufnr, _)
local buf = bufnr or vim.api.nvim_get_current_buf()
for keymap, query in pairs(configs.get_module('textsubjects').keymaps) do
local cmd_o = string.format(':lua require("nvim-treesitter.textsubjects").select("%s", false, vim.fn.getpos("."), vim.fn.getpos("."))<cr>', query)
vim.api.nvim_buf_set_keymap(buf, 'o', keymap, cmd_o, { silent = true, noremap = true })
local cmd_x = string.format(':lua require("nvim-treesitter.textsubjects").select("%s", true, vim.fn.getpos("\'<"), vim.fn.getpos("\'>"))<cr>', query)
vim.api.nvim_buf_set_keymap(buf, 'x', keymap, cmd_x, { silent = true, noremap = true })
end
local prev_selection = configs.get_module('textsubjects').prev_selection
if prev_selection ~= nil and #prev_selection > 0 then
local cmd_o = 'lua require("nvim-treesitter.textsubjects").prev_select(vim.fn.getpos("."), vim.fn.getpos("."))<cr>'
vim.api.nvim_buf_set_keymap(buf, 'o', prev_selection, cmd_o, { silent = true, noremap = true })
local cmd_x = ':lua require("nvim-treesitter.textsubjects").prev_select(vim.fn.getpos("\'<"), vim.fn.getpos("\'>"))<cr>'
vim.api.nvim_buf_set_keymap(buf, 'x', prev_selection, cmd_x, { silent = true, noremap = true })
end
end
function M.detach(bufnr)
local buf = bufnr or vim.api.nvim_get_current_buf()
for keymap, _ in pairs(configs.get_module('textsubjects').keymaps) do
vim.api.nvim_buf_del_keymap(buf, 'o', keymap)
vim.api.nvim_buf_del_keymap(buf, 'x', keymap)
end
local prev_selection = configs.get_module('textsubjects').prev_selection
if prev_selection ~= nil and #prev_selection > 0 then
vim.api.nvim_buf_del_keymap(buf, 'o', prev_selection)
vim.api.nvim_buf_del_keymap(buf, 'x', prev_selection)
end
end
return M
|
local module = {}
function module.init()
local function main()
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
spawn(function()
wait()
-- game.StarterGui:SetCore("ChatWindowPosition", UDim2.new(0,0,0,0))
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
game.StarterGui:SetCore("ChatBarDisabled", false)
game.StarterGui:SetCore("ChatActive", true)
end)
end
main()
end
return module
|
local config = require('lsp.config')
require('lspconfig').solargraph.setup {
cmd = { "solargraph", "stdio" },
filetypes = { "ruby" },
init_options = {
formatting = true
},
settings = {
solargraph = {
diagnostics = true
}
},
flags = {
debounce_text_changes = 150
},
on_attach = config.on_attach,
capabilities = config.capabilities,
}
|
function onCreate()
-- background shit
makeLuaSprite('CYSbg', 'CYSbg', -500, -300);
setLuaSpriteScrollFactor('cys', 0.9, 0.9);
addLuaSprite('CYSbg', false);
close(true); --For performance reasons, close this script once the stage is fully loaded, as this script won't be used anymore after loading the stage
-- Ah e, script feito por Fang
end
|
help([[Intel C/C++ and Fortran compilers, alongside Intel MKL. - Homepage: http://software.intel.com/en-us/intel-cluster-toolkit-compiler/]])
local root = "/cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/iimkl/2016.4"
load("icc/.2016.4.258")
load("ifort/.2016.4.258")
load("intel/2016.4")
load("imkl/11.3.4.258")
-- Built with EasyBuild version 3.1.0-rb9ec927fab948052740d84472f0a86c19bddbd87
|
package.path = package.path .. ";/?/init.lua"
-- Slot 1: Saplings
local config = require("config")
config.load("treeChopper")
-- Count of blocks between the center line and the left(or right) line of trees
local sideDist = config.get("sideDist")
-- Steps required to the next pair of trees
local forwDist = config.get("forwDist")
-- Number of tree pairs in a lane
local rows = config.get("rows")
if sideDist == nil then error("Run init to setup your tree-chopper") end
-- only for readability
local slotCount = 16
-- Convenience wrapper, performs turtle.forward() 'steps' times
function move(steps) for i = 1, steps, 1 do turtle.forward() end end
-- Convenience wrapper, performs turtle.back() 'steps' times
function moveBack(steps) for i = 1, steps, 1 do turtle.back() end end
-- Drops the contents of slots 2-16
function dropHarvested()
for i = 2, slotCount, 1 do
turtle.select(i)
turtle.drop()
end
turtle.select(1)
end
-- Function for felling a tree, which is right infront of the turtle
function chopTree()
-- Prevent chopping saplings
if turtle.compare() then return end
turtle.dig()
turtle.forward()
turtle.select(2)
local treeHeight = 0
while turtle.compareUp() do
turtle.digUp()
turtle.up()
treeHeight = treeHeight + 1
end
for i = 1, treeHeight, 1 do turtle.down() end
turtle.back()
turtle.select(1)
turtle.place()
end
-- Chops both trees in a lane
function chopRow()
turtle.turnLeft()
move(sideDist)
chopTree()
turtle.turnLeft()
turtle.turnLeft()
move(2 * sideDist)
chopTree()
moveBack(sideDist)
turtle.turnLeft()
end
-- Moves the turtle to the next tree pair
function nextRow() move(forwDist) end
for i = 1, rows, 1 do
chopRow()
if i < rows then nextRow() end
end
-- Return to starting location and dump harvested materials into chest
-- (or any inventory, really)
moveBack(rows * forwDist)
turtle.turnLeft()
turtle.turnLeft()
dropHarvested()
turtle.turnLeft()
turtle.turnLeft()
|
function RoboticsFactory:GetTechAllowed(techId, techNode, player)
local allowed, canAfford = ScriptActor.GetTechAllowed(self, techId, techNode, player)
-- Do not allow tech while open or researching or we may lose res.
-- Research progress is checked here instead of GetIsResearching() because
-- there is a delay in the tech tree when tech is queued which causes
-- GetIsResearching() to return true before the research is 100% complete.
-- Checking the progress is 0 is the sure way to get around that limit.
-- $AU: Which causes the cancel button to not work anymore. I want to make the tech tree
-- finally entity based (this will also make both tech trees available for insight) with clearer API.
allowed = allowed and not self.open and self:GetResearchProgress() == 0
if techId == kTechId.ARC then
local teamInfo = GetTeamInfoEntity(kTeam1Index)
assert(teamInfo)
allowed = allowed and self:GetTechId() == kTechId.ARCRoboticsFactory and teamInfo:CanBuildARC()
elseif techId == kTechId.Cancel then
allowed = self:GetResearchProgress() < 1
end
return allowed, canAfford
end
|
return {'rehabilitatie','rehabilitatiecentrum','rehabilitatieprogramma','rehabiliteren','rehydratie','rehorst','rehman','rehwinkel','rehabilitaties','rehabiliteer','rehabiliteerde','rehabiliteerden','rehabiliteert','rehabiliterend'}
|
object_tangible_loot_creature_loot_collections_stormtrooper_wooden_dowel = object_tangible_loot_creature_loot_collections_shared_stormtrooper_wooden_dowel:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_stormtrooper_wooden_dowel, "object/tangible/loot/creature/loot/collections/stormtrooper_wooden_dowel.iff")
|
--[[
Author : Jonathan Els
Version : 1.0
Description:
Mask outbound INVITE headers for After-Hours Call Re-Direct
Notes:
Call flow is used from CUC Call Handler, transferring to a CTIRP that has CFA to ITSP.
Workflow allows for re-masking the Diversion Header from internal DN on CTIRP to the Main number DID.
Future development:
None
--]]
M = {}
trace.enable()
function M.outbound_INVITE(msg)
-- Input for script
local ctirpdn = scriptParameters.getValue("ctirpdn")
local mainnumber = scriptParameters.getValue("mainnumber")
local rdnis = scriptParameters.getValue("rdnis")
-- Get Diversion header
local diversion = msg:getHeader("Diversion")
trace.format("CTI RP DN is : %s", ctirpdn)
trace.format("Main Number is : %s", mainnumber)
-- Check if Diversion Header exists and if the CTI RP DN is matched
if diversion and diversion:find(ctirpdn) then
trace.format("Successful match on diversion - applying masking")
-- Apply masking to affected headers - From, PAI, RPID, Contact
msg:applyNumberMask("From", mainnumber)
msg:applyNumberMask("P-Asserted-Identity", mainnumber)
msg:applyNumberMask("Remote-Party-ID", mainnumber)
msg:applyNumberMask("Contact", mainnumber)
-- Apply masking to Diversion to mask internal CTI RP DN
msg:applyNumberMask("Diversion", rdnis)
end
end
return M
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.