AnthonyChenevier / EnhancedGrowthVatLearning

Rimworld mod to improve Biotech growth vats
GNU General Public License v3.0
0 stars 0 forks source link

Vat Timers and You (please add any feedback to the overall mechanic here) #2

Open AnthonyChenevier opened 4 months ago

AnthonyChenevier commented 4 months ago

Vat Timers

Two timers have been added to each vat, accessible through the vat's info section in a new 'Timers' tab. These timers have 2 functions: auto-exit the vat, and auto-enter the vat.

To enable the re-entry functionality an 'ownership' system has been implemented that mirrors bed ownership. Even though other pawns won't try to use vats without explicit instructions, it was necessary to allow pawns to remember the vat they came from and return successfully. Ownership is overwritten if the player explicitly adds a different pawn to an owned vat, so vat-orphaned pawns won't respond to any recall timers.

Setting the timers involves 3 values: the type of increment (hour/day/quadrum/year), the number of increments, and whether the timer should follow biological vat time, or actual (in-game) time - this allows for a timer that lets a pawn grow for a biological year, or return to the vat after 3 real-world hours, or any number of other combinations of these values that players may wish.

Settings for timers can be copy-pasted among each other or in groups just like zone/shelf storage permissions - this has the added effect of making vats group-selectable, which was not supported previously.

Timers are implemented as a stand-alone system that could be extracted and applied to other objects (like, say a research bench?) to automatically cause actions to occur and should be highly performant.