Explorar el Código

Add more news. Add pronoun settings to make news-writing easier

Lets you set subject/possessive/object pronouns, for maximum grammatical validity
tags/v0.1.0
Fen Dweller hace 5 años
padre
commit
4038bc18fc
No se encontró ninguna clave conocida en la base de datos para esta firma ID de clave GPG: E80B35A6F11C3656
Se han modificado 3 ficheros con 68 adiciones y 8 borrados
  1. +60
    -7
      constants.js
  2. +4
    -1
      gorge.js
  3. +4
    -0
      util.js

+ 60
- 7
constants.js Ver fichero

@@ -1098,7 +1098,7 @@ const helperUpgradeText = {
"desc": "Why bother chasing them, really?"
},
{
"name": "",
"name": "Servants",
"desc": "Why bother walking anywhere, really?"
}
],
@@ -1271,6 +1271,7 @@ const news = [
function createNews() {
createNewsFoodAmount();
createNewsFoodRate();
createNewsFoodRatePermanent();
createNewsBuildingCount();
}

@@ -1303,6 +1304,23 @@ function createNewsFoodRate() {
};
}

function createNewsFoodRatePermanent() {
let counter = 0;
for (let set of newsFoodRatePermanentText) {
const factor = counter;
let cond = state => {
return state.currentProductivity.food >= 5*Math.pow(10, factor)
}

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

counter += 1;
};
}

function createNewsBuildingCount() {
Object.entries(newsBuildingCountText).forEach(([key, sets]) => {
for (let [i, set] of sets.entries()) {
@@ -1355,17 +1373,30 @@ const newsFoodRateText = [
]
]

const newsFoodRatePermanentText = [
[
state => "Should we be concerned by " + macroDesc.name + "'s ever-growing hunger? \"No,\" says local " + macroDesc.species + "."
],
[
state => weekday() + " night football game cancelled due to " + macroDesc.species + " slobbering all over the field."
],
[
state => weekday() + " night football game cancelled due to " + macroDesc.species + " eating everyone involved."
]
]

const newsBuildingCountText = {
micro: [
[
state => "Micro-only diet: fad or fact? Our experts weigh in."
state => "Micro-only diet: fad or fact? Our experts weigh in.",
state => "\"What's the deal with micros, anyway?\" asks local comedian."
],
[
state => "\"I don't have a problem,\" says macro eating " + showBuilding("micro") + " per second",
state => "\"Isn't it weird how macros eat so many micros?\" asked confused citizen. \"Like, doesn't that mean they're double micros?\""
],
[
state => "Local macro celebrated for cleaning up the \"unending tide\" of micros"
state => "Local macro celebrated for cleaning up the \"unending tide\" of micros",
],
[
state => "That's a lot of micros."
@@ -1396,6 +1427,9 @@ const newsBuildingCountText = {
bus: [
[
state => "Macro craze fuels explosion in bus ridership."
],
[
state => "Isn't it kind of weird how well-designed buses are for macros? Like, really. I saw a " + macroDesc.name + " stick one up " + macroDesc.proPossessive + " a-"
]
],
house: [
@@ -1453,12 +1487,13 @@ const newsBuildingCountText = {
],
planet: [
[
state => "The Earth has been eaten. Everyone on it has been eaten."
state => "The Earth has been eaten. Everyone on it has been eaten.",
state => macroDesc.name + " has eaten the entire planet."
]
],
"solar-system": [
[
state => "Scientists propose new \"" + macroDesc.name + " unit\" to replace the outdated Astronomical Unit."
state => "Scientists propose new \"" + macroDesc.name + " Unit\" to replace the outdated Astronomical Unit."
]
],
galaxy: [
@@ -1560,16 +1595,34 @@ const statTypes = {

const options = {
name: {
name: "Your name",
name: "Name",
type: "text",
set: value => macroDesc.name = value,
get: () => macroDesc.name
},
species: {
name: "Your species",
name: "Species",
type: "text",
set: value => macroDesc.species = value,
get: () => macroDesc.species
},
subject: {
name: "Subject pronoun (e.g. he/she)",
type: "text",
set: value => macroDesc.proSubject = value,
get: () => macroDesc.proSubject
},
possessive: {
name: "Possessive pronoun (e.g. his/her)",
type: "text",
set: value => macroDesc.proPossessive = value,
get: () => macroDesc.proPossessive
},
object: {
name: "Object pronoun (e.g. him/her)",
type: "text",
set: value => macroDesc.proObject = value,
get: () => macroDesc.proObject
}
}
deepFreeze(prodUpgradeText);


+ 4
- 1
gorge.js Ver fichero

@@ -6,7 +6,10 @@ const stats = {};

const macroDesc = {
name: "Fen",
species: "crux"
species: "crux",
proSubject: "he",
proObject: "him",
proPossessive: "his",
}

const ownedUpgrades = {};


+ 4
- 0
util.js Ver fichero

@@ -49,3 +49,7 @@ function showBuilding(key) {
function capitalize(string) {
return string[0].toUpperCase() + string.slice(1)
}

function weekday() {
return ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][(new Date()).getDay()];
}

Cargando…
Cancelar
Guardar