Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion FiveM/nyx_core/server/tests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,44 @@ function Nyx.Tests.TestRPC()
return passes == total
end

-- 61. Test Highway Road Degradation & Public Works Resurfacing Repair Contracts
function Nyx.Tests.TestHighwayDegradationAndTransitRepair()
print("^3[Nyx:Tests] Running Highway Road Degradation & Transit Repair Suite...^7")
local passes = 0
local total = 4

local R = Nyx.Vehicles.RoadDegradation
if not R then
print("^1[Nyx:Test:FAIL]^7 Nyx.Vehicles.RoadDegradation shared module not loaded in environment")
return false
end

-- Sub-test A: Fourth-Power Axle Damage Factor
local carFactor = R.CalculateAxleDamageFactor(2000.0, 2)
local heavyFactor = R.CalculateAxleDamageFactor(20000.0, 5)
local testA_ok = (carFactor == 0.06 or carFactor == 0.06) and (heavyFactor > 1.0)
if assertTest(testA_ok == true, "4th-Power Axle Damage Factor Calculation", "Expected low passenger car factor and high semi factor", string.format("Car: %.2f, Semi: %.2f", carFactor, heavyFactor)) then passes = passes + 1 end

-- Sub-test B: Road Quality Decay
local q1 = R.CalculateRoadQualityDecay(0, 100.0, 0)
local q2 = R.CalculateRoadQualityDecay(100, 100.0, 10)
local testB_ok = (q1 == 100.0) and (q2 < 90.0)
if assertTest(testB_ok == true, "Road Quality Decay Rate Math", "Expected 100% initial and degraded quality after 100 passages", string.format("Q1: %.2f%%, Q2: %.2f%%", q1, q2)) then passes = passes + 1 end

-- Sub-test C: Vehicle Handling Penalty Modifiers
local hOpt = R.CalculateHandlingPenalty(90.0)
local hDeg = R.CalculateHandlingPenalty(50.0)
local testC_ok = (hOpt.status == "OPTIMAL" and hOpt.gripMultiplier == 1.0) and (hDeg.status == "DEGRADED" and hDeg.gripMultiplier < 1.0)
if assertTest(testC_ok == true, "Handling & Traction Penalty Modifiers", "Expected OPTIMAL status for 90% and DEGRADED for 50%", string.format("Opt: %s (x%.2f), Deg: %s (x%.2f)", hOpt.status, hOpt.gripMultiplier, hDeg.status, hDeg.gripMultiplier)) then passes = passes + 1 end

-- Sub-test D: Repair Cost & Asphalt Requirements
local rep = R.CalculateRepairCostAndMaterials(1000.0, 20.0)
local testD_ok = (rep.requiredAsphaltKg == 2000.0) and (rep.treasuryPayout == 5000.0)
if assertTest(testD_ok == true, "Public Works Asphalt & Repair Cost Math", "Expected 2000kg asphalt and $5000.00 payout for 20% loss on 1000m segment", string.format("Asphalt: %.1fkg, Payout: $%.2f", rep.requiredAsphaltKg, rep.treasuryPayout)) then passes = passes + 1 end

return passes == total
end


-- 2. Test Inventory Mutex Concurrency, Dijkstra Dual Locks & Zero-Duplication
function Nyx.Tests.TestInventoryConcurrency()
Expand Down Expand Up @@ -12640,14 +12678,15 @@ function Nyx.Tests.RunAll()
local t59 = Nyx.Tests.TestIndustrialRefiningAndFunctionalPartsManufacturing()
local t60 = Nyx.Tests.TestJudicialBailBondsSuretyEscrowAndFugitiveRecovery()
local t61 = Nyx.Tests.TestMunicipalTollsAndWeighStations()
local t62 = Nyx.Tests.TestHighwayDegradationAndTransitRepair()

print("^5--------------------------------------------------^7")
local suites1to50Passed = false
if t1 and t2 and t3 and t4 and t5 and t6 and t7 and t8 and t9 and t10 and t11 and t12 and t13 and t14 and t15 and t16 and t17 and t18 and t19 and t20 and t21 and t22 and t23 and t24 and t25 and t26 and t27 and t28 and t29 and t30 and t31 and t32 and t33 and t34 and t35 and t36 and t37 and t38 and t39 and t40 and t41 and t42 and t43 and t44 and t45 and t46 and t47 and t48 and t49 and t50 then
suites1to50Passed = true
end

if suites1to50Passed and t51 and t52 and t53 and t54 and t55 and t56 and t57 and t58 and t59 and t60 and t61 then
if suites1to50Passed and t51 and t52 and t53 and t54 and t55 and t56 and t57 and t58 and t59 and t60 and t61 and t62 then
print("^2>>> ALL NYXFRAMEWORK INTEGRATION TESTS PASSED! <<<^7")
else
print("^1>>> SOME NYXFRAMEWORK TESTS FAILED! CHECK LOGS. <<<^7")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
-- ============================================================================
-- Nyxframework: nyx_vehicles, nyx_services & nyx_treasury
-- Migration: 067_highway_degradation_and_transit_repair.sql
-- Description: Commercial highway infrastructure degradation, heavy vehicle axle stress
-- pavement wear modeling, municipal road quality tracking, and
-- public works asphalt/resurfacing repair contracts.
-- Engine: InnoDB | Charset: utf8mb4 | Collation: utf8mb4_unicode_ci
-- ============================================================================

SET FOREIGN_KEY_CHECKS = 0;

-- 1. Create highway segments table
CREATE TABLE IF NOT EXISTS `nyx_highway_segments` (
`segment_id` VARCHAR(64) NOT NULL PRIMARY KEY,
`highway_name` VARCHAR(128) NOT NULL,
`start_coords` JSON NOT NULL,
`end_coords` JSON NOT NULL,
`length_meters` DECIMAL(10, 2) NOT NULL DEFAULT 1000.00,
`quality_pct` DECIMAL(5, 2) NOT NULL DEFAULT 100.00,
`total_heavy_axle_passages` INT UNSIGNED NOT NULL DEFAULT 0,
`status` ENUM('OPTIMAL', 'WEAR_WARNING', 'DEGRADED', 'CRITICAL') NOT NULL DEFAULT 'OPTIMAL',
`last_repaired_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
INDEX `idx_seg_highway` (`highway_name`),
INDEX `idx_seg_quality` (`quality_pct`),
INDEX `idx_seg_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 2. Create municipal road repair contracts table
CREATE TABLE IF NOT EXISTS `nyx_road_repair_contracts` (
`contract_id` VARCHAR(64) NOT NULL PRIMARY KEY,
`segment_id` VARCHAR(64) NOT NULL,
`required_asphalt_kg` DECIMAL(10, 2) NOT NULL DEFAULT 1000.00,
`treasury_payout` DECIMAL(10, 2) NOT NULL DEFAULT 2500.00,
`assigned_faction_id` VARCHAR(64) NULL DEFAULT NULL,
`status` ENUM('OPEN', 'IN_PROGRESS', 'COMPLETED', 'EXPIRED') NOT NULL DEFAULT 'OPEN',
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`completed_at` TIMESTAMP NULL DEFAULT NULL,
FOREIGN KEY (`segment_id`) REFERENCES `nyx_highway_segments` (`segment_id`) ON DELETE CASCADE,
INDEX `idx_repair_segment` (`segment_id`),
INDEX `idx_repair_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 3. Seed major municipal highway transit corridors
INSERT INTO `nyx_highway_segments`
(`segment_id`, `highway_name`, `start_coords`, `end_coords`, `length_meters`, `quality_pct`, `total_heavy_axle_passages`, `status`)
VALUES
('seg_del_perro_fwy_1', 'Del Perro Freeway - Westbound Corridor', '{"x": -1200.0, "y": -800.0, "z": 15.0}', '{"x": 400.0, "y": -800.0, "z": 25.0}', 1600.00, 100.00, 0, 'OPTIMAL'),
('seg_la_puerta_fwy_1', 'La Puerta Freeway - Port Access Connector', '{"x": -200.0, "y": -2000.0, "z": 10.0}', '{"x": 400.0, "y": -1500.0, "z": 20.0}', 1200.00, 95.00, 12, 'OPTIMAL'),
('seg_palomino_fwy_1', 'Palomino Freeway - East Industrial Bypass', '{"x": 1200.0, "y": -1000.0, "z": 30.0}', '{"x": 2200.0, "y": 500.0, "z": 45.0}', 2500.00, 82.00, 48, 'OPTIMAL'),
('seg_senora_fwy_1', 'Senora Freeway - Desert Logistics Route', '{"x": 1500.0, "y": 2500.0, "z": 50.0}', '{"x": 2500.0, "y": 4500.0, "z": 60.0}', 3200.00, 68.00, 120, 'WEAR_WARNING')
ON DUPLICATE KEY UPDATE `highway_name` = VALUES(`highway_name`);

SET FOREIGN_KEY_CHECKS = 1;
3 changes: 2 additions & 1 deletion FiveM/nyx_core/sql/migrations/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@
"063_pharmaceutical_refining_and_player_chemical_labs.sql",
"064_industrial_refining_and_functional_parts_manufacturing.sql",
"065_judicial_bail_bonds_surety_escrow_and_fugitive_recovery.sql",
"066_municipal_toll_booths_and_commercial_weigh_stations.sql"
"066_municipal_toll_booths_and_commercial_weigh_stations.sql",
"067_highway_degradation_and_transit_repair.sql"
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
-- ============================================================================
-- Nyxframework: nyx_vehicles, nyx_services & nyx_treasury
-- Migration: 067_highway_degradation_and_transit_repair.sql
-- Description: Commercial highway infrastructure degradation, heavy vehicle axle stress
-- pavement wear modeling, municipal road quality tracking, and
-- public works asphalt/resurfacing repair contracts.
-- Engine: InnoDB | Charset: utf8mb4 | Collation: utf8mb4_unicode_ci
-- ============================================================================

SET FOREIGN_KEY_CHECKS = 0;

-- 1. Create highway segments table
CREATE TABLE IF NOT EXISTS `nyx_highway_segments` (
`segment_id` VARCHAR(64) NOT NULL PRIMARY KEY,
`highway_name` VARCHAR(128) NOT NULL,
`start_coords` JSON NOT NULL,
`end_coords` JSON NOT NULL,
`length_meters` DECIMAL(10, 2) NOT NULL DEFAULT 1000.00,
`quality_pct` DECIMAL(5, 2) NOT NULL DEFAULT 100.00,
`total_heavy_axle_passages` INT UNSIGNED NOT NULL DEFAULT 0,
`status` ENUM('OPTIMAL', 'WEAR_WARNING', 'DEGRADED', 'CRITICAL') NOT NULL DEFAULT 'OPTIMAL',
`last_repaired_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
INDEX `idx_seg_highway` (`highway_name`),
INDEX `idx_seg_quality` (`quality_pct`),
INDEX `idx_seg_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 2. Create municipal road repair contracts table
CREATE TABLE IF NOT EXISTS `nyx_road_repair_contracts` (
`contract_id` VARCHAR(64) NOT NULL PRIMARY KEY,
`segment_id` VARCHAR(64) NOT NULL,
`required_asphalt_kg` DECIMAL(10, 2) NOT NULL DEFAULT 1000.00,
`treasury_payout` DECIMAL(10, 2) NOT NULL DEFAULT 2500.00,
`assigned_faction_id` VARCHAR(64) NULL DEFAULT NULL,
`status` ENUM('OPEN', 'IN_PROGRESS', 'COMPLETED', 'EXPIRED') NOT NULL DEFAULT 'OPEN',
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`completed_at` TIMESTAMP NULL DEFAULT NULL,
FOREIGN KEY (`segment_id`) REFERENCES `nyx_highway_segments` (`segment_id`) ON DELETE CASCADE,
INDEX `idx_repair_segment` (`segment_id`),
INDEX `idx_repair_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 3. Seed major municipal highway transit corridors
INSERT INTO `nyx_highway_segments`
(`segment_id`, `highway_name`, `start_coords`, `end_coords`, `length_meters`, `quality_pct`, `total_heavy_axle_passages`, `status`)
VALUES
('seg_del_perro_fwy_1', 'Del Perro Freeway - Westbound Corridor', '{"x": -1200.0, "y": -800.0, "z": 15.0}', '{"x": 400.0, "y": -800.0, "z": 25.0}', 1600.00, 100.00, 0, 'OPTIMAL'),
('seg_la_puerta_fwy_1', 'La Puerta Freeway - Port Access Connector', '{"x": -200.0, "y": -2000.0, "z": 10.0}', '{"x": 400.0, "y": -1500.0, "z": 20.0}', 1200.00, 95.00, 12, 'OPTIMAL'),
('seg_palomino_fwy_1', 'Palomino Freeway - East Industrial Bypass', '{"x": 1200.0, "y": -1000.0, "z": 30.0}', '{"x": 2200.0, "y": 500.0, "z": 45.0}', 2500.00, 82.00, 48, 'OPTIMAL'),
('seg_senora_fwy_1', 'Senora Freeway - Desert Logistics Route', '{"x": 1500.0, "y": 2500.0, "z": 50.0}', '{"x": 2500.0, "y": 4500.0, "z": 60.0}', 3200.00, 68.00, 120, 'WEAR_WARNING')
ON DUPLICATE KEY UPDATE `highway_name` = VALUES(`highway_name`);

SET FOREIGN_KEY_CHECKS = 1;
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
-- ============================================================================
-- Nyxframework: nyx_vehicles, nyx_services & nyx_treasury
-- Migration: 067_highway_degradation_and_transit_repair.sql
-- Description: Commercial highway infrastructure degradation, heavy vehicle axle stress
-- pavement wear modeling, municipal road quality tracking, and
-- public works asphalt/resurfacing repair contracts.
-- Engine: InnoDB | Charset: utf8mb4 | Collation: utf8mb4_unicode_ci
-- ============================================================================

SET FOREIGN_KEY_CHECKS = 0;

-- 1. Create highway segments table
CREATE TABLE IF NOT EXISTS `nyx_highway_segments` (
`segment_id` VARCHAR(64) NOT NULL PRIMARY KEY,
`highway_name` VARCHAR(128) NOT NULL,
`start_coords` JSON NOT NULL,
`end_coords` JSON NOT NULL,
`length_meters` DECIMAL(10, 2) NOT NULL DEFAULT 1000.00,
`quality_pct` DECIMAL(5, 2) NOT NULL DEFAULT 100.00,
`total_heavy_axle_passages` INT UNSIGNED NOT NULL DEFAULT 0,
`status` ENUM('OPTIMAL', 'WEAR_WARNING', 'DEGRADED', 'CRITICAL') NOT NULL DEFAULT 'OPTIMAL',
`last_repaired_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
INDEX `idx_seg_highway` (`highway_name`),
INDEX `idx_seg_quality` (`quality_pct`),
INDEX `idx_seg_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 2. Create municipal road repair contracts table
CREATE TABLE IF NOT EXISTS `nyx_road_repair_contracts` (
`contract_id` VARCHAR(64) NOT NULL PRIMARY KEY,
`segment_id` VARCHAR(64) NOT NULL,
`required_asphalt_kg` DECIMAL(10, 2) NOT NULL DEFAULT 1000.00,
`treasury_payout` DECIMAL(10, 2) NOT NULL DEFAULT 2500.00,
`assigned_faction_id` VARCHAR(64) NULL DEFAULT NULL,
`status` ENUM('OPEN', 'IN_PROGRESS', 'COMPLETED', 'EXPIRED') NOT NULL DEFAULT 'OPEN',
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`completed_at` TIMESTAMP NULL DEFAULT NULL,
FOREIGN KEY (`segment_id`) REFERENCES `nyx_highway_segments` (`segment_id`) ON DELETE CASCADE,
INDEX `idx_repair_segment` (`segment_id`),
INDEX `idx_repair_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 3. Seed major municipal highway transit corridors
INSERT INTO `nyx_highway_segments`
(`segment_id`, `highway_name`, `start_coords`, `end_coords`, `length_meters`, `quality_pct`, `total_heavy_axle_passages`, `status`)
VALUES
('seg_del_perro_fwy_1', 'Del Perro Freeway - Westbound Corridor', '{"x": -1200.0, "y": -800.0, "z": 15.0}', '{"x": 400.0, "y": -800.0, "z": 25.0}', 1600.00, 100.00, 0, 'OPTIMAL'),
('seg_la_puerta_fwy_1', 'La Puerta Freeway - Port Access Connector', '{"x": -200.0, "y": -2000.0, "z": 10.0}', '{"x": 400.0, "y": -1500.0, "z": 20.0}', 1200.00, 95.00, 12, 'OPTIMAL'),
('seg_palomino_fwy_1', 'Palomino Freeway - East Industrial Bypass', '{"x": 1200.0, "y": -1000.0, "z": 30.0}', '{"x": 2200.0, "y": 500.0, "z": 45.0}', 2500.00, 82.00, 48, 'OPTIMAL'),
('seg_senora_fwy_1', 'Senora Freeway - Desert Logistics Route', '{"x": 1500.0, "y": 2500.0, "z": 50.0}', '{"x": 2500.0, "y": 4500.0, "z": 60.0}', 3200.00, 68.00, 120, 'WEAR_WARNING')
ON DUPLICATE KEY UPDATE `highway_name` = VALUES(`highway_name`);

SET FOREIGN_KEY_CHECKS = 1;
7 changes: 7 additions & 0 deletions FiveM/nyx_ui/web/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6634,6 +6634,13 @@ window.addEventListener('message', (event) => {
setPlacementActive(false);
}

// Highway Road Condition Telemetry
else if (action === 'updateHighwayRoadCondition' || action === 'HIGHWAY_ROAD_UPDATE') {
if (packet.data) {
NyxState.highwayRoadCondition = packet.data;
}
}

// HUD Telemetry
else if (action === 'HUD_UPDATE' || action === 'UPDATE_STATUS') {
updateHudStatus(packet.payload);
Expand Down
70 changes: 70 additions & 0 deletions FiveM/nyx_vehicles/client/road_degradation.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
--[[
Nyxframework: nyx_vehicles
File: client/road_degradation.lua
Description: Client-side spatial sampling for highway segments, dynamic vehicle handling/traction
degradation when driving on degraded road segments, and NUI event dispatching.
]]

Nyx = Nyx or {}
Nyx.Vehicles = Nyx.Vehicles or {}
Nyx.Vehicles.RoadDegradationClient = Nyx.Vehicles.RoadDegradationClient or {}

local currentSegmentId = nil
local currentHandlingModifier = { gripMultiplier = 1.0, suspensionWearMultiplier = 1.0, status = "OPTIMAL" }

-- Sample known highway segments
local SegmentCoords = {
{ id = "seg_del_perro_fwy_1", x = -400.0, y = -800.0, z = 20.0, radius = 500.0 },
{ id = "seg_la_puerta_fwy_1", x = 100.0, y = -1750.0, z = 15.0, radius = 400.0 },
{ id = "seg_palomino_fwy_1", x = 1700.0, y = -250.0, z = 35.0, radius = 600.0 },
{ id = "seg_senora_fwy_1", x = 2000.0, y = 3500.0, z = 55.0, radius = 800.0 },
}

CreateThread(function()
while true do
Wait(2000)
local ped = PlayerPedId()
if IsPedInAnyVehicle(ped, false) then
local veh = GetVehiclePedIsIn(ped, false)
if GetPedInVehicleSeat(veh, -1) == ped then
local pCoords = GetEntityCoords(veh)
local matched = nil

for _, seg in ipairs(SegmentCoords) do
local dist = #(pCoords - vector3(seg.x, seg.y, seg.z))
if dist <= seg.radius then
matched = seg.id
break
end
end

if matched ~= currentSegmentId then
currentSegmentId = matched
if currentSegmentId then
-- Query segment condition from server or trigger pass
TriggerServerEvent("nyx:vehicles:server:recordHighwayPass", currentSegmentId, 2500.0, 2)
end
end
end
else
currentSegmentId = nil
end
end
end)

RegisterNetEvent("nyx:vehicles:client:highwayPassRecorded", function(payload)
if not payload or not payload.success then return end
local eval = Nyx.Vehicles.RoadDegradation.CalculateHandlingPenalty(payload.newQuality)
currentHandlingModifier = eval

-- Send NUI notification for UI dashboard overlay
SendNUIMessage({
action = "updateHighwayRoadCondition",
data = {
segmentId = payload.segmentId,
qualityPct = payload.newQuality,
status = payload.status,
gripMultiplier = eval.gripMultiplier
}
})
end)
5 changes: 4 additions & 1 deletion FiveM/nyx_vehicles/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ shared_scripts {
'shared/diagnostics.lua',
'shared/fuel.lua',
'shared/keys.lua',
'shared/tolls_and_weighing.lua'
'shared/tolls_and_weighing.lua',
'shared/road_degradation.lua'
}

server_scripts {
Expand All @@ -35,6 +36,7 @@ server_scripts {
'server/diagnostics.lua',
'server/fuel.lua',
'server/tolls_and_weighing.lua',
'server/road_degradation.lua',
'server/spawner.lua',
'server/main.lua',
'server/exports.lua'
Expand All @@ -50,6 +52,7 @@ client_scripts {
'client/fuel.lua',
'client/speedometer.lua',
'client/tolls_and_weighing.lua',
'client/road_degradation.lua',
'client/main.lua',
'client/exports.lua'
}
Expand Down
17 changes: 17 additions & 0 deletions FiveM/nyx_vehicles/server/exports.lua
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,20 @@ end)
exports("CalculateOverweightFine", function(grossWeightKg, maxAllowedKg, baseFinePerExcessKg)
return Nyx.TollsAndWeighing.CalculateOverweightFine(grossWeightKg, maxAllowedKg, baseFinePerExcessKg)
end)

-- Highway Degradation & Transit Repairs
exports("RecordHighwayTransitPass", function(segmentId, grossWeightKg, axleCount)
return Nyx.Vehicles.RoadDegradationServer.RecordTransitPass(segmentId, grossWeightKg, axleCount)
end)

exports("GetHighwaySegmentCondition", function(segmentId)
return Nyx.Vehicles.RoadDegradationServer.GetSegmentCondition(segmentId)
end)

exports("SubmitRoadRepairBatch", function(segmentId, asphaltKg, factionId)
return Nyx.Vehicles.RoadDegradationServer.SubmitRoadRepair(segmentId, asphaltKg, factionId)
end)

exports("CalculateAxleDamageFactor", function(grossWeightKg, axleCount)
return Nyx.Vehicles.RoadDegradation.CalculateAxleDamageFactor(grossWeightKg, axleCount)
end)
Loading
Loading