Post Sun Jul 19, 2020 5:19 am

Module Loading and Unloading

Logic and operation of loading and unloading charges in modules.

dropping a stack of charges onto the fitting window will do the following:
make a list of fitted modules that can load the dropped charge
loop thru that list to unload any that currently have charges. (this is client behavior. i cant change it)
load all modules in that list with the dropped charge, if the stack has enough.
if there are not enough charges in the stack to load all modules in the list, the modules will be loaded to full capacity one by one until the stack is depleted.
if docked, the charges will load immediately.
in space, it will begin a reload cycle.

unloaded charges will stack.
location is hangar if you're docked, and cargo hold while in space.
when in space, if your cargo hold dont have space, the charge will be jettisoned and lost.
at no time will unload use corp hangars or containers in hangars, but you CAN load from either.

dragging a stack of charges directly onto a module will check if that module is currently loaded.
if it is loaded and the charges are of the same type, it will fill remaining charge space immediately when docked, or start a reload cycle when in space.
if loaded with a different type, you will receive a notification stating you cannot mix charge types. in this case, you will have to manually unload current charges and reload with desired type.

using the module buttons on the hud will work as expected.
clicking the charge type at the top of the list will load the module with the selected charge
clicking 'unload to cargo' will remove charges and place them in your cargo hold.

this system is still not working right, although it's rather close.
**edit**
and getting closer (~90%)