mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Make PauseTime a DataField (#3863)
This commit is contained in:
@@ -43,7 +43,8 @@ END TEMPLATE-->
|
||||
|
||||
### Bugfixes
|
||||
|
||||
*None yet*
|
||||
* `MetaDataComponent.PauseTime` is now a yaml data-field
|
||||
* The client-side `(un)pausemap` command is now disabled while connected to a server.
|
||||
|
||||
### Other
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ using Robust.Shared.Timing;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using System;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||
|
||||
namespace Robust.Shared.GameObjects
|
||||
{
|
||||
@@ -66,7 +67,8 @@ namespace Robust.Shared.GameObjects
|
||||
/// <summary>
|
||||
/// When this entity was paused, if applicable
|
||||
/// </summary>
|
||||
internal TimeSpan? PauseTime;
|
||||
[DataField("pauseTime", customTypeSerializer:typeof(TimeOffsetSerializer))]
|
||||
public TimeSpan? PauseTime { get; internal set; }
|
||||
|
||||
// Every entity starts at tick 1, because they are conceptually created in the time between 0->1
|
||||
[ViewVariables]
|
||||
|
||||
@@ -176,7 +176,8 @@ namespace Robust.Shared.Map
|
||||
}
|
||||
|
||||
SetMapPaused(mapId, true);
|
||||
});
|
||||
},
|
||||
requireServerOrSingleplayer: true);
|
||||
|
||||
_conhost.RegisterCommand("querymappaused",
|
||||
"Check whether a map is paused or not.",
|
||||
@@ -214,7 +215,8 @@ namespace Robust.Shared.Map
|
||||
}
|
||||
|
||||
SetMapPaused(mapId, false);
|
||||
});
|
||||
},
|
||||
requireServerOrSingleplayer: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user