(5d9bdaea4) Deterioration values (timer, deterioration rate, whether the timer is currently running, item condition) are visible in debugdraw, fixed items that should only deteriorate for X seconds after being used deteriorating continuously

This commit is contained in:
Joonas Rikkonen
2019-04-08 15:59:53 +03:00
parent 28f2c00255
commit 4902de606b
3 changed files with 41 additions and 5 deletions
@@ -66,6 +66,14 @@ namespace Barotrauma.Items.Components
set;
}
//if enabled, the deterioration timer will always run regardless if the item is being used or not
[Serialize(false, false)]
public bool DeteriorateAlways
{
get;
set;
}
private Character currentFixer;
public Character CurrentFixer
{
@@ -221,7 +229,7 @@ namespace Barotrauma.Items.Components
}
}
return true;
return DeteriorateAlways;
}
private void UpdateFixAnimation(Character character)