Closed curiosity-a closed 3 years ago
This is especially noticeable when playing with space exploration where health regen is practically non-existent. Higher nanobot research will have you blowing through lots of ammo.
From my understanding of the factorio code this is an improper check altogether. Why not use the exact same flag that repair-tools item type uses to determine if something can be repaired or not? One check versus two and will also result in the same behavior as repair-tools.
local repairable = not entity.has_flag('not-repairable')
I would imagine that robots are repairable, so they would still have to be excluded to achieve the same effect (for whatever reason it's needed). But checking not-repairable
instead of breaths-air
does seem more fitting.
Can't edit the message, so here's the addendum: in the depths of repository history there is a note saying that "robots don't repair correctly" or something like that. If this is about combat robots, they already have the not-repairable
flag, so the single flag check should be enough.
in the depths of repository history there is a note saying that "robots don't repair correctly" or something like that.
I bet that is related to construction drones and logistic bots. They don't have collision boxes far as I know. I assume that whenever #119 is fixed or worked-around this check could be further simplified as well.
Describe the Bug
Nanobots will try to repair damaged player characters, wasting ammo.
To Reproduce
To reproduce, select a nanobot emitter with construction ammo, get hurt and stand still. Observe the characteristic blue cloud effect on the character and the spending of ammo.
Possible cause:
or
instead ofand
in the repairability check https://github.com/Nexela/Nanobots/blob/f691914411b7d457e9c840a2c116fa5ff61ed690/scripts/nanobots.lua#L131