[Rseding91] [0.13.6] on_player_placed_equipment not called with ctrl-m1

This subforum contains all the issues which we already resolved.
ntm
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed Jul 06, 2016 12:48 pm
Contact:

[Rseding91] [0.13.6] on_player_placed_equipment not called with ctrl-m1

Post by ntm »

Was making a mod when I decided to make use of on_player_placed_equipment and on_player_removed_equipment to add new functionality to equipment, but then I discovered unexpected behavior. I decided to test it by printing the name of the added equipment.

Code: Select all

script.on_event(defines.events.on_player_placed_equipment, function(event)
  local player = game.players[event.player_index]
  player.print(event.equipment.name)
end)
To my surprise, the function was called when I added equipment by placing it manually, but not when control-clicking to add multiple items to the armor. This works perfectly fine as expected when calling on_player_removed_equipment and printing event.equipment or event.count.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14291
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [0.13.6] on_player_placed_equipment not called with ctrl-m1

Post by Rseding91 »

Fixed for 0.13.7.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”