halo112358 wrote:bug report:
autotrade never releases SIGNAL_ATTACKED.
Some have exploited that. Start ST to set that signal handler and then revert the ship to Trade Mk1 freighter. The ship will escape like UT. Better chance to survive than with stock handler.
IIRC, you can have only one bound signal handler. Thus, if you want just to add a tiny bit, you have to make a copy of stock handler and modify that.
Since stopping a script cannot reset the handler (unless another script is used to do the stopping), each script should set the handler when they start. Thus, the most obvious "fix" is to modify the stock Trade/Fight/Navigate commands to revert the handlers. However, XaiCorp Group Management now sets the handler for the leader ship, so its death will result proper adjustments in formation -- the stock SIGNAL_KILLED does rearrange formation, but not properly for GMS group. Now if Navigation commands would always reset that handler, it would ruin the GMS, or GMS should constantly reset the handler in order to stay in control.
IIRC, you can have only one handler for signal, and cannot even chain them.
The attacked-handler can of course check if the ship runs the ST/UT script and behave like ST/UT only in that case?