Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
Merge branch 'canary'
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanctech committed Jul 22, 2021
2 parents df4ac7f + cf8d1b1 commit 8bba1a8
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.vscode
*.zip
wk_wars2x/config.lua
wk_wars2x/config.lua
sonorancad/stream/*.ydr
sonorancad/stream/data/*.ytyp
4 changes: 4 additions & 0 deletions sonorancad/core/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Config.GetPluginConfig = function(pluginName)
Config.plugins[pluginName].disableReason = "startup aborted"
elseif Config.plugins[pluginName].enabled == nil then
Config.plugins[pluginName].enabled = true
elseif Config.plugins[pluginName].enabled == false then
Config.plugins[pluginName].disableReason = "Disabled"
end
return Config.plugins[pluginName]
else
Expand All @@ -41,6 +43,8 @@ Config.LoadPlugin = function(pluginName, cb)
Config.plugins[pluginName].disableReason = "startup aborted"
elseif Config.plugins[pluginName].enabled == nil then
Config.plugins[pluginName].enabled = true
elseif Config.plugins[pluginName].enabled == false then
Config.plugins[pluginName].disableReason = "Disabled"
end
return cb(Config.plugins[pluginName])
else
Expand Down
8 changes: 6 additions & 2 deletions sonorancad/core/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ function dumpInfo()
for k, v in pairs(Config) do
if (k == "plugins") then goto continue end
if type(v) == "function" then goto continue end
if type(v) == "table" then coreConfig[k] = json.encode(v) end
if type(v) == "table" then
table.insert(coreConfig, ("%s = %s"):format(k, json.encode(v)))
goto continue
end
if type(v) == "thread" then goto continue end
table.insert(coreConfig, ("%s = %s"):format(k, v))
coreConfig[k] = v
::continue::
end
Expand All @@ -53,7 +57,7 @@ Relevant Variables
%s
Core Configuration
%s
]]):format(version, Config.latestVersion, table.concat(pluginVersions, ", "), table.concat(loadedPlugins, ", "), table.concat(disabledPlugins, ", "), variableList, table.concat(coreConfig, ", "))
]]):format(version, Config.latestVersion, table.concat(pluginVersions, ", "), table.concat(loadedPlugins, ", "), table.concat(disabledPlugins, ", "), variableList, table.concat(coreConfig, "\n"))
end

function dumpPlugin(name)
Expand Down
12 changes: 12 additions & 0 deletions sonorancad/core/httpd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,18 @@ local PushEventHandler = {
EVENT_REMOVE_911 = function(body)
SetEmergencyCache(body.data.callId, nil)
TriggerEvent('SonoranCAD::pushevents:CadCallRemoved', body.data.callId)
end,
EVENT_STREETSIGN_UPDATED = function(body)
TriggerEvent('SonoranCAD::pushevents:SmartSignUpdate', body.data.signData)
end,
EVENT_RECORD_ADD = function(body)
TriggerEvent('SonoranCAD::pushevents:RecordAdded', body.data.record)
end,
EVENT_RECORD_EDIT = function(body)
TriggerEvent('SonoranCAD::pushevents:RecordEdited', body.data.record)
end,
EVENT_RECORD_REMOVE = function(body)
TriggerEvent('SonoranCAD::pushevents:RecordRemoved', body.data.record)
end
}

Expand Down
12 changes: 8 additions & 4 deletions sonorancad/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ games {'gta5'}

author 'Sonoran CAD'
description 'Sonoran CAD FiveM Integration'
version '2.6.2'

lua54 'yes'
version '2.6.3'

server_scripts {
'core/http.js'
Expand All @@ -31,4 +29,10 @@ client_scripts {
,'plugins/**/config_*.lua'
,'plugins/**/cl_*.lua'
,'plugins/**/cl_*.js'
}
}

files {
'stream/data/*.ytyp',
}

data_file 'DLC_ITYP_REQUEST' 'stream/data/*.ytyp'
2 changes: 1 addition & 1 deletion sonorancad/plugins/postals
Submodule postals updated 0 files
4 changes: 2 additions & 2 deletions sonorancad/version.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"resource" : "2.6.2",
"testedFxServerVersion": "3922"
"resource" : "2.6.3",
"testedFxServerVersion": "4162"
}

0 comments on commit 8bba1a8

Please sign in to comment.