on_player_promoted, on_player_demoted

Post Reply
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1190
Joined: Wed May 18, 2016 4:55 pm
Contact:

on_player_promoted, on_player_demoted

Post 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. :)

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: on_player_promoted, on_player_demoted

Post by Rseding91 »

You can listen to anything executed from the console and get the data from that.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1190
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: on_player_promoted, on_player_demoted

Post by Mooncat »

Rseding91 wrote:You can listen to anything executed from the console and get the data from that.
Image

...

ok...

zackman0010
Inserter
Inserter
Posts: 36
Joined: Wed May 18, 2016 8:34 pm
Contact:

Re: on_player_promoted, on_player_demoted

Post 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.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: on_player_promoted, on_player_demoted

Post 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.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1190
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: on_player_promoted, on_player_demoted

Post 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! :D
Not making the mod at this moment, but I have it in my todo list. So the request is for future-proof. :lol:

BenSeidel
Filter Inserter
Filter Inserter
Posts: 584
Joined: Tue Jun 28, 2016 1:44 am
Contact:

Re: on_player_promoted, on_player_demoted

Post 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!

Post Reply

Return to “Implemented mod requests”