Early Construction


Adds early game construction robots to greatly improve the quality of life of base building. Uses the standard Factorio portable roboport mechanics. Inspired by Nanobots. Compatible with Bob's Electronics.

Utilities
a month ago
0.16 - 2.0
28.6K

g Resolved - No Script event on_robot_built_entity

5 years ago
(updated 5 years ago)

When your modded construction robots build an entity from a ghost they don't seem to be triggering an on_robot_built_entity event for other mods to react to. However, from looking at your code I can't see why that would be different to vanilla. Has this come up before?

I ask as my mod reacts to entities being built. With vanilla I see:

  • player places ghost
  • on_built_event = ghost
  • construction robot flys over and places real entity
  • on_robot_built_entity = real entity
  • end

But with your moded construction robots I see:

  • player places ghost
  • on_built_event = ghost
  • construction robot flys over and places real entity
  • end

Looking at this after a bug report on my mod: https://mods.factorio.com/mod/inbuilt_lighting/discussion/5c9674c3854c25000c73a93b

5 years ago

Thanks for bringing this to my attention. One remark is that the event not firing cannot be strictly correct, since my mod relies on the on_robot_built_entity event to destroy the robot that built the entity, so it must be fired at least in my mod.

I'm currently away, so cannot do any testing, but once I'm back home, I'll look into it. It might be a bug in Factorio itself, where it somehow doesn't properly call the event for all mods.

If there is such a bug, I can implement a workaround to destroy the robots one tick later, which I guess would fix such an issue.

5 years ago

I've since implemented this workaround, and verified that it indeed works with your mod now.

It is indeed a bug in Factorio itself, but it's probably one that the devs have no interest in fixing. Regardless, this incompatibility is resolved now.

New response