diff --git a/mods/cnc/maps/funpark01/map.yaml b/mods/cnc/maps/funpark01/map.yaml index 93e882740c..e8fc1baf2e 100644 --- a/mods/cnc/maps/funpark01/map.yaml +++ b/mods/cnc/maps/funpark01/map.yaml @@ -441,6 +441,8 @@ Rules: Scripts: scj01ea.lua ObjectivesPanel: PanelName: MISSION_OBJECTIVES + MusicPlaylist: + StartingMusic: j1 ^Vehicle: Tooltip: GenericVisibility: Enemy diff --git a/mods/cnc/maps/funpark01/scj01ea.lua b/mods/cnc/maps/funpark01/scj01ea.lua index 8d31bb9c4d..2130e84c48 100644 --- a/mods/cnc/maps/funpark01/scj01ea.lua +++ b/mods/cnc/maps/funpark01/scj01ea.lua @@ -32,12 +32,6 @@ ReinforceWithLandingCraft = function(units, transportStart, transportUnload, ral Media.PlaySpeechNotification(player, "Reinforce") end -initialSong = "j1" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() nod = Player.GetPlayer("Nod") dinosaur = Player.GetPlayer("Dinosaur") @@ -91,7 +85,6 @@ WorldLoaded = function() end Camera.Position = CameraStart.CenterPosition - PlayMusic() end Tick = function() diff --git a/mods/cnc/maps/gdi01/gdi01.lua b/mods/cnc/maps/gdi01/gdi01.lua index c8e61459a8..24c4265c0c 100644 --- a/mods/cnc/maps/gdi01/gdi01.lua +++ b/mods/cnc/maps/gdi01/gdi01.lua @@ -56,12 +56,6 @@ CheckForBase = function() return #baseBuildings >= 3 end -initialSong = "aoi" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() player = Player.GetPlayer("GDI") enemy = Player.GetPlayer("Nod") @@ -93,8 +87,6 @@ WorldLoaded = function() ReinforceWithLandingCraft(MCVReinforcements, lstStart.Location + CVec.New(2, 0), lstEnd.Location + CVec.New(2, 0), mcvTarget.Location) Reinforce(InfantryReinforcements) - PlayMusic() - Trigger.OnIdle(Gunboat, function() SetGunboatPath(Gunboat) end) SendNodPatrol() diff --git a/mods/cnc/maps/gdi01/map.yaml b/mods/cnc/maps/gdi01/map.yaml index 8a350ccf64..f5ad68a83f 100644 --- a/mods/cnc/maps/gdi01/map.yaml +++ b/mods/cnc/maps/gdi01/map.yaml @@ -428,6 +428,8 @@ Rules: Scripts: gdi01.lua ObjectivesPanel: PanelName: MISSION_OBJECTIVES + MusicPlaylist: + StartingMusic: aoi Player: -ConquestVictoryConditions: MissionObjectives: diff --git a/mods/cnc/maps/gdi02/gdi02.lua b/mods/cnc/maps/gdi02/gdi02.lua index fe37e3ab53..5b3b6fa14d 100644 --- a/mods/cnc/maps/gdi02/gdi02.lua +++ b/mods/cnc/maps/gdi02/gdi02.lua @@ -56,18 +56,10 @@ NodAttack = function() end end -initialSong = "befeared" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() player = Player.GetPlayer("GDI") enemy = Player.GetPlayer("Nod") - PlayMusic() - Trigger.OnObjectiveAdded(player, function(p, id) Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") end) diff --git a/mods/cnc/maps/gdi02/map.yaml b/mods/cnc/maps/gdi02/map.yaml index b88f777d1e..f70a34397f 100644 --- a/mods/cnc/maps/gdi02/map.yaml +++ b/mods/cnc/maps/gdi02/map.yaml @@ -655,6 +655,8 @@ Rules: Scripts: gdi02.lua ObjectivesPanel: PanelName: MISSION_OBJECTIVES + MusicPlaylist: + StartingMusic: befeared Player: -ConquestVictoryConditions: MissionObjectives: diff --git a/mods/cnc/maps/gdi03/gdi03.lua b/mods/cnc/maps/gdi03/gdi03.lua index 4556d615db..3d470f19bc 100644 --- a/mods/cnc/maps/gdi03/gdi03.lua +++ b/mods/cnc/maps/gdi03/gdi03.lua @@ -45,18 +45,10 @@ SendReinforcements = function() Media.PlaySpeechNotification(player, "Reinforce") end -initialSong = "crep226m" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() player = Player.GetPlayer("GDI") enemy = Player.GetPlayer("Nod") - PlayMusic() - Trigger.OnObjectiveAdded(player, function(p, id) Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") end) diff --git a/mods/cnc/maps/gdi03/map.yaml b/mods/cnc/maps/gdi03/map.yaml index e0612e91f2..0ea63bc6bb 100644 --- a/mods/cnc/maps/gdi03/map.yaml +++ b/mods/cnc/maps/gdi03/map.yaml @@ -730,6 +730,8 @@ Rules: Scripts: gdi03.lua ObjectivesPanel: PanelName: MISSION_OBJECTIVES + MusicPlaylist: + StartingMusic: crep226m Player: -ConquestVictoryConditions: MissionObjectives: diff --git a/mods/cnc/maps/gdi04a/gdi04a.lua b/mods/cnc/maps/gdi04a/gdi04a.lua index 9b56e3a316..795380b4a1 100644 --- a/mods/cnc/maps/gdi04a/gdi04a.lua +++ b/mods/cnc/maps/gdi04a/gdi04a.lua @@ -103,20 +103,12 @@ SetupWorld = function() Trigger.OnRemovedFromWorld(crate, function() gdi.MarkCompletedObjective(gdiObjective) end) end -initialSong = "fist226m" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() gdi = Player.GetPlayer("GDI") nod = Player.GetPlayer("Nod") SetupWorld() - PlayMusic() - Trigger.OnObjectiveAdded(gdi, function(p, id) Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") end) diff --git a/mods/cnc/maps/gdi04a/map.yaml b/mods/cnc/maps/gdi04a/map.yaml index c63f3f55bf..f0315f2e5a 100644 --- a/mods/cnc/maps/gdi04a/map.yaml +++ b/mods/cnc/maps/gdi04a/map.yaml @@ -489,6 +489,8 @@ Rules: Scripts: gdi04a.lua ObjectivesPanel: PanelName: MISSION_OBJECTIVES + MusicPlaylist: + StartingMusic: fist226m Player: -ConquestVictoryConditions: MissionObjectives: diff --git a/mods/cnc/maps/gdi04b/gdi04b.lua b/mods/cnc/maps/gdi04b/gdi04b.lua index 070ce89fbe..d7bc55a270 100644 --- a/mods/cnc/maps/gdi04b/gdi04b.lua +++ b/mods/cnc/maps/gdi04b/gdi04b.lua @@ -110,12 +110,6 @@ SetupWorld = function() Trigger.OnRemovedFromWorld(crate, function() gdi.MarkCompletedObjective(gdiObjective) end) end -initialSong = "fist226m" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() gdi = Player.GetPlayer("GDI") nod = Player.GetPlayer("Nod") @@ -144,8 +138,6 @@ WorldLoaded = function() SetupWorld() - PlayMusic() - bhndTrigger = false Trigger.OnExitedFootprint(BhndTrigger, function(a, id) if not bhndTrigger and a.Owner == gdi then diff --git a/mods/cnc/maps/gdi04b/map.yaml b/mods/cnc/maps/gdi04b/map.yaml index abb91362a3..eb0777c620 100644 --- a/mods/cnc/maps/gdi04b/map.yaml +++ b/mods/cnc/maps/gdi04b/map.yaml @@ -560,6 +560,8 @@ Rules: Scripts: gdi04b.lua ObjectivesPanel: PanelName: MISSION_OBJECTIVES + MusicPlaylist: + StartingMusic: fist226m Player: -ConquestVictoryConditions: MissionObjectives: diff --git a/mods/cnc/maps/gdi04c/gdi04c.lua b/mods/cnc/maps/gdi04c/gdi04c.lua index da1622be7a..7d9defda4d 100644 --- a/mods/cnc/maps/gdi04c/gdi04c.lua +++ b/mods/cnc/maps/gdi04c/gdi04c.lua @@ -61,18 +61,10 @@ SendGDIReinforcements = function() end) end -initialSong = "ind" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() player = Player.GetPlayer("GDI") nod = Player.GetPlayer("Nod") - PlayMusic() - Trigger.OnObjectiveAdded(player, function(p, id) Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") end) diff --git a/mods/cnc/maps/gdi04c/map.yaml b/mods/cnc/maps/gdi04c/map.yaml index 510093acc9..edf37d37ed 100644 --- a/mods/cnc/maps/gdi04c/map.yaml +++ b/mods/cnc/maps/gdi04c/map.yaml @@ -785,6 +785,8 @@ Rules: Scripts: gdi04c.lua ObjectivesPanel: PanelName: MISSION_OBJECTIVES + MusicPlaylist: + StartingMusic: ind Player: -ConquestVictoryConditions: MissionObjectives: diff --git a/mods/cnc/maps/gdi05a/gdi05a.lua b/mods/cnc/maps/gdi05a/gdi05a.lua index b184251b9f..e119088a9a 100644 --- a/mods/cnc/maps/gdi05a/gdi05a.lua +++ b/mods/cnc/maps/gdi05a/gdi05a.lua @@ -183,12 +183,6 @@ SetupWorld = function() Grd3Action() end -initialSong = "rain" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() gdiBase = Player.GetPlayer("AbandonedBase") gdi = Player.GetPlayer("GDI") @@ -219,9 +213,6 @@ WorldLoaded = function() SetupWorld() Camera.Position = GdiTankRallyPoint.CenterPosition - - PlayMusic() - end Tick = function() diff --git a/mods/cnc/maps/gdi05a/map.yaml b/mods/cnc/maps/gdi05a/map.yaml index 4659bdfc18..5a938477b7 100644 --- a/mods/cnc/maps/gdi05a/map.yaml +++ b/mods/cnc/maps/gdi05a/map.yaml @@ -797,6 +797,8 @@ Rules: Scripts: gdi05a.lua ObjectivesPanel: PanelName: MISSION_OBJECTIVES + MusicPlaylist: + StartingMusic: rain Player: -ConquestVictoryConditions: MissionObjectives: diff --git a/mods/cnc/maps/gdi05b/gdi05b.lua b/mods/cnc/maps/gdi05b/gdi05b.lua index 8926f6bd21..5df1e1acae 100644 --- a/mods/cnc/maps/gdi05b/gdi05b.lua +++ b/mods/cnc/maps/gdi05b/gdi05b.lua @@ -118,12 +118,6 @@ IdleHunt = function(unit) end end -initialSong = "rain" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() gdi = Player.GetPlayer("GDI") gdiBase = Player.GetPlayer("AbandonedBase") @@ -185,8 +179,6 @@ WorldLoaded = function() end) Camera.Position = UnitsRally.CenterPosition - - PlayMusic() InsertGdiUnits() end diff --git a/mods/cnc/maps/gdi05b/map.yaml b/mods/cnc/maps/gdi05b/map.yaml index d80299897b..07925a9106 100644 --- a/mods/cnc/maps/gdi05b/map.yaml +++ b/mods/cnc/maps/gdi05b/map.yaml @@ -639,6 +639,8 @@ Rules: MissionObjectives: EarlyGameOver: true EnemyWatcher: + MusicPlaylist: + StartingMusic: rain World: -CrateSpawner: -SpawnMPUnits: diff --git a/mods/cnc/maps/nod01/map.yaml b/mods/cnc/maps/nod01/map.yaml index 387a6fb8ff..85d17c774d 100644 --- a/mods/cnc/maps/nod01/map.yaml +++ b/mods/cnc/maps/nod01/map.yaml @@ -289,6 +289,8 @@ Rules: Scripts: nod01.lua ObjectivesPanel: PanelName: MISSION_OBJECTIVES + MusicPlaylist: + StartingMusic: nomercy C10: Tooltip: Name: Nikoomba diff --git a/mods/cnc/maps/nod01/nod01.lua b/mods/cnc/maps/nod01/nod01.lua index 3603a1b912..9476e36509 100644 --- a/mods/cnc/maps/nod01/nod01.lua +++ b/mods/cnc/maps/nod01/nod01.lua @@ -31,12 +31,6 @@ SendLastInfantryReinforcements = function() end) end -initialSong = "nomercy" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() nod = Player.GetPlayer("Nod") gdi = Player.GetPlayer("GDI") @@ -74,8 +68,6 @@ WorldLoaded = function() Camera.Position = StartRallyPoint.CenterPosition - PlayMusic() - SendInitialForces() Trigger.AfterDelay(DateTime.Seconds(30), SendFirstInfantryReinforcements) Trigger.AfterDelay(DateTime.Seconds(60), SendSecondInfantryReinforcements) diff --git a/mods/cnc/maps/nod02a/map.yaml b/mods/cnc/maps/nod02a/map.yaml index cb756333a9..bf42e40551 100644 --- a/mods/cnc/maps/nod02a/map.yaml +++ b/mods/cnc/maps/nod02a/map.yaml @@ -226,6 +226,8 @@ Rules: PanelName: MISSION_OBJECTIVES LuaScript: Scripts: nod02a.lua + MusicPlaylist: + StartingMusic: ind2 ^Vehicle: Tooltip: GenericVisibility: Enemy diff --git a/mods/cnc/maps/nod02a/nod02a.lua b/mods/cnc/maps/nod02a/nod02a.lua index 00647f8428..7a22835809 100644 --- a/mods/cnc/maps/nod02a/nod02a.lua +++ b/mods/cnc/maps/nod02a/nod02a.lua @@ -159,12 +159,6 @@ Pat1Movement = function(unit) IdleHunt(unit) end -initialSong = "ind2" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() GDI = Player.GetPlayer("GDI") Nod = Player.GetPlayer("Nod") @@ -222,8 +216,6 @@ WorldLoaded = function() end end) - PlayMusic() - Trigger.AfterDelay(0, getStartUnits) InsertNodUnits() end diff --git a/mods/cnc/maps/nod02b/map.yaml b/mods/cnc/maps/nod02b/map.yaml index 644728419c..a2e61a2735 100644 --- a/mods/cnc/maps/nod02b/map.yaml +++ b/mods/cnc/maps/nod02b/map.yaml @@ -268,6 +268,8 @@ Rules: PanelName: MISSION_OBJECTIVES LuaScript: Scripts: nod02b.lua + MusicPlaylist: + StartingMusic: ind2 ^Vehicle: Tooltip: GenericVisibility: Enemy diff --git a/mods/cnc/maps/nod02b/nod02b.lua b/mods/cnc/maps/nod02b/nod02b.lua index f0135e3a41..c1a0f3e112 100644 --- a/mods/cnc/maps/nod02b/nod02b.lua +++ b/mods/cnc/maps/nod02b/nod02b.lua @@ -96,12 +96,6 @@ Gdi3Movement = function(unit) IdleHunt(unit) end -initialSong = "ind2" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() GDI = Player.GetPlayer("GDI") Nod = Player.GetPlayer("Nod") @@ -141,8 +135,6 @@ WorldLoaded = function() Trigger.AfterDelay(0, getStartUnits) Harvester.FindResources() - PlayMusic() - InsertNodUnits() end diff --git a/mods/cnc/maps/nod03a/map.yaml b/mods/cnc/maps/nod03a/map.yaml index dfb3ef6411..cbc36d8d04 100644 --- a/mods/cnc/maps/nod03a/map.yaml +++ b/mods/cnc/maps/nod03a/map.yaml @@ -467,6 +467,8 @@ Rules: Scripts: nod03a.lua ObjectivesPanel: PanelName: MISSION_OBJECTIVES + MusicPlaylist: + StartingMusic: chrg226m ^Vehicle: Tooltip: GenericVisibility: Enemy diff --git a/mods/cnc/maps/nod03a/nod03a.lua b/mods/cnc/maps/nod03a/nod03a.lua index 9c10d3b1c9..ed72aabe5e 100644 --- a/mods/cnc/maps/nod03a/nod03a.lua +++ b/mods/cnc/maps/nod03a/nod03a.lua @@ -16,12 +16,6 @@ InsertNodUnits = function() end) end -initialSong = "chrg226m" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() player = Player.GetPlayer("Nod") enemy = Player.GetPlayer("GDI") @@ -58,8 +52,6 @@ WorldLoaded = function() player.MarkFailedObjective(nodObjective1) end) - PlayMusic() - InsertNodUnits() Trigger.AfterDelay(DateTime.Seconds(20), function() SendAttackWave(FirstAttackWave, AttackWaveSpawnA.Location) end) Trigger.AfterDelay(DateTime.Seconds(50), function() SendAttackWave(SecondThirdAttackWave, AttackWaveSpawnB.Location) end) diff --git a/mods/cnc/maps/nod03b/map.yaml b/mods/cnc/maps/nod03b/map.yaml index 6e64d0d6b2..527c88c00d 100644 --- a/mods/cnc/maps/nod03b/map.yaml +++ b/mods/cnc/maps/nod03b/map.yaml @@ -511,6 +511,8 @@ Rules: Scripts: nod03b.lua ObjectivesPanel: PanelName: MISSION_OBJECTIVES + MusicPlaylist: + StartingMusic: chrg226m ^Vehicle: Tooltip: GenericVisibility: Enemy diff --git a/mods/cnc/maps/nod03b/nod03b.lua b/mods/cnc/maps/nod03b/nod03b.lua index 3e1c922d26..51510db360 100644 --- a/mods/cnc/maps/nod03b/nod03b.lua +++ b/mods/cnc/maps/nod03b/nod03b.lua @@ -33,12 +33,6 @@ InsertNodUnits = function() end) end -initialSong = "chrg226m" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() player = Player.GetPlayer("Nod") enemy = Player.GetPlayer("GDI") @@ -72,8 +66,6 @@ WorldLoaded = function() end) end) - PlayMusic() - InsertNodUnits() Trigger.AfterDelay(DateTime.Seconds(40), function() SendAttackWave(FirstAttackWaveUnits, FirstAttackWave) end) Trigger.AfterDelay(DateTime.Seconds(80), function() SendAttackWave(SecondAttackWaveUnits, SecondAttackWave) end) diff --git a/mods/cnc/maps/nod04a/map.yaml b/mods/cnc/maps/nod04a/map.yaml index 17eb11a634..c8fc9ab427 100644 --- a/mods/cnc/maps/nod04a/map.yaml +++ b/mods/cnc/maps/nod04a/map.yaml @@ -568,6 +568,8 @@ Rules: Scripts: nod04a.lua ObjectivesPanel: PanelName: MISSION_OBJECTIVES + MusicPlaylist: + StartingMusic: valkyrie ^Vehicle: Tooltip: GenericVisibility: Enemy diff --git a/mods/cnc/maps/nod04a/nod04a.lua b/mods/cnc/maps/nod04a/nod04a.lua index e0a084c2fb..46dadfea02 100644 --- a/mods/cnc/maps/nod04a/nod04a.lua +++ b/mods/cnc/maps/nod04a/nod04a.lua @@ -171,12 +171,6 @@ CreateCivilians = function(actor, discoverer) end) end -initialSong = "valkyrie" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() NodSupporter = Player.GetPlayer("NodSupporter") Nod = Player.GetPlayer("Nod") @@ -290,8 +284,6 @@ WorldLoaded = function() GDIObjective = GDI.AddPrimaryObjective("Eliminate all Nod forces in the area.") NodObjective1 = Nod.AddPrimaryObjective("Kill all civilian GDI supporters.") - PlayMusic() - InsertNodUnits() Camera.Position = waypoint6.CenterPosition end diff --git a/mods/cnc/maps/nod04b/map.yaml b/mods/cnc/maps/nod04b/map.yaml index 9565289096..616d2df796 100644 --- a/mods/cnc/maps/nod04b/map.yaml +++ b/mods/cnc/maps/nod04b/map.yaml @@ -507,6 +507,8 @@ Rules: PanelName: MISSION_OBJECTIVES LuaScript: Scripts: nod04b.lua + MusicPlaylist: + StartingMusic: warfare ^Vehicle: Tooltip: GenericVisibility: Enemy diff --git a/mods/cnc/maps/nod04b/nod04b.lua b/mods/cnc/maps/nod04b/nod04b.lua index b1b2f8d557..36f17e0875 100644 --- a/mods/cnc/maps/nod04b/nod04b.lua +++ b/mods/cnc/maps/nod04b/nod04b.lua @@ -74,12 +74,6 @@ InsertNodUnits = function() Reinforcements.ReinforceWithTransport(Nod, 'tran', NodUnitsGunner, { EntryPointGunner.Location, RallyPointGunner.Location }, { EntryPointGunner.Location }, nil, nil) end -initialSong = "warfare" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() GDI = Player.GetPlayer("GDI") Nod = Player.GetPlayer("Nod") @@ -147,8 +141,6 @@ WorldLoaded = function() NodObjective1 = Nod.AddPrimaryObjective("Destroy the village and kill all civilians.") NodObjective2 = Nod.AddSecondaryObjective("Kill all GDI units in the area.") - PlayMusic() - InsertNodUnits() end diff --git a/mods/cnc/maps/nod05/map.yaml b/mods/cnc/maps/nod05/map.yaml index d30094141a..e5ec9568cd 100644 --- a/mods/cnc/maps/nod05/map.yaml +++ b/mods/cnc/maps/nod05/map.yaml @@ -402,6 +402,8 @@ Rules: PanelName: MISSION_OBJECTIVES LuaScript: Scripts: nod05.lua + MusicPlaylist: + StartingMusic: airstrik ^Vehicle: Tooltip: GenericVisibility: Enemy diff --git a/mods/cnc/maps/nod05/nod05.lua b/mods/cnc/maps/nod05/nod05.lua index ea2c5c301d..afb7db6e42 100644 --- a/mods/cnc/maps/nod05/nod05.lua +++ b/mods/cnc/maps/nod05/nod05.lua @@ -163,12 +163,6 @@ InsertNodUnits = function() end) end -initialSong = "airstrik" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() GDI = Player.GetPlayer("GDI") Nod = Player.GetPlayer("Nod") @@ -247,9 +241,6 @@ WorldLoaded = function() end) Trigger.AfterDelay(0, getStartUnits) - - PlayMusic() - end Tick = function() diff --git a/mods/cnc/maps/nod06a/map.yaml b/mods/cnc/maps/nod06a/map.yaml index 0975a13452..dcf76654f8 100644 --- a/mods/cnc/maps/nod06a/map.yaml +++ b/mods/cnc/maps/nod06a/map.yaml @@ -675,6 +675,8 @@ Rules: PanelName: MISSION_OBJECTIVES LuaScript: Scripts: nod06a.lua + MusicPlaylist: + StartingMusic: rout ^Vehicle: Tooltip: GenericVisibility: Enemy diff --git a/mods/cnc/maps/nod06a/nod06a.lua b/mods/cnc/maps/nod06a/nod06a.lua index 4df5cf0783..ffffea6056 100644 --- a/mods/cnc/maps/nod06a/nod06a.lua +++ b/mods/cnc/maps/nod06a/nod06a.lua @@ -118,12 +118,6 @@ InsertNodUnits = function() Reinforcements.Reinforce(Nod, NodStartUnitsRight, { UnitsEntryRight.Location, UnitsRallyRight.Location }, 15) end -initialSong = "rout" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() GDI = Player.GetPlayer("GDI") Nod = Player.GetPlayer("Nod") @@ -153,8 +147,6 @@ WorldLoaded = function() GDIObjective = GDI.AddPrimaryObjective("Stop the Nod taskforce from escaping with the detonator.") - PlayMusic() - InsertNodUnits() Trigger.AfterDelay(Grd1TriggerFunctionTime, Grd1TriggerFunction) diff --git a/mods/cnc/maps/nod06b/map.yaml b/mods/cnc/maps/nod06b/map.yaml index 67d197cce7..630c6548fd 100644 --- a/mods/cnc/maps/nod06b/map.yaml +++ b/mods/cnc/maps/nod06b/map.yaml @@ -617,6 +617,8 @@ Rules: PanelName: MISSION_OBJECTIVES LuaScript: Scripts: nod06b.lua + MusicPlaylist: + StartingMusic: rout ^Vehicle: Tooltip: GenericVisibility: Enemy diff --git a/mods/cnc/maps/nod06b/nod06b.lua b/mods/cnc/maps/nod06b/nod06b.lua index 11036e8459..4da90d6e70 100644 --- a/mods/cnc/maps/nod06b/nod06b.lua +++ b/mods/cnc/maps/nod06b/nod06b.lua @@ -94,12 +94,6 @@ InsertNodUnits = function() Reinforcements.Reinforce(Nod, NodUnitsRocket, { UnitsEntryRocket.Location, UnitsRallyRocket.Location }, 25) end -initialSong = "rout" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() GDI = Player.GetPlayer("GDI") Nod = Player.GetPlayer("Nod") @@ -127,8 +121,6 @@ WorldLoaded = function() NodObjective1 = Nod.AddPrimaryObjective("Steal the GDI nuclear detonator.") GDIObjective = GDI.AddPrimaryObjective("Stop the Nod taskforce from escaping with the detonator.") - PlayMusic() - InsertNodUnits() Trigger.OnEnteredFootprint(HuntCellTriggerActivator, function(a, id) diff --git a/mods/cnc/maps/nod06c/map.yaml b/mods/cnc/maps/nod06c/map.yaml index 32df9a1ded..9bf7c2d860 100644 --- a/mods/cnc/maps/nod06c/map.yaml +++ b/mods/cnc/maps/nod06c/map.yaml @@ -503,6 +503,8 @@ Rules: PanelName: MISSION_OBJECTIVES LuaScript: Scripts: nod06c.lua + MusicPlaylist: + StartingMusic: rout ^Vehicle: Tooltip: GenericVisibility: Enemy diff --git a/mods/cnc/maps/nod06c/nod06c.lua b/mods/cnc/maps/nod06c/nod06c.lua index ca3316ca74..359eca404b 100644 --- a/mods/cnc/maps/nod06c/nod06c.lua +++ b/mods/cnc/maps/nod06c/nod06c.lua @@ -82,12 +82,6 @@ InsertNodUnits = function() Reinforcements.Reinforce(Nod, NodStartUnitsRight, { UnitsEntryRight.Location, UnitsRallyRight.Location }, 15) end -initialSong = "rout" -PlayMusic = function() - Media.PlayMusic(initialSong, PlayMusic) - initialSong = nil -end - WorldLoaded = function() GDI = Player.GetPlayer("GDI") Nod = Player.GetPlayer("Nod") @@ -116,8 +110,6 @@ WorldLoaded = function() NodObjective3 = Nod.AddSecondaryObjective("Infiltrate the barracks, weapon factory and \nthe construction yard.") GDIObjective = GDI.AddPrimaryObjective("Stop the Nod taskforce from escaping with the detonator.") - PlayMusic() - InsertNodUnits() Trigger.AfterDelay(Atk1TriggerFunctionTime, Atk1TriggerFunction) diff --git a/mods/cnc/maps/shellmap/map.yaml b/mods/cnc/maps/shellmap/map.yaml index 2596ac7b31..6bf0fb3dc3 100644 --- a/mods/cnc/maps/shellmap/map.yaml +++ b/mods/cnc/maps/shellmap/map.yaml @@ -994,6 +994,9 @@ Rules: Effect: Desaturated LuaScript: Scripts: shellmap.lua + MusicPlaylist: + StartingMusic: map1 + LoopStartingMusic: True LST: Mobile: Speed: 42 diff --git a/mods/cnc/maps/shellmap/shellmap.lua b/mods/cnc/maps/shellmap/shellmap.lua index 3a847feaa9..2b72205e06 100644 --- a/mods/cnc/maps/shellmap/shellmap.lua +++ b/mods/cnc/maps/shellmap/shellmap.lua @@ -17,7 +17,6 @@ WorldLoaded = function() for i, unit in ipairs(units) do LoopTrack(unit, CPos.New(8, unit.Location.Y), CPos.New(87, unit.Location.Y)) end - PlayMusic() end LoopTrack = function(actor, left, right) @@ -26,10 +25,6 @@ LoopTrack = function(actor, left, right) actor.CallFunc(function() LoopTrack(actor, left, right) end) end -PlayMusic = function() - Media.PlayMusic("map1", PlayMusic) -end - LoadTransport = function(transport, passenger) transport.LoadPassenger(Actor.Create(passenger, false, { Owner = transport.Owner, Facing = transport.Facing })) end \ No newline at end of file diff --git a/mods/cnc/rules/world.yaml b/mods/cnc/rules/world.yaml index f27ea40b00..5a4c6f174a 100644 --- a/mods/cnc/rules/world.yaml +++ b/mods/cnc/rules/world.yaml @@ -3,6 +3,7 @@ Inherits: ^Palettes ScreenMap: ActorMap: + MusicPlaylist: TerrainGeometryOverlay: ShroudRenderer: ShroudVariants: typea, typeb, typec, typed diff --git a/mods/d2k/maps/shellmap/map.yaml b/mods/d2k/maps/shellmap/map.yaml index 66506681b2..adda1a729f 100644 --- a/mods/d2k/maps/shellmap/map.yaml +++ b/mods/d2k/maps/shellmap/map.yaml @@ -125,6 +125,8 @@ Rules: Maximum: 1 LuaScript: Scripts: shellmap.lua + MusicPlaylist: + StartingMusic: score rockettower: Power: Amount: 100 diff --git a/mods/d2k/maps/shellmap/shellmap.lua b/mods/d2k/maps/shellmap/shellmap.lua index 6361538ea5..e69de29bb2 100644 --- a/mods/d2k/maps/shellmap/shellmap.lua +++ b/mods/d2k/maps/shellmap/shellmap.lua @@ -1,3 +0,0 @@ -WorldLoaded = function() - Media.PlayMusic("score") -end \ No newline at end of file diff --git a/mods/d2k/rules/world.yaml b/mods/d2k/rules/world.yaml index 3c1c215b2a..b90ee115b6 100644 --- a/mods/d2k/rules/world.yaml +++ b/mods/d2k/rules/world.yaml @@ -3,6 +3,7 @@ AlwaysVisible: ScreenMap: ActorMap: + MusicPlaylist: TerrainGeometryOverlay: ShroudRenderer: ShroudVariants: typea, typeb, typec, typed diff --git a/mods/ra/maps/desert-shellmap/desert-shellmap.lua b/mods/ra/maps/desert-shellmap/desert-shellmap.lua index 32eb763cd7..34efded0f9 100644 --- a/mods/ra/maps/desert-shellmap/desert-shellmap.lua +++ b/mods/ra/maps/desert-shellmap/desert-shellmap.lua @@ -162,6 +162,4 @@ WorldLoaded = function() SendSovietUnits(Entry5.Location, UnitTypes, 50) SendSovietUnits(Entry6.Location, UnitTypes, 50) SendSovietUnits(Entry7.Location, BeachUnitTypes, 15) - - Media.PlayMusic() end diff --git a/mods/ra/rules/world.yaml b/mods/ra/rules/world.yaml index 4f6155d92e..2a1d469c82 100644 --- a/mods/ra/rules/world.yaml +++ b/mods/ra/rules/world.yaml @@ -3,6 +3,7 @@ AlwaysVisible: ActorMap: ScreenMap: + MusicPlaylist: TerrainGeometryOverlay: LoadWidgetAtGameStart: ShroudRenderer: diff --git a/mods/ts/maps/blank-shellmap/map.yaml b/mods/ts/maps/blank-shellmap/map.yaml index 50511b72dc..a7bd4c73b0 100644 --- a/mods/ts/maps/blank-shellmap/map.yaml +++ b/mods/ts/maps/blank-shellmap/map.yaml @@ -40,8 +40,9 @@ Rules: -StartGameNotification: -SpawnMPUnits: -MPStartLocations: - LuaScript: - Scripts: shellmap.lua + MusicPlaylist: + StartingMusic: intro + LoopStartingMusic: True Sequences: diff --git a/mods/ts/maps/blank-shellmap/shellmap.lua b/mods/ts/maps/blank-shellmap/shellmap.lua deleted file mode 100644 index 916c3ddf81..0000000000 --- a/mods/ts/maps/blank-shellmap/shellmap.lua +++ /dev/null @@ -1,7 +0,0 @@ -PlayMusic = function() - Media.PlayMusic("intro", PlayMusic) -end - -WorldLoaded = function() - PlayMusic() -end diff --git a/mods/ts/rules/world.yaml b/mods/ts/rules/world.yaml index 0eb5eeaeb9..c5a588430a 100644 --- a/mods/ts/rules/world.yaml +++ b/mods/ts/rules/world.yaml @@ -3,6 +3,7 @@ AlwaysVisible: ScreenMap: ActorMap: + MusicPlaylist: LoadWidgetAtGameStart: ShroudRenderer: Index: 255, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 20, 40, 56, 65, 97, 130, 148, 194, 24, 33, 66, 132, 28, 41, 67, 134, 1, 2, 4, 8, 3, 6, 12, 9, 7, 14, 13, 11, 5, 10, 15, 255