Unstable 0.1300.0.9

This commit is contained in:
Markus Isberg
2021-04-13 16:58:13 +03:00
parent 86597456ca
commit f48dfb5862
30 changed files with 245 additions and 57 deletions
@@ -113,14 +113,16 @@ namespace Barotrauma
public static void OnSetSelectedConstruction(Character character, Item oldConstruction, Item newConstruction)
{
if (oldConstruction == newConstruction) { return; }
if (Character.Controlled != null && Character.Controlled == character && oldConstruction != null && oldConstruction.GetComponent<Ladder>() == null)
{
TimeStoppedInteracting = Timing.TotalTime;
}
if (newConstruction != null && newConstruction.GetComponent<Ladder>() == null)
{
OnStartedInteracting(character, newConstruction);
}
if (newConstruction == null) { return; }
if (newConstruction.GetComponent<Ladder>() != null) { return; }
if (newConstruction.GetComponent<ConnectionPanel>() is ConnectionPanel cp && cp.User == character) { return; }
OnStartedInteracting(character, newConstruction);
}
private static void OnStartedInteracting(Character character, Item item)
@@ -136,6 +138,9 @@ namespace Barotrauma
if (DisplayHint($"{hintIdentifierBase}.brokenitem")) { return; }
}
// Don't display other item-related hints if the repair interface is displayed
if (item.Repairables.Any(r => r.ShouldDrawHUD(character))) { return; }
// onstartedinteracting.lootingisstealing
if (item.Submarine?.Info?.Type == SubmarineType.Outpost &&
item.ContainedItems.Any(i => !i.AllowStealing))