From e90463d2234f228b56f231ba37e987f5a51332e2 Mon Sep 17 00:00:00 2001 From: Dev Date: Thu, 18 Apr 2024 13:44:38 +0100 Subject: [PATCH] Add currency system --- Common.Models/Output/Output.cs | 7 ++ Generator/Assets/generationWeights.json | 96 +++++++++++++++++++++ Generator/Helpers/Gear/GearChanceHelpers.cs | 5 +- 3 files changed, 104 insertions(+), 4 deletions(-) diff --git a/Common.Models/Output/Output.cs b/Common.Models/Output/Output.cs index 759a546..eaf4b46 100644 --- a/Common.Models/Output/Output.cs +++ b/Common.Models/Output/Output.cs @@ -189,6 +189,7 @@ public class GenerationChances GenerationWeightData stimItems, GenerationWeightData foodItems, GenerationWeightData drinkItems, + GenerationWeightData currencyitems, GenerationWeightData backpackLootItems, GenerationWeightData pocketLootItems, GenerationWeightData vestLootItems, @@ -203,6 +204,7 @@ public class GenerationChances stims = stimItems, food = foodItems, drink = drinkItems, + currency = currencyitems, backpackLoot = backpackLootItems, pocketLoot = pocketLootItems, vestLoot = vestLootItems, @@ -227,6 +229,9 @@ public class ItemChances healing = new GenerationWeightData(); // 1, 2 drugs = new GenerationWeightData(); // 0, 1 stims = new GenerationWeightData(); // 0, 1 + food = new GenerationWeightData(); + drink = new GenerationWeightData(); + currency = new GenerationWeightData(); backpackLoot = new GenerationWeightData(); //0,3 pocketLoot = new GenerationWeightData(); vestLoot = new GenerationWeightData(); @@ -240,6 +245,8 @@ public class ItemChances public GenerationWeightData stims { get; set; } public GenerationWeightData food { get; set; } public GenerationWeightData drink { get; set; } + + public GenerationWeightData currency { get; set; } public GenerationWeightData backpackLoot { get; set; } public GenerationWeightData pocketLoot { get; set; } public GenerationWeightData vestLoot { get; set; } diff --git a/Generator/Assets/generationWeights.json b/Generator/Assets/generationWeights.json index 627ef9e..449c71a 100644 --- a/Generator/Assets/generationWeights.json +++ b/Generator/Assets/generationWeights.json @@ -35,6 +35,14 @@ "2": 2 }, "whitelist": [] + }, + "currency": { + "weights": { + "0": 20, + "1": 5, + "2": 1 + }, + "whitelist": [] }, "grenades": { "weights": { @@ -139,6 +147,14 @@ "2": 2 }, "whitelist": [] + }, + "currency": { + "weights": { + "0": 20, + "1": 5, + "2": 1 + }, + "whitelist": [] }, "grenades": { "weights": { @@ -241,6 +257,14 @@ "2": 2 }, "whitelist": [] + }, + "currency": { + "weights": { + "0": 20, + "1": 5, + "2": 1 + }, + "whitelist": [] }, "grenades": { "weights": { @@ -341,6 +365,14 @@ "2": 2 }, "whitelist": [] + }, + "currency": { + "weights": { + "0": 20, + "1": 5, + "2": 1 + }, + "whitelist": [] }, "grenades": { "weights": { @@ -441,6 +473,14 @@ "2": 2 }, "whitelist": [] + }, + "currency": { + "weights": { + "0": 20, + "1": 5, + "2": 1 + }, + "whitelist": [] }, "grenades": { "weights": { @@ -547,6 +587,14 @@ "2": 2 }, "whitelist": [] + }, + "currency": { + "weights": { + "0": 20, + "1": 5, + "2": 1 + }, + "whitelist": [] }, "grenades": { "weights": { @@ -652,6 +700,14 @@ "2": 2 }, "whitelist": [] + }, + "currency": { + "weights": { + "0": 20, + "1": 5, + "2": 1 + }, + "whitelist": [] }, "grenades": { "weights": { @@ -756,6 +812,14 @@ "2": 2 }, "whitelist": [] + }, + "currency": { + "weights": { + "0": 20, + "1": 5, + "2": 1 + }, + "whitelist": [] }, "grenades": { "weights": { @@ -859,6 +923,14 @@ "2": 2 }, "whitelist": [] + }, + "currency": { + "weights": { + "0": 20, + "1": 5, + "2": 1 + }, + "whitelist": [] }, "grenades": { "weights": { @@ -968,6 +1040,14 @@ "2": 2 }, "whitelist": [] + }, + "currency": { + "weights": { + "0": 20, + "1": 5, + "2": 1 + }, + "whitelist": [] }, "grenades": { "weights": { @@ -1073,6 +1153,14 @@ "2": 2 }, "whitelist": [] + }, + "currency": { + "weights": { + "0": 20, + "1": 5, + "2": 1 + }, + "whitelist": [] }, "grenades": { "weights": { @@ -1179,6 +1267,14 @@ "2": 2 }, "whitelist": [] + }, + "currency": { + "weights": { + "0": 20, + "1": 5, + "2": 1 + }, + "whitelist": [] }, "grenades": { "weights": { diff --git a/Generator/Helpers/Gear/GearChanceHelpers.cs b/Generator/Helpers/Gear/GearChanceHelpers.cs index 8746fc9..5f8414e 100644 --- a/Generator/Helpers/Gear/GearChanceHelpers.cs +++ b/Generator/Helpers/Gear/GearChanceHelpers.cs @@ -237,15 +237,12 @@ namespace Generator.Helpers.Gear weightsData["stims"], weightsData["food"], weightsData["drinks"], + weightsData["currency"], weightsData["backpackLoot"], weightsData["pocketLoot"], weightsData["vestLoot"], weightsData["magazines"], weightsData["grenades"]); - - // it makes some crazy values, one assault bot has 10 grenades! - //AddGrenadeMinMax(bot, rawBots); - } public static void CalculateEquipmentChances(Bot bot, List baseBots)