Skip to content

Commit

Permalink
Removed Obsolute Hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
bleonheart committed Jan 18, 2025
1 parent 669c67d commit 4a1aaa5
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 91 deletions.
3 changes: 0 additions & 3 deletions lilia/gamemode/core/hooks/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -498,9 +498,6 @@ function GM:OnContextMenuClose()
if IsValid(lia.gui.quick) then lia.gui.quick:Remove() end
end

function GM:SetupQuickMenuCategories(panel)
panel:addCategory("Miscellaneous")
end

function GM:CharListLoaded()
timer.Create("liaWaitUntilPlayerValid", 1, 0, function()
Expand Down
9 changes: 5 additions & 4 deletions lilia/gamemode/core/hooks/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ function GM:PlayerDisconnected(client)
end

lia.char.cleanUpForPlayer(client)
for _, entity in pairs(ents.GetAll()) do
for _, entity in ents.Iterator() do
if entity:GetCreator() == client and not string.StartsWith(entity:GetClass(), "lia_") then entity:Remove() end
end
end
Expand Down Expand Up @@ -476,7 +476,7 @@ function GM:SaveData()
end
end

self:setData(data)
lia.data.set("persistance", data, true)
end

local function IsEntityNearby(pos, class)
Expand All @@ -487,7 +487,8 @@ local function IsEntityNearby(pos, class)
end

function GM:LoadData()
for _, v in pairs(self:getData() or {}) do
local data = lia.data.get("persistance", {}, true)
for _, v in pairs(data or {}) do
if not IsEntityNearby(v.pos, v.class) then
local ent = ents.Create(v.class)
if IsValid(ent) then
Expand All @@ -499,4 +500,4 @@ function GM:LoadData()
end
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ local ESP_DrawnEntities = {
lia_vendor = true,
}

function MODULE:SetupQuickMenuCategories(panel)
panel:addCategory("ESP")
end

function MODULE:SetupQuickMenu(menu)
local client = LocalPlayer()
if client:getChar() and (client:hasPrivilege("Staff Permissions - No Clip ESP Outside Staff Character") or client:isStaffOnDuty()) then
Expand Down Expand Up @@ -97,4 +93,4 @@ concommand.Add("weighpoint_stop", function() hook.Add("HUDPaint", "WeighPoint",
concommand.Add("dev_GetEntPos", function(client) if client:isStaff() then LiliaInformation(client:getTracedEntity():GetPos().x, client:getTracedEntity():GetPos().y, client:getTracedEntity():GetPos().z) end end)
concommand.Add("dev_GetEntAngles", function(client) if client:isStaff() then LiliaInformation(math.ceil(client:getTracedEntity():GetAngles().x) .. ", " .. math.ceil(client:getTracedEntity():GetAngles().y) .. ", " .. math.ceil(client:getTracedEntity():GetAngles().z)) end end)
concommand.Add("dev_GetRoundEntPos", function(client) if client:isStaff() then LiliaInformation(math.ceil(client:getTracedEntity():GetPos().x) .. ", " .. math.ceil(client:getTracedEntity():GetPos().y) .. ", " .. math.ceil(client:getTracedEntity():GetPos().z)) end end)
concommand.Add("dev_GetPos", function(client) if client:isStaff() then LiliaInformation(math.ceil(client:GetPos().x) .. ", " .. math.ceil(client:GetPos().y) .. ", " .. math.ceil(client:GetPos().z)) end end)
concommand.Add("dev_GetPos", function(client) if client:isStaff() then LiliaInformation(math.ceil(client:GetPos().x) .. ", " .. math.ceil(client:GetPos().y) .. ", " .. math.ceil(client:GetPos().z)) end end)
6 changes: 1 addition & 5 deletions lilia/modules/frameworkui/hud/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ function MODULE:HUDPaintBackground()
self:RenderEntities()
end

function MODULE:SetupQuickMenuCategories(panel)
panel:addCategory("HUD")
end

function MODULE:SetupQuickMenu(menu)
self:SetupQuickMenuDesc(menu)
self:SetupQuickMenuFPS(menu)
Expand Down Expand Up @@ -258,4 +254,4 @@ function Empty_Popup(callback, sw, sh)

if callback then callback(frame) end
end)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ end

function MODULE:SetupQuickMenu(menu)
menu:addCategory(self.name)
menu:addCheck(L"invertWepSelectScroll", function(panel, state)
menu:addCheck(L("invertWepSelectScroll"), function(panel, state)
if state then
RunConsoleCommand("wepselect_invert", "1")
else
Expand Down
1 change: 0 additions & 1 deletion lilia/modules/utilities/itemsave/config.lua

This file was deleted.

7 changes: 0 additions & 7 deletions lilia/modules/utilities/itemsave/docs/config.lua

This file was deleted.

55 changes: 0 additions & 55 deletions lilia/modules/utilities/itemsave/libraries/server.lua

This file was deleted.

5 changes: 0 additions & 5 deletions lilia/modules/utilities/itemsave/module.lua

This file was deleted.

6 changes: 1 addition & 5 deletions lilia/modules/utilities/thirdperson/libraries/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ local ThirdPersonVerticalView = CreateClientConVar("tp_vertical", 10, true)
local ThirdPersonViewDistance = CreateClientConVar("tp_distance", 50, true)
local ThirdPersonHorizontalView = CreateClientConVar("tp_horizontal", 0, true)
crouchFactor = 0
function MODULE:SetupQuickMenuCategories(panel)
panel:addCategory("Third Person")
end

function MODULE:SetupQuickMenu(menu)
if self.ThirdPersonEnabled then
menu:addCheck(L("thirdpersonToggle"), function(_, state)
Expand Down Expand Up @@ -210,4 +206,4 @@ end
concommand.Add("tp_toggle", function()
ThirdPerson:SetInt(ThirdPerson:GetInt() == 0 and 1 or 0)
hook.Run("thirdPersonToggled", ThirdPerson:GetBool())
end)
end)

0 comments on commit 4a1aaa5

Please sign in to comment.