Ejemplo n.º 1
0
 public override void Entry(IModHelper helper)
 {
     VersionChecker.AddCheck("FurnitureAnywhere", typeof(FurnitureAnywhereMod).Assembly.GetName().Version, "https://raw.githubusercontent.com/Entoarox/StardewMods/master/VersionChecker/FurnitureAnywhere.json");
     MoreEvents.ActiveItemChanged          += MoreEvents_ActiveItemChanged;
     LocationEvents.CurrentLocationChanged += TriggerItemChangedEvent;
     MenuEvents.MenuChanged += TriggerItemChangedEvent;
     MenuEvents.MenuClosed  += TriggerItemChangedEvent;
     SaveEvents.BeforeSave  += SaveEvents_BeforeSave;
     SaveEvents.AfterSave   += SaveEvents_AfterSave_AfterLoad;
     SaveEvents.AfterLoad   += SaveEvents_AfterSave_AfterLoad;
     EntoFramework.GetTypeRegistry().RegisterType <AnywhereFurniture>();
 }
Ejemplo n.º 2
0
        public override void Entry(IModHelper helper)
        {
            ModPath   = helper.DirectoryPath;
            Logger    = Monitor;
            Localizer = helper.Translation;
            VersionChecker.AddCheck("AdvancedLocationLoader", GetType().Assembly.GetName().Version, "https://raw.githubusercontent.com/Entoarox/StardewMods/master/VersionChecker/AdvancedLocationLoader.json");

            GameEvents.UpdateTick                 += FirstUpdateTick;
            MoreEvents.ActionTriggered            += Events.MoreEvents_ActionTriggered;
            MoreEvents.WorldReady                 += Events.MoreEvents_WorldReady;
            LocationEvents.CurrentLocationChanged += Events.LocationEvents_CurrentLocationChanged;

            ITypeRegistry registry = EntoFramework.GetTypeRegistry();

            registry.RegisterType <Locations.Greenhouse>();
            registry.RegisterType <Locations.Sewer>();
            registry.RegisterType <Locations.Desert>();
            registry.RegisterType <Locations.DecoratableLocation>();
        }