From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Fri, 24 Mar 2023 09:00:29 +0000 (+1300) Subject: Map-Init guidebook entities. (#14823) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=473a02120da959b001924bc3ca6cec608207d6d6;p=space-station-14.git Map-Init guidebook entities. (#14823) --- diff --git a/Content.Client/Guidebook/Controls/GuideEntityEmbed.xaml.cs b/Content.Client/Guidebook/Controls/GuideEntityEmbed.xaml.cs index 840ecb1323..34b4f3bdaa 100644 --- a/Content.Client/Guidebook/Controls/GuideEntityEmbed.xaml.cs +++ b/Content.Client/Guidebook/Controls/GuideEntityEmbed.xaml.cs @@ -171,6 +171,10 @@ public sealed partial class GuideEntityEmbed : BoxContainer, IDocumentTag Margin = new Thickness(4, 8); + // By default, we will map-initialize guidebook entities. + if (!args.TryGetValue("Init", out var mapInit) || !bool.Parse(mapInit)) + _entityManager.RunMapInit(ent, _entityManager.GetComponent(ent)); + control = this; return true; } diff --git a/Content.Server/Construction/ConstructionSystem.Graph.cs b/Content.Server/Construction/ConstructionSystem.Graph.cs index bd906ab539..4b5c530ae0 100644 --- a/Content.Server/Construction/ConstructionSystem.Graph.cs +++ b/Content.Server/Construction/ConstructionSystem.Graph.cs @@ -3,6 +3,7 @@ using Content.Server.Containers; using Content.Shared.Construction; using Content.Shared.Construction.Prototypes; using Content.Shared.Construction.Steps; +using Content.Shared.Containers; using Content.Shared.Database; using Robust.Server.Containers; using Robust.Shared.Containers; diff --git a/Content.Server/Containers/ContainerFillComponent.cs b/Content.Shared/Containers/ContainerFillComponent.cs similarity index 95% rename from Content.Server/Containers/ContainerFillComponent.cs rename to Content.Shared/Containers/ContainerFillComponent.cs index 26aee86e46..6d5fd93ed7 100644 --- a/Content.Server/Containers/ContainerFillComponent.cs +++ b/Content.Shared/Containers/ContainerFillComponent.cs @@ -1,7 +1,5 @@ -using Content.Server.Storage.Components; using Content.Shared.Storage; using Robust.Shared.Prototypes; -using Robust.Shared.Serialization; using Robust.Shared.Serialization.Manager; using Robust.Shared.Serialization.Markdown.Mapping; using Robust.Shared.Serialization.Markdown.Sequence; @@ -9,7 +7,7 @@ using Robust.Shared.Serialization.Markdown.Validation; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; using Robust.Shared.Serialization.TypeSerializers.Interfaces; -namespace Content.Server.Containers; +namespace Content.Shared.Containers; /// /// Component for spawning entity prototypes into containers on map init. diff --git a/Content.Server/Containers/ContainerFillSystem.cs b/Content.Shared/Containers/ContainerFillSystem.cs similarity index 97% rename from Content.Server/Containers/ContainerFillSystem.cs rename to Content.Shared/Containers/ContainerFillSystem.cs index 4ab1ca899a..aad0acaa61 100644 --- a/Content.Server/Containers/ContainerFillSystem.cs +++ b/Content.Shared/Containers/ContainerFillSystem.cs @@ -1,7 +1,7 @@ using Robust.Shared.Containers; using Robust.Shared.Map; -namespace Content.Server.Containers; +namespace Content.Shared.Containers; public sealed class ContainerFillSystem : EntitySystem {