Skip to content

Commit

Permalink
Fixed: Exception from new mod template.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed Sep 10, 2022
1 parent 348df46 commit 0884980
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<PackageType>Template</PackageType>
<PackageVersion>1.4.2</PackageVersion>
<PackageVersion>1.4.3</PackageVersion>
<PackageId>Reloaded.Mod.Templates</PackageId>
<Title>Reloaded-II Mod Templates</Title>
<Authors>Sewer56</Authors>
Expand Down
7 changes: 7 additions & 0 deletions source/Reloaded.Mod.Template/templates/configurable/Mod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public Mod(ModContext context)

// TODO: Implement some mod logic
}

#if (IncludeConfig)
#region Standard Overrides
public override void ConfigurationUpdated(Config configuration)
Expand All @@ -83,4 +84,10 @@ public override void ConfigurationUpdated(Config configuration)
}
#endregion
#endif

#region For Exports, Serialization etc.
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
public Mod() { }
#pragma warning restore CS8618
#endregion
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class Startup : IMod
/// <summary>
/// Encapsulates your mod logic.
/// </summary>
private ModBase _mod = null!;
private ModBase _mod = new Mod();

/// <summary>
/// Entry point for your mod.
Expand Down

0 comments on commit 0884980

Please sign in to comment.