Merge pull request #38 from janavarro95/Development

Development
This commit is contained in:
Joshua Navarro 2018-06-07 14:02:55 -07:00 committed by GitHub
commit c38f2599f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 15 deletions

View File

@ -386,7 +386,7 @@ namespace StardewSymphonyRemastered.Framework.Menus
{
try
{
Button button = this.musicAlbumButtons.ElementAt(this.currentAlbumIndex + i).clone();
Button button = this.musicAlbumButtons.ElementAt(Math.Abs((this.currentAlbumIndex + i)%this.musicAlbumButtons.Count)).clone();
button.bounds = new Rectangle((int)placement.X + (i * 100) + offsetX, (int)placement.Y, 64, 64);
fancyButtons.Add(button);
}
@ -395,7 +395,7 @@ namespace StardewSymphonyRemastered.Framework.Menus
err.ToString();
if (this.currentAlbumIndex + i == 0)
{
Button button = this.musicAlbumButtons.ElementAt(0).clone();
Button button = this.musicAlbumButtons.ElementAt(Math.Abs(0 % this.musicAlbumButtons.Count)).clone();
button.bounds = new Rectangle((int)placement.X + (i * 100) + offsetX, (int)placement.Y, 64, 64);
fancyButtons.Add(button);
}
@ -404,14 +404,14 @@ namespace StardewSymphonyRemastered.Framework.Menus
try
{
Button button = this.musicAlbumButtons.ElementAt(((this.currentAlbumIndex + i) - this.musicAlbumButtons.Count) % this.musicAlbumButtons.Count).clone();
Button button = this.musicAlbumButtons.ElementAt(Math.Abs(((this.currentAlbumIndex + i) - this.musicAlbumButtons.Count) % this.musicAlbumButtons.Count)).clone();
button.bounds = new Rectangle((int)placement.X + (i * 100) + offsetX, (int)placement.Y, 64, 64);
fancyButtons.Add(button);
}
catch (Exception err2)
{
err2.ToString();
Button button = this.musicAlbumButtons.ElementAt(((this.currentAlbumIndex + i) + this.musicAlbumButtons.Count) % this.musicAlbumButtons.Count).clone();
Button button = this.musicAlbumButtons.ElementAt(Math.Abs((this.currentAlbumIndex + i) + this.musicAlbumButtons.Count) % this.musicAlbumButtons.Count).clone();
button.bounds = new Rectangle((int)placement.X + (i * 100) + offsetX, (int)placement.Y, 64, 64);
fancyButtons.Add(button);
@ -1061,6 +1061,7 @@ namespace StardewSymphonyRemastered.Framework.Menus
}
}
this.selectAlbum(ok);
return;
}
if (this.drawMode == DrawMode.SongSelectionMode)

View File

@ -15,21 +15,16 @@ namespace StardewSymphonyRemastered
{
/// <summary>
/// BIG WIP. Don't use this at all because it does nothing right now.
/// TODO:
/// 3.Finish making menu
/// 5.Release
/// 6.Make videos documenting how to make this mod work.
/// 7.Make way to generate new music packs.
///
///
/// Add mod config to have silent rain option.
/// Add in song delay function.
/// Add in shuffle song button that just selects music but probably plays a different song. same as musicManager.selectmusic(getConditionalString);
///
/// Add in a save button to save settings in the menu.
///
/// Notes:
/// All mods must add events/locations/festivals/menu information to this mod during the Entry function of their mod because once the game does it's first update tick, that's when all of the packs are initialized with all of their music.
/// All mods must add events/locations/festivals/menu information to this mod during the Entry function of their mod because once the player is loaded that's when all of the packs are initialized with all of their music.
/// </summary>
public class StardewSymphony : Mod
{

View File

@ -3,7 +3,7 @@
"Author": "Alpha_Omegasis",
"Version": "2.0.0",
"Description": "Adding more music to the game one beep at a time. Now with streaming!",
"UniqueID": "Omegasis.StardewSymphony",
"UniqueID": "Omegasis.StardewSymphonyRemastered",
"EntryDll": "StardewSymphonyRemastered.dll",
"MinimumApiVersion": "2.0",
"UpdateKeys": [ "Nexus:425" ],

View File

@ -1516,6 +1516,11 @@ namespace StardustCore
*/
}
/// <summary>
/// Adds an item to this item's internal inventory if it can. Otherwise drop it on the ground as item debris.
/// </summary>
/// <param name="I"></param>
/// <returns></returns>
public virtual bool addItemToInventoryElseDrop(Item I)
{

View File

@ -403,7 +403,8 @@ namespace StardustCore.Serialization
// Log.AsyncC(data);
try
{
dynamic obj = JObject.Parse(data);
JObject obj2 = JObject.Parse(data);
CoreObject obj = (CoreObject)obj2.ToObject(typeof(CoreObject));
// Log.AsyncC(obj.thisType);
@ -549,8 +550,8 @@ namespace StardustCore.Serialization
// Log.AsyncC(data);
try
{
dynamic obj = JObject.Parse(data);
JObject obj2 = JObject.Parse(data);
CoreObject obj =(CoreObject)obj2.ToObject(typeof(CoreObject));
// Log.AsyncC(obj.thisType);