It appears that you are attempting to create a recursive algorithm. If so, replace "%JUMP TO RUN DIESEL GENERATOR!!!" with another call to OUR_RUN_DIESEL_GENERATOR. You probably need to update the t for the next iteration. You haven't provided any way to get out of the recursion, though. Maybe an else for your main if that exits?
I didn't look at the additional code you posted but these issues were immediately obvious from the top level code.