Exemplo n.º 1
0
    public int D20QueryPython(GameObject obj, string queryKey, object arg)
    {
        var dispatcher = obj.GetDispatcher();

        if (dispatcher == null)
        {
            return(0);
        }

        var dispIo = new DispIoD20Query();

        dispIo.return_val = 0;
        dispIo.obj        = arg;
        dispatcher.Process(DispatcherType.PythonQuery, (D20DispatcherKey)ElfHash.Hash(queryKey), dispIo);
        return(dispIo.return_val);
    }
Exemplo n.º 2
0
 public void TestParticleSystemName()
 {
     Assert.AreEqual(2908521, ElfHash.Hash("MM-ChainFlyBy".ToLowerInvariant()));
     Assert.AreEqual(2908521, ElfHash.Hash("MM-ChainFlyBy"));
 }
Exemplo n.º 3
0
 public static ConditionSpec.Builder AddSignalHandler(this ConditionSpec.Builder builder,
                                                      string signal, SubDispatcherCallback callback)
 {
     builder.AddHandler(DispatcherType.PythonSignal, (D20DispatcherKey)ElfHash.Hash(signal), callback);
     return(builder);
 }
Exemplo n.º 4
0
 public static ConditionSpec.Builder AddQueryHandler(this ConditionSpec.Builder builder, string query,
                                                     SubDispatcherCallback callback)
 {
     builder.AddHandler(DispatcherType.PythonQuery, (D20DispatcherKey)ElfHash.Hash(query), callback);
     return(builder);
 }
Exemplo n.º 5
0
 public void D20SignalPython(GameObject handle, string queryKey, int arg1 = 0, int arg2 = 0)
 {
     D20SignalPython(handle, (D20DispatcherKey)ElfHash.Hash(queryKey), arg1, arg2);
 }
Exemplo n.º 6
0
 public ulong D20QueryReturnData(GameObject obj, string queryKey, int arg1 = 0, int arg2 = 0)
 {
     return(D20QueryReturnData(obj, (D20DispatcherKey)ElfHash.Hash(queryKey), arg1, arg2));
 }
Exemplo n.º 7
0
 public int D20QueryInt(GameObject obj, string queryKey, int data1 = 0, int data2 = 0)
 => D20QueryInt(obj, (D20DispatcherKey)ElfHash.Hash(queryKey), data1, data2);
 public FeatConditionAttribute(string featName)
 {
     FeatId = (FeatId)ElfHash.Hash(featName);
 }
Exemplo n.º 9
0
 public SelectableFeat(string featEnum) : this((FeatId)ElfHash.Hash(featEnum))
 {
 }
Exemplo n.º 10
0
 public static void D20SendSignal(this GameObject obj, string signal, int data = 0)
 {
     GameSystems.D20.D20SendSignal(obj, (D20DispatcherKey)ElfHash.Hash(signal), data);
 }