(073c09b0f) Don't allow signals to deactivate Repairables (made it impossible to fix hatches on some vanilla subs because the signals kept the Repairable inactive, preventing the repair state from being updated)

This commit is contained in:
Joonas Rikkonen
2019-05-06 11:40:06 +03:00
parent 836acc0814
commit 1e666a5a0d
4 changed files with 66 additions and 216 deletions
@@ -241,5 +241,12 @@ namespace Barotrauma.Items.Components
{
character.AnimController.UpdateUseItem(false, item.WorldPosition + new Vector2(0.0f, 100.0f) * ((item.Condition / item.MaxCondition) % 0.1f));
}
public override void ReceiveSignal(int stepsTaken, string signal, Connection connection, Item source, Character sender, float power = 0, float signalStrength = 1)
{
//do nothing
//Repairables should always stay active, so we don't want to use the default behavior
//where set_active/set_state signals can disable the component
}
}
}