All the information needed is in the tooltip already I just want to add some simplistic math that can give a ballpark throughput number. Something super simple like:
Code: Select all
throughput = (rotation_speed / 360) * hand_stack_size
Actual Craft Time - Intercept Tooltip
This mod does all it's work in control.lua but it constructs its own custom UI and does not modify any existing. I first came to this mod because I was trying to subscribe to an event and when a tooltip GUI gets rendered I would intercept and if its an inserter tooltip just add in my line of info. But I couldn't figure out where tooltips were rendered so I moved on.
Multi-Product Recipe Details - Changing a tooltip in place
This mod does a fantastic job of using data-final-fixes.lua to altar all recipes to use the full name of each output instead of just the image. I made a lot of progress here and used data.raw to get information about inserters but I still was not able to find out how to modify the tooltip. Int he end I realized that (if I understand correctly) since this file is only run during loading this wont really help because inserter stack size can be altered by research so my code will probably need to live in control.lua not final fixes.
So currently I'm at a loss. I have looked through the APIs and the possible prototypes and events but I still have yet to figure out where tooltips are generated and how to add to them.