瀏覽代碼

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

tags/v0.1.0
Fen Dweller 5 年之前
父節點
當前提交
fe6955da72
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: E80B35A6F11C3656
共有 3 個檔案被更改,包括 36 行新增0 行删除
  1. +26
    -0
      constants.js
  2. +9
    -0
      gorge.css
  3. +1
    -0
      gorge.html

+ 26
- 0
constants.js 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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>


Loading…
取消
儲存