From 4c83e5a598c6b062d27b0db9838f42d1b924d92c Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Tue, 16 Apr 2019 17:10:54 +0300 Subject: [PATCH] (98d8107fe) Fixed server failing to set items' treatment suitabilities because afflictions were loaded after the items --- .../BarotraumaClient/Source/Items/Item.cs | 25 ------------------- .../BarotraumaServer/Source/GameMain.cs | 2 +- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/Barotrauma/BarotraumaClient/Source/Items/Item.cs b/Barotrauma/BarotraumaClient/Source/Items/Item.cs index 951ff5db3..c0e0029d7 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/Item.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/Item.cs @@ -67,31 +67,6 @@ namespace Barotrauma public float SpriteRotation; - private GUITextBlock itemInUseWarning; - private GUITextBlock ItemInUseWarning - { - get - { - if (itemInUseWarning == null) - { - itemInUseWarning = new GUITextBlock(new RectTransform(new Point(10), GUI.Canvas), "", - textColor: Color.Orange, color: Color.Black, - textAlignment:Alignment.Center, style: "OuterGlow"); - } - return itemInUseWarning; - } - } - - public override bool SelectableInEditor - { - get - { - return parentInventory == null && (body == null || body.Enabled) && ShowItems; - } - } - - public float SpriteRotation; - public Color GetSpriteColor() { Color color = spriteColor; diff --git a/Barotrauma/BarotraumaServer/Source/GameMain.cs b/Barotrauma/BarotraumaServer/Source/GameMain.cs index 6d44fd936..53e3623d6 100644 --- a/Barotrauma/BarotraumaServer/Source/GameMain.cs +++ b/Barotrauma/BarotraumaServer/Source/GameMain.cs @@ -83,6 +83,7 @@ namespace Barotrauma LevelGenerationParams.LoadPresets(); ScriptedEventSet.LoadPrefabs(); + AfflictionPrefab.LoadAll(GetFilesOfType(ContentType.Afflictions)); StructurePrefab.LoadAll(GetFilesOfType(ContentType.Structure)); ItemPrefab.LoadAll(GetFilesOfType(ContentType.Item)); JobPrefab.LoadAll(GetFilesOfType(ContentType.Jobs)); @@ -90,7 +91,6 @@ namespace Barotrauma NPCConversation.LoadAll(GetFilesOfType(ContentType.NPCConversations)); ItemAssemblyPrefab.LoadAll(); LevelObjectPrefab.LoadAll(); - AfflictionPrefab.LoadAll(GetFilesOfType(ContentType.Afflictions)); GameModePreset.Init(); LocationType.Init();