Page 1 of 1

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

Posted: Thu Jul 07, 2016 1:34 am
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.

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

Posted: Thu Jul 07, 2016 1:56 pm
by Rseding91
Fixed for 0.13.7.