├── evidence-version.txt ├── .editorconfig ├── blacklist.xml ├── Media ├── Manialinks │ ├── pursuitpro-advert.xml │ └── PursuitUIExtension.xml ├── Characters │ ├── Pursuit.xml │ ├── Overrunning.xml │ └── GalaxyDefault.xml └── Settings │ ├── Pursuit.xml │ └── Galaxy.xml ├── update-feed.xml ├── README.md └── Scripts ├── Libs └── domino54 │ ├── WebLayers.Script.txt │ ├── PlayerList.Script.txt │ ├── Bindings.Script.txt │ ├── XMLGenerator.Script.txt │ ├── CustomNames.Script.txt │ ├── SplitScreenLib.Script.txt │ ├── TrackMania │ ├── CylinderHitbox.Script.txt │ └── Checkpoints.Script.txt │ ├── Blacklist.Script.txt │ ├── Openplanet.Script.txt │ ├── MarkersPro.Script.txt │ ├── EditAnchors.Script.txt │ ├── ServerAuth.Script.txt │ └── LeaderDisplay.Script.txt ├── ManiaApps └── GalaxyTitles │ └── MenuController.Script.txt ├── MapTypes ├── ShootMania │ ├── GiantHuntArena.Script.txt │ ├── PayloadRaceArena.Script.txt │ ├── TeamMeleeArena.Script.txt │ ├── SpeedBallV2Arena.Script.txt │ ├── HordeArena.Script.txt │ ├── JailbreakV2Arena.Script.txt │ ├── PayloadArena.Script.txt │ ├── GoldenDunkV2Arena.Script.txt │ └── HungerGamesV2Arena.Script.txt └── TrackMania │ ├── PursuitArena.Script.txt │ └── GoalHuntArena.Script.txt ├── Modes └── ShootMania │ ├── InvasionSolo.Script.txt │ └── CustomWeapons+.Script.txt └── EditorPlugins └── AutoGhostBlocks.Script.txt /evidence-version.txt: -------------------------------------------------------------------------------- 1 | 2016-10-17 2 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | indent_style = tab 2 | indent_size = 4 3 | -------------------------------------------------------------------------------- /blacklist.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Media/Manialinks/pursuitpro-advert.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /update-feed.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 43 | 44 | """; 45 | } 46 | 47 | Void Show() { 48 | if (!G_LibTeamsInfo_IsLibraryLoaded) return; 49 | Layers::Attach(C_LibTeamsInfo_LibUILayerId); 50 | } 51 | 52 | Void Hide() { 53 | if (!G_LibTeamsInfo_IsLibraryLoaded) return; 54 | Layers::Detach(C_LibTeamsInfo_LibUILayerId); 55 | } 56 | 57 | Void SetVisibility(Boolean _IsVisible) { 58 | if (!G_LibTeamsInfo_IsLibraryLoaded) return; 59 | if (_IsVisible) Show(); 60 | else Hide(); 61 | } 62 | 63 | Void OpponentsArmorVisibility(Boolean _IsVisible) { 64 | if (!G_LibTeamsInfo_IsLibraryLoaded) return; 65 | declare netwrite Boolean Net_LibTeamsInfo_ShowOpponentsArmor for Teams[0]; 66 | Net_LibTeamsInfo_ShowOpponentsArmor = _IsVisible; 67 | } 68 | 69 | Void Unload() { 70 | Hide(); 71 | Layers::Destroy(C_LibTeamsInfo_LibUILayerId); 72 | G_LibTeamsInfo_IsLibraryLoaded = False; 73 | } 74 | 75 | Void Load() { 76 | Unload(); 77 | G_LibTeamsInfo_IsLibraryLoaded = True; 78 | 79 | Layers::Create(C_LibTeamsInfo_LibUILayerId, Private_CreateManialinkTeamsInfo()); 80 | OpponentsArmorVisibility(False); 81 | } 82 | -------------------------------------------------------------------------------- /Scripts/Libs/domino54/Bindings.Script.txt: -------------------------------------------------------------------------------- 1 | // -------------------------------------- // 2 | // LIBRARY BINDINGS by domino54 // 3 | // script version: 2017-10-09 // 4 | // -------------------------------------- // 5 | 6 | /** 7 | * A simple library used to let users customize 8 | * keyboard inputs of custom game interfaces. 9 | */ 10 | 11 | #Const Version "2017-10-09" 12 | #Const ScriptName "Libs/domino54/Bindings.Script.txt" 13 | 14 | // ---------------------------------- // 15 | // Functons 16 | // ---------------------------------- // 17 | 18 | // ---------------------------------- // 19 | // Public 20 | // ---------------------------------- // 21 | 22 | // ---------------------------------- // 23 | /** Return the version number of the script. 24 | * 25 | * @return The version number of the script. 26 | */ 27 | Text GetScriptVersion() { return Version; } 28 | 29 | // ---------------------------------- // 30 | /** Return the name of the script. 31 | * 32 | * @return The name of the script. 33 | */ 34 | Text GetScriptName() { return ScriptName; } 35 | 36 | // ---------------------------------- // 37 | /** Get the functions of Bindings library. 38 | * 39 | * @return The library functions. 40 | */ 41 | Text Functions() { 42 | return """ 43 | // ---------------------------------- // 44 | /** Get the currently set key for an input. 45 | * 46 | * @param _BindingId Id of the input to get key. 47 | * @param _DefaultKey Default key of the input. 48 | * 49 | * @return Key used by the input. 50 | */ 51 | Text Bindings_GetKey(Text _BindingId, Text _DefaultKey) { 52 | if (LocalUser == Null || _BindingId == "") return _DefaultKey; 53 | 54 | declare persistent Text[Text] Persistent_LibBindings_UserBindings for LocalUser; 55 | if (!Persistent_LibBindings_UserBindings.existskey(_BindingId)) return _DefaultKey; 56 | return Persistent_LibBindings_UserBindings[_BindingId]; 57 | } 58 | 59 | // ---------------------------------- // 60 | /** Set a new key for an input. 61 | * 62 | * @param _BindingId Id of the input to set new key. 63 | * @param _NewKeyName Name of the new key to set. 64 | * @param _DefaultKey Default key of the input. 65 | */ 66 | Void Bindings_SetKey(Text _BindingId, Text _NewKeyName, Text _DefaultKey) { 67 | if (LocalUser == Null || _BindingId == "") return; 68 | 69 | declare persistent Text[Text] Persistent_LibBindings_UserBindings for LocalUser; 70 | if (_NewKeyName != _DefaultKey) Persistent_LibBindings_UserBindings[_BindingId] = _NewKeyName; 71 | else { 72 | declare Removed = Persistent_LibBindings_UserBindings.removekey(_BindingId); 73 | } 74 | } 75 | 76 | // ---------------------------------- // 77 | /** Return True, when certain input is used. 78 | * 79 | * @param _BindingId Id of the input to listen to. 80 | * @param _DefaultKey Default key of the input. 81 | */ 82 | Boolean Bindings_Listener(Text _BindingId, Text _DefaultKey) { 83 | if (LocalUser == Null || IsInGameMenuDisplayed || _BindingId == "" || PendingEvents.count <= 0) return False; 84 | 85 | foreach (Event in PendingEvents) { 86 | if (Event.Type != CMlEvent::Type::KeyPress) continue; 87 | if (Event.KeyName == Bindings_GetKey(_BindingId, _DefaultKey)) return True; 88 | } 89 | return False; 90 | } 91 | """; 92 | } -------------------------------------------------------------------------------- /Scripts/MapTypes/ShootMania/GiantHuntArena.Script.txt: -------------------------------------------------------------------------------- 1 | // -------------------------------------- // 2 | // GIANT HUNT ARENA by domino54 // 3 | // script version: 2017-05-08 // 4 | // -------------------------------------- // 5 | 6 | #RequireContext CSmMapType 7 | 8 | #Const Version "2017-05-08" 9 | #Const MapTypeVersion 1 10 | #Const ScriptName "MapTypes/ShootMania/GiantHuntArena.Script.txt" 11 | 12 | #Include "TextLib" as TL 13 | #Include "Libs/Nadeo/Anchor.Script.txt" as Anchor 14 | #Include "Libs/Nadeo/MapType.Script.txt" as MapType 15 | // Custom libraries 16 | #Include "Libs/domino54/EditAnchors.Script.txt" as EditAnchors 17 | 18 | // ---------------------------------- // 19 | // Constants 20 | // ---------------------------------- // 21 | #Const C_Rules "$<%11.$> Place at least one one SpawnHunters.\n$<%12.$> Place at least one SpawnGiant.\n$<%13.$> Place a bunch of Checkpoints as targets for the Giant. Goals are also accepted." 22 | 23 | // ---------------------------------- // 24 | // Functions 25 | // ---------------------------------- // 26 | 27 | // ---------------------------------- // 28 | /// Initialize the anchors 29 | Void InitAnchors() { 30 | foreach (Anchor in AnchorData) { 31 | if (Anchor.DefaultTag == "Spawn") { 32 | if (Anchor.Tag != "SpawnHunters" && Anchor.Tag != "SpawnGiant") Anchor.Tag = "SpawnHunters"; 33 | } 34 | else Anchor.Tag = Anchor.DefaultTag; 35 | Anchor.Order = Anchor.DefaultOrder; 36 | } 37 | } 38 | 39 | // ---------------------------------- // 40 | /// Check if the map is valid 41 | Void UpdateValidability() { 42 | ValidationStatus = CSmMapType::ValidationStatus::NotValidable; 43 | InitAnchors(); 44 | Anchor::UpdateAnchorCounts(); 45 | 46 | if (!Anchor::HasAtLeastOneAnchor("SpawnHunters", 0, _("You must place at least one \"SpawnHunters\"!"))) return; 47 | if (!Anchor::HasAtLeastOneAnchor("SpawnGiant", 0, _("You must place at least one \"SpawnGiant\"!"))) return; 48 | if (!Anchor::HasAtLeastOneAnchor("Checkpoint", 0, _("You must place at least one \"Checkpoint\"!"))) return; 49 | 50 | // Map is valid 51 | ValidationStatus = CSmMapType::ValidationStatus::Validated; 52 | } 53 | 54 | // ---------------------------------- // 55 | /// Show the anchor edition manialink 56 | Void EditAnchorData(Ident _EditedAnchorDataId) { 57 | if (_EditedAnchorDataId == NullId) return; 58 | UpdateValidability(); 59 | EditAnchors::EditAnchor(_EditedAnchorDataId); 60 | UpdateValidability(); 61 | } 62 | 63 | // ---------------------------------- // 64 | // Main 65 | // ---------------------------------- // 66 | main() { 67 | MapType::SetVersion(MapTypeVersion); 68 | UpdateValidability(); 69 | CustomEditAnchorData = True; 70 | 71 | EditAnchors::SetRulesText(TL::Compose(C_Rules, "$o$070")); 72 | EditAnchors::SetAvailableTags(["Spawn" => ["SpawnHunters", "SpawnGiant"]]); 73 | 74 | // ---------------------------------- // 75 | // Yield 76 | // ---------------------------------- // 77 | while (True) { 78 | yield; 79 | 80 | // ---------------------------------- // 81 | // Events management 82 | foreach (Event in PendingEvents) { 83 | switch (Event.Type) { 84 | case CPluginEvent::Type::MapModified : UpdateValidability(); 85 | case CPluginEvent::Type::EditAnchor : EditAnchorData(Event.EditedAnchorDataId); 86 | } 87 | } 88 | } 89 | } -------------------------------------------------------------------------------- /Scripts/MapTypes/ShootMania/PayloadRaceArena.Script.txt: -------------------------------------------------------------------------------- 1 | // -------------------------------------- // 2 | // PAYLOAD RACE ARENA by domino54 // 3 | // script version: 2017-08-22 // 4 | // -------------------------------------- // 5 | 6 | #RequireContext CSmMapType 7 | 8 | #Const Version "2017-08-22" 9 | #Const MapTypeVersion 1 10 | #Const ScriptName "PayloadRaceArena.Script.txt" 11 | 12 | #Include "TextLib" as TL 13 | #Include "Libs/Nadeo/Anchor.Script.txt" as Anchor 14 | #Include "Libs/Nadeo/MapType.Script.txt" as MapType 15 | // Custom libraries 16 | #Include "Libs/domino54/EditAnchors.Script.txt" as EditAnchors 17 | 18 | // ---------------------------------- // 19 | // Constants 20 | // ---------------------------------- // 21 | #Const C_Rules "$<%11.$> Place exactly one Spawn #1 and one Spawn #2.\n$<%12.$> Place one Goal #1 and one Goal #2.\n$<%13.$> Place exactly one Payload #1 and Payload #2 bot paths, connecting area near Spawn with the Goal. Bot paths have to be the same length." 22 | 23 | // ---------------------------------- // 24 | // Functions 25 | // ---------------------------------- // 26 | 27 | // ---------------------------------- // 28 | /// Initialize the anchors 29 | Void InitAnchors() { 30 | foreach (Anchor in AnchorData) { 31 | if (Anchor.DefaultTag == "Spawn") { 32 | if (Anchor.Tag != "Spawn") Anchor.Tag = Anchor.DefaultTag; 33 | if (Anchor.Order != 1 && Anchor.Order != 2) Anchor.Order = 1; 34 | } else if (Anchor.DefaultTag == "Goal" || Anchor.DefaultTag == "Checkpoint") { 35 | if (Anchor.Tag != "Goal") Anchor.Tag = "Goal"; 36 | if (Anchor.Order != 1 && Anchor.Order != 2) Anchor.Order = 1; 37 | } else { 38 | Anchor.Tag = Anchor.DefaultTag; 39 | Anchor.Order = Anchor.DefaultOrder; 40 | } 41 | } 42 | } 43 | 44 | // ---------------------------------- // 45 | /// Check if the map is valid 46 | Void UpdateValidability() { 47 | ValidationStatus = CSmMapType::ValidationStatus::NotValidable; 48 | InitAnchors(); 49 | Anchor::UpdateAnchorCounts(); 50 | 51 | // ---------------------------------- // 52 | // Check if map has exactly one landmark type per team 53 | for (I, 1, 2) { 54 | if ( 55 | !Anchor::HasExactlyOneAnchor("Spawn", I, TL::Compose(_("You must place exactly one Spawn #%1"), ""^I)) || 56 | !Anchor::HasExactlyOneAnchor("Goal", I, TL::Compose(_("You must place exactly one Goal #%1"), ""^I)) 57 | ) return; 58 | } 59 | 60 | // Map is valid 61 | ValidationStatus = CSmMapType::ValidationStatus::Validated; 62 | } 63 | 64 | // ---------------------------------- // 65 | /// Show the anchor edition manialink 66 | Void EditAnchorData(Ident _EditedAnchorDataId) { 67 | if (_EditedAnchorDataId == NullId) return; 68 | UpdateValidability(); 69 | EditAnchors::EditAnchor(_EditedAnchorDataId); 70 | UpdateValidability(); 71 | } 72 | 73 | // ---------------------------------- // 74 | // Main 75 | // ---------------------------------- // 76 | main() { 77 | MapType::SetVersion(MapTypeVersion); 78 | UpdateValidability(); 79 | CustomEditAnchorData = True; 80 | 81 | EditAnchors::SetRulesText(TL::Compose(C_Rules, "$o$070")); 82 | EditAnchors::SetAvailableTags([ 83 | "Spawn" => ["Spawn #1", "Spawn #2"], 84 | "Goal" => ["Goal #1", "Goal #2"], 85 | "Checkpoint" => ["Goal #1", "Goal #2"] 86 | ]); 87 | 88 | // ---------------------------------- // 89 | // Yield 90 | // ---------------------------------- // 91 | while (True) { 92 | yield; 93 | 94 | // ---------------------------------- // 95 | // Events management 96 | foreach (Event in PendingEvents) { 97 | switch (Event.Type) { 98 | case CPluginEvent::Type::MapModified : UpdateValidability(); 99 | case CPluginEvent::Type::EditAnchor : EditAnchorData(Event.EditedAnchorDataId); 100 | } 101 | } 102 | } 103 | } -------------------------------------------------------------------------------- /Scripts/MapTypes/TrackMania/PursuitArena.Script.txt: -------------------------------------------------------------------------------- 1 | // -------------------------------------- // 2 | // PURSUIT TM ARENA by domino54 // 3 | // script version: 2018-04-08 // 4 | // -------------------------------------- // 5 | 6 | #RequireContext CTmMapType 7 | 8 | #Const Version "2018-04-08" 9 | #Const MapTypeVersion 1 10 | #Const ScriptName "MapTypes/TrackMania/PursuitArena.Script.txt" 11 | 12 | #Include "MathLib" as ML 13 | #Include "TextLib" as TL 14 | #Include "Libs/Nadeo/Anchor.Script.txt" as Anchor 15 | #Include "Libs/Nadeo/MapType.Script.txt" as MapType 16 | #Include "Libs/domino54/EditAnchors.Script.txt" as EditAnchors 17 | #Include "Libs/domino54/TrackMania/OffZoneEdit.Script.txt" as OffZone 18 | 19 | #Const C_Rules "$<%11.$> Place exactly one StartFinish.\n$<%12.$> Place at least one Checkpoint.\n$<%13.$>Place exactly one Podium." 20 | 21 | // ---------------------------------- // 22 | // Functions 23 | // ---------------------------------- // 24 | 25 | // ---------------------------------- // 26 | /// Initialize the anchors 27 | Void InitAnchors() { 28 | foreach (Anchor in AnchorData) { 29 | Anchor.Order = Anchor.DefaultOrder; 30 | Anchor.Tag = Anchor.DefaultTag; 31 | } 32 | } 33 | 34 | // ---------------------------------- // 35 | /// Check if the map is valid 36 | Void UpdateValidability() { 37 | ValidationStatus = CSmMapType::ValidationStatus::NotValidable; 38 | InitAnchors(); 39 | Anchor::UpdateAnchorCounts(); 40 | 41 | // ---------------------------------- // 42 | // Check if the map has spawn and checkpoints 43 | if (!Anchor::HasExactlyOneAnchor("StartFinish", 0, _("You must place exactly one StartFinish."))) return; 44 | if (!Anchor::HasAtLeastOneAnchor("Checkpoint", 0, _("You must place at least one Checkpoint."))) return; 45 | 46 | declare HasPodium = False; 47 | foreach (Block in Blocks) { 48 | if (Block.BlockModel == Null || TL::Find("Podium", Block.BlockModel.Name, False, False)) continue; 49 | HasPodium = True; 50 | } 51 | if (!HasPodium) return; 52 | 53 | // Map is valid 54 | ValidationStatus = CSmMapType::ValidationStatus::Validated; 55 | } 56 | 57 | // ---------------------------------- // 58 | /// Show the anchor edition manialink 59 | Void EditAnchorData(Ident _EditedAnchorDataId) { 60 | if (_EditedAnchorDataId == NullId) return; 61 | UpdateValidability(); 62 | EditAnchors::EditAnchor(_EditedAnchorDataId); 63 | UpdateValidability(); 64 | } 65 | 66 | // ---------------------------------- // 67 | // Main 68 | // ---------------------------------- // 69 | main() { 70 | MapType::SetVersion(MapTypeVersion); 71 | OffZone::Load(); 72 | 73 | UpdateValidability(); 74 | CustomEditAnchorData = True; 75 | 76 | EditAnchors::SetRulesText(TL::Compose(C_Rules, "$o$070")); 77 | EditAnchors::SetAvailableTags(["Checkpoint" => ["Checkpoint", "Goal"]]); 78 | 79 | // ---------------------------------- // 80 | // Yield 81 | // ---------------------------------- // 82 | while (True) { 83 | yield; 84 | 85 | OffZone::Loop(); 86 | 87 | // "Validate" the map 88 | Map.TMObjective_AuthorTime = 1; 89 | Map.TMObjective_GoldTime = 1; 90 | Map.TMObjective_SilverTime = 1; 91 | Map.TMObjective_BronzeTime = 1; 92 | Map.TMObjective_NbLaps = 1; 93 | Map.TMObjective_IsLapRace = False; 94 | Map.ObjectiveTextAuthor = "N/A"; 95 | Map.ObjectiveTextGold = "N/A"; 96 | Map.ObjectiveTextSilver = "N/A"; 97 | Map.ObjectiveTextBronze = "N/A"; 98 | 99 | // ---------------------------------- // 100 | // Events management 101 | foreach (Event in PendingEvents) { 102 | switch (Event.Type) { 103 | case CPluginEvent::Type::EditAnchor : EditAnchorData(Event.EditedAnchorDataId); 104 | case CPluginEvent::Type::StartValidation : { } 105 | } 106 | UpdateValidability(); 107 | } 108 | } 109 | } -------------------------------------------------------------------------------- /Scripts/MapTypes/ShootMania/TeamMeleeArena.Script.txt: -------------------------------------------------------------------------------- 1 | // -------------------------------------- // 2 | // TEAM MELEE ARENA by domino54 // 3 | // script version: 2016-07-01 // 4 | // -------------------------------------- // 5 | 6 | #RequireContext CSmMapType 7 | 8 | #Const Version "2016-07-01" 9 | #Const MapTypeVersion 1 10 | #Const ScriptName "TeamMeleeArena.Script.txt" 11 | 12 | #Include "TextLib" as TL 13 | #Include "Libs/Nadeo/Anchor.Script.txt" as Anchor 14 | #Include "Libs/Nadeo/MapType.Script.txt" as MapType 15 | // Custom libraries 16 | #Include "Libs/domino54/EditAnchors.Script.txt" as EditAnchors 17 | 18 | // ---------------------------------- // 19 | // Constants 20 | // ---------------------------------- // 21 | #Const C_Rules "$<%11.$> Place at least one Spawn #1 and one Spawn #2.\n$<%12.$> Number of spawns must remain the same for both sides." 22 | 23 | // ---------------------------------- // 24 | // Functions 25 | // ---------------------------------- // 26 | 27 | // ---------------------------------- // 28 | /// Initialize the anchors 29 | Void InitAnchors() { 30 | foreach (Anchor in AnchorData) { 31 | if (Anchor.DefaultTag == "Spawn") { 32 | if (Anchor.Tag != "Spawn") Anchor.Tag = Anchor.DefaultTag; 33 | if (Anchor.Order != 1 && Anchor.Order != 2) Anchor.Order = 1; 34 | } else { 35 | Anchor.Tag = Anchor.DefaultTag; 36 | Anchor.Order = Anchor.DefaultOrder; 37 | } 38 | } 39 | } 40 | 41 | // ---------------------------------- // 42 | /// Check if the map is valid 43 | Void UpdateValidability() { 44 | ValidationStatus = CSmMapType::ValidationStatus::NotValidable; 45 | InitAnchors(); 46 | Anchor::UpdateAnchorCounts(); 47 | 48 | // ---------------------------------- // 49 | // Get the amount of Gates 50 | declare ClansNbSpawns = [1 => 0, 2 => 0]; 51 | foreach (Data in AnchorData) 52 | if (Data.Tag == "Spawn" && ClansNbSpawns.existskey(Data.Order)) ClansNbSpawns[Data.Order] += 1; 53 | 54 | // ---------------------------------- // 55 | // Check if map has at least one Spawn per team 56 | for (I, 1, 2) { 57 | if (!Anchor::HasAtLeastOneAnchor("Spawn", I, TL::Compose(_("You must place at least one Spawn #%1"), ""^I))) return; 58 | } 59 | 60 | // ---------------------------------- // 61 | // Gates amount doesn't match 62 | if (ClansNbSpawns[1] != ClansNbSpawns[2]) { 63 | ValidationStatus = CSmMapType::ValidationStatus::NotValidable; 64 | ValidabilityRequirementsMessage = _("You must place the same number of Spawn #1 and Spawn #2"); 65 | return; 66 | } 67 | 68 | // Map is valid 69 | ValidationStatus = CSmMapType::ValidationStatus::Validated; 70 | } 71 | 72 | 73 | // ---------------------------------- // 74 | /// Show the anchor edition manialink 75 | Void EditAnchorData(Ident _EditedAnchorDataId) { 76 | if (_EditedAnchorDataId == NullId) return; 77 | UpdateValidability(); 78 | EditAnchors::EditAnchor(_EditedAnchorDataId); 79 | UpdateValidability(); 80 | } 81 | 82 | // ---------------------------------- // 83 | // Main 84 | // ---------------------------------- // 85 | main() { 86 | MapType::SetVersion(MapTypeVersion); 87 | UpdateValidability(); 88 | CustomEditAnchorData = True; 89 | 90 | EditAnchors::SetRulesText(TL::Compose(C_Rules, "$o$070")); 91 | EditAnchors::SetAvailableTags(["Spawn" => ["Spawn #1", "Spawn #2"]]); 92 | 93 | // ---------------------------------- // 94 | // Yield 95 | // ---------------------------------- // 96 | while (True) { 97 | yield; 98 | 99 | // ---------------------------------- // 100 | // Events management 101 | foreach (Event in PendingEvents) { 102 | switch (Event.Type) { 103 | case CPluginEvent::Type::MapModified : UpdateValidability(); 104 | case CPluginEvent::Type::EditAnchor : EditAnchorData(Event.EditedAnchorDataId); 105 | } 106 | } 107 | } 108 | } -------------------------------------------------------------------------------- /Scripts/MapTypes/ShootMania/SpeedBallV2Arena.Script.txt: -------------------------------------------------------------------------------- 1 | // --------------------------------------------- // 2 | // SPEEDBALL V2 ARENA by domino54 // 3 | // script version: 2017-08-22 // 4 | // original concept by Awpteamoose | Steeffeen // 5 | // --------------------------------------------- // 6 | 7 | #RequireContext CSmMapType 8 | 9 | #Const Version "2017-08-22" 10 | #Const MapTypeVersion 1 11 | #Const ScriptName "SpeedBallV2Arena.Script.txt" 12 | 13 | #Include "TextLib" as TL 14 | #Include "Libs/Nadeo/Anchor.Script.txt" as Anchor 15 | #Include "Libs/Nadeo/MapType.Script.txt" as MapType 16 | // Custom libraries 17 | #Include "Libs/domino54/EditAnchors.Script.txt" as EditAnchors 18 | 19 | // ---------------------------------- // 20 | // Constants 21 | // ---------------------------------- // 22 | #Const C_Rules "$<%11.$> Place exactly one Spawn #1 and one Spawn #2.\n$<%12.$> Place one Goal #1 and one Goal #2. Ball will be delivered by player to one of these.\n$<%13.$> Place exactly one Checkpoint, where ball appears when round starts." 23 | 24 | // ---------------------------------- // 25 | // Functions 26 | // ---------------------------------- // 27 | 28 | // ---------------------------------- // 29 | /// Initialize the anchors 30 | Void InitAnchors() { 31 | foreach (Anchor in AnchorData) { 32 | if (Anchor.DefaultTag == "Spawn") { 33 | if (Anchor.Tag != "Spawn") Anchor.Tag = Anchor.DefaultTag; 34 | if (Anchor.Order != 1 && Anchor.Order != 2) Anchor.Order = 1; 35 | } else if (Anchor.DefaultTag == "Goal" || Anchor.DefaultTag == "Checkpoint") { 36 | if (Anchor.Tag != "Goal" && Anchor.Tag != "Checkpoint") Anchor.Tag = Anchor.DefaultTag; 37 | if (Anchor.Tag == "Goal" && Anchor.Order != 1 && Anchor.Order != 2) Anchor.Order = 1; 38 | if (Anchor.Tag == "Checkpoint" && Anchor.Order != 0) Anchor.Order = 0; 39 | } else { 40 | Anchor.Tag = Anchor.DefaultTag; 41 | Anchor.Order = Anchor.DefaultOrder; 42 | } 43 | } 44 | } 45 | 46 | // ---------------------------------- // 47 | /// Check if the map is valid 48 | Void UpdateValidability() { 49 | ValidationStatus = CSmMapType::ValidationStatus::NotValidable; 50 | InitAnchors(); 51 | Anchor::UpdateAnchorCounts(); 52 | 53 | // ---------------------------------- // 54 | // Check if map has exactly one landmark type per team 55 | for (I, 1, 2) { 56 | if ( 57 | !Anchor::HasExactlyOneAnchor("Spawn", I, TL::Compose(_("You must place exactly one Spawn #%1"), ""^I)) || 58 | !Anchor::HasExactlyOneAnchor("Goal", I, TL::Compose(_("You must place exactly one Goal #%1"), ""^I)) 59 | ) return; 60 | } 61 | if (!Anchor::HasExactlyOneAnchor("Checkpoint", 0, _("You must place exactly one Checkpoint"))) return; 62 | 63 | // Map is valid 64 | ValidationStatus = CSmMapType::ValidationStatus::Validated; 65 | } 66 | 67 | // ---------------------------------- // 68 | /// Show the anchor edition manialink 69 | Void EditAnchorData(Ident _EditedAnchorDataId) { 70 | if (_EditedAnchorDataId == NullId) return; 71 | UpdateValidability(); 72 | EditAnchors::EditAnchor(_EditedAnchorDataId); 73 | UpdateValidability(); 74 | } 75 | 76 | // ---------------------------------- // 77 | // Main 78 | // ---------------------------------- // 79 | main() { 80 | MapType::SetVersion(MapTypeVersion); 81 | UpdateValidability(); 82 | CustomEditAnchorData = True; 83 | 84 | EditAnchors::SetRulesText(TL::Compose(C_Rules, "$o$070")); 85 | EditAnchors::SetAvailableTags([ 86 | "Spawn" => ["Spawn #1", "Spawn #2"], 87 | "Goal" => ["Goal #1", "Goal #2", "Checkpoint"], 88 | "Checkpoint" => ["Checkpoint", "Goal #1", "Goal #2"] 89 | ]); 90 | 91 | // ---------------------------------- // 92 | // Yield 93 | // ---------------------------------- // 94 | while (True) { 95 | yield; 96 | 97 | // ---------------------------------- // 98 | // Events management 99 | foreach (Event in PendingEvents) { 100 | switch (Event.Type) { 101 | case CPluginEvent::Type::MapModified : UpdateValidability(); 102 | case CPluginEvent::Type::EditAnchor : EditAnchorData(Event.EditedAnchorDataId); 103 | } 104 | } 105 | } 106 | } -------------------------------------------------------------------------------- /Scripts/Libs/domino54/XMLGenerator.Script.txt: -------------------------------------------------------------------------------- 1 | // -------------------------------------- // 2 | // XML DOCUMENT GENERATOR by domino54 // 3 | // script version: 2015-12-12 // 4 | // -------------------------------------- // 5 | 6 | #Const Version "2015-12-12" 7 | #Const ScriptName "XMLGenerator.Script.txt" 8 | 9 | /** 10 | * This library allows to generate simple XML documents 11 | * with custom created nodes. 12 | */ 13 | 14 | // ---------------------------------- // 15 | // Constants 16 | // ---------------------------------- // 17 | #Const C_LibXMLGenerator_DefaultRootName "document" ///< Default name of the document root 18 | 19 | // ---------------------------------- // 20 | // Global variables 21 | // ---------------------------------- // 22 | declare Text G_LibXMLGenerator_RootName; 23 | declare Text G_LibXMLGenerator_RootProperties; 24 | declare Text[] G_LibXMLGenerator_CreatedNodes; 25 | 26 | // ---------------------------------- // 27 | // Functions 28 | // ---------------------------------- // 29 | 30 | // ---------------------------------- // 31 | // Public 32 | // ---------------------------------- // 33 | 34 | // ---------------------------------- // 35 | /** Return the version number of the script 36 | * 37 | * @return The version number of the script 38 | */ 39 | Text GetScriptVersion() { 40 | return Version; 41 | } 42 | 43 | // ---------------------------------- // 44 | /** Return the name of the script 45 | * 46 | * @return The name of the script 47 | */ 48 | Text GetScriptName() { 49 | return ScriptName; 50 | } 51 | 52 | // ---------------------------------- // 53 | /// Reset everything 54 | Void Clear() { 55 | G_LibXMLGenerator_RootName = C_LibXMLGenerator_DefaultRootName; 56 | G_LibXMLGenerator_RootProperties = ""; 57 | G_LibXMLGenerator_CreatedNodes.clear(); 58 | } 59 | 60 | // ---------------------------------- // 61 | /** Set the root name 62 | * 63 | * @param _RootName The name of the root 64 | */ 65 | Void SetRootName(Text _RootName) { 66 | if (_RootName != "") G_LibXMLGenerator_RootName = _RootName; 67 | } 68 | 69 | // ---------------------------------- // 70 | /** Set the root properties 71 | * 72 | * @param _RootProperties The root properties 73 | */ 74 | Void SetRootProperties(Text[Text] _RootProperties) { 75 | declare Root = ""; 76 | 77 | // Attach root properties 78 | if (_RootProperties.count > 0) foreach (Property => Value in _RootProperties) Root ^= " "^Property^"=\""^Value^"\""; 79 | 80 | // Save properties 81 | G_LibXMLGenerator_RootProperties = Root; 82 | } 83 | 84 | // ---------------------------------- // 85 | /** Create root node 86 | * 87 | * @param _NodeName The name of the node 88 | * @param _NodeProperties The node properties 89 | * @param _NodeRawText The node raw text 90 | */ 91 | Void CreateNode(Text _NodeName, Text[Text] _NodeProperties, Text _NodeRawText) { 92 | if (_NodeName == "") return; 93 | declare Node = "<"^_NodeName; 94 | declare NodeIsClosed = (_NodeRawText == ""); 95 | 96 | // Attach node properties 97 | if (_NodeProperties.count > 0) foreach (Property => Value in _NodeProperties) Node ^= " "^Property^"=\""^Value^"\""; 98 | 99 | // Close node or insert raw text 100 | if (NodeIsClosed) Node ^= "/>"; 101 | else Node ^= ">"^_NodeRawText^""; 102 | 103 | // Save node 104 | G_LibXMLGenerator_CreatedNodes.add(Node); 105 | } 106 | 107 | // ---------------------------------- // 108 | /** Create the XML document file 109 | * 110 | * @return Complete document 111 | */ 112 | Text CreateDocument() { 113 | // XML file declaration 114 | declare Document = "\n"; 115 | 116 | // Get the root name 117 | declare RootName = G_LibXMLGenerator_RootName; 118 | if (G_LibXMLGenerator_RootName == "") RootName = C_LibXMLGenerator_DefaultRootName; 119 | Document ^= "<"^RootName^">\n"; 120 | 121 | // Insert nodes 122 | if (G_LibXMLGenerator_CreatedNodes.count > 0) { 123 | foreach (Node in G_LibXMLGenerator_CreatedNodes) Document ^= " "^Node^"\n"; 124 | } 125 | 126 | // Close document 127 | Document ^= ""; 128 | return Document; 129 | } -------------------------------------------------------------------------------- /Media/Settings/Pursuit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /Scripts/MapTypes/ShootMania/HordeArena.Script.txt: -------------------------------------------------------------------------------- 1 | #RequireContext CSmMapType 2 | #Include "Libs/Nadeo/Anchor.Script.txt" as Anchor 3 | #Include "TextLib" as TextLib 4 | 5 | ///////////////////////////////////// 6 | // CheckValidationStatus 7 | 8 | Void CheckValidationStatus() 9 | { 10 | ValidationStatus = CMapType::ValidationStatus::NotValidable; 11 | Anchor::UpdateAnchorCounts(); 12 | if( !Anchor::HasAtLeastOneAnchor("Goal", 0, _("You must place a Goal")) ) return; 13 | if( !Anchor::HasExactlyOneAnchor("Spawn", 0, _("You must place one Spawn")) ) return; 14 | //if( !Anchor::HasAtLeastOneAnchor("BotSpawn", 2, _("You must place a BotSpawn")) ) return; 15 | ValidationStatus = CMapType::ValidationStatus::Validated; 16 | } 17 | 18 | 19 | ///////////////////////////////////// 20 | // EditObjectives 21 | 22 | Void EditObjectives() 23 | { 24 | declare metadata Integer ObjectiveAuthor for Map; 25 | declare metadata Integer ObjectiveGold for Map; 26 | declare metadata Integer ObjectiveSilver for Map; 27 | declare metadata Integer ObjectiveBronze for Map; 28 | 29 | while(True) 30 | { 31 | ManialinkText = 32 | """ 33 | 34 | 35 |