mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-15 14:52:35 +02:00
* Refactor pausing * Sprite as well woops * Bring PauseManagerExt back with [Obsolete] so that content compiles. Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com> Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
28 lines
727 B
C#
28 lines
727 B
C#
using System.Linq;
|
|
using Robust.Server.GameObjects.Components;
|
|
using Robust.Shared.Interfaces.GameObjects;
|
|
|
|
namespace Robust.Server.Interfaces.GameObjects
|
|
{
|
|
/// <summary>
|
|
/// Defines a component that has "map initialization" behavior.
|
|
/// Basically irreversible behavior that moves the map from "map editor" to playable,
|
|
/// like spawning preset objects.
|
|
/// </summary>
|
|
public interface IMapInit
|
|
{
|
|
void MapInit();
|
|
}
|
|
|
|
public static class MapInitExt
|
|
{
|
|
public static void RunMapInit(this IEntity entity)
|
|
{
|
|
foreach (var init in entity.GetAllComponents<IMapInit>())
|
|
{
|
|
init.MapInit();
|
|
}
|
|
}
|
|
}
|
|
}
|