Procházet zdrojové kódy

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

tags/v0.1.0
Fen Dweller před 5 roky
rodič
revize
fe6955da72
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: E80B35A6F11C3656
3 změnil soubory, kde provedl 36 přidání a 0 odebrání
  1. +26
    -0
      constants.js
  2. +9
    -0
      gorge.css
  3. +1
    -0
      gorge.html

+ 26
- 0
constants.js Zobrazit soubor

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

function createNews() {
createNewsFoodAmount();
createNewsStart();
createNewsFoodRate();
createNewsFoodRatePermanent();
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() {
let counter = 0;
for (let set of newsFoodRateText) {
@@ -1364,6 +1383,13 @@ const newsBuildingCountCutoffs = [
400,
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 = [
[
state => "Your neighbors are complaining about the noise",


+ 9
- 0
gorge.css Zobrazit soubor

@@ -576,6 +576,15 @@ div::-webkit-scrollbar-corner {
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 {
text-align: center;
position: fixed;


+ 1
- 0
gorge.html Zobrazit soubor

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


Načítá se…
Zrušit
Uložit