feat(hs): periodic scheduled start plugin + config + state
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// <copyright file="HeykelSavasiGameServerState.cs" company="MUnique">
|
||||
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
|
||||
// </copyright>
|
||||
|
||||
namespace MUnique.OpenMU.GameLogic.PlugIns.PeriodicTasks;
|
||||
|
||||
/// <summary>
|
||||
/// The state of a game server state for a heykel savasi event.
|
||||
/// </summary>
|
||||
public class HeykelSavasiGameServerState : PeriodicTaskGameServerState
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="HeykelSavasiGameServerState"/> class.
|
||||
/// </summary>
|
||||
/// <param name="context">The context.</param>
|
||||
public HeykelSavasiGameServerState(IGameContext context)
|
||||
: base(context)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Description => "Heykel Savasi";
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// <copyright file="HeykelSavasiStartConfiguration.cs" company="MUnique">
|
||||
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
|
||||
// </copyright>
|
||||
|
||||
namespace MUnique.OpenMU.GameLogic.PlugIns.PeriodicTasks;
|
||||
|
||||
/// <summary>
|
||||
/// The heykel savasi start configuration.
|
||||
/// </summary>
|
||||
public class HeykelSavasiStartConfiguration : MiniGameStartConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the default configuration for heykel savasi.
|
||||
/// </summary>
|
||||
public static HeykelSavasiStartConfiguration Default =>
|
||||
new()
|
||||
{
|
||||
PreStartMessageDelay = TimeSpan.Zero,
|
||||
EntranceOpenedMessage = "Heykel Savasi entrance is open and closes in {0} minute(s).",
|
||||
EntranceClosedMessage = "Heykel Savasi entrance closed.",
|
||||
TaskDuration = TimeSpan.FromMinutes(20),
|
||||
Timetable = new List<TimeOnly>
|
||||
{
|
||||
new(20, 0),
|
||||
new(22, 0),
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// <copyright file="HeykelSavasiStartPlugIn.cs" company="MUnique">
|
||||
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
|
||||
// </copyright>
|
||||
|
||||
namespace MUnique.OpenMU.GameLogic.PlugIns.PeriodicTasks;
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
using MUnique.OpenMU.GameLogic.MiniGames;
|
||||
using MUnique.OpenMU.PlugIns;
|
||||
|
||||
/// <summary>
|
||||
/// This plugin enables the start of the heykel savasi event.
|
||||
/// </summary>
|
||||
[PlugIn]
|
||||
[Display(Name = nameof(HeykelSavasiStartPlugIn), Description = "Heykel Savasi event")]
|
||||
[Guid("2C6E1B4A-7F3D-4E9A-9B1C-3A6D2F8E5C7B")]
|
||||
public sealed class HeykelSavasiStartPlugIn : MiniGameStartBasePlugIn<HeykelSavasiStartConfiguration, HeykelSavasiGameServerState>
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override MiniGameType Key => MiniGameType.HeykelSavasi;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override object CreateDefaultConfig()
|
||||
{
|
||||
return HeykelSavasiStartConfiguration.Default;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override HeykelSavasiGameServerState CreateState(IGameContext gameContext)
|
||||
{
|
||||
return new HeykelSavasiGameServerState(gameContext);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user