Merge pull request #25 from zhu-rengong/improve

move the registration of generic types to the lua side in a simple way
This commit is contained in:
Evil Factory
2021-11-08 13:52:08 -03:00
committed by GitHub
2 changed files with 8 additions and 6 deletions

View File

@@ -114,6 +114,14 @@ RegisterBarotrauma("Camera")
RegisterBarotrauma("InputType")
RegisterBarotrauma("Key")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.ItemPrefab]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.JobPrefab]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.CharacterPrefab]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.AfflictionPrefab]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.TalentPrefab]]")
RegisterBarotrauma("Pair`2[[Barotrauma.JobPrefab],[System.Int32]]")
AddCallMetaMember(RegisterBarotrauma("CharacterInfo"))
AddCallMetaMember(RegisterBarotrauma("Items.Components.Signal"))
AddCallMetaMember(RegisterBarotrauma("SubmarineInfo"))

View File

@@ -323,13 +323,7 @@ namespace Barotrauma
UserData.RegisterType<LuaHook.HookMethodType>();
UserData.RegisterType<IUserDataDescriptor>();
UserData.RegisterType<PrefabCollection<ItemPrefab>>();
UserData.RegisterType<PrefabCollection<JobPrefab>>();
UserData.RegisterType<PrefabCollection<CharacterPrefab>>();
UserData.RegisterType<PrefabCollection<AfflictionPrefab>>();
UserData.RegisterType<PrefabCollection<TalentPrefab>>();
UserData.RegisterType<Pair<JobPrefab, int>>();
#if SERVER