using System.Collections.Generic; using Microsoft.Xna.Framework; using StardewModdingAPI; namespace Pathoschild.Stardew.Common.Integrations.SimpleSprinkler { /// Handles the logic for integrating with the Simple Sprinkler mod. internal class SimpleSprinklerIntegration : BaseIntegration { /********* ** Fields *********/ /// The mod's public API. private readonly ISimplerSprinklerApi ModApi; /********* ** Public methods *********/ /// Construct an instance. /// An API for fetching metadata about loaded mods. /// Encapsulates monitoring and logging. public SimpleSprinklerIntegration(IModRegistry modRegistry, IMonitor monitor) : base("Simple Sprinklers", "tZed.SimpleSprinkler", "1.6.0", modRegistry, monitor) { if (!this.IsLoaded) return; // get mod API this.ModApi = this.GetValidatedApi(); this.IsLoaded = this.ModApi != null; } /// Get the Sprinkler tiles relative to (0, 0), additive to the game's default sprinkler coverage. public IDictionary GetNewSprinklerTiles() { this.AssertLoaded(); return this.ModApi.GetNewSprinklerCoverage(); } } }