2. Which place do you suggest?
3. Just added a wrapper property to the Player class. With the next release, you can simply do the following.
Syntax: Select all
from players.entity import Player
player = Player(1)
print(player.net_info.time_connected)
7. Yes, what is wrong with get_interface? Do you have any problems?
8. We are accessing an external site, because it's the easiest way. Of course, the server also knows his public IP address, but AFAIK there is no easy or reliable way to retrieve it.
9. We only add modules/packages to our site-packages if Source.Python requires them.
10. I would rather add a generic API for worker threads. E. g. this one:
11. Yes! It might requires you to spend some time to get started with it, but in the end you will benefit from that, because the abstraction layer doesn't force the server owner to use a specific database system.
12. I'm against that. You only need a Player instance to access networked (or datamap) properties on a really low-level base (player.get_datamap_property_<type>, player.get_network_property_<type>). I don't see any benefit in adding functions that accept an index. In the background we still need a player pointer. So, we would end up doing something like this:
Syntax: Select all
def get_network_property(index, prop):
player = Player(index)
return player.get_network_property(prop)
14. You can hook virtual functions. Why do you think you can't hook virtual functions? Do you need an example?
15. You can either write your own functions that work with the mathlib instances. Or, if you think it's a useful addition for everyone, you can make a pull request to add additional features directly to the mathlib library.
16. A Color instance is really just a class that represents RGB values. Since a few games support RGB values in SayText2 messages, we decided to implement the __str__ method that converts the RGB values into a hex string that can be used in a SayText2 message. If you want to develop a cross-game compatible plugin, you should utilize the colors from the module messages.colors.saytext2.
20. I'm not fully sure if I understood that correctly: you would like to replace the Player class whose instances are passed to some listeners. E. g. you would like to pass an instance of MyPlayer to OnPlayerRunCommand listeners instead of instances of Player? If that's what you want, then the answer is No. It's not possible and we won't change that. Remember that multiple plugins might want to change the standard class. That would only lead to more difficulties.
Edit: This thread will probably get very confusing, so we might need to split it into smaller threads. Next time please create separate threads in the first place. Yes, even if that would mean to create 20 threads.