Skip to content

Commit

Permalink
Mark method obsolete
Browse files Browse the repository at this point in the history
  • Loading branch information
xen-42 committed Dec 17, 2023
1 parent 725ccf0 commit 8e0fbbb
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions NewHorizons/Builder/Props/DetailBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ static DetailBuilder()
SceneManager.sceneUnloaded += SceneManager_sceneUnloaded;
}

#region obsolete
// Never change method signatures, people directly reference the NH dll and it can break backwards compatability
// In particular, Outer Wives needs this method signature
[Obsolete]
public static GameObject Make(GameObject go, Sector sector, GameObject prefab, DetailInfo detail)
=> Make(go, sector, null, prefab, detail);
#endregion

private static void SceneManager_sceneUnloaded(Scene scene)
{
foreach (var prefab in _fixedPrefabCache.Values)
Expand Down Expand Up @@ -78,11 +86,6 @@ public static GameObject Make(GameObject planetGO, Sector sector, IModBehaviour
}
}

// Never change method signatures, people directly reference the NH dll and it can break backwards compatability
// In particular, Outer Wives needs this method signature
public static GameObject Make(GameObject go, Sector sector, GameObject prefab, DetailInfo detail)
=> Make(go, sector, null, prefab, detail);

/// <summary>
/// Create a detail using a prefab.
/// </summary>
Expand Down

0 comments on commit 8e0fbbb

Please sign in to comment.