diff --git a/Release/Mods/TrainerMod.dll b/Release/Mods/TrainerMod.dll index c225a340..bbc1f948 100644 Binary files a/Release/Mods/TrainerMod.dll and b/Release/Mods/TrainerMod.dll differ diff --git a/Release/StardewModdingAPI.exe b/Release/StardewModdingAPI.exe index b2a63bb2..64799ce6 100644 Binary files a/Release/StardewModdingAPI.exe and b/Release/StardewModdingAPI.exe differ diff --git a/StardewInjector/bin/Debug/Microsoft.Xna.Framework.Xact.dll b/StardewInjector/bin/Debug/Microsoft.Xna.Framework.Xact.dll deleted file mode 100644 index 96815795..00000000 Binary files a/StardewInjector/bin/Debug/Microsoft.Xna.Framework.Xact.dll and /dev/null differ diff --git a/StardewInjector/bin/Debug/Microsoft.Xna.Framework.Xact.xml b/StardewInjector/bin/Debug/Microsoft.Xna.Framework.Xact.xml deleted file mode 100644 index 3f5a36bf..00000000 --- a/StardewInjector/bin/Debug/Microsoft.Xna.Framework.Xact.xml +++ /dev/null @@ -1,283 +0,0 @@ - - - - - Represents a particular category of sounds. Reference page contains links to related code samples. - - - Determines whether the specified AudioCategory is equal to this AudioCategory. - AudioCategory to compare with this instance. - - - Determines whether the specified Object is equal to this AudioCategory. - Object to compare with this instance. - - - Gets the hash code for this instance. - - - Specifies the friendly name of this category. - - - Determines whether the specified AudioCategory instances are equal. - Object to the left of the equality operator. - Object to the right of the equality operator. - - - Determines whether the specified AudioCategory instances are not equal. - Object to the left of the inequality operator. - Object to the right of the inequality operator. - - - Pauses all sounds associated with this category. - - - Resumes all paused sounds associated with this category. - - - Sets the volume of all sounds associated with this category. Reference page contains links to related code samples. - Volume amplitude multiplier. volume is normally between 0.0 (silence) and 1.0 (full volume), but can range from 0.0f to float.MaxValue. Volume levels map to decibels (dB) as shown in the following table. VolumeDescription 0.0f-96 dB (silence) 1.0f +0 dB (full volume as authored) 2.0f +6 dB (6 dB greater than authored) - - - Stops all sounds associated with this category. - Enumerated value specifying how the sounds should be stopped. - - - Returns a String representation of this AudioCategory. - - - Represents the audio engine. Applications use the methods of the audio engine to instantiate and manipulate core audio objects. Reference page contains links to related code samples. - - - Initializes a new instance of this class, using a path to an XACT global settings file. - Path to a global settings file. - - - Initializes a new instance of this class, using a settings file, a specific audio renderer, and a specific speaker configuration. - Path to a global settings file. - Interactive audio and branch event look-ahead time, in milliseconds. - A string that specifies the audio renderer to use. - - - Specifies the current content version. - - - Immediately releases the unmanaged resources used by this object. - - - Immediately releases the unmanaged resources used by this object. - [MarshalAsAttribute(U1)] true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - Occurs when Dispose is called or when this object is finalized and collected by the garbage collector of the Microsoft .NET common language runtime (CLR). - - - - Allows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object. - - - Gets an audio category. Reference page contains links to related code samples. - Friendly name of the category to get. - - - Gets the value of a global variable. Reference page contains links to related conceptual articles. - Friendly name of the variable. - - - Gets a value that indicates whether the object is disposed. - - - Gets a collection of audio renderers. - - - Sets the value of a global variable. - Value of the global variable. - Friendly name of the global variable. - - - Performs periodic work required by the audio engine. Reference page contains links to related code samples. - - - Controls how Cue objects should stop when Stop is called. - - - Indicates the cue should stop normally, playing any release phase or transition specified in the content. - - - Indicates the cue should stop immediately, ignoring any release phase or transition specified in the content. - - - Defines methods for managing the playback of sounds. Reference page contains links to related code samples. - - - Calculates the 3D audio values between an AudioEmitter and an AudioListener object, and applies the resulting values to this Cue. Reference page contains code sample. - The listener to calculate. - The emitter to calculate. - - - Immediately releases the unmanaged resources used by this object. - - - Occurs when Dispose is called or when this object is finalized and collected by the garbage collector of the Microsoft .NET common language runtime (CLR). - - - - Gets a cue-instance variable value based on its friendly name. - Friendly name of the variable. - - - Returns whether the cue has been created. - - - Gets a value indicating whether the object has been disposed. - - - Returns whether the cue is currently paused. - - - Returns whether the cue is playing. - - - Returns whether the cue is prepared to play. - - - Returns whether the cue is preparing to play. - - - Returns whether the cue is currently stopped. - - - Returns whether the cue is stopping playback. - - - Returns the friendly name of the cue. - - - Pauses playback. Reference page contains links to related code samples. - - - Requests playback of a prepared or preparing Cue. Reference page contains links to related code samples. - - - Resumes playback of a paused Cue. Reference page contains links to related code samples. - - - Sets the value of a cue-instance variable based on its friendly name. - Friendly name of the variable to set. - Value to assign to the variable. - - - Stops playback of a Cue. Reference page contains links to related code samples. - Enumerated value specifying how the sound should stop. If set to None, the sound will play any release phase or transition specified in the audio designer. If set to Immediate, the sound will stop immediately, ignoring any release phases or transitions. - - - Represents an audio renderer, which is a device that can render audio to a user. - - - Returns a value that indicates whether the current instance is equal to a specified object. - Object to compare to this object. - - - Gets the human-readable name for the renderer. - - - Gets the hash code for this instance. - - - Compares two objects to determine whether they are the same. - Object to the left of the equality operator. - Object to the right of the equality operator. - - - Compares two objects to determine whether they are different. - Object to the left of the inequality operator. - Object to the right of the inequality operator. - - - Specifies the string that identifies the renderer. - - - Retrieves a string representation of this object. - - - Represents a sound bank, which is a collection of cues. Reference page contains links to related code samples. - - - Initializes a new instance of this class using a sound bank from file. - Audio engine that will be associated with this sound bank. - Path to the sound bank file. - - - Immediately releases the unmanaged resources used by this object. - - - Immediately releases the unmanaged resources used by this object. - [MarshalAsAttribute(U1)] true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - Occurs when Dispose is called or when this object is finalized and collected by the garbage collector of the Microsoft .NET common language runtime (CLR). - - - - Allows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object. - - - Gets a cue from the sound bank. Reference page contains links to related code samples. - Friendly name of the cue to get. - - - Gets a value that indicates whether the object is disposed. - - - Returns whether the sound bank is currently in use. - - - Plays a cue. Reference page contains links to related code samples. - Name of the cue to play. - - - Plays a cue using 3D positional information specified in an AudioListener and AudioEmitter. Reference page contains links to related code samples. - Name of the cue to play. - AudioListener that specifies listener 3D audio information. - AudioEmitter that specifies emitter 3D audio information. - - - Represents a wave bank, which is a collection of wave files. Reference page contains links to related code samples. - - - Initializes a new, in-memory instance of this class using a specified AudioEngine and path to a wave bank file. - Instance of an AudioEngine to associate this wave bank with. - Path to the wave bank file to load. - - - Initializes a new, streaming instance of this class, using a provided AudioEngine and streaming wave bank parameters. - Instance of an AudioEngine to associate this wave bank with. - Path to the wave bank file to stream from. - Offset within the wave bank data file. This offset must be DVD sector aligned. - Stream packet size, in sectors, to use for each stream. The minimum value is 2. - - - Immediately releases the unmanaged resources used by this object. - - - Immediately releases the unmanaged resources used by this object. - [MarshalAsAttribute(U1)] true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - Occurs when Dispose is called or when this object is finalized and collected by the garbage collector of the Microsoft .NET common language runtime (CLR). - - - - Allows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object. - - - Gets a value that indicates whether the object is disposed. - - - Returns whether the wave bank is currently in use. - - - Returns whether the wave bank is prepared to play. - - - \ No newline at end of file diff --git a/StardewInjector/bin/Debug/StardewInjector.dll b/StardewInjector/bin/Debug/StardewInjector.dll index 407e9d32..92eb4317 100644 Binary files a/StardewInjector/bin/Debug/StardewInjector.dll and b/StardewInjector/bin/Debug/StardewInjector.dll differ diff --git a/StardewInjector/bin/Debug/StardewInjector.pdb b/StardewInjector/bin/Debug/StardewInjector.pdb index 4bd2890c..2a344ec2 100644 Binary files a/StardewInjector/bin/Debug/StardewInjector.pdb and b/StardewInjector/bin/Debug/StardewInjector.pdb differ diff --git a/StardewInjector/bin/Debug/StardewModdingAPI.exe b/StardewInjector/bin/Debug/StardewModdingAPI.exe index b616385b..64799ce6 100644 Binary files a/StardewInjector/bin/Debug/StardewModdingAPI.exe and b/StardewInjector/bin/Debug/StardewModdingAPI.exe differ diff --git a/StardewInjector/bin/Debug/StardewModdingAPI.pdb b/StardewInjector/bin/Debug/StardewModdingAPI.pdb index b165a20a..59be640a 100644 Binary files a/StardewInjector/bin/Debug/StardewModdingAPI.pdb and b/StardewInjector/bin/Debug/StardewModdingAPI.pdb differ diff --git a/StardewInjector/obj/Debug/StardewInjector.csproj.FileListAbsolute.txt b/StardewInjector/obj/Debug/StardewInjector.csproj.FileListAbsolute.txt index f51c1c6b..128b65c0 100644 --- a/StardewInjector/obj/Debug/StardewInjector.csproj.FileListAbsolute.txt +++ b/StardewInjector/obj/Debug/StardewInjector.csproj.FileListAbsolute.txt @@ -31,7 +31,5 @@ Z:\Projects\C#\SMAPI\StardewInjector\bin\Debug\StardewModdingAPI.exe Z:\Projects\C#\SMAPI\StardewInjector\bin\Debug\Stardew Valley.exe Z:\Projects\C#\SMAPI\StardewInjector\bin\Debug\xTile.dll Z:\Projects\C#\SMAPI\StardewInjector\bin\Debug\Lidgren.Network.dll -Z:\Projects\C#\SMAPI\StardewInjector\bin\Debug\Microsoft.Xna.Framework.Xact.dll Z:\Projects\C#\SMAPI\StardewInjector\bin\Debug\Steamworks.NET.dll Z:\Projects\C#\SMAPI\StardewInjector\bin\Debug\StardewModdingAPI.pdb -Z:\Projects\C#\SMAPI\StardewInjector\bin\Debug\Microsoft.Xna.Framework.Xact.xml diff --git a/StardewInjector/obj/Debug/StardewInjector.csprojResolveAssemblyReference.cache b/StardewInjector/obj/Debug/StardewInjector.csprojResolveAssemblyReference.cache index 66925993..11e1587b 100644 Binary files a/StardewInjector/obj/Debug/StardewInjector.csprojResolveAssemblyReference.cache and b/StardewInjector/obj/Debug/StardewInjector.csprojResolveAssemblyReference.cache differ diff --git a/StardewInjector/obj/Debug/StardewInjector.dll b/StardewInjector/obj/Debug/StardewInjector.dll index 407e9d32..92eb4317 100644 Binary files a/StardewInjector/obj/Debug/StardewInjector.dll and b/StardewInjector/obj/Debug/StardewInjector.dll differ diff --git a/StardewInjector/obj/Debug/StardewInjector.pdb b/StardewInjector/obj/Debug/StardewInjector.pdb index 4bd2890c..2a344ec2 100644 Binary files a/StardewInjector/obj/Debug/StardewInjector.pdb and b/StardewInjector/obj/Debug/StardewInjector.pdb differ diff --git a/StardewModdingAPI/EventArgs.cs b/StardewModdingAPI/EventArgs.cs index c8119bf8..cb7324c9 100644 --- a/StardewModdingAPI/EventArgs.cs +++ b/StardewModdingAPI/EventArgs.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework.Input; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Input; using StardewValley; using StardewValley.Menus; using System; @@ -60,6 +61,15 @@ namespace StardewModdingAPI public List NewLocations { get; private set; } } + public class EventArgsLocationObjectsChanged : EventArgs + { + public EventArgsLocationObjectsChanged(SerializableDictionary newObjects) + { + NewObjects = newObjects; + } + public SerializableDictionary NewObjects { get; private set; } + } + public class EventArgsCurrentLocationChanged : EventArgs { public EventArgsCurrentLocationChanged(GameLocation priorLocation, GameLocation newLocation) diff --git a/StardewModdingAPI/Events.cs b/StardewModdingAPI/Events.cs index 3ae861d9..de1c24bc 100644 --- a/StardewModdingAPI/Events.cs +++ b/StardewModdingAPI/Events.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using Microsoft.Xna.Framework.Input; using StardewValley; using StardewValley.Menus; +using Microsoft.Xna.Framework; namespace StardewModdingAPI { @@ -22,6 +23,7 @@ namespace StardewModdingAPI public static event EventHandler MouseChanged = delegate { }; public static event EventHandler MenuChanged = delegate { }; public static event EventHandler LocationsChanged = delegate { }; + public static event EventHandler LocationObjectsChanged = delegate { }; public static event EventHandler CurrentLocationChanged = delegate { }; public static event EventHandler Resize = delegate { }; public static event EventHandler FarmerChanged = delegate { }; @@ -142,5 +144,10 @@ namespace StardewModdingAPI { SeasonOfYearChanged.Invoke(null, new EventArgsStringChanged(priorString, newString)); } + + internal static void InvokeOnNewLocationObject(SerializableDictionary newObjects) + { + LocationObjectsChanged.Invoke(null, new EventArgsLocationObjectsChanged(newObjects)); + } } } diff --git a/StardewModdingAPI/Inheritance/SGame.cs b/StardewModdingAPI/Inheritance/SGame.cs index 21fbea70..83f8e335 100644 --- a/StardewModdingAPI/Inheritance/SGame.cs +++ b/StardewModdingAPI/Inheritance/SGame.cs @@ -44,6 +44,8 @@ namespace StardewModdingAPI.Inheritance } public int PreviousGameLocations { get; private set; } + public int PreviousLocationObjects { get; private set; } + public GameLocation PreviousGameLocation { get; private set; } public IClickableMenu PreviousActiveMenu { get; private set; } @@ -261,6 +263,12 @@ namespace StardewModdingAPI.Inheritance PreviousFarmer = player; } + if(currentLocation != null && PreviousLocationObjects != currentLocation.objects.GetHash()) + { + Events.InvokeOnNewLocationObject(currentLocation.objects); + PreviousLocationObjects = currentLocation.objects.GetHash(); + } + if (timeOfDay != PreviousTimeOfDay) { Events.InvokeTimeOfDayChanged(PreviousTimeOfDay, timeOfDay); diff --git a/StardewModdingAPI/obj/x86/Debug/StardewModdingAPI.csproj.FileListAbsolute.txt b/StardewModdingAPI/obj/x86/Debug/StardewModdingAPI.csproj.FileListAbsolute.txt index 38097ea8..48a6dfb7 100644 --- a/StardewModdingAPI/obj/x86/Debug/StardewModdingAPI.csproj.FileListAbsolute.txt +++ b/StardewModdingAPI/obj/x86/Debug/StardewModdingAPI.csproj.FileListAbsolute.txt @@ -43,4 +43,3 @@ Z:\Projects\C#\SMAPI\StardewModdingAPI\bin\x86\Debug\steam_appid.txt Z:\Projects\C#\SMAPI\StardewModdingAPI\bin\x86\Debug\StardewModdingAPI.exe.config Z:\Projects\C#\SMAPI\StardewModdingAPI\bin\x86\Debug\StardewModdingAPI.exe Z:\Projects\C#\SMAPI\StardewModdingAPI\bin\x86\Debug\StardewModdingAPI.pdb -Z:\Projects\C#\SMAPI\StardewModdingAPI\obj\x86\Debug\StardewModdingAPI.csprojResolveAssemblyReference.cache diff --git a/TrainerMod/bin/Debug/StardewModdingAPI.exe b/TrainerMod/bin/Debug/StardewModdingAPI.exe index b616385b..64799ce6 100644 Binary files a/TrainerMod/bin/Debug/StardewModdingAPI.exe and b/TrainerMod/bin/Debug/StardewModdingAPI.exe differ diff --git a/TrainerMod/bin/Debug/StardewModdingAPI.pdb b/TrainerMod/bin/Debug/StardewModdingAPI.pdb index b165a20a..59be640a 100644 Binary files a/TrainerMod/bin/Debug/StardewModdingAPI.pdb and b/TrainerMod/bin/Debug/StardewModdingAPI.pdb differ diff --git a/TrainerMod/bin/Debug/TrainerMod.dll b/TrainerMod/bin/Debug/TrainerMod.dll index fcc3d2a7..bbc1f948 100644 Binary files a/TrainerMod/bin/Debug/TrainerMod.dll and b/TrainerMod/bin/Debug/TrainerMod.dll differ diff --git a/TrainerMod/bin/Debug/TrainerMod.pdb b/TrainerMod/bin/Debug/TrainerMod.pdb index c4fe3cd5..259bd446 100644 Binary files a/TrainerMod/bin/Debug/TrainerMod.pdb and b/TrainerMod/bin/Debug/TrainerMod.pdb differ diff --git a/TrainerMod/obj/Debug/TrainerMod.csprojResolveAssemblyReference.cache b/TrainerMod/obj/Debug/TrainerMod.csprojResolveAssemblyReference.cache index 8b001896..e720517b 100644 Binary files a/TrainerMod/obj/Debug/TrainerMod.csprojResolveAssemblyReference.cache and b/TrainerMod/obj/Debug/TrainerMod.csprojResolveAssemblyReference.cache differ diff --git a/TrainerMod/obj/Debug/TrainerMod.pdb b/TrainerMod/obj/Debug/TrainerMod.pdb index c4fe3cd5..259bd446 100644 Binary files a/TrainerMod/obj/Debug/TrainerMod.pdb and b/TrainerMod/obj/Debug/TrainerMod.pdb differ