Take On Mars

Take On Mars

Not enough ratings
Refinery Lock and Reaction Memory
   
Award
Favorite
Favorited
Unfavorite
Item Type: Modification
Dependencies: Standard
File Size
Posted
Updated
7.521 MB
22 Jan, 2017 @ 3:32pm
22 Jan, 2017 @ 5:26pm
2 Change Notes ( view )

Subscribe to download
Refinery Lock and Reaction Memory

Description
This mod does 2 things:
1.) Allows you to push a lock button when processing materials. This locks the refinery to be "on" be default, essentially giving the old pre-fix behavior that was quite useful for setting up production lines. You can still manually turn the process off and you can unlock it to return to Bohemia's new behavior which is sometimes preferred.

2.) Refineries now recall what they're last successful operation was, even upon loading the game - this means the refinery you set to run the 2nd or higher page reaction (reached be hitting the [<<] and [>>] buttons when inputs can yield more than 1 output) remembers which reaction it was running and defaults to that reaction. If you manually page through the valid reactions the memory is cleared until it completes a reaction.

FAQ:
*What would I use this for?*
I use it to set up a fuel production line. Now I can lock my refineries on for intermediate steps in the line and they'll all start up as needed. The memory of previous reactions also helps the production line keep the appropriate reactions without me having to go reset them every time I load the game. It also makes doing normal rock/soil/atmo processing where you're just flipping barrels a lot easier as you don't need to run around and restart the reaction every time it stops as you change out barrels.

*What is it incompatible with?*
Any mod touching machinebase_refinery.h or hud_refinery.layout (in gui/layouts/). I'm not aware of anything this affects but it's possible something is out there. It also uses the next valid value in the GenInt switch on refineries (1024), and the the previously unused GenString on the same, though anything touching either is very likely to involve the machinebase_refinery.h file anyhow.

*How do I use the lock?*
Start a chemical process on your refinery and you should see the lock button on the GUI overlaying the left of the process. Click it with the mouse exactly like anyother GUI in TOM. As long as a process is running you can toggle the lock back and forth - the color updates and text should make it clear what state it's in.

*How does the memory of previous reactions work?*
When a reaction generates products it stores the reaction it was doing in the GenString. If it is possible to perform that reaction with the current set of input barrels that reaction card will be shown. If a different reaction runs (such as from laving a LOCK set and changing the input barrels) it will updated the GenString where it saves the reaction to the new reaction. If the player pushes the buttons involved in changing the reaction cards the GenString is cleared as well (they're the ones that look like [<<] and [>>] that appear when multiple reactions can be run with a set of inputs).

*Any future plans?*
Yes! A lock on the reaction as well. The GUI is a bit more challenging to work with here so I haven't done it yet, but I want to make it so you can lock the reaction too and the refiniery will ONLY do the locked reaction. I don't think this is as generally useful but there are some edge cases I think it's good for.
6 Comments
riotintheair  [author] 25 Mar, 2019 @ 7:17am 
Tested this last night. Seems to still be working.
spaceenwalker 27 Mar, 2017 @ 10:23am 
thx, is working nice
nohulohe 13 Feb, 2017 @ 4:46pm 
Love your work. Any luck on locking reactions?
INFIDEL 24 Jan, 2017 @ 5:08am 
Nice work, looking forward to trying it out.
Tonique 23 Jan, 2017 @ 5:08am 
This mod is sensational, many thanks for your work.
:steamhappy:
Eroder [AU] 22 Jan, 2017 @ 8:13pm 
Awesome. Thanks for making this, works great. One thing that really annoyed me was having to stop processes before saving and closing then remember to select the the second option again before starting it all up. Now I can set it and forget it. :)