Seal/abstract/virtual everything (#6739)
This commit is contained in:
@@ -2,7 +2,7 @@ using Content.Server.Holiday.Interfaces;
|
||||
|
||||
namespace Content.Server.Holiday.Celebrate
|
||||
{
|
||||
public class DefaultHolidayCelebrate : IHolidayCelebrate
|
||||
public sealed class DefaultHolidayCelebrate : IHolidayCelebrate
|
||||
{
|
||||
public void Celebrate(HolidayPrototype holiday)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Content.Server.Holiday.Greet
|
||||
{
|
||||
[UsedImplicitly]
|
||||
[DataDefinition]
|
||||
public class Custom : IHolidayGreet
|
||||
public sealed class Custom : IHolidayGreet
|
||||
{
|
||||
[DataField("text")] private string _greet = string.Empty;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ using Robust.Shared.Localization;
|
||||
|
||||
namespace Content.Server.Holiday.Greet
|
||||
{
|
||||
public class DefaultHolidayGreet : IHolidayGreet
|
||||
public sealed class DefaultHolidayGreet : IHolidayGreet
|
||||
{
|
||||
public string Greet(HolidayPrototype holiday) => Loc.GetString("holiday-greet", ("holidayName", holiday.Name));
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ using Robust.Shared.ViewVariables;
|
||||
namespace Content.Server.Holiday
|
||||
{
|
||||
[Prototype("holiday")]
|
||||
public class HolidayPrototype : IPrototype
|
||||
public sealed class HolidayPrototype : IPrototype
|
||||
{
|
||||
[ViewVariables] [DataField("name")] public string Name { get; private set; } = string.Empty;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.Holiday
|
||||
{
|
||||
public class HolidaySystem : EntitySystem
|
||||
public sealed class HolidaySystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IConfigurationManager _configManager = default!;
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
@@ -112,7 +112,7 @@ namespace Content.Server.Holiday
|
||||
/// <summary>
|
||||
/// Event for when the list of currently active holidays has been refreshed.
|
||||
/// </summary>
|
||||
public class HolidaysRefreshedEvent : EntityEventArgs
|
||||
public sealed class HolidaysRefreshedEvent : EntityEventArgs
|
||||
{
|
||||
public readonly IEnumerable<HolidayPrototype> Holidays;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ using Content.Server.Holiday.Interfaces;
|
||||
|
||||
namespace Content.Server.Holiday.ShouldCelebrate
|
||||
{
|
||||
public class ChineseNewYear : IHolidayShouldCelebrate
|
||||
public sealed class ChineseNewYear : IHolidayShouldCelebrate
|
||||
{
|
||||
public bool ShouldCelebrate(DateTime date, HolidayPrototype holiday)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.Holiday.ShouldCelebrate
|
||||
/// </summary>
|
||||
[UsedImplicitly]
|
||||
[DataDefinition]
|
||||
public class Computus : DefaultHolidayShouldCelebrate
|
||||
public sealed class Computus : DefaultHolidayShouldCelebrate
|
||||
{
|
||||
[DataField("daysEarly")]
|
||||
private byte _daysEarly = 1;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.Holiday.ShouldCelebrate
|
||||
/// </summary>
|
||||
[UsedImplicitly]
|
||||
[DataDefinition]
|
||||
public class DayOfYear : IHolidayShouldCelebrate
|
||||
public sealed class DayOfYear : IHolidayShouldCelebrate
|
||||
{
|
||||
[DataField("dayOfYear")]
|
||||
private uint _dayOfYear = 1;
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Server.Holiday.Interfaces;
|
||||
|
||||
namespace Content.Server.Holiday.ShouldCelebrate
|
||||
{
|
||||
[Virtual]
|
||||
public class DefaultHolidayShouldCelebrate : IHolidayShouldCelebrate
|
||||
{
|
||||
public virtual bool ShouldCelebrate(DateTime date, HolidayPrototype holiday)
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Content.Server.Holiday.ShouldCelebrate
|
||||
/// For Friday the 13th. Spooky!
|
||||
/// </summary>
|
||||
[UsedImplicitly]
|
||||
public class FridayThirteenth : IHolidayShouldCelebrate
|
||||
public sealed class FridayThirteenth : IHolidayShouldCelebrate
|
||||
{
|
||||
public bool ShouldCelebrate(DateTime date, HolidayPrototype holiday)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Server.Holiday.ShouldCelebrate
|
||||
/// For a holiday that happens the first instance of a weekday on a month.
|
||||
/// </summary>
|
||||
[UsedImplicitly]
|
||||
public class WeekdayInMonth : DefaultHolidayShouldCelebrate
|
||||
public sealed class WeekdayInMonth : DefaultHolidayShouldCelebrate
|
||||
{
|
||||
[DataField("weekday")] private DayOfWeek _weekday = DayOfWeek.Monday;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user