99class Test :
1010 def On_TablesLoaded (self , tables ):
1111# Debug.Log("On_TablesLoaded hooked with " + tables.Count.ToString() + " element, from Python")
12- Plugin .DumpPropsToFile ("On_TablesLoaded.Tables" , tables )
12+ Plugin .TryDumpObjToFile ("On_TablesLoaded.Tables" , tables )
1313 return tables
1414
1515 def On_AllPluginsLoaded (self ):
16- Debug .Log ("The knights who say NI! I mean HI! " )
16+ Debug .Log ("The knights who say NI!" )
1717
1818 def On_ServerInit (self ):
1919 Debug .Log ("On_ServerInit hooked from Python" )
@@ -27,7 +27,7 @@ def testtimerCallback(self, dic):
2727 plug2 .Invoke ("TestSharedFunction" , dic ["first" ], dic ["second" ])
2828 Debug .Log (dic ["first" ])
2929 Debug .Log (dic ["second" ])
30- Plugin .DumpPropsToFile ("testtimerCallback.dic" , dic )
30+ Plugin .TryDumpObjToFile ("testtimerCallback.dic" , dic )
3131 Plugin .KillTimers ()
3232
3333 def On_PluginInit (self ):
@@ -38,76 +38,76 @@ def On_ServerShutdown(self):
3838
3939 def On_ItemsLoaded (self , items ):
4040# Debug.Log("On_ItemsLoaded hooked with " + items.Count + " element, from Python")
41- Plugin .DumpPropsToFile ("On_ItemsLoaded.Items" , items )
41+ Plugin .TryDumpObjToFile ("On_ItemsLoaded.Items" , items )
4242 return items
4343
4444 def On_Chat (self , Player , Text ):
4545# Debug.Log(Player.Name + " says: " + Text)
46- Plugin .DumpPropsToFile ("On_Chat.Player" , Player )
47- Plugin .DumpPropsToFile ("On_Chat.Text" , Text )
46+ Plugin .TryDumpObjToFile ("On_Chat.Player" , Player )
47+ Plugin .TryDumpObjToFile ("On_Chat.Text" , Text )
4848
4949 def On_BlueprintUse (self , Player , BPUseEvent ):
5050# Debug.Log(Player.Name + " researched " + BPUseEvent.ItemName)
51- Plugin .DumpPropsToFile ("On_BlueprintUse.Player" , Player )
52- Plugin .DumpPropsToFile ("On_BlueprintUse.BPUseEvent" , BPUseEvent )
51+ Plugin .TryDumpObjToFile ("On_BlueprintUse.Player" , Player )
52+ Plugin .TryDumpObjToFile ("On_BlueprintUse.BPUseEvent" , BPUseEvent )
5353
5454 def On_Command (self , Player , cmd , args ):
5555# Debug.Log("On_Command(" + Player.Name + ", " + cmd + ", " + args + ")")
56- Plugin .DumpPropsToFile ("On_Command.Player" , Player )
57- Plugin .DumpPropsToFile ("On_Command.cmd" , cmd )
58- Plugin .DumpPropsToFile ("On_Command.args" , args )
56+ Plugin .TryDumpObjToFile ("On_Command.Player" , Player )
57+ Plugin .TryDumpObjToFile ("On_Command.cmd" , cmd )
58+ Plugin .TryDumpObjToFile ("On_Command.args" , args )
5959
6060 def On_Console (self , Player , Arg ):
6161# Debug.Log(Player.Name + " used " + Arg.Class + "." + Arg.Function + " in console ")
62- Plugin .DumpPropsToFile ("On_Console.Player" , Player )
63- Plugin .DumpPropsToFile ("On_Console.Arg" , Arg )
62+ Plugin .TryDumpObjToFile ("On_Console.Player" , Player )
63+ Plugin .TryDumpObjToFile ("On_Console.Arg" , Arg )
6464
6565 def On_DoorUse (self , Player , DoorEvent ):
6666# Debug.Log(Player.Name + " tried to use a door")
6767# Debug.Log("Succeded? " + ("yes" if DoorEvent.Open else "no"))
68- Plugin .DumpPropsToFile ("On_DoorUse.Player" , Player )
69- Plugin .DumpPropsToFile ("On_DoorUse.DoorEvent" , DoorEvent )
68+ Plugin .TryDumpObjToFile ("On_DoorUse.Player" , Player )
69+ Plugin .TryDumpObjToFile ("On_DoorUse.DoorEvent" , DoorEvent )
7070
7171 def On_EntityDecay (self , DecayEvent ):
72- Plugin .DumpPropsToFile ("On_EntityDecay.DecayEvent" , DecayEvent )
72+ Plugin .TryDumpObjToFile ("On_EntityDecay.DecayEvent" , DecayEvent )
7373 return DecayEvent .DamageAmount
7474
7575 def On_EntityDeployed (self , Player , Enity ):
76- Plugin .DumpPropsToFile ("On_EntityDeployed.Player" , Player )
77- Plugin .DumpPropsToFile ("On_EntityDeployed.Enity" , Enity )
76+ Plugin .TryDumpObjToFile ("On_EntityDeployed.Player" , Player )
77+ Plugin .TryDumpObjToFile ("On_EntityDeployed.Enity" , Enity )
7878
7979 def On_EntityHurt (self , he ):
80- Plugin .DumpPropsToFile ("On_EntityHurt.HurtEvent" , he )
80+ Plugin .TryDumpObjToFile ("On_EntityHurt.HurtEvent" , he )
8181
8282 def On_EntityDestroyed (self , de ):
83- Plugin .DumpPropsToFile ("On_EntityDestroyed.DestroyEvent" , de )
83+ Plugin .TryDumpObjToFile ("On_EntityDestroyed.DestroyEvent" , de )
8484
8585 def On_NPCKilled (self , de ):
86- Plugin .DumpPropsToFile ("On_NPCKilled.DeathEvent" , de )
86+ Plugin .TryDumpObjToFile ("On_NPCKilled.DeathEvent" , de )
8787
8888 def On_NPCHurt (self , he ):
89- Plugin .DumpPropsToFile ("On_NPCHurt.HurtEvent" , he )
89+ Plugin .TryDumpObjToFile ("On_NPCHurt.HurtEvent" , he )
9090
9191 def On_PlayerGathering (self , Player , ge ):
92- Plugin .DumpPropsToFile ("On_PlayerGathering.Player" , Player )
93- Plugin .DumpPropsToFile ("On_PlayerGathering.GatherEvent" , ge )
92+ Plugin .TryDumpObjToFile ("On_PlayerGathering.Player" , Player )
93+ Plugin .TryDumpObjToFile ("On_PlayerGathering.GatherEvent" , ge )
9494
95- def On_PlayerSpawn (self , Player , se ):
96- Plugin .DumpPropsToFile ("On_PlayerSpawn.Player" , Player )
97- Plugin .DumpPropsToFile ("On_PlayerSpawn.SpawnEvent" , se )
95+ def On_PlayerSpawning (self , Player , se ):
96+ Plugin .TryDumpObjToFile ("On_PlayerSpawn.Player" , Player )
97+ Plugin .TryDumpObjToFile ("On_PlayerSpawn.SpawnEvent" , se )
9898
9999 def On_PlayerSpawned (self , Player , se ):
100- Plugin .DumpPropsToFile ("On_PlayerSpawned.Player" , Player )
101- Plugin .DumpPropsToFile ("On_PlayerSpawned.SpawnEvent" , se )
100+ Plugin .TryDumpObjToFile ("On_PlayerSpawned.Player" , Player )
101+ Plugin .TryDumpObjToFile ("On_PlayerSpawned.SpawnEvent" , se )
102102
103103 def On_PlayerKilled (self , de ):
104- Plugin .DumpPropsToFile ("On_PlayerKilled.DeathEvent" , de )
104+ Plugin .TryDumpObjToFile ("On_PlayerKilled.DeathEvent" , de )
105105
106106 def On_PlayerHurt (self , he ):
107- Plugin .DumpPropsToFile ("On_PlayerHurt.HurtEvent" , he )
107+ Plugin .TryDumpObjToFile ("On_PlayerHurt.HurtEvent" , he )
108108
109109 def On_PlayerConnected (self , Player ):
110- Plugin .DumpPropsToFile ("On_PlayerConnected.Player" , Player )
110+ Plugin .TryDumpObjToFile ("On_PlayerConnected.Player" , Player )
111111
112112 def On_PlayerDisconnected (self , he ):
113- Plugin .DumpPropsToFile ("On_PlayerDisconnected.Player" , Player )
113+ Plugin .TryDumpObjToFile ("On_PlayerDisconnected.Player" , Player )
0 commit comments