From 7b8a347ab5f0425f8d2c0ef29fbae55a287f2d45 Mon Sep 17 00:00:00 2001 From: _ <> Date: Sun, 24 Oct 2021 22:22:08 +0000 Subject: [PATCH] still working on that first room --- src/main.rs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index c1254f8..25921f2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -61,7 +61,7 @@ fn line_response > (line: S) -> Response { } fn undetected_item () -> Response { - line_response ("That ITEM does not exist in this ROOM, or you have not detected it.") + line_response ("That ITEM does not exist in this ROOM, or you have not noticed it.") } fn just (t: T) -> Vec { @@ -228,7 +228,18 @@ impl State { just (line_response ("You wait around a bit. You can hear humming from the electrical lights, and the distant rumble of the building's HVAC system. The room smells faintly of fresh paint. Nothing has changed.")) }, PlayerAction::LookAround => { - just (line_response ("You are in a small room. In one corner is a TABLE. Obvious exits are a locked DOOR, and an EMERGENCY EXIT.")) + let mut output = vec! [ + line_response ("You are in a small room. In one corner is a TABLE. Obvious exits are a DOOR, and an EMERGENCY EXIT."), + ]; + + if self.room_1.detected_note { + output.push (line_response ("You have noticed a NOTE on the TABLE.")); + } + if self.room_1.detected_keypad { + output.push (line_response ("You have noticed the DOOR is locked by an electronic KEYPAD.")); + } + + output } PlayerAction::Look (item_name) => { match item_name { @@ -254,7 +265,7 @@ impl State { } just (Response::PrintMany (vec! [ - "You pick up the NOTE and read it.", + "You read the NOTE.", "", "Welcome to SEROTONIN DEPOSITORY.", "As you play, keep in mind:",