v1.7.7.0 (Winter Update 2024)

This commit is contained in:
Regalis11
2024-12-11 13:26:13 +02:00
parent 7d5b7a310a
commit f6349b2175
256 changed files with 4794 additions and 1653 deletions
@@ -387,14 +387,14 @@ namespace Barotrauma
chairCheckTimer -= deltaTime;
if (chairCheckTimer <= 0.0f && character.SelectedSecondaryItem == null)
{
foreach (Item item in Item.ItemList)
foreach (Item chair in Item.ChairItems)
{
if (item.CurrentHull != currentHull || !item.HasTag(Tags.ChairItem)) { continue; }
if (chair.CurrentHull != currentHull) { continue; }
//not possible in vanilla game, but a mod might have holdable/attachable chairs
if (item.ParentInventory != null || item.body is { Enabled: true }) { continue; }
var controller = item.GetComponent<Controller>();
if (chair.ParentInventory != null || chair.body is { Enabled: true }) { continue; }
var controller = chair.GetComponent<Controller>();
if (controller == null || controller.User != null) { continue; }
item.TryInteract(character, forceSelectKey: true);
chair.TryInteract(character, forceSelectKey: true);
}
chairCheckTimer = chairCheckInterval;
}