Added dialogue block after persistent condition

This commit is contained in:
Nick J. Connors 2022-02-06 10:47:17 -05:00
parent 754af58b87
commit 31b2385156
4 changed files with 7 additions and 6 deletions

View File

@ -8,7 +8,8 @@
"position":{"x": -0.3071011, "y": 2.741472, "z": -4.005298},
"radius":1,
"xmlFile":"AssetBundle/WarpDriveDialogue.xml",
"remoteTriggerPosition": {"x": -0.05656214, "y": 0.5362684, "z": 0.5467669}
"remoteTriggerPosition": {"x": -0.05656214, "y": 0.5362684, "z": 0.5467669},
"blockAfterPersistentCondition" : "KnowsAboutWarpDrive"
}
]
}

View File

@ -15,6 +15,9 @@ namespace NewHorizons.Builder.Props
{
public static void Make(GameObject go, Sector sector, PropModule.DialogueInfo info, IModHelper mod)
{
if (PlayerData._currentGameSave.GetPersistentCondition(info.blockAfterPersistentCondition)) return;
var dialogue = MakeConversationZone(go, sector, info, mod);
if (info.remoteTriggerPosition != null) MakeRemoteDialogueTrigger(go, sector, info, dialogue);
}

View File

@ -66,7 +66,7 @@ namespace NewHorizons.External
public float radius = 1f;
public string xmlFile;
public MVector3 remoteTriggerPosition;
public string persistentCondition;
public string blockAfterPersistentCondition;
}
}
}

View File

@ -115,11 +115,8 @@ namespace NewHorizons
_shipWarpController = GameObject.Find("Ship_Body").AddComponent<ShipWarpController>();
Instance.ModHelper.Events.Unity.FireOnNextUpdate(() => ShipLogBuilder.Init());
if (!PlayerData._currentGameSave.GetPersistentCondition("KnowsAboutWarpDrive"))
{
LoadBody(LoadConfig(this, "AssetBundle/WarpDriveConfig.json"));
}
}
Instance.ModHelper.Events.Unity.FireOnNextUpdate(() => AstroObjectLocator.GetAstroObject("MapSatellite").gameObject.AddComponent<MapSatelliteOrbitFix>());