Update to v1.0.2, Clean up Repository
This commit is contained in:
parent
e7f366153b
commit
012dfe0232
1030
.vs/config/applicationhost.config
Normal file
1030
.vs/config/applicationhost.config
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,71 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{E410EFA1-3C40-4EF3-9E87-6A32F6A05735}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Fix_sellToStorePrice</RootNamespace>
|
||||
<AssemblyName>Fix-sellToStorePrice</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Netcode">
|
||||
<HintPath>C:\SteamLibrary\steamapps\common\Stardew Valley\Netcode.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ModEntry.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="manifest.json" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="lib\0Harmony.dll" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="..\packages\Pathoschild.Stardew.ModBuildConfig.2.0.2\build\Pathoschild.Stardew.ModBuildConfig.targets" Condition="Exists('..\packages\Pathoschild.Stardew.ModBuildConfig.2.0.2\build\Pathoschild.Stardew.ModBuildConfig.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Pathoschild.Stardew.ModBuildConfig.2.0.2\build\Pathoschild.Stardew.ModBuildConfig.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Pathoschild.Stardew.ModBuildConfig.2.0.2\build\Pathoschild.Stardew.ModBuildConfig.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
@ -7,8 +7,8 @@
|
||||
<ProjectGuid>{E410EFA1-3C40-4EF3-9E87-6A32F6A05735}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Fix_sellToStorePrice</RootNamespace>
|
||||
<AssemblyName>Fix-sellToStorePrice</AssemblyName>
|
||||
<RootNamespace>improvedSellingInMultiplayer</RootNamespace>
|
||||
<AssemblyName>improvedSellingInMultiplayer</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<NuGetPackageImportStamp>
|
||||
|
@ -10,7 +10,7 @@ using Harmony;
|
||||
using System.Collections.Generic;
|
||||
using Netcode;
|
||||
|
||||
namespace Fix_sellToStorePrice
|
||||
namespace improvedSellingInMultiplayer
|
||||
{
|
||||
public class ModEntry : Mod
|
||||
{
|
||||
|
@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Fix_sellToStorePrice")]
|
||||
[assembly: AssemblyTitle("improvedSellingInMultiplayer")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Fix_sellToStorePrice")]
|
||||
[assembly: AssemblyProduct("improvedSellingInMultiplayer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.0.2.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.2.0")]
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,10 +1,10 @@
|
||||
{
|
||||
"Name": "Fix_sellToStorePrice",
|
||||
"Name": "improvedSellingInMultiplayer",
|
||||
"Author": "Unremarkable",
|
||||
"Version": "1.0.0",
|
||||
"Description": "Causes the game to use everyone's professions when calculating sell price",
|
||||
"UniqueID": "unremarkable.fix-sellToStorePrice",
|
||||
"EntryDll": "Fix-sellToStorePrice.dll",
|
||||
"MinimumApiVersion": "2.6-beta.5",
|
||||
"UpdateKeys": []
|
||||
"Version": "1.0.2",
|
||||
"Description": "Causes the game to use everyone's professions when calculating sell price only once overall",
|
||||
"UniqueID": "unremarkable.improvedsellinginmultiplayer",
|
||||
"EntryDll": "improvedSellingInMultiplayer.dll",
|
||||
"MinimumApiVersion": "2.6-beta.15",
|
||||
"UpdateKeys": [ "Nexus:2333" ]
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
E:\External Files\Documents\Visual Studio 2015\Projects\Stardew-Valley-Multiplayer-Sell-Price-Fix-master\Stardew-Valley-Multiplayer-Sell-Price-Fix-master\Fix-sellToStorePrice\obj\Debug\Fix-sellToStorePrice.csprojResolveAssemblyReference.cache
|
||||
E:\External Files\Documents\Visual Studio 2015\Projects\SDV-Multiplayer-Sell-Price-Fix\Fix-sellToStorePrice\bin\Debug\Fix-sellToStorePrice.dll
|
||||
E:\External Files\Documents\Visual Studio 2015\Projects\SDV-Multiplayer-Sell-Price-Fix\Fix-sellToStorePrice\bin\Debug\Fix-sellToStorePrice.pdb
|
||||
E:\External Files\Documents\Visual Studio 2015\Projects\SDV-Multiplayer-Sell-Price-Fix\Fix-sellToStorePrice\bin\Debug\0Harmony.dll
|
||||
E:\External Files\Documents\Visual Studio 2015\Projects\SDV-Multiplayer-Sell-Price-Fix\Fix-sellToStorePrice\obj\Debug\Fix-sellToStorePrice.dll
|
||||
E:\External Files\Documents\Visual Studio 2015\Projects\SDV-Multiplayer-Sell-Price-Fix\Fix-sellToStorePrice\obj\Debug\Fix-sellToStorePrice.pdb
|
||||
C:\Users\Cor\Documents\GitHub\SDV-Multiplayer-Fixed-Selling\Fix-sellToStorePrice\bin\Debug\improvedSellingInMultiplayer.dll
|
||||
C:\Users\Cor\Documents\GitHub\SDV-Multiplayer-Fixed-Selling\Fix-sellToStorePrice\bin\Debug\improvedSellingInMultiplayer.pdb
|
||||
C:\Users\Cor\Documents\GitHub\SDV-Multiplayer-Fixed-Selling\Fix-sellToStorePrice\bin\Debug\0Harmony.dll
|
||||
C:\Users\Cor\Documents\GitHub\SDV-Multiplayer-Fixed-Selling\Fix-sellToStorePrice\bin\Debug\0Harmony.pdb
|
||||
C:\Users\Cor\Documents\GitHub\SDV-Multiplayer-Fixed-Selling\Fix-sellToStorePrice\obj\Debug\Fix-sellToStorePrice.csprojResolveAssemblyReference.cache
|
||||
C:\Users\Cor\Documents\GitHub\SDV-Multiplayer-Fixed-Selling\Fix-sellToStorePrice\obj\Debug\improvedSellingInMultiplayer.dll
|
||||
C:\Users\Cor\Documents\GitHub\SDV-Multiplayer-Fixed-Selling\Fix-sellToStorePrice\obj\Debug\improvedSellingInMultiplayer.pdb
|
||||
|
@ -1,6 +1,6 @@
|
||||
E:\External Files\Documents\Visual Studio 2015\Projects\SDV-Multiplayer-Sell-Price-Fix\Fix-sellToStorePrice\bin\Release\Fix-sellToStorePrice.dll
|
||||
E:\External Files\Documents\Visual Studio 2015\Projects\SDV-Multiplayer-Sell-Price-Fix\Fix-sellToStorePrice\bin\Release\Fix-sellToStorePrice.pdb
|
||||
E:\External Files\Documents\Visual Studio 2015\Projects\SDV-Multiplayer-Sell-Price-Fix\Fix-sellToStorePrice\bin\Release\0Harmony.dll
|
||||
E:\External Files\Documents\Visual Studio 2015\Projects\SDV-Multiplayer-Sell-Price-Fix\Fix-sellToStorePrice\bin\Release\0Harmony.pdb
|
||||
E:\External Files\Documents\Visual Studio 2015\Projects\SDV-Multiplayer-Sell-Price-Fix\Fix-sellToStorePrice\obj\Release\Fix-sellToStorePrice.dll
|
||||
E:\External Files\Documents\Visual Studio 2015\Projects\SDV-Multiplayer-Sell-Price-Fix\Fix-sellToStorePrice\obj\Release\Fix-sellToStorePrice.pdb
|
||||
E:\External Files\Documents\Visual Studio 2015\Projects\SDV-Multiplayer-Sell-Price-Fix\Fix-sellToStorePrice\bin\Release\improvedSellingInMultiplayer.dll
|
||||
E:\External Files\Documents\Visual Studio 2015\Projects\SDV-Multiplayer-Sell-Price-Fix\Fix-sellToStorePrice\bin\Release\improvedSellingInMultiplayer.pdb
|
||||
E:\External Files\Documents\Visual Studio 2015\Projects\SDV-Multiplayer-Sell-Price-Fix\Fix-sellToStorePrice\obj\Release\improvedSellingInMultiplayer.dll
|
||||
E:\External Files\Documents\Visual Studio 2015\Projects\SDV-Multiplayer-Sell-Price-Fix\Fix-sellToStorePrice\obj\Release\improvedSellingInMultiplayer.pdb
|
||||
|
89
ModEntry.cs
89
ModEntry.cs
@ -1,89 +0,0 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
using StardewValley;
|
||||
|
||||
using StardewModdingAPI;
|
||||
|
||||
using Harmony;
|
||||
using System.Collections.Generic;
|
||||
using Netcode;
|
||||
|
||||
namespace Fix_sellToStorePrice
|
||||
{
|
||||
public class ModEntry : Mod
|
||||
{
|
||||
public override void Entry(IModHelper helper)
|
||||
{
|
||||
var harmony = HarmonyInstance.Create("ca.drau.stardewvalley");
|
||||
harmony.PatchAll(Assembly.GetExecutingAssembly());
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(StardewValley.Object))]
|
||||
[HarmonyPatch("sellToStorePrice")]
|
||||
class Patch
|
||||
{
|
||||
static bool Prefix()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static void Postfix(StardewValley.Object __instance, ref int __result)
|
||||
{
|
||||
HashSet<int> professions = new HashSet<int>();
|
||||
|
||||
professions.UnionWith(Game1.player.professions);
|
||||
|
||||
foreach (Farmer farmer in Game1.otherFarmers.Values)
|
||||
{
|
||||
professions.UnionWith(farmer.professions);
|
||||
}
|
||||
|
||||
// Begin copy-pasta
|
||||
|
||||
if (__instance is Fence)
|
||||
{
|
||||
__result = (int)((NetFieldBase<int, NetInt>)__instance.price);
|
||||
return;
|
||||
}
|
||||
|
||||
if (__instance.Category == -22)
|
||||
{
|
||||
__result = (int)((double)(int)((NetFieldBase<int, NetInt>)__instance.price) * (1.0 + (double)(int)((NetFieldBase<int, NetInt>)__instance.quality) * 0.25) * (double)__instance.scale.Y);
|
||||
return;
|
||||
}
|
||||
|
||||
float num = (float)(int)((double)(int)((NetFieldBase<int, NetInt>)__instance.price) * (1.0 + (double)(int)((NetFieldBase<int, NetInt>)__instance.quality) * 0.25));
|
||||
bool flag = false;
|
||||
if (__instance.name.ToLower().Contains("mayonnaise") || __instance.name.ToLower().Contains("cheese") || (__instance.name.ToLower().Contains("cloth") || __instance.name.ToLower().Contains("wool")))
|
||||
flag = true;
|
||||
if (professions.Contains(0) && (flag || __instance.Category == -5 || (__instance.Category == -6 || __instance.Category == -18)))
|
||||
num *= 1.2f;
|
||||
if (professions.Contains(1) && (__instance.Category == -75 || __instance.Category == -80 || __instance.Category == -79 && !(bool)((NetFieldBase<bool, NetBool>)__instance.isSpawnedObject)))
|
||||
num *= 1.1f;
|
||||
if (professions.Contains(4) && __instance.Category == -26)
|
||||
num *= 1.4f;
|
||||
if (professions.Contains(6) && __instance.Category == -4)
|
||||
num *= professions.Contains(8) ? 1.5f : 1.25f;
|
||||
if (professions.Contains(12) && ((int)((NetFieldBase<int, NetInt>)__instance.parentSheetIndex) == 388 || (int)((NetFieldBase<int, NetInt>)__instance.parentSheetIndex) == 709))
|
||||
num *= 1.5f;
|
||||
if (professions.Contains(15) && __instance.Category == -27)
|
||||
num *= 1.25f;
|
||||
if (professions.Contains(20) && (int)((NetFieldBase<int, NetInt>)__instance.parentSheetIndex) >= 334 && (int)((NetFieldBase<int, NetInt>)__instance.parentSheetIndex) <= 337)
|
||||
num *= 1.5f;
|
||||
if (professions.Contains(23) && (__instance.Category == -2 || __instance.Category == -12))
|
||||
num *= 1.3f;
|
||||
if (Game1.player.eventsSeen.Contains(2120303) && ((int)((NetFieldBase<int, NetInt>)__instance.parentSheetIndex) == 296 || (int)((NetFieldBase<int, NetInt>)__instance.parentSheetIndex) == 410))
|
||||
num *= 3f;
|
||||
if (Game1.player.eventsSeen.Contains(3910979) && (int)((NetFieldBase<int, NetInt>)__instance.parentSheetIndex) == 399)
|
||||
num *= 5f;
|
||||
if ((int)((NetFieldBase<int, NetInt>)__instance.parentSheetIndex) == 493)
|
||||
num /= 2f;
|
||||
if ((double)num > 0.0)
|
||||
num = Math.Max(1f, num * Game1.MasterPlayer.difficultyModifier);
|
||||
__result = (int)num;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Fix_sellToStorePrice")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Fix_sellToStorePrice")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("e410efa1-3c40-4ef3-9e87-6a32f6a05735")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
"Name": "Fix_sellToStorePrice",
|
||||
"Author": "Unremarkable",
|
||||
"Version": "1.0.0",
|
||||
"Description": "Causes the game to use everyone's professions when calculating sell price",
|
||||
"UniqueID": "unremarkable.fix-sellToStorePrice",
|
||||
"EntryDll": "Fix_sellToStorePrice.dll",
|
||||
"MinimumApiVersion": "2.6-beta.5",
|
||||
"UpdateKeys": []
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Pathoschild.Stardew.ModBuildConfig" version="2.0.2" targetFramework="net45" />
|
||||
</packages>
|
Loading…
x
Reference in New Issue
Block a user