(73da2532a) Only repairable items are indestructible in outposts (oxygen tanks, ammo boxes, etc can still deteriorate normally).

This commit is contained in:
Joonas Rikkonen
2019-04-15 11:57:28 +03:00
parent e80906f020
commit 4675f969f1
3 changed files with 5 additions and 2 deletions
@@ -4343,7 +4343,7 @@ namespace Barotrauma
GUITextBox xmlPathElement = null; GUITextBox xmlPathElement = null;
void UpdatePaths() void UpdatePaths()
{ {
string pathBase = $"Mods/Characters/{Name}/{Name}"; string pathBase = $"Content/Characters/{Name}/{Name}";
XMLPath = $"{pathBase}.xml"; XMLPath = $"{pathBase}.xml";
TexturePath = $"{pathBase}.png"; TexturePath = $"{pathBase}.png";
texturePathElement.Text = TexturePath; texturePathElement.Text = TexturePath;
@@ -417,7 +417,10 @@ namespace Barotrauma
if (me.Submarine != this) { continue; } if (me.Submarine != this) { continue; }
if (me is Item item) if (me is Item item)
{ {
item.Indestructible = true; if (item.GetComponent<Repairable>() != null)
{
item.Indestructible = true;
}
foreach (ItemComponent ic in item.Components) foreach (ItemComponent ic in item.Components)
{ {
if (ic is ConnectionPanel connectionPanel) if (ic is ConnectionPanel connectionPanel)
Binary file not shown.