From 9cf0dc38c725ea56de4da185b839138486c1d004 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Wed, 10 Aug 2022 14:16:47 -0500 Subject: [PATCH] Start working on item recipe system --- scripts/server/item.js | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/scripts/server/item.js b/scripts/server/item.js index 4887f2c6..8b4bcda6 100644 --- a/scripts/server/item.js +++ b/scripts/server/item.js @@ -247,6 +247,39 @@ class ItemTypeData { // =========================================================================== +class ItemRecipeData { + constructor(itemTypeName, neededTime, resultAmount, ingredients) { + this.resultItemTypeName = ""; + this.resultItemTypeIndex = -1; + this.neededTime = 0; + this.resultAmount = 0; + this.ingredients = []; + } +} + +// =========================================================================== + +class ItemRecipeIngredientData { + constructor() { + this.itemTypeName = ""; + this.itemTypeIndex = -1; + this.amount = 0; + } +} + +// =========================================================================== + +let itemRecipes = [ + new ItemRecipeData("Meth", 21600000, 1, [ + new ItemRecipeIngredientData("Sudafed", 1), + new ItemRecipeIngredientData("Sulfuric Acid", 1), + new ItemRecipeIngredientData("Salt", 1), + new ItemRecipeIngredientData("Lithium Batteries", 1), + ]), +] + +// =========================================================================== + function initItemScript() { logToConsole(LOG_DEBUG, "[VRR.Item]: Initializing item script ..."); logToConsole(LOG_INFO, "[VRR.Item]: Item script initialized successfully!");