From 394af6f372874e7c0d6511ceed6bfecd9167e97f Mon Sep 17 00:00:00 2001 From: bitpredator <67551273+bitpredator@users.noreply.github.com> Date: Mon, 29 Jan 2024 18:45:11 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Run=20formatter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .editorconfig | 10 + .../[bpt_addons]/bpt_crafting/config.lua | 188 +++++++++--------- .../[bpt_addons]/bpt_crafting/fxmanifest.lua | 50 ++--- .../[bpt_addons]/bpt_crafting/locales/en.lua | 16 +- .../[bpt_addons]/bpt_crafting/locales/it.lua | 16 +- 5 files changed, 145 insertions(+), 135 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..383d3ca5e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 +trim_trailing_whitespace = true +max_line_length = 300 +indent_size = 4 +indent_style = space \ No newline at end of file diff --git a/server-data/resources/[bpt_addons]/bpt_crafting/config.lua b/server-data/resources/[bpt_addons]/bpt_crafting/config.lua index f1a3ca1ba..ad8e41fe8 100644 --- a/server-data/resources/[bpt_addons]/bpt_crafting/config.lua +++ b/server-data/resources/[bpt_addons]/bpt_crafting/config.lua @@ -1,121 +1,121 @@ Config = { -UseLimitSystem = false, -- Enable if your esx uses limit system -CraftingStopWithDistance = false, -- Crafting will stop when not near workbench -ExperiancePerCraft = 5, -- The amount of experiance added per craft (100 Experiance is 1 level) -HideWhenCantCraft = false, -- Instead of lowering the opacity it hides the item that is not craftable due to low level or wrong job + UseLimitSystem = false, -- Enable if your esx uses limit system + CraftingStopWithDistance = false, -- Crafting will stop when not near workbench + ExperiancePerCraft = 5, -- The amount of experiance added per craft (100 Experiance is 1 level) + HideWhenCantCraft = false, -- Instead of lowering the opacity it hides the item that is not craftable due to low level or wrong job -Categories = { - ['medical'] = { - Label = 'Ospedale', - Image = 'bandage', - Jobs = {'ambulance'} + Categories = { + ["medical"] = { + Label = "Ospedale", + Image = "bandage", + Jobs = { "ambulance" }, + }, + ["import"] = { + Label = "Import", + Image = "Import", + Jobs = { "import" }, + }, + ["mechanic"] = { + Label = "Meccanico", + Image = "Mechanic", + Jobs = { "mechanic" }, + }, + ["ammu"] = { + Label = "Armeria", + Image = "ammu", + Jobs = { "ammu" }, + }, + ["unicorn"] = { + Label = "Unicorn", + Image = "unicorn", + Jobs = { "unicorn" }, + }, + ["dustman"] = { + Label = "Dustman", + Image = "dustman", + Jobs = { "dustman" }, + }, + ["ballas"] = { + Label = "Ballas", + Image = "ballas", + Jobs = { "ballas" }, + }, + ["baker"] = { + Label = "Baker", + Image = "baker", + Jobs = { "baker" }, + }, + ["fisherman"] = { + Label = "fisherman", + Image = "fisherman", + Jobs = { "fisherman" }, + }, }, - ['import'] = { - Label = 'Import', - Image = 'Import', - Jobs = {'import'} - }, - ['mechanic'] = { - Label = 'Meccanico', - Image = 'Mechanic', - Jobs = {'mechanic'} - }, - ['ammu'] = { - Label = 'Armeria', - Image = 'ammu', - Jobs = {'ammu'} - }, - ['unicorn'] = { - Label = 'Unicorn', - Image = 'unicorn', - Jobs = {'unicorn'} - }, - ['dustman'] = { - Label = 'Dustman', - Image = 'dustman', - Jobs = {'dustman'} - }, - ['ballas'] = { - Label = 'Ballas', - Image = 'ballas', - Jobs = {'ballas'} - }, - ['baker'] = { - Label = 'Baker', - Image = 'baker', - Jobs = {'baker'} - }, - ['fisherman'] = { - Label = 'fisherman', - Image = 'fisherman', - Jobs = {'fisherman'} - }, -}, -PermanentItems = { -- Items that dont get removed when crafting - ['wrench'] = true + PermanentItems = { -- Items that dont get removed when crafting + ["wrench"] = true, }, Recipes = { -- Enter Item name and then the speed value! The higher the value the more torque -['bandage'] = { +["bandage"] = { Level = 0, - Category = 'medical', + Category = "medical", isGun = false, - Jobs = {'ambulance'}, + Jobs = { "ambulance" }, JobGrades = {}, Amount = 1, SuccessRate = 100, requireBlueprint = false, Time = 20, Ingredients = { - ['cottonforbandages'] = 2 - } + ["cottonforbandages"] = 2, + }, }, -['cottonforbandages'] = { - Level = 0, -- From what level this item will be craftable - Category = 'import', -- The category item will be put in - isGun = false, -- Specify if this is a gun so it will be added to the loadout - Jobs = {'import'}, -- What jobs can craft this item, leaving {} allows any job - JobGrades = {}, -- What job grades can craft this item, leaving {} allows any grade - Amount = 1, -- The amount that will be crafted - SuccessRate = 100, -- 100% you will recieve the item - requireBlueprint = false, -- Requires a blueprint whitch you need to add in the database yourself TEMPLATE: itemname_blueprint EXAMPLE: bandage_blueprint - Time = 20, -- Time in seconds it takes to craft this item +["cottonforbandages"] = { + Level = 0, -- From what level this item will be craftable + Category = "import", -- The category item will be put in + isGun = false, -- Specify if this is a gun so it will be added to the loadout + Jobs = { "import" }, -- What jobs can craft this item, leaving {} allows any job + JobGrades = {}, -- What job grades can craft this item, leaving {} allows any grade + Amount = 1, -- The amount that will be crafted + SuccessRate = 100, -- 100% you will recieve the item + requireBlueprint = false, -- Requires a blueprint whitch you need to add in the database yourself TEMPLATE: itemname_blueprint EXAMPLE: bandage_blueprint + Time = 20, -- Time in seconds it takes to craft this item Ingredients = { -- Ingredients needed to craft this item - ['cotton'] = 4 -- item name and count, adding items that dont exist in database will crash the script - } + ["cotton"] = 4, -- item name and count, adding items that dont exist in database will crash the script +}, }, -['ironsheet'] = { - Level = 0, - Category = 'dustman', - isGun = false, - Jobs = {'dustman'}, - JobGrades = {}, - Amount = 2, - SuccessRate = 100, - requireBlueprint = false, - Time = 60, +["ironsheet"] = { + Level = 0, + Category = "dustman", + isGun = false, + Jobs = { "dustman" }, + JobGrades = {}, + Amount = 2, + SuccessRate = 100, + requireBlueprint = false, + Time = 60, Ingredients = { - ['trash_can'] = 5, - ['hammer'] = 1 - } + ["trash_can"] = 5, + ["hammer"] = 1, + }, }, -['recycled_paper'] = { - Level = 0, - Category = 'dustman', - isGun = false, - Jobs = {'dustman'}, - JobGrades = {}, - Amount = 1, - SuccessRate = 100, - requireBlueprint = false, - Time = 30, +["recycled_paper"] = { + Level = 0, + Category = "dustman", + isGun = false, + Jobs = { "dustman" }, + JobGrades = {}, + Amount = 1, + SuccessRate = 100, + requireBlueprint = false, + Time = 30, Ingredients = { - ['paper'] = 2 - } + ["paper"] = 2, + }, }, ['paper'] = { diff --git a/server-data/resources/[bpt_addons]/bpt_crafting/fxmanifest.lua b/server-data/resources/[bpt_addons]/bpt_crafting/fxmanifest.lua index ec26980f6..2178e681c 100644 --- a/server-data/resources/[bpt_addons]/bpt_crafting/fxmanifest.lua +++ b/server-data/resources/[bpt_addons]/bpt_crafting/fxmanifest.lua @@ -1,30 +1,30 @@ -fx_version 'adamant' -versin '1.0.0' -game 'gta5' +fx_version("adamant") +version("1.0.0") +game("gta5") -shared_script '@es_extended/imports.lua' +shared_script("@es_extended/imports.lua") -ui_page 'html/form.html' +ui_page("html/form.html") -files { - 'html/form.html', - 'html/css.css', - 'html/script.js', - 'html/jquery-3.4.1.min.js', - 'html/img/*.png', -} +files({ + "html/form.html", + "html/css.css", + "html/script.js", + "html/jquery-3.4.1.min.js", + "html/img/*.png", +}) -client_scripts{ - '@es_extended/locale.lua', - 'locales/*.lua', - 'config.lua', - 'client/main.lua', -} +client_scripts({ + "@es_extended/locale.lua", + "locales/*.lua", + "config.lua", + "client/main.lua", +}) -server_scripts{ - '@es_extended/locale.lua', - 'locales/*.lua', - '@oxmysql/lib/MySQL.lua', - 'config.lua', - 'server/main.lua', -} \ No newline at end of file +server_scripts({ + "@es_extended/locale.lua", + "locales/*.lua", + "@oxmysql/lib/MySQL.lua", + "config.lua", + "server/main.lua", +}) \ No newline at end of file diff --git a/server-data/resources/[bpt_addons]/bpt_crafting/locales/en.lua b/server-data/resources/[bpt_addons]/bpt_crafting/locales/en.lua index d1557d95c..a73e2388f 100644 --- a/server-data/resources/[bpt_addons]/bpt_crafting/locales/en.lua +++ b/server-data/resources/[bpt_addons]/bpt_crafting/locales/en.lua @@ -1,9 +1,9 @@ -Locales['en'] = { - ['not_enough_ingredients'] = 'You don\'t have enough ingredients', - ['you_cant_hold_item'] = 'You can\'t create the product', - ['item_crafted'] = 'Item crafted!', - ['wrong_job'] = 'You cannot open this workbench', - ['workbench_hologram'] = '[~b~E~w~] Work station', - ['inv_limit_exceed'] = 'Inventory limit exceeded! Remove something before you lose more merchandise', - ['crafting_failed'] = 'You were unable to create the item!' +Locales["en"] = { + ["not_enough_ingredients"] = "You don't have enough ingredients", + ["you_cant_hold_item"] = "You can't create the product", + ["item_crafted"] = "Item crafted!", + ["wrong_job"] = "You cannot open this workbench", + ["workbench_hologram"] = "[~b~E~w~] Work station", + ["inv_limit_exceed"] = "Inventory limit exceeded! Remove something before you lose more merchandise", + ["crafting_failed"] = "You were unable to create the item!", } \ No newline at end of file diff --git a/server-data/resources/[bpt_addons]/bpt_crafting/locales/it.lua b/server-data/resources/[bpt_addons]/bpt_crafting/locales/it.lua index 07f748165..244f3cdc5 100644 --- a/server-data/resources/[bpt_addons]/bpt_crafting/locales/it.lua +++ b/server-data/resources/[bpt_addons]/bpt_crafting/locales/it.lua @@ -1,9 +1,9 @@ -Locales['it'] = { - ['not_enough_ingredients'] = 'Non hai abbastanza ingredienti', - ['you_cant_hold_item'] = 'Non puoi creare il prodotto', - ['item_crafted'] = 'Articolo realizzato!', - ['wrong_job'] = 'Non puoi aprire questo banco di lavoro', - ['workbench_hologram'] = '[~b~E~w~] banco da lavoro', - ['inv_limit_exceed'] = 'Limite inventario superato! Rimuovi qualcosa prima di perdere altra merce', - ['crafting_failed'] = 'Non sei riuscito a creare l\'oggetto!' +Locales["it"] = { + ["not_enough_ingredients"] = "Non hai abbastanza ingredienti", + ["you_cant_hold_item"] = "Non puoi creare il prodotto", + ["item_crafted"] = "Articolo realizzato!", + ["wrong_job"] = "Non puoi aprire questo banco di lavoro", + ["workbench_hologram"] = "[~b~E~w~] banco da lavoro", + ["inv_limit_exceed"] = "Limite inventario superato! Rimuovi qualcosa prima di perdere altra merce", + ["crafting_failed"] = "Non sei riuscito a creare l'oggetto!", } \ No newline at end of file