27 lines
638 B
C#
27 lines
638 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using Microsoft.Extensions.Logging;
|
|
using ReallifeGamemode.Database.Models;
|
|
using ReallifeGamemode.Server.Core.API;
|
|
using ReallifeGamemode.Server.Log;
|
|
|
|
namespace ReallifeGamemode.Server.Core
|
|
{
|
|
public abstract class Script
|
|
{
|
|
protected IAPI Api => Main.API;
|
|
|
|
protected ILogger Log { get; }
|
|
|
|
protected Events.EventHandler EventHandler => Main.EventHandler;
|
|
|
|
public Script()
|
|
{
|
|
Log = LogManager.GetLogger(GetType());
|
|
}
|
|
|
|
protected DatabaseContext GetDbContext(bool useLoggerFactory = true) => Main.GetDbContext(useLoggerFactory);
|
|
}
|
|
}
|