Created
May 5, 2015 08:50
-
-
Save Aessi/c07d9ed6ca4a68e4ad7e to your computer and use it in GitHub Desktop.
MapType for lobby maps.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* MapType for Melee | |
* | |
* At least one spawn | |
*/ | |
#RequireContext CSmMapType | |
#Const Version "2014-10-07" | |
#Const MapTypeVersion 1 | |
#Const ScriptName "EliteArena.Script.txt" | |
#Include "Libs/Nadeo/Anchor.Script.txt" as Anchor | |
#Include "Libs/Nadeo/MapType.Script.txt" as MapType | |
// ---------------------------------- // | |
// Functions | |
// ---------------------------------- // | |
Void UpdateValidability() { | |
foreach(Anchor in AnchorData) { | |
Anchor.Tag = Anchor.DefaultTag; | |
Anchor.Order = Anchor.DefaultOrder; | |
} | |
Anchor::UpdateAnchorCounts(); | |
if (!Anchor::HasAtLeastOneAnchor("Spawn", 0, _("You must place at least one Spawn"))) return; | |
} | |
// ---------------------------------- // | |
// Main | |
// ---------------------------------- // | |
main() { | |
MapType::SetVersion(MapTypeVersion); | |
UpdateValidability(); | |
while (True) { | |
yield; | |
ManialinkText = ""; | |
foreach (Event in PendingEvents) { | |
if (Event.Type == CPluginEvent::Type::MapModified) { | |
UpdateValidability(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment