Skip to content

Commit

Permalink
Add small checks to CTO plugin. (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspect12 committed Apr 24, 2022
1 parent 398ac77 commit 4d23fa8
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions cto/cl_plugin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,19 @@ net.Receive("RecalculateHUDObjectives", function()
local objectives = net.ReadTable()
local lines = {}

for k, v in pairs(string.Split(objectives.text, "\n")) do
if (string.StartWith(v, "^")) then
table.insert(lines, "<:: " .. string.sub(v, 2) .. " ::>")
end
if (status) then
PLUGIN.socioStatus = status
end

PLUGIN.socioStatus = status
PLUGIN.hudObjectives = lines
if (objectives) then
for k, v in pairs(string.Split(objectives.text, "\n")) do
if (string.StartWith(v, "^")) then
table.insert(lines, "<:: " .. string.sub(v, 2) .. " ::>")
end
end

PLUGIN.hudObjectives = lines
end

PLUGIN:UpdateBiosignalLocations()
end)

0 comments on commit 4d23fa8

Please sign in to comment.