2021-07-12 01:32:10 -07:00
|
|
|
using Robust.Shared.GameStates;
|
2020-03-03 19:10:07 +01:00
|
|
|
using Robust.Shared.Serialization;
|
2020-03-03 18:04:16 +01:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Shared.Ghost
|
2020-03-03 18:04:16 +01:00
|
|
|
{
|
2023-04-14 19:46:17 +00:00
|
|
|
[NetworkedComponent]
|
|
|
|
|
[AutoGenerateComponentState]
|
|
|
|
|
public abstract partial class SharedGhostComponent : Component
|
2020-03-03 18:04:16 +01:00
|
|
|
{
|
2023-04-14 19:46:17 +00:00
|
|
|
// TODO: instead of this funny stuff just give it access and update in system dirtying when needed
|
2021-08-22 20:14:52 -07:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public bool CanGhostInteract
|
|
|
|
|
{
|
|
|
|
|
get => _canGhostInteract;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (_canGhostInteract == value) return;
|
|
|
|
|
_canGhostInteract = value;
|
|
|
|
|
Dirty();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-14 19:46:17 +00:00
|
|
|
[DataField("canInteract"), AutoNetworkedField]
|
2021-08-22 20:14:52 -07:00
|
|
|
private bool _canGhostInteract;
|
|
|
|
|
|
2021-06-18 09:56:23 +02:00
|
|
|
/// <summary>
|
2021-08-06 00:02:36 -07:00
|
|
|
/// Changed by <see cref="SharedGhostSystem.SetCanReturnToBody"/>
|
2021-06-18 09:56:23 +02:00
|
|
|
/// </summary>
|
2021-08-06 00:02:36 -07:00
|
|
|
// TODO MIRROR change this to use friend classes when thats merged
|
2021-06-18 09:56:23 +02:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2021-08-22 20:14:52 -07:00
|
|
|
public bool CanReturnToBody
|
|
|
|
|
{
|
|
|
|
|
get => _canReturnToBody;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (_canReturnToBody == value) return;
|
|
|
|
|
_canReturnToBody = value;
|
|
|
|
|
Dirty();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-14 19:46:17 +00:00
|
|
|
[DataField("canReturnToBody"), AutoNetworkedField]
|
2021-08-22 20:14:52 -07:00
|
|
|
private bool _canReturnToBody;
|
2020-03-03 18:04:16 +01:00
|
|
|
}
|
|
|
|
|
}
|
2020-10-16 13:36:20 -05:00
|
|
|
|
|
|
|
|
|