diff options
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/construction.rs | 8 | ||||
-rw-r--r-- | src/client/refinery.rs | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/client/construction.rs b/src/client/construction.rs index b034b77..8cb812f 100644 --- a/src/client/construction.rs +++ b/src/client/construction.rs @@ -7,6 +7,7 @@ use std::io::{stdout, Read, Write}; use std::io::{BufRead, BufReader}; use std::net::TcpStream; +use crate::constants; use crate::modules::construction::ConstructionStatus; use crate::server::construction::ConstructionData; @@ -24,7 +25,7 @@ pub fn client_construction(mut stream: TcpStream, mut buff_r: BufReader<TcpStrea let clear = termion::cursor::Goto(1, 1); - if data.has_refined { + if data.has_enough { match data.status { ConstructionStatus::None => { write!(stdout, "{}Press c to create a refinery.", clear).unwrap() @@ -34,8 +35,9 @@ pub fn client_construction(mut stream: TcpStream, mut buff_r: BufReader<TcpStrea } else { write!( stdout, - "{}You need 5 refined minerals to create a refinery.", - clear + "{}You need {} iron to create a refinery.", + clear, + constants::SHIP_CONSTRUCTION_IRON_COST ) .unwrap(); } diff --git a/src/client/refinery.rs b/src/client/refinery.rs index caceda7..a3ae6f4 100644 --- a/src/client/refinery.rs +++ b/src/client/refinery.rs @@ -24,7 +24,7 @@ pub fn client_refinery(mut stream: TcpStream, mut buff_r: BufReader<TcpStream>) let clear = termion::cursor::Goto(1, 1); - if data.has_minerals { + if data.has_crude_minerals { match data.status { RefineryStatus::None => { write!(stdout, "{}Press R to begin refining.", clear).unwrap() @@ -32,7 +32,7 @@ pub fn client_refinery(mut stream: TcpStream, mut buff_r: BufReader<TcpStream>) _ => write!(stdout, "{}Press R to stop refining.", clear).unwrap(), }; } else { - write!(stdout, "{}You have no refinable minerals.", clear).unwrap(); + write!(stdout, "{}You have no crude minerals.", clear).unwrap(); } if let Some(c) = stdin.next() { |