// Downloaded at : http://www.akbalder.com/ManiaPlanet/GameModes/ShootMania/JailbreakArena.Script.txt /* -------------------------------------- */ // Name: JailbreakArena // Version: 201403281108 // Author: Florian "Akbalder" Guillard // Contact: akbalder@gmail.com // Description: MapType for Jailbreak // Details: One spawn, one goal and one jailspawn for each clan /* -------------------------------------- */ #RequireContext CSmMapType #Const Version "2014-03-28" #Const MapTypeVersion 1 #Const ScriptName "JailbreakArena.Script.txt" #Include "TextLib" as TextLib #Include "Libs/Nadeo/Anchor.Script.txt" as Anchor #Include "Libs/Nadeo/MapType.Script.txt" as MapType // ---------------------------------- // // Globales // ---------------------------------- // declare Text Rules; // ---------------------------------- // // Functions // ---------------------------------- // // ---------------------------------- // // Initialize the anchors Void InitAnchors() { foreach (Anchor in AnchorData) { if (Anchor.DefaultTag == "Spawn") { if (Anchor.Tag != "Spawn" && Anchor.Tag != "JailSpawn") Anchor.Tag = Anchor.DefaultTag; if (Anchor.Order != 1 && Anchor.Order != 2) Anchor.Order = 1; } else if (Anchor.DefaultTag == "Goal") { Anchor.Tag = Anchor.DefaultTag; if (Anchor.Order != 1 && Anchor.Order != 2) Anchor.Order = 1; }else { Anchor.Tag = Anchor.DefaultTag; Anchor.Order = Anchor.DefaultOrder; } } } // ---------------------------------- // // Check if the map is valid Void UpdateValidability() { InitAnchors(); Anchor::UpdateAnchorCounts(); for(I, 1, 2) { if (!Anchor::HasExactlyOneAnchor("Spawn", I, TextLib::Compose(_("You must place exactly one Spawn #%1"), TextLib::ToText(I)))) return; if (!Anchor::HasExactlyOneAnchor("Goal", I, TextLib::Compose(_("You must place exactly one Goal #%1"), TextLib::ToText(I)))) return; if (!Anchor::HasExactlyOneAnchor("JailSpawn", I, TextLib::Compose(_("You must place exactly one JailSpawn #%1"), TextLib::ToText(I)))) return; } ValidationStatus = CSmMapType::ValidationStatus::Validated; } // ---------------------------------- // // Return the manialink for goal anchor edition Text EditGoalAnchorManialink() { declare MLText = """