added a way for lua to override people's jobs
This commit is contained in:
@@ -45,6 +45,12 @@ namespace Barotrauma
|
||||
return (GUITextBox.OnEnterHandler)((GUITextBox a, string b) => new LuaResult(LuaSetup.luaSetup.CallFunction(function, a, b)).Bool());
|
||||
});
|
||||
#endif
|
||||
|
||||
|
||||
Script.GlobalOptions.CustomConverters.SetScriptToClrCustomConversion(DataType.Table, typeof(Pair<JobPrefab, int>), v =>
|
||||
{
|
||||
return new Pair<JobPrefab, int>((JobPrefab)v.Table.Get(1).ToObject(), (int)v.Table.Get(2).CastToNumber());
|
||||
});
|
||||
}
|
||||
|
||||
public static void RegisterAction<T>()
|
||||
|
||||
Reference in New Issue
Block a user