Don't re-init Drone if already loaded

This commit is contained in:
walterhiggins 2013-01-06 19:57:47 +00:00
parent f72d7866a4
commit 42dec77d85

View file

@ -6,7 +6,7 @@ var global = this;
// //
// Please read the following section to understand what a Minecraft Drone can do. // Please read the following section to understand what a Minecraft Drone can do.
// //
var Drone = { var Drone = Drone || {
// //
// TLDNR; (Just read this if you're impatient) // TLDNR; (Just read this if you're impatient)
// ====== // ======
@ -248,6 +248,12 @@ var Drone = {
// There is no need to read any further unless you want to understand how the Drone object works. // There is no need to read any further unless you want to understand how the Drone object works.
// //
(function(){ (function(){
//
// don't want to declare object more than once
//
if (ScriptCraft.Drone){
return;
}
// //
// Drone Constructor // Drone Constructor
// //