From 9accf0f8e57a79c14bb909d77bc09faae78953e2 Mon Sep 17 00:00:00 2001 From: Tilltheprogamer <118006357+Tilltheprogamer@users.noreply.github.com> Date: Sat, 22 Feb 2025 15:02:40 +0100 Subject: [PATCH 01/13] Update shops.lua allowed renameing of the resource without breaking the internal exports. --- client/shops.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/shops.lua b/client/shops.lua index e4d74d0..5ccd452 100644 --- a/client/shops.lua +++ b/client/shops.lua @@ -4,7 +4,12 @@ local client = require 'config.client' local icons = require 'config.icons' -- Localize export -local mining = exports.lation_mining + +-- local mining = exports.lation_mining + +-- allow rename of resource without breaking +local ResourceName = GetCurrentResourceName() +local mining = exports[ResourceName] -- Initialize table to store shop(s) data -- .items, .zone, .ped @@ -320,4 +325,4 @@ AddEventHandler('lation_mining:onPlayerLoaded', function() createBlip(shared.shops.location, shared.shops.blip) createShop() createZone() -end) \ No newline at end of file +end) From 40004c3790370c4e1366fffb0cf64f965b872d57 Mon Sep 17 00:00:00 2001 From: Tilltheprogamer <118006357+Tilltheprogamer@users.noreply.github.com> Date: Sat, 22 Feb 2025 15:04:33 +0100 Subject: [PATCH 02/13] Update mining.lua allowed the renameing of the resource without breaking of the internal exports. --- client/mining.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/mining.lua b/client/mining.lua index 7ab3b0e..b26ce78 100644 --- a/client/mining.lua +++ b/client/mining.lua @@ -10,7 +10,12 @@ local ores = {} local inside = false -- Localize export -local mining = exports.lation_mining + +-- local mining = exports.lation_mining + +-- allow rename of resource without breaking +local ResourceName = GetCurrentResourceName() +local mining = exports[ResourceName] -- Mine an ore --- @param zoneId number @@ -180,4 +185,4 @@ AddEventHandler('onResourceStop', function(resourceName) end ores[zoneId] = nil end -end) \ No newline at end of file +end) From 573cfad2397ab13910bfeee65f539498eb7c95e3 Mon Sep 17 00:00:00 2001 From: Tilltheprogamer <118006357+Tilltheprogamer@users.noreply.github.com> Date: Sat, 22 Feb 2025 15:05:19 +0100 Subject: [PATCH 03/13] 2.0.1 --- client/smelting.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/smelting.lua b/client/smelting.lua index 55a0021..f2c40ca 100644 --- a/client/smelting.lua +++ b/client/smelting.lua @@ -4,7 +4,12 @@ local client = require 'config.client' local icons = require 'config.icons' -- Localize export -local mining = exports.lation_mining + +-- local mining = exports.lation_mining + +-- allow rename of resource without breaking +local ResourceName = GetCurrentResourceName() +local mining = exports[ResourceName] -- Initialize table to store smelting menu local menu = {} @@ -173,4 +178,4 @@ AddEventHandler('lation_mining:onPlayerLoaded', function() }) buildMenu() createBlip(shared.smelting.coords, shared.smelting.blip) -end) \ No newline at end of file +end) From bf0ad401a3378c7447454eb0cb62849be538ab99 Mon Sep 17 00:00:00 2001 From: Tilltheprogamer <118006357+Tilltheprogamer@users.noreply.github.com> Date: Sat, 22 Feb 2025 15:06:29 +0100 Subject: [PATCH 04/13] 2.0.1 --- client/shops.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/client/shops.lua b/client/shops.lua index 5ccd452..70221a8 100644 --- a/client/shops.lua +++ b/client/shops.lua @@ -3,10 +3,6 @@ local shared = require 'config.shared' local client = require 'config.client' local icons = require 'config.icons' --- Localize export - --- local mining = exports.lation_mining - -- allow rename of resource without breaking local ResourceName = GetCurrentResourceName() local mining = exports[ResourceName] From 922ebbce0737f07cd641038810aa6fefdd809b69 Mon Sep 17 00:00:00 2001 From: Tilltheprogamer <118006357+Tilltheprogamer@users.noreply.github.com> Date: Sat, 22 Feb 2025 15:06:56 +0100 Subject: [PATCH 05/13] 2.0.1 --- client/mining.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/client/mining.lua b/client/mining.lua index b26ce78..73ff4e3 100644 --- a/client/mining.lua +++ b/client/mining.lua @@ -9,10 +9,6 @@ local ores = {} -- Initialize variable to store inside mine state local inside = false --- Localize export - --- local mining = exports.lation_mining - -- allow rename of resource without breaking local ResourceName = GetCurrentResourceName() local mining = exports[ResourceName] From 59693ea433c6cd8a4e95389c67a719bf3d3f26c2 Mon Sep 17 00:00:00 2001 From: Tilltheprogamer <118006357+Tilltheprogamer@users.noreply.github.com> Date: Sat, 22 Feb 2025 15:07:41 +0100 Subject: [PATCH 06/13] 2.0.1 --- server/mining.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/mining.lua b/server/mining.lua index b67ad1f..9ef5d2e 100644 --- a/server/mining.lua +++ b/server/mining.lua @@ -2,8 +2,9 @@ local shared = require 'config.shared' local server = require 'config.server' --- Localize export -local mining = exports.lation_mining +-- allow rename of resource without breaking +local ResourceName = GetCurrentResourceName() +local mining = exports[ResourceName] -- Initialize table to store ore data local ores = {} @@ -98,4 +99,4 @@ CreateThread(function() Wait(10000) end end -end) \ No newline at end of file +end) From 0eb25677f45d6d44ce763e9ae6f4564df5a0ac9b Mon Sep 17 00:00:00 2001 From: Tilltheprogamer <118006357+Tilltheprogamer@users.noreply.github.com> Date: Sat, 22 Feb 2025 15:08:13 +0100 Subject: [PATCH 07/13] 2.0.1 --- server/shops.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/shops.lua b/server/shops.lua index fd1400a..669202d 100644 --- a/server/shops.lua +++ b/server/shops.lua @@ -2,8 +2,9 @@ local shared = require 'config.shared' local server = require 'config.server' --- Localize export -local mining = exports.lation_mining +-- allow rename of resource without breaking +local ResourceName = GetCurrentResourceName() +local mining = exports[ResourceName] -- Complete a purchase from The Mines shop --- @param itemId number @@ -94,4 +95,4 @@ RegisterNetEvent('lation_mining:completesale', function(itemId, input) if server.logs.events.pawned then PlayerLog(source, locale('logs.pawned-title'), locale('logs.pawned-message', name, identifier, input, item.item)) end -end) \ No newline at end of file +end) From 3f9c6ba893bd20b509274c33943e8635122f7fba Mon Sep 17 00:00:00 2001 From: Tilltheprogamer <118006357+Tilltheprogamer@users.noreply.github.com> Date: Sat, 22 Feb 2025 15:08:37 +0100 Subject: [PATCH 08/13] 2.0.1 --- server/smelting.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/smelting.lua b/server/smelting.lua index c7674d6..f713e86 100644 --- a/server/smelting.lua +++ b/server/smelting.lua @@ -2,8 +2,9 @@ local shared = require 'config.shared' local server = require 'config.server' --- Localize export -local mining = exports.lation_mining +-- allow rename of resource without breaking +local ResourceName = GetCurrentResourceName() +local mining = exports[ResourceName] -- Initialize table to store players local players = {} @@ -70,4 +71,4 @@ RegisterNetEvent('lation_mining:completesmelt', function(ingotId) if server.logs.events.smelted then PlayerLog(source, locale('logs.smelted-title'), locale('logs.smelted-message', name, identifier, 1, ingot.name)) end -end) \ No newline at end of file +end) From b3d01f7524afefd6dec47e9863bd7a130cc0b83b Mon Sep 17 00:00:00 2001 From: Tilltheprogamer <118006357+Tilltheprogamer@users.noreply.github.com> Date: Sat, 22 Feb 2025 15:11:32 +0100 Subject: [PATCH 09/13] 1.0.0 Added german locale. --- locales/de.json | 80 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 locales/de.json diff --git a/locales/de.json b/locales/de.json new file mode 100644 index 0000000..c362990 --- /dev/null +++ b/locales/de.json @@ -0,0 +1,80 @@ +{ + "notify": { + "missing-item": "Mir fehlt etwas, um das zu tun", + "not-experienced": "Ich glaube, ich bin nicht erfahren genug, um das zu tun", + "missing-pickaxe": "Ich brauche eine Spitzhacke, die ich tatsächlich benutzen kann", + "pickaxe-no-durability": "Meine Spitzhacke ist in einem schrecklichen Zustand...", + "nighttime": "Ich glaube nicht, dass ich nachts abbauen darf", + "no-money": "Du hast nicht genug Geld", + "no-item": "Du hast nicht genug von diesem Gegenstand", + "cant-carry": "Du kannst nicht so viel tragen", + "max-ingots": "Du kannst maximal %s Barren auf einmal schmelzen" + }, + "target": { + "mine-ore": "Abbauen", + "mine-shop": "Sprechen", + "smelt-ore": "Schmelzen" + }, + "textui": { + "smelt": "Schmelzen (%s/%s) - %s%%" + }, + "inputs": { + "label": "Menge", + "desc": "Wie viele?" + }, + "player-data": { + "level-title": "Bergbau | Level %s/%s", + "level-desc": "Du hast derzeit %sXP", + "stats-title": "Lebenslange Statistiken", + "stats-desc": "Sieh dir deine gesamten Bergbaustatistiken an", + "meta-next-level": "Nächstes Level", + "meta-remainder": "Verbleibend", + "meta-maxed-level": "Maximales Level erreicht" + }, + "stats-menu": { + "main-title": "Lebenslange Statistiken", + "mined-title": "Abgebaut", + "mined-desc": "Du hast insgesamt %s Erze abgebaut", + "smelted-title": "Geschmolzen", + "smelted-desc": "Du hast insgesamt %s Barren geschmolzen", + "earned-title": "Verdient", + "earned-desc": "Du hast insgesamt $%s verdient" + }, + "mine-menu": { + "main-title": "Die Minen", + "leaderboards-title": "Bestenliste", + "leaderboards-desc": "Sieh dir die Top 10 Bergarbeiter an", + "shop-title": "Der Laden", + "shop-desc": "Kaufe hier deine Bergbauausrüstung", + "pawn-title": "Pfandleihe", + "pawn-desc": "Verkaufe deine Erze & mehr für einen Gewinn" + }, + "shop-menu": { + "main-title": "Die Minen: Laden", + "pickaxe-title": "%s | Level %s", + "item-desc": "Kaufe %s für $%s" + }, + "pawn-menu": { + "main-title": "Die Minen: Pfandleihe", + "item-title": "Verkaufe %s", + "item-desc": "Verkaufe %s für $%s" + }, + "leaderboard-menu": { + "main-title": "Die Minen: Bestenliste", + "player-desc": "Level: %s | XP: %s | Insgesamt abgebaut: %s" + }, + "smelt-menu": { + "main-title": "Schmelzen", + "ingot-desc": "Benötigt %s" + }, + "logs": { + "mined-title": "Erz abgebaut", + "mined-message": "%s (Kennung: %s) hat einen Felsen für %s abgebaut", + "smelted-title": "Barren geschmolzen", + "smelted-message": "%s (Kennung: %s) hat x%d %s geschmolzen", + "purchased-title": "Ladenkauf", + "purchased-message": "%s (Kennung: %s) hat x%d %s gekauft", + "pawned-title": "Pfandleihe Verkauf", + "pawned-message": "%s (Kennung: %s) hat x%d %s verkauft" + } +} From 8ec2465afd7548fdeb5b64c54dfd2ef29735fc51 Mon Sep 17 00:00:00 2001 From: Tilltheprogamer <118006357+Tilltheprogamer@users.noreply.github.com> Date: Sat, 22 Feb 2025 15:21:58 +0100 Subject: [PATCH 10/13] 2.0.1 --- client/shops.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/shops.lua b/client/shops.lua index 70221a8..247c48f 100644 --- a/client/shops.lua +++ b/client/shops.lua @@ -197,7 +197,7 @@ local function createShop() description = locale('shop-menu.item-desc', itemData.label, math.groupdigits(data.price)), icon = data.icon or 'fas fa-triangle-exclamation', iconColor = data.iconColor or '', - image = isPick and 'nui://lation_mining/install/images/'..data.item..'.png' or nil, + image = isPick and 'nui://'..ResourceName..'/install/images/'..data.item..'.png' or nil, event = 'lation_mining:shops:selectquantity', args = id } From 788846fe963c7467ce309ace098a6e7dda03dc37 Mon Sep 17 00:00:00 2001 From: Tilltheprogamer <118006357+Tilltheprogamer@users.noreply.github.com> Date: Sat, 22 Feb 2025 17:22:24 +0100 Subject: [PATCH 11/13] 2.0.3 Better animation for the mining --- config/client.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/client.lua b/config/client.lua index d30d9d9..97e9ef0 100644 --- a/config/client.lua +++ b/config/client.lua @@ -11,8 +11,8 @@ return { useWhileDead = false, canCancel = true, disable = { car = true, move = true, combat = true }, - anim = { dict = 'melee@hatchet@streamed_core', clip = 'plyr_rear_takedown_b', flag = 1 }, - prop = { bone = 28422, model = 'prop_tool_pickaxe', pos = vec3(0.09, -0.05, -0.02), rot = vec3(-78.0, 13.0, 28.0) } + anim = { dict = 'amb@world_human_hammering@male@base', clip = 'base', flag = 1 }, + prop = { bone = 57005, model = 'prop_tool_pickaxe', pos = vec3(0.10, -0.25, 0.0), rot = vec3(90.0, 0.0, 180.0) } }, smelting = { scenario = 'WORLD_HUMAN_STAND_FIRE' @@ -40,4 +40,4 @@ return { -- It is only updated on server restarts & player logouts leaderboard = true -} \ No newline at end of file +} From 75c1b7c37ce3eb620025a5ae00c84e7f6758ca03 Mon Sep 17 00:00:00 2001 From: Tilltheprogamer <118006357+Tilltheprogamer@users.noreply.github.com> Date: Sat, 22 Feb 2025 17:48:50 +0100 Subject: [PATCH 12/13] 2.0.4 --- client/functions.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/functions.lua b/client/functions.lua index 959a7e7..b0bae74 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -10,7 +10,7 @@ local textui = 'ox_lib' --- @param type string function ShowNotification(message, type) if shared.setup.notify == 'ox_lib' then - lib.notify({ description = message, type = type, position = 'top', icon = 'fas fa-fire' }) + lib.notify({ description = message, type = type, position = shared.setup.oxlibposition, icon = 'fas fa-fire' }) elseif shared.setup.notify == 'esx' then ESX.ShowNotification(message) elseif shared.setup.notify == 'qb' then @@ -239,4 +239,4 @@ function SpawnPed(model, position) SetBlockingOfNonTemporaryEvents(ped, true) SetEntityInvincible(ped, true) return ped -end \ No newline at end of file +end From 36c2c622d4e1ed7194c85aaf208c250db25f6354 Mon Sep 17 00:00:00 2001 From: Tilltheprogamer <118006357+Tilltheprogamer@users.noreply.github.com> Date: Sat, 22 Feb 2025 17:50:34 +0100 Subject: [PATCH 13/13] 2.0.4 --- config/shared.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/shared.lua b/config/shared.lua index a7aa80c..a642331 100644 --- a/config/shared.lua +++ b/config/shared.lua @@ -26,7 +26,9 @@ return { -- Set your notification system below -- Available options are: 'ox_lib', 'esx', 'qb', 'okok', 'sd-notify', 'wasabi_notify' & 'custom' -- 'custom' needs to be added to client/functions.lua + -- only change oxlibposition when you use ox_lib as notify system. notify = 'ox_lib', + oxlibposition = 'center-right', -- Set your progress bar system below -- Available options are: 'ox_lib', 'qbcore' & 'custom' -- 'custom' needs to be added to client/functions.lua @@ -371,4 +373,4 @@ return { } -} \ No newline at end of file +}