[2.1.17] “on_rocket_launch_ordered” event no longer returns the player_index

This subforum contains all the issues which we already resolved.
User avatar
picklock
Filter Inserter
Filter Inserter
Posts: 263
Joined: Sat Nov 09, 2019 6:49 am
Contact:

[2.1.17] “on_rocket_launch_ordered” event no longer returns the player_index

Post by picklock »

According to the documentation here, the “on_rocket_launch_ordered” event is supposed to return the player_index of the player riding the rocket. This worked in version 2.0. However, in the current version 2.1.17, the value “nil” is returned, as can be seen in the attached log file.

Attached are the log file, a save file, and a test mod designed to output the player_index to the console and write it to the log file.
Attachments
Test_orlo_player_index_02.zip
(2.99 MiB) Downloaded 23 times
Test_orlo_player_index_0.1.0.zip
(1.43 KiB) Downloaded 16 times
factorio-current.log
(9.33 KiB) Downloaded 18 times
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters | Picklocks QuickBar Import/Export | Picklocks Nauvis Cliff-Explosives
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4878
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.1.17] “on_rocket_launch_ordered” event no longer returns the player_index

Post by boskid »

Are you sure this is working in 2.0? It looks like player_index is not given by on_rocket_launch_ordered since 2.0.22 due to changes done in 121106 (#7126), it is just documentation artifact that it suggests player_index there while it is never provided.
Rseding91
Factorio Staff
Factorio Staff
Posts: 17519
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.1.17] “on_rocket_launch_ordered” event no longer returns the player_index

Post by Rseding91 »

I also noticed that in 2.0 it was not working. But it seems fine to add it (even if you could just get it from the rocket entity in the event). This is now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.
User avatar
picklock
Filter Inserter
Filter Inserter
Posts: 263
Joined: Sat Nov 09, 2019 6:49 am
Contact:

Re: [2.1.17] “on_rocket_launch_ordered” event no longer returns the player_index

Post by picklock »

@Rseding91: Thank you.

@boskid: Thanks for pointing out when the feature was removed. I’ve been very busy with my real life. The last time I tested the feature was for the most recent release of my mod, in which I used it. That was with Factorio version 2.0.21. So one version before it was removed. I must have overlooked the note in the changelog for Factorio version 2.0.22; my apologies for that. However, I also didn’t receive any feedback from users of my mod indicating that the feature no longer works.
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters | Picklocks QuickBar Import/Export | Picklocks Nauvis Cliff-Explosives
Post Reply

Return to “Resolved Problems and Bugs”