From 79b6da138c6bec55be41557bd5d710c61a8111fb Mon Sep 17 00:00:00 2001 From: Bobo Date: Sat, 13 Aug 2022 17:00:04 +0200 Subject: [PATCH] this should fix the add instead of set drug money bug --- Classes/DealerStash.cs | 4 +++- Interfaces/IDealerStash.cs | 5 +++++ Los.Santos.Dope.Wars.csproj | 21 +++++++++++++++++++++ Properties/AssemblyInfo.cs | 8 ++++---- 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/Classes/DealerStash.cs b/Classes/DealerStash.cs index b74ef05c..b9a2c115 100644 --- a/Classes/DealerStash.cs +++ b/Classes/DealerStash.cs @@ -66,7 +66,7 @@ public void RefreshDrugMoney(PlayerStats playerStats, GameSettings gameSettings, double minMoney = playerLevel * (isDrugLord ? 10000 : 1000) * difficultyFactor / 2; double maxMoney = playerLevel * (isDrugLord ? 10000 : 1000) * difficultyFactor; - AddDrugMoney(Utils.GetRandomInt((int)minMoney, (int)maxMoney)); + SetDrugMoney(Utils.GetRandomInt((int)minMoney, (int)maxMoney)); } /// public void RestockQuantity(PlayerStats playerStats, GameSettings gameSettings, bool isDrugLord = false) @@ -107,5 +107,7 @@ public void SellDrug(string drugName, int drugQuantity, int drugPrice) public void AddDrugMoney(int amount) => DrugMoney += amount; /// public void RemoveDrugMoney(int amount) => DrugMoney -= amount; + /// + public void SetDrugMoney(int amount) => DrugMoney = amount; #endregion } diff --git a/Interfaces/IDealerStash.cs b/Interfaces/IDealerStash.cs index 2fcc0828..9fef45b5 100644 --- a/Interfaces/IDealerStash.cs +++ b/Interfaces/IDealerStash.cs @@ -57,4 +57,9 @@ public interface IDealerStash /// /// void RemoveDrugMoney(int amount); + /// + /// The method sets the amount x to the property + /// + /// + void SetDrugMoney(int amount); } diff --git a/Los.Santos.Dope.Wars.csproj b/Los.Santos.Dope.Wars.csproj index b10d038c..3a17033e 100644 --- a/Los.Santos.Dope.Wars.csproj +++ b/Los.Santos.Dope.Wars.csproj @@ -17,6 +17,16 @@ Debug;Release True true + https://github.com/BoBoBaSs84/Los.Santos.Dope.Wars + https://github.com/BoBoBaSs84/Los.Santos.Dope.Wars + git + README.md + D:\Source\Los.Santos.Dope.Wars\LICENSE + gtav;gtav-mod;gta5-mode;scripthoohvdotnet;dopewars;lemonui + The modification is an attempt to bring the "trade" game mechanics from Chinatown Wars to the fictional state of San Andreas. + Copyright © 2022 BoBoBaSs84 + BoBoBaSs84 + $(AssemblyName).$(VersionPrefix) @@ -38,4 +48,15 @@ + + + True + \ + + + + + + + diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index ea52eca0..a52e631e 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -1,15 +1,15 @@ using System.Reflection; using System.Runtime.InteropServices; -[assembly: AssemblyCompany("Los.Santos.Dope.Wars")] +[assembly: AssemblyCompany("BoBoBaSs84")] +[assembly: AssemblyCopyright("Copyright © 2022 BoBoBaSs84")] +[assembly: AssemblyDescription("The modification is an attempt to bring the \"trade\" game mechanics from Chinatown Wars to the fictional state of San Andreas.")] [assembly: AssemblyProduct("Los.Santos.Dope.Wars")] -[assembly: AssemblyDescription("Grand Theft Auto V - Los Santos Dope Wars")] [assembly: AssemblyTitle("Los.Santos.Dope.Wars")] [assembly: AssemblyVersion("1.1.*")] -[assembly: AssemblyCopyright("Copyright © 2022")] +[assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/BoBoBaSs84/Los.Santos.Dope.Wars")] [assembly: Guid("38E8CEE1-3992-441E-A494-9FEF5CAEDB9E")] [assembly: ComVisible(false)] - #if (DEBUG) [assembly: AssemblyConfiguration("Debug")] #else