Faction Test v1.0.1.0
This commit is contained in:
@@ -298,7 +298,7 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
}
|
||||
|
||||
OrderPrefab[] reports = OrderPrefab.Prefabs.Where(o => o.IsReport && o.SymbolSprite != null && !o.Hidden).ToArray();
|
||||
OrderPrefab[] reports = OrderPrefab.Prefabs.Where(o => o.IsReport && o.SymbolSprite != null && !o.Hidden).OrderBy(o => o.Identifier).ToArray();
|
||||
|
||||
GUIFrame bottomFrame = new GUIFrame(new RectTransform(new Vector2(0.5f, 0.15f), paddedContainer.RectTransform, Anchor.BottomCenter) { MaxSize = new Point(int.MaxValue, GUI.IntScale(40)) }, style: null)
|
||||
{
|
||||
@@ -413,7 +413,7 @@ namespace Barotrauma.Items.Components
|
||||
var wire = it.GetComponent<Wire>();
|
||||
if (wire != null && wire.Connections.Any(c => c != null)) { return false; }
|
||||
|
||||
if (it.Container?.GetComponent<ItemContainer>() is { DrawInventory: false }) { return false; }
|
||||
if (it.Container?.GetComponent<ItemContainer>() is { DrawInventory: false } or { AllowAccess: false }) { return false; }
|
||||
|
||||
if (it.HasTag("traitormissionitem")) { return false; }
|
||||
|
||||
@@ -452,7 +452,7 @@ namespace Barotrauma.Items.Components
|
||||
foreach (var (entity, component) in electricalMapComponents)
|
||||
{
|
||||
GUIComponent parent = component.RectComponent;
|
||||
if (!(entity is Item it )) { continue; }
|
||||
if (entity is not Item it ) { continue; }
|
||||
Sprite? sprite = it.Prefab.UpgradePreviewSprite;
|
||||
if (sprite is null) { continue; }
|
||||
|
||||
@@ -476,7 +476,7 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
if (!hullPointsOfInterest.Contains(entity)) { continue; }
|
||||
|
||||
if (!(entity is Item it)) { continue; }
|
||||
if (entity is not Item it) { continue; }
|
||||
const int borderMaxSize = 2;
|
||||
|
||||
if (it.GetComponent<Door>() is { })
|
||||
@@ -643,7 +643,7 @@ namespace Barotrauma.Items.Components
|
||||
elementSize = GuiFrame.Rect.Size;
|
||||
}
|
||||
|
||||
float distort = 1.0f - item.Condition / item.MaxCondition;
|
||||
float distort = item.Repairables.Any(r => r.IsBelowRepairThreshold) ? 1.0f - item.Condition / item.MaxCondition : 0.0f;
|
||||
foreach (HullData hullData in hullDatas.Values)
|
||||
{
|
||||
hullData.DistortionTimer -= deltaTime;
|
||||
@@ -1130,7 +1130,7 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
foreach (var (entity, miniMapGuiComponent) in electricalMapComponents)
|
||||
{
|
||||
if (!(entity is Item it)) { continue; }
|
||||
if (entity is not Item it) { continue; }
|
||||
if (!electricalChildren.TryGetValue(miniMapGuiComponent, out GUIComponent? component)) { continue; }
|
||||
|
||||
if (entity.Removed)
|
||||
@@ -1220,7 +1220,7 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
foreach (var (entity, component) in hullStatusComponents)
|
||||
{
|
||||
if (!(entity is Hull hull)) { continue; }
|
||||
if (entity is not Hull hull) { continue; }
|
||||
if (!hullDatas.TryGetValue(hull, out HullData? hullData) || hullData is null) { continue; }
|
||||
|
||||
if (hullData.Distort) { continue; }
|
||||
|
||||
Reference in New Issue
Block a user