Quezler / glutenfree

PHP based CLI for mods.factorio.com
MIT License
10 stars 6 forks source link

potential crash with space ship launches. #12

Closed CaitSith2 closed 1 year ago

CaitSith2 commented 1 year ago

https://github.com/Quezler/glutenfree/blob/0b05e516f83e05c79f124aa099fbd11038bf54d4/mods/robot_attrition-return-to-sender/control.lua#LL33C17-L33C17

This situation might be able to therotically happen if for example, spaceship is going through its launch sequence, you are aboard that ship. The ship does NOT have a roboport on it, a logistic robot happens to fly over, then robot attrition decides to crash that robot, then the ship launches. Boom, you now have a surface that has a crashed robot, but no roboport.

In the case of a construction robot deployed, when there is no roboport on the surface, it will just stay put, UNTIL a roboport appears.

Quezler commented 1 year ago

Hmm, good catch, and glad to see people are interested in the code. 🙂

The error was mostly left in there as a way to catch those edge cages in case they ever happen vs silently not caring.

I'll think about what should happen in that case, i can't simply cancel the robot from picking it up, and having it go in the inventory still goes against the mod, so i might just make cargo dropped on spaceships not marked for deconstruct until it re-mounts if there are no roboports on there.

Good catch tho. 👍

Quezler commented 1 year ago

Hmm i was working on a patch and suddenly it sends out two bots: one for picking up the item, and another one for demolishing the package, could have sworn previously that only one bot got sent out and none returned to the inventory.

So the update will be delayed till i regain a grasp on reality, questioning everything about this mod right now.