Skip to content

Commit

Permalink
Inside description flavor text
Browse files Browse the repository at this point in the history
  • Loading branch information
glyph committed Jun 21, 2021
1 parent b9f420c commit e204c51
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 5 deletions.
44 changes: 43 additions & 1 deletion src/Inside.kt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,44 @@ object Inside : Tab("inside", "Inside", 10) {
""".trimIndent()
}

fun onHeatChange() {
val descr = when (heat) {
HeatLevel.FREEZING -> {
"The walls are iron plate and frost gives them a faint shimmer. A storage room " +
"keeps your meager supplies. The barracks contain enough space for everyone, though " +
"the current temperatures make sleep a dangerous proposition."
}
HeatLevel.COLD -> {
"The walls are iron plate and frost gives them a faint shimmer. A storage room " +
"keeps your meager supplies. The barracks contain enough space for everyone. It is " +
"uncomfortably cold."
}
HeatLevel.COOL -> {
"The walls are iron plate and frost gives them a faint shimmer. A storage room " +
"keeps your meager supplies. The barracks contain enough space for everyone. A small " +
"fire in the middle of the room does little to keep away the chill."
}
HeatLevel.WARM -> {
"The walls are iron plate and frost gives them a faint shimmer. A storage room " +
"keeps your meager supplies. The barracks contain enough space for everyone. A fire is " +
"blazing in the middle of the room, and people crowd around it."
}
HeatLevel.COZY -> {
"The walls are iron plate and frost gives them a faint shimmer. A storage room " +
"keeps your meager supplies. The barracks contain enough space for everyone. A roaring " +
"fire fills the room with a cozy warmth."
}
HeatLevel.HOT -> {
"The walls are iron plate and frost gives them a faint shimmer. A storage room " +
"keeps your meager supplies. The barracks contain enough space for everyone. The room is " +
"almost unbearably hot for anyone wearing more than a t-shirt."
}
HeatLevel.LIMIT -> {
"The room spontaneously combusts. Everyone dies in the fire. (You shouldn't be here)"
}
}
}

fun enableHeat() {
heatDiv.append(heatIndicator)
MAIN_DIV.append(heatDiv)
Expand Down Expand Up @@ -121,7 +159,11 @@ object Inside : Tab("inside", "Inside", 10) {
heatIndicator.value = 1.0
}

heat = HeatLevel.values()[floor(heatAsNumber).toInt()]
val newHeat = HeatLevel.values()[floor(heatAsNumber).toInt()]
if (newHeat != heat) {
heat = newHeat
onHeatChange()
}
currentHeatColor = currentHeatRootColor.gradientTo(targetHeatColor, interpolation.percentCompleted())
heatStyle.innerHTML = heatRawStyle(currentHeatColor)

Expand Down
8 changes: 4 additions & 4 deletions src/Story.kt
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ object Story {
private fun enterBaseProper() {
Messages.append("With a final 'Ho!' your pickaxes break through the wall ahead. In the area behind, " +
"you find a storage room where you drop off the supplies you brought with you, " +
"as well a couple of barracks. It is freezing cold - you should probably think about" +
"as well a couple of barracks. It is freezing cold - you should probably think about " +
"starting a campfire.\n" +
"\n" +
"You find a door the seems to lead deeper into the mountain, but it it frozen shut.")

Inside.setDescription("The walls are iron plate and frost gives them a faint shimmer. A storage rooms " +
"keeps your meager supplies. The barracks contain enough space for everyone, though" +
"it is much too cold to feel comfortable.")
Inside.setDescription("The walls are iron plate and frost gives them a faint shimmer. A storage room " +
"keeps your meager supplies. The barracks contain enough space for everyone, though " +
"the current temperature makes sleep a dangerous proposition.")

Resources.add(Resource.WOOD, 15)
Resources.add(Resource.FOOD, 100)
Expand Down

0 comments on commit e204c51

Please sign in to comment.