(f0d812055) v0.9.9.0
This commit is contained in:
@@ -246,7 +246,7 @@ namespace Barotrauma.Tutorials
|
||||
{
|
||||
//captain_navConsoleCustomInterface.HighlightElement(0, uiHighlightColor, duration: 1.0f, pulsateAmount: 0.0f);
|
||||
yield return new WaitForSeconds(1.0f, false);
|
||||
} while (!Submarine.MainSub.AtEndPosition || Submarine.MainSub.DockedTo.Any());
|
||||
} while (!Submarine.MainSub.AtEndPosition || !Submarine.MainSub.DockedTo.Any());
|
||||
RemoveCompletedObjective(segments[6]);
|
||||
yield return new WaitForSeconds(3f, false);
|
||||
GameMain.GameSession?.CrewManager.AddSinglePlayerChatMessage(radioSpeakerName, TextManager.GetWithVariable("Captain.Radio.Complete", "[OUTPOSTNAME]", GameMain.GameSession.EndLocation.Name), ChatMessageType.Radio, null);
|
||||
@@ -284,7 +284,9 @@ namespace Barotrauma.Tutorials
|
||||
|
||||
private bool IsSelectedItem(Item item)
|
||||
{
|
||||
return captain?.SelectedConstruction == item;
|
||||
return
|
||||
captain?.SelectedConstruction == item ||
|
||||
(captain?.SelectedConstruction?.linkedTo?.Contains(item) ?? false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ namespace Barotrauma.Tutorials
|
||||
//yield return new WaitForSeconds(2.5f);
|
||||
|
||||
doctor.SetStun(1.5f);
|
||||
var explosion = new Explosion(range: 100, force: 10, damage: 0, structureDamage: 0);
|
||||
var explosion = new Explosion(range: 100, force: 10, damage: 0, structureDamage: 0, itemDamage: 0);
|
||||
explosion.DisableParticles();
|
||||
GameMain.GameScreen.Cam.Shake = shakeAmount;
|
||||
explosion.Explode(Character.Controlled.WorldPosition - Vector2.UnitX * 25, null);
|
||||
|
||||
@@ -21,8 +21,8 @@ namespace Barotrauma.Tutorials
|
||||
private string levelSeed;
|
||||
private string levelParams;
|
||||
|
||||
private Submarine startOutpost = null;
|
||||
private Submarine endOutpost = null;
|
||||
private SubmarineInfo startOutpost = null;
|
||||
private SubmarineInfo endOutpost = null;
|
||||
private bool currentTutorialCompleted = false;
|
||||
private float fadeOutTime = 3f;
|
||||
protected float waitBeforeFade = 4f;
|
||||
@@ -56,13 +56,13 @@ namespace Barotrauma.Tutorials
|
||||
|
||||
private IEnumerable<object> Loading()
|
||||
{
|
||||
Submarine.MainSub = Submarine.Load(submarinePath, "", true);
|
||||
SubmarineInfo subInfo = new SubmarineInfo(submarinePath);
|
||||
|
||||
LevelGenerationParams generationParams = LevelGenerationParams.LevelParams.Find(p => p.Name == levelParams);
|
||||
|
||||
yield return CoroutineStatus.Running;
|
||||
|
||||
GameMain.GameSession = new GameSession(Submarine.MainSub, "",
|
||||
GameMain.GameSession = new GameSession(subInfo, "",
|
||||
GameModePreset.List.Find(g => g.Identifier == "tutorial"));
|
||||
(GameMain.GameSession.GameMode as TutorialMode).Tutorial = this;
|
||||
|
||||
@@ -72,12 +72,12 @@ namespace Barotrauma.Tutorials
|
||||
|
||||
if (startOutpostPath != string.Empty)
|
||||
{
|
||||
startOutpost = Submarine.Load(startOutpostPath, "", false);
|
||||
startOutpost = new SubmarineInfo(startOutpostPath);
|
||||
}
|
||||
|
||||
if (endOutpostPath != string.Empty)
|
||||
{
|
||||
endOutpost = Submarine.Load(endOutpostPath, "", false);
|
||||
endOutpost = new SubmarineInfo(endOutpostPath);
|
||||
}
|
||||
|
||||
Level tutorialLevel = new Level(levelSeed, 0, 0, generationParams, biome, startOutpost, endOutpost);
|
||||
@@ -160,11 +160,11 @@ namespace Barotrauma.Tutorials
|
||||
switch (this.spawnSub)
|
||||
{
|
||||
case "startoutpost":
|
||||
spawnSub = startOutpost;
|
||||
spawnSub = Level.Loaded.StartOutpost;
|
||||
break;
|
||||
|
||||
case "endoutpost":
|
||||
spawnSub = endOutpost;
|
||||
spawnSub = Level.Loaded.EndOutpost;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -533,15 +533,15 @@ namespace Barotrauma.Tutorials
|
||||
titleBlock.RectTransform.IsFixedSize = true;
|
||||
}
|
||||
|
||||
List<ColorData> colorData = ColorData.GetColorData(text, out text);
|
||||
List<RichTextData> richTextData = RichTextData.GetRichTextData(text, out text);
|
||||
GUITextBlock textBlock;
|
||||
if (colorData == null)
|
||||
if (richTextData == null)
|
||||
{
|
||||
textBlock = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), infoContent.RectTransform), " " + text, wrap: true);
|
||||
}
|
||||
else
|
||||
{
|
||||
textBlock = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), infoContent.RectTransform), colorData, " " + text, wrap: true);
|
||||
textBlock = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), infoContent.RectTransform), richTextData, " " + text, wrap: true);
|
||||
}
|
||||
|
||||
textBlock.RectTransform.IsFixedSize = true;
|
||||
|
||||
Reference in New Issue
Block a user