This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local goobie_utils = ... | |
local AddonName = goobie_utils.AddonName | |
local Util = goobie_utils.Util | |
local Log = goobie_utils.Log | |
local PlayerUtil = goobie_utils.PlayerUtil | |
local util = util | |
AddonName = Util.CapitalizeFirstLetter(AddonName) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
NetStream - 2.0.1 | |
https://github.com/alexgrist/NetStream/blob/master/netstream2.lua | |
Alexander Grist-Hucker | |
http://www.revotech.org | |
Credits to: | |
thelastpenguin for pON. | |
https://github.com/thelastpenguin/gLUA-Library/tree/master/pON |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
local str = "Hi" | |
print(ChangeLine(str, "OwO", 1)) -- output: OwO | |
print(ChangeLine(str, " Srlion!", 1, true)) -- output: Hi Srlion! | |
print(ChangeLine(str, "Srlion ", 1, false)) -- output: Srlion Hi | |
]] | |
-- Localize functions so accessing them becomes more faster | |
local sub = string.sub | |
local rep = string.rep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local times = {"w", 604800, "d", 86400, "h", 3600, "m", 60, "s", 1} | |
for i = 1, # times - 2, 2 do | |
times[i] = times[i] .. (" ") | |
end | |
local math_floor = math.floor | |
function FormatTime(seconds) | |
if (seconds <= 0) then | |
return seconds .. "s" | |
end | |
local str = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- af needs to be remade because string.Split is slow | |
GetCaretLine = function(s) | |
local caretPos = s:GetCaretPos() + 1 | |
local splittedText = s:GetText():Split("\n") | |
local len = 0 | |
for k, v in ipairs(splittedText) do | |
len = len + #v + 1 | |
if (caretPos <= len) then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local sv_load = function(file) | |
if (SERVER) then | |
return include(file) | |
end | |
end | |
local cl_load = function(file) | |
if (SERVER) then | |
AddCSLuaFile(file) | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
mysql - 1.0.2 | |
A simple MySQL wrapper for Garry's Mod. | |
Alexander Grist-Hucker | |
http://www.alexgrist.com | |
https://github.com/alexgrist/GLua-MySQL-Wrapper/blob/master/mysql.lua | |
--]] | |
--[[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
requires: | |
async | |
https://github.com/Srlion/sr-stuff/blob/master/lua/async.lua | |
netstream | |
https://github.com/alexgrist/NetStream/blob/master/netstream2.lua | |
OR | |
https://github.com/Srlion/sr-stuff/blob/master/lua/netstream.lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
https://github.com/yongkangchen/lua-await/blob/master/sync.lua | |
MIT License | |
Copyright (c) 2016 Yongkang Chen lx1988cyk#gmail.com | |
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local COLOR_KEY = Color(0, 255, 0) | |
local COLOR_VALUE = Color(255, 255, 0) | |
local COLOR_DEFAULT = Color(255, 255, 255) | |
local COLOR_DOTS = Color(0, 0, 255) | |
do | |
local MsgC = MsgC | |
local istable = istable | |
local isstring = isstring | |
local tostring = tostring |