Guest User

Abd_von_Mumit

a guest
Sep 1st, 2010
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 119.08 KB | None | 0 0
  1. # Edited by TheDarkWraith for NewUIs_TDC_4_2_0
  2. # Edited on 8/30/2010 @ 1900
  3. #
  4. # Copyright notice:
  5. # The code in this file is the intellectual property of TheDarkWraith and may not be used, modified, or duplicated in whole,
  6. # or in part, without the express written permission of TheDarkWraith. The code in this file may not be used in any commercial
  7. # application of any form without the express written permission of TheDarkWraith.
  8.  
  9.  
  10. # User Options for TheDarkWraith's mods
  11. # Created by TheDarkWraith
  12.  
  13.  
  14. # NOTE!!!!
  15. # These are the keys the game recognizes:
  16. # A-Z of the alphabet (Capitalized!)
  17. # Tab, Enter, Shift, Ctrl, Alt, Escape, PageUp, PageDown, End, Home, Left, Up, Right, Down, Insert, Delete, numbers 0-9 (which are Keyx - i.e. 4 would be Key4)
  18. # F1-F11 functions keys are unavailable even though MenuKeyManagerWrapper says they are available. Do not try to use F1-F11.
  19.  
  20.  
  21.  
  22. ##################################### UI Stuff (SH3/4/5 modes) ##################################
  23.  
  24. #+++++++++++++ UI Style ++++++++++++++
  25. # Possible UI Styles:
  26. SH5Enhanced = 0
  27. SH3Style = 1
  28. SH4Style = 2
  29.  
  30. # the current UI Style
  31. # set below to either SH3Style, SH4Style, or SH5Enhanced
  32. UIStyle = SH5Enhanced
  33.  
  34.  
  35. #+++++++++++++ SH5 specific UI Items +++++++++++++++
  36. # integrate the fuel, battery, compressed air, and CO2 interface into the bottom bar
  37. # change below to either True or False
  38. IntegrateLevels = True
  39.  
  40.  
  41. #+++++++++++++ SH3/4/5 specific UI items ++++++++++++++++
  42. #
  43. # does the tool helper default to on state at game start (map tools)?
  44. # change below to either True or False
  45. ToolHelperOnAtGameStart = True
  46.  
  47. # Are all night filters enabled?
  48. # change below to either True or False
  49. NightFiltersEnabled = True
  50.  
  51. # Above this specified TC level the clock will be visible (levels are in powers of 2)
  52. AboveThisTCLevelShowClock = 1024
  53.  
  54. # Below this depth do not receive radio contacts/reports (in meters)
  55. BelowThisDepthDontReceiveRadio = 30
  56.  
  57. # are the tables and maps on the navigation map in english or german?
  58. # change below to either True or False
  59. NavigationMapTablesMapsEnglish = False
  60.  
  61. # is the binocular crosshair visible?
  62. # change below to either True or False
  63. BinocularCrosshairEnabled = False
  64.  
  65. # are the periscope water level indicators displayed on the attack and obs scopes?
  66. # change below to either True or False
  67. PeriscopeLevelSH5Visible = True
  68.  
  69. # are the depth and map tools bars visible at game start?
  70. # change below to either True or False
  71. DepthAndMapToolsBarsVisible = True
  72.  
  73. # are the launching of torpedoes realistic? This means that if you try to launch a torpedo that doesn't have it's torpedo door open then the door will have to be opened first before the torpedo can be fired. For salvo shots this can mean that your shot can be screwed up if you don't have all the doors opened first
  74. # change below to either True or False
  75. RealisticTorpedoFirings = True
  76.  
  77. # is a delay incurred between when new speed/throttle is requested and when activated (simulate crew response of answering ordered bells)?
  78. # change below to either True or False
  79. DelayNewSpeedThrottleCommand = True
  80.  
  81. # does the game start with Advanced HUD enabled?
  82. AdvancedHudIsEnabled = True
  83.  
  84. # what is the most fuel efficient speed?
  85. MostFuelEfficientSpeed = 7.5
  86.  
  87. # the hotkey used to order most fuel efficient speed
  88. # Format:
  89. #
  90. # MostFuelEfficientSpeedHotKey = [ False, None, False ]
  91. # False = disabled
  92. # None = key used
  93. # False = shift required
  94. #
  95. # if you wanted to enable this without shift required:
  96. # MostFuelEfficientSpeedHotKey = [ True, MenuKeyManagerWrapper.Keys.M, False ]
  97. #
  98. # if you wanted to disable this:
  99. # MostFuelEfficientSpeedHotKey = [ False, MenuKeyManagerWrapper.Keys.M, False ]
  100. #
  101. # Note: Keys.M is used by the Navigation Map in the stock game! It was used only as example here. Also the hotkey will only be recognized if the sub is surfaced
  102. #
  103. MostFuelEfficientSpeedHotKey = [ True, MenuKeyManagerWrapper.Keys.Y, False ] # change the M to whatever you want. You can't use M!
  104.  
  105.  
  106. ####################################  TDC style (SH3/4/5 modes) #################################
  107.  
  108. #+++++++++++++++++++ TDC modes +++++++++++++++++++++
  109. # Possible TDC modes:
  110. #
  111. # NOTDCDials - no dials
  112. # TDCSpreadAngle - just the spread angle dial for salvo attacks
  113. # TDCMinimalDials - minimal TDC dials
  114. # TDCAllDials - all TDC dials
  115. #
  116. NOTDCDials = 0
  117. TDCMinimalDials = 1
  118. TDCAllDials = 2
  119. TDCSpreadAngle = 3
  120.  
  121. # the current TDC mode
  122. # change below to either NOTDCDials, TDCSpreadAngle, TDCMinimalDials, or TDCAllDials
  123. AttackTDCMode = TDCSpreadAngle
  124. ObsTDCMode = TDCSpreadAngle
  125. UZOTDCMode = TDCSpreadAngle
  126.  
  127. # RAOBF enabled for each scope?
  128. # change below to either True or False
  129. AttackRAOBFEnabled = False
  130. ObsRAOBFEnabled = False
  131. UZORAOBFEnabled = False
  132.  
  133. # the following enables the fix for the resetting of the AOB and Speed dials of the TDC when the stadimeter is used
  134. # change below to either True or False
  135. AOBSpeedTDCFixEnabled = True
  136.  
  137. # are the TDC dials hidden when the RAOBF is visible?
  138. HideTDCDialsWhenUsingRAOBF = False
  139.  
  140.  
  141. #################################### For Dials - SH3 and SH4 UI Modes only ##################################
  142.  
  143. #++++++++++++++ Dial zoom/unzoom animation speed +++++++++++++++
  144. # rate at which dials grow and shrink (in seconds)
  145. # default is 0.10 seconds
  146. DialsAnimationSpeed = 0.10
  147.  
  148. #++++++++++++++ Base Zoom +++++++++++++++
  149. # Base Zoom levels
  150. # when MouseIn the dial will grow by this number
  151. # default is 200
  152. BaseZoomThrottle = 200
  153. # default is 200
  154. BaseZoomSpeed = 200
  155. # default is 200
  156. BaseZoomHeading = 200
  157. # default is 200
  158. BaseZoomRudder = 200
  159. # default is 200
  160. BaseZoomDepth260 = 200
  161. # default is 200
  162. BaseZoomDepth25 = 200
  163.  
  164. #++++++++++++++ Can Zoom +++++++++++++++
  165. # which dials can zoom
  166. # change True to False to disable zoom on that dial
  167. #
  168. # set below to either True or False for each
  169. ThrottleCanZoom = True
  170. SpeedCanZoom = True
  171. HeadingCanZoom = True
  172. RudderCanZoom = True
  173. Depth260CanZoom = True
  174. Depth25CanZoom = True
  175.  
  176. #++++++++++++++ Offsets +++++++++++++++
  177. # y offset adjustment when mouse in/out and image goes offscreen (BaseZoom - for dynamically repositioning dials)
  178. DialsBaseZoomOffsetYAdjustment = 10
  179.  
  180. # x offset adjustment when mouse in/out and image goes offscreen (BaseZoom - for dynamically repositioning dials)
  181. DialsBaseZoomOffsetXAdjustment = 10
  182.  
  183.  
  184. ##################################### Automatics #####################################################
  185. # does the clock automatically show when a torpedo is fired?
  186. # change below to either True or False
  187. AutoShowClockOnTorpFire = False
  188.  
  189. # Does the clock automatically show when follow target enabled (it will auto hide itself if follow target cancelled and clock isn't called for)?
  190. # change below to either True or False
  191. AutoShowClockOnFollowTarget = True
  192.  
  193. # when surfacing does the game automatically order recharge mode?
  194. # change below to either True or False
  195. AutomaticallyOrderRechargeModeUponSurfacing = False
  196.  
  197. # when entering the attack scope station does the scope fully raise automatically?
  198. # change below to either True or False
  199. AutomaticallyRaiseAttackScope = False
  200.  
  201. # when leaving the attack periscope station does the scope automatically fully lower?
  202. # change below to either True or False
  203. AutomaticallyFullyLowerAttackScope = True
  204.  
  205. # when leaving the obs scope station does the scope automatically fully lower?
  206. # change below to either True or False
  207. AutomaticallyFullyLowerObsScope = True
  208.  
  209. # does the Navigator assist you in determing the AOB and Speed of a target based on range readings taken by you?
  210. # change below to either True or False
  211. NavigatorAssistAOBSpeedCalcs = True
  212.  
  213.  
  214. ################################### Automation #######################################################
  215. # the hotkey used to toggle the visibility of the Automation screen (can also be toggled using the 'gears' icon in top right lower bar)
  216. # Format:
  217. #
  218. # AutomationHotKey = [ True, None, False ]
  219. # True = enabled
  220. # None = key used
  221. # False = shift required
  222. #
  223. # if you wanted to enable this without shift required:
  224. # AutomationHotKey = [ True, MenuKeyManagerWrapper.Keys.U, False ]
  225. #
  226. # if you wanted to disable this:
  227. # AutomationHotKey = [ False, MenuKeyManagerWrapper.Keys.U, False ]
  228. #
  229. AutomationHotKey = [ True, MenuKeyManagerWrapper.Keys.G, True ] # change the Q to whatever you want
  230.  
  231. # Is Automation debugging enabled?
  232. AutomationDebuggingEnabled = False
  233.  
  234. # Are Automation start, stop, paused, loop, etc. messages displayed in the message box?
  235. AutomationActionMessagesDisplayed = False
  236.  
  237.  
  238. ################################### Tutorials ########################################################
  239. # still a WIP - not complete
  240.  
  241. # Is Tutorial debugging Enabled?
  242. #TutorialDebuggingEnabled = False
  243.  
  244.  
  245. ################################### Time Delays ######################################################
  246.  
  247. # opening tube time delay for realistic torpedo launches (in seconds)
  248. RealisticOpenTubeTDBase = 7.5
  249.  
  250. # the time delay to account for heavy seas to prevent unnecessary switching of items (items that depend on whether submerged/surfaced to control state)  (in seconds)
  251. WaterLevelTD = 5.0
  252.  
  253. # when surfacing, the time delay before checking to see if batteries need to be recharged and then automatic sending of the recharge order (in seconds)
  254. # this value must be greater than WaterLevelTD or you will get an error!
  255. SwitchToRechargePropulsionTDBase = 180.0
  256.  
  257. # when submerging, the time delay before automatic switching to standard propulsion (in seconds):
  258. # this value must be greater than WaterLevelTD or you will get an error!
  259. SwitchToStdPropulsionTDBase = 180.0
  260.  
  261. # the base time (in seconds) it takes the Navigator to compute the AOB and Speed of a target from 2 range measurements. There is a random amount added to this
  262. # that is in the range (0, 1.0) * value  (i.e. realtimedelay = NavCalcTimeAOBSpeedFromRangeMeasurementsBase + (Random * NavCalcTimeAOBSpeedFromRangeMeasurementsBase)
  263. NavCalcTimeAOBSpeedFromRangeMeasurementsBase = 10.0
  264.  
  265. # the base time (in seconds) it takes the Navigator to compute the Speed of a target from time measurements. There is a random amount added to this that is in the range
  266. # (0, 1.0) * value  (i.e. realtimedelay = NavCalcTimeSpeedFromTimeMeasurementsBase + (Random * NavCalcTimeSpeedFromTimeMeasurementsBase)
  267. NavCalcTimeSpeedFromTimeMeasurementsBase = 5.0
  268.  
  269. # the min and max base time to wait before ordering of new bell or speed if DelayNewSpeedThrottleCommand is enabled:
  270. # have to be int values!
  271. # values are in seconds of time
  272. NewSpeedThrottleDelayMin = 3
  273. NewSpeedThrottleDelayMax = 6
  274.  
  275.  
  276. ##################################### Nomograph (SH3/4/5 Modes) ######################################
  277. # the hotkey used to toggle the nomograph visibility on the mini-map. Nomograph is always visible on nav-map
  278. # Format:
  279. #
  280. # NomographVisibleOnMiniMapHotKey = [ False, None ]
  281. # False = enabled
  282. # None = key used
  283. #
  284. # if you wanted to enable this:
  285. # NomographVisibleOnMiniMapHotKey = [ True, MenuKeyManagerWrapper.Keys.N ]
  286. #
  287. # if you wanted to disable this:
  288. # NomographVisibleOnMiniMapHotKey = [ False, MenuKeyManagerWrapper.Keys.N ]
  289. #
  290. NomographVisibleOnMiniMapHotKey = [ True, MenuKeyManagerWrapper.Keys.N ] # change the N to whatever you want
  291.  
  292. # is the Nomograph visible on the mini-map at game start?
  293. # change below to either True or False
  294. NomographVisibleOnMiniMap = False
  295.  
  296.  
  297. ##################################### Heading Bar/Heading/Rudder Dial (SH5 Mode) #####################
  298. # the hotkey used to display the heading/rudder dial
  299. # Format:
  300. #
  301. # HeadingRudderKey = [ False, None ]
  302. # False = enabled
  303. # None = key used
  304. #
  305. # if you wanted to enable this:
  306. # HeadingRudderKey = [ True, MenuKeyManagerWrapper.Keys.C ]
  307. #
  308. # if you wanted to disable this:
  309. # HeadingRudderKey = [ False, MenuKeyManagerWrapper.Keys.C ]
  310. #
  311. HeadingRudderKey = [ True, MenuKeyManagerWrapper.Keys.C ] # change the C to whatever key you want
  312.  
  313. # the hotkey used to change the heading/rudder dial mode (heading mode or rudder mode) will be the same key
  314. # used to toggle the display of the dial plus the shift key. So you have to press the shift key first then
  315. # the key used to toggle the display of the dial on/off.
  316.  
  317. # the key used to increase the desired heading when you mouse into the heading bar
  318. HeadingBarIncreaseHeadingKey = MenuKeyManagerWrapper.Keys.E # change the E to whatever key you want
  319. HeadingBarDecreaseHeadingKey = MenuKeyManagerWrapper.Keys.Q # change the Q to whatever key you want
  320.  
  321. # some users may want the desired heading to increase slower. Modify this value to add delay (increment in 1's!)
  322. HeadingBarUserDelay = 0
  323.  
  324. # Does the heading bar start expanded at game start?
  325. HeadingBarIsExpanded = True
  326.  
  327.  
  328. ##################################### Crash Dive (SH3/4/5 Modes) #####################################
  329. # the hotkey used for crash dive
  330. # Format:
  331. #
  332. # CrashDiveKey = [ False, None, False ]
  333. # False = enabled
  334. # None = key used
  335. # False = shift key required
  336. #
  337. # so if you wanted the teleport to obs scope hot key to be shift + C:
  338. # CrashDiveKey = [ True, MenuKeyManagerWrapper.Keys.P, True ]
  339. #
  340. # if you didn't want to assign a hotkey for teleport to obs scope:
  341. # CrashDiveKey = [ False, MenuKeyManagerWrapper.Keys.P, False ]
  342. CrashDiveKey = [ True, MenuKeyManagerWrapper.Keys.X, True ]
  343.  
  344. # teleport on crash dive? If enabled and you are currently submerged then no teleporting will take place
  345. # change below to either True or False
  346. TeleportOnCrashDive = True
  347.  
  348. # time interval to wait before giving the crash dive command (simulates crew clearing the topside deck) (this value is in seconds - i.e. 5.5 would be 5 and a half seconds). If submerged then there is no delay
  349. TeleportOnCrashDiveWaitTime = 20
  350.  
  351.  
  352. ##################################### Follow Target (SH3/5 Modes) ####################################
  353. # the hotkey used to toggle follow target (when you have a target selected you can enable this to have the camera
  354. # automatically follow the target as it moves.)
  355. # Format:
  356. #
  357. # FollowSelectedTargetHotKey = [ False, None ]
  358. # False = enabled
  359. # None = key used
  360. #
  361. # if you wanted to enable this:
  362. # FollowSelectedTargetHotKey = [ True, MenuKeyManagerWrapper.Keys.X ]
  363. #
  364. # if you wanted to disable this:
  365. # FollowSelectedTargetHotKey = [ False, MenuKeyManagerWrapper.Keys.X ]
  366. #
  367. FollowSelectedTargetHotKey = [ False, MenuKeyManagerWrapper.Keys.X ] # change the X to whatever you want
  368.  
  369.  
  370. ##################################### Message Box (SH3/4/5 modes) ####################################
  371. # these control the maximum height and width of the message box. They are multiplied by a set value so increment in small values!
  372. # when messagebox is maximized, only the height will go to the max value. Width will stay at user dragged (or game start if hasn't been dragged) value
  373. # they define the maximum size of the message box by: 315.0 * MessageBoxWidthFactor (width in pixels), PageDefaultHud_Feedback_BottomBar.Height * MessageBoxHeightFactor (height in pixels)
  374. # minimum value for below is 1
  375. MessageBoxWidthFactor = 3 # stock is 2
  376. # minimum value for below is 1
  377. MessageBoxHeightFactor = 5.0 # stock is 3
  378.  
  379. # this will cause the message box to start in the expanded mode (vertically) when the game starts
  380. # change below to either True or False
  381. MessageBoxStartsExpanded = False
  382.  
  383. # this will cause the message box to start in widened mode (horizontally) when the game starts
  384. # change below to either True or False
  385. MessageBoxStartsWidened = True
  386.  
  387. # is the message box displayed at game start?
  388. # change below to either True or False
  389. DisplayTheMessageBox = True
  390.  
  391. # the hotkey used to toggle the messagebox visibility
  392. # Format:
  393. #
  394. # DisplayTheMessageBoxHotKey = [ False, None ]
  395. # False = enabled
  396. # None = key used
  397. #
  398. # if you wanted to enable this:
  399. # DisplayTheMessageBoxHotKey = [ True, MenuKeyManagerWrapper.Keys.L ]
  400. #
  401. # if you wanted to disable this:
  402. # DisplayTheMessageBoxHotKey = [ False, MenuKeyManagerWrapper.Keys.L ]
  403. #
  404. DisplayTheMessageBoxHotKey = [ True, MenuKeyManagerWrapper.Keys.L ] # change the L to whatever key you want
  405.  
  406. # to toggle the messagebox between minimized and maximized states use the hotkey used to toggle visibility with the shift key
  407.  
  408. # at what TDC mode do we ensure the messagebox is shown and maximized (it will show when the TC level is greater than or equal to this value)?
  409. ShowMessageBoxAndExpandAtTCLevel = 128
  410.  
  411. # when we drop below the ShowMessageBoxAndExpandAtTCLevel do we restore the messagebox?
  412. # change below to either True or False
  413. RestoreMessageBoxAfterTCLevel = True
  414.  
  415. # number of messages to keep in the messageboxlist. After this number is exceeded, the oldest message is removed from the list. Stock value is 20
  416. # minimum value is 1
  417. NumberMessagesToKeepInMessageBox = 200
  418.  
  419. # is the messagebox draggable?
  420. # change below to either True or False
  421. MessageBoxIsDraggable = False
  422.  
  423. # do we go to TCx (where x is defined by TCxOnMessageBoxTextDesiredTCLevel) when one of the following messages is posted in the messagebox?
  424. # change below to either True or False
  425. TCxOnMessageBoxText = True
  426.  
  427. # if TCxOnMessageBoxText is enabled then it will trigger on the following numbers from menu.txt:
  428. # NOTE: all must be placed on single line with no breaks for options exporter to work correctly!
  429. TCxOnMessageBoxTextNumbers = [ 9200,9201,9202,9203,9204,9205,817,4800,4801,9206,9207,9208,9209,9210,9211,9212,7666,7667 ]
  430.  
  431. # if TCxOnMessageBoxText is enabled and one of the texts from TCxOnMessageBoxTextNumbers is found, what TC level do we go to?
  432. TCxOnMessageBoxTextDesiredTCLevel = 1
  433.  
  434. # do we go to TC1 on any messagebox text?
  435. # change below to either True or False
  436. TC1OnAnyMessageBoxText = False
  437.  
  438.  
  439. ##################################### Ships Journal ##################################################
  440. # the title of the ship's journal
  441. ShipsJournalTitle = "U1618 Abd von Mumit"
  442.  
  443. # the regular time interval when entries will be made into the ship's journal denoting:  Position (Lat and Long), Course, Weather, and whether following waypoints or not. Value is in hours.
  444. # enter a value below for the time period in hours
  445. JournalEntryIntervalTime = 1
  446.  
  447.  
  448. ##################################### Mini-Map (aka TAI map) (SH3/4/5 modes) ######################################
  449. # change below to either True or False for each
  450. #
  451. # Activates the waypoint tool for setting waypoints when the sub is clicked. Setting to False will totally disable the user from setting any waypoints
  452. TAISetCourseWhenSubIsClicked = True
  453. # When a waypoint is clicked the waypoint tool will be activated allowing user to select new waypoints
  454. TAIActivateWaypointToolWhenWaypointClicked = True
  455. # appears it doesn't work for when enabled it does nothing!
  456. TAIKeepPlayerLookingUp = False
  457. # shows the highlighted hydrophone sensor region extending from the contact (medium-orange shading)
  458. TAIHydrophoneEnabled = False # stock True
  459. # shows the highlighted sonar sensor region extending from the contact (red shading)
  460. TAISonarEnabled = False # stock True
  461. # shows the highlighted visual sensor region extending from the contact (dark-grey/black shading)
  462. TAIVisualEnabled = False # stock True
  463. # ??
  464. TAIRadarEnabled = False # stock True
  465. # ??
  466. TAIMaximumSensorRangesEnabled = False # stock False
  467. # shows the torpedo solution line
  468. TAITorpedoSolutionEnabled = False # stock False
  469. # ??
  470. TAIMapScaleEnabled = False # stock False
  471. # latitude and longitude coordinates
  472. TAIMapCoordinatesEnabled = False # stock False
  473. # highlighted view cone extending out from sub denoting current view bearing
  474. TAICameraPositionAndOrientationEnabled = True # stock True
  475. # draws an animated circle where the shell hit
  476. TAIShellHitEnabled = False # stock False
  477. # causes CTD - DO NOT ENABLE!
  478. TAIKGridEnabled = False # stock False - DO NOT ENABLE AS CAUSES CTD!!
  479. # ??
  480. TAIRadarContactsEnabled = False # stock True
  481. # shows visual contacts in the map
  482. TAIVisualContactsEnabled = False # stock True
  483. # shows the hydrophone contact lines to the contacts
  484. TAIHydrophoneContactsEnabled = False # stock True
  485. # ??
  486. TAISonarContactsEnabled = False # stock True
  487. # ??
  488. TAIViewConesEnabled = False # stock False
  489. # ??
  490. TAIMacroObjectivesEnabled = False # stock False
  491. # ??
  492. TAIStrategicObjectivesEnabled = False # stock False
  493. # Is enabled by page navigation map when it's needed
  494. TAIStrategicUnitsEnabled = False # stock False
  495. # ??
  496. TAIContactInfoTextEnabled = False # stock False
  497. # the round numbers on the torpedo solution line (1, 2, 3, etc. )
  498. TAITorpedoImpactPointsEnabled = False # stock True
  499. # ??
  500. TAILocationsInTAIEnabled = False # stock False
  501. # map mode for TAI is enabled
  502. TAIIsTacticalMapEnabled = True # stock True
  503. # ??
  504. TAIHighlightSonarTargetsEnabled = False # stock False
  505. # ??
  506. TAIHighlightRadarTargetsEnabled = False # stock False
  507. # ??
  508. TAIHighlightVisualTargetsEnabled = False # stock False
  509. # ??
  510. TAIMinefieldsEnabled = True # stock False
  511. # ??
  512. TAIShallowWatersEnabled = True # stock False
  513. # ??
  514. TAIResupplyShipEnabled = True # stock False
  515. #
  516. # others
  517. # leave TAISelectedContactGUIEnabled as False
  518. TAISelectedContactGUIEnabled = False  # stock False
  519. TAIParallelCourseButtonEnabled = False # stock False
  520. TAIInterceptCourseButtonEnabled = False # stock False
  521. #
  522. DepthGroupHighlightBitmapEnabled = False # stock False
  523. ThrottleHighlightBitmapEnabled = False # stock False
  524.  
  525.  
  526. # should the mini-map switch to TAI mode when the obs, attack, or UZO station is selected?
  527. # set to False to have the mini-map switch to minimized mode on obs, attack, or UZO station selected. When set to True
  528. # the mini-map will set to TAI mode on those stations selected.
  529. # change below to either True or False
  530. TAIModeOnScopeUZOStationSelected = False
  531.  
  532. # enums for TAIMode on game start (DO NOT CHANGE)
  533. TAIModeMinimized = 0
  534. TAIModeTAI = 1
  535. TAIModeMaximized = 2
  536.  
  537. # When game starts, what the status of the mini-map? Does user want it minimized, TAI mode, or maximized?
  538. # change below to either Minimized, TAI, or Maximized
  539. TAIModeOnGameStart = TAIModeTAI
  540.  
  541. # is the mini-map enabled (visible)? If set to False then the mini-map will not be visible at game start
  542. # change below to either True or False
  543. TAIEnabledInGame = False
  544.  
  545. # the mini-map has 3 states - minimized, TAI, and maximized. What is the TAI initial width and height?
  546. # below are in screen pixels (Note: in order for map contacts info to show width must be >= 490 and height must be >= 200)
  547. TAIInitialWidth = 490
  548. TAIInitialHeight = 450
  549.  
  550.  
  551. ##################################### Nav-Map (aka Navigation Map) (SH3/4/5 modes) ######################################
  552. # change below to either True or False for each
  553. #
  554. # Activates the waypoint tool for setting waypoints when the sub is clicked. Setting to False will totally disable the user from setting any waypoints
  555. NavSetCourseWhenSubIsClicked = True
  556. # When a waypoint is clicked the waypoint tool will be activated allowing user to select new waypoints
  557. NavActivateWaypointToolWhenWaypointClicked = True
  558. # appears it doesn't work for when enabled it does nothing!
  559. NavKeepPlayerLookingUp = False
  560. # shows the highlighted hydrophone sensor region extending from the contact (medium-orange shading)
  561. NavHydrophoneEnabled = False # stock True
  562. # shows the highlighted sonar sensor region extending from the contact (red shading)
  563. NavSonarEnabled = False # stock True
  564. # shows the highlighted visual sensor region extending from the contact (dark-grey/black shading)
  565. NavVisualEnabled = False # stock True
  566. # ??
  567. NavRadarEnabled = False # stock True
  568. # ??
  569. NavMaximumSensorRangesEnabled = False # stock False
  570. # shows the torpedo solution line
  571. NavTorpedoSolutionEnabled = False # stock False
  572. # ??
  573. NavMapScaleEnabled = False # stock False
  574. # latitude and longitude coordinates
  575. NavMapCoordinatesEnabled = True # stock True
  576. # highlighted view cone extending out from sub denoting current view bearing
  577. NavCameraPositionAndOrientationEnabled = True # stock False
  578. # draws an animated circle where the shell hit
  579. NavShellHitEnabled = False # stock False
  580. # causes CTD - DO NOT ENABLE!
  581. NavKGridEnabled = False # stock False - DO NOT ENABLE AS CAUSES CTD!!
  582. # ??
  583. NavRadarContactsEnabled = False # stock True
  584. # shows visual contacts in the map
  585. NavVisualContactsEnabled = False # stock True
  586. # shows the hydrophone contact lines to the contacts
  587. NavHydrophoneContactsEnabled = False # stock True
  588. # ??
  589. NavSonarContactsEnabled = False # stock True
  590. # ??
  591. NavViewConesEnabled = False # stock False
  592. # ??
  593. NavMacroObjectivesEnabled = False # stock False
  594. # ??
  595. NavStrategicObjectivesEnabled = False # stock False
  596. # Is enabled by page navigation map when it's needed
  597. NavStrategicUnitsEnabled = False # stock False
  598. # ??
  599. NavContactInfoTextEnabled = False # stock False
  600. # the round numbers on the torpedo solution line (1, 2, 3, etc. )
  601. NavTorpedoImpactPointsEnabled = False # stock True
  602. # ??
  603. NavLocationsInTAIEnabled = False # stock True
  604. # tactical map mode enabled
  605. NavIsTacticalMapEnabled = False # stock False
  606. # ??
  607. NavHighlightSonarTargetsEnabled = False # stock False
  608. # ??
  609. NavHighlightRadarTargetsEnabled = False # stock False
  610. # ??
  611. NavHighlightVisualTargetsEnabled = False # stock False
  612. # ??
  613. NavMinefieldsEnabled = True # stock False
  614. # ??
  615. NavShallowWatersEnabled = True # stock False
  616. # ??
  617. NavResupplyShipEnabled = True # stock False
  618. #
  619. # others
  620. # leave NavSelectedContactGUIEnabled as False
  621. NavSelectedContactGUIEnabled = False  # stock False
  622. NavParallelCourseButtonEnabled = False # stock False
  623. NavInterceptCourseButtonEnabled = False # stock False
  624.  
  625.  
  626. ##################################### Player Guidance (SH3/4/5 modes) ####################################
  627. # are player guidance events enabled? (are they shown)
  628. # change below to either True or False
  629. PlayerGuidanceEnabled = False
  630.  
  631.  
  632. ##################################### Player Objectives (SH3/4/5 modes) ###################################
  633. # are player objective events enabled? (are they shown)
  634. # change below to either True or False
  635. PlayerObjectivesEnabled = False
  636.  
  637. # if the mission is a tutorial, are Player Objectives enabled at game start? (overrides PlayerObjectivesEnabled at game start)
  638. # change below to either True or False
  639. IfTutPlayerObjsEnabledAtGameStart = True
  640.  
  641.  
  642. ##################################### XO TDC Dialog box (SH3/4/5 modes) ###################################
  643. # is the XO and his dialog box visible on the UZO, attack, and obs scopes views?
  644. # change below to either True or False
  645. XOTDCDialogEnabled = True
  646.  
  647. # if the XO and his dialog box are disabled, are they allowed to pop up when you lock onto a target?
  648. # change below to either True or False
  649. XOTDCDialogAllowedToPop = True
  650.  
  651. # Is the XO TDC dialog box draggable?
  652. # If the XO TDC dialog box is draggable then the feature of the XO TDC dialog box dynamically repositioning
  653. # based on messagebox visibility is disabled.
  654. # change below to either True or False
  655. XOTDCDialogDraggable = False
  656.  
  657. # is manual targeting enforced? If True then the option to 'Turn TDC Off' is disabled and not visible
  658. # change below to either True or False
  659. XOTDCManualTargetingEnforced = True
  660.  
  661.  
  662. ##################################### Item Notes ##########################################################
  663. # this enables or disables the item notes from showing. The item notes is the text that displays above
  664. # the message box when you mouse over certain items
  665. #
  666. # change below to either True or False
  667. ShowItemNotes = True
  668.  
  669.  
  670. ################################### Officers and Orders Bars and Order Categories (SH3/5 modes) ##################################
  671. # are the officers enabled (are the officer icons allowed to be rendered)?
  672. # change below to either True or False
  673. RenderOfficerIcons = True
  674.  
  675. # is the officer bar pinned to the bottom of the screen (if you only want to be able to drag it horizontally then set to True)
  676. # change below to either True or False
  677. OfficersPinnedToBottomOfScreen = True
  678.  
  679. # when user clicks on order from order bar, does the order bar hide itself or stay visible?
  680. # set to True to have order bar hide itself when order selected
  681. # change below to either True or False
  682. HideOrderBarOnOrderClicked = False
  683.  
  684. # when user presses a key, does the order bar hide itself or stay visible?
  685. # set to True to have order bar hide itself when key is pressed
  686. # change below to either True or False
  687. HideOrderBarOnKeyPress = False
  688.  
  689. # do the order categories scroll down when moused out and scroll up when moused in?
  690. # set to True to have the order categories scroll
  691. # change below to either True or False
  692. OrderCategoriesScroll = False
  693.  
  694. # allow debug popups for debugging wounded officers not changing their icons to wounded
  695. # If you enable the debugging of this you need to ensure that your \My Documents\SH5\data\cfg\main.cfg file is setup correctly:
  696. # find this section and ensure that it's setup this way:
  697. #
  698. # [DEVELOPING]
  699. # Modding=Yes
  700. # MenuEditor=Yes
  701. # DebugScripts=Yes
  702. #
  703. # change below to either True or False
  704. WoundedOfficersDebugging = False
  705.  
  706.  
  707. ##################################### Lock/Break Lock (SH3/4/5 modes) ###############################################
  708. # The lock/break lock displays in the attack, obs, and UZO views. Set to True to enable them.
  709. # change below to either True or False
  710. ShowLockBreakLock = False
  711.  
  712.  
  713. ###################################### Teleporting ##############################################
  714. # the hotkeys assigned to the teleport commands
  715. #
  716. # Format:
  717. #
  718. # TeleportToObsScope = [ False, None, False ]
  719. # False = enabled
  720. # None = key used
  721. # False = shift key required
  722. #
  723. # so if you wanted the teleport to obs scope hot key to be shift + T:
  724. # TeleportToObsScope = [ True, MenuKeyManagerWrapper.Keys.T, True ]
  725. #
  726. # if you didn't want to assign a hotkey for teleport to obs scope:
  727. # TeleportToObsScope = [ False, MenuKeyManagerWrapper.Keys.T, False ]
  728. #
  729. TeleportToObsScope = [ False, None, False ]
  730. TeleportToAttackScope = [ False, None, False ]
  731. TeleportToUZO = [ False, None, False ]
  732. TeleportToRadar = [ False, None, False ]
  733. TeleportToHydrophone = [ False, None, False ]
  734. TeleportToDeckGun = [ False, None, False ]
  735. TeleportToFlakGun = [ False, None, False ]
  736.  
  737. # the hotkey used to bring up the Teleporting order bar
  738. # Format:
  739. #
  740. # DisplayTeleportingOrderBarKey = [ False, None, False ]
  741. # False = enabled
  742. # None = key used
  743. # False = shift key required
  744. #
  745. # so if you wanted the teleport to obs scope hot key to be shift + T:
  746. # DisplayTeleportingOrderBarKey = [ True, MenuKeyManagerWrapper.Keys.T, True ]
  747. #
  748. # if you didn't want to assign a hotkey for teleport to obs scope:
  749. # DisplayTeleportingOrderBarKey = [ False, MenuKeyManagerWrapper.Keys.T, False ]
  750. #
  751. DisplayTeleportingOrderBarKey = [ False, MenuKeyManagerWrapper.Keys.N, False ]
  752.  
  753. # if teleported to obs or attack scope and you leave the station, do you teleport back to bridge?
  754. # change below to either True or False
  755. ObsAndAttackReturnToBridge = True
  756.  
  757. # attack scope's fully lower button causes you to leave station and return to bridge?
  758. # change below to either True or False
  759. AttackFullyLowerButtonLeavesStationForBridge = False
  760.  
  761.  
  762. ######################################## Contact Spotted ########################################
  763. # enum of the available date time formats
  764. #
  765. MMDDYYTimeFormat = 0
  766. DDMMYYTimeFormat = 1
  767. MMDDYYMilitaryTimeFormat = 2
  768. DDMMYYMilitaryTimeFormat = 3
  769. ContactDateTimeStampFormat = MMDDYYMilitaryTimeFormat
  770.  
  771.  
  772. ################################### Radio Reports and Messages ##################################
  773. # when a new radio contact report comes in does the TC drop back to 1?
  774. # change below to either True or False
  775. TC1OnNewRadioNavMapContact = True
  776.  
  777. # does TC drop back to 1 on radio message received?
  778. # change below to either True or False
  779. TC1OnRadioMessageReceived = True
  780.  
  781. # When a new radio contact report is received and it's range from the sub is greater than this value and TC1OnNewRadioNavMapContact is enabled then do not go to TC 1
  782. # value is in kms (kilometers)
  783. MaxRadioContactRange = 500
  784.  
  785. # are radio contact reports always clipped to the distance specified above? If not, then they will be subject to the distance specified above if TC1OnNewRadioNavMapContact is enabled.
  786. # change below to either True or False
  787. RadioContactReportsAlwaysClipped = True
  788.  
  789. # Are the contact's actual speed shown or is a relative speed shown (slow=2-6 knots, medium=7-12 knots, fast=13+ knots)?
  790. # change below to either True or False
  791. ShowContactsActualSpeed = False
  792.  
  793. # Are the contact's actual course shown or is a relative course shown (E,ENE,SE,S, SW, etc.)?
  794. # change below to either True or False
  795. ShowContactsActualCourse = False
  796.  
  797. # for radio contact reports, at what range from the sub can the watchstanders see the contact well enough to update it's course (in kms)?
  798. RangeStartUpdatingContacts = 500
  799.  
  800.  
  801. ##################################### others MODs ###############################################
  802.  
  803. # emtguf's periscope rework enabled (adds support for his mod)
  804. # change below to either True or False
  805. emtgufPeriscopeReworkEnabled = False
  806.  
  807.  
  808. #+-------------------------------------- ottos chalkboard --------------------------------------
  809. # the hotkey used to bring up ottos chalkboard
  810. # Format:
  811. #
  812. # ShowChalkBoardHotKey = [ False, None, False ]
  813. # False = enabled
  814. # None = key used
  815. # False = shift key required
  816. #
  817. # so if you wanted to show the chalkboard and hot key to be shift + B:
  818. # ShowChalkBoardHotKey = [ True, MenuKeyManagerWrapper.Keys.B, True ]
  819. #
  820. # if you didn't want to assign a hotkey for ottos chalkboard:
  821. # ShowChalkBoardHotKey = [ False, MenuKeyManagerWrapper.Keys.B, False ]
  822. #
  823. ShowChalkBoardHotKey = [ True, MenuKeyManagerWrapper.Keys.T, True ]
  824.  
  825. # the hotkey used to increase the chalkboard count
  826. # Format:
  827. #
  828. # IncreaseChalkBoardCountHotKey = [ False, None, False ]
  829. # False = enabled
  830. # None = key used
  831. # False = shift key required
  832. #
  833. # so if you wanted the increase chalkboard count hot key to be shift + I:
  834. # IncreaseChalkBoardCountHotKey = [ True, MenuKeyManagerWrapper.Keys.I, True ]
  835. #
  836. # if you didn't want to assign a hotkey for ottos chalkboard:
  837. # IncreaseChalkBoardCountHotKey = [ False, MenuKeyManagerWrapper.Keys.I, False ]
  838. #
  839. IncreaseChalkBoardCountHotKey = [ True, MenuKeyManagerWrapper.Keys.T, False ]
  840.  
  841. # the message displayed on the chalkboard
  842. # you have to use all 3 messages or you will get error!
  843. # if you want one line to not have a message then use ""
  844. # NOTE: all must be placed on single line with no breaks for options exporter to work correctly!
  845. OttosChalkBoardMessage = [ "Grzegorz Brzeczyszczykiewicz", "Chrzaszczyrzewoszyce", "Powiat Lekolody" ]
  846.  
  847.  
  848. ######################################## Debugging ####################################
  849. # for Debugging use only! Do not use!
  850. #
  851. DisplaySapiensKey = MenuKeyManagerWrapper.Keys.Key3
  852. DisplayKeyPressedKey = MenuKeyManagerWrapper.Keys.Key4
  853. DisplayKeyReleasedKey = MenuKeyManagerWrapper.Keys.Key5
  854. DisplayCurrentStationsKey = MenuKeyManagerWrapper.Keys.Key6
  855. DisplayActiveStationKey = MenuKeyManagerWrapper.Keys.Key7
  856. DisplayActiveCameraKey = MenuKeyManagerWrapper.Keys.Key8
  857. ToggleDisplaySubmarineCommandsKey = MenuKeyManagerWrapper.Keys.Key9
  858. ToggleDisplaySubmarineDelayedCommandsKey = MenuKeyManagerWrapper.Keys.Key0
  859.  
  860.  
  861. #######################################################################################
  862.  
  863. #END USER OPTIONS
  864.  
  865. # DO NOT CHANGE ANYTHING BELOW!!
  866.  
  867. ######################################## Accessors ############################################
  868. # required to disable the snorkel orders for the officers. DO NOT CHANGE!
  869. SnorkelEnabled = False
  870. SinglePlayerMode = False
  871. BitmapIndex_NotAvailable = 0
  872. BitmapIndex_NotSelected = 1
  873. BitmapIndex_Selected = 2
  874. BitmapIndex_MouseOver = 3
  875. FollowSelectedTargetWithCamera = False
  876. AttackPeriscopeLevelSH5Handle = None
  877. ObsPeriscopeLevelSH5Handle = None
  878. AllowedToSelectTarget = False
  879. AllowedToPhotographTarget = False
  880. SilentRunning = False
  881. SnorkelRaised = False
  882. BattlestationsActivated = False
  883. SubIsUnderwater = False
  884. ShowNavMapTDC = False
  885. ShipsJournal = []
  886. mastheights = None
  887. IgnoreNewLogMessages = True
  888. GameStartDate = None
  889. SH5InstallPath = None
  890. ShipsJournalPath = "Logs\\"
  891. MagicString = "TheDarkWraithSH5"
  892. SelectedTorpTubes = [ 0 ]
  893. TorpDoorsStatus = [ False, False, False, False, False, False ]
  894. TorpDoorsEnabled = [ True, True, True, True, True, True ]
  895. SH5EHeadingRudderDialVisible = False
  896. CurrentlySelectedTube = 0
  897. InSalvoMode = False
  898. RealisticTorpFiringInProgress = False
  899. TDCIsOn = False
  900. CrewDialogLines = None
  901. Automation = None
  902. Tutorial = None
  903. TimerID_UpdateTutorial = 975316316
  904. RadarOneSweep = 0
  905. RadarContinuousSweep = 1
  906. RadarConstantBearing = 2
  907. RadarSweepMode = RadarConstantBearing
  908. #
  909. RadarIsOn = 0
  910. RadarIsOff = 1
  911. RadarMode = RadarIsOff
  912. #
  913. RadarShortRange = 0
  914. RadarMediumRange = 1
  915. RadarRangeMode = RadarShortRange
  916. #
  917. WatchCrewMode = 0
  918. ManDeckGunMode = 1
  919. ManFlakGunMode = 2
  920. ManDeckAndFlakGunMode = 3
  921. CrewOnDeckMode = WatchCrewMode
  922. #
  923. DGunFireModeHold = 0
  924. DGunFireModeFireAtWill = 1
  925. DGunFireMode = DGunFireModeHold
  926. #
  927. DGunRangeModeShort = 0
  928. DGunRangeModeMedium = 1
  929. DGunRangeModeLong = 2
  930. DGunRangeMode = DGunRangeModeShort
  931. #
  932. DGunAimModeCmdDeck = 0
  933. DGunAimModeWeapons = 1
  934. DGunAimModeWaterline = 2
  935. DGunAimModeHull = 3
  936. DGunAimMode = DGunAimModeWaterline
  937. #
  938. AAGunFireModeHold = 0
  939. AAGunFireModeFireAtWill = 1
  940. AAGunFireMode = AAGunFireModeHold
  941. #
  942. AAGunRangeModeShort = 0
  943. AAGunRangeModeMedium = 1
  944. AAGunRangeModeLong = 2
  945. AAGunRangeMode = AAGunRangeModeShort
  946. #
  947. AAGunPriorityModeFighters = 0
  948. AAGunPriorityModeBombers = 1
  949. AAGunPriorityModeAnyAircraft = 2
  950. AAGunPriorityMode = AAGunPriorityModeAnyAircraft
  951. #
  952. AAGunAimModeClosingTargets = 0
  953. AAGunAimModeAnyTarget = 1
  954. AAGunAimMode = AAGunAimModeAnyTarget
  955.  
  956.  
  957.  
  958. def GetSnorkelEnabled():
  959.     global SnorkelEnabled
  960.     return SnorkelEnabled
  961.  
  962.  
  963. def SetSnorkelEnabled( value ):
  964.     global SnorkelEnabled
  965.     SnorkelEnabled = value
  966.  
  967.  
  968. def GetUIStyle():
  969.     global UIStyle
  970.     return UIStyle
  971.  
  972.  
  973. def GetHeadingBarIncreaseHeadingKey():
  974.     global HeadingBarIncreaseHeadingKey
  975.     return HeadingBarIncreaseHeadingKey
  976.  
  977.  
  978. def GetHeadingBarDecreaseHeadingKey():
  979.     global HeadingBarDecreaseHeadingKey
  980.     return HeadingBarDecreaseHeadingKey
  981.  
  982.  
  983. def GetHeadingBarUserDelay():
  984.     global HeadingBarUserDelay
  985.     return HeadingBarUserDelay
  986.  
  987.  
  988. def GetHeadingRudderKey():
  989.     global HeadingRudderKey
  990.     return HeadingRudderKey
  991.  
  992.  
  993. def GetIntegrateLevels():
  994.     global IntegrateLevels
  995.     return IntegrateLevels
  996.  
  997.  
  998. def GetFollowSelectedTargetHotKey():
  999.     global FollowSelectedTargetHotKey
  1000.     return FollowSelectedTargetHotKey
  1001.  
  1002.  
  1003. def GetNomographVisibleOnMiniMapHotKey():
  1004.     global NomographVisibleOnMiniMapHotKey
  1005.     return NomographVisibleOnMiniMapHotKey
  1006.  
  1007.  
  1008. def GetToolHelperOnAtGameStart():
  1009.     global ToolHelperOnAtGameStart
  1010.     return ToolHelperOnAtGameStart
  1011.  
  1012.  
  1013. def GetTeleportOnCrashDive():
  1014.     global TeleportOnCrashDive
  1015.     return TeleportOnCrashDive
  1016.  
  1017.  
  1018. def GetTeleportOnCrashDiveWaitTime():
  1019.     global TeleportOnCrashDiveWaitTime
  1020.     return TeleportOnCrashDiveWaitTime
  1021.  
  1022.  
  1023. def GetTC1OnNewRadioNavMapContact():
  1024.     global TC1OnNewRadioNavMapContact
  1025.     return TC1OnNewRadioNavMapContact
  1026.  
  1027.  
  1028. def SetTC1OnNewRadioNavMapContact( value ):
  1029.     global TC1OnNewRadioNavMapContact
  1030.     TC1OnNewRadioNavMapContact = value
  1031.  
  1032.  
  1033. def GetNightFiltersEnabled():
  1034.     global NightFiltersEnabled
  1035.     return NightFiltersEnabled
  1036.  
  1037.  
  1038. def GetRenderOfficerIcons():
  1039.     global RenderOfficerIcons
  1040.     return RenderOfficerIcons
  1041.  
  1042.  
  1043. def GetAttackTDCMode():
  1044.     global AttackTDCMode
  1045.     return AttackTDCMode
  1046.  
  1047.  
  1048. def SetAttackTDCMode( value ):
  1049.     global AttackTDCMode
  1050.     AttackTDCMode = value
  1051.  
  1052.  
  1053. def GetObsTDCMode():
  1054.     global ObsTDCMode
  1055.     return ObsTDCMode
  1056.  
  1057.  
  1058. def SetObsTDCMode( value ):
  1059.     global ObsTDCMode
  1060.     ObsTDCMode = value
  1061.  
  1062.  
  1063. def GetUZOTDCMode():
  1064.     global UZOTDCMode
  1065.     return UZOTDCMode
  1066.  
  1067.  
  1068. def SetUZOTDCMode( value ):
  1069.     global UZOTDCMode
  1070.     UZOTDCMode = value
  1071.  
  1072.  
  1073. def GetDialsAnimationSpeed():
  1074.     global DialsAnimationSpeed
  1075.     return DialsAnimationSpeed
  1076.  
  1077.  
  1078. def GetBaseZoomThrottle():
  1079.     global BaseZoomThrottle
  1080.     return BaseZoomThrottle
  1081.  
  1082.  
  1083. def GetBaseZoomSpeed():
  1084.     global BaseZoomSpeed
  1085.     return BaseZoomSpeed
  1086.  
  1087.  
  1088. def GetBaseZoomHeading():
  1089.     global BaseZoomHeading
  1090.     return BaseZoomHeading
  1091.  
  1092.  
  1093. def GetBaseZoomRudder():
  1094.     global BaseZoomRudder
  1095.     return BaseZoomRudder
  1096.  
  1097.  
  1098. def GetBaseZoomDepth260():
  1099.     global BaseZoomDepth260
  1100.     return BaseZoomDepth260
  1101.  
  1102.  
  1103. def GetBaseZoomDepth25():
  1104.     global BaseZoomDepth25
  1105.     return BaseZoomDepth25
  1106.  
  1107.  
  1108. def GetThrottleCanZoom():
  1109.     global ThrottleCanZoom
  1110.     return ThrottleCanZoom
  1111.  
  1112.  
  1113. def GetSpeedCanZoom():
  1114.     global SpeedCanZoom
  1115.     return SpeedCanZoom
  1116.  
  1117.  
  1118. def GetHeadingCanZoom():
  1119.     global HeadingCanZoom
  1120.     return HeadingCanZoom
  1121.  
  1122.  
  1123. def GetRudderCanZoom():
  1124.     global RudderCanZoom
  1125.     return RudderCanZoom
  1126.  
  1127.  
  1128. def GetDepth260CanZoom():
  1129.     global Depth260CanZoom
  1130.     return Depth260CanZoom
  1131.  
  1132.  
  1133. def GetDepth25CanZoom():
  1134.     global Depth25CanZoom
  1135.     return Depth25CanZoom
  1136.  
  1137.  
  1138. def GetDialsBaseZoomOffsetYAdjustment():
  1139.     global DialsBaseZoomOffsetYAdjustment
  1140.     return DialsBaseZoomOffsetYAdjustment
  1141.  
  1142.  
  1143. def GetDialsBaseZoomOffsetXAdjustment():
  1144.     global DialsBaseZoomOffsetXAdjustment
  1145.     return DialsBaseZoomOffsetXAdjustment
  1146.  
  1147.  
  1148. def GetMessageBoxWidthFactor():
  1149.     global MessageBoxWidthFactor
  1150.     return MessageBoxWidthFactor
  1151.  
  1152.  
  1153. def SetMessageBoxWidthFactor( value ):
  1154.     global MessageBoxWidthFactor
  1155.     MessageBoxWidthFactor = value
  1156.  
  1157.  
  1158. def GetMessageBoxHeightFactor():
  1159.     global MessageBoxHeightFactor
  1160.     return MessageBoxHeightFactor
  1161.  
  1162.  
  1163. def SetMessageBoxHeightFactor( value ):
  1164.     global MessageBoxHeightFactor
  1165.     MessageBoxHeightFactor = value
  1166.  
  1167.  
  1168. def GetMessageBoxStartsExpanded():
  1169.     global MessageBoxStartsExpanded
  1170.     return MessageBoxStartsExpanded
  1171.  
  1172.  
  1173. def GetMessageBoxStartsWidened():
  1174.     global MessageBoxStartsWidened
  1175.     return MessageBoxStartsWidened
  1176.  
  1177.  
  1178. def GetDisplayTheMessageBox():
  1179.     global DisplayTheMessageBox
  1180.     return DisplayTheMessageBox
  1181.  
  1182.  
  1183. def SetDisplayTheMessageBox( value ):
  1184.     global DisplayTheMessageBox
  1185.     DisplayTheMessageBox = value
  1186.  
  1187.  
  1188. def GetDisplayTheMessageBoxHotKey():
  1189.     global DisplayTheMessageBoxHotKey
  1190.     return DisplayTheMessageBoxHotKey
  1191.  
  1192.  
  1193. def GetShowMessageBoxAndExpandAtTCLevel():
  1194.     global ShowMessageBoxAndExpandAtTCLevel
  1195.     return ShowMessageBoxAndExpandAtTCLevel
  1196.  
  1197.  
  1198. def SetShowMessageBoxAndExpandAtTCLevel( value ):
  1199.     global ShowMessageBoxAndExpandAtTCLevel
  1200.     ShowMessageBoxAndExpandAtTCLevel = value
  1201.  
  1202.  
  1203. def GetRestoreMessageBoxAfterTCLevel():
  1204.     global RestoreMessageBoxAfterTCLevel
  1205.     return RestoreMessageBoxAfterTCLevel
  1206.  
  1207.  
  1208. def GetTAISetCourseWhenSubIsClicked():
  1209.     global TAISetCourseWhenSubIsClicked
  1210.     return TAISetCourseWhenSubIsClicked
  1211.  
  1212.  
  1213. def SetTAISetCourseWhenSubIsClicked( value ):
  1214.     global TAISetCourseWhenSubIsClicked
  1215.     TAISetCourseWhenSubIsClicked = value
  1216.  
  1217.  
  1218. def GetTAIActivateWaypointToolWhenWaypointClicked():
  1219.     global TAIActivateWaypointToolWhenWaypointClicked
  1220.     return TAIActivateWaypointToolWhenWaypointClicked
  1221.  
  1222.  
  1223. def SetTAIActivateWaypointToolWhenWaypointClicked( value ):
  1224.     global TAIActivateWaypointToolWhenWaypointClicked
  1225.     TAIActivateWaypointToolWhenWaypointClicked = value
  1226.  
  1227.  
  1228. def GetTAIKeepPlayerLookingUp():
  1229.     global TAIKeepPlayerLookingUp
  1230.     return TAIKeepPlayerLookingUp
  1231.  
  1232.  
  1233. def SetTAIKeepPlayerLookingUp( value ):
  1234.     global TAIKeepPlayerLookingUp
  1235.     TAIKeepPlayerLookingUp = value
  1236.  
  1237.  
  1238. def GetTAIHydrophoneEnabled():
  1239.     global TAIHydrophoneEnabled
  1240.     return TAIHydrophoneEnabled
  1241.  
  1242.  
  1243. def SetTAIHydrophoneEnabled( value ):
  1244.     global TAIHydrophoneEnabled
  1245.     TAIHydrophoneEnabled = value
  1246.  
  1247.  
  1248. def GetTAISonarEnabled():
  1249.     global TAISonarEnabled
  1250.     return TAISonarEnabled
  1251.  
  1252.  
  1253. def SetTAISonarEnabled( value ):
  1254.     global TAISonarEnabled
  1255.     TAISonarEnabled = value
  1256.  
  1257.  
  1258. def GetTAIVisualEnabled():
  1259.     global TAIVisualEnabled
  1260.     return TAIVisualEnabled
  1261.  
  1262.  
  1263. def SetTAIVisualEnabled( value ):
  1264.     global TAIVisualEnabled
  1265.     TAIVisualEnabled = value
  1266.  
  1267.  
  1268. def GetTAIRadarEnabled():
  1269.     global TAIRadarEnabled
  1270.     return TAIRadarEnabled
  1271.  
  1272.  
  1273. def SetTAIRadarEnabled( value ):
  1274.     global TAIRadarEnabled
  1275.     TAIRadarEnabled = value
  1276.  
  1277.  
  1278. def GetTAIMaximumSensorRangesEnabled():
  1279.     global TAIMaximumSensorRangesEnabled
  1280.     return TAIMaximumSensorRangesEnabled
  1281.  
  1282.  
  1283. def SetTAIMaximumSensorRangesEnabled( value ):
  1284.     global TAIMaximumSensorRangesEnabled
  1285.     TAIMaximumSensorRangesEnabled = value
  1286.  
  1287.  
  1288. def GetTAITorpedoSolutionEnabled():
  1289.     global TAITorpedoSolutionEnabled
  1290.     return TAITorpedoSolutionEnabled
  1291.  
  1292.  
  1293. def SetTAITorpedoSolutionEnabled( value ):
  1294.     global TAITorpedoSolutionEnabled
  1295.     TAITorpedoSolutionEnabled = value
  1296.  
  1297.  
  1298. def GetTAIMapScaleEnabled():
  1299.     global TAIMapScaleEnabled
  1300.     return TAIMapScaleEnabled
  1301.  
  1302.  
  1303. def SetTAIMapScaleEnabled( value ):
  1304.     global TAIMapScaleEnabled
  1305.     TAIMapScaleEnabled = value
  1306.  
  1307.  
  1308. def GetTAIMapCoordinatesEnabled():
  1309.     global TAIMapCoordinatesEnabled
  1310.     return TAIMapCoordinatesEnabled
  1311.  
  1312.  
  1313. def SetTAIMapCoordinatesEnabled( value ):
  1314.     global TAIMapCoordinatesEnabled
  1315.     TAIMapCoordinatesEnabled = value
  1316.  
  1317.  
  1318. def GetTAICameraPositionAndOrientationEnabled():
  1319.     global TAICameraPositionAndOrientationEnabled
  1320.     return TAICameraPositionAndOrientationEnabled
  1321.  
  1322.  
  1323. def SetTAICameraPositionAndOrientationEnabled( value ):
  1324.     global TAICameraPositionAndOrientationEnabled
  1325.     TAICameraPositionAndOrientationEnabled = value
  1326.  
  1327.  
  1328. def GetTAIShellHitEnabled():
  1329.     global TAIShellHitEnabled
  1330.     return TAIShellHitEnabled
  1331.  
  1332.  
  1333. def SetTAIShellHitEnabled( value ):
  1334.     global TAIShellHitEnabled
  1335.     TAIShellHitEnabled = value
  1336.  
  1337.  
  1338. def GetTAIKGridEnabled():
  1339.     global TAIKGridEnabled
  1340.     return TAIKGridEnabled
  1341.  
  1342.  
  1343. def SetTAIKGridEnabled( value ):
  1344.     global TAIKGridEnabled
  1345.     TAIKGridEnabled = value
  1346.  
  1347.  
  1348. def GetTAIRadarContactsEnabled():
  1349.     global TAIRadarContactsEnabled
  1350.     return TAIRadarContactsEnabled
  1351.  
  1352.  
  1353. def SetTAIRadarContactsEnabled( value ):
  1354.     global TAIRadarContactsEnabled
  1355.     TAIRadarContactsEnabled = value
  1356.  
  1357.  
  1358. def GetTAIVisualContactsEnabled():
  1359.     global TAIVisualContactsEnabled
  1360.     return TAIVisualContactsEnabled
  1361.  
  1362.  
  1363. def SetTAIVisualContactsEnabled( value ):
  1364.     global TAIVisualContactsEnabled
  1365.     TAIVisualContactsEnabled = value
  1366.  
  1367.  
  1368. def GetTAIHydrophoneContactsEnabled():
  1369.     global TAIHydrophoneContactsEnabled
  1370.     return TAIHydrophoneContactsEnabled
  1371.  
  1372.  
  1373. def SetTAIHydrophoneContactsEnabled( value ):
  1374.     global TAIHydrophoneContactsEnabled
  1375.     TAIHydrophoneContactsEnabled = value
  1376.  
  1377.  
  1378. def GetTAISonarContactsEnabled():
  1379.     global TAISonarContactsEnabled
  1380.     return TAISonarContactsEnabled
  1381.  
  1382.  
  1383. def SetTAISonarContactsEnabled( value ):
  1384.     global TAISonarContactsEnabled
  1385.     TAISonarContactsEnabled = value
  1386.  
  1387.  
  1388. def GetTAIViewConesEnabled():
  1389.     global TAIViewConesEnabled
  1390.     return TAIViewConesEnabled
  1391.  
  1392.  
  1393. def SetTAIViewConesEnabled( value ):
  1394.     global TAIViewConesEnabled
  1395.     TAIViewConesEnabled = value
  1396.  
  1397.  
  1398. def GetTAIMacroObjectivesEnabled():
  1399.     global TAIMacroObjectivesEnabled
  1400.     return TAIMacroObjectivesEnabled
  1401.  
  1402.  
  1403. def SetTAIMacroObjectivesEnabled( value ):
  1404.     global TAIMacroObjectivesEnabled
  1405.     TAIMacroObjectivesEnabled = value
  1406.  
  1407.  
  1408. def GetTAIStrategicObjectivesEnabled():
  1409.     global TAIStrategicObjectivesEnabled
  1410.     return TAIStrategicObjectivesEnabled
  1411.  
  1412.  
  1413. def SetTAIStrategicObjectivesEnabled( value ):
  1414.     global TAIStrategicObjectivesEnabled
  1415.     TAIStrategicObjectivesEnabled = value
  1416.  
  1417.  
  1418. def GetTAIStrategicUnitsEnabled():
  1419.     global TAIStrategicUnitsEnabled
  1420.     return TAIStrategicUnitsEnabled
  1421.  
  1422.  
  1423. def SetTAIStrategicUnitsEnabled( value ):
  1424.     global TAIStrategicUnitsEnabled
  1425.     TAIStrategicUnitsEnabled = value
  1426.  
  1427.  
  1428. def GetTAIContactInfoTextEnabled():
  1429.     global TAIContactInfoTextEnabled
  1430.     return TAIContactInfoTextEnabled
  1431.  
  1432.  
  1433. def SetTAIContactInfoTextEnabled( value ):
  1434.     global TAIContactInfoTextEnabled
  1435.     TAIContactInfoTextEnabled = value
  1436.  
  1437.  
  1438. def GetTAITorpedoImpactPointsEnabled():
  1439.     global TAITorpedoImpactPointsEnabled
  1440.     return TAITorpedoImpactPointsEnabled
  1441.  
  1442.  
  1443. def SetTAITorpedoImpactPointsEnabled( value ):
  1444.     global TAITorpedoImpactPointsEnabled
  1445.     TAITorpedoImpactPointsEnabled = value
  1446.  
  1447.  
  1448. def GetTAILocationsInTAIEnabled():
  1449.     global TAILocationsInTAIEnabled
  1450.     return TAILocationsInTAIEnabled
  1451.  
  1452.  
  1453. def SetTAILocationsInTAIEnabled( value ):
  1454.     global TAILocationsInTAIEnabled
  1455.     TAILocationsInTAIEnabled = value
  1456.  
  1457.  
  1458. def GetTAIIsTacticalMapEnabled():
  1459.     global TAIIsTacticalMapEnabled
  1460.     return TAIIsTacticalMapEnabled
  1461.  
  1462.  
  1463. def SetTAIIsTacticalMapEnabled( value ):
  1464.     global TAIIsTacticalMapEnabled
  1465.     TAIIsTacticalMapEnabled = value
  1466.  
  1467.  
  1468. def GetTAIHighlightSonarTargetsEnabled():
  1469.     global TAIHighlightSonarTargetsEnabled
  1470.     return TAIHighlightSonarTargetsEnabled
  1471.  
  1472.  
  1473. def SetTAIHighlightSonarTargetsEnabled( value ):
  1474.     global TAIHighlightSonarTargetsEnabled
  1475.     TAIHighlightSonarTargetsEnabled = value
  1476.  
  1477.  
  1478. def GetTAIHighlightRadarTargetsEnabled():
  1479.     global TAIHighlightRadarTargetsEnabled
  1480.     return TAIHighlightRadarTargetsEnabled
  1481.  
  1482.  
  1483. def SetTAIHighlightRadarTargetsEnabled( value ):
  1484.     global TAIHighlightRadarTargetsEnabled
  1485.     TAIHighlightRadarTargetsEnabled = value
  1486.  
  1487.  
  1488. def GetTAIHighlightVisualTargetsEnabled():
  1489.     global TAIHighlightVisualTargetsEnabled
  1490.     return TAIHighlightVisualTargetsEnabled
  1491.  
  1492.  
  1493. def SetTAIHighlightVisualTargetsEnabled( value ):
  1494.     global TAIHighlightVisualTargetsEnabled
  1495.     TAIHighlightVisualTargetsEnabled = value
  1496.  
  1497.  
  1498. def GetTAIMinefieldsEnabled():
  1499.     global TAIMinefieldsEnabled
  1500.     return TAIMinefieldsEnabled
  1501.  
  1502.  
  1503. def SetTAIMinefieldsEnabled( value ):
  1504.     global TAIMinefieldsEnabled
  1505.     TAIMinefieldsEnabled = value
  1506.  
  1507.  
  1508. def GetTAIShallowWatersEnabled():
  1509.     global TAIShallowWatersEnabled
  1510.     return TAIShallowWatersEnabled
  1511.  
  1512.  
  1513. def SetTAIShallowWatersEnabled( value ):
  1514.     global TAIShallowWatersEnabled
  1515.     TAIShallowWatersEnabled = value
  1516.  
  1517.  
  1518. def GetTAIResupplyShipEnabled():
  1519.     global TAIResupplyShipEnabled
  1520.     return TAIResupplyShipEnabled
  1521.  
  1522.  
  1523. def SetTAIResupplyShipEnabled( value ):
  1524.     global TAIResupplyShipEnabled
  1525.     TAIResupplyShipEnabled = value
  1526.  
  1527.  
  1528. def GetTAISelectedContactGUIEnabled():
  1529.     global TAISelectedContactGUIEnabled
  1530.     return TAISelectedContactGUIEnabled
  1531.  
  1532.  
  1533. def SetTAISelectedContactGUIEnabled( value ):
  1534.     global TAISelectedContactGUIEnabled
  1535.     TAISelectedContactGUIEnabled = value
  1536.  
  1537.  
  1538. def GetTAIParallelCourseButtonEnabled():
  1539.     global TAIParallelCourseButtonEnabled
  1540.     return TAIParallelCourseButtonEnabled
  1541.  
  1542.  
  1543. def SetTAIParallelCourseButtonEnabled( value ):
  1544.     global TAIParallelCourseButtonEnabled
  1545.     TAIParallelCourseButtonEnabled = value
  1546.  
  1547.  
  1548. def GetTAIInterceptCourseButtonEnabled():
  1549.     global TAIInterceptCourseButtonEnabled
  1550.     return TAIInterceptCourseButtonEnabled
  1551.  
  1552.  
  1553. def SetTAIInterceptCourseButtonEnabled( value ):
  1554.     global TAIInterceptCourseButtonEnabled
  1555.     TAIInterceptCourseButtonEnabled = value
  1556.  
  1557.  
  1558. def GetDepthGroupHighlightBitmapEnabled():
  1559.     global DepthGroupHighlightBitmapEnabled
  1560.     return DepthGroupHighlightBitmapEnabled
  1561.  
  1562.  
  1563. def GetThrottleHighlightBitmapEnabled():
  1564.     global ThrottleHighlightBitmapEnabled
  1565.     return ThrottleHighlightBitmapEnabled
  1566.  
  1567.  
  1568. def GetTAIModeOnScopeUZOStationSelected():
  1569.     global TAIModeOnScopeUZOStationSelected
  1570.     return TAIModeOnScopeUZOStationSelected
  1571.  
  1572.  
  1573. def GetTAIModeOnGameStart():
  1574.     global TAIModeOnGameStart
  1575.     return TAIModeOnGameStart
  1576.  
  1577.  
  1578. def GetNavSetCourseWhenSubIsClicked():
  1579.     global NavSetCourseWhenSubIsClicked
  1580.     return NavSetCourseWhenSubIsClicked
  1581.  
  1582.  
  1583. def SetNavSetCourseWhenSubIsClicked( value ):
  1584.     global NavSetCourseWhenSubIsClicked
  1585.     NavSetCourseWhenSubIsClicked = value
  1586.  
  1587.  
  1588. def GetNavActivateWaypointToolWhenWaypointClicked():
  1589.     global NavActivateWaypointToolWhenWaypointClicked
  1590.     return NavActivateWaypointToolWhenWaypointClicked
  1591.  
  1592.  
  1593. def SetNavActivateWaypointToolWhenWaypointClicked( value ):
  1594.     global NavActivateWaypointToolWhenWaypointClicked
  1595.     NavActivateWaypointToolWhenWaypointClicked = value
  1596.  
  1597.  
  1598. def GetNavKeepPlayerLookingUp():
  1599.     global NavKeepPlayerLookingUp
  1600.     return NavKeepPlayerLookingUp
  1601.  
  1602.  
  1603. def SetNavKeepPlayerLookingUp( value ):
  1604.     global NavKeepPlayerLookingUp
  1605.     NavKeepPlayerLookingUp = value
  1606.  
  1607.  
  1608. def GetNavHydrophoneEnabled():
  1609.     global NavHydrophoneEnabled
  1610.     return NavHydrophoneEnabled
  1611.  
  1612.  
  1613. def SetNavHydrophoneEnabled( value ):
  1614.     global NavHydrophoneEnabled
  1615.     NavHydrophoneEnabled = value
  1616.  
  1617.  
  1618. def GetNavSonarEnabled():
  1619.     global NavSonarEnabled
  1620.     return NavSonarEnabled
  1621.  
  1622.  
  1623. def SetNavSonarEnabled( value ):
  1624.     global NavSonarEnabled
  1625.     NavSonarEnabled = value
  1626.  
  1627.  
  1628. def GetNavVisualEnabled():
  1629.     global NavVisualEnabled
  1630.     return NavVisualEnabled
  1631.  
  1632.  
  1633. def SetNavVisualEnabled( value ):
  1634.     global NavVisualEnabled
  1635.     NavVisualEnabled = value
  1636.  
  1637.  
  1638. def GetNavRadarEnabled():
  1639.     global NavRadarEnabled
  1640.     return NavRadarEnabled
  1641.  
  1642.  
  1643. def SetNavRadarEnabled( value ):
  1644.     global NavRadarEnabled
  1645.     NavRadarEnabled = value
  1646.  
  1647.  
  1648. def GetNavMaximumSensorRangesEnabled():
  1649.     global NavMaximumSensorRangesEnabled
  1650.     return NavMaximumSensorRangesEnabled
  1651.  
  1652.  
  1653. def SetNavMaximumSensorRangesEnabled( value ):
  1654.     global NavMaximumSensorRangesEnabled
  1655.     NavMaximumSensorRangesEnabled = value
  1656.  
  1657.  
  1658. def GetNavTorpedoSolutionEnabled():
  1659.     global NavTorpedoSolutionEnabled
  1660.     return NavTorpedoSolutionEnabled
  1661.  
  1662.  
  1663. def SetNavTorpedoSolutionEnabled( value ):
  1664.     global NavTorpedoSolutionEnabled
  1665.     NavTorpedoSolutionEnabled = value
  1666.  
  1667.  
  1668. def GetNavMapScaleEnabled():
  1669.     global NavMapScaleEnabled
  1670.     return NavMapScaleEnabled
  1671.  
  1672.  
  1673. def SetNavMapScaleEnabled( value ):
  1674.     global NavMapScaleEnabled
  1675.     NavMapScaleEnabled = value
  1676.  
  1677.  
  1678. def GetNavMapCoordinatesEnabled():
  1679.     global NavMapCoordinatesEnabled
  1680.     return NavMapCoordinatesEnabled
  1681.  
  1682.  
  1683. def SetNavMapCoordinatesEnabled( value ):
  1684.     global NavMapCoordinatesEnabled
  1685.     NavMapCoordinatesEnabled = value
  1686.  
  1687.  
  1688. def GetNavCameraPositionAndOrientationEnabled():
  1689.     global NavCameraPositionAndOrientationEnabled
  1690.     return NavCameraPositionAndOrientationEnabled
  1691.  
  1692.  
  1693. def SetNavCameraPositionAndOrientationEnabled( value ):
  1694.     global NavCameraPositionAndOrientationEnabled
  1695.     NavCameraPositionAndOrientationEnabled = value
  1696.  
  1697.  
  1698. def GetNavShellHitEnabled():
  1699.     global NavShellHitEnabled
  1700.     return NavShellHitEnabled
  1701.  
  1702.  
  1703. def SetNavShellHitEnabled( value ):
  1704.     global NavShellHitEnabled
  1705.     NavShellHitEnabled = value
  1706.  
  1707.  
  1708. def GetNavKGridEnabled():
  1709.     global NavKGridEnabled
  1710.     return NavKGridEnabled
  1711.  
  1712.  
  1713. def SetNavKGridEnabled( value ):
  1714.     global NavKGridEnabled
  1715.     NavKGridEnabled = value
  1716.  
  1717.  
  1718. def GetNavRadarContactsEnabled():
  1719.     global NavRadarContactsEnabled
  1720.     return NavRadarContactsEnabled
  1721.  
  1722.  
  1723. def SetNavRadarContactsEnabled( value ):
  1724.     global NavRadarContactsEnabled
  1725.     NavRadarContactsEnabled = value
  1726.  
  1727.  
  1728. def GetNavVisualContactsEnabled():
  1729.     global NavVisualContactsEnabled
  1730.     return NavVisualContactsEnabled
  1731.  
  1732.  
  1733. def SetNavVisualContactsEnabled( value ):
  1734.     global NavVisualContactsEnabled
  1735.     NavVisualContactsEnabled = value
  1736.  
  1737.  
  1738. def GetNavHydrophoneContactsEnabled():
  1739.     global NavHydrophoneContactsEnabled
  1740.     return NavHydrophoneContactsEnabled
  1741.  
  1742.  
  1743. def SetNavHydrophoneContactsEnabled( value ):
  1744.     global NavHydrophoneContactsEnabled
  1745.     NavHydrophoneContactsEnabled = value
  1746.  
  1747.  
  1748. def GetNavSonarContactsEnabled():
  1749.     global NavSonarContactsEnabled
  1750.     return NavSonarContactsEnabled
  1751.  
  1752.  
  1753. def SetNavSonarContactsEnabled( value ):
  1754.     global NavSonarContactsEnabled
  1755.     NavSonarContactsEnabled = value
  1756.  
  1757.  
  1758. def GetNavViewConesEnabled():
  1759.     global NavViewConesEnabled
  1760.     return NavViewConesEnabled
  1761.  
  1762.  
  1763. def SetNavViewConesEnabled( value ):
  1764.     global NavViewConesEnabled
  1765.     NavViewConesEnabled = value
  1766.  
  1767.  
  1768. def GetNavMacroObjectivesEnabled():
  1769.     global NavMacroObjectivesEnabled
  1770.     return NavMacroObjectivesEnabled
  1771.  
  1772.  
  1773. def SetNavMacroObjectivesEnabled( value ):
  1774.     global NavMacroObjectivesEnabled
  1775.     NavMacroObjectivesEnabled = value
  1776.  
  1777.  
  1778. def GetNavStrategicObjectivesEnabled():
  1779.     global NavStrategicObjectivesEnabled
  1780.     return NavStrategicObjectivesEnabled
  1781.  
  1782.  
  1783. def SetNavStrategicObjectivesEnabled( value ):
  1784.     global NavStrategicObjectivesEnabled
  1785.     NavStrategicObjectivesEnabled = value
  1786.  
  1787.  
  1788. def GetNavStrategicUnitsEnabled():
  1789.     global NavStrategicUnitsEnabled
  1790.     return NavStrategicUnitsEnabled
  1791.  
  1792.  
  1793. def SetNavStrategicUnitsEnabled( value ):
  1794.     global NavStrategicUnitsEnabled
  1795.     NavStrategicUnitsEnabled = value
  1796.  
  1797.  
  1798. def GetNavContactInfoTextEnabled():
  1799.     global NavContactInfoTextEnabled
  1800.     return NavContactInfoTextEnabled
  1801.  
  1802.  
  1803. def SetNavContactInfoTextEnabled( value ):
  1804.     global NavContactInfoTextEnabled
  1805.     NavContactInfoTextEnabled = value
  1806.  
  1807.  
  1808. def GetNavTorpedoImpactPointsEnabled():
  1809.     global NavTorpedoImpactPointsEnabled
  1810.     return NavTorpedoImpactPointsEnabled
  1811.  
  1812.  
  1813. def SetNavTorpedoImpactPointsEnabled( value ):
  1814.     global NavTorpedoImpactPointsEnabled
  1815.     NavTorpedoImpactPointsEnabled = value
  1816.  
  1817.  
  1818. def GetNavLocationsInTAIEnabled():
  1819.     global NavLocationsInTAIEnabled
  1820.     return NavLocationsInTAIEnabled
  1821.  
  1822.  
  1823. def SetNavLocationsInTAIEnabled( value ):
  1824.     global NavLocationsInTAIEnabled
  1825.     NavLocationsInTAIEnabled = value
  1826.  
  1827.  
  1828. def GetNavIsTacticalMapEnabled():
  1829.     global NavIsTacticalMapEnabled
  1830.     return NavIsTacticalMapEnabled
  1831.  
  1832.  
  1833. def SetNavIsTacticalMapEnabled( value ):
  1834.     global NavIsTacticalMapEnabled
  1835.     NavIsTacticalMapEnabled = value
  1836.  
  1837.  
  1838. def GetNavHighlightSonarTargetsEnabled():
  1839.     global NavHighlightSonarTargetsEnabled
  1840.     return NavHighlightSonarTargetsEnabled
  1841.  
  1842.  
  1843. def SetNavHighlightSonarTargetsEnabled( value ):
  1844.     global NavHighlightSonarTargetsEnabled
  1845.     NavHighlightSonarTargetsEnabled = value
  1846.  
  1847.  
  1848. def GetNavHighlightRadarTargetsEnabled():
  1849.     global NavHighlightRadarTargetsEnabled
  1850.     return NavHighlightRadarTargetsEnabled
  1851.  
  1852.  
  1853. def SetNavHighlightRadarTargetsEnabled( value ):
  1854.     global NavHighlightRadarTargetsEnabled
  1855.     NavHighlightRadarTargetsEnabled = value
  1856.  
  1857.  
  1858. def GetNavHighlightVisualTargetsEnabled():
  1859.     global NavHighlightVisualTargetsEnabled
  1860.     return NavHighlightVisualTargetsEnabled
  1861.  
  1862.  
  1863. def SetNavHighlightVisualTargetsEnabled( value ):
  1864.     global NavHighlightVisualTargetsEnabled
  1865.     NavHighlightVisualTargetsEnabled = value
  1866.  
  1867.  
  1868. def GetNavMinefieldsEnabled():
  1869.     global NavMinefieldsEnabled
  1870.     return NavMinefieldsEnabled
  1871.  
  1872.  
  1873. def SetNavMinefieldsEnabled( value ):
  1874.     global NavMinefieldsEnabled
  1875.     NavMinefieldsEnabled = value
  1876.  
  1877.  
  1878. def GetNavShallowWatersEnabled():
  1879.     global NavShallowWatersEnabled
  1880.     return NavShallowWatersEnabled
  1881.  
  1882.  
  1883. def SetNavShallowWatersEnabled( value ):
  1884.     global NavShallowWatersEnabled
  1885.     NavShallowWatersEnabled = value
  1886.  
  1887.  
  1888. def GetNavResupplyShipEnabled():
  1889.     global NavResupplyShipEnabled
  1890.     return NavResupplyShipEnabled
  1891.  
  1892.  
  1893. def SetNavResupplyShipEnabled( value ):
  1894.     global NavResupplyShipEnabled
  1895.     NavResupplyShipEnabled = value
  1896.  
  1897.  
  1898. def GetNavSelectedContactGUIEnabled():
  1899.     global NavSelectedContactGUIEnabled
  1900.     return NavSelectedContactGUIEnabled
  1901.  
  1902.  
  1903. def SetNavSelectedContactGUIEnabled( value ):
  1904.     global NavSelectedContactGUIEnabled
  1905.     NavSelectedContactGUIEnabled = value
  1906.  
  1907.  
  1908. def GetNavParallelCourseButtonEnabled():
  1909.     global NavParallelCourseButtonEnabled
  1910.     return NavParallelCourseButtonEnabled
  1911.  
  1912.  
  1913. def SetNavParallelCourseButtonEnabled( value ):
  1914.     global NavParallelCourseButtonEnabled
  1915.     NavParallelCourseButtonEnabled = value
  1916.  
  1917.  
  1918. def GetNavInterceptCourseButtonEnabled():
  1919.     global NavInterceptCourseButtonEnabled
  1920.     return NavInterceptCourseButtonEnabled
  1921.  
  1922.  
  1923. def SetNavInterceptCourseButtonEnabled( value ):
  1924.     global NavInterceptCourseButtonEnabled
  1925.     NavInterceptCourseButtonEnabled = value
  1926.  
  1927.  
  1928. def GetPlayerGuidanceEnabled():
  1929.     global PlayerGuidanceEnabled
  1930.     return PlayerGuidanceEnabled
  1931.  
  1932.  
  1933. def SetPlayerGuidanceEnabled( value ):
  1934.     global PlayerGuidanceEnabled
  1935.     PlayerGuidanceEnabled = value
  1936.  
  1937.  
  1938. def GetPlayerObjectivesEnabled():
  1939.     global PlayerObjectivesEnabled
  1940.     return PlayerObjectivesEnabled
  1941.  
  1942.  
  1943. def SetPlayerObjectivesEnabled( value ):
  1944.     global PlayerObjectivesEnabled
  1945.     PlayerObjectivesEnabled = value
  1946.  
  1947.  
  1948. def GetIfTutPlayerObjsEnabledAtGameStart():
  1949.     global IfTutPlayerObjsEnabledAtGameStart
  1950.     return IfTutPlayerObjsEnabledAtGameStart
  1951.  
  1952.  
  1953. def GetXOTDCDialogEnabled():
  1954.     global XOTDCDialogEnabled
  1955.     return XOTDCDialogEnabled
  1956.  
  1957.  
  1958. def SetXOTDCDialogEnabled( value ):
  1959.     global XOTDCDialogEnabled
  1960.     XOTDCDialogEnabled = value
  1961.  
  1962.  
  1963. def GetXOTDCDialogDraggable():
  1964.     global XOTDCDialogDraggable
  1965.     return XOTDCDialogDraggable
  1966.  
  1967.  
  1968. def GetShowItemNotes():
  1969.     global ShowItemNotes
  1970.     return ShowItemNotes
  1971.  
  1972.  
  1973. def SetShowItemNotes( value ):
  1974.     global ShowItemNotes
  1975.     ShowItemNotes = value
  1976.  
  1977.  
  1978. def GetHideOrderBarOnOrderClicked():
  1979.     global HideOrderBarOnOrderClicked
  1980.     return HideOrderBarOnOrderClicked
  1981.  
  1982.  
  1983. def GetHideOrderBarOnKeyPress():
  1984.     global HideOrderBarOnKeyPress
  1985.     return HideOrderBarOnKeyPress
  1986.  
  1987.  
  1988. def GetOrderCategoriesScroll():
  1989.     global OrderCategoriesScroll
  1990.     return OrderCategoriesScroll
  1991.  
  1992.  
  1993. def SetOrderCategoriesScroll( value ):
  1994.     global OrderCategoriesScroll
  1995.     OrderCategoriesScroll = value
  1996.     # do something else to update it
  1997.  
  1998.  
  1999. def GetShowLockBreakLock():
  2000.     global ShowLockBreakLock
  2001.     return ShowLockBreakLock
  2002.  
  2003.  
  2004. def SetShowLockBreakLock( value ):
  2005.     global ShowLockBreakLock
  2006.     ShowLockBreakLock = value
  2007.  
  2008.  
  2009. def GetTeleportToObsScope():
  2010.     global TeleportToObsScope
  2011.     return TeleportToObsScope
  2012.  
  2013.  
  2014. def GetTeleportToAttackScope():
  2015.     global TeleportToAttackScope
  2016.     return TeleportToAttackScope
  2017.  
  2018.  
  2019. def GetTeleportToUZO():
  2020.     global TeleportToUZO
  2021.     return TeleportToUZO
  2022.  
  2023.  
  2024. def GetTeleportToRadar():
  2025.     global TeleportToRadar
  2026.     return TeleportToRadar
  2027.  
  2028.  
  2029. def GetTeleportToHydrophone():
  2030.     global TeleportToHydrophone
  2031.     return TeleportToHydrophone
  2032.  
  2033.  
  2034. def GetTeleportToDeckGun():
  2035.     global TeleportToDeckGun
  2036.     return TeleportToDeckGun
  2037.  
  2038.  
  2039. def GetTeleportToFlakGun():
  2040.     global TeleportToFlakGun
  2041.     return TeleportToFlakGun
  2042.  
  2043.  
  2044. def GetDisplayTeleportingOrderBarKey():
  2045.     global DisplayTeleportingOrderBarKey
  2046.     return DisplayTeleportingOrderBarKey
  2047.  
  2048.  
  2049. def GetObsAndAttackReturnToBridge():
  2050.     global ObsAndAttackReturnToBridge
  2051.     return ObsAndAttackReturnToBridge
  2052.  
  2053.  
  2054. def GetContactDateTimeStampFormat():
  2055.     global ContactDateTimeStampFormat
  2056.     return ContactDateTimeStampFormat
  2057.  
  2058.  
  2059. def GetemtgufPeriscopeReworkEnabled():
  2060.     global emtgufPeriscopeReworkEnabled
  2061.     return emtgufPeriscopeReworkEnabled
  2062.  
  2063.  
  2064. def GetShowChalkBoardHotKey():
  2065.     global ShowChalkBoardHotKey
  2066.     return ShowChalkBoardHotKey
  2067.  
  2068.  
  2069. def GetIncreaseChalkBoardCountHotKey():
  2070.     global IncreaseChalkBoardCountHotKey
  2071.     return IncreaseChalkBoardCountHotKey
  2072.  
  2073.  
  2074. def GetOttosChalkBoardMessage():
  2075.     global OttosChalkBoardMessage
  2076.     return OttosChalkBoardMessage
  2077.  
  2078.  
  2079. def GetSinglePlayerMode():
  2080.     global SinglePlayerMode
  2081.     return SinglePlayerMode
  2082.  
  2083.  
  2084. def SetSinglePlayerMode( value ):
  2085.     global SinglePlayerMode
  2086.     SinglePlayerMode = value
  2087.  
  2088.  
  2089. def GetBitmapIndex_NotAvailable():
  2090.     global BitmapIndex_NotAvailable
  2091.     return BitmapIndex_NotAvailable
  2092.  
  2093.  
  2094. def GetBitmapIndex_NotSelected():
  2095.     global BitmapIndex_NotSelected
  2096.     return BitmapIndex_NotSelected
  2097.  
  2098.  
  2099. def GetBitmapIndex_Selected():
  2100.     global BitmapIndex_Selected
  2101.     return BitmapIndex_Selected
  2102.  
  2103.  
  2104. def GetBitmapIndex_MouseOver():
  2105.     global BitmapIndex_MouseOver
  2106.     return BitmapIndex_MouseOver
  2107.  
  2108.  
  2109. def GetNomographVisibleOnMiniMap():
  2110.     global NomographVisibleOnMiniMap
  2111.     return NomographVisibleOnMiniMap
  2112.  
  2113.  
  2114. def SetNomographVisibleOnMiniMap( value ):
  2115.     global NomographVisibleOnMiniMap
  2116.     NomographVisibleOnMiniMap = value
  2117.  
  2118.  
  2119. def GetFollowSelectedTargetWithCamera():
  2120.     global FollowSelectedTargetWithCamera
  2121.     return FollowSelectedTargetWithCamera
  2122.  
  2123.  
  2124. def SetFollowSelectedTargetWithCamera( value ):
  2125.     global FollowSelectedTargetWithCamera
  2126.     FollowSelectedTargetWithCamera = value
  2127.  
  2128.  
  2129. def GetAttackPeriscopeLevelSH5Handle():
  2130.     global AttackPeriscopeLevelSH5Handle
  2131.     return AttackPeriscopeLevelSH5Handle
  2132.  
  2133.  
  2134. def SetAttackPeriscopeLevelSH5Handle( value ):
  2135.     global AttackPeriscopeLevelSH5Handle
  2136.     AttackPeriscopeLevelSH5Handle = value
  2137.  
  2138.  
  2139. def GetObsPeriscopeLevelSH5Handle():
  2140.     global ObsPeriscopeLevelSH5Handle
  2141.     return ObsPeriscopeLevelSH5Handle
  2142.  
  2143.  
  2144. def SetObsPeriscopeLevelSH5Handle( value ):
  2145.     global ObsPeriscopeLevelSH5Handle
  2146.     ObsPeriscopeLevelSH5Handle = value
  2147.  
  2148.  
  2149. def GetAllowedToSelectTarget():
  2150.     global AllowedToSelectTarget
  2151.     return AllowedToSelectTarget
  2152.  
  2153.  
  2154. def SetAllowedToSelectTarget( value ):
  2155.     global AllowedToSelectTarget
  2156.     AllowedToSelectTarget = value
  2157.  
  2158.  
  2159. def GetAllowedToPhotographTarget():
  2160.     global AllowedToPhotographTarget
  2161.     return AllowedToPhotographTarget
  2162.  
  2163.  
  2164. def SetAllowedToPhotographTarget( value ):
  2165.     global AllowedToPhotographTarget
  2166.     AllowedToPhotographTarget = value
  2167.  
  2168.  
  2169. def GetSilentRunning():
  2170.     global SilentRunning
  2171.     return SilentRunning
  2172.  
  2173.  
  2174. def SetSilentRunning( value ):
  2175.     global SilentRunning
  2176.     SilentRunning = value
  2177.  
  2178.  
  2179. def GetSnorkelRaised():
  2180.     global SnorkelRaised
  2181.     return SnorkelRaised
  2182.  
  2183.  
  2184. def SetSnorkelRaised( value ):
  2185.     global SnorkelRaised
  2186.     SnorkelRaised = value
  2187.  
  2188.  
  2189. def GetBattlestationsActivated():
  2190.     global BattlestationsActivated
  2191.     return BattlestationsActivated
  2192.  
  2193.  
  2194. def SetBattlestationsActivated( value ):
  2195.     global BattlestationsActivated
  2196.     BattlestationsActivated = value
  2197.  
  2198.  
  2199. def GetSubIsUnderwater():
  2200.     global SubIsUnderwater
  2201.     return SubIsUnderwater
  2202.  
  2203.  
  2204. def SetSubIsUnderwater( value ):
  2205.     global SubIsUnderwater
  2206.     SubIsUnderwater = value
  2207.  
  2208.  
  2209. def GetNumberMessagesToKeepInMessageBox():
  2210.     global NumberMessagesToKeepInMessageBox
  2211.     return NumberMessagesToKeepInMessageBox
  2212.    
  2213.    
  2214. def SetNumberMessagesToKeepInMessageBox( value ):
  2215.     global NumberMessagesToKeepInMessageBox
  2216.     NumberMessagesToKeepInMessageBox = value
  2217.    
  2218.    
  2219. def GetTC1OnRadioMessageReceived():
  2220.     global TC1OnRadioMessageReceived
  2221.     return TC1OnRadioMessageReceived
  2222.    
  2223.  
  2224. def SetTC1OnRadioMessageReceived( value ):
  2225.     global TC1OnRadioMessageReceived
  2226.     TC1OnRadioMessageReceived = value
  2227.  
  2228.  
  2229. def GetShowNavMapTDC():
  2230.     global ShowNavMapTDC
  2231.     return ShowNavMapTDC
  2232.  
  2233.  
  2234. def SetShowNavMapTDC( value ):
  2235.     global ShowNavMapTDC
  2236.     ShowNavMapTDC = value
  2237.  
  2238.  
  2239. def GetAboveThisTCLevelShowClock():
  2240.     global AboveThisTCLevelShowClock
  2241.     return AboveThisTCLevelShowClock
  2242.  
  2243.  
  2244. def SetAboveThisTCLevelShowClock( value ):
  2245.     global AboveThisTCLevelShowClock
  2246.     AboveThisTCLevelShowClock = value
  2247.  
  2248.  
  2249. def GetBelowThisDepthDontReceiveRadio():
  2250.     global BelowThisDepthDontReceiveRadio
  2251.     return BelowThisDepthDontReceiveRadio
  2252.  
  2253.  
  2254. def SetBelowThisDepthDontReceiveRadio( value ):
  2255.     global BelowThisDepthDontReceiveRadio
  2256.     BelowThisDepthDontReceiveRadio = value
  2257.  
  2258.  
  2259. def GetMaxRadioContactRange():
  2260.     global MaxRadioContactRange
  2261.     return MaxRadioContactRange
  2262.  
  2263.  
  2264. def SetMaxRadioContactRange( value ):
  2265.     global MaxRadioContactRange
  2266.     MaxRadioContactRange = value
  2267.  
  2268.  
  2269. def GetRadioContactReportsAlwaysClipped():
  2270.     global RadioContactReportsAlwaysClipped
  2271.     return RadioContactReportsAlwaysClipped
  2272.  
  2273.  
  2274. def SetRadioContactReportsAlwaysClipped( value ):
  2275.     global RadioContactReportsAlwaysClipped
  2276.     RadioContactReportsAlwaysClipped = value
  2277.  
  2278.  
  2279. def GetShipsJournal():
  2280.     global ShipsJournal
  2281.     return ShipsJournal
  2282.  
  2283.  
  2284. def SetShipsJournal( value ):
  2285.     global ShipsJournal
  2286.     ShipsJournal = value
  2287.  
  2288.  
  2289. def GetShipsJournalTitle():
  2290.     global ShipsJournalTitle
  2291.     return ShipsJournalTitle
  2292.  
  2293.  
  2294. def SetShipsJournalTitle( value ):
  2295.     global ShipsJournalTitle
  2296.     ShipsJournalTitle = value
  2297.  
  2298.  
  2299. def GetOfficersPinnedToBottomOfScreen():
  2300.     global OfficersPinnedToBottomOfScreen
  2301.     return OfficersPinnedToBottomOfScreen
  2302.  
  2303.  
  2304. def SetOfficersPinnedToBottomOfScreen( value ):
  2305.     global OfficersPinnedToBottomOfScreen
  2306.     OfficersPinnedToBottomOfScreen = value
  2307.  
  2308.  
  2309. def Getmastheights():
  2310.     global mastheights
  2311.     return mastheights
  2312.  
  2313.  
  2314. def GetNavigationMapTablesMapsEnglish():
  2315.     global NavigationMapTablesMapsEnglish
  2316.     return NavigationMapTablesMapsEnglish
  2317.  
  2318.  
  2319. def SetNavigationMapTablesMapsEnglish( value ):
  2320.     global NavigationMapTablesMapsEnglish
  2321.     NavigationMapTablesMapsEnglish = value
  2322.  
  2323.  
  2324. def GetTAIEnabledInGame():
  2325.     global TAIEnabledInGame
  2326.     return TAIEnabledInGame
  2327.  
  2328.  
  2329. def SetTAIEnabledInGame( value ):
  2330.     global TAIEnabledInGame
  2331.     TAIEnabledInGame = value
  2332.  
  2333.  
  2334. def GetBinocularCrosshairEnabled():
  2335.     global BinocularCrosshairEnabled
  2336.     return BinocularCrosshairEnabled
  2337.  
  2338.  
  2339. def SetBinocularCrosshairEnabled( value ):
  2340.     global BinocularCrosshairEnabled
  2341.     BinocularCrosshairEnabled = value
  2342.  
  2343.  
  2344. def GetIgnoreNewLogMessages():
  2345.     global IgnoreNewLogMessages
  2346.     return IgnoreNewLogMessages
  2347.  
  2348.  
  2349. def SetIgnoreNewLogMessages( value ):
  2350.     global IgnoreNewLogMessages
  2351.     IgnoreNewLogMessages = value
  2352.  
  2353.  
  2354. def GetShowContactsActualSpeed():
  2355.     global ShowContactsActualSpeed
  2356.     return ShowContactsActualSpeed
  2357.  
  2358.  
  2359. def SetShowContactsActualSpeed( value ):
  2360.     global ShowContactsActualSpeed
  2361.     ShowContactsActualSpeed = value
  2362.  
  2363.  
  2364. def GetRangeStartUpdatingContacts():
  2365.     global RangeStartUpdatingContacts
  2366.     return RangeStartUpdatingContacts
  2367.  
  2368.  
  2369. def SetRangeStartUpdatingContacts( value ):
  2370.     global RangeStartUpdatingContacts
  2371.     RangeStartUpdatingContacts = value
  2372.  
  2373.  
  2374. def GetShowContactsActualCourse():
  2375.     global ShowContactsActualCourse
  2376.     return ShowContactsActualCourse
  2377.  
  2378.  
  2379. def SetShowContactsActualCourse( value ):
  2380.     global ShowContactsActualCourse
  2381.     ShowContactsActualCourse = value
  2382.  
  2383.  
  2384. def GetGameStartDate():
  2385.     global GameStartDate
  2386.     return GameStartDate
  2387.  
  2388.  
  2389. def SetGameStartDate( value ):
  2390.     global GameStartDate
  2391.     GameStartDate = value
  2392.  
  2393.  
  2394. def GetSH5InstallPath():
  2395.     global SH5InstallPath
  2396.     return SH5InstallPath
  2397.  
  2398.  
  2399. def SetSH5InstallPath( value ):
  2400.     global SH5InstallPath
  2401.     SH5InstallPath = value
  2402.  
  2403.  
  2404. def GetShipsJournalPath():
  2405.     global ShipsJournalPath
  2406.     global SH5InstallPath
  2407.    
  2408.     path = SH5InstallPath + ShipsJournalPath
  2409.     return path
  2410.  
  2411.  
  2412. def GetMagicString():
  2413.     global MagicString
  2414.     return MagicString
  2415.  
  2416.  
  2417. def GetPeriscopeLevelSH5Visible():
  2418.     global PeriscopeLevelSH5Visible
  2419.     return PeriscopeLevelSH5Visible
  2420.  
  2421.  
  2422. def SetPeriscopeLevelSH5Visible( value ):
  2423.     global PeriscopeLevelSH5Visible
  2424.     PeriscopeLevelSH5Visible = value
  2425.  
  2426.  
  2427. def GetDepthAndMapToolsBarsVisible():
  2428.     global DepthAndMapToolsBarsVisible
  2429.     return DepthAndMapToolsBarsVisible
  2430.  
  2431.  
  2432. def SetDepthAndMapToolsBarsVisible( value ):
  2433.     global DepthAndMapToolsBarsVisible
  2434.     DepthAndMapToolsBarsVisible = value
  2435.  
  2436.  
  2437. def GetJournalEntryIntervalTime():
  2438.     global JournalEntryIntervalTime
  2439.     return JournalEntryIntervalTime
  2440.  
  2441.  
  2442. def SetJournalEntryIntervalTime( value ):
  2443.     global JournalEntryIntervalTime
  2444.     JournalEntryIntervalTime = value
  2445.  
  2446.  
  2447. def GetSelectedTorpTubes():
  2448.     global SelectedTorpTubes
  2449.     return SelectedTorpTubes
  2450.  
  2451.  
  2452. def SetSelectedTorpTubes( value ):
  2453.     global SelectedTorpTubes
  2454.     SelectedTorpTubes = value
  2455.  
  2456.  
  2457. def GetTorpDoorsStatus():
  2458.     global TorpDoorsStatus
  2459.     return TorpDoorsStatus
  2460.  
  2461.  
  2462. def SetTorpDoorsStatus( value ):
  2463.     global TorpDoorsStatus
  2464.     TorpDoorsStatus = value
  2465.  
  2466.  
  2467. def GetTorpDoorsEnabled():
  2468.     global TorpDoorsEnabled
  2469.     return TorpDoorsEnabled
  2470.  
  2471.  
  2472. def SetTorpDoorsEnabled( value ):
  2473.     global TorpDoorsEnabled
  2474.     TorpDoorsEnabled = value
  2475.  
  2476.  
  2477. def GetRealisticTorpedoFirings():
  2478.     global RealisticTorpedoFirings
  2479.     return RealisticTorpedoFirings
  2480.  
  2481.  
  2482. def SetRealisticTorpedoFirings( value ):
  2483.     global RealisticTorpedoFirings
  2484.     RealisticTorpedoFirings = value
  2485.  
  2486.  
  2487. def GetRealisticOpenTubeTDBase():
  2488.     global RealisticOpenTubeTDBase
  2489.     return RealisticOpenTubeTDBase
  2490.  
  2491.  
  2492. def SetRealisticOpenTubeTDBase( value ):
  2493.     global RealisticOpenTubeTDBase
  2494.     RealisticOpenTubeTDBase = value
  2495.  
  2496.  
  2497. def GetWaterLevelTD():
  2498.     global WaterLevelTD
  2499.     return WaterLevelTD
  2500.  
  2501.  
  2502. def SetWaterLevelTD( value ):
  2503.     global WaterLevelTD
  2504.     WaterLevelTD = value
  2505.  
  2506.  
  2507. def GetSwitchToRechargePropulsionTDBase():
  2508.     global SwitchToRechargePropulsionTDBase
  2509.     return SwitchToRechargePropulsionTDBase
  2510.  
  2511.  
  2512. def SetSwitchToRechargePropulsionTDBase( value ):
  2513.     global SwitchToRechargePropulsionTDBase
  2514.     SwitchToRechargePropulsionTDBase = value
  2515.  
  2516.  
  2517. def GetSwitchToStdPropulsionTDBase():
  2518.     global SwitchToStdPropulsionTDBase
  2519.     return SwitchToStdPropulsionTDBase
  2520.  
  2521.  
  2522. def SetSwitchToStdPropulsionTDBase( value ):
  2523.     global SwitchToStdPropulsionTDBase
  2524.     SwitchToStdPropulsionTDBase = value
  2525.  
  2526.  
  2527. def GetSH5EHeadingRudderDialVisible():
  2528.     global SH5EHeadingRudderDialVisible
  2529.     return SH5EHeadingRudderDialVisible
  2530.  
  2531.  
  2532. def SetSH5EHeadingRudderDialVisible( value ):
  2533.     global SH5EHeadingRudderDialVisible
  2534.     SH5EHeadingRudderDialVisible = value
  2535.  
  2536.  
  2537. def GetCurrentlySelectedTube():
  2538.     global CurrentlySelectedTube
  2539.     return CurrentlySelectedTube
  2540.  
  2541.  
  2542. def SetCurrentlySelectedTube( value ):
  2543.     global CurrentlySelectedTube
  2544.     CurrentlySelectedTube = value
  2545.  
  2546.  
  2547. def GetInSalvoMode():
  2548.     global InSalvoMode
  2549.     return InSalvoMode
  2550.  
  2551.  
  2552. def SetInSalvoMode( value ):
  2553.     global InSalvoMode
  2554.     InSalvoMode = value
  2555.  
  2556.  
  2557. def GetAutomaticallyRaiseAttackScope():
  2558.     global AutomaticallyRaiseAttackScope
  2559.     return AutomaticallyRaiseAttackScope
  2560.  
  2561.  
  2562. def GetRealisticTorpFiringInProgress():
  2563.         global RealisticTorpFiringInProgress
  2564.         return RealisticTorpFiringInProgress
  2565.  
  2566.  
  2567. def SetRealisticTorpFiringInProgress( value ):
  2568.         global RealisticTorpFiringInProgress
  2569.         RealisticTorpFiringInProgress = value
  2570.  
  2571.  
  2572. def GetAutomaticallyFullyLowerAttackScope():
  2573.     global AutomaticallyFullyLowerAttackScope
  2574.     return AutomaticallyFullyLowerAttackScope
  2575.  
  2576.  
  2577. def GetAutomaticallyFullyLowerObsScope():
  2578.     global AutomaticallyFullyLowerObsScope
  2579.     return AutomaticallyFullyLowerObsScope
  2580.  
  2581.  
  2582. def GetXOTDCDialogAllowedToPop():
  2583.     global XOTDCDialogAllowedToPop
  2584.     return XOTDCDialogAllowedToPop
  2585.  
  2586.  
  2587. def GetCrashDiveKey():
  2588.     global CrashDiveKey
  2589.     return CrashDiveKey
  2590.  
  2591.  
  2592. def GetXOTDCManualTargetingEnforced():
  2593.     global XOTDCManualTargetingEnforced
  2594.     return XOTDCManualTargetingEnforced
  2595.  
  2596.  
  2597. def GetAOBSpeedTDCFixEnabled():
  2598.     global AOBSpeedTDCFixEnabled
  2599.     return AOBSpeedTDCFixEnabled
  2600.  
  2601.  
  2602. def GetTDCIsOn():
  2603.     global TDCIsOn
  2604.     return TDCIsOn
  2605.  
  2606.  
  2607. def SetTDCIsOn( value ):
  2608.     global TDCIsOn
  2609.     TDCIsOn = value
  2610.  
  2611.  
  2612. def GetAutomaticallyOrderRechargeModeUponSurfacing():
  2613.     global AutomaticallyOrderRechargeModeUponSurfacing
  2614.     return AutomaticallyOrderRechargeModeUponSurfacing
  2615.  
  2616.  
  2617. def GetAutoShowClockOnFollowTarget():
  2618.     global AutoShowClockOnFollowTarget
  2619.     return AutoShowClockOnFollowTarget 
  2620.  
  2621.  
  2622. def GetAutoShowClockOnTorpFire():
  2623.     global AutoShowClockOnTorpFire
  2624.     return AutoShowClockOnTorpFire
  2625.  
  2626.  
  2627. def GetNavigatorAssistAOBSpeedCalcs():
  2628.     global NavigatorAssistAOBSpeedCalcs
  2629.     return NavigatorAssistAOBSpeedCalcs
  2630.  
  2631. def GetTAIInitialWidth():
  2632.     global TAIInitialWidth
  2633.     return TAIInitialWidth
  2634.  
  2635.  
  2636. def GetTAIInitialHeight():
  2637.     global TAIInitialHeight
  2638.     return TAIInitialHeight
  2639.  
  2640.  
  2641. def GetNavCalcTimeAOBSpeedFromRangeMeasurementsBase():
  2642.     global NavCalcTimeAOBSpeedFromRangeMeasurementsBase
  2643.     return NavCalcTimeAOBSpeedFromRangeMeasurementsBase
  2644.  
  2645.  
  2646. def GetNavCalcTimeSpeedFromTimeMeasurementsBase():
  2647.     global NavCalcTimeSpeedFromTimeMeasurementsBase
  2648.     return NavCalcTimeSpeedFromTimeMeasurementsBase
  2649.  
  2650.  
  2651. def GetAttackFullyLowerButtonLeavesStationForBridge():
  2652.     global AttackFullyLowerButtonLeavesStationForBridge
  2653.     return AttackFullyLowerButtonLeavesStationForBridge
  2654.  
  2655.  
  2656. def GetAttackRAOBFEnabled():
  2657.     global AttackRAOBFEnabled
  2658.     return AttackRAOBFEnabled
  2659.  
  2660.  
  2661. def SetAttackRAOBFEnabled( value ):
  2662.     global AttackRAOBFEnabled
  2663.     AttackRAOBFEnabled = value
  2664.  
  2665.  
  2666. def GetObsRAOBFEnabled():
  2667.     global ObsRAOBFEnabled
  2668.     return ObsRAOBFEnabled
  2669.  
  2670.  
  2671. def SetObsRAOBFEnabled( value ):
  2672.     global ObsRAOBFEnabled
  2673.     ObsRAOBFEnabled = value
  2674.  
  2675.  
  2676. def GetUZORAOBFEnabled():
  2677.     global UZORAOBFEnabled
  2678.     return UZORAOBFEnabled
  2679.  
  2680.  
  2681. def SetUZORAOBFEnabled( value ):
  2682.     global UZORAOBFEnabled
  2683.     UZORAOBFEnabled = value
  2684.  
  2685.  
  2686. def GetMessageBoxIsDraggable():
  2687.     global MessageBoxIsDraggable
  2688.     return MessageBoxIsDraggable
  2689.  
  2690.  
  2691. def GetHideTDCDialsWhenUsingRAOBF():
  2692.     global HideTDCDialsWhenUsingRAOBF
  2693.     return HideTDCDialsWhenUsingRAOBF
  2694.  
  2695.  
  2696. def GetTCxOnMessageBoxText():
  2697.     global TCxOnMessageBoxText
  2698.     return TCxOnMessageBoxText
  2699.  
  2700.  
  2701. def SetTCxOnMessageBoxText( value ):
  2702.     global TCxOnMessageBoxText
  2703.     TCxOnMessageBoxText = value
  2704.  
  2705.  
  2706. def GetTCxOnMessageBoxTextNumbers():
  2707.     global TCxOnMessageBoxTextNumbers
  2708.     return TCxOnMessageBoxTextNumbers
  2709.  
  2710.  
  2711. def GetTCxOnMessageBoxTextDesiredTCLevel():
  2712.     global TCxOnMessageBoxTextDesiredTCLevel
  2713.     return TCxOnMessageBoxTextDesiredTCLevel
  2714.  
  2715.  
  2716. def GetAutomation():
  2717.     global Automation
  2718.     return Automation
  2719.  
  2720.  
  2721. def GetAutomationHotKey():
  2722.     global AutomationHotKey
  2723.     return AutomationHotKey
  2724.  
  2725.  
  2726. def GetRadarSweepMode():
  2727.     global RadarSweepMode
  2728.     return RadarSweepMode
  2729.  
  2730.  
  2731. def SetRadarSweepMode( value ):
  2732.     global RadarSweepMode
  2733.     RadarSweepMode = value
  2734.  
  2735.  
  2736. def GetRadarMode():
  2737.     global RadarMode
  2738.     return RadarMode
  2739.  
  2740.  
  2741. def SetRadarMode( value ):
  2742.     global RadarMode
  2743.     RadarMode = value
  2744.  
  2745.  
  2746. def GetRadarRangeMode():
  2747.     global RadarRangeMode
  2748.     return RadarRangeMode
  2749.  
  2750.  
  2751. def SetRadarRangeMode( value ):
  2752.     global RadarRangeMode
  2753.     RadarRangeMode = value
  2754.  
  2755.  
  2756. def GetAutomationDebuggingEnabled():
  2757.     global AutomationDebuggingEnabled
  2758.     return AutomationDebuggingEnabled
  2759.  
  2760.  
  2761. def GetDelayNewSpeedThrottleCommand():
  2762.     global DelayNewSpeedThrottleCommand
  2763.     return DelayNewSpeedThrottleCommand
  2764.  
  2765.  
  2766. def GetNewSpeedThrottleDelayMin():
  2767.     global NewSpeedThrottleDelayMin
  2768.     return int( NewSpeedThrottleDelayMin )
  2769.  
  2770.  
  2771. def GetNewSpeedThrottleDelayMax():
  2772.     global NewSpeedThrottleDelayMax
  2773.     return int( NewSpeedThrottleDelayMax )
  2774.  
  2775.  
  2776. def GetTC1OnAnyMessageBoxText():
  2777.     global TC1OnAnyMessageBoxText
  2778.     return TC1OnAnyMessageBoxText
  2779.  
  2780.  
  2781. def SetTC1OnAnyMessageBoxText( value ):
  2782.     global TC1OnAnyMessageBoxText
  2783.     TC1OnAnyMessageBoxText = value
  2784.  
  2785.  
  2786. def GetCrewOnDeckMode():
  2787.     global CrewOnDeckMode
  2788.     return CrewOnDeckMode
  2789.  
  2790.  
  2791. def SetCrewOnDeckMode( value ):
  2792.     global CrewOnDeckMode
  2793.     CrewOnDeckMode = value
  2794.  
  2795.  
  2796. def GetDGunFireMode():
  2797.     global DGunFireMode
  2798.     return DGunFireMode
  2799.  
  2800.  
  2801. def SetDGunFireMode( value ):
  2802.     global DGunFireMode
  2803.     DGunFireMode = value
  2804.  
  2805.  
  2806. def GetDGunRangeMode():
  2807.     global DGunRangeMode
  2808.     return DGunRangeMode
  2809.  
  2810.  
  2811. def SetDGunRangeMode( value ):
  2812.     global DGunRangeMode
  2813.     DGunRangeMode = value
  2814.  
  2815.  
  2816. def GetDGunAimMode():
  2817.     global DGunAimMode
  2818.     return DGunAimMode
  2819.  
  2820.  
  2821. def SetDGunAimMode( value ):
  2822.     global DGunAimMode
  2823.     DGunAimMode = value
  2824.  
  2825.  
  2826. def GetAAGunFireMode():
  2827.     global AAGunFireMode
  2828.     return AAGunFireMode
  2829.  
  2830.  
  2831. def SetAAGunFireMode( value ):
  2832.     global AAGunFireMode
  2833.     AAGunFireMode = value
  2834.  
  2835.  
  2836. def GetAAGunRangeMode():
  2837.     global AAGunRangeMode
  2838.     return AAGunRangeMode
  2839.  
  2840.  
  2841. def SetAAGunRangeMode( value ):
  2842.     global AAGunRangeMode
  2843.     AAGunRangeMode = value
  2844.  
  2845.  
  2846. def GetAAGunPriorityMode():
  2847.     global AAGunPriorityMode
  2848.     return AAGunPriorityMode
  2849.  
  2850.  
  2851. def SetAAGunPriorityMode( value ):
  2852.     global AAGunPriorityMode
  2853.     AAGunPriorityMode = value
  2854.  
  2855.  
  2856. def GetAAGunAimMode():
  2857.     global AAGunAimMode
  2858.     return AAGunAimMode
  2859.  
  2860.  
  2861. def SetAAGunAimMode( value ):
  2862.     global AAGunAimMode
  2863.     AAGunAimMode = value
  2864.  
  2865.  
  2866. def GetHeadingBarIsExpanded():
  2867.     global HeadingBarIsExpanded
  2868.     return HeadingBarIsExpanded
  2869.  
  2870.  
  2871. def GetAdvancedHudIsEnabled():
  2872.     global AdvancedHudIsEnabled
  2873.     return AdvancedHudIsEnabled
  2874.  
  2875.  
  2876. def GetMostFuelEfficientSpeed():
  2877.     global MostFuelEfficientSpeed
  2878.     return MostFuelEfficientSpeed
  2879.  
  2880.  
  2881. def GetMostFuelEfficientSpeedHotKey():
  2882.     global MostFuelEfficientSpeedHotKey
  2883.     return MostFuelEfficientSpeedHotKey
  2884.  
  2885.  
  2886. def GetAutomationActionMessagesDisplayed():
  2887.     global AutomationActionMessagesDisplayed
  2888.     return AutomationActionMessagesDisplayed
  2889.  
  2890.  
  2891. #def GetCrewDialogLines():
  2892. #   global CrewDialogLines
  2893. #   return CrewDialogLines
  2894.  
  2895.  
  2896. ########################################################## Debugging #################################################################
  2897. MasterDebugEnabled = False
  2898.  
  2899.  
  2900. def GetMasterDebugEnabled():
  2901.     global MasterDebugEnabled
  2902.     return MasterDebugEnabled
  2903.  
  2904.  
  2905. def SetMasterDebugEnabled( value ):
  2906.     global MasterDebugEnabled
  2907.     MasterDebugEnabled = value
  2908.  
  2909.  
  2910. def GetDisplaySapiensKey():
  2911.     global DisplaySapiensKey
  2912.     return DisplaySapiensKey
  2913.  
  2914.  
  2915. def SetDisplaySapiensKey( value ):
  2916.     global DisplaySapiensKey
  2917.     DisplaySapiensKey = value  
  2918.  
  2919.    
  2920. def GetDisplayKeyPressedKey():
  2921.     global DisplayKeyPressedKey
  2922.     return DisplayKeyPressedKey
  2923.  
  2924.  
  2925. def SetDisplayKeyPressedKey( value ):
  2926.     global DisplayKeyPressedKey
  2927.     DisplayKeyPressedKey = value
  2928.  
  2929.  
  2930. def GetDisplayKeyReleasedKey():
  2931.     global DisplayKeyReleasedKey
  2932.     return DisplayKeyReleasedKey
  2933.  
  2934.  
  2935. def SetDisplayKeyReleasedKey( value ):
  2936.     global DisplayKeyReleasedKey
  2937.     DisplayKeyReleasedKey = value
  2938.  
  2939.  
  2940. def GetDisplayCurrentStationsKey():
  2941.     global DisplayCurrentStationsKey
  2942.     return DisplayCurrentStationsKey
  2943.  
  2944.  
  2945. def SetDisplayCurrentStationsKey( value ):
  2946.     global DisplayCurrentStationsKey
  2947.     DisplayCurrentStationsKey = value
  2948.  
  2949.  
  2950. def GetDisplayActiveStationKey():
  2951.     global DisplayActiveStationKey
  2952.     return DisplayActiveStationKey
  2953.  
  2954.  
  2955. def SetDisplayActiveStationKey( value ):
  2956.     global DisplayActiveStationKey
  2957.     DisplayActiveStationKey = value
  2958.  
  2959.  
  2960. def GetDisplayActiveCameraKey():
  2961.     global DisplayActiveCameraKey
  2962.     return DisplayActiveCameraKey
  2963.  
  2964.  
  2965. def SetDisplayActiveCameraKey( value ):
  2966.     global DisplayActiveCameraKey
  2967.     DisplayActiveCameraKey = value
  2968.  
  2969.  
  2970. def GetToggleDisplaySubmarineCommandsKey():
  2971.     global ToggleDisplaySubmarineCommandsKey
  2972.     return ToggleDisplaySubmarineCommandsKey
  2973.  
  2974.  
  2975. def SetToggleDisplaySubmarineCommandsKey( value ):
  2976.     global ToggleDisplaySubmarineCommandsKey
  2977.     ToggleDisplaySubmarineCommandsKey = value
  2978.  
  2979.  
  2980. def GetToggleDisplaySubmarineDelayedCommandsKey():
  2981.     global ToggleDisplaySubmarineDelayedCommandsKey
  2982.     return ToggleDisplaySubmarineDelayedCommandsKey
  2983.  
  2984.  
  2985. def SetToggleDisplaySubmarineDelayedCommandsKey( value ):
  2986.     global ToggleDisplaySubmarineDelayedCommandsKey
  2987.     ToggleDisplaySubmarineDelayedCommandsKey = value
  2988.  
  2989.  
  2990. ####################################################################################################################################
  2991. import clr
  2992. clr.AddReference( "System" )
  2993. from System import String, Text, Array
  2994. from System.IO import Directory, File, FileMode, FileStream, StreamReader, BinaryReader, BinaryWriter, FileAccess, SeekOrigin
  2995. from System.Text import Encoding
  2996. from System.Collections.Generic import Dictionary, List
  2997. #clr.AddReference( "System.Windows.Forms" )
  2998. #from System.Windows.Forms import DialogResult, FolderBrowserDialog
  2999. from game import Game
  3000. from menu import Menu
  3001.  
  3002. from TheDarkWraithAutomation import TheDarkWraithAutomation
  3003. TheDarkWraithAutomation.MakeSureIsLoaded( MenuPageWrapper.InitializeScript.Now )
  3004. from TheDarkWraithAutomation import TDWAutomation
  3005.  
  3006.  
  3007. ########################################################################################################
  3008. def InitializeScript():
  3009.     #ScriptManagerManaged.ShowPythonError( "InitializeScript" )
  3010.     SetShipMastHeights()
  3011.     global Automation
  3012.     Automation = TDWAutomation()
  3013.  
  3014.     #global Tutorial
  3015.     #Tutorial = TDWTutorial( "TheDarkWraithUserOptions" )
  3016.     #GetCrewDialogLinesFromFiles()
  3017.     TDWUO_InitializeVariables()
  3018.  
  3019.  
  3020. ########################################################################################################
  3021. def StartGame():
  3022.     #ScriptManagerManaged.ShowPythonError( "StartGame" )
  3023.     global TDCIsOn
  3024.     TDCIsOn = Game.GetGameplaySettings( GameWrapper.GameplaySettingsEntries.ManualTargetingSystem )
  3025.  
  3026.  
  3027. ########################################################################################################
  3028. def TDWUO_InitializeVariables():
  3029.     #ScriptManagerManaged.ShowPythonError( "TDWUO_InitializeVariables" )
  3030.     global SnorkelEnabled
  3031.     SnorkelEnabled = False
  3032.     global FollowSelectedTargetWithCamera
  3033.     FollowSelectedTargetWithCamera = False
  3034.     global SilentRunning
  3035.     SilentRunning = False
  3036.     global SnorkelRaised
  3037.     SnorkelRaised = False
  3038.     global BattlestationsActivated
  3039.     BattlestationsActivated = False
  3040.     global ShowNavMapTDC
  3041.     ShowNavMapTDC = False
  3042.     global IgnoreNewLogMessages
  3043.     IgnoreNewLogMessages = True
  3044.     global RealisticTorpFiringInProgress
  3045.     RealisticTorpFiringInProgress = False
  3046.     global ShipsJournal
  3047.     ShipsJournal = []
  3048.     global SelectedTorpTubes
  3049.     SelectedTorpTubes = [ 0 ]
  3050.     global SH5EHeadingRudderDialVisible
  3051.     SH5EHeadingRudderDialVisible = False
  3052.     global TorpDoorsStatus
  3053.     TorpDoorsStatus = [ False, False, False, False, False, False ]
  3054.     global TorpDoorsEnabled
  3055.     TorpDoorsEnabled = [ True, True, True, True, True, True ]
  3056.     global CurrentlySelectedTube
  3057.     CurrentlySelectedTube = 0
  3058.     global InSalvoMode
  3059.     InSalvoMode = False
  3060.  
  3061.     global CrewOnDeckMode
  3062.     global WatchCrewMode
  3063.     CrewOnDeckMode = WatchCrewMode
  3064.     global DGunFireMode
  3065.     global DGunFireModeHold
  3066.     DGunFireMode = DGunFireModeHold
  3067.     global DGunRangeMode
  3068.     global DGunRangeModeShort
  3069.     DGunRangeMode = DGunRangeModeShort
  3070.     global DGunAimMode
  3071.     global DGunAimModeWaterline
  3072.     DGunAimMode = DGunAimModeWaterline
  3073.     global AAGunFireMode
  3074.     global AAGunFireModeHold
  3075.     AAGunFireMode = AAGunFireModeHold
  3076.     global AAGunRangeMode
  3077.     global AAGunRangeModeShort
  3078.     AAGunRangeMode = AAGunRangeModeShort
  3079.     global AAGunPriorityMode
  3080.     global AAGunPriorityModeAnyAircraft
  3081.     AAGunPriorityMode = AAGunPriorityModeAnyAircraft
  3082.     global AAGunAimMode
  3083.     global AAGunAimModeAnyTarget
  3084.     AAGunAimMode = AAGunAimModeAnyTarget
  3085.  
  3086.  
  3087. ########################################################################################################
  3088. # handles the automation event for when a script completes
  3089. def AutomationEvent( scriptname ):
  3090.     try:
  3091.         from PageAutomation import SetActivatedScriptStartStopPause
  3092.         SetActivatedScriptStartStopPause( scriptname )
  3093.     except:
  3094.         pass
  3095.  
  3096.  
  3097. ########################################################################################################
  3098. def SetShipMastHeights():
  3099.     global mastheights
  3100.  
  3101.     # read the registry key for SH5 to get the path to it
  3102.     from Microsoft.Win32 import Registry
  3103.     # try 32 bit first
  3104.     registryRootNode = "HKEY_LOCAL_MACHINE\\Software\\Ubisoft\\Silent Hunter 5\\GameUpdate"
  3105.     testkey = "installdir"
  3106.     installpath = Registry.GetValue(registryRootNode, testkey, None)
  3107.     if installpath == None:
  3108.         #ScriptManagerManaged.ShowPythonError( "users system is 64bit" )
  3109.         registryRootNode = "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Ubisoft\\Silent Hunter 5\\GameUpdate"
  3110.         installpath = Registry.GetValue(registryRootNode, testkey, None)
  3111.         if installpath == None:
  3112.             ScriptManagerManaged.ShowPythonError( "Can't find Silent Hunter 5 installation folder in registry.\nUnable to set mast heights for units" )
  3113.             return
  3114.         else:
  3115.             #ScriptManagerManaged.ShowPythonError( "64bit Key found. Value='" + str( installpath ) + "'" )
  3116.             pass
  3117.     else:
  3118.         #ScriptManagerManaged.ShowPythonError( "32bit Key found. Value='" + str( installpath ) + "'" )
  3119.         pass
  3120.  
  3121.     # save the install path
  3122.     if installpath[ len( installpath ) - 1 ] == "\\":
  3123.         #ScriptManagerManaged.ShowPythonError( "\ found!" )
  3124.         installpath = installpath[ 0 : len( installpath ) - 1 ]
  3125.     #ScriptManagerManaged.ShowPythonError( "InstallPath=" + installpath )
  3126.     SetSH5InstallPath( installpath )
  3127.  
  3128.     rostersea = List[ Array[ String ] ]()
  3129.     mastheights = Dictionary[ String, float ]()
  3130.     # get all the names defined in roster's Sea
  3131.     namespath = installpath + "\\data\\Roster"
  3132.     rosterfilename = "\\Names.cfg"
  3133.  
  3134.     rosterfilepath = namespath + rosterfilename
  3135.     #ScriptManagerManaged.ShowPythonError( "rosterfilepath=" + rosterfilepath )
  3136.     fs = None
  3137.     rosterfile = ""
  3138.     if File.Exists( rosterfilepath ):
  3139.         fs = FileStream( rosterfilepath, FileMode.Open )
  3140.         rosterfile = StreamReader( fs, Encoding.Default )
  3141.     else:
  3142.         ScriptManagerManaged.ShowPythonError( rosterfilepath + " doesn't exist!" )
  3143.         mastheights.Clear()
  3144.         return
  3145.     lineread = None
  3146.     seafound = False
  3147.     while rosterfile.Peek() >= 0:
  3148.         lineread = rosterfile.ReadLine()
  3149.         #ScriptManagerManaged.ShowPythonError( "lineread=" + lineread )
  3150.         if lineread.StartsWith( "[Sea]" ):
  3151.             #ScriptManagerManaged.ShowPythonError( "[Sea] found!" )
  3152.             seafound = True
  3153.             break
  3154.  
  3155.     if not seafound:
  3156.         ScriptManagerManaged.ShowPythonError( installpath + "data\\Sea\\Names.cfg file corrupt. EOF reached" )
  3157.         rosterfile.Close()
  3158.         mastheights.Clear()
  3159.         return
  3160.  
  3161.     submarinefound = False
  3162.     while rosterfile.Peek() >= 0:
  3163.         lineread = rosterfile.ReadLine()
  3164.         #ScriptManagerManaged.ShowPythonError( "lineread=" + lineread )
  3165.         if lineread.StartsWith( "[Submarine]" ):
  3166.             #ScriptManagerManaged.ShowPythonError( "[Submarine] found!" )
  3167.             submarinefound = True
  3168.             break
  3169.         index = lineread.IndexOf( "=" )
  3170.         if index == -1:
  3171.             continue
  3172.         classname = lineread.Substring( 0, index ) 
  3173.         name = lineread.Substring( index + 1 )
  3174.         #ScriptManagerManaged.ShowPythonError( "Name=" + name + "\t\tClass=" + classname )
  3175.         params = Array[ String ]( ( name, classname ) )
  3176.         #ScriptManagerManaged.ShowPythonError( "Name=" + params[ 0 ] + "\t\tClass=" + params[ 1 ] )
  3177.         rostersea.Add( params )
  3178.  
  3179.     if not submarinefound:
  3180.         ScriptManagerManaged.ShowPythonError( installpath + "data\\Sea\\Names.cfg file corrupt. EOF reached" )
  3181.         rosterfile.Close()
  3182.         mastheights.Clear()
  3183.         return
  3184.  
  3185.     rosterfile.Close()
  3186.     #msg = ""
  3187.     #for entry in rostersea:
  3188.     #   msg += "Name=" + entry[ 0 ] + "\tClass=" + entry[ 1 ] + "\n"
  3189.     #ScriptManagerManaged.ShowPythonError( msg )
  3190.  
  3191.     # get all the folders in \data\Sea
  3192.     #msg = "Mast Heights:\n\n"
  3193.     seapath = installpath + "\\data\\Sea"
  3194.     #ScriptManagerManaged.ShowPythonError( "seapath=" + seapath )
  3195.     #ScriptManagerManaged.ShowPythonError( str( Directory.GetDirectories( seapath ) ) )
  3196.     for unit in rostersea:
  3197.         classesfoundequal = False
  3198.         for seafolder in Directory.GetDirectories( seapath ):
  3199.             if seafolder[ len( seafolder ) - 1 ] == "\\":
  3200.                 #ScriptManagerManaged.ShowPythonError( "\ found as last character in seafolder!" )
  3201.                 seafolder = seafolder[ 0 : len( seafolder ) - 1 ]
  3202.             seafoldername = seafolder[ seafolder.LastIndexOf( "\\" ) + 1 : len( seafolder ) ]
  3203.             #ScriptManagerManaged.ShowPythonError( "seafoldername=" + seafoldername )
  3204.             cfgfilepath = seafolder + "\\" + seafoldername + ".cfg"
  3205.             #ScriptManagerManaged.ShowPythonError( "cfgfilepath=" + cfgfilepath )
  3206.             if File.Exists( cfgfilepath ):
  3207.                 #ScriptManagerManaged.ShowPythonError( cfgfilepath + " exists! Opening..." )
  3208.                 fs = FileStream( cfgfilepath, FileMode.Open )
  3209.                 cfgfile = StreamReader( fs, Encoding.Default )
  3210.                 while cfgfile.Peek() >= 0:
  3211.                     lineread = cfgfile.ReadLine()
  3212.                     #ScriptManagerManaged.ShowPythonError( "lineread='" + lineread + "'" )
  3213.                     if lineread == None:
  3214.                         #ScriptManagerManaged.ShowPythonError( "Mast height not found! (LR == None)" )
  3215.                         mastheights[ unit[ 0 ] ] = float( 0.0 )
  3216.                         return
  3217.                     elif lineread.StartsWith( "ClassName=" ):
  3218.                         #ScriptManagerManaged.ShowPythonError( "ClassName found!" )
  3219.                         index = lineread.IndexOf( "=" )
  3220.                         name = lineread.Substring( index + 1 )
  3221.                         #ScriptManagerManaged.ShowPythonError( "'" + unit[ 1 ] + "'\t'" + name + "'" )
  3222.                         if unit[ 1 ] == name:
  3223.                             classesfoundequal = True
  3224.                             #ScriptManagerManaged.ShowPythonError( "classnames equal" )
  3225.                             mastheightrecorded = False
  3226.                             while cfgfile.Peek() >= 0:
  3227.                                 lineread = cfgfile.ReadLine()
  3228.                                 if lineread == None:
  3229.                                     return
  3230.                                 try:
  3231.                                     if lineread.StartsWith( "Mast=" ):
  3232.                                         #ScriptManagerManaged.ShowPythonError( "Mast height found!" )
  3233.                                         index = lineread.IndexOf( "=" )
  3234.                                         value = lineread.Substring( index + 1 )
  3235.                                         mastheights[ unit[ 0 ] ] = float( value )
  3236.                                         #msg += unit[ 0 ] + " : " + value.ToString() + "\n"
  3237.                                         mastheightrecorded = True
  3238.                                         break
  3239.                                     elif lineread.StartsWith( "ShowInRecognitionManual" ):
  3240.                                         #ScriptManagerManaged.ShowPythonError( "Mast height not found!" )
  3241.                                         mastheights[ unit[ 0 ] ] = float( 0.0 )
  3242.                                         #msg += unit[ 0 ] + " : " + "0.0\n"
  3243.                                         mastheightrecorded = True
  3244.                                         break
  3245.                                 except:
  3246.                                     #ScriptManagerManaged.ShowPythonError( "Mast height not found! (Exception)" )
  3247.                                     break
  3248.  
  3249.                             if not mastheightrecorded:
  3250.                                 #ScriptManagerManaged.ShowPythonError( "Mast height not found! (EOF)" )
  3251.                                 mastheights[ unit[ 0 ] ] = float( 90.0 )
  3252.                                 #msg += unit[ 0 ] + " : " + "90.0\n"
  3253.                             break
  3254.                         else:
  3255.                             break
  3256.                     elif lineread.startswith( "ShowInRecognitionManual" ):
  3257.                         #ScriptManagerManaged.ShowPythonError( "Mast height not found! (SIRM)" )
  3258.                         mastheights[ unit[ 0 ] ] = float( 0.0 )
  3259.                         #msg += unit[ 0 ] + " : " + "0.0\n"
  3260.                         break
  3261.                 cfgfile.Close()
  3262.                 #ScriptManagerManaged.ShowPythonError( cfgfilepath + " closed" )
  3263.                 if classesfoundequal:
  3264.                     break
  3265.  
  3266.     #ScriptManagerManaged.ShowPythonError( msg )
  3267.  
  3268.  
  3269. #####################################################################################
  3270.  
  3271. # high precision game timer
  3272. class GameTimer( object ):
  3273.     def __init__( self, tclevel, eventtoraise ):
  3274.         self.timerrunning = False
  3275.  
  3276.         import clr
  3277.         clr.AddReference("System")
  3278.         from System.Diagnostics import Stopwatch
  3279.  
  3280.         self.timer = Stopwatch()
  3281.         self.tclevel = float( tclevel )
  3282.         self.items = []
  3283.         self.eventtoraise = eventtoraise
  3284.         #ScriptManagerManaged.ShowPythonError( "New GameTimer created!" )
  3285.  
  3286.     def Start( self ):
  3287.         self.timerrunning = True
  3288.         self.timer.Start()
  3289.  
  3290.     def Stop( self ):
  3291.         self.Update()
  3292.         self.timerrunning = False
  3293.         self.timer.Stop()
  3294.  
  3295.     def AddItem( self, ID, SubID, duration, loop, running ):
  3296.         for item in self.items:
  3297.             if item.ID == ID and item.SubID == SubID:
  3298.                 ScriptManagerManaged.ShowPythonError( "GameTimer: attempted to add an item (ID " + str( ID ) + ") that already exists!" )
  3299.                 return
  3300.         newitem = self.TimerObject( ID, SubID, duration, loop, running )
  3301.         self.Update()
  3302.         self.items.append( newitem )
  3303.         #ScriptManagerManaged.ShowPythonError( "Added ID " + str( ID ) + " to high precision timer" )
  3304.  
  3305.     def RemoveItem( self, ID, SubID ):
  3306.         itemtoremove = None
  3307.         for item in self.items:
  3308.             if item.ID == ID and item.SubID == SubID:
  3309.                 itemtoremove = item
  3310.                 break
  3311.         if itemtoremove != None:
  3312.             try:
  3313.                 self.items.remove( itemtoremove )
  3314.             except:
  3315.                 ScriptManagerManaged.ShowPythonError( "Unable to remove item ID " + str( itemtoremove.ID ) + " from items" )
  3316.                 #pass
  3317.  
  3318.     def RemoveThenAddItem( self, ID, SubID, duration, loop, running ):
  3319.         self.RemoveItem( ID, SubID )
  3320.         self.AddItem( ID, SubID, duration, loop, running )
  3321.  
  3322.     def RemoveItems( self, items ):
  3323.         for item in items:
  3324.             self.RemoveItem( item[ 0 ], item[ 1 ] )
  3325.  
  3326.     def RemoveAllItems( self ):
  3327.         self.items = []
  3328.  
  3329.     def StartItem( self, ID, SubID ):
  3330.         self.Update()
  3331.         for item in self.items:
  3332.             if item.ID == ID and item.SubID == SubID:
  3333.                 item.UpdateRunning( True )
  3334.                 break
  3335.  
  3336.     def StopItem( self, ID, SubID ):
  3337.         self.Update()
  3338.         for item in self.items:
  3339.             if item.ID == ID and item.SubID == SubID:
  3340.                 item.UpdateRunning( False )
  3341.                 break
  3342.  
  3343.     def StartAllItems( self ):
  3344.         self.Update()
  3345.         for item in self.items:
  3346.             item.UpdateRunning( True )
  3347.  
  3348.     def StopAllItems( self ):
  3349.         self.Update()
  3350.         for item in self.items:
  3351.             item.UpdateRunning( False )
  3352.  
  3353.     def Update( self ):
  3354.         if self.timerrunning:
  3355.             self.timer.Stop()
  3356.             elapsedtime = ( self.timer.ElapsedMilliseconds * self.tclevel ) / 1000.0
  3357.             self.timer.Reset()
  3358.             self.timer.Start()
  3359.             itemIDstodelete = []
  3360.             eventstoraise = []
  3361.             for item in self.items:
  3362.                 item.Update( elapsedtime )
  3363.                 if item.finished:
  3364.                     #ScriptManagerManaged.ShowPythonError( "Item ID " + str( item.ID ) + " finished!" )
  3365.                     if item.loop:
  3366.                         item.finished = False
  3367.                     else:
  3368.                         itemIDstodelete.append( [ item.ID, item.SubID ] )
  3369.                     eventstoraise.append( [ item.ID, item.SubID, item.elapsedtime ] )
  3370.             for ID in itemIDstodelete:
  3371.                 #ScriptManagerManaged.ShowPythonError( "Removing item ID " + str( ID ) )
  3372.                 self.RemoveItem( ID[ 0 ], ID[ 1 ] )
  3373.             for ID in eventstoraise:
  3374.                 self.eventtoraise( ID[ 0 ], ID[ 1 ], ID[ 2 ] )
  3375.  
  3376.     def Reset( self ):
  3377.         self.timerrunning = False
  3378.         self.timer.Stop()
  3379.         self.timer.Reset()
  3380.  
  3381.     def GetTCLevel( self ):
  3382.         return self.tclevel
  3383.  
  3384.     def UpdateTCLevel( self, tclevel ):
  3385.         #ScriptManagerManaged.ShowPythonError( "class GameTimer.UpdateTCLevel: new TC level is " + str( tclevel ) )
  3386.         self.Update()
  3387.         self.tclevel = float( tclevel )
  3388.  
  3389.     def Destroy( self ):
  3390.         self.timerrunning = False
  3391.         self.items = []
  3392.         self.eventtoraise = None
  3393.         self.timer.Stop()
  3394.         self.timer = None
  3395.  
  3396.  
  3397.  
  3398.     class TimerObject( object ):
  3399.         def __init__( self, ID, SubID, duration, loop, running ):
  3400.             self.elapsedtime = 0.0
  3401.             self.finished = False
  3402.             self.ID = ID
  3403.             self.SubID = SubID
  3404.             self.duration = duration
  3405.             self.loop = loop
  3406.             self.running = running
  3407.             #ScriptManagerManaged.ShowPythonError( "New TimerObject (ID " + str( ID ) + ") created!" )
  3408.  
  3409.         def Update( self, elapsedtime ):
  3410.             if self.running:
  3411.                 self.elapsedtime += elapsedtime
  3412.                 #ScriptManagerManaged.ShowPythonError( "ElapsedTime=" + str( self.elapsedtime ) + "\tDuration=" + str( self.duration ) )
  3413.                 if self.elapsedtime >= self.duration:
  3414.                     self.finished = True
  3415.                     #if self.loop:
  3416.                     #   #ScriptManagerManaged.ShowPythonError( "ID " + str( self.ID ) + " looping!" )
  3417.                     #   pass
  3418.                     #else:
  3419.                     #   #ScriptManagerManaged.ShowPythonError( "ID " + str( self.ID ) + " finished! Total elapsed time=" + str( self.elapsedtime ) )
  3420.                     #   pass
  3421.  
  3422.         def UpdateRunning( self, running ):
  3423.             self.running = running
  3424.  
  3425.  
  3426. ########################################################################################################
  3427.  
  3428. # holds all the user's draggable items for a Page
  3429. class PageDraggableItems( object ):
  3430.     draggablesfilebase = "_Draggables.TDW"
  3431.  
  3432.     def __init__( self, page ):
  3433.         self.items = []
  3434.         self.page = page
  3435.         self.draggablespath = GetSH5InstallPath() + "\\" + self.page + PageDraggableItems.draggablesfilebase
  3436.         #ScriptManagerManaged.ShowPythonError( self.page + "'s draggables path=" + self.draggablespath )
  3437.  
  3438.         if not File.Exists( self.draggablespath ):
  3439.             try:
  3440.                 fs = FileStream( self.draggablespath, FileMode.CreateNew )
  3441.                 fs.Close()
  3442.                 #ScriptManagerManaged.ShowPythonError( self.draggablespath + " created!" )
  3443.             except:
  3444.                 ScriptManagerManaged.ShowPythonError( "Unable to create file " + self.draggablespath )
  3445.  
  3446.     def AddDraggable( self, mi, name, isdraggable ):
  3447.         self.VerifyMI( mi )
  3448.  
  3449.         for di in self.items:
  3450.             if di.MenuItem == mi:
  3451.                 ScriptManagerManaged.ShowPythonError( name + " has already been added!" )
  3452.                 return
  3453.         c = self.UserDraggableItem( [ mi, name, isdraggable ] )
  3454.         self.items.append( c )
  3455.  
  3456.     def AddDraggableItem( self, newdi ):
  3457.         try:
  3458.             if type(newdi).__name__ != "UserDraggableItem":
  3459.                 raise TypeError, "Attempted to add non UserDraggableItem!"
  3460.         except:
  3461.                 raise TypeError, "Attempted to add non UserDraggableItem!"
  3462.  
  3463.         for di in self.items:
  3464.             if di.MenuItem == newdi.MenuItem:
  3465.                 ScriptManagerManaged.ShowPythonError( "UserDraggableItem: " + str( newdi.MenuItem ) + " has already been added!" )
  3466.                 return
  3467.         self.items.append( newdi )
  3468.  
  3469.     def DisplayDraggable( self, mi ):
  3470.         self.VerifyMI( mi )
  3471.  
  3472.         if len( self.items ) > 0:
  3473.             for item in self.items:
  3474.                 if item.MenuItem == mi:
  3475.                     ScriptManagerManaged.ShowPythonError( item.Display() )
  3476.                     break
  3477.         else:
  3478.             ScriptManagerManaged.ShowPythonError( self.page + " has no draggable items thus it cannot display " + mi.Name )
  3479.  
  3480.     def DisplayAllDraggables( self ):
  3481.         msg = "Current draggable items:\n"
  3482.         if len( self.items ) > 0:
  3483.             for item in self.items:
  3484.                 msg += item.Display() + "\n"
  3485.         else:
  3486.             msg += "None"
  3487.         ScriptManagerManaged.ShowPythonError( msg )
  3488.  
  3489.     def SetDraggablePosition( self, mi, arx, ary, drx, dry, offsetx, offsety ):
  3490.         self.VerifyMI( mi )
  3491.         for item in self.items:
  3492.             if item.MenuItem == mi:
  3493.                 item.SetPosition( arx, ary, drx, dry, offsetx, offsety )
  3494.                 break
  3495.  
  3496.     def StoreAllDraggables( self ):
  3497.         if len( self.items ) > 0:
  3498.             for di in self.items:
  3499.                 di.StorePosition()
  3500.         else:
  3501.             ScriptManagerManaged.ShowPythonError( self.page + " has no draggable items to store!" )
  3502.  
  3503.     def RestoreAllDraggables( self ):
  3504.         if len( self.items ) > 0:
  3505.             for di in self.items:
  3506.                 di.RestorePosition()
  3507.             #ScriptManagerManaged.ShowPythonError( self.page + "'s draggables restored!" )
  3508.             return 1
  3509.         else:
  3510.             ScriptManagerManaged.ShowPythonError( self.page + " has no draggable items to restore!" )
  3511.             return 0
  3512.  
  3513.     def GetAndSetDraggableItems( self, dis ):
  3514.         fs = None
  3515.         if File.Exists( self.draggablespath ):
  3516.             try:
  3517.                 fs = FileStream( self.draggablespath, FileMode.Open )
  3518.             except:
  3519.                 self.items = []
  3520.                 ScriptManagerManaged.ShowPythonError( "Unable to open and read " + self.draggablespath )
  3521.                 return
  3522.         else:
  3523.             ScriptManagerManaged.ShowPythonError( "GetDraggableItems: " + self.draggablespath + " doesn't exist!" )
  3524.             self.items = []
  3525.             return
  3526.  
  3527.         br = BinaryReader( fs )
  3528.  
  3529.         try:
  3530.             while True:
  3531.                 name = br.ReadString()
  3532.                 arx = br.ReadSingle()
  3533.                 ary = br.ReadSingle()
  3534.                 drx = br.ReadSingle()
  3535.                 dry = br.ReadSingle()
  3536.                 offsetx = br.ReadSingle()
  3537.                 offsety = br.ReadSingle()
  3538.  
  3539.                 for di in dis:
  3540.                     if di[ 1 ] == name:
  3541.                         newdi = self.UserDraggableItem( di )
  3542.                         newdi.SetPosition( arx, ary, drx, dry, offsetx, offsety )
  3543.                         self.AddDraggableItem( newdi )
  3544.                         break
  3545.         except EOFError:
  3546.             pass
  3547.  
  3548.         except:
  3549.             br.Close()
  3550.             ScriptManagerManaged.ShowPythonError( "Error reading draggable items from " + self.draggablespath + ". Reinitializing" )
  3551.             self.InitializeDraggableItems( dis )
  3552.             return
  3553.        
  3554.         br.Close()
  3555.        
  3556.         if len( self.items ) < 1:
  3557.             self.InitializeDraggableItems( dis )
  3558.  
  3559.     def SaveDraggableItems( self ):
  3560.         if len( self.items ) == 0:
  3561.             ScriptManagerManaged.ShowPythonError( self.page + " has no draggable items!" )
  3562.             return
  3563.  
  3564.         fs = None
  3565.         if File.Exists( self.draggablespath ):
  3566.             try:
  3567.                 sf = File.Open( self.draggablespath, FileMode.Create, FileAccess.Write )
  3568.             except:
  3569.                 ScriptManagerManaged.ShowPythonError( "Unable to save " + self.page + "'s draggable items to " + self.draggablespath )
  3570.                 return
  3571.         else:
  3572.             ScriptManagerManaged.ShowPythonError( "SaveDraggableItems: " + self.draggablespath + " doesn't exist!" )
  3573.             return
  3574.  
  3575.         bw = BinaryWriter( sf )
  3576.  
  3577.         try:
  3578.             for di in self.items:
  3579.                 if di.isdraggable:
  3580.                     di.StorePosition()
  3581.  
  3582.                 bw.Write( di.name )
  3583.                 bw.Write( di.arx )
  3584.                 bw.Write( di.ary )
  3585.                 bw.Write( di.drx )
  3586.                 bw.Write( di.dry )
  3587.                 bw.Write( di.offsetx )
  3588.                 bw.Write( di.offsety )
  3589.         except:
  3590.             bw.Close()
  3591.             ScriptManagerManaged.ShowPythonError( "Unable to save draggable items for page " + self.page )
  3592.             return
  3593.  
  3594.         bw.Flush()
  3595.         bw.Close()
  3596.  
  3597.         #ScriptManagerManaged.ShowPythonError( self.page + "'s draggables saved successfully to " + self.draggablespath )
  3598.  
  3599.  
  3600.     def InitializeDraggableItems( self, dis ):
  3601.         for di in dis:
  3602.             self.AddDraggableItem( self.UserDraggableItem( di ) )
  3603.         self.SaveDraggableItems()
  3604.         #ScriptManagerManaged.ShowPythonError( self.page + "'s draggable items initialized!" )
  3605.  
  3606.     def VerifyMI( self, mi ):
  3607.         try:
  3608.             if not mi.IsKindOf( ControlGroupWrapper ):
  3609.                 raise TypeError, "VerifyMI: " + str( mi ) + " is not a ControlGroupWrapper"
  3610.         except:
  3611.                 raise TypeError, "VerifyMI exception: " + str( mi ) + " is not a ControlGroupWrapper"
  3612.  
  3613.     def Destroy( self ):
  3614.         self.items = None
  3615.  
  3616.  
  3617.  
  3618.     # for storing the locations of the user's draggable items so that they can be restored
  3619.     class UserDraggableItem( object ):
  3620.         def __init__( self, di ):
  3621.             self.arx = 0
  3622.             self.ary = 0
  3623.             self.drx = 0
  3624.             self.dry = 0
  3625.             self.offsetx = 0
  3626.             self.offsety = 0
  3627.             self.MenuItem = None
  3628.             self.name = None
  3629.             self.isdraggable = True
  3630.  
  3631.             try:
  3632.                 #ScriptManagerManaged.ShowPythonError( str( di ) )
  3633.                 #if di[ 1 ] == "" or di[ 2 ] != True or di[ 2 ] != False:
  3634.                 #   raise TypeError, "UserDraggableItem.__init__: Incorrect value(s) passed for UserDraggableItem"
  3635.                 if not di[ 0 ].IsKindOf( ControlGroupWrapper ):
  3636.                     raise TypeError, "UserDraggableItem.__init__: " + di[ 1 ] + " is not a ControlGroupWrapper"
  3637.                 #pass
  3638.             except:
  3639.                 raise TypeError, "UserDraggableItem.__init__ exception: " + di[ 1 ] + " is not a ControlGroupWrapper"
  3640.  
  3641.             self.MenuItem = di[ 0 ]
  3642.             self.name = di[ 1 ]
  3643.             self.StorePosition()
  3644.             self.isdraggable = di[ 2 ]
  3645.  
  3646.         def SetPosition( self, arx, ary, drx, dry, offsetx, offsety ):
  3647.                 self.arx = arx
  3648.                 self.ary = ary
  3649.                 self.drx = drx
  3650.                 self.dry = dry
  3651.                 self.offsetx = offsetx
  3652.                 self.offsety = offsety
  3653.  
  3654.                 if self.isdraggable:
  3655.                     self.MenuItem.SnapFromAnchor.AnchorRelativeX = arx
  3656.                     self.MenuItem.SnapFromAnchor.AnchorRelativeY = ary
  3657.                     self.MenuItem.SnapFromAnchor.DependentRelativeX = drx
  3658.                     self.MenuItem.SnapFromAnchor.DependentRelativeY = dry
  3659.                     self.MenuItem.SnapFromAnchor.OffsetX = offsetx
  3660.                     self.MenuItem.SnapFromAnchor.OffsetY = offsety
  3661.                     self.MenuItem.SnapFromAnchor.SetDependentPosition()
  3662.                     self.MenuItem.SnapChildZones()
  3663.  
  3664.         def StorePosition( self ):
  3665.             if self.isdraggable:
  3666.                 self.arx = self.MenuItem.SnapFromAnchor.AnchorRelativeX
  3667.                 self.ary = self.MenuItem.SnapFromAnchor.AnchorRelativeY
  3668.                 self.drx = self.MenuItem.SnapFromAnchor.DependentRelativeX
  3669.                 self.dry = self.MenuItem.SnapFromAnchor.DependentRelativeY
  3670.                 self.offsetx = self.MenuItem.SnapFromAnchor.OffsetX
  3671.                 self.offsety = self.MenuItem.SnapFromAnchor.OffsetY
  3672.  
  3673.         def RestorePosition( self ):
  3674.             if self.isdraggable:
  3675.                 self.SetPosition( self.arx, self.ary, self.drx, self.dry, self.offsetx, self.offsety )
  3676.  
  3677.         def SetDraggableState( self, value ):
  3678.             self.isdraggable = value
  3679.             self.StorePosition()
  3680.  
  3681.         def Display( self ):
  3682.             msg = self.name + ":\n"
  3683.             msg += "ARX=" + str( self.MenuItem.SnapFromAnchor.AnchorRelativeX ) + "\tARY=" + str( self.MenuItem.SnapFromAnchor.AnchorRelativeY ) + "\n"
  3684.             msg += "DRX=" + str( self.MenuItem.SnapFromAnchor.DependentRelativeX ) + "\tDRY=" + str( self.MenuItem.SnapFromAnchor.DependentRelativeY ) + "\n"
  3685.             msg += "OffX=" + str( self.MenuItem.SnapFromAnchor.OffsetX ) + "\toffY=" + str( self.MenuItem.SnapFromAnchor.OffsetY )
  3686.             return msg
  3687.  
  3688.  
  3689. ########################################################################################################
  3690.  
  3691. # the tutorial class
  3692.  
  3693. class TDWTutorial( object ):
  3694.     def __init__( self, page ):
  3695.         self.Tutorials = Dictionary[ String, TDWTutorial.TutorialInFile ]()
  3696.         self.Categories = Dictionary[ String, list ]()
  3697.         self.page = page
  3698.         self.initsuccess = False
  3699.  
  3700.         # open the tutorial files and read in the contents
  3701.         installpath = GetSH5InstallPath()
  3702.         tutfolder = installpath + "\\data\\Tutorials"
  3703.  
  3704.         if not Directory.Exists( tutfolder ):
  3705.             ScriptManagerManaged.ShowPythonError( "class TDWTutorial.__init__: folder " + tutfolder + " doesn't exist" )
  3706.             self.Tutorials.Clear()
  3707.             self.Categories.Clear()
  3708.         else:
  3709.             tutfiles = Directory.GetFiles( tutfolder, page + "_*.SHT" )
  3710.  
  3711.             lineread = None
  3712.             newtut = ""
  3713.             fs = None
  3714.             tutfile = None
  3715.  
  3716.             for tf in tutfiles:
  3717.                 #ScriptManagerManaged.ShowPythonError( tf )
  3718.                 try:
  3719.                     fs = FileStream( tf, FileMode.Open )
  3720.                     tutfile = StreamReader( fs )
  3721.                     #ScriptManagerManaged.ShowPythonError( "class TDWTutorial.__init__: tutorial file successfully opened" )
  3722.  
  3723.                     while tutfile.Peek() >= 0:
  3724.                         args = self.GetTutorial( tutfile )
  3725.  
  3726.                         if args != False:
  3727.                             # check for duplicate names (not allowed!)
  3728.                             duplicatefound = False
  3729.                             if self.Tutorials.Count > 0:
  3730.                                 for tt in self.Tutorials.Keys:
  3731.                                     if self.Tutorials[ as ].GetName() == args[ 0 ]:
  3732.                                         ScriptManagerManaged.ShowPythonError( "class TDWTutorial.__init__: duplicate tutorial name found!" )
  3733.                                         self.Tutorials.Clear()
  3734.                                         duplicatefound = True
  3735.                                         break
  3736.  
  3737.                             if duplicatefound:
  3738.                                 break
  3739.  
  3740.                             if len( args[ 2 ] ) > 0:
  3741.                                 if not self.Categories.ContainsKey( args[ 1 ] ):
  3742.                                     #ScriptManagerManaged.ShowPythonError( "class TDWTutorial.__init__: adding new category " + args[ 1 ] )
  3743.                                     self.Categories[ args[ 1 ] ] = []
  3744.                                 self.Categories[ args[ 1 ] ].append( args[ 0 ] )
  3745.                                 self.Tutorials.Add( args[ 0 ], self.TutorialInFile( args[ 0 ], args[ 1 ], args[ 2 ] ) )
  3746.  
  3747.                 except:
  3748.                     ScriptManagerManaged.ShowPythonError( "class TDWTutorial.__init__: Exception! Current file in use: " + tf )
  3749.                     self.Tutorials.Clear()
  3750.  
  3751.                 # close the file as we are done with it
  3752.                 if tutfile != None:
  3753.                     tutfile.Close()
  3754.                 #ScriptManagerManaged.ShowPythonError( "class TDWTutorial.__init__: tutorial file successfully closed" )
  3755.  
  3756.             # display to user for debugging
  3757.             global TutorialDebuggingEnabled
  3758.             if TutorialDebuggingEnabled:
  3759.                 #ScriptManagerManaged.ShowPythonError( "Number of tutorials=" + str( self.Tutorials.Count ) )
  3760.                 msg = "Listing of all tutorials contained in the files:\n\n"
  3761.                 if self.Tutorials.Count > 0:
  3762.                     for ts in self.Tutorials.Keys:
  3763.                         msg += self.Tutorials[ ts ].Display() + "\n\n"
  3764.                 ScriptManagerManaged.ShowPythonError( msg )
  3765.  
  3766.                 # display all categories and what they contain
  3767.                 msg = "Listing of all categories and their contents:\n"
  3768.                 keys = self.GetAllCategoryNames()
  3769.                 for cat in keys:
  3770.                     msg += "\nCategory " + cat + ":\n"
  3771.                     names = self.GetAllTutorialNamesForCategory( cat )
  3772.                     for tn in names:
  3773.                         msg += "\t" + tn + "\n"
  3774.                 ScriptManagerManaged.ShowPythonError( msg )
  3775.  
  3776.             # signal whether init was successful or not
  3777.             self.initsuccess = ( self.Tutorials.Count > 0 )
  3778.  
  3779.     # helper class functions
  3780.     def GetTutorial( self, file ):
  3781.         # look for the [AS] header
  3782.         if not self.FindHeader( file, "[TUTORIAL]" ):
  3783.             return False
  3784.  
  3785.         # read in the script name
  3786.         newts = self.ReadALine( file, True, True, True )
  3787.         if newts == None or newts.StartsWith( "[" ) or newts == "":
  3788.             return False
  3789.  
  3790.         # look for the [CATEGORY] header
  3791.         if not self.FindHeader( file, "[CATEGORY]" ):
  3792.             return False
  3793.        
  3794.         # read in the category name
  3795.         category = self.ReadALine( file, True, True, True )
  3796.         if category == None or category.StartsWith( "[" ) or category == "":
  3797.             return False
  3798.  
  3799.         # look for the [COMMANDS] header
  3800.         if not self.FindHeader( file, "[COMMANDS]" ):
  3801.             return False
  3802.  
  3803.         # read in the commands
  3804.         return [ newts, category, self.GetCommands( file ) ]
  3805.  
  3806.     def ReadALine( self, file, ignorecomments, ignorewhiteblank, removetrailingcomments ):
  3807.         while file.Peek() >= 0:
  3808.             lineread = file.ReadLine().Trim()
  3809.             if lineread.StartsWith( ";" ):
  3810.                 if ignorecomments:
  3811.                     continue
  3812.             else:
  3813.                 if ignorewhiteblank:
  3814.                     if lineread == None or lineread == "":
  3815.                         continue
  3816.             if removetrailingcomments:
  3817.                 index = lineread.IndexOf( ";" )
  3818.                 if index > 0:
  3819.                     lineread = lineread.Remove( index ).Trim()
  3820.             #ScriptManagerManaged.ShowPythonError( "class TDWTutorial.ReadALine:\n" + "'" + lineread + "'" )
  3821.             return lineread
  3822.         # EOF
  3823.         return None
  3824.  
  3825.  
  3826.     def FindHeader( self, file, header ):
  3827.         #ScriptManagerManaged.ShowPythonError( "class TDWTutorial.FindHeader: Finding header " + header )
  3828.         headerfound = False
  3829.         lineread = self.ReadALine( file, True, True, True )
  3830.         if lineread != None:
  3831.             if lineread.StartsWith( header ):
  3832.                 headerfound = True
  3833.         #ScriptManagerManaged.ShowPythonError( "class TDWTutorial.FindHeader: Found header " + header + "=" + str( headerfound ) )
  3834.         return headerfound
  3835.  
  3836.     def GetCommands( self, file ):
  3837.         commands = []
  3838.         endfound = False
  3839.         while file.Peek() >= 0:
  3840.             lineread = self.ReadALine( file, True, True, True )
  3841.             if lineread.StartsWith( "[COMMANDS_END]" ):
  3842.                 endfound = True
  3843.                 break
  3844.             elif lineread == None:
  3845.                 break
  3846.             else:
  3847.                 if self.CheckCommand( lineread ):
  3848.                     commands.append( lineread )
  3849.         # ensure at least a command was read in
  3850.         if not endfound:
  3851.             commands = []
  3852.         #ScriptManagerManaged.ShowPythonError( "class TDWTutorial.GetCommands: commands=" + str( commands ) )
  3853.         return commands
  3854.  
  3855.     def CheckCommand( self, command ):
  3856.         try:
  3857.             args = command.split( "," )
  3858.             paramtime = float( args[ 3 ] )
  3859.             #ScriptManagerManaged.ShowPythonError( "class TDWTutorial.CheckCommand: args=" + str( args ) )
  3860.             return len( args ) == 4
  3861.         except:
  3862.             return false
  3863.  
  3864.     def GetAllCategoryNames( self ):
  3865.         cats = []
  3866.         if self.Categories.Count > 0:
  3867.             cats = self.Categories.Keys
  3868.         return cats
  3869.  
  3870.     def GetAllTutorialNamesForCategory( self, cat ):
  3871.         names = []
  3872.         if self.Categories.ContainsKey( cat ):
  3873.             names = self.Categories[ cat ]
  3874.         return names
  3875.  
  3876.     def GetAllTutorialNames( self ):
  3877.         #ScriptManagerManaged.ShowPythonError( "class TDWTutorial.GetAllTutorialNames )
  3878.         tutnames = []
  3879.         if self.Tutorials.Count > 0:
  3880.             for t in self.Tutorials.Keys:
  3881.                 tutnames.append( self.Tutorials[ s ].GetName() )
  3882.         return tutnames
  3883.  
  3884.     def Destroy( self ):
  3885.         if self.Tutorials.Count > 0:
  3886.             for ts in self.Tutorials.Keys:
  3887.                 self.Tutorials[ ts ].Destroy()
  3888.             self.Tutorials.Clear()
  3889.         self.Tutorials = None
  3890.         self.Categories.Clear()
  3891.         self.Categories = None
  3892.  
  3893.  
  3894.  
  3895.     # a tutorial
  3896.     class TutorialInFile( object ):
  3897.         def __init__( self, name, category, commands ):
  3898.             #ScriptManagerManaged.ShowPythonError( "class TDWTutorial(" + name + ").__init__" )
  3899.             self.commands = []
  3900.             self.name = name
  3901.             self.ID = TDWUO_RndNumGen.NextDouble()
  3902.             self.running = False
  3903.             self.paused = False
  3904.             self.currentcommandindex = 0
  3905.             self.currentcommandindexcomplete = False
  3906.             self.category = category
  3907.             for command in commands:
  3908.                 args = command.split( "," )
  3909.                 self.commands.append( self.TutorialCommand( args[ 0 ], args[ 1 ], args[ 2 ], args[ 3 ] ) )
  3910.  
  3911.         def GetName( self ):
  3912.             return self.name
  3913.  
  3914.         def GetID( self ):
  3915.             return self.ID
  3916.  
  3917.         def AddTimer( self, time ):
  3918.             from Pagelayout import Pagelayout_HPTimer
  3919.             Pagelayout_HPTimer.RemoveThenAddItem( TimerID_UpdateTutorial, self.ID, time, False, True )
  3920.  
  3921.         def RemoveTimer( self ):
  3922.             from Pagelayout import Pagelayout_HPTimer
  3923.             Pagelayout_HPTimer.RemoveItem( TimerID_UpdateTutorial, self.ID )
  3924.  
  3925.         def PauseTimer( self ):
  3926.             from Pagelayout import Pagelayout_HPTimer
  3927.             Pagelayout_HPTimer.StopItem( TimerID_UpdateTutorial, self.ID )
  3928.  
  3929.         def UnPauseTimer( self ):
  3930.             from Pagelayout import Pagelayout_HPTimer
  3931.             Pagelayout_HPTimer.StartItem( TimerID_UpdateTutorial, self.ID )
  3932.  
  3933.         def Display( self ):
  3934.             msg = "Tutorial: " + self.name + "\nCategory: " + self.category + "\n\nCommands:"
  3935.             for command in self.commands:
  3936.                 msg += "\n" + command.Display()
  3937.             return msg
  3938.  
  3939.         def Destroy( self ):
  3940.             try:
  3941.                 self.RemoveTimer()
  3942.             except:
  3943.                 pass
  3944.             self.name = None
  3945.             self.category = None
  3946.             self.currentcommandindex = None
  3947.             self.currentcommandindexcomplete = None
  3948.             self.running = None
  3949.             self.paused = None
  3950.             for command in self.commands:
  3951.                 command.Destroy()
  3952.             self.commands = None
  3953.  
  3954.  
  3955.  
  3956.         # Base class for all tutorial objects
  3957.         class TutorialCommand( object ):
  3958.             def __init__( self, command, param1, param2, time ):
  3959.                 #ScriptManagerManaged.ShowPythonError( "class TutorialCommand.__init__" )
  3960.                 self.command = command
  3961.                 self.param1 = param1
  3962.                 self.param2 = param2
  3963.                 self.time = float( time )
  3964.  
  3965.             def Execute( self, elapsedtime ):
  3966.                 return True
  3967.  
  3968.             def Display( self ):
  3969.                 msg = self.command + ", " + str( self.param1 ) + ", " + str( self.param2 ) + ", " + str( self.time )
  3970.                 return msg
  3971.  
  3972.             def Destroy( self ):
  3973.                 try:
  3974.                     self.command = None
  3975.                     self.param1 = None
  3976.                     self.param2 = None
  3977.                     self.time = None
  3978.                 except:
  3979.                     pass
  3980.  
  3981.  
  3982. ########################################################################################################
  3983. def EndGame():
  3984.     Automation.StopAllScripts()
  3985.     #pass
  3986.  
  3987.  
  3988. ########################################################################################################
  3989. def UnloadScript():
  3990.     #ScriptManagerManaged.ShowPythonError( "TheDarkWraithUserOptions.UnloadScript" )
  3991.     global Automation
  3992.     Automation.Destroy()
  3993.     Automation = None
  3994.     #global Tutorial
  3995.     #Tutorial.Destroy()
  3996.     #Tutorial = None
  3997.     #pass
  3998.  
  3999.  
  4000. ########################################################################################################
  4001. #def GetCrewDialogLinesFromFiles():
  4002. #   global CrewDialogLines
  4003. #   dialoglines = []
  4004. #   #ScriptManagerManaged.ShowPythonError( str( dialoglines.GetType() ) )
  4005. #   CrewDialogLines = Dictionary[ String, dialoglines.GetType() ]()
  4006. #
  4007. #   root = "strategy RootDialog_"
  4008. #   adialogfile = "DT_"
  4009. #   dialoglinestrategies = None
  4010. #   lineread = ""
  4011. #   crewname = ""
  4012. #
  4013. #   crewAIFilesPath = GetSH5InstallPath() + "\\data\\Scripts\\AI\\Dialogs_Default"
  4014. #   #ScriptManagerManaged.ShowPythonError( "crewAIFilesPath=" + crewAIFilesPath )
  4015. #  
  4016. #   # get all the files in the crewAIFilesPath folder
  4017. #   for dialogfilepath in Directory.GetFiles( crewAIFilesPath ):
  4018. #       #ScriptManagerManaged.ShowPythonError( "dailogfilepath=" + dialogfilepath )
  4019. #       dialogfilename = dialogfilepath[ dialogfilepath.LastIndexOf( "\\" ) + 1 : len( dialogfilepath ) ]
  4020. #       if not dialogfilename.StartsWith( adialogfile ):
  4021. #           continue
  4022. #       #ScriptManagerManaged.ShowPythonError( "dialogfilename=" + dialogfilename )
  4023. #       crewname = dialogfilename[ dialogfilename.IndexOf( "_" ) + 1 : dialogfilename.LastIndexOf( "_" ) ]
  4024. #       #ScriptManagerManaged.ShowPythonError( "crewname=" + crewname )
  4025. #       fs = FileStream( dialogfilepath, FileMode.Open )
  4026. #       dialogfile = StreamReader( fs, Encoding.Default )
  4027. #       found = False
  4028. #       while dialogfile.Peek() >= 0:
  4029. #           lineread = dialogfile.ReadLine().Trim()
  4030. #           if lineread.StartsWith( root ):
  4031. #               # find the dialog lines
  4032. #               found = True
  4033. #               break
  4034. #           elif lineread.StartsWith( "}" ):
  4035. #               break
  4036. #
  4037. #       if found:
  4038. #           value = GetCrewDialogLineStrategies( fs, dialogfile )
  4039. #           if value != None:
  4040. #               if len( value ) > 0:
  4041. #                   CrewDialogLines[ crewname ] = value
  4042. #          
  4043. #       dialogfile.Close()
  4044. #  
  4045. #   TranslateTextNumbers()
  4046. #
  4047. #   # show everything
  4048. #   keys = CrewDialogLines.Keys
  4049. #   msg = "Dialog Lines:\n\n"
  4050. #   for key in keys:
  4051. #       msg += "\t" + key + ":\n"
  4052. #       msg += "\t\t" + str( CrewDialogLines[ key ] ) + "\n\n"
  4053. #   ScriptManagerManaged.ShowPythonError( msg )
  4054. #
  4055. #
  4056. #def GetCrewDialogLineStrategies( fs, dialogfile ):
  4057. #   dialogline = "DialogLine_"
  4058. #   found = False
  4059. #
  4060. #   dialoglinestrategies = []
  4061. #   value = None
  4062. #
  4063. #   while dialogfile.Peek() >= 0:
  4064. #       lineread = dialogfile.ReadLine().Trim()
  4065. #       if lineread.StartsWith( dialogline ):
  4066. #           indexofcomma = lineread.LastIndexOf( "," )
  4067. #           if indexofcomma > 0:
  4068. #               lineread = lineread.Remove( indexofcomma )
  4069. #           dialoglinestrategies.append( lineread )
  4070. #           found = True
  4071. #       elif lineread.StartsWith( "}" ):
  4072. #           break
  4073. #
  4074. #   if found:
  4075. #       #ScriptManagerManaged.ShowPythonError( "strategies=" + str( dialoglinestrategies ) )
  4076. #       value = GetCrewDialogLineTextAbility( fs, dialogfile, dialoglinestrategies )
  4077. #      
  4078. #   return value
  4079. #
  4080. #
  4081. #def GetCrewDialogLineTextAbility( fs, dialogfile, dialoglinestrategies ):
  4082. #   #ScriptManagerManaged.ShowPythonError( str( dialoglinestrategies ) )
  4083. #   dialoglines = []
  4084. #   for strat in dialoglinestrategies:
  4085. #       fs.Seek(0, SeekOrigin.Begin)
  4086. #       dialogtext = ""
  4087. #       dialogability = ""
  4088. #       dialogstate = None
  4089. #       stratinit = "strategy " + strat + "_Init"
  4090. #       actionfound = False
  4091. #       while dialogfile.Peek() >= 0:
  4092. #           lineread = dialogfile.ReadLine().Trim()
  4093. #           if lineread.StartsWith( stratinit ):
  4094. #               while dialogfile.Peek() >= 0:
  4095. #                   lineread = dialogfile.ReadLine().Trim()
  4096. #                   if lineread == "action":
  4097. #                       actionfound = True
  4098. #                       while dialogfile.Peek() >= 0:
  4099. #                           lineread = dialogfile.ReadLine().Trim()
  4100. #                           if lineread.StartsWith( "Dialog:AddDialogLine" ):
  4101. #                               dialogtext = lineread[ lineread.IndexOf( '"' ) + 1 : lineread.LastIndexOf( '"' ) ]
  4102. #                               while dialogfile.Peek() >= 0:
  4103. #                                   lineread = dialogfile.ReadLine().Trim()
  4104. #                                   if lineread.StartsWith( "Dialog:SetAbilityToRun" ):
  4105. #                                       dialogability = lineread[ lineread.IndexOf( '"' ) + 1 : lineread.LastIndexOf( '"' ) ]
  4106. #                                   elif lineread.StartsWith( "}" ):
  4107. #                                       break
  4108. #                           elif lineread.StartsWith( "}" ):
  4109. #                               break
  4110. #
  4111. #                   elif lineread == "precond":
  4112. #                       while dialogfile.Peek() >= 0:
  4113. #                           lineread = dialogfile.ReadLine().Trim()
  4114. #                           if lineread.StartsWith( "Dialog:" ):
  4115. #                               io = lineread.IndexOf( "Dialog:IsAbilityActive" )
  4116. #                               if io > 0:
  4117. #                                   ioe = lineread.IndexOf( "==", io ) + 2
  4118. #                                   dialogstate = int( lineread[ ioe : ioe + 2 ].Trim() )
  4119. #                                   break
  4120. #                           elif lineread.StartsWith( "}" ):
  4121. #                               break
  4122. #
  4123. #                   elif lineread.StartsWith( "}" ) and actionfound:
  4124. #                       break
  4125. #
  4126. #               if dialogtext != "" and dialogability != "":
  4127. #                   dialoglines.append( [ dialogtext, dialogability, dialogstate ] )
  4128. #                   break
  4129. #              
  4130. #   if len( dialoglines ) > 0:
  4131. #       return dialoglines
  4132. #   else:
  4133. #       return None
  4134. #
  4135. #
  4136. #def TranslateTextNumbers():
  4137. #   global CrewDialogLines
  4138. #
  4139. #   textnumberfilepath = GetSH5InstallPath() + "\\data\\UPCDataGE\\UPCLocalization\\dialogs.tsr"
  4140. #   fs = FileStream( textnumberfilepath, FileMode.Open )
  4141. #   textfile = StreamReader( fs, Encoding.Default )
  4142. #
  4143. #   for key in CrewDialogLines.Keys:
  4144. #       numbers = CrewDialogLines[ key ]
  4145. #       #ScriptManagerManaged.ShowPythonError( "numbers=" + str( numbers ) )
  4146. #       for index in range( 0, len( numbers ) ):
  4147. #           fs.Seek(0, SeekOrigin.Begin)
  4148. #           while textfile.Peek() >= 0:
  4149. #               lineread = textfile.ReadLine().Trim()
  4150. #               if lineread.StartsWith( numbers[ index ][ 0 ] ):
  4151. #                   ioe = lineread.IndexOf( "=" ) + 1
  4152. #                   txt = lineread.Remove( 0, ioe )    
  4153. #                   numbers[ index ][ 0 ] = txt
  4154. #                   break
  4155. #      
  4156. #   textfile.Close()
  4157. #
  4158. #
  4159. ########################################################################################################
  4160. #class UserSelectFolder( object ):
  4161. #   desc = "Unable to determine the install directory for Silent Hunter 5 from registry. Please select the main Silent Hunter 5 folder"
  4162. #   selectedpath = ""
  4163. #
  4164. #   def __init__( self ):
  4165. #       self.folderBrowserDialog = FolderBrowserDialog()
  4166. #       self.folderBrowserDialog.ShowNewFolderButton = False
  4167. #       self.folderBrowserDialog.Description = self.desc
  4168. #
  4169. #   def execute( self ):
  4170. #       fbd = self.folderBrowserDialog
  4171. #       if fbd.ShowDialog() == DialogResult.OK:
  4172. #           self.selectedpath = self.folderBrowserDialog.SelectedPath
  4173. #
  4174. #
  4175. #def GetInstallPathFromUser():
  4176. #   installpath = UserSelectFolder()
  4177. #   installpath.execute()
  4178. #   selpath = installpath.selectedpath
  4179. #   ScriptManagerManaged.ShowPythonError( "Selected folder=" + selpath )
  4180. #   installpath.Destroy()
  4181. #   return selpath
Advertisement
Add Comment
Please, Sign In to add comment