explosivegaming / scenario

Factorio scenario
https://explosivegaming.nl
GNU General Public License v3.0
23 stars 28 forks source link

Kills done while in a vehicle arn't tracked #219

Open Cooldude2606 opened 3 years ago

Cooldude2606 commented 3 years ago

Factorio version Version number: 1.1.37

Scenario version Version number: 6.2.0

Bug description The datastore statistics for player kills are not increased when the player is in a vehicle. The issue is because the filter during on_entity_died is too restrictive. There is a good chance that this issue also effects the on_entity_damaged event as this uses a similar filter.

Reproduction method Steps to reproduce the behavior:

  1. Get in any vehicle, such as a spidertron.
  2. Kill biters.
  3. Counter does not increase

Expected behavior The counter should track all player kills.

PHIDIAS0303 commented 3 years ago

The counter should track the kills if the player is in the vehicle. But auto defence by spidertron or what should not be counted?

Cooldude2606 commented 3 years ago

Auto kills will need to be ignored, I am unaware of any simple way to relate these kills back to a player beyond keeping an index of who and when remotes were used. As such I believe updating the filter to include vehicles with players in them will be a sufficient fix.

PHIDIAS0303 commented 3 years ago

the only thing not sure about is artillery remote kills but it may be better not to include it in this update.

Cooldude2606 commented 3 years ago

Should artillery even be counted? It less of the player killing things and more just the player asking for stuff to be killed.

PHIDIAS0303 commented 1 year ago

other than checking for character type it can check for vehicles as well. when there is a driver or passenger it should be counted as well