Unstable 0.17.10.0

This commit is contained in:
Markus Isberg
2022-04-14 23:50:49 +09:00
parent 72328c29cb
commit cfe0d6cbc3
43 changed files with 624 additions and 723 deletions
@@ -1,10 +1,6 @@
#nullable enable
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Xml.Linq;
using Barotrauma.Extensions;
namespace Barotrauma
{
@@ -31,7 +27,10 @@ namespace Barotrauma
public void SaveTo(XElement element)
{
identifiers.ForEach(id => new XElement("Tutorial", new XAttribute("name", id.Value)));
foreach (var id in identifiers)
{
element.Add(new XElement("Tutorial", new XAttribute("name", id.Value)));
}
}
public bool Contains(Identifier identifier) => identifiers.Contains(identifier);
@@ -34,9 +34,11 @@ namespace Barotrauma
public bool Contains(Identifier identifier) => identifiers.Contains(identifier);
public void Add(Identifier identifier) => identifiers.Add(identifier);
public void Remove(Identifier identifier) => identifiers.Remove(identifier);
public void Clear() => identifiers.Clear();
public static IgnoredHints Instance { get; private set; } = new IgnoredHints();
}
}
@@ -655,7 +655,20 @@ namespace Barotrauma
new GUIButton(new RectTransform(new Vector2(1.0f, 1.0f), layout.RectTransform),
TextManager.Get("ResetInGameHints"), style: "GUIButtonSmall")
{
ToolTip = TextManager.Get("ResetInGameHintsTooltip")
OnClicked = (button, o) =>
{
var msgBox = new GUIMessageBox(TextManager.Get("ResetInGameHints"),
TextManager.Get("ResetInGameHintsTooltip"),
buttons: new[] { TextManager.Get("Yes"), TextManager.Get("No") });
msgBox.Buttons[0].OnClicked = (guiButton, o1) =>
{
IgnoredHints.Instance.Clear();
msgBox.Close();
return false;
};
msgBox.Buttons[1].OnClicked = msgBox.Close;
return false;
}
};
Spacer(layout);