From 432c9578be79b611b9f71ce0337aeee351fc7cbd Mon Sep 17 00:00:00 2001 From: Errant <35878406+Errant-4@users.noreply.github.com> Date: Sat, 6 Dec 2025 16:45:50 +0100 Subject: [PATCH] move GameMapPrototype and GameMapCondition to shared (#41742) * move GameMapPrototype and GameMapCondition to shared * fix --- Content.Benchmarks/MapLoadBenchmark.cs | 2 +- Content.IntegrationTests/Tests/PostMapInitTest.cs | 2 +- Content.IntegrationTests/Tests/Power/StationPowerTests.cs | 2 +- Content.IntegrationTests/Tests/Station/StationJobsTest.cs | 2 +- Content.MapRenderer/Program.cs | 2 +- Content.MapRenderer/RenderMap.cs | 2 +- Content.Server/Administration/Commands/LoadGameMapCommand.cs | 2 +- Content.Server/GameTicking/Commands/ForceMapCommand.cs | 1 + Content.Server/GameTicking/GameTicker.GamePreset.cs | 1 + Content.Server/GameTicking/GameTicker.RoundFlow.cs | 1 + .../GameTicking/Rules/Components/LoadMapRuleComponent.cs | 3 +-- Content.Server/Maps/Conditions/HolidayMapCondition.cs | 1 + Content.Server/Maps/GameMapManager.cs | 1 + Content.Server/Maps/GameMapPoolPrototype.cs | 1 + Content.Server/Maps/IGameMapManager.cs | 2 ++ Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs | 2 +- {Content.Server => Content.Shared}/Maps/GameMapCondition.cs | 2 +- .../Maps/GameMapPrototype.MapSelection.cs | 2 +- {Content.Server => Content.Shared}/Maps/GameMapPrototype.cs | 2 +- 19 files changed, 20 insertions(+), 13 deletions(-) rename {Content.Server => Content.Shared}/Maps/GameMapCondition.cs (87%) rename {Content.Server => Content.Shared}/Maps/GameMapPrototype.MapSelection.cs (96%) rename {Content.Server => Content.Shared}/Maps/GameMapPrototype.cs (98%) diff --git a/Content.Benchmarks/MapLoadBenchmark.cs b/Content.Benchmarks/MapLoadBenchmark.cs index 3d527953b8..261d408aac 100644 --- a/Content.Benchmarks/MapLoadBenchmark.cs +++ b/Content.Benchmarks/MapLoadBenchmark.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using BenchmarkDotNet.Attributes; using Content.IntegrationTests; using Content.IntegrationTests.Pair; -using Content.Server.Maps; +using Content.Shared.Maps; using Robust.Shared; using Robust.Shared.Analyzers; using Robust.Shared.EntitySerialization.Systems; diff --git a/Content.IntegrationTests/Tests/PostMapInitTest.cs b/Content.IntegrationTests/Tests/PostMapInitTest.cs index f75c848377..03502d1bfb 100644 --- a/Content.IntegrationTests/Tests/PostMapInitTest.cs +++ b/Content.IntegrationTests/Tests/PostMapInitTest.cs @@ -5,12 +5,12 @@ using System.Text.RegularExpressions; using YamlDotNet.RepresentationModel; using Content.Server.Administration.Systems; using Content.Server.GameTicking; -using Content.Server.Maps; using Content.Server.Shuttles.Components; using Content.Server.Shuttles.Systems; using Content.Server.Spawners.Components; using Content.Server.Station.Components; using Content.Shared.CCVar; +using Content.Shared.Maps; using Content.Shared.Roles; using Content.Shared.Station.Components; using Robust.Shared.Configuration; diff --git a/Content.IntegrationTests/Tests/Power/StationPowerTests.cs b/Content.IntegrationTests/Tests/Power/StationPowerTests.cs index a2231ce60f..542a4645c6 100644 --- a/Content.IntegrationTests/Tests/Power/StationPowerTests.cs +++ b/Content.IntegrationTests/Tests/Power/StationPowerTests.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.Linq; using Content.Server.GameTicking; -using Content.Server.Maps; using Content.Server.Power.Components; using Content.Server.Power.NodeGroups; using Content.Server.Power.Pow3r; +using Content.Shared.Maps; using Content.Shared.Power.Components; using Content.Shared.NodeContainer; using Robust.Server.GameObjects; diff --git a/Content.IntegrationTests/Tests/Station/StationJobsTest.cs b/Content.IntegrationTests/Tests/Station/StationJobsTest.cs index 3fee4a146c..4abd32bda0 100644 --- a/Content.IntegrationTests/Tests/Station/StationJobsTest.cs +++ b/Content.IntegrationTests/Tests/Station/StationJobsTest.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; -using Content.Server.Maps; using Content.Server.Station.Components; using Content.Server.Station.Systems; +using Content.Shared.Maps; using Content.Shared.Preferences; using Content.Shared.Roles; using Robust.Shared.GameObjects; diff --git a/Content.MapRenderer/Program.cs b/Content.MapRenderer/Program.cs index 534b12565c..90f97a5786 100644 --- a/Content.MapRenderer/Program.cs +++ b/Content.MapRenderer/Program.cs @@ -7,7 +7,7 @@ using System.Text.Json; using System.Threading.Tasks; using Content.IntegrationTests; using Content.MapRenderer.Painters; -using Content.Server.Maps; +using Content.Shared.Maps; using Robust.Shared.Prototypes; using Robust.UnitTesting.Pool; using SixLabors.ImageSharp; diff --git a/Content.MapRenderer/RenderMap.cs b/Content.MapRenderer/RenderMap.cs index 4ebf4ee5d4..8d6087ec7a 100644 --- a/Content.MapRenderer/RenderMap.cs +++ b/Content.MapRenderer/RenderMap.cs @@ -1,5 +1,5 @@ using System.IO; -using Content.Server.Maps; +using Content.Shared.Maps; using Robust.Shared.Prototypes; using Robust.Shared.Utility; diff --git a/Content.Server/Administration/Commands/LoadGameMapCommand.cs b/Content.Server/Administration/Commands/LoadGameMapCommand.cs index dfe18ea5bc..dc82fccd1e 100644 --- a/Content.Server/Administration/Commands/LoadGameMapCommand.cs +++ b/Content.Server/Administration/Commands/LoadGameMapCommand.cs @@ -1,7 +1,7 @@ using System.Numerics; using Content.Server.GameTicking; -using Content.Server.Maps; using Content.Shared.Administration; +using Content.Shared.Maps; using Robust.Shared.Console; using Robust.Shared.Map; using Robust.Shared.Prototypes; diff --git a/Content.Server/GameTicking/Commands/ForceMapCommand.cs b/Content.Server/GameTicking/Commands/ForceMapCommand.cs index 577464acad..f8553a9244 100644 --- a/Content.Server/GameTicking/Commands/ForceMapCommand.cs +++ b/Content.Server/GameTicking/Commands/ForceMapCommand.cs @@ -3,6 +3,7 @@ using Content.Server.Administration; using Content.Server.Maps; using Content.Shared.Administration; using Content.Shared.CCVar; +using Content.Shared.Maps; using Robust.Shared.Configuration; using Robust.Shared.Console; using Robust.Shared.Prototypes; diff --git a/Content.Server/GameTicking/GameTicker.GamePreset.cs b/Content.Server/GameTicking/GameTicker.GamePreset.cs index 1973daa5a1..4634b7820b 100644 --- a/Content.Server/GameTicking/GameTicker.GamePreset.cs +++ b/Content.Server/GameTicking/GameTicker.GamePreset.cs @@ -4,6 +4,7 @@ using System.Threading.Tasks; using Content.Server.GameTicking.Presets; using Content.Server.Maps; using Content.Shared.CCVar; +using Content.Shared.Maps; using JetBrains.Annotations; using Robust.Shared.Player; diff --git a/Content.Server/GameTicking/GameTicker.RoundFlow.cs b/Content.Server/GameTicking/GameTicker.RoundFlow.cs index 1dadca4c03..6d2f3fac52 100644 --- a/Content.Server/GameTicking/GameTicker.RoundFlow.cs +++ b/Content.Server/GameTicking/GameTicker.RoundFlow.cs @@ -8,6 +8,7 @@ using Content.Server.Roles; using Content.Shared.CCVar; using Content.Shared.Database; using Content.Shared.GameTicking; +using Content.Shared.Maps; using Content.Shared.Mind; using Content.Shared.Players; using Content.Shared.Preferences; diff --git a/Content.Server/GameTicking/Rules/Components/LoadMapRuleComponent.cs b/Content.Server/GameTicking/Rules/Components/LoadMapRuleComponent.cs index f1bd1e5eef..f85a5b8e85 100644 --- a/Content.Server/GameTicking/Rules/Components/LoadMapRuleComponent.cs +++ b/Content.Server/GameTicking/Rules/Components/LoadMapRuleComponent.cs @@ -1,6 +1,5 @@ -using Content.Server.GameTicking.Rules; -using Content.Server.Maps; using Content.Shared.GridPreloader.Prototypes; +using Content.Shared.Maps; using Robust.Shared.Prototypes; using Robust.Shared.Utility; diff --git a/Content.Server/Maps/Conditions/HolidayMapCondition.cs b/Content.Server/Maps/Conditions/HolidayMapCondition.cs index da971c78f3..b7edc3f6c2 100644 --- a/Content.Server/Maps/Conditions/HolidayMapCondition.cs +++ b/Content.Server/Maps/Conditions/HolidayMapCondition.cs @@ -1,5 +1,6 @@ using System.Linq; using Content.Server.Holiday; +using Content.Shared.Maps; namespace Content.Server.Maps.Conditions; diff --git a/Content.Server/Maps/GameMapManager.cs b/Content.Server/Maps/GameMapManager.cs index 9638dffaa7..9914b7bde2 100644 --- a/Content.Server/Maps/GameMapManager.cs +++ b/Content.Server/Maps/GameMapManager.cs @@ -3,6 +3,7 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using Content.Server.GameTicking; using Content.Shared.CCVar; +using Content.Shared.Maps; using Robust.Server.Player; using Robust.Shared.Configuration; using Robust.Shared.ContentPack; diff --git a/Content.Server/Maps/GameMapPoolPrototype.cs b/Content.Server/Maps/GameMapPoolPrototype.cs index b2ba64a50c..831dea556d 100644 --- a/Content.Server/Maps/GameMapPoolPrototype.cs +++ b/Content.Server/Maps/GameMapPoolPrototype.cs @@ -1,3 +1,4 @@ +using Content.Shared.Maps; using JetBrains.Annotations; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set; diff --git a/Content.Server/Maps/IGameMapManager.cs b/Content.Server/Maps/IGameMapManager.cs index 02433c7b79..d05c42a78c 100644 --- a/Content.Server/Maps/IGameMapManager.cs +++ b/Content.Server/Maps/IGameMapManager.cs @@ -1,3 +1,5 @@ +using Content.Shared.Maps; + namespace Content.Server.Maps; /// diff --git a/Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs b/Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs index 0dd1540933..614a54e0f6 100644 --- a/Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs +++ b/Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs @@ -6,12 +6,12 @@ using Content.Server.Administration.Managers; using Content.Server.Discord.WebhookMessages; using Content.Server.GameTicking; using Content.Server.GameTicking.Presets; -using Content.Server.Maps; using Content.Server.Roles; using Content.Server.RoundEnd; using Content.Shared.CCVar; using Content.Shared.Chat; using Content.Shared.Database; +using Content.Shared.Maps; using Content.Shared.Players; using Content.Shared.Players.PlayTimeTracking; using Content.Shared.Voting; diff --git a/Content.Server/Maps/GameMapCondition.cs b/Content.Shared/Maps/GameMapCondition.cs similarity index 87% rename from Content.Server/Maps/GameMapCondition.cs rename to Content.Shared/Maps/GameMapCondition.cs index 78c5323777..b5d625ffca 100644 --- a/Content.Server/Maps/GameMapCondition.cs +++ b/Content.Shared/Maps/GameMapCondition.cs @@ -1,4 +1,4 @@ -namespace Content.Server.Maps; +namespace Content.Shared.Maps; [ImplicitDataDefinitionForInheritors] public abstract partial class GameMapCondition diff --git a/Content.Server/Maps/GameMapPrototype.MapSelection.cs b/Content.Shared/Maps/GameMapPrototype.MapSelection.cs similarity index 96% rename from Content.Server/Maps/GameMapPrototype.MapSelection.cs rename to Content.Shared/Maps/GameMapPrototype.MapSelection.cs index ff8fd35717..c79d8be5b1 100644 --- a/Content.Server/Maps/GameMapPrototype.MapSelection.cs +++ b/Content.Shared/Maps/GameMapPrototype.MapSelection.cs @@ -1,4 +1,4 @@ -namespace Content.Server.Maps; +namespace Content.Shared.Maps; public sealed partial class GameMapPrototype { diff --git a/Content.Server/Maps/GameMapPrototype.cs b/Content.Shared/Maps/GameMapPrototype.cs similarity index 98% rename from Content.Server/Maps/GameMapPrototype.cs rename to Content.Shared/Maps/GameMapPrototype.cs index df9046652b..fc97376412 100644 --- a/Content.Server/Maps/GameMapPrototype.cs +++ b/Content.Shared/Maps/GameMapPrototype.cs @@ -4,7 +4,7 @@ using Robust.Shared.Utility; using System.Diagnostics; using Content.Shared.Station; -namespace Content.Server.Maps; +namespace Content.Shared.Maps; /// /// Prototype data for a game map. -- 2.52.0