I just noticed that we have these events, and would like to use them.
How do they work? I can get them to run, but no matter what I return they do nothing.
George: how does CanBeInstalled/CanBeUninstalled work?
-
- Developer
- Posts: 2998
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
<CanBeInstalled> is called on an item from inside shpCanInstallArmor and shpCanInstallDevice.
gSource is the object that we're installing on.
gItem is the item being installed.
You can return True if the item can be installed.
Or you can return a string, which is the message that will be shown to the user to tell them why the item cannot be installed.
<CanBeUninstalled> is called on an item from inside shpCanRemoveDevice. [There is currently no way to prevent an armor segment from being uninstalled.]
In both cases, the current screens that allow the user to install/uninstall items at a station will make these checks.
gSource is the object that we're installing on.
gItem is the item being installed.
You can return True if the item can be installed.
Or you can return a string, which is the message that will be shown to the user to tell them why the item cannot be installed.
<CanBeUninstalled> is called on an item from inside shpCanRemoveDevice. [There is currently no way to prevent an armor segment from being uninstalled.]
In both cases, the current screens that allow the user to install/uninstall items at a station will make these checks.