Day's issue with SC described here
hasn't been solved by latest change.
(also posted in linked thread)
I looked at the code of Ship Storage Helper and Day's issue is not solved.
I do not intend for Shleld Cycler to become PortableBetweenShips , but putting the ship in storage and retrieving it with SC intact should be possible .
Currently i see 2 problems for SSH :
- replaceShip calls playerBoughtNewShip, this triggers SC to remove all traces of SC and give some cash back.
to avoid the cashback, SSH resets SC values .
- upon retrieval of the ship, SC should be restored but they aren't atm.
I think the following approach should work to solve all problems :
- add 2 methods to shield Cycler :
Method A : Store SC values
copy SC Values to a temporary object using JSON , include a flag in this object to signify failure / success
reset SC values in savegame
return the temp object
Method B : retrieve SC Values
calling oxp needs to pass an object holding SC values
SC applies the values (similar to what it does on savegame loading)
return a flag to signal failure/success
SSH should then do this :
before replaceShip , call SC Method A
verify if SC Method A was succesfull
store the Object holding SC values in an SSH savegame var
Upon retrieving the stored ship :
retrieve the SSH savegamevar holding the SC values to a temp object
call SC Method B, passing the temp object
verify if SC Method B is succesfull
OS : Arch Linux 64-bit - rolling release
OXPs : My user page
I am subscribed to the threads for my oxps, if you need my attention just post in them or send a pm.