breakHinges
Definition
-- @/lua/vehicle/beamstate.lua:1330
local function breakHinges()
for _, b in pairs(v.data.beams) do
if b.breakGroup ~= nil then
local breakGroups = type(b.breakGroup) == "table" and b.breakGroup or {b.breakGroup}
-- multiple break groups
for _, g in pairs(breakGroups) do
if type(g) == "string" and (string.find(g, "hinge") ~= nil or string.find(g, "latch") ~= nil) then
--log('D', "beamstate.breakHinges"," breaking hinge beam "..k.. " as in breakgroup ".. b.breakGroup)
obj:breakBeam(b.cid)
break
end
end
end
end
--break groups that ONLY exist with couplers in them
for breakgroup, _ in pairs(couplerBreakGroupCache) do
if type(breakgroup) == "string" and (string.find(breakgroup, "hinge") ~= nil or string.find(breakgroup, "latch") ~= nil) then
breakBreakGroup(breakgroup)
end
end
end
Callers
@/ui/ui-vue/mockdata/inputBindings.js
"title": "ui.inputActions.gameplay.funHinges.title",
"onDown": "beamstate.breakHinges()",
"order": 41,
@/lua/ge/extensions/core/funstuff.lua
local function breakHinges()
getPlayerVehicle(0):queueLuaCommand("beamstate.breakHinges()")
local function breakHinges()
getPlayerVehicle(0):queueLuaCommand("beamstate.breakHinges()")
return {"hide"}
@/ui/modules/apps/VehicleDebug/app.js
$scope.breakAllHinges = function () {
bngApi.activeObjectLua('beamstate.breakHinges()')
}