Add LuaDoc @description to fuel API functions

Replaced comment blocks with LuaDoc @description tags for GetResourceName, GetFuel, and SetFuel functions across all fuel module client files. This improves code documentation consistency and supports better tooling integration.
This commit is contained in:
MrNewb committed 2025-10-12 21:54:52 -04:00
1 parent c73faa43db
commit a7b3a34998
14 files changed
+42 -56

No files matched your search

+3 -4
View File
@@ -2,14 +2,13 @@
Fuel = Fuel or {}
---Returns the name of the active fuel resource.
---If no supported resource is found, "default" will be returned.
---@description Returns the name of the active fuel resource.
---@return string
Fuel.GetResourceName = function()
return 'default'
end
---Returns the current fuel level of a vehicle.
---@description Returns the current fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@return number The vehicle fuel level.
Fuel.GetFuel = function(vehicle)
@@ -17,7 +16,7 @@ Fuel.GetFuel = function(vehicle)
return GetVehicleFuelLevel(vehicle)
end
---Sets the fuel level of a vehicle.
---@description Sets the fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@param fuel number The fuel level to assign.
---@param type? string The fuel type, used only in ti_fuel. (default: RON91)
+3 -4
View File
@@ -3,14 +3,13 @@ local resourceName = "BigDaddy-Fuel"
if GetResourceState(resourceName) == 'missing' then return end
Fuel = Fuel or {}
---Returns the name of the active fuel resource.
---If no supported resource is found, "default" will be returned.
---@description Returns the name of the active fuel resource.
---@return string
Fuel.GetResourceName = function()
return resourceName
end
---Returns the current fuel level of a vehicle.
---@description Returns the current fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@return number The vehicle fuel level.
Fuel.GetFuel = function(vehicle)
@@ -18,7 +17,7 @@ Fuel.GetFuel = function(vehicle)
return exports['BigDaddy-Fuel']:GetFuel(vehicle)
end
---Sets the fuel level of a vehicle.
---@description Sets the fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@param fuel number The fuel level to assign.
---@param type? string The fuel type, used only in ti_fuel. (default: RON91)
+3 -4
View File
@@ -3,14 +3,13 @@ local resourceName = "cdn-fuel"
if GetResourceState(resourceName) == 'missing' then return end
Fuel = Fuel or {}
---Returns the name of the active fuel resource.
---If no supported resource is found, "default" will be returned.
---@description Returns the name of the active fuel resource.
---@return string
Fuel.GetResourceName = function()
return resourceName
end
---Returns the current fuel level of a vehicle.
---@description Returns the current fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@return number The vehicle fuel level.
Fuel.GetFuel = function(vehicle)
@@ -18,7 +17,7 @@ Fuel.GetFuel = function(vehicle)
return exports['cdn-fuel']:GetFuel(vehicle)
end
---Sets the fuel level of a vehicle.
---@description Sets the fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@param fuel number The fuel level to assign.
---@param type? string The fuel type, used only in ti_fuel. (default: RON91)
+3 -4
View File
@@ -3,14 +3,13 @@ local resourceName = "esx-sna-fuel"
if GetResourceState(resourceName) == 'missing' then return end
Fuel = Fuel or {}
---Returns the name of the active fuel resource.
---If no supported resource is found, "default" will be returned.
---@description Returns the name of the active fuel resource.
---@return string
Fuel.GetResourceName = function()
return resourceName
end
---Returns the current fuel level of a vehicle.
---@description Returns the current fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@return number The vehicle fuel level.
Fuel.GetFuel = function(vehicle)
@@ -18,7 +17,7 @@ Fuel.GetFuel = function(vehicle)
return exports['esx-sna-fuel']:GetFuel(vehicle)
end
---Sets the fuel level of a vehicle.
---@description Sets the fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@param fuel number The fuel level to assign.
---@param type? string The fuel type, used only in ti_fuel. (default: RON91)
+3 -4
View File
@@ -3,14 +3,13 @@ local resourceName = "lc_fuel"
if GetResourceState(resourceName) == 'missing' then return end
Fuel = Fuel or {}
---Returns the name of the active fuel resource.
---If no supported resource is found, "default" will be returned.
---@description Returns the name of the active fuel resource.
---@return string
Fuel.GetResourceName = function()
return resourceName
end
---Returns the current fuel level of a vehicle.
---@description Returns the current fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@return number The vehicle fuel level.
Fuel.GetFuel = function(vehicle)
@@ -18,7 +17,7 @@ Fuel.GetFuel = function(vehicle)
return exports["lc_fuel"]:GetFuel(vehicle)
end
---Sets the fuel level of a vehicle.
---@description Sets the fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@param fuel number The fuel level to assign.
---@param type? string The fuel type, used only in ti_fuel. (default: RON91)
+3 -4
View File
@@ -4,14 +4,13 @@ if GetResourceState(resourceName) == 'missing' then return end
if GetResourceState("qb-fuel") == 'started' then return end
Fuel = Fuel or {}
---Returns the name of the active fuel resource.
---If no supported resource is found, "default" will be returned.
---@description Returns the name of the active fuel resource.
---@return string
Fuel.GetResourceName = function()
return resourceName
end
---Returns the current fuel level of a vehicle.
---@description Returns the current fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@return number The vehicle fuel level.
Fuel.GetFuel = function(vehicle)
@@ -19,7 +18,7 @@ Fuel.GetFuel = function(vehicle)
return exports['LegacyFuel']:GetFuel(vehicle)
end
---Sets the fuel level of a vehicle.
---@description Sets the fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@param fuel number The fuel level to assign.
---@param type? string The fuel type, used only in ti_fuel. (default: RON91)
+3 -4
View File
@@ -3,14 +3,13 @@ local resourceName = "okokGasStation"
if GetResourceState(resourceName) == 'missing' then return end
Fuel = Fuel or {}
---Returns the name of the active fuel resource.
---If no supported resource is found, "default" will be returned.
---@description Returns the name of the active fuel resource.
---@return string
Fuel.GetResourceName = function()
return resourceName
end
---Returns the current fuel level of a vehicle.
---@description Returns the current fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@return number The vehicle fuel level.
Fuel.GetFuel = function(vehicle)
@@ -18,7 +17,7 @@ Fuel.GetFuel = function(vehicle)
return exports['okokGasStation']:GetFuel(vehicle)
end
---Sets the fuel level of a vehicle.
---@description Sets the fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@param fuel number The fuel level to assign.
---@param type? string The fuel type, used only in ti_fuel. (default: RON91)
+3 -4
View File
@@ -3,14 +3,13 @@ local resourceName = "ox_fuel"
if GetResourceState(resourceName) == 'missing' then return end
Fuel = Fuel or {}
---Returns the name of the active fuel resource.
---If no supported resource is found, "default" will be returned.
---@description Returns the name of the active fuel resource.
---@return string
Fuel.GetResourceName = function()
return resourceName
end
---Returns the current fuel level of a vehicle.
---@description Returns the current fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@return number The vehicle fuel level.
Fuel.GetFuel = function(vehicle)
@@ -18,7 +17,7 @@ Fuel.GetFuel = function(vehicle)
return Entity(vehicle).state.fuel
end
---Sets the fuel level of a vehicle.
---@description Sets the fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@param fuel number The fuel level to assign.
---@param type? string The fuel type, used only in ti_fuel. (default: RON91)
+3 -4
View File
@@ -3,14 +3,13 @@ local resourceName = "ps-fuel"
if GetResourceState(resourceName) == 'missing' then return end
Fuel = Fuel or {}
---Returns the name of the active fuel resource.
---If no supported resource is found, "default" will be returned.
---@description Returns the name of the active fuel resource.
---@return string
Fuel.GetResourceName = function()
return resourceName
end
---Returns the current fuel level of a vehicle.
---@description Returns the current fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@return number The vehicle fuel level.
Fuel.GetFuel = function(vehicle)
@@ -18,7 +17,7 @@ Fuel.GetFuel = function(vehicle)
return exports["ps-fuel"]:GetFuel(vehicle)
end
---Sets the fuel level of a vehicle.
---@description Sets the fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@param fuel number The fuel level to assign.
---@param type? string The fuel type, used only in ti_fuel. (default: RON91)
+3 -4
View File
@@ -3,14 +3,13 @@ local resourceName = "qb-fuel"
if GetResourceState(resourceName) == 'missing' then return end
Fuel = Fuel or {}
---Returns the name of the active fuel resource.
---If no supported resource is found, "default" will be returned.
---@description Returns the name of the active fuel resource.
---@return string
Fuel.GetResourceName = function()
return resourceName
end
---Returns the current fuel level of a vehicle.
---@description Returns the current fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@return number The vehicle fuel level.
Fuel.GetFuel = function(vehicle)
@@ -18,7 +17,7 @@ Fuel.GetFuel = function(vehicle)
return exports['qb-fuel']:GetFuel(vehicle)
end
---Sets the fuel level of a vehicle.
---@description Sets the fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@param fuel number The fuel level to assign.
---@param type? string The fuel type, used only in ti_fuel. (default: RON91)
+3 -4
View File
@@ -3,14 +3,13 @@ local resourceName = "qs-fuelstations"
if GetResourceState(resourceName) == 'missing' then return end
Fuel = Fuel or {}
---Returns the name of the active fuel resource.
---If no supported resource is found, "default" will be returned.
---@description Returns the name of the active fuel resource.
---@return string
Fuel.GetResourceName = function()
return resourceName
end
---Returns the current fuel level of a vehicle.
---@description Returns the current fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@return number The vehicle fuel level.
Fuel.GetFuel = function(vehicle)
@@ -18,7 +17,7 @@ Fuel.GetFuel = function(vehicle)
return exports['qs-fuelstations']:GetFuel(vehicle)
end
---Sets the fuel level of a vehicle.
---@description Sets the fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@param fuel number The fuel level to assign.
---@param type? string The fuel type, used only in ti_fuel. (default: RON91)
+3 -4
View File
@@ -3,14 +3,13 @@ local resourceName = "Renewed-Fuel"
if GetResourceState(resourceName) == 'missing' then return end
Fuel = Fuel or {}
---Returns the name of the active fuel resource.
---If no supported resource is found, "default" will be returned.
---@description Returns the name of the active fuel resource.
---@return string
Fuel.GetResourceName = function()
return resourceName
end
---Returns the current fuel level of a vehicle.
---@description Returns the current fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@return number The vehicle fuel level.
Fuel.GetFuel = function(vehicle)
@@ -18,7 +17,7 @@ Fuel.GetFuel = function(vehicle)
return exports['Renewed-Fuel']:GetFuel(vehicle)
end
---Sets the fuel level of a vehicle.
---@description Sets the fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@param fuel number The fuel level to assign.
---@param type? string The fuel type, used only in ti_fuel. (default: RON91)
+3 -4
View File
@@ -3,14 +3,13 @@ local resourceName = "ti_fuel"
if GetResourceState(resourceName) == 'missing' then return end
Fuel = Fuel or {}
---Returns the name of the active fuel resource.
---If no supported resource is found, "default" will be returned.
---@description Returns the name of the active fuel resource.
---@return string
Fuel.GetResourceName = function()
return resourceName
end
---Returns the current fuel level of a vehicle.
---@description Returns the current fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@return number The vehicle fuel level.
Fuel.GetFuel = function(vehicle)
@@ -19,7 +18,7 @@ Fuel.GetFuel = function(vehicle)
return level
end
---Sets the fuel level of a vehicle.
---@description Sets the fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@param fuel number The fuel level to assign.
---@param type? string The fuel type, used only in ti_fuel. (default: RON91)
+3 -4
View File
@@ -3,14 +3,13 @@ local resourceName = "x-fuel"
if GetResourceState(resourceName) == 'missing' then return end
Fuel = Fuel or {}
---Returns the name of the active fuel resource.
---If no supported resource is found, "default" will be returned.
---@description Returns the name of the active fuel resource.
---@return string
Fuel.GetResourceName = function()
return resourceName
end
---Returns the current fuel level of a vehicle.
---@description Returns the current fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@return number The vehicle fuel level.
Fuel.GetFuel = function(vehicle)
@@ -19,7 +18,7 @@ Fuel.GetFuel = function(vehicle)
return level
end
---Sets the fuel level of a vehicle.
---@description Sets the fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@param fuel number The fuel level to assign.
---@param type? string The fuel type, used only in ti_fuel. (default: RON91)