Looking to create a struct of node IDs and station IDs which can be used to highlight objects.
Currently using a list because I don't know how to use a struct in this case. But I also want to change to a struct because lists are a bit complex to manipulate inside each other.
If the player selects the "Locate" action in a dockscreen object list the ID of that object gets added to a list of IDs under the node ID. Note: the object lists, object IDs and node IDs are saved and can be used out of system.
An example which is the list to locate two stations in Eridani and one in Rigel.
Code: Select all
((SE (15708 15672)) (BA (2098)))
It all works fine as is except the highlight can be cleared by the player flying near the station. With the addition of object property 'showAsDestination in 1.8b5.2 the highlight can now be checked to see if this has happened. I prefer not to use 'autoClearOnDock as IMO 'autoClear is a better gameplay option in this case.
But I don't know the best way to use a struct for this or how to remove a single value from a struct.
As an example if the player flies near obj ID 15708 then this value needs to be removed from the struct so the dockscreen actions can reset to allow the player to select the station again. But the 15672 value needs to remain there under the node ID key.
Object IDs are removed on docking in <GetGlobalDockscreen>. After visiting both stations in Eridani the list looks like this:
Code: Select all
((SE ()) (BA (2098)))
Additionally the entire node ID list is cleared on system exit. The assumption is the player no longer wants to find any remaining highlighted stations so the highlights are cancelled. So after gating out of SE the list is this:
Code: Select all
((BA (2098)))