Ejemplo n.º 1
0
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.

    /// <inheritdoc />
    public override void Entry(IModHelper helper)
    {
        I18n.Init(helper.Translation);
        ModMonitor        = this.Monitor;
        TranslationHelper = helper.Translation;

        Config = AtraUtils.GetConfigOrDefault <ModConfig>(helper, this.Monitor);

        helper.Events.GameLoop.GameLaunched += this.OnGameLaunched;
        helper.Events.GameLoop.SaveLoaded   += this.OnSaveLoaded;
    }
Ejemplo n.º 2
0
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.

    /// <inheritdoc/>
    public override void Entry(IModHelper helper)
    {
        ModMonitor        = this.Monitor;
        GameContentHelper = helper.GameContent;
        I18n.Init(helper.Translation);
        Config = AtraUtils.GetConfigOrDefault <ModConfig>(helper, this.Monitor);

        helper.Events.GameLoop.GameLaunched += this.SetUpConfig;
        helper.Events.GameLoop.SaveLoaded   += this.OnSaveLoaded;

        helper.Events.Content.AssetRequested += this.OnAssetRequested;
        this.ApplyPatches(new Harmony(this.ModManifest.UniqueID));
    }