Jump to content

How to handle custom containers properly?


Recommended Posts

Hi,

 

i just started looking into modding and learning LUA. As a test, i created a furnace that has 3 slots - fuel, input and output. 

 

I would like to display some additional info on the UI such as a text or a bar that shows the remaining burntime, etc. 

 

So i made a copy of the container.lua and the containerwidget.lua with some custom logic, but i assume this would also affect any other container type in the game? And if i'd use an additional mod that modifies the widget (smarter crockpot for example) then those two might override each other? 

 

Would it be better to create something like a containerMachines + containerMachinesWidget (i plan on reusing this type of container for some other "machines" later) and use that instead? I sort of tried this but didn't figure out how to get the UI to open when clicking the furnace. 

 

How would you guys handle this sort of stuff in general?

 

Thanks!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...