Files
wwdpublic/Content.Server/GameTicking/Rules/Components/LoadMapRuleComponent.cs
sleepyyapril 08c1cc95e5 Prevent SecretRule From Picking Invalid Presets (#27456) (#1805)
trying to fix the prelobby heisentest

we use votes anyway! fuck it, we ball

---------

Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com>
(cherry picked from commit d5d071a6d974a72357830821364dd906fa4d948d)
2025-02-28 16:23:29 +03:00

35 lines
1021 B
C#

using Content.Server.GameTicking.Rules;
using Content.Server.Maps;
using Content.Shared.GridPreloader.Prototypes;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
namespace Content.Server.GameTicking.Rules.Components;
/// <summary>
/// This is used for a game rule that loads a map when activated.
/// Works with <see cref="RuleGridsComponent"/>.
/// </summary>
[RegisterComponent, Access(typeof(LoadMapRuleSystem))]
public sealed partial class LoadMapRuleComponent : Component
{
/// <summary>
/// A <see cref="GameMapPrototype"/> to load on a new map.
/// </summary>
[DataField]
public ProtoId<GameMapPrototype>? GameMap;
/// <summary>
/// A map path to load on a new map.
/// </summary>
[DataField]
public ResPath? MapPath;
/// <summary>
/// A <see cref="PreloadedGridPrototype"/> to move to a new map.
/// If there are no instances left nothing is done.
/// </summary>
[DataField]
public ProtoId<PreloadedGridPrototype>? PreloadedGrid;
}