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

Standardise project & streamline build #1

Merged
merged 10 commits into from Jul 10, 2017
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
@@ -0,0 +1,2 @@
# always normalise line endings
* text=auto
25 changes: 25 additions & 0 deletions .gitignore
@@ -0,0 +1,25 @@
# user-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# build results
[Dd]ebug/
[Rr]elease/
[Bb]in/
[Oo]bj/

# Visual Studio cache/options
.vs/

# ReSharper
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# NuGet packages
*.nupkg
**/packages/*
*.nuget.props
*.nuget.targets
47 changes: 16 additions & 31 deletions M007_ExtendedFridge.csproj → ExtendedFridge/ExtendedFridge.csproj
Expand Up @@ -5,17 +5,18 @@
<ProjectGuid>{32D49FEF-8AB9-4A4F-8429-67996E628D67}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<AssemblyName>M007_ExtendedFridge</AssemblyName>
<AssemblyName>ExtendedFridge</AssemblyName>
<OutputType>Library</OutputType>
<RootNamespace>M007_ExtendedFridge</RootNamespace>
<RootNamespace>ExtendedFridge</RootNamespace>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<DeployModFolderName>ExtendedFridge</DeployModFolderName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>D:\Program Files %28x86%29\Steam\SteamApps\common\Stardew Valley\Mods\M007_ExtendedFridge\</OutputPath>
<OutputPath>bin\Debug</OutputPath>
<DebugSymbols>true</DebugSymbols>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>false</Optimize>
Expand All @@ -25,7 +26,7 @@
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>D:\Program Files %28x86%29\Steam\SteamApps\common\Stardew Valley\Mods\M007_ExtendedFridge\</OutputPath>
<OutputPath>bin\Release</OutputPath>
<DebugSymbols>false</DebugSymbols>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
Expand All @@ -35,35 +36,8 @@
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Game">
<HintPath>.\SDV_ShopTestReferences\Microsoft.Xna.Framework.Game.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Graphics.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Stardew Valley">
<HintPath>D:\Program Files (x86)\Steam\SteamApps\common\Stardew Valley\Stardew Valley.exe</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="StardewModdingAPI">
<HintPath>D:\Program Files (x86)\Steam\SteamApps\common\Stardew Valley\StardewModdingAPI.exe</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.XML" />
<Reference Include="xTile">
<HintPath>D:\Program Files (x86)\Steam\SteamApps\common\Stardew Valley\xTile.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="FridgeGrabMenu.cs" />
Expand All @@ -84,5 +58,16 @@
<DesignTimeSharedInput>false</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="manifest.json" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Pathoschild.Stardew.ModBuildConfig.1.6.1\build\Pathoschild.Stardew.ModBuildConfig.targets" Condition="Exists('..\packages\Pathoschild.Stardew.ModBuildConfig.1.6.1\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.1.6.1\build\Pathoschild.Stardew.ModBuildConfig.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Pathoschild.Stardew.ModBuildConfig.1.6.1\build\Pathoschild.Stardew.ModBuildConfig.targets'))" />
</Target>
</Project>
13 changes: 5 additions & 8 deletions FridgeChest.cs → ExtendedFridge/FridgeChest.cs
@@ -1,15 +1,12 @@
using Microsoft.Xna.Framework;
using StardewValley;
using StardewValley.Menus;
using StardewValley.Objects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using StardewValley;
using StardewValley.Menus;

namespace M007_ExtendedFridge
namespace ExtendedFridge
{
public class FridgeChest
internal class FridgeChest
{
public readonly int MAX_CAPACITY = ITEMS_PER_PAGE * MAX_ITEM_PAGE;
public const int ITEMS_PER_PAGE = 36;
Expand Down Expand Up @@ -186,7 +183,7 @@ public void clearNulls()

private string GetPageString()
{
return String.Format("Extended Fridge 0.96 SMAPI 1.15 | Current Page: {0} | {1} items in fridge", (currentpage + 1).ToString(), this.items.Count);
return String.Format("Extended Fridge {0} | Current Page: {1} | {2} items in fridge", M007_ExtendedFridge_Mod.Version, (currentpage + 1), this.items.Count);
}


Expand Down
9 changes: 2 additions & 7 deletions FridgeGrabMenu.cs → ExtendedFridge/FridgeGrabMenu.cs
@@ -1,13 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

using StardewValley;
using StardewValley.Buildings;
using StardewValley.Menus;
Expand All @@ -16,9 +11,9 @@
//using xTile.Dimensions;


namespace M007_ExtendedFridge
namespace ExtendedFridge
{
public class FridgeGrabMenu : MenuWithInventory
internal class FridgeGrabMenu : MenuWithInventory
{
public const int region_itemsToGrabMenuModifier = 53910;

Expand Down
11 changes: 2 additions & 9 deletions FridgeModConfig.cs → ExtendedFridge/FridgeModConfig.cs
@@ -1,11 +1,6 @@
using StardewValley;
using StardewValley.Menus;
using System;
using System.Collections.Generic;

namespace M007_ExtendedFridge
namespace ExtendedFridge
{
public class FridgeModConfig
internal class FridgeModConfig
{
public string fridgePrevPageKey {get; set;}
public string fridgeNextPageKey {get; set;}
Expand All @@ -17,7 +12,5 @@ public FridgeModConfig()
fridgePrevPageKey = "Left";
autoSwitchPageOnGrab = true;
}

}

}
25 changes: 9 additions & 16 deletions M007_ExtendedFridge.cs → ExtendedFridge/M007_ExtendedFridge.cs
@@ -1,32 +1,25 @@
using System;
using System.Reflection;
using System.Linq;

using StardewModdingAPI;
using StardewModdingAPI.Events;
using StardewValley;
using StardewValley.Locations;
using StardewValley.Menus;

using StardewModdingAPI;
using StardewModdingAPI.Events;

namespace M007_ExtendedFridge
namespace ExtendedFridge
{
public class M007_ExtendedFridge_Mod : Mod
{
public static FridgeChest _fridge;
public static FridgeModConfig config;

public static bool IsInFridgeMenu = false;
public static readonly int FRIDGE_TILE_ID = 173;

public M007_ExtendedFridge_Mod()
{
}
private static FridgeChest _fridge;
private static FridgeModConfig config;
internal static ISemanticVersion Version;
private static bool IsInFridgeMenu = false;
private static readonly int FRIDGE_TILE_ID = 173;

public override void Entry(IModHelper helper)
{
var modPath = Helper.DirectoryPath;
config = Helper.ReadConfig<FridgeModConfig>();
Version = this.ModManifest.Version;

MenuEvents.MenuChanged += Event_MenuChanged;

Expand Down
10 changes: 10 additions & 0 deletions ExtendedFridge/Properties/AssemblyInfo.cs
@@ -0,0 +1,10 @@
using System.Reflection;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("Crystalmir.ExtendedFridge")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyProduct("Crystalmir.StardewMods")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: Guid("e15d4c4a-d9d7-4113-a069-40ece09ec443")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
13 changes: 13 additions & 0 deletions ExtendedFridge/manifest.json
@@ -0,0 +1,13 @@
{
"Name": "Extended Fridge",
"Author": "Crystalmir",
"Version": {
"MajorVersion": 1,
"MinorVersion": 1,
"PatchVersion": 0,
"Build": null
},
"Description": "Lets you add more items to the fridge.",
"UniqueID": "Crystalmir.ExtendedFridge",
"EntryDll": "ExtendedFridge.dll"
}
4 changes: 4 additions & 0 deletions ExtendedFridge/packages.config
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Pathoschild.Stardew.ModBuildConfig" version="1.6.1" targetFramework="net45" />
</packages>
20 changes: 0 additions & 20 deletions Properties/AssemblyInfo.cs

This file was deleted.

2 changes: 1 addition & 1 deletion SDV_ShopTest.sln → StardewMods.sln
Expand Up @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.40629.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "M007_ExtendedFridge", "M007_ExtendedFridge.csproj", "{32D49FEF-8AB9-4A4F-8429-67996E628D67}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtendedFridge", "ExtendedFridge/ExtendedFridge.csproj", "{32D49FEF-8AB9-4A4F-8429-67996E628D67}"
EndProject
Global
GlobalSection(TeamFoundationVersionControl) = preSolution
Expand Down