Advanced Fluid Handling


Valves have been removed due to the current engine limitations. *Check out “Configurable Valves” by Stringweasel for a very clever and convenient valve mod* --Adds I, L, T, and Cross underground pipe extensions. --Adds pipes to ground with I, L, T, and Cross shaped underground outputs that are able to be rotated independent of the above ground port. --Adds an Underground pump. CHECK HOTKEYS FOR MOD.

Content
16 days ago
0.16 - 2.0
40.2K
Logistics

b [Error in other mod] soft ?conflict? with Disco Science?

5 years ago

https://gyazo.com/d53bb738bde01746727ff8c38322df27
this prints when i adjust the percentage on a top-up valve

not sure whether to report this to you or author of disco

5 years ago

both mods still function just fine, just a big error print out when i adjust it

5 years ago

Hey, I've fixed the error message in DiscoScience.

staplergun: In order to avoid the error at all, Advanced Fluid Handling needs to set event.entity to a non-nil, valid entity when it raises script_raised_built.

5 years ago

It follows the same format as on entity built. The other mod needs to check for "event.created_entity" not "event.entity"

I just did some testing and can confirm the data is properly passed on my end.

5 years ago

While the API is unfortunately not self-consistent, it is documented. Here it says that script_raised_built should contain entity: https://lua-api.factorio.com/latest/events.html#script_raised_built

5 years ago

Interesting.

5 years ago

So it wasn’t actually defined until 0.17, and before that I think there may have been a convention of using created_entity, since that would make sense.

What some people do is write code that looks for both, but since I was having so much trouble with malformed and missing events from other mods anyway, I decided to put my foot down and insist on API conformance. Otherwise the reality is that every new mod developer has to learn the unwritten rule that sometimes it’s created_entity, which is trivia that nobody should have to know. 😃

5 years ago

Well said.

New response