This bug was originally about refineries not going out of the busy state.
This is due to the some translation errors concerning an object's "script variables".
In commit b794766, a change was made to the Structure_SetState line to "fix" the refinery behaviour, but it seems to be incorrect.
The error is probably in commit 451e6f0.
f__0C10_0182_0012_B114 was replaced by Object_Script_Variable4_Clear, but some of the logic was lost. In particular, there are some missing calls to emu_Tools_Index_GetUnit.
The patch in commit b794766 is correct.
For the record, "emu_Object_ClearScriptVariable4" has been combined
into Object_Script_Variable4_Set with encoded=0. Either I guessed the
fix correctly, or I forgot my own fix.
It's a bit confusing as f__0C10_0182_0012_B114 has now taken the name
"Object_Script_Variable4_Clear." Still need to work out what the
untranslated code in f__0C10_0182_0012_B114 do.
I want to help, but I don't understand what is the problem here...
There was some bug with the scripts, introduced somewhere during the
translation. I think it caused refineries to sometimes stay in the
busy state, meaning that harvesters wouldn't automatically return to
it when they were full.
I'm pretty sure it is fixed, can't remember why I reopened it.
Happy to close it.