Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this should fix the add instead of set drug money bug #22

Merged
merged 1 commit into from
Aug 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Classes/DealerStash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
/// <inheritdoc/>
public void RestockQuantity(PlayerStats playerStats, GameSettings gameSettings, bool isDrugLord = false)
Expand Down Expand Up @@ -107,5 +107,7 @@ public void SellDrug(string drugName, int drugQuantity, int drugPrice)
public void AddDrugMoney(int amount) => DrugMoney += amount;
/// <inheritdoc/>
public void RemoveDrugMoney(int amount) => DrugMoney -= amount;
/// <inheritdoc/>
public void SetDrugMoney(int amount) => DrugMoney = amount;
#endregion
}
5 changes: 5 additions & 0 deletions Interfaces/IDealerStash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,9 @@ public interface IDealerStash
/// </summary>
/// <param name="amount"></param>
void RemoveDrugMoney(int amount);
/// <summary>
/// The <see cref="SetDrugMoney(int)"/> method sets the amount x to the <see cref="DrugMoney"/> property
/// </summary>
/// <param name="amount"></param>
void SetDrugMoney(int amount);
}
21 changes: 21 additions & 0 deletions Los.Santos.Dope.Wars.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@
<Configurations>Debug;Release</Configurations>
<ProduceReferenceAssembly>True</ProduceReferenceAssembly>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageProjectUrl>https://github.com/BoBoBaSs84/Los.Santos.Dope.Wars</PackageProjectUrl>
<RepositoryUrl>https://github.com/BoBoBaSs84/Los.Santos.Dope.Wars</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseFile>D:\Source\Los.Santos.Dope.Wars\LICENSE</PackageLicenseFile>
<PackageTags>gtav;gtav-mod;gta5-mode;scripthoohvdotnet;dopewars;lemonui</PackageTags>
<Description>The modification is an attempt to bring the "trade" game mechanics from Chinatown Wars to the fictional state of San Andreas.</Description>
<Copyright>Copyright © 2022 BoBoBaSs84</Copyright>
<Company>BoBoBaSs84</Company>
<PackageId>$(AssemblyName).$(VersionPrefix)</PackageId>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -38,4 +48,15 @@
<Using Remove="System.Net.Http" />
</ItemGroup>

<ItemGroup>
<None Update="README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="COPY &quot;$(TargetPath)&quot; &quot;C:\Program Files (x86)\Steam\steamapps\common\Grand Theft Auto V\scripts&quot;" />
</Target>

</Project>
8 changes: 4 additions & 4 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down