summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@vistahigherlearning.com>2022-01-31 15:14:15 -0500
committerDavid Thompson <dthompson@vistahigherlearning.com>2022-01-31 15:14:15 -0500
commit8e6601165fe2c2e657cd872b061aa049a0a9fff2 (patch)
tree2740b3b1055ed3ada656bc22ac1ada1681fb1228
parente102cf9234d2842d25759d8d5067b10a8f8ed011 (diff)
Add seed planting depth data.
-rw-r--r--js/garden.js20
1 files changed, 19 insertions, 1 deletions
diff --git a/js/garden.js b/js/garden.js
index daf014b..1551ff5 100644
--- a/js/garden.js
+++ b/js/garden.js
@@ -43,9 +43,11 @@ class Season {
}
class Crop {
- constructor(name, {fallCrop, family, headStart, interval, maturity, multisow,
+ constructor(name, {depth, fallCrop, family, headStart, interval, maturity, multisow,
overwinterPlant, pause, spacing, springPlant, resume,
species, transplant, trellis}) {
+ // Seed planting depth in inches.
+ this.depth = depth || .25;
// Plant again in the fall?
this.fallCrop = fallCrop;
// Broad category (brassica, cucurbit, nightshade, etc.)
@@ -106,6 +108,7 @@ const CROPS = [
transplant: true
}),
new Crop("Bean (Bush)", {
+ depth: 1,
family: "Legume",
interval: 2,
maturity: 8,
@@ -114,6 +117,7 @@ const CROPS = [
springPlant: 1
}),
new Crop("Bean (Pole)", {
+ depth: 1,
family: "Legume",
maturity: 9,
spacing: 8,
@@ -122,6 +126,7 @@ const CROPS = [
trellis: true
}),
new Crop("Beet", {
+ depth: .5,
family: "Amaranth",
interval: 2,
maturity: 8,
@@ -217,6 +222,7 @@ const CROPS = [
springPlant: -5
}),
new Crop("Cucumber (Vine)", {
+ depth: .5,
family: "Cucurbit",
maturity: 9,
spacing: 2,
@@ -240,6 +246,7 @@ const CROPS = [
transplant: true
}),
new Crop("Endive", {
+ depth: .125,
family: "Aster",
headStart: 6,
maturity: 4,
@@ -255,6 +262,7 @@ const CROPS = [
springPlant: 0
}),
new Crop("Garlic", {
+ depth: 3,
fallCrop: true,
overwinterPlant: 2,
maturity: 28,
@@ -271,6 +279,7 @@ const CROPS = [
transplant: true
}),
new Crop("Lettuce (Leaf/Mini Head)", {
+ depth: .125,
family: "Aster",
headStart: 4,
interval: 2,
@@ -324,6 +333,7 @@ const CROPS = [
transplant: true
}),
new Crop("Parsnip", {
+ depth: .5,
family: "Umbellifer",
maturity: 14,
spacing: 4,
@@ -348,6 +358,7 @@ const CROPS = [
transplant: true
}),
new Crop("Potato", {
+ depth: 3,
family: "Nightshade",
maturity: 12,
spacing: 4,
@@ -355,6 +366,7 @@ const CROPS = [
springPlant: -3
}),
new Crop("Radish (Round)", {
+ depth: .5,
family: "Brassica",
interval: 2,
maturity: 4,
@@ -366,6 +378,7 @@ const CROPS = [
springPlant: -3
}),
new Crop("Radish (Daikon)", {
+ depth: .5,
family: "Brassica",
fallCrop: true,
maturity: 9,
@@ -383,6 +396,7 @@ const CROPS = [
transplant: true
}),
new Crop("Spinach", {
+ depth: .5,
family: "Amaranth",
interval: 2,
maturity: 6,
@@ -394,6 +408,7 @@ const CROPS = [
springPlant: -5
}),
new Crop("Squash (Summer)", {
+ depth: 1,
family: "Cucurbit",
maturity: 8,
spacing: 1.0 / 9,
@@ -401,6 +416,7 @@ const CROPS = [
springPlant: 0
}),
new Crop("Squash (Winter)", {
+ depth: 1,
family: "Cucurbit",
maturity: 12,
spacing: 0.5,
@@ -408,6 +424,7 @@ const CROPS = [
springPlant: 1
}),
new Crop("Swiss Chard", {
+ depth: .5,
family: "Amaranth",
headStart: 4,
maturity: 4,
@@ -589,6 +606,7 @@ function viewCropDetails(crop) {
} else {
addDetail("Spacing", `1 per ${Math.floor(1 / crop.spacing)} square feet`);
}
+ addDetail("Seed planting depth", `${crop.depth}"`);
addDetail("Needs a trellis", crop.trellis ? "Yes" : "No");
overlay.classList.add("overlay");
overlay.appendChild(modal);