(e8befa230) Added: Unlocking of tutorials one by one. Fixed: EngineerTutorial's submarine reactor not starting properly in the off-state
This commit is contained in:
+2
-2
@@ -165,9 +165,9 @@ namespace Barotrauma.Tutorials
|
|||||||
{
|
{
|
||||||
yield return null;
|
yield return null;
|
||||||
GameMain.GameSession.CrewManager.HighlightOrderButton(captain_mechanic, "repairsystems", highlightColor, new Vector2(5, 5));
|
GameMain.GameSession.CrewManager.HighlightOrderButton(captain_mechanic, "repairsystems", highlightColor, new Vector2(5, 5));
|
||||||
//HighlightOrderOption("jobspecific");
|
HighlightOrderOption("jobspecific");
|
||||||
}
|
}
|
||||||
while (!HasOrder(captain_mechanic, "repairsystems"));
|
while (!HasOrder(captain_mechanic, "repairsystems", "jobspecific"));
|
||||||
RemoveCompletedObjective(segments[1]);
|
RemoveCompletedObjective(segments[1]);
|
||||||
yield return new WaitForSeconds(2f, false);
|
yield return new WaitForSeconds(2f, false);
|
||||||
TriggerTutorialSegment(2);
|
TriggerTutorialSegment(2);
|
||||||
|
|||||||
@@ -193,6 +193,7 @@ namespace Barotrauma.Tutorials
|
|||||||
engineer_submarineJunctionBox_2 = Item.ItemList.Find(i => i.HasTag("engineer_submarinejunctionbox_2"));
|
engineer_submarineJunctionBox_2 = Item.ItemList.Find(i => i.HasTag("engineer_submarinejunctionbox_2"));
|
||||||
engineer_submarineJunctionBox_3 = Item.ItemList.Find(i => i.HasTag("engineer_submarinejunctionbox_3"));
|
engineer_submarineJunctionBox_3 = Item.ItemList.Find(i => i.HasTag("engineer_submarinejunctionbox_3"));
|
||||||
engineer_submarineReactor = Item.ItemList.Find(i => i.HasTag("engineer_submarinereactor")).GetComponent<Reactor>();
|
engineer_submarineReactor = Item.ItemList.Find(i => i.HasTag("engineer_submarinereactor")).GetComponent<Reactor>();
|
||||||
|
engineer_submarineReactor.OnOffSwitch.BarScrollValue = .25f;
|
||||||
engineer_submarineReactor.IsActive = engineer_submarineReactor.AutoTemp = false;
|
engineer_submarineReactor.IsActive = engineer_submarineReactor.AutoTemp = false;
|
||||||
|
|
||||||
engineer_submarineJunctionBox_1.Indestructible = false;
|
engineer_submarineJunctionBox_1.Indestructible = false;
|
||||||
|
|||||||
@@ -330,6 +330,7 @@ namespace Barotrauma.Tutorials
|
|||||||
do { yield return null; } while (mechanic_brokenhull_1.WaterPercentage > waterVolumeBeforeOpening); // Unlock door once drained
|
do { yield return null; } while (mechanic_brokenhull_1.WaterPercentage > waterVolumeBeforeOpening); // Unlock door once drained
|
||||||
RemoveCompletedObjective(segments[3]);
|
RemoveCompletedObjective(segments[3]);
|
||||||
SetDoorAccess(mechanic_thirdDoor, mechanic_thirdDoorLight, true);
|
SetDoorAccess(mechanic_thirdDoor, mechanic_thirdDoorLight, true);
|
||||||
|
yield return new WaitForSeconds(1.5f, false);
|
||||||
//TriggerTutorialSegment(11, GameMain.Config.KeyBind(InputType.Select), GameMain.Config.KeyBind(InputType.Up), GameMain.Config.KeyBind(InputType.Down), GameMain.Config.KeyBind(InputType.Select)); // Ladder objective
|
//TriggerTutorialSegment(11, GameMain.Config.KeyBind(InputType.Select), GameMain.Config.KeyBind(InputType.Up), GameMain.Config.KeyBind(InputType.Down), GameMain.Config.KeyBind(InputType.Select)); // Ladder objective
|
||||||
//do { yield return null; } while (!mechanic_ladderSensor.MotionDetected);
|
//do { yield return null; } while (!mechanic_ladderSensor.MotionDetected);
|
||||||
//RemoveCompletedObjective(segments[11]);
|
//RemoveCompletedObjective(segments[11]);
|
||||||
|
|||||||
@@ -521,7 +521,20 @@ namespace Barotrauma
|
|||||||
GUIButton otherButton = child as GUIButton;
|
GUIButton otherButton = child as GUIButton;
|
||||||
if (otherButton == null || otherButton == button) continue;
|
if (otherButton == null || otherButton == button) continue;
|
||||||
|
|
||||||
otherButton.Selected = false;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool ReturnToMainMenu(GUIButton button, object obj)
|
||||||
|
{
|
||||||
|
GUI.PreventPauseMenuToggle = false;
|
||||||
|
|
||||||
|
if (Selected != this)
|
||||||
|
{
|
||||||
|
Select();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ResetButtonStates(button);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@@ -584,11 +597,28 @@ namespace Barotrauma
|
|||||||
private void UpdateTutorialList()
|
private void UpdateTutorialList()
|
||||||
{
|
{
|
||||||
var tutorialList = menuTabs[(int)Tab.Tutorials].GetChild<GUIListBox>();
|
var tutorialList = menuTabs[(int)Tab.Tutorials].GetChild<GUIListBox>();
|
||||||
|
|
||||||
|
int completedTutorials = 0;
|
||||||
|
|
||||||
foreach (GUITextBlock tutorialText in tutorialList.Content.Children)
|
foreach (GUITextBlock tutorialText in tutorialList.Content.Children)
|
||||||
{
|
{
|
||||||
if (((Tutorial)tutorialText.UserData).Completed)
|
if (((Tutorial)tutorialText.UserData).Completed)
|
||||||
{
|
{
|
||||||
tutorialText.TextColor = Color.LightGreen;
|
completedTutorials++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < tutorialList.Content.Children.Count(); i++)
|
||||||
|
{
|
||||||
|
if (i < completedTutorials + 1)
|
||||||
|
{
|
||||||
|
(tutorialList.Content.GetChild(i) as GUITextBlock).TextColor = Color.LightGreen;
|
||||||
|
(tutorialList.Content.GetChild(i) as GUITextBlock).CanBeFocused = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
(tutorialList.Content.GetChild(i) as GUITextBlock).TextColor = Color.Gray;
|
||||||
|
(tutorialList.Content.GetChild(i) as GUITextBlock).CanBeFocused = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user