├── .gitattributes
├── .gitignore
├── AutoStacker
├── AutoStacker.csproj
├── AutoStackerConfig.cs
├── AutoStackerMod.cs
├── README.md
└── manifest.json
├── BetterArtisanGoodIcons
├── ArtisanGood.cs
├── ArtisanGoodTextureProvider.cs
├── ArtisanGoodsManager.cs
├── BetterArtisanGoodIcons.csproj
├── BetterArtisanGoodIconsConfig.cs
├── BetterArtisanGoodIconsMod.cs
├── Content
│ ├── ContentPackSource.cs
│ ├── ContentSourceManager.cs
│ ├── CustomTextureData.cs
│ ├── IContentSource.cs
│ ├── ModSource.cs
│ └── TextureDataContentSource.cs
├── Extensions
│ ├── DictionaryExtensions.cs
│ └── ListExtensions.cs
├── Patches
│ ├── FurniturePatches
│ │ └── DrawPatch.cs
│ └── SObjectPatches
│ │ ├── DrawInMenuPatch.cs
│ │ ├── DrawPatch.cs
│ │ └── DrawWhenHeldPatch.cs
├── Properties
│ └── AssemblyInfo.cs
├── README.md
├── assets
│ ├── data.json
│ ├── honey.png
│ ├── jelly.png
│ ├── juice.png
│ ├── pickles.png
│ └── wine.png
└── manifest.json
├── BetterAutomaticGates
├── BetterAutomaticGates.csproj
├── Framework
│ ├── GateExtensions.cs
│ └── ModConfig.cs
├── ModEntry.cs
└── manifest.json
├── BetterDoors
├── BetterDoors.csproj
├── BetterDoorsMod.cs
├── Framework
│ ├── ContentPacks
│ │ ├── ContentPack.cs
│ │ ├── ContentPackDoor.cs
│ │ └── ContentPackLoader.cs
│ ├── Door.cs
│ ├── DoorGeneration
│ │ ├── DoorAssetLoader.cs
│ │ ├── DoorGenerationState.cs
│ │ ├── DoorSpriteGenerator.cs
│ │ ├── GeneratedDoorTileInfo.cs
│ │ ├── GeneratedDoorTileInfoManager.cs
│ │ └── GeneratedTileSheetInfo.cs
│ ├── DoorManager.cs
│ ├── Enums
│ │ ├── OpeningDirection.cs
│ │ ├── Orientation.cs
│ │ └── State.cs
│ ├── Mapping
│ │ ├── DoorCreator.cs
│ │ ├── MapTileSheetManager.cs
│ │ ├── PendingDoor.cs
│ │ └── Properties
│ │ │ ├── MapDoor.cs
│ │ │ ├── MapDoorExtras.cs
│ │ │ └── MapDoorVersion.cs
│ ├── Multiplayer
│ │ ├── DoorStateReply.cs
│ │ ├── DoorStateRequest.cs
│ │ └── DoorToggle.cs
│ ├── Patches
│ │ ├── DoorCollisionPatch.cs
│ │ └── MouseCursorPatch.cs
│ ├── Serialization
│ │ ├── BetterDoorsModConfig.cs
│ │ ├── ConfigManager.cs
│ │ └── DoorPositionSerializer.cs
│ └── Utility
│ │ ├── CallbackTimer.cs
│ │ ├── ErrorQueue.cs
│ │ └── Utils.cs
├── README.md
└── manifest.json
├── BetterFruitTrees
├── BetterFruitTrees.csproj
├── BetterFruitTreesConfig.cs
├── BetterFruitTreesMod.cs
├── Extensions
│ └── ListExtensions.cs
├── GrowHelper.cs
├── Patches
│ ├── JunimoHarvester
│ │ ├── FoundCropEndFunctionPatch.cs
│ │ ├── TryToHarvestHerePatch.cs
│ │ └── UpdatePatch.cs
│ ├── JunimoHut
│ │ └── AreThereMatureCropsWithinRadiusPatch.cs
│ ├── PlacementPatch.cs
│ └── Utils.cs
├── README.md
└── manifest.json
├── BetterGardenPots
├── APIs
│ ├── IBetterSprinklersAPI.cs
│ ├── IPrismaticToolsAPI.cs
│ └── ISimpleSprinklersAPI.cs
├── BetterGardenPots.csproj
├── BetterGardenPotsMod.cs
├── BetterGardenPotsModConfig.cs
├── Extensions
│ └── ListExtensions.cs
├── Patches
│ ├── IndoorPot
│ │ ├── DayUpdatePatch.cs
│ │ ├── PerformObjectDropInActionPatchFruit.cs
│ │ ├── PerformObjectDropInActionPatchSeasons.cs
│ │ └── PerformToolActionPatch.cs
│ └── Utility
│ │ └── FindCloseFlowerPatch.cs
├── README.md
├── Subscribers
│ ├── GardenPotSprinklerHandler.cs
│ └── IEventSubscriber.cs
└── manifest.json
├── BetterHay
├── BetterHay.csproj
├── BetterHayGrass.cs
├── BetterHayMod.cs
├── HopperPatch.cs
├── ModConfig.cs
├── README.md
└── manifest.json
├── BetterSlingshots
├── BetterSlingshots.csproj
├── BetterSlingshotsMod.cs
├── Framework
│ ├── Config
│ │ ├── BetterSlingshotsModConfig.cs
│ │ ├── ConfigManager.cs
│ │ └── LegacyConfig.cs
│ ├── Patches
│ │ ├── FarmerRendererDrawPatch.cs
│ │ ├── SlingshotBeginUsingPatch.cs
│ │ ├── SlingshotDoFunctionPatch.cs
│ │ ├── SlingshotDrawPatch.cs
│ │ ├── SlingshotFinishPatch.cs
│ │ └── SlingshotTickUpdatePatch.cs
│ └── Utils.cs
├── README.md
└── manifest.json
├── BetterWorkbenches
├── BetterWorkbenches.csproj
├── ModEntry.cs
├── README.md
├── WorkbenchPatch.cs
└── manifest.json
├── CactiHurtYou
├── CactiHurtYou.csproj
├── CactiHurtYouMod.cs
├── README.md
└── manifest.json
├── CasksEverywhere
├── CaskPatch.cs
├── CasksEverywhere.csproj
├── CasksEverywhereMod.cs
├── README.md
└── manifest.json
├── ChatCommands
├── ChatCommands.csproj
├── ChatCommandsConfig.cs
├── ChatCommandsMod.cs
├── ClassReplacements
│ ├── CommandChatBox.cs
│ ├── CommandChatTextBox.cs
│ ├── CommandChatTextBoxState.cs
│ ├── CommandEmojiMenu.cs
│ └── ConsoleChatMessage.cs
├── CommandValidator.cs
├── Commands
│ ├── BaseCommand.cs
│ ├── ICommand.cs
│ ├── ListenCommand.cs
│ ├── ReplyCommand.cs
│ └── WhisperCommand.cs
├── ICommandHandler.cs
├── NotifyingTextWriter.cs
├── README.md
├── Util
│ └── Utils.cs
└── manifest.json
├── ColorfulConsole
├── ColorfulConsole.csproj
├── ColorfulConsoleMod.cs
├── ColorfulTextWriter.cs
├── README.txt
└── manifest.json
├── CopyInviteCode
├── ClipboardItem.cs
├── ClipboardManagers
│ ├── IClipboardManager.cs
│ ├── LinuxClipboardManager.cs
│ ├── MacClipboardManager.cs
│ ├── UnixClipboardManager.cs
│ └── WindowsClipboardManager.cs
├── CopyInviteCode.csproj
├── CopyInviteCodeMod.cs
├── README.md
├── assets
│ └── clipboard.png
└── manifest.json
├── CustomTransparency
├── CustomTransparency.csproj
├── ModConfig.cs
├── ModEntry.cs
├── Patches
│ ├── BuildingPatch.cs
│ └── TreePatch.cs
├── README.md
└── manifest.json
├── CustomWarpLocations
├── CustomWarpLocations.csproj
├── ModConfig.cs
├── ModEntry.cs
├── NewWarpLocations.cs
├── README.md
├── WarpLocation.cs
├── WarpOverrides
│ ├── ObeliskWarpOverride.cs
│ ├── TotemWarpOverride.cs
│ ├── WandWarpOverride.cs
│ └── WarpOverride.cs
└── manifest.json
├── CustomizableDeathPenalty
├── CustomizableDeathPenalty.csproj
├── ModConfig.cs
├── ModEntry.cs
├── PlayerState.cs
├── PlayerStateManager.cs
├── README.md
└── manifest.json
├── DesertObelisk
├── AssetModifier.cs
├── DesertObelisk.cs
├── DesertObelisk.csproj
├── ModEntry.cs
├── README.md
├── assets
│ ├── Desert Obelisk Starblue.png
│ ├── Desert Obelisk.png
│ └── markerTiles.xnb
└── manifest.json
├── FloweryTools
├── FloweryTools.csproj
├── Framework
│ ├── BaseCreator.cs
│ ├── Creators
│ │ ├── Explosion.cs
│ │ └── Slingshot.cs
│ ├── Flower.cs
│ ├── FlowerHelper.cs
│ ├── Flowerers
│ │ ├── Defense.cs
│ │ ├── Stab.cs
│ │ ├── Swing.cs
│ │ ├── Swipe.cs
│ │ ├── TimingCast.cs
│ │ └── Watering.cs
│ ├── IFrameMatcher.cs
│ ├── IParticleCreator.cs
│ └── IToolFlowerer.cs
├── ModConfig.cs
├── ModEntry.cs
├── README.md
└── manifest.json
├── GeodeInfoMenu
├── GeodeInfoMenu.csproj
├── Geodes
│ ├── GeodeDrop.cs
│ ├── GeodeType.cs
│ └── HardCodedGeodeDrop.cs
├── Menus
│ ├── GeodeMenu.cs
│ ├── GeodeMenuStateInfo.cs
│ ├── GeodeTab.cs
│ ├── GeodeTabItem.cs
│ ├── IScrollableMenu.cs
│ ├── SearchTab.cs
│ ├── SearchTabItem.cs
│ └── UpdatingTextBox.cs
├── ModConfig.cs
├── ModEntry.cs
├── README.md
├── README.txt
├── Sprites
│ └── tabs.png
└── manifest.json
├── GiantCropRing
├── GiantCropRing.csproj
├── GiantRing.cs
├── ModConfig.cs
├── ModEntry.cs
├── README.md
├── assets
│ └── ring.png
└── manifest.json
├── HatsOnCats
├── Framework
│ ├── AnimatedSpriteExtensions.cs
│ ├── CharacterFinder.cs
│ ├── Configuration
│ │ ├── ConfigurationManager.cs
│ │ ├── Frame.cs
│ │ ├── IConfigurable.cs
│ │ ├── Offset.cs
│ │ ├── OffsetConverter.cs
│ │ ├── OffsetReference.cs
│ │ └── OffsetReferenceConverter.cs
│ ├── DebugHats
│ │ └── AnimatedSpriteDrawer.cs
│ ├── FromStringConverter.cs
│ ├── HatDrawer.cs
│ ├── HatPatcher.cs
│ ├── Interfaces
│ │ ├── IHatDrawer.cs
│ │ ├── IHatStorageProvider.cs
│ │ └── INamed.cs
│ ├── ModConfig.cs
│ ├── Offsets
│ │ ├── AggregateOffsetProvider.cs
│ │ ├── ConfigurableOffsetProvider.cs
│ │ ├── ConfigurableOffsetProviderFactory.cs
│ │ └── IOffsetProvider.cs
│ └── Storage
│ │ ├── LocationFinder.cs
│ │ ├── SaveItem.cs
│ │ └── SingleHatStorageProvider.cs
├── HatsOnCats.csproj
├── ModEntry.cs
├── README.md
├── assets
│ └── defaults.json
├── manifest.json
└── packages.config
├── HoldToBreakGeodes
├── HoldToBreakGeodes.csproj
├── ModEntry.cs
├── README.md
└── manifest.json
├── NoCrows
├── AddCrowsPatch.cs
├── ModEntry.cs
├── NoCrows.csproj
├── README.md
└── manifest.json
├── NoFenceDecay
├── FenceFinder.cs
├── ModEntry.cs
├── NoFenceDecay.csproj
├── README.md
└── manifest.json
├── Pong
├── Framework
│ ├── Common
│ │ ├── AssetManager.cs
│ │ ├── IDrawable.cs
│ │ ├── IUpdateable.cs
│ │ └── SoundManager.cs
│ ├── Enums
│ │ ├── ModalButtonType.cs
│ │ ├── MultiplayerConnectionState.cs
│ │ ├── Orientation.cs
│ │ └── Side.cs
│ ├── Extensions
│ │ └── IDrawableExtensions.cs
│ ├── Game
│ │ ├── IDrawableCollideable.cs
│ │ ├── INonReactiveDrawableCollideable.cs
│ │ ├── IReactiveDrawableCollideable.cs
│ │ ├── IResetable.cs
│ │ ├── IState.cs
│ │ ├── MultiplayerConnectionStateMachine.cs
│ │ └── States
│ │ │ ├── GameState.cs
│ │ │ ├── PositionState.cs
│ │ │ ├── ScoreState.cs
│ │ │ └── VelocityState.cs
│ ├── Menus
│ │ ├── Elements
│ │ │ ├── ConditionalElement.cs
│ │ │ ├── DynamicTextElement.cs
│ │ │ ├── ElementContainer.cs
│ │ │ ├── IBoundable.cs
│ │ │ ├── IClickable.cs
│ │ │ ├── IHighlightable.cs
│ │ │ └── StaticTextElement.cs
│ │ ├── IInputable.cs
│ │ ├── IMenu.cs
│ │ ├── Menu.cs
│ │ ├── Modal.cs
│ │ └── SwitchMenuEventArgs.cs
│ └── Messages
│ │ ├── ChallengeRequestMessage.cs
│ │ ├── ChallengeRequestResponseMessage.cs
│ │ ├── GameStateMessage.cs
│ │ ├── MailBox.cs
│ │ ├── MessageEnvelope.cs
│ │ └── QuitGameMessage.cs
├── Game
│ ├── Ball.cs
│ ├── CollideInfo.cs
│ ├── Collider.cs
│ ├── Controllers
│ │ ├── ComputerController.cs
│ │ ├── IPaddleController.cs
│ │ ├── IntentionalPaddleController.cs
│ │ ├── LocalPlayerController.cs
│ │ └── StatePaddleController.cs
│ ├── Paddle.cs
│ ├── ScoreDisplay.cs
│ └── Wall.cs
├── Menus
│ ├── GameMenu.cs
│ ├── PlayerMenu.cs
│ ├── ServerMenu.cs
│ └── StartMenu.cs
├── ModEntry.cs
├── Pong.csproj
├── README.md
├── assets
│ ├── circle.png
│ └── square.png
└── manifest.json
├── README.md
├── RangeDisplay
├── Framework
│ ├── APIs
│ │ ├── IBetterSprinklersAPI.cs
│ │ ├── IPrismaticToolsAPI.cs
│ │ └── ISimpleSprinklersAPI.cs
│ ├── DisplayManager.cs
│ ├── HudMessageManager.cs
│ └── RangeHandling
│ │ ├── IModRegistryListener.cs
│ │ ├── IRangeCreator.cs
│ │ ├── RangeCreators
│ │ ├── BeeHouseRangeCreator.cs
│ │ ├── JunimoHutRangeCreator.cs
│ │ ├── ScarecrowRangeCreator.cs
│ │ └── SprinklerRangeCreator.cs
│ │ └── RangeItem.cs
├── ModConfig.cs
├── ModEntry.cs
├── README.md
├── RangeDisplay.csproj
├── assets
│ ├── border.png
│ └── filled_in.png
└── manifest.json
├── RemovableHorseHats
├── HorseCheckActionPatch.cs
├── ModConfig.cs
├── ModEntry.cs
├── README.md
├── RemovableHorseHats.csproj
└── manifest.json
├── SafeLightning
├── API.cs
├── CommandParsing
│ ├── CommandParser.cs
│ └── Commands
│ │ ├── BaseCommand.cs
│ │ ├── GrowTreesCommand.cs
│ │ ├── PrintLocationCommand.cs
│ │ ├── RemoveFeaturesCommand.cs
│ │ └── SetLightningCommand.cs
├── ModEntry.cs
├── PerformLightningUpdatePatch.cs
├── README.md
├── SafeLightning.csproj
└── manifest.json
├── StackEverything
├── ObjectCopiers
│ ├── FurnitureCopier.cs
│ └── ICopier.cs
├── Patches
│ ├── CanStackWithPatch.cs
│ ├── DoDoneFishingPatch.cs
│ ├── DrawInMenuPatch.cs
│ ├── FurniturePickupPatch.cs
│ ├── Size
│ │ ├── AddToStackPatch.cs
│ │ └── MaximumStackSizePatch.cs
│ └── TryToPlaceItemPatch.cs
├── README.md
├── StackEverything.csproj
├── StackEverythingMod.cs
└── manifest.json
├── StardewMods.sln
├── UnofficialModUpdateMenu
├── Extensions
│ └── ListExtensions.cs
├── Menus
│ ├── ButtonStatus.cs
│ ├── UpdateButton.cs
│ └── UpdateMenu.cs
├── ModConfig.cs
├── ModEntry.cs
├── README.md
├── UnofficialModUpdateMenu.csproj
├── Updates
│ ├── INotifiable.cs
│ ├── ModStatus.cs
│ ├── UpdateStatus.cs
│ └── UpdateStatusRetriever.cs
├── assets
│ ├── statusIcons.png
│ └── updateButton.png
└── manifest.json
├── WindEffects
├── Framework
│ ├── Shakers
│ │ ├── BushShaker.cs
│ │ ├── FruitTreeShaker.cs
│ │ ├── GrassShaker.cs
│ │ ├── HoeDirtShaker.cs
│ │ ├── IShaker.cs
│ │ ├── ShakerFactory.cs
│ │ └── TreeShaker.cs
│ ├── SpriteBatchExtensions.cs
│ ├── Wave.cs
│ └── WaveManager.cs
├── ModConfig.cs
├── ModEntry.cs
├── README.md
├── WindEffects.csproj
├── assets
│ └── pixel.png
└── manifest.json
└── WinterGrass
├── LegacySaving
├── LegacyGrassSave.cs
└── LegacySaveConverter.cs
├── ModConfig.cs
├── ModEntry.cs
├── Patches
├── GrassSeasonUpdatePatch.cs
└── GrowWeedsPatch.cs
├── README.md
├── WinterGrass.csproj
└── manifest.json
/.gitattributes:
--------------------------------------------------------------------------------
1 | # always normalise line endings
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # user-specific files
2 | *.suo
3 | *.user
4 | *.userosscache
5 | *.sln.docstates
6 |
7 | # build results
8 | [Dd]ebug/
9 | [Rr]elease/
10 | [Bb]in/
11 | [Oo]bj/
12 |
13 | # Visual Studio cache/options
14 | .vs/
15 |
16 | # ReSharper
17 | _ReSharper*/
18 | *.[Rr]e[Ss]harper
19 | *.DotSettings.user
20 |
21 | # NuGet packages
22 | *.nupkg
23 | **/packages/*
24 | *.nuget.props
25 | *.nuget.targets
--------------------------------------------------------------------------------
/AutoStacker/AutoStacker.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.3.0
4 | net452
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/AutoStacker/AutoStackerConfig.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 |
3 | namespace AutoStacker
4 | {
5 | internal class AutoStackerConfig
6 | {
7 | public SButton ActivationKey { get; set; } = SButton.K;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/AutoStacker/README.md:
--------------------------------------------------------------------------------
1 | # Auto Stacker
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/1184?) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod modifies the order and stacks of items in the players inventory.
--------------------------------------------------------------------------------
/AutoStacker/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Auto Stacker",
3 | "Author": "Cat",
4 | "Version": "1.4.0",
5 | "Description": "Press a key (K by default) to automatically stack the current items in the open inventory.",
6 | "UniqueID": "cat.autostacker",
7 | "EntryDll": "AutoStacker.dll",
8 | "MinimumApiVersion": "3.0.0",
9 | "UpdateKeys": [ "Nexus:1184" ]
10 | }
11 |
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/ArtisanGood.cs:
--------------------------------------------------------------------------------
1 | namespace BetterArtisanGoodIcons
2 | {
3 | /// The artisan goods that we add unique icons foor.
4 | internal enum ArtisanGood
5 | {
6 | Jelly = 344,
7 | Pickles = 342,
8 | Wine = 348,
9 | Juice = 350,
10 | Honey = 340
11 | }
12 |
13 | }
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/BetterArtisanGoodIcons.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.5.0
4 | net452
5 |
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/BetterArtisanGoodIconsConfig.cs:
--------------------------------------------------------------------------------
1 | namespace BetterArtisanGoodIcons
2 | {
3 | internal class BetterArtisanGoodIconsConfig
4 | {
5 | public bool DisableSmallSourceIcons { get; set; } = true;
6 | }
7 | }
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/Content/ContentPackSource.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 |
3 | namespace BetterArtisanGoodIcons.Content
4 | {
5 | ///
6 | /// A content source that comes from Content Packs.
7 | internal class ContentPackSource : TextureDataContentSource
8 | {
9 | private readonly IContentPack pack;
10 | public override CustomTextureData TextureData { get; }
11 |
12 | public ContentPackSource(IContentPack pack)
13 | {
14 | this.pack = pack;
15 | this.TextureData = pack.ReadJsonFile("data.json");
16 | }
17 |
18 | public override T Load(string path)
19 | {
20 | return this.pack.LoadAsset(path);
21 | }
22 |
23 | public override IManifest GetManifest()
24 | {
25 | return this.pack.Manifest;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/Content/CustomTextureData.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace BetterArtisanGoodIcons.Content
4 | {
5 | /// Provides texture and source ingredient information.
6 | internal class CustomTextureData
7 | {
8 | public List Fruits { get; set; } = null;
9 | public List Vegetables { get; set; } = null;
10 | public List Flowers { get; set; } = null;
11 |
12 | public string Jelly { get; set; } = null;
13 | public string Pickles { get; set; } = null;
14 | public string Wine { get; set; } = null;
15 | public string Juice { get; set; } = null;
16 | public string Honey { get; set; } = null;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/Content/IContentSource.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 |
3 | namespace BetterArtisanGoodIcons.Content
4 | {
5 | /// An abstraction over the ability to load textures and get manifest information. Used to unify loading vanilla and custom texture assets.
6 | internal interface IContentSource
7 | {
8 | T Load(string path);
9 | IManifest GetManifest();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/Content/ModSource.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 |
3 | namespace BetterArtisanGoodIcons.Content
4 | {
5 | ///
6 | /// A content source that comes from a mod.
7 | internal class ModSource : TextureDataContentSource
8 | {
9 | private readonly IModHelper helper;
10 |
11 | public override CustomTextureData TextureData { get; }
12 |
13 | public ModSource(IModHelper helper)
14 | {
15 | this.helper = helper;
16 | //1.3.28
17 | //this.TextureData = helper.ReadJsonFile("assets/data.json");
18 | //1.3.31
19 | this.TextureData = helper.Data.ReadJsonFile("assets/data.json");
20 | }
21 |
22 | public override T Load(string path)
23 | {
24 | return this.helper.Content.Load(path);
25 | }
26 |
27 | public override IManifest GetManifest()
28 | {
29 | return this.helper.ModRegistry.Get(this.helper.ModRegistry.ModID).Manifest;
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/Content/TextureDataContentSource.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 | using System;
3 | using System.Collections.Generic;
4 |
5 | namespace BetterArtisanGoodIcons.Content
6 | {
7 | ///
8 | /// A basic content source provider - is able to group data from each CustomTextureData together properly.
9 | internal abstract class TextureDataContentSource : IContentSource
10 | {
11 | public abstract CustomTextureData TextureData { get; }
12 | public abstract T Load(string path);
13 | public abstract IManifest GetManifest();
14 |
15 | /// Group each texture path with its corresponding source list and artisan good type.
16 | public IEnumerable, ArtisanGood>> GetData()
17 | {
18 | yield return new Tuple, ArtisanGood>(this.TextureData.Honey,
19 | this.TextureData.Flowers, ArtisanGood.Honey);
20 |
21 | yield return new Tuple, ArtisanGood>(this.TextureData.Juice,
22 | this.TextureData.Vegetables, ArtisanGood.Juice);
23 |
24 | yield return new Tuple, ArtisanGood>(this.TextureData.Pickles,
25 | this.TextureData.Vegetables, ArtisanGood.Pickles);
26 |
27 | yield return new Tuple, ArtisanGood>(this.TextureData.Wine,
28 | this.TextureData.Fruits, ArtisanGood.Wine);
29 |
30 | yield return new Tuple, ArtisanGood>(this.TextureData.Jelly,
31 | this.TextureData.Fruits, ArtisanGood.Jelly);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/Extensions/DictionaryExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace BetterArtisanGoodIcons.Extensions
5 | {
6 | public static class DictionaryExtensions
7 | {
8 | /// Create dictionaries with tuples as values more easily.
9 | public static void Add(this Dictionary> dictionary, TKey key, T1 item1, T2 item2)
10 | {
11 | dictionary.Add(key, new Tuple(item1, item2));
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/Extensions/ListExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace BetterArtisanGoodIcons.Extensions
5 | {
6 | static class ListExtensions
7 | {
8 | /// Create lists of tuples more easily.
9 | public static void Add(this List> list, T1 item1, T2 item2, T3 item3)
10 | {
11 | list.Add(new Tuple(item1, item2, item3));
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/Patches/SObjectPatches/DrawWhenHeldPatch.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using Microsoft.Xna.Framework.Graphics;
3 | using StardewValley;
4 | using System;
5 | using SObject = StardewValley.Object;
6 |
7 | namespace BetterArtisanGoodIcons.Patches.SObjectPatches
8 | {
9 | internal class DrawWhenHeldPatch
10 | {
11 | /// Draw the correct texture based on or .
12 | public static bool Prefix(SObject __instance, SpriteBatch spriteBatch, Vector2 objectPosition, Farmer f)
13 | {
14 | if (!ArtisanGoodsManager.GetDrawInfo(__instance, out Texture2D spriteSheet, out Rectangle position, out Rectangle iconPosition))
15 | return true;
16 |
17 | //By popular demand, don't show icons when held.
18 | //if (iconPosition != Rectangle.Empty)
19 | // spriteBatch.Draw(Game1.objectSpriteSheet, objectPosition + new Vector2(1, 1), new Microsoft.Xna.Framework.Rectangle?(iconPosition), Color.White, 0.0f, new Vector2(4f, 4f), Game1.pixelZoom / 2, SpriteEffects.None, Math.Max(0.0f, (f.getStandingY() + 2) / 10000f));
20 |
21 | spriteBatch.Draw(spriteSheet, objectPosition, position, Color.White, 0.0f, Vector2.Zero, Game1.pixelZoom, SpriteEffects.None, Math.Max(0.0f, (f.getStandingY() + 2) / 10000f));
22 | return false;
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | [assembly: AssemblyTitle("BetterArtisanGoodIcons")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("BetterArtisanGoodIcons")]
12 | [assembly: AssemblyCopyright("Copyright © 2018")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // Setting ComVisible to false makes the types in this assembly not visible
17 | // to COM components. If you need to access a type in this assembly from
18 | // COM, set the ComVisible attribute to true on that type.
19 | [assembly: ComVisible(false)]
20 |
21 | // The following GUID is for the ID of the typelib if this project is exposed to COM
22 | [assembly: Guid("f4ac84cc-f578-4553-8de1-ec9f851d3700")]
23 |
24 | // Version information for an assembly consists of the following four values:
25 | //
26 | // Major Version
27 | // Minor Version
28 | // Build Number
29 | // Revision
30 | //
31 | // You can specify all the values or you can default the Build and Revision Numbers
32 | // by using the '*' as shown below:
33 | // [assembly: AssemblyVersion("1.0.*")]
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/README.md:
--------------------------------------------------------------------------------
1 | # Better Artisan Good Icons
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/2080?) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod overwrites the corresponding draw functions for artisan goods using [Harmony](https://github.com/pardeike/Harmony), and then draws the right texture for them based on what was used to make them.
9 |
10 | Note that this repo does not contain the Harmony dll, and the ones found in the mentioned link are not compiled targeting .NET 4.5. You'll need to compile for .NET 4.5 yourself, or just copy the dll packaged in the release.
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/assets/data.json:
--------------------------------------------------------------------------------
1 | {
2 | "Fruits": [ "Ancient Fruit", "Apple", "Apricot", "Blackberry", "Blueberry", "Cactus Fruit", "Cherry", "Coconut", "Cranberries", "Crystal Fruit", "Grape", "Hot Pepper", "Melon", "Orange", "Peach", "Pomegranate", "Rhubarb", "Salmonberry", "Spice Berry", "Starfruit", "Strawberry", "Wild Plum" ],
3 | "Vegetables": [ "Amaranth", "Artichoke", "Beet", "Bok Choy", "Cauliflower", "Corn", "Eggplant", "Fiddlehead Fern", "Garlic", "Green Bean", "Hops", "Kale", "Parsnip", "Potato", "Pumpkin", "Radish", "Red Cabbage", "Tomato", "Wheat", "Yam" ],
4 | "Flowers": [ "Blue Jazz", "Fairy Rose", "Poppy", "Summer Spangle", "Tulip", "Wild" ],
5 | "Honey": "assets/honey.png",
6 | "Jelly": "assets/jelly.png",
7 | "Juice": "assets/juice.png",
8 | "Pickles": "assets/pickles.png",
9 | "Wine": "assets/wine.png"
10 | }
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/assets/honey.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dphill10827/UnofficialModUpdateMenu/b27ee0f12e66165156d9ab9de2439fd5718c2b30/BetterArtisanGoodIcons/assets/honey.png
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/assets/jelly.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dphill10827/UnofficialModUpdateMenu/b27ee0f12e66165156d9ab9de2439fd5718c2b30/BetterArtisanGoodIcons/assets/jelly.png
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/assets/juice.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dphill10827/UnofficialModUpdateMenu/b27ee0f12e66165156d9ab9de2439fd5718c2b30/BetterArtisanGoodIcons/assets/juice.png
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/assets/pickles.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dphill10827/UnofficialModUpdateMenu/b27ee0f12e66165156d9ab9de2439fd5718c2b30/BetterArtisanGoodIcons/assets/pickles.png
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/assets/wine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dphill10827/UnofficialModUpdateMenu/b27ee0f12e66165156d9ab9de2439fd5718c2b30/BetterArtisanGoodIcons/assets/wine.png
--------------------------------------------------------------------------------
/BetterArtisanGoodIcons/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Better Artisan Good Icons",
3 | "Author": "Cat",
4 | "Version": "1.5.0",
5 | "Description": "Makes jelly, pickles, wine, juice, and honey icons be based on the fruit, vegetable, or flower used to make them.",
6 | "UniqueID": "cat.betterartisangoodicons",
7 | "EntryDll": "BetterArtisanGoodIcons.dll",
8 | "MinimumApiVersion": "2.9.0",
9 | "UpdateKeys": [ "Nexus:2080" ]
10 | }
11 |
--------------------------------------------------------------------------------
/BetterAutomaticGates/BetterAutomaticGates.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.0.0
4 | net452
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/BetterAutomaticGates/Framework/ModConfig.cs:
--------------------------------------------------------------------------------
1 | namespace BetterAutomaticGates.Framework
2 | {
3 | /// The mod configuration.
4 | internal class ModConfig
5 | {
6 | /*********
7 | ** Accessors
8 | *********/
9 |
10 | /// How close the player needs to be to a gate before they can toggle it.
11 | public int GateToggleRadius { get; set; } = 2;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/BetterAutomaticGates/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Better Automatic Gates",
3 | "Author": "Cat",
4 | "Version": "1.0.0-beta",
5 | "Description": "Makes gates automatically open and close when you get near them.",
6 | "UniqueID": "cat.betterautomaticgates",
7 | "EntryDll": "BetterAutomaticGates.dll",
8 | "MinimumApiVersion": "3.0.0-beta",
9 | "UpdateKeys": []
10 | }
11 |
--------------------------------------------------------------------------------
/BetterDoors/BetterDoors.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.0.0
4 | net452
5 |
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/BetterDoors/Framework/ContentPacks/ContentPack.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace BetterDoors.Framework.ContentPacks
4 | {
5 | /*********
6 | ** Accessors
7 | *********/
8 |
9 | /// The format content packs that provide door animations must follow.
10 | internal class ContentPack
11 | {
12 | /// The version of the content pack.
13 | public string Version { get; set; }
14 |
15 | /// The doors the content pack provides.
16 | public IDictionary> Doors { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/BetterDoors/Framework/ContentPacks/ContentPackDoor.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using Microsoft.Xna.Framework.Graphics;
3 |
4 | namespace BetterDoors.Framework.ContentPacks
5 | {
6 | /// A loaded content pack door.
7 | internal class ContentPackDoor
8 | {
9 | /*********
10 | ** Accessors
11 | *********/
12 |
13 | /// The mod id providing this door.
14 | public string ModId { get; }
15 |
16 | /// The loaded texture.
17 | public Texture2D Texture { get; }
18 |
19 | /// The name of this door.
20 | public string Name { get; }
21 |
22 | /// The start position in pixels in the sheet.
23 | public Point StartPosition { get; }
24 |
25 | /*********
26 | ** Public methods
27 | *********/
28 |
29 | /// Construct an instance.
30 | /// The mod id.
31 | /// The loaded texture.
32 | /// The name of this door.
33 | /// The start position in pixels in the sheet.
34 | public ContentPackDoor(string modId, Texture2D texture, string name, Point startPosition)
35 | {
36 | this.ModId = modId;
37 | this.Texture = texture;
38 | this.Name = name;
39 | this.StartPosition = startPosition;
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/BetterDoors/Framework/DoorGeneration/GeneratedTileSheetInfo.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 |
3 | namespace BetterDoors.Framework.DoorGeneration
4 | {
5 | /// Information about a generated tile sheet needed for a door to be drawn by a map.
6 | internal class GeneratedTileSheetInfo
7 | {
8 | /*********
9 | ** Accessors
10 | *********/
11 |
12 | /// The dimensions of the tile sheet in tiles.
13 | public Point TileSheetDimensions { get; }
14 |
15 | /// The asset key used to load the sheet.
16 | public string AssetKey { get; }
17 |
18 | /// The id of the tile sheet.
19 | public string TileSheetId { get; }
20 |
21 | /*********
22 | ** Public methods
23 | *********/
24 |
25 | /// Construct an instance.
26 | /// The dimensions of the tile sheet in tiles.
27 | /// The asset key used to load the sheet.
28 | /// The id of the tile sheet.
29 | public GeneratedTileSheetInfo(Point tileSheetDimensions, string assetKey, string tileSheetId)
30 | {
31 | this.TileSheetDimensions = tileSheetDimensions;
32 | this.AssetKey = assetKey;
33 | this.TileSheetId = tileSheetId;
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/BetterDoors/Framework/Enums/OpeningDirection.cs:
--------------------------------------------------------------------------------
1 | namespace BetterDoors.Framework.Enums
2 | {
3 | /// Which way the door opens.
4 | internal enum OpeningDirection
5 | {
6 | /// Opens left.
7 | Left,
8 |
9 | /// Opens right.
10 | Right
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/BetterDoors/Framework/Enums/Orientation.cs:
--------------------------------------------------------------------------------
1 | namespace BetterDoors.Framework.Enums
2 | {
3 | /// The orientation of the hallway the door is placed in.
4 | internal enum Orientation
5 | {
6 | /// A hallway that goes from left to right.
7 | Horizontal,
8 |
9 | /// A hallway that goes from up to down.
10 | Vertical
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/BetterDoors/Framework/Enums/State.cs:
--------------------------------------------------------------------------------
1 | namespace BetterDoors.Framework.Enums
2 | {
3 | /// The open state of the door.
4 | internal enum State
5 | {
6 | /// Fully closed.
7 | Closed,
8 |
9 | /// Open a little bit.
10 | SlightlyOpen,
11 |
12 | /// Open almost all the way
13 | MostlyOpen,
14 |
15 | /// Fully open.
16 | Open
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/BetterDoors/Framework/Multiplayer/DoorStateReply.cs:
--------------------------------------------------------------------------------
1 | using BetterDoors.Framework.Enums;
2 | using Microsoft.Xna.Framework;
3 | using System.Collections.Generic;
4 |
5 | namespace BetterDoors.Framework.Multiplayer
6 | {
7 | /// Represents a serializable door state reply.
8 | internal class DoorStateReply
9 | {
10 | /*********
11 | ** Accessors
12 | *********/
13 |
14 | /// The location the states are in.
15 | public string LocationName { get; }
16 |
17 | /// The state of each door in the location.
18 | public IDictionary DoorStates { get; }
19 |
20 | /*********
21 | ** Public methods
22 | *********/
23 |
24 | /// Constructs an instance.
25 | /// The location the states are in.
26 | /// The state of each door in the location.
27 | public DoorStateReply(string locationName, IDictionary doorStates)
28 | {
29 | this.LocationName = locationName;
30 | this.DoorStates = doorStates;
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/BetterDoors/Framework/Multiplayer/DoorStateRequest.cs:
--------------------------------------------------------------------------------
1 | namespace BetterDoors.Framework.Multiplayer
2 | {
3 | /// Represents a serializable door state request.
4 | internal class DoorStateRequest
5 | {
6 | /*********
7 | ** Accessors
8 | *********/
9 |
10 | /// The location to request states for.
11 | public string LocationName { get; }
12 |
13 | /*********
14 | ** Public methods
15 | *********/
16 |
17 | /// Constructs an instance.
18 | /// The location to request states for.
19 | public DoorStateRequest(string locationName)
20 | {
21 | this.LocationName = locationName;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/BetterDoors/Framework/Multiplayer/DoorToggle.cs:
--------------------------------------------------------------------------------
1 | using BetterDoors.Framework.Enums;
2 | using Microsoft.Xna.Framework;
3 |
4 | namespace BetterDoors.Framework.Multiplayer
5 | {
6 | /// Represents a serializable door toggle message.
7 | internal class DoorToggle
8 | {
9 | /*********
10 | ** Accessors
11 | *********/
12 |
13 | /// The position to look for a door at.
14 | public Point Position { get; }
15 |
16 | /// The state before the door was toggled.
17 | public State StateBeforeToggle { get; }
18 |
19 | /// The location to look for a door in.
20 | public string LocationName { get; }
21 |
22 | /*********
23 | ** Public methods
24 | *********/
25 |
26 | /// Constructs an instance.
27 | /// The position to look for a door at.
28 | /// The state before the door was toggled.
29 | /// The location to look for a door in.
30 | public DoorToggle(Point position, State stateBeforeToggle, string locationName)
31 | {
32 | this.Position = position;
33 | this.StateBeforeToggle = stateBeforeToggle;
34 | this.LocationName = locationName;
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/BetterDoors/Framework/Serialization/BetterDoorsModConfig.cs:
--------------------------------------------------------------------------------
1 | namespace BetterDoors.Framework.Serialization
2 | {
3 | /// The mod configuration options.
4 | internal class BetterDoorsModConfig
5 | {
6 | /// How close the player needs to be to a tile before they can toggle it.
7 | public int DoorToggleRadius { get; set; } = 2;
8 |
9 | /// Whether to make all doors automatic regardless of map settings.
10 | public bool MakeAllDoorsAutomatic { get; set; } = false;
11 |
12 | /// Whether to silence automatically opened/closed doors.
13 | public bool SilenceAutomaticDoors { get; set; } = false;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/BetterDoors/README.md:
--------------------------------------------------------------------------------
1 | # Better Doors
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/3797) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod:
9 | - Loads content packs and vanilla assets to find provided door sprites.
10 | - Reads loaded maps to look for requested doors sprites.
11 | - Dynamically generates door sprites based on loaded content packs/vanilla assets and requested sprites.
12 | - Sprite generation means users don't need to draw rotations/transformations.
13 | - Attaches doors to the maps and handles user interaction.
14 |
15 | See the wiki for more info about creating custom door sprites or adding custom doors to maps: https://github.com/danvolchek/StardewMods/wiki/Better-Doors.
--------------------------------------------------------------------------------
/BetterDoors/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Better Doors",
3 | "Author": "Cat",
4 | "Version": "1.0.2",
5 | "Description": "Lets map makers add better doors to their maps.",
6 | "UniqueID": "cat.betterdoors",
7 | "EntryDll": "BetterDoors.dll",
8 | "MinimumApiVersion": "3.0.0-beta",
9 | "UpdateKeys": [ "Nexus:3797" ]
10 | }
11 |
--------------------------------------------------------------------------------
/BetterFruitTrees/BetterFruitTrees.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 2.6.0
4 | net452
5 |
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/BetterFruitTrees/BetterFruitTreesConfig.cs:
--------------------------------------------------------------------------------
1 | namespace BetterFruitTrees
2 | {
3 | internal class BetterFruitTreesConfig
4 | {
5 | public bool Disable_Fruit_Tree_Junimo_Harvesting { get; set; } = false;
6 |
7 | public bool Wait_To_Harvest_Fruit_Trees_Until_They_Have_Three_Fruits__Then_Harvest_All_Three_At_Once
8 | {
9 | get;
10 | set;
11 | } = false;
12 |
13 | public bool Allow_Placing_Fruit_Trees_Outside_Farm { get; set; } = false;
14 | public bool Allow_Dangerous_Planting { get; set; } = false;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/BetterFruitTrees/Extensions/ListExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace BetterFruitTrees.Extensions
5 | {
6 | internal static class ListExtensions
7 | {
8 | /// Create lists of tuples more easily.
9 | public static void Add(this IList> list, T1 item1, T2 item2, T3 item3)
10 | {
11 | list.Add(new Tuple(item1, item2, item3));
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/BetterFruitTrees/Patches/JunimoHarvester/FoundCropEndFunctionPatch.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using StardewValley;
3 |
4 | namespace BetterFruitTrees.Patches.JunimoHarvester
5 | {
6 | /// Make fruit trees count as places for the junimo to stop.
7 | internal class FoundCropEndFunctionPatch
8 | {
9 | public static void Postfix(ref bool __result, PathNode currentNode, Point endPoint, GameLocation location,
10 | Character c)
11 | {
12 | if (__result)
13 | return;
14 | __result = Utils.IsAdjacentReadyToHarvestFruitTree(new Vector2(currentNode.x, currentNode.y), location);
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/BetterFruitTrees/Patches/JunimoHarvester/TryToHarvestHerePatch.cs:
--------------------------------------------------------------------------------
1 | namespace BetterFruitTrees.Patches.JunimoHarvester
2 | {
3 | /// If a harvestable fruit tree is nearby, start the harvest timer.
4 | internal class TryToHarvestHerePatch
5 | {
6 | public static void Postfix(StardewValley.Characters.JunimoHarvester __instance)
7 | {
8 | if (Utils.IsAdjacentReadyToHarvestFruitTree(__instance.getTileLocation(), __instance.currentLocation))
9 | Utils.GetJunimoHarvesterHarvestTimer(__instance).SetValue(2000);
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/BetterFruitTrees/Patches/JunimoHut/AreThereMatureCropsWithinRadiusPatch.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using StardewValley;
3 | using StardewValley.TerrainFeatures;
4 |
5 | namespace BetterFruitTrees.Patches.JunimoHut
6 | {
7 | internal class AreThereMatureCropsWithinRadiusPatch
8 | {
9 | public static void Postfix(ref bool __result, StardewValley.Buildings.JunimoHut __instance)
10 | {
11 | if (__result)
12 | return;
13 |
14 | Farm farm = Game1.getFarm();
15 | for (int index1 = __instance.tileX.Value + 1 - 8; index1 < __instance.tileX.Value + 2 + 8; ++index1)
16 | for (int index2 = __instance.tileY.Value - 8 + 1; index2 < __instance.tileY.Value + 2 + 8; ++index2)
17 | {
18 | Vector2 possiblePos = new Vector2(index1, index2);
19 |
20 | if (farm.terrainFeatures.ContainsKey(possiblePos) &&
21 | farm.terrainFeatures[possiblePos] is FruitTree tree && Utils.CanTreeBeHarvested(tree))
22 | {
23 | Point cropLocation = Utils.GetUnnocupiedAdjacentLocation(index1, index2, farm);
24 | if (cropLocation == Point.Zero)
25 | continue;
26 | __instance.lastKnownCropLocation = cropLocation;
27 | __result = true;
28 | return;
29 | }
30 | }
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/BetterFruitTrees/README.md:
--------------------------------------------------------------------------------
1 | # Better Fruit Trees
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/1976) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod has three parts:
9 | - Better Fruit Tree Placement: The mod places down a fruit tree if the player was unable to due to other tree restrictions.
10 | - Fruit Trees Grow Even With Debris: The mod simulates a day of growth if the game didn't due to other tree restrictions.
11 | - Junimos Harvest Fruit Trees: The JunimoHut and JunimoHarvester classes are replaced with new ones that are also aware of fruit trees and know how to harvest them.
--------------------------------------------------------------------------------
/BetterFruitTrees/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Better Fruit Trees",
3 | "Author": "Cat",
4 | "Version": "2.6.0",
5 | "Description": "Fruit trees can be placed and will grow even if there is something in the 3x3 area surrounding them. Also, Junimo Huts will harvest fruit trees.",
6 | "UniqueID": "cat.betterfruittrees",
7 | "EntryDll": "BetterFruitTrees.dll",
8 | "MinimumApiVersion": "2.9.0",
9 | "UpdateKeys": [ "Nexus:1976" ],
10 | "Dependencies": [
11 | {
12 | "UniqueID": "cat.fruittreesanywhere",
13 | "IsRequired": false
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/BetterGardenPots/APIs/IBetterSprinklersAPI.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using System.Collections.Generic;
3 |
4 | namespace BetterGardenPots.APIs
5 | {
6 | /// API for better sprinklers.
7 | public interface IBetterSprinklersAPI
8 | {
9 | IDictionary GetSprinklerCoverage();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/BetterGardenPots/APIs/IPrismaticToolsAPI.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using System.Collections.Generic;
3 |
4 | namespace BetterGardenPots.APIs
5 | {
6 | /// API for prismatic tools.
7 | public interface IPrismaticToolsAPI
8 | {
9 | int SprinklerIndex { get; }
10 |
11 | IEnumerable GetSprinklerCoverage(Vector2 origin);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/BetterGardenPots/APIs/ISimpleSprinklersAPI.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using System.Collections.Generic;
3 |
4 | namespace BetterGardenPots.APIs
5 | {
6 | /// API for simple sprinklers.
7 | public interface ISimpleSprinklersAPI
8 | {
9 | IDictionary GetNewSprinklerCoverage();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/BetterGardenPots/BetterGardenPots.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.6.0
4 | net452
5 |
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/BetterGardenPots/BetterGardenPotsModConfig.cs:
--------------------------------------------------------------------------------
1 | namespace BetterGardenPots
2 | {
3 | internal class BetterGardenPotsModConfig
4 | {
5 | public bool MakeBeeHousesNoticeFlowersInGardenPots { get; set; } = true;
6 | public bool MakeSprinklersWaterGardenPots { get; set; } = true;
7 | public bool HarvestMatureCropsWhenGardenPotBreaks { get; set; } = true;
8 |
9 | public bool AllowPlantingAncientSeedsInGardenPots { get; set; } = false;
10 | public bool AllowCropsToGrowInAnySeasonOutsideWhenInGardenPot { get; set; } = false;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/BetterGardenPots/Extensions/ListExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace BetterGardenPots.Extensions
5 | {
6 | internal static class ListExtensions
7 | {
8 | /// Create lists of tuples more easily.
9 | public static void Add(this IList> list, T1 item1, T2 item2, T3 item3)
10 | {
11 | list.Add(new Tuple(item1, item2, item3));
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/BetterGardenPots/Patches/IndoorPot/DayUpdatePatch.cs:
--------------------------------------------------------------------------------
1 | using StardewValley;
2 |
3 | namespace BetterGardenPots.Patches.IndoorPot
4 | {
5 | internal class DayUpdatePatch
6 | {
7 | private static bool wasOutdoors;
8 |
9 | public static void Prefix(GameLocation location)
10 | {
11 | wasOutdoors = location.IsOutdoors;
12 | location.IsOutdoors = false;
13 | }
14 |
15 | public static void Postfix(StardewValley.Objects.IndoorPot __instance, GameLocation location)
16 | {
17 | location.IsOutdoors = wasOutdoors;
18 |
19 | if (Game1.isRaining && location.IsOutdoors)
20 | __instance.hoeDirt.Value.state.Value = 1;
21 | __instance.showNextIndex.Value = __instance.hoeDirt.Value.state.Value == 1;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/BetterGardenPots/Patches/IndoorPot/PerformObjectDropInActionPatchFruit.cs:
--------------------------------------------------------------------------------
1 | using StardewValley;
2 | using System.Linq;
3 |
4 | namespace BetterGardenPots.Patches.IndoorPot
5 | {
6 | internal class PerformObjectDropInActionPatchFruit
7 | {
8 | public static void Postfix(StardewValley.Objects.IndoorPot __instance, ref bool __result, Item dropInItem,
9 | bool probe, Farmer who)
10 | {
11 | if (__result || dropInItem == null || dropInItem.ParentSheetIndex != 499)
12 | return;
13 | if (who == null || !__instance.hoeDirt.Value.canPlantThisSeedHere(
14 | dropInItem.ParentSheetIndex, (int)__instance.TileLocation.X, (int)__instance.TileLocation.Y,
15 | dropInItem.Category == -19))
16 | return;
17 |
18 | if (!probe)
19 | {
20 | __instance.hoeDirt.Value.plant(dropInItem.ParentSheetIndex, (int)__instance.TileLocation.X, (int)__instance.TileLocation.Y, who,
21 | dropInItem.Category == -19, who.currentLocation);
22 | Game1.hudMessages.Remove(Game1.hudMessages.FirstOrDefault(item =>
23 | item.Message == Game1.parseText(Game1.content.LoadString("Strings\\Objects:AncientFruitPot"),
24 | Game1.dialogueFont, 384)));
25 | }
26 | else
27 | __instance.heldObject.Value = new StardewValley.Object();
28 |
29 | __result = true;
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/BetterGardenPots/Patches/IndoorPot/PerformObjectDropInActionPatchSeasons.cs:
--------------------------------------------------------------------------------
1 | using StardewValley;
2 |
3 | namespace BetterGardenPots.Patches.IndoorPot
4 | {
5 | internal class PerformObjectDropInActionPatchSeasons
6 | {
7 | private static bool wasOutdoors;
8 |
9 | public static void Prefix()
10 | {
11 | wasOutdoors = Game1.currentLocation.IsOutdoors;
12 | Game1.currentLocation.IsOutdoors = false;
13 | }
14 |
15 | public static void Postfix()
16 | {
17 | Game1.currentLocation.IsOutdoors = wasOutdoors;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/BetterGardenPots/Patches/IndoorPot/PerformToolActionPatch.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using StardewValley;
3 | using SObject = StardewValley.Object;
4 |
5 | namespace BetterGardenPots.Patches.IndoorPot
6 | {
7 | internal class PerformToolActionPatch
8 | {
9 | private static Crop crop;
10 |
11 | public static void Prefix(StardewValley.Objects.IndoorPot __instance)
12 | {
13 | crop = __instance.hoeDirt.Value?.crop;
14 | }
15 |
16 | public static void Postfix(StardewValley.Objects.IndoorPot __instance, GameLocation location)
17 | {
18 | if (__instance.hoeDirt.Value?.crop == null && crop != null && crop.currentPhase.Value == crop.phaseDays.Count - 1)
19 | location.debris.Add(new Debris(new SObject(crop.indexOfHarvest.Value, 1), __instance.TileLocation * 64f + new Vector2(32f, 32f)));
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/BetterGardenPots/README.md:
--------------------------------------------------------------------------------
1 | # Better Garden Pots
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/2209?) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod uses [Harmony](https://github.com/pardeike/Harmony) to overwrite various `IndoorPot` methods to achieve different results based on the configuration settings the user has specified.
--------------------------------------------------------------------------------
/BetterGardenPots/Subscribers/IEventSubscriber.cs:
--------------------------------------------------------------------------------
1 | namespace BetterGardenPots.Subscribers
2 | {
3 | internal interface IEventSubscriber
4 | {
5 | void Subscribe();
6 |
7 | void Unsubscribe();
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/BetterGardenPots/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Better Garden Pots",
3 | "Author": "Cat",
4 | "Version": "1.6.0",
5 | "Description": "Makes garden pots way better!",
6 | "UniqueID": "cat.bettergardenpots",
7 | "EntryDll": "BetterGardenPots.dll",
8 | "MinimumApiVersion": "2.9.0",
9 | "UpdateKeys": [ "Nexus:2209" ]
10 | }
11 |
--------------------------------------------------------------------------------
/BetterHay/BetterHay.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0.0
4 | net452
5 |
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/BetterHay/BetterHayGrass.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using StardewValley;
3 | using SObject = StardewValley.Object;
4 |
5 | namespace BetterHay
6 | {
7 | internal class BetterHayGrass
8 | {
9 | //Tries to add an item to the player's inventory
10 | public static bool TryAddItemToInventory(int which)
11 | {
12 | string name = Game1.objectInformation[which].Split('/')[0];
13 | bool addedToInventory = Game1.player.addItemToInventory(new SObject(which, 1)) == null;
14 | if (addedToInventory)
15 | Game1.addHUDMessage(new HUDMessage(name, 1, true, Color.LightGoldenrodYellow, (Item)new StardewValley.Object(which, 1, false, -1, 0)));
16 |
17 | return addedToInventory;
18 | }
19 |
20 | //Drops an item on the given tileLocation
21 | public static void DropOnGround(Vector2 tileLocation, int which)
22 | {
23 | Game1.createObjectDebris(which, (int)tileLocation.X, (int)tileLocation.Y);
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/BetterHay/ModConfig.cs:
--------------------------------------------------------------------------------
1 | namespace BetterHay
2 | {
3 | public class ModConfig
4 | {
5 | public bool EnableTakingHayFromHoppersAnytime { get; set; } = true;
6 | public bool EnableGettingHayFromGrassAnytime { get; set; } = true;
7 | public bool DropHayOnGroundIfNoRoomInInventory { get; set; } = true;
8 | public double ChanceToDropGrassStarterInsteadOfHay { get; set; } = 0.0;
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/BetterHay/README.md:
--------------------------------------------------------------------------------
1 | # Better Hay
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/1430?) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod has two parts:
9 | - Collect Hay Without Silos: If you have no silos or they're full, the mod simulates the relevant hay drop code as if you did.
10 | - Pull Hay out of Hoppers Anytime: The mod uses Harmony to patch the hopper interaction method to always try to pull at least one hay out.
11 |
--------------------------------------------------------------------------------
/BetterHay/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Better Hay",
3 | "Author": "Cat",
4 | "Version": "3.0.0",
5 | "Description": "You get hay from scything grass regardless of whether you have silos, and can always remove hay from hoppers.",
6 | "UniqueID": "cat.betterhay",
7 | "EntryDll": "BetterHay.dll",
8 | "MinimumApiVersion": "2.9.0",
9 | "UpdateKeys": [ "Nexus:1430" ]
10 | }
11 |
--------------------------------------------------------------------------------
/BetterSlingshots/BetterSlingshots.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 2.0.0
4 | net452
5 |
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/BetterSlingshots/Framework/Config/BetterSlingshotsModConfig.cs:
--------------------------------------------------------------------------------
1 | namespace BetterSlingshots.Framework.Config
2 | {
3 | internal class BetterSlingshotsModConfig
4 | {
5 | public bool DisableReverseAiming { get; set; } = true;
6 | public bool AutoReload { get; set; } = true;
7 | public string[] AutomaticSlingshots { get; set; } = { "Galaxy", "Master" };
8 | public bool ShowActualMousePositionWhenAiming { get; set; } = true;
9 |
10 | public bool CanMoveWhileFiring { get; set; } = false;
11 | public bool InfiniteAmmo { get; set; } = false;
12 | public bool RapidFire { get; set; } = false;
13 | public int GalaxySlingshotPrice { get; set; } = 50000;
14 |
15 | public BetterSlingshotsModConfig()
16 | {
17 | }
18 |
19 | public BetterSlingshotsModConfig(bool disableReverseAiming, bool autoReload, string[] automaticSlingshots, bool showActualMousePositionWhenAiming, bool canMoveWhileFiring, bool infiniteAmmo, bool rapidFire, int galaxySlingshotPrice)
20 | {
21 | this.DisableReverseAiming = disableReverseAiming;
22 | this.AutoReload = autoReload;
23 | this.AutomaticSlingshots = automaticSlingshots;
24 | this.ShowActualMousePositionWhenAiming = showActualMousePositionWhenAiming;
25 | this.CanMoveWhileFiring = canMoveWhileFiring;
26 | this.InfiniteAmmo = infiniteAmmo;
27 | this.RapidFire = rapidFire;
28 | this.GalaxySlingshotPrice = galaxySlingshotPrice;
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/BetterSlingshots/Framework/Config/LegacyConfig.cs:
--------------------------------------------------------------------------------
1 | namespace BetterSlingshots.Framework.Config
2 | {
3 | internal class LegacyConfig
4 | {
5 | public bool DisableReverseAiming { get; set; } = true;
6 | public bool AutoReload { get; set; } = true;
7 | public string AutomaticSlingshots { get; set; } = "Galaxy, Master";
8 | public bool ShowActualMousePositionWhenAiming { get; set; } = true;
9 |
10 | public bool CanMoveWhileFiring { get; set; } = false;
11 | public bool InfiniteAmmo { get; set; } = false;
12 | public bool RapidFire { get; set; } = false;
13 | public int GalaxySlingshotPrice { get; set; } = 50000;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/BetterSlingshots/Framework/Patches/SlingshotBeginUsingPatch.cs:
--------------------------------------------------------------------------------
1 | using Harmony;
2 | using StardewValley.Tools;
3 | using System.Diagnostics.CodeAnalysis;
4 | using System.Reflection;
5 |
6 | namespace BetterSlingshots.Framework.Patches
7 | {
8 | /// Lets the farmer move while aiming if that is enabled.
9 | [HarmonyPatch]
10 | internal class SlingshotBeginUsingPatch
11 | {
12 | [SuppressMessage("ReSharper", "UnusedMember.Local", Justification = "Method names are defined by Harmony.")]
13 | private static bool Prepare()
14 | {
15 | return BetterSlingshotsMod.Instance.Config.CanMoveWhileFiring;
16 | }
17 |
18 | [SuppressMessage("ReSharper", "UnusedMember.Local", Justification = "Method names are defined by Harmony.")]
19 | private static MethodBase TargetMethod()
20 | {
21 | return typeof(Slingshot).GetMethod(nameof(Slingshot.beginUsing));
22 | }
23 |
24 | [SuppressMessage("ReSharper", "InconsistentNaming", Justification = "Argument names are defined by Harmony.")]
25 | [SuppressMessage("ReSharper", "UnusedMember.Local", Justification = "Method names are defined by Harmony.")]
26 | private static void Postfix(Slingshot __instance)
27 | {
28 | __instance.getLastFarmerToUse().CanMove = true;
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/BetterSlingshots/Framework/Patches/SlingshotFinishPatch.cs:
--------------------------------------------------------------------------------
1 | using Harmony;
2 | using StardewValley.Tools;
3 | using System.Diagnostics.CodeAnalysis;
4 | using System.Reflection;
5 |
6 | namespace BetterSlingshots.Framework.Patches
7 | {
8 | /// Allows for automatic firing by disabling the finish fire event.
9 | [HarmonyPatch]
10 | internal class SlingshotFinishPatch
11 | {
12 | private static bool shouldRun = true;
13 | private static Slingshot instanceToControl;
14 |
15 | public static void ShouldRun(Slingshot instance, bool shouldRun)
16 | {
17 | SlingshotFinishPatch.shouldRun = shouldRun;
18 | SlingshotFinishPatch.instanceToControl = instance;
19 | }
20 |
21 | [SuppressMessage("ReSharper", "UnusedMember.Local", Justification = "Method names are defined by Harmony.")]
22 | private static MethodBase TargetMethod()
23 | {
24 | return typeof(Slingshot).GetMethod("doFinish", BindingFlags.Instance | BindingFlags.NonPublic);
25 | }
26 |
27 | [SuppressMessage("ReSharper", "InconsistentNaming", Justification = "Argument names are defined by Harmony.")]
28 | [SuppressMessage("ReSharper", "UnusedMember.Local", Justification = "Method names are defined by Harmony.")]
29 | private static bool Prefix(Slingshot __instance)
30 | {
31 | if (__instance != SlingshotFinishPatch.instanceToControl || SlingshotFinishPatch.instanceToControl == null)
32 | return true;
33 |
34 | return SlingshotFinishPatch.shouldRun;
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/BetterSlingshots/Framework/Utils.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using StardewValley;
3 |
4 | namespace BetterSlingshots.Framework
5 | {
6 | internal class Utils
7 | {
8 | public static Vector2 GetCorrectVelocity(Vector2 aimPos, Farmer who, bool reverse)
9 | {
10 | Vector2 velocity = Utility.getVelocityTowardPoint(Utils.GetCorrectFarmerPosition(who), aimPos, (float)(15 + Game1.random.Next(4, 6)) * (1f + who.weaponSpeedModifier));
11 |
12 | return reverse ? velocity * -1 : velocity;
13 | }
14 |
15 | public static Vector2 GetCorrectFarmerPosition(Farmer who)
16 | {
17 | return new Vector2(who.getStandingX() - 16 + 32, who.getStandingY() - 64 - 8 + 32);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/BetterSlingshots/README.md:
--------------------------------------------------------------------------------
1 | # Better Slingshots
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/2067?) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod works by Harmony patching various `Slingshot` methods to achieve the desired features. Unlike the old version of the mod, this completely rewritten approach is multiplayer compatible because it doesn't swap out `Slingshot` instances as the player uses them (which lead to a ton of errors).
--------------------------------------------------------------------------------
/BetterSlingshots/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Better Slingshots",
3 | "Author": "Cat",
4 | "Version": "2.0.0",
5 | "Description": "Makes slingshots way better! Adds full auto fire, auto reload, better aiming, fixes bugs, and more!",
6 | "UniqueID": "cat.betterslingshots",
7 | "EntryDll": "BetterSlingshots.dll",
8 | "MinimumApiVersion": "2.9.0",
9 | "UpdateKeys": [ "Nexus:2067" ]
10 | }
11 |
--------------------------------------------------------------------------------
/BetterWorkbenches/BetterWorkbenches.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.0.0
4 | net452
5 |
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/BetterWorkbenches/ModEntry.cs:
--------------------------------------------------------------------------------
1 | using Harmony;
2 | using StardewModdingAPI;
3 | using System.Reflection;
4 |
5 | namespace BetterWorkbenches
6 | {
7 | public class ModEntry : Mod
8 | {
9 | public override void Entry(IModHelper helper)
10 | {
11 | // Do reflection in the entry method to crash when the mod is loaded rather than do nothing when workbenches are clicked (i.e. fail fast to know the mod needs updates)
12 | WorkbenchPatch.GetTypes();
13 |
14 | HarmonyInstance harmony = HarmonyInstance.Create(helper.ModRegistry.ModID);
15 | harmony.PatchAll(Assembly.GetExecutingAssembly());
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/BetterWorkbenches/README.md:
--------------------------------------------------------------------------------
1 | # Range Display
2 |
3 |
4 | See [This link](https://www.nexusmods.com/stardewvalley/mods/4830/) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod uses Harmony to patch the function that looks for adjacent chests to make it instead look for all connected chests.
--------------------------------------------------------------------------------
/BetterWorkbenches/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Better Workbenches",
3 | "Author": "Cat",
4 | "Version": "1.0.2",
5 | "Description": "Workbenches now pull items from every touching chest, not just interconnected ones.",
6 | "UniqueID": "cat.betterworkbenches",
7 | "EntryDll": "BetterWorkbenches.dll",
8 | "MinimumApiVersion": "3.0.1",
9 | "UpdateKeys": [ "Nexus:4830" ]
10 | }
11 |
--------------------------------------------------------------------------------
/CactiHurtYou/CactiHurtYou.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.1.1
4 | net452
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/CactiHurtYou/README.md:
--------------------------------------------------------------------------------
1 | # Cacti Hurt You
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/4019) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod checks whether the player is touching a cactus and then hurts them a little.
--------------------------------------------------------------------------------
/CactiHurtYou/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Cacti Hurt You",
3 | "Author": "Cat",
4 | "Version": "1.1.3",
5 | "Description": "Touching cacti will hurt you. Ouch!",
6 | "UniqueID": "cat.cactihurtyou",
7 | "EntryDll": "CactiHurtYou.dll",
8 | "MinimumApiVersion": "2.11.0",
9 | "UpdateKeys": [ "Nexus:4019" ]
10 | }
11 |
--------------------------------------------------------------------------------
/CasksEverywhere/CaskPatch.cs:
--------------------------------------------------------------------------------
1 | using Harmony;
2 | using StardewValley.Objects;
3 | using System.Reflection;
4 |
5 | namespace CasksEverywhere
6 | {
7 | [HarmonyPatch]
8 | internal class CaskPatch
9 | {
10 | private static MethodBase TargetMethod()
11 | {
12 | return typeof(Cask).GetMethod(nameof(Cask.IsValidCaskLocation));
13 | }
14 |
15 | private static bool Prefix(ref bool __result)
16 | {
17 | __result = true;
18 | return false;
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/CasksEverywhere/CasksEverywhere.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.1.0
4 | net452
5 |
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/CasksEverywhere/CasksEverywhereMod.cs:
--------------------------------------------------------------------------------
1 | using Harmony;
2 | using StardewModdingAPI;
3 | using System.Reflection;
4 |
5 | namespace CasksEverywhere
6 | {
7 | public class CasksEverywhereMod : Mod
8 | {
9 | /// The mod entry point, called after the mod is first loaded.
10 | /// Provides simplified APIs for writing mods.
11 | public override void Entry(IModHelper helper)
12 | {
13 | HarmonyInstance instance = HarmonyInstance.Create(helper.ModRegistry.ModID);
14 |
15 | instance.PatchAll(Assembly.GetExecutingAssembly());
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CasksEverywhere/README.md:
--------------------------------------------------------------------------------
1 | # Casks Everywhere
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/2994) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod transpiles the cask function to check if items can be placed in it to allow any location, thereby not needing to handle custom item serialization.
--------------------------------------------------------------------------------
/CasksEverywhere/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Casks Everywhere",
3 | "Author": "Cat",
4 | "Version": "1.1.1",
5 | "Description": "Makes casks work everywhere.",
6 | "UniqueID": "cat.caskseverywhere",
7 | "EntryDll": "CasksEverywhere.dll",
8 | "MinimumApiVersion": "3.4.0",
9 | "UpdateKeys": [ "Nexus:2994" ]
10 | }
11 |
--------------------------------------------------------------------------------
/ChatCommands/ChatCommands.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.13.0
4 | net452
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ChatCommands/ChatCommandsConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace ChatCommands
4 | {
5 | /// Mod configuration.
6 | internal class ChatCommandsConfig
7 | {
8 | public bool ListenToConsoleOnStartup { get; set; } = false;
9 | public int MaximumNumberOfHistoryMessages { get; set; } = 70;
10 | public bool UseMonospacedFontForCommandOutput { get; set; } = true;
11 | public bool RemoveSMAPIMessagePrefix { get; set; } = false;
12 | public IDictionary ColorOverrides { get; set; } = new Dictionary();
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/ChatCommands/ClassReplacements/CommandChatTextBoxState.cs:
--------------------------------------------------------------------------------
1 | using ChatCommands.Util;
2 | using StardewValley.Menus;
3 | using System.Collections.Generic;
4 |
5 | namespace ChatCommands.ClassReplacements
6 | {
7 | internal class CommandChatTextBoxState
8 | {
9 | internal readonly int CurrentInsertPosition;
10 | internal readonly long CurrentRecipientId;
11 | internal readonly string CurrentRecipientName;
12 | internal readonly int CurrentSnippetIndex;
13 | internal readonly List FinalText = new List();
14 |
15 | public CommandChatTextBoxState(int currentInsertPosition, int currentSnippetIndex, long currentRecipientId,
16 | string currentRecipientName, IEnumerable finalText)
17 | {
18 | this.CurrentInsertPosition = currentInsertPosition;
19 | this.CurrentSnippetIndex = currentSnippetIndex;
20 | this.CurrentRecipientId = currentRecipientId;
21 | this.CurrentRecipientName = currentRecipientName;
22 | foreach (ChatSnippet snippet in finalText) this.FinalText.Add(Utils.CopyChatSnippet(snippet));
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/ChatCommands/CommandValidator.cs:
--------------------------------------------------------------------------------
1 | using ChatCommands.Util;
2 | using StardewModdingAPI;
3 | using System.Reflection;
4 |
5 | namespace ChatCommands
6 | {
7 | /// Checks whether a command is a real SMAPI command.
8 | /// Reflecting into SMAPI internals is discouraged, but we need to know if the command is real or not :).
9 | internal class CommandValidator
10 | {
11 | private readonly object commandHelper;
12 | private readonly MethodInfo commandHelperGet;
13 |
14 | public CommandValidator(ICommandHelper helper)
15 | {
16 | FieldInfo info = helper.GetType()
17 | .GetField("CommandManager", BindingFlags.NonPublic | BindingFlags.Instance);
18 |
19 | this.commandHelper = info?.GetValue(helper);
20 | this.commandHelperGet = this.commandHelper?.GetType()
21 | .GetMethod("Get", BindingFlags.Public | BindingFlags.Instance);
22 | }
23 |
24 | public bool IsValidCommand(string input)
25 | {
26 | string first = Utils.ParseArgs(input)[0];
27 | switch (first)
28 | {
29 | //change help to halp
30 | case "halp":
31 | return true;
32 |
33 | case "help":
34 | return false;
35 | //disallow use of /w and /r
36 | case "w":
37 | case "r":
38 | return false;
39 |
40 | default:
41 | return this.commandHelperGet?.Invoke(this.commandHelper, new object[] { first }) != null;
42 | }
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/ChatCommands/Commands/BaseCommand.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 |
3 | namespace ChatCommands.Commands
4 | {
5 | /// Base class for commands.
6 | internal abstract class BaseCommand : ICommand
7 | {
8 | protected IMonitor Monitor;
9 |
10 | protected BaseCommand(IMonitor monitor)
11 | {
12 | this.Monitor = monitor;
13 | }
14 |
15 | public abstract void Register(ICommandHelper helper);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/ChatCommands/Commands/ICommand.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 |
3 | namespace ChatCommands.Commands
4 | {
5 | /// Command interface.
6 | internal interface ICommand
7 | {
8 | void Register(ICommandHelper helper);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/ChatCommands/Commands/ListenCommand.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 |
3 | namespace ChatCommands.Commands
4 | {
5 | /// A command to toggle listening to console output.
6 | internal class ListenCommand : BaseCommand
7 | {
8 | private readonly NotifyingTextWriter writer;
9 |
10 | public ListenCommand(IMonitor monitor, ChatCommandsConfig config, NotifyingTextWriter writer) : base(monitor)
11 | {
12 | this.writer = writer;
13 |
14 | if (config.ListenToConsoleOnStartup)
15 | this.Handle(null, null);
16 | }
17 |
18 | /// Adds this command to SMAPI.
19 | public override void Register(ICommandHelper helper)
20 | {
21 | helper.Add("listen", "Toggles displaying console output in the in game chat box.", this.Handle);
22 | }
23 |
24 | /// Handles the command.
25 | private void Handle(string name, string[] args)
26 | {
27 | this.writer.ForceNotify = !this.writer.ForceNotify;
28 | this.Monitor.Log(
29 | this.writer.ForceNotify
30 | ? "Listening to console output..."
31 | : "Stopped listening to console output.", LogLevel.Info);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/ChatCommands/Commands/ReplyCommand.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 |
3 | namespace ChatCommands.Commands
4 | {
5 | /// A dummy command to provide help documentation for the reply command.
6 | internal class ReplyCommand : BaseCommand
7 | {
8 | public ReplyCommand(IMonitor monitor) : base(monitor)
9 | {
10 | }
11 |
12 | /// Adds this command to SMAPI.
13 | public override void Register(ICommandHelper helper)
14 | {
15 | helper.Add("r", "Replies to the last whisper you were sent. Only works from the chat box.\n"
16 | + "Usage: /r ",
17 | (name, args) => this.Monitor.Log("This command only works from the chat box.", LogLevel.Error));
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/ChatCommands/Commands/WhisperCommand.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 |
3 | namespace ChatCommands.Commands
4 | {
5 | /// A dummy command to provide help documentation for the whisper command.
6 | internal class WhisperCommand : BaseCommand
7 | {
8 | public WhisperCommand(IMonitor monitor) : base(monitor)
9 | {
10 | }
11 |
12 | /// Adds this command to SMAPI.
13 | public override void Register(ICommandHelper helper)
14 | {
15 | helper.Add("w", "Send a message to only one player. Only works from the chat box.\n"
16 | + "Usage: /w ",
17 | (name, args) => this.Monitor.Log("This command only works from the chat box.", LogLevel.Error));
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/ChatCommands/ICommandHandler.cs:
--------------------------------------------------------------------------------
1 | namespace ChatCommands
2 | {
3 | /// Interface for command handling.
4 | internal interface ICommandHandler
5 | {
6 | void Handle(string input);
7 |
8 | bool CanHandle(string input);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/ChatCommands/NotifyingTextWriter.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Text;
3 |
4 | namespace ChatCommands
5 | {
6 | ///
7 | /// A that intercepts another and notifes
8 | /// anything written to it.
9 | ///
10 | ///
11 | /// Borrowed heavily from
12 | /// https://github.com/Pathoschild/SMAPI/blob/develop/src/SMAPI/Framework/Logging/InterceptingTextWriter.cs
13 | ///
14 | internal class NotifyingTextWriter : TextWriter
15 | {
16 | public delegate void OnLineWritten(char[] buffer, int index, int count);
17 |
18 | private readonly OnLineWritten callback;
19 |
20 | private readonly TextWriter original;
21 |
22 | public bool ForceNotify { get; set; }
23 |
24 | public bool Notify { get; set; }
25 |
26 | public NotifyingTextWriter(TextWriter original, OnLineWritten callback)
27 | {
28 | this.original = original;
29 | this.callback = callback;
30 | }
31 |
32 | public override Encoding Encoding => this.original.Encoding;
33 |
34 | /// When a write is invoked, send the information over to the callback.
35 | public override void Write(char[] buffer, int index, int count)
36 | {
37 | if (this.Notify || this.ForceNotify)
38 | this.callback(buffer, index, count);
39 | this.original.Write(buffer, index, count);
40 | }
41 |
42 | public override void Write(char ch)
43 | {
44 | this.original.Write(ch);
45 | }
46 |
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/ChatCommands/README.md:
--------------------------------------------------------------------------------
1 | # Chat Commands
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/2092) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod
9 | - Replaces the default chat box with one that passes input to my mod before it is proccessed.
10 | - Replaces the default `Console.Out` stream with one that passes input to my mod before it is written to the original `Console.Out`.
11 | - Detects when the input is a valid SMAPI command.
12 | - If it is valid, it runs the command, copies the output the command made, and writes that back to the chat box.
13 | - Otherwise it lets the game handle the input.
14 |
15 | It also
16 | - Adds the ability to scroll by not actually deleting messages over the limit, and instead only displaying a subset of messages.
17 | - Piggybacks off the existing history system to add history for messages the user sent.
18 | - Dynamically changes the message limit based on the user's window size, so larger screens see more messages.
19 | - Rewrites how text entry works so players can use the left/right arrow keys how they'd expect to edit any part of their message.
20 | - Emulates a monospace font by drawing characters in fixed width slots for console output.
--------------------------------------------------------------------------------
/ChatCommands/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Chat Commands",
3 | "Author": "Cat",
4 | "Version": "1.15.2",
5 | "Description": "Lets you run SMAPI commands from the chat window!",
6 | "UniqueID": "cat.chatcommands",
7 | "EntryDll": "ChatCommands.dll",
8 | "MinimumApiVersion": "3.0.0",
9 | "UpdateKeys": [ "Nexus:2092" ]
10 | }
11 |
--------------------------------------------------------------------------------
/ColorfulConsole/ColorfulConsole.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ColorfulConsole
5 | ColorfulConsole
6 | 1.0.0
7 | net452
8 | x86
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/ColorfulConsole/ColorfulConsoleMod.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework.Graphics;
2 | using StardewModdingAPI;
3 | using StardewModdingAPI.Events;
4 | using StardewValley;
5 | using StardewValley.Locations;
6 | using System;
7 | using System.Collections.Generic;
8 | using System.Linq;
9 |
10 | namespace ColorfulConsole
11 | {
12 | ///
13 | /// Represents the geode info menu mod.
14 | ///
15 | public class ColorfulConsole : Mod
16 | {
17 | /***
18 | * Private Fields
19 | ***/
20 |
21 |
22 | ///
23 | /// Entry method. Sets up config and event listeners.
24 | ///
25 | /// Mod helper to read config and load sprites.
26 | public override void Entry(IModHelper helper)
27 | {
28 | Console.SetOut(new ColorfulTextWriter(Console.Out));
29 | }
30 |
31 |
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/ColorfulConsole/ColorfulTextWriter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using Microsoft.Xna.Framework;
8 |
9 | namespace ColorfulConsole
10 | {
11 | internal class ColorfulTextWriter : TextWriter
12 | {
13 | private readonly ConsoleColor[] colors = ((ConsoleColor[])Enum.GetValues(typeof(ConsoleColor))).Where(color => color != ConsoleColor.Black).ToArray();
14 | private readonly Random rand = new Random();
15 |
16 | private readonly TextWriter original;
17 |
18 | public ColorfulTextWriter(TextWriter original)
19 | {
20 | this.original = original;
21 | }
22 |
23 | public override Encoding Encoding => this.original.Encoding;
24 |
25 | public override void Write(char[] buffer, int index, int count)
26 | {
27 | this.SetRandomColor();
28 | this.original.Write(buffer, index, count);
29 | }
30 |
31 | public override void Write(char ch)
32 | {
33 | this.SetRandomColor();
34 | this.original.Write(ch);
35 | }
36 |
37 | private void SetRandomColor()
38 | {
39 | Console.BackgroundColor = ConsoleColor.Black;
40 | Console.ForegroundColor = this.GetRandomColor();
41 | }
42 |
43 | private ConsoleColor GetRandomColor()
44 | {
45 | return this.colors[this.rand.Next(0, this.colors.Length)];
46 | }
47 |
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/ColorfulConsole/README.txt:
--------------------------------------------------------------------------------
1 | Explanation of each option:
2 |
3 | ActivationKey: The key to press to open the menu. (default "K")
4 | NumberOfNextGeodeDropsToShow: The number of items to show in the geode tabs. (default 20)
5 | ShowStarsNextToMineralsAndArtifactsNotDonatedToTheMuseum: If set to true, there will be a star next to each artifact or mineral you haven't donated to the museum yet. (default true)
6 |
7 | Note: I recommend you leave these as they are, unless how the menu works annoys you.
8 |
9 | RememberMenuStateAfterClose: If this is true, after you close the menu and then re-open it, it will save your entered text in the search box, which tab you had open, and how far you scrolled in each page. (default true)
10 | IfRememberingMenuStateAlsoRememberScrollBarPositions: If the above option is true, then if this is set to false the menu will NOT remember how far you scrolled down each page. (default true)
11 | RightClickOnOnlySearchBoxToClearText: If set to true, then only right clicking on the search box will clear the text. If it is false, you can right click anywhere to clear the text. (default false)
12 | PressingEscapeWhileTypingInSearchBoxInstantlyClosesMenu: If set to false, escape first unselects the search box if it was selected. If set to true the box instantly closes even if the search box was selected. (default true)
13 |
--------------------------------------------------------------------------------
/ColorfulConsole/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Colorful Console",
3 | "Author": "Cat",
4 | "Version": "1.0.0",
5 | "Description": "Makes console output colorful!",
6 | "UniqueID": "cat.colorfulconsole",
7 | "EntryDll": "ColorfulConsole.dll"
8 | }
--------------------------------------------------------------------------------
/CopyInviteCode/ClipboardManagers/IClipboardManager.cs:
--------------------------------------------------------------------------------
1 | namespace CopyInviteCode.ClipboardManagers
2 | {
3 | /// Can set clipboard text.
4 | internal interface IClipboardManager
5 | {
6 | void SetText(string text);
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/CopyInviteCode/ClipboardManagers/LinuxClipboardManager.cs:
--------------------------------------------------------------------------------
1 | namespace CopyInviteCode.ClipboardManagers
2 | {
3 | /// Sets clipboard contents on Linux.
4 | internal class LinuxClipboardManager : UnixClipboardManager
5 | {
6 | protected override string FileName => "xclip";
7 | protected override string SetArguments => "-selection clipboard";
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/CopyInviteCode/ClipboardManagers/MacClipboardManager.cs:
--------------------------------------------------------------------------------
1 | namespace CopyInviteCode.ClipboardManagers
2 | {
3 | /// Sets clipboard contents on Mac.
4 | internal class MacClipboardManager : UnixClipboardManager
5 | {
6 | protected override string FileName => "pbcopy";
7 | protected override string SetArguments => "-pboard general -Prefer txt";
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/CopyInviteCode/ClipboardManagers/UnixClipboardManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 |
4 | namespace CopyInviteCode.ClipboardManagers
5 | {
6 | /// Sets clipboard contents on Unix.
7 | internal abstract class UnixClipboardManager : IClipboardManager
8 | {
9 | protected abstract string FileName { get; }
10 | protected abstract string SetArguments { get; }
11 |
12 | ///
13 | /// Sets clipboard text on a unix like system by directly invoking a native process.
14 | /// Taken from https://stackoverflow.com/questions/28611112/mono-clipboard-fix/33563898#33563898.
15 | ///
16 | public void SetText(string textToCopy)
17 | {
18 | try
19 | {
20 | using (Process p = new Process())
21 | {
22 | p.StartInfo =
23 | new ProcessStartInfo(this.FileName, this.SetArguments)
24 | {
25 | UseShellExecute = false,
26 | RedirectStandardOutput = false,
27 | RedirectStandardInput = true
28 | };
29 | p.Start();
30 | p.StandardInput.Write(textToCopy);
31 | p.StandardInput.Close();
32 | p.WaitForExit();
33 | }
34 | }
35 | catch (Exception ex)
36 | {
37 | Console.WriteLine(ex.Message);
38 | }
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/CopyInviteCode/ClipboardManagers/WindowsClipboardManager.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Forms;
2 |
3 | namespace CopyInviteCode.ClipboardManagers
4 | {
5 | /// Sets clipboard contents on Windows.
6 | internal class WindowsClipboardManager : IClipboardManager
7 | {
8 | public void SetText(string text)
9 | {
10 | Clipboard.SetText(text);
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/CopyInviteCode/CopyInviteCode.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 2.1.0
4 | net452
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/CopyInviteCode/README.md:
--------------------------------------------------------------------------------
1 | # Copy Invite Code
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/2171) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## Abandoned
7 |
8 | This mod will no longer receive updates. This exact functionality was added to SDV in version 1.3.17, so the mod is no longer needed. The code probably won't compile without fixes.
9 |
10 | ## How it works
11 |
12 | This is a small mod that detects when the invite code menu is active, and then replaces the usual `ConfirmationDialog` close button with a button that instead extracts and saves the invite code to the user's clipboard. This works because the close button isn't used by the game.
--------------------------------------------------------------------------------
/CopyInviteCode/assets/clipboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dphill10827/UnofficialModUpdateMenu/b27ee0f12e66165156d9ab9de2439fd5718c2b30/CopyInviteCode/assets/clipboard.png
--------------------------------------------------------------------------------
/CopyInviteCode/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Copy Invite Code",
3 | "Author": "Cat",
4 | "Version": "2.1.0",
5 | "Description": "Adds a button to copy invite codes to the clipboard in the menu.",
6 | "UniqueID": "cat.copyinvitecode",
7 | "EntryDll": "CopyInviteCode.dll",
8 | "MinimumApiVersion": "2.9.0",
9 | "UpdateKeys": [ "Nexus:2171" ]
10 | }
11 |
--------------------------------------------------------------------------------
/CustomTransparency/CustomTransparency.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.0.0
4 | net452
5 |
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/CustomTransparency/ModConfig.cs:
--------------------------------------------------------------------------------
1 | namespace CustomTransparency
2 | {
3 | internal class ModConfig
4 | {
5 | public float MinimumTreeTransparency { get; set; } = 0.2f;
6 | public float MinimumBuildingTransparency { get; set; } = 0.2f;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/CustomTransparency/Patches/BuildingPatch.cs:
--------------------------------------------------------------------------------
1 | using Harmony;
2 | using StardewValley.Buildings;
3 | using System.Collections.Generic;
4 | using System.Reflection;
5 | using System.Reflection.Emit;
6 |
7 | namespace CustomTransparency.Patches
8 | {
9 | [HarmonyPatch]
10 | internal class BuildingPatch
11 | {
12 | private static MethodBase TargetMethod()
13 | {
14 | return typeof(Building).GetMethod(nameof(Building.Update));
15 | }
16 |
17 | /// Change the first 0.4 in the method to the specified transparency in the config.
18 | private static IEnumerable Transpiler(IEnumerable instructions)
19 | {
20 | bool changed = false;
21 |
22 | foreach (CodeInstruction instruction in instructions)
23 | {
24 | if (!changed && instruction.opcode == OpCodes.Ldc_R4 &&
25 | (float)instruction.operand <= 0.41f && (float)instruction.operand >= 0.39f)
26 | {
27 | changed = true;
28 | instruction.operand = ModEntry.Config.MinimumBuildingTransparency;
29 | }
30 |
31 | yield return instruction;
32 | }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/CustomTransparency/Patches/TreePatch.cs:
--------------------------------------------------------------------------------
1 | using Harmony;
2 | using StardewValley.TerrainFeatures;
3 | using System.Collections.Generic;
4 | using System.Reflection;
5 | using System.Reflection.Emit;
6 |
7 | namespace CustomTransparency.Patches
8 | {
9 | [HarmonyPatch]
10 | internal class TreePatch
11 | {
12 | private static MethodBase TargetMethod()
13 | {
14 | return typeof(Tree).GetMethod(nameof(Tree.tickUpdate));
15 | }
16 |
17 | /// Change the first 0.4 in the method to the specified transparency in the config.
18 | private static IEnumerable Transpiler(IEnumerable instructions)
19 | {
20 | bool changed = false;
21 |
22 | foreach (CodeInstruction instruction in instructions)
23 | {
24 | if (!changed && instruction.opcode == OpCodes.Ldc_R4 &&
25 | (float)instruction.operand <= 0.41f && (float)instruction.operand >= 0.39f)
26 | {
27 | changed = true;
28 | instruction.operand = ModEntry.Config.MinimumTreeTransparency;
29 | }
30 |
31 | yield return instruction;
32 | }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/CustomTransparency/README.md:
--------------------------------------------------------------------------------
1 | # Custom Transparency
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/2359?) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod uses [Harmony](https://github.com/pardeike/Harmony) to transpile the methods which control the minimum transparency setting (which is hardcoded to 0.4) to what the user specifies.
--------------------------------------------------------------------------------
/CustomTransparency/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Custom Transparency",
3 | "Author": "Cat",
4 | "Version": "1.0.1",
5 | "Description": "Lets you choose how transparent trees/buildings are when you walk behind them.",
6 | "UniqueID": "cat.customtransparency",
7 | "EntryDll": "CustomTransparency.dll",
8 | "MinimumApiVersion": "2.9.0",
9 | "UpdateKeys": [ "Nexus:2359" ]
10 | }
11 |
--------------------------------------------------------------------------------
/CustomWarpLocations/CustomWarpLocations.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.3.0
4 | net452
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/CustomWarpLocations/ModConfig.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 |
3 | namespace CustomWarpLocations
4 | {
5 | internal class ModConfig
6 | {
7 | public SButton LocationSaveKey { get; set; } = SButton.F5;
8 |
9 | public bool AdvancedMode { get; set; } = false;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/CustomWarpLocations/NewWarpLocations.cs:
--------------------------------------------------------------------------------
1 | namespace CustomWarpLocations
2 | {
3 | internal class NewWarpLocations
4 | {
5 | public WarpLocation FarmWarpLocation_Totem { get; set; } = new WarpLocation("Farm", 48, 7);
6 |
7 | public WarpLocation MountainWarpLocation_Totem { get; set; } = new WarpLocation("Mountain", 31, 20);
8 |
9 | public WarpLocation BeachWarpLocation_Totem { get; set; } = new WarpLocation("Beach", 20, 4);
10 |
11 | public WarpLocation DesertWarpLocation_Totem { get; set; } = new WarpLocation("Desert", 35, 43);
12 |
13 | public WarpLocation FarmWarpLocation_Scepter { get; set; } = new WarpLocation("Farm", 64, 15);
14 |
15 | public WarpLocation MountainWarpLocation_Obelisk { get; set; } = new WarpLocation("Mountain", 31, 20);
16 |
17 | public WarpLocation BeachWarpLocation_Obelisk { get; set; } = new WarpLocation("Beach", 20, 4);
18 |
19 | public WarpLocation DesertWarpLocation_Obelisk { get; set; } = new WarpLocation("Desert", 35, 43);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/CustomWarpLocations/README.md:
--------------------------------------------------------------------------------
1 | # Custom Warp Locations
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/1688?) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod hooks into the pending warp location that is created when you use an item, and overwrites it with a new location depending on the item that you're holding.
--------------------------------------------------------------------------------
/CustomWarpLocations/WarpLocation.cs:
--------------------------------------------------------------------------------
1 | namespace CustomWarpLocations
2 | {
3 | internal class WarpLocation
4 | {
5 | public string locationName;
6 | public int xCoord;
7 | public int yCoord;
8 |
9 | public WarpLocation(string locationName, int x, int y)
10 | {
11 | this.locationName = locationName;
12 | this.xCoord = x;
13 | this.yCoord = y;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/CustomWarpLocations/WarpOverrides/ObeliskWarpOverride.cs:
--------------------------------------------------------------------------------
1 | using StardewValley.Buildings;
2 |
3 | namespace CustomWarpLocations.WarpOverrides
4 | {
5 | internal class ObeliskWarpOverride : WarpOverride
6 | {
7 | private readonly string obeliskType;
8 |
9 | internal ObeliskWarpOverride(object target)
10 | {
11 | this.obeliskType = ((Building)target).buildingType.Value;
12 | }
13 |
14 | internal override WarpLocation GetWarpLocation()
15 | {
16 | switch (this.obeliskType)
17 | {
18 | case "Earth Obelisk":
19 | return WarpLocations.MountainWarpLocation_Obelisk;
20 | case "Water Obelisk":
21 | return WarpLocations.BeachWarpLocation_Obelisk;
22 | default:
23 | case "Desert Obelisk":
24 | return WarpLocations.DesertWarpLocation_Obelisk;
25 | }
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/CustomWarpLocations/WarpOverrides/TotemWarpOverride.cs:
--------------------------------------------------------------------------------
1 | using StardewValley;
2 |
3 | namespace CustomWarpLocations.WarpOverrides
4 | {
5 | internal class TotemWarpOverride : WarpOverride
6 | {
7 | private readonly int parentSheetIndex;
8 |
9 | internal TotemWarpOverride(object target)
10 | {
11 | this.parentSheetIndex = ((Object)target).ParentSheetIndex;
12 | }
13 |
14 | internal override WarpLocation GetWarpLocation()
15 | {
16 | WarpLocation newLocation = null;
17 | switch (this.parentSheetIndex)
18 | {
19 | case 688:
20 | newLocation = WarpLocations.FarmWarpLocation_Totem;
21 | break;
22 |
23 | case 689:
24 | newLocation = WarpLocations.MountainWarpLocation_Totem;
25 | break;
26 |
27 | case 690:
28 | newLocation = WarpLocations.BeachWarpLocation_Totem;
29 | break;
30 |
31 | case 261:
32 | newLocation = WarpLocations.DesertWarpLocation_Totem;
33 | break;
34 | }
35 |
36 | return newLocation;
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/CustomWarpLocations/WarpOverrides/WandWarpOverride.cs:
--------------------------------------------------------------------------------
1 | using StardewValley;
2 |
3 | namespace CustomWarpLocations.WarpOverrides
4 | {
5 | internal class WandWarpOverride : WarpOverride
6 | {
7 | internal override WarpLocation GetWarpLocation()
8 | {
9 | if (!Game1.isStartingToGetDarkOut())
10 | Game1.playMorningSong();
11 | else
12 | Game1.changeMusicTrack("none");
13 |
14 | return WarpLocations.FarmWarpLocation_Scepter;
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/CustomWarpLocations/WarpOverrides/WarpOverride.cs:
--------------------------------------------------------------------------------
1 | using StardewValley;
2 |
3 | namespace CustomWarpLocations.WarpOverrides
4 | {
5 | internal abstract class WarpOverride
6 | {
7 | internal static NewWarpLocations WarpLocations;
8 |
9 | internal abstract WarpLocation GetWarpLocation();
10 |
11 | internal void DoWarp()
12 | {
13 | WarpLocation location = this.GetWarpLocation();
14 | Game1.warpFarmer(location.locationName, location.xCoord, location.yCoord, false);
15 | this.AfterWarp();
16 | }
17 |
18 | private void AfterWarp()
19 | {
20 | Game1.fadeToBlackAlpha = 0.99f;
21 | Game1.screenGlow = false;
22 | Game1.player.temporarilyInvincible = false;
23 | Game1.player.temporaryInvincibilityTimer = 0;
24 | Game1.displayFarmer = true;
25 | }
26 |
27 | internal enum WarpLocationCategory
28 | {
29 | Farm,
30 | Mountains,
31 | Beach,
32 | Desert
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/CustomWarpLocations/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Custom Warp Locations",
3 | "Author": "Cat",
4 | "Version": "1.3.1",
5 | "Description": "Lets you change where your warp totems, obelisks, and return scepter warp you to!",
6 | "UniqueID": "cat.customwarplocations",
7 | "EntryDll": "CustomWarpLocations.dll",
8 | "MinimumApiVersion": "3.0.0",
9 | "UpdateKeys": [ "Nexus:1688" ]
10 | }
11 |
--------------------------------------------------------------------------------
/CustomizableDeathPenalty/CustomizableDeathPenalty.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.4.2
4 | net452
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/CustomizableDeathPenalty/ModConfig.cs:
--------------------------------------------------------------------------------
1 | namespace CustomizableDeathPenalty
2 | {
3 | internal class ModConfig
4 | {
5 | public bool KeepItems { get; set; } = true;
6 | public bool KeepMoney { get; set; } = false;
7 | public bool RememberMineLevels { get; set; } = false;
8 | public bool RestoreStamina { get; set; } = false;
9 | public bool RestoreHealth { get; set; } = false;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/CustomizableDeathPenalty/README.md:
--------------------------------------------------------------------------------
1 | # Customizable Death Penalty
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/1991) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod saves the current state of fields that can be changed on death, and then after the game revives you it resets those fields according to the user's config file.
--------------------------------------------------------------------------------
/CustomizableDeathPenalty/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Customizable Death Penalty",
3 | "Author": "Cat",
4 | "Version": "1.4.3",
5 | "Description": "Lets you choose the penalty for dying.",
6 | "UniqueID": "cat.customizabledeathpenalty",
7 | "EntryDll": "CustomizableDeathPenalty.dll",
8 | "MinimumApiVersion": "3.0.0",
9 | "UpdateKeys": [ "Nexus:1991" ]
10 | }
11 |
--------------------------------------------------------------------------------
/DesertObelisk/DesertObelisk.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.6.0
4 | net452
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/DesertObelisk/README.md:
--------------------------------------------------------------------------------
1 | # Desert Obelisk
2 |
3 | ## Abandoned
4 |
5 | This mod will no longer receive updates. This exact functionality was added to SDV in version 1.4, so the mod is no longer needed. The code probably won't compile without fixes.
6 |
7 | See [This link](http://www.nexusmods.com/stardewvalley/mods/2021) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
8 |
9 | ## How it works
10 |
11 | It adds a new Blueprint to the wizard's item list, and then associates a texture with that Blueprint. Instances of the vanilla building are replaced with my own instance that warps to the right place when the building is created, and it is saved to its own json file to avoid save file issues.
--------------------------------------------------------------------------------
/DesertObelisk/assets/Desert Obelisk Starblue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dphill10827/UnofficialModUpdateMenu/b27ee0f12e66165156d9ab9de2439fd5718c2b30/DesertObelisk/assets/Desert Obelisk Starblue.png
--------------------------------------------------------------------------------
/DesertObelisk/assets/Desert Obelisk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dphill10827/UnofficialModUpdateMenu/b27ee0f12e66165156d9ab9de2439fd5718c2b30/DesertObelisk/assets/Desert Obelisk.png
--------------------------------------------------------------------------------
/DesertObelisk/assets/markerTiles.xnb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dphill10827/UnofficialModUpdateMenu/b27ee0f12e66165156d9ab9de2439fd5718c2b30/DesertObelisk/assets/markerTiles.xnb
--------------------------------------------------------------------------------
/DesertObelisk/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Desert Obelisk",
3 | "Author": "Cat",
4 | "Version": "1.6.0",
5 | "Description": "Adds a desert obelisk that warps you to the desert!",
6 | "UniqueID": "cat.desertobelisk",
7 | "EntryDll": "DesertObelisk.dll",
8 | "MinimumApiVersion": "2.9.0",
9 | "UpdateKeys": [ "Nexus:2021" ],
10 | "Dependencies": [
11 | {
12 | "UniqueID": "Lita.StarblueValley",
13 | "IsRequired": false
14 | },
15 | {
16 | "UniqueID": "Entoarox.ExtendedMinecart",
17 | "IsRequired": false
18 | }
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/FloweryTools/FloweryTools.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.0.0
4 | net452
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/FloweryTools/Framework/BaseCreator.cs:
--------------------------------------------------------------------------------
1 | using FloweryTools.Framework.Flowerers;
2 |
3 | namespace FloweryTools.Framework
4 | {
5 | internal abstract class BaseCreator
6 | {
7 | protected FlowerHelper helper;
8 |
9 | public BaseCreator(FlowerHelper helper)
10 | {
11 | this.helper = helper;
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/FloweryTools/Framework/Creators/Explosion.cs:
--------------------------------------------------------------------------------
1 | using FloweryTools.Framework.Flowerers;
2 | using FloweryTools.ParticleCreator;
3 | using StardewValley;
4 |
5 | namespace FloweryTools.Framework.Creators
6 | {
7 | // Used for explosions (e.g. charging a tool, bobber landing)
8 | internal class Explosion : BaseCreator, IParticleCreator
9 | {
10 | public Explosion(FlowerHelper helper) : base(helper)
11 | {
12 |
13 | }
14 |
15 | public void CreateParticles(GameLocation location, int frameIndex)
16 | {
17 | for (int i = 0; i < this.helper.rand.Next(1, 4); i++)
18 | this.helper.AddFlower(this.helper.ApplyJitter(this.helper.GetOffset(1), 10), this.helper.ApplyJitter(this.helper.GetExplosionMotion(), 0.1f), location);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/FloweryTools/Framework/Creators/Slingshot.cs:
--------------------------------------------------------------------------------
1 | using FloweryTools.Framework.Flowerers;
2 | using FloweryTools.ParticleCreator;
3 | using Microsoft.Xna.Framework;
4 | using StardewValley;
5 |
6 | namespace FloweryTools.Framework.Creators
7 | {
8 | // Used when slingshots fire
9 | class Slingshot : BaseCreator, IParticleCreator
10 | {
11 | public Slingshot(FlowerHelper helper) : base(helper)
12 | {
13 |
14 | }
15 |
16 | public void CreateParticles(GameLocation location, int frameIndex)
17 | {
18 | if (!(Game1.player.CurrentTool is StardewValley.Tools.Slingshot slingshot) || slingshot.attachments.Length == 0 || slingshot.attachments[0] == null || slingshot.attachments[0].Stack <= 0 || slingshot.mouseDragAmount <= 4)
19 | return;
20 |
21 | int times = this.helper.rand.Next(1, 3);
22 | for (int i = 0; i < times; i++)
23 | {
24 | this.helper.AddFlower(this.helper.ApplyJitter(this.helper.GetOffset(1), 10), this.helper.ApplyJitter(this.GetMotion(Game1.player, slingshot), 0.1f), location);
25 | }
26 | }
27 |
28 | // Loosly taken from Slingshot. It's not perfect but it's close enough, and simple to read.
29 | private Vector2 GetMotion(Farmer farmer, StardewValley.Tools.Slingshot slingshot)
30 | {
31 | Vector2 motion = Utility.getVelocityTowardPoint(new Vector2((float)slingshot.aimPos.X, (float)slingshot.aimPos.Y), new Vector2(Game1.player.getStandingX(), Game1.player.getStandingY() + 32), 256f);
32 | motion.Normalize();
33 | motion *= 0.3f;
34 |
35 | return motion;
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/FloweryTools/Framework/Flower.cs:
--------------------------------------------------------------------------------
1 | namespace FloweryTools
2 | {
3 | internal enum Flower
4 | {
5 | Tulip,
6 | SummerSpangle,
7 | FairyRose,
8 | BlueJazz,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/FloweryTools/Framework/Flowerers/Defense.cs:
--------------------------------------------------------------------------------
1 | using FloweryTools.ParticleCreator;
2 | using StardewValley;
3 | using System;
4 | using System.Collections.Generic;
5 |
6 | namespace FloweryTools.Framework.Flowerers
7 | {
8 | // Used by the sword special
9 | internal class Defense : BaseCreator, IToolFlowerer
10 | {
11 | public Defense(FlowerHelper helper) : base(helper)
12 | {
13 |
14 | }
15 |
16 | public void CreateParticles(GameLocation location, int frameIndex)
17 | {
18 | for (int i = 0; i < 4; i++)
19 | {
20 | this.helper.AddFlower(this.helper.ApplyJitter(this.helper.GetOffset(i), 10), this.helper.ApplyJitter(this.helper.GetDefaultMotion(), 0.1f), location);
21 | }
22 | }
23 |
24 | public bool Matches(float timer, IList frames)
25 | {
26 | //FarmerSprite: cases 252, 243, and 234 (259 is identical to 243 but flipped)
27 | //One frame passes between the game starting the animation and the animation animating
28 | return this.helper.MatchHelper(timer, 1, frames, new List> { new Tuple(40, -1) }) ||
29 | this.helper.MatchHelper(timer, 1, frames, new List> { new Tuple(34, -1) }) ||
30 | this.helper.MatchHelper(timer, 1, frames, new List> { new Tuple(28, -1) });
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/FloweryTools/Framework/Flowerers/Stab.cs:
--------------------------------------------------------------------------------
1 | using FloweryTools.ParticleCreator;
2 | using StardewValley;
3 | using System;
4 | using System.Collections.Generic;
5 |
6 | namespace FloweryTools.Framework.Flowerers
7 | {
8 | // Used by daggers
9 | internal class Stab : BaseCreator, IToolFlowerer
10 | {
11 | public Stab(FlowerHelper helper) : base(helper)
12 | {
13 |
14 | }
15 |
16 | public void CreateParticles(GameLocation location, int frameIndex)
17 | {
18 | if (frameIndex == 1)
19 | {
20 | int times = this.helper.rand.Next(1, 3);
21 | for (int i = 0; i < times; i++)
22 | {
23 | this.helper.AddFlower(this.helper.ApplyJitter(this.helper.GetOffset(1), 10), this.helper.ApplyJitter(this.helper.GetDefaultMotion(), 0.1f), location);
24 | }
25 | }
26 | }
27 |
28 | public bool Matches(float timer, IList frames)
29 | {
30 | //FarmerSprite: cases 276, 274, and 272 (278 is identical to 274 but flipped)
31 | return this.helper.MatchHelper(timer, 0, frames, new List> { new Tuple(40, -1), new Tuple(38, -1), new Tuple(38, 0) }) ||
32 | this.helper.MatchHelper(timer, 0, frames, new List> { new Tuple(34, -1), new Tuple(33, -1), new Tuple(33, 0) }) ||
33 | this.helper.MatchHelper(timer, 0, frames, new List> { new Tuple(25, -1), new Tuple(27, -1), new Tuple(27, 0) });
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/FloweryTools/Framework/IFrameMatcher.cs:
--------------------------------------------------------------------------------
1 | using StardewValley;
2 | using System.Collections.Generic;
3 |
4 | namespace FloweryTools.ParticleCreator
5 | {
6 | internal interface IFrameMatcher
7 | {
8 | bool Matches(float timer, IList frames);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/FloweryTools/Framework/IParticleCreator.cs:
--------------------------------------------------------------------------------
1 | using StardewValley;
2 |
3 | namespace FloweryTools.ParticleCreator
4 | {
5 | internal interface IParticleCreator
6 | {
7 | void CreateParticles(GameLocation location, int frameIndex);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/FloweryTools/Framework/IToolFlowerer.cs:
--------------------------------------------------------------------------------
1 | namespace FloweryTools.ParticleCreator
2 | {
3 | internal interface IToolFlowerer : IFrameMatcher, IParticleCreator
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/FloweryTools/ModConfig.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace FloweryTools
8 | {
9 | public class ModConfig
10 | {
11 | public bool LocalOnly { get; set; } = false;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/FloweryTools/README.md:
--------------------------------------------------------------------------------
1 | # Flowery Tools
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/6203) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | For most of the tools the mod inspects the animation frames the player is currently going through. Certain sets of frames correspond uniquely to certain animations, so based on the frames being shown different flower patterns are added.
9 |
10 | Some tool actions don't work through animations (e.g. tools charging, the bobber landing, slingshots firing) so these are special-cased to add flowers for.
--------------------------------------------------------------------------------
/FloweryTools/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Flowery Tools",
3 | "Author": "Cat",
4 | "Version": "1.0.0",
5 | "Description": "Makes all your tools have flowery particle effects.",
6 | "UniqueID": "cat.flowerytools",
7 | "EntryDll": "FloweryTools.dll",
8 | "MinimumApiVersion": "3.5.0",
9 | "UpdateKeys": ["Nexus:6203"]
10 | }
--------------------------------------------------------------------------------
/GeodeInfoMenu/GeodeInfoMenu.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.5.1
4 | net452
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/GeodeInfoMenu/Geodes/GeodeType.cs:
--------------------------------------------------------------------------------
1 | namespace GeodeInfoMenu
2 | {
3 | /// Represents the types of geodes in the game.
4 | internal enum GeodeType
5 | {
6 | Normal,
7 | FrozenGeode,
8 | MagmaGeode,
9 | OmniGeode,
10 | ArtifactTrove
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/GeodeInfoMenu/Geodes/HardCodedGeodeDrop.cs:
--------------------------------------------------------------------------------
1 | namespace GeodeInfoMenu
2 | {
3 | /// Represents a geode drop that is not contained in the XNB files but is only contained in the game source code.
4 | public enum HardCodedGeodeDrop
5 | {
6 | Stone,
7 | Clay,
8 | EarthCrystal,
9 | FrozenTear,
10 | FireQuartz,
11 | Coal,
12 | CopperOre,
13 | IronOre,
14 | GoldOre,
15 | IridiumOre,
16 | PrismaticShard
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/GeodeInfoMenu/Menus/GeodeMenuStateInfo.cs:
--------------------------------------------------------------------------------
1 | namespace GeodeInfoMenu.Menus
2 | {
3 | /// Represents the state of the geode menu.
4 | internal class GeodeMenuStateInfo
5 | {
6 | /***
7 | * Public Fields
8 | ***/
9 |
10 | /// The search text in the search box.
11 | public string searchText;
12 |
13 | /// The tab that is currently open.
14 | public int currentTab;
15 |
16 | /// The index of each scroll bar for each tab.
17 | public int[] scrollBarIndicies;
18 |
19 | /***
20 | * Public Methods
21 | ***/
22 |
23 | /// Construct an instance.
24 | /// Search box text
25 | /// Current open tab
26 | /// Scroll bar locations
27 | public GeodeMenuStateInfo(string text, int currentTab, int[] indicies)
28 | {
29 | this.currentTab = currentTab;
30 | this.searchText = text;
31 | this.scrollBarIndicies = indicies;
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/GeodeInfoMenu/Menus/IScrollableMenu.cs:
--------------------------------------------------------------------------------
1 | namespace GeodeInfoMenu.Menus
2 | {
3 | /// Represents a menu that has a scrollbar.
4 | internal interface IScrollableMenu
5 | {
6 | /// Set the current scrollbar index
7 | /// Which index to use
8 | void SetCurrentIndex(int index);
9 |
10 | /// Get the current scrollbar index
11 | /// The index of the scrollbar
12 | int GetCurrentIndex();
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/GeodeInfoMenu/ModConfig.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 |
3 | namespace GeodeInfoMenu
4 | {
5 | /// Configuration for the mod.
6 | public class ModConfig
7 | {
8 | /// Key that opens up the menu.
9 | public SButton ActivationKey { get; set; } = SButton.K;
10 |
11 | /// Number of geodes to show in the info menu.
12 | public int NumberOfNextGeodeDropsToShow { get; set; } = 20;
13 |
14 | /// Whether to show stars next to undonated items.
15 | public bool ShowStarsNextToMineralsAndArtifactsNotDonatedToTheMuseum { get; set; } = true;
16 |
17 | /// Whether to remember the menu state between openings.
18 | public bool RememberMenuStateAfterClose { get; set; } = true;
19 |
20 | /// Whether to remember the scrollbar positions if remembering the menu state.
21 | public bool IfRememberingMenuStateAlsoRememberScrollBarPositions { get; set; } = true;
22 |
23 | /// Whether a right click needs to be on the search box in order to clear its text.
24 | public bool RightClickOnOnlySearchBoxToClearText { get; set; } = false;
25 |
26 | /// Whether escape instantly closes the menu rather than unselecting the search box.
27 | public bool PressingEscapeWhileTypingInSearchBoxInstantlyClosesMenu { get; set; } = true;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/GeodeInfoMenu/README.md:
--------------------------------------------------------------------------------
1 | # Geode Info Menu
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/1448?) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | Geode drops are predetermined, so the mod displays that info with other useful features like search and missing artifacts, in a custom created window.
--------------------------------------------------------------------------------
/GeodeInfoMenu/README.txt:
--------------------------------------------------------------------------------
1 | Explanation of each option:
2 |
3 | ActivationKey: The key to press to open the menu. (default "K")
4 | NumberOfNextGeodeDropsToShow: The number of items to show in the geode tabs. (default 20)
5 | ShowStarsNextToMineralsAndArtifactsNotDonatedToTheMuseum: If set to true, there will be a star next to each artifact or mineral you haven't donated to the museum yet. (default true)
6 |
7 | Note: I recommend you leave these as they are, unless how the menu works annoys you.
8 |
9 | RememberMenuStateAfterClose: If this is true, after you close the menu and then re-open it, it will save your entered text in the search box, which tab you had open, and how far you scrolled in each page. (default true)
10 | IfRememberingMenuStateAlsoRememberScrollBarPositions: If the above option is true, then if this is set to false the menu will NOT remember how far you scrolled down each page. (default true)
11 | RightClickOnOnlySearchBoxToClearText: If set to true, then only right clicking on the search box will clear the text. If it is false, you can right click anywhere to clear the text. (default false)
12 | PressingEscapeWhileTypingInSearchBoxInstantlyClosesMenu: If set to false, escape first unselects the search box if it was selected. If set to true the box instantly closes even if the search box was selected. (default true)
13 |
--------------------------------------------------------------------------------
/GeodeInfoMenu/Sprites/tabs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dphill10827/UnofficialModUpdateMenu/b27ee0f12e66165156d9ab9de2439fd5718c2b30/GeodeInfoMenu/Sprites/tabs.png
--------------------------------------------------------------------------------
/GeodeInfoMenu/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Geode Info Menu",
3 | "Author": "Cat",
4 | "Version": "1.5.2",
5 | "Description": "Press the activation key to open up a menu with information about future geode openings!",
6 | "UniqueID": "cat.geodeinfomenu",
7 | "EntryDll": "GeodeInfoMenu.dll",
8 | "MinimumApiVersion": "3.0.0",
9 | "UpdateKeys": [ "Nexus:1448" ]
10 | }
11 |
--------------------------------------------------------------------------------
/GiantCropRing/GiantCropRing.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.4.0
4 | net452
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/GiantCropRing/ModConfig.cs:
--------------------------------------------------------------------------------
1 | namespace GiantCropRing
2 | {
3 | internal class ModConfig
4 | {
5 | public double cropChancePercentWithRing { get; set; } = 0.05;
6 | public bool shouldWearingBothRingsDoublePercentage { get; set; } = true;
7 | public double percentOfDayNeededToWearRingToTriggerEffect { get; set; } = 0.5;
8 |
9 | public int cropRingPrice { get; set; } = 5000;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/GiantCropRing/README.md:
--------------------------------------------------------------------------------
1 | # Giant Crop ring
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/1182?) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod adds a new ring item, using CustomElementHandler to handle custom items, and then performs a check every night if you have the ring equipped. If that passes, it simulates the game's giant crop growth code.
--------------------------------------------------------------------------------
/GiantCropRing/assets/ring.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dphill10827/UnofficialModUpdateMenu/b27ee0f12e66165156d9ab9de2439fd5718c2b30/GiantCropRing/assets/ring.png
--------------------------------------------------------------------------------
/GiantCropRing/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Giant Crop Ring",
3 | "Author": "Cat",
4 | "Version": "1.4.1",
5 | "Description": "Adds a ring which increases the chance of getting giant crops.",
6 | "UniqueID": "cat.giantcropring",
7 | "EntryDll": "GiantCropRing.dll",
8 | "MinimumApiVersion": "2.9.0",
9 | "UpdateKeys": [ "Nexus:1182" ],
10 | "Dependencies": [
11 | {
12 | "UniqueID": "Platonymous.Toolkit",
13 | "MinimumVersion": "1.12.15"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/HatsOnCats/Framework/AnimatedSpriteExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using StardewValley;
7 |
8 | namespace HatsOnCats.Framework
9 | {
10 | internal static class AnimatedSpriteExtensions
11 | {
12 | public static string UniqueName(this AnimatedSprite sprite)
13 | {
14 | return sprite.textureName.Value.Split('\\').Last().ToLower();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/HatsOnCats/Framework/Configuration/IConfigurable.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using HatsOnCats.Framework.Interfaces;
3 | using Microsoft.Xna.Framework;
4 |
5 | namespace HatsOnCats.Framework.Configuration
6 | {
7 | internal interface IConfigurable : INamed
8 | {
9 | IDictionary Configuration { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/HatsOnCats/Framework/Configuration/Offset.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using Newtonsoft.Json;
3 |
4 | namespace HatsOnCats.Framework.Configuration
5 | {
6 | [JsonConverter(typeof(OffsetConverter))]
7 | internal struct Offset
8 | {
9 | public Vector2 Value { get; }
10 | public OffsetReference Reference { get; }
11 | public bool IsReference { get; }
12 |
13 | public Offset(Vector2 value) : this(value, OffsetReference.Zero, false)
14 | {
15 | }
16 |
17 | public Offset(OffsetReference reference) : this(Vector2.Zero, reference, true)
18 | {
19 | }
20 |
21 | private Offset(Vector2 value, OffsetReference reference, bool isReference)
22 | {
23 | this.Value = value;
24 | this.Reference = reference;
25 | this.IsReference = isReference;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/HatsOnCats/Framework/Configuration/OffsetConverter.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using Newtonsoft.Json;
3 | using System;
4 |
5 | namespace HatsOnCats.Framework.Configuration
6 | {
7 | internal class OffsetConverter : JsonConverter
8 | {
9 | public override void WriteJson(JsonWriter writer, Offset value, JsonSerializer serializer)
10 | {
11 | serializer.Serialize(writer, value.IsReference ? value.Reference : (object)value.Value);
12 | }
13 |
14 | public override Offset ReadJson(JsonReader reader, Type objectType, Offset existingValue, bool hasExistingValue, JsonSerializer serializer)
15 | {
16 | try
17 | {
18 | OffsetReference value = serializer.Deserialize(reader);
19 | return new Offset(value);
20 | }
21 | catch
22 | {
23 | try
24 | {
25 | Vector2 value = serializer.Deserialize(reader);
26 | return new Offset(value);
27 | }
28 | catch (JsonSerializationException exception)
29 | {
30 | throw new JsonReaderException($"Error converting value \"{reader.Value}\" to one of type '{typeof(Vector2)}' or '{typeof(OffsetReference)}'. Path '{exception.Path}', line {exception.LineNumber}, position {exception.LinePosition}.");
31 | }
32 | }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/HatsOnCats/Framework/Configuration/OffsetReference.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Microsoft.Xna.Framework;
7 | using Newtonsoft.Json;
8 |
9 | namespace HatsOnCats.Framework.Configuration
10 | {
11 | [JsonConverter(typeof(OffsetReferenceConverter))]
12 | internal struct OffsetReference
13 | {
14 | public Frame Frame { get; }
15 |
16 | public OffsetReference(Frame frame)
17 | {
18 | this.Frame = frame;
19 | }
20 |
21 | public static OffsetReference Zero = new OffsetReference(Frame.Zero);
22 |
23 | public override string ToString()
24 | {
25 | return $"!{this.Frame.ToString()}";
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/HatsOnCats/Framework/Configuration/OffsetReferenceConverter.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using Newtonsoft.Json;
3 | using System;
4 | using System.IO;
5 | using Newtonsoft.Json.Linq;
6 |
7 | namespace HatsOnCats.Framework.Configuration
8 | {
9 | internal class OffsetReferenceConverter : JsonConverter
10 | {
11 | public override void WriteJson(JsonWriter writer, OffsetReference value, JsonSerializer serializer)
12 | {
13 | writer.WriteValue(value.ToString());
14 | }
15 |
16 | public override OffsetReference ReadJson(JsonReader reader, Type objectType, OffsetReference existingValue, bool hasExistingValue, JsonSerializer serializer)
17 | {
18 | if (!(reader.Value is string value))
19 | {
20 | throw new JsonSerializationException($"Invalid value for config reference: {reader.Value}.");
21 | }
22 |
23 | value = value.Trim();
24 |
25 | if (value[0] != '!')
26 | {
27 | throw new JsonSerializationException("Config reference must start with a '!'.");
28 | }
29 |
30 | return new OffsetReference(new JValue(value.Substring(1)).ToObject());
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/HatsOnCats/Framework/FromStringConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.Globalization;
4 | using System.Reflection;
5 |
6 | namespace HatsOnCats.Framework
7 | {
8 | internal class FromStringConverter : TypeConverter
9 | {
10 | public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
11 | {
12 | return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
13 | }
14 |
15 | public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
16 | {
17 | return destinationType == typeof(T) || base.CanConvertTo(context, destinationType);
18 | }
19 |
20 | public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
21 | {
22 | if (value is string)
23 | {
24 | return typeof(T).GetMethod("FromString", BindingFlags.Static | BindingFlags.Public).Invoke(typeof(T), new []{value});
25 | }
26 | return base.ConvertFrom(context, culture, value);
27 | }
28 |
29 | public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
30 | {
31 | if (destinationType == typeof(string))
32 | {
33 | return value.ToString();
34 | }
35 | return base.ConvertTo(context, culture, value, destinationType);
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/HatsOnCats/Framework/Interfaces/IHatDrawer.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using Microsoft.Xna.Framework.Graphics;
3 | using StardewValley.Objects;
4 | using System.Collections.Generic;
5 | using StardewValley;
6 |
7 | namespace HatsOnCats.Framework.Interfaces
8 | {
9 | internal interface IHatDrawer
10 | {
11 | void DrawHats(IEnumerable hats, int facingDirection, SpriteBatch spriteBatch, Vector2 position, Vector2 origin, float rotation, float layerDepth);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/HatsOnCats/Framework/Interfaces/IHatStorageProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using StardewModdingAPI;
4 | using StardewValley;
5 | using StardewValley.Objects;
6 |
7 | namespace HatsOnCats.Framework.Interfaces
8 | {
9 | internal interface IHatStorageProvider
10 | {
11 | bool AddHat(Character character, Hat hat);
12 | bool RemoveHat(Character character, out Hat hat);
13 | bool HasHat(Character character);
14 | bool GetHats(Character character, out IEnumerable hats);
15 | bool CanHandle(Character character);
16 | void Serialize(IDataHelper helper);
17 | void Deserialize(IDataHelper helper);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/HatsOnCats/Framework/Interfaces/INamed.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace HatsOnCats.Framework.Interfaces
8 | {
9 | internal interface INamed
10 | {
11 | string Name { get; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/HatsOnCats/Framework/ModConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using HatsOnCats.Framework.Configuration;
3 | using Microsoft.Xna.Framework;
4 |
5 | namespace HatsOnCats.Framework
6 | {
7 | internal class ModConfig
8 | {
9 | public IDictionary> Offsets { get; set; } = new Dictionary>();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/HatsOnCats/Framework/Offsets/AggregateOffsetProvider.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Microsoft.Xna.Framework;
3 | using Microsoft.Xna.Framework.Graphics;
4 | using StardewValley;
5 |
6 | namespace HatsOnCats.Framework.Offsets
7 | {
8 | internal class AggregateOffsetProvider
9 | {
10 | private readonly IEnumerable offsetProviders;
11 |
12 | public AggregateOffsetProvider(IEnumerable offsetProviders)
13 | {
14 | this.offsetProviders = offsetProviders;
15 | }
16 |
17 |
18 | public string Name => null;
19 |
20 | public bool GetOffset(string spriteName, Rectangle sourceRectangle, SpriteEffects effects, out Vector2 offset)
21 | {
22 | foreach (IOffsetProvider provider in this.offsetProviders)
23 | {
24 | if (provider.CanHandle(spriteName))
25 | {
26 | return provider.GetOffset(sourceRectangle, effects, out offset);
27 | }
28 | }
29 |
30 | offset = Vector2.Zero;
31 | return false;
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/HatsOnCats/Framework/Offsets/IOffsetProvider.cs:
--------------------------------------------------------------------------------
1 | using HatsOnCats.Framework.Interfaces;
2 | using Microsoft.Xna.Framework;
3 | using Microsoft.Xna.Framework.Graphics;
4 | using StardewValley;
5 |
6 | namespace HatsOnCats.Framework.Offsets
7 | {
8 | internal interface IOffsetProvider : INamed
9 | {
10 | bool GetOffset(Rectangle sourceRectangle, SpriteEffects effects, out Vector2 offset);
11 | bool CanHandle(string spriteName);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/HatsOnCats/Framework/Storage/SaveItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using Microsoft.Xna.Framework;
8 | using Newtonsoft.Json;
9 |
10 | namespace HatsOnCats.Framework.Storage
11 | {
12 | [TypeConverter(typeof(FromStringConverter))]
13 | internal struct SaveItem
14 | {
15 | public string Location { get; set; }
16 | public string Name { get; set; }
17 | public Vector2 Position { get; set; }
18 | public string Type { get; set; }
19 |
20 | public SaveItem(string location, string type, string name, Vector2 position)
21 | {
22 | this.Location = location;
23 | this.Type = type;
24 | this.Name = name;
25 | this.Position = position;
26 | }
27 |
28 | public override string ToString()
29 | {
30 | return $"{this.Location}, {this.Type}, {this.Name}, {this.Position.X}, {this.Position.Y}";
31 | }
32 |
33 | public static SaveItem FromString(string str)
34 | {
35 | string[] parts = str.Split(',');
36 |
37 | return new SaveItem(parts[0].Trim(), parts[1].Trim(), parts[2].Trim(), new Vector2(float.Parse(parts[3].Trim()), float.Parse(parts[4].Trim())));
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/HatsOnCats/HatsOnCats.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.3.0
4 | net452
5 |
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/HatsOnCats/README.md:
--------------------------------------------------------------------------------
1 | # Hats On Cats
2 |
3 |
4 | This is mod is unreleased because it's not finished.
5 |
6 | ## How it works
7 |
8 | The mod intercepts calls to `SpriteBatch.Draw`, determines which frame of a sprite of an NPC/animal/monster/etc is being drawn, and overlays a hat onto the thing's head. Unreleased because each frame of every sprite requires configuration of where to put the hat because the head position changes. This is a ton of work and I only ever completed it for Penny. The framework is ready to use though - just missing configuration.
--------------------------------------------------------------------------------
/HatsOnCats/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Hats on Cats",
3 | "Author": "Cat",
4 | "Version": "1.0.0",
5 | "Description": "Lets you put hats on cats, dogs, all farm animals, NPCs, junimos, monsters, etc.",
6 | "UniqueID": "cat.hatsoncats",
7 | "EntryDll": "HatsOnCats.dll",
8 | "MinimumApiVersion": "3.0.0-beta",
9 | "UpdateKeys": [ ]
10 | }
11 |
--------------------------------------------------------------------------------
/HatsOnCats/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/HoldToBreakGeodes/HoldToBreakGeodes.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.3.0
4 | net452
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/HoldToBreakGeodes/README.md:
--------------------------------------------------------------------------------
1 | # Hold To Break Geodes
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/1689?) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod resends left click events to the geode breaking window every certain period of time if you hold down the mouse button.
--------------------------------------------------------------------------------
/HoldToBreakGeodes/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Hold To Break Geodes",
3 | "Author": "Cat",
4 | "Version": "1.3.1",
5 | "Description": "Hold left click/ to continuously break geodes.",
6 | "UniqueID": "cat.holdtobreakgeodes",
7 | "EntryDll": "HoldToBreakGeodes.dll",
8 | "MinimumApiVersion": "3.0.0",
9 | "UpdateKeys": [ "Nexus:1689" ]
10 | }
11 |
--------------------------------------------------------------------------------
/NoCrows/AddCrowsPatch.cs:
--------------------------------------------------------------------------------
1 | using Harmony;
2 | using StardewValley;
3 | using System.Diagnostics.CodeAnalysis;
4 | using System.Reflection;
5 |
6 | namespace NoCrows
7 | {
8 | /// Patches the farm crows method to do nothing.
9 | [HarmonyPatch]
10 | internal class AddCrowsPatch
11 | {
12 | /// Gets the method to patch.
13 | /// The method to patch.
14 | [SuppressMessage("ReSharper", "UnusedMember.Local", Justification = "Method names are defined by Harmony.")]
15 | private static MethodBase TargetMethod()
16 | {
17 | return typeof(Farm).GetMethod(nameof(Farm.addCrows));
18 | }
19 |
20 | /// The method to run before the original method.
21 | /// Whether to run the original method or not.
22 | [SuppressMessage("ReSharper", "UnusedMember.Local", Justification = "Method names are defined by Harmony.")]
23 | private static bool Prefix()
24 | {
25 | return false;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/NoCrows/ModEntry.cs:
--------------------------------------------------------------------------------
1 | using Harmony;
2 | using StardewModdingAPI;
3 | using System.Reflection;
4 |
5 | namespace NoCrows
6 | {
7 | /// The mod entry point.
8 | public class ModEntry : Mod
9 | {
10 | /*********
11 | ** Public methods
12 | *********/
13 |
14 | /// The mod entry point, called after the mod is first loaded.
15 | /// Provides simplified APIs for writing mods.
16 | public override void Entry(IModHelper helper)
17 | {
18 | HarmonyInstance harmony = HarmonyInstance.Create(this.Helper.DirectoryPath);
19 | harmony.PatchAll(Assembly.GetExecutingAssembly());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/NoCrows/NoCrows.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 2.0.0
4 | net452
5 |
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/NoCrows/README.md:
--------------------------------------------------------------------------------
1 | # No Crows
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/1682?) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod uses Harmony to make the method which adds crows to the farm do nothing.
--------------------------------------------------------------------------------
/NoCrows/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "No Crows",
3 | "Author": "Cat",
4 | "Version": "2.0.1",
5 | "Description": "Crows will never eat your crops.",
6 | "UniqueID": "cat.nocrows",
7 | "EntryDll": "NoCrows.dll",
8 | "MinimumApiVersion": "2.9.0",
9 | "UpdateKeys": [ "Nexus:1682" ]
10 | }
11 |
--------------------------------------------------------------------------------
/NoFenceDecay/NoFenceDecay.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.5.0
4 | net452
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/NoFenceDecay/README.md:
--------------------------------------------------------------------------------
1 | # No Fence Decay
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/1180?) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod repairs fences to full health every day.
--------------------------------------------------------------------------------
/NoFenceDecay/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "No Fence Decay",
3 | "Author": "Cat",
4 | "Version": "1.5.1",
5 | "Description": "Makes all fences and gates last forever.",
6 | "UniqueID": "cat.nofencedecay",
7 | "EntryDll": "NoFenceDecay.dll",
8 | "MinimumApiVersion": "2.9.0",
9 | "UpdateKeys": [ "Nexus:1180" ]
10 | }
11 |
--------------------------------------------------------------------------------
/Pong/Framework/Common/AssetManager.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework.Graphics;
2 | using StardewModdingAPI;
3 |
4 | namespace Pong.Framework.Common
5 | {
6 | internal static class AssetManager
7 | {
8 | public static Texture2D SquareTexture;
9 | public static Texture2D CircleTexture;
10 |
11 | public static bool Init(IModHelper helper)
12 | {
13 | try
14 | {
15 | SquareTexture = helper.Content.Load("assets/square.png");
16 | CircleTexture = helper.Content.Load("assets/circle.png");
17 |
18 | return true;
19 | }
20 | catch
21 | {
22 | return false;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Pong/Framework/Common/IDrawable.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework.Graphics;
2 |
3 | namespace Pong.Framework.Common
4 | {
5 | internal interface IDrawable
6 | {
7 | void Draw(SpriteBatch b);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Pong/Framework/Common/IUpdateable.cs:
--------------------------------------------------------------------------------
1 | namespace Pong.Framework.Common
2 | {
3 | internal interface IUpdateable
4 | {
5 | void Update();
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/Pong/Framework/Common/SoundManager.cs:
--------------------------------------------------------------------------------
1 | using StardewValley;
2 |
3 | namespace Pong.Framework.Common
4 | {
5 | internal static class SoundManager
6 | {
7 | public static void PlayBallWallSound()
8 | {
9 | Game1.playSound("smallSelect");
10 | }
11 |
12 | public static void PlayBallPaddleSound()
13 | {
14 | Game1.playSound("smallSelect");
15 | }
16 |
17 | public static void PlayPointWonSound(bool playerWon)
18 | {
19 | Game1.playSound(playerWon ? "achievement" : "trashcan");
20 | }
21 |
22 | public static void PlayCountdownSound()
23 | {
24 | Game1.playSound("throwDownITem");
25 | }
26 |
27 | public static void PlayKeyPressSound()
28 | {
29 | Game1.playSound("bigDeSelect");
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Pong/Framework/Enums/ModalButtonType.cs:
--------------------------------------------------------------------------------
1 | namespace Pong.Framework.Enums
2 | {
3 | internal enum ModalButtonType
4 | {
5 | YesNo,
6 | Confirmation
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Pong/Framework/Enums/MultiplayerConnectionState.cs:
--------------------------------------------------------------------------------
1 | namespace Pong.Framework.Enums
2 | {
3 | internal enum MultiplayerConnectionState
4 | {
5 | InPlayerLobby,
6 |
7 | AwaitingChallengeRequestReponse,
8 | ReceivedChallengeRequest,
9 |
10 | InGame
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Pong/Framework/Enums/Orientation.cs:
--------------------------------------------------------------------------------
1 | namespace Pong.Framework.Enums
2 | {
3 | internal enum Orientation
4 | {
5 | Horizontal,
6 | Vertical
7 | };
8 | }
9 |
--------------------------------------------------------------------------------
/Pong/Framework/Enums/Side.cs:
--------------------------------------------------------------------------------
1 | namespace Pong.Framework.Enums
2 | {
3 | internal enum Side
4 | {
5 | Left,
6 | Top,
7 | Right,
8 | Bottom
9 | };
10 | }
11 |
--------------------------------------------------------------------------------
/Pong/Framework/Extensions/IDrawableExtensions.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using Microsoft.Xna.Framework.Graphics;
3 | using Pong.Framework.Common;
4 | using Pong.Framework.Menus.Elements;
5 |
6 | namespace Pong.Framework.Extensions
7 | {
8 | internal static class IDrawableExtensions
9 | {
10 | public static void DrawBorder(this IBoundable boundable, SpriteBatch b)
11 | {
12 | b.Draw(AssetManager.SquareTexture, new Rectangle(boundable.Bounds.X - StaticTextElement.HighlightWidth, boundable.Bounds.Y - StaticTextElement.HighlightWidth, StaticTextElement.HighlightWidth / 2, boundable.Bounds.Height + StaticTextElement.HighlightWidth), Color.White);
13 | b.Draw(AssetManager.SquareTexture, new Rectangle(boundable.Bounds.X - StaticTextElement.HighlightWidth, boundable.Bounds.Y - StaticTextElement.HighlightWidth, boundable.Bounds.Width + StaticTextElement.HighlightWidth, StaticTextElement.HighlightWidth / 2), Color.White);
14 | b.Draw(AssetManager.SquareTexture, new Rectangle(boundable.Bounds.X + boundable.Bounds.Width, boundable.Bounds.Y - StaticTextElement.HighlightWidth, StaticTextElement.HighlightWidth / 2, boundable.Bounds.Height + StaticTextElement.HighlightWidth), Color.White);
15 | b.Draw(AssetManager.SquareTexture, new Rectangle(boundable.Bounds.X - StaticTextElement.HighlightWidth, boundable.Bounds.Y + boundable.Bounds.Height, boundable.Bounds.Width + (int)(StaticTextElement.HighlightWidth * 1.5), StaticTextElement.HighlightWidth / 2), Color.White);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Pong/Framework/Game/IDrawableCollideable.cs:
--------------------------------------------------------------------------------
1 | using Pong.Framework.Menus.Elements;
2 | using IDrawable = Pong.Framework.Common.IDrawable;
3 | using IUpdateable = Pong.Framework.Common.IUpdateable;
4 |
5 | namespace Pong.Framework.Game
6 | {
7 | internal interface IDrawableCollideable : IUpdateable, IDrawable, IBoundable
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Pong/Framework/Game/INonReactiveDrawableCollideable.cs:
--------------------------------------------------------------------------------
1 | using Pong.Game;
2 |
3 | namespace Pong.Framework.Game
4 | {
5 | internal interface INonReactiveDrawableCollideable : IDrawableCollideable
6 | {
7 | CollideInfo GetCollideInfo(IReactiveDrawableCollideable other);
8 |
9 | void Resize();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Pong/Framework/Game/IReactiveDrawableCollideable.cs:
--------------------------------------------------------------------------------
1 | namespace Pong.Framework.Game
2 | {
3 | internal interface IReactiveDrawableCollideable : IDrawableCollideable
4 | {
5 | void CollideWith(INonReactiveDrawableCollideable other);
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/Pong/Framework/Game/IResetable.cs:
--------------------------------------------------------------------------------
1 | namespace Pong.Framework.Game
2 | {
3 | internal interface IResetable
4 | {
5 | void Reset();
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/Pong/Framework/Game/IState.cs:
--------------------------------------------------------------------------------
1 | namespace Pong.Framework.Game
2 | {
3 | internal interface IState : IResetable
4 | {
5 | void SetState(T state);
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/Pong/Framework/Game/States/ScoreState.cs:
--------------------------------------------------------------------------------
1 | namespace Pong.Framework.Game.States
2 | {
3 | internal class ScoreState : IState
4 | {
5 | public int PlayerOneScore { get; set; }
6 | public int PlayerTwoScore { get; set; }
7 |
8 | public ScoreState()
9 | {
10 | this.Reset();
11 | }
12 |
13 | public void Reset()
14 | {
15 | this.PlayerOneScore = this.PlayerTwoScore = 0;
16 | }
17 |
18 | public void SetState(ScoreState state)
19 | {
20 | this.PlayerTwoScore = state.PlayerTwoScore;
21 | this.PlayerTwoScore = state.PlayerTwoScore;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Pong/Framework/Game/States/VelocityState.cs:
--------------------------------------------------------------------------------
1 | namespace Pong.Framework.Game.States
2 | {
3 | internal class VelocityState : IState
4 | {
5 | public int XVelocity { get; set; } = -4;
6 | public int YVelocity { get; set; } = -8;
7 |
8 | public VelocityState()
9 | {
10 | this.Reset();
11 | }
12 |
13 | public void Reset()
14 | {
15 | this.XVelocity = -4;
16 | this.YVelocity = 8;
17 | }
18 |
19 | public void SetState(VelocityState state)
20 | {
21 | this.XVelocity = state.XVelocity;
22 | this.YVelocity = state.YVelocity;
23 | }
24 |
25 | public void Invert()
26 | {
27 | this.XVelocity *= -1;
28 | this.YVelocity *= -1;
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Pong/Framework/Menus/Elements/ConditionalElement.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework.Graphics;
2 | using Pong.Framework.Common;
3 |
4 | namespace Pong.Framework.Menus.Elements
5 | {
6 | internal class ConditionalElement : IDrawable
7 | {
8 | private readonly IDrawable element;
9 | private readonly DrawCondition condition;
10 |
11 | public ConditionalElement(IDrawable element, DrawCondition condition)
12 | {
13 | this.element = element;
14 | this.condition = condition;
15 | }
16 |
17 | public IDrawable GetElementForHighlight()
18 | {
19 | return this.condition() ? this.element : null;
20 | }
21 |
22 | public void Draw(SpriteBatch b)
23 | {
24 | if (this.condition())
25 | this.element.Draw(b);
26 | }
27 |
28 | public delegate bool DrawCondition();
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Pong/Framework/Menus/Elements/DynamicTextElement.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework.Graphics;
2 | using StardewValley.BellsAndWhistles;
3 |
4 | namespace Pong.Framework.Menus.Elements
5 | {
6 | internal class DynamicTextElement : StaticTextElement
7 | {
8 | private readonly TextFunc getText;
9 |
10 | public DynamicTextElement(TextFunc getText, int x, int y, bool centered = false, bool neverHighlight = false, ClickFunc onClick = null, int color = SpriteText.color_White) : base("", x, y, centered, neverHighlight, onClick, color)
11 | {
12 | this.getText = getText;
13 | }
14 |
15 | public override void Draw(SpriteBatch b)
16 | {
17 | this.Text = this.getText();
18 | base.Draw(b);
19 | }
20 |
21 | public delegate string TextFunc();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Pong/Framework/Menus/Elements/ElementContainer.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework.Graphics;
2 | using Pong.Framework.Common;
3 | using System.Collections.Generic;
4 |
5 | namespace Pong.Framework.Menus.Elements
6 | {
7 | internal class ElementContainer : IDrawable
8 | {
9 | public IList Elements { get; } = new List();
10 |
11 | public void Draw(SpriteBatch b)
12 | {
13 | foreach (IDrawable element in this.Elements)
14 | element.Draw(b);
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Pong/Framework/Menus/Elements/IBoundable.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 |
3 | namespace Pong.Framework.Menus.Elements
4 | {
5 | internal interface IBoundable
6 | {
7 | Rectangle Bounds { get; }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Pong/Framework/Menus/Elements/IClickable.cs:
--------------------------------------------------------------------------------
1 | namespace Pong.Framework.Menus.Elements
2 | {
3 | internal interface IClickable : IBoundable
4 | {
5 | void Clicked();
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/Pong/Framework/Menus/Elements/IHighlightable.cs:
--------------------------------------------------------------------------------
1 | namespace Pong.Framework.Menus.Elements
2 | {
3 | internal interface IHighlightable : IBoundable
4 | {
5 | bool Highlighted { get; set; }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/Pong/Framework/Menus/IInputable.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI.Events;
2 |
3 | namespace Pong.Framework.Menus
4 | {
5 | internal interface IInputable
6 | {
7 | /// Raised after the player presses a button on the keyboard, controller, or mouse.
8 | /// The event arguments.
9 | bool OnButtonPressed(ButtonPressedEventArgs e);
10 |
11 | /// Raised after the player moves the in-game cursor.
12 | /// The event arguments.
13 | void OnCursorMoved(CursorMovedEventArgs e);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Pong/Framework/Menus/IMenu.cs:
--------------------------------------------------------------------------------
1 | using Pong.Framework.Common;
2 | using System;
3 |
4 | namespace Pong.Framework.Menus
5 | {
6 | internal interface IMenu : IDrawable, IUpdateable, IInputable
7 | {
8 | void Resize();
9 |
10 | event EventHandler SwitchToNewMenu;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Pong/Framework/Menus/Modal.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using Microsoft.Xna.Framework.Graphics;
3 | using Pong.Framework.Common;
4 | using Pong.Framework.Enums;
5 | using Pong.Framework.Extensions;
6 | using Pong.Framework.Menus.Elements;
7 | using StardewModdingAPI.Events;
8 | using IDrawable = Pong.Framework.Common.IDrawable;
9 |
10 | namespace Pong.Framework.Menus
11 | {
12 | internal class Modal : IDrawable, IBoundable, IInputable
13 | {
14 | public Rectangle Bounds { get; }
15 |
16 | public Modal(string text, ModalButtonType buttonType)
17 | {
18 | this.Bounds = new Rectangle(50, 50, 400, 400);
19 | }
20 |
21 | public void Draw(SpriteBatch b)
22 | {
23 | b.Draw(AssetManager.SquareTexture, this.Bounds, null, Color.Black);
24 | this.DrawBorder(b);
25 | }
26 |
27 | /// Raised after the player presses a button on the keyboard, controller, or mouse.
28 | /// The event arguments.
29 | public bool OnButtonPressed(ButtonPressedEventArgs e)
30 | {
31 | throw new System.NotImplementedException();
32 | }
33 |
34 | /// Raised after the player moves the in-game cursor.
35 | /// The event arguments.
36 | public void OnCursorMoved(CursorMovedEventArgs e)
37 | {
38 | throw new System.NotImplementedException();
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Pong/Framework/Menus/SwitchMenuEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Pong.Framework.Menus
4 | {
5 | internal class SwitchMenuEventArgs : EventArgs
6 | {
7 | public IMenu NewMenu { get; }
8 |
9 | public SwitchMenuEventArgs(IMenu newMenu)
10 | {
11 | this.NewMenu = newMenu;
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Pong/Framework/Messages/ChallengeRequestMessage.cs:
--------------------------------------------------------------------------------
1 | namespace Pong.Framework.Messages
2 | {
3 | internal class ChallengeRequestMessage
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Pong/Framework/Messages/ChallengeRequestResponseMessage.cs:
--------------------------------------------------------------------------------
1 | namespace Pong.Framework.Messages
2 | {
3 | internal class ChallengeRequestResponseMessage
4 | {
5 | public bool Accepted { get; }
6 | public string Reason { get; }
7 |
8 | public ChallengeRequestResponseMessage(bool accepted, string reason = null)
9 | {
10 | this.Accepted = accepted;
11 | this.Reason = reason;
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Pong/Framework/Messages/GameStateMessage.cs:
--------------------------------------------------------------------------------
1 | namespace Pong.Framework.Messages
2 | {
3 | internal class GameStateMessage
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Pong/Framework/Messages/MailBox.cs:
--------------------------------------------------------------------------------
1 | namespace Pong.Framework.Messages
2 | {
3 | internal static class MailBox
4 | {
5 | public static void Send(MessageEnvelope envelope)
6 | {
7 | ModEntry.Instance.Helper.Multiplayer.SendMessage(envelope.Data, envelope.MessageType, new[] { ModEntry.Instance.PongId }, new[] { envelope.RecipientId });
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Pong/Framework/Messages/MessageEnvelope.cs:
--------------------------------------------------------------------------------
1 | namespace Pong.Framework.Messages
2 | {
3 | internal class MessageEnvelope
4 | {
5 | public string MessageType { get; }
6 | public long RecipientId { get; }
7 | public object Data { get; }
8 |
9 | public MessageEnvelope(object data, long recipientId)
10 | {
11 | this.Data = data;
12 | this.MessageType = data.GetType().Name;
13 | this.RecipientId = recipientId;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Pong/Framework/Messages/QuitGameMessage.cs:
--------------------------------------------------------------------------------
1 | namespace Pong.Framework.Messages
2 | {
3 | internal class QuitGameMessage
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Pong/Game/Ball.cs:
--------------------------------------------------------------------------------
1 | using Pong.Framework.Enums;
2 | using Pong.Framework.Game;
3 | using Pong.Framework.Game.States;
4 | using StardewValley;
5 |
6 | namespace Pong.Game
7 | {
8 | internal sealed class Ball : Collider, IReactiveDrawableCollideable
9 | {
10 | private readonly VelocityState velocityState;
11 |
12 | public Ball(PositionState positionState, VelocityState velocityState) : base(positionState, false)
13 | {
14 | this.velocityState = velocityState;
15 | this.Width = this.Height = Game1.tileSize;
16 | }
17 |
18 | public void CollideWith(INonReactiveDrawableCollideable other)
19 | {
20 | CollideInfo info = other.GetCollideInfo(this);
21 |
22 | if (info.Orientation == Orientation.Horizontal)
23 | {
24 | this.velocityState.YVelocity *= -1;
25 |
26 | if (info.CollidePercentage >= 0) this.velocityState.XVelocity = (int)(30 * info.CollidePercentage - 15);
27 | }
28 | else
29 | {
30 | this.velocityState.XVelocity *= -1;
31 | }
32 | }
33 |
34 | public void Reset()
35 | {
36 | this.velocityState.Reset();
37 | this.PositionState.Reset();
38 | }
39 |
40 | public override void Update()
41 | {
42 | this.XPos += this.velocityState.XVelocity;
43 | this.YPos += this.velocityState.YVelocity;
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Pong/Game/CollideInfo.cs:
--------------------------------------------------------------------------------
1 | using Pong.Framework.Enums;
2 |
3 | namespace Pong.Game
4 | {
5 | internal class CollideInfo
6 | {
7 | public Orientation Orientation { get; }
8 | public double CollidePercentage { get; }
9 |
10 | public CollideInfo(Orientation o, double c)
11 | {
12 | this.Orientation = o;
13 | this.CollidePercentage = c;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Pong/Game/Controllers/ComputerController.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 |
3 | namespace Pong.Game.Controllers
4 | {
5 | internal class ComputerController : IntentionalPaddleController
6 | {
7 | private readonly Ball ball;
8 |
9 | public ComputerController(Ball ball)
10 | {
11 | this.ball = ball;
12 | }
13 |
14 | public override void Update()
15 | {
16 | Rectangle boundingBox = this.ball.Bounds;
17 | this.IntendedPosition = boundingBox.X + boundingBox.Width / 2;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Pong/Game/Controllers/IPaddleController.cs:
--------------------------------------------------------------------------------
1 | using Pong.Framework.Common;
2 |
3 | namespace Pong.Game.Controllers
4 | {
5 | internal interface IPaddleController : IUpdateable
6 | {
7 | int GetMovement(int xPos, int width);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Pong/Game/Controllers/IntentionalPaddleController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using static Pong.Framework.Menus.Menu;
3 |
4 | namespace Pong.Game.Controllers
5 | {
6 | internal abstract class IntentionalPaddleController : IPaddleController
7 | {
8 | private readonly int movementAmount = 9;
9 | protected int IntendedPosition = 0;
10 |
11 | public int GetMovement(int xPos, int width)
12 | {
13 | if (Math.Abs(this.IntendedPosition - (xPos + width / 2)) > this.movementAmount)
14 | {
15 | if (this.IntendedPosition < xPos + width / 2)
16 | return this.Move(true, xPos, width);
17 | else
18 | return this.Move(false, xPos, width);
19 | }
20 |
21 | return 0;
22 | }
23 |
24 | public abstract void Update();
25 |
26 | private int Move(bool left, int xPos, int width)
27 | {
28 | if (left && xPos < this.movementAmount)
29 | return 0;
30 | if (!left && xPos > ScreenWidth - width - this.movementAmount)
31 | return 0;
32 | return (left ? -1 : 1) * this.movementAmount;
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Pong/Game/Controllers/LocalPlayerController.cs:
--------------------------------------------------------------------------------
1 | using Pong.Framework.Game.States;
2 | using StardewModdingAPI.Events;
3 |
4 | namespace Pong.Game.Controllers
5 | {
6 | internal class LocalPlayerController : StatePaddleController
7 | {
8 | public LocalPlayerController(PositionState intendedState) : base(intendedState)
9 | {
10 | }
11 |
12 | /// Raised after the player moves the in-game cursor.
13 | /// The event arguments.
14 | public void OnCursorMoved(CursorMovedEventArgs e)
15 | {
16 | this.intendedState.XPosition = (int)e.NewPosition.ScreenPixels.X;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Pong/Game/Controllers/StatePaddleController.cs:
--------------------------------------------------------------------------------
1 | using Pong.Framework.Game.States;
2 |
3 | namespace Pong.Game.Controllers
4 | {
5 | internal class StatePaddleController : IntentionalPaddleController
6 | {
7 | protected readonly PositionState intendedState;
8 |
9 | public StatePaddleController(PositionState intendedState)
10 | {
11 | this.intendedState = intendedState;
12 | }
13 |
14 | public override void Update()
15 | {
16 | this.IntendedPosition = this.intendedState.XPosition;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Pong/Game/ScoreDisplay.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework.Graphics;
2 | using Pong.Framework.Common;
3 | using Pong.Framework.Game.States;
4 | using StardewValley.BellsAndWhistles;
5 |
6 | namespace Pong.Game
7 | {
8 | internal class ScoreDisplay : IUpdateable, IDrawable
9 | {
10 | private readonly ScoreState state;
11 |
12 | public ScoreDisplay(ScoreState state)
13 | {
14 | this.state = state;
15 | }
16 |
17 | public void UpdateScore(bool playerWon)
18 | {
19 | if (playerWon)
20 | this.state.PlayerOneScore++;
21 | else
22 | this.state.PlayerTwoScore++;
23 | }
24 |
25 | public void Draw(SpriteBatch b)
26 | {
27 | SpriteText.drawString(b, $"{this.state.PlayerOneScore} - {this.state.PlayerTwoScore}", 50, 50, 999999, -1, 999999, 1f, 0.88f, false, -1, "", SpriteText.color_White);
28 | }
29 |
30 | public void Reset()
31 | {
32 | this.state.Reset();
33 | }
34 |
35 | public void Update()
36 | {
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Pong/Menus/ServerMenu.cs:
--------------------------------------------------------------------------------
1 | using Pong.Framework.Common;
2 | using Pong.Framework.Menus;
3 | using Pong.Framework.Menus.Elements;
4 | using StardewModdingAPI;
5 | using System.Collections.Generic;
6 |
7 | namespace Pong.Menus
8 | {
9 | internal class ServerMenu : Menu
10 | {
11 | public override void Update()
12 | {
13 | if (Context.IsWorldReady)
14 | this.OnSwitchToNewMenu(new PlayerMenu());
15 | this.InitDrawables();
16 | }
17 |
18 | public override void Resize()
19 | {
20 | throw new System.NotImplementedException();
21 | }
22 |
23 | protected override IEnumerable GetDrawables()
24 | {
25 | yield return new StaticTextElement("Server Menu!", ScreenWidth / 2, ScreenHeight / 2 - 50, true, true);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Pong/Pong.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.1.0
4 | net452
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Pong/README.md:
--------------------------------------------------------------------------------
1 | # Pong
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/1994?) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | This mod is mainly a joke since you can't play the original game anymore, but also an exercise in object oriented design. It stops SDV from receiving any inputs and then draws over the screen to display the Pong game.
--------------------------------------------------------------------------------
/Pong/assets/circle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dphill10827/UnofficialModUpdateMenu/b27ee0f12e66165156d9ab9de2439fd5718c2b30/Pong/assets/circle.png
--------------------------------------------------------------------------------
/Pong/assets/square.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dphill10827/UnofficialModUpdateMenu/b27ee0f12e66165156d9ab9de2439fd5718c2b30/Pong/assets/square.png
--------------------------------------------------------------------------------
/Pong/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Pong",
3 | "Author": "Cat",
4 | "Version": "1.1.1",
5 | "Description": "Replaces Stardew Valley with Pong!",
6 | "UniqueID": "cat.Pong",
7 | "EntryDll": "Pong.dll",
8 | "MinimumApiVersion": "3.0.0",
9 | "UpdateKeys": [ "Nexus:1994" ]
10 | }
11 |
--------------------------------------------------------------------------------
/RangeDisplay/Framework/APIs/IBetterSprinklersAPI.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using System.Collections.Generic;
3 |
4 | namespace RangeDisplay.Framework.APIs
5 | {
6 | /// The better sprinklers API.
7 | public interface IBetterSprinklersAPI
8 | {
9 | /*********
10 | ** Methods
11 | *********/
12 |
13 | /// Gets the coverage of sprinklers by parentSheetIndex.
14 | /// The sprinkler coverage.
15 | IDictionary GetSprinklerCoverage();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/RangeDisplay/Framework/APIs/IPrismaticToolsAPI.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using System.Collections.Generic;
3 |
4 | namespace RangeDisplay.Framework.APIs
5 | {
6 | /// The prismatic tools API.
7 | public interface IPrismaticToolsAPI
8 | {
9 | /*********
10 | ** Accessors
11 | *********/
12 |
13 | /// The parentSheetIndex of prismatic sprinklers.
14 | int SprinklerIndex { get; }
15 |
16 | /// Whether prismatic sprinklers also act as scarecrows.
17 | bool ArePrismaticSprinklersScarecrows { get; }
18 |
19 | /*********
20 | ** Methods
21 | *********/
22 |
23 | /// Gets the coverage of a prismatic sprinkler.
24 | /// The position of the prismatic sprinkler.
25 | /// The sprinkler coverage.
26 | IEnumerable GetSprinklerCoverage(Vector2 origin);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/RangeDisplay/Framework/APIs/ISimpleSprinklersAPI.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using System.Collections.Generic;
3 |
4 | namespace RangeDisplay.Framework.APIs
5 | {
6 | /// The simple sprinklers API.
7 | public interface ISimpleSprinklersAPI
8 | {
9 | /// Get the extra range covered by sprinklers, on top of the vanilla range.
10 | /// The extra range.
11 | IDictionary GetNewSprinklerCoverage();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/RangeDisplay/Framework/RangeHandling/IModRegistryListener.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 |
3 | namespace RangeDisplay.Framework.RangeHandling
4 | {
5 | /// Listens for the mod registry to be ready.
6 | internal interface IModRegistryListener
7 | {
8 | /*********
9 | ** Methods
10 | *********/
11 |
12 | /// Called when the mod registry is ready.
13 | /// The mod registry.
14 | void ModRegistryReady(IModRegistry registry);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/RangeDisplay/Framework/RangeHandling/IRangeCreator.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using StardewValley;
3 | using System.Collections.Generic;
4 |
5 | namespace RangeDisplay.Framework.RangeHandling
6 | {
7 | /// Handles a rage item.
8 | internal interface IRangeCreator
9 | {
10 | /*********
11 | ** Accessors
12 | *********/
13 |
14 | /// The handled range item.
15 | RangeItem HandledRangeItem { get; }
16 |
17 | /// Whether this creator can create range for the given object.
18 | /// The object.
19 | /// Whether range can be created for it.
20 | bool CanCreateRangeFor(T obj);
21 |
22 | /// Creates a range.
23 | /// The object to create a range for.
24 | /// The position the object is at.
25 | /// The location the object is in.
26 | /// The created range.
27 | IEnumerable CreateRange(T obj, Vector2 position, GameLocation location);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/RangeDisplay/Framework/RangeHandling/RangeItem.cs:
--------------------------------------------------------------------------------
1 | namespace RangeDisplay.Framework.RangeHandling
2 | {
3 | /// The different range producing items.
4 | internal enum RangeItem
5 | {
6 | /// A scarecrow.
7 | Scarecrow,
8 |
9 | /// A sprinkler.
10 | Sprinkler,
11 |
12 | /// A junimo hut.
13 | JunimoHut,
14 |
15 | /// A bee house.
16 | BeeHouse
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/RangeDisplay/ModConfig.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 |
3 | namespace RangeDisplay
4 | {
5 | /// The mod configuration.
6 | public class ModConfig
7 | {
8 | /*********
9 | ** Accessors
10 | *********/
11 |
12 | /// The key which cycles the active display category.
13 | public SButton CycleActiveDisplayKey { get; set; } = SButton.F2;
14 |
15 | /// Whether to show the range of the item being held or not.
16 | public bool ShowRangeOfHeldItem { get; set; } = true;
17 |
18 | /// Whether to show the range of the item being hovered over not.
19 | public bool ShowRangeOfHoveredOverItem { get; set; } = true;
20 |
21 | /// The hover modifier key.
22 | public SButton[] HoverModifierKeys { get; set; } = { SButton.LeftControl, SButton.RightControl };
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/RangeDisplay/README.md:
--------------------------------------------------------------------------------
1 | # Range Display
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/1179?) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod gathers information about objects in your farm and displays range information using an overlay by drawing over the window after other layers have finished drawing.
--------------------------------------------------------------------------------
/RangeDisplay/RangeDisplay.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 2.7.0
4 | net452
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/RangeDisplay/assets/border.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dphill10827/UnofficialModUpdateMenu/b27ee0f12e66165156d9ab9de2439fd5718c2b30/RangeDisplay/assets/border.png
--------------------------------------------------------------------------------
/RangeDisplay/assets/filled_in.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dphill10827/UnofficialModUpdateMenu/b27ee0f12e66165156d9ab9de2439fd5718c2b30/RangeDisplay/assets/filled_in.png
--------------------------------------------------------------------------------
/RangeDisplay/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Range Display",
3 | "Author": "Cat",
4 | "Version": "3.0.0",
5 | "Description": "Press a key to view the range of sprinklers, scarecrows, bee houses, and junimo huts.",
6 | "UniqueID": "cat.sprinklerrange",
7 | "EntryDll": "RangeDisplay.dll",
8 | "MinimumApiVersion": "2.9.0",
9 | "UpdateKeys": [ "Nexus:1179" ]
10 | }
11 |
--------------------------------------------------------------------------------
/RemovableHorseHats/ModConfig.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 |
3 | namespace RemovableHorseHats
4 | {
5 | /// The mod configuration.
6 | internal class ModConfig
7 | {
8 | /*********
9 | ** Accessors
10 | *********/
11 |
12 | /// The keys that allow you to remove the hat from your horse when they're held down.
13 | public string KeysToRemoveHat { get; set; } = $"{SButton.LeftShift} {SButton.RightShift}";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/RemovableHorseHats/README.md:
--------------------------------------------------------------------------------
1 | # Removable Horse Hats
2 |
3 | ## Deprecated
4 |
5 | Similar functionality was added in SDV 1.4, so this mod is no longer supported.
6 |
7 | See [This link](http://www.nexusmods.com/stardewvalley/mods/2223?) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
8 |
9 | ## How it works
10 |
11 | The mod uses [Harmony](https://github.com/pardeike/Harmony) to overwrite the horse's `checkAction` method to instead remove the hat the horse is wearing if it is wearing one and the player is holding down the activation key.
--------------------------------------------------------------------------------
/RemovableHorseHats/RemovableHorseHats.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.1.0
4 | net452
5 |
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/RemovableHorseHats/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Removable Horse Hats",
3 | "Author": "Cat",
4 | "Version": "1.1.1",
5 | "Description": "Lets you remove the hat from your horse by holding down a key and clicking it.",
6 | "UniqueID": "cat.removablehorsehats",
7 | "EntryDll": "RemovableHorseHats.dll",
8 | "MinimumApiVersion": "3.0.0",
9 | "UpdateKeys": [ "Nexus:2223" ]
10 | }
11 |
--------------------------------------------------------------------------------
/SafeLightning/API.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 |
3 | namespace SafeLightning
4 | {
5 | public class API
6 | {
7 | internal ModEntry.StrikeLightningDelegate methodToCall;
8 |
9 | public API(ModEntry.StrikeLightningDelegate methodToCall)
10 | {
11 | this.methodToCall = methodToCall;
12 | }
13 |
14 | ///
15 | /// Method to call when another mod wants to safely create lightning.
16 | ///
17 | /// Where to create the lightning
18 | /// Whether to create appropriate sound and visual effects
19 | public void StrikeLightningSafely(Vector2 position, bool effects = true)
20 | {
21 | this.methodToCall(position, effects);
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/SafeLightning/CommandParsing/Commands/GrowTreesCommand.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using StardewModdingAPI;
3 | using StardewValley;
4 | using StardewValley.TerrainFeatures;
5 | using System.Collections.Generic;
6 |
7 | namespace SafeLightning.CommandParsing.Commands
8 | {
9 | /// Grows all trees and fruit trees in the player's farm.
10 | internal class GrowTreesCommand : BaseCommand
11 | {
12 | /*********
13 | ** Public methods
14 | *********/
15 |
16 | /// Construct an instance.
17 | /// The monitor used for command output.
18 | public GrowTreesCommand(IMonitor monitor) : base(monitor, "grow_trees", "gt", "Grows all trees and fruit trees in your farm.")
19 | {
20 | }
21 |
22 | /// Invoke the command.
23 | /// The command arguments
24 | public override void Invoke(string[] args)
25 | {
26 | foreach (KeyValuePair item in Game1.getFarm().terrainFeatures.Pairs)
27 | {
28 | switch (item.Value)
29 | {
30 | case Tree t:
31 | t.growthStage.Value++;
32 | break;
33 |
34 | case FruitTree ft:
35 | ft.daysUntilMature.Value -= 4;
36 | ft.dayUpdate(Game1.getFarm(), item.Key);
37 | break;
38 | }
39 | }
40 |
41 | this.monitor.Log("Okay, grew trees and fruit trees in your farm.", LogLevel.Info);
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/SafeLightning/CommandParsing/Commands/PrintLocationCommand.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 | using StardewValley;
3 |
4 | namespace SafeLightning.CommandParsing.Commands
5 | {
6 | /// Prints the player's location.
7 | internal class PrintLocationCommand : BaseCommand
8 | {
9 | /*********
10 | ** Public methods
11 | *********/
12 |
13 | /// Construct an instance.
14 | /// The monitor used for command output.
15 | public PrintLocationCommand(IMonitor monitor) : base(monitor, "print_location", "pl", "Prints the player's location.")
16 | {
17 | }
18 |
19 | /// Invoke the command.
20 | /// The command arguments
21 | public override void Invoke(string[] args)
22 | {
23 | this.monitor.Log($"Okay, player is at {Game1.player.getTileLocation()}.", LogLevel.Info);
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/SafeLightning/CommandParsing/Commands/RemoveFeaturesCommand.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 | using StardewValley;
3 |
4 | namespace SafeLightning.CommandParsing.Commands
5 | {
6 | /// Removes every terrain feature in the player's farm.
7 | internal class RemoveFeaturesCommand : BaseCommand
8 | {
9 | /*********
10 | ** Public methods
11 | *********/
12 |
13 | ///
14 | /// The monitor used for command output.
15 | public RemoveFeaturesCommand(IMonitor monitor) : base(monitor, "remove_features", "Removes all terrain features from your farm.")
16 | {
17 | }
18 |
19 | /// Invoke the command.
20 | /// The command arguments
21 | public override void Invoke(string[] args)
22 | {
23 | Game1.getFarm().terrainFeatures.Clear();
24 | this.monitor.Log("Okay, removed all terrain features from your farm.", LogLevel.Info);
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/SafeLightning/CommandParsing/Commands/SetLightningCommand.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 | using StardewValley;
3 |
4 | namespace SafeLightning.CommandParsing.Commands
5 | {
6 | /// Sets the weather for today and tomorrow as lightning.
7 | internal class SetLightningCommand : BaseCommand
8 | {
9 | /*********
10 | ** Public methods
11 | *********/
12 |
13 | /// Construct an instance.
14 | /// The monitor used for command output.
15 | public SetLightningCommand(IMonitor monitor) : base(monitor, "set_lightning", "sl", "Sets today and tomorrow's weather to lightning.")
16 | {
17 | }
18 |
19 | /// Invoke the command.
20 | /// The command arguments
21 | public override void Invoke(string[] args)
22 | {
23 | Game1.weatherForTomorrow = Game1.weather_lightning;
24 | Game1.isLightning = true;
25 |
26 | this.monitor.Log("Okay, set weather for today and tomorrow as lightning.", LogLevel.Info);
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/SafeLightning/README.md:
--------------------------------------------------------------------------------
1 | # Safe Lightning
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/2039?) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod uses Harmony to replace the lightning method that destroys items in the world with one that has all the visual effects without any of the destruction.
--------------------------------------------------------------------------------
/SafeLightning/SafeLightning.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.5.0
4 | net452
5 |
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/SafeLightning/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Safe Lightning",
3 | "Author": "Cat",
4 | "Version": "2.1.0",
5 | "Description": "Lightning won't harm your farm.",
6 | "UniqueID": "cat.safelightning",
7 | "EntryDll": "SafeLightning.dll",
8 | "MinimumApiVersion": "3.0.0",
9 | "UpdateKeys": [ "Nexus:2039" ]
10 | }
11 |
--------------------------------------------------------------------------------
/StackEverything/ObjectCopiers/FurnitureCopier.cs:
--------------------------------------------------------------------------------
1 | using StardewValley.Objects;
2 |
3 | namespace StackEverything.ObjectCopiers
4 | {
5 | /// Copies furniture, orienting it in the right direction.
6 | internal class FurnitureCopier : ICopier
7 | {
8 | /*********
9 | ** Public methods
10 | *********/
11 |
12 | /// Copy the given object.
13 | /// The object to copy
14 | /// A copy of the object.
15 | public Furniture Copy(Furniture obj)
16 | {
17 | Furniture furniture = obj.getOne() as Furniture;
18 |
19 | // Attempting to copy the rotation of the placed object is awful.
20 | // Try to match up the bounding boxes, giving up after 8 failed attempts.
21 | int attempts = 0;
22 | while (!furniture.boundingBox.Value.Equals(obj.boundingBox.Value) && attempts < 8)
23 | {
24 | furniture.rotate();
25 | attempts++;
26 | }
27 |
28 | return furniture;
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/StackEverything/ObjectCopiers/ICopier.cs:
--------------------------------------------------------------------------------
1 | namespace StackEverything.ObjectCopiers
2 | {
3 | /// Copies objects.
4 | internal interface ICopier
5 | {
6 | /*********
7 | ** Methods
8 | *********/
9 |
10 | /// Copy the given object.
11 | /// The object to copy
12 | /// A copy of the object.
13 | T Copy(T obj);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/StackEverything/Patches/CanStackWithPatch.cs:
--------------------------------------------------------------------------------
1 | using StardewValley;
2 | using StardewValley.Objects;
3 |
4 | namespace StackEverything.Patches
5 | {
6 | // Dressers can't stack with each other if they're holding items
7 | internal class CanStackWithPatch
8 | {
9 | public static bool Prefix(Item __instance, ref bool __result, ISalable other)
10 | {
11 | if ((__instance is StorageFurniture dresser1 && dresser1.heldItems.Count != 0) || (other is StorageFurniture dresser2 && dresser2.heldItems.Count != 0))
12 | {
13 | __result = false;
14 | return false;
15 | }
16 |
17 | return true;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/StackEverything/Patches/DoDoneFishingPatch.cs:
--------------------------------------------------------------------------------
1 | using StardewValley;
2 | using StardewValley.Tools;
3 | using System.Linq;
4 | using SObject = StardewValley.Object;
5 |
6 | namespace StackEverything.Patches
7 | {
8 | /// Handle tackle being stacked correctly after it runs out of uses.
9 | internal class DoDoneFishingPatch
10 | {
11 | private static SObject tackle;
12 |
13 | public static void Prefix(FishingRod __instance)
14 | {
15 | tackle = __instance.attachments?.Count > 1 ? __instance.attachments[1] : null;
16 | }
17 |
18 | public static void Postfix(FishingRod __instance)
19 | {
20 | if (__instance.attachments == null || __instance.attachments?.Count <= 1)
21 | return;
22 |
23 | if (tackle != null && __instance.attachments[1] == null)
24 | {
25 | if (tackle.Stack > 1)
26 | {
27 | tackle.Stack--;
28 | tackle.uses.Value = 0;
29 | __instance.attachments[1] = tackle;
30 |
31 | string displayedMessage = new HUDMessage(Game1.content.LoadString("Strings\\StringsFromCSFiles:FishingRod.cs.14086"), "").Message;
32 | Game1.hudMessages.Remove(Game1.hudMessages.FirstOrDefault(item => item.Message == displayedMessage));
33 | }
34 | }
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/StackEverything/Patches/DrawInMenuPatch.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using Microsoft.Xna.Framework.Graphics;
3 | using StardewValley;
4 | using System.Linq;
5 |
6 | namespace StackEverything.Patches
7 | {
8 | /// Draw stack size in inventories.
9 | internal class DrawInMenuPatch
10 | {
11 | public static void Postfix(Item __instance, SpriteBatch spriteBatch, Vector2 location, float scaleSize, StackDrawType drawStackNumber)
12 | {
13 | if (!StackEverythingMod.PatchedTypes.Any(item => item.IsInstanceOfType(__instance)))
14 | return;
15 |
16 | if (((drawStackNumber == StackDrawType.Draw && __instance.maximumStackSize() > 1 && __instance.Stack > 1) || drawStackNumber == StackDrawType.Draw_OneInclusive) && (double)scaleSize > 0.3 && __instance.Stack != int.MaxValue)
17 | Utility.drawTinyDigits(__instance.Stack, spriteBatch, location + new Vector2((float)(Game1.tileSize - Utility.getWidthOfTinyDigitString(__instance.Stack, 3f * scaleSize)) + 3f * scaleSize, (float)((double)Game1.tileSize - 18.0 * (double)scaleSize + 2.0)), 3f * scaleSize, 1f, Color.White);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/StackEverything/Patches/Size/AddToStackPatch.cs:
--------------------------------------------------------------------------------
1 | using StardewValley;
2 |
3 | namespace StackEverything.Patches.Size
4 | {
5 | /// Rewrite the method.
6 | public class AddToStackPatch
7 | {
8 | /*********
9 | ** Public methods
10 | *********/
11 |
12 | public static bool Prefix(Item __instance, ref Item stack, ref int __result)
13 | {
14 | //Handle negative stack amounts from the original game
15 | if (__instance.Stack == -1 || __instance.Stack == 0)
16 | __instance.Stack = 1;
17 | if (stack.Stack == -1 || stack.Stack == 0)
18 | stack.Stack = 1;
19 |
20 | int maxStack = __instance.maximumStackSize();
21 | int proposedStack = __instance.Stack + stack.Stack;
22 | if (proposedStack > maxStack)
23 | {
24 | __instance.Stack = maxStack;
25 | __result = proposedStack - maxStack;
26 | }
27 | else
28 | {
29 | __instance.Stack = proposedStack;
30 | __result = 0;
31 | }
32 |
33 | return false;
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/StackEverything/Patches/Size/MaximumStackSizePatch.cs:
--------------------------------------------------------------------------------
1 | namespace StackEverything.Patches.Size
2 | {
3 | /// Sets maximum stack size to 999.
4 | public class MaximumStackSizePatch
5 | {
6 | public static bool Prefix(ref int __result)
7 | {
8 | __result = 999;
9 |
10 | return false;
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/StackEverything/README.md:
--------------------------------------------------------------------------------
1 | # Stack Everything
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/2053?) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | This mod uses [Harmony](https://github.com/pardeike/Harmony) to:
9 | - replace `StardewValley.Object.maximumStackSize` to always return 999.
10 | - postfix `StardewValley.Object.drawInMenu` to correctly draw the stack number.
11 | - replace `StardewValley.Object.getStack` to return the correct stack amount.
12 | - replace `StardewValley.Object.addToStack` to add items correctly.
13 | - replace `DecoratableLocation.removeQueuedFurniture` to not overwrite items when picking up furniture with a full inventory.
14 | - replace `Item.canStackWith` to prevent dressers with items from stacking and items being lost.
15 |
16 | It also replaces placed down tappers and furniture into new instances of those items so there isn't the same instance of the same item in multiple locations.
--------------------------------------------------------------------------------
/StackEverything/StackEverything.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 2.15.0
4 | net452
5 |
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/StackEverything/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Stack Everything",
3 | "Author": "Cat",
4 | "Version": "3.0.2",
5 | "Description": "Lets you stack Furniture, Tackle, and Wallpapers up to 999.",
6 | "UniqueID": "cat.stackeverything",
7 | "EntryDll": "StackEverything.dll",
8 | "MinimumApiVersion": "3.0.0",
9 | "UpdateKeys": [ "Nexus:2053" ]
10 | }
11 |
--------------------------------------------------------------------------------
/UnofficialModUpdateMenu/Extensions/ListExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace ModUpdateMenu.Extensions
5 | {
6 | /// Extensions for the List class.
7 | internal static class ListExtensions
8 | {
9 | /// Create lists of tuples more easily.
10 | public static void Add(this IList> list, T1 item1, T2 item2)
11 | {
12 | list.Add(new Tuple(item1, item2));
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/UnofficialModUpdateMenu/Menus/ButtonStatus.cs:
--------------------------------------------------------------------------------
1 | namespace ModUpdateMenu.Menus
2 | {
3 | /// Status of the update button.
4 | internal enum ButtonStatus
5 | {
6 | /// There are no updates.
7 | NoUpdates,
8 |
9 | /// There are updates.
10 | Updates,
11 |
12 | /// There was an error when checking for updates.
13 | Error,
14 |
15 | /// Updates haven't been checked for yet, or are still being checked.
16 | Unknown
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/UnofficialModUpdateMenu/ModConfig.cs:
--------------------------------------------------------------------------------
1 | namespace ModUpdateMenu
2 | {
3 | /// The mod configuration.
4 | internal class ModConfig
5 | {
6 | /*********
7 | ** Accessors
8 | *********/
9 | /// Whether to hide skipped mods or not.
10 | public bool HideSkippedMods { get; set; } = true;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/UnofficialModUpdateMenu/README.md:
--------------------------------------------------------------------------------
1 | # Unofficial Mod Update Menu, now updated for 1.6!
2 |
3 | How to use:
4 | Install Smapi:
5 | Copy this file into your 'Mods' folder: [ModUpdateMenu.zip](https://github.com/Dphill10827/StardewMods/files/14670049/ModUpdateMenu.zip)
6 |
7 |
8 | ## How it works
9 |
10 | Adds a menu to the title screen accessible by a new button which displays info about mod status. Mod updates are taken from the update checks SMAPI does. This is an updated version for Stardew 1.6 that allows users to click links again.
11 |
--------------------------------------------------------------------------------
/UnofficialModUpdateMenu/UnofficialModUpdateMenu.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.0.0
4 | net6.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/UnofficialModUpdateMenu/Updates/INotifiable.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 | using System.Collections.Generic;
3 |
4 | namespace ModUpdateMenu.Updates
5 | {
6 | /// Can be notified about SMAPI/mod statuses.
7 | internal interface INotifiable
8 | {
9 | /*********
10 | ** Methods
11 | *********/
12 | /// Notify about mod statuses.
13 | /// The mod status.
14 | void Notify(IList statuses);
15 |
16 | /// Notifies about the SMAPI update version.
17 | /// The SMAPI update version.
18 | void NotifySMAPI(ISemanticVersion version);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/UnofficialModUpdateMenu/Updates/UpdateStatus.cs:
--------------------------------------------------------------------------------
1 | namespace ModUpdateMenu.Updates
2 | {
3 | /// An update status
4 | public enum UpdateStatus
5 | {
6 | /// Update checking was skipped.
7 | Skipped,
8 |
9 | /// The mod version is equal to remote version.
10 | UpToDate,
11 |
12 | /// The mod version is less than the remote version.
13 | OutOfDate
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/UnofficialModUpdateMenu/assets/statusIcons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dphill10827/UnofficialModUpdateMenu/b27ee0f12e66165156d9ab9de2439fd5718c2b30/UnofficialModUpdateMenu/assets/statusIcons.png
--------------------------------------------------------------------------------
/UnofficialModUpdateMenu/assets/updateButton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dphill10827/UnofficialModUpdateMenu/b27ee0f12e66165156d9ab9de2439fd5718c2b30/UnofficialModUpdateMenu/assets/updateButton.png
--------------------------------------------------------------------------------
/UnofficialModUpdateMenu/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Unofficial Mod Update Menu",
3 | "Author": "Cat",
4 | "Version": "2.6.0-unofficial-1",
5 | "Description": "Shows an in game menu on the title screen about mods that need updates.",
6 | "UniqueID": "cat.modupdatemenu",
7 | "EntryDll": "ModUpdateMenu.dll",
8 | "MinimumApiVersion": "4.0.0",
9 | "UpdateKeys": [ "GitHub:Dphill10827/UnofficialModUpdateMenu" ]
10 | }
11 |
--------------------------------------------------------------------------------
/WindEffects/Framework/Shakers/BushShaker.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using StardewModdingAPI;
3 | using StardewValley.TerrainFeatures;
4 | using System;
5 |
6 | namespace WindEffects.Framework.Shakers
7 | {
8 | internal class BushShaker : IShaker
9 | {
10 | private readonly Bush bush;
11 | private readonly bool left;
12 |
13 | public BushShaker(Bush bush, bool left)
14 | {
15 | this.bush = bush;
16 | this.left = left;
17 | }
18 |
19 | public void Shake(IReflectionHelper helper, Vector2 tile)
20 | {
21 | // can't just call shake because it drops items. We don't want to drop items.
22 | // see Bush::shake for the logic this replicates
23 |
24 | // already shaking
25 | if (helper.GetField(this.bush, "maxShake").GetValue() != 0)
26 | return;
27 |
28 | helper.GetField(this.bush, "shakeLeft").SetValue(this.left);
29 | helper.GetField(this.bush, "maxShake").SetValue((float)Math.PI / 128f);
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/WindEffects/Framework/Shakers/GrassShaker.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using StardewModdingAPI;
3 | using StardewValley.TerrainFeatures;
4 | using System;
5 |
6 | namespace WindEffects.Framework.Shakers
7 | {
8 | internal class GrassShaker : IShaker
9 | {
10 | private readonly Grass grass;
11 | private readonly bool left;
12 |
13 | public GrassShaker(Grass grass, bool left)
14 | {
15 | this.grass = grass;
16 | this.left = left;
17 | }
18 |
19 | public void Shake(IReflectionHelper helper, Vector2 tile)
20 | {
21 | helper.GetMethod(grass, "shake").Invoke(3f * (float)Math.PI / 32f, (float)Math.PI / 80f, this.left);
22 |
23 | // works, but too loud
24 | // Game1.currentLocation.localSoundAt("grassyStep", tile);
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/WindEffects/Framework/Shakers/HoeDirtShaker.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using StardewModdingAPI;
3 | using StardewValley.TerrainFeatures;
4 | using System;
5 |
6 | namespace WindEffects.Framework.Shakers
7 | {
8 | internal class HoeDirtShaker : IShaker
9 | {
10 | private readonly HoeDirt dirt;
11 | private readonly bool left;
12 | public HoeDirtShaker(HoeDirt dirt, bool left)
13 | {
14 | this.dirt = dirt;
15 | this.left = left;
16 |
17 | }
18 | public void Shake(IReflectionHelper helper, Vector2 tile)
19 | {
20 | if (dirt.crop == null)
21 | return;
22 |
23 | helper.GetMethod(this.dirt, "shake").Invoke((float)(0.392699092626572 / 2), (float)(Math.PI / 80f), this.left);
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/WindEffects/Framework/Shakers/IShaker.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using StardewModdingAPI;
3 |
4 | namespace WindEffects.Framework.Shakers
5 | {
6 | internal interface IShaker
7 | {
8 | void Shake(IReflectionHelper helper, Vector2 tile);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/WindEffects/Framework/Shakers/ShakerFactory.cs:
--------------------------------------------------------------------------------
1 | using StardewValley;
2 | using StardewValley.TerrainFeatures;
3 |
4 | namespace WindEffects.Framework.Shakers
5 | {
6 | internal class ShakerFactory
7 | {
8 | public bool TryGetShaker(TerrainFeature feature, Wave wave, GameLocation location, out IShaker shaker)
9 | {
10 | shaker = null;
11 |
12 | if (feature is Grass grass)
13 | {
14 | shaker = new GrassShaker(grass, wave.IsLeft());
15 | }
16 |
17 | if (feature is Tree tree)
18 | {
19 | shaker = new TreeShaker(tree, location, wave.IsLeft());
20 | }
21 |
22 | if (feature is FruitTree fruitTree)
23 | {
24 | shaker = new FruitTreeShaker(fruitTree, wave.IsLeft());
25 | }
26 |
27 | if (feature is HoeDirt dirt)
28 | {
29 | shaker = new HoeDirtShaker(dirt, wave.IsLeft());
30 | }
31 |
32 | if (feature is Bush bush)
33 | {
34 | shaker = new BushShaker(bush, wave.IsLeft());
35 | }
36 |
37 | return shaker != null;
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/WindEffects/Framework/SpriteBatchExtensions.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using Microsoft.Xna.Framework.Graphics;
3 | using StardewModdingAPI;
4 | using System;
5 |
6 | namespace WindEffects.Framework
7 | {
8 | internal static class SpriteBatchExtensions
9 | {
10 | private static Texture2D pixel;
11 |
12 | public static void Init(IModHelper helper)
13 | {
14 | SpriteBatchExtensions.pixel = helper.Content.Load("assets/pixel.png");
15 | }
16 |
17 | public static void DrawLine(this SpriteBatch spriteBatch, Vector2 point1, Vector2 point2, Color color, int lineWidth)
18 | {
19 |
20 | float angle = (float)Math.Atan2(point2.Y - point1.Y, point2.X - point1.X);
21 | float length = Vector2.Distance(point1, point2);
22 |
23 | spriteBatch.Draw(pixel, point1, null, color, angle, Vector2.Zero, new Vector2(length, lineWidth), SpriteEffects.None, 0f);
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/WindEffects/ModConfig.cs:
--------------------------------------------------------------------------------
1 | namespace WindEffects
2 | {
3 | internal class ModConfig
4 | {
5 | public double WindyDayChance { get; set; } = 0.5;
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/WindEffects/README.md:
--------------------------------------------------------------------------------
1 | # Wind Effects
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/6647?) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod generates sin curves to represent gusts of wind. These are spawned just outside the player's view and travel across the map until they go out of bounds.
9 |
10 | As the waves travel, they report the tiles they touch. Those tiles are then shaken, providing the effect!
11 |
12 | Run `we debug` in the console and click around a bit to spawn some waves, and see the internal representation the waves have if you're curious.
--------------------------------------------------------------------------------
/WindEffects/WindEffects.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.0.0
4 | net452
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/WindEffects/assets/pixel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dphill10827/UnofficialModUpdateMenu/b27ee0f12e66165156d9ab9de2439fd5718c2b30/WindEffects/assets/pixel.png
--------------------------------------------------------------------------------
/WindEffects/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Wind Effects",
3 | "Author": "Cat",
4 | "Version": "1.0.2",
5 | "Description": "Wind blows through Stardew Valley!",
6 | "UniqueID": "cat.windeffects",
7 | "EntryDll": "WindEffects.dll",
8 | "MinimumApiVersion": "3.6.0",
9 | "UpdateKeys": [ "Nexus:6647" ]
10 | }
11 |
--------------------------------------------------------------------------------
/WinterGrass/LegacySaving/LegacyGrassSave.cs:
--------------------------------------------------------------------------------
1 | namespace WinterGrass.LegacySaving
2 | {
3 | /// A slimmed down version of SDV's Grass class with the relevant information needed to re-create it.
4 | internal class LegacyGrassSave
5 | {
6 | /*********
7 | ** Fields
8 | *********/
9 |
10 | /// The type of the grass.
11 | public readonly int GrassType;
12 |
13 | /// The number of weeds the grass has.
14 | public readonly int NumWeeds;
15 |
16 | /*********
17 | ** Public methods
18 | *********/
19 |
20 | /// Construct an instance.
21 | /// The type of the grass.
22 | /// The number of weeds the grass has.
23 | public LegacyGrassSave(int grassType, int numWeeds)
24 | {
25 | this.GrassType = grassType;
26 | this.NumWeeds = numWeeds;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/WinterGrass/ModConfig.cs:
--------------------------------------------------------------------------------
1 | namespace WinterGrass
2 | {
3 | /// The mod configuration.
4 | internal class ModConfig
5 | {
6 | /*********
7 | ** Accessors
8 | *********/
9 |
10 | /// Whether to disable winter grass growth or not.
11 | public bool DisableWinterGrassGrowth { get; set; } = true;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/WinterGrass/Patches/GrowWeedsPatch.cs:
--------------------------------------------------------------------------------
1 | using Harmony;
2 | using StardewValley;
3 | using System.Diagnostics.CodeAnalysis;
4 | using System.Reflection;
5 |
6 | namespace WinterGrass.Patches
7 | {
8 | /// Patches the grow weeds method to not grow more grass in winter, if disabled.
9 | [HarmonyPatch]
10 | internal class GrowWeedsPatch
11 | {
12 | /*********
13 | ** Private methods
14 | *********/
15 |
16 | /// The method to be patched.
17 | /// .
18 | [SuppressMessage("ReSharper", "UnusedMember.Local", Justification = "Method names are defined by Harmony.")]
19 | private static MethodBase TargetMethod()
20 | {
21 | return typeof(GameLocation).GetMethod(nameof(GameLocation.growWeedGrass));
22 | }
23 |
24 | /// The code to run before the original method.
25 | /// Whether to run the original method or not.
26 | [SuppressMessage("ReSharper", "InconsistentNaming", Justification = "Argument names are defined by Harmony.")]
27 | [SuppressMessage("ReSharper", "UnusedMember.Local", Justification = "Method names are defined by Harmony.")]
28 | private static bool Prefix(GameLocation __instance)
29 | {
30 | // Grow grass if the season in the current location is not winter, or it is winter and winter grass growth is enabled
31 | return Game1.GetSeasonForLocation(__instance) != "winter" || !ModEntry.Instance.Config.DisableWinterGrassGrowth;
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/WinterGrass/README.md:
--------------------------------------------------------------------------------
1 | # Winter Grass
2 |
3 |
4 | See [This link](http://www.nexusmods.com/stardewvalley/mods/1601?) for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
5 |
6 | ## How it works
7 |
8 | The mod Harmony patches various grass methods to cause it to not die in winter and optionally not grow. This new approach saves grass like normal in the main save file - it no longer requires a separate save file making updates easy. The mod also automatically converts old save files to the new format.
--------------------------------------------------------------------------------
/WinterGrass/WinterGrass.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 2.0.0
4 | net452
5 |
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/WinterGrass/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Winter Grass",
3 | "Author": "Cat",
4 | "Version": "2.0.3",
5 | "Description": "Grass will stay around in winter.",
6 | "UniqueID": "cat.wintergrass",
7 | "MinimumApiVersion": "3.8.0",
8 | "EntryDll": "WinterGrass.dll",
9 | "UpdateKeys": [ "Nexus:1601" ]
10 | }
11 |
--------------------------------------------------------------------------------