Apparently due to a bug in rpgInstallDevicePrep
or the C code called by (objGetItemProperty installerObj thisItem 'installDeviceStatus)
Also, the resulting screen description is "Nil". There should be a proper error message in any case where we actually can't install the device.
Well, I fixed the lack of text anyway:
https://github.com/kronosaur/TranscendenceDev/pull/34
It was caused by calling typTranslate
on a dockscreen which wasn't active when the relevant text was code that called (scrTranslate gScreen...)
. All such code should probably be replaced with (typTranslate gType...)
to avoid similar problems.
Also fixed using the wrong text for the number of slots required.
Still need to fix the original problem, which seems to be caused by objCanInstallItem
. (It returns 'noDeviceSlotsLeft
.)
Tracked the problem to CShip::CalcDeviceToReplace
. It needs to allow replacing a device with a non-identical one of the same type. This function is used to determine whether installation is possible, so if callers are using it to determine whether replacement is advisable, they need to handle that themselves.
Also, it appears to be recommending replacing the highest level device possible, rather than the lowest, which seems wrong.