Server Development
Posts: 605
Joined: Tue Mar 25, 2014 6:47 pm
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: (coded in server)
make a list of fitted modules that can equip this charge
loop thru that list to unload any modules that currently have charges. (this is client behavior. i cant [easily] 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 and all module icons will display the reload animation.
unloaded charges will stack in kind.
unload 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.
NOTE: 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.
dropping charges on specific modules will not automatically unload that module.
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.
linked modules (guns and missiles) work the same way.
note that linked module code is still a bit buggy but uses same load/unload code.
this system is still not working right, although it's rather close.
**edit**
and getting closer (~90%)
dropping a stack of charges onto the fitting window will do the following: (coded in server)
make a list of fitted modules that can equip this charge
loop thru that list to unload any modules that currently have charges. (this is client behavior. i cant [easily] 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 and all module icons will display the reload animation.
unloaded charges will stack in kind.
unload 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.
NOTE: 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.
dropping charges on specific modules will not automatically unload that module.
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.
linked modules (guns and missiles) work the same way.
note that linked module code is still a bit buggy but uses same load/unload code.
this system is still not working right, although it's rather close.
**edit**
and getting closer (~90%)