Sublimelime / SupplyDrop

A mod for the game Factorio.
GNU General Public License v3.0
3 stars 0 forks source link

Drops not showing up in Factorissimo2 buildings #4

Closed Phasehand closed 7 years ago

Phasehand commented 7 years ago

Pretty much what the title says, I'll be inside the build, get a notification about another drop and be unable to find it when I go outside.

Sublimelime commented 7 years ago

@Phasehand Ah, this is an issue that I worried about. It drops at the player's position coords in the original factorio surface, so while you're in a building, your coords are on the factorissimo grid, so the chest is being dropped near the equivalent coords, in the first surface.

Eg, you're at 34, 55 in the factorissimo building, but the building itself is at 345, -2342. The chest gets dropped at your coords, in the first surface, very far away from the building.

A possible fix would be to rein in the random radius when the player is not outside, (so it drops in the factory) or simply ignore players not outside, and pick a different player. Of course, then there's the worry that single player games will rarely get drops.

Sublimelime commented 7 years ago

I've made a fix that will simply try players until it finds a suitable player, or fail and reduce the time until the next drop by 30%.