Merge pull request #684 from Taavi-AU/main

fix for spawning unlimited job vehicles
This commit is contained in:
Benzo
2022-11-20 16:41:17 +01:00
committed by GitHub
2 changed files with 6 additions and 6 deletions
@@ -50,9 +50,9 @@ function OpenVehicleSpawnerMenu(type, hospital, part, partNum)
local vehicleName = GetLabelText(GetDisplayNameFromVehicleModel(props.model))
local label = ('%s - <span style="color:darkgoldenrod;">%s</span>: '):format(vehicleName, props.plate)
if v.stored then
if v.stored == 1 then
label = label .. ('<span style="color:green;">%s</span>'):format(TranslateCap('garage_stored'))
else
elseif v.stored == 0 then
label = label .. ('<span style="color:darkred;">%s</span>'):format(TranslateCap('garage_notstored'))
end
@@ -73,7 +73,7 @@ function OpenVehicleSpawnerMenu(type, hospital, part, partNum)
align = 'top-left',
elements = garage
}, function(data2, menu2)
if data2.current.stored then
if data2.current.stored == 1 then
local foundSpawn, spawnPoint = GetAvailableVehicleSpawnPoint(hospital, part, partNum)
if foundSpawn then
@@ -59,9 +59,9 @@ function OpenVehicleSpawnerMenu(type, station, part, partNum)
local vehicleName = GetLabelText(GetDisplayNameFromVehicleModel(props.model))
local label = ('%s - <span style="color:darkgoldenrod;">%s</span>: '):format(vehicleName, props.plate)
if v.stored then
if v.stored == 1 then
label = label .. ('<span style="color:green;">%s</span>'):format(TranslateCap('garage_stored'))
else
elseif v.stored == 0 then
label = label .. ('<span style="color:darkred;">%s</span>'):format(TranslateCap('garage_notstored'))
end
@@ -82,7 +82,7 @@ function OpenVehicleSpawnerMenu(type, station, part, partNum)
align = 'top-left',
elements = garage
}, function(data2, menu2)
if data2.current.stored then
if data2.current.stored == 1 then
local foundSpawn, spawnPoint = GetAvailableVehicleSpawnPoint(station, part, partNum)
if foundSpawn then