Example #1
0
        protected override void OnSubModuleLoad()
        {
            base.OnSubModuleLoad();
            _instance = this;

            try
            {
                new Harmony("org.aragas.bannerlord.mercenarycontract").PatchAll(typeof(MercenaryContractSubModule).Assembly);
            }
            catch (Exception ex)
            {
                CommunityPatchSubModule.Error(ex, "[Aragas.MercenaryContract]: Error while trying to initialize Harmony!");
            }

            var mercenarycontractSpriteData = SpriteDataFactory.CreateNewFromModule(
                "mercenarycontractSpriteData",
                UIResourceManager.UIResourceDepot);

            UIResourceManager.SpriteData.AppendFrom(mercenarycontractSpriteData);

            UIResourceManager.BrushFactory.ImportAndAppend(
                "Map.Notification.Type.Circle.Image",
                "MercenaryContractMapNotification",
                "Aragas.MercenaryContract.Map.Notification.Type.Circle.Image");
        }
Example #2
0
 protected override void OnSubModuleUnloaded()
 {
     _instance = null !;
     base.OnSubModuleUnloaded();
 }