Forgot to clean out junk mods. However Stardew Symphony has been updated to support hourly music.

This commit is contained in:
JoshuaNavarro 2019-05-13 10:59:26 -07:00
parent e62610631d
commit e4c734a1d7
48 changed files with 648 additions and 20 deletions

View File

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StardewModdingAPI;
using StardewModdingAPI.Events;
using StardewValley;
using xTile;
namespace MapExampleRF1
{
public class Class1 : Mod
{
public override void Entry(IModHelper helper)
{
// the game clears locations when loading the save, so do it after the save loads
helper.Events.GameLoop.SaveLoaded += this.OnSaveLoaded;
}
private void OnSaveLoaded(object sender, SaveLoadedEventArgs args)
{
// load the map file from your mod folder
this.Helper.Content.Load<Map>("assets/RF1Farm.tbin", ContentSource.ModFolder);
// get the internal asset key for the map file
string mapAssetKey = this.Helper.Content.GetActualAssetKey("assets/RF1Farm.tbin", ContentSource.ModFolder);
// add the new location
GameLocation location = new GameLocation(mapAssetKey, "RF1Farm") { IsOutdoors = false, IsFarm = false };
Game1.locations.Add(location);
}
}
}

View File

@ -0,0 +1,64 @@
<?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>{696CDAA9-295F-49F0-97F9-334F626EA137}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MapExampleRF1</RootNamespace>
<AssemblyName>MapExampleRF1</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</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>
</PropertyGroup>
<ItemGroup>
<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="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="manifest.json" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\Pathoschild.Stardew.ModBuildConfig.2.2.0\analyzers\dotnet\cs\StardewModdingAPI.ModBuildConfig.Analyzer.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Pathoschild.Stardew.ModBuildConfig.2.2.0\build\Pathoschild.Stardew.ModBuildConfig.targets" Condition="Exists('..\packages\Pathoschild.Stardew.ModBuildConfig.2.2.0\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.2.0\build\Pathoschild.Stardew.ModBuildConfig.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Pathoschild.Stardew.ModBuildConfig.2.2.0\build\Pathoschild.Stardew.ModBuildConfig.targets'))" />
</Target>
</Project>

View File

@ -0,0 +1,36 @@
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("MapExampleRF1")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MapExampleRF1")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[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("696cdaa9-295f-49f0-97f9-334f626ea137")]
// 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")]

View File

@ -0,0 +1,10 @@
{
"Name": "RF1MapExample",
"Author": "Alpha_Omegasis",
"Version": "0.0.1",
"Description": "I was bored.",
"UniqueID": "Omegasis.RF1Map",
"EntryDll": "MapExampleRF1.dll",
"MinimumApiVersion": "2.10.1",
"UpdateKeys": [ "" ]
}

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Pathoschild.Stardew.ModBuildConfig" version="2.2.0" targetFramework="net461" />
</packages>

View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.489
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MappingExample", "MappingExample\MappingExample.csproj", "{9A1AE9A3-D593-443A-985F-5BB43590CD63}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9A1AE9A3-D593-443A-985F-5BB43590CD63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A1AE9A3-D593-443A-985F-5BB43590CD63}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A1AE9A3-D593-443A-985F-5BB43590CD63}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A1AE9A3-D593-443A-985F-5BB43590CD63}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F8F5CF98-7807-4798-954F-B4A281A1ABE4}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,8 @@
using System;
namespace MappingExample
{
public class Class1
{
}
}

View File

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.489
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MappingExampleTry2", "MappingExampleTry2\MappingExampleTry2.csproj", "{762317CC-06EF-4EF3-952E-6066F02505F6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{762317CC-06EF-4EF3-952E-6066F02505F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{762317CC-06EF-4EF3-952E-6066F02505F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{762317CC-06EF-4EF3-952E-6066F02505F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{762317CC-06EF-4EF3-952E-6066F02505F6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6DC711D7-66B3-4C29-A02C-36A2B3BE71C5}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MappingExampleTry2
{
public class Class1
{
}
}

View File

@ -0,0 +1,54 @@
<?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>762317cc-06ef-4ef3-952e-6066f02505f6</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MappingExampleTry2</RootNamespace>
<AssemblyName>MappingExampleTry2</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</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>
</PropertyGroup>
<ItemGroup>
<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="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,36 @@
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("MappingExampleTry2")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MappingExampleTry2")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[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("762317cc-06ef-4ef3-952e-6066f02505f6")]
// 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")]

View File

@ -55,7 +55,7 @@ namespace Revitalize.Framework.Objects
/// <summary>Empty constructor.</summary> /// <summary>Empty constructor.</summary>
public CustomObject() { public CustomObject() {
this.guid = Guid.NewGuid(); this.guid = Guid.NewGuid();
InitNetFields(); this.InitNetFields();
} }
/// <summary>Construct an instance.</summary> /// <summary>Construct an instance.</summary>
@ -94,7 +94,7 @@ namespace Revitalize.Framework.Objects
this.bigCraftable.Value = false; this.bigCraftable.Value = false;
//this.initNetFields(); //this.initNetFields();
InitNetFields(); this.InitNetFields();
//if (this.info.ignoreBoundingBox) //if (this.info.ignoreBoundingBox)
// this.boundingBox.Value = new Rectangle(int.MinValue, int.MinValue, 0, 0); // this.boundingBox.Value = new Rectangle(int.MinValue, int.MinValue, 0, 0);
} }
@ -253,9 +253,9 @@ namespace Revitalize.Framework.Objects
else if (this.info.facingDirection == Enums.Direction.Up) this.info.facingDirection = Enums.Direction.Left; else if (this.info.facingDirection == Enums.Direction.Up) this.info.facingDirection = Enums.Direction.Left;
else if (this.info.facingDirection == Enums.Direction.Left) this.info.facingDirection = Enums.Direction.Down; else if (this.info.facingDirection == Enums.Direction.Left) this.info.facingDirection = Enums.Direction.Down;
if (this.info.animationManager.animations.ContainsKey(generateRotationalAnimationKey())) if (this.info.animationManager.animations.ContainsKey(this.generateRotationalAnimationKey()))
{ {
this.info.animationManager.setAnimation(generateRotationalAnimationKey()); this.info.animationManager.setAnimation(this.generateRotationalAnimationKey());
} }
else else
{ {

View File

@ -55,7 +55,7 @@ namespace Revitalize.Framework.Objects.Furniture
{ {
this.containerObject.rotate(); //Ensure that all of the chair pieces rotate at the same time. this.containerObject.rotate(); //Ensure that all of the chair pieces rotate at the same time.
checkForSpecialUpSittingAnimation(); this.checkForSpecialUpSittingAnimation();
return true; return true;
//return base.rightClicked(who); //return base.rightClicked(who);
} }

View File

@ -128,7 +128,7 @@ namespace Revitalize
customObjects = new Dictionary<string, CustomObject>(); customObjects = new Dictionary<string, CustomObject>();
ObjectGroups = new Dictionary<string, MultiTiledObject>(); ObjectGroups = new Dictionary<string, MultiTiledObject>();
loadContent(); this.loadContent();
Serializer = new Serializer(); Serializer = new Serializer();
ObjectsToDraw = new Dictionary<GameLocation, MultiTiledObject>(); ObjectsToDraw = new Dictionary<GameLocation, MultiTiledObject>();
@ -296,8 +296,8 @@ namespace Revitalize
throw new Exception("Can't run Revitalize in multiplayer due to lack of current support!"); throw new Exception("Can't run Revitalize in multiplayer due to lack of current support!");
} }
//Game1.player.addItemToInventory(customObjects["Omegasis.BigTiledTest"].getOne()); //Game1.player.addItemToInventory(customObjects["Omegasis.BigTiledTest"].getOne());
Game1.player.addItemToInventory(getObjectFromPool("Omegasis.Revitalize.Furniture.Chairs.OakChair")); Game1.player.addItemToInventory(this.getObjectFromPool("Omegasis.Revitalize.Furniture.Chairs.OakChair"));
Game1.player.addItemToInventory(getObjectFromPool("Omegasis.Revitalize.Furniture.Rugs.RugTest")); Game1.player.addItemToInventory(this.getObjectFromPool("Omegasis.Revitalize.Furniture.Rugs.RugTest"));
/* /*
StardewValley.Tools.Axe axe = new StardewValley.Tools.Axe(); StardewValley.Tools.Axe axe = new StardewValley.Tools.Axe();

View File

@ -77,6 +77,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vocalization", "Vocalizatio
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Revitalize", "Revitalize\Revitalize.csproj", "{44EF6CEC-FBF1-4B45-8135-81D4EBE84DDD}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Revitalize", "Revitalize\Revitalize.csproj", "{44EF6CEC-FBF1-4B45-8135-81D4EBE84DDD}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MapExampleRF1", "MapExampleRF1\MapExampleRF1.csproj", "{696CDAA9-295F-49F0-97F9-334F626EA137}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -387,6 +389,18 @@ Global
{44EF6CEC-FBF1-4B45-8135-81D4EBE84DDD}.x86|Any CPU.Build.0 = Release|Any CPU {44EF6CEC-FBF1-4B45-8135-81D4EBE84DDD}.x86|Any CPU.Build.0 = Release|Any CPU
{44EF6CEC-FBF1-4B45-8135-81D4EBE84DDD}.x86|x86.ActiveCfg = Release|Any CPU {44EF6CEC-FBF1-4B45-8135-81D4EBE84DDD}.x86|x86.ActiveCfg = Release|Any CPU
{44EF6CEC-FBF1-4B45-8135-81D4EBE84DDD}.x86|x86.Build.0 = Release|Any CPU {44EF6CEC-FBF1-4B45-8135-81D4EBE84DDD}.x86|x86.Build.0 = Release|Any CPU
{696CDAA9-295F-49F0-97F9-334F626EA137}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{696CDAA9-295F-49F0-97F9-334F626EA137}.Debug|Any CPU.Build.0 = Debug|Any CPU
{696CDAA9-295F-49F0-97F9-334F626EA137}.Debug|x86.ActiveCfg = Debug|Any CPU
{696CDAA9-295F-49F0-97F9-334F626EA137}.Debug|x86.Build.0 = Debug|Any CPU
{696CDAA9-295F-49F0-97F9-334F626EA137}.Release|Any CPU.ActiveCfg = Release|Any CPU
{696CDAA9-295F-49F0-97F9-334F626EA137}.Release|Any CPU.Build.0 = Release|Any CPU
{696CDAA9-295F-49F0-97F9-334F626EA137}.Release|x86.ActiveCfg = Release|Any CPU
{696CDAA9-295F-49F0-97F9-334F626EA137}.Release|x86.Build.0 = Release|Any CPU
{696CDAA9-295F-49F0-97F9-334F626EA137}.x86|Any CPU.ActiveCfg = Release|Any CPU
{696CDAA9-295F-49F0-97F9-334F626EA137}.x86|Any CPU.Build.0 = Release|Any CPU
{696CDAA9-295F-49F0-97F9-334F626EA137}.x86|x86.ActiveCfg = Release|Any CPU
{696CDAA9-295F-49F0-97F9-334F626EA137}.x86|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -72,6 +72,7 @@ namespace StardewSymphonyRemastered.Framework.Menus
public int festivalPageIndex; public int festivalPageIndex;
public int eventPageIndex; public int eventPageIndex;
public int menuPageIndex; public int menuPageIndex;
public int timePageIndex;
public List<Button> fancyButtons; //List that holds all of the buttons for the fancy album menu. public List<Button> fancyButtons; //List that holds all of the buttons for the fancy album menu.
public int framesSinceLastUpdate; //Used to control how fast we can cycle through the menu. public int framesSinceLastUpdate; //Used to control how fast we can cycle through the menu.
@ -128,6 +129,7 @@ namespace StardewSymphonyRemastered.Framework.Menus
this.menuPageIndex = 0; this.menuPageIndex = 0;
this.festivalPageIndex = 0; this.festivalPageIndex = 0;
this.eventPageIndex = 0; this.eventPageIndex = 0;
this.timePageIndex = 0;
this.drawMode = DrawMode.AlbumFancySelection; this.drawMode = DrawMode.AlbumFancySelection;
this.updateFancyButtons(); this.updateFancyButtons();
@ -314,6 +316,34 @@ namespace StardewSymphonyRemastered.Framework.Menus
else else
this.framesSinceLastUpdate++; this.framesSinceLastUpdate++;
} }
if (this.drawMode == DrawMode.TimeSelection)
{
if (this.framesSinceLastUpdate == updateNumber)
{
var state = Keyboard.GetState();
if (state.IsKeyDown(Keys.Left) || state.IsKeyDown(Keys.A))
{
if (this.timePageIndex > 0)
this.timePageIndex--;
this.updateFancyButtons();
this.framesSinceLastUpdate = 0;
Game1.playSound("shwip");
}
if (state.IsKeyDown(Keys.Right) || state.IsKeyDown(Keys.D))
{
this.timePageIndex++;
this.updateFancyButtons();
this.framesSinceLastUpdate = 0;
Game1.playSound("shwip");
}
}
else
this.framesSinceLastUpdate++;
}
} }
@ -708,8 +738,57 @@ namespace StardewSymphonyRemastered.Framework.Menus
} }
float scale = 1.00f / (texture.getTexture().Width / 64f); float scale = 1.00f / (texture.getTexture().Width / 64f);
Rectangle srcRect = new Rectangle(0, 0, texture.getTexture().Width, texture.getTexture().Height); Rectangle srcRect = new Rectangle(0, 0, texture.getTexture().Width, texture.getTexture().Height);
this.fancyButtons.Add(new Button(name, new Rectangle((int)placement2.X + 50, (int)placement2.Y + ((i % 7) * 100), 64, 64), texture, display, srcRect, scale, new Animation(srcRect), Color.White, Color.White, new ButtonFunctionality(null, null, null))); this.fancyButtons.Add(new Button(name, new Rectangle((int)placement2.X + 50, (int)placement2.Y + ((i % 6) * 100), 64, 64), texture, display, srcRect, scale, new Animation(srcRect), Color.White, Color.White, new ButtonFunctionality(null, null, null)));
} }
for (int i = 2; i < 26; i++)
{
//Allow 8 songs to be displayed per page.
Texture2DExtended texture = new Texture2DExtended();
string name = "";
string display = "";
if (i - 2 < 12)
{
if ((i-2) == 0)
{
texture = StardewSymphony.textureManager.getTexture("12" + "AM");
name = "12A.M.";
display = "12 A.M.";
}
else
{
texture = StardewSymphony.textureManager.getTexture( (i-2).ToString() + "AM");
name = (i-2).ToString() + "A.M.";
display = (i-2).ToString() + " A.M.";
}
}
if (i - 2 >= 12)
{
if ( (i-2) == 12)
{
texture = StardewSymphony.textureManager.getTexture("12" + "PM");
name = "12P.M.";
display = "12 P.M.";
}
else
{
texture = StardewSymphony.textureManager.getTexture( ( (i-2) % 12).ToString() + "PM");
name = ((i - 2) % 12).ToString() + "P.M.";
display = ((i - 2) % 12).ToString() + " P.M.";
}
}
if (texture == null)
{
StardewSymphony.ModMonitor.Log("HMM A TEXTURE IS NULL: " + i.ToString());
}
float scale = 1.00f / (texture.getTexture().Width / 64f);
Rectangle srcRect = new Rectangle(0, 0, texture.getTexture().Width, texture.getTexture().Height);
this.fancyButtons.Add(new Button(name, new Rectangle((int)placement2.X + 50, (int)placement2.Y + ((i % 6) * 100), 64, 64), texture, display, srcRect, scale, new Animation(srcRect), Color.White, Color.White, new ButtonFunctionality(null, null, null)));
}
} }
//Location selection mode. //Location selection mode.
@ -1125,17 +1204,42 @@ namespace StardewSymphonyRemastered.Framework.Menus
//Left click an option. //Left click an option.
if (this.drawMode == DrawMode.TimeSelection) if (this.drawMode == DrawMode.TimeSelection)
{ {
foreach (var button in this.fancyButtons) int amountToShow = 6;
this.updateFancyButtons();
int amount;
if (0 + ((this.timePageIndex + 1) * amountToShow) >= this.fancyButtons.Count)
{
amount = (0 + ((this.timePageIndex + 1) * (amountToShow)) - this.fancyButtons.Count);
amount = amountToShow - amount;
if (amount < 0) amount = 0;
}
else if (this.fancyButtons.Count < amountToShow)
amount = this.fancyButtons.Count;
else
amount = amountToShow;
if (amount == 0 && this.timePageIndex > 1)
this.timePageIndex--;
var drawList = this.fancyButtons.GetRange(0 + (this.timePageIndex * (amountToShow)), amount);
foreach (var button in drawList)
{ {
if (button.containsPoint(x, y)) if (button.containsPoint(x, y))
{ {
Vector2 position = new Vector2(this.width * .1f + 64, this.height * .05f + 448); Vector2 position = new Vector2(this.width * .1f + 64, this.height * .05f + 448);
if (button.name == "DayIcon" || button.name == "NightIcon") MusicPack musicPack = (MusicPack)this.currentMusicPackAlbum.buttonFunctionality.leftClick.paramaters[0];
musicPack.SongInformation.TimesOfDay.Contains(button.name);
if (button.name == "DayIcon" || button.name == "NightIcon" || musicPack.SongInformation.TimesOfDay.Contains(button.name))
{ {
this.currentlySelectedTime = button.clone(position); this.currentlySelectedTime = button.clone(position);
this.drawMode = DrawMode.LocationSelection; this.drawMode = DrawMode.LocationSelection;
buttonSelected = true; buttonSelected = true;
} }
} }
} }
if (buttonSelected) if (buttonSelected)
@ -1483,9 +1587,28 @@ namespace StardewSymphonyRemastered.Framework.Menus
this.currentlySelectedOption.draw(b); this.currentlySelectedOption.draw(b);
this.currentlySelectedWeather.draw(b); this.currentlySelectedWeather.draw(b);
foreach (Button button in this.fancyButtons) int amountToShow = 6;
int amount;
if (0 + ((this.timePageIndex + 1) * amountToShow) >= this.fancyButtons.Count)
{
amount = (0 + ((this.timePageIndex + 1) * (amountToShow)) - this.fancyButtons.Count);
amount = amountToShow - amount;
if (amount < 0) amount = 0;
}
else if (this.fancyButtons.Count < amountToShow)
amount = this.fancyButtons.Count;
else
amount = amountToShow;
if (amount == 0 && this.timePageIndex > 1)
this.timePageIndex--;
var drawList = this.fancyButtons.GetRange(0 + (this.timePageIndex * (amountToShow)), amount);
foreach (var button in drawList)
button.draw(b); button.draw(b);
foreach (var str in this.texturedStrings) foreach (var str in this.texturedStrings)
str.draw(b); str.draw(b);
} }
@ -1969,6 +2092,11 @@ namespace StardewSymphonyRemastered.Framework.Menus
{ {
if (this.currentlySelectedTime.name == "DayIcon") key += seperator + "day"; if (this.currentlySelectedTime.name == "DayIcon") key += seperator + "day";
if (this.currentlySelectedTime.name == "NightIcon") key += seperator + "night"; if (this.currentlySelectedTime.name == "NightIcon") key += seperator + "night";
for (int i = 1; i <= 12; i++)
{
if (this.currentlySelectedTime.name == i.ToString() + "A.M.") key += seperator + i.ToString() + "A.M.";
if (this.currentlySelectedTime.name == i.ToString() + "P.M.") key += seperator + i.ToString() + "P.M.";
}
} }
if (this.currentlySelectedLocation != null) if (this.currentlySelectedLocation != null)
{ {
@ -1993,6 +2121,7 @@ namespace StardewSymphonyRemastered.Framework.Menus
} }
#endregion #endregion
return key; return key;
} }

View File

@ -146,6 +146,10 @@ namespace StardewSymphonyRemastered.Framework
return listOfValidDictionaries; return listOfValidDictionaries;
} }
/// <summary>
/// Get a list of applicable songs to play in the given menu and find one to play.
/// </summary>
/// <param name="songListKey"></param>
public void SelectMenuMusic(string songListKey) public void SelectMenuMusic(string songListKey)
{ {
// stop timer when new music is selected // stop timer when new music is selected

View File

@ -21,7 +21,7 @@ namespace StardewSymphonyRemastered.Framework
private readonly string DataFolderName = "data"; private readonly string DataFolderName = "data";
/// <summary>The name of the folder which contains available music.</summary> /// <summary>The name of the folder which contains available music.</summary>
private readonly string MusicFolderName = "music"; private readonly string MusicFolderName = "songs";
/********* /*********

View File

@ -29,6 +29,14 @@ namespace StardewSymphonyRemastered.Framework
private readonly string[] timesOfDay; private readonly string[] timesOfDay;
public static char seperator = '_'; public static char seperator = '_';
public string[] TimesOfDay
{
get
{
return this.timesOfDay;
}
}
/// <summary>Construct an instance.</summary> /// <summary>Construct an instance.</summary>
public SongSpecifics() public SongSpecifics()
{ {
@ -150,11 +158,37 @@ namespace StardewSymphonyRemastered.Framework
} }
else else
{ {
key = getSeasonNameString() + seperator + getWeatherString() + seperator + getTimeOfDayString(true) + seperator + getLocationString() + seperator + getDayOfWeekString(); key = getCurrentConditionalKey(true, true, true, true, true, true);
int mode =6;
if (StardewSymphony.musicManager.GetApplicableMusicPacks(key).Count == 0) while (StardewSymphony.musicManager.GetApplicableMusicPacks(key).Count == 0 && mode>0)
{ {
key = getSeasonNameString() + seperator + getWeatherString() + seperator + getTimeOfDayString(false) + seperator + getLocationString() + seperator + getDayOfWeekString(); mode--;
if (mode == 5)
{
key = getCurrentConditionalKey(true, true, true, true, true, false);
}
if (mode == 4)
{
key = getCurrentConditionalKey(true, true, true, true, false, false);
}
if (mode == 3)
{
key = getCurrentConditionalKey(true, true, true, false, false, false);
}
if (mode == 2)
{
key = getCurrentConditionalKey(true, true, false, false, false, false);
}
if (mode == 1)
{
key = getCurrentConditionalKey(true, false, false, false, false, false);
}
if (mode == 0)
{
key = getCurrentConditionalKey(true, true, true, true, true, true);
}
} }
} }
} }
@ -164,7 +198,26 @@ namespace StardewSymphonyRemastered.Framework
return key; return key;
} }
/// <summary>
/// Gets an appropriate key combination from for selecting music
/// </summary>
/// <param name="season"></param>
/// <param name="weather"></param>
/// <param name="time"></param>
/// <param name="hourly"></param>
/// <param name="location"></param>
/// <param name="dayOfWeek"></param>
/// <returns></returns>
public static string getCurrentConditionalKey(bool season = true, bool weather = true, bool time = true,bool hourly=true, bool location = true, bool dayOfWeek = true)
{
string key = "";
if (season == true) key += getSeasonNameString();
if (weather == true) key +=seperator+ getWeatherString();
if (time == true) key +=seperator+ getTimeOfDayString(hourly);
if (location == true) key +=seperator+ getLocationString();
if (dayOfWeek == true) key +=seperator+ getDayOfWeekString();
return key;
}
/// <summary>Initialize the location lists with the names of all of the major locations in the game.</summary> /// <summary>Initialize the location lists with the names of all of the major locations in the game.</summary>
public static void initializeLocationsList() public static void initializeLocationsList()
@ -295,7 +348,16 @@ namespace StardewSymphonyRemastered.Framework
else else
{ {
int hour = Game1.timeOfDay / 100; int hour = Game1.timeOfDay / 100;
string suffix = hour < 12 && hour >= 24 ? "A.M." : "P.M."; string suffix = "";
if(hour<12 || hour >= 24)
{
suffix = "A.M.";
}
if(hour>=12 && hour < 24)
{
suffix = "P.M";
}
return hour + suffix; return hour + suffix;
} }
} }

View File

@ -51,6 +51,7 @@ namespace StardewSymphonyRemastered
helper.Events.GameLoop.UpdateTicked += this.OnUpdateTicked; helper.Events.GameLoop.UpdateTicked += this.OnUpdateTicked;
helper.Events.Input.ButtonPressed += this.OnButtonPressed; helper.Events.Input.ButtonPressed += this.OnButtonPressed;
helper.Events.GameLoop.Saving += this.OnSaving; helper.Events.GameLoop.Saving += this.OnSaving;
helper.Events.GameLoop.TimeChanged += this.GameLoop_TimeChanged;
helper.Events.Display.MenuChanged += this.OnMenuChanged; helper.Events.Display.MenuChanged += this.OnMenuChanged;
@ -71,6 +72,11 @@ namespace StardewSymphonyRemastered
this.LoadMusicPacks(); this.LoadMusicPacks();
} }
private void GameLoop_TimeChanged(object sender, TimeChangedEventArgs e)
{
musicManager.selectMusic(SongSpecifics.getCurrentConditionalString());
}
/// <summary>Raised after a player warps to a new location.</summary> /// <summary>Raised after a player warps to a new location.</summary>
/// <param name="sender">The event sender.</param> /// <param name="sender">The event sender.</param>
/// <param name="e">The event arguments.</param> /// <param name="e">The event arguments.</param>
@ -246,6 +252,31 @@ namespace StardewSymphonyRemastered
textureManager.addTexture("PlayButton", LoadTexture("PlayButton.png")); textureManager.addTexture("PlayButton", LoadTexture("PlayButton.png"));
textureManager.addTexture("StopButton", LoadTexture("StopButton.png")); textureManager.addTexture("StopButton", LoadTexture("StopButton.png"));
textureManager.addTexture("BackButton", LoadTexture("BackButton.png")); textureManager.addTexture("BackButton", LoadTexture("BackButton.png"));
textureManager.addTexture("12AM", LoadTexture("12AM.png"));
textureManager.addTexture("1AM", LoadTexture("1AM.png"));
textureManager.addTexture("2AM", LoadTexture("2AM.png"));
textureManager.addTexture("3AM", LoadTexture("3AM.png"));
textureManager.addTexture("4AM", LoadTexture("4AM.png"));
textureManager.addTexture("5AM", LoadTexture("5AM.png"));
textureManager.addTexture("6AM", LoadTexture("6AM.png"));
textureManager.addTexture("7AM", LoadTexture("7AM.png"));
textureManager.addTexture("8AM", LoadTexture("8AM.png"));
textureManager.addTexture("9AM", LoadTexture("9AM.png"));
textureManager.addTexture("10AM", LoadTexture("10AM.png"));
textureManager.addTexture("11AM", LoadTexture("11AM.png"));
textureManager.addTexture("12PM", LoadTexture("12PM.png"));
textureManager.addTexture("1PM", LoadTexture("1PM.png"));
textureManager.addTexture("2PM", LoadTexture("2PM.png"));
textureManager.addTexture("3PM", LoadTexture("3PM.png"));
textureManager.addTexture("4PM", LoadTexture("4PM.png"));
textureManager.addTexture("5PM", LoadTexture("5PM.png"));
textureManager.addTexture("6PM", LoadTexture("6PM.png"));
textureManager.addTexture("7PM", LoadTexture("7PM.png"));
textureManager.addTexture("8PM", LoadTexture("8PM.png"));
textureManager.addTexture("9PM", LoadTexture("9PM.png"));
textureManager.addTexture("10PM", LoadTexture("10PM.png"));
textureManager.addTexture("11PM", LoadTexture("11PM.png"));
} }
/// <summary>Load the available music packs.</summary> /// <summary>Load the available music packs.</summary>

View File

@ -91,6 +91,78 @@
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="assets\10AM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\10PM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\11AM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\11PM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\12AM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\12PM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\1AM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\1PM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\2AM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\2PM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\3AM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\3PM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\4AM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\4PM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\5AM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\5PM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\6AM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\6PM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\7AM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\7PM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\8AM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\8PM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\9AM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\9PM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="assets\AddButton.png"> <Content Include="assets\AddButton.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
@ -214,6 +286,7 @@
<ProjectReference Include="..\..\StardustCore\StardustCore.csproj"> <ProjectReference Include="..\..\StardustCore\StardustCore.csproj">
<Project>{0756d36a-95c8-480d-8ea6-4584c03010c6}</Project> <Project>{0756d36a-95c8-480d-8ea6-4584c03010c6}</Project>
<Name>StardustCore</Name> <Name>StardustCore</Name>
<Private>False</Private>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

View File

@ -1,7 +1,7 @@
{ {
"Name": "Stardew Symphony Remastered", "Name": "Stardew Symphony Remastered",
"Author": "Alpha_Omegasis", "Author": "Alpha_Omegasis",
"Version": "2.4.0", "Version": "2.5.0",
"Description": "Adding more music to the game one beep at a time. Now with streaming!", "Description": "Adding more music to the game one beep at a time. Now with streaming!",
"UniqueID": "Omegasis.StardewSymphonyRemastered", "UniqueID": "Omegasis.StardewSymphonyRemastered",
"EntryDll": "StardewSymphonyRemastered.dll", "EntryDll": "StardewSymphonyRemastered.dll",

View File

@ -25,7 +25,7 @@ namespace StardustCore.UIUtilities
if (v.Key == name) if (v.Key == name)
return v.Value.Copy(); return v.Value.Copy();
} }
throw new Exception("Error, texture name not found!!!"); throw new Exception("Error, texture name not found!!! Name: "+name);
} }
} }
} }