Skip to content

Commit

Permalink
Merge pull request #312 from CWolfs/develop
Browse files Browse the repository at this point in the history
Fix Nix and Mac issues
  • Loading branch information
CWolfs authored May 18, 2020
2 parents ace7270 + 820edab commit 2fd2f5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Core/DataManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private void LoadCustomContractTypeBuilds() {
foreach (string file in Directory.GetFiles(directory, "*.json*", SearchOption.AllDirectories)) {
string contractTypeBuildMapSource = File.ReadAllText(file);
JObject contractTypeMapBuild = JsonConvert.DeserializeObject<JObject>(contractTypeBuildMapSource, serialiserSettings);
string fileName = Path.GetFileNameWithoutExtension(file.Substring(file.LastIndexOf("\\")));
string fileName = Path.GetFileNameWithoutExtension(file.Substring(file.LastIndexOf("/")));

if (fileName == "common" || contractTypeMapBuild.ContainsKey("EncounterLayerId")) {
string encounterLayerId = (fileName == "common") ? fileName : (string)contractTypeMapBuild["EncounterLayerId"];
Expand Down Expand Up @@ -122,7 +122,7 @@ private void AddContractType(MetadataDatabase mdd, ContractType_MDD contractType

private void LoadEncounterLayers(string name) {
foreach (string file in Directory.GetFiles($"{ModDirectory}/overrides/encounterLayers/{name.ToLower()}", "*.json", SearchOption.AllDirectories)) {
Main.LogDebug($"[DataManager.LoadCustomContractTypes] Loading '{file.Substring(file.LastIndexOf('\\') + 1)}' custom encounter layer");
Main.LogDebug($"[DataManager.LoadCustomContractTypes] Loading '{file.Substring(file.LastIndexOf('/') + 1)}' custom encounter layer");
string encounterLayer = File.ReadAllText(file);
EncounterLayer encounterLayerData = JsonConvert.DeserializeObject<EncounterLayer>(encounterLayer, serialiserSettings);

Expand Down

0 comments on commit 2fd2f5e

Please sign in to comment.