@jtff/miztemplate-lib 3.4.16 → 3.4.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- FunkMan = SOCKET:New(10042, "127.0.0.1")
1
+ FunkMan = SOCKET:New(FunkmanConfig.port, FunkmanConfig.ip)
@@ -3,7 +3,6 @@ AirBossConfig = {
3
3
  enable = false,
4
4
  srs = {
5
5
  useSRS = true,
6
- path = "C:\\SRS",
7
6
  },
8
7
  carriername = 'CSG-1 CVN-71-1',
9
8
  alias = 'roosevelt',
@@ -66,7 +65,6 @@ AirBossConfig = {
66
65
  enable = false,
67
66
  srs = {
68
67
  useSRS = true,
69
- path = "C:\\SRS",
70
68
  },
71
69
  carriername = 'CSG-2 CVN-73',
72
70
  alias = 'washington',
@@ -24,8 +24,6 @@ AtisConfig = {
24
24
  freq = 109.3,
25
25
  runway = '05'
26
26
  },
27
- srs = {
28
- path = "C:\\SRS"
29
- }
27
+ useSRS = true,
30
28
  }
31
29
  }
@@ -5,7 +5,6 @@ TrainingRangeConfig = {
5
5
  targetsheetpath = "C:/rangeboss-targetsheets",
6
6
  srs = {
7
7
  useSRS = true,
8
- path = "C:\\SRS",
9
8
  },
10
9
  instructionradio = {
11
10
  unitname = "toto",
@@ -24,6 +24,23 @@ JTFF_LOGLEVEL = 'info'
24
24
 
25
25
  use_jtff_sound_mod = false
26
26
 
27
+ if (not(FunkmanConfig)) then
28
+ jtff_log.error(string.format("Local Funkman Bot config not specified ! Initializing empty values for Funkman"), "Initialization")
29
+ FunkmanConfig = {
30
+ ip= "127.0.0.1",
31
+ port = 10042,
32
+ }
33
+ end
34
+
35
+ if (not(SRSConfig)) then
36
+ jtff_log.error(string.format("Local SRS config not specified ! Initializing empty values for SRS"), "Initialization")
37
+ SRSConfig= {
38
+ port = 5002,
39
+ path = "C:\\SRS",
40
+ ip = "127.0.0.1",
41
+ }
42
+ end
43
+
27
44
  spawnStandardDelay = 15
28
45
 
29
46
  sead = SEAD:New({})
@@ -1191,7 +1191,7 @@ for index, airbossconfig in ipairs(AirBossConfig) do
1191
1191
  objAirboss:SetMaxSectionSize(4)
1192
1192
  objAirboss:SetMaxMarshalStacks(airbossconfig.maxstacks)
1193
1193
  objAirboss:SetDefaultPlayerSkill(airbossconfig.difficulty) -- other options EASY / HARD
1194
- objAirboss:SetFunkManOn(10042, "127.0.0.1")
1194
+ objAirboss:SetFunkManOn(FunkmanConfig.port, FunkmanConfig.ip)
1195
1195
  if airbossconfig.wirecorrection then
1196
1196
  objAirboss:SetMPWireCorrection(airbossconfig.wirecorrection)
1197
1197
  else
@@ -1230,7 +1230,7 @@ for index, airbossconfig in ipairs(AirBossConfig) do
1230
1230
  objAirboss:SetAirbossNiceGuy(airbossconfig.enable_niceguy)
1231
1231
  if ( type(airbossconfig.srs) ~= nil ) then
1232
1232
  if ( airbossconfig.srs.useSRS == true) then
1233
- objAirboss:EnableSRS(airbossconfig.srs.path, airbossconfig.srs.port, 'en-US')
1233
+ objAirboss:EnableSRS(SRSConfig.path, SRSConfig.port, 'en-US')
1234
1234
  else
1235
1235
  objAirboss:SetSoundfilesFolder(soundFilesPrefix .. "AIRBOSS/Airboss Soundfiles/")
1236
1236
  if airbossconfig.voices.marshall then
@@ -43,8 +43,8 @@ for index, atisconfig in ipairs(AtisConfig) do
43
43
  objAtis:AddILS(atisconfig.ils.freq)
44
44
  end
45
45
  end
46
- if (atisconfig.srs) then
47
- objAtis:SetSRS(atisconfig.srs.path, "male", "en-US", nil, serverSRSPort or 5002)
46
+ if (atisconfig.useSRS) then
47
+ objAtis:SetSRS(SRSConfig.path, "male", "en-US", nil, SRSConfig.port)
48
48
  end
49
49
  objAtis.customconfig = atisconfig
50
50
  ATISArray[compteur] = objAtis
@@ -15,12 +15,12 @@ for index, traingingrangeconfig in ipairs(TrainingRangeConfig) do
15
15
  trainingRange:SetDefaultPlayerSmokeBomb(false)
16
16
  trainingRange:SetRangeRadius(0.2) -- bomb impact at more than 200m is out of range
17
17
  trainingRange:SetScoreBombDistance(100)-- bomb impact at more than 100m won't be taken into account
18
- trainingRange:SetFunkManOn(10042,"127.0.0.1")
18
+ trainingRange:SetFunkManOn(FunkmanConfig.port, FunkmanConfig.ip)
19
19
  trainingRange:SetAutosaveOn()
20
20
  trainingRange:SetTargetSheet(traingingrangeconfig.targetsheetpath)
21
21
  if ( type(traingingrangeconfig.srs) ~= nil ) then
22
22
  if ( traingingrangeconfig.srs.useSRS == true) then
23
- trainingRange:SetSRS(traingingrangeconfig.srs.path, serverSRSPort or 5002, coalition.side.BLUE)
23
+ trainingRange:SetSRS(SRSConfig.path, SRSConfig.port, coalition.side.BLUE)
24
24
  else
25
25
  trainingRange:SetSoundfilesPath(soundFilesPrefix .. 'RANGE/Range Soundfiles/')
26
26
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jtff/miztemplate-lib",
3
- "version": "3.4.16",
3
+ "version": "3.4.18",
4
4
  "description": "JTFF mission template library",
5
5
  "main": "index.js",
6
6
  "files": [