From e8744c2a3fd054a1eb5b6d901a482df46320424b Mon Sep 17 00:00:00 2001 From: Lacyway <20912169+Lacyway@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:26:31 +0100 Subject: [PATCH 1/2] Update backend.core models to use properties --- Fuyu.Backend.Core/Models/Accounts/Account.cs | 10 +++++----- .../Models/Requests/AccountLoginRequest.cs | 4 ++-- .../Models/Requests/AccountRegisterGameRequest.cs | 4 ++-- .../Models/Requests/AccountRegisterRequest.cs | 4 ++-- .../Models/Response/AccountGamesResponse.cs | 2 +- .../Models/Response/AccountLoginResponse.cs | 4 ++-- .../Models/Response/AccountRegisterGameResponse.cs | 4 ++-- .../Models/Response/AccountRegisterResponse.cs | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Fuyu.Backend.Core/Models/Accounts/Account.cs b/Fuyu.Backend.Core/Models/Accounts/Account.cs index 501eee4c..d5cec81e 100644 --- a/Fuyu.Backend.Core/Models/Accounts/Account.cs +++ b/Fuyu.Backend.Core/Models/Accounts/Account.cs @@ -7,18 +7,18 @@ namespace Fuyu.Backend.Core.Models.Accounts public class Account { [DataMember] - public int Id; + public int Id { get; set; } [DataMember] - public string Username; + public string Username { get; set; } [DataMember] - public string Password; + public string Password { get; set; } [DataMember] - public Dictionary Games; + public Dictionary Games { get; set; } [DataMember] - public bool IsBanned; + public bool IsBanned { get; set; } } } \ No newline at end of file diff --git a/Fuyu.Backend.Core/Models/Requests/AccountLoginRequest.cs b/Fuyu.Backend.Core/Models/Requests/AccountLoginRequest.cs index 8a4b0fbf..f95bcda6 100644 --- a/Fuyu.Backend.Core/Models/Requests/AccountLoginRequest.cs +++ b/Fuyu.Backend.Core/Models/Requests/AccountLoginRequest.cs @@ -6,9 +6,9 @@ namespace Fuyu.Backend.Core.Models.Requests public class AccountLoginRequest { [DataMember] - public string Username; + public string Username { get; set; } [DataMember] - public string Password; + public string Password { get; set; } } } \ No newline at end of file diff --git a/Fuyu.Backend.Core/Models/Requests/AccountRegisterGameRequest.cs b/Fuyu.Backend.Core/Models/Requests/AccountRegisterGameRequest.cs index 982587d4..c529492a 100644 --- a/Fuyu.Backend.Core/Models/Requests/AccountRegisterGameRequest.cs +++ b/Fuyu.Backend.Core/Models/Requests/AccountRegisterGameRequest.cs @@ -6,9 +6,9 @@ namespace Fuyu.Backend.Core.Models.Requests public class AccountRegisterGameRequest { [DataMember] - public string Game; + public string Game { get; set; } [DataMember] - public string Edition; + public string Edition { get; set; } } } \ No newline at end of file diff --git a/Fuyu.Backend.Core/Models/Requests/AccountRegisterRequest.cs b/Fuyu.Backend.Core/Models/Requests/AccountRegisterRequest.cs index 085f6b61..a1bacfd6 100644 --- a/Fuyu.Backend.Core/Models/Requests/AccountRegisterRequest.cs +++ b/Fuyu.Backend.Core/Models/Requests/AccountRegisterRequest.cs @@ -6,9 +6,9 @@ namespace Fuyu.Backend.Core.Models.Requests public class AccountRegisterRequest { [DataMember] - public string Username; + public string Username { get; set; } [DataMember] - public string Password; + public string Password { get; set; } } } \ No newline at end of file diff --git a/Fuyu.Backend.Core/Models/Response/AccountGamesResponse.cs b/Fuyu.Backend.Core/Models/Response/AccountGamesResponse.cs index 8dbfaf42..44a3a3ae 100644 --- a/Fuyu.Backend.Core/Models/Response/AccountGamesResponse.cs +++ b/Fuyu.Backend.Core/Models/Response/AccountGamesResponse.cs @@ -7,6 +7,6 @@ namespace Fuyu.Backend.Core.Models.Responses public class AccountGamesResponse { [DataMember] - public Dictionary Games; + public Dictionary Games { get; set; } } } diff --git a/Fuyu.Backend.Core/Models/Response/AccountLoginResponse.cs b/Fuyu.Backend.Core/Models/Response/AccountLoginResponse.cs index 0be4e42a..94bc8461 100644 --- a/Fuyu.Backend.Core/Models/Response/AccountLoginResponse.cs +++ b/Fuyu.Backend.Core/Models/Response/AccountLoginResponse.cs @@ -7,9 +7,9 @@ namespace Fuyu.Backend.Core.Models.Responses public class AccountLoginResponse { [DataMember] - public ELoginStatus Status; + public ELoginStatus Status { get; set; } [DataMember] - public string SessionId; + public string SessionId { get; set; } } } \ No newline at end of file diff --git a/Fuyu.Backend.Core/Models/Response/AccountRegisterGameResponse.cs b/Fuyu.Backend.Core/Models/Response/AccountRegisterGameResponse.cs index 6f1b83d0..83a35853 100644 --- a/Fuyu.Backend.Core/Models/Response/AccountRegisterGameResponse.cs +++ b/Fuyu.Backend.Core/Models/Response/AccountRegisterGameResponse.cs @@ -7,9 +7,9 @@ namespace Fuyu.Backend.Core.Models.Responses public class AccountRegisterGameResponse { [DataMember] - public ERegisterStatus Status; + public ERegisterStatus Status { get; set; } [DataMember] - public int AccountId; + public int AccountId { get; set; } } } \ No newline at end of file diff --git a/Fuyu.Backend.Core/Models/Response/AccountRegisterResponse.cs b/Fuyu.Backend.Core/Models/Response/AccountRegisterResponse.cs index 660074ca..b6f74d6e 100644 --- a/Fuyu.Backend.Core/Models/Response/AccountRegisterResponse.cs +++ b/Fuyu.Backend.Core/Models/Response/AccountRegisterResponse.cs @@ -7,6 +7,6 @@ namespace Fuyu.Backend.Core.Models.Responses public class AccountRegisterResponse { [DataMember] - public ERegisterStatus Status; - } + public ERegisterStatus Status { get; set; } + } } \ No newline at end of file From 9e38a9fbf4e0cb86bcc2c788b3c6e20500acc3a2 Mon Sep 17 00:00:00 2001 From: Lacyway <20912169+Lacyway@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:46:49 +0100 Subject: [PATCH 2/2] Update enums --- .../ItemTemplates/AmmoItemProperties.cs | 6 +- .../ItemTemplates/VestItemProperties.cs | 1 + Fuyu.Backend.BSG/Models/Hideout/EAreaType.cs | 57 ++++++++++--------- .../Models/Profiles/Info/EMemberCategory.cs | 3 +- .../Models/Profiles/Info/EPlayerSide.cs | 4 +- .../Models/Templates/EEquipmentBuildType.cs | 3 +- 6 files changed, 41 insertions(+), 33 deletions(-) diff --git a/Fuyu.Backend.BSG/ItemTemplates/AmmoItemProperties.cs b/Fuyu.Backend.BSG/ItemTemplates/AmmoItemProperties.cs index dea0bc71..e9f51aaf 100644 --- a/Fuyu.Backend.BSG/ItemTemplates/AmmoItemProperties.cs +++ b/Fuyu.Backend.BSG/ItemTemplates/AmmoItemProperties.cs @@ -190,9 +190,11 @@ public class AmmoItemProperties : StackableItemItemProperties public enum EFlareEventType { - Airdrop, + Light, + Airdrop, ExitActivate, - AIFollowEvent, + Quest, + AIFollowEvent, CallArtilleryOnMyself } } diff --git a/Fuyu.Backend.BSG/ItemTemplates/VestItemProperties.cs b/Fuyu.Backend.BSG/ItemTemplates/VestItemProperties.cs index e389cb3a..654a6085 100644 --- a/Fuyu.Backend.BSG/ItemTemplates/VestItemProperties.cs +++ b/Fuyu.Backend.BSG/ItemTemplates/VestItemProperties.cs @@ -108,6 +108,7 @@ public enum EMaterialType GlassVisor, HelmetRicochet, MetalNoDecal, + Snow, None = 0 } diff --git a/Fuyu.Backend.BSG/Models/Hideout/EAreaType.cs b/Fuyu.Backend.BSG/Models/Hideout/EAreaType.cs index 75459d8f..90f55680 100644 --- a/Fuyu.Backend.BSG/Models/Hideout/EAreaType.cs +++ b/Fuyu.Backend.BSG/Models/Hideout/EAreaType.cs @@ -2,31 +2,34 @@ namespace Fuyu.Backend.BSG.Models.Hideout { public enum EAreaType { - Vents = 0, - Security = 1, - WaterCloset = 2, - Stash = 3, - Generator = 4, - Heating = 5, - WaterCollector = 6, - MedStation = 7, - Kitchen = 8, - RestSpace = 9, - Workbench = 10, - IntelligenceCenter = 11, - ShootingRange = 12, - Library = 13, - ScavCase = 14, - Illumination = 15, - PlaceOfFame = 16, - AirFilteringUnit = 17, - SolarPower = 18, - BoozeGenerator = 19, - BitcoinFarm = 20, - ChristmasIllumination = 21, - EmergencyWall = 22, - Gym = 23, - WeaponStand = 24, - WeaponStandSecondary = 25 - } + NotSet = -1, + Vents, + Security, + WaterCloset, + Stash, + Generator, + Heating, + WaterCollector, + MedStation, + Kitchen, + RestSpace, + Workbench, + IntelligenceCenter, + ShootingRange, + Library, + ScavCase, + Illumination, + PlaceOfFame, + AirFilteringUnit, + SolarPower, + BoozeGenerator, + BitcoinFarm, + ChristmasIllumination, + EmergencyWall, + Gym, + WeaponStand, + WeaponStandSecondary, + EquipmentPresetsStand, + CircleOfCultists + } } \ No newline at end of file diff --git a/Fuyu.Backend.BSG/Models/Profiles/Info/EMemberCategory.cs b/Fuyu.Backend.BSG/Models/Profiles/Info/EMemberCategory.cs index b530a5f6..6be8c595 100644 --- a/Fuyu.Backend.BSG/Models/Profiles/Info/EMemberCategory.cs +++ b/Fuyu.Backend.BSG/Models/Profiles/Info/EMemberCategory.cs @@ -11,6 +11,7 @@ public enum EMemberCategory ChatModeratorWithPermanentBan = 64, UnitTest = 128, Sherpa = 256, - Emissary = 512 + Emissary = 512, + Unheard = 1024 } } \ No newline at end of file diff --git a/Fuyu.Backend.BSG/Models/Profiles/Info/EPlayerSide.cs b/Fuyu.Backend.BSG/Models/Profiles/Info/EPlayerSide.cs index 83b42ada..6fecfdb4 100644 --- a/Fuyu.Backend.BSG/Models/Profiles/Info/EPlayerSide.cs +++ b/Fuyu.Backend.BSG/Models/Profiles/Info/EPlayerSide.cs @@ -2,8 +2,8 @@ namespace Fuyu.Backend.BSG.Models.Profiles.Info { public enum EPlayerSide { - Usec, + Usec = 1, Bear, - Savage + Savage = 4 } } \ No newline at end of file diff --git a/Fuyu.Backend.BSG/Models/Templates/EEquipmentBuildType.cs b/Fuyu.Backend.BSG/Models/Templates/EEquipmentBuildType.cs index befa6241..eb979c27 100644 --- a/Fuyu.Backend.BSG/Models/Templates/EEquipmentBuildType.cs +++ b/Fuyu.Backend.BSG/Models/Templates/EEquipmentBuildType.cs @@ -4,6 +4,7 @@ namespace Fuyu.Backend.BSG.Models.Templates public enum EEquipmentBuildType { Custom, - Standard + Standard, + Storage } } \ No newline at end of file