@jtff/miztemplate-lib 3.4.13 → 3.4.14

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.
@@ -846,22 +846,33 @@ function SpawnRanges(param)
846
846
  elseif (staticToSpawn.type ~= nil and staticToSpawn.category ~= nil) then
847
847
  local staticTypeToSpawn = string.format("%s", staticToSpawn.type)
848
848
  local staticCategoryToSpawn = string.format("%s", staticToSpawn.category)
849
- spawnStatic = SPAWNSTATIC:NewFromType(staticTypeToSpawn, staticCategoryToSpawn)
850
- if (staticToSpawn.coalition ~= nil) then
851
- if (staticToSpawn.coalition == coalition.side.BLUE) then
852
- spawnStatic = SPAWNSTATIC:NewFromType(staticTypeToSpawn, staticCategoryToSpawn, country.id.CJTF_BLUE)
853
- elseif (staticToSpawn.coalition == coalition.side.RED) then
854
- spawnStatic = SPAWNSTATIC:NewFromType(staticTypeToSpawn, staticCategoryToSpawn, country.id.CJTF_RED)
855
- else
856
- spawnStatic = SPAWNSTATIC:NewFromType(staticTypeToSpawn, staticCategoryToSpawn, country.id.UN_PEACEKEEPERS)
857
- end
858
- end
859
849
  local x = staticToSpawn.x
860
850
  local y = staticToSpawn.y
861
- local heading = staticToSpawn.heading
862
- local name = string.format("%s_%s_%i", subRangeName, staticTypeToSpawn, index)
863
- local static = spawnStatic:SpawnFromPointVec2( POINT_VEC2:New( x, y ), heading, name )
864
- jtff_log.info(string.format("Static type to spawn %s at %i,%i -> %s", static:GetDCSObject():getTypeName(), x, y, static:GetDCSObject():getName()),"RANGE")
851
+ --spawnStatic = SPAWNSTATIC:NewFromType(staticTypeToSpawn, staticCategoryToSpawn)
852
+ if (staticToSpawn.type == "big_smoke" and staticToSpawn.category == "Effects") then
853
+ local landAltitude = POINT_VEC2:New( x, y ):GetAlt()
854
+ trigger.action.effectSmokeBig({ x = x, y = landAltitude, z = y}, 1, 1)
855
+ else
856
+ if (staticToSpawn.coalition ~= nil) then
857
+ if (staticToSpawn.coalition == coalition.side.BLUE) then
858
+ spawnStatic = SPAWNSTATIC:NewFromType(staticTypeToSpawn, staticCategoryToSpawn, country.id.CJTF_BLUE)
859
+ elseif (staticToSpawn.coalition == coalition.side.RED) then
860
+ spawnStatic = SPAWNSTATIC:NewFromType(staticTypeToSpawn, staticCategoryToSpawn, country.id.CJTF_RED)
861
+ else
862
+ spawnStatic = SPAWNSTATIC:NewFromType(staticTypeToSpawn, staticCategoryToSpawn, country.id.UN_PEACEKEEPERS)
863
+ end
864
+ end
865
+ local heading = staticToSpawn.heading
866
+ local name = string.format("%s_%s_%i", subRangeName, staticTypeToSpawn, index)
867
+ if (staticToSpawn.shape_name ~= nil) then
868
+ spawnStatic:InitShape(staticToSpawn.shape_name)
869
+ end
870
+ if (staticToSpawn.dead ~= nil) then
871
+ spawnStatic:InitDead(staticToSpawn.dead)
872
+ end
873
+ local static = spawnStatic:SpawnFromPointVec2( POINT_VEC2:New( x, y ), heading, name )
874
+ jtff_log.info(string.format("Static type to spawn %s at %i,%i -> %s", static:GetDCSObject():getTypeName(), x, y, static:GetDCSObject():getName()),"RANGE")
875
+ end
865
876
  else
866
877
  jtff_log.warn(string.format("Static to spawn has no name or type!"),"RANGE")
867
878
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jtff/miztemplate-lib",
3
- "version": "3.4.13",
3
+ "version": "3.4.14",
4
4
  "description": "JTFF mission template library",
5
5
  "main": "index.js",
6
6
  "files": [