-
Notifications
You must be signed in to change notification settings - Fork 524
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix Pseudo Code * Add PseudoItem shape, offset, rotation specifier --------- Co-authored-by: Whatstone <[email protected]>
- Loading branch information
Showing
19 changed files
with
454 additions
and
290 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
Content.Client/Nyanotrasen/Item/PseudoItem/PseudoItemSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
using Content.Shared.Nyanotrasen.Item.PseudoItem; | ||
|
||
namespace Content.Client.Nyanotrasen.Item.PseudoItem; | ||
|
||
public sealed class PseudoItemSystem : SharedPseudoItemSystem | ||
{ | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
Content.Server/Nyanotrasen/Item/PseudoItem/AllowsSleepInsideComponent.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
Content.Shared/Nyanotrasen/Item/Components/PseudoItemComponent.cs
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
Content.Shared/Nyanotrasen/Item/PseudoItem/AllowsSleepInsideComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace Content.Shared.Nyanotrasen.Item.PseudoItem; | ||
|
||
/// <summary> | ||
/// Signifies that pseudo-item creatures can sleep inside the container to which this component is applied. | ||
/// </summary> | ||
[RegisterComponent] | ||
public sealed partial class AllowsSleepInsideComponent : Component | ||
{ | ||
} |
36 changes: 36 additions & 0 deletions
36
Content.Shared/Nyanotrasen/Item/PseudoItem/PseudoItemComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using Content.Shared.Item; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Shared.Nyanotrasen.Item.PseudoItem; | ||
|
||
/// <summary> | ||
/// For entities that behave like an item under certain conditions, | ||
/// but not under most conditions. | ||
/// </summary> | ||
[RegisterComponent, AutoGenerateComponentState] | ||
public sealed partial class PseudoItemComponent : Component | ||
{ | ||
[DataField("size")] | ||
public ProtoId<ItemSizePrototype> Size = "Huge"; | ||
|
||
/// <summary> | ||
/// An optional override for the shape of the item within the grid storage. | ||
/// If null, a default shape will be used based on <see cref="Size"/>. | ||
/// </summary> | ||
[DataField, AutoNetworkedField] | ||
public List<Box2i>? Shape; | ||
|
||
[DataField, AutoNetworkedField] | ||
public Vector2i StoredOffset; | ||
|
||
[DataField, AutoNetworkedField] // Frontier | ||
public float StoredRotation; // Frontier | ||
|
||
public bool Active = false; | ||
|
||
/// <summary> | ||
/// Action for sleeping while inside a container with <see cref="AllowsSleepInsideComponent"/>. | ||
/// </summary> | ||
[DataField] | ||
public EntityUid? SleepAction; | ||
} |
Oops, something went wrong.