IronPython needs testers

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,095
4,815
113
At your house.
github.com

Snake

Moderator
Moderator
Jul 13, 2014
288
174
28
Readme.md actually empty... I can help you test it out. If need help tell me :p
 

balu92

Retired Staff
Retired Staff
Trusted Member
Jul 11, 2014
338
75
28
34
whoops, I forgot about that readme... there is one in the release, read that for now :confused:
Edit: just updated Readme.md, but it's not formatted properly
 
  • Like
Reactions: Snake

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,095
4,815
113
At your house.
github.com
Considering that this is my favourite language IronPython is relies on the same .NET libraries as C# so the performance difference will be small, sadly. Though I still count Python's stability which is absolutely better than JS.

Python > JavaScript > Lua. That is the slogan.
 

balu92

Retired Staff
Retired Staff
Trusted Member
Jul 11, 2014
338
75
28
34
Readme.md actually empty... I can help you test it out. If need help tell me :p
Well, that is what it is all about. Test the features, report back, create pull requests, throw some new idea at me. I'm a noob in Python, I only dumped the object's of hooks as a test.
I think the EntityDestroy event can be problematic if you it in more than one plugin. To be honest I was lazy to test that. :p
I will add console command to reload python plugins, like python.reload or something. And I'm planning to make a new Data class as well.
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,095
4,815
113
At your house.
github.com
Well, that is what it is all about. Test the features, report back, create pull requests, throw some new idea at me. I'm a noob in Python, I only dumped the object's of hooks as a test.
I think the EntityDestroy event can be problematic if you it in more than one plugin. To be honest I was lazy to test that. :p
I will add console command to reload python plugins, like python.reload or something. And I'm planning to make a new Data class as well.
I can help you in python but not in C# :rolleyes:
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,095
4,815
113
At your house.
github.com
I need more help in python, so I'm totally ok with that. ;)
Yaaaaaaaaaaaaaaaay. I'm buzzin like crazy to work with this beautiful thing.

Python:
from time import localtime

activities = {8: 'Sleeping',
              9: 'Commuting',
              17: 'Working',
              18: 'Commuting',
              20: 'Eating',
              22: 'Resting' }

time_now = localtime()
hour = time_now.tm_hour

for activity_time in sorted(activities.keys()):
    if hour < activity_time:
        print activities[activity_time]
        break
else:
    print 'Unknown, AFK or sleeping!'
 

balu92

Retired Staff
Retired Staff
Trusted Member
Jul 11, 2014
338
75
28
34
Multiple DestroyEvents are fixed
Undefined/null WeaponNames are fixed

WeaponName can be:
"Explosive Charge", "F1 Grenade", "Hunting Bow", "Mutant Bear Claw", "Bear Claw", same with wolf
the default is: "Bleeding", if it's "Bleeding" it can be radiation, starving, fall dmg... I can't fix that

python.reload pluginname will reload a certain plugin
python.reload will reload all plugin
python.load pluginname will load a certain plugin if it's not already loaded
python.unload pluginname will unload a certain plugin if it's loaded
(you need to be rcon admin or do it from external console, so the same as with fougerite.reload)

https://github.com/balu92/IronPythonModule/releases/tag/1.0.3a

*plugin = python plugin
 

balu92

Retired Staff
Retired Staff
Trusted Member
Jul 11, 2014
338
75
28
34
Tomorrow i will be conectrating on Codes mostly. Anything to test? If so, i will test them while i convert some plugins.
Well, just test whatever comes to your mind. Or port a plugin and see if there is anything that doesn't work. I know you can 'import sys', and you must 'import clr' if you want to add reference to other libraries, you can do: print "some msg" and it will print the msg into the output_log.txt, I know you can't 'import json' tho.