From 8a33ccd35697ef59b5a92c0428c8ed95755b6c85 Mon Sep 17 00:00:00 2001 From: Shafik Date: Sun, 28 Dec 2025 02:49:14 +0200 Subject: [PATCH] [ADDED] Hidden options to SPAWNSTATIC --- Moose Development/Moose/Core/SpawnStatic.lua | 38 ++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/Moose Development/Moose/Core/SpawnStatic.lua b/Moose Development/Moose/Core/SpawnStatic.lua index 06a9179e1..c5ead7541 100644 --- a/Moose Development/Moose/Core/SpawnStatic.lua +++ b/Moose Development/Moose/Core/SpawnStatic.lua @@ -334,6 +334,31 @@ function SPAWNSTATIC:InitCargo(IsCargo) return self end +--- Hide the static on the map view (visible to game master slots!). +-- @param #SPAWN self +-- @param #boolean OnOff Defaults to true +-- @return #SPAWN The SPAWN object +function SPAWN:InitHiddenOnMap(OnOff) + self.SpawnHiddenOnMap = OnOff == false and false or true + return self +end + +--- Hide the static on MFDs (visible to game master slots!). +-- @param #SPAWN self +-- @return #SPAWN The SPAWN object +function SPAWN:InitHiddenOnMFD() + self.SpawnHiddenOnMFD = true + return self +end + +--- Hide the static on planner (visible to game master slots!). +-- @param #SPAWN self +-- @return #SPAWN The SPAWN object +function SPAWN:InitHiddenOnPlanner() + self.SpawnHiddenOnPlanner = true + return self +end + --- Initialize as dead. -- @param #SPAWNSTATIC self -- @param #boolean IsDead If true, this static is dead. @@ -533,6 +558,19 @@ function SPAWNSTATIC:_SpawnStatic(Template, CountryID) Template.mass=self.InitStaticCargoMass end + -- hiding options + if self.SpawnHiddenOnPlanner then + Template.hiddenOnPlanner=true + end + + if self.SpawnHiddenOnMFD then + Template.hiddenOnMFD=true + end + + if self.SpawnHiddenOnMap then + Template.hidden=self.SpawnHiddenOnMap + end + if self.InitLinkUnit then Template.linkUnit=self.InitLinkUnit:GetID() Template.linkOffset=true