Browse Source

Allow news lines to use current belongings.

tags/v0.0.4
Fen Dweller 6 years ago
parent
commit
234c837a05
2 changed files with 19 additions and 1 deletions
  1. +17
    -0
      constants.js
  2. +2
    -1
      gorge.js

+ 17
- 0
constants.js View File

@@ -1008,6 +1008,7 @@ const clickVictimUpgradeText = {
// state.ownedUpgrades == ownedUpgrades // state.ownedUpgrades == ownedUpgrades
// state.resources == resources // state.resources == resources
// state.currentProductivity == currentProductivity // state.currentProductivity == currentProductivity
// state.belongings == belongings


const news = [ const news = [
{ {
@@ -1027,5 +1028,21 @@ const news = [
lines: [ lines: [
state => "You have at least 100 food. Wow!" state => "You have at least 100 food. Wow!"
] ]
},
{
condition: state => {
return state.currentProductivity.food > 100;
},
lines: [
state => "You're eating more than 100 food per second. Wow!"
]
},
{
condition: state => {
return state.belongings.micro.count >= 50;
},
lines: [
state => "You have at least 50 micros. Wow!"
]
} }
] ]

+ 2
- 1
gorge.js View File

@@ -650,7 +650,8 @@ function doNews() {
const state = { const state = {
ownedUpgrades: ownedUpgrades, ownedUpgrades: ownedUpgrades,
resources: resources, resources: resources,
currentProductivity: currentProductivity
currentProductivity: currentProductivity,
belongings: belongings
}; };


let options = []; let options = [];


Loading…
Cancel
Save