summaryrefslogtreecommitdiff
path: root/src/modules/construction.rs
diff options
context:
space:
mode:
authortom barrett <spalf0@gmail.com>2019-02-12 13:20:06 -0600
committertom barrett <spalf0@gmail.com>2019-02-12 13:20:06 -0600
commit070485e093dc540a5db9650d438cffe3d18d3883 (patch)
treea0ab1f42c844b3557c7f17b11f3c7eae334e853d /src/modules/construction.rs
parent6a906ce663935e37d6dd79a2e2e31fb07ca7c2af (diff)
added constants file, made so items are referred to by an enum, figured better ways than ship_clone
Diffstat (limited to 'src/modules/construction.rs')
-rw-r--r--src/modules/construction.rs8
1 files changed, 5 insertions, 3 deletions
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()
}
}