0ptera / Inventory-Sensor

Factorio mod adding a combinator that reads inventories of wagons, cars, furnaces and more
Other
5 stars 6 forks source link

Support for Helicopter mod #14

Closed dvenum closed 4 years ago

dvenum commented 4 years ago

Hello. I found, it can works on Helicopter Pad, if you filter some entities, heli-mod use multiple of them: `local BlacklistEntityNames = {

["heli-pad-entity"] = true,
["heli-shadow-entity-_-"] = true,
["heli-flying-collision-entity-_-"] = true,
["heli-landed-collision-side-entity-_-"] = true,

} ` Cargo entity named 'heli-entity-_-'.

It works for me and now it do wonderful job to feed my helicopter, when I send it to Pad with Remote control unit.

0ptera commented 4 years ago

Thanks for sanitizing helicopters helper entities.

I'll take a look at it.

0ptera commented 4 years ago

After looking into helicopters code the complete list of car type entities that should be blacklisted seems to be:

  ["heli-flying-collision-entity-_-"] = true,
  ["heli-landed-collision-side-entity-_-"] = true,
  ["heli-landed-collision-end-entity-_-"] = true,
  ["heli-body-entity-_-"] = true,
  ["heli-shadow-entity-_-"] = true,
  ["heli-burner-entity-_-"] = true,
  ["heli-floodlight-entity-_-"] = true,
  ["rotor-entity-_-"] = true,
  ["rotor-shadow-entity-_-"] = true,

The helicopter collision box when landed on helipads facing southwards is way outside the center of the helipad. To reliably get the helicopter entity sensor range has to be increased to from 1.9 to 2.9 or more, which could result in false positives in other places.

dvenum commented 4 years ago

Its great. I tested, 1.7.4, work fine. I set sensor range to 3, its not so bad to play with it, for trains I use logistic train stop, when transport can be managed on special parking. I suppose, peoples who like helicopter mod, want to resupply it as primary, also. SetConnectedEntity() does not see shadow and burner entities in my case, but it great, you took a look and this fix can be important, because of races, it accept first valid entity, what can be different in other cases.

dvenum commented 4 years ago

Oh, I didn't work with github issues before. Can it be closed with green status on your side?