New toy for the checklist types...

dseagrav

Addon Developer
Addon Developer
Joined
Nov 4, 2010
Messages
117
Reaction score
0
Points
16
I added the capability for variable substitution to checklists. Currently supported for the Info subscreen and marginally tested for the normal text field. This provides for 16 free-text variables to be defined per-vessel, modifiable by anything that can modify the vessel state, and modifiable from the XLS file.

To use this:

Modify the Excel spreadsheet desired. In either the Text field or Info field, type "$XX" where you want a variable to appear, where XX is a number 00-15 that selects which variable to be substituted. References to unset options are replaced with "..."

To cause variables to be set from the checklist, define a new column where the Remarks column is now (column N), name it what you wish, and put a string there of the following form:
$XX="VALUE",$XX="VALUE2"
Where as before, XX is the index and "VALUE" is the desired contents. The quote marks are required. The actual setting of variables happens when the checklist item becomes the active item.

Strings not starting with a $ or having invalid form will be disregarded. This is to prevent issues with data existing in the current Remarks field.

To cause variables to be set from anywhere else in the code (MCC, etc) use whatever means required to cause the string at Checklist_Variable[XX] in either the Saturn or LEM class to be overwritten with the desired contents.

The idea behind this is that the checklists that need parameters from somewhere else to be specified (cislunar navigation star code, alignment options, etc) can have those options specified by either MCC or their calling checklist.

Please let me know if there are any issues. These changes should not affect anything extant and should be completely dormant unless used.
 
Top