v1.5.7.0 (Summer Update)
This commit is contained in:
+6
-2
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Barotrauma.Items.Components;
|
||||
|
||||
namespace Barotrauma;
|
||||
@@ -28,7 +29,8 @@ sealed class ConditionallyEditable : Editable
|
||||
OnlyByStatusEffectsAndNetwork,
|
||||
HasIntegratedButtons,
|
||||
IsToggleableController,
|
||||
HasConnectionPanel
|
||||
HasConnectionPanel,
|
||||
DeteriorateUnderStress
|
||||
}
|
||||
|
||||
public bool IsEditable(ISerializableEntity entity)
|
||||
@@ -55,10 +57,12 @@ sealed class ConditionallyEditable : Editable
|
||||
ConditionType.HasIntegratedButtons
|
||||
=> GetComponent<Door>(entity) is { HasIntegratedButtons: true },
|
||||
ConditionType.IsToggleableController
|
||||
=> GetComponent<Controller>(entity) is Controller { IsToggle: true } controller &&
|
||||
=> GetComponent<Controller>(entity) is Controller { IsToggle: true } controller &&
|
||||
controller.Item.GetComponent<ConnectionPanel>() != null,
|
||||
ConditionType.HasConnectionPanel
|
||||
=> GetComponent<ConnectionPanel>(entity) != null,
|
||||
ConditionType.DeteriorateUnderStress
|
||||
=> entity is Item repairableItem && repairableItem.Components.Any(c => c is IDeteriorateUnderStress),
|
||||
_
|
||||
=> false
|
||||
};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Barotrauma.Items.Components;
|
||||
|
||||
namespace Barotrauma;
|
||||
|
||||
@@ -11,8 +10,14 @@ class Editable : Attribute
|
||||
|
||||
public int MinValueInt = int.MinValue, MaxValueInt = int.MaxValue;
|
||||
public float MinValueFloat = float.MinValue, MaxValueFloat = float.MaxValue;
|
||||
public bool ForceShowPlusMinusButtons = false;
|
||||
public bool ForceShowPlusMinusButtons;
|
||||
public float ValueStep;
|
||||
|
||||
/// <summary>
|
||||
/// Should the value customized in the editor be applied to the new item swapped in place of this item.
|
||||
/// Used e.g. for transferring the auto operate properties from one turret to another installed on place of it.
|
||||
/// </summary>
|
||||
public bool TransferToSwappedItem;
|
||||
|
||||
/// <summary>
|
||||
/// Labels of the components of a vector property (defaults to x,y,z,w)
|
||||
|
||||
Reference in New Issue
Block a user