setNodeDebugText
Definition
-- @/lua/vehicle/bdebugImpl.lua:2659
-- Sets the text to display at a node using the node debug text visualization
-- "type" is the group the text belongs to
-- "nodeCID" is the id of the node at runtime
-- "text" is the text you want to display at the node
local function setNodeDebugText(type, nodeCID, text)
-- If type doesn't exist, create it!
if not M.state then return
log('E', 'bdebugImpl.setNodeDebugText', string.format('bdebugImpl.setNodeDebugText(%s, %d, %s) not successful because bdebugImpl.lua is not fully initialized!', type, nodeCID, text))
end
local id = M.state.vehicle.nodeDebugTextTypeToID[type]
if not id then
table.insert(M.state.vehicle.nodeDebugTextModes, {name = type, data = {}})
M.state.vehicle.nodeDebugTextTypeToID[type] = #M.state.vehicle.nodeDebugTextModes
id = M.state.vehicle.nodeDebugTextTypeToID[type]
end
local mode = M.state.vehicle.nodeDebugTextModes[id]
-- If node data doesn't exist, create it!
if not mode.data[nodeCID] then
mode.data[nodeCID] =
{
textList = {},
}
end
-- Add text to list
table.insert(
mode.data[nodeCID].textList,
text
)
updateDebugDrawAndSendState()
end
Callers
@/lua/vehicle/controller/pneumatics/lowAirPressureWarning.lua
isPlayingLowPressureSound = false
bdebug.setNodeDebugText("Misc", warningSoundNode, M.name .. " - Low Air Pressure Warning: " .. (warningSoundEventName or "no event"))
end
@/lua/vehicle/powertrain/electricMotor.lua
bdebug.setNodeDebugText("Powertrain", engineNodeIDs[1], device.name .. ": " .. samplePath)
end
@/lua/vehicle/controller/pneumatics/airbrakes.lua
bdebug.setNodeDebugText("Airbrakes", soundNode, M.name .. ": " .. (soundEvent or "no event"))
@/lua/vehicle/powertrain/sequentialGearbox.lua
bdebug.setNodeDebugText("Powertrain", device.transmissionNodeID or sounds.engineNode, device.name .. ": " .. gearWhineOutputSample)
bdebug.setNodeDebugText("Powertrain", device.transmissionNodeID or sounds.engineNode, device.name .. ": " .. gearWhineInputSample)
bdebug.setNodeDebugText("Powertrain", device.transmissionNodeID or sounds.engineNode, device.name .. ": " .. gearWhineOutputSample)
bdebug.setNodeDebugText("Powertrain", device.transmissionNodeID or sounds.engineNode, device.name .. ": " .. gearWhineInputSample)
@/lua/vehicle/bdebug.lua
-- "text" is the text you want to display at the node
local function setNodeDebugText(type, nodeCID, text)
-- If type doesn't exist, create it!
@/lua/vehicle/controller/propAnimation/sequentialLever.lua
bdebug.setNodeDebugText("PropAnimation", shiftSoundNodeId, "Sequential Lever Up: " .. shiftSoundEventGearUp)
bdebug.setNodeDebugText("PropAnimation", shiftSoundNodeId, "Sequential Lever Down: " .. shiftSoundEventGearDown)
bdebug.setNodeDebugText("PropAnimation", shiftSoundNodeId, "Sequential Lever Up: " .. shiftSoundEventGearUp)
bdebug.setNodeDebugText("PropAnimation", shiftSoundNodeId, "Sequential Lever Down: " .. shiftSoundEventGearDown)
@/lua/vehicle/controller/sound/linearMovement.lua
bdebug.setNodeDebugText("Linear Movement", soundNode, M.name .. " - Loop: " .. (movementSoundEvent or "no event"))
bdebug.setNodeDebugText("Linear Movement", soundNode, M.name .. " - Segment Inc: " .. (segmentIncSoundEvent or "no event"))
bdebug.setNodeDebugText("Linear Movement", soundNode, M.name .. " - Loop: " .. (movementSoundEvent or "no event"))
bdebug.setNodeDebugText("Linear Movement", soundNode, M.name .. " - Segment Inc: " .. (segmentIncSoundEvent or "no event"))
bdebug.setNodeDebugText("Linear Movement", soundNode, M.name .. " - Segment Dec: " .. (segmentDecSoundEvent or "no event"))
bdebug.setNodeDebugText("Linear Movement", soundNode, M.name .. " - Segment Inc: " .. (segmentIncSoundEvent or "no event"))
bdebug.setNodeDebugText("Linear Movement", soundNode, M.name .. " - Segment Dec: " .. (segmentDecSoundEvent or "no event"))
bdebug.setNodeDebugText("Linear Movement", soundNode, M.name .. " - Position Min: " .. (minPositionSoundEvent or "no event"))
bdebug.setNodeDebugText("Linear Movement", soundNode, M.name .. " - Segment Dec: " .. (segmentDecSoundEvent or "no event"))
bdebug.setNodeDebugText("Linear Movement", soundNode, M.name .. " - Position Min: " .. (minPositionSoundEvent or "no event"))
bdebug.setNodeDebugText("Linear Movement", soundNode, M.name .. " - Position Max: " .. (maxPositionSoundEvent or "no event"))
bdebug.setNodeDebugText("Linear Movement", soundNode, M.name .. " - Position Min: " .. (minPositionSoundEvent or "no event"))
bdebug.setNodeDebugText("Linear Movement", soundNode, M.name .. " - Position Max: " .. (maxPositionSoundEvent or "no event"))
@/lua/vehicle/controller/pneumatics/actuators.lua
if groupData.soundLoopIncrease then
bdebug.setNodeDebugText("Pneumatic Actuator", groupData.soundNode, M.name .. " - Inc " .. v.groupName .. ": " .. (v.soundIncrease or "no event"))
end
if groupData.soundLoopDecrease then
bdebug.setNodeDebugText("Pneumatic Actuator", groupData.soundNode, M.name .. " - Dec " .. v.groupName .. ": " .. (v.soundDecrease or "no event"))
end
@/lua/vehicle/powertrain/hydraulicCylinder.lua
bdebug.setNodeDebugText("Hydraulics", movementLoopNodeId, cylinder.name .. " - Cylinder Movement Loop: " .. (cylinderMovementEvent or "no event"))
@/lua/vehicle/powertrain/hydraulicPump.lua
bdebug.setNodeDebugText("Hydraulics", pumpLoopNodeId, device.name .. " - Pump Loop: " .. (pumpLoopEvent or "no event"))
end
@/lua/vehicle/controller/propAnimation/singleAxisLever.lua
bdebug.setNodeDebugText("PropAnimation", shiftSoundNodeId, "Single Axis Lever: " .. shiftSoundEvent)
@/lua/vehicle/controller/hydraulicSuspension.lua
bdebug.setNodeDebugText("Hydraulics", jbeamData.pumpNode, M.name .. " - Pump: " .. (pumpSoundEvent or "no event"))
bdebug.setNodeDebugText("Hydraulics", jbeamData.pumpNode, M.name .. " - Release: " .. (releaseSoundEvent or "no event"))
bdebug.setNodeDebugText("Hydraulics", jbeamData.pumpNode, M.name .. " - Pump: " .. (pumpSoundEvent or "no event"))
bdebug.setNodeDebugText("Hydraulics", jbeamData.pumpNode, M.name .. " - Release: " .. (releaseSoundEvent or "no event"))
end
@/lua/vehicle/controller/propAnimation/hPattern.lua
bdebug.setNodeDebugText("PropAnimation", shiftSoundNodeId, "H-Pattern Shifter In: " .. shiftSoundEventGearIn)
bdebug.setNodeDebugText("PropAnimation", shiftSoundNodeId, "H-Pattern Shifter Out: " .. shiftSoundEventGearOut)
bdebug.setNodeDebugText("PropAnimation", shiftSoundNodeId, "H-Pattern Shifter In: " .. shiftSoundEventGearIn)
bdebug.setNodeDebugText("PropAnimation", shiftSoundNodeId, "H-Pattern Shifter Out: " .. shiftSoundEventGearOut)
@/lua/vehicle/powertrain/automaticGearbox.lua
bdebug.setNodeDebugText("Powertrain", device.transmissionNodeID or sounds.engineNode, device.name .. ": " .. gearWhineOutputSample)
bdebug.setNodeDebugText("Powertrain", device.transmissionNodeID or sounds.engineNode, device.name .. ": " .. gearWhineInputSample)
bdebug.setNodeDebugText("Powertrain", device.transmissionNodeID or sounds.engineNode, device.name .. ": " .. gearWhineOutputSample)
bdebug.setNodeDebugText("Powertrain", device.transmissionNodeID or sounds.engineNode, device.name .. ": " .. gearWhineInputSample)
@/lua/vehicle/controller/advancedCouplerControl.lua
}
bdebug.setNodeDebugText("Latches", couplerGroup.soundNode, M.name .. ": " .. (couplerGroup.attachSoundEvent or "no attach event"))
bdebug.setNodeDebugText("Latches", couplerGroup.soundNode, M.name .. ": " .. (couplerGroup.detachSoundEvent or "no detach event"))
bdebug.setNodeDebugText("Latches", couplerGroup.soundNode, M.name .. ": " .. (couplerGroup.attachSoundEvent or "no attach event"))
bdebug.setNodeDebugText("Latches", couplerGroup.soundNode, M.name .. ": " .. (couplerGroup.detachSoundEvent or "no detach event"))
bdebug.setNodeDebugText("Latches", couplerGroup.soundNode, M.name .. ": " .. (couplerGroup.breakSoundEvent or "no break event"))
bdebug.setNodeDebugText("Latches", couplerGroup.soundNode, M.name .. ": " .. (couplerGroup.detachSoundEvent or "no detach event"))
bdebug.setNodeDebugText("Latches", couplerGroup.soundNode, M.name .. ": " .. (couplerGroup.breakSoundEvent or "no break event"))
@/lua/vehicle/powertrain/combustionEngine.lua
for _, nodeCid in ipairs(soundData.nodes) do
bdebug.setNodeDebugText("CombustionEngine " .. device.name, nodeCid, device.name .. ": " .. soundData.text)
end
@/lua/vehicle/sounds.lua
for name, soundscape in pairs(soundscapes) do
bdebug.setNodeDebugText("Soundscape", type(soundscape.node) == "number" and soundscape.node or M.refNode, name .. ": " .. soundscape.src)
end
@/lua/vehicle/powertrain/dctGearbox.lua
bdebug.setNodeDebugText("Powertrain", device.transmissionNodeID or sounds.engineNode, device.name .. ": " .. gearWhineOutputSample)
bdebug.setNodeDebugText("Powertrain", device.transmissionNodeID or sounds.engineNode, device.name .. ": " .. gearWhineInputSample)
bdebug.setNodeDebugText("Powertrain", device.transmissionNodeID or sounds.engineNode, device.name .. ": " .. gearWhineOutputSample)
bdebug.setNodeDebugText("Powertrain", device.transmissionNodeID or sounds.engineNode, device.name .. ": " .. gearWhineInputSample)
@/lua/vehicle/bdebugImpl.lua
if not M.state then return
log('E', 'bdebugImpl.setNodeDebugText', string.format('bdebugImpl.setNodeDebugText(%s, %d, %s) not successful because bdebugImpl.lua is not fully initialized!', type, nodeCID, text))
end
@/lua/vehicle/controller/pyrotechnicCharge.lua
if eventNodeId then
bdebug.setNodeDebugText("Pyrotechnic Charges", eventNodeId, M.name .. ": " .. (eventName or "no event"))
end
@/lua/vehicle/powertrain/manualGearbox.lua
bdebug.setNodeDebugText("Powertrain", device.transmissionNodeID or sounds.engineNode, device.name .. ": " .. gearWhineOutputSample)
bdebug.setNodeDebugText("Powertrain", device.transmissionNodeID or sounds.engineNode, device.name .. ": " .. gearWhineInputSample)
bdebug.setNodeDebugText("Powertrain", device.transmissionNodeID or sounds.engineNode, device.name .. ": " .. gearWhineOutputSample)
bdebug.setNodeDebugText("Powertrain", device.transmissionNodeID or sounds.engineNode, device.name .. ": " .. gearWhineInputSample)
@/lua/vehicle/controller/propAnimation/dualAxisLever.lua
bdebug.setNodeDebugText("PropAnimation", moveSoundNodeId, "Dual Axis Lever: " .. moveSoundEvent)