From 965de89362bd30f7f31344755a99ed4fc831bda9 Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Mon, 11 Sep 2023 12:45:35 +1200 Subject: [PATCH] Fix actions not initially appearing (#19990) --- Content.Client/Actions/ActionsSystem.cs | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/Content.Client/Actions/ActionsSystem.cs b/Content.Client/Actions/ActionsSystem.cs index c95ce2d526..07b0e6331d 100644 --- a/Content.Client/Actions/ActionsSystem.cs +++ b/Content.Client/Actions/ActionsSystem.cs @@ -67,7 +67,7 @@ namespace Content.Client.Actions return; component.Actions.Clear(); - component.Actions.UnionWith(GetEntitySet(state.Actions)); + component.Actions.UnionWith(EnsureEntitySet(state.Actions, uid)); _actionHoldersQueue.Enqueue(uid); } @@ -200,28 +200,6 @@ namespace Content.Client.Actions } } - /*public void SaveActionAssignments(string path) - { - - // Currently only tested with temporary innate actions (i.e., mapping actions). No guarantee it works with - // other actions. If its meant to be used for full game state saving/loading, the entity that provides - // actions needs to keep the same uid. - - var sequence = new SequenceDataNode(); - - foreach (var (action, assigns) in Assignments.Assignments) - { - var slot = new MappingDataNode(); - slot.Add("action", _serializationManager.WriteValue(action)); - slot.Add("assignments", _serializationManager.WriteValue(assigns)); - sequence.Add(slot); - } - - using var writer = _resourceManager.UserData.OpenWriteText(new ResourcePath(path).ToRootedPath()); - var stream = new YamlStream { new(sequence.ToSequenceNode()) }; - stream.Save(new YamlMappingFix(new Emitter(writer)), false); - }*/ - /// /// Load actions and their toolbar assignments from a file. /// -- 2.51.2