diff --git a/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs b/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs index 132a7cfc6..509675c09 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs @@ -60,11 +60,6 @@ namespace Barotrauma public CrewManager(XElement element, bool isSinglePlayer) : this(isSinglePlayer) - { - return characterListBox.Rect; - } - - partial void InitProjectSpecific() { guiFrame = new GUIFrame(new RectTransform(Vector2.One, GUICanvas.Instance), null, Color.Transparent) { diff --git a/Barotrauma/BarotraumaClient/Source/Items/Components/ItemComponent.cs b/Barotrauma/BarotraumaClient/Source/Items/Components/ItemComponent.cs index 5cd9780b0..cc9829018 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/Components/ItemComponent.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/Components/ItemComponent.cs @@ -175,142 +175,6 @@ namespace Barotrauma.Items.Components } } } - - public void ApplyTo(RectTransform target) - { - if (RelativeOffset.HasValue) - { - target.RelativeOffset = RelativeOffset.Value; - } - else if (AbsoluteOffset.HasValue) - { - target.AbsoluteOffset = AbsoluteOffset.Value; - } - if (RelativeSize.HasValue) - { - target.RelativeSize = RelativeSize.Value; - } - else if (AbsoluteSize.HasValue) - { - target.NonScaledSize = AbsoluteSize.Value; - } - if (Anchor.HasValue) - { - target.Anchor = Anchor.Value; - } - if (Pivot.HasValue) - { - target.Pivot = Pivot.Value; - } - else - { - target.Pivot = RectTransform.MatchPivotToAnchor(target.Anchor); - } - target.RecalculateChildren(true, true); - } - } - - public GUIFrame GuiFrame { get; protected set; } - - [Serialize(false, false)] - public bool AllowUIOverlap - { - get; - set; - } - - private ItemComponent linkToUIComponent; - [Serialize("", false)] - public string LinkUIToComponent - { - get; - set; - } - - [Serialize(0, false)] - public int HudPriority - { - get; - private set; - } - - private bool useAlternativeLayout; - public bool UseAlternativeLayout - { - get { return useAlternativeLayout; } - set - { - if (AlternativeLayout != null) - { - if (value == useAlternativeLayout) { return; } - useAlternativeLayout = value; - if (useAlternativeLayout) - { - AlternativeLayout?.ApplyTo(GuiFrame.RectTransform); - } - else - { - DefaultLayout?.ApplyTo(GuiFrame.RectTransform); - } - } - } - - public void ApplyTo(RectTransform target) - { - if (RelativeOffset.HasValue) - { - target.RelativeOffset = RelativeOffset.Value; - } - else if (AbsoluteOffset.HasValue) - { - target.AbsoluteOffset = AbsoluteOffset.Value; - } - if (RelativeSize.HasValue) - { - target.RelativeSize = RelativeSize.Value; - } - else if (AbsoluteSize.HasValue) - { - target.NonScaledSize = AbsoluteSize.Value; - } - if (Anchor.HasValue) - { - target.Anchor = Anchor.Value; - } - if (Pivot.HasValue) - { - target.Pivot = Pivot.Value; - } - else - { - target.Pivot = RectTransform.MatchPivotToAnchor(target.Anchor); - } - target.RecalculateChildren(true, true); - } - } - - public GUIFrame GuiFrame { get; protected set; } - - [Serialize(false, false)] - public bool AllowUIOverlap - { - get; - set; - } - - private ItemComponent linkToUIComponent; - [Serialize("", false)] - public string LinkUIToComponent - { - get; - set; - } - - [Serialize(0, false)] - public int HudPriority - { - get; - private set; } private bool shouldMuffleLooping; diff --git a/Barotrauma/BarotraumaClient/Source/Screens/SubEditorScreen.cs b/Barotrauma/BarotraumaClient/Source/Screens/SubEditorScreen.cs index cb7b9b7ef..056a001a7 100644 --- a/Barotrauma/BarotraumaClient/Source/Screens/SubEditorScreen.cs +++ b/Barotrauma/BarotraumaClient/Source/Screens/SubEditorScreen.cs @@ -1101,20 +1101,9 @@ namespace Barotrauma List contentPacks = Submarine.MainSub.RequiredContentPackages.ToList(); foreach (ContentPackage contentPack in ContentPackage.List) { - if (nameBox.Text.Contains(illegalChar)) - { - GUI.AddMessage(TextManager.Get("ItemAssemblyNameIllegalCharsWarning").Replace("[illegalchar]", illegalChar.ToString()), Color.Red); - nameBox.Flash(); - return false; - } + if (!contentPacks.Contains(contentPack.Name)) contentPacks.Add(contentPack.Name); } - var hideInMenusTickBox = nameBox.Parent.GetChildByUserData("hideinmenus") as GUITickBox; - bool hideInMenus = hideInMenusTickBox == null ? false : hideInMenusTickBox.Selected; - - string saveFolder = Path.Combine("Content", "Items", "Assemblies"); - string filePath = Path.Combine(saveFolder, nameBox.Text + ".xml"); - if (File.Exists(filePath)) { var cpTickBox = new GUITickBox(new RectTransform(new Vector2(0.2f, 0.2f), contentPackList.Content.RectTransform), contentPackageName, font: GUI.SmallFont) diff --git a/Barotrauma/BarotraumaShared/Submarines/Typhon.sub b/Barotrauma/BarotraumaShared/Submarines/Typhon.sub index 499651dbd..1113c5152 100644 Binary files a/Barotrauma/BarotraumaShared/Submarines/Typhon.sub and b/Barotrauma/BarotraumaShared/Submarines/Typhon.sub differ