Nanobots: Early Bots 3.0


Personal construction nanobots: build, repair, upgrade, clear trees and rocks, and supply turret ammunition without a roboport network. Features quality support, vehicle and cargo-wagon materials, construction around your character during remote view, configurable work modes, combat automation, and statistics. Space Age compatible.

Content
a day ago
2.0 - 2.1
9.06K
Logistic network

b Unnecessary pcall around bad .valid check

2 months ago

if not ghost.valid and not ghost.to_be_upgraded() will die on an invalid ghost. Nanotbots2-continued fixes this with if not (ghost and ghost.valid and ghost.to_be_upgraded()), which would save you a pcall().

2 months ago

Thanks for pointing this out!

I checked both currently maintained branches, and you were right about the unnecessary pcall. There were still some older defensive pcall wrappers around to_be_upgraded() / to_be_deconstructed() even after the entity had already passed a validity check.

I've cleaned those up in both branches while leaving the other defensive calls in place where they're still appropriate.

The fixes are now available on the Mod Portal:

Nanobots3 5.8.12 for Factorio 2.0
Nanobots3 5.9.2 for Factorio 2.1

Thanks for catching this and taking the time to report it!

This thread has been locked.