Latest Neocron News and Information
- New test server patch #563 has been released to Vedeena
Difference between revisions of "Metadata:Mapping/Map.js"
From Neocron Wiki
Line 1: | Line 1: | ||
/* NC-Wiki Jquery File - Do not delete! */ | /* NC-Wiki Jquery File - Do not delete! */ | ||
+ | |||
+ | // Function to hide unsed map key elements | ||
+ | function hideMapKey(class) | ||
+ | { | ||
+ | // Check the map areas for the class | ||
+ | if ($kjq('area.'+class).length==0) | ||
+ | { | ||
+ | // Not found anything - so hide it on the map | ||
+ | $kjq('li.'+class+'_key').hide(); | ||
+ | } | ||
+ | } | ||
+ | |||
$kjq(document).ready(function($) | $kjq(document).ready(function($) | ||
Line 18: | Line 30: | ||
alwaysOn: false | alwaysOn: false | ||
}); | }); | ||
+ | // Dont hide map on the Template:Mapkey page | ||
+ | // Otherwise you cannot preview it! | ||
+ | // This will be improved to pickup the classes from the keymaps area | ||
+ | if (wgPageName!='Template:Mapkey) | ||
+ | { | ||
+ | hideMapKey('mapdefault'); | ||
+ | hideMapKey('map_outpost'); | ||
+ | hideMapKey('map_outpost_lab'); | ||
+ | hideMapKey('map_outpost_mine'); | ||
+ | hideMapKey('map_outpost_factory'); | ||
+ | hideMapKey('map_outpost_fortress'); | ||
+ | hideMapKey('map_outpost_uplink'); | ||
+ | hideMapKey('map_asg'); | ||
+ | hideMapKey('map_gogo'); | ||
+ | hideMapKey('map_genrep'); | ||
+ | hideMapKey('map_intereset'); | ||
+ | hideMapKey('map_cave'); | ||
+ | hideMapKey('map_city'); | ||
+ | hideMapKey('map_city_entrance'); | ||
+ | } | ||
// End of functions | // End of functions | ||
}); | }); |