API ReferenceGE Extensionscareermodulesinsurance
Repair Screen
M.dependencies = {'career_modules_valueCalculator', 'career_modules_inventory', 'career_modules_playerAttributes', 'career_modules_payment', 'career_modules_insurance_insurance'}
Dependencies
M.dependencies = {'career_modules_valueCalculator', 'career_modules_inventory', 'career_modules_playerAttributes', 'career_modules_payment', 'career_modules_insurance_insurance'}Prepares repair screen data for the UI. Separates data formatting from the main insurance module, building structured repair options for both insured and uninsured repair paths.
Public API
| Function | Signature | Description |
|---|---|---|
M.getRepairData | () → table | Builds complete repair screen data with options, costs, and vehicle info |
M.openRepairMenu | (vehicle, originComputerId) | Opens the repair UI state for a vehicle |
M.closeRepairMenu | () | Returns to computer menu or closes all menus |
M.closeMenu | () | Alias for closeRepairMenu |
M.startRepairInGarage | (invVehId, repairOptionData) | Closes menu and delegates to insurance.startRepairInGarage |
Hook Handlers
| Hook | Purpose |
|---|---|
M.onComputerAddFunctions | Adds "Repair" button per vehicle in garage computer |
Repair Data Structure
{
repairOptions = {
noInsuranceRepairData = {
repairTimeOptions = { -- 4 choices: Instant/2min/5min/10min
choices = {{id=1, value=0, premiumInfluence=500, choiceText="Instant"}, ...}
},
useInsurance = false,
},
insuranceRepairData = { -- nil if uninsured
repairTimeOptions = {}, -- from coverage option
useInsurance = true,
renewsIn = 85,
insuranceName = "SafeDrive",
currentPremium = 1200,
futurePremium = 1350, -- premium after this claim
deductible = 250,
accidentForgivenesses = 2,
},
},
vehicleData = {
damageCost = 1500,
name = "Covet DXi",
invVehId = 3,
isInsured = true,
needsRepair = true,
},
driverScore = 64,
futureDriverScore = 63, -- score after this claim
}No-Insurance Repair Time Options
| Choice | Wait Time | Extra Cost |
|---|---|---|
| Instant | 0s | $500 + damage |
| 2 min | 120s | $350 + damage |
| 5 min | 300s | $150 + damage |
| 10 min | 600s | $50 + damage |