Skip to content

Commit

Permalink
尝试修复神秘null bug
Browse files Browse the repository at this point in the history
  • Loading branch information
YukkuriC committed Mar 1, 2021
1 parent 83128e0 commit 402b90d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ModMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ static void UpgradeAssemblers(PlanetFactory self)

public static class Helper
{
public static bool Exists(this PlanetFactory self, int eid) => eid > 0 && self.entityPool[eid].id == eid && self.entityPool[eid].protoId > 0;

public static ERecipeType GetRecipeType(this PlanetFactory self, int idx)
{
var entity = self.entityPool[idx];
Expand Down Expand Up @@ -150,8 +152,6 @@ public static class SaveFixer
{
static Dictionary<ERecipeType, ItemProto> mapper;

public static bool Exists(this PlanetFactory self, int eid) => eid > 0 && self.entityPool[eid].id == eid;

public static void InitMapper()
{
mapper = new Dictionary<ERecipeType, ItemProto>();
Expand Down
2 changes: 1 addition & 1 deletion _Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ public partial class ModMain
{
const string UID = "yukkuric.dsp.bruteup";
const string NAME = "Brute Upgrade";
const string VERSION = "1.1.2.0";
const string VERSION = "1.1.3.0";
}
}

0 comments on commit 402b90d

Please sign in to comment.