Add GetResourceName function to all modules

Introduces a standardized GetResourceName function to banking, clothing, dispatch, doorlock, framework, fuel, helptext, housing, and other modules. This function returns the name of the in-use resource, improving resource identification and interoperability across the codebase.
This commit is contained in:
MrNewb committed 2025-09-10 12:27:12 -04:00
1 parent cd16291038
commit 90c65dc55e
142 files changed
+784 -25

No files matched your search

+6
View File
@@ -10,4 +10,10 @@ Doorlock.ToggleDoorLock = function(doorID, toggle)
return true
end
---This will get the name of the in use resource.
---@return string
Doorlock.GetResourceName = function()
return 'default'
end
return Doorlock
@@ -9,4 +9,10 @@ Doorlock.GetClosestDoor = function()
return exports["doors_creator"]:getClosestActiveDoor()
end
---This will get the name of the in use resource.
---@return string
Doorlock.GetResourceName = function()
return 'doors_creator'
end
return Doorlock
@@ -18,4 +18,10 @@ Doorlock.ToggleDoorLock = function(doorID, toggle)
return true
end
---This will get the name of the in use resource.
---@return string
Doorlock.GetResourceName = function()
return 'doors_creator'
end
return Doorlock
+6
View File
@@ -11,4 +11,10 @@ Doorlock.GetClosestDoor = function()
return tostring(doorData.id) or nil
end
---This will get the name of the in use resource.
---@return string
Doorlock.GetResourceName = function()
return 'ox_doorlock'
end
return Doorlock
+6
View File
@@ -20,4 +20,10 @@ Doorlock.ToggleDoorLock = function(doorID, toggle)
return true
end
---This will get the name of the in use resource.
---@return string
Doorlock.GetResourceName = function()
return 'ox_doorlock'
end
return Doorlock
+6
View File
@@ -23,4 +23,10 @@ Doorlock.GetClosestDoor = function()
return door
end
---This will get the name of the in use resource.
---@return string
Doorlock.GetResourceName = function()
return 'qb-doorlock'
end
return Doorlock
+6
View File
@@ -12,4 +12,10 @@ Doorlock.ToggleDoorLock = function(doorID, toggle)
return true
end
---This will get the name of the in use resource.
---@return string
Doorlock.GetResourceName = function()
return 'qb-doorlock'
end
return Doorlock
@@ -21,4 +21,10 @@ Doorlock.GetClosestDoor = function()
return door
end
---This will get the name of the in use resource.
---@return string
Doorlock.GetResourceName = function()
return 'rcore_doorlock'
end
return Doorlock
@@ -16,4 +16,11 @@ Doorlock.ToggleDoorLock = function(doorID, toggle)
end
return true
end
---This will get the name of the in use resource.
---@return string
Doorlock.GetResourceName = function()
return 'rcore_doorlock'
end
return Doorlock