From 8706a57ffb77008d310f72075e6d83f3f0a25de3 Mon Sep 17 00:00:00 2001 From: Oreolek Date: Wed, 2 Dec 2015 17:56:40 +0700 Subject: [PATCH] Linting --- game/en.coffee | 13 +++++++++---- game/main.coffee | 10 +++++----- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/game/en.coffee b/game/en.coffee index 39c0a73..e194570 100644 --- a/game/en.coffee +++ b/game/en.coffee @@ -12,7 +12,8 @@ module.exports.language = emptyclip: "I get rid of empty cartridge." player_hit:[ "Android's head explodes like a Christmas fireworks.", - "Android tries to dodge but finds himself right on the bullet's wrong side. He falls, flooding the floor with oil." + "Android tries to dodge but finds himself right on the bullet's wrong side. + He falls, flooding the floor with oil." ] player_finished:[ "I finish the android with a shot to his heart.", @@ -20,7 +21,8 @@ module.exports.language = "The bullet pierces android's head and he finally falls on the floor motionless.", ] player_nicked:[ - "I shoot the enemy's leg off. He falls but keeps slowly scratch his way with his hands.", + """I shoot the enemy's leg off. + He falls but keeps slowly scratch his way with his hands.""", "I shoot through the android's arm. He stumbles but keeps going.", ] shoot:[ @@ -46,7 +48,10 @@ module.exports.language = "Slowly take aim and shoot", ] reload: "Reload the pistol", - reload_response: "I put another clip in the pistol. I hope it has some ammo." + reload_response: """ + I put another clip in the pistol. + I hope it has some ammo. + """ search: "Search for a clip" search_response:[ "I hastily search the floor, trying to find at least one cartridge intact.", @@ -54,7 +59,7 @@ module.exports.language = ] finale: """ KABOOM! - + The last android suddenly explodes like larded with dynamite. Eh, with these machines you never know. I turn around and go away, not looking at the fire. diff --git a/game/main.coffee b/game/main.coffee index 6bf3e5d..a1de49d 100644 --- a/game/main.coffee +++ b/game/main.coffee @@ -28,7 +28,7 @@ undum.game.version = "1.0" way_to = (content, ref) -> a(content).class('way').ref(ref) textlink = (content, ref) -> a(content).once().writer(ref) is_visited = (situation) -> undum.game.situations[situation].visited == 1 -writemd = (system, text) -> +writemd = (system, text) -> if typeof text is Function text = text() system.write(markdown.render(text)) @@ -151,7 +151,7 @@ situation "reload", character.sandbox.seen_reload = 1 system.clearContent() character.sandbox.distance-- - after: (character, system) -> + after: (character, system) -> spend_clip(character, system) writemd(system, "reload_response".l()) return true @@ -199,9 +199,9 @@ situation "not_found", situation "finale", content: (character, system) -> - if character.sandbox.shots == 35 - return "finale_perfect".l(), - return "finale".l(), + if character.sandbox.shots < 36 + return "finale_perfect".l() + return "finale".l() qualities head: