diff options
Diffstat (limited to 'StardewModdingAPI/Events/EventArgs.cs')
-rw-r--r-- | StardewModdingAPI/Events/EventArgs.cs | 47 |
1 files changed, 33 insertions, 14 deletions
diff --git a/StardewModdingAPI/Events/EventArgs.cs b/StardewModdingAPI/Events/EventArgs.cs index 59fa1bbd..91151e86 100644 --- a/StardewModdingAPI/Events/EventArgs.cs +++ b/StardewModdingAPI/Events/EventArgs.cs @@ -17,6 +17,7 @@ namespace StardewModdingAPI.Events NewState = newState;
NewState = newState;
}
+
public KeyboardState NewState { get; private set; }
public KeyboardState PriorState { get; private set; }
}
@@ -27,6 +28,7 @@ namespace StardewModdingAPI.Events {
KeyPressed = keyPressed;
}
+
public Keys KeyPressed { get; private set; }
}
@@ -37,6 +39,7 @@ namespace StardewModdingAPI.Events PlayerIndex = playerIndex;
ButtonPressed = buttonPressed;
}
+
public PlayerIndex PlayerIndex { get; private set; }
public Buttons ButtonPressed { get; private set; }
}
@@ -48,6 +51,7 @@ namespace StardewModdingAPI.Events PlayerIndex = playerIndex;
ButtonReleased = buttonReleased;
}
+
public PlayerIndex PlayerIndex { get; private set; }
public Buttons ButtonReleased { get; private set; }
}
@@ -60,6 +64,7 @@ namespace StardewModdingAPI.Events ButtonPressed = buttonPressed;
Value = value;
}
+
public PlayerIndex PlayerIndex { get; private set; }
public Buttons ButtonPressed { get; private set; }
public float Value { get; private set; }
@@ -73,18 +78,20 @@ namespace StardewModdingAPI.Events 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; }
}
@@ -96,6 +103,7 @@ namespace StardewModdingAPI.Events NewMenu = newMenu;
PriorMenu = priorMenu;
}
+
public IClickableMenu NewMenu { get; private set; }
public IClickableMenu PriorMenu { get; private set; }
}
@@ -106,8 +114,10 @@ namespace StardewModdingAPI.Events {
NewLocations = newLocations;
}
+
public List<GameLocation> NewLocations { get; private set; }
}
+
public class EventArgsMineLevelChanged : EventArgs
{
public EventArgsMineLevelChanged(int previousMineLevel, int currentMineLevel)
@@ -115,6 +125,7 @@ namespace StardewModdingAPI.Events PreviousMineLevel = previousMineLevel;
CurrentMineLevel = currentMineLevel;
}
+
public int PreviousMineLevel { get; private set; }
public int CurrentMineLevel { get; private set; }
}
@@ -125,6 +136,7 @@ namespace StardewModdingAPI.Events {
NewObjects = newObjects;
}
+
public SerializableDictionary<Vector2, Object> NewObjects { get; private set; }
}
@@ -135,6 +147,7 @@ namespace StardewModdingAPI.Events NewLocation = newLocation;
PriorLocation = priorLocation;
}
+
public GameLocation NewLocation { get; private set; }
public GameLocation PriorLocation { get; private set; }
}
@@ -146,8 +159,9 @@ namespace StardewModdingAPI.Events NewFarmer = NewFarmer;
PriorFarmer = PriorFarmer;
}
- public Farmer NewFarmer { get; private set; }
- public Farmer PriorFarmer { get; private set; }
+
+ public Farmer NewFarmer { get; }
+ public Farmer PriorFarmer { get; }
}
public class EventArgsInventoryChanged : EventArgs
@@ -159,6 +173,7 @@ namespace StardewModdingAPI.Events 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; }
@@ -169,42 +184,46 @@ namespace StardewModdingAPI.Events {
public enum LevelType
{
- Combat,
+ Combat,
Farming,
Fishing,
Foraging,
Mining,
Luck
}
- public EventArgsLevelUp(LevelType type, Int32 newLevel)
+
+ public EventArgsLevelUp(LevelType type, int newLevel)
{
Type = type;
NewLevel = newLevel;
}
+
public LevelType Type { get; private set; }
- public Int32 NewLevel { get; private set; }
+ public int NewLevel { get; private set; }
}
public class EventArgsIntChanged : EventArgs
{
- public EventArgsIntChanged(Int32 priorInt, Int32 newInt)
+ public EventArgsIntChanged(int priorInt, int newInt)
{
NewInt = NewInt;
PriorInt = PriorInt;
}
- public Int32 NewInt { get; private set; }
- public Int32 PriorInt { get; private set; }
+
+ public int NewInt { get; }
+ public int PriorInt { get; }
}
public class EventArgsStringChanged : EventArgs
{
- public EventArgsStringChanged(String priorString, String newString)
+ public EventArgsStringChanged(string priorString, string newString)
{
NewString = newString;
PriorString = priorString;
}
- public String NewString { get; private set; }
- public String PriorString { get; private set; }
+
+ public string NewString { get; private set; }
+ public string PriorString { get; private set; }
}
public class EventArgsLoadedGameChanged : EventArgs
@@ -224,7 +243,7 @@ namespace StardewModdingAPI.Events {
Command = command;
}
+
public Command Command { get; private set; }
}
-}
-
+}
\ No newline at end of file |