/// <summary>Called when the mod registry is ready.</summary>
 /// <param name="registry">The mod registry.</param>
 public void ModRegistryReady(IModRegistry registry)
 {
     if (registry.IsLoaded("stokastic.PrismaticTools"))
     {
         this.prismaticToolsAPI = registry.GetApi<IPrismaticToolsAPI>("stokastic.PrismaticTools");
     }
 }
Exemplo n.º 2
0
        private void IntegratePrismaticTools()
        {
            IPrismaticToolsAPI api = theMod.helper.ModRegistry.GetApi <IPrismaticToolsAPI>("stokastic.PrismaticTools");

            if (api == null)
            {
                return;
            }
            theMod.defaultShapes.prismaticSprinkler = theMod.api.GetSquareCircle((uint)api.SprinklerRange);
        }
        public void ModRegistryReady(IModRegistry registry)
        {
            if (registry.IsLoaded("tZed.SimpleSprinkler"))
            {
                this.simpleSprinklersAPI = registry.GetApi <ISimpleSprinklersAPI>("tZed.SimpleSprinkler");
            }

            if (registry.IsLoaded("Speeder.BetterSprinklers"))
            {
                this.betterSprinklersAPI = registry.GetApi <IBetterSprinklersAPI>("Speeder.BetterSprinklers");
            }

            if (registry.IsLoaded("stokastic.PrismaticTools"))
            {
                this.prismaticToolsAPI = registry.GetApi <IPrismaticToolsAPI>("stokastic.PrismaticTools");
            }
        }
Exemplo n.º 4
0
        /// <summary>Raised after the game is launched, right before the first update tick.</summary>
        /// <param name="sender">The event sender.</param>
        /// <param name="e">The event arguments.</param>
        private void OnGameLaunched(object sender, EventArgs e)
        {
            if (this.helper.ModRegistry.IsLoaded("tZed.SimpleSprinkler"))
            {
                this.simpleSprinklersAPI = this.helper.ModRegistry.GetApi <ISimpleSprinklersAPI>("tZed.SimpleSprinkler");
            }

            if (this.helper.ModRegistry.IsLoaded("Speeder.BetterSprinklers"))
            {
                this.betterSprinklersAPI = this.helper.ModRegistry.GetApi <IBetterSprinklersAPI>("Speeder.BetterSprinklers");
            }

            if (this.helper.ModRegistry.IsLoaded("stokastic.PrismaticTools"))
            {
                this.prismaticToolsAPI = this.helper.ModRegistry.GetApi <IPrismaticToolsAPI>("stokastic.PrismaticTools");
            }
        }