Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bleonheart authored Sep 28, 2023
1 parent f08dcbb commit 592cd59
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 109 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lua_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: LUA Checker
on: [push, pull_request]

jobs:
linter:
LuaChecker:
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 1 addition & 1 deletion gamemode/commands/sv_management.lua
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ lia.command.add(
)

--------------------------------------------------------------------------------------------------------
for _, v in pairs(lia.config.ServerURLs) do
for k, v in pairs(lia.config.ServerURLs) do
lia.command.add(
k,
{
Expand Down
83 changes: 18 additions & 65 deletions gamemode/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -249,71 +249,24 @@ if not lia.config.WasInitialized then
["lia_cheapblur"] = "1",
},
RemovableHooks = {
["StartChat"] = {
"StartChatIndicator",
},
["FinishChat"] = {
"EndChatIndicator",
},
["PostPlayerDraw"] = {
"DarkRP_ChatIndicator",
},
["CreateClientsideRagdoll"] = {
"DarkRP_ChatIndicator",
},
["player_disconnect"] = {
"DarkRP_ChatIndicator",
},
["PostDrawEffects"] = {
"RenderWidgets",
"RenderHalos"",
},
["PlayerTick"] = {
"TickWidgets",
},
["PlayerInitialSpawn"] = {
"PlayerAuthSpawn",
},
["RenderScene"] = {
"RenderStereoscopy",
"RenderSuperDoF",
},
["LoadGModSave"] = {
"LoadGModSave",
},
["RenderScreenspaceEffects"] = {
"RenderColorModify",
"RenderBloom",
"RenderToyTown",
"RenderTexturize",
"RenderSunbeams",
"RenderSobel",
"RenderSharpen",
"RenderMaterialOverlay",
"RenderMotionBlur",
"RenderBokeh",
},
["GUIMousePressed"] = {
"SuperDOFMouseDown",
},
["GUIMouseReleased"] = {
"SuperDOFMouseUp",
},
["PreventScreenClicks"] = {
"SuperDOFPreventClicks",
},
["PostRender"] = {
"RenderFrameBlend",
},
["PreRender"] = {
"PreRenderFrameBlend",
},
["Think"] = {
"DOFThink",
},
["NeedsDepthPass"] = {
"NeedsDepthPass_Bokeh",
},
["StartChat"] = {"StartChatIndicator",},
["FinishChat"] = {"EndChatIndicator",},
["PostPlayerDraw"] = {"DarkRP_ChatIndicator",},
["CreateClientsideRagdoll"] = {"DarkRP_ChatIndicator",},
["player_disconnect"] = {"DarkRP_ChatIndicator",},
["PostDrawEffects"] = {"RenderWidgets", "RenderHalos",},
["PlayerTick"] = {"TickWidgets",},
["PlayerInitialSpawn"] = {"PlayerAuthSpawn",},
["RenderScene"] = {"RenderStereoscopy", "RenderSuperDoF",},
["LoadGModSave"] = {"LoadGModSave",},
["RenderScreenspaceEffects"] = {"RenderColorModify", "RenderBloom", "RenderToyTown", "RenderTexturize", "RenderSunbeams", "RenderSobel", "RenderSharpen", "RenderMaterialOverlay", "RenderMotionBlur", "RenderBokeh",},
["GUIMousePressed"] = {"SuperDOFMouseDown",},
["GUIMouseReleased"] = {"SuperDOFMouseUp",},
["PreventScreenClicks"] = {"SuperDOFPreventClicks",},
["PostRender"] = {"RenderFrameBlend",},
["PreRender"] = {"PreRenderFrameBlend",},
["Think"] = {"DOFThink",},
["NeedsDepthPass"] = {"NeedsDepthPass_Bokeh",},
},
ServerURLs = {
["Discord"] = "https://discord.gg/52MSnh39vw",
Expand Down
12 changes: 6 additions & 6 deletions modules/bodygrouper/derma/cl_bodygrouper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ function PANEL:Init()
end

local defaultColor = lia.config.Color
local h, s, v = ColorToHSV(defaultColor)
s = s * 0.25
local finalOutlineColor = HSVToColor(h, s, v)
local hue, saturation, value = ColorToHSV(defaultColor)
saturation = saturation * 0.25
local finalOutlineColor = HSVToColor(hue, saturation, value)
self.finish = self.side:Add("DButton")
self.finish:Dock(BOTTOM)
self.finish:DockMargin(0, 5, 0, 0)
Expand All @@ -61,14 +61,14 @@ function PANEL:Init()
self.finish.DoClick = function(this)
local model = self.model.Entity
if IsValid(model) then
local skn = model:GetSkin()
local skin = model:GetSkin()
local groups = {}
for i = 0, model:GetNumBodyGroups() - 1 do
groups[i] = model:GetBodygroup(i)
end

local makeChange = true
if self.originalSkin == skn then
if self.originalSkin == skin then
makeChange = false
end

Expand All @@ -84,7 +84,7 @@ function PANEL:Init()
if makeChange then
net.Start("BodygrouperMenu")
net.WriteEntity(self:GetTarget())
net.WriteUInt(skn, 10)
net.WriteUInt(skin, 10)
net.WriteTable(groups)
net.SendToServer()
end
Expand Down
72 changes: 36 additions & 36 deletions modules/crashscreen/derma/cl_crashscreen.lua
Original file line number Diff line number Diff line change
@@ -1,42 +1,7 @@
--------------------------------------------------------------------------------------------------------
local PANEL = {}
local waits = {}
--------------------------------------------------------------------------------------------------------
function PANEL:Init()
local screenWidth, screenHeight = ScrW(), ScrH()
self:SetSize(screenWidth, screenHeight)
self:Center()
self:MoveToFront()
self:SetAlpha(0)
self:AlphaTo(255, 1.2)
local function wait(s, f)
table.insert(waits, {SysTime() + s, function() if IsValid(self) then f() end end})
end

wait(
3.33,
function()
http.Fetch(
"http://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=" .. game.GetIPAddress(),
function(json)
if not IsValid(self) then return end
local data = util.JSONToTable(json)
if not data["response"]["servers"] or not data["response"]["servers"][0] then
self.ServerIsOff = true
self:DoLamar()
else
self.ServerIsOff = false
end
end,
function()
if not IsValid(self) then return end
self.ServerIsOff = false
end
)
end
)
end

local waits = {}
--------------------------------------------------------------------------------------------------------
function PANEL:DoLamar()
local function wait(s, f)
Expand Down Expand Up @@ -111,6 +76,41 @@ function PANEL:DoLamar()
end
)
end
--------------------------------------------------------------------------------------------------------
function PANEL:Init()
local screenWidth, screenHeight = ScrW(), ScrH()
self:SetSize(screenWidth, screenHeight)
self:Center()
self:MoveToFront()
self:SetAlpha(0)
self:AlphaTo(255, 1.2)
local function wait(s, f)
table.insert(waits, {SysTime() + s, function() if IsValid(self) then f() end end})
end

wait(
3.33,
function()
http.Fetch(
"http://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=" .. game.GetIPAddress(),
function(json)
if not IsValid(self) then return end
local data = util.JSONToTable(json)
if not data["response"]["servers"] or not data["response"]["servers"][0] then
self.ServerIsOff = true
self:DoLamar()
else
self.ServerIsOff = false
end
end,
function()
if not IsValid(self) then return end
self.ServerIsOff = false
end
)
end
)
end

--------------------------------------------------------------------------------------------------------
function PANEL:Think()
Expand Down

0 comments on commit 592cd59

Please sign in to comment.