2024-12-19 22:25:39 -05:00
|
|
|
using Arrowgene.Ddon.GameServer.Scripting.Interfaces;
|
|
|
|
|
using Arrowgene.Ddon.Shared.Model;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace Arrowgene.Ddon.GameServer.Scripting
|
|
|
|
|
{
|
2025-02-03 00:56:57 -05:00
|
|
|
public class NpcExtendedFacilityModule : GameServerScriptModule
|
2024-12-19 22:25:39 -05:00
|
|
|
{
|
|
|
|
|
public override string ModuleRoot => "extended_facilities";
|
|
|
|
|
public override string Filter => "*.csx";
|
|
|
|
|
public override bool ScanSubdirectories => true;
|
2024-12-23 14:40:57 -05:00
|
|
|
public override bool EnableHotLoad => true;
|
2024-12-19 22:25:39 -05:00
|
|
|
|
|
|
|
|
public Dictionary<NpcId, INpcExtendedFacility> NpcExtendedFacilities { get; private set; }
|
|
|
|
|
|
|
|
|
|
public NpcExtendedFacilityModule()
|
|
|
|
|
{
|
|
|
|
|
NpcExtendedFacilities = new Dictionary<NpcId, INpcExtendedFacility>();
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-29 02:07:13 -07:00
|
|
|
public override bool EvaluateResult(string path, object result, IDictionary<string, object> variables)
|
2024-12-19 22:25:39 -05:00
|
|
|
{
|
|
|
|
|
if (result == null)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-29 02:07:13 -07:00
|
|
|
INpcExtendedFacility extendedFacility = (INpcExtendedFacility)result;
|
2024-12-19 22:25:39 -05:00
|
|
|
NpcExtendedFacilities[extendedFacility.NpcId] = extendedFacility;
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|