I'm not sure how to get the dockscreen identified because there isn't a UNID for it. It's just called "Dispatch"
From KorolovShipping.xml in 1.7a1a:
Code: Select all
<StationType UNID="&stKorolovShipping;"
name= "Korolov Shipping"
sovereign= "&svCorporate;"
dockScreen= "Dispatch"
abandonedScreen= "&dsAbandonedStation;"
dockingPorts= "10"
canAttack= "true"
Code: Select all
<DockScreens>
<Dispatch>
<InitialPane>
(block (missionStatus missionID)
(setq missionStatus (objGetData gSource "missionStatus"))
(setq missionID (objGetData gSource "missionID"))
plus a whole lot of code
</InitialPane>
<Panes>
<Default>
<OnPaneInit>
(block (desc playerLevel)
(setq playerLevel (korInitialize))
(scrSetDesc gScreen (korMsgWelcome playerLevel))
)
</OnPaneInit>
<Actions>
<Action name="Escort Freighter" default="1" key="E">
(block (playerLevel charonStronghold)
plus more code from here
I've tried (eq aPane "Default"), (eq aScreen "Dispatch") and (eq (shpGetDockObj gPlayerShip) &stKorolovShipping;) with them. Nothing works. Any examples of scrAddaction I have found aren't much help because they're already in the dockscreen code.
Or maybe I've messed up the syntax.
The xelerus functionlist has an example of (eq aScreen (objGetDataField gPlayerShip "shipStatusScreen") but I'm not sure how to change this to something about KorolovShipping.
Anyone got any ideas?
Here's an example of what I've got so far (not working):
Code: Select all
<OnGlobalPaneInit>
(if (and
(eq (shpGetDockObj gPlayerShip) &stKorolovShipping;)
(eq aPane "Default"))
(scrAddAction
gScreen
'addNavInfo
3
"Nav Info"
"N"
(block nil
(plyMessage gPlayer "In Dockscreen")
(dbgOutput printTo 'console "Working")
)
)
)
</OnGlobalPaneInit>