publish
Definition
-- @/lua/ge/screenshot.lua:88
local function publish(batchTag)
if settings.getValue('onlineFeatures') ~= 'enable' then
log('E', 'screenshot.publish', 'screenshot publishing disabled because online features are disabled')
guihooks.trigger("toastrMsg", {type="warning", title="Error uploading screenshot", msg="Online features are disabled. This setting must be enbled to upload screenshots to BeamNG's media server"})
return
end
doScreenshot(batchTag, true)
end
Callers
@/ui/modules/photomode/photomode.js
timedCall(next => {
bngApi.engineLua('screenshot.publish()', next)
})
@/lua/vehicle/controller/tech/MQTToutput.lua
if isClientConnected then
client:publish({topic = topicName, payload = jsonEncode(data)})
end
@/lua/vehicle/extensions/mqttGrafanaDemo.lua
--dump{'MQTT DATA: car_data', data}
client:publish({topic = 'car_data', payload = jsonEncode(data)})
end
@/ui/ui-vue/mockdata/inputBindings.js
"actionMap": "Global",
"onDown": "screenshot.publish()",
"order": 15,
@/lua/common/libs/luamqtt/mqtt/client.lua
-- @return true or packet id on success or false and error message on failure
function client_mt:publish(args)
-- fetch and validate args