Doors with no broken sprite turn black when destroyed (just like before). TODO: graphics for broken ruin doors/hatches
This commit is contained in:
@@ -87,6 +87,12 @@ namespace Barotrauma.Items.Components
|
|||||||
public void Draw(SpriteBatch spriteBatch, bool editing)
|
public void Draw(SpriteBatch spriteBatch, bool editing)
|
||||||
{
|
{
|
||||||
Color color = (item.IsSelected) ? Color.Green : Color.White;
|
Color color = (item.IsSelected) ? Color.Green : Color.White;
|
||||||
|
if (brokenSprite == null)
|
||||||
|
{
|
||||||
|
//broken doors turn black if no broken sprite has been configured
|
||||||
|
color = color * (item.Condition / item.Prefab.Health);
|
||||||
|
color.A = 255;
|
||||||
|
}
|
||||||
|
|
||||||
if (stuck > 0.0f && weldedSprite != null)
|
if (stuck > 0.0f && weldedSprite != null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user