2024-11-03 23:29:50 -08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2023-08-15 09:29:16 +00:00
|
|
|
|
using System.Text.Json.Serialization;
|
2021-08-12 16:52:06 +01:00
|
|
|
|
|
2023-08-15 09:29:16 +00:00
|
|
|
|
namespace Common.Models.Output;
|
|
|
|
|
|
|
|
|
|
[JsonSerializable(typeof(Bot))]
|
|
|
|
|
[JsonSourceGenerationOptions(GenerationMode = JsonSourceGenerationMode.Serialization, WriteIndented = true)]
|
|
|
|
|
public partial class BotJsonContext : JsonSerializerContext
|
2021-08-12 16:52:06 +01:00
|
|
|
|
{
|
2023-08-15 09:29:16 +00:00
|
|
|
|
}
|
|
|
|
|
|
2021-12-20 10:47:18 +00:00
|
|
|
|
public class Bot
|
|
|
|
|
{
|
2023-08-15 09:29:16 +00:00
|
|
|
|
public Bot()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-20 10:47:18 +00:00
|
|
|
|
public Bot(BotType botType)
|
2021-08-12 16:52:06 +01:00
|
|
|
|
{
|
2021-12-20 10:47:18 +00:00
|
|
|
|
this.botType = botType;
|
2024-11-03 23:29:50 -08:00
|
|
|
|
botCount = 0;
|
2021-12-20 10:47:18 +00:00
|
|
|
|
appearance = new Appearance();
|
|
|
|
|
experience = new Experience();
|
|
|
|
|
health = new Health();
|
|
|
|
|
skills = new Skills();
|
|
|
|
|
inventory = new Inventory();
|
|
|
|
|
firstName = new List<string>();
|
|
|
|
|
lastName = new List<string>();
|
|
|
|
|
difficulty = new Difficulty.Difficulty();
|
|
|
|
|
chances = new Chances();
|
|
|
|
|
generation = new GenerationChances();
|
2021-08-12 16:52:06 +01:00
|
|
|
|
}
|
2021-12-20 10:47:18 +00:00
|
|
|
|
|
|
|
|
|
[JsonIgnore]
|
|
|
|
|
public BotType botType { get; set; }
|
2024-11-03 23:29:50 -08:00
|
|
|
|
[JsonIgnore]
|
|
|
|
|
public int botCount { get; set; }
|
2021-12-20 10:47:18 +00:00
|
|
|
|
public Appearance appearance { get; set; }
|
|
|
|
|
public Experience experience { get; set; }
|
|
|
|
|
public Health health { get; set; }
|
|
|
|
|
public Skills skills { get; set; }
|
|
|
|
|
public Inventory inventory { get; set; }
|
|
|
|
|
public List<string> firstName { get; set; }
|
|
|
|
|
public List<string> lastName { get; set; }
|
|
|
|
|
public Difficulty.Difficulty difficulty { get; set; }
|
|
|
|
|
public Chances chances { get; set; }
|
|
|
|
|
public GenerationChances generation { get; set; }
|
|
|
|
|
}
|
|
|
|
|
public class Appearance
|
|
|
|
|
{
|
|
|
|
|
public Appearance()
|
2021-08-12 16:52:06 +01:00
|
|
|
|
{
|
2023-08-15 09:29:16 +00:00
|
|
|
|
body = new Dictionary<string, int>();
|
|
|
|
|
feet = new Dictionary<string, int>();
|
2024-02-21 17:06:08 +00:00
|
|
|
|
hands = new Dictionary<string, int>();
|
|
|
|
|
head = new Dictionary<string, int>();
|
|
|
|
|
voice = new Dictionary<string, int>();
|
2021-08-12 16:52:06 +01:00
|
|
|
|
}
|
|
|
|
|
|
2023-08-15 09:29:16 +00:00
|
|
|
|
public Dictionary<string, int> body { get; set; }
|
|
|
|
|
public Dictionary<string, int> feet { get; set; }
|
2024-02-21 17:06:08 +00:00
|
|
|
|
public Dictionary<string, int> hands { get; set; }
|
|
|
|
|
public Dictionary<string, int> head { get; set; }
|
|
|
|
|
public Dictionary<string, int> voice { get; set; }
|
2021-12-20 10:47:18 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Experience
|
|
|
|
|
{
|
|
|
|
|
public Experience()
|
2021-08-12 16:52:06 +01:00
|
|
|
|
{
|
2021-12-20 10:47:18 +00:00
|
|
|
|
level = new MinMax(0, 1);
|
|
|
|
|
reward = new MinMax(-1, -1);
|
2024-11-14 11:20:01 +00:00
|
|
|
|
standingForKill = new Dictionary<string, object>();
|
|
|
|
|
aggressorBonus = null;
|
2024-11-01 17:01:23 +00:00
|
|
|
|
useSimpleAnimator = false;
|
2021-08-12 16:52:06 +01:00
|
|
|
|
}
|
|
|
|
|
|
2021-12-20 10:47:18 +00:00
|
|
|
|
public MinMax level { get; set; }
|
|
|
|
|
public MinMax reward { get; set; }
|
2024-11-14 11:20:01 +00:00
|
|
|
|
public Dictionary<string, object> standingForKill { get; set; }
|
2024-08-21 11:51:27 +01:00
|
|
|
|
public object aggressorBonus { get; set; }
|
2024-11-01 17:01:23 +00:00
|
|
|
|
public bool useSimpleAnimator { get; set; }
|
2021-12-20 10:47:18 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-03 23:29:50 -08:00
|
|
|
|
public class BodyParts : IEquatable<BodyParts>
|
2021-12-20 10:47:18 +00:00
|
|
|
|
{
|
|
|
|
|
public BodyParts()
|
2021-08-12 16:52:06 +01:00
|
|
|
|
{
|
2021-12-20 10:47:18 +00:00
|
|
|
|
Head = new MinMax(35, 35);
|
|
|
|
|
Chest = new MinMax(85, 85);
|
|
|
|
|
Stomach = new MinMax(70, 70);
|
|
|
|
|
LeftArm = new MinMax(60, 60);
|
|
|
|
|
RightArm = new MinMax(60, 60);
|
|
|
|
|
LeftLeg = new MinMax(65, 65);
|
|
|
|
|
RightLeg = new MinMax(65, 65);
|
2021-08-12 16:52:06 +01:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-03 23:29:50 -08:00
|
|
|
|
public bool Equals(BodyParts other)
|
|
|
|
|
{
|
|
|
|
|
return this.Head.Equals(other.Head) &&
|
|
|
|
|
this.Chest.Equals(other.Chest) &&
|
|
|
|
|
this.Stomach.Equals(other.Stomach) &&
|
|
|
|
|
this.LeftArm.Equals(other.LeftArm) &&
|
|
|
|
|
this.RightArm.Equals(other.RightArm) &&
|
|
|
|
|
this.LeftLeg.Equals(other.LeftLeg) &&
|
|
|
|
|
this.RightLeg.Equals(other.RightLeg);
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-20 10:47:18 +00:00
|
|
|
|
public MinMax Head { get; set; }
|
|
|
|
|
public MinMax Chest { get; set; }
|
|
|
|
|
public MinMax Stomach { get; set; }
|
|
|
|
|
public MinMax LeftArm { get; set; }
|
|
|
|
|
public MinMax RightArm { get; set; }
|
|
|
|
|
public MinMax LeftLeg { get; set; }
|
|
|
|
|
public MinMax RightLeg { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Health
|
|
|
|
|
{
|
|
|
|
|
public Health()
|
2021-08-12 16:52:06 +01:00
|
|
|
|
{
|
2021-12-20 10:47:18 +00:00
|
|
|
|
Hydration = new MinMax(100, 100);
|
|
|
|
|
Energy = new MinMax(100, 100);
|
|
|
|
|
Temperature = new MinMax(36, 40);
|
|
|
|
|
BodyParts = new List<BodyParts>();
|
2021-08-12 16:52:06 +01:00
|
|
|
|
}
|
|
|
|
|
|
2021-12-20 10:47:18 +00:00
|
|
|
|
public MinMax Hydration { get; set; }
|
|
|
|
|
public MinMax Energy { get; set; }
|
|
|
|
|
public MinMax Temperature { get; set; }
|
|
|
|
|
public List<BodyParts> BodyParts { get; set; }
|
|
|
|
|
}
|
2021-08-12 16:52:06 +01:00
|
|
|
|
|
2021-12-20 10:47:18 +00:00
|
|
|
|
public class Skills
|
|
|
|
|
{
|
|
|
|
|
public Skills()
|
|
|
|
|
{
|
|
|
|
|
Common = new Dictionary<string, MinMax>();
|
2021-08-12 16:52:06 +01:00
|
|
|
|
}
|
|
|
|
|
|
2021-12-20 10:47:18 +00:00
|
|
|
|
public Dictionary<string, MinMax> Common { get; set; }
|
|
|
|
|
}
|
2021-08-17 16:19:23 +01:00
|
|
|
|
|
2021-12-20 10:47:18 +00:00
|
|
|
|
public class Chances
|
|
|
|
|
{
|
|
|
|
|
public Chances()
|
2021-08-12 16:52:06 +01:00
|
|
|
|
{
|
2021-12-20 10:47:18 +00:00
|
|
|
|
equipment = new EquipmentChances();
|
2021-08-12 16:52:06 +01:00
|
|
|
|
}
|
|
|
|
|
|
2021-12-20 10:47:18 +00:00
|
|
|
|
public EquipmentChances equipment { get; set; }
|
2024-01-09 15:29:22 +00:00
|
|
|
|
public Dictionary<string, int> weaponMods { get; set; }
|
|
|
|
|
public Dictionary<string, int> equipmentMods { get; set; }
|
2021-12-20 10:47:18 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class EquipmentChances
|
|
|
|
|
{
|
|
|
|
|
public EquipmentChances()
|
2021-08-12 16:52:06 +01:00
|
|
|
|
{
|
2021-12-20 10:47:18 +00:00
|
|
|
|
}
|
2021-08-12 16:52:06 +01:00
|
|
|
|
|
2021-12-20 10:47:18 +00:00
|
|
|
|
public EquipmentChances(int head, int ear, int faceCover,
|
|
|
|
|
int vest, int eyewear, int armband, int tacVest,
|
|
|
|
|
int backpack, int firstPrimary, int secondPrimary,
|
|
|
|
|
int holster, int scabbard, int pockets, int securedContainer)
|
|
|
|
|
{
|
|
|
|
|
Headwear = head;
|
|
|
|
|
Earpiece = ear;
|
|
|
|
|
FaceCover = faceCover;
|
|
|
|
|
ArmorVest = vest;
|
|
|
|
|
ArmBand = armband;
|
|
|
|
|
Eyewear = eyewear;
|
|
|
|
|
TacticalVest = tacVest;
|
|
|
|
|
Backpack = backpack;
|
|
|
|
|
FirstPrimaryWeapon = firstPrimary;
|
|
|
|
|
SecondPrimaryWeapon = secondPrimary;
|
|
|
|
|
Holster = holster;
|
|
|
|
|
Scabbard = scabbard;
|
|
|
|
|
Pockets = pockets;
|
|
|
|
|
SecuredContainer = securedContainer;
|
2021-08-12 16:52:06 +01:00
|
|
|
|
}
|
2021-12-20 10:47:18 +00:00
|
|
|
|
|
|
|
|
|
public int Headwear { get; set; }
|
|
|
|
|
public int Earpiece { get; set; }
|
|
|
|
|
public int FaceCover { get; set; }
|
|
|
|
|
public int ArmorVest { get; set; }
|
|
|
|
|
public int Eyewear { get; set; }
|
|
|
|
|
public int ArmBand { get; set; }
|
|
|
|
|
public int TacticalVest { get; set; }
|
|
|
|
|
public int Backpack { get; set; }
|
|
|
|
|
public int FirstPrimaryWeapon { get; set; }
|
|
|
|
|
public int SecondPrimaryWeapon { get; set; }
|
|
|
|
|
public int Holster { get; set; }
|
|
|
|
|
public int Scabbard { get; set; }
|
|
|
|
|
public int Pockets { get; set; }
|
|
|
|
|
public int SecuredContainer { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class GenerationChances
|
|
|
|
|
{
|
2023-08-21 16:32:20 +01:00
|
|
|
|
public GenerationChances(
|
|
|
|
|
GenerationWeightData specialItems,
|
|
|
|
|
GenerationWeightData healingItems,
|
|
|
|
|
GenerationWeightData drugItems,
|
|
|
|
|
GenerationWeightData stimItems,
|
2024-04-08 11:50:46 +01:00
|
|
|
|
GenerationWeightData foodItems,
|
|
|
|
|
GenerationWeightData drinkItems,
|
2024-04-18 13:44:38 +01:00
|
|
|
|
GenerationWeightData currencyitems,
|
2023-08-21 16:32:20 +01:00
|
|
|
|
GenerationWeightData backpackLootItems,
|
|
|
|
|
GenerationWeightData pocketLootItems,
|
|
|
|
|
GenerationWeightData vestLootItems,
|
|
|
|
|
GenerationWeightData magazineItems,
|
|
|
|
|
GenerationWeightData grenadeItems)
|
2021-08-12 16:52:06 +01:00
|
|
|
|
{
|
2021-12-20 10:47:18 +00:00
|
|
|
|
items = new ItemChances
|
2021-08-12 16:52:06 +01:00
|
|
|
|
{
|
2023-08-21 16:32:20 +01:00
|
|
|
|
specialItems = specialItems,
|
|
|
|
|
healing = healingItems,
|
|
|
|
|
drugs = drugItems,
|
|
|
|
|
stims = stimItems,
|
2024-04-08 11:50:46 +01:00
|
|
|
|
food = foodItems,
|
|
|
|
|
drink = drinkItems,
|
2024-04-18 13:44:38 +01:00
|
|
|
|
currency = currencyitems,
|
2023-08-21 16:32:20 +01:00
|
|
|
|
backpackLoot = backpackLootItems,
|
|
|
|
|
pocketLoot = pocketLootItems,
|
|
|
|
|
vestLoot = vestLootItems,
|
|
|
|
|
magazines = magazineItems,
|
|
|
|
|
grenades = grenadeItems
|
2021-12-20 10:47:18 +00:00
|
|
|
|
};
|
2021-08-12 16:52:06 +01:00
|
|
|
|
}
|
|
|
|
|
|
2021-12-20 10:47:18 +00:00
|
|
|
|
public GenerationChances()
|
2021-08-12 16:52:06 +01:00
|
|
|
|
{
|
2021-12-20 10:47:18 +00:00
|
|
|
|
items = new ItemChances();
|
2021-08-12 16:52:06 +01:00
|
|
|
|
}
|
|
|
|
|
|
2021-12-20 10:47:18 +00:00
|
|
|
|
public ItemChances items { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ItemChances
|
|
|
|
|
{
|
|
|
|
|
public ItemChances()
|
2021-08-12 16:52:06 +01:00
|
|
|
|
{
|
2023-08-21 16:32:20 +01:00
|
|
|
|
specialItems = new GenerationWeightData(); // 0,1
|
|
|
|
|
healing = new GenerationWeightData(); // 1, 2
|
|
|
|
|
drugs = new GenerationWeightData(); // 0, 1
|
|
|
|
|
stims = new GenerationWeightData(); // 0, 1
|
2024-04-18 13:44:38 +01:00
|
|
|
|
food = new GenerationWeightData();
|
|
|
|
|
drink = new GenerationWeightData();
|
|
|
|
|
currency = new GenerationWeightData();
|
2023-08-21 16:32:20 +01:00
|
|
|
|
backpackLoot = new GenerationWeightData(); //0,3
|
|
|
|
|
pocketLoot = new GenerationWeightData();
|
|
|
|
|
vestLoot = new GenerationWeightData();
|
|
|
|
|
magazines = new GenerationWeightData(); //2,4
|
|
|
|
|
grenades = new GenerationWeightData(); //0,5
|
2021-12-20 10:47:18 +00:00
|
|
|
|
}
|
2021-08-12 16:52:06 +01:00
|
|
|
|
|
2023-08-21 16:32:20 +01:00
|
|
|
|
public GenerationWeightData specialItems { get; set; }
|
|
|
|
|
public GenerationWeightData healing { get; set; }
|
|
|
|
|
public GenerationWeightData drugs { get; set; }
|
|
|
|
|
public GenerationWeightData stims { get; set; }
|
2024-04-08 11:50:46 +01:00
|
|
|
|
public GenerationWeightData food { get; set; }
|
|
|
|
|
public GenerationWeightData drink { get; set; }
|
2024-04-18 13:44:38 +01:00
|
|
|
|
|
|
|
|
|
public GenerationWeightData currency { get; set; }
|
2023-08-21 16:32:20 +01:00
|
|
|
|
public GenerationWeightData backpackLoot { get; set; }
|
|
|
|
|
public GenerationWeightData pocketLoot { get; set; }
|
|
|
|
|
public GenerationWeightData vestLoot { get; set; }
|
|
|
|
|
public GenerationWeightData magazines { get; set; }
|
|
|
|
|
public GenerationWeightData grenades { get; set; }
|
2021-12-20 10:47:18 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-03 23:29:50 -08:00
|
|
|
|
public class MinMax : IEquatable<MinMax>
|
2021-12-20 10:47:18 +00:00
|
|
|
|
{
|
|
|
|
|
public MinMax(int min, int max)
|
|
|
|
|
{
|
|
|
|
|
this.min = min;
|
|
|
|
|
this.max = max;
|
2021-08-12 16:52:06 +01:00
|
|
|
|
}
|
2021-12-20 10:47:18 +00:00
|
|
|
|
|
2024-11-03 23:29:50 -08:00
|
|
|
|
public bool Equals(MinMax other)
|
|
|
|
|
{
|
|
|
|
|
return this.min == other.min && this.max == other.max;
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-20 10:47:18 +00:00
|
|
|
|
public int min { get; set; }
|
|
|
|
|
public int max { get; set; }
|
|
|
|
|
}
|