raiguard / Krastorio2

An overhaul mod for Factorio focusing on end-game technologies and moderately increased complexity.
https://mods.factorio.com/mod/Krastorio2
GNU Lesser General Public License v3.0
131 stars 50 forks source link

Tesla coil does not charge vehicles #287

Closed eiva closed 1 year ago

eiva commented 2 years ago

Description

Energy absorber is marked as insertable into many things including locomotives, siders and armors. But for some reason it's code not even tries to charge trains or tanks, or anything else besides charecter... From here: https://github.com/raiguard/krastorio-2/blob/master/scripts/tesla-coil.lua#L107 I think it misleading... Like it either need to charge all where absorber present, or absorber need to be marked as insertable only into armor.

Reproduction

  1. Insert energy absorber, electric motor and battery into train
  2. Place tesla coil near that train
  3. See - nothing happens. Expected: coil will charge trains accs.

Factorio version

1.1.59

In-game username

TheVj

raiguard commented 2 years ago

image

It works just fine. Could you please upload a save file that I can look at?

The code you linked is changing how it retrieves the equipment grid. Tesla coils don't care what kind of entity it's charging as long as it has an absorber.

raiguard commented 2 years ago

This project is moving to Sourcehut. If you could post your save file to the mailing list or send it to me directly at ch@raiguard.me, I'll look into this for you.