Page 1 of 1
on_player_promoted, on_player_demoted
Posted: Thu Aug 24, 2017 4:16 am
by Mooncat
Request:
Events when any player is promoted to be an admin, or demoted to be not an admin.
Parameters:
player_index : Index of the player who is promoted or demoted.
cause_player_index : index of the player who caused promotion or demotion.
I'm thinking about a mod of admin tools. These events will be helpful.
Re: on_player_promoted, on_player_demoted
Posted: Fri Aug 25, 2017 4:49 am
by Rseding91
You can listen to anything executed from the console and get the data from that.
Re: on_player_promoted, on_player_demoted
Posted: Fri Aug 25, 2017 8:09 am
by Mooncat
Rseding91 wrote:You can listen to anything executed from the console and get the data from that.
...
ok...
Re: on_player_promoted, on_player_demoted
Posted: Mon Aug 28, 2017 1:56 am
by zackman0010
http://lua-api.factorio.com/latest/even ... le_command
I do have to ask, though, when was this added? I don't remember seeing this when we made our admin tools. It wouldn't been so much handier than what we actually ended up doing.
I looked through old APIs. It was added in 0.15.24.
Re: on_player_promoted, on_player_demoted
Posted: Mon Aug 28, 2017 5:56 am
by Rseding91
I wasn't stating I wouldn't add the event - just that in the meantime you can get around the lack of an event by doing the above.
Re: on_player_promoted, on_player_demoted
Posted: Tue Aug 29, 2017 1:56 am
by Mooncat
Rseding91 wrote:I wasn't stating I wouldn't add the event - just that in the meantime you can get around the lack of an event by doing the above.
Oh, thanks a lot!
Not making the mod at this moment, but I have it in my todo list. So the request is for future-proof.
Re: on_player_promoted, on_player_demoted
Posted: Sun Sep 03, 2017 1:04 pm
by BenSeidel
Rseding91 wrote:I wasn't stating I wouldn't add the event - just that in the meantime you can get around the lack of an event by doing the above.
Rseding, you are... Such a programmer!