Prop build fixes

This commit is contained in:
Nick J. Connors 2022-02-02 17:12:15 -05:00
parent 5ac5391771
commit 028ee62987
3 changed files with 18 additions and 20 deletions

View File

@ -14,9 +14,7 @@ namespace NewHorizons.Builder.Props
{
public static class DetailBuilder
{
public static void Make(GameObject go, Sector sector, IPlanetConfig config, IModAssets assets, string uniqueModName)
{
foreach (var detail in config.Props.Details)
public static void Make(GameObject go, Sector sector, IPlanetConfig config, IModAssets assets, string uniqueModName, PropModule.DetailInfo detail)
{
if (detail.assetBundle != null)
{
@ -38,7 +36,6 @@ namespace NewHorizons.Builder.Props
}
else MakeDetail(go, sector, detail.path, detail.position, detail.rotation, detail.scale, detail.alignToNormal, detail.generateColliders);
}
}
public static GameObject MakeDetail(GameObject go, Sector sector, string propToClone, MVector3 position, MVector3 rotation, float scale, bool alignWithNormal, bool generateColliders)
{

View File

@ -28,13 +28,11 @@ namespace NewHorizons.Builder.Props
var dialogueTree = conversationZone.AddComponent<CharacterDialogueTree>();
// XML STUFF GOES HERE
var xml = System.IO.File.ReadAllText(Main.Instance.ModHelper.Manifest.ModFolderPath + info.xmlFile);
var text = new TextAsset(xml);
dialogueTree.SetTextXml(text);
addTranslations(xml);
AddTranslation(xml);
conversationZone.transform.parent = sector.transform;

View File

@ -23,7 +23,10 @@ namespace NewHorizons.Builder.Props
}
if(config.Props.Details != null)
{
DetailBuilder.Make(go, sector, config, assets, uniqueModName);
foreach (var detail in config.Props.Details)
{
DetailBuilder.Make(go, sector, config, assets, uniqueModName, detail);
}
}
if(config.Props.Geysers != null)
{