In the below code snipped we see a virtual station that uses TypCreate to dynamically overwrite a system map:
Code: Select all
1: <StationType UNID="&vtAdventureStation;"
2: name= "(virtual settings station)"
3: virtual= "true"
4: >
5:
6: <Events>
7: <OnGlobalTypesInIt>
8: (if (unvGetExtensionData 'local 'EngineReady)
9: (block Nil
10: (dbgLog "Beyond the Mainline: Engine ready...")
11:
12: (if (not (unvGetExtensionData 'local 'TopologyCreated))
13: (block Nil
14: (dbgLog "Beyond the Mainline: Generating topology")
15:
16: (TypCreate &smHumanSpace; (TypGetStaticData &vtAdventureStation; 'smKnownSpace))
17: ; (TypCreate &smKnownSpace; (TypGetStaticData &vtAdventureStation; 'smKnownSpace))
18:
19: (unvSetExtensionData 'local 'TopologyCreated True)
20: )
21:
22: (dbgLog "Beyond the Mainline: Topology already generated")
23: )
24: )
25:
26: (block Nil
27: (dbgLog "Beyond the Mainline: Flagging engine as ready")
28: (unvSetExtensionData 'local 'EngineReady True)
29: )
30: )
31: </OnGlobalTypesInIt>
32: </Events>
33:
34: <!-- (...) some static data (...) -->
35:
36: </StationType>
Code: Select all
05/10/2014 23:03:29 Beyond the Mainline: Flagging engine as ready
05/10/2014 23:03:30 Loading user collection.
05/10/2014 23:03:31 Loading news.
05/10/2014 23:03:41 Initializing adventure: Transcendence.tdb
05/10/2014 23:03:41 Beyond the Mainline: Engine ready...
05/10/2014 23:03:41 Beyond the Mainline: Generating topology
05/10/2014 23:03:42 Created new game
05/10/2014 23:03:42 Starting new game.
Code: Select all
05/10/2014 23:04:52 Beyond the Mainline: Flagging engine as ready
05/10/2014 23:04:54 Loading user collection.
05/10/2014 23:04:55 Loading news.
05/10/2014 23:04:58 Initializing adventure: Transcendence.tdb
05/10/2014 23:04:58 Beyond the Mainline: Engine ready...
05/10/2014 23:04:58 Beyond the Mainline: Generating topology
05/10/2014 23:04:58 Beyond the Mainline: Engine ready...
05/10/2014 23:04:58 Beyond the Mainline: Topology already generated
05/10/2014 23:05:00 Created new game
05/10/2014 23:05:00 Starting new game.
I don't understand why this would happen, I can only guess it is a bug.
@George, am I doing something wrong here? is there some different treatment between core and extension UNIDs with regard to overwriting them with typeCreate?
Cheers,
Brigand