Begin weaponschein

This commit is contained in:
hydrant
2020-03-09 20:56:51 +01:00
parent baba3e1ae2
commit 6965875406
12 changed files with 156 additions and 5 deletions

View File

@@ -16,7 +16,7 @@ namespace ReallifeGamemode.Server.Core
internal static IAPI API { get; private set; }
internal static Events.EventHandler EventHandler { get; private set; }
private static List<Script> loadedScripts = new List<Script>();
private static readonly List<Script> loadedScripts = new List<Script>();
private readonly ILogger logger = LogManager.GetLogger<Main>();
@@ -36,10 +36,10 @@ namespace ReallifeGamemode.Server.Core
private void LoadScript()
{
var allTypes = Assembly.GetExecutingAssembly().GetTypes();
var commandTypes = allTypes.Where(t => t.IsSubclassOf(typeof(Script)) && !t.IsAbstract);
var allTypes = typeof(Main).Assembly.GetTypes();
var scriptTypes = allTypes.Where(t => t.IsSubclassOf(typeof(Script)) && !t.IsAbstract);
foreach (var scriptType in commandTypes)
foreach (var scriptType in scriptTypes)
{
logger.LogDebug("Loading script '{FullName}'", scriptType.FullName);
var script = Activator.CreateInstance(scriptType) as Script;

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ReallifeGamemode.Server.Core.Menus
{
internal class PoliceDepartment : Script
{
public PoliceDepartment()
{
}
}
}