mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-09-04 09:13:29 +00:00
Merge branch 'main' into patch-1
This commit is contained in:
+2
-1
@@ -380,7 +380,8 @@ QBShared.Items = {
|
||||
['dendrogyra_coral'] = {['name'] = 'dendrogyra_coral', ['label'] = 'Dendrogyra', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'dendrogyra_coral.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Its also known as pillar coral'},
|
||||
['antipatharia_coral'] = {['name'] = 'antipatharia_coral', ['label'] = 'Antipatharia', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'antipatharia_coral.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Its also known as black corals or thorn corals'},
|
||||
['diving_gear'] = {['name'] = 'diving_gear', ['label'] = 'Diving Gear', ['weight'] = 30000, ['type'] = 'item', ['image'] = 'diving_gear.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'An oxygen tank and a rebreather'},
|
||||
|
||||
['diving_fill'] = {['name'] = 'diving_fill', ['label'] = 'Diving Tube', ['weight'] = 3000, ['type'] = 'item', ['image'] = 'diving_tube.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['discription'] = 'An oxygen tube and a rebreather'},
|
||||
|
||||
-- Other Tools
|
||||
['casinochips'] = {['name'] = 'casinochips', ['label'] = 'Casino Chips', ['weight'] = 0, ['type'] = 'item', ['image'] = 'casinochips.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = 'Chips For Casino Gambling'},
|
||||
['stickynote'] = {['name'] = 'stickynote', ['label'] = 'Sticky note', ['weight'] = 0, ['type'] = 'item', ['image'] = 'stickynote.png', ['unique'] = true, ['useable'] = false, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = 'Sometimes handy to remember something :)'},
|
||||
|
||||
+10
-1
@@ -32,7 +32,13 @@ end
|
||||
--- @return Locale
|
||||
function Locale:new(opts)
|
||||
setmetatable(self, Locale)
|
||||
self.warnOnMissing = opts.warnOnMissing or true
|
||||
|
||||
self.fallback = opts.fallbackLang and Locale.new({}, {
|
||||
warnOnMissing = false,
|
||||
phrases = opts.fallbackLang.phrases,
|
||||
}) or false
|
||||
|
||||
self.warnOnMissing = type(opts.warnOnMissing) ~= 'boolean' and true or opts.warnOnMissing
|
||||
|
||||
self.phrases = {}
|
||||
self:extend(opts.phrases or {})
|
||||
@@ -98,6 +104,9 @@ function Locale:t(key, subs)
|
||||
if self.warnOnMissing then
|
||||
print(('^3Warning: Missing phrase for key: "%s"'):format(key))
|
||||
end
|
||||
if self.fallback then
|
||||
return self.fallback:t(key, subs)
|
||||
end
|
||||
result = key
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user