From 070485e093dc540a5db9650d438cffe3d18d3883 Mon Sep 17 00:00:00 2001 From: tom barrett Date: Tue, 12 Feb 2019 13:20:06 -0600 Subject: added constants file, made so items are referred to by an enum, figured better ways than ship_clone --- src/modules/construction.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/modules/construction.rs') diff --git a/src/modules/construction.rs b/src/modules/construction.rs index f55a2fb..20f1688 100644 --- a/src/modules/construction.rs +++ b/src/modules/construction.rs @@ -1,6 +1,8 @@ -use crate::modules::types::ModuleType; use std::time::SystemTime; +use crate::constants; +use crate::modules::types::ModuleType; + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq)] pub enum ConstructionStatus { None, @@ -27,7 +29,7 @@ impl Construction { Construction { status: ConstructionStatus::None, construction: None, - time: 5, + time: constants::SHIP_CONSTRUCTION_TIME, start: None, } } @@ -58,7 +60,7 @@ impl Construction { self.status = ConstructionStatus::None; } - pub fn take(&mut self) { + pub fn taken(&mut self) { self.off() } } -- cgit v1.2.3