generateFairies param
This commit is contained in:
parent
6e7fdb2bc8
commit
7c6914f7b5
|
|
@ -15,6 +15,7 @@ if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod)
|
||||||
],
|
],
|
||||||
state: "solid",
|
state: "solid",
|
||||||
category: "fey",
|
category: "fey",
|
||||||
|
desc: "Like the other fairies, but with acid. <br/>To enable automatic fairy generation, set the generateFairies query parameter.",
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.oil_fairy = {
|
elements.oil_fairy = {
|
||||||
|
|
@ -27,6 +28,7 @@ if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod)
|
||||||
],
|
],
|
||||||
state: "solid",
|
state: "solid",
|
||||||
category: "fey",
|
category: "fey",
|
||||||
|
desc: "Like the other fairies, but with oil. <br/>To enable automatic fairy generation, set the generateFairies query parameter.",
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.honey_fairy = {
|
elements.honey_fairy = {
|
||||||
|
|
@ -39,6 +41,7 @@ if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod)
|
||||||
],
|
],
|
||||||
state: "solid",
|
state: "solid",
|
||||||
category: "fey",
|
category: "fey",
|
||||||
|
desc: "Like the other fairies, but with sweet honey. <br/>To enable automatic fairy generation, set the generateFairies query parameter.",
|
||||||
}
|
}
|
||||||
|
|
||||||
var excludedFairyElements = []
|
var excludedFairyElements = []
|
||||||
|
|
@ -90,6 +93,13 @@ if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod)
|
||||||
fairyIncludeRandom = false
|
fairyIncludeRandom = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Generate creepers
|
||||||
|
if(urlParams.get('generateFairies') !== null) { //if the variable exists at all
|
||||||
|
generateFairies = true
|
||||||
|
} else { //if it doesn't (and it returns null)
|
||||||
|
generateFairies = false
|
||||||
|
}
|
||||||
|
|
||||||
//Generator function
|
//Generator function
|
||||||
|
|
||||||
function tryJoin(stringOrArray,joiner) {
|
function tryJoin(stringOrArray,joiner) {
|
||||||
|
|
@ -258,11 +268,13 @@ if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod)
|
||||||
};
|
};
|
||||||
|
|
||||||
runAfterAutogen(function() {
|
runAfterAutogen(function() {
|
||||||
fairyArray = Object.keys(elements).filter(function(e) { //same criteria as spouts
|
if(generateFairies) {
|
||||||
return (defaultFairyCondition(e));
|
fairyArray = Object.keys(elements).filter(function(e) { //same criteria as spouts
|
||||||
});
|
return (defaultFairyCondition(e));
|
||||||
fairyArray.push(["rock","sand"]);
|
});
|
||||||
generateFairy(fairyArray,false);
|
fairyArray.push(["rock","sand"]);
|
||||||
|
generateFairy(fairyArray,false);
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
elements.spawn_random_fairy = {
|
elements.spawn_random_fairy = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue