This commit is contained in:
Никита Круглицкий
2025-05-11 08:18:33 +06:00
parent 14ab069846
commit a6c89e2f21
13 changed files with 229 additions and 51 deletions

View File

@@ -7,6 +7,8 @@ local Gearbox = class('Gearbox', PowertrainComponent)
function Gearbox:initialize(vehicle, name, config)
PowertrainComponent.initialize(self, vehicle, name, config)
if CLIENT then return end
self.wireInputs = {
Upshift = 'number',
Downshift = 'number'
@@ -24,6 +26,8 @@ function Gearbox:initialize(vehicle, name, config)
end
function Gearbox:updateWireOutputs()
PowertrainComponent.updateWireOutputs(self)
wire.ports.Gearbox_RPM = self:getRPM()
wire.ports.Gearbox_Torque = self.torque
wire.ports.Gearbox_Ratio = self.ratio

View File

@@ -10,6 +10,8 @@ local ManualGearbox = class('ManualGearbox', BaseGearbox)
function ManualGearbox:initialize(vehicle, name, config)
BaseGearbox.initialize(self, vehicle, name, config)
if CLIENT then return end
table.merge(self.wireOutputs, {
Gearbox_Gear = 'number'
})