From f4f942d8d4c00cb3977ea30aa314f8d02d6e34c2 Mon Sep 17 00:00:00 2001 From: funkyfranky Date: Mon, 17 Sep 2018 14:04:30 +0200 Subject: [PATCH] Warehouse little updates static countryid --- Moose Development/Moose/Core/SpawnStatic.lua | 4 +--- Moose Development/Moose/Wrapper/Static.lua | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Moose Development/Moose/Core/SpawnStatic.lua b/Moose Development/Moose/Core/SpawnStatic.lua index 5fa87ddb6..d1b9cf371 100644 --- a/Moose Development/Moose/Core/SpawnStatic.lua +++ b/Moose Development/Moose/Core/SpawnStatic.lua @@ -200,10 +200,8 @@ function SPAWNSTATIC:ReSpawn(countryid) if StaticTemplate then - local CountryID = countryid or self.CountryID - local CountryName = _DATABASE.COUNTRY_NAME[CountryID] + --local CountryID = countryid or (self.CountryID or CountryID) - StaticTemplate.units = nil StaticTemplate.route = nil StaticTemplate.groupId = nil diff --git a/Moose Development/Moose/Wrapper/Static.lua b/Moose Development/Moose/Wrapper/Static.lua index fd20f3328..e624dc021 100644 --- a/Moose Development/Moose/Wrapper/Static.lua +++ b/Moose Development/Moose/Wrapper/Static.lua @@ -197,9 +197,9 @@ end -- @param DCS#country.id countryid The country ID used for spawning the new static. function STATIC:ReSpawn(countryid) - local SpawnStatic = SPAWNSTATIC:NewFromStatic( self.StaticName ) + local SpawnStatic = SPAWNSTATIC:NewFromStatic( self.StaticName, countryid ) - SpawnStatic:ReSpawn(countryid) + SpawnStatic:ReSpawn() end