Building example with grapevine (may hang the server right now)
This commit is contained in:
parent
d03a0a0c28
commit
80784df851
3
nwn2_ai_onmoduleload/.gitignore
vendored
3
nwn2_ai_onmoduleload/.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
bin/
|
||||
obj/
|
||||
obj/
|
||||
packages/
|
@ -21,6 +21,9 @@ using NWLocation = NWScript.NWScriptEngineStructure2;
|
||||
using NWTalent = NWScript.NWScriptEngineStructure3;
|
||||
using NWItemProperty = NWScript.NWScriptEngineStructure4;
|
||||
|
||||
using System.Threading;
|
||||
using Grapevine.Server;
|
||||
|
||||
namespace CLRScript
|
||||
{
|
||||
public partial class nwn2_ai_onmoduleload : CLRScriptBase, ICLRScriptImplementation, IGeneratedScriptProgram
|
||||
@ -46,6 +49,15 @@ namespace CLRScript
|
||||
|
||||
public Int32 ScriptMain([In] object[] ScriptParameters, [In] Int32 DefaultReturnCode)
|
||||
{
|
||||
var server = new RESTServer();
|
||||
server.Start();
|
||||
|
||||
while (server.IsListening)
|
||||
{
|
||||
Thread.Sleep(300);
|
||||
}
|
||||
|
||||
|
||||
int Volume;
|
||||
|
||||
MessageToSpeak = "Hello, world";
|
||||
|
@ -32,6 +32,9 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Grapevine">
|
||||
<HintPath>..\grapevine\Grapevine\bin\Debug\Grapevine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NWNScriptJITIntrinsics, Version=1.0.0.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\CLRv4.0.30319\NWNScriptJITIntrinsics.dll</HintPath>
|
||||
</Reference>
|
||||
@ -40,6 +43,7 @@
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
|
Loading…
Reference in New Issue
Block a user