Фикс логики системы отражения (#682)
* Fixed ReflectSystem + Added logic for reflective items positioning * Total oppsie fix * Born to shitcode
This commit is contained in:
@@ -39,6 +39,22 @@ public sealed partial class ReflectComponent : Component
|
||||
[DataField]
|
||||
public bool Innate = false;
|
||||
|
||||
// WD START
|
||||
/// <summary>
|
||||
/// If the item for reflection needed in inventory slots only - select Body.
|
||||
/// If the item for reflection needed in hands only - select Hands.
|
||||
/// Otherwise it will reflect in any inventory position.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
public Placement Placement = Placement.Hands | Placement.Body;
|
||||
|
||||
/// <summary>
|
||||
/// Can only reflect when placed correctly.
|
||||
/// </summary>
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public bool InRightPlace = true;
|
||||
// WD END
|
||||
|
||||
/// <summary>
|
||||
/// Maximum probability for a projectile to be reflected.
|
||||
/// </summary>
|
||||
@@ -71,3 +87,11 @@ public enum ReflectType : byte
|
||||
NonEnergy = 1 << 0,
|
||||
Energy = 1 << 1,
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum Placement : byte
|
||||
{
|
||||
None = 0,
|
||||
Hands = 1 << 0,
|
||||
Body = 1 << 1,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user