diff options
author | Gormogon <Gormogon@users.noreply.github.com> | 2016-05-29 18:23:01 -0400 |
---|---|---|
committer | Gormogon <Gormogon@users.noreply.github.com> | 2016-05-29 18:23:01 -0400 |
commit | 27dece2cf445147c5e2848f9ec26f38a101f50fc (patch) | |
tree | 2579d0979dd9f295972e5ba2a81f4177589f7395 /StardewModdingAPI/Events | |
parent | 85142935b63324f7c6131a8855acea0a2d534879 (diff) | |
download | SMAPI-27dece2cf445147c5e2848f9ec26f38a101f50fc.tar.gz SMAPI-27dece2cf445147c5e2848f9ec26f38a101f50fc.tar.bz2 SMAPI-27dece2cf445147c5e2848f9ec26f38a101f50fc.zip |
Attempt to migrate to new directory structure.
Diffstat (limited to 'StardewModdingAPI/Events')
-rw-r--r-- | StardewModdingAPI/Events/Controls.cs | 58 | ||||
-rw-r--r-- | StardewModdingAPI/Events/EventArgs.cs | 272 | ||||
-rw-r--r-- | StardewModdingAPI/Events/Game.cs | 123 | ||||
-rw-r--r-- | StardewModdingAPI/Events/Graphics.cs | 162 | ||||
-rw-r--r-- | StardewModdingAPI/Events/Location.cs | 30 | ||||
-rw-r--r-- | StardewModdingAPI/Events/Menu.cs | 21 | ||||
-rw-r--r-- | StardewModdingAPI/Events/Mine.cs | 14 | ||||
-rw-r--r-- | StardewModdingAPI/Events/Player.cs | 35 | ||||
-rw-r--r-- | StardewModdingAPI/Events/Time.cs | 42 |
9 files changed, 0 insertions, 757 deletions
diff --git a/StardewModdingAPI/Events/Controls.cs b/StardewModdingAPI/Events/Controls.cs deleted file mode 100644 index 6415561a..00000000 --- a/StardewModdingAPI/Events/Controls.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System;
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Input;
-
-namespace StardewModdingAPI.Events
-{
- public static class ControlEvents
- {
- public static event EventHandler<EventArgsKeyboardStateChanged> KeyboardChanged = delegate { };
- public static event EventHandler<EventArgsKeyPressed> KeyPressed = delegate { };
- public static event EventHandler<EventArgsKeyPressed> KeyReleased = delegate { };
- public static event EventHandler<EventArgsMouseStateChanged> MouseChanged = delegate { };
- public static event EventHandler<EventArgsControllerButtonPressed> ControllerButtonPressed = delegate { };
- public static event EventHandler<EventArgsControllerButtonReleased> ControllerButtonReleased = delegate { };
- public static event EventHandler<EventArgsControllerTriggerPressed> ControllerTriggerPressed = delegate { };
- public static event EventHandler<EventArgsControllerTriggerReleased> ControllerTriggerReleased = delegate { };
-
- internal static void InvokeKeyboardChanged(KeyboardState priorState, KeyboardState newState)
- {
- KeyboardChanged.Invoke(null, new EventArgsKeyboardStateChanged(priorState, newState));
- }
-
- internal static void InvokeMouseChanged(MouseState priorState, MouseState newState)
- {
- MouseChanged.Invoke(null, new EventArgsMouseStateChanged(priorState, newState));
- }
-
- internal static void InvokeKeyPressed(Keys key)
- {
- KeyPressed.Invoke(null, new EventArgsKeyPressed(key));
- }
-
- internal static void InvokeKeyReleased(Keys key)
- {
- KeyReleased.Invoke(null, new EventArgsKeyPressed(key));
- }
-
- internal static void InvokeButtonPressed(PlayerIndex playerIndex, Buttons buttons)
- {
- ControllerButtonPressed.Invoke(null, new EventArgsControllerButtonPressed(playerIndex, buttons));
- }
-
- internal static void InvokeButtonReleased(PlayerIndex playerIndex, Buttons buttons)
- {
- ControllerButtonReleased.Invoke(null, new EventArgsControllerButtonReleased(playerIndex, buttons));
- }
-
- internal static void InvokeTriggerPressed(PlayerIndex playerIndex, Buttons buttons, float value)
- {
- ControllerTriggerPressed.Invoke(null, new EventArgsControllerTriggerPressed(playerIndex, buttons, value));
- }
-
- internal static void InvokeTriggerReleased(PlayerIndex playerIndex, Buttons buttons, float value)
- {
- ControllerTriggerReleased.Invoke(null, new EventArgsControllerTriggerReleased(playerIndex, buttons, value));
- }
- }
-}
\ No newline at end of file diff --git a/StardewModdingAPI/Events/EventArgs.cs b/StardewModdingAPI/Events/EventArgs.cs deleted file mode 100644 index 2bce964e..00000000 --- a/StardewModdingAPI/Events/EventArgs.cs +++ /dev/null @@ -1,272 +0,0 @@ -using System;
-using System.Collections.Generic;
-using System.Linq;
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Input;
-using StardewModdingAPI.Inheritance;
-using StardewValley;
-using StardewValley.Menus;
-using Object = StardewValley.Object;
-
-namespace StardewModdingAPI.Events
-{
- public class EventArgsKeyboardStateChanged : EventArgs
- {
- public EventArgsKeyboardStateChanged(KeyboardState priorState, KeyboardState newState)
- {
- NewState = newState;
- NewState = newState;
- }
-
- public KeyboardState NewState { get; private set; }
- public KeyboardState PriorState { get; private set; }
- }
-
- public class EventArgsKeyPressed : EventArgs
- {
- public EventArgsKeyPressed(Keys keyPressed)
- {
- KeyPressed = keyPressed;
- }
-
- public Keys KeyPressed { get; private set; }
- }
-
- public class EventArgsControllerButtonPressed : EventArgs
- {
- public EventArgsControllerButtonPressed(PlayerIndex playerIndex, Buttons buttonPressed)
- {
- PlayerIndex = playerIndex;
- ButtonPressed = buttonPressed;
- }
-
- public PlayerIndex PlayerIndex { get; private set; }
- public Buttons ButtonPressed { get; private set; }
- }
-
- public class EventArgsControllerButtonReleased : EventArgs
- {
- public EventArgsControllerButtonReleased(PlayerIndex playerIndex, Buttons buttonReleased)
- {
- PlayerIndex = playerIndex;
- ButtonReleased = buttonReleased;
- }
-
- public PlayerIndex PlayerIndex { get; private set; }
- public Buttons ButtonReleased { get; private set; }
- }
-
- public class EventArgsControllerTriggerPressed : EventArgs
- {
- public EventArgsControllerTriggerPressed(PlayerIndex playerIndex, Buttons buttonPressed, float value)
- {
- PlayerIndex = playerIndex;
- ButtonPressed = buttonPressed;
- Value = value;
- }
-
- public PlayerIndex PlayerIndex { get; private set; }
- public Buttons ButtonPressed { get; private set; }
- public float Value { get; private set; }
- }
-
- public class EventArgsControllerTriggerReleased : EventArgs
- {
- public EventArgsControllerTriggerReleased(PlayerIndex playerIndex, Buttons buttonReleased, float value)
- {
- PlayerIndex = playerIndex;
- ButtonReleased = buttonReleased;
- Value = value;
- }
-
- public PlayerIndex PlayerIndex { get; private set; }
- public Buttons ButtonReleased { get; private set; }
- public float Value { get; private set; }
- }
-
- public class EventArgsMouseStateChanged : EventArgs
- {
- public EventArgsMouseStateChanged(MouseState priorState, MouseState newState)
- {
- NewState = newState;
- NewState = newState;
- }
-
- public MouseState NewState { get; private set; }
- public MouseState PriorState { get; private set; }
- }
-
- public class EventArgsClickableMenuChanged : EventArgs
- {
- public EventArgsClickableMenuChanged(IClickableMenu priorMenu, IClickableMenu newMenu)
- {
- NewMenu = newMenu;
- PriorMenu = priorMenu;
- }
-
- public IClickableMenu NewMenu { get; private set; }
- public IClickableMenu PriorMenu { get; private set; }
- }
-
- public class EventArgsClickableMenuClosed : EventArgs
- {
- public EventArgsClickableMenuClosed(IClickableMenu priorMenu)
- {
- PriorMenu = priorMenu;
- }
-
- public IClickableMenu PriorMenu { get; private set; }
- }
-
- public class EventArgsGameLocationsChanged : EventArgs
- {
- public EventArgsGameLocationsChanged(List<GameLocation> newLocations)
- {
- NewLocations = newLocations;
- }
-
- public List<GameLocation> NewLocations { get; private set; }
- }
-
- public class EventArgsMineLevelChanged : EventArgs
- {
- public EventArgsMineLevelChanged(int previousMineLevel, int currentMineLevel)
- {
- PreviousMineLevel = previousMineLevel;
- CurrentMineLevel = currentMineLevel;
- }
-
- public int PreviousMineLevel { get; private set; }
- public int CurrentMineLevel { get; private set; }
- }
-
- public class EventArgsLocationObjectsChanged : EventArgs
- {
- public EventArgsLocationObjectsChanged(SerializableDictionary<Vector2, Object> newObjects)
- {
- NewObjects = newObjects;
- }
-
- public SerializableDictionary<Vector2, Object> NewObjects { get; private set; }
- }
-
- public class EventArgsCurrentLocationChanged : EventArgs
- {
- public EventArgsCurrentLocationChanged(GameLocation priorLocation, GameLocation newLocation)
- {
- NewLocation = newLocation;
- PriorLocation = priorLocation;
- }
-
- public GameLocation NewLocation { get; private set; }
- public GameLocation PriorLocation { get; private set; }
- }
-
- public class EventArgsFarmerChanged : EventArgs
- {
- public EventArgsFarmerChanged(Farmer priorFarmer, Farmer newFarmer)
- {
- NewFarmer = NewFarmer;
- PriorFarmer = PriorFarmer;
- }
-
- public Farmer NewFarmer { get; }
- public Farmer PriorFarmer { get; }
- }
-
- public class EventArgsInventoryChanged : EventArgs
- {
- public EventArgsInventoryChanged(List<Item> inventory, List<ItemStackChange> changedItems)
- {
- Inventory = inventory;
- Added = changedItems.Where(n => n.ChangeType == ChangeType.Added).ToList();
- Removed = changedItems.Where(n => n.ChangeType == ChangeType.Removed).ToList();
- QuantityChanged = changedItems.Where(n => n.ChangeType == ChangeType.StackChange).ToList();
- }
-
- public List<Item> Inventory { get; private set; }
- public List<ItemStackChange> Added { get; private set; }
- public List<ItemStackChange> Removed { get; private set; }
- public List<ItemStackChange> QuantityChanged { get; private set; }
- }
-
- public class EventArgsLevelUp : EventArgs
- {
- public enum LevelType
- {
- Combat,
- Farming,
- Fishing,
- Foraging,
- Mining,
- Luck
- }
-
- public EventArgsLevelUp(LevelType type, int newLevel)
- {
- Type = type;
- NewLevel = newLevel;
- }
-
- public LevelType Type { get; private set; }
- public int NewLevel { get; private set; }
- }
-
- public class EventArgsIntChanged : EventArgs
- {
- public EventArgsIntChanged(int priorInt, int newInt)
- {
- NewInt = NewInt;
- PriorInt = PriorInt;
- }
-
- public int NewInt { get; }
- public int PriorInt { get; }
- }
-
- public class EventArgsStringChanged : EventArgs
- {
- public EventArgsStringChanged(string priorString, string newString)
- {
- NewString = newString;
- PriorString = priorString;
- }
-
- public string NewString { get; private set; }
- public string PriorString { get; private set; }
- }
-
- public class EventArgsLoadedGameChanged : EventArgs
- {
- public EventArgsLoadedGameChanged(bool loadedGame)
- {
- LoadedGame = loadedGame;
- }
-
- public bool LoadedGame { get; private set; }
- }
-
- public class EventArgsNewDay : EventArgs
- {
- public EventArgsNewDay(int prevDay, int curDay, bool newDay)
- {
- PreviousDay = prevDay;
- CurrentDay = curDay;
- IsNewDay = newDay;
- }
-
- public int PreviousDay { get; private set; }
- public int CurrentDay { get; private set; }
- public bool IsNewDay { get; private set; }
- }
-
- public class EventArgsCommand : EventArgs
- {
- public EventArgsCommand(Command command)
- {
- Command = command;
- }
-
- public Command Command { get; private set; }
- }
-}
\ No newline at end of file diff --git a/StardewModdingAPI/Events/Game.cs b/StardewModdingAPI/Events/Game.cs deleted file mode 100644 index 8b8042ed..00000000 --- a/StardewModdingAPI/Events/Game.cs +++ /dev/null @@ -1,123 +0,0 @@ -using System;
-
-namespace StardewModdingAPI.Events
-{
- public static class GameEvents
- {
- public static event EventHandler GameLoaded = delegate { };
- public static event EventHandler Initialize = delegate { };
- public static event EventHandler LoadContent = delegate { };
- public static event EventHandler FirstUpdateTick = delegate { };
-
- /// <summary>
- /// Fires every update (1/60 of a second)
- /// </summary>
- public static event EventHandler UpdateTick = delegate { };
-
- /// <summary>
- /// Fires every other update (1/30 of a second)
- /// </summary>
- public static event EventHandler SecondUpdateTick = delegate { };
-
- /// <summary>
- /// Fires every fourth update (1/15 of a second)
- /// </summary>
- public static event EventHandler FourthUpdateTick = delegate { };
-
- /// <summary>
- /// Fires every eighth update (roughly 1/8 of a second)
- /// </summary>
- public static event EventHandler EighthUpdateTick = delegate { };
-
- /// <summary>
- /// Fires every fifthteenth update (1/4 of a second)
- /// </summary>
- public static event EventHandler QuarterSecondTick = delegate { };
-
- /// <summary>
- /// Fires every thirtieth update (1/2 of a second)
- /// </summary>
- public static event EventHandler HalfSecondTick = delegate { };
-
- /// <summary>
- /// Fires every sixtieth update (a second)
- /// </summary>
- public static event EventHandler OneSecondTick = delegate { };
-
- internal static void InvokeGameLoaded()
- {
- GameLoaded.Invoke(null, EventArgs.Empty);
- }
-
- internal static void InvokeInitialize()
- {
- try
- {
- Initialize.Invoke(null, EventArgs.Empty);
- }
- catch (Exception ex)
- {
- Log.AsyncR("An exception occured in XNA Initialize: " + ex);
- }
- }
-
- internal static void InvokeLoadContent()
- {
- try
- {
- LoadContent.Invoke(null, EventArgs.Empty);
- }
- catch (Exception ex)
- {
- Log.AsyncR("An exception occured in XNA LoadContent: " + ex);
- }
- }
-
- internal static void InvokeUpdateTick()
- {
- try
- {
- UpdateTick.Invoke(null, EventArgs.Empty);
- }
- catch (Exception ex)
- {
- Log.AsyncR("An exception occured in XNA UpdateTick: " + ex);
- }
- }
-
- internal static void InvokeSecondUpdateTick()
- {
- SecondUpdateTick.Invoke(null, EventArgs.Empty);
- }
-
- internal static void InvokeFourthUpdateTick()
- {
- FourthUpdateTick.Invoke(null, EventArgs.Empty);
- }
-
- internal static void InvokeEighthUpdateTick()
- {
- EighthUpdateTick.Invoke(null, EventArgs.Empty);
- }
-
- internal static void InvokeQuarterSecondTick()
- {
- QuarterSecondTick.Invoke(null, EventArgs.Empty);
- }
-
- internal static void InvokeHalfSecondTick()
- {
- HalfSecondTick.Invoke(null, EventArgs.Empty);
- }
-
- internal static void InvokeOneSecondTick()
- {
- OneSecondTick.Invoke(null, EventArgs.Empty);
- }
-
- internal static void InvokeFirstUpdateTick()
- {
- FirstUpdateTick.Invoke(null, EventArgs.Empty);
- }
- }
-}
\ No newline at end of file diff --git a/StardewModdingAPI/Events/Graphics.cs b/StardewModdingAPI/Events/Graphics.cs deleted file mode 100644 index 331d3e3a..00000000 --- a/StardewModdingAPI/Events/Graphics.cs +++ /dev/null @@ -1,162 +0,0 @@ -using System;
-
-namespace StardewModdingAPI.Events
-{
- /// <summary>
- ///
- /// </summary>
- public static class GraphicsEvents
- {
- /// <summary>
- /// Occurs when the form (game) is resized.
- /// </summary>
- public static event EventHandler Resize = delegate { };
-
- /// <summary>
- /// Occurs before anything is drawn.
- /// </summary>
- public static event EventHandler OnPreRenderEvent = delegate { };
-
- /// <summary>
- /// Occurs before the GUI is drawn.
- /// </summary>
- public static event EventHandler OnPreRenderGuiEvent = delegate { };
-
- /// <summary>
- /// Occurs after the GUI is drawn.
- /// </summary>
- public static event EventHandler OnPostRenderGuiEvent = delegate { };
-
- /// <summary>
- /// Occurs before the HUD is drawn.
- /// </summary>
- public static event EventHandler OnPreRenderHudEvent = delegate { };
-
- /// <summary>
- /// Occurs after the HUD is drawn.
- /// </summary>
- public static event EventHandler OnPostRenderHudEvent = delegate { };
-
- /// <summary>
- /// Occurs after everything is drawn.
- /// </summary>
- public static event EventHandler OnPostRenderEvent = delegate { };
-
- /// <summary>
- /// Occurs before the GUI is drawn. Does not check for conditional statements.
- /// </summary>
- public static event EventHandler OnPreRenderGuiEventNoCheck = delegate { };
-
- /// <summary>
- /// Occurs after the GUI is drawn. Does not check for conditional statements.
- /// </summary>
- public static event EventHandler OnPostRenderGuiEventNoCheck = delegate { };
-
- /// <summary>
- /// Occurs before the HUD is drawn. Does not check for conditional statements.
- /// </summary>
- public static event EventHandler OnPreRenderHudEventNoCheck = delegate { };
-
- /// <summary>
- /// Occurs after the HUD is drawn. Does not check for conditional statements.
- /// </summary>
- public static event EventHandler OnPostRenderHudEventNoCheck = delegate { };
-
- /// <summary>
- /// Draws when SGame.Debug is true. F3 toggles this.
- /// Game1.spriteBatch.Begin() is pre-called.
- /// Do not make end or begin calls to the spritebatch.
- /// If you are only trying to add debug information, use SGame.DebugMessageQueue in your Update loop.
- /// </summary>
- public static event EventHandler DrawDebug = delegate { };
-
- internal static void InvokeDrawDebug(object sender, EventArgs e)
- {
- DrawDebug.Invoke(sender, e);
- }
-
- internal static void InvokeOnPreRenderEvent(object sender, EventArgs e)
- {
- OnPreRenderEvent.Invoke(sender, e);
- }
-
- internal static void InvokeOnPreRenderGuiEvent(object sender, EventArgs e)
- {
- OnPreRenderGuiEvent.Invoke(sender, e);
- }
-
- internal static void InvokeOnPostRenderGuiEvent(object sender, EventArgs e)
- {
- OnPostRenderGuiEvent.Invoke(sender, e);
- }
-
- internal static void InvokeOnPreRenderHudEvent(object sender, EventArgs e)
- {
- OnPreRenderHudEvent.Invoke(sender, e);
- }
-
- internal static void InvokeOnPostRenderHudEvent(object sender, EventArgs e)
- {
- OnPostRenderHudEvent.Invoke(sender, e);
- }
-
- internal static void InvokeOnPostRenderEvent(object sender, EventArgs e)
- {
- OnPostRenderEvent.Invoke(sender, e);
- }
-
- internal static void InvokeOnPreRenderGuiEventNoCheck(object sender, EventArgs e)
- {
- OnPreRenderGuiEventNoCheck.Invoke(sender, e);
- }
-
- internal static void InvokeOnPostRenderGuiEventNoCheck(object sender, EventArgs e)
- {
- OnPostRenderGuiEventNoCheck.Invoke(sender, e);
- }
-
- internal static void InvokeOnPreRenderHudEventNoCheck(object sender, EventArgs e)
- {
- OnPreRenderHudEventNoCheck.Invoke(sender, e);
- }
-
- internal static void InvokeOnPostRenderHudEventNoCheck(object sender, EventArgs e)
- {
- OnPostRenderHudEventNoCheck.Invoke(sender, e);
- }
-
- internal static void InvokeResize(object sender, EventArgs e)
- {
- Resize.Invoke(sender, e);
- }
-
- #region To Remove
-
- [Obsolete("Use the other Pre/Post render events instead.")]
- public static event EventHandler DrawTick = delegate { };
-
- [Obsolete("Use the other Pre/Post render events instead. All of them will automatically be drawn into the render target if needed.")]
- public static event EventHandler DrawInRenderTargetTick = delegate { };
-
- [Obsolete("Should not be used.")]
- public static void InvokeDrawTick()
- {
- try
- {
- DrawTick.Invoke(null, EventArgs.Empty);
- }
- catch (Exception ex)
- {
- Log.AsyncR("An exception occured in a Mod's DrawTick: " + ex);
- }
- }
-
- [Obsolete("Should not be used.")]
- public static void InvokeDrawInRenderTargetTick()
- {
- DrawInRenderTargetTick.Invoke(null, EventArgs.Empty);
- }
-
- #endregion
- }
-}
\ No newline at end of file diff --git a/StardewModdingAPI/Events/Location.cs b/StardewModdingAPI/Events/Location.cs deleted file mode 100644 index f951ab95..00000000 --- a/StardewModdingAPI/Events/Location.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System;
-using System.Collections.Generic;
-using Microsoft.Xna.Framework;
-using StardewValley;
-using Object = StardewValley.Object;
-
-namespace StardewModdingAPI.Events
-{
- public static class LocationEvents
- {
- public static event EventHandler<EventArgsGameLocationsChanged> LocationsChanged = delegate { };
- public static event EventHandler<EventArgsLocationObjectsChanged> LocationObjectsChanged = delegate { };
- public static event EventHandler<EventArgsCurrentLocationChanged> CurrentLocationChanged = delegate { };
-
- internal static void InvokeLocationsChanged(List<GameLocation> newLocations)
- {
- LocationsChanged.Invoke(null, new EventArgsGameLocationsChanged(newLocations));
- }
-
- internal static void InvokeCurrentLocationChanged(GameLocation priorLocation, GameLocation newLocation)
- {
- CurrentLocationChanged.Invoke(null, new EventArgsCurrentLocationChanged(priorLocation, newLocation));
- }
-
- internal static void InvokeOnNewLocationObject(SerializableDictionary<Vector2, Object> newObjects)
- {
- LocationObjectsChanged.Invoke(null, new EventArgsLocationObjectsChanged(newObjects));
- }
- }
-}
\ No newline at end of file diff --git a/StardewModdingAPI/Events/Menu.cs b/StardewModdingAPI/Events/Menu.cs deleted file mode 100644 index 0e043780..00000000 --- a/StardewModdingAPI/Events/Menu.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System;
-using StardewValley.Menus;
-
-namespace StardewModdingAPI.Events
-{
- public static class MenuEvents
- {
- public static event EventHandler<EventArgsClickableMenuChanged> MenuChanged = delegate { };
- public static event EventHandler<EventArgsClickableMenuClosed> MenuClosed = delegate { };
-
- internal static void InvokeMenuChanged(IClickableMenu priorMenu, IClickableMenu newMenu)
- {
- MenuChanged.Invoke(null, new EventArgsClickableMenuChanged(priorMenu, newMenu));
- }
-
- internal static void InvokeMenuClosed(IClickableMenu priorMenu)
- {
- MenuClosed.Invoke(null, new EventArgsClickableMenuClosed(priorMenu));
- }
- }
-}
\ No newline at end of file diff --git a/StardewModdingAPI/Events/Mine.cs b/StardewModdingAPI/Events/Mine.cs deleted file mode 100644 index 55514d42..00000000 --- a/StardewModdingAPI/Events/Mine.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System;
-
-namespace StardewModdingAPI.Events
-{
- public static class MineEvents
- {
- public static event EventHandler<EventArgsMineLevelChanged> MineLevelChanged = delegate { };
-
- internal static void InvokeMineLevelChanged(int previousMinelevel, int currentMineLevel)
- {
- MineLevelChanged.Invoke(null, new EventArgsMineLevelChanged(previousMinelevel, currentMineLevel));
- }
- }
-}
\ No newline at end of file diff --git a/StardewModdingAPI/Events/Player.cs b/StardewModdingAPI/Events/Player.cs deleted file mode 100644 index 22f572b7..00000000 --- a/StardewModdingAPI/Events/Player.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System;
-using System.Collections.Generic;
-using StardewModdingAPI.Inheritance;
-using StardewValley;
-
-namespace StardewModdingAPI.Events
-{
- public static class PlayerEvents
- {
- public static event EventHandler<EventArgsFarmerChanged> FarmerChanged = delegate { };
- public static event EventHandler<EventArgsInventoryChanged> InventoryChanged = delegate { };
- public static event EventHandler<EventArgsLevelUp> LeveledUp = delegate { };
- public static event EventHandler<EventArgsLoadedGameChanged> LoadedGame = delegate { };
-
- internal static void InvokeFarmerChanged(Farmer priorFarmer, Farmer newFarmer)
- {
- FarmerChanged.Invoke(null, new EventArgsFarmerChanged(priorFarmer, newFarmer));
- }
-
- internal static void InvokeInventoryChanged(List<Item> inventory, List<ItemStackChange> changedItems)
- {
- InventoryChanged.Invoke(null, new EventArgsInventoryChanged(inventory, changedItems));
- }
-
- internal static void InvokeLeveledUp(EventArgsLevelUp.LevelType type, int newLevel)
- {
- LeveledUp.Invoke(null, new EventArgsLevelUp(type, newLevel));
- }
-
- internal static void InvokeLoadedGame(EventArgsLoadedGameChanged loaded)
- {
- LoadedGame.Invoke(null, loaded);
- }
- }
-}
\ No newline at end of file diff --git a/StardewModdingAPI/Events/Time.cs b/StardewModdingAPI/Events/Time.cs deleted file mode 100644 index 39ca642a..00000000 --- a/StardewModdingAPI/Events/Time.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System;
-
-namespace StardewModdingAPI.Events
-{
- public static class TimeEvents
- {
- public static event EventHandler<EventArgsIntChanged> TimeOfDayChanged = delegate { };
- public static event EventHandler<EventArgsIntChanged> DayOfMonthChanged = delegate { };
- public static event EventHandler<EventArgsIntChanged> YearOfGameChanged = delegate { };
- public static event EventHandler<EventArgsStringChanged> SeasonOfYearChanged = delegate { };
-
- /// <summary>
- /// Occurs when Game1.newDay changes. True directly before saving, and False directly after.
- /// </summary>
- public static event EventHandler<EventArgsNewDay> OnNewDay = delegate { };
-
- internal static void InvokeTimeOfDayChanged(int priorInt, int newInt)
- {
- TimeOfDayChanged.Invoke(null, new EventArgsIntChanged(priorInt, newInt));
- }
-
- internal static void InvokeDayOfMonthChanged(int priorInt, int newInt)
- {
- DayOfMonthChanged.Invoke(null, new EventArgsIntChanged(priorInt, newInt));
- }
-
- internal static void InvokeYearOfGameChanged(int priorInt, int newInt)
- {
- YearOfGameChanged.Invoke(null, new EventArgsIntChanged(priorInt, newInt));
- }
-
- internal static void InvokeSeasonOfYearChanged(string priorString, string newString)
- {
- SeasonOfYearChanged.Invoke(null, new EventArgsStringChanged(priorString, newString));
- }
-
- internal static void InvokeOnNewDay(int priorInt, int newInt, bool newDay)
- {
- OnNewDay.Invoke(null, new EventArgsNewDay(priorInt, newInt, newDay));
- }
- }
-}
\ No newline at end of file |