From 27dece2cf445147c5e2848f9ec26f38a101f50fc Mon Sep 17 00:00:00 2001 From: Gormogon Date: Sun, 29 May 2016 18:23:01 -0400 Subject: Attempt to migrate to new directory structure. --- BobberBar Private Fields.txt | 40 - Game1 Static Fields.txt | 329 ---- StardewModdingAPI.sln | 46 - StardewModdingAPI/App.config | 10 - StardewModdingAPI/Command.cs | 109 -- StardewModdingAPI/Config.cs | 176 -- StardewModdingAPI/Constants.cs | 67 - StardewModdingAPI/Entities/SCharacter.cs | 6 - StardewModdingAPI/Entities/SFarm.cs | 6 - StardewModdingAPI/Entities/SFarmAnimal.cs | 6 - StardewModdingAPI/Entities/SNpc.cs | 6 - StardewModdingAPI/Entities/SPlayer.cs | 33 - StardewModdingAPI/Events/Controls.cs | 58 - StardewModdingAPI/Events/EventArgs.cs | 272 --- StardewModdingAPI/Events/Game.cs | 123 -- StardewModdingAPI/Events/Graphics.cs | 162 -- StardewModdingAPI/Events/Location.cs | 30 - StardewModdingAPI/Events/Menu.cs | 21 - StardewModdingAPI/Events/Mine.cs | 14 - StardewModdingAPI/Events/Player.cs | 35 - StardewModdingAPI/Events/Time.cs | 42 - StardewModdingAPI/Extensions.cs | 135 -- StardewModdingAPI/FodyWeavers.xml | 5 - StardewModdingAPI/Inheritance/ItemStackChange.cs | 18 - StardewModdingAPI/Inheritance/Menus/SBobberBar.cs | 288 ---- StardewModdingAPI/Inheritance/Menus/SGameMenu.cs | 48 - .../Inheritance/Menus/SInventoryPage.cs | 19 - .../Inheritance/Minigames/SMinigameBase.cs | 34 - StardewModdingAPI/Inheritance/SBareObject.cs | 20 - StardewModdingAPI/Inheritance/SGame.cs | 1726 -------------------- StardewModdingAPI/Inheritance/SObject.cs | 277 ---- StardewModdingAPI/JsonResolver.cs | 212 --- StardewModdingAPI/Logger.cs | 326 ---- StardewModdingAPI/Manifest.cs | 89 - StardewModdingAPI/Mod.cs | 51 - StardewModdingAPI/ModItem.cs | 15 - StardewModdingAPI/Program.cs | 451 ----- StardewModdingAPI/Properties/AssemblyInfo.cs | 39 - StardewModdingAPI/StardewModdingAPI.csproj | 216 --- StardewModdingAPI/Version.cs | 23 - StardewModdingAPI/icon.ico | Bin 4286 -> 0 bytes StardewModdingAPI/packages.config | 7 - StardewModdingAPI/steam_appid.txt | 1 - TrainerMod/FodyWeavers.xml | 5 - TrainerMod/Properties/AssemblyInfo.cs | 39 - TrainerMod/TrainerMod.cs | 768 --------- TrainerMod/TrainerMod.csproj | 115 -- TrainerMod/manifest.json | 6 - TrainerMod/packages.config | 5 - Vanilla Items List.txt | 541 ------ docs/imgs/SMAPI.png | Bin 0 -> 252371 bytes src/BobberBar Private Fields.txt | 40 + src/Game1 Static Fields.txt | 329 ++++ src/StardewModdingAPI.sln | 46 + src/StardewModdingAPI/App.config | 10 + src/StardewModdingAPI/Command.cs | 109 ++ src/StardewModdingAPI/Config.cs | 176 ++ src/StardewModdingAPI/Constants.cs | 67 + src/StardewModdingAPI/Entities/SCharacter.cs | 6 + src/StardewModdingAPI/Entities/SFarm.cs | 6 + src/StardewModdingAPI/Entities/SFarmAnimal.cs | 6 + src/StardewModdingAPI/Entities/SNpc.cs | 6 + src/StardewModdingAPI/Entities/SPlayer.cs | 33 + src/StardewModdingAPI/Events/Controls.cs | 58 + src/StardewModdingAPI/Events/EventArgs.cs | 272 +++ src/StardewModdingAPI/Events/Game.cs | 123 ++ src/StardewModdingAPI/Events/Graphics.cs | 162 ++ src/StardewModdingAPI/Events/Location.cs | 30 + src/StardewModdingAPI/Events/Menu.cs | 21 + src/StardewModdingAPI/Events/Mine.cs | 14 + src/StardewModdingAPI/Events/Player.cs | 35 + src/StardewModdingAPI/Events/Time.cs | 42 + src/StardewModdingAPI/Extensions.cs | 135 ++ src/StardewModdingAPI/FodyWeavers.xml | 5 + .../Inheritance/ItemStackChange.cs | 18 + .../Inheritance/Menus/SBobberBar.cs | 288 ++++ .../Inheritance/Menus/SGameMenu.cs | 48 + .../Inheritance/Menus/SInventoryPage.cs | 19 + .../Inheritance/Minigames/SMinigameBase.cs | 34 + src/StardewModdingAPI/Inheritance/SBareObject.cs | 20 + src/StardewModdingAPI/Inheritance/SGame.cs | 1726 ++++++++++++++++++++ src/StardewModdingAPI/Inheritance/SObject.cs | 277 ++++ src/StardewModdingAPI/JsonResolver.cs | 212 +++ src/StardewModdingAPI/Logger.cs | 326 ++++ src/StardewModdingAPI/Manifest.cs | 89 + src/StardewModdingAPI/Mod.cs | 51 + src/StardewModdingAPI/ModItem.cs | 15 + src/StardewModdingAPI/Program.cs | 451 +++++ src/StardewModdingAPI/Properties/AssemblyInfo.cs | 39 + src/StardewModdingAPI/StardewModdingAPI.csproj | 216 +++ src/StardewModdingAPI/Version.cs | 23 + src/StardewModdingAPI/icon.ico | Bin 0 -> 4286 bytes src/StardewModdingAPI/packages.config | 7 + src/StardewModdingAPI/steam_appid.txt | 1 + src/TrainerMod/FodyWeavers.xml | 5 + src/TrainerMod/Properties/AssemblyInfo.cs | 39 + src/TrainerMod/TrainerMod.cs | 768 +++++++++ src/TrainerMod/TrainerMod.csproj | 115 ++ src/TrainerMod/manifest.json | 6 + src/TrainerMod/packages.config | 5 + src/Vanilla Items List.txt | 541 ++++++ 101 files changed, 7070 insertions(+), 7070 deletions(-) delete mode 100644 BobberBar Private Fields.txt delete mode 100644 Game1 Static Fields.txt delete mode 100644 StardewModdingAPI.sln delete mode 100644 StardewModdingAPI/App.config delete mode 100644 StardewModdingAPI/Command.cs delete mode 100644 StardewModdingAPI/Config.cs delete mode 100644 StardewModdingAPI/Constants.cs delete mode 100644 StardewModdingAPI/Entities/SCharacter.cs delete mode 100644 StardewModdingAPI/Entities/SFarm.cs delete mode 100644 StardewModdingAPI/Entities/SFarmAnimal.cs delete mode 100644 StardewModdingAPI/Entities/SNpc.cs delete mode 100644 StardewModdingAPI/Entities/SPlayer.cs delete mode 100644 StardewModdingAPI/Events/Controls.cs delete mode 100644 StardewModdingAPI/Events/EventArgs.cs delete mode 100644 StardewModdingAPI/Events/Game.cs delete mode 100644 StardewModdingAPI/Events/Graphics.cs delete mode 100644 StardewModdingAPI/Events/Location.cs delete mode 100644 StardewModdingAPI/Events/Menu.cs delete mode 100644 StardewModdingAPI/Events/Mine.cs delete mode 100644 StardewModdingAPI/Events/Player.cs delete mode 100644 StardewModdingAPI/Events/Time.cs delete mode 100644 StardewModdingAPI/Extensions.cs delete mode 100644 StardewModdingAPI/FodyWeavers.xml delete mode 100644 StardewModdingAPI/Inheritance/ItemStackChange.cs delete mode 100644 StardewModdingAPI/Inheritance/Menus/SBobberBar.cs delete mode 100644 StardewModdingAPI/Inheritance/Menus/SGameMenu.cs delete mode 100644 StardewModdingAPI/Inheritance/Menus/SInventoryPage.cs delete mode 100644 StardewModdingAPI/Inheritance/Minigames/SMinigameBase.cs delete mode 100644 StardewModdingAPI/Inheritance/SBareObject.cs delete mode 100644 StardewModdingAPI/Inheritance/SGame.cs delete mode 100644 StardewModdingAPI/Inheritance/SObject.cs delete mode 100644 StardewModdingAPI/JsonResolver.cs delete mode 100644 StardewModdingAPI/Logger.cs delete mode 100644 StardewModdingAPI/Manifest.cs delete mode 100644 StardewModdingAPI/Mod.cs delete mode 100644 StardewModdingAPI/ModItem.cs delete mode 100644 StardewModdingAPI/Program.cs delete mode 100644 StardewModdingAPI/Properties/AssemblyInfo.cs delete mode 100644 StardewModdingAPI/StardewModdingAPI.csproj delete mode 100644 StardewModdingAPI/Version.cs delete mode 100644 StardewModdingAPI/icon.ico delete mode 100644 StardewModdingAPI/packages.config delete mode 100644 StardewModdingAPI/steam_appid.txt delete mode 100644 TrainerMod/FodyWeavers.xml delete mode 100644 TrainerMod/Properties/AssemblyInfo.cs delete mode 100644 TrainerMod/TrainerMod.cs delete mode 100644 TrainerMod/TrainerMod.csproj delete mode 100644 TrainerMod/manifest.json delete mode 100644 TrainerMod/packages.config delete mode 100644 Vanilla Items List.txt create mode 100644 docs/imgs/SMAPI.png create mode 100644 src/BobberBar Private Fields.txt create mode 100644 src/Game1 Static Fields.txt create mode 100644 src/StardewModdingAPI.sln create mode 100644 src/StardewModdingAPI/App.config create mode 100644 src/StardewModdingAPI/Command.cs create mode 100644 src/StardewModdingAPI/Config.cs create mode 100644 src/StardewModdingAPI/Constants.cs create mode 100644 src/StardewModdingAPI/Entities/SCharacter.cs create mode 100644 src/StardewModdingAPI/Entities/SFarm.cs create mode 100644 src/StardewModdingAPI/Entities/SFarmAnimal.cs create mode 100644 src/StardewModdingAPI/Entities/SNpc.cs create mode 100644 src/StardewModdingAPI/Entities/SPlayer.cs create mode 100644 src/StardewModdingAPI/Events/Controls.cs create mode 100644 src/StardewModdingAPI/Events/EventArgs.cs create mode 100644 src/StardewModdingAPI/Events/Game.cs create mode 100644 src/StardewModdingAPI/Events/Graphics.cs create mode 100644 src/StardewModdingAPI/Events/Location.cs create mode 100644 src/StardewModdingAPI/Events/Menu.cs create mode 100644 src/StardewModdingAPI/Events/Mine.cs create mode 100644 src/StardewModdingAPI/Events/Player.cs create mode 100644 src/StardewModdingAPI/Events/Time.cs create mode 100644 src/StardewModdingAPI/Extensions.cs create mode 100644 src/StardewModdingAPI/FodyWeavers.xml create mode 100644 src/StardewModdingAPI/Inheritance/ItemStackChange.cs create mode 100644 src/StardewModdingAPI/Inheritance/Menus/SBobberBar.cs create mode 100644 src/StardewModdingAPI/Inheritance/Menus/SGameMenu.cs create mode 100644 src/StardewModdingAPI/Inheritance/Menus/SInventoryPage.cs create mode 100644 src/StardewModdingAPI/Inheritance/Minigames/SMinigameBase.cs create mode 100644 src/StardewModdingAPI/Inheritance/SBareObject.cs create mode 100644 src/StardewModdingAPI/Inheritance/SGame.cs create mode 100644 src/StardewModdingAPI/Inheritance/SObject.cs create mode 100644 src/StardewModdingAPI/JsonResolver.cs create mode 100644 src/StardewModdingAPI/Logger.cs create mode 100644 src/StardewModdingAPI/Manifest.cs create mode 100644 src/StardewModdingAPI/Mod.cs create mode 100644 src/StardewModdingAPI/ModItem.cs create mode 100644 src/StardewModdingAPI/Program.cs create mode 100644 src/StardewModdingAPI/Properties/AssemblyInfo.cs create mode 100644 src/StardewModdingAPI/StardewModdingAPI.csproj create mode 100644 src/StardewModdingAPI/Version.cs create mode 100644 src/StardewModdingAPI/icon.ico create mode 100644 src/StardewModdingAPI/packages.config create mode 100644 src/StardewModdingAPI/steam_appid.txt create mode 100644 src/TrainerMod/FodyWeavers.xml create mode 100644 src/TrainerMod/Properties/AssemblyInfo.cs create mode 100644 src/TrainerMod/TrainerMod.cs create mode 100644 src/TrainerMod/TrainerMod.csproj create mode 100644 src/TrainerMod/manifest.json create mode 100644 src/TrainerMod/packages.config create mode 100644 src/Vanilla Items List.txt diff --git a/BobberBar Private Fields.txt b/BobberBar Private Fields.txt deleted file mode 100644 index 2784f0e7..00000000 --- a/BobberBar Private Fields.txt +++ /dev/null @@ -1,40 +0,0 @@ -Single difficulty -Int32 motionType -Int32 whichFish -Single bobberPosition -Single bobberSpeed -Single bobberAcceleration -Single bobberTargetPosition -Single scale -Single everythingShakeTimer -Single floaterSinkerAcceleration -Single treasurePosition -Single treasureCatchLevel -Single treasureAppearTimer -Single treasureScale -Boolean bobberInBar -Boolean buttonPressed -Boolean flipBubble -Boolean fadeIn -Boolean fadeOut -Boolean treasure -Boolean treasureCaught -Boolean perfect -Boolean bossFish -Int32 bobberBarHeight -Int32 fishSize -Int32 fishQuality -Int32 minFishSize -Int32 maxFishSize -Int32 fishSizeReductionTimer -Int32 whichBobber -Microsoft.Xna.Framework.Vector2 barShake -Microsoft.Xna.Framework.Vector2 fishShake -Microsoft.Xna.Framework.Vector2 everythingShake -Microsoft.Xna.Framework.Vector2 treasureShake -Single reelRotation -StardewValley.BellsAndWhistles.SparklingText sparkleText -Single bobberBarPos -Single bobberBarSpeed -Single bobberBarAcceleration -Single distanceFromCatching \ No newline at end of file diff --git a/Game1 Static Fields.txt b/Game1 Static Fields.txt deleted file mode 100644 index 4580f95f..00000000 --- a/Game1 Static Fields.txt +++ /dev/null @@ -1,329 +0,0 @@ -Int32 pixelZoom -Int32 tileSize -System.String version -Microsoft.Xna.Framework.GraphicsDeviceManager graphics -Microsoft.Xna.Framework.Content.ContentManager content -Microsoft.Xna.Framework.Content.ContentManager temporaryContent -Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch -Microsoft.Xna.Framework.Input.GamePadState oldPadState -Single thumbStickSensitivity -Single runThreshold -Microsoft.Xna.Framework.Input.KeyboardState oldKBState -Microsoft.Xna.Framework.Input.MouseState oldMouseState -System.Collections.Generic.List`1[StardewValley.GameLocation] locations -StardewValley.GameLocation currentLocation -StardewValley.GameLocation locationAfterWarp -xTile.Display.IDisplayDevice mapDisplayDevice -StardewValley.Farmer player -StardewValley.Farmer serverHost -xTile.Dimensions.Rectangle viewport -Microsoft.Xna.Framework.Graphics.Texture2D objectSpriteSheet -Microsoft.Xna.Framework.Graphics.Texture2D toolSpriteSheet -Microsoft.Xna.Framework.Graphics.Texture2D cropSpriteSheet -Microsoft.Xna.Framework.Graphics.Texture2D mailboxTexture -Microsoft.Xna.Framework.Graphics.Texture2D emoteSpriteSheet -Microsoft.Xna.Framework.Graphics.Texture2D debrisSpriteSheet -Microsoft.Xna.Framework.Graphics.Texture2D toolIconBox -Microsoft.Xna.Framework.Graphics.Texture2D rainTexture -Microsoft.Xna.Framework.Graphics.Texture2D bigCraftableSpriteSheet -Microsoft.Xna.Framework.Graphics.Texture2D swordSwipe -Microsoft.Xna.Framework.Graphics.Texture2D swordSwipeDark -Microsoft.Xna.Framework.Graphics.Texture2D buffsIcons -Microsoft.Xna.Framework.Graphics.Texture2D daybg -Microsoft.Xna.Framework.Graphics.Texture2D nightbg -Microsoft.Xna.Framework.Graphics.Texture2D logoScreenTexture -Microsoft.Xna.Framework.Graphics.Texture2D tvStationTexture -Microsoft.Xna.Framework.Graphics.Texture2D cloud -Microsoft.Xna.Framework.Graphics.Texture2D menuTexture -Microsoft.Xna.Framework.Graphics.Texture2D lantern -Microsoft.Xna.Framework.Graphics.Texture2D windowLight -Microsoft.Xna.Framework.Graphics.Texture2D sconceLight -Microsoft.Xna.Framework.Graphics.Texture2D cauldronLight -Microsoft.Xna.Framework.Graphics.Texture2D shadowTexture -Microsoft.Xna.Framework.Graphics.Texture2D mouseCursors -Microsoft.Xna.Framework.Graphics.Texture2D indoorWindowLight -Microsoft.Xna.Framework.Graphics.Texture2D animations -Microsoft.Xna.Framework.Graphics.Texture2D titleScreenBG -Microsoft.Xna.Framework.Graphics.Texture2D logo -Microsoft.Xna.Framework.Graphics.RenderTarget2D lightmap -Microsoft.Xna.Framework.Graphics.Texture2D fadeToBlackRect -Microsoft.Xna.Framework.Graphics.Texture2D staminaRect -Microsoft.Xna.Framework.Graphics.Texture2D currentCoopTexture -Microsoft.Xna.Framework.Graphics.Texture2D currentBarnTexture -Microsoft.Xna.Framework.Graphics.Texture2D currentHouseTexture -Microsoft.Xna.Framework.Graphics.Texture2D greenhouseTexture -Microsoft.Xna.Framework.Graphics.Texture2D littleEffect -Microsoft.Xna.Framework.Graphics.SpriteFont dialogueFont -Microsoft.Xna.Framework.Graphics.SpriteFont smallFont -Microsoft.Xna.Framework.Graphics.SpriteFont borderFont -Microsoft.Xna.Framework.Graphics.SpriteFont tinyFont -Microsoft.Xna.Framework.Graphics.SpriteFont tinyFontBorder -Microsoft.Xna.Framework.Graphics.SpriteFont smoothFont -Single fadeToBlackAlpha -Single pickToolInterval -Single screenGlowAlpha -Single flashAlpha -Single starCropShimmerPause -Single noteBlockTimer -Single globalFadeSpeed -Boolean fadeToBlack -Boolean fadeIn -Boolean dialogueUp -Boolean dialogueTyping -Boolean pickingTool -Boolean isQuestion -Boolean nonWarpFade -Boolean particleRaining -Boolean newDay -Boolean inMine -Boolean isEating -Boolean menuUp -Boolean eventUp -Boolean viewportFreeze -Boolean eventOver -Boolean nameSelectUp -Boolean screenGlow -Boolean screenGlowHold -Boolean screenGlowUp -Boolean progressBar -Boolean isRaining -Boolean isSnowing -Boolean killScreen -Boolean coopDwellerBorn -Boolean messagePause -Boolean isDebrisWeather -Boolean boardingBus -Boolean listeningForKeyControlDefinitions -Boolean weddingToday -Boolean exitToTitle -Boolean debugMode -Boolean isLightning -Boolean displayHUD -Boolean displayFarmer -Boolean showKeyHelp -Boolean inputMode -Boolean shippingTax -Boolean dialogueButtonShrinking -Boolean jukeboxPlaying -Boolean drawLighting -Boolean bloomDay -Boolean quit -Boolean isChatting -Boolean globalFade -Boolean drawGrid -Boolean freezeControls -Boolean saveOnNewDay -Boolean panMode -Boolean showingEndOfNightStuff -Boolean wasRainingYesterday -Boolean hasLoadedGame -Boolean isActionAtCurrentCursorTile -Boolean isInspectionAtCurrentCursorTile -Boolean paused -Boolean lastCursorMotionWasMouse -System.String currentSeason -System.String debugOutput -System.String nextMusicTrack -System.String selectedItemsType -System.String nameSelectType -System.String messageAfterPause -System.String fertilizer -System.String samBandName -System.String elliottBookName -System.String slotResult -System.String keyHelpString -System.String debugInput -System.String loadingMessage -System.String errorMessage -System.Collections.Generic.Queue`1[System.String] currentObjectDialogue -System.Collections.Generic.Queue`1[System.String] mailbox -System.Collections.Generic.List`1[System.String] questionChoices -Int32 xLocationAfterWarp -Int32 yLocationAfterWarp -Int32 gameTimeInterval -Int32 currentQuestionChoice -Int32 currentDialogueCharacterIndex -Int32 dialogueTypingInterval -Int32 dayOfMonth -Int32 year -Int32 timeOfDay -Int32 numberOfSelectedItems -Int32 priceOfSelectedItem -Int32 currentWallpaper -Int32 farmerWallpaper -Int32 wallpaperPrice -Int32 currentFloor -Int32 FarmerFloor -Int32 floorPrice -Int32 dialogueWidth -Int32 countdownToWedding -Int32 menuChoice -Int32 tvStation -Int32 currentBillboard -Int32 facingDirectionAfterWarp -Int32 tmpTimeOfDay -Int32 percentageToWinStardewHero -Int32 mouseClickPolling -Int32 weatherIcon -Int32 hitShakeTimer -Int32 staminaShakeTimer -Int32 pauseThenDoFunctionTimer -Int32 weatherForTomorrow -Int32 currentSongIndex -Int32 cursorTileHintCheckTimer -Int32 timerUntilMouseFade -Int32 minecartHighScore -System.Collections.Generic.List`1[System.Int32] dealerCalicoJackTotal -Microsoft.Xna.Framework.Color morningColor -Microsoft.Xna.Framework.Color eveningColor -Microsoft.Xna.Framework.Color unselectedOptionColor -Microsoft.Xna.Framework.Color screenGlowColor -StardewValley.NPC currentSpeaker -System.Random random -System.Random recentMultiplayerRandom -System.Collections.Generic.Dictionary`2[System.Int32,System.String] objectInformation -System.Collections.Generic.Dictionary`2[System.Int32,System.String] bigCraftablesInformation -System.Collections.Generic.List`1[StardewValley.Object] shippingBin -StardewValley.Locations.MineShaft mine -System.Collections.Generic.List`1[StardewValley.HUDMessage] hudMessages -System.Collections.Generic.Dictionary`2[System.String,System.Boolean] eventConditions -System.Collections.Generic.Dictionary`2[System.String,System.String] NPCGiftTastes -Single musicPlayerVolume -Single pauseAccumulator -Single pauseTime -Single upPolling -Single downPolling -Single rightPolling -Single leftPolling -Single debrisSoundInterval -Single toolHold -Single windGust -Single dialogueButtonScale -Single creditsTimer -Single globalOutdoorLighting -Microsoft.Xna.Framework.Audio.Cue currentSong -Microsoft.Xna.Framework.Audio.AudioCategory musicCategory -Microsoft.Xna.Framework.Audio.AudioCategory soundCategory -Microsoft.Xna.Framework.PlayerIndex playerOneIndex -Microsoft.Xna.Framework.Audio.AudioEngine audioEngine -Microsoft.Xna.Framework.Audio.WaveBank waveBank -Microsoft.Xna.Framework.Audio.SoundBank soundBank -Microsoft.Xna.Framework.Vector2 shiny -Microsoft.Xna.Framework.Vector2 previousViewportPosition -Microsoft.Xna.Framework.Vector2 currentCursorTile -Microsoft.Xna.Framework.Vector2 lastCursorTile -StardewValley.RainDrop[] rainDrops -Double chanceToRainTomorrow -Microsoft.Xna.Framework.Audio.Cue fuseSound -Microsoft.Xna.Framework.Audio.Cue chargeUpSound -Microsoft.Xna.Framework.Audio.Cue wind -Double dailyLuck -System.Collections.Generic.List`1[StardewValley.WeatherDebris] debrisWeather -System.Collections.Generic.List`1[StardewValley.TemporaryAnimatedSprite] screenOverlayTempSprites -Byte gameMode -Byte multiplayerMode -System.Collections.Generic.IEnumerator`1[System.Int32] currentLoader -UInt64 uniqueIDForThisGame -StardewValley.LoadGameScreen loadGameScreen -StardewValley.Stats stats -Int32[] cropsOfTheWeek -StardewValley.Quests.Quest questOfTheDay -StardewValley.MoneyMadeScreen moneyMadeScreen -System.Collections.Generic.HashSet`1[StardewValley.LightSource] currentLightSources -Microsoft.Xna.Framework.Color ambientLight -Microsoft.Xna.Framework.Color outdoorLight -Microsoft.Xna.Framework.Color textColor -Microsoft.Xna.Framework.Color textShadowColor -StardewValley.Menus.IClickableMenu activeClickableMenu -StardewValley.Minigames.IMinigame currentMinigame -System.Collections.Generic.List`1[StardewValley.Menus.IClickableMenu] onScreenMenus -StardewValley.BloomComponent bloom -System.Collections.Generic.Dictionary`2[System.Int32,System.String] achievements -StardewValley.Object dishOfTheDay -StardewValley.Menus.BuffsDisplay buffsDisplay -StardewValley.Menus.DayTimeMoneyBox dayTimeMoneyBox -System.Collections.Generic.Dictionary`2[System.Int64,StardewValley.Farmer] otherFarmers -StardewValley.Network.Server server -StardewValley.Network.Client client -StardewValley.KeyboardDispatcher keyboardDispatcher -StardewValley.Background background -StardewValley.Events.FarmEvent farmEvent -afterFadeFunction afterFade -afterFadeFunction afterDialogues -afterFadeFunction afterViewport -afterFadeFunction viewportReachedTarget -afterFadeFunction afterPause -Microsoft.Xna.Framework.GameTime currentGameTime -System.Collections.Generic.List`1[StardewValley.DelayedAction] delayedActions -System.Collections.Generic.Stack`1[StardewValley.Menus.IClickableMenu] endOfNightMenus -StardewValley.Options options -StardewValley.Game1 game1 -Microsoft.Xna.Framework.Point lastMousePositionBeforeFade -Microsoft.Xna.Framework.Point viewportCenter -Microsoft.Xna.Framework.Vector2 viewportTarget -Single viewportSpeed -Int32 viewportHold -Boolean toggleFullScreen -Boolean isFullscreen -Boolean setToWindowedMode -Boolean setToFullscreen -System.String whereIsTodaysFest -Boolean farmerShouldPassOut -Microsoft.Xna.Framework.Vector2 currentViewportTarget -Microsoft.Xna.Framework.Vector2 viewportPositionLerp -Single screenGlowRate -Single screenGlowMax -Boolean haltAfterCheck -Int32 mouseCursor -Single mouseCursorTransparency -StardewValley.NPC objectDialoguePortraitPerson -Int32 defaultResolutionX -Int32 defaultResolutionY -Int32 smallestTileSize -Int32 up -Int32 right -Int32 down -Int32 left -Int32 spriteIndexForOveralls -Int32 colorToleranceForOveralls -Int32 spriteIndexForOverallsBorder -Int32 colorToloranceForOverallsBorder -Int32 dialogueBoxTileHeight -Int32 realMilliSecondsPerGameTenMinutes -Int32 rainDensity -Int32 millisecondsPerDialogueLetterType -Single pickToolDelay -Int32 defaultMinFishingBiteTime -Int32 defaultMaxFishingBiteTime -Int32 defaultMinFishingNibbleTime -Int32 defaultMaxFishingNibbleTime -Int32 minWallpaperPrice -Int32 maxWallpaperPrice -Int32 rainLoopLength -Int32 weather_sunny -Int32 weather_rain -Int32 weather_debris -Int32 weather_lightning -Int32 weather_festival -Int32 weather_snow -Int32 weather_wedding -Byte singlePlayer -Byte multiplayerClient -Byte multiplayerServer -Byte logoScreenGameMode -Byte titleScreenGameMode -Byte loadScreenGameMode -Byte newGameMode -Byte playingGameMode -Byte characterSelectMode -Byte loadingMode -Byte saveMode -Byte saveCompleteMode -Byte selectGameScreen -Byte creditsMode -Byte errorLogMode -Single keyPollingThreshold -Single toolHoldPerPowerupLevel -Single startingMusicVolume -Single thumbstickToMouseModifier -System.String NO_LETTER_MAIL \ No newline at end of file diff --git a/StardewModdingAPI.sln b/StardewModdingAPI.sln deleted file mode 100644 index 087d0b36..00000000 --- a/StardewModdingAPI.sln +++ /dev/null @@ -1,46 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25123.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrainerMod", "TrainerMod\TrainerMod.csproj", "{28480467-1A48-46A7-99F8-236D95225359}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StardewModdingAPI", "StardewModdingAPI\StardewModdingAPI.csproj", "{F1A573B0-F436-472C-AE29-0B91EA6B9F8F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|Mixed Platforms = Debug|Mixed Platforms - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|Mixed Platforms = Release|Mixed Platforms - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {28480467-1A48-46A7-99F8-236D95225359}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {28480467-1A48-46A7-99F8-236D95225359}.Debug|Any CPU.Build.0 = Debug|Any CPU - {28480467-1A48-46A7-99F8-236D95225359}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {28480467-1A48-46A7-99F8-236D95225359}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {28480467-1A48-46A7-99F8-236D95225359}.Debug|x86.ActiveCfg = Debug|Any CPU - {28480467-1A48-46A7-99F8-236D95225359}.Release|Any CPU.ActiveCfg = Release|Any CPU - {28480467-1A48-46A7-99F8-236D95225359}.Release|Any CPU.Build.0 = Release|Any CPU - {28480467-1A48-46A7-99F8-236D95225359}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {28480467-1A48-46A7-99F8-236D95225359}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {28480467-1A48-46A7-99F8-236D95225359}.Release|x86.ActiveCfg = Release|Any CPU - {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Debug|x86.ActiveCfg = Debug|x86 - {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Debug|x86.Build.0 = Debug|x86 - {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Release|Any CPU.Build.0 = Release|Any CPU - {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Release|Mixed Platforms.Build.0 = Release|x86 - {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Release|x86.ActiveCfg = Release|x86 - {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Release|x86.Build.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/StardewModdingAPI/App.config b/StardewModdingAPI/App.config deleted file mode 100644 index 6664f1ed..00000000 --- a/StardewModdingAPI/App.config +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/StardewModdingAPI/Command.cs b/StardewModdingAPI/Command.cs deleted file mode 100644 index 4214b1a7..00000000 --- a/StardewModdingAPI/Command.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System; -using System.Collections.Generic; -using StardewModdingAPI.Events; - -namespace StardewModdingAPI -{ - public class Command - { - internal static List RegisteredCommands = new List(); - public string[] CalledArgs; - public string[] CommandArgs; - public string CommandDesc; - - public string CommandName; - - /// - /// Creates a Command from a Name, Description, and Arguments - /// - /// Name - /// Description - /// Arguments - public Command(string cname, string cdesc, string[] args = null) - { - CommandName = cname; - CommandDesc = cdesc; - if (args == null) - args = new string[0]; - CommandArgs = args; - } - - public event EventHandler CommandFired; - - /// - /// Calls the specified command. (It runs the command) - /// - /// The command to run - public static void CallCommand(string input) - { - input = input.TrimEnd(' '); - var args = new string[0]; - Command fnd; - if (input.Contains(" ")) - { - args = input.Split(new[] {" "}, 2, StringSplitOptions.RemoveEmptyEntries); - fnd = FindCommand(args[0]); - args = args[1].Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries); - } - else - { - fnd = FindCommand(input); - } - - if (fnd != null) - { - fnd.CalledArgs = args; - fnd.Fire(); - } - else - { - Log.AsyncR("Unknown Command"); - } - } - - /// - /// Registers a command to the list of commands properly - /// - /// Name of the command to register - /// Description - /// Arguments (these are purely for viewing so that a user can see what an argument needs to be) - /// - public static Command RegisterCommand(string command, string cdesc, string[] args = null) - { - var c = new Command(command, cdesc, args); - if (RegisteredCommands.Contains(c)) - { - Log.AsyncR($"Command already registered! [{c.CommandName}]"); - return RegisteredCommands.Find(x => x.Equals(c)); - } - - RegisteredCommands.Add(c); - Log.Async("Registered command: " + command); - - return c; - } - - /// - /// Looks up a command in the list of registered commands. Returns null if it doesn't exist (I think) - /// - /// Name of command to find - /// - public static Command FindCommand(string name) - { - return RegisteredCommands.Find(x => x.CommandName.Equals(name)); - } - - /// - /// Runs a command. Fires it. Calls it. Any of those. - /// - public void Fire() - { - if (CommandFired == null) - { - Log.AsyncR("Command failed to fire because it's fire event is null: " + CommandName); - return; - } - CommandFired.Invoke(this, new EventArgsCommand(this)); - } - } -} \ No newline at end of file diff --git a/StardewModdingAPI/Config.cs b/StardewModdingAPI/Config.cs deleted file mode 100644 index c5b7beca..00000000 --- a/StardewModdingAPI/Config.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* - Copyright 2016 Zoey (Zoryn) -*/ - -using System; -using System.IO; -using System.Linq; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace StardewModdingAPI -{ - public class Config - { - [JsonIgnore] - public virtual string ConfigLocation { get; protected internal set; } - - [JsonIgnore] - public virtual string ConfigDir => Path.GetDirectoryName(ConfigLocation); - - public virtual Config Instance() where T : Config => Activator.CreateInstance(); - - /// - /// Loads the config from the json blob on disk, updating and re-writing to the disk if needed. - /// - /// - /// - public virtual T LoadConfig() where T : Config - { - if (string.IsNullOrEmpty(ConfigLocation)) - { - Log.AsyncR("A config tried to load without specifying a location on the disk."); - return null; - } - - T ret = null; - - if (!File.Exists(ConfigLocation)) - { - //no config exists, generate default values - var c = GenerateDefaultConfig(); - c.ConfigLocation = ConfigLocation; - ret = c; - } - else - { - try - { - //try to load the config from a json blob on disk - var c = JsonConvert.DeserializeObject(File.ReadAllText(ConfigLocation), new JsonSerializerSettings {ContractResolver = new JsonResolver()}); - - c.ConfigLocation = ConfigLocation; - - //update the config with default values if needed - ret = c.UpdateConfig(); - - c = null; - } - catch (Exception ex) - { - Log.AsyncR($"Invalid JSON ({GetType().Name}): {ConfigLocation} \n{ex}"); - return GenerateDefaultConfig(); - } - } - - ret.WriteConfig(); - return ret; - } - - /// - /// MUST be implemented in inheriting class! - /// - public virtual T GenerateDefaultConfig() where T : Config - { - return null; - } - - /// - /// Merges a default-value config with the user-config on disk. - /// - /// - /// - public virtual T UpdateConfig() where T : Config - { - try - { - //default config - var b = JObject.FromObject(Instance().GenerateDefaultConfig(), new JsonSerializer {ContractResolver = new JsonResolver()}); - - //user config - var u = JObject.FromObject(this, new JsonSerializer {ContractResolver = new JsonResolver()}); - - //overwrite default values with user values - b.Merge(u, new JsonMergeSettings {MergeArrayHandling = MergeArrayHandling.Replace}); - - //cast json object to config - var c = b.ToObject(); - - //re-write the location on disk to the object - c.ConfigLocation = ConfigLocation; - - return c; - } - catch (Exception ex) - { - Log.AsyncR("An error occured when updating a config: " + ex); - return this as T; - } - } - } - - public static class ConfigExtensions - { - /// - /// Initializes an instance of any class that inherits from Config. - /// This method performs the loading, saving, and merging of the config on the disk and in memory at a default state. - /// This method should not be used to re-load or to re-save a config. - /// NOTE: You MUST set your config EQUAL to the return of this method! - /// - /// - /// - /// - /// - public static T InitializeConfig(this T baseConfig, string configLocation) where T : Config - { - if (baseConfig == null) - { - baseConfig = Activator.CreateInstance(); - /* - Log.AsyncR("A config tried to initialize whilst being null."); - return null; - */ - } - - if (string.IsNullOrEmpty(configLocation)) - { - Log.AsyncR("A config tried to initialize without specifying a location on the disk."); - return null; - } - - baseConfig.ConfigLocation = configLocation; - var c = baseConfig.LoadConfig(); - - return c; - } - - /// - /// Writes a config to a json blob on the disk specified in the config's properties. - /// - public static void WriteConfig(this T baseConfig) where T : Config - { - if (string.IsNullOrEmpty(baseConfig?.ConfigLocation) || string.IsNullOrEmpty(baseConfig.ConfigDir)) - { - Log.AsyncR("A config attempted to save when it itself or it's location were null."); - return; - } - - var s = JsonConvert.SerializeObject(baseConfig, typeof(T), Formatting.Indented, new JsonSerializerSettings {ContractResolver = new JsonResolver()}); - - if (!Directory.Exists(baseConfig.ConfigDir)) - Directory.CreateDirectory(baseConfig.ConfigDir); - - if (!File.Exists(baseConfig.ConfigLocation) || !File.ReadAllText(baseConfig.ConfigLocation).SequenceEqual(s)) - File.WriteAllText(baseConfig.ConfigLocation, s); - } - - /// - /// Re-reads the json blob on the disk and merges its values with a default config. - /// NOTE: You MUST set your config EQUAL to the return of this method! - /// - public static T ReloadConfig(this T baseConfig) where T : Config - { - return baseConfig.LoadConfig(); - } - } -} \ No newline at end of file diff --git a/StardewModdingAPI/Constants.cs b/StardewModdingAPI/Constants.cs deleted file mode 100644 index 0dd387b3..00000000 --- a/StardewModdingAPI/Constants.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.IO; -using System.Reflection; -using StardewValley; - -namespace StardewModdingAPI -{ - /// - /// Static class containing readonly values. - /// - public static class Constants - { - public static readonly Version Version = new Version(0, 40, 0, "Alpha"); - - /// - /// Not quite "constant", but it makes more sense for it to be here, at least for now - /// - public static int ModsLoaded = 0; - - /// - /// Stardew Valley's roaming app data location. - /// %AppData%//StardewValley - /// - public static string DataPath => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley"); - - public static string SavesPath => Path.Combine(DataPath, "Saves"); - - private static string saveFolderName => PlayerNull ? string.Empty : Game1.player.name.RemoveNumerics() + "_" + Game1.uniqueIDForThisGame; - public static string SaveFolderName => CurrentSavePathExists ? saveFolderName : ""; - - private static string currentSavePath => PlayerNull ? string.Empty : Path.Combine(SavesPath, saveFolderName); - public static string CurrentSavePath => CurrentSavePathExists ? currentSavePath : ""; - - public static bool CurrentSavePathExists => Directory.Exists(currentSavePath); - - public static bool PlayerNull => !Game1.hasLoadedGame || Game1.player == null || string.IsNullOrEmpty(Game1.player.name); - - /// - /// Execution path to execute the code. - /// - public static string ExecutionPath => Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - - /// - /// Title for the API console - /// - public static string ConsoleTitle => $"Stardew Modding API Console - Version {Version.VersionString} - Mods Loaded: {ModsLoaded}"; - - /// - /// Path for log files to be output to. - /// %LocalAppData%//StardewValley//ErrorLogs - /// - public static string LogDir => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley", "ErrorLogs"); - - public static string LogPath => Path.Combine(LogDir, "MODDED_ProgramLog.Log_LATEST.txt"); - - /// - /// Whether or not to enable the Render Target drawing code offered by ClxS - /// Do not mark as 'const' or else 'if' checks will complain that the expression is always true in ReSharper - /// - public static bool EnableDrawingIntoRenderTarget => true; - - /// - /// Completely overrides the base game's draw call to the one is SGame - /// - public static bool EnableCompletelyOverridingBaseCalls => true; - } -} \ No newline at end of file diff --git a/StardewModdingAPI/Entities/SCharacter.cs b/StardewModdingAPI/Entities/SCharacter.cs deleted file mode 100644 index 2d941d55..00000000 --- a/StardewModdingAPI/Entities/SCharacter.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace StardewModdingAPI.Entities -{ - internal class SCharacter - { - } -} \ No newline at end of file diff --git a/StardewModdingAPI/Entities/SFarm.cs b/StardewModdingAPI/Entities/SFarm.cs deleted file mode 100644 index c6c64681..00000000 --- a/StardewModdingAPI/Entities/SFarm.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace StardewModdingAPI.Entities -{ - internal class SFarm - { - } -} \ No newline at end of file diff --git a/StardewModdingAPI/Entities/SFarmAnimal.cs b/StardewModdingAPI/Entities/SFarmAnimal.cs deleted file mode 100644 index fb8ee267..00000000 --- a/StardewModdingAPI/Entities/SFarmAnimal.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace StardewModdingAPI.Entities -{ - internal class SFarmAnimal - { - } -} \ No newline at end of file diff --git a/StardewModdingAPI/Entities/SNpc.cs b/StardewModdingAPI/Entities/SNpc.cs deleted file mode 100644 index 727dcff7..00000000 --- a/StardewModdingAPI/Entities/SNpc.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace StardewModdingAPI.Entities -{ - internal class SNpc - { - } -} \ No newline at end of file diff --git a/StardewModdingAPI/Entities/SPlayer.cs b/StardewModdingAPI/Entities/SPlayer.cs deleted file mode 100644 index d464cded..00000000 --- a/StardewModdingAPI/Entities/SPlayer.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using StardewValley; - -namespace StardewModdingAPI.Entities -{ - /// - /// Static class for intergrating with the player - /// - public class SPlayer - { - /// - /// Calls 'getAllFarmers' in Game1 - /// - public static List AllFarmers => Game1.getAllFarmers(); - - /// - /// Do not use. - /// - [Obsolete("Use 'Player' instead.")] - public static Farmer CurrentFarmer => Game1.player; - - /// - /// Gets the current player from Game1 - /// - public static Farmer Player => Game1.player; - - /// - /// Gets the player's current location from Game1 - /// - public static GameLocation CurrentFarmerLocation => Player.currentLocation; - } -} \ No newline at end of file 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 KeyboardChanged = delegate { }; - public static event EventHandler KeyPressed = delegate { }; - public static event EventHandler KeyReleased = delegate { }; - public static event EventHandler MouseChanged = delegate { }; - public static event EventHandler ControllerButtonPressed = delegate { }; - public static event EventHandler ControllerButtonReleased = delegate { }; - public static event EventHandler ControllerTriggerPressed = delegate { }; - public static event EventHandler 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 newLocations) - { - NewLocations = newLocations; - } - - public List 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 newObjects) - { - NewObjects = newObjects; - } - - public SerializableDictionary 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 inventory, List 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 Inventory { get; private set; } - public List Added { get; private set; } - public List Removed { get; private set; } - public List 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 { }; - - /// - /// Fires every update (1/60 of a second) - /// - public static event EventHandler UpdateTick = delegate { }; - - /// - /// Fires every other update (1/30 of a second) - /// - public static event EventHandler SecondUpdateTick = delegate { }; - - /// - /// Fires every fourth update (1/15 of a second) - /// - public static event EventHandler FourthUpdateTick = delegate { }; - - /// - /// Fires every eighth update (roughly 1/8 of a second) - /// - public static event EventHandler EighthUpdateTick = delegate { }; - - /// - /// Fires every fifthteenth update (1/4 of a second) - /// - public static event EventHandler QuarterSecondTick = delegate { }; - - /// - /// Fires every thirtieth update (1/2 of a second) - /// - public static event EventHandler HalfSecondTick = delegate { }; - - /// - /// Fires every sixtieth update (a second) - /// - 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 -{ - /// - /// - /// - public static class GraphicsEvents - { - /// - /// Occurs when the form (game) is resized. - /// - public static event EventHandler Resize = delegate { }; - - /// - /// Occurs before anything is drawn. - /// - public static event EventHandler OnPreRenderEvent = delegate { }; - - /// - /// Occurs before the GUI is drawn. - /// - public static event EventHandler OnPreRenderGuiEvent = delegate { }; - - /// - /// Occurs after the GUI is drawn. - /// - public static event EventHandler OnPostRenderGuiEvent = delegate { }; - - /// - /// Occurs before the HUD is drawn. - /// - public static event EventHandler OnPreRenderHudEvent = delegate { }; - - /// - /// Occurs after the HUD is drawn. - /// - public static event EventHandler OnPostRenderHudEvent = delegate { }; - - /// - /// Occurs after everything is drawn. - /// - public static event EventHandler OnPostRenderEvent = delegate { }; - - /// - /// Occurs before the GUI is drawn. Does not check for conditional statements. - /// - public static event EventHandler OnPreRenderGuiEventNoCheck = delegate { }; - - /// - /// Occurs after the GUI is drawn. Does not check for conditional statements. - /// - public static event EventHandler OnPostRenderGuiEventNoCheck = delegate { }; - - /// - /// Occurs before the HUD is drawn. Does not check for conditional statements. - /// - public static event EventHandler OnPreRenderHudEventNoCheck = delegate { }; - - /// - /// Occurs after the HUD is drawn. Does not check for conditional statements. - /// - public static event EventHandler OnPostRenderHudEventNoCheck = delegate { }; - - /// - /// 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. - /// - 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, EventA