Update library
This commit is contained in:
parent
b1958593ec
commit
7769722c08
|
@ -40,7 +40,7 @@ namespace PorygonSharp.UserData
|
||||||
{
|
{
|
||||||
if (UserDataLookup.ContainsKey(type))
|
if (UserDataLookup.ContainsKey(type))
|
||||||
return;
|
return;
|
||||||
RegisterUserDataType(hash);
|
RegisterUserDataType(name);
|
||||||
var ud = new UserData(hash, type);
|
var ud = new UserData(hash, type);
|
||||||
UserDataLookup.TryAdd(type, ud);
|
UserDataLookup.TryAdd(type, ud);
|
||||||
ReverseLookup.TryAdd(hash, ud);
|
ReverseLookup.TryAdd(hash, ud);
|
||||||
|
@ -55,7 +55,7 @@ namespace PorygonSharp.UserData
|
||||||
{
|
{
|
||||||
if (UserDataLookup.ContainsKey(type))
|
if (UserDataLookup.ContainsKey(type))
|
||||||
return;
|
return;
|
||||||
RegisterUserDataType(hash);
|
RegisterUserDataType(name);
|
||||||
var ud = new UserData(hash, type);
|
var ud = new UserData(hash, type);
|
||||||
UserDataLookup.TryAdd(type, ud);
|
UserDataLookup.TryAdd(type, ud);
|
||||||
ReverseLookup.TryAdd(hash, ud);
|
ReverseLookup.TryAdd(hash, ud);
|
||||||
|
@ -136,7 +136,7 @@ namespace PorygonSharp.UserData
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport("PorygonLang", EntryPoint = "RegisterUserDataType", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport("PorygonLang", EntryPoint = "RegisterUserDataType", CallingConvention = CallingConvention.Cdecl)]
|
||||||
private static extern void RegisterUserDataType(uint hashId);
|
private static extern void RegisterUserDataType([MarshalAs(UnmanagedType.LPWStr)]string name);
|
||||||
|
|
||||||
[DllImport("PorygonLang", EntryPoint = "GetUserDataFieldCount", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport("PorygonLang", EntryPoint = "GetUserDataFieldCount", CallingConvention = CallingConvention.Cdecl)]
|
||||||
private static extern int GetUserDataFieldCount(uint hashId);
|
private static extern int GetUserDataFieldCount(uint hashId);
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue