Skip to content

Commit

Permalink
fix(init): allow script files to load when people fuck their load order
Browse files Browse the repository at this point in the history
People like to start dependencies after their dependents for some reason.
In the case of q/ox_target it should just disable integration, rather
than preventing the resource from loading.

This will, naturally, lead to them asking why targeting doesn't work until
they restart the inventory.
  • Loading branch information
thelindat committed Apr 2, 2023
1 parent 2b702b9 commit 4bedfa9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ if shared.target then

if not ox_target and not qtarget then
shared.target = false
return warn('targeting resource is not loaded - it should start before ox_inventory')
warn('targeting resource is not loaded - it should start before ox_inventory')
else
shared.target = ox_target and 'ox_target' or 'qtarget'
end

shared.target = ox_target and 'ox_target' or 'qtarget'
end

if lib.context == 'server' then
Expand Down

0 comments on commit 4bedfa9

Please sign in to comment.