Browse Source

Add banner for news, plus some items for the start of the game

tags/v0.1.0
Fen Dweller 5 years ago
parent
commit
fe6955da72
No known key found for this signature in database GPG Key ID: E80B35A6F11C3656
3 changed files with 36 additions and 0 deletions
  1. +26
    -0
      constants.js
  2. +9
    -0
      gorge.css
  3. +1
    -0
      gorge.html

+ 26
- 0
constants.js View File

@@ -1287,6 +1287,7 @@ const news = [


function createNews() { function createNews() {
createNewsFoodAmount(); createNewsFoodAmount();
createNewsStart();
createNewsFoodRate(); createNewsFoodRate();
createNewsFoodRatePermanent(); createNewsFoodRatePermanent();
createNewsBuildingCount(); createNewsBuildingCount();
@@ -1296,6 +1297,24 @@ function createNewsFoodAmount() {


} }


function createNewsStart() {
let counter = 0;
for (let set of newsStartText) {
const factor = counter;
let cond;
cond = state => {
return state.currentProductivity.food < 5
}

news.push({
condition: cond,
lines: set
});

counter += 1;
};
}

function createNewsFoodRate() { function createNewsFoodRate() {
let counter = 0; let counter = 0;
for (let set of newsFoodRateText) { for (let set of newsFoodRateText) {
@@ -1364,6 +1383,13 @@ const newsBuildingCountCutoffs = [
400, 400,
500 500
] ]

const newsStartText = [
state => "This just in: Everything is fine",
state => "\"Kinda hungry ngl,\" tweets " + macroDesc.name,
state => "There are no giant monsters!"
]

const newsFoodRateText = [ const newsFoodRateText = [
[ [
state => "Your neighbors are complaining about the noise", state => "Your neighbors are complaining about the noise",


+ 9
- 0
gorge.css View File

@@ -576,6 +576,15 @@ div::-webkit-scrollbar-corner {
background-color: #111; background-color: #111;
} }


.news-banner {
text-align: center;
position: fixed;
top: 12vh;
left: 50vw;
transform: translate(-50%, 0%);
font-size: 24pt;
color: #eee;
}
.news-text { .news-text {
text-align: center; text-align: center;
position: fixed; position: fixed;


+ 1
- 0
gorge.html View File

@@ -37,6 +37,7 @@
<button id="stats">Stats</button> <button id="stats">Stats</button>
<button id="options">Options</button> <button id="options">Options</button>
</div> </div>
<div class="news-banner">News</div>
<div id="resources-area"> <div id="resources-area">
<div id="resources" class="title">Resources</div> <div id="resources" class="title">Resources</div>
<div id="resource-list"></div> <div id="resource-list"></div>


Loading…
Cancel
Save