runAfterLoad wrap
This commit is contained in:
parent
69df2c5dd4
commit
bff2eee10c
|
|
@ -71,116 +71,119 @@ elements.dry_ice.breakInto = "carbon_dioxide"
|
||||||
regularShinyThingArray = ["iron", "zinc", "tin", "nickel", "silver", "aluminum", "lead", "tungsten", "brass", "bronze", "sterling", "steel", "rose_gold", "solder", "gold", "pyrite"]
|
regularShinyThingArray = ["iron", "zinc", "tin", "nickel", "silver", "aluminum", "lead", "tungsten", "brass", "bronze", "sterling", "steel", "rose_gold", "solder", "gold", "pyrite"]
|
||||||
//pyrite is a mineral
|
//pyrite is a mineral
|
||||||
|
|
||||||
if(enabledMods.includes("mods/Neutronium Mod.js")) {
|
|
||||||
regularShinyThingArray.push("mythril")
|
|
||||||
regularShinyThingArray.push("mithril_mythril_alloy")
|
|
||||||
regularShinyThingArray.push("titanium")
|
|
||||||
regularShinyThingArray.push("ilitium")
|
|
||||||
}
|
|
||||||
if(enabledMods.includes("mods/fey_and_more.js")) {
|
|
||||||
regularShinyThingArray.push("mithril")
|
|
||||||
}
|
|
||||||
if(enabledMods.includes("mods/metals.js")) {
|
|
||||||
regularShinyThingArray.push("beryllium")
|
|
||||||
regularShinyThingArray.push("boron")
|
|
||||||
regularShinyThingArray.push("ruthenium")
|
|
||||||
regularShinyThingArray.push("rhodium")
|
|
||||||
regularShinyThingArray.push("palladium")
|
|
||||||
regularShinyThingArray.push("rhenium")
|
|
||||||
regularShinyThingArray.push("osmium")
|
|
||||||
regularShinyThingArray.push("iridium")
|
|
||||||
regularShinyThingArray.push("platinum")
|
|
||||||
regularShinyThingArray.push("frozen_mercury")
|
|
||||||
regularShinyThingArray.push("lithium")
|
|
||||||
if(elements.mercury) {
|
|
||||||
elements.mercury.breakInto = "mercury_gas"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(enabledMods.includes("mods/ketchup_mod.js")) {
|
|
||||||
regularShinyThingArray.push("ketchup_metal")
|
|
||||||
regularShinyThingArray.push("ketchup_gold")
|
|
||||||
elements.frozen_ketchup.breakInto = "ketchup_snow"
|
|
||||||
elements.frozen_poisoned_ketchup.breakInto = "poisoned_ketchup_snow"
|
|
||||||
}
|
|
||||||
|
|
||||||
if(enabledMods.includes("mods/randomness.js")) {
|
|
||||||
regularShinyThingArray.push("tungstensteel")
|
|
||||||
regularShinyThingArray.push("densinium")
|
|
||||||
}
|
|
||||||
|
|
||||||
if(enabledMods.includes("mods/fey_and_more.js")) {
|
|
||||||
regularShinyThingArray.push("mithril")
|
|
||||||
}
|
|
||||||
|
|
||||||
if(enabledMods.includes("mods/some_tf_liquids.js")) {
|
|
||||||
regularShinyThingArray.push("signalum")
|
|
||||||
}
|
|
||||||
|
|
||||||
if(enabledMods.includes("mods/laetium.js")) {
|
|
||||||
regularShinyThingArray.push("laetium")
|
|
||||||
}
|
|
||||||
|
|
||||||
elements.nitrogen_snow = {
|
|
||||||
color: "#efefef",
|
|
||||||
behavior: behaviors.POWDER,
|
|
||||||
category: "solids",
|
|
||||||
temp: -259.86,
|
|
||||||
tempHigh: -209.86,
|
|
||||||
stateHigh: "liquid_nitrogen",
|
|
||||||
state: "solid",
|
|
||||||
density: 850,
|
|
||||||
hidden: true,
|
|
||||||
}
|
|
||||||
|
|
||||||
elements.nitrogen_ice.breakInto = "nitrogen_snow"
|
|
||||||
|
|
||||||
runAfterLoad(function() {
|
runAfterLoad(function() {
|
||||||
for(i = 0; i < regularShinyThingArray.length; i++) {
|
if(enabledMods.includes("mods/Neutronium Mod.js")) {
|
||||||
var thing = regularShinyThingArray[i];
|
regularShinyThingArray.push("mythril")
|
||||||
if(elements[thing]) {
|
regularShinyThingArray.push("mithril_mythril_alloy")
|
||||||
elements[`${thing}_scrap`] = {
|
regularShinyThingArray.push("titanium")
|
||||||
color: elements[thing].color,
|
regularShinyThingArray.push("ilitium")
|
||||||
behavior: behaviors.POWDER,
|
}
|
||||||
tempHigh: elements[thing].tempHigh,
|
if(enabledMods.includes("mods/fey_and_more.js")) {
|
||||||
stateHigh: thing,
|
regularShinyThingArray.push("mithril")
|
||||||
category: "powders",
|
}
|
||||||
hidden: true,
|
if(enabledMods.includes("mods/metals.js")) {
|
||||||
density: elements[thing].density * 0.09,
|
regularShinyThingArray.push("beryllium")
|
||||||
conduct: elements[thing].conduct * 0.4,
|
regularShinyThingArray.push("boron")
|
||||||
movable: true,
|
regularShinyThingArray.push("ruthenium")
|
||||||
};
|
regularShinyThingArray.push("rhodium")
|
||||||
if(elements[thing].reactions) {
|
regularShinyThingArray.push("palladium")
|
||||||
elements[`${thing}_scrap`].reactions = elements[thing].reactions;
|
regularShinyThingArray.push("rhenium")
|
||||||
|
regularShinyThingArray.push("osmium")
|
||||||
|
regularShinyThingArray.push("iridium")
|
||||||
|
regularShinyThingArray.push("platinum")
|
||||||
|
regularShinyThingArray.push("frozen_mercury")
|
||||||
|
regularShinyThingArray.push("lithium")
|
||||||
|
regularShinyThingArray.push("niobium")
|
||||||
|
if(elements.mercury) {
|
||||||
|
elements.mercury.breakInto = "mercury_gas"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(enabledMods.includes("mods/ketchup_mod.js")) {
|
||||||
|
regularShinyThingArray.push("ketchup_metal")
|
||||||
|
regularShinyThingArray.push("ketchup_gold")
|
||||||
|
elements.frozen_ketchup.breakInto = "ketchup_snow"
|
||||||
|
elements.frozen_poisoned_ketchup.breakInto = "poisoned_ketchup_snow"
|
||||||
|
}
|
||||||
|
|
||||||
|
if(enabledMods.includes("mods/randomness.js")) {
|
||||||
|
regularShinyThingArray.push("tungstensteel")
|
||||||
|
regularShinyThingArray.push("densinium")
|
||||||
|
}
|
||||||
|
|
||||||
|
if(enabledMods.includes("mods/fey_and_more.js")) {
|
||||||
|
regularShinyThingArray.push("mithril")
|
||||||
|
}
|
||||||
|
|
||||||
|
if(enabledMods.includes("mods/some_tf_liquids.js")) {
|
||||||
|
regularShinyThingArray.push("signalum")
|
||||||
|
}
|
||||||
|
|
||||||
|
if(enabledMods.includes("mods/laetium.js")) {
|
||||||
|
regularShinyThingArray.push("laetium")
|
||||||
|
}
|
||||||
|
|
||||||
|
elements.nitrogen_snow = {
|
||||||
|
color: "#efefef",
|
||||||
|
behavior: behaviors.POWDER,
|
||||||
|
category: "solids",
|
||||||
|
temp: -259.86,
|
||||||
|
tempHigh: -209.86,
|
||||||
|
stateHigh: "liquid_nitrogen",
|
||||||
|
state: "solid",
|
||||||
|
density: 850,
|
||||||
|
hidden: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
elements.nitrogen_ice.breakInto = "nitrogen_snow"
|
||||||
|
|
||||||
|
runAfterLoad(function() {
|
||||||
|
for(i = 0; i < regularShinyThingArray.length; i++) {
|
||||||
|
var thing = regularShinyThingArray[i];
|
||||||
|
if(elements[thing]) {
|
||||||
|
elements[`${thing}_scrap`] = {
|
||||||
|
color: elements[thing].color,
|
||||||
|
behavior: behaviors.POWDER,
|
||||||
|
tempHigh: elements[thing].tempHigh,
|
||||||
|
stateHigh: thing,
|
||||||
|
category: "powders",
|
||||||
|
hidden: true,
|
||||||
|
density: elements[thing].density * 0.09,
|
||||||
|
conduct: elements[thing].conduct * 0.4,
|
||||||
|
movable: true,
|
||||||
|
};
|
||||||
|
if(elements[thing].reactions) {
|
||||||
|
elements[`${thing}_scrap`].reactions = elements[thing].reactions;
|
||||||
|
};
|
||||||
|
elements[thing].breakInto = `${thing}_scrap`;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
if(enabledMods.includes("mods/randomness.js")) {
|
||||||
|
elements.acid.ignore.push("densinium_scrap")
|
||||||
|
elements.densinium_scrap.hardness = 0.99
|
||||||
|
}
|
||||||
|
if(enabledMods.includes("mods/metals.js")) {
|
||||||
|
elements.lithium_scrap.tick = function(pixel) {
|
||||||
|
tryTarnish(pixel,"lithium_oxide",0.021)
|
||||||
|
if(pixel.temp >= 178) {
|
||||||
|
pixel.burning = true;
|
||||||
|
pixel.burnStart = pixelTicks;
|
||||||
};
|
};
|
||||||
elements[thing].breakInto = `${thing}_scrap`;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
if(enabledMods.includes("mods/randomness.js")) {
|
|
||||||
elements.acid.ignore.push("densinium_scrap")
|
|
||||||
elements.densinium_scrap.hardness = 0.99
|
|
||||||
}
|
|
||||||
if(enabledMods.includes("mods/metals.js")) {
|
|
||||||
elements.lithium_scrap.tick = function(pixel) {
|
|
||||||
tryTarnish(pixel,"lithium_oxide",0.021)
|
|
||||||
if(pixel.temp >= 178) {
|
|
||||||
pixel.burning = true;
|
|
||||||
pixel.burnStart = pixelTicks;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
if(enabledMods.includes("mods/laetium.js")) {
|
||||||
if(enabledMods.includes("mods/laetium.js")) {
|
elements.laetium_scrap.tick = function(pixel) {
|
||||||
elements.laetium_scrap.tick = function(pixel) {
|
neighbors = [[-1,0],[0,-1],[1,0],[0,1]]
|
||||||
neighbors = [[-1,0],[0,-1],[1,0],[0,1]]
|
for(i = 0; i < neighbors.length; i++) {
|
||||||
for(i = 0; i < neighbors.length; i++) {
|
if(!isEmpty(pixel.x+neighbors[i][0],pixel.y+neighbors[i][1],true)) {
|
||||||
if(!isEmpty(pixel.x+neighbors[i][0],pixel.y+neighbors[i][1],true)) {
|
if(elements[pixelMap[pixel.x+neighbors[i][0]][pixel.y+neighbors[i][1]].element].category) {
|
||||||
if(elements[pixelMap[pixel.x+neighbors[i][0]][pixel.y+neighbors[i][1]].element].category) {
|
if(elements[pixelMap[pixel.x+neighbors[i][0]][pixel.y+neighbors[i][1]].element].category == "cum") {
|
||||||
if(elements[pixelMap[pixel.x+neighbors[i][0]][pixel.y+neighbors[i][1]].element].category == "cum") {
|
pixel.temp += 7
|
||||||
pixel.temp += 7
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue