forked from space-wizards/space-station-14
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleans up tag system (space-wizards#28272)
* Updated tag system * Added params methods * Fixed tag integration tests * Fixed params methods recursion * Revert has All/Any tag one argument realisation * Updated tag integration tests * Shit happens * Added individual List/HashSet methods, docs, tests
- Loading branch information
1 parent
ebd00f5
commit cfb1fdf
Showing
17 changed files
with
162 additions
and
127 deletions.
There are no files selected for viewing
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
Large diffs are not rendered by default.
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
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
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
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
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 |
---|---|---|
@@ -1,13 +1,11 @@ | ||
using Robust.Shared.GameStates; | ||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Shared.Tag | ||
namespace Content.Shared.Tag; | ||
|
||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(TagSystem))] | ||
public sealed partial class TagComponent : Component | ||
{ | ||
[RegisterComponent, NetworkedComponent, Access(typeof(TagSystem))] | ||
public sealed partial class TagComponent : Component | ||
{ | ||
[DataField("tags", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<TagPrototype>))] | ||
[Access(typeof(TagSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends | ||
public HashSet<string> Tags = new(); | ||
} | ||
[DataField, ViewVariables, AutoNetworkedField] | ||
public HashSet<ProtoId<TagPrototype>> Tags = new(); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Shared.Tag | ||
namespace Content.Shared.Tag; | ||
|
||
/// <summary> | ||
/// Prototype representing a tag in YAML. | ||
/// Meant to only have an ID property, as that is the only thing that | ||
/// gets saved in TagComponent. | ||
/// </summary> | ||
[Prototype("Tag")] | ||
public sealed partial class TagPrototype : IPrototype | ||
{ | ||
/// <summary> | ||
/// Prototype representing a tag in YAML. | ||
/// Meant to only have an ID property, as that is the only thing that | ||
/// gets saved in TagComponent. | ||
/// </summary> | ||
[Prototype("Tag")] | ||
public sealed partial class TagPrototype : IPrototype | ||
{ | ||
[ViewVariables] | ||
[IdDataField] | ||
public string ID { get; private set; } = default!; | ||
} | ||
[IdDataField, ViewVariables] | ||
public string ID { get; } = string.Empty; | ||
} |