igniteRandomNodeMinimal
Definition
-- @/lua/vehicle/fire.lua:398
local function igniteRandomNodeMinimal()
local possibleNodes = {}
for k, n in pairs(flammableNodes) do
if n and n.canIgnite and not wheelNodes[k] and n.intensity <= 0 then
table.insert(possibleNodes, k)
end
end
if #possibleNodes <= 0 then
return
end
local node = flammableNodes[possibleNodes[random(#possibleNodes)]]
if not node then
return
end
node.temperature = node.flashPoint + 10
end
Callers
@/ui/modules/apps/VehicleDebug/app.js
$scope.igniteNodeMinimal = function () {
bngApi.activeObjectLua('fire.igniteRandomNodeMinimal()')
}