Commit 5ee40fb4 authored by Matthew Odle's avatar Matthew Odle

hide status if count is zero

parent b200deb6
......@@ -1823,9 +1823,9 @@
"integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug="
},
"espree": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/espree/-/espree-3.5.1.tgz",
"integrity": "sha1-DJiLirRttTEAoZVK5LqZXd0n2H4="
"version": "3.5.2",
"resolved": "https://registry.npmjs.org/espree/-/espree-3.5.2.tgz",
"integrity": "sha512-sadKeYwaR/aJ3stC2CdvgXu1T16TdYN+qwCpcWbMnGJ8s0zNWemzrvb2GbD4OhmJ/fwpJjudThAlLobGbWZbCQ=="
},
"esprima": {
"version": "2.7.3",
......@@ -6346,9 +6346,9 @@
"integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs="
},
"websocket-extensions": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.2.tgz",
"integrity": "sha1-Dhh4HeYpoYMIzhSBZQ9n/6JpOl0="
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz",
"integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg=="
},
"whatwg-encoding": {
"version": "1.0.3",
......
......@@ -10,8 +10,10 @@ export class Status extends React.Component {
<h3>Villager Status</h3>
<div className="statuses">
<div className="infos">
{ Array.from(Object.keys(statuses)).map( statusName =>
<StatusRow key={statusName} statusName={statusName} statusProps={statuses[statusName]}/>
{Array.from(Object.keys(statuses)).map( statusName =>
statuses[statusName].count > 0
? <StatusRow key={statusName} statusName={statusName} statusProps={statuses[statusName]}/>
: null
)}
</div>
</div>
......
......@@ -326,9 +326,6 @@ export class Village extends React.Component {
}
setBadThingClass = (thing) => {
console.log(thing)
console.log(this.state.villagerStatus[thing])
console.log(this.state.villagerStatus);
this.state.villagerStatus[thing].classNames.badThingHappened = true;
}
......
......@@ -104,10 +104,12 @@ button {
top: 0px;
float: right;
}
.stores {
border: 1px solid black;
}
.stores, .statuses {
position: relative;
z-index: 10;
border: 1px solid black;
cursor: default;
padding: 5px 10px;
width: 140px;
......
......@@ -28,7 +28,7 @@ const knobsAndLevers = {
warmthReplenishThreshold: 10,
warmthPerFirewood: 80,
baseEnergyDegradeRate: 30,
baseEnergyDegradeRate: 1,
assignmentEnergyMultiplier: 2,
energyReplenishThreshold: 10,
energyPerFood: 80,
......@@ -38,8 +38,8 @@ const knobsAndLevers = {
defaultProductionRate: 1,
defaultToolStores: 25,
defaultFirewoodStores: 25,
defaultFoodStores: 5,
defaultFirewoodStores: 50,
defaultFoodStores: 50,
defaultClothingStores: 25,
defaultHideStores: 0,
......@@ -49,11 +49,11 @@ const knobsAndLevers = {
const startingLog = [
"Generate resources to keep your villagers alive.",
"Food provides energy.",
"Firewood provides warmth.",
"Clothing reduces warmth decay.",
"If energy or warmth drops to 0, the villager dies.",
"Key: TL=Tool, CL=Clothing, WM=Warmth, EN=Energy",
"Food prevents starvation.",
"Firewood prevents freezing.",
"Clothing staves off freezing longer.",
"Tools significantly increase production rate.",
"If a villaer is freezing or starving for too long, the villager dies.",
]
const villageStore = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment