diff --git a/GeneralMods/HappyBirthday/HappyBirthday.cs b/GeneralMods/HappyBirthday/HappyBirthday.cs
index b923fb56..28a5913f 100644
--- a/GeneralMods/HappyBirthday/HappyBirthday.cs
+++ b/GeneralMods/HappyBirthday/HappyBirthday.cs
@@ -189,7 +189,7 @@ namespace Omegasis.HappyBirthday
{
if (!Context.IsWorldReady || Game1.eventUp || Game1.isFestival())
return;
- if (!this.HasChosenBirthday && Game1.activeClickableMenu == null)
+ if (!this.HasChosenBirthday && Game1.activeClickableMenu == null && Game1.player.Name.ToLower()!="unnamed farmhand")
{
Game1.activeClickableMenu = new BirthdayMenu(this.PlayerData.BirthdaySeason, this.PlayerData.BirthdayDay, this.SetBirthday);
this.CheckedForBirthday = false;
@@ -362,6 +362,16 @@ namespace Omegasis.HappyBirthday
Random rnd2 = new Random();
int r2 = rnd2.Next(this.PossibleBirthdayGifts.Count);
gift = this.PossibleBirthdayGifts.ElementAt(r2);
+ //Attempt to balance sapplings from being too OP as a birthday gift.
+ if (gift.Name.Contains("Sapling"))
+ {
+ gift.Stack = 1; //A good investment?
+ }
+ if(gift.Name.Contains("Rare Seed"))
+ {
+ gift.Stack = 2; //Still a little op but less so than 5.
+ }
+
if (Game1.player.isInventoryFull())
Game1.createItemDebris(gift, Game1.player.getStandingPosition(), Game1.player.getDirection());
else
diff --git a/GeneralMods/HappyBirthday/manifest.json b/GeneralMods/HappyBirthday/manifest.json
index bf199687..6a5a2101 100644
--- a/GeneralMods/HappyBirthday/manifest.json
+++ b/GeneralMods/HappyBirthday/manifest.json
@@ -3,8 +3,8 @@
"Author": "Alpha_Omegasis",
"Version": {
"MajorVersion": 1,
- "MinorVersion": 6,
- "PatchVersion": 0,
+ "MinorVersion": 7,
+ "PatchVersion": 1,
"Build": null
},
"MinimumApiVersion": "1.15",
diff --git a/GeneralMods/SaveAnywhere/API/SaveAnywhereAPI.cs b/GeneralMods/SaveAnywhere/API/SaveAnywhereAPI.cs
index ec34bb97..36aab4f2 100644
--- a/GeneralMods/SaveAnywhere/API/SaveAnywhereAPI.cs
+++ b/GeneralMods/SaveAnywhere/API/SaveAnywhereAPI.cs
@@ -9,11 +9,24 @@ namespace Omegasis.SaveAnywhere.API
public event EventHandler AfterSave;
public event EventHandler AfterLoad;
+
public SaveAnywhereAPI(SaveManager manager)
{
+ BeforeSave = new EventHandler(empty);
+ AfterSave= new EventHandler(empty);
+ AfterLoad= new EventHandler(empty);
manager.BeforeSave += (sender, e) => { BeforeSave.Invoke(sender, e); };
manager.AfterSave += (sender, e) => { AfterSave.Invoke(sender, e); };
manager.AfterLoad += (sender, e) => { AfterLoad.Invoke(sender, e); };
- }
+ }
+
+ ///
+ /// Used to initialize empty event handlers.
+ ///
+ ///
+ ///
+ private void empty(object o, EventArgs args){
+
+ }
}
}
diff --git a/GeneralMods/SaveAnywhere/Framework/SaveManager.cs b/GeneralMods/SaveAnywhere/Framework/SaveManager.cs
index fc1a1ef4..3be29bc0 100644
--- a/GeneralMods/SaveAnywhere/Framework/SaveManager.cs
+++ b/GeneralMods/SaveAnywhere/Framework/SaveManager.cs
@@ -63,6 +63,16 @@ namespace Omegasis.SaveAnywhere.Framework
this.Helper = helper;
this.Reflection = reflection;
this.OnLoaded = onLoaded;
+
+ this.BeforeSave = new EventHandler(empty);
+ this.AfterSave = new EventHandler(empty);
+ this.AfterLoad = new EventHandler(empty);
+
+ }
+
+ private void empty(object o, EventArgs args)
+ {
+
}
/// Perform any required update logic.
@@ -87,8 +97,8 @@ namespace Omegasis.SaveAnywhere.Framework
{
currentSaveMenu.SaveComplete -= CurrentSaveMenu_SaveComplete;
currentSaveMenu = null;
-
AfterSave.Invoke(this, EventArgs.Empty);
+
}
/// Clear saved data.
@@ -103,7 +113,7 @@ namespace Omegasis.SaveAnywhere.Framework
{
// Fire Event before saving data
BeforeSave.Invoke(this, EventArgs.Empty);
-
+
// save game data
Farm farm = Game1.getFarm();
if (farm.shippingBin.Any())
@@ -155,6 +165,7 @@ namespace Omegasis.SaveAnywhere.Framework
// Notify other mods that load is complete
AfterLoad.Invoke(this, EventArgs.Empty);
+
}
///
diff --git a/GeneralMods/SaveAnywhere/SaveAnywhere.cs b/GeneralMods/SaveAnywhere/SaveAnywhere.cs
index 08463a61..e3a96d92 100644
--- a/GeneralMods/SaveAnywhere/SaveAnywhere.cs
+++ b/GeneralMods/SaveAnywhere/SaveAnywhere.cs
@@ -79,10 +79,12 @@ namespace Omegasis.SaveAnywhere
return api;
}
+ /*Notes. Mods that want to support save anywhere will get the api for Save anywhere and then add their clean up code to the events that happen for Before/After Save and Loading.
+ Example with pseudo code.
+ SaveAnywhere.api.BeforeSave+=StardustCore.Objects.CleanUpBeforeSave;
+ We then can use function wrapping (is that what it's called?) to just handle calling the actual function that deals with clean-up code.
-
-
-
+ */
/*********
** Private methods
*********/
diff --git a/GeneralMods/SaveAnywhere/manifest.json b/GeneralMods/SaveAnywhere/manifest.json
index d53330f2..326d1e30 100644
--- a/GeneralMods/SaveAnywhere/manifest.json
+++ b/GeneralMods/SaveAnywhere/manifest.json
@@ -1,7 +1,7 @@
{
"Name": "Save Anywhere",
"Author": "Alpha_Omegasis",
- "Version": "2.7.2",
+ "Version": "2.8.1",
"Description": "Lets you save almost anywhere.",
"UniqueID": "Omegasis.SaveAnywhere",
"EntryDll": "SaveAnywhere.dll",
diff --git a/GeneralMods/SimpleSoundManager/Framework/Sound.cs b/GeneralMods/SimpleSoundManager/Framework/Sound.cs
index 7524e046..03fa9081 100644
--- a/GeneralMods/SimpleSoundManager/Framework/Sound.cs
+++ b/GeneralMods/SimpleSoundManager/Framework/Sound.cs
@@ -32,5 +32,9 @@ namespace SimpleSoundManager.Framework
///
///
Sound clone();
+
+ string getSoundName();
+
+ bool isStopped();
}
}
diff --git a/GeneralMods/SimpleSoundManager/Framework/SoundManager.cs b/GeneralMods/SimpleSoundManager/Framework/SoundManager.cs
index 8fd53482..3eb34171 100644
--- a/GeneralMods/SimpleSoundManager/Framework/SoundManager.cs
+++ b/GeneralMods/SimpleSoundManager/Framework/SoundManager.cs
@@ -9,18 +9,14 @@ using System.Threading.Tasks;
namespace SimpleSoundManager.Framework
{
-
- ///
- /// TODO:
- /// Play, stop, pause songs.
- ///
- class SoundManager
+ public class SoundManager
{
public Dictionary sounds;
public Dictionary musicBanks;
+ public List currentlyPlayingSounds = new List();
///
/// Constructor for this class.
///
@@ -28,6 +24,7 @@ namespace SimpleSoundManager.Framework
{
this.sounds = new Dictionary();
this.musicBanks = new Dictionary();
+ currentlyPlayingSounds = new List();
}
///
@@ -37,7 +34,7 @@ namespace SimpleSoundManager.Framework
///
public void loadWavFile(string soundName,string pathToWav)
{
- WavSound wav = new WavSound(pathToWav);
+ WavSound wav = new WavSound(soundName,pathToWav);
this.sounds.Add(soundName,wav);
}
@@ -49,7 +46,7 @@ namespace SimpleSoundManager.Framework
///
public void loadWavFile(IModHelper helper,string soundName,string pathToWav)
{
- WavSound wav = new WavSound(helper ,pathToWav);
+ WavSound wav = new WavSound(helper ,soundName,pathToWav);
this.sounds.Add(soundName,wav);
}
@@ -61,7 +58,7 @@ namespace SimpleSoundManager.Framework
///
public void loadWavFile(IModHelper helper,string songName,List pathToWav)
{
- WavSound wav = new WavSound(helper,pathToWav);
+ WavSound wav = new WavSound(helper,songName,pathToWav);
this.sounds.Add(songName,wav);
}
@@ -133,5 +130,92 @@ namespace SimpleSoundManager.Framework
return null;
}
+ ///
+ /// Play the sound with the given name.
+ ///
+ ///
+ public void playSound(string soundName)
+ {
+ foreach(var sound in this.sounds)
+ {
+ if (sound.Key == soundName)
+ {
+ var s=getSoundClone(soundName);
+ s.play();
+ this.currentlyPlayingSounds.Add(s);
+ break;
+ }
+ }
+ }
+
+ ///
+ /// Stop the sound that is playing.
+ ///
+ ///
+ public void stopSound(string soundName)
+ {
+ List removalList = new List();
+ foreach (var sound in this.currentlyPlayingSounds)
+ {
+ if (sound.getSoundName() == soundName)
+ {
+ sound.stop();
+ removalList.Add(sound);
+ }
+ }
+ foreach(var v in removalList)
+ {
+ this.currentlyPlayingSounds.Remove(v);
+ }
+ }
+
+ ///
+ /// Pause the sound with this name?
+ ///
+ ///
+ public void pauseSound(string soundName)
+ {
+ List removalList = new List();
+ foreach (var sound in this.currentlyPlayingSounds)
+ {
+ if (sound.getSoundName() == soundName)
+ {
+ sound.pause();
+ removalList.Add(sound);
+ }
+ }
+ foreach (var v in removalList)
+ {
+ this.currentlyPlayingSounds.Remove(v);
+ }
+ }
+
+ public void update()
+ {
+ List removalList = new List();
+ foreach(Sound song in this.currentlyPlayingSounds)
+ {
+ if (song.isStopped())
+ {
+ removalList.Add(song);
+ }
+ }
+ foreach(var v in removalList)
+ {
+ this.currentlyPlayingSounds.Remove(v);
+ }
+ }
+
+ public void stopAllSounds()
+ {
+ foreach(var v in this.currentlyPlayingSounds)
+ {
+ v.stop();
+ }
+ }
+
+
+
+
}
}
diff --git a/GeneralMods/SimpleSoundManager/Framework/WavSound.cs b/GeneralMods/SimpleSoundManager/Framework/WavSound.cs
index 2a2114d6..7478b5da 100644
--- a/GeneralMods/SimpleSoundManager/Framework/WavSound.cs
+++ b/GeneralMods/SimpleSoundManager/Framework/WavSound.cs
@@ -31,20 +31,20 @@ namespace SimpleSoundManager
///
byte[] byteArray;
- public List sounds;
public string path;
-
+ public string soundName;
///
/// Get a raw disk path to the wav file.
///
///
- public WavSound(string pathToWavFile)
+ public WavSound(string name,string pathToWavFile)
{
this.path = pathToWavFile;
LoadWavFromFileToStream();
+ this.soundName = name;
}
///
@@ -52,10 +52,11 @@ namespace SimpleSoundManager
///
///
///
- public WavSound(IModHelper modHelper, string pathInModDirectory)
+ public WavSound(IModHelper modHelper,string name, string pathInModDirectory)
{
string path = Path.Combine(modHelper.DirectoryPath, pathInModDirectory);
this.path = path;
+ this.soundName = name;
}
///
@@ -63,7 +64,7 @@ namespace SimpleSoundManager
///
/// The mod helper for the mod you wish to use to load the music files from.
/// The list of folders and files that make up a complete path.
- public WavSound(IModHelper modHelper, List pathPieces)
+ public WavSound(IModHelper modHelper,string soundName, List pathPieces)
{
string s = modHelper.DirectoryPath;
foreach(var str in pathPieces)
@@ -71,6 +72,7 @@ namespace SimpleSoundManager
s = Path.Combine(s, str);
}
this.path = s;
+ this.soundName = soundName;
}
///
@@ -224,7 +226,12 @@ namespace SimpleSoundManager
public Sound clone()
{
- return new WavSound(this.path);
+ return new WavSound(this.getSoundName(),this.path);
+ }
+
+ public string getSoundName()
+ {
+ return this.soundName;
}
public void restart()
diff --git a/GeneralMods/SimpleSoundManager/Framework/XACTSound.cs b/GeneralMods/SimpleSoundManager/Framework/XACTSound.cs
index 196d34d2..47f6c8f6 100644
--- a/GeneralMods/SimpleSoundManager/Framework/XACTSound.cs
+++ b/GeneralMods/SimpleSoundManager/Framework/XACTSound.cs
@@ -130,5 +130,19 @@ namespace SimpleSoundManager.Framework
{
return new XACTSound(this.waveBank, this.soundBank, this.soundName);
}
+
+ public string getSoundName()
+ {
+ return this.soundName;
+ }
+
+ public bool isStopped()
+ {
+ if (this.song == null) return true;
+ if (this.song.IsStopped) return true;
+ return false;
+ }
+
+
}
}
diff --git a/GeneralMods/SimpleSoundManager/Framework/XactMusicPair.cs b/GeneralMods/SimpleSoundManager/Framework/XactMusicPair.cs
index 999a34af..fe3a77c2 100644
--- a/GeneralMods/SimpleSoundManager/Framework/XactMusicPair.cs
+++ b/GeneralMods/SimpleSoundManager/Framework/XactMusicPair.cs
@@ -10,7 +10,7 @@ using System.Threading.Tasks;
namespace SimpleSoundManager
{
- class XACTMusicPair
+ public class XACTMusicPair
{
public WaveBank waveBank;
public ISoundBank soundBank;
diff --git a/GeneralMods/SimpleSoundManager/manifest.json b/GeneralMods/SimpleSoundManager/manifest.json
index 9f93e023..e5e92fab 100644
--- a/GeneralMods/SimpleSoundManager/manifest.json
+++ b/GeneralMods/SimpleSoundManager/manifest.json
@@ -1,8 +1,8 @@
{
"Name": "Simple Sound Manager",
"Author": "Alpha_Omegasis",
- "Version": "2.0.0",
- "Description": "A simple framework to play sounds from wave banks.",
+ "Version": "2.0.1",
+ "Description": "A simple framework to play sounds from wave banks and wav files.",
"UniqueID": "Omegasis.SimpleSoundManager",
"EntryDll": "SimpleSoundManager.dll",
"MinimumApiVersion": "2.0",
diff --git a/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/Framework/Menus/MusicManagerMenu.cs b/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/Framework/Menus/MusicManagerMenu.cs
index aa5e8439..dc433087 100644
--- a/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/Framework/Menus/MusicManagerMenu.cs
+++ b/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/Framework/Menus/MusicManagerMenu.cs
@@ -112,7 +112,7 @@ namespace StardewSymphonyRemastered.Framework.Menus
if (v.Value.musicPackInformation.getTexture() == null)
{
Texture2DExtended texture = StardewSymphony.textureManager.getTexture("MusicDisk");
- float scale = 1.00f / ((float)texture.texture.Width / 64f);
+ float scale = 1.00f / ((float)texture.getTexture().Width / 64f);
this.musicAlbumButtons.Add(new Button(v.Key, new Rectangle(100 + (numOfButtons * 100), 125 + (rows * 100), 64, 64),texture, "", new Rectangle(0, 0, 16, 16), scale, new StardustCore.Animations.Animation(new Rectangle(0, 0, 16, 16)), StardustCore.IlluminateFramework.Colors.randomColor(), Color.White,new ButtonFunctionality(new DelegatePairing(null, new List