Humanitize: HOUSE BUILDING UPDATE!

To all you fellas saying humans should build houses, well now they can! When the leader gets enough wood, they'll eventually build a home. When they gather enough stone and more wood, they'll furnish the house with a furnace and a workbench. With that workbench, they'll use grass, stone and wood to make a pickaxe, which is when they'll be making mining holes if there is a nearby stone patch. 

Changelog:
-Humans build wooden houses
-Humans can make pickaxes
-Humans can mine for rock with pickaxes
-Humans can make furnaces and workbenches
-Humans can harvest wood from tree branches
-Humans can harvest fruit from plants
This commit is contained in:
Nekonico 2024-08-18 18:25:15 -07:00 committed by GitHub
parent 86a7308019
commit ff1b6aac54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 403 additions and 40 deletions

View File

@ -1,5 +1,11 @@
/* mod by nekonico aka doobienecoarc */
behaviors.BODY_DELETE = function(pixel) {
if (pixel.willbuildhouse == true) {
HouseBuilder = false;
}
},
window.addEventListener("load", () => {
document.getElementById("elementButton-easy_way_out")?.remove()
})
@ -16,6 +22,8 @@ elements.easy_way_out = {
movable: false,
},
HouseBuilder = false
elements.cultured_human = {
name: "human",
// color: ["#f5eac6","#d4c594","#a89160","#7a5733","#523018","#361e0e"],
@ -30,6 +38,7 @@ elements.cultured_human = {
if (isEmpty(pixel.x, pixel.y+1)) {
createPixel("c_body", pixel.x, pixel.y+1);
createPixel("c_head", pixel.x, pixel.y);
var bodypixel = pixelMap[pixel.x][pixel.y+1];
}
else if (isEmpty(pixel.x, pixel.y-1)) {
createPixel("c_head", pixel.x, pixel.y-1);
@ -41,7 +50,8 @@ elements.cultured_human = {
}
},
related: ["c_body","c_head"],
cooldown: defaultCooldown,
maxSize: 1,
cooldown: 10,
forceSaveColor: true,
},
@ -65,7 +75,9 @@ elements.c_body = {
breakInto: ["blood","meat","bone"],
reactions: {
"basket": { func:function(pixel,basket){ if (pixel.basket == false) {changePixel(basket,"easy_way_out"), (pixel.basket = true);} }, chance:0.5 },
"cancer": { elem1:"cancer", chance:0.005 },
"pickaxe": { func:function(pixel,pickaxe){ if (pixel.pickaxe == false) {changePixel(pickaxe,"easy_way_out"), (pixel.pickaxe = true),(pixel.willbuildmine = true);} }, chance:0.5 },
"cancer": { elem1:"cancer", chance:0.0005 },
"poison": { attr1:{"dead":true}, chance:0.4 },
"radiation": { elem1:["ash","meat","rotten_meat","cooked_meat"], chance:0.4 },
"neutron": { elem1:["ash","meat","rotten_meat","cooked_meat"], chance:0.01 },
"fallout": { elem1:["ash","meat","rotten_meat","cooked_meat"], chance:0.01 },
@ -84,14 +96,18 @@ elements.c_body = {
if (pixel.basket == true) {(pixel.meatcount += 1), changePixel(meat,"easy_way_out");}
}, chance:0.4},
"cured_meat": { func:function(pixel,meat){
if (pixel.basket == true) {(pixel.meatcount += 1), changePixel(meat,"easy_way_out");}
if (pixel.basket == true) {(pixel.meatcount += 2), changePixel(meat,"easy_way_out");}
}, chance:0.5},
"bread": { func:function(pixel,bread){
if (pixel.basket == true) {(pixel.breadcount += 1), changePixel(bread,"easy_way_out");}
else if (pixel.basket == false && pixel.breadcount < 1) {(pixel.breadcount = 1), changePixel(bread,"easy_way_out");}
}, chance:0.5},
"toast": { func:function(pixel,bread){
if (pixel.basket == true) {(pixel.breadcount += 1), changePixel(bread,"easy_way_out");}
if (pixel.basket == true) {(pixel.breadcount += 2), changePixel(bread,"easy_way_out");}
else if (pixel.basket == false && pixel.breadcount < 1) {(pixel.breadcount = 1), changePixel(bread,"easy_way_out");}
}, chance:0.4},
"baked_batter": { func:function(pixel,bread){
if (pixel.basket == true) {(pixel.breadcount += 5), changePixel(bread,"easy_way_out");}
else if (pixel.basket == false && pixel.breadcount < 1) {(pixel.breadcount = 1), changePixel(bread,"easy_way_out");}
}, chance:0.4},
"crumb": { func:function(pixel,bread){
@ -134,16 +150,7 @@ elements.c_body = {
"flower_seed": { func:function(pixel,trinket){
if (pixel.basket == true) {(pixel.trinketscount += 1), changePixel(trinket,"easy_way_out");}
}, chance:0.01},
"wheat_seed": { func:function(pixel,trinket){
if (pixel.basket == true) {(pixel.trinketscount += 1), changePixel(trinket,"easy_way_out");}
}, chance:0.05},
"corn_seed": { func:function(pixel,trinket){
if (pixel.basket == true) {(pixel.trinketscount += 1), changePixel(trinket,"easy_way_out");}
}, chance:0.05},
"potato_seed": { func:function(pixel,trinket){
if (pixel.basket == true) {(pixel.trinketscount += 1), changePixel(trinket,"easy_way_out");}
}, chance:0.05},
"pumpkin_seed": { func:function(pixel,trinket){
"grass_seed": { func:function(pixel,trinket){
if (pixel.basket == true) {(pixel.trinketscount += 1), changePixel(trinket,"easy_way_out");}
}, chance:0.05},
"petal": { func:function(pixel,trinket){
@ -152,15 +159,104 @@ elements.c_body = {
"metal_scrap": { func:function(pixel,trinket){
if (pixel.basket == true) {(pixel.trinketscount += 1), changePixel(trinket,"easy_way_out");}
}, chance:0.01},
"housefloor1": { func:function(pixel,station){
if (pixel.woodcount > 4) {(pixel.woodcount -= 5), changePixel(station,"workbench");}
}, chance:0.01},
"housefloor2": { func:function(pixel,station){
if (pixel.rockcount > 7) {(pixel.rockcount -= 8), changePixel(station,"furnace");}
}, chance:0.01},
"workbench": { func:function(pixel,station){
if (pixel.rockcount > 2 && pixel.woodcount > 1 && pixel.hasstraw == true && pixel.pickaxe == false) {(pixel.pickaxe = true),(pixel.willbuildmine = true),(pixel.rockcount -= 2),(pixel.woodcount -= 1),(pixel.hasstraw = false);}
}, chance:0.01},
"furnace": { func:function(pixel,oven){
if (pixel.meatcount > 0) {(pixel.cookedmeatcount += 1),(pixel.meatcount -= 1),(oven.temp = 100);}
else if (pixel.doughcount > 0) {(pixel.breadcount += 1),(pixel.doughcount -= 1),(oven.temp = 95);}
if (pixel.meatcount > 0) {(pixel.cookedmeatcount += 1),(pixel.meatcount -= 1);}
else if (pixel.doughcount > 0) {(pixel.breadcount += 1),(pixel.doughcount -= 1);}
}, chance:0.01},
"oven": { func:function(pixel,oven){
if (pixel.meatcount > 0) {(pixel.cookedmeatcount += 1),(pixel.meatcount -= 1),(oven.temp = 100);}
else if (pixel.doughcount > 0) {(pixel.breadcount += 1),(pixel.doughcount -= 1),(oven.temp = 95);}
if (pixel.meatcount > 0) {(pixel.cookedmeatcount += 1),(pixel.meatcount -= 1);}
else if (pixel.doughcount > 0) {(pixel.breadcount += 1),(pixel.doughcount -= 1);}
}, chance:0.02},
"grape": { elem2:"juice", chance:0.5, color2:"#291824", oneway:true },
"allpurposestation": { func:function(pixel,station){
if (pixel.rockcount > 2 && pixel.woodcount > 1 && pixel.hasstraw == true) {(pixel.pickaxe = true),(pixel.rockcount -= 2),(pixel.woodcount -= 1),(pixel.hasstraw = false);}
else if (pixel.meatcount > 0) {(pixel.cookedmeatcount += 1),(pixel.meatcount -= 1);}
else if (pixel.doughcount > 0) {(pixel.breadcount += 1),(pixel.doughcount -= 1);}
else if (pixel.eggcount > 1 && pixel.flourcount > 1) {(pixel.eggcount -= 1),(pixel.flourcount -= 1),(pixel.breadcount += 10);}
}, chance:0.1},
"loose_straw": { func:function(pixel,straw){
if (pixel.hasstraw == false) {(pixel.hasstraw = true), changePixel(straw,"easy_way_out");}
}, chance:0.01},
"water": { func:function(pixel,water){
if (pixel.flourcount > 1) {(pixel.flourcount -= 1), (pixel.doughcount += 1), changePixel(water,["easy_way_out","easy_way_out","water"]);}
}, chance:0.5},
"straw": { elem2:"loose_straw", oneway:true, chance:0.5 },
"grass": { func:function(pixel,grass){
if (pixel.hasstraw == false && grass.h == 2) {(pixel.hasstraw = true), changePixel(grass,"easy_way_out");}
}, chance:0.01},
"rock": { func:function(pixel,rock){
if (pixel.basket == true && pixel.rockcount < 3) {(pixel.rockcount += 1), changePixel(rock,"easy_way_out");}
else if (pixel.pickaxe == true && pixel.basket == true && pixel.willbuildmine == true) {changePixel(rock,"mine_hole"), (pixel.willbuildmine = false);}
}, chance:0.01},
"mine_hole": { func:function(pixel,mine){
if (pixel.pickaxe == true && pixel.basket == true) {(pixel.rockcount += 1);}
}, chance:0.01},
"grape": { func:function(pixel,grape){
if (pixel.basket == true) {(pixel.foodcount += 0.25), changePixel(grape,"easy_way_out");}
else {changePixel(grape,"juice"), grape.color = pixelColorPick(grape,"#291824");}
}, oneway:true, chance:0.05},
"cheese": { func:function(pixel,food){
if (pixel.basket == true) {(pixel.foodcount += 0.50), changePixel(food,"easy_way_out");}
}, oneway:true, chance:0.05},
"nut": { func:function(pixel,food){
if (pixel.basket == true) {(pixel.foodcount += 0.25), changePixel(food,"easy_way_out");}
}, oneway:true, chance:0.05},
"nut_meat": { func:function(pixel,food){
if (pixel.basket == true) {(pixel.foodcount += 0.25), changePixel(food,"easy_way_out");}
}, oneway:true, chance:0.05},
"baked_potato": { func:function(pixel,food){
if (pixel.basket == true) {(pixel.foodcount += 0.75), changePixel(food,"easy_way_out");}
}, oneway:true, chance:0.05},
"hard_yolk": { func:function(pixel,food){
if (pixel.basket == true) {(pixel.foodcount += 0.50), changePixel(food,"easy_way_out");}
}, oneway:true, chance:0.05},
"chocolate": { func:function(pixel,food){
if (pixel.basket == true) {(pixel.foodcount += 0.50), changePixel(food,"easy_way_out");}
}, oneway:true, chance:0.05},
"mashed_potato": { func:function(pixel,food){
if (pixel.basket == true) {(pixel.foodcount += 0.75), changePixel(food,"easy_way_out");}
}, oneway:true, chance:0.05},
"pickle": { func:function(pixel,food){
if (pixel.basket == true) {(pixel.foodcount += 0.75), changePixel(food,"easy_way_out");}
}, oneway:true, chance:0.05},
"ice_cream": { func:function(pixel,food){
if (pixel.basket == true) {(pixel.foodcount += 0.50), changePixel(food,"easy_way_out");}
}, oneway:true, chance:0.05},
"lettuce": { func:function(pixel,food){
if (pixel.basket == true) {(pixel.foodcount += 0.25), changePixel(food,"easy_way_out");}
}, oneway:true, chance:0.05},
"tomato": { func:function(pixel,food){
if (pixel.basket == true) {(pixel.foodcount += 0.50), changePixel(food,"easy_way_out");}
}, oneway:true, chance:0.05},
"potato": { func:function(pixel,food){
if (pixel.basket == true) {(pixel.foodcount += 0.50), changePixel(food,"easy_way_out");}
}, oneway:true, chance:0.05},
"popcorn": { func:function(pixel,food){
if (pixel.basket == true) {(pixel.foodcount += 0.25), changePixel(food,"easy_way_out");}
}, oneway:true, chance:0.05},
"corn": { func:function(pixel,food){
if (pixel.basket == true) {(pixel.foodcount += 0.50), changePixel(food,"easy_way_out");}
}, oneway:true, chance:0.05},
"candy": { func:function(pixel,food){
if (pixel.basket == true) {(pixel.foodcount += 0.50), changePixel(food,"easy_way_out");}
}, oneway:true, chance:0.05},
"caramel": { func:function(pixel,food){
if (pixel.basket == true) {(pixel.foodcount += 0.50), changePixel(food,"easy_way_out");}
}, oneway:true, chance:0.05},
"herb": { func:function(pixel,food){
if (pixel.basket == true) {(pixel.foodcount += 0.25), changePixel(food,"easy_way_out");}
}, oneway:true, chance:0.05},
"pumpkin_seed": { func:function(pixel,food){
if (pixel.basket == true) {(pixel.foodcount += 0.25), changePixel(food,"easy_way_out");}
}, oneway:true, chance:0.05},
"ant": { elem2:"dead_bug", chance:0.05, oneway:true },
"fly": { elem2:"dead_bug", oneway:true },
"firefly": { elem2:"dead_bug", oneway:true },
@ -169,11 +265,10 @@ elements.c_body = {
"termite": { elem2:"dead_bug", oneway:true },
"worm": { elem2:"slime", chance:0.05, oneway:true },
"stink_bug": { elem2:"stench", oneway:true },
"grass_seed": { elem2:null, chance:0.05 },
"tax_bill": { elem2:null, func:(pixel,tax) => { (pixel.moneycount *= 0.75) }, chance:0.01 },
"money": { elem2:null, func:(pixel,money) => { (pixel.moneycount += 1) }, chance:0.03 },
"gold_coin": { elem2:null, func:(pixel,money) => { (pixel.moneycount += 100) }, chance:0.04 },
"diamond": { elem2:null, func:(pixel,money) => { (pixel.moneycount += 5000) }, chance:0.05 },
"gold_coin": { elem2:null, func:(pixel,money) => { (pixel.moneycount += 1000) }, chance:0.04 },
"diamond": { elem2:null, func:(pixel,money) => { (pixel.moneycount += 50000) }, chance:0.05 },
"sun": { elem1:"cooked_meat" },
},
properties: {
@ -183,6 +278,10 @@ elements.c_body = {
hungry: false,
greedy: false,
basket: false,
pickaxe: false,
hasstraw: false,
willbuildhouse: false,
willbuildmine: false,
moneycount: 0,
eggcount: 0,
flourcount: 0,
@ -190,8 +289,12 @@ elements.c_body = {
meatcount: 0,
cookedmeatcount: 0,
breadcount: 0,
trinketscount: 0
foodcount: 0,
trinketscount: 0,
woodcount: 0,
rockcount: 0,
},
onDelete: behaviors.BODY_DELETE,
tick: function(pixel) {
if (tryMove(pixel, pixel.x, pixel.y+1)) { // Fall
if (!isEmpty(pixel.x, pixel.y-2, true)) { // Drag head down
@ -213,6 +316,9 @@ elements.c_body = {
// Turn into rotten_meat if pixelTicks-dead > 500
if (pixelTicks-pixel.dead > 200 && Math.random() < 0.1) {
changePixel(pixel,"rotten_meat");
if (pixel.willbuildhouse == true) {
HouseBuilder = false;
}
}
return
}
@ -271,30 +377,102 @@ elements.c_body = {
if (pixel.temp > 37) { pixel.temp -= 1; }
else if (pixel.temp < 37) { pixel.temp += 1; }
}
if (!isEmpty(pixel.x, pixel.y+1, true) && pixel.woodcount > 15 && pixel.willbuildhouse == true) {
deletePixel(pixel.x-3, pixel.y+1); // clear any floor obstructions
deletePixel(pixel.x-2, pixel.y+1);
deletePixel(pixel.x-1, pixel.y+1);
deletePixel(pixel.x, pixel.y+1);
deletePixel(pixel.x+1, pixel.y+1);
deletePixel(pixel.x+2, pixel.y+1);
deletePixel(pixel.x+3, pixel.y+1);
createPixel("wood", pixel.x-3, pixel.y-3); // door 1
createPixel("wood", pixel.x-3, pixel.y-2);
createPixel("wood", pixel.x-3, pixel.y+1);
createPixel("wood", pixel.x-2, pixel.y-3); // roof
createPixel("wood", pixel.x-1, pixel.y-3);
createPixel("wood", pixel.x, pixel.y-3);
createPixel("wood", pixel.x+1, pixel.y-3);
createPixel("wood", pixel.x+2, pixel.y-3);
createPixel("wood", pixel.x+3, pixel.y-3); // door 2
createPixel("wood", pixel.x+3, pixel.y-2);
createPixel("wood", pixel.x+3, pixel.y+1);
createPixel("wood", pixel.x-2, pixel.y+1); // floor
createPixel("housefloor1", pixel.x-1, pixel.y+1);
createPixel("wood", pixel.x, pixel.y+1);
createPixel("housefloor2", pixel.x+1, pixel.y+1);
createPixel("wood", pixel.x+2, pixel.y+1);
pixel.willbuildhouse = false;
pixel.woodcount -= 16
}
if (pixel.moneycount > 17999) {
pixel.color = pixelColorPick(pixel,"#ffd700");
}
if (pixel.breadcount < 1 && pixel.cookedmeatcount < 1 && Math.random() < 0.005) { //eating mechanic
if (pixel.breadcount < 1 && pixel.cookedmeatcount < 1 && pixel.foodcount < 0.25 && Math.random() < 0.005) { //hunger mechanic
pixel.hungry = true
}
else if (pixel.breadcount > 0.5 && pixel.hungry == true) {
if (pixel.foodcount > 0 && pixel.hungry == true) {
pixel.hungry = false, pixel.foodcount -= 0.25
}
else if (pixel.breadcount > 0.9 && pixel.hungry == true) {
pixel.hungry = false, pixel.breadcount -= 1
}
else if (pixel.cookedmeatcount > 0 && pixel.hungry == true) {
pixel.hungry = false, pixel.cookedmeatcount -= 1
}
else if (pixel.breadcount > 0.5 && Math.random() < 0.005) {
if (pixel.foodcount > 0 && Math.random() < 0.0005) {
pixel.hungry = false, pixel.foodcount -= 0.25
}
if (pixel.breadcount > 0.9 && Math.random() < 0.0005) {
pixel.hungry = false, pixel.breadcount -= 1
}
else if (pixel.cookedmeatcount > 0 && Math.random() < 0.005) {
if (pixel.cookedmeatcount > 0 && Math.random() < 0.0005) {
pixel.hungry = false, pixel.cookedmeatcount -= 1
}
if (pixel.trinketscount < 1 && Math.random() < 0.001) { //trinket desire mechanic
pixel.greedy = true
}
else if (pixel.trinketscount > 1 && Math.random() < 0.01) {
pixel.greedy = false
}
if (pixel.breadcount > 1.9 && pixel.cookedmeatcount > 0 && Math.random() < 0.005 && pixel.foodcount < 5) { //make a sandwich
pixel.foodcount += 1, pixel.breadcount -= 2, pixel.cookedmeatcount -= 1
}
if (pixel.hasstraw == true && Math.random() < 0.005 && pixel.basket == false) { //make a basket
pixel.basket = true, pixel.hasstraw = false
}
if (!isEmpty(pixel.x+1, pixel.y-1, true) && pixel.basket == true && pixelMap[pixel.x+1][pixel.y-1].element == "tree_branch") { // harvest branch
var wood = pixelMap[pixel.x+1][pixel.y-1];
if (wood.element == "tree_branch") {changePixel(wood,"branchless_tree"), pixel.woodcount += 1}
}
else if (!isEmpty(pixel.x-1, pixel.y-1, true) && pixel.basket == true && pixelMap[pixel.x-1][pixel.y-1].element == "tree_branch") {
var wood = pixelMap[pixel.x-1][pixel.y-1];
if (wood.element == "tree_branch") {changePixel(wood,"branchless_tree"), pixel.woodcount += 1}
}
if (!isEmpty(pixel.x+1, pixel.y-1, true) && pixel.basket == true && pixelMap[pixel.x+1][pixel.y-1].element == "plant" && Math.random() < 0.05) { // harvest fruit
var plant = pixelMap[pixel.x+1][pixel.y-1];
if (plant.element == "plant") {pixel.foodcount += 0.25}
}
else if (!isEmpty(pixel.x-1, pixel.y-1, true) && pixel.basket == true && pixelMap[pixel.x-1][pixel.y-1].element == "plant" && Math.random() < 0.05) {
var plant = pixelMap[pixel.x-1][pixel.y-1];
if (plant.element == "plant") {pixel.foodcount += 0.25}
}
if (pixel.woodcount > 15 && Math.random() < 0.001 && HouseBuilder == false) {
pixel.willbuildhouse = true, HouseBuilder = true
}
if (!isEmpty(pixel.x-1, pixel.y, true) && pixelMap[pixel.x-1][pixel.y].element == "c_body") {
var seller = pixelMap[pixel.x-1][pixel.y];
if (seller.dead) { // If seller is dead, stop trade
@ -304,17 +482,25 @@ elements.c_body = {
if (seller.trinketscount > 0 && pixel.greedy == true) {
seller.trinketscount -= 1, seller.moneycount += 1, pixel.moneycount -= 1, pixel.trinketscount += 1;
}
if (seller.hasstraw == true && pixel.hasstraw == false && Math.random() < 0.1) {
seller.hasstraw = false, seller.moneycount += 1, pixel.moneycount -= 1, pixel.hasstraw = true;
}
if (seller.foodcount > 0.75 && Math.random() < 0.1) {
seller.foodcount -= 1, seller.moneycount += 5, pixel.moneycount -= 5, pixel.foodcount += 1;
}
if (seller.cookedmeatcount > 0 && pixel.cookedmeatcount < 5) {
seller.cookedmeatcount -= 1, seller.moneycount += 3, pixel.moneycount -= 3, pixel.cookedmeatcount += 1;
}
if (seller.breadcount > 0 && pixel.breadcount < 5) {
if (seller.meatcount > 0 && pixel.meatcount == 0 && Math.random() > 0.1) {
seller.meatcount -= 1, seller.moneycount += 2, pixel.moneycount -= 2, pixel.meatcount += 1;
}
if (seller.breadcount > 0.9 && pixel.breadcount < 5) {
seller.breadcount -= 1, seller.moneycount += 2, pixel.moneycount -= 2, pixel.breadcount += 1;
};
(seller.panic = 0), (pixel.panic = 0)
}
}
else { var seller = null }
}
},
@ -338,13 +524,14 @@ elements.c_head = {
breakInto: ["blood","meat","bone"],
forceSaveColor: true,
reactions: {
"cancer": { elem1:"cancer", chance:0.005 },
"radiation": { elem1:["ash","meat","rotten_meat","cooked_meat"], chance:0.4 },
"cancer": { elem1:"cancer", attr1:{"dead":true}, chance:0.005 },
"poison": { attr1:{"dead":true}, chance:0.4 },
"radiation": { elem1:["ash","meat","rotten_meat","cooked_meat"], color1:["#75816B","#4D6B53"], chance:0.4 },
"neutron": { elem1:["ash","meat","rotten_meat","cooked_meat"], chance:0.03 },
"fallout": { elem1:["ash","meat","rotten_meat","cooked_meat"], chance:0.03 },
"plague": { elem1:"plague", chance:0.05 },
"oxygen": { func:function(pixel,oxygen){pixel.drowning -= 1}, elem2:"carbon_dioxide", chance:0.5 },
"carbon_dioxide": { func:function(pixel,oxygen){pixel.drowning += 1}, elem2:"carbon_dioxide", chance:0.1 },
"fallout": { elem1:["ash","meat","rotten_meat","cooked_meat"], color1:["#75816B","#4D6B53"], chance:0.03 },
"plague": { elem1:["rotten_meat","rotten_meat","rotten_meat","c_head","plague",], color1:["#75816B","#4D6B53"], attr1:{"dead":true}, chance:0.05 },
"oxygen": { func:function(pixel,air){pixel.drowning -= 1}, elem2:"carbon_dioxide", chance:0.5 },
"carbon_dioxide": { func:function(pixel,air){pixel.drowning += 1}, elem2:"carbon_dioxide", chance:0.1 },
"meat": { elem2:null, chance:0.1 },
"cooked_meat": { elem2:null, chance:0.1 },
"cured_meat": { elem2:null, chance:0.1 },
@ -523,21 +710,90 @@ elements.tax_bill = {
breakIntoColor: ["#ffffff","#e6e6e6","#dbdbdb","#ffffff","#e6e6e6","#dbdbdb","#ff0000","#171717",]
},
elements.loose_straw = {
hidden: true,
color: ["#F9E3A1","#93734E","#C7AA83"],
behavior: behaviors.POWDER,
tempHigh: 380,
stateHigh: "fire",
burn: 80,
burnTime: 200,
category: "powders",
state: "solid",
density: 45
},
elements.basket = {
color: ["#88665d","#bcaa99","#c2b97f"],
behavior: behaviors.POWDER,
hidden:true,
color: ["#88665d","#bcaa99"],
behavior: behaviors.STURDYPOWDER,
tempHigh: 400,
stateHigh: "fire",
burn: 35,
burn: 55,
burnTime: 210,
burnInto: ["smoke","smoke","smoke","smoke","ash"],
breakInto: "straw",
breakInto: "loose_straw",
category: "human",
state: "solid",
density: 70
},
elements.pickaxe = {
hidden:true,
color: ["#71797e","#D8B589"],
behavior: behaviors.STURDYPOWDER,
colorKey: {
"A":"#607d8b",
"H":"#91754d",
"B":"#a0522d"
},
colorPattern: [
"BBBBBB",
"BAABHB",
"BBBABB",
"BBHBAB",
"BHBBAB",
"HBBBBB"
],
reactions: {
"mine_hole": { func:function(pixel,mine){
if (isEmpty(pixel.x, pixel.y-1)) {(createPixel("rock", pixel.x, pixel.y-1));}
else if (isEmpty(pixel.x-1, pixel.y)) {(createPixel("rock", pixel.x-1, pixel.y));}
else if (isEmpty(pixel.x+1, pixel.y)) {(createPixel("rock", pixel.x+1, pixel.y));}
}, chance:0.05},
},
tempHigh: 400,
stateHigh: ["rock","rock","ash","charcoal",],
burn: 55,
burnTime: 210,
burnInto: ["rock","rock","rock","rock","ash","charcoal","charcoal","smoke"],
breakInto: ["rock","rock","wood","sawdust",],
category: "human",
state: "solid",
density: 70
},
elements.workbench = {
hidden:true,
color: ["#a0522d"],
behavior: behaviors.STURDYPOWDER,
reactions: {
"loose_straw": { elem2:"basket", chance:0.25 },
"rock": { elem2:"pickaxe", chance:0.1 },
"oven": { elem1:"allpurposestation", elem2:null, chance:0.5 },
},
temp:40,
tempHigh: 1000,
stateHigh: "magma",
category: "human",
state: "solid",
density: 2550,
hardness: 0.2,
breakInto: ["sand","gravel","charcoal","ash"]
},
elements.furnace = {
hidden:true,
color: ["#808080","#4f4f4f","#949494"],
behavior: behaviors.STURDYPOWDER,
reactions: {
@ -562,9 +818,11 @@ elements.furnace = {
},
elements.oven = {
hidden:true,
color: ["#4f4f4f","#71797e"],
behavior: behaviors.WALL,
behavior: behaviors.STURDYPOWDER,
reactions: {
"workbench": { elem1:"allpurposestation", elem2:null, chance:0.5 },
"bird": { elem2:["cooked_meat","cooked_meat","feather"], chance:0.025 },
"meat": { elem2:"cooked_meat", chance:0.1 },
"yolk": { elem2:"hard_yolk", chance:0.1 },
@ -581,10 +839,115 @@ elements.oven = {
density: 2550,
hardness: 0.5,
breakInto: ["metal_scrap","metal_scrap","charcoal","ash"]
},
elements.allpurposestation = {
hidden:true,
name: "workshop_station",
color: ["#a0522d","#4f4f4f","#71797e"],
behavior: behaviors.STURDYPOWDER,
reactions: {
"rock": { elem2:"pickaxe", chance:0.5 },
"loose_straw": { elem2:"basket", chance:0.5 },
"meat": { elem2:"cooked_meat", chance:0.1 },
"yolk": { elem2:"hard_yolk", chance:0.1 },
"egg": { elem2:"hard_yolk", chance:0.1 },
"batter": { elem2:"baked_batter", chance:0.1 },
"dough": { elem2:"bread", chance:0.1 },
"bread": { elem2:"toast", chance:0.05 },
},
temp:40,
tempHigh: 1000,
stateHigh: "magma",
category: "human",
state: "solid",
density: 2550,
hardness: 0.2,
breakInto: ["sand","gravel","charcoal","ash"]
},
elements.branchless_tree = {
name: "wood",
color: "#a59965",
behavior: behaviors.WALL,
renderer: renderPresets.WOODCHAR,
tick: function(pixel) {
if (Math.random() < 0.02 && pixel.age > 35) {
changePixel(pixel,"tree_branch")
}
else if (pixel.age > 1000 && Math.random() < 0.05) {
changePixel(pixel,"wood");
pixel.color = pixelColorPick(pixel, pixel.wc);
}
pixel.age++;
},
properties: {
"age":0
},
tempHigh: 400,
stateHigh: ["ember","charcoal","fire","fire","fire"],
category: "solids",
burn: 5,
burnTime: 300,
burnInto: ["ember","charcoal","fire"],
state: "solid",
hardness: 0.15,
breakInto: "sawdust",
};
elements.mine_hole = {
hidden:true,
color: "#363636",
behavior: behaviors.STURDYPOWDER,
tempHigh: 950,
stateHigh: "magma",
category: "land",
state: "solid",
density: 2550,
hardness: 0.5,
breakInto: ["sand","gravel"]
},
elements.housefloor1 = {
name: "wood",
color: "#a0522d",
behavior: behaviors.WALL,
renderer: renderPresets.WOODCHAR,
tempHigh: 400,
stateHigh: ["ember","charcoal","fire","fire","fire"],
category: "solids",
burn: 5,
burnTime: 300,
burnInto: ["ember","charcoal","fire"],
state: "solid",
hardness: 0.15,
breakInto: "sawdust",
};
elements.housefloor2 = {
name: "wood",
color: "#a0522d",
behavior: behaviors.WALL,
renderer: renderPresets.WOODCHAR,
tempHigh: 400,
stateHigh: ["ember","charcoal","fire","fire","fire"],
category: "solids",
burn: 5,
burnTime: 300,
burnInto: ["ember","charcoal","fire"],
state: "solid",
hardness: 0.15,
breakInto: "sawdust",
};
elements.straw.breakInto = "loose_straw"
elements.human.name = "dummy"
elements.head.name = "brainless_head"
elements.body.name = "dumb_body"
elements.grass.properties.h = 1
elements.rotten_meat.density = 1200